]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ChangeLog.graphite
target.def (output_addr_const_extra): New hook.
[thirdparty/gcc.git] / gcc / ChangeLog.graphite
CommitLineData
e262fdda
AS
12010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
2
3 * graphite-blocking.c
4 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
5 * graphite-clast-to-gimple.c
6 (clast_to_gcc_expression): Same.
7 (precision_for_value): Same.
8 (precision_for_interval): Same.
9 (gcc_type_for_interval): Same.
10 (graphite_create_new_guard): Same.
11 (compute_bounds_for_level): Same.
12 (graphite_create_new_loop_guard): Same.
13 * graphite-interchange.c
14 (build_linearized_memory_access): Same.
15 (pdr_stride_in_loop): Same.
16 (memory_strides_in_loop_1): Same.
17 (memory_strides_in_loop): Same.
18 (extend_scattering): Same.
19 (psct_scattering_dim_for_loop_depth): Same.
20 (pbb_number_of_iterations): Same.
21 * graphite-poly.h
22 (debug_iteration_domains): Same.
23 * graphite-ppl.c
24 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
25 (ppl_set_inhomogeneous_gmp): Same.
26 (ppl_strip_loop): Same.
27 (ppl_lexico_compare_linear_expressions): Same.
28 (ppl_read_polyhedron_matrix): Same.
29 (ppl_max_for_le_pointset): Same.
30 * graphite-ppl.h
31 (ppl_read_polyhedron_matrix): Same.
32 (tree_int_to_gmp): Same.
33 (gmp_cst_to_tree): Same.
34 (ppl_set_inhomogeneous): Same.
35 (ppl_set_inhomogeneous_tree): Same.
36 (ppl_set_coef): Same.
37 (ppl_set_coef_tree): Same.
38 * graphite-sese-to-poly.c
39 (build_pbb_scattering_polyhedrons): Same.
40 (build_scop_scattering): Same.
41 (scan_tree_for_params_right_scev): Same.
42 (scan_tree_for_params): Same.
43 (find_params_in_bb): Same.
44 (find_scop_parameters): Same.
45 (add_upper_bounds_from_estimated_nit): Same.
46 (build_loop_iteration_domains): Same.
47 (add_condition_to_domain): Same.
48 (pdr_add_memory_accesses): Same.
49
a0bb35c7
AS
502010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
51
52 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
53 CLooG's value_* macros to their respective mpz_* counterparts.
54 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
55 (graphite_create_new_loop_guard): Same.
56 * graphite-interchange.c (build_linearized_memory_access): Same.
57 (pdr_stride_in_loop): Same.
58 (memory_strides_in_loop_1): Same.
59 (1st_interchange_profitable_p): Same.
60 * graphite-poly.c (extend_scattering): Same.
61 (psct_scattering_dim_for_loop_depth): Same.
62 (pbb_number_of_iterations): Same.
63 (pbb_number_of_iterations_at_time): Same.
64 * graphite-poly.h (new_1st_loop): Same.
65 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
66 (oppose_constraint): Same.
67 (insert_constraint_into_matrix): Same.
68 (ppl_set_inhomogeneous_gmp): Same.
69 (ppl_set_coef_gmp): Same.
70 (ppl_strip_loop): Same.
71 (ppl_lexico_compare_linear_expressions): Same.
72 (ppl_max_for_le_pointset): Same.
73 (ppl_min_for_le_pointset): Same.
74 (ppl_build_realtion): Same.
75 * graphite-ppl.h (gmp_cst_to_tree): Same.
76 (ppl_set_inhomogeneous): Same.
77 (ppl_set_inhomogeneous_tree): Same.
78 (ppl_set_coef): Same.
79 (ppl_set_coef_tree): Same.
80 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
81 (build_scop_scattering): Same.
82 (add_value_to_dim): Same.
83 (scan_tree_for_params_right_scev): Same.
84 (scan_tree_for_params_int): Same.
85 (scan_tree_for_params): Same.
86 (find_params_in_bb): Same.
87 (find_scop_parameters): Same.
88 (add_upper_bounds_from_estimated_nit): Same.
89 (build_loop_iteration_domains): Same.
90 (create_linear_expr_from_tree): Same.
91 (add_condition_to_domain): Same.
92 (pdr_add_memory_accesses): Same.
93
b8132a7d
SP
942010-04-05 Sebastian Pop <sebastian.pop@amd.com>
95
96 PR middle-end/43519
97 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
98 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
99 When converting an unsigned type to signed, double its precision.
100 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
101 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
102 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
103
1042010-04-05 Sebastian Pop <sebastian.pop@amd.com>
105
106 PR middle-end/43519
107 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
108 build_nonstandard_integer_type.
109 (gcc_type_for_interval): Same.
110
1112010-04-05 Sebastian Pop <sebastian.pop@amd.com>
dbe0d652
SP
112
113 PR middle-end/43519
114 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
115 POINTER_PLUS_EXPR for pointer types.
116
117 * gcc.dg/graphite/id-19.c: New.
118
bd32f344
SP
1192010-04-04 Sebastian Pop <sebastian.pop@amd.com>
120
121 PR middle-end/43519
122 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
123 * graphite-clast-to-gimple.c: Include langhooks.h.
124 (max_signed_precision_type): New.
125 (max_precision_type): Takes two types as arguments.
126 (precision_for_value): New.
127 (precision_for_interval): New.
128 (gcc_type_for_interval): New.
129 (gcc_type_for_value): New.
130 (gcc_type_for_clast_term): New.
131 (gcc_type_for_clast_red): New.
132 (gcc_type_for_clast_bin): New.
133 (gcc_type_for_clast_expr): Split up into several functions.
134 (gcc_type_for_clast_eq): Rewritten.
135 (compute_bounds_for_level): New.
136 (compute_type_for_level_1): New.
137 (compute_type_for_level): New.
138 (gcc_type_for_cloog_iv): Removed.
139 (gcc_type_for_iv_of_clast_loop): Rewritten.
140 (graphite_create_new_loop): Compute the lower and upper bound types
141 with gcc_type_for_clast_expr.
142 (graphite_create_new_loop_guard): Same.
143 (find_cloog_iv_in_expr): Removed.
144 (compute_cloog_iv_types_1): Removed.
145 (compute_cloog_iv_types): Removed.
146 (gloog): Do not call compute_cloog_iv_types.
147 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
148 GBB_CLOOG_IV_TYPES.
149 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
150 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
151 (GBB_CLOOG_IV_TYPES): Removed.
152
153 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
154
79d03cf8
SP
1552010-04-02 Sebastian Pop <sebastian.pop@amd.com>
156
157 Reverted this commit: as at this point the loop closed SSA form
158 is under a canonical form respecting the single argument condition.
159 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
160 close phi nodes may have more than one argument.
161
1622010-04-01 Sebastian Pop <sebastian.pop@amd.com>
163
164 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
165 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
166 (detect_commutative_reduction): Same.
167
1682010-03-31 Sebastian Pop <sebastian.pop@amd.com>
169
170 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
171 close phi nodes may have more than one argument.
172
3cbf7085
RG
1732010-03-30 Richard Guenther <rguenther@suse.de>
174 Zdenek Dvorak <ook@ucw.cz>
175 Sebastian Pop <sebastian.pop@amd.com>
176
177 PR middle-end/43464
178 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
179 with multiple arguments.
180 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
181
40bf935e
SP
1822010-03-23 Sebastian Pop <sebastian.pop@amd.com>
183
184 * graphite-dependences.c (print_pddr): Call print_pdr with an
185 extra argument.
186 * graphite-poly.c (debug_pdr): Add an extra argument for the
187 verbosity level.
188 (print_pdr): Same.
189 (print_pbb_domain): Same.
190 (print_pbb): Same.
191 (print_scop_context): Same.
192 (print_scop): Same.
193 (print_cloog): Same.
194 (debug_pbb_domain): Same.
195 (debug_pbb): Same.
196 (print_pdrs): Same.
197 (debug_pdrs): Same.
198 (debug_scop_context): Same.
199 (debug_scop): Same.
200 (debug_cloog): Same.
201 (print_scop_params): Same.
202 (debug_scop_params): Same.
203 (print_iteration_domain): Same.
204 (print_iteration_domains): Same.
205 (debug_iteration_domain): Same.
206 (debug_iteration_domains): Same.
207 (print_scattering_function): Same.
208 (print_scattering_functions): Same.
209 (debug_scattering_function): Same.
210 (debug_scattering_functions): Same.
211 * graphite-poly.h (debug_pdr): Update declaration.
212 (print_pdr): Same.
213 (print_pbb_domain): Same.
214 (print_pbb): Same.
215 (print_scop_context): Same.
216 (print_scop): Same.
217 (print_cloog): Same.
218 (debug_pbb_domain): Same.
219 (debug_pbb): Same.
220 (print_pdrs): Same.
221 (debug_pdrs): Same.
222 (debug_scop_context): Same.
223 (debug_scop): Same.
224 (debug_cloog): Same.
225 (print_scop_params): Same.
226 (debug_scop_params): Same.
227 (print_iteration_domain): Same.
228 (print_iteration_domains): Same.
229 (debug_iteration_domain): Same.
230 (debug_iteration_domains): Same.
231 (print_scattering_function): Same.
232 (print_scattering_functions): Same.
233 (debug_scattering_function): Same.
234 (debug_scattering_functions): Same.
235
730a9846
SP
2362010-03-23 Sebastian Pop <sebastian.pop@amd.com>
237
238 * graphite-poly.c (print_scattering_function_1): New.
239 (print_scattering_function): Call it.
240 (print_scop_params): Remove spaces at the end of lines.
241 (print_cloog): New.
242 (debug_cloog): New.
243 * graphite-poly.h (print_cloog): Declared.
244 (debug_cloog): Declared.
245
9c0c34c2
SP
2462010-03-23 Sebastian Pop <sebastian.pop@amd.com>
247
248 * tree-ssa-copy.c: Revert this previous change:
249 (init_copy_prop): Loop closed phi nodes cancontain more than one
250 argument.
251 (execute_copy_prop): Revert the previous change: do not call
252 rewrite_into_loop_closed_ssa.
253
2542010-03-21 Sebastian Pop <sebastian.pop@amd.com>
255 Richard Guenther <rguenther@suse.de>
256
257 PR middle-end/43464
258 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
259 contain more than one argument.
260 (execute_copy_prop): Revert the previous change: do not call
261 rewrite_into_loop_closed_ssa.
262
263 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
264 * gcc.dg/graphite/id-pr43464-1.c: New.
265
2662010-03-21 Sebastian Pop <sebastian.pop@amd.com>
267
268 PR middle-end/43464
269 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
270 and verify_loop_closed_ssa when copy prop is executed in the LNO.
271
272 * gcc.dg/graphite/id-pr43464.c: New.
273
c80a5403
SP
2742010-03-16 Sebastian Pop <sebastian.pop@amd.com>
275
276 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
277 in loop->header.
278 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
279 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
280 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
281 to switch between adding the IV bump in loop->latch or in loop->header.
282
caaf41d0
SP
2832010-03-16 Sebastian Pop <sebastian.pop@amd.com>
284
285 * passes.c (init_optimization_passes): Add pass_copy_prop
286 after Graphite.
287
03922af3
SP
2882010-03-16 Sebastian Pop <sebastian.pop@amd.com>
289
290 * graphite-poly.c (print_scattering_function): Pretty print following
291 the scoplib format.
292 (print_pdr): Same.
293 (print_pbb_domain): Same.
294 (dump_gbb_cases): Same.
295 (dump_gbb_conditions): Same.
296 (print_pdrs): Same.
297 (print_pbb): Same.
298 (print_scop_params): Same.
299 (print_scop_context): Same.
300 (print_scop): Same.
301 (print_pbb_body): New.
302 (lst_indent_to): New.
303 (print_lst): Start new lines with a #.
304 * graphite-poly.h (pbb_bb): New.
305 (pbb_index): Use pbb_bb.
306 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
307 disjuncts.
308 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
309
7da9e6ed
SP
3102010-03-13 Sebastian Pop <sebastian.pop@amd.com>
311
312 PR middle-end/43351
313 * gcc.dg/graphite/id-pr43351.c
314
6492b694
SP
3152010-03-13 Sebastian Pop <sebastian.pop@amd.com>
316
317 PR middle-end/43354
318 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
319 call insert_out_of_ssa_copy for default definitions.
320 * gfortran.dg/graphite/id-pr43354.f: New.
321
3222010-03-13 Sebastian Pop <sebastian.pop@amd.com>
113081e4
SP
323
324 PR middle-end/43349
325 * gfortran.dg/graphite/pr43349.f: New.
326
248081bc
SP
3272010-03-11 Sebastian Pop <sebastian.pop@amd.com>
328
329 * graphite-clast-to-gimple.c (my_long_long): Defined.
330 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
331 * graphite-sese-to-poly.c (my_long_long): Defined.
332 (scop_ivs_can_be_represented): Use it.
333
d97c90ae
SP
3342010-03-10 Sebastian Pop <sebastian.pop@amd.com>
335
336 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
337 graphite-max-bbs-per-function, and loop-block-tile-size.
338 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
339 with "maximum".
340 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
341
a5a59b11
SP
3422010-03-10 Sebastian Pop <sebastian.pop@amd.com>
343
344 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
345 forward declaration.
346 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
347 (add_upper_bounds_from_estimated_nit): New.
348 (build_loop_iteration_domains): Use it.
349
9d198913
SP
3502010-03-09 Sebastian Pop <sebastian.pop@amd.com>
351
352 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
353
1f380314
SP
3542010-03-09 Sebastian Pop <sebastian.pop@amd.com>
355
356 PR middle-end/43306
357 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
358 should be an INTEGER_CST. Also handle CASE_CONVERT.
359 * gcc.dg/graphite/pr43306.c: New.
360
b6bb0094
SP
3612010-03-09 Sebastian Pop <sebastian.pop@amd.com>
362
363 * graphite.c (graphite_initialize): To bound the number of bbs per
364 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
365 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
366 * doc/invoke.texi: Document it.
367
e84aaa33
SP
3682010-03-09 Sebastian Pop <sebastian.pop@amd.com>
369
370 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
371 * graphite-sese-to-poly.h (build_poly_scop): Same.
372
4e7dd376
SP
3732010-03-09 Sebastian Pop <sebastian.pop@amd.com>
374
375 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
376 the number of parameters in the scop. Use as an upper bound
377 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
378 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
379 * doc/invoke.texi: Document it.
380
697f511d
SP
3812010-03-05 Sebastian Pop <sebastian.pop@amd.com>
382
383 * graphite-sese-to-poly.c (add_param_constraints): Use
384 lower_bound_in_type and upper_bound_in_type.
385
456cc718
SP
3862010-03-05 Sebastian Pop <sebastian.pop@amd.com>
387
388 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
389 instead of unsigned_type_node.
390
3640d64c
SP
3912010-03-05 Sebastian Pop <sebastian.pop@amd.com>
392 Reza Yazdani <reza.yazdani@amd.com>
393
394 PR middle-end/43065
395 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
396 on pointer type parameters.
397
398 * gcc.dg/graphite/run-id-4.c: New.
399
4002010-03-05 Sebastian Pop <sebastian.pop@amd.com>
b75d95c9
SP
401
402 PR middle-end/43065
403 * gcc.dg/graphite/run-id-3.c: New.
404
73102986
TG
4052010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
406 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
407
408 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
409 handle conversions from pointer to integers.
410 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
411 induction variable, to be able to work with code generated by CLooG.
412 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
413 (build_poly_scop): Bail out if we cannot codegen a loop.
414
e3f81db1
TG
4152010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
416
417 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
418 code generation with gloog_error.
419
c7631a71
SP
4202010-03-04 Sebastian Pop <sebastian.pop@amd.com>
421
422 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
423 Call fold_convert on all the returned values.
424 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
425 the type of the resulting expression.
426
b0602cc8
SP
4272010-03-04 Sebastian Pop <sebastian.pop@amd.com>
428
429 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
430 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
431 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
432
b188bb7c
SP
4332010-03-04 Sebastian Pop <sebastian.pop@amd.com>
434
435 * graphite-dependences.c (map_into_dep_poly): Removed.
436 (dependence_polyhedron_1): Use combine_context_id_scat.
437
aa52513e
SP
4382010-03-04 Sebastian Pop <sebastian.pop@amd.com>
439
440 * graphite-poly.h (struct poly_scattering): Add layout documentation.
441 (struct poly_bb): Same.
442 (combine_context_id_scat): New.
443
392c0ce1
SP
4442010-03-02 Sebastian Pop <sebastian.pop@amd.com>
445
446 PR middle-end/42326
447 * sese.c (name_defined_in_loop_p): Return false for default
448 definitions.
449
450 * gcc.dg/graphite/pr42326.c: New.
451
bd7742f8
SP
4522010-02-23 Sebastian Pop <sebastian.pop@amd.com>
453
454 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
455 and clean up the logic.
456
733ff09d
SP
4572010-02-23 Sebastian Pop <sebastian.pop@amd.com>
458
459 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
460 early return.
461
4caa8e21
SP
4622010-02-22 Sebastian Pop <sebastian.pop@amd.com>
463
464 PR middle-end/43083
465 * graphite-scop-detection.c (create_single_exit_edge): Move
466 the call to find_single_exit_edge to....
467 (create_sese_edges): ...here. Don't handle multiple edges
468 exiting the function.
469 (build_graphite_scops): Don't handle multiple edges
470 exiting the function.
471
472 * gcc.dg/graphite/pr43083.c: New.
473
c3382979
SP
4742010-02-22 Sebastian Pop <sebastian.pop@amd.com>
475
b8df8b8b 476 PR middle-end/43097
c3382979
SP
477 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
478 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
479
480 * gfortran.dg/graphite/pr43097.f: New.
481
13cd10a2
SP
4822010-02-22 Sebastian Pop <sebastian.pop@amd.com>
483 Manuel López-Ibáñez <manu@gcc.gnu.org>
484
485 PR middle-end/43140
486 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
487
4882010-02-22 Sebastian Pop <sebastian.pop@amd.com>
143b72a9
SP
489
490 PR middle-end/43026
491 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
492
493 * g++.dg/graphite/pr43026.C: New.
494
4e722673
SP
4952010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
496
497 * Merge from mainline (154736:156693).
498
c2814aab
SP
4992010-02-11 Sebastian Pop <sebastian.pop@amd.com>
500
501 PR middle-end/43012
502 * gcc.dg/graphite/pr43012.c: New.
be1c3b28 503
c2814aab 5042010-02-10 Sebastian Pop <sebastian.pop@amd.com>
be1c3b28 505
c2814aab 506 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
be1c3b28
SP
5072010-02-10 Sebastian Pop <sebastian.pop@amd.com>
508
509 * g++.dg/graphite/pr42930.C: New.
510
141ecc24 5112010-02-10 Sebastian Pop <sebastian.pop@amd.com>
c4c4983e
SP
512
513 PR middle-end/42930
514 * graphite-scop-detection.c (graphite_can_represent_scev): Call
515 graphite_can_represent_init for MULT_EXPR.
516
141ecc24 5172010-02-10 Sebastian Pop <sebastian.pop@amd.com>
a4681954
SP
518
519 PR middle-end/42914
520 PR middle-end/42530
521 * graphite-sese-to-poly.c (remove_phi): New.
522 (translate_scalar_reduction_to_array): Call remove_phi.
523
524 * gcc.dg/graphite/pr42530.c: New.
525 * gcc.dg/graphite/pr42914.c: New.
526
141ecc24 5272010-02-10 Sebastian Pop <sebastian.pop@amd.com>
a1954f72
SP
528
529 PR middle-end/42771
530 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
531 * graphite-clast-to-gimple.h (gloog): Update declaration.
532 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
533 * graphite-poly.h (struct poly_bb): Add missing comments.
534 (struct scop): Add poly_scop_p field.
535 (POLY_SCOP_P): New.
536 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
537 * graphite.c (graphite_transform_loops): Build the polyhedral
538 representation for each scop before code generation.
539 * sese.c (rename_variables_in_operand): Removed.
540 (rename_variables_in_expr): Return the renamed expression.
541 (rename_sese_parameters): New.
542 * sese.h (rename_sese_parameters): Declared.
543
544 * gcc.dg/graphite/pr42771.c: New.
545
0be957dc
SP
5462010-02-07 Sebastian Pop <sebastian.pop@amd.com>
547
548 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
549 return 0 from main.
550 * gcc.dg/graphite/block-1.c: Same.
551 * gcc.dg/graphite/block-3.c: Same.
552 * gcc.dg/graphite/block-4.c: Same.
553 * gcc.dg/graphite/block-5.c: Same.
554 * gcc.dg/graphite/block-6.c: Same.
555 * gcc.dg/graphite/block-7.c: Same.
556 * gcc.dg/graphite/interchange-0.c: Same.
557 * gcc.dg/graphite/interchange-1.c: Same.
558 * gcc.dg/graphite/interchange-10.c: Same.
559 * gcc.dg/graphite/interchange-11.c: Same.
560 * gcc.dg/graphite/interchange-12.c: Same.
561 * gcc.dg/graphite/interchange-2.c: Same.
562 * gcc.dg/graphite/interchange-3.c: Same.
563 * gcc.dg/graphite/interchange-4.c: Same.
564 * gcc.dg/graphite/interchange-5.c: Same.
565 * gcc.dg/graphite/interchange-6.c: Same.
566 * gcc.dg/graphite/interchange-7.c: Same.
567 * gcc.dg/graphite/interchange-8.c: Same.
568 * gcc.dg/graphite/interchange-9.c: Same.
569 * gcc.dg/graphite/interchange-mvt.c: Same.
570
4d48441c
SP
5712010-02-07 Sebastian Pop <sebastian.pop@amd.com>
572
573 * gfortran.dg/graphite/id-19.f: New.
574 * gfortran.dg/graphite/pr14741.f90: New.
575 * gfortran.dg/graphite/pr41924.f90: New.
576 * gfortran.dg/graphite/run-id-2.f90: New.
577
8d2220b2
SP
5782010-02-07 Sebastian Pop <sebastian.pop@amd.com>
579
580 PR middle-end/42988
581 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
582 to unknown_dependence.
583 (graphite_legal_transform_dr): Handle the unknown_dependence.
584 (graphite_carried_dependence_level_k): Same.
585
45489e99
SP
5862010-02-07 Sebastian Pop <sebastian.pop@amd.com>
587
588 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
589
28f9f145
SP
5902010-02-05 Sebastian Pop <sebastian.pop@amd.com>
591 Konrad Trifunovic <konrad.trifunovic@inria.fr>
592
593 PR middle-end/42637
594 * graphite-dependences.c (build_lexicographical_constraint): Return
595 a union of dependence polyhedra.
596 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
597
45489e99
SP
598 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
599 * gcc.dg/graphite/block-4.c: Same.
600 * gcc.dg/graphite/block-7.c: Same.
601 * gcc.dg/graphite/interchange-12.c: Same.
602 * gcc.dg/graphite/interchange-mvt.c: Same.
603 * gfortran.dg/graphite/interchange-1.f: XFAILed.
604 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
605 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
28f9f145 606
4d0bf08b
SP
6072010-02-03 Sebastian Pop <sebastian.pop@amd.com>
608
45489e99 609 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
4d0bf08b
SP
610 the execution check to FAIL. This testcase is miscompiled by Graphite
611 and the check should be re-enabled.
45489e99
SP
612 * gcc.dg/graphite/interchange-mvt.c: Same.
613 * gcc.dg/graphite/block-0.c: Same.
614 * gcc.dg/graphite/block-4.c: Same.
615 * gcc.dg/graphite/block-7.c: Same.
4d0bf08b 616
54cf8879
SP
6172010-02-03 Sebastian Pop <sebastian.pop@amd.com>
618
45489e99
SP
619 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
620 * gcc.dg/graphite/scop-0.c: Fix spaces.
621 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
622 * gfortran.dg/graphite/block-2.f: Same.
623 * gfortran.dg/graphite/block-3.f90: Same.
624 * gfortran.dg/graphite/block-4.f90: Same.
625 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
626 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
54cf8879 627
b5eb099f
SP
6282010-02-03 Sebastian Pop <sebastian.pop@amd.com>
629
630 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
631 PDDR_ORIGINAL_SCATTERING_P.
632 (pddr_is_empty): Rewritten.
633 (print_dependence_polyhedron_layout): New.
634 (print_pddr): New.
635 (debug_pddr): New.
636 (build_alias_set_powerset): Moved up.
637 (poly_drs_may_alias_p): Moved up.
638 (lexicographically_gt_p): Removed.
639 (build_lexicographically_gt_constraint): Renamed
640 build_lexicographical_constraint, reimplemented.
641 (dependence_polyhedron_1): Simplified parameters.
642 (dependence_polyhedron): Same. Keep along empty PDDRs
643 to make efficient use of the cache.
644 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
645 (graphite_legal_transform_dr): Rewritten.
646 (graphite_legal_transform_bb): Pass fewer arguments to
647 graphite_legal_transform_dr.
648 (graphite_carried_dependence_level_k): Simplified implementation.
649 (dot_original_deps_stmt_1): Call dependence_polyhedron.
650 (dot_transformed_deps_stmt_1): Same.
651 (dot_original_deps): Same.
652 (dot_transformed_deps): Same.
653 * graphite-dependences.h (struct poly_ddr): Added a new field
654 original_scattering_p.
655 (PDDR_ORIGINAL_SCATTERING_P): New.
656 (print_pddr): Declared.
657 (debug_pddr): Declared.
658 * graphite-ppl.c: Clarify comment.
659 * sese.h (print_gimple_bb): Removed unused declaration.
660 (debug_gbb): Same.
661
64630e61
SP
6622010-02-03 Sebastian Pop <sebastian.pop@amd.com>
663
45489e99
SP
664 * g++.dg/graphite/graphite.exp: Rewritten.
665 * gcc.dg/graphite/graphite.exp: Rewritten.
666 * gfortran.dg/graphite/graphite.exp: Rewritten.
667 * gcc.dg/graphite/block-0.c: Added runtime test.
668 * gcc.dg/graphite/block-1.c: Same.
669 * gcc.dg/graphite/block-3.c: Same.
670 * gcc.dg/graphite/block-4.c: Same.
671 * gcc.dg/graphite/block-5.c: Same.
672 * gcc.dg/graphite/block-6.c: Same.
673 * gcc.dg/graphite/block-7.c: Same.
674 * gcc.dg/graphite/interchange-0.c: Same.
675 * gcc.dg/graphite/interchange-1.c: Same.
676 * gcc.dg/graphite/interchange-10.c: Same.
677 * gcc.dg/graphite/interchange-11.c: Same.
678 * gcc.dg/graphite/interchange-12.c: Same.
679 * gcc.dg/graphite/interchange-2.c: Same.
680 * gcc.dg/graphite/interchange-3.c: Same.
681 * gcc.dg/graphite/interchange-4.c: Same.
682 * gcc.dg/graphite/interchange-5.c: Same.
683 * gcc.dg/graphite/interchange-6.c: Same.
684 * gcc.dg/graphite/interchange-7.c: Same.
685 * gcc.dg/graphite/interchange-8.c: Same.
686 * gcc.dg/graphite/interchange-9.c: Same.
687 * gcc.dg/graphite/interchange-mvt.c: Same.
688 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
64630e61 689
4c8f3c48
RU
6902010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
691
692 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
693 background.
694
6952010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
696
697 * common.opt: Add -fgraphite-cloog-opts.
698 * graphite-clast-to-gimple.c (set_cloog_options): Same.
699 * opts.c (decode_options): Same.
700
86e4d552
SP
7012010-01-20 Sebastian Pop <sebastian.pop@amd.com>
702
45489e99
SP
703 * gcc.dg/graphite/id-17.c: New.
704 * gcc.dg/graphite/pr41888.c: New.
705 * gcc.dg/graphite/scop-22.c: New.
706 * gfortran.dg/graphite/pr40982.f90: New.
86e4d552 707
3070ac15
SP
7082010-01-20 Sebastian Pop <sebastian.pop@amd.com>
709
710 * graphite-dependences.c: Clarify comments.
711 (build_pddr): Add an extra parameter direction.
712 (graphite_legal_transform_dr): Use build_pddr.
713 (dot_original_deps_stmt_1): Update use of build_pddr.
714 (dot_transformed_deps_stmt_1): Same.
715 (dot_original_deps): Same.
716 (dot_transformed_deps): Same.
717
45489e99
SP
718 * gcc.dg/graphite/interchange-12.c: New.
719 * gcc.dg/graphite/block-7.c: New.
3070ac15 720
a7ed6c90
SP
7212010-01-20 Sebastian Pop <sebastian.pop@amd.com>
722
723 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
724 (pddr_transformed_scattering): Removed.
725 (graphite_legal_transform_dr): Use build_pddr.
726 (dot_original_deps_stmt_1): Same.
727 (dot_transformed_deps_stmt_1): Same.
728 (dot_original_deps): Same.
729 (dot_transformed_deps): Same.
730
e65a7579
SP
7312010-01-20 Sebastian Pop <sebastian.pop@amd.com>
732
733 * graphite-dependences.c (lexicographically_gt_p): Add comments.
734 (build_lexicographically_gt_constraint): Same.
735 (dependence_polyhedron_1): Same.
736 (dependence_polyhedron): Same.
737
7cbd4c5e
SP
7382010-01-20 Sebastian Pop <sebastian.pop@amd.com>
739
740 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
741 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
742 (lexicographically_gt_p): Change type of direction to int.
743 (build_lexicographically_gt_constraint): Same.
744 (dependence_polyhedron_1): Same.
745 (dependence_polyhedron): Same.
746 (pddr_original_scattering): Use integers for direction.
747 (pddr_transformed_scattering): Same.
748 (graphite_legal_transform_dr): Same.
749 (graphite_carried_dependence_level_k): Same.
750
429ba740
SP
7512010-01-20 Sebastian Pop <sebastian.pop@amd.com>
752
753 * graphite-dependences.c (build_pairwise_constraint): Renamed
754 ppl_build_relation. Moved...
755 (dr_equality_constraints): Use ppl_build_relation.
756 (build_pairwise_scheduling_equality): Same.
757 (build_pairwise_scheduling_inequality): Same.
758 * graphite-ppl.c (ppl_build_relation): ...here.
759 * graphite-ppl.h (ppl_build_relation): Declared.
760
3c7c0158
SP
7612010-01-14 Sebastian Pop <sebastian.pop@amd.com>
762
763 PR middle-end/42681
764 * graphite-clast-to-gimple.c (gloog_error): New static variable.
765 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
766 Set gloog_error when such an expression failed to be built.
767 (translate_clast): Early return when gloog_error is set.
768 (gloog): Clear gloog_error. When gloog_error is set, call
769 set_ifsese_condition to enable the original code. Return the status
770 of the code generation based on gloog_error.
771 * sese.c (set_ifsese_condition): New.
772 * sese.h (set_ifsese_condition): Declared.
773
45489e99 774 * g++.dg/graphite/pr42681.C: New.
3c7c0158 775
a7bf45de
SP
7762010-01-14 Sebastian Pop <sebastian.pop@amd.com>
777
778 PR middle-end/42732
779 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
780 rename_nb_iterations.
781 * sese.c (rename_variables_in_operand): New.
782 (rename_variables_in_expr): New.
783 (rename_nb_iterations): New.
784 (sese_adjust_liveout_phis): Update the rename_map.
785 * sese.h (rename_nb_iterations): Declared.
786 * tree-scalar-evolution.c (scev_reset_htab): New.
787 (scev_reset): Call scev_reset_htab.
788 * tree-scalar-evolution.h (scev_reset_htab): Declared.
789
45489e99 790 * gfortran.dg/graphite/pr42732.f: New.
a7bf45de 791
e1496917
SP
7922010-01-08 Sebastian Pop <sebastian.pop@amd.com>
793
794 PR middle-end/42393
795 * graphite-clast-to-gimple.c: Fix formatting.
796 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
797 (expr_defined_in_loop_p): New.
798 (add_loop_exit_phis): Also handle full expressions: remove from
799 the rename_map the expressions defined in the loop that we're closing.
800
45489e99
SP
801 * gfortran.dg/graphite/pr42393-1.f90: New.
802 * gfortran.dg/graphite/pr42393.f90: Add new flags
e1496917
SP
803 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
804 make this testcase useful in the Graphite branch.
805
c8ae0613
SP
8062010-01-08 Sebastian Pop <sebastian.pop@amd.com>
807
808 * graphite-scop-detection.c (exclude_component_ref): Removed.
809 (is_simple_operand): Removed.
810 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
811
4e98c66c
SP
8122010-01-07 Sebastian Pop <sebastian.pop@amd.com>
813
814 PR middle-end/42221
815 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
816 the array indexing of ADDR_EXPRs.
817
45489e99 818 * gcc.dg/graphite/pr42221.c: New.
4e98c66c 819
fd4a56ff
SP
8202010-01-07 Sebastian Pop <sebastian.pop@amd.com>
821
822 PR middle-end/42521
823 * graphite.c (graphite_finalize): Call scev_reset.
824 (graphite_transform_loops): Do not call scev_reset between the code
825 generation of scops.
826
45489e99 827 * gcc.dg/graphite/pr42521.c: New.
fd4a56ff 828
eaffa762
SP
8292010-01-07 Sebastian Pop <sebastian.pop@amd.com>
830
831 * graphite-interchange.c (memory_stride_in_loop): Renamed
832 pdr_stride_in_loop.
833 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
834 (memory_strides_in_loop): Memoize the memory strides per loop.
835 (lst_interchange_profitable_p): Do not initialize to zero the memory
836 strides.
837 * graphite-poly.h (struct lst): Add a field memory_strides.
838 (LST_LOOP_MEMORY_STRIDES): New.
839 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
840 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
841
bf69e754
SP
8422010-01-07 Sebastian Pop <sebastian.pop@amd.com>
843
844 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
845 memory_strides_in_loop. Gather memory strides on a whole loop.
846 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
847 (lst_interchange_profitable_p): Removed.
848 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
849
9fa29a09
SP
8502010-01-07 Sebastian Pop <sebastian.pop@amd.com>
851
852 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
853 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
854 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
855 Remove context_loop and level.
856
11d6ea5e
SP
8572010-01-07 Richard Guenther <rguenther@suse.de>
858
859 PR tree-optimization/42641
860 * sese.c (rename_map_elt_info): Use the SSA name version, do
861 not hash pointers.
862
8632010-01-06 Sebastian Pop <sebastian.pop@amd.com>
864
865 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
866 blocked" only when both the strip mine and the interchange have
867 been applied.
868
45489e99
SP
869 * gcc.dg/graphite/block-2.c: Removed.
870 * gcc.dg/graphite/block-3.c: Add scan pattern.
871 * gcc.dg/graphite/block-4.c: Same.
872 * gcc.dg/graphite/block-5.c: Same.
873 * gcc.dg/graphite/block-6.c: Same.
11d6ea5e 874
556afcdc
SP
8752010-01-06 Sebastian Pop <sebastian.pop@amd.com>
876
877 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
878 before allocating a new one.
879 (copy_renames): Check that slot is not NULL.
880 (mark_bb_with_pbb): Same.
881 (compute_cloog_iv_types_1): Same.
882 * graphite-interchange.c (lst_perfect_nestify): Free the before,
883 nest, and after LSTs.
884 (lst_try_interchange_loops): Same.
885
e68c3c6c
SP
8862010-01-05 Sebastian Pop <sebastian.pop@amd.com>
887
888 PR middle-end/42178
889 * graphite-interchange.c (lst_try_interchange_loops): Do not return
890 the before, nest, and after LSTs.
891 (lst_try_interchange): Removed.
892 (lst_interchange_select_inner): Do not iterate over the LSTs if they
893 were modified.
894 (lst_interchange_select_outer): Apply interchange on the outer loop
895 until there are no more changes in the inner loops.
896
a84a556d
SP
8972009-12-18 Sebastian Pop <sebastian.pop@amd.com>
898
899 Revert patch fixing PR middle-end/42221.
900
9012009-12-18 Sebastian Pop <sebastian.pop@amd.com>
902
903 PR middle-end/42180
904 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
905 GIMPLE_CALL.
906
45489e99 907 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
a84a556d 908
b147df0b
SP
9092009-12-18 Sebastian Pop <sebastian.pop@amd.com>
910
911 PR middle-end/42180
912 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
913 that contain only one statement.
914
45489e99 915 * gfortran.dg/graphite/pr42180.f90: New.
a84a556d 916
ce20f9d6
SP
9172009-12-17 Sebastian Pop <sebastian.pop@amd.com>
918
919 PR middle-end/42393
45489e99 920 * gfortran.dg/graphite/pr42393.f90: New.
ce20f9d6 921
d2a271ac
SP
9222009-12-17 Sebastian Pop <sebastian.pop@amd.com>
923
924 PR middle-end/42186
45489e99 925 * gfortran.dg/graphite/pr42186.f90: New.
d2a271ac 926
403ebc7e
SP
9272009-12-17 Sebastian Pop <sebastian.pop@amd.com>
928
929 PR middle-end/42205
930 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
931 Insert the reduction copy in the same block as the phi node.
932 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
933
45489e99
SP
934 * gcc.dg/graphite/pr42205-1.c: New.
935 * gcc.dg/graphite/pr42205-2.c: New.
403ebc7e
SP
936
9372009-12-17 Sebastian Pop <sebastian.pop@amd.com>
938
939 PR middle-end/42221
940 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
941 the array indexing of ADDR_EXPRs.
942
45489e99 943 * gcc.dg/graphite/pr42221.c: New.
403ebc7e 944
070ba483
SP
9452009-12-17 Sebastian Pop <sebastian.pop@amd.com>
946
947 PR middle-end/42178
948 PR middle-end/42334
949 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
950 index. Call lst_interchange_select_inner only once.
951 (lst_interchange_select_inner): Update use of lst_try_interchange.
952 (lst_interchange_select_outer): Update.
953
9542009-12-15 Sebastian Pop <sebastian.pop@amd.com>
955
956 PR middle-end/42178
957 PR middle-end/42334
958 * graphite-interchange.c (lst_try_interchange): Do not increment the
959 the OUTER index when there is no AFTER kernel. Do not increment the
960 OUTER index for after processing the AFTER kernel.
961 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
962 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
963 index. Do not pass to lst_interchange_select_inner the OUTER index.
964 (scop_do_interchange): Update use of lst_interchange_select_outer.
965
45489e99 966 * gfortran.dg/graphite/graphite.exp
070ba483 967 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
45489e99 968 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
070ba483 969 the graphite dump file.
45489e99
SP
970 * gfortran.dg/graphite/interchange-2.f: Same.
971 * gfortran.dg/graphite/pr42334-1.f: New.
070ba483
SP
972
9732009-12-15 Sebastian Pop <sebastian.pop@amd.com>
974
975 PR middle-end/42178
976 PR middle-end/42334
977 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
978 that are empty.
979 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
980 (lst_try_interchange): Reimplemented.
981 (lst_interchange_select_inner): Same.
982 (lst_do_interchange): Renamed lst_interchange_select_outer.
983 Reimplemented.
984 (scop_do_interchange): Update use of lst_interchange_select_outer.
985
45489e99
SP
986 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
987 * gcc.dg/graphite/block-0.c: Un-XFAILed.
988 * gcc.dg/graphite/pr42211.c: New.
989 * gfortran.dg/graphite/pr42334.f90: New.
070ba483 990
4b216ab0
SP
9912009-12-14 Sebastian Pop <sebastian.pop@amd.com>
992
993 PR middle-end/42181
994 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
995 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
996
45489e99 997 * gfortran.dg/graphite/pr42181.f90: New.
4b216ab0 998
c880097d
SP
9992009-12-12 Sebastian Pop <sebpop@gmail.com>
1000
1001 PR middle-end/42284
1002 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1003 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1004 (detect_commutative_reduction_arg): Simplified.
1005 (detect_commutative_reduction): Early return when the argument of
1006 the close phi is not of an SSA_NAME.
1007
45489e99 1008 * gcc.dg/graphite/pr42284.c: New.
c880097d
SP
1009
10102009-12-11 Alexander Monakov <amonakov@ispras.ru>
1011
1012 * dbgcnt.def (graphite_scop): New counter.
1013 * graphite.c: Include dbgcnt.h
1014 (graphite_transform_loops): Use new counter to limit transformations.
1015
d505015a
SP
10162009-12-08 Sebastian Pop <sebpop@gmail.com>
1017
1018 PR middle-end/42285
1019 * graphite-scop-detection.c (graphite_can_represent_init): Also
1020 handle more complex MULT_EXPRs containing parameters by recursion
1021 on the structure.
1022
45489e99 1023 * gfortran.dg/graphite/pr42285.f90: New.
d505015a
SP
1024
10252009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1026
45489e99 1027 * g++.dg/graphite/pr42130.C: Fix type.
d505015a 1028
ed807d06
AM
10292009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1030
45489e99
SP
1031 * g++.dg/graphite/pr42130.C: Correct testcase.
1032
10332009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1034
1035 * Merge from mainline (154493:154734).
1036
10372009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1038
1039 * Merge from mainline (151362:154491).
ed807d06 1040
7c246f5e
TG
10412009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1042
1043 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1044 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1045
0dd91484
TG
10462009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1047
1048 PR middle-end/42130
1049 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1050 translate_clast_for_loop): New.
1051 (translate_clast_for): Add a condition around the loop, to do not
1052 execute loops with zero iterations.
45489e99
SP
1053 * g++.dg/graphite/pr42130.C: New.
1054 * gcc.dg/graphite/pr35356-2.c: Adapt.
0dd91484 1055
fd2d813d
TG
10562009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1057
1058 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1059 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1060 Remove context_loop and level.
1061
9016166f
TG
10622009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1063
1064 * graphite-clast-to-gimple.c (translate_clast_user,
1065 translate_clast_for, translate_clast_guard): Simplify and move common
1066 elements to translate_clast().
1067 (translate_clast): Simplify and get common elements.
1068
e1f9c1cd
TG
10692009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1070
1071 * graphite-clast-to-gimple.c (translate_clast_user,
1072 translate_clast_for, translate_clast_guard): Split out of
1073 translate_clast.
1074
7a521ff2
TG
10752009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1076
1077 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1078 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1079 debug_clast_name_indexes_1, debug_clast_name_indexes,
1080 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1081 (clast_name_to_gcc, clast_to_gcc_expression,
1082 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1083 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1084 graphite_create_guard_cond_expr, graphite_create_new_loop,
1085 translate_clast): Add params_index.
1086 (initialize_cloog_names): Create parameter strings from scratch, do
1087 not reference other strings.
1088 (create_params_index): New.
1089 (gloog): Initialize params_index.
1090 * graphite-scop-detection (free_scops_1): Removed.
1091 (limit_scops): Use normal free_scops.
1092 * graphite-sese-to-poly.c (save_var_names): Removed.
1093 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1094 and SESE_PARAMS_INDEX.
1095 * sese.c (new_sese, free_sese): Dito.
1096 * sese.h (struct sese): Remove params_index, params_names.
1097 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1098
ca11b093
SP
10992009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1100
1101 Revert the following patch from 2009-09-14:
1102 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1103 tree-scalar-evolution.h, and then tree-data-ref.h.
1104 * graphite-clast-to-gimple.c: Same.
1105 * graphite-dependences.c: Same.
1106 * graphite-interchange.c: Same.
1107 * graphite-poly.c: Same.
1108 * graphite-scop-detection.c: Same.
1109 * graphite-sese-to-poly.c: Same.
1110 * graphite.c: Same.
1111 * lambda-code.c: Same.
1112 * matrix-reorg.c: Same.
1113 * tree-data-ref.c: Same.
1114 * tree-if-conv.c: Same.
1115 * tree-loop-distribu: Same.: Same.
1116 * tree-loop-linear.c: Same.
1117 * tree-parloops.c: Same.
1118 * tree-predcom.c: Same.
1119 * tree-vect-patterns.c: Same.
1120
8a9e9475
SP
11212009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1122
1123 Revert patch from 2009-09-14.
1124 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1125 passes at -O1 and below.
1126
4bf4e169
SP
11272009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1128
1129 PR middle-end/40281
45489e99 1130 * gcc.dg/graphite/pr40281.c: New.
4bf4e169
SP
1131
1132 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1133 evolutions should not variate in inner loops.
1134
12aec731
SP
11352009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1136
1137 PR middle-end/42050
45489e99 1138 * gfortran.dg/graphite/pr42050.f90: New.
12aec731 1139
aec12420
SP
11402009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1141
1142 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1143 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1144
25e20d33
SP
11452009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1146
1147 * graphite-blocking.c (scop_do_block): New.
1148 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1149 * graphite-poly.h (scop_do_block): Declared.
1150
e3bde9f4
SP
11512009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1152
1153 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1154 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1155 to transform depth into the time_depth before calling
1156 pbb_number_of_iterations_at_time.
1157 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1158 lst_depth.
1159
27e432be
SP
11602009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1161
1162 Reverted the patch for "scattering permutations" from 2009-10-28.
1163
1164 * graphite-poly.c (print_permutation): New.
1165 (debug_permutation): New.
1166 (new_poly_bb): Initialize PBB_PERMUTATION.
1167 (free_poly_bb): Free PBB_PERMUTATION.
1168 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1169 (struct pbb_permutation_elt): New.
1170 (PBB_PERMUTATION_ELT_STRIDE): New.
1171 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1172 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1173 (new_pbb_permutation_elt): New.
1174 (pbb_permutation_elt_free): New.
1175 (struct poly_bb): Add field permutation.
1176 (PBB_PERMUTATION): New.
1177 (print_permutation): Declared.
1178 (debug_permutation): Declared.
1179
2bc529bf
KT
11802009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1181
1182 * graphite-interchange.c (build_partial_difference): New.
1183 (memory_stride_in_loop): Refactored the computation of
1184 equality constraints into build_partial_difference function.
1185 Added support for debugging stride computations.
1186
8c54631d
SP
11872009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1188
1189 * graphite-clast-to-gimple.c (gloog): Free if_region,
1190 if_region->true_region, and if_region->region.
1191 * sese.c (if_region_set_false_region): Free if_region->false_region.
1192 (create_if_region_on_edge): Do not use GGC_NEW.
1193 (move_sese_in_condition): Remove useless initialization.
1194
7b7f2ca7
SP
11952009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1196
1197 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1198 for the loops created by the loop distribution. Do not modify the
1199 input LSTs.
1200 (lst_try_interchange_loops): Same. Use a temporary LST for the
1201 transformed schedule. Call lst_update_scattering before data
1202 dependence analysis.
1203 (lst_try_interchange): Pass an extra parameter INDEX.
1204 (lst_do_interchange_1): New.
1205 (lst_do_interchange): Call lst_do_interchange_1.
1206 (scop_do_interchange): Call lst_update_scattering.
1207 * graphite-poly.c (apply_poly_transforms): Do not call
1208 lst_update_scattering.
1209 * graphite-poly.h (lst_pred): New.
1210 (lst_succ): New.
1211 (lst_find_first_pbb): Return NULL when not found.
1212 (lst_empty_p): New.
1213 (lst_insert_in_sequence): Allow LST1 to be NULL.
1214 (lst_replace): New.
1215 (lst_substitute_3): New.
1216 * gcc.dg/graphite/interchange-1.c: XFail.
1217 * gcc.dg/graphite/interchange-8.c: XFail.
1218 * gcc.dg/graphite/interchange-11.c: XFail.
1219
6119e7d5
SP
12202009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1221
1222 * graphite-interchange.c (lst_perfectly_nested_p): New.
1223 (lst_perfect_nestify): New.
1224 (lst_try_interchange_loops): Call store_lst_schedule,
1225 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1226 (scop_do_interchange): Avoid redundant legality test.
1227 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1228 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1229 * graphite-poly.h (psct_static_dim): New.
1230 (lst_dewey_number_at_depth): New.
1231 (lst_find_pbb): Restructured.
1232 (lst_find_first_pbb): Restructured.
1233 (lst_find_last_pbb): New.
1234 (lst_contains_p): New.
1235 (lst_contains_pbb): New.
1236 (lst_create_nest): New.
1237 (lst_remove_from_sequence): New.
1238 (pbb_update_scattering): New.
1239 (lst_update_scattering_under): New.
1240 (lst_update_scattering_seq): New.
1241 (lst_update_scattering): New.
1242 (lst_insert_in_sequence): New.
1243 (lst_distribute_lst): New.
1244 (lst_remove_all_before_including_pbb): New.
1245 (lst_remove_all_before_excluding_pbb): New.
1246
431f3f22
SP
12472009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1248
1249 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1250 get_loop_exit_edges.
1251
4c768046
SP
12522009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1253
1254 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1255
5fa8514e
SP
12562009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1257
1258 * graphite-poly.c (print_permutation): New.
1259 (debug_permutation): New.
1260 (new_poly_bb): Initialize PBB_PERMUTATION.
1261 (free_poly_bb): Free PBB_PERMUTATION.
1262 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1263 (struct pbb_permutation_elt): New.
1264 (PBB_PERMUTATION_ELT_STRIDE): New.
1265 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1266 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1267 (new_pbb_permutation_elt): New.
1268 (pbb_permutation_elt_free): New.
1269 (struct poly_bb): Add field permutation.
1270 (PBB_PERMUTATION): New.
1271 (print_permutation): Declared.
1272 (debug_permutation): Declared.
1273
6c6f84d7
SP
12742009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1275
1276 * graphite-clast-to-gimple.c (gloog): Do not call
1277 sese_reset_aux_in_loops.
1278 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
1279 extra argument for domains. Do not use loop->aux.
1280 (build_scop_iteration_domain): Initialize and free domains, pass it
1281 to build_loop_iteration_domains and extract the information from
1282 domains. Do not use loop->aux.
1283 * sese.c (sese_reset_aux_in_loops): Removed.
1284 * sese.h (sese_reset_aux_in_loops): Removed.
1285
585b3e19
SP
12862009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1287
1288 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
1289 (dependency_in_loop_p): Same.
1290 (translate_clast): Do not use loop->aux. Initialize
1291 loop->can_be_parallel.
1292 (mark_loops_parallel): Removed.
1293 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
1294 * graphite.c (free_aux_in_new_loops): Removed.
1295 (graphite_finalize): Do not call free_aux_in_new_loops.
1296 (graphite_transform_loops): Do not call mark_loops_parallel.
1297
12982009-10-26 Li Feng <nemokingdom@gmail.com>
a7ed27ac
LF
1299
1300 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
1301 (translate_clast): Pass an extra parameter LEVEL.
1302 Call get_scattering_level.
1303 * graphite-clast-to-gimple.h (get_scattering_level): New.
1304
8e6ef139
SP
13052009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1306
1307 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
1308 * cfgloop.h (struct loop): New field single_iv.
1309
1310 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
1311 loop->aux anymore: use loop->single_iv.
1312 (graphite_loop_normal_form): Moved...
1313 (build_graphite_loop_normal_form): Removed.
1314 (gloog): Do not call build_graphite_loop_normal_form.
1315 (free_aux_in_new_loops): Moved...
1316 (mark_loops_parallel): Restructure.
1317 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
1318 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
1319 (scop_canonicalize_loops): New.
1320 (build_poly_scop): Call scop_canonicalize_loops.
1321 * graphite.c (free_aux_in_new_loops): ...here.
1322
e6dd91b2
SP
13232009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1324
1325 * g++.dg/graphite/graphite.exp: Add the same rules as in
1326 gcc.dg/graphite/graphite.exp.
1327
47fb473f
SP
13282009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1329
1330 * g++.dg/graphite/id-1.C: New.
1331
63858ac6
SP
13322009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1333
1334 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
1335 argument base_name.
1336 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
1337 (rewrite_phi_out_of_ssa): Same.
1338 (rewrite_cross_bb_scalar_deps): Same.
1339 (translate_scalar_reduction_to_array): Same.
1340
decfe536
SP
13412009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1342
1343 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
1344 dump_alias_graphs.
1345
0d5ef2a9
SP
13462009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1347
1348 * graphite-sese-to-poly.c (dump_alias_graphs): New.
1349 (build_scop_drs): Call dump_alias_graphs.
1350
f70de156
SP
13512009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1352
1353 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
1354 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1355 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
1356 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1357 * graphite-poly.h (free_lst): New.
1358 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
1359 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
1360
74715a9b
SP
13612009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1362
1363 * graphite-poly.h (struct scop): Add a field saved_schedule.
1364 (SCOP_SAVED_SCHEDULE): New.
1365 (store_lst_schedule): New.
1366 (restore_lst_schedule): New.
1367 (store_scattering): Call store_lst_schedule.
1368 (restore_scattering): Call restore_lst_schedule.
1369
fb00d28e
SP
13702009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1371
1372 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
1373 (pdr_add_alias_set): Same.
1374 (build_poly_dr): Same.
1375 (build_alias_set_optimal_p): Same.
1376 (build_base_obj_set_for_drs): Same. Do not store the result of
1377 graphds_dfs.
1378
917f481a
SP
13792009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1380
1381 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
1382 all_components_are_cliques to 1.
1383
2b178a5f
LF
13842009-10-20 Li Feng <nemokingdom@gmail.com>
1385
1386 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
1387 the new structure.
1388 (pdr_add_alias_set): Update retrieving alias_set_num.
1389 (build_poly_dr): Update retrieving dr_base_object_set.
1390 (partition_drs_to_sets): Remove.
1391 (build_alias_set_optimal_p): New.
1392 (build_alias_set_for_drs): Rename.
1393 (build_scop_drs): Update.
1394 * graphite-sese-to-poly.h (struct base_alias_pair): New.
1395 (ALIAS_SET_INDEX): Remove.
1396 (BASE_OBJECT_SET_INDEX): Remove.
1397
e8af4842
SP
13982009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1399
1400 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
1401
3899a0b2
SP
14022009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1403
1404 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
1405 loop upper bounds for 1-element arrays at end of structures.
1406 * tree-flow.h (array_at_struct_end_p): Declared.
1407 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
1408
e34e5835
SP
14092009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1410
1411 * g++.dg/graphite/pr41305.C: New.
1412
07b0d0e2
AM
14132009-10-20 Alexander Monakov <amonakov@ispras.ru>
1414
1415 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
1416 construction of parameter constraints from loop iteration analysis.
1417 * gcc.dg/graphite/run-id-2.c: New test.
1418
67255edf
SP
14192009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1420
1421 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
1422 and new_cstr.
1423
14ba996b
SP
14242009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1425
1426 * graphite-dependences.c (dependence_polyhedron_1): Remove
1427 unused gdim dimensions from the DDR polyhedron.
1428
4454141a
SP
14292009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1430
1431 * graphite-dependences.c (pddr_transformed_scattering): New.
1432 (dot_original_deps_stmt_1): New.
1433 (dot_transformed_deps_stmt_1): New.
1434 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
1435 dot_transformed_deps_stmt_1.
1436 (dot_original_deps): New.
1437 (dot_transformed_deps): New.
1438 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
1439
dd61070d
SP
14402009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1441
1442 * graphite-dependences.c (reduction_dr_1): Remove wrong
1443 assert: reduction BBs can have multiple reduction writes
4454141a 1444 to memory. interchange-3.f90 is an example.
dd61070d 1445
65421bcc
SP
14462009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1447
1448 * gfortran.dg/graphite/interchange-3.f90: New.
1449
3e9f43ee
SP
14502009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1451
1452 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
1453
16bf8ab1
SP
14542009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1455
1456 * graphite-dependences.c (dependence_polyhedron_1): Add the
1457 context to the dependence polyhedron.
1458
d422adfa
SP
14592009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1460
1461 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
1462 PBB_PDR_DUPLICATES_REMOVED.
1463 (new_poly_bb): Same.
1464
62e475c5
SP
14652009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1466
1467 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
1468 SCOP_CONTEXT.
1469 (build_loop_iteration_domains): Extract bounds on parameters
1470 based on the data size.
1471 (build_scop_context): Do not initialize SCOP_CONTEXT;
1472 add new constraints.
1473
3ecbce7e
SP
14742009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1475
1476 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
1477 * graphite-ppl.h (graphite-ppl.h): Declared.
1478
04863400
SP
14792009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1480
1481 * graphite-ppl.c (ppl_print_linear_expr): New.
1482 (debug_ppl_linear_expr): New.
1483 * graphite-ppl.h (ppl_print_linear_expr): Declared.
1484 (debug_ppl_linear_expr): Declared.
1485
009150e1
SP
14862009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1487
1488 * graphite-interchange.c: Fix comments.
1489 * gcc.dg/graphite/block-1.c: Fix comments.
1490
9b196c93
SP
14912009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1492
1493 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
1494 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
1495
caa675f8
SP
14962009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1497
1498 Reapply the patch from Alexander Monakov that disappeared during
1499 the last merges from trunk.
1500
1501 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
1502
1503 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1504 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
1505
92d92abb
SP
15062009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1507
1508 * graphite-interchange.c (memory_stride_in_loop): The depth
1509 argument corresponds to a dynamic time dimension, so use
1510 psct_dynamic_dim to refer to the transformed scattering dimension.
1511
23159c56
SP
15122009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1513
1514 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
1515
5c6c42c9
SP
15162009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1517
1518 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
1519 root of the LST.
1520 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
1521 the root of the LST.
1522 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
1523 fake loop.
1524 (print_lst): Print the root of LST in a different format.
1525 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
1526
f58be90e
SP
15272009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1528
1529 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
1530
4e4ee197
SP
15312009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1532
1533 * doc/passes.texi: Document the Graphite infrastructure.
1534
6c4499b6
SP
15352009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1536
1537 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
1538 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
1539 and check the SSA representation.
1540
1541 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
1542
8e49fe91
SP
15432009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1544
1545 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
1546
bb2b2dfc
SP
15472009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1548
1549 * gcc.dg/graphite/interchange-11.c: New.
1550
e7ed4a64
SP
15512009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1552
1553 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
1554
d7f25aa6
SP
15552009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1556
1557 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1558 Add -fno-loop-strip-mine and -fno-loop-interchange.
1559 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
1560 -fno-loop-strip-mine.
1561 * gfortran.dg/graphite/graphite.exp: Same.
1562
6231cf49
SP
15632009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1564
1565 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1566 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
1567 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
1568 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
1569 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
1570 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
1571 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
1572 DEFAULT_FLAGS_GRAPHITE_SCOP.
1573 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
1574 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
1575
2b7c09a8
SP
15762009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1577
1578 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
1579
b0c7a278
KT
15802009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1581 Sebastian Pop <sebastian.pop@amd.com>
1582
1583 * graphite-interchange.c (build_linearized_memory_access): Pass an
1584 offset as parameter.
1585 (memory_stride_in_loop): Include transform scattering in the
1586 access functions to be able to querry the strides in the
1587 transformed loops.
1588 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
1589 not the psct_iterator_dim.
1590
13ae6f91
SP
15912009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1592
1593 * graphite-blocking.c (pbb_do_strip_mine): Removed.
1594 (lst_do_strip_mine_loop): New.
1595 (lst_do_strip_mine): New.
1596 (scop_do_strip_mine): Call lst_do_strip_mine.
1597 * graphite-poly.h (lst_add_loop_under_loop): New.
1598 (lst_find_first_pbb): New.
1599
c0fe753b
SP
16002009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1601
1602 * graphite-poly.c (loop_to_lst): Fix LST creation.
1603
8d75ec87
TG
16042009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
1605
45489e99 1606 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
8d75ec87
TG
1607 sizeof(unsigned long) to make it run on 32bit systems.
1608
16092009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
1610
45489e99 1611 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
8d75ec87
TG
1612 SEGFAULT on 32bit.
1613
2e5a7cbf
RU
16142009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1615
8d75ec87
TG
1616 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
1617 Comment.
2e5a7cbf
RU
1618 (write_alias_graph_to_ascii_dot): New.
1619 (write_alias_graph_to_ascii_ecc): Ditto.
8d75ec87
TG
1620 (partition_drs_to_sets): Add testing of optimality of current method
1621 which assigns alias numbers according to DFS Comopnent number. used
1622 as heuristic for the upcoming ECC algorithm.
2e5a7cbf
RU
1623 (build_scop_drs): Write to file also with the ecc and dot format.
1624
1e82de2a
SP
16252009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1626
1627 * gfortran.dg/graphite/interchange-1.f: XFail.
1628
9bf13085
SP
16292009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1630
1631 * graphite.c (graphite_initialize): Do not handle functions with
1632 more than 100 basic blocks.
1633
e797c5f2
SP
16342009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1635
1636 * graphite-blocking.c (pbb_do_strip_mine): Use
1637 PARAM_LOOP_BLOCK_TILE_SIZE.
1638
bfa00f48
SP
16392009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1640
1641 * graphite-poly.c (dot_lst_1): New.
1642 (dot_lst): New.
1643 * graphite-poly.h (dot_lst): Declared.
1644
3c7bdeb8
SP
16452009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1646
1647 * graphite-dependences.c (dot_deps_stmt_1): New.
1648 (dot_deps_stmt): New.
1649 * graphite-dependences.h (dot_deps_stmt): Declared.
1650
c7dc2fab
SP
16512009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1652
1653 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
1654 not replace cross BB scalar dependences ending on PHI nodes.
1655 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
1656
24c79709
SP
16572009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1658
1659 * graphite-poly.c (apply_poly_transforms): Implement the high
1660 level driver for flag_loop_block.
45489e99 1661 * opts.c (decode_options): Enable flag_loop_block at -O2.
24c79709
SP
1662 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
1663 flag_loop_block.
1664
1665 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
1666 -floop-block.
1667 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1668 Add -floop-block.
1669
a0517b76
SP
16702009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1671
1672 * graphite-poly.h (lst_find_pbb): New.
1673 (find_lst_loop): New.
1674
9d077835
SP
16752009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1676
1677 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
1678 * graphite-poly.h (struct scop): Remove dep_graph field.
1679 (SCOP_DEP_GRAPH): Removed.
1680
75b63a91
SP
16812009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1682
1683 * graphite-poly.h (copy_lst): Do full copy of LST.
1684
7cc4ff8d
SP
16852009-10-07 Sebastian Pop <sebastian.pop@amd.com>
1686
1687 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
1688 when the loop stride is zero.
1689
1690 * gcc.dg/graphite/id-16.c: New.
1691
60d2a8c3
SP
16922009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1693
1694 * graphite-dependences.c (reduction_dr_1): New.
1695 (reduction_dr_p): New.
1696 (graphite_legal_transform_dr): Call reduction_dr_p.
1697 (reduction_ddr): Renamed reduction_ddr_p.
1698 * graphite-poly.h (same_pdr_p): New.
1699 (number_of_write_pdrs): New.
1700 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
1701 (split_reduction_stmt): Do not split reduction statements
1702 when there are no writes to memory.
1703 (translate_scalar_reduction_to_array_for_stmt): Insert the
1704 memory reduction statement just after the scalar reduction statement.
1705
1706 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
1707 Un-XFAIL-ed.
1708 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
1709 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
1710
95baeff8
SP
17112009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1712
1713 * graphite-interchange.c (lst_apply_interchange): New.
1714 (lst_interchange_profitable_p): New.
1715 (lst_try_interchange_loops): New.
1716 (lst_try_interchange): New.
1717 (lst_do_interchange): New.
1718 (pbb_do_interchange): Removed.
1719 (scop_do_interchange): Call lst_do_interchange.
1720
a36d12e2
SP
17212009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1722
1723 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
1724 SCOP_TRANSFORMED_SCHEDULE.
1725 (loop_to_lst): New.
1726 (scop_to_lst): New.
1727 (print_lst): New.
1728 (debug_lst): New.
1729 * graphite-poly.h (lst_p): New.
1730 (struct lst): New.
1731 (LST_LOOP_P): New.
1732 (LST_LOOP_FATHER): New.
1733 (LST_PBB): New.
1734 (LST_SEQ): New.
1735 (scop_to_lst): Declared.
1736 (print_lst): Declared.
1737 (debug_lst): Declared.
1738 (new_lst_loop): New.
1739 (new_lst_stmt): New.
1740 (copy_lst): New.
1741 (lst_depth): New.
1742 (lst_dewey_number): New.
1743 (struct scop): Add original_schedule and transformed_schedule fields.
1744 (SCOP_ORIGINAL_SCHEDULE): New.
1745 (SCOP_TRANSFORMED_SCHEDULE): New.
1746 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
1747
a0dd1440
SP
17482009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1749
1750 * graphite-dependences.c (reduction_ddr): New.
1751 (graphite_legal_transform_bb): Call reduction_ddr.
1752 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
1753 Initialize PBB_IS_REDUCTION.
1754 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
1755 (PBB_IS_REDUCTION): New.
1756 (new_poly_bb): Update declaration.
1757 * graphite-scop-detection.h (build_scop_bbs): Removed.
1758 (nb_reductions_in_loop): Removed.
1759 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
1760 parameter for reductions.
1761 (try_generate_gimple_bb): Update call to new_poly_bb.
1762 (build_scop_bbs_1): Same.
1763 (build_scop_bbs): Same.
1764 (gsi_for_phi_node): New.
1765 (scalar_close_phi_node_p): Remove gcc_assert.
1766 (split_reduction_stmt): New.
1767 (is_reduction_operation_p): New.
1768 (phi_contains_arg): New.
1769 (follow_ssa_with_commutative_ops): New.
1770 (detect_commutative_reduction_arg): New.
1771 (detect_commutative_reduction_assign): New.
1772 (follow_inital_value_to_phi): New.
1773 (edge_initial_value_for_loop_phi): New.
1774 (initial_value_for_loop_phi): New.
1775 (detect_commutative_reduction): New.
1776 (translate_scalar_reduction_to_array_for_stmt): New.
1777 (insert_copyout): New.
1778 (insert_copyin): New.
1779 (translate_scalar_reduction_to_array): New.
1780 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
1781 (rewrite_commutative_reductions_out_of_ssa_loop): New.
1782 (rewrite_commutative_reductions_out_of_ssa): New.
1783 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
1784 * sese.h (split_region_for_bb): New.
1785
1786 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
1787 * gcc.dg/graphite/interchange-1.c: Fix format.
1788 * gcc.dg/graphite/interchange-10.c: New.
1789
db7e9485
SP
17902009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1791
1792 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
1793 buggy assert.
1794
5dcc64d9
SP
17952009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1796
1797 * graphite-sese-to-poly.c (scev_analyzable_p): New.
1798 (rewrite_cross_bb_scalar_dependence): New.
1799 (rewrite_cross_bb_scalar_deps): New.
1800 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
1801 Call rewrite_cross_bb_scalar_deps.
1802
947121b8
SP
18032009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1804
1805 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
1806 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
1807 gsi_for_stmt.
1808
d48e288d
SP
18092009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1810
1811 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
1812 * graphite-interchange.c (pbb_do_interchange): Same.
1813 * graphite-poly.c (print_scattering_function): Same.
1814 (debug_pdrs): Same.
1815 * graphite-poly.h (pbb_loop): New.
1816 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
1817
d17286f6
SP
18182009-09-27 Sebastian Pop <sebastian.pop@amd.com>
1819
1820 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
1821
ee03cd20
SP
18222009-09-27 Sebastian Pop <sebastian.pop@amd.com>
1823
1824 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
1825 so don't pass a pointer to it.
1826 (build_alias_set_for_drs): Same.
1827 (build_base_obj_set_for_drs): Same.
1828 (build_scop_drs): Same.
1829
888beba1
LF
18302009-09-26 Li Feng <nemokingdom@gmail.com>
1831
1832 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
1833 the alias graph of data references.
1834
cd43e5d7
LF
18352009-09-25 Li Feng <nemokingdom@gmail.com>
1836
1837 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
1838 (build_scop_drs): When debugging, write the alias graph to file,
1839 otherwise, should be disabled.
1840
45489e99
SP
18412009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1842
1843 * Merge from mainline (151310:151361).
1844
18452009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1846
1847 * Merge from mainline (151171:151310).
1848
18492009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1850
1851 * Merge from mainline (151171:151806).
1852
18532009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1854
1855 * Revert the last commit.
1856
18572009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1858
1859 * Merge from mainline (151171:151819).
1860
aeda6535
SP
18612009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1862
1863 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
1864 (is_simple_operand): Remove call to stmt_simple_memref_p.
1865 (stmt_simple_for_scop_p): Update call to is_simple_operand.
1866
8b6b8570
DE
18672009-09-17 David Edelsohn <edelsohn@gnu.org>
1868
45489e99
SP
1869 * gcc.dg/graphite/interchange-mvt.c: New File.
1870 * gcc.dg/graphite/scop-dsyrk.c: New File.
1871 * gcc.dg/graphite/scop-dsyr2k.c: New File.
1872 * gcc.dg/graphite/scop-mvt.c: New File.
1873 * gcc.dg/graphite/scop-sor.c: New File.
8b6b8570 1874
1825f9a2
LF
18752009-09-17 Li Feng <nemokingdom@gmail.com>
1876
1825f9a2
LF
1877 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
1878 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
1879 (graphite_carried_dependence_level_k): Ditto.
1880 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
1881 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
1882 (new_poly_dr): Adjust declaration.
1883 * graphite-sese-to-poly.c (free_data_refs_aux): New.
1884 (free_gimple_bb): Added free_data_refs_aux.
1885 (build_poly_dr): Add dr_base_object_set.
1886 (partition_drs_to_sets): New.
1887 (dr_same_base_object_p): New.
1888 (build_alias_set_for_drs): New.
1889 (build_base_object_set_for_drs): New.
1890 (build_scop_drs): Add build_base_obj_set_for_drs.
1891 * graphite-sese-to-poly.h: Added #define for alias set number index and
1892 base object set index.
1893 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
1894 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
1895
ac90803f
SP
18962009-09-16 Alexander Monakov <amonakov@ispras.ru>
1897
1898 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1899 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
1900
54fc808a
SP
19012009-09-14 Sebastian Pop <sebastian.pop@amd.com>
1902
1903 * graphite-sese-to-poly.c (struct irp_data): Removed.
1904 (idx_record_params): Removed.
1905 (find_params_in_bb): Scan for parameters the access functions; don't
1906 parse the tree representation.
1907
e88e021f
SP
19082009-09-14 Sebastian Pop <sebastian.pop@amd.com>
1909
1910 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
1911 passes at -O1 and below.
1912
3690f8d7
SP
19132009-09-14 Sebastian Pop <sebastian.pop@amd.com>
1914
1915 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1916 tree-scalar-evolution.h, and then tree-data-ref.h.
1917 * graphite-clast-to-gimple.c: Same.
1918 * graphite-dependences.c: Same.
1919 * graphite-interchange.c: Same.
1920 * graphite-poly.c: Same.
1921 * graphite-scop-detection.c: Same.
1922 * graphite-sese-to-poly.c: Same.
1923 * graphite.c: Same.
1924 * lambda-code.c: Same.
1925 * matrix-reorg.c: Same.
1926 * tree-data-ref.c: Same.
1927 * tree-if-conv.c: Same.
1928 * tree-loop-distribu: Same.: Same.
1929 * tree-loop-linear.c: Same.
1930 * tree-parloops.c: Same.
1931 * tree-predcom.c: Same.
1932 * tree-vect-patterns.c: Same.
1933
2495a183
SP
19342009-09-02 Sebastian Pop <sebastian.pop@amd.com>
1935
1936 Partially revert the previous patch, except the following.
1937 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
1938 as parameters the operands of the not expression.
1939
20179b0d
SP
19402009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1941
1942 * tree-scalar-evolution.c (instantiate_scev_assign): New.
1943 Do not call analyze_scalar_evolution on assignments.
1944 (instantiate_scev_phi): Call analyze_scalar_evolution.
1945 (instantiate_scev_name): Call instantiate_scev_assign and
1946 instantiate_scev_phi.
1947 (instantiate_scev_not): Adapted to pass as parameters the operands
1948 of the not expression.
1949
ffa34f4b
SP
19502009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1951
1952 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
1953 to pass as parameters the operands of the binary expression.
1954
4b9d48a1
SP
19552009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1956
1957 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
1958 instantiate_scev_not. Handle NEGATE_EXPR.
1959 (instantiate_scev_r): Handle NEGATE_EXPR.
1960
9e5dc77f
SP
19612009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1962
1963 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
1964 instantiate_scev_r.
1965 (instantiate_scev_r): Move code in instantiate_scev_2
1966 and instantiate_scev_1.
1967
d814176c
SP
19682009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1969
1970 * tree-scalar-evolution.c (instantiate_scev_3): New.
1971 (instantiate_scev_1): Move code in instantiate_scev_3.
1972
ec6636eb
SP
19732009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1974
1975 * tree-scalar-evolution.c (instantiate_scev_poly): New.
1976 (instantiate_scev_1): Move code in instantiate_scev_poly.
1977
7ec0665d
SP
19782009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1979
1980 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
1981 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
1982
9c382ce9
SP
19832009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1984
1985 * tree-scalar-evolution.c (instantiate_scev_convert): New.
1986 (instantiate_scev_1): Move code in instantiate_scev_convert.
1987
15fda317
SP
19882009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1989
1990 * tree-scalar-evolution.c (instantiate_scev_binary): New.
1991 (instantiate_scev_1): Move code in instantiate_scev_binary.
1992
320f5a78
SP
19932009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1994
1995 * tree-scalar-evolution.c (instantiate_scev_name): New.
1996 (instantiate_scev_1): Move code in instantiate_scev_name.
1997
19982009-08-28 Sebastian Pop <sebastian.pop@amd.com>
1999
2000 * Merge from mainline (150992:151171).
2001
45489e99
SP
20022009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2003
2004 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2005
211694b6
SP
20062009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2007
2008 * graphite-dependences.c (graphite_legal_transform_bb): Call
2009 pbb_remove_duplicate_pdrs.
2010 * graphite-poly.c (can_collapse_pdr): Removed.
2011 (pdr_find_duplicate): Removed.
2012 (can_collapse_pdrs): New.
2013 (pbb_remove_duplicate_pdrs): New.
2014 (new_poly_dr): Do not look for duplicates.
2015 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2016 (PBB_PDR_DUPLICATES_REMOVED): New.
2017 (pbb_remove_duplicate_pdrs): Declared.
2018
7bd2a8a7
SP
20192009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2020
2021 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2022 the strides by multiplying by PDR_NB_REFS.
2023 * graphite-poly.c (can_collapse_pdr): New.
2024 (pdr_find_duplicate): New.
2025 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2026 Initialize PDR_NB_REFS.
2027 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2028 (PDR_NB_REFS): New.
2029 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2030
20312009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2032
2033 Revert one of the previous commits:
2034 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2035 the computation of symmetric data dependence relations.
2036 (dependency_between_pbbs_p): Same.
2037
93b2db87
SP
20382009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2039
2040 PR middle-end/40965
2041 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2042 any transform.
2043
d8eeb078
SP
20442009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2045
2046 * graphite-dependences.c (pddr_original_scattering): Return NULL
2047 for read-read dependence relations.
2048 * graphite-poly.h (enum poly_dr_type): Fix comment.
2049 (pdr_read_p): New.
2050 (pdr_write_p): New.
2051 (pdr_may_write_p): New.
2052
e6dec0fb
SP
20532009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2054
2055 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2056 (struct poly_dr): Same.
2057 (new_poly_dr): Same.
2058 * graphite-poly.c (new_poly_dr): Same.
2059
baf4b881
KT
20602009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2061 Sebastian Pop <sebastian.pop@amd.com>
2062
2063 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2064 pbb_strip_mine_time_depth. Changed the implementation so that
2065 transformation is expressed as a transformation on
2066 time (scatttering) dimensions. Also, ensures that the 2d+1
2067 scheduling format is preserved.
2068 (pbb_strip_mine_profitable_p): Profitability is based on the
2069 iteration number of a given time (scattering) dimension,
2070 and not on a original loop depth dimension.
2071 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2072 (pbb_do_strip_mine): Call psct_dynamic_dim.
2073 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2074 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2075 (pbb_nb_dynamic_scattering_transform): New.
2076 (psct_dynamic_dim): New.
2077
059a5f9f
KT
20782009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2079
2080 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2081 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2082 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2083 * graphite-interchange.c (build_linearized_memory_access): Same.
2084 (memory_stride_in_loop): Same.
2085
afae0207
SP
20862009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2087
2088 * graphite-dependences.c (pddr_original_scattering): New.
2089 (graphite_legal_transform_dr): Call pddr_original_scattering.
2090 (dot_deps_1): New.
2091 (dot_deps): New.
2092 * graphite-dependences.h (dot_deps): Declared.
2093 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2094 (print_pdr): Print PDR_ID.
2095 * graphite-poly.h (struct poly_dr): Add field id.
2096 (PDR_ID): New.
2097 (pbb_index): New.
2098 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2099
f8e0bb8b
SP
21002009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2101
2102 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2103 not delete the original dependence relation.
2104
21052009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2106
2107 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2108 the computation of symmetric data dependence relations.
2109 (dependency_between_pbbs_p): Same.
2110
e37f165f
SP
21112009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2112
2113 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2114 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2115 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2116 (free_poly_ddr): New.
2117 (pddr_is_empty): New.
2118 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2119 (dependence_polyhedron): Same. Remove useless gcc_assert.
2120 Remove fprintfs.
2121 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2122 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2123 * graphite-dependences.h (enum poly_dependence_kind): New.
2124 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2125 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2126 (PDRP_SINK): Renamed PDDR_SINK.
2127 (PDRP_DDP): Renamed PDDR_DDP.
2128 (PDDR_KIND): New.
2129 (free_poly_ddr): Declared.
2130 * graphite-poly.c (new_scop): Use the new hash function names.
2131 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2132 into original_pddrs.
2133 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2134
21352009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2136
2137 * Merge from mainline (150764:150992).
2138
45e76e9f
SP
21392009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2140
2141 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2142 bounds with LT_EXPR to make niter analysis more precise on code
2143 generated by Graphite.
2144
66b466c3
SP
21452009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2146
2147 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2148 (graphite_legal_transform_bb): Same.
2149 (poly_drs_may_alias_p): Same.
2150
f263917c
SP
21512009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2152
2153 PR middle-end/40981
2154 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2155 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2156
21572009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2158
2159 * graphite-poly.c (print_pbb): Print PBB index.
2160
21612009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2162
2163 * Merge from mainline (r150672:150764).
2164
21652009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2166
2167 * graphite-interchange.c (ppl_max_for_le): Moved...
2168 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2169 * graphite-ppl.c (ppl_max_for_le): ... here.
2170 * graphite-ppl.h (ppl_max_for_le): Declared.
2171
21722009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2173
2174 * Merge from mainline (r150372:150672).
2175
30de1632
SP
21762009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2177
2178 PR middle-end/40980
2179 * sese.c (convert_for_phi_arg): New.
2180 (add_guard_exit_phis): Use convert_for_phi_arg.
2181
45489e99 2182 * gfortran.dg/graphite/id-17.f: New.
30de1632 2183
8c31ebfa
SP
21842009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2185
2186 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2187 unknown subscript upper bounds.
2188
45489e99 2189 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
8c31ebfa 2190
fb9fb290
SP
21912009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2192 Pranav Garg <pranav.garg2107@gmail.com>
2193
2194 * graphite-interchange.c (gather_access_strides): Removed.
2195 (ppl_max_for_le): New.
2196 (build_linearized_memory_access): New.
2197 (memory_stride_in_loop): New.
2198 (pbb_interchange_profitable_p): Reimplemented.
2199 * graphite-ppl.h (ppl_new_id_map): New.
2200 (ppl_interchange): New.
2201
45489e99 2202 * gcc.dg/graphite/interchange-6.c: XFAILed.
fb9fb290 2203
312aea7f
SP
22042009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2205
2206 * graphite-interchange.c (compute_subscript): Removed.
2207 (compute_array_size_cstr): Removed.
2208 (compute_array_size_poly): Removed.
2209 (compute_array_size): Removed.
2210 (gather_access_strides_poly): Removed.
2211 (gather_access_strides): Empty.
2212
25d7cc15
SP
22132009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2214
2215 * graphite-dependences.c (dependence_polyhedron_1): Replace
2216 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2217 (graphite_legal_transform_dr): Same.
2218 (graphite_carried_dependence_level_k): Same.
2219 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2220 Initialize PDR_NB_SUBSCRIPTS.
2221 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2222 PDR_NB_SUBSCRIPTS.
2223 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2224 (PDR_NB_SUBSCRIPTS): New.
2225 (pdr_nb_subscripts): Removed.
2226 (pdr_dim): Simplified.
2227 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2228 with PDR_NB_SUBSCRIPTS.
2229
66096911
SP
22302009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2231
2232 * graphite-interchange.c (compute_array_size): Remove use of
2233 PDR_DATA_CONTAINER.
2234 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2235 Do not initialize PDR_DATA_CONTAINER.
2236 (print_pdr): Do not print PDR_DATA_CONTAINER.
2237 * graphite-poly.h (struct poly_dr): Remove data_container field.
2238 (PDR_DATA_CONTAINER): Removed.
2239 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2240 PDR_DATA_CONTAINER.
2241 (build_poly_dr): Same.
2242
273c5dd3
SP
22432009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2244
45489e99 2245 * gcc.dg/graphite/interchange-9.c: New.
273c5dd3 2246
7491e5f0
KT
22472009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2248 Sebastian Pop <sebastian.pop@amd.com>
2249
2250 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2251 copy of the dependence polyhedron. Free the temporary objects.
2252 (graphite_carried_dependence_level_k): Free unused objects before
2253 returning.
2254
45489e99
SP
2255 * gcc.dg/graphite/interchange-1.c: XFAILed.
2256 * gcc.dg/graphite/interchange-2.c: XFAILed.
2257 * gcc.dg/graphite/interchange-3.c: XFAILed.
2258 * gcc.dg/graphite/interchange-4.c: XFAILed.
2259 * gcc.dg/graphite/interchange-7.c: XFAILed.
7491e5f0 2260
f4648ed1
SP
22612009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2262
2263 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2264 Early return without analyzing the data dependences if no
2265 transform has been done. Call restore_scattering if the transform
2266 is not legal.
2267 (graphite-interchange.c): Same.
2268 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2269 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2270 (apply_poly_transforms): Do not gcc_assert that
2271 the transform is legal.
2272 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2273 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
2274 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
2275 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2276 * graphite-poly.h (struct poly_scattering): New.
2277 (struct poly_bb): Add original, transformed, and saved fields.
2278 Remove transformed_scattering, original_scattering, nb_local_variables,
2279 and nb_scattering_transform fields.
2280 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
2281 (poly_scattering_new): New.
2282 (poly_scattering_free): New.
2283 (poly_scattering_copy): New.
2284 (store_scattering_pbb): New.
2285 (store_scattering): New.
2286 (restore_scattering_pbb): New.
2287 (restore_scattering): New.
2288 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2289 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
273c5dd3 2290
e31a5bd4
SP
22912009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2292
2293 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
2294 (print_scop): Same.
2295
8e88f9fd
SP
22962009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2297
2298 * Makefile.in (graphite.o): Depends on PREDICT_H.
2299 * graphite.c: Include predict.h.
2300 (graphite_finalize): Call tree_estimate_probability.
2301 * predict.c (predict_loops): Do not call scev_initialize and
2302 scev_finalize.
2303 (tree_estimate_probability_bb): New.
2304 (tree_estimate_probability): Do not initialize loops: move that
2305 code to the driver. Call tree_estimate_probability_bb.
2306 (tree_estimate_probability_driver): New.
2307 (pass_profile): Use tree_estimate_probability_driver.
2308 * predict.h (tree_estimate_probability): Declared.
2309
87d4d0ee
SP
23102009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2311
2312 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
2313 * graphite-dependences.c (graphite_legal_transform): Add time to
2314 TV_GRAPHITE_DATA_DEPS.
2315 (dependency_between_pbbs_p): Same.
2316 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2317
23182009-08-03 Sebastian Pop <sebastian.pop@amd.com>
2319
2320 * Merge from mainline (r149952:150372).
2321
2abae5f1
SP
23222009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2323
2324 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
2325 * graphite-blocking.c: Same.
2326 * graphite-clast-to-gimple.c: Same.
2327 * graphite-dependences.c: Same.
2328 * graphite-poly.c: Same.
2329 * graphite-poly.h: Same.
2330 * graphite-ppl.c: Same.
2331 * graphite-scop-detection.c: Same.
2332 * graphite-sese-to-poly.c: Same.
2333 * graphite.c: Same.
2334
23352009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2336
2337 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
2338 (remove_simple_copy_phi): New.
2339 (remove_invariant_phi): New.
2340 (simple_copy_phi_p): New.
2341 (reduction_phi_p): New.
2342 (gsi_for_ssa_name_def): New.
2343 (insert_out_of_ssa_copy): New.
2344 (insert_out_of_ssa_copy_on_edge): New.
2345 (create_zero_dim_array): New.
2346 (scalar_close_phi_node_p): New.
2347 (rewrite_close_phi_out_of_ssa): New.
2348 (rewrite_phi_out_of_ssa): New.
2349 (rewrite_reductions_out_of_ssa): New.
2350 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
2351
45489e99
SP
2352 * gcc.dg/graphite/id-11.c: New.
2353 * gcc.dg/graphite/id-15.c: New.
2354 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
2355 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
2356 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
2357 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
2358 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
2359 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
2360 * gfortran.dg/graphite/id-13.f: New.
2361 * gfortran.dg/graphite/id-5.f: New.
2abae5f1
SP
2362
23632009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2364
2365 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
2366 check that nb_reductions_in_loop is zero.
2367 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
2368 reduction phi nodes.
2369 (nb_reductions_in_loop): Removed.
2370 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
2371 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
2372 (bb_contains_non_iv_scalar_phi_nodes): Removed.
2373 (scop_contains_non_iv_scalar_phi_nodes): Removed.
2374 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
2375
23762009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2377
2378 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
2379 statements that have an empty iteration domain.
45489e99 2380 * gfortran.dg/graphite/id-16.f: New.
2abae5f1
SP
2381
23822009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2383
2384 * tree-scalar-evolution.c (instantiate_scev_1): Return
2385 chrec_dont_know when the result is not above instantiate_below.
2386 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
2387 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
2388 the tree has a known scalar evolution.
45489e99
SP
2389 * gfortran.dg/graphite/id-14.f: New.
2390 * gfortran.dg/graphite/id-15.f: New.
2abae5f1
SP
2391
23922009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2393
2394 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
2395 insert_gsi.
2396 (rename_variables): Keep inserting renames after the ones already
2397 inserted.
2398
23992009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2400
2401 * graphite-sese-to-poly.c (compare_bb_depths): New.
2402 (graphite_sort_dominated_info): New.
2403 (build_scop_bbs_1): Call graphite_sort_dominated_info.
2404 (build_scop_scattering): Fix comment.
2405
24062009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2407
2408 * graphite.c (graphite_finalize): Call print_loops instead of
2409 dump_function_to_file.
45489e99
SP
2410 * gcc.dg/graphite/graphite.exp: Fix formatting.
2411 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
2abae5f1 2412 loops generated in the graphite output file.
45489e99
SP
2413 * gcc.dg/graphite/pr35356-2.c: New.
2414 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
2415 * gfortran.dg/graphite/id-12.f: New.
2abae5f1
SP
2416
24172009-07-24 Li Feng <nemokingdom@gmail.com>
2418
45489e99 2419 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
2abae5f1
SP
2420 Remove 2 XFAIL.
2421
24222009-07-24 Li Feng <nemokingdom@gmail.com>
2423 Tobias Grosser <grosser@fim.uni-passau.de>
2424
2425 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
2426 alias set number build alias in ACCESSES polyhedron.
2427 (build_alias_set_for_drs): New.
2428 (build_pbb_drs): Added build_alias_set_for_drs.
2429 * graphite-dependences.c (poly_drs_may_alias_p): New.
2430 (graphite_carried_dependence_level_k): Check alias information
2431 before building polyhedron.
2432
24332009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2434
2435 * Makefile.in (lambda-code.o): Fix formatting.
2436
24372009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2438
2439 * Merge from mainline (r149350-149952)
2440
24412009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2442
2443 * graphite-poly.c (apply_poly_transforms): Move strip_mine
2444 before interchange to prepare for loop blocking.
2445
24462009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2447
2448 * graphite-poly.c (apply_poly_transforms): Add checks after every
2449 transformation.
2450 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
2451 done in apply_poly_transforms.
2452
24532009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2454
2455 * graphite-dependences.c (build_lexicographically_gt_constraint):
2456 Replace RES parameter with *RES.
2457 (dependence_polyhedron_1): Pass an address of the parameter RES
2458 instead of value of RES.
2459
24602009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2461
2462 * graphite.c (graphite_finalize): Fix comment.
2463 (graphite_transform_loops): Reset scev info after code generation
2464 of each scop.
2465
24662009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2467
2468 * graphite.c (graphite_finalize): Call scev_reset.
2469
24702009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2471
2472 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
2473 GBB_CLOOG_IV_TYPES hash table twice.
2474 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
2475 (add_condition_to_domain): Clear GMP values.
2476
24772009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2478
2479 * graphite-dependences.c: Fix formatting.
2480 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
2481 (pbb_number_of_iterations): Free ppl_Linear_Expression.
2482 * graphite-sese-to-poly.c: Fix formatting.
2483 * graphite.c (graphite_transform_loops): Create the hash table
2484 after the early return.
2485
24862009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2487
45489e99
SP
2488 * gcc.dg/graphite/id-14.c: New.
2489 * gcc.dg/graphite/pr40157.c: New.
2490 * gfortran.dg/graphite/id-11.f: New.
2abae5f1
SP
2491
24922009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2493
2494 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
2495 (build_poly_scop): Return false when there are no pbbs within
2496 loops to avoid to pass to cloog scops with no loops.
2497
24982009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2499
2500 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
2501 useless test "i % 2".
2502 (build_pbb_scattering_polyhedrons): Fix formatting.
2503 (build_poly_dr): Same.
2504 * graphite.c (graphite_transform_loops): Restructure.
2505
25062009-07-14 Razya Ladelsky <razya@il.ibm.com>
2507
2508 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
2509 reduction_list parameter.
2510 (rewrite_all_phi_nodes_with_iv): Same.
2511 (canonicalize_loop_ivs): Same.
2512 * tree-parloops.c (struct brli): Removed.
2513 (build_reduction_list_info): Removed.
2514 (build_new_reduction): New.
2515 (analyze_reduction_list): Removed.
2516 (gather_scalar_reductions): Find reductions instead of phi
2517 nodes that can't be canonicalized.
2518 (try_create_reduction_list): Remove reduction_list parameter.
2519 (gen_parallel_loop): Same.
2520 (parallelize_loops): Remove analyze_reductions variable,
2521 initialization and free.
2522 Change reduction_list htab initialization to reduction_info
2523 elements instead of ssa names.
2524 Call try_create_reduction_list and gen_parallel_loop without
2525 analyzed_reduction argument.
2526 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
2527 canonicalize_loop_ivs with one less argument.
2528 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
2529
25302009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2531
2532 * graphite-dependences.c (new_poly_dr_pair): New.
2533 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
2534 (new_poly_dr_pair): New.
2535 (eq_poly_dr_pair_p): New.
2536 (hash_poly_dr_pair_p): New.
2537 * graphite-dependences.h (struct poly_dr_pair): New.
2538 (eq_poly_dr_pair_p): Declared.
2539 (hash_poly_dr_pair_p): Declared.
2540 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
2541 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
2542 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
2543 * Makefile.in (graphite-poly.o): Add dependence on
2544 graphite-dependences.h.
2545
25462009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2547
2548 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
2549 polynomials of degree > 1 pass to Graphite.
2550 * tree-chrec.c (scev_is_linear_expression): Call
2551 evolution_function_is_affine_multivariate_p.
45489e99 2552 * gfortran.dg/graphite/id-10.f90: New.
2abae5f1
SP
2553
25542009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2555
2556 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
2557 Instantiate scevs varying in outer loops.
45489e99 2558 * gfortran.dg/graphite/id-9.f: Correct testcase.
2abae5f1
SP
2559
25602009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2561
2562 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
2563 redundant constraint.
2564
25652009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2566
45489e99
SP
2567 * gcc.dg/graphite/graphite.exp: Fix comments.
2568 * gfortran.dg/graphite/graphite.exp: Trigger actions
2abae5f1 2569 based on the file names as in the C testsuite.
45489e99
SP
2570 * gfortran.dg/graphite/block-1.f90: Fix patterns.
2571 * gfortran.dg/graphite/block-2.f: Same.
2572 * gfortran.dg/graphite/block-3.f90: Same.
2573 * gfortran.dg/graphite/block-4.f90: Same.
2574 * gfortran.dg/graphite/id-1.f90: Same.
2575 * gfortran.dg/graphite/id-2.f90: Same.
2576 * gfortran.dg/graphite/id-3.f90: Same.
2577 * gfortran.dg/graphite/id-4.f90: Same.
2578 * gfortran.dg/graphite/id-6.f: Same.
2579 * gfortran.dg/graphite/id-9.f: Same.
2580 * gfortran.dg/graphite/interchange-1.f: Same.
2581 * gfortran.dg/graphite/interchange-2.f: Same.
2582 * gfortran.dg/graphite/scop-1.f: Same.
2abae5f1
SP
2583
25842009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2585
2586 * sese.c (expand_scalar_variables_call): New.
2587 (expand_scalar_variables_ssa_name): Handle calls in expander.
2588
25892009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2590
45489e99 2591 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
2abae5f1 2592 Expect to see the pattern twice.
45489e99
SP
2593 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
2594 * gcc.dg/graphite/interchange-5.c: Same.
2595 * gcc.dg/graphite/interchange-6.c: Same.
2abae5f1
SP
2596
25972009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2598
45489e99
SP
2599 * gcc.dg/graphite/id-10.c: New.
2600 * gcc.dg/graphite/id-12.c: New.
2601 * gfortran.dg/graphite/id-7.f: New.
2602 * gfortran.dg/graphite/id-8.f: New.
2abae5f1
SP
2603
26042009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2605
2606 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
2607 zero.
2608
26092009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2610
2611 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
2612
26132009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2614
2615 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
2616
26172009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2618
2619 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
2620 building PDR subscripts.
2621
26222009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2623
2624 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
2625 computation of array sizes.
2626
26272009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2628
2629 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
2630
26312009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
2632
2633 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
2634 build_pairwise_constraint, dr_equality_constraints,
2635 build_pairwise_scheduling_equality,
2636 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2637 build_lexicographically_gt_constraint, dependence_polyhedron,
2638 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
2639 Move from NNC_Polyhedron to C_Polyhedron.
2640 * graphite-interchange.c (compute_array_size_poly,
2641 gather_access_strides): Dito.
2642 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
2643 free_scop, pbb_number_of_iterations): Dito.
2644 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
2645 pbb_dim_iter_domain, struct scop): Dito.
2646 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
2647 new_Cloog_Domain_from_ppl_Polyhedron,
2648 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
2649 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
2650 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
2651 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
2652 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
2653 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
2654 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
2655 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
2656 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
2657 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
2658 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
2659 build_scop_iteration_domain, build_poly_dr): Dito
2660
26612009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2662
45489e99 2663 * gcc.dg/graphite/graphite.exp: Added a rule to execute
2abae5f1 2664 run-id-*.c files.
45489e99 2665 * gcc.dg/graphite/run-id-1.c: New.
2abae5f1
SP
2666
26672009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2668
2669 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
2670 positivity constraint on the symbolic number of iterations.
2671
26722009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2673
2674 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
2675
26762009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2677 Tobias Grosser <grosser@fim.uni-passau.de>
2678
2679 * graphite-clast-to-gimple.c (build_scop_context): Removed.
2680 (build_cloog_prog): Directly use SCOP_CONTEXT.
2681 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
2682 (free_scop): Free SCOP_CONTEXT.
2683 (print_scop_context): New.
2684 (print_scop): Call print_scop_context.
2685 (debug_scop_context): New.
2686 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
2687 (struct scop): Added field context.
2688 (SCOP_CONTEXT): New.
2689 * graphite-sese-to-poly.c (add_param_constraints): New.
2690 (build_scop_context): New.
2691 (build_poly_scop): Call build_scop_context.
2692
26932009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2694
2695 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
2696 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
2697 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
2698 * graphite-ppl.h: Include double-int.h and tree.h.
2699 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
2700 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
2701 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
2702 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
2703
27042009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2705
2706 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
2707 POINTER_PLUS_EXPR for pointer types.
2708 (clast_to_gcc_expression): Same.
2709
27102009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2711
2712 * graphite-poly.c (print_scattering_function): Early return when
2713 PBB_TRANSFORMED_SCATTERING is not initialized.
2714 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
2715
27162009-07-08 Sebastian Pop <sebastian.pop@amd.com>
2717
2718 * tree-parloops.c (analyze_reduction_list): Remove unused variable
2719 to fix bootstrap.
2720
27212009-07-08 Razya Ladelsky <razya@il.ibm.com>
2722
2723 * tree-parloops.c (analyze_reduction_list): Change return
2724 value to void.
2725 (try_create_reduction_list): Move the call to
2726 analyze_reduction_list to the beginining.
2727 Call reduction_phi with analyzed_reductions as argument
2728 instead of reduction_list.
2729
27302009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
2731
2732 * Merge from mainline (r148296:149346)
2733
27342009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2735
2736 * graphite-scop-detection.c (graphite_can_represent_init): New.
2737 (graphite_can_represent_scev): Call graphite_can_represent_init:
2738 check that the initial value does not contain multiplications of
2739 parameters.
2740 (stmt_has_simple_data_refs_p): New.
2741 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
2742 (is_simple_operand): Fix formatting.
2743 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
2744
27452009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2746
45489e99 2747 * gcc.dg/graphite/id-13.c: New.
2abae5f1
SP
2748 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
2749 analyze_scalar_evolution, use scalar_evolution_in_region.
2750 (scan_tree_for_params_right_scev): Add extra assert.
2751 (parameter_index_in_region_1): Split from parameter_index_in_region.
2752 (idx_record_params): Use scalar_evolution_in_region.
2753 (find_params_in_bb): Same.
2754 (find_scop_parameters): Same.
2755 (build_loop_iteration_domains): Same.
2756 (create_linear_expr_from_tree): Same.
2757 * sese.c (scalar_evolution_in_region): New.
2758 * sese.h (scalar_evolution_in_region): Declared.
2759 (defined_in_sese_p): New.
2760 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
2761 static anymore.
2762 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
2763 Declared.
2764
27652009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2766
2767 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
2768 TREE_DATA_REF_H also implies SCEV_H.
2769
27702009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2771
2772 * graphite-poly.c (print_scop_params): New.
2773 (print_scop): Call print_scop_params.
2774 (debug_scop_params): New.
2775 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
2776
27772009-07-07 Li Feng <nemokingdom@gmail.com>
2778
45489e99
SP
2779 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
2780 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
2781 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
2782 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
2783 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
2784 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
2abae5f1
SP
2785
27862009-07-07 Li Feng <nemokingdom@gmail.com>
2787
2788 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
2789 for dependency checking part.
45489e99 2790 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
2abae5f1 2791 tests for dependency checking.
45489e99
SP
2792 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2793 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2794 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
2abae5f1
SP
2795 flag -fdump-tree-graphite-all for autopar testsuites.
2796
27972009-07-06 Sebastian Pop <sebastian.pop@amd.com>
2798
2799 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
2800 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
2801 canonicalize_loop_ivs): Moved...
2802 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
2803
28042009-07-06 Sebastian Pop <sebastian.pop@amd.com>
2805
2806 * tree-parloops.c (try_create_reduction_list): Pass an extra
2807 argument analyzed_reductions. Call analyze_reduction_list.
2808 (gen_parallel_loop): Do not call analyze_reduction_list.
2809 (parallelize_loops): Init and finalize analyzed_reductions.
2810
28112009-07-06 Li Feng <nemokingdom@gmail.com>
2812
45489e99 2813 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2abae5f1
SP
2814 Added flag -fno-loop-strip-mine for autopar testcase.
2815
28162009-07-04 Li Feng <nemokingdom@gmail.com>
2817
2818 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
2819 transformed scattering dimension instead of unmatch orignal when
2820 calling dependence_polyhedron.
2821
28222009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2823
2824 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
2825
28262009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2827
2828 * graphite-poly.c (pbb_number_of_iterations): Check for returned
2829 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
2830
28312009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2832
2833 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
2834 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
2835 * graphite-poly.c (pbb_number_of_iterations): New.
2836 * graphite-poly.h (pbb_number_of_iterations): Declared.
2837 (pbb_iterator_dim, pbb_parameter_dim): New.
2838
28392009-06-29 Sebastian Pop <sebastian.pop@amd.com>
2840
2841 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
2842 last commit on type of lower and upper bound of loops.
2843
28442009-06-29 Li Feng <nemokingdom@gmail.com>
2845
2846 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
2847 graphite-dependences.h.
2848 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
2849 (mark_bb_with_pbb): New.
2850 (get_stmtfor_depth): New.
2851 (find_pbb_via_hash): New.
2852 (dependency_in_loop_p): New.
2853 (mark_loops_parallel): New.
2854 (free_aux_in_new_loops): New.
2855 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
2856 bb with it's relevant pbb. Mark newly created loops. Remove mark
2857 innermost loop parallel without checking.
2858 (gloog): Add parameter BB_PBB_MAPPING.
2859 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
2860 (gloog): Change declaration.
2861 (mark_loop_parallel): Make extern.
2862 (free_aux_in_new_loops): Declare.
2863 (bb_pbb_map_hash): New.
2864 (eq_bb_pbb_map): New.
2865 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
2866 auto parallelization when flag_graphite_force_parallel is set.
2867 (graphite_finalize): Added free_aux_in_new_loops.
2868 * tree-parloops.c (parallelize_loops): Only generate parallel code for
2869 the innermost loop that marked parallel. Use
2870 flag_graphite_force_parallel instead of loop->can_be_parallel.
2871 (loop_parallel_p): Move inner most checking out of function.
2872
28732009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2874
2875 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
2876 type of lower and upper bound of loops signed long int.
2877
28782009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2879
2880 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
2881 expression outside the loop.
2882
28832009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2884
2885 * gcc.dg/graphite/interchange-8.c: New.
2886
28872009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2888
2889 * gcc.dg/graphite/interchange-0.c: XFailed.
2890 * gcc.dg/graphite/interchange-5.c: XFailed.
2891 * gcc.dg/graphite/interchange-6.c: XFailed.
2892
28932009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2894
2895 * graphite-interchange.c (compute_array_size_poly): The end of the
2896 recursion should return 1.
2897
28982009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2899
2900 * graphite-interchange.c (compute_array_size_cstr): Allow the
2901 subscript multiplier to be -1.
2902 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
2903 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
2904 data_container. Initializes PDR_DATA_CONTAINER.
2905 (print_pdr_access_layout): New.
2906 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
2907 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
2908 data_container.
2909 (PDR_DATA_CONTAINER): New.
2910 (new_poly_dr): Update declaration.
2911 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
2912 (build_poly_dr): Call pdr_add_data_dimensions.
2913
29142009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2915
2916 * graphite-poly.h (struct poly_dr): Fix comment.
2917 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
2918 (pdr_add_memory_accesses): New.
2919 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
2920
29212009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2922
2923 * graphite-poly.c (print_pdrs, debug_pdrs): New.
2924 (print_pbb): Add call to print_pdrs.
2925 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
2926
29272009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2928 Li Feng <nemokingdom@gmail.com>
2929
2930 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
2931 (dependency_between_pbbs_p): New.
2932 (lexicographically_gt_p): Assure !empty_p before polyhedron
2933 intersection assign.
2934 (build_lexicographically_gt_constraint): Correct lexicographically
2935 judging.
2936 * graphite-dependences.h: New.
2937 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
2938
29392009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2940
2941 * graphite-clast-to-gimple.c (print_clast_stmt): New.
2942 (gloog): Print to dump_file the generated clast.
2943 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
2944 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
2945
29462009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2947
2948 * graphite-poly.c (extend_scattering): Increment
2949 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
2950
29512009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2952
2953 * graphite-interchange.c (compute_array_size_poly): Added exit of
2954 recursion condition. Continue iterating even after the first equality.
2955 (compute_array_size): Same.
2956
29572009-06-24 Li Feng <nemokingdom@gmail.com>
2958
45489e99 2959 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
2abae5f1 2960 -fdump-tree-final_cleanup to -fdump-tree-optimized.
45489e99
SP
2961 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2962 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2963 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
2abae5f1
SP
2964
29652009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2966
2967 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
2968 only when the use verifies is_gimple_reg.
2969
29702009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2971
2972 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
2973 Allocate scaldims after call to unify_scattering_dimensions.
2974
29752009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2976
2977 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
2978
29792009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2980 Albert Cohen <albert.cohen@inria.fr>
2981
2982 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
2983 variables for the strip mining.
2984
29852009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2986 Pranav Garg <pranav.garg2107@gmail.com>
2987
2988 * Makefile.in (OBJS-common): Added graphite-blocking.o.
2989 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
2990 (graphite-blocking.o): New rule.
2991 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
2992 * graphite-blocking.c: New.
2993 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
2994 flag_loop_strip_mine.
2995 (psct_scattering_dim_for_loop_depth): New.
2996 * graphite-poly.h (scop_do_strip_mine): Declared.
2997 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
2998 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
2999 flag_loop_strip_mine.
3000
30012009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3002
3003 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3004 a GMP value and a PPL coefficient at each iteration of a loop.
3005
30062009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3007
3008 * graphite-dependences.c (dependence_polyhedron): Do not use
3009 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3010 pbb_nb_scattering_transform.
3011 (graphite_legal_transform_dr): Same.
3012 * graphite-poly.c (extend_scattering): Same.
3013 (unify_scattering_dimensions): Same.
3014 (print_scattering_function): Same.
3015 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3016 PBB_NB_LOCAL_VARIABLES.
3017 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3018 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3019 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3020 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3021 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3022 (pbb_nb_scattering_transform): New.
3023 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3024 (psco_scattering_dim): Add assert on parameters.
3025 (psct_scattering_dim): Same.
3026 (psct_scattering_dim_for_loop_depth): Declared.
3027 (psct_local_var_dim): New.
3028 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3029 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3030 correct layout, call pbb_nb_local_vars.
3031 (psct_add_local_variable, psct_add_scattering_dimension): New.
3032 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3033 Initialize PBB_NB_SCATTERING_TRANSFORM.
3034
30352009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3036
3037 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3038 (set_coef): Renamed ppl_set_coef.
3039 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3040
30412009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3042
3043 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3044 test a boolean against 1.
3045 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3046 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3047 (pbb_do_interchange): Returns true when a transform has been performed.
3048 (scop_do_interchange): Same.
3049 * graphite-poly.c (apply_poly_transforms): Use the return value of
3050 scop_do_interchange.
3051 * graphite-poly.h (scop_do_interchange): Update declaration.
3052
30532009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3054
3055 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3056 after last use.
3057 * sese.c (sese_reset_aux_in_loops): New.
3058 * sese.h (sese_reset_aux_in_loops): New.
3059
30602009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3061
3062 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3063 multiplier and multiply the constant by the multiplier.
3064 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3065 (build_poly_dr): Do not use the multiplier to define the subscript.
3066
30672009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3068
3069 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3070 compiler's data reference. Initialize PDR_CDR.
3071 (print_pdr): Call dump_data_reference.
3072 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3073 Add compiler_dr field.
3074 (PDR_BB): Renamed PDR_PBB.
3075 (PDR_CDR): New.
3076 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3077 GCC's data reference representation.
3078 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3079 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3080
30812009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3082
3083 * graphite-poly.c (print_scattering_function): Also print the layout.
3084 * graphite-poly.h (pbb_nb_local_vars): New.
3085
30862009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3087
3088 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3089
30902009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3091
3092 * graphite-poly.c (print_pdr, debug_pdr): New.
3093 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3094 (PDR_BASE): Removed.
3095
30962009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3097
45489e99 3098 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
2abae5f1
SP
3099 ltrans-{1..6,8}.c.
3100
31012009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3102
3103 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3104 subscript identification column.
3105 (pbb_do_interchange): Print to dump_file that some loops "will be
3106 interchanged". Rely on that chain of characters in the testcases.
3107 * gcc.dg/graphite/interchange-0.c: New.
3108 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3109 interchange-*.c files and compile them with -floop-interchange.
3110
31112009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3112
3113 * graphite-interchange.c (interchange_profitable_p): Renamed
3114 pbb_interchange_profitable_p.
3115
31162009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3117 Harsha Jagasia <harsha.jagasia@amd.com>
3118 Pranav Garg <pranav.garg2107@gmail.com>
3119
3120 * graphite-interchange.c (interchange_profitable_p): Make static.
3121 (pbb_interchange_loop_depths, pbb_do_interchange,
3122 scop_do_interchange): New.
3123 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3124 for flag_loop_interchange.
3125 * graphite-poly.h (scop_do_interchange): Declared.
3126 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3127 flag_loop_interchange is used.
3128
31292009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3130
3131 * graphite-dependences.c (dependence_polyhedron): Update use of
3132 pbb_nb_scattering_dims.
3133 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3134 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3135 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3136 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3137
31382009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3139
3140 * graphite.c: Cleanup foo.
3141
31422009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3143
3144 * Merge from mainline (r143684:148293).
3145 * Disabled libpcp until it gets fixed.
3146
31472009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3148 Harsha Jagasia <harsha.jagasia@amd.com>
3149
3150 * graphite-interchange.c: New.
3151 * Makefile.in (graphite-interchange.o): New.
3152 * graphite-poly.h (interchange_profitable_p): Declared.
3153 * graphite-ppl.h (value_max): New.
3154
31552009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3156
3157 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3158 * graphite-poly.h: Fix some comments.
3159 (pdr_dim): New.
3160 (pdr_scop): New.
3161
31622009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3163
3164 * graphite-poly.h
3165 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3166 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3167 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3168 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3169 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3170 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3171 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3172 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3173 * graphite-clast-to-gimple.c: Same.
3174 * graphite-dependences.c: Same.
3175 * graphite-poly.c: Same.
3176 * graphite-sese-to-poly.c: Same.
3177
31782009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3179
3180 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3181 expressions for an IV rename, as returned by clast_to_gcc_expression.
3182 (copy_renames): Rename new_name to expr.
3183 * sese.c (debug_rename_elt): Same.
3184 (get_rename): Same.
3185 (set_rename): Same.
3186 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3187 the information from the rename map.
3188 (rename_variables_in_stmt): Same.
3189 (add_loop_exit_phis): Rename new_name to expr.
3190 (insert_loop_close_phis): Same.
3191 (add_guard_exit_phis): Same. Call force_gimple_operand.
3192 * sese.h (struct rename_map_elt): Rename new_name to expr.
3193 (new_rename_map_elt): Same.
3194
31952009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3196
3197 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3198 * sese.c (set_rename): Make it extern.
3199 * sese.h (set_rename): Declared.
3200
32012009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3202
3203 * graphite-poly.c (extend_scattering): Free values.
3204 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3205 Free iterators.
3206 (ppl_print_powerset_matrix): Same.
3207 * graphite-scop-detection.c (free_scops_1): New.
3208 (limit_scops): Call free_scops_1.
3209 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3210 (build_poly_dr): Free PPL coefficients.
3211 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3212
32132009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3214
3215 * graphite-dependences.c: New.
3216 * graphite-data-ref.c: Removed.
3217 * graphite-data-ref.h: Removed.
3218 * Makefile.in (graphite-data-ref.o): Removed.
3219 (graphite-dependences.o): Added.
3220 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3221 * graphite-poly.c: Same.
3222 Move the data dependence testing to graphite-dependences.c.
3223
32242009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3225
3226 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3227 from graphite_cannot_represent_loop. Code refactored.
3228 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3229
32302009-05-17 Li Feng <nemokingdom@gmail.com>
3231
45489e99 3232 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2abae5f1
SP
3233 Cover all the testcases (not only the filtered ones).
3234
32352009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3236
3237 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3238 unnecessary check. Update comments. Move check for REAL_TYPE here.
3239 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3240 done in (stmt_simple_for_scop_p).
3241
32422009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3243
3244 * graphite.c (print_global_statistics): New.
3245 (print_graphite_scop_statistic): New.
3246 (print_graphite_statistics): New.
3247 (graphite_initialize, graphite_transform_loops): Print statistics.
3248 * graphite-scop-detection (build_scops): Print statistics.
3249 (print_graphite_scop_statistics): New.
3250 (print_graphite_statistics): New.
3251
32522009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3253
3254 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3255 (debug_clast_name_index): Removed.
3256 (debug_clast_name_indexes_1): Removed.
3257 (debug_clast_name_indexes): Removed.
3258 (clast_name_index_elt_info): Removed.
3259 (eq_clast_name_indexes): Removed.
3260 (clast_name_to_index): Removed.
3261 (new_clast_name_index): Removed.
3262 (save_clast_name_index): Removed.
3263 (save_var_name): Moved...
3264 (init_sese_params_index): Removed.
3265 (clast_name_to_gcc): Remove use of name_tree.
3266 (initialize_cloog_names): Same.
3267 (gloog): Do not call init_sese_params_index.
3268 * graphite-sese-to-poly.c (save_var_name): ...here.
3269 (parameter_index_in_region): New.
3270 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3271 (parameter_index_in_region): Removed.
3272 (is_parameter): Remove use of name_tree.
3273 * sese.h (struct name_tree): Removed.
3274 (struct sese): Remove use of name_tree. New field params_names.
3275 (SESE_PARAMS_NAMES): New.
3276 (SESE_PARAMS): Remove duplicate.
3277 (parameter_index_in_region): Removed.
3278 (sese_nb_params): Remove use of name_tree.
3279 (struct clast_name_index): New.
3280 (new_clast_name_index): New.
3281 (clast_name_to_index): New.
3282 (save_clast_name_index): New.
3283 (debug_clast_name_index): New.
3284 (debug_clast_name_indexes_1): New.
3285 (debug_clast_name_indexes): New.
3286 (clast_name_index_elt_info): New.
3287 (eq_clast_name_indexes): New.
3288
32892009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3290
3291 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
3292 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
3293 (graphite_loop_normal_form): Do not pass region. Do not
3294 initialize SESE_OLDIVS.
3295 (build_graphite_loop_normal_form): Update call to
3296 graphite_loop_normal_form.
3297 * sese.c (debug_oldivs): Removed.
3298 (new_sese): Do not initialize SESE_OLDIVS.
3299 (free_sese): Do not free SESE_OLDIVS.
3300 (oldiv_for_loop): Removed.
3301 * sese.h (struct sese): Remove old_ivs.
3302 (SESE_OLDIVS): Removed.
3303 (oldiv_for_loop): Removed.
3304
33052009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3306
3307 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
3308 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
3309 replaced by a call to newivs_to_depth_to_newiv.
3310 (clast_to_gcc_expression): Pass newivs, remove ivstack.
3311 (clast_to_gcc_expression_red): Same.
3312 (gcc_type_for_clast_expr): Same.
3313 (gcc_type_for_clast_eq): Same.
3314 (graphite_translate_clast_equation): Same.
3315 (graphite_create_guard_cond_expr): Same.
3316 (graphite_create_new_guard): Same.
3317 (graphite_create_new_loop): Same.
3318 (build_iv_mapping): Same.
3319 (translate_clast): Same.
3320 (gloog): Same.
3321 (loop_iv_stack_patch_for_consts): Removed. *
3322 sese.c (iv_stack_entry_is_constant): Removed.
3323 (iv_stack_entry_is_iv): Removed.
3324 (loop_iv_stack_push_iv): Removed.
3325 (loop_iv_stack_insert_constant): Removed.
3326 (loop_iv_stack_pop): Removed.
3327 (loop_iv_stack_get_iv): Removed.
3328 (loop_iv_stack_get_iv_from_name): Removed.
3329 (debug_loop_iv_stack): Removed.
3330 (free_loop_iv_stack): Removed.
3331 (loop_iv_stack_remove_constants): Removed. *
3332 sese.h (iv_stack_entry_kind): Removed.
3333 (iv_stack_entry_data_union): Removed.
3334 (iv_stack_entry_struct): Removed.
3335 (iv_stack_entry_p): Removed.
3336 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
3337 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
3338 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
3339 loop_iv_stack_pop, free_loop_iv_stack): Removed.
3340 (gbb_loop_at_index): Fix indenting.
3341 (gbb_loop_index): Removed.
3342
33432009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3344
3345 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
3346 Call clast_name_to_index.
3347
33482009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3349
3350 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
3351 do not pass params. Get params from SESE_PARAMS.
3352 (clast_to_gcc_expression): Same.
3353 (clast_to_gcc_expression_red): Same.
3354 (gcc_type_for_clast_eq): Same.
3355 (graphite_translate_clast_equation): Same.
3356 (graphite_create_new_loop): Same.
3357 * sese.c (rename_variables_in_stmt): Fix comment.
3358
33592009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3360
3361 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
3362 newivs_index.
3363 Call save_clast_name_index.
3364 (translate_clast): Pass newivs_index.
3365 (gloog): Create and free newivs_index.
3366
33672009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3368
3369 * graphite-clast-to-gimple.c (clast_name_index): New structure.
3370 (clast_name_index_p): New type.
3371 (debug_clast_name_index): New.
3372 (debug_clast_name_indexes_1): New.
3373 (debug_clast_name_indexes): New.
3374 (clast_name_index_elt_info): New.
3375 (eq_clast_name_indexes): New.
3376 (clast_name_to_index): New.
3377 (new_clast_name_index): New.
3378 (save_clast_name_index): New.
3379 (init_sese_params_index): New.
3380 (gloog): Call init_sese_params_index.
3381 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
3382 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
3383 (free_sese): Free SESE_PARAMS_INDEX.
3384 * sese.h (struct sese): Add params_index.
3385 (SESE_PARAMS_INDEX): New.
3386
33872009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3388
3389 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
3390 (graphite_create_new_loop): Pass the newivs vector. Push the
3391 newly created IV to newivs.
3392 (translate_clast): Pass the newivs vector.
3393 (gloog): Create and destroy the newivs vector.
3394
33952009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3396
3397 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
3398 (graphite_loop_normal_form): Initialize loop->aux with the unique
3399 IV that has been created.
3400
34012009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
3402
3403 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
3404 scev with parameters in the base part. They where forbidden
3405 exidently.
3406
34072009-05-11 Li Feng <nemokingdom@gmail.com>
3408
45489e99 3409 * gcc.dg/graphite/graphite.exp: Set different default
2abae5f1 3410 compile options by file names.
45489e99
SP
3411 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
3412 * gcc.dg/graphite/id-{1-9}.c: Ditto.
3413 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
3414 * gcc.dg/graphite/scop-matmult.c: Ditto.
2abae5f1
SP
3415
34162009-05-08 Li Feng <nemokingdom@gmail.com>
3417
45489e99
SP
3418 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
3419 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
3420 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
3421 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2abae5f1
SP
3422
34232009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3424
3425 * graphite-scop-detection (build_scops_1): Fix little bug introduced
3426 by final cleanup.
3427
34282009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3429
3430 * graphite-scop-detection.c (graphite_can_represent_scev): Only
3431 allow integer constant strides.
3432 (graphite_can_represent_expr): Depend on outermost_loop.
3433 (stmt_simple_memref_p, graphite_cannot_represent_loop,
3434 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
3435 build_scops_1): Same.
3436 (scopdet_basic_block_info): Same and insert layered SCoP
3437 detection.
3438 (try_generate_gimple_bb): Cleanup.
3439 (build_scops): Enable data references.
3440
45489e99
SP
3441 * gcc.dg/graphite/id-5.c: New.
3442 * gcc.dg/graphite/id-9.c: New.
2abae5f1
SP
3443 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
3444 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
3445
34462009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3447
3448 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
3449 that we have not yet built for this SCoP.
3450
34512009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3452
3453 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
3454 for complex numbers.
3455
34562009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3457
3458 * graphite-ppl.c: Fix build if cloog is not available.
3459
34602009-05-04 Li Feng <nemokingdom@gmail.com>
3461
3462 * tree-parloops.c (loop_parallel_p): Remove construction of
3463 NITER and REDUCTION_LIST.
3464 (try_get_loop_niter): New.
3465 (try_create_reduction_list): New.
3466 (parallelize_loops): Bypass the failed checkings in autopar
3467 when can_be_parallel in loop structure is set to true.
3468
34692009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3470
45489e99
SP
3471 * gcc.dg/graphite/id-6.c: Update testcase.
3472 * gcc.dg/graphite/scop-3.c: Dito.
2abae5f1
SP
3473
34742009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3475
3476 * graphite-scop-detection.c (stmt_simple_for_scop_p):
3477 Enable EQ_EXPR and NE_EXPR again.
3478
34792009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3480
3481 * graphite-scop-detection.c (graphite_can_represent_scev):
3482 Add check if scev is affine multivariate.
3483 (harmful_stmt_in_bb): Check if we can represent the conditions.
3484 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
3485 harmful_stmt_in_bb.
45489e99 3486 * gcc.dg/graphite/id-7.c: New.
2abae5f1
SP
3487
34882009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3489
3490 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
3491 Check all bbs in region, not only the bbs that are represented in
3492 GRAPHITE.
3493 (build_poly_scop): Add newline.
45489e99 3494 * gcc.dg/graphite/id-8.c: New.
2abae5f1
SP
3495
34962009-04-30 Li Feng <nemokingdom@gmail.com>
3497
3498 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
3499 when loop initialize.
3500 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
3501 * common.opt: Declare flag_graphite_force_parallel.
3502 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
3503 loop parallel.
3504 * graphite-poly.c (apply_poly_transforms): Introduce
3505 flag_graphite_force_parallel.
3506 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
3507 * toplev.c (process_options): ditto and replace a not correctly
3508 encoded space.
3509
35102009-04-30 Li Feng <nemokingdom@gmail.com>
3511
3512 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
3513 Change the call of gbb_loop_at_index and/or gbb_loop_index due
3514 to the redefinition.
3515 (compute_cloog_iv_types_1): ditto.
3516 (build_iv_mapping): ditto.
3517 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
3518 initialization.
3519 (free_gimple_bb): Removed GBB_LOOPS related free part.
3520 (build_bb_loops): Removed.
3521 * sese.h (struct gimple_bb): Removed loops.
3522 (GBB_LOOPS): Removed.
3523 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
3524 (gbb_loop_index): ditto.
3525
35262009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3527
3528 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
3529 allow non constant strides.
45489e99 3530 * gcc.dg/graphite/scop-20.c: New.
2abae5f1
SP
3531
35322009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3533
3534 * graphite-scop-detection.c (dot_all_scops): Fix system call
3535 return value warning.
3536 (dot_scop): Same.
3537
35382009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3539
45489e99
SP
3540 * gcc.dg/graphite/id-6.c: Fix pattern.
3541 * gcc.dg/graphite/scop-3.c: Same.
2abae5f1
SP
3542
35432009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3544
3545 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
3546 build_pairwise_constraint, dr_equality_constraints,
3547 build_pairwise_scheduling_equality,
3548 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3549 build_lexicographically_gt_constraint, dependence_polyhedron,
3550 graphite_legal_transform_dr, graphite_legal_transform_bb,
3551 graphite_legal_transform): New.
3552 * graphite-poly.h (graphite_legal_transform): Declared.
3553 * graphite-sese-to-poly.c (build_poly_scop): Call to
3554 graphite_legal_transform is disabled for the moment.
3555
35562009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3557
3558 * graphite-poly.h (pbb_nb_scattering_dims): New.
3559 (pbb_nb_scattering): Use it.
3560
35612009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3562
3563 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
3564 Pointset_Powerset version of ppl_insert_dimensions.
3565 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
3566
35672009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3568
3569 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
3570
35712009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3572
3573 * graphite-poly.h: Fix comment.
3574
35752009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3576
3577 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
3578
35792009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3580
3581 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
3582 statements.
3583
35842009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3585
3586 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
3587 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
3588 conditions.
3589
35902009-04-20 Sebastian Pop <sebastian.pop@amd.com>
3591
3592 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
3593 handle EQ_EXPR and NE_EXPR.
3594
35952009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
3596
3597 * graphite-poly.h (poly_dr): Fix comment.
3598
35992009-04-09 Sebastian Pop <sebastian.pop@amd.com>
3600 Tobias Grosser <grosser@fim.uni-passau.de>
3601
3602 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
3603 with a zero dimension polyhedron.
3604 (find_scop_parameters): Move the call to scop_set_nb_params here.
3605 (build_loop_iteration_domains): Store in loop->aux the iteration
3606 domain polyhedron.
3607 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
3608 by any loop in scop.
3609 (build_poly_scop): Do not call scop_set_nb_params.
3610
36112009-04-09 Sebastian Pop <sebastian.pop@amd.com>
3612 Tobias Grosser <grosser@fim.uni-passau.de>
3613
3614 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
3615 add_condition_to_domain not GT_EXPR.
3616
36172009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3618
3619 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
3620 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
3621 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
3622 upper_bound_assign to calculate unions.
45489e99 3623 * gcc.dg/graphite/id-6.c: New.
2abae5f1
SP
3624
36252009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3626
3627 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
3628 handle abnormal edges.
3629
36302009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3631
3632 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
3633 (free_poly_bb): Also free poly_drs.
3634 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
3635 (poly_dr): Polyhedron to Pointset_Powerset.
3636 (pdr_accessp_nb_subscripts): Same.
3637 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
3638 poly_drs.
3639
36402009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3641
3642 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
3643 names into more meaningful names.
3644
36452009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3646
45489e99
SP
3647 * gfortran.dg/graphite/interchange-1.c: New.
3648 * gfortran.dg/graphite/interchange-2.c: New.
2abae5f1
SP
3649
36502009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3651
3652 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
3653 the reduction_list.
3654 * tree-parloops.c (rewrite_phi_with_iv): New.
3655 (rewrite_all_phi_nodes_with_iv): New.
3656 (canonicalize_loop_ivs): Call them.
3657
36582009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3659
3660 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
3661 graphite_find_data_references_in_stmt.
3662 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
3663 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
3664
36652009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3666
3667 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
3668
36692009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3670
3671 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
3672 instead of bb_in_region.
3673 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
3674 (build_sese_conditions): Use flag_bb_in_sese.
3675 * sese.c (register_bb_in_sese): Removed.
3676 (new_sese): Remove initialization of SESE_REGION_BBS.
3677 (free_sese): Do not free SESE_REGION_BBS.
3678 * sese.h (struct sese): Remove field region_basic_blocks.
3679 (SESE_REGION_BBS): Removed.
3680 (bb_in_sese_p): Implement in function of bb_in_region.
3681
36822009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3683
3684 * graphite-scop-detection.c (limit_scops): Deal only with single exit
3685 loops.
3686
36872009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
3688
3689 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
3690 and EQ_EXPR.
3691 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
3692 (add_condition_to_domain): New.
3693 (add_condition_to_pbb): New.
3694 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
45489e99 3695 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2abae5f1
SP
3696
36972009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
3698
3699 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
3700 ppl_Pointset_Powerset.
3701 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
3702 * graphite-poly.h (poly_bb): poly_bb.domain Same.
3703 (pbb_nb_loops): Same.
3704 * graphite-sese-to-poly.c (build_loop_iteration_domains,
3705 add_conditions_to_domain): Same.
3706 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
3707 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
3708 ppl_const_Polyhedron_t.
3709 (ppl_print_powerset_matrix): New.
3710 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
3711 ppl_print_powerset_matrix): New.
3712 (ppl_print_polyhedron_matrix): Updated.
3713
37142009-04-07 Sebastian Pop <sebastian.pop@amd.com>
3715
3716 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
3717
37182009-04-07 Sebastian Pop <sebastian.pop@amd.com>
3719
3720 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
3721 (print_iteration_domains, debug_iteration_domain,
3722 debug_iteration_domains): New.
3723 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
3724 debug_iteration_domains): Declared.
3725 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
3726 indenting.
3727
37282009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
3729 Sebastian Pop <sebastian.pop@amd.com>
3730
3731 * graphite-poly.h (print_iteration_domain): New.
3732 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
3733 (build_sese_conditions_1, build_sese_conditions_after,
3734 build_sese_conditions_before): New.
3735 (build_sese_conditions): Rewritten.
3736
37372009-04-03 Sebastian Pop <sebastian.pop@amd.com>
3738 Tobias Grosser <grosser@fim.uni-passau.de>
3739
3740 Cleanup of code generation liveouts.
3741 * graphite-clast-to-gimple.c (translate_clast): Use a single
3742 rename_map instead of one per translated statement.
3743 Do not use SESE_LIVEOUT_RENAMES.
3744 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
3745 (gloog): Do not use SESE_LIVEOUT_RENAMES.
3746 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
3747 phi node of a reduction: when a loop contains a reduction used outside
3748 the loop, there should be a scalar close phi node on the exit block.
3749 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
3750 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
3751 (free_sese): Do not free them.
3752 (sese_build_liveouts_use): Do not use them.
3753 (sese_build_liveouts_bb): Same.
3754 (sese_build_liveouts): Same.
3755 (sese_insert_phis_for_liveouts): Same.
3756 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
3757 (defined_in_loop_p): New.
3758 (alive_after_loop): New.
3759 (close_phi_not_yet_inserted_p): New.
3760 (struct alep, alep_p): New.
3761 (add_loop_exit_phis): Remove from the rename_map all the names defined
3762 in the code generated loop.
3763 (insert_loop_close_phis): Traverse the rename_map passed to it.
3764 Don't use SESE_LIVEOUT_RENAMES.
3765 (default_liveout_before_guard): Renamed default_before_guard.
3766 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
3767 (graphite_copy_stmts_from_block): Do not directly call set_rename.
3768 (register_sese_liveout_renames): Removed.
3769 (copy_bb_and_scalar_dependences): Do not call it.
3770 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
3771 reduction_list.
3772 (SESE_LIVEOUT): Removed.
3773 (SESE_LIVEOUT_RENAMES): Removed.
3774 (SESE_REDUCTION_LIST): Removed.
3775 (sese_build_liveouts): Removed.
3776 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
3777 (insert_loop_close_phis): Pass a htab_t instead of a sese.
3778 (insert_guard_phis): Same.
3779 (rename_map_elt): Declare a VEC of them.
3780 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3781 trees not pointers to trees.
3782
3783 Rewrite in canonical close SSA form:
3784 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
3785 (limit_scops): Close the scop after the block containing the close phi
3786 nodes.
3787 (canonicalize_loop_closed_ssa): New.
3788 (canonicalize_loop_closed_ssa_form): New.
3789 (build_scops): Call canonicalize_loop_closed_ssa_form.
3790
3791 * graphite-sese-to-poly.c: Fix typos.
3792
37932009-04-03 Sebastian Pop <sebastian.pop@amd.com>
3794
3795 * graphite-poly.c (print_scattering_function, print_pbb_domain):
3796 Extended.
3797 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
3798 (print_pbb): Add conditions.
3799
38002009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
3801 Sebastian Pop <sebastian.pop@amd.com>
3802
3803 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
3804 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
3805 (build_scop_bbs_1): New.
3806 (build_scop_bbs): Rewrite.
3807 * sese.h (bb_in_region): New.
3808
38092009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3810
3811 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3812 poly_drs vector.
3813 (print_scop): Style.
3814 * graphite-poly.h (poly_bb): Add drs vector.
3815 (PBB_DRS): Add accessor.
3816 * graphite-sese-to-poly.c (build_poly_dr): New.
3817 (build_pbb_drs, build_scop_drs): New.
3818 (build_poly_scop): call build_scop_drs (Disabled at the moment).
3819
38202009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3821
3822 * tree-ssa-loop.c: Include forgotten toplev.h
3823
38242009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3825
3826 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
45489e99
SP
3827 * gcc.dg/graphite/pr37883.c: Remove -floop-*
3828 * gcc.dg/graphite/pr37928.c: Same
3829 * gcc.dg/graphite/pr38409.c: Same
3830 * gcc.dg/graphite/pr38498.c: Same
3831 * gcc.dg/graphite/pr38559.c: Same
3832 * gcc.dg/graphite/pr39335.c: Same
3833 * gcc.dg/graphite/pr39335_1.c: Same
3834 * gfortran.dg/graphite/block-2.f: Same
2abae5f1
SP
3835 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
3836 with -floop-*.
3837
38382009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
3839
3840 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
3841 build_access_matrix, build_scop_data_accesses): Remove access function
3842 building. (We get a new version soon).
3843 (build_bb_loops, scan_tree_for_params_right_scev): Update.
3844 * sese.h (nb_loops_around_loop_in_sese): Remove.
3845 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
3846
38472009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
3848 Sebastian Pop <sebastian.pop@amd.com>
3849
3850 * graphite-scop-detection.c (struct scopdet_info): Rename last
3851 field to exit.
3852 (scopdet_basic_block_info, build_scops_1): Don't use
3853 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
3854
38552009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
3856 Sebastian Pop <sebastian.pop@amd.com>
3857
3858 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
3859 * sese.c (sese_build_liveouts_use): Renamed from
3860 sese_build_livein_liveouts_use. Remove liveins.
3861 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
3862 Call sese_build_liveouts_use.
3863 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
3864 Call sese_build_liveouts_bb.
3865 (new_sese, free_sese): Remove liveins.
3866 (sese_add_exit_phis_var): Deleted.
3867 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
3868 directly.
3869 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
3870
3871 * sese.h (sese): Remove num_ver and livein.
3872 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
3873
38742009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
3875
3876 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
3877
38782009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
3879
3880 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
3881 (build_scop_scattering): Do not use compare_prefix_loops any more.
3882 (nb_common_loops): New.
3883
38842009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3885
3886 * sese.c (get_new_name_from_old_name): Renamed get_rename.
3887 (register_old_and_new_names): Renamed set_rename.
3888
38892009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3890
3891 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
3892 of the decl from the previous commit.
3893
38942009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3895
3896 * graphite-scop-detection.c (dot_scop): New.
3897 * graphite-scop-detection.h (dot_scop): Declared.
3898
38992009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3900
3901 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
3902
39032009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3904
3905 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
3906 condition at the end of the loop.
3907 * graphite.c (graphite_initialize, graphite_finalize): Print to
3908 dump_file the compiled function.
3909 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
3910 of create_empty_loop_on_edge.
3911 (translate_clast): Update the code generation of loops for the new
3912 shape of loops.
3913 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
3914
39152009-03-24 Sebastian Pop <sebastian.pop@amd.com>
3916
3917 Reverted the patch from 2009-03-19.
3918
39192009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
3920
3921 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3922 poly_drs vector.
3923 (print_scop): Style.
3924 * graphite-poly.h (poly_bb): Add drs vector.
3925 (PBB_DRS): Add accessor.
3926 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
3927 (build_access_matrix_with_af, build_access_matrix,
3928 build_scop_data_accesses): Delete.
3929 (build_poly_dr): New.
3930 (build_pbb_drs, build_scop_drs): New.
3931 (build_poly_scop): call build_scop_drs.
3932
39332009-03-13 Sebastian Pop <sebastian.pop@amd.com>
3934
3935 * graphite-scop-detection.c (dot_all_scops_1): Close the table
3936 once per basic block.
3937
39382009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
3939
3940 * graphite-scop-detection.c (graphite_can_represent_scev): New.
3941 (graphite_can_represent_expr): Renamed from loop_affine_expr
3942 and enhanced.
3943 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
3944 (graphite_cannot_represent_loop): Add scop_entry to parameters.
3945 (scopdet_basic_block_info): Actually define entry_block.
3946 (stmt_simple_memref_p): Moved here from ...
3947
3948 * tree-data-ref.c (stmt_simple_memref_p): here.
3949 * tree-data-ref.h (stmt_simple_memref_p): Removed.
3950
39512009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
3952
45489e99 3953 * gcc.dg/graphite/id-4.c: New.
2abae5f1
SP
3954
39552009-03-12 Sebastian Pop <sebastian.pop@amd.com>
3956
3957 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3958 (register_old_and_new_names): Update the content of the map.
3959 When there was already a rename_map_elt in the map at that
3960 location, free it.
3961 (copy_bb_and_scalar_dependences): Do rename_variables after
3962 expand_scalar_variables.
3963 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3964 of the map. When there was already a rename_map_elt in the
3965 map at that location, free it.
3966 (translate_clast): Pass the rename_map. Do not initialize and free
3967 a rename_map per stmt_user.
3968 (gloog): Initialize and free one rename_map and pass it to
3969 translate_clast.
3970
39712009-03-12 Sebastian Pop <sebastian.pop@amd.com>
3972
3973 * sese.c (expand_scalar_variables_stmt,
3974 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
3975 parameter.
3976 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
3977 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
3978 the gimple_stmt_iterator of the statement to be expanded.
3979 * graphite-scop-detection.c (is_simple_operand): Do handle
3980 REALPART_EXPR.
3981
39822009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3983
3984 * graphite-scop-detection.c (is_simple_operand): Do not handle
3985 REALPART_EXPR.
45489e99 3986 * gcc.dg/graphite/id-2.c: New.
2abae5f1
SP
3987
3988 * graphite-sese-to-poly.c (build_bb_loops,
3989 add_value_to_dim, scan_tree_for_params_right_scev,
3990 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
3991 find_params_in_bb, build_loop_iteration_domains,
3992 add_conditions_to_domain): Remove subtract.
3993
39942009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3995
3996 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
3997 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
3998 pbb_loop_at_index -> gbb_loop_at_index.
3999 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4000 (debug_loop_vec): Delete.
4001 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4002 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4003 (PBB_LOOPS): Removed.
4004 (PBB_BLACK_BOX): Insert cast.
4005 (pbb_set_black_box): New setter.
4006 (pbb_loop_at_index, pbb_loop_index): Removed.
4007 (scop_set_region, scop_set_nb_params): New.
4008 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4009 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4010 (build_poly_scop): Use scop_set_nb_params.
4011 * sese.h (gimple_bb): Add LOOPS.
4012 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4013
40142009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4015
4016 Revert previous commit.
4017
40182009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4019
4020 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4021 (register_old_and_new_names): Update the content of the map.
4022 When there was already a rename_map_elt in the map at that
4023 location, free it.
4024 (copy_bb_and_scalar_dependences): Do rename_variables after
4025 expand_scalar_variables.
4026 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4027 of the map. When there was already a rename_map_elt in the
4028 map at that location, free it.
4029 (translate_clast): Pass the rename_map. Do not initialize and free
4030 a rename_map per stmt_user.
4031 (gloog): Initialize and free one rename_map and pass it to
4032 translate_clast.
4033
40342009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4035
4036 Remove forgotten line in revert.
4037
40382009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4039
4040 Revert previous commit.
4041
40422009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4043
4044 * sese.c (register_old_and_new_names): Update the content
4045 of the map. When there was already a rename_map_elt in the
4046 map at that location, free it.
4047 (copy_bb_and_scalar_dependences): Do rename_variables after
4048 expand_scalar_variables.
4049 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4050 of the map. When there was already a rename_map_elt in the
4051 map at that location, free it.
4052 (translate_clast): Pass the rename_map. Do not initialize and free
4053 a rename_map per stmt_user.
4054 (gloog): Initialize and free one rename_map and pass it to
4055 translate_clast.
4056
40572009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4058
4059 * graphite-clast-to-gimple.c (translate_clast): context_loop
4060 is never NULL.
4061
40622009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4063 Sebastian Pop <sebastian.pop@amd.com>
4064
4065 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4066 of the use of ppl_Polyhedron_map_space_dimensions.
4067
40682009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4069 Sebastian Pop <sebastian.pop@amd.com>
4070
4071 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4072 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4073 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4074 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4075 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4076 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4077 pbb_nb_params): New.
4078 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4079 nb_loops_around_pbb): Adapt return types.
4080
40812009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4082
4083 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4084 graphite-clast-to-gimple.o, graphite-data-ref.o,
4085 graphite-scop-detection.o, graphite-poly.o): Add
4086 more headers.
4087
40882009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4089
4090 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4091 graphite-clast-to-gimple.o, graphite-data-ref.o,
4092 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4093
40942009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4095
45489e99
SP
4096 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4097 * gcc.dg/graphite/pr37828.c: Same.
4098 * gcc.dg/graphite/pr37684.c: Same.
4099 * gcc.dg/graphite/block-0.c: Same.
4100 * gcc.dg/graphite/block-1.c: Same.
4101 * gcc.dg/graphite/block-2.c: Same.
4102 * gcc.dg/graphite/block-3.c: Same.
4103 * gcc.dg/graphite/block-4.c: Same.
4104 * gcc.dg/graphite/block-5.c: Same.
4105 * gcc.dg/graphite/block-6.c: Same.
4106 * gfortran.dg/graphite/pr38083.f90: Same.
4107 * gfortran.dg/graphite/block-1.f90: Same.
4108 * gfortran.dg/graphite/block-3.f90: Same.
4109 * gfortran.dg/graphite/pr37852.f90: Same.
4110 * gfortran.dg/graphite/block-4.f90: Same.
4111 * gfortran.dg/graphite/pr37980.f90: Same.
4112 * gfortran.dg/graphite/pr38953.f90: Same.
4113 * gfortran.dg/graphite/pr37857.f90: Same.
2abae5f1
SP
4114 * opts.c: Remove -floop-block from -O2.
4115 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4116 -floop-strip-mine are used.
4117
41182009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4119 Sebastian Pop <sebastian.pop@amd.com>
4120
4121 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4122 dimensions.
4123 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4124 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4125 strip_mine_profitable_p, is_interchange_valid,
4126 graphite_trans_bb_block, graphite_trans_loop_block,
4127 graphite_trans_scop_block): Temporary removed.
4128 (extend_scattering, unify_scattering_dimensions): New.
4129 (print_scattering_function, graphite_read_transforms):
4130 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4131 (graphite_generate_scattering_fns): Removed.
4132 (apply_poly_transforms): Cleanup.
4133 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4134 (schedule_to_scattering): Moved.
4135 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4136 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4137 (pbb_nb_scattering): New.
4138 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4139 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4140 Removed.
4141 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4142 shift_poly.
4143 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4144 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4145 -> PBB_TRANSFORMED_SCATTERING.
4146 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4147 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4148 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4149 (check_poly_representation): Do not return bool.
4150 (graphite_transform_loops): Reformat.
4151 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4152
41532009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4154
4155 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4156 debug_pbb_domain, debug_pbb, debug_scop): New.
4157 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4158 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4159
41602009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4161
4162 PR middle-end/39335
4163 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4164 when the type precision of the induction variable should be
4165 larger than the type precision of nit.
4166 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4167 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4168 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4169
45489e99
SP
4170 * gcc.dg/graphite/pr39335_1.c: New.
4171 * gcc.dg/graphite/pr39335.c: New.
2abae5f1
SP
4172
41732009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4174
4175 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4176 SSA_NAMES not struct reduction_info.
4177
41782009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4179
4180 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4181
41822009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4183 Tobias Grosser <grosser@fim.uni-passau.de>
4184
4185 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4186 (free_sese): Free SESE_REDUCTION_LIST.
4187 * sese.h (struct sese): Add field reduction_list.
4188 (SESE_REDUCTION_LIST): New.
4189 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4190 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4191
41922009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4193 Tobias Grosser <grosser@fim.uni-passau.de>
4194
4195 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4196 of loop_p.
4197
41982009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4199 Tobias Grosser <grosser@fim.uni-passau.de>
4200
4201 * tree-parloops.c (struct brli, build_reduction_list_info,
4202 analyze_reduction_list, gather_scalar_reductions): New.
4203 (loop_parallel_p): Build a reduction list containing only
4204 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4205 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4206 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4207 * tree-flow.h (gather_scalar_reductions): Declared.
4208
42092009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4210
4211 PR middle-end/39308
4212 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4213 number_of_iterations_exit from a gcc_assert.
4214
42152009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4216 Jan Sjodin <jan.sjodin@amd.com>
4217
4218 * output.h (graphite_out_file, graphite_in_file): Declared.
4219 * toplev.c (graphite_out_file, graphite_in_file): New.
4220 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4221 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4222 Don't call schedule_to_scattering.
4223 * common.opt (fgraphite-write, fgraphite-read): New.
4224 * graphite-poly.c: Include output.h.
4225 (print_scattering_function, print_scattering_functions,
4226 debug_scattering_function, debug_scattering_functions,
4227 graphite_write_transforms, graphite_read_transforms,
4228 graphite_generate_scattering_fns): New.
4229 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4230 Call graphite_generate_scattering_fns, graphite_write_transforms,
4231 graphite_read_transforms.
4232 (new_poly_bb): Initialize PBB_SCATTERING.
4233 (free_poly_bb): Free PBB_SCATTERING.
4234 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4235 * graphite-poly.h (struct poly_bb): Add field scattering.
4236 (PBB_SCATTERING): New.
4237 (print_scattering_function, print_scattering_functions,
4238 debug_scattering_function, debug_scattering_functions): Declared.
4239 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4240 GMP values, not integers!
4241 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4242 ppl_read_polyhedron_matrix): New.
4243 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4244 debug_ppl_polyhedron_matrix,
4245 ppl_read_polyhedron_matrix): Declared.
4246 * Makefile.in (graphite-poly.o): Depends on output.h.
4247
42482009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4249 Tobias Grosser <grosser@fim.uni-passau.de>
4250
4251 Revert this change:
4252 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4253 scalar evolutions in the scop_entry->loop_father.
4254
42552009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4256 Tobias Grosser <grosser@fim.uni-passau.de>
4257
4258 * graphite.h (ref_nb_loops): Remove declaration.
4259 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4260 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4261 debug_gbb): Moved to sese.h.
4262 * sese.h: As said.
4263
42642009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4265 Tobias Grosser <grosser@fim.uni-passau.de>
4266
4267 * graphite-data-ref.[ch]: Disable.
4268
42692009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4270 Tobias Grosser <grosser@fim.uni-passau.de>
4271
4272 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4273 scalar evolutions in the scop_entry->loop_father.
4274
42752009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4276
4277 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
4278 (graphite_cannot_represent_loop_niter): Renamed
4279 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
4280 (limit_scops): build_sese_loop_nests does not return a bool.
4281 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
4282 * sese.c (nb_reductions_in_loop): ... from here.
4283 (graphite_loop_normal_form): ... from here.
4284 (sese_record_loop): Does not fail, so does not return a bool.
4285 (build_sese_loop_nests): Same.
4286 * sese.h (build_sese_loop_nests): Update declaration.
4287 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
4288 (build_graphite_loop_normal_form): New.
4289 (gloog): Call build_graphite_loop_normal_form.
4290 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
4291 build_sese_loop_nests.
4292
45489e99 4293 * gcc.dg/graphite/id-1.c: New.
2abae5f1
SP
4294
42952009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4296 Tobias Grosser <grosser@fim.uni-passau.de>
4297
4298 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
4299 The SCoP detection fix is sufficient.
4300
43012009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4302
4303 PR tree-optimization/39260
4304 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
4305 the basic block contains a condition with a real type.
4306 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
4307
4308 * gcc.dg/graphite/pr39260.c: New.
4309
43102009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4311
4312 * graphite-poly.c: Inlcude params.h.
4313 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
4314 the size of a tile.
4315 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
4316 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
4317
43182009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4319 Tobias Grosser <grosser@fim.uni-passau.de>
4320
4321 * graphite-scop-detection.c (dot_all_scops_1,
4322 dot_all_scops): Moved here.
4323 * graphite-scop-detection.h (dot_all_scops): Declared here.
4324 * graphite.c (graphite_initialize, graphite_finalize): New.
4325 (graphite_transform_loops): Cleaned up.
4326 * sese.c (debug_oldivs): Moved here.
4327 * graphite-poly.c (graphite_apply_transformations): Renamed
4328 apply_poly_transforms.
4329 (debug_loop_vec): Moved here.
4330 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
4331 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
4332 find_scop_parameters, build_scop_iteration_domain,
4333 add_conditions_to_constraints, build_scop_canonical_schedules,
4334 build_scop_data_accesses): Now static.
4335 (build_poly_scop, check_poly_representation): New.
4336
43372009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4338
4339 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
4340 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
4341 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
4342 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
4343 scan_tree_for_params_right_scev, scan_tree_for_params_int,
4344 scan_tree_for_params, struct irp_data, dx_record_params,
4345 find_params_in_bb, find_scop_parameters, gbb_from_bb,
4346 build_loop_iteration_domains, add_conditions_to_domain,
4347 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
4348 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
4349 build_sese_conditions, add_conditions_to_constraints,
4350 build_scop_iteration_domain, build_access_matrix_with_af,
4351 build_access_matrix,
4352 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
4353
4354 * graphite-sese-to-poly.c: New.
4355 * graphite-sese-to-poly.h: New.
4356
4357 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
4358
43592009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4360
4361 * graphite.c: Split graphite code generation to a new file.
4362 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
4363 max_precision_type, clast_to_gcc_expression_red,
4364 clast_to_gcc_expression, gcc_type_for_clast_expr,
4365 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
4366 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
4367 graphite_create_new_guard, clast_get_body_of_loop,
4368 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
4369 graphite_create_new_loop, build_iv_mapping, copy_renames,
4370 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4371 compute_cloog_iv_types, free_scattering, save_var_name,
4372 initialize_cloog_names, build_scop_context, build_cloog_prog,
4373 set_cloog_options, debug_clast_stmt, scop_to_clast,
4374 print_generated_program, debug_generated_program,
4375 gloog): Moved to graphite-clast-to-gimple.c.
4376
4377 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
4378
4379 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
4380 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
4381 loop_iv_stack_pop, loop_iv_stack_get_iv,
4382 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
4383 free_loop_iv_stack, loop_iv_stack_remove_constants,
4384 debug_rename_elt, debug_rename_map_1, debug_rename_map,
4385 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
4386 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
4387 eq_ivtype_map_elts, sese_add_exit_phis_edge,
4388 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
4389 get_vdef_before_sese, sese_adjust_vphi,
4390 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
4391 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
4392 is_iv, expand_scalar_variables_ssa_name,
4393 expand_scalar_variables_expr, expand_scalar_variables_stmt,
4394 expand_scalar_variables, rename_variables, remove_condition,
4395 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
4396 add_loop_exit_phis, insert_loop_close_phis, struct igp,
4397 default_liveout_before_guard, add_guard_exit_phis,
4398 insert_guard_phis, register_old_and_new_names,
4399 graphite_copy_stmts_from_block, register_sese_liveout_renames,
4400 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
4401 if_region_set_false_region, create_if_region_on_edge,
4402 move_sese_in_condition): Moved to sese.c.
4403
4404 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
4405 if_region_exit, if_region_get_condition_block,
4406 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
4407 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
4408 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
4409 ivtype_map_elt, new_ivtype_map_elt,
4410 recompute_all_dominators): Moved to sese.h.
4411
4412 * graphite-clast-to-gimple.c: New.
4413 * graphite-clast-to-gimple.h: New.
4414 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
4415 * sese.c: Modified as said above.
4416 * sese.h: Same.
4417
44182009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4419
4420 * graphite.c: Split scop detection to a new file.
4421 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
4422 move_sd_regions, loop_affine_expr, exclude_component_ref,
4423 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
4424 graphite_cannot_represent_loop_niter, struct scopdet_info,
4425 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
4426 find_single_entry_edge, find_single_exit_edge,
4427 create_single_entry_edge, sd_region_without_exit,
4428 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
4429 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
4430 Moved to graphite-scop-detection.c.
4431
4432 * graphite-scop-detection.c: New.
4433 * graphite-scop-detection.h: New.
4434 * Makefile.in: Add new rule for graphite-scop-detection.o.
4435
4436 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
4437 tree-scalar-evolution.h.
4438 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
4439 build_sese_loop_nests): Moved here from graphite.c.
4440 (param_index): Renamed parameter_index_in_region.
4441
44422009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4443 Sebastian Pop <sebastian.pop@amd.com>
4444
4445 * gcc.dg/graphite/block-0.c: Expected to fail now.
4446 * gcc.dg/graphite/block-1.c: Same.
4447 * gcc.dg/graphite/block-5.c: Same.
4448 * gcc.dg/graphite/block-6.c: Same.
4449
44502009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4451 Sebastian Pop <sebastian.pop@amd.com>
4452
4453 * graphite.h: Separate from graphite_bb_p the polyhedral
4454 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
4455 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
4456 graphite-data-ref.h.
4457 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
4458 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
4459 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
4460 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4461 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
4462 scop_nb_params): Moved to graphite-poly.h.
4463 * graphite-data-ref.c: Same.
4464 * graphite-data-ref.h: New.
4465 * graphite.c: Same.
4466 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
4467 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
4468 is_interchange_valid, graphite_trans_bb_block,
4469 graphite_trans_loop_block, scop_max_loop_depth,
4470 graphite_trans_scop_block, graphite_apply_transformations,
4471 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
4472 graphite-poly.c.
4473 * graphite-poly.h: New.
4474 * graphite-poly.c: New.
4475 * Makefile.in (OBJS-common): Add graphite-poly.o.
4476 (graphite-poly.o): New rule.
4477 * tree-data-ref.h (struct data_reference): Remove unused scop field.
4478 (DR_SCOP): Removed.
4479
44802009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4481 Tobias Grosser <grosser@fim.uni-passau.de>
4482
4483 * graphite.c: Replace gb -> gbb.
4484 * graphite.h: Same.
4485 * graphite-data-ref.c: Same.
4486
44872009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4488 Tobias Grosser <grosser@fim.uni-passau.de>
4489
4490 * Makefile.in (OBJS-commmon): Add sese.o.
4491 (sese.o): New.
4492 (graphite.o): Add sese.h.
4493 * graphite.c (bb_in_ss_p, loop_in_sese_p,
4494 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
4495 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
4496 Move to sese.
4497 (block_before_scop): Add missing return.
4498 (new_scop, free_scop): Remove SESE data structures.
4499 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
4500 find_scop_parameters, build_loop_iteration_domains,
4501 add_conditions_to_domain, register_scop_liveout_renames,
4502 copy_bb_and_scalar_dependences): Scop -> SESE.
4503
4504 (add_conditions_to_domain): SCoP -> SESE and remove check
4505 (scop_contains_non_iv_scalar_phi_nodes): New.
4506 (build_scop_conditions_1, build_scop_conditions): Remove check for
4507 non iv scalar phi nodes.
4508 (print_scop_statistics): New.
4509 (graphite_transform_loops): Cleanup.
4510
4511 * graphite.h: Move to sese & cleanup.
4512 * sese.c: New.
4513 * sese.h: New.
4514
45152009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4516 Tobias Grosser <grosser@fim.uni-passau.de>
4517
4518 * graphite.c (build_scop_conditions_1): Conditions are only
4519 at the end of a basic block.
4520
45212009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4522 Tobias Grosser <grosser@fim.uni-passau>
4523
4524 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
4525 field.
4526 (GBB_ALPHA): Removed.
4527
45282009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4529 Tobias Grosser <grosser@fim.uni-passau.de>
4530
4531 * graphite-data-ref.c (graphite_test_dependence): Don't use
4532 GBB_DYNAMIC_SCHEDULE.
4533 * graphite.c (new_graphite_bb): Same.
4534 (free_graphite_bb): Same.
4535 (build_scop_dynamic_schedules): Removed.
4536 (graphite_transform_loops): Don't call it.
4537 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
4538 (GBB_DYNAMIC_SCHEDULE): Removed.
4539
45402009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4541 Tobias Grosser <grosser@fim.uni-passau.de>
4542
4543 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
4544 (print_graphite_bb): Same.
4545 (build_cloog_prog): Same.
4546
45472009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4548 Tobias Grosser <grosser@fim.uni-passau.de>
4549
4550 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
4551
45522009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4553 Tobias Grosser <grosser@fim.uni-passau.de>
4554
4555 * graphite.c (build_scop_context): Don't use CloogMatrix.
4556 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
4557 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
4558
45592009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4560 Tobias Grosser <grosser@fim.uni-passau.de>
4561
4562 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
4563 liveout_renames, add_params fields...
4564 (struct sese): ... here.
4565 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
4566 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
4567
45682009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4569 Tobias Grosser <grosser@fim.uni-passau.de>
4570
4571 * graphite.c (print_scop): Do not print the CLooG program.
4572 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
4573 build_cloog_prog, gloog): Don't use SCOP_PROG.
4574 (find_transform): Renamed scop_to_clast.
4575 (print_generated_program, debug_generated_program): New.
4576 (graphite_transform_loops): Adapt to new interface.
4577 * graphite.h (struct scop): Remove program field.
4578 (SCOP_PROG): Removed.
4579 (print_generated_program, debug_generated_program): Declared.
4580
45812009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4582
4583 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
4584 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
4585 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
4586 free_graphite_bb, build_scop_canonical_schedules,
4587 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
4588 schedules are now represented using a ppl_Linear_Expression_t.
4589 * graphite.h (struct graphite_bb): Same.
4590 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
4591 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
4592
45932009-02-15 Sebastian Pop <sebastian.pop@amd.com>
4594
4595 * graphite.c: Free local memory.
4596 * graphite-ppl.c: Same.
4597
45982009-02-15 Sebastian Pop <sebastian.pop@amd.com>
4599
4600 * graphite.c (const_column_index, get_first_matching_sign_row_index,
4601 get_lower_bound_row, get_upper_bound_row, copy_constraint,
4602 swap_constraint_variables, scale_constraint_variable): Removed.
4603 (graphite_trans_bb_strip_mine): Remove pong.
4604 * graphite-ppl.c: Include missing header files.
4605 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
4606 * graphite-ppl.h (ppl_strip_loop): Declared.
4607 * Makefile.in (graphite-ppl.o): Adjust dependences.
4608
46092009-02-14 Sebastian Pop <sebastian.pop@amd.com>
4610
4611 * graphite.c (build_loop_iteration_domains): Remove ping pong.
4612 (build_scop_iteration_domain): Same.
4613
46142009-02-13 Sebastian Pop <sebastian.pop@amd.com>
4615
4616 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
4617 ping pong.
4618 (add_value_to_dim, scan_tree_for_params_right_scev,
4619 scan_tree_for_params_int): New.
4620 * graphite-ppl.c (oppose_constraint): New.
4621 (insert_constraint_into_matrix): Implement missing cases.
4622 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
4623
46242009-02-13 Sebastian Pop <sebastian.pop@amd.com>
4625
4626 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
4627 use ppl_move_dimension.
4628
46292009-02-12 Sebastian Pop <sebastian.pop@amd.com>
4630
4631 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
4632 * graphite.c: Same.
4633 * graphite.h: Same.
4634 * graphite-ppl.c: Same.
4635 * graphite-ppl.h: Same.
4636
46372009-02-12 Sebastian Pop <sebastian.pop@amd.com>
4638
4639 Revert last 3 commits.
4640
46412009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4642
4643 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
4644 ping pong.
4645 (add_value_to_dim, scan_tree_for_params_right_scev,
4646 scan_tree_for_params_int): New.
4647 * graphite-ppl.c (oppose_constraint): New.
4648 (insert_constraint_into_matrix): Implement missing cases.
4649 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
4650
46512009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4652
4653 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
4654
46552009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4656 Tobias Grosser <grosser@fim.uni-passau.de>
4657
4658 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
4659 use ppl_move_dimension.
4660 * graphite-ppl.c (ppl_move_dimension): New.
4661 * graphite-ppl.h (ppl_move_dimension): Declared.
4662
46632009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4664
4665 * graphite.c: Do not include cloog/cloog.h.
4666 (print_graphite_bb): Remove ping pong, call PPL print function.
4667
46682009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
4669
4670 * Makefile.in (OBJS-common): Add graphite-ppl.o.
4671 (graphite.o): Add dependence on graphite-ppl.h.
4672 (graphite-ppl.o): New.
4673 (graphite-data-ref.c): Ping pong between PPL data structures
4674 and matrices.
4675 * graphite-ppl.c: New.
4676 * graphite-ppl.h: New.
4677 * graphite.c: Include graphite-ppl.h.
4678 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
4679 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
4680 Ping pong between PPL data structures and matrices.
4681 (new_graphite_bb): Create a PPL constraint system.
4682 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
4683 (build_loop_iteration_domains): Use PPL functions.
4684 * graphite.h: Include graphite-ppl.h. Fix comments.
4685 (graphite_bb): Use a ppl_Constraint_System_t instead of
4686 CloogMatrix for representing the domain.
4687 (scop): Remove static_schedule.
4688 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
4689
46902009-02-06 Sebastian Pop <sebastian.pop@amd.com>
4691
4692 * graphite.c: Fix some comments.
4693
46942009-02-05 Sebastian Pop <sebastian.pop@amd.com>
4695
4696 PR middle-end/38953
4697 * graphite.c (if_region_set_false_region): After moving a region
4698 in the false branch of a condition, remove the empty dummy
4699 basic block.
4700 (gloog): Remove wrong fix for PR38953.
4701
47022009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
4703
4704 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
4705 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
4706 register_bb_in_sese, new_sese, free_sese): Moved.
4707 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
4708 outermost_loop_in_scop, build_scop_iteration_domain,
4709 expand_scalar_variables_ssa_name, get_vdef_before_scop,
4710 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
4711 Use loop_in_sese_p instead of loop_in_scop_p.
4712 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
4713 (free_scop): Do not free SCOP_BBS_B.
4714 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
4715 ref_nb_loops): Moved here...
4716 * graphite.h (ref_nb_loops): ... from here.
4717 (struct scop): Remove bbs_b bitmap.
4718 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
45489e99 4719 * gcc.dg/graphite/scop-19.c: New
2abae5f1
SP
4720
47212009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
4722
4723 * graphite.c (scopdet_basic_block_info): Fix bug in scop
4724 detection.
4725
47262009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
4727
4728 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4729 eq_loop_to_cloog_loop): Remove.
4730 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
4731 * graphite.h (struct scop): Remove loop2cloog_loop.
4732 (loop_domain_dim, loop_iteration_vector_dim): Remove.
4733
47342009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
4735
4736 * opts.c (decode_options): Only add graphite options to O2
4737 if we compile with graphite enabled.
4738
47392009-01-26 Sebastian Pop <sebastian.pop@amd.com>
4740
4741 * Merge from mainline (r143163:143684).
4742
47432009-01-26 Sebastian Pop <sebastian.pop@amd.com>
4744
4745 * graphite.c (debug_value): Removed.
4746 * graphite.h (debug_value): Removed.
4747
47482009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4749
4750 * passes.c (init_optimization_passes): Do not call pass_copy_prop
4751 after graphite: pass_copy_prop does not maintain a proper loop closed
4752 SSA form. pass_copy_prop should be fixed.
4753
47542009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4755
4756 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
4757
47582009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4759
4760 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
4761 (gloog): Split the exit of the scop when the scop exit is a loop exit.
4762 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
4763 changed the CFG.
4764
47652009-01-20 Sebastian Pop <sebastian.pop@amd.com>
4766
4767 * graphite.c (gloog): Return true when code gen succeeded.
4768 (graphite_transform_loops): Do not call cleanup_tree_cfg if
4769 the code of the function did not changed. After cleanup_tree_cfg
4770 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
4771 form.
4772
47732009-01-19 Sebastian Pop <sebastian.pop@amd.com>
4774
4775 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
4776 gimple_call_lhs is NULL.
4777
47782009-01-16 Sebastian Pop <sebastian.pop@amd.com>
4779 Tobias Grosser <tobi.grosser@amd.com>
4780
4781 * graphite.c (graphite_trans_scop_block): Do not block single
4782 nested loops.
4783
47842009-01-15 Sebastian Pop <sebastian.pop@amd.com>
4785 Tobias Grosser <tobi.grosser@amd.com>
4786
4787 * graphite.c (build_scop_canonical_schedules): Start schedules at
4788 zero.
4789
47902009-01-15 Sebastian Pop <sebastian.pop@amd.com>
4791 Tobias Grosser <tobi.grosser@amd.com>
4792
4793 * graphite.c (compare_prefix_loops): New.
4794 (build_scop_canonical_schedules): Rewritten.
4795 (graphite_transform_loops): Move build_scop_canonical_schedules
4796 after build_scop_iteration_domain.
4797
47982009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4799 Tobias Grosser <tobi.grosser@amd.com>
4800
4801 * graphite.c (add_conditions_to_domain): Add the loops to
4802 the dimension of the iteration domain. Do copy the domain
4803 only when it exists.
4804 (build_scop_conditions_1): Do not call add_conditions_to_domain.
4805 (add_conditions_to_constraints): New.
4806 (can_generate_code_stmt, can_generate_code): Removed.
4807 (gloog): Do not call can_generate_code.
4808 (graphite_transform_loops): Call add_conditions_to_constraints
4809 after building the iteration domain.
4810
48112009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4812 Tobias Grosser <tobi.grosser@amd.com>
4813 Jan Sjodin <jan.sjodin@amd.com>
4814
4815 * graphite.c (scan_tree_for_params): On substractions negate
4816 all the coefficients of the term.
4817 (clast_to_gcc_expression_red): New. Handle reduction expressions
4818 of more than two operands.
4819 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
4820 (get_vdef_before_scop): Handle also the case of default definitions.
4821
48222009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4823
4824 PR middle-end/38431
4825 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
4826 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
4827 (gloog): Do not call cleanup_tree_cfg.
4828 (graphite_transform_loops): Call cleanup_tree_cfg after all
4829 scops have been code generated.
4830
48312009-01-13 Sebastian Pop <sebastian.pop@amd.com>
4832
4833 * passes.c (init_optimization_passes): Schedule after
4834 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
4835
48362009-01-13 Sebastian Pop <sebastian.pop@amd.com>
4837
4838 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
4839 Fix comment.
4840 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
4841 Set the type of an expression to the type of its assign statement.
4842 (expand_scalar_variables_expr): Do not pass loop_p.
4843 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
4844 (copy_bb_and_scalar_dependences): Do not pass loop_p.
4845 (translate_clast): Update call to copy_bb_and_scalar_dependences.
4846
48472009-01-11 Sebastian Pop <sebastian.pop@amd.com>
4848
4849 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
4850 an expression to the gimple_expr_type of its assign statement.
4851 (expand_scalar_variables_expr): Stop recursion on tcc_constant
4852 or tcc_declaration.
4853
48542009-01-11 Sebastian Pop <sebastian.pop@amd.com>
4855
4856 PR tree-optimization/38786
45489e99 4857 * gcc.dg/graphite/pr38786.c: New.
2abae5f1
SP
4858 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
4859 the SSA_NAME case of expand_scalar_variables_expr.
4860 (expand_scalar_variables_expr): Also gather the scalar computation
4861 used to index the memory access.
4862 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
4863 the gimple_stmt_iterator where it inserts new code.
4864
48652009-01-10 Sebastian Pop <sebastian.pop@amd.com>
4866
45489e99 4867 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2abae5f1
SP
4868
48692009-01-10 Sebastian Pop <sebastian.pop@amd.com>
4870
4871 * opts.c (decode_options): Enable flag_graphite_identity and
4872 flag_loop_block in -O2 and above.
4873
48742009-01-08 Sebastian Pop <sebastian.pop@amd.com>
4875
4876 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
4877 Fix merge problem: replace with the file from trunk.
4878
48792009-01-08 Sebastian Pop <sebastian.pop@amd.com>
4880
4881 * Merge from mainline (r141727:143163).
4882
48832009-01-07 Sebastian Pop <sebastian.pop@amd.com>
4884 Jan Sjodin <jan.sjodin@amd.com>
4885
4886 PR tree-optimization/38559
45489e99 4887 * gcc.dg/graphite/pr38559.c: New.
2abae5f1
SP
4888
4889 * graphite.c (debug_value, copy_constraint,
4890 swap_constraint_variables, scale_constraint_variable, ): New.
4891 (get_lower_bound, get_upper_bound): Removed.
4892 (graphite_trans_bb_strip_mine): Clean up this code that works
4893 only for constant number of iterations. Fully copy upper and
4894 lower bound constraints, not only the constant part of them.
4895 * graphite.h (debug_value): Declared.
4896
48972009-01-06 Jan Sjodin <jan.sjodin@amd.com>
4898
4899 PR tree-optimization/38492
4900 PR tree-optimization/38498
4901 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
4902 * tree-chrec.h (scev_is_linear_expression): Declared.
4903 * graphite.c (graphite_cannot_represent_loop_niter): New.
4904 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
4905 (graphite_loop_normal_form): Use gcc_assert.
4906 (scan_tree_for_params): Use CASE_CONVERT.
4907 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
4908 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
4909 Use gcc_assert. Discard scops that contain unhandled cases.
4910 (build_scop_conditions): Return a boolean status for unhandled cases.
4911 (strip_mine_profitable_p): Print the loop number, not its depth.
4912 (is_interchange_valid): Pass the depth of the loop nest, don't
4913 recompute it wrongly.
4914 (graphite_trans_bb_block): Same.
4915 (graphite_trans_bb_block): Print tentative of loop blocking.
4916 (graphite_trans_scop_block): Do not print that the loop has been
4917 blocked.
4918 (graphite_transform_loops): Do not handle scops that contain condition
4919 scalar phi nodes.
4920
45489e99 4921 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
2abae5f1 4922 in trunk.
45489e99
SP
4923 * gcc.dg/graphite/block-0.c: Update test.
4924 * gcc.dg/graphite/block-1.c: Same.
4925 * gcc.dg/graphite/block-2.c: Remove xfail and test for
2abae5f1 4926 blocking.
45489e99
SP
4927 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
4928 * gcc.dg/graphite/block-3.c: New.
4929 * gcc.dg/graphite/pr38498.c: New.
2abae5f1
SP
4930
49312008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
4932
4933 PR tree-optimization/38510
4934 * gcc.dg/graphite/pr38510.c: New.
4935 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
4936 (translate_clast): Call recompute_all_dominators before
4937 graphite_verify.
4938 (gloog): Call recompute_all_dominators before graphite_verify.
4939
49402008-12-12 Sebastian Pop <sebastian.pop@amd.com>
4941
4942 PR tree-optimization/38492
4943 * graphite.c (rename_map_elt, debug_rename_elt,
4944 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
4945 rename_map_elt_info, eq_rename_map_elts,
4946 get_new_name_from_old_name, bb_in_sese_p): Moved around.
4947 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
4948 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
4949 (sese_build_livein_liveouts): New.
4950 (new_sese, free_sese): New.
4951 (new_scop): Call new_sese.
4952 (free_scop): Call free_sese.
4953 (rename_variables_from_edge, rename_phis_end_scop): Removed.
4954 (register_old_new_names): Renamed register_old_and_new_names.
4955 (register_scop_liveout_renames, add_loop_exit_phis,
4956 insert_loop_close_phis, struct igp,
4957 default_liveout_before_guard, add_guard_exit_phis,
4958 insert_guard_phis, copy_renames): New.
4959 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
4960 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
4961 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
4962 (scop_adjust_phis_for_liveouts): New.
4963 (gloog): Call scop_adjust_phis_for_liveouts.
4964
4965 * graphite.h (struct sese): Documented. Added fields liveout,
4966 num_ver and livein.
4967 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
4968 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
4969 (struct scop): Added field liveout_renames.
4970 (SCOP_LIVEOUT_RENAMES): New.
4971
49722008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4973
4974 PR tree-optimization/38409
4975 * gcc.dg/graphite/pr38409.c: New.
4976 * graphite.c (nb_reductions_in_loop): Use simple_iv.
4977
49782008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4979
4980 * graphite.c (gcc_type_for_cloog_iv): By default return
4981 integer_type_node.
4982 (graphite_create_new_loop): Don't fold_convert the already
4983 fold_convert-ed expression.
4984
49852008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
4986
4987 PR tree-optimization/38446
4988 * gcc.dg/graphite/pr38446.c: New.
4989 * graphite.c (register_bb_in_sese): New.
4990 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
4991 looking at the bbs in the region.
4992 * graphite.h (sese): Add region_basic_blocks pointer set to
4993 structure and initialize at the time of defining new scop.
4994
49952008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
4996
4997 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
4998 (find_params_in_bb): Do not free data refs.
4999 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5000
50012008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5002
45489e99
SP
5003 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5004 * gcc.dg/graphite/scop-17.c: Same.
5005 * gcc.dg/graphite/block-5.c: New.
5006 * gcc.dg/graphite/block-6.c: New.
5007 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5008 * gcc.dg/graphite/pr37684.c: Same.
5009 * gcc.dg/graphite/block-2.c: Same.
2abae5f1
SP
5010
5011 * graphite.c (struct ivtype_map_elt): New.
5012 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5013 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5014 gcc_type_for_cloog_iv): New.
5015 (loop_iv_stack_patch_for_consts): Use the type of the induction
5016 variable from the original loop, except for the automatically
5017 generated loops, i.e., in the case of a strip-mined loop, in
5018 which case there is no original loop: in that case just use
5019 integer_type_node.
5020 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5021 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5022 (clast_name_to_gcc): Accept params to be NULL.
5023 (clast_to_gcc_expression): Take an extra parameter for the type.
5024 Convert to that type all the expressions built by this function.
5025 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5026 (graphite_translate_clast_equation): Compute the type of the
5027 clast_equation before translating its LHS and RHS.
5028 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5029 (graphite_create_new_loop): Compute the type of the induction
5030 variable before translating the lower and upper bounds and before
5031 creating the induction variable.
5032 (rename_variables_from_edge, rename_phis_end_scop): New.
5033 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5034 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5035 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5036 compute_cloog_iv_types): New.
5037 (gloog): Call compute_cloog_iv_types before starting the
5038 translation of the clast.
5039
5040 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5041 (GBB_CLOOG_IV_TYPES): New.
5042 (debug_ivtype_map): Declared.
5043 (oldiv_for_loop): New.
5044
50452008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5046
5047 PR middle-end/38459
5048 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5049 (param_index): Assert if parameter is not know after parameter
5050 detection.
5051 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5052 (find_scop_parameters): Mark, that we have finished parameter
5053 detection.
5054 (graphite_transform_loops): Move condition detection before parameter
5055 detection.
5056 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
45489e99 5057 * gfortran.dg/graphite/pr38459.f90: New.
2abae5f1
SP
5058
50592008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5060
5061 * graphite.c (graphite_transform_loops): Always call find_transform ()
5062 in ENABLE_CHECKING. So we test these code paths, even if we do not
5063 generate code.
5064
50652008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5066
5067 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5068 (print_scop): Ditto.
5069
50702008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5071
5072 PR middle-end/38084
45489e99 5073 Fix gfortran.dg/graphite/id-3.f90.
2abae5f1
SP
5074 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5075 regions more than once.
5076
50772008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5078
45489e99 5079 Fix gfortran.dg/graphite/id-4.f90.
2abae5f1
SP
5080 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5081 when not needed.
5082
50832008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5084
45489e99 5085 Fix gfortran.dg/graphite/id-1.f90.
2abae5f1
SP
5086 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5087 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5088 (max_precision_type): New.
5089 (value_clast): Removed.
5090 (clast_to_gcc_expression): Be more careful to types of expressions.
5091 Use max_precision_type and update use of gmp_cst_to_tree.
5092 (graphite_translate_clast_equation): Use max_precision_type.
5093 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5094 use the type of the condition.
5095 (graphite_create_new_loop): Do not use integer_type_node, use the
5096 max_precision_type of lb and ub.
5097
50982008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5099
5100 * graphite.c (build_scops_1): Initialize open_scop.exit
5101 and sinfo.last.
5102
51032008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5104
45489e99
SP
5105 * gcc.dg/graphite/pr38084.c: New.
5106 * gfortran.dg/graphite/id-1.f90: New.
5107 * gfortran.dg/graphite/id-2.f90: New.
5108 * gfortran.dg/graphite/id-3.f90: New.
5109 * gfortran.dg/graphite/id-4.f90: New.
5110 * gfortran.dg/graphite/pr37857.f90: New.
2abae5f1
SP
5111
51122008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5113 Jan Sjodin <jan.sjodin@amd.com>
5114 Harsha Jagasia <harsha.jagasia@amd.com>
5115
5116 PR middle-end/37852
5117 PR middle-end/37883
5118 PR middle-end/37928
5119 PR middle-end/37980
5120 PR middle-end/38038
5121 PR middle-end/38039
5122 PR middle-end/38073
5123 PR middle-end/38083
5124 PR middle-end/38125
5125
45489e99
SP
5126 * gcc.dg/graphite/pr38073.c: New.
5127 * gcc.dg/graphite/pr37928.c: New.
5128 * gcc.dg/graphite/pr37883.c: New.
5129 * gcc.dg/graphite/pr38125.c: New.
5130 * gfortran.dg/graphite/pr38083.f90: New.
5131 * gfortran.dg/graphite/pr37852.f90: New.
5132 * gfortran.dg/graphite/pr37980.f90: New.
2abae5f1 5133
45489e99 5134 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
2abae5f1
SP
5135 the number of detected scops. Copy exact same test for loop
5136 blocking...
45489e99 5137 * gcc.dg/graphite/block-1.c: Fix the number of expected
2abae5f1 5138 loops to be blocked as reductions are not handled.
45489e99 5139 * gcc.dg/graphite/block-4.c: ...here. New.
2abae5f1
SP
5140
5141 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5142 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5143 ...here.
5144 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5145 * Makefile.in (graphite.o): Depend on value-prof.h.
5146 (graphite.o-warn): Removed -Wno-error.
5147 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5148 to be a NULL pointer. Call update_stmt. Return the newly created
5149 cannonical induction variable.
5150
5151 * graphite.h (debug_rename_map): Declared. Fix some comments.
5152
5153 * graphite.c: Reimplement the code generation from graphite to gimple.
5154 Include value-prof.h.
5155 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5156 (get_old_iv_from_ssa_name): Removed.
5157 (graphite_stmt_p): New.
5158 (new_graphite_bb): Test for useful statements before building a
5159 graphite statement for the basic block.
5160 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5161 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5162 reason.
5163 (recompute_all_dominators, graphite_verify,
5164 nb_reductions_in_loop, graphite_loop_normal_form): New.
5165 (scop_record_loop): Call graphite_loop_normal_form.
5166 (build_scop_loop_nests): Iterate over all the blocks of the
5167 function instead of relying on the incomplete information from
5168 SCOP_BBS. Return the success of the operation.
5169 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5170 (add_bb_domains): Removed.
5171 (build_loop_iteration_domains): Don't call add_bb_domains.
5172 Add the iteration domain only to the basic blocks that have been
5173 translated to graphite.
5174 (build_scop_conditions_1): Add constraints only if the basic
5175 block have been translated to graphite.
5176 (build_scop_data_accesses): Completely disabled until data
5177 dependence is correctly implemented.
5178 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5179 (remove_all_edges_1, remove_all_edges): Removed.
5180 (get_new_name_from_old_name): New.
5181 (graphite_rename_variables_in_stmt): Renamed
5182 rename_variables_in_stmt. Call get_new_name_from_old_name.
5183 Use replace_exp and update_stmt.
5184 (is_old_iv): Renamed is_iv.
5185 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5186 Use replace_exp and update_stmt.
5187 (expand_scalar_variables_expr): Same. Use the map to get the
5188 new names for the renaming of induction variables and for the
5189 renaming of variables after a basic block has been copied.
5190 (expand_scalar_variables): Same.
5191 (graphite_rename_variables): Renamed rename_variables.
5192 (move_phi_nodes): Removed.
5193 (get_false_edge_from_guard_bb): New.
5194 (build_iv_mapping): Do not insert the induction variable of a
5195 loop in the renaming iv map if the basic block does not belong
5196 to that loop.
5197 (register_old_new_names, graphite_copy_stmts_from_block,
5198 copy_bb_and_scalar_dependences): New.
5199 (translate_clast): Heavily reimplemented: copy basic blocks,
5200 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5201 At each translation step call graphite_verify ensuring the
5202 consistency of the SSA, loops and dominators information.
5203 (collect_virtual_phis, find_vdef_for_var_in_bb,
5204 find_vdef_for_var_1, find_vdef_for_var,
5205 patch_phis_for_virtual_defs): Removed huge hack.
5206 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5207 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5208 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5209 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5210 if_region_get_condition_block, if_region_set_false_region,
5211 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5212 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5213 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5214 rewrite_into_sese_closed_ssa): New.
5215 (gloog): Remove dead code. Early return if code cannot be
5216 generated. Call cleanup_tree_cfg once the scop has been code
5217 generated.
5218 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5219 block loops with less than two loops.
5220 (graphite_apply_transformations): Remove the call to
5221 scop_remove_ignoreable_gbbs.
5222 (limit_scops): When build_scop_loop_nests fails, continue on
5223 the next scop. Fix open_scop.entry.
5224 (graphite_transform_loops): Call recompute_all_dominators: force the
5225 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5226 Call initialize_original_copy_tables and free_original_copy_tables
5227 to be able to copy basic blocks during code generation.
5228 When build_scop_loop_nests fails, continue on next scop.
5229 (value_clast): New union.
5230 (clast_to_gcc_expression): Fix type cast warning.
5231
52322008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5233
5234 * Merge from mainline (r140838:141727).
5235
52362008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5237
5238 PR middle-end/37833
5239
5240 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5241
52422008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5243
5244 PR middle-end/37943
5245
5246 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5247 exits and conditions.
45489e99 5248 * gcc.dg/graphite/pr37943.c: New.
2abae5f1
SP
5249
52502008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5251
5252 PR middle-end/37886
5253 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5254
52552008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5256
5257 * doc/invoke.texi: Fix spaces.
5258
52592008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5260
5261 PR tree-optimization/37891
5262 Reverted last commit.
5263 * graphite.c (create_single_entry_edge): Set
5264 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5265
52662008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5267 Mitul Thakkar <mitul.thakkar@amd.com>
5268
5269 * graphite.c (create_single_entry_edge): Set
5270 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5271
52722008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
5273
5274 * doc/invoke.texi: Add -fgraphite-identity.
5275 * graphite.c (graphite_apply_transformations): Check for
5276 -fgraphite-identity.
5277 * toplev.c (process_options): Add flag_graphite_identity.
5278 * tree-ssa-loop.c: Add flag_graphite_identity.
5279
52802008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5281
5282 Undo changes from 2008-10-02:
5283 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5284 operand type when copying the operand to a variable of different type.
5285 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5286 with the IV name after increment.
5287
52882008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5289 Harsha Jagasia <harsha.jagasia@amd.com>
5290
5291 PR tree-optimization/37828
45489e99 5292 * gcc.dg/graphite/pr37828.c: New.
2abae5f1
SP
5293 * graphite.c (graphite_trans_loop_block): Do not loop block
5294 single nested loops.
5295
52962008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
5297 Sebastian Pop <sebastian.pop@amd.com>
5298
5299 * graphite.c (struct rename_map_elt, new_rename_map_elt,
5300 rename_map_elt_info, eq_rename_map_elts): New.
5301 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
5302 (expand_scalar_variables_expr): Change parameters.
5303 (expand_scalar_variables_stmt): Same.
5304 (expand_scalar_variables): Same.
5305 (graphite_rename_ivs): Rename graphite_rename_variables.
5306 (build_iv_mapping): New.
5307 (translate_clast): Call build_iv_mapping.
5308 * graphite.h (gbb_p): New name.
5309
53102008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
5311
5312 PR tree-optimization/37684
5313 * gcc.dg/graphite/pr37684.c: New.
5314 * graphite.c (exclude_component_ref): New.
5315 (is_simple_operand): Call exclude_component_ref.
5316
53172008-10-02 Jan Sjodin <jan.sjodin@amd.com>
5318 Harsha Jagasia <harsha.jagasia@amd.com>
5319
5320 PR tree-optimization/37485
5321 * gcc.dg/graphite/block-2.c: New
5322 * graphite.c (gmp_cst_to_tree): Moved.
5323 (iv_stack_entry_is_constant): New.
5324 (iv_stack_entry_is_iv): New.
5325 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
5326 (loop_iv_stack_insert_constant): New.
5327 (loop_iv_stack_pop): Use new datatpype.
5328 (loop_iv_stack_get_iv): Same.
5329 (loop_iv_stack_get_iv_from_name): Same.
5330 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
5331 (loop_iv_stack_patch_for_consts): New.
5332 (loop_iv_stack_remove_constants): New.
5333 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
5334 (translate_clast): Call loop_iv_stack_patch_for_consts and
5335 loop_iv_stack_remove_constants.
5336 (gloog): Use new datatype. Redirect construction edge to end
5337 block to avoid accidental deletion.
5338 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
5339 iv stack entry.
5340 (union iv_stack_entry_data): New. Data in iv stack entry.
5341 (struct iv_stack_entry): New. Datatype for iv stack entries.
5342
53432008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5344
5345 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5346 operand type when copying the operand to a variable of different type.
5347
53482008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5349
5350 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5351 with the IV name after increment.
5352
53532008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5354
5355 * Merge from mainline (r140164:140838).
5356
53572008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5358
5359 * graphite-data-ref.c: New.
5360 * graphite.c (print_scop): Also dump the dependence graph.
5361 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
5362 (new_scop): Initialize SCOP_DEP_GRAPH.
5363 (build_scop_dynamic_schedules): New.
5364 (build_access_matrix_with_af): Fixed column numbering.
5365 (graphite_transform_loops): Call build_scop_dynamic_schedules.
5366 * graphite.h: Add ifndef/define guards against multiple inclusion.
5367 (struct scop): Add dep_graph field.
5368 (SCOP_DEP_GRAPH): Defined.
5369 (ref_nb_loops): Fixed and moved to other position.
5370 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
5371 (nb_loops_around_loop_in_scop): New.
5372 (graphite_dump_dependence_graph): Declared.
5373 (graphite_build_rdg_all_levels): Declared.
5374 (graphite_test_dependence): Declared.
5375 * Makefile.in (graphite-data-ref.o): New target.
5376
53772008-09-09 Sebastian Pop <sebastian.pop@amd.com>
5378
5379 * Merge from mainline (139870:140164).
5380
53812008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5382
5383 * Merge from mainline (138275:139870).
45489e99 5384 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
2abae5f1
SP
5385 the commits from trunk broke the niter detection.
5386
53872008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5388
5389 * graphite.c: Add more documentation. Fix formatting.
5390 (debug_loop_vec, debug_oldivs, loop_iv_stack,
5391 loop_iv_stack_debug): Moved...
5392 (schedule_to_scattering): Move before use.
5393 (dot_all_scops): Include in "#if 0" the code for system
5394 call dotty.
5395
5396 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
5397 loop_iv_stack_debug): ...here.
5398
53992008-08-29 Jan Sjodin <jan.sjodin@amd.com>
5400
5401 * tree-phinodes.c (make_phi_node): Extern.
5402 (add_phi_node_to_bb): New.
5403 (create_phi_node): Call add_phi_node_to_bb.
5404 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
5405 (remove_statement): Handle case where stored phi was updated
5406 and is no longer the same.
5407 * graphite.c (is_parameter): New.
5408 (is_old_iv): New.
5409 (expand_scalar_variables_expr): New.
5410 (expand_scalar_variables_stmt): New.
5411 (expand_scalar_variables): New.
5412 (move_phi_nodes): Create new phi instead of moving old one.
5413 (translate_clast): Call expand_scalar_variables.
5414 (find_vdef_for_var_in_bb): Also scan regular definitions.
5415 (skip_phi_defs): New.
5416 (collect_scop_exit_phi_args): New.
5417 (patch_scop_exit_phi_args): New.
5418 (gloog): Patch phis after scop.
5419 * tree-flow.h: (add_phi_node_to_bb): Declared.
5420 (make_phi_node): Declared.
5421
54222008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5423
5424 * graphite.c (end_scop): Split the entry of the scop when it
5425 is the header of the loop in which the scop is ending.
5426 (build_scops_1, limit_scops): Update uses of end_scop.
5427
54282008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5429
5430 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
5431 SCOP_ENTRY or SCOP_EXIT.
5432
54332008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5434
5435 * graphite.c (get_construction_edge): Removed.
5436 (gloog): Construction edge is the scop entry edge.
5437
54382008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5439
5440 * graphite.c (can_generate_for_scop): Removed.
5441 (gloog): Do not call it.
5442
54432008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5444
5445 * graphite.c (new_scop): Entry of a scop is an edge.
5446 Initialize SESE region.
5447 (free_scop): Free SESE region.
5448 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
5449 (split_difficult_bb): New, split from end_scop.
5450 (end_scop): Exit of a scop is an edge.
5451 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
5452 not automatically updated and thus is always wrong.
5453 * graphite.h (struct sese): New.
5454 (SESE_ENTRY): New.
5455 (SESE_EXIT): New.
5456 (struct scop): New field for a SESE region. Remove entry, exit.
5457 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
5458 semantics as before. Moved comment around.
5459
54602008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5461 Sebastian Pop <sebastian.pop@amd.com>
5462
5463 * graphite.c (graphite_transform_loops): Always enable gloog
5464 and find_transform when ENABLE_CHECKING.
5465
54662008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5467
5468 * graphite.c (graphite_transform_loops): Move pretty printer
5469 of SCOPs before doing any transform. Remove call to print_scops
5470 and dot_all_scops_1.
5471
54722008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5473
5474 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
5475 (print_graphite_bb): Same.
5476
54772008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5478
5479 * graphite.c (dot_all_scops_1): Cleanup.
5480 (move_scops): Fix comment.
5481
54822008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5483
5484 * graphite.c (build_scop_bbs): Revert commit 139355:
5485
5486 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5487 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5488
5489 * graphite.c (build_scop_bbs): Factor up code.
5490
54912008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5492
5493 * graphite.c (gloog): Update dominator info.
5494
54952008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5496
5497 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
5498
54992008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5500
5501 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
5502 initialization.
5503 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
5504 (translate_clast): Correct formatting.
5505 * graphite.h (struct num_map): Removed.
5506 (struct graphite_bb): Remove num_map field.
5507 (GBB_INDEX_TO_NUM_MAP): Removed.
5508
55092008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5510
5511 * graphite.c (build_access_matrix_with_af): Fix comments.
5512 (build_scop_data_accesses): Same.
5513
55142008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5515
5516 * graphite.c (build_scop_data_accesses): Don't construct
5517 access matrices. Add a FIXME and an assert condition that
5518 should pass when the access matrices will be needed.
5519
55202008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5521
5522 * tree-data-ref.c (stmt_simple_memref_p): Don't call
5523 really_constant_p.
5524 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
5525 Moved close by free_graphite_bb.
5526 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
5527 (new_scop): Move close by free_scop.
5528 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
5529
55302008-08-22 Jan Sjodin <jan.sjodin@amd.com>
5531
5532 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
5533 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
5534 instead of recursive call.
5535 (graphite_translate_clast_equation): New.
5536 (graphite_create_guard_cond_expr): New.
5537 (graphite_create_new_guard): New.
5538 (get_stack_index_from_iv): Removed.
5539 (graphite_rename_ivs_stmt): Use gbb_loop_index.
5540 (get_true_edge_from_guard_bb): New.
5541 (translate_clast): Handle stmt_guard in clast.
5542 (get_construction_edge): Allow construction edge detection for
5543 a scope entry with multiple predecessors if one predecessor is
5544 the immediate dominator of scope entry.
5545 (can_generate_code_stmt): Enable code generation for clast_guard.
5546 (gloog): Use correct context loop. Removed check for post dominators.
5547 * cfgloop.h (create_empty_if_region_on_edge): Declared.
5548
55492008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5550
5551 * graphite.c (remove_dead_loops): Document better which
5552 loops are removed.
5553
55542008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5555
5556 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
5557 and PPLINC.
5558 (graphite.o): Also depends on pointer-set.h.
5559
55602008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5561
5562 * graphite.c (scop_record_loop): Fix compile warning.
5563
55642008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
5565 Sebastian Pop <sebastian.pop@amd.com>
5566
5567 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
5568
55692008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5570
5571 * graphite.c (build_graphite_bb): Initialize bb->aux to
5572 point to the graphite_bb_p.
5573 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
5574 content of bb->aux.
5575 (add_bb_domains): Does not use the scop parameter.
5576 (graphite_transform_loops): Clean bb->aux at the end.
5577
55782008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5579 Sebastian Pop <sebastian.pop@amd.com>
5580
45489e99 5581 * lib/target-supports.exp
2abae5f1
SP
5582 (check_effective_target_fgraphite): New.
5583
45489e99 5584 * gcc.dg/graphite/graphite.exp: Early exit when
2abae5f1
SP
5585 check_effective_target_fgraphite returns false.
5586 Set dg-do-what-default to compile.
5587 (scan-graphite-dump-times): Removed.
45489e99 5588 * gfortran.dg/graphite/graphite.exp: Same.
2abae5f1 5589
45489e99 5590 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
2abae5f1 5591 Use scan-tree-dump-times instead of scan-graphite-dump-times.
45489e99
SP
5592 * gcc.dg/graphite/scop-1.c: Same.
5593 * gcc.dg/graphite/scop-2.c: Same.
5594 * gcc.dg/graphite/scop-3.c: Same.
5595 * gcc.dg/graphite/scop-4.c: Same.
5596 * gcc.dg/graphite/scop-5.c: Same.
5597 * gcc.dg/graphite/scop-6.c: Same.
5598 * gcc.dg/graphite/scop-7.c: Same.
5599 * gcc.dg/graphite/scop-8.c: Same.
5600 * gcc.dg/graphite/scop-9.c: Same.
5601 * gcc.dg/graphite/scop-10.c: Same.
5602 * gcc.dg/graphite/scop-11.c: Same.
5603 * gcc.dg/graphite/scop-12.c: Same.
5604 * gcc.dg/graphite/scop-13.c: Same.
5605 * gcc.dg/graphite/scop-matmult.c: Same.
5606 * gcc.dg/graphite/scop-14.c: Same.
5607 * gcc.dg/graphite/scop-15.c: Same.
5608 * gcc.dg/graphite/block-0.c: Same.
5609 * gcc.dg/graphite/scop-16.c: Same.
5610 * gcc.dg/graphite/block-1.c: Same.
5611 * gcc.dg/graphite/scop-17.c: Same.
5612 * gcc.dg/graphite/scop-18.c: Same.
5613 * gfortran.dg/graphite/block-1.f90: Same.
5614 * gfortran.dg/graphite/scop-1.f: Same.
5615 * gfortran.dg/graphite/block-2.f: Same.
2abae5f1
SP
5616
56172008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5618
5619 * graphite.c: Fix some XXX comments.
5620 (build_scop_dynamic_schedules): Removed.
5621
56222008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5623
5624 * graphite.h (scop_max_loop_depth): Moved...
5625 * graphite.c (scop_max_loop_depth): ...here.
5626 (remove_all_edges_1): New.
5627 (remove_all_edges): Factored code.
5628 (remove_cond_exprs): Check only the last statement for
5629 a GIMPLE_COND expression.
5630
56312008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5632
5633 * graphite.c (scan_tree_for_params): Early return when the
5634 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
5635 (find_scop_parameters): Factor out code.
5636 (graphite_trans_bb_strip_mine): Remove dead code.
5637
56382008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5639
5640 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
5641 graphite_trans_bb_move_loop): Factor asserts.
5642 (gloog): Perform sanity checks only for ENABLE_CHECKING.
5643 Do not call calculate_dominance_info and estimate_bb_frequencies.
5644
56452008-08-20 Jan Sjodin <jan.sjodin@amd.com>
5646
5647 * graphite.c (create_loops_mapping, free_loops_mapping,
5648 create_loops_mapping_num, debug_loop_mapping_1,
5649 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
5650 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
5651 graphite_loops_mapping_add_child_num,
5652 graphite_loops_mapping_insert_child,
5653 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
5654 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
5655 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
5656 create_num_from_index, get_num_from_index,
5657 swap_loop_mapped_depth): Removed.
5658 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
5659 (free_scop): Do not call free_loops_mapping.
5660 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
5661 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
5662 get_loop_mapped_depth.
5663 (graphite_trans_bb_move_loop): Do not update the loop mapping.
5664 (graphite_trans_bb_strip_mine): Same.
5665 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
5666 (struct scop): Remove field loops_mapping.
5667
56682008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5669 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5670
5671 * graphite.c (scop_record_loop): Factor out one level of the
5672 condition by early return.
5673 (build_scop_loop_nests): Format following FSF coding style.
5674 (build_scop_dynamic_schedules): Factor out code.
5675 (scopdet_bb_info): Reindent. Default case should not be reachable.
5676
56772008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5678 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5679
5680 * graphite.c (loop_affine_expr): Check for DECL_P or struct
5681 assignments that are not handled as simple operands for now.
5682
56832008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5684 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5685
5686 * graphite.c (build_scop_bbs): Factor up code.
5687
56882008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5689 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5690
5691 * graphite.c (stmt_simple_for_scop_p): Factor code out
5692 of the loop.
5693 (enum gbb_type): New. Group all the GBB_* types under it.
5694 (is_loop_exit): Moved...
5695 (end_scop): Enable BB spliting.
5696 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
5697 * cfgloop.h (is_loop_exit): Declared.
5698
56992008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5700
5701 * doc/invoke.texi: Remove strides from examples containing
5702 DO loops when the strides are equal to 1.
5703
57042008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
5705 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5706
5707 * graphite.c (graphite_trans_scop_block): Or the result with
5708 the result from graphite_trans_loop_block.
45489e99
SP
5709 * gcc.dg/graphite/block-1.c: New.
5710 * gfortran.dg/graphite/block-1.f90: New.
5711 * gfortran.dg/graphite/block-2.f: New.
2abae5f1
SP
5712
57132008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5714
5715 * graphite.c (graphite_transform_loops): Call cloog_initialize
5716 and cloog_finalize.
5717
57182008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5719
5720 * tree-data-ref.c) (stmt_simple_memref_p): New.
5721 * tree-data-ref.h (stmt_simple_memref_p): Declared.
5722 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
5723 (is_simple_operand): Call stmt_simple_memref_p.
5724
45489e99 5725 * gcc.dg/graphite/scop-matmult.c: Updated for not
2abae5f1
SP
5726 using pointer arithmetic, as this is optimized by PRE and
5727 makes the code too difficult to analyze.
5728
45489e99 5729 * gcc.dg/graphite/scop-18.c: Same.
2abae5f1
SP
5730
57312008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5732
5733 * gdbinit.in (pgg): New.
5734
57352008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5736
5737 * graphite.c (graphite_trans_loop_block): Fix warning.
5738
57392008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5740
5741 * graphite.c (graphite_trans_loop_block): Fix my merge error.
5742
57432008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5744
5745 * graphite.c (graphite_trans_bb_block): Remove check for
5746 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
5747 Check if loop blocking is profitable for every loop, before applying
5748 the changes.
5749 (graphite_apply_transformations): Call graphite_trans_bb_block only,
5750 if flag_loop_block is set.
5751
57522008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5753
5754 * graphite.c: Add some more documentation for the loop
5755 mapping.
5756
57572008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5758
5759 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
5760 * graphite.c: Format on less than 80 columns.
5761 * graphite.h: Same.
5762
57632008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5764
5765 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
5766
57672008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5768
5769 * doc/invoke.texi (floop-block, floop-strip-mine,
5770 floop-interchange): Update documentation with examples.
5771
57722008-08-13 Sebastian Pop <sebastian.pop@amd.com>
5773
5774 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
5775 add_referenced_var.
5776 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
5777
57782008-08-13 Sebastian Pop <sebastian.pop@amd.com>
5779
5780 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
5781 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
5782 * tree-scalar-evolution.c: Revert useless changes.
5783 * tree-phinodes.c: Same.
5784 * cfghooks.c: Same.
5785 * vec.h: Same.
5786 * tree-vectorizer.h: Same.
5787 * tree-flow.h: Same.
5788 * tree-cfg.c: Same.
5789 * common.opt (fgraphite): Update documentation.
5790
57912008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
5792
5793 * doc/invoke.texi (-floop-block, -floop-strip-mine,
5794 -floop-interchange): Add more text for explaining what each of these
5795 flags is doing.
5796 * tree-into-ssa.c (gimple_vec): Moved to...
5797 * graphite.c: Include gimple.h.
5798 (gimple_vec): Moved to...
5799 (del_loop_to_cloog_loop): Removed.
5800 (loop_affine_expr): Do not call create_data_ref when the
5801 operand is a constant.
5802 (new_scop): Use free instead of del_loop_to_cloog_loop.
5803 * Makefile.in (graphite.o): Depend on GIMPLE_H.
5804 * gimple.h (gimple_vec): ... here.
5805
58062008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5807
5808 * graphite.c (scopdet_bb_info): Only allow loops with known number of
5809 latch executions.
5810 (build_loop_iteration_domains): Fail, if latch executions unknown.
5811
58122008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5813
5814 * graphite.c (add_conditions_to_domain): New.
5815 (build_scop_conditions_1): Call add_conditions_to_domain.
5816 (set_cloog_options): Allow to disable optimizations.
5817
58182008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5819
5820 * graphite.c (find_params_in_bb): Look for parameters in conditions.
5821 Do not use walk_dominator_tree.
5822 (find_scop_parameters): Do not use walk_dominator_tree.
5823
58242008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5825
5826 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
5827 (idx_record_params): Adapt.
5828 * graphite.h (scop_gimple_loop_depth): New.
5829
58302008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5831
5832 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
5833 (scan_tree_for_params): Remove value_init.
5834 (build_scop_context): Remove value_init.
5835 (build_loop_iteration_domains): Remove value_init.
5836 (schedule_to_scattering): Remove value_init.
5837 (graphite_trans_bb_strip_mine): Remove value_init.
5838
58392008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5840
5841 * gcc/graphite.c (limit_scops): New.
5842 (graphite_transform_loops): Add limit SCoPs.
45489e99
SP
5843 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
5844 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
5845 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
5846 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
5847 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
5848 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
5849 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
5850 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
5851 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
2abae5f1 5852 Change loop numbers.
45489e99 5853 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
2abae5f1 5854 Change loop numbers.
45489e99
SP
5855 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
5856 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
5857 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
5858 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
5859 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
5860 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
5861 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
5862 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
5863 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
5864 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
2abae5f1
SP
5865
58662008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5867
5868 * graphite.c (graphite_transform_loops): Call always find_transform.
5869
58702008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
5871
5872 * graphite.c (free_loops_mapping): New.
5873 (stmt_simple_for_scop_p): Fix typo.
5874 (stmt_simple_for_scop_p): Fix tuples functions, that
5875 broke polyhedron.
5876 (free_graphite_bb): Fix some memleaks.
5877 (free_scop): Fix some memleaks.
5878 (scopdet_bb_info): Do not forget some tmp SCoPs.
5879 (find_params_in_bb): Fix some memleaks.
5880 (clast_to_gcc_expression): Fix warning.
5881
58822008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
5883
45489e99
SP
5884 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
5885 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
2abae5f1
SP
5886
58872008-08-04 Sebastian Pop <sebastian.pop@amd.com>
5888
5889 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
5890 Move code ifdef-ed HAVE_cloog...
5891 * graphite.c: Include toplev.h.
5892 ... here.
5893 * Makefile.in (OBJS-common): Always build graphite.o.
5894 (BACKEND): Remove @GRAPHITE@.
5895 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
5896 (graphite.o): Depend on TOPLEV_H.
5897
58982008-08-04 Sebastian Pop <sebastian.pop@amd.com>
5899
5900 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
5901 Remove typo left from polylib to ppl conversion.
5902 * graphite.c (graphite_transforms): Use sorry instead of fatal.
5903
59042008-08-03 Sebastian Pop <sebastian.pop@amd.com>
5905
5906 * toplev.c (process_options): Move the graphite loop optimization
5907 flags...
5908 * tree-ssa-loop.c (graphite_transforms): ... here.
5909 When not configured with CLooG, print to dump_file that
5910 Graphite transforms were not performed.
45489e99 5911 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
2abae5f1 5912 New.
45489e99 5913 * gcc.dg/graphite/*.c: Updated all testcases to use
2abae5f1
SP
5914 scan-graphite-dump-times.
5915
59162008-08-03 Sebastian Pop <sebastian.pop@amd.com>
5917
5918 * graphite.c (dot_scop, dot_all_scops): Do not call system.
5919 Do not open /tmp/scop.dot and /tmp/allscops.dot.
5920
59212008-08-02 Sebastian Pop <sebastian.pop@amd.com>
5922 Jan Sjodin <jan.sjodin@amd.com>
5923
5924 * configure: Regenerated.
5925 * omp-low.c (expand_omp_sections): Remove now unused code.
5926 * config.in (HAVE_polylib): Removed.
5927 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
5928 (PPLLIBS, PPLINC): Added.
5929 * graphite.c: Replace unsigned with int wherever possible.
5930 Don't access Cloog's data structures, but use accessor functions.
5931 Clast's stmt->type is now implemented as a vtable: change the
5932 switches of stmt->type into ifs.
5933 (polylib/polylibgmp.h): Don't include.
5934 (initialize_dependence_polyhedron,
5935 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5936 statement_precedes_p, test_dependence, build_rdg_all_levels,
5937 dump_dependence_graph): Removed until this code is cleaned up
5938 or ported to Cloog.
5939 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
5940 (POLYLIBINC): Renamed PPLINC.
5941
59422008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
5943 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5944 Jan Sjodin <jan.sjodin@amd.com>
5945
5946 Finish the merge and tuplification of graphite.
5947
59482008-07-24 Sebastian Pop <sebastian.pop@amd.com>
5949 Jan Sjodin <jan.sjodin@amd.com>
5950
5951 Partial merge from mainline (138072:138275).
5952 * graphite.c still has to be tuplified.
5953
59542008-07-29 Jan Sjodin <jan.sjodin@amd.com>
5955
5956 * graphite.c (graphite_loops_mapping_max_loop_num): New.
5957 (create_num_from_index): New.
5958 (get_num_from_index): Also pass in the graphite BB.
5959 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
5960 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
5961 (graphite_trans_bb_strip_mine): Call create_num_from_index.
5962 (is_interchange_valid): Return false when failing.
5963 * graphite.h (struct num_map): New.
5964 (struct graphite_bb): New field num_map.
5965 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
5966
59672008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
5968
5969 * graphite.c (dump_gbb_conditions): Print also conditions like
5970 "if (a)". Remove dublicated code and use print_generic_expr ().
5971 (stmt_simple_for_scop_p): Only allow conditions we can handle
5972 {<, <=, >, >=}.
5973
59742008-07-25 Jan Sjodin <jan.sjodin@amd.com>
5975
5976 * graphite.h (struct scop): Removed new_ivs field.
5977 (SCOP_NEWIVS): Deleted.
5978 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
5979 clast_to_gcc_expression, graphite_create_new_loop):
5980 Removed use of new_ivs.
5981
59822008-07-25 Jan Sjodin <jan.sjodin@amd.com>
5983
5984 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
5985 create_loops_mapping_num, debug_loop_mapping_1): New.
5986 (debug_loop_mapping): Call debug_loop_mapping_1.
5987 (get_loop_mapping_for_num,
5988 graphite_loops_mapping_add_child,
5989 graphite_loops_mapping_add_child_num,
5990 graphite_loops_mapping_insert_child,
5991 graphite_loops_mapping_parent,
5992 split_loop_mapped_depth_for_num,
5993 loop_mapped_depth_split_loop): New.
5994 (increment_loop_mapped_depths): Removed.
5995 (swap_loop_mapped_depth_for_num): Reimplemented.
5996 (new_scop): Call create_loops_mapping.
5997 (scop_record_loop): Call graphite_loops_mapping_insert_child.
5998 (translate_clast): Pass the old loop father in parameter, and pass
5999 it to get_old_iv_from_ssa_name.
6000 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6001 can_generate_code, can_generate_for_scop): New.
6002 (graphite_trans_bb_block): Returns false when it fails to transform.
6003 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6004
60052008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6006
6007 Reverted all the changes related to the streamization and
6008 loop fusion.
6009 These changes are now tracked in the streamization branch.
6010
60112008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6012 Jan Sjodin <jan.sjodin@amd.com>
6013
6014 * graphite.c (gbb_compare): Correctly constify.
6015 (gbb_can_be_ignored): Indent.
6016 (graphite_trans_scop_swap_1and2): Add legality check.
6017 Remove dead FIXMEs.
6018
60192008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6020
6021 Remove fallouts from "Reverted the Condate changes".
6022 * tree.h: Remove unused decl.
45489e99 6023 * gcc.dg/tree-checker: Same.
2abae5f1
SP
6024 * timevar.def: Remove counter.
6025
60262008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6027
6028 * Merge from mainline (135673:138072).
6029
6030 Reverted the MIRO changes (from 2008-04-05) that are now
6031 tracked in the miro branch.
6032 * tree-bounds.c: Removed.
6033 * tree-bounds.h: Removed.
6034
6035 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6036 are now tracked in the condate branch.
6037 * tree-check.c: Removed.
6038 * tree-match.c: Removed.
6039 * condate.y: Removed.
6040
60412008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6042
6043 * common.opt: New user flag -floop-block, -floop-strip-mine
6044 and -floop-interchange.
6045 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6046 graphite loop optimization flags is turned on.
6047 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6048 flag_loop_strip_mine and flag_loop_interchange checks before
6049 optimizations.
6050 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6051 -floop-strip-mine and -floop-interchange.
45489e99 6052 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
2abae5f1 6053 -fgraphite.
45489e99
SP
6054 * gcc.dg/graphite/scop-16.c: Ditto.
6055 * gcc.dg/graphite/scop-17.c: Ditto.
6056 * gcc.dg/graphite/scop-18.c: Ditto.
2abae5f1
SP
6057
60582008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6059 Sebastian Pop <sebastian.pop@amd.com>
6060
6061 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6062 (create_empty_loop_on_edge): More fixes.
6063 * tree-phinodes.c (resize_phi_node): Extern.
6064 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6065 * cfghooks.c (update_dominator_information): New split from
6066 split_edge.
6067 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6068 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6069 successor of the function entry block.
6070
6071 * graphite.c: Include pointer-set.h.
6072 (debug_loop_mapping, increment_loop_mapped_depths,
6073 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6074 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6075 swap_loop_mapped_depth_for_num, get_num_from_index,
6076 swap_loop_mapped_depth, loop_iv_stack_debug,
6077 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6078 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6079 get_old_iv_from_ssa_name): New.
6080 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6081 (free_scop): Free SCOP_LOOPS_MAPPING.
6082 (scop_record_loop): Record old ivs.
6083 (create_var_name): Removed.
6084 (initialize_cloog_names): Allocate double space in case strip mine
6085 applies to all loops once.
6086 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6087 (clast_to_gcc_expression): Same. Implement more clast to gimple
6088 translation.
6089 (graphite_create_new_loop): Pass in ivstack.
6090 (remove_all_edges): Pass in the construction_edge.
6091 (graphite_remove_iv): Removed.
6092 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6093 remove_cond_exprs): Rewritten.
6094 (move_phi_nodes): New.
6095 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6096 (translate_clast): Pass in ivstack. Rewrite some cases.
6097 (set_cloog_options, debug_clast_stmt): New.
6098 (find_transform): Use set_cloog_options.
6099 (outermost_loop_layer): Removed.
6100 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6101 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6102 mark_old_loops, remove_dead_loops): New.
6103 (gloog): Rewritten.
6104 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6105 (const_column_index, get_first_matching_sign_row_index,
6106 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6107 get_upper_bound): New.
6108 (graphite_trans_bb_strip_mine): Also update the iv map.
6109
6110 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6111 (struct name_tree): Add a loop field.
6112 (struct scop): Add a graphite_loops_mapping field.
6113 (SCOP_LOOPS_MAPPING): New.
6114 (debug_clast_stmt): Declare.
6115 * lambda.h (find_induction_var_from_exit_cond): Declare.
6116 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6117 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6118 (create_empty_loop_on_edge): Updated.
6119 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6120 rename_variables_in_bb): Declare.
6121 * tree-cfg.c (remove_bb): Extern.
6122
45489e99 6123 * gcc.dg/graphite/block-0.c: New.
2abae5f1
SP
6124
61252008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6126 Sebastian Pop <sebastian.pop@amd.com>
6127
6128 * graphite.c (strip_mine_profitable_p): New.
6129 (graphite_trans_bb_block): Disable strip mining if not profitable.
6130
45489e99
SP
6131 * gcc.dg/graphite/scop-18.c: New.
6132 * gcc.dg/graphite/scop-17.c: Fixed.
6133 * gcc.dg/graphite/scop-16.c: Fixed.
2abae5f1
SP
6134
61352008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6136 Jan Sjodin <jan.sjodin@amd.com>
6137 Sebastian Pop <sebastian.pop@amd.com>
6138
6139 * graphite.c (is_interchange_valid): New.
6140 (graphite_trans_bb_block): Check loop nest of basic block for legality
6141 of interchange.
6142
6143 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6144 outer_most_loop, gbb_outer_most_loop_index): New.
6145
6146 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6147 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
45489e99
SP
6148 * gcc.dg/graphite/scop-16.c: New.
6149 * gcc.dg/graphite/scop-17.c: New.
2abae5f1
SP
6150
61512008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6152
6153 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6154 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6155
61562008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6157
6158 * graphite.c (new_scop): Initialize SCOP_EXIT.
6159 (scopdet_info): Add.
6160 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6161 (build_scops_1): Cleanup, bugfixes.
6162 (build_scops): Cleanup.
6163
45489e99
SP
6164 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6165 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
2abae5f1
SP
6166
61672008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6168
45489e99 6169 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
2abae5f1 6170
45489e99 6171 * gfortran.dg/graphite/graphite.exp: Use
2abae5f1
SP
6172 DEFAULT_GRAPHITE_FLAGS.
6173
45489e99 6174 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
2abae5f1
SP
6175
61762008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6177
6178 * graphite.c (scan_tree_for_params): Do not assert any more if
6179 MULT_EXPR parameter is negative.
6180
45489e99 6181 * gfortran.dg/graphite/scop-1.f: New.
2abae5f1 6182
45489e99 6183 * gfortran.dg/graphite/graphite.exp: New.
2abae5f1 6184
45489e99 6185 * gcc.dg/graphite/scop-15.c: New.
2abae5f1
SP
6186
61872008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6188
6189 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6190
61912008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6192
6193 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6194 graphite_swap_loops.
6195 (graphite_trans_bb_move_loop): New.
6196 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6197 (graphite_trans_bb_block): New.
6198 (graphite_trans_loop_block): New.
6199 (graphite_trans_scop_swap_1and2): Rename from
6200 graphite_trans_swap_1and2.
6201 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6202 (graphite_trans_scop_block): New.
6203 (graphite_apply_transformations): Rename from
6204 graphite_transformations.
6205
45489e99 6206 * gcc.dg/graphite/scop-matmult.c: New.
2abae5f1
SP
6207
62082008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6209
6210 * graphite.c (gbb_compare): New.
6211 (graphite_sort_gbbs): New.
6212 (gbb_can_be_ignored): New.
6213 (scop_remove_ignoreable_gbbs): New.
6214 (graphite_transformations): Cleanup and add
6215 scop_remove_ignoreable_gbbs.
6216 * lambda.h (lambda_vector_compare): New.
6217
62182008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6219
6220 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6221 (graphite_swap_loops): int -> unsigned
6222 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6223 (graphite_transformations): New.
6224 (graphite_transform_loops): Move to graphite_transformations.
6225 * graphite.h (gbb_nb_loops): Return unsigned.
6226
62272008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6228
6229 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6230 the domain matrix. This makes scop-0.c work again.
6231
62322008-06-20 Richard Guenther <rguenther@suse.de>
6233
6234 * graphite.h: Adjust copyright to GPLv3.
6235 * graphite.c: Likewise.
6236 (stmt_simple_memref_for_scop_p): Split out from ...
6237 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6238 and simplify.
6239 (get_bb_type): Optimize.
6240 (is_pred): Remove.
6241 (is_bb_addable): Fix memleak, replace is_pred call with
6242 single_pred.
6243 (build_scops): Use current_loops.
6244 (param_index): Fix memleak.
6245
62462008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6247
6248 * graphite.c: Fix formatting.
6249
62502008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6251
6252 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6253 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6254 (create_var_name, save_var_name): Newly defined functions.
6255 (initialize_cloog_names): Part of the code factored out to
6256 save_var_name.
6257 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6258 in clast_reduction statement.
6259 (graphite_create_new_loop): Now takes a new parameter
6260 for outer_loop.
6261 (translate_clast): Now also takes the context_loop and bb_exit
6262 parameters. Rewritten the code so that it creates a gimple code
6263 inside the given context.
6264 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6265 remove_cond_expr, disconnect_cond_expr,
6266 disconnect_virtual_phi_nodes): Newly defined functions.
6267 * graphite.h (struct scop): added old_ivs vector.
6268 SCOP_OLDIVS: New macro.
6269
62702008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6271
6272 * cfgloopmanip.c: Add missing function comments, fix formatting.
6273
62742008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6275
6276 * cfgloopmanip.c (update_dominators_in_loop): Defined.
6277 (create_empty_loop_on_edge): Defined.
6278 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
6279 instead of void.
6280 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
6281 (update_dominators_in_loop): Declared as extern
6282 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
6283
62842008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
6285
6286 * graphite.c (print_graphite_bb): Allow changing number of loops
6287 in SCoP domain.
6288 (initialize_cloog_names): Allow changing number of loops.
6289 (build_cloog_prog): Simplify.
6290 (find_transform): Enable cloog option --strides.
6291 (graphite_swap_loops): New.
6292 (graphite_strip_mine_loop): New.
6293 (graphite_trans_swap_1and2): New.
6294 (graphite_trans_strip): New.
6295 (graphite_transform_loops): Add graphite_trans_strip.
6296 * graphite.h (scop_max_loop_depth): New.
6297
62982008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6299
6300 * graphite.c (build_scop_iteration_domain): Remove forgotten
6301 line. (Fixes compile)
6302
63032008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6304
6305 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
6306 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
6307 (build_bb_loops): New.
6308 (graphite_transform_loops): Add build_bb_loops.
6309 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
6310 numbers.
6311 * graphite.h (graphite_bb): Add loops.
6312 (gbb_nb_loops): New.
6313 (gbb_loop_at_index): New.
6314 (gbb_loop_index): New.
6315 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
6316 using nb_params_in_scop.
6317
63182008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6319
6320 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
6321 (build_scop_canonical_schedules): Build minimized schedule.
6322 (schedule_to_scattering): Adapt to minimized schedule.
6323 * graphite.h (graphite_bb): Add/Update descriptions.
6324
63252008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
6326 Tobias Grosser <grosser@fim.uni-passau.de>
6327
6328 * graphite.c (print_graphite_bb): Add condition printing.
6329 (dump_value): New.
6330 (dump_gbb_conditions): New.
6331 (build_scop_conditions_1): New.
6332 (build_scop_conditions): New.
6333 * graphite.h (graphite_bb): Add conditions.
6334
63352008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6336
6337 * graphite.c (print_graphite_bb):
6338 (free_graphite_bb): New.
6339 (free_scop): Free bbs.
6340 (get_bb_type): Free doms.
6341 (build_scop_context): Free context matrix.
6342 (build_loop_iteration_domains): Remove unused code.
6343 (build_cloog_prog): Free scattering function and blocklist.
6344 (find_transform): Free options.
6345
63462008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
6347
6348 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
6349 Remove unnecessery cloog data structures. Make a copy of the domain
6350 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
6351 unnecessary cloog data structures. Fix memory leaks. Remove insert
6352 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
6353 used.
6354 (build_scop_iteration_domain): Remove unnecessary cloog
6355 data structures. Fix memory leaks.
6356 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
6357 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
6358
63592008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6360
6361 * graphite.c (find_scop_params): Remove initialize_cloog_names.
6362
63632008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6364
6365 * graphite.c (end_scop): Style fix.
6366 (schedule_to_scattering): Style and comment fix.
6367
63682008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6369 * graphite.c (print_graphite_bb): Fix definiton of
6370 schedule_to_scattering.
6371 (initialize_cloog_names): Change nb_scattdims to max loop
6372 depth in SCoP.
6373 (schedule_to_scattering): Take parameter for number of scattering
6374 dimensions.
6375 (build_cloog_prog): Only build as much scattering dimensions as
6376 necessary.
6377
63782008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6379
6380 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
6381 in polyhedron/aermod.f90.
6382
63832008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
6384 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6385 Harsha Jagasia <harsha.jagasia@amd.com>
6386
6387 * graphite.c (is_bb_addable): Fix segfault.
6388
63892008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
6390
6391 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
6392 with multiple exits and conditional handling in edge cases.
6393 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
6394
45489e99 6395 * gcc.dg/graphite/scop-14.c: New.
2abae5f1
SP
6396
63972008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
6398 Adrien Eliche <aeliche@isty.uvsq.fr>
6399
6400 * graphite.c (is_bb_addable): Add more comments and enhance
6401 readablity of the source code. Fix memory leak.
6402 (is_loop_exit): Fix memory leak.
6403
64042008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6405
6406 * graphite.c (first_loop_in_scop): Deleted.
6407 (setup_cloog_loop): Only walk the loop chain for inner loops.
6408 (build_scop_iteration_domain): Execute setup_cloog_loop for
6409 all loops in the first layer.
6410
64112008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6412
6413 * graphite.c (scan_tree_for_params): Change the way params are
6414 added to be indepenent of the number of loops.
6415 (setup_cloog_loop): Revert to short matrix format. Fix parameter
6416 handling.
6417 (build_cloog_prog): Revert to short matrix format.
6418
64192008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6420 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6421
6422 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
6423 warning.
6424
64252008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6426
6427 * graphite.c (nb_data_refs_in_scop): New.
6428 (graphite_transform_loops): Print more stats: number of
6429 loops, basic blocks and data references per scop.
6430
64312008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6432 Jan Sjodin <jan.sjodin@amd.com>
6433
6434 * graphite.c (loop_affine_expr, idx_record_params,
6435 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
6436 instead of instantiate_parameters.
6437
64382008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6439
6440 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
6441 add support for parameters, add STATIC_SCHEDULE at the right places,
6442 cleanup.
6443
64442008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6445
6446 * graphite.c (build_scop_loop_nests): Only add the loops, that
6447 are contained completely in the SCoP.
6448 (build_cloog_prog): Disable scattering, until schedule_to_scattering
6449 and the domains are fixed.
6450 (build_scop_canonical_schedules): Add support for bbs not contained
6451 in any SCoP.
6452
64532008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6454
6455 * graphite.h (scop_contains_loop): Update comments to match
6456 the actual behavior.
6457 (scop_contains_loop): New.
6458 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
6459
64602008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6461
6462 * graphite.c (get_bb_type): On function body, i.e. loop_0,
6463 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
6464 as GBB_COND_HEADER.
6465
64662008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6467 Tobias Grosser <grosser@fim.uni-passau.de>
6468
6469 * graphite.c (graphite_transform_loops): Early return when
6470 there are no loops in the function.
6471
64722008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6473 Jan Sjodin <jan.sjodin@amd.com>
6474
6475 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
6476 offset of the last loop.
6477 (setup_cloog_loop): Copy the entire outer constraint matrix.
6478
64792008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6480 Jan Sjodin <jan.sjodin@amd.com>
6481
6482 * graphite.c (stmt_in_scop_p, function_parameter_p,
6483 invariant_in_scop_p): Removed.
6484 (scan_tree_for_params): Can be used with no constraint
6485 matrix for gathering parameters.
6486 (idx_record_params): Don't use idx_record_param, instead use
6487 scan_tree_for_params.
6488 (find_scop_parameters): Same.
6489 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
6490 Fix the size of loop domains.
6491 (schedule_to_scattering): Exit when the outer loop is not in scop.
6492 (find_transform): Enable build_cloog_prog.
6493
64942008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6495 Jan Sjodin <jan.sjodin@amd.com>
6496
6497 * graphite.c (schedule_to_scattering): Make scattering domains
6498 uniformly of the same size, as required by CLooG 0.14.0 and before.
6499
65002008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6501 Jan Sjodin <jan.sjodin@amd.com>
6502
6503 * graphite.c (schedule_to_scattering): Rewrite, correct the
6504 translation of the scheduling function to scattering.
6505 (build_cloog_prog): Call schedule_to_scattering only once.
6506 * graphite.h (scop_loop_index): Do not fail for loops not
6507 in the scop: return -1.
6508
65092008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
6510
6511 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
6512 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
6513 (setup_cloog_loop): Export GBB_DOMAIN.
6514 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
6515 able to rebuild the original control flow.
6516 * graphite.h (graphite_bb): Add domain field and access macro.
6517 (GBB_DOMAIN): New.
6518
65192008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6520
6521 * graphite.c (debug_gbb): New.
6522 (print_scop, build_graphite_bb): Use SCOP_BBS.
6523 (build_scop_bbs): Reimplemented.
6524 (dfs_bb_in_scop_p): Removed.
6525 (build_scop_loop_nests): Reorder loops inserted in
6526 SCOP_LOOP_NEST: outer loops should come first.
6527 (build_scop_canonical_schedules): Reinitialize at zero
6528 the components of the SCOP_STATIC_SCHEDULE for the loops
6529 that have already been parsed.
6530
6531 * graphite.h (debug_gbb): Declared.
6532
65332008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6534 Jan Sjodin <jan.sjodin@amd.com>
6535
6536 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
6537 (graphite_loop_to_gcc_loop): Removed.
6538 (remove_all_edges): New.
6539 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
6540 (gloog): Remove useless code.
6541
65422008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6543
6544 * graphite.c (get_bb_type): Reworked. We distinguish between
6545 loops with one or multiple exits.
6546 (is_loop_exit): New.
6547 (is_pred): New.
6548 (is_bb_addable): Rework condition handling, now support for case
6549 case statements and loops with multiple exits.
6550
45489e99
SP
6551 * gcc.dg/graphite/scop-11.c: New.
6552 * gcc.dg/graphite/scop-12.c: New.
6553 * gcc.dg/graphite/scop-13.c: New.
2abae5f1
SP
6554
65552008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6556
6557 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
6558 we have too many colors.
6559
65602008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
6561
6562 * doc/invoke.texi (-ftree-loop-fusion): Document.
6563 * tree-pass.h (pass_loop_fusion): Declared.
6564 * tree-loop-fusion.c: New.
6565 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
6566 * tree-data-ref.c (find_data_references_in_loop): Make extern.
6567 * tree-data-ref.h (find_data_references_in_loop): Declared.
6568 * common.opt (ftree-loop-fusion): Declared.
6569 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
6570
65712008-05-21 Sebastian Pop <sebastian.pop@amd.com>
6572
6573 * graphite.c (build_access_matrix): Fix typo from the merge.
6574
65752008-05-20 Sebastian Pop <sebastian.pop@amd.com>
6576
6577 * Merge from mainline (130800:135673).
6578
65792008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6580
6581 * graphite.c (end_scop): The exit of the scop is not part of the scop.
6582 Update dominators after splitting.
6583
65842008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6585
6586 * graphite.c (is_bb_addable): Return the harmful statement.
6587 Factor up some code.
6588 (end_scop): New. Splits end of scope bbs on a harmful statement.
6589 (build_scops_1): Call end_scop.
6590
65912008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6592
6593 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
6594 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
6595 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
6596 build_scops_1): Removed.
6597 (build_scops_2): Renamed build_scops_1.
6598
65992008-05-06 Sebastian Pop <sebastian.pop@amd.com>
6600
6601 * graphite.c: Fix formatting.
6602
66032008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6604
6605 * graphite.c (get_bb_type): New.
6606 (move_scops): New.
6607 (build_scops_2): New.
6608 (is_bb_addable): New.
6609 (build_scops): Switch the scop detection.
6610 (build_scop_bbs): Add entry bb to scop.
6611 * graphite.h (struct scop): Update comment.
6612
66132008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6614
6615 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
6616 more colors.
6617
66182008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6619
45489e99
SP
6620 * gcc.dg/graphite/scop-1.c: Update.
6621 * gcc.dg/graphite/scop-2.c: Update.
6622 * gcc.dg/graphite/scop-4.c: Update.
6623 * gcc.dg/graphite/scop-5.c: Add.
6624 * gcc.dg/graphite/scop-6.c: Add.
2abae5f1
SP
6625
66262008-05-06 Sebastian Pop <sebastian.pop@amd.com>
6627
45489e99
SP
6628 * gcc.dg/graphite/scop-0.c: Add.
6629 * gcc.dg/graphite/scop-7.c: Add.
6630 * gcc.dg/graphite/scop-8.c: Add.
6631 * gcc.dg/graphite/scop-9.c: Add.
6632 * gcc.dg/graphite/scop-10.c: Add.
2abae5f1
SP
6633
66342008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6635
6636 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
6637 Check affine expressions depending on the outermost loop
6638 instead of a scop.
6639 (stmt_simple_for_scop_p): Same.
6640 (harmfule_stmt_in_scop): Same.
6641
66422008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
6643
6644 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
6645 mark entry and exit, that are not part of the SCoP and update HTML
6646 formatting.
6647
66482008-04-25 Sebastian Pop <sebastian.pop@amd.com>
6649
6650 * graphite.c (basic_block_simple_for_scop_p): Renamed
6651 harmful_stmt_in_bb.
6652 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
6653 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
6654 (all_preds_visited_p, all_succs_visited_p,
6655 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
6656 scop_end_loop): New.
6657 (build_scops): Do not use dfs_enumerate_from.
6658
45489e99 6659 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
2abae5f1
SP
6660
66612008-04-23 Sebastian Pop <sebastian.pop@amd.com>
6662
6663 * graphite.c: Add comments to functions that are missing a
6664 description.
6665 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
6666
66672008-04-23 Sebastian Pop <sebastian.pop@amd.com>
6668
6669 * graphite.c (nb_params_in_scop): Moved...
6670 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
6671 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
6672 (clast_to_gcc_expression): Reduce column size to less than 80.
6673 (graphite_create_iv): Return the new name of the IV.
6674 (find_transform): Set options->esp and options->cpp.
6675 (gloog): Comment out the invalidation of the old loop code.
6676 (initialize_dependence_polyhedron): Replace scop_nb_params with
6677 nb_params_in_scop.
6678
6679 * graphite.h (nb_params_in_scop): ... here.
6680 (scop_nb_params): Removed.
6681 (loop_domain_dim): Return something even when the loop was not
6682 found in the hash table: avoid ICEing on all the graphite.exp
6683 testcases.
6684
66852008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6686
6687 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
6688
6689 * graphite.c (build_scop_dynamic_schedules): Schedule is built
6690 according to nesting level.
6691 (find_scop_parameters): Call instantiate_parameters.
6692 (scan_tree_for_params): Extend it to handle general affine bounds.
6693 Inner loop bound can depend on outer loop induction variable.
6694 (setup_cloog_loop): tmp variable is allocated on stack. Call
6695 instantiate_parameters with respect to outermost_loop_in_scop.
6696 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
6697 graphite.h.
6698 (create_empty_loop): Function loopify should be given edge
6699 probability, instead of edge frequency. Dominance relation from
6700 switch_bb to loop_header.
6701 (clast_to_gcc_expression): Added handling of clast_reduction node.
6702 (gloog): New functionality for removing old loop.
6703 (test_dependence): Factored out from build_rdg_all_levels.
6704 (build_rdg_all_levels): Dependence testing factored out to
6705 test_dependence function.
6706
6707 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
6708 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
6709 from graphite.c
6710
67112008-04-07 Sebastian Pop <sebastian.pop@amd.com>
6712
6713 * graphite.c (free_scop, param_index, initialize_cloog_names,
6714 nb_params_in_scop): Use name_tree map instead of just a tree
6715 for keeping track of the variable name associated to that tree.
6716 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
6717 clast_to_gcc_expression, graphite_create_iv,
6718 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
6719 graphite_stmt_to_gcc_stmt): New.
6720 (gloog): Call these.
6721 * graphite.h (struct name_tree): New.
6722 (struct scop): Use name_tree instead of tree for params.
6723 Store a vector of name_tree for new_ivs.
6724 (SCOP_NEWIVS): New.
6725 (scop_nb_params): Use name_tree instead of tree.
6726
67272008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
6728 Sebastian Pop <sebastian.pop@amd.com>
6729
6730 * tree-bounds.c: New.
6731 * tree-bounds.h: New.
6732 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
6733 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
6734 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
6735 flag_mudflap.
6736 * gcc.c: Same.
6737 * toplev.c: Same.
6738 * c-cppbuiltin.c: Same.
6739 * c-pragma.c: Same.
6740 * common.opt: Same.
6741 * varasm.c: Same.
6742 * tree-outof-ssa.c: Same.
6743 * c-common.c: Same.
6744 * Makefile.in: Same.
6745
67462008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
6747 Sebastian Pop <sebastian.pop@amd.com>
6748
6749 * tree-loop-distribution.c (remaining_stmts,
6750 upstream_mem_writes): Removed static variables.
6751 (copy_loop_before, create_bb_after_loop,
6752 mark_nodes_having_upstream_mem_writes, free_rdg_components,
6753 rdg_build_components, rdg_build_partitions,
6754 dump_rdg_partitions): Extern.
6755 (generate_loops_for_partition, generate_code_for_partition): Do not
6756 return a bool.
6757 (already_processed_vertex_p, predecessor_has_mem_write,
6758 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
6759 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
6760 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
6761 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
6762 Pass remaining_stmts and upstream_mem_writes as parameters.
6763 (rdg_component): Moved...
6764 (build_rdg_partition_for_component): Do not aggregate components when
6765 flag_streamize_loops is set.
6766 (gen_sequential_loops): New.
6767 (ldist_gen): Call gen_sequential_loops.
6768
6769 * tree-pass.h (pass_loop_streamization): Declared.
6770
6771 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
6772 basic blocks when loops structures exist.
6773
6774 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
6775
6776 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
6777
6778 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
6779 eliminate_local_variables_stmt, eliminate_local_variables,
6780 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
6781 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
6782 of code delimited by two edges in the CFG.
6783 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
6784 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
6785 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
6786 the case of parallelisation of reductions.
6787 (create_loop_fn): Extern.
6788 (create_omp_parallel_region): New.
6789
6790 * tree-data-ref.c (dump_data_dependence_relation): Don't call
6791 dump_data_reference for printing dra and drb.
6792 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
6793 RDGE_RELATION.
6794 (build_rdg): Don't call free_dependence_relations for the moment, as
6795 we attach dependence relations on each edge of the RDG.
6796 To be fixed later.
6797
6798 * tree-data-ref.h (rdg_component): ...here.
6799 (struct rdg_edge): New field ddr_p relation.
6800 (RDGE_RELATION): New.
6801 (create_bb_after_loop, copy_loop_before,
6802 mark_nodes_having_upstream_mem_writes, rdg_build_components,
6803 rdg_build_partitions, dump_rdg_partitions,
6804 free_rdg_components): Declared.
6805
6806 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
6807 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
6808
6809 * tree-loop-streamization.c: New.
6810
6811 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
6812 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
6813
6814 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
6815
6816 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
6817
6818 * passes.c: Schedule pass_loop_streamization.
6819
68202008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
6821
6822 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
6823 update comment.
6824
68252008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
6826
6827 * graphite.c (dot_all_scops): Update formatting.
6828 Bbs can now be part of more than one SCoP.
6829
68302008-03-04 Sebastian Pop <sebastian.pop@amd.com>
6831
6832 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
6833 malloc problems.
6834 (loop_domain_dim): Check for unregistered toplev SCOP loop.
6835 * graphite.h (loop_to_cloog_loop): New.
6836
68372008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6838
6839 * graphite.c (loop_domain_dim, ref_nb_loops,
6840 loop_iteration_vector_dim): New.
6841 (build_access_matrix_with_af, build_access_matrix,
6842 initialize_dependence_polyhedron): Fixed for new matrix layout.
6843 No longer assume that all iteration domains are of the same
6844 dimensionality.
6845
68462008-03-02 Sebastian Pop <sebastian.pop@amd.com>
6847
6848 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
6849 defined in a loop at depth 0 is invariant.
6850 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
6851 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
6852 be called at loop depth 0.
6853
6854 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
6855 a parameter.
6856 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
6857 (down_open_scop): Removed.
6858 (loop_in_scop_p): Redefined.
6859 (scop_affine_expr): New argument: scop.
6860 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
6861 a harmful statement ending a scop.
6862 (basic_block_simple_for_scop_p): New argument: scop.
6863 (get_loop_start): Removed.
6864 (new_scop): Initialize SCOP_LOOPS.
6865 (free_scop): Free SCOP_LOOPS.
6866 (succs_at_same_depth, preds_at_same_depth): New.
6867 (end_scop): Test the validity of a scop.
6868 (add_dominators_to_open_scops): New.
6869 (test_for_scop_bound): Call add_dominators_to_open_scops.
6870 Add cases for opening and closing multiple scops.
6871 (build_scops, build_scop_bbs): Iterate over basic blocks in
6872 depth first order.
6873 (build_graphite_bb): Pass scop directly.
6874 (dfs_bb_in_scop_p): New.
6875 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
6876 several times.
6877 (nb_loops_around_gb): Use loop_in_scop_p.
6878 (schedule_to_scattering): Disabled for the moment the code computing
6879 the "textual order for outer loop".
6880
6881 * graphite.h (struct scop): New field loops.
6882 (SCOP_LOOPS): New.
6883 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
6884
45489e99 6885 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
2abae5f1
SP
6886
68872008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
6888 Sebastian Pop <sebastian.pop@amd.com>
6889
6890 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
6891 * common.opt (fstreamize-loops): New.
6892 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
6893 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
6894 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
6895 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
6896
68972008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6898
6899 * tree-data-ref.c (build_empty_rdg): New.
6900 (build_rdg): Use it.
6901 * tree-data-ref.h (build_empty_rdg): Declared.
6902 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
6903 (find_vertex_for_stmt): Removed.
6904 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
6905
69062008-02-21 Sebastian Pop <sebastian.pop@amd.com>
6907
6908 * tree-loop-distribution.c (generate_builtin): After cancelling the
6909 loop tree, also delete basic blocks.
6910 (rdg_flag_uses): Stop recursion when a vertex has already been
6911 processed.
6912
69132008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6914
6915 * graphite.c (build_scop_alpha): Removed.
6916 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
6917 and dump_dependence_graph to avoid compiler warnings.
6918
69192008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6920
6921 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
6922 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
6923 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6924 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
6925 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
6926 (initialize_dependence_polyhedron, find_vertex_for_stmt,
6927 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6928 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
6929 dump_dependence_graph): New.
6930 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
6931 (GBB_ALPHA): New.
6932 (struct scop): New field loop2cloog_loop.
6933 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
6934 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
6935
69362008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6937
6938 * graphite.c (build_graphite_bb): Fix initialization
6939 of the graphite basic block.
6940
69412008-02-05 Sebastian Pop <sebastian.pop@amd.com>
6942
6943 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
6944 loop domain matrix. Pass in the number of loops contained in the
6945 constraint matrix.
6946 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
6947 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
6948 loops that are not surrounding the current loop are not represented
6949 in the domain constraint matrix.
6950 (build_scop_iteration_domain): Initial domain constraint matrix
6951 contains only the eq/ineq, cst, and scop parameters columns.
6952
69532008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6954
6955 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
6956 (print_graphite_bb): Print scattering.
6957
69582008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6959
6960 * graphite.c (initialize_cloog_names): Initialize names of
6961 scattering variables.
6962
69632009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6964
6965 * graphite.c (dot_all_scops_1): Disable debug output while
6966 printing graph.
6967
69682008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6969
6970 * graphite.c (find_transform): Change cloog output language to C.
6971
69722008-01-27 Sebastian Pop <sebastian.pop@amd.com>
6973
6974 * tree-loop-distribution.c (generate_memset_zero,
6975 generate_builtin, generate_code_for_partition,
6976 rdg_flag_all_uses): New.
6977 (rdg_flag_uses): Gather in the same partition the statements defining
6978 the VUSES of the current statement.
6979 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
6980 Gather in the same partition not only the stores to the same memory
6981 access, but also the reads.
6982 (ldist_generate_loops): Renamed ldist_gen.
6983
69842008-01-24 Sebastian Pop <sebastian.pop@amd.com>
6985 Tobias Grosser <grosser@fmi.uni-passau.de>
6986
6987 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
6988 next pointer, don't use the inner pointer.
6989
69902008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
6991
6992 * graphite.c (dot_all_scops, dot_all_scops_1): New.
6993 (find_transform): Call dot_all_1.
6994 * graphite.h (dot_all_scops): Declared.
6995
69962007-12-14 Sebastian Pop <sebastian.pop@amd.com>
6997
6998 * tree-loop-distribution.c: Fix apsi.f ICE.
6999 (create_bb_after_loop): New.
7000 (generate_loops_for_partition): Use it.
45489e99 7001 * gfortran.dg/ldist-1.f90: New.
2abae5f1
SP
7002
7003 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7004 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7005
70062007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7007
7008 * graphite.c (find_transform): Dump cloog program sent to cloog.
7009
70102007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7011
7012 * graphite.c (initialize_cloog_names): Initialize cloog
7013 iterator names.
7014
70152007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7016
7017 * graphite.c (build_scop_context): Fix typo, for the matrix
7018 format: insert '0 >= 0' instead of '-1 >= 0'.
7019
70202007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7021
7022 * Fix merge problems.
7023
70242007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7025
7026 * graphite.c (setup_cloog_loop): Fix typo.
7027
70282007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7029
7030 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7031 * tree-loop-distribution.c: Reimplemented.
7032 * tree-pass.h (pass_loop_distribution): New.
7033 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7034 print_loops.
7035 * graphds.h (struct graph): New field indexes.
7036 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7037
7038 * tree-vect-analyze.c: Remove declaration of static functions when not
7039 needed.
7040 * tree-vectorizer.c: Same.
7041 (rename_variables_in_loop): Now extern.
7042 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7043 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7044 calling redirect_edge_and_branch_force.
7045
7046 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7047
7048 * tree-data-ref.c: Don't include tree-chrec.h.
7049 (debug_data_dependence_relations): New.
7050 (dump_data_dependence_relation): Call dump_data_reference on data refs
7051 in the relation.
7052 (same_access_functions): Moved...
7053 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7054 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7055 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7056 struct rdg_vertex_info, ): New.
7057 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7058 at DDR_REVERSED_P.
7059 (create_rdg_vertices): Initialize the htab of graph->indexes.
7060 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7061 (stmts_from_loop): Don't save LABEL_EXPR.
7062 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7063 hash_stmt_vertex_del): New.
7064 (build_rdg): Initialize rdg->indexes.
7065 (free_rdg, stores_from_loop, ref_base_address,
7066 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7067 have_similar_memory_accesses_1, ref_base_address_1,
7068 remove_similar_memory_refs): New.
7069
7070 * tree-data-ref.h: Include tree-chrec.h.
7071 (debug_data_dependence_relations): Declared.
7072 (same_access_functions): ...here. Now static inline.
7073 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7074 ddr_dependence_level): New.
7075 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7076 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7077 RDG_MEM_READS_STMT): New.
7078 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7079 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7080 rdg_vertex_for_stmt): Declared.
7081 (struct rdg_edge): New field level.
7082 (RDGE_LEVEL, free_rdg): New.
7083 (stores_from_loop, remove_similar_memory_refs,
7084 rdg_defs_used_in_other_loops_p,
7085 have_similar_memory_accesses): Declared.
7086 (rdg_has_similar_memory_accesses): New.
7087
7088 * lambda.h (dependence_level): New.
7089 * common.opt (ftree-loop-distribution): New.
7090 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7091 (print_loop_ir): Renamed print_loops.
7092 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7093 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7094 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7095 (tree-loop-distribution.o): Added.
7096 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7097 (mark_virtual_ops_in_bb): New.
7098 (print_loops_bb, debug_loop_num, debug_loop): New.
7099 * passes.c: Scheduled pass_loop_distribution.
7100
71012007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7102
7103 * graphite.c (scan_tree_for_params): Correct the number of columns
7104 for polylib format.
7105 (nb_flat_iterator): New.
7106 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7107 (build_scop_iteration_domain): Correct the number of columns for
7108 polylib format.
7109
71102007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7111
7112 * Merge from mainline (129697:130800).
7113
71142007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7115
7116 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7117 dominated by SCoP's exit.
7118 (graphite_transform_loops): Compute post dominators.
7119
71202007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7121
7122 * Merge from mainline (127169:129697).
7123
71242007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7125
7126 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7127 parameter for the basic block that contains the expression. Use
7128 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7129 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7130 the expression.
7131 * graphite.h (gbb_loop): New.
7132 (GBB_LOOP): Removed.
7133
71342007-08-03 Sebastian Pop <sebpop@gmail.com>
7135
7136 * Makefile.in: Fix merge problem.
7137
71382007-08-03 Sebastian Pop <sebpop@gmail.com>
7139
7140 * Merge from mainline (125309:127169).
7141 * tree-loop-distribution.c: Disabled.
7142
71432007-06-05 Sebastian Pop <sebpop@gmail.com>
7144
7145 * Merge from mainline (r123693:125309).
7146
71472007-05-30 Sebastian Pop <sebpop@gmail.com>
7148
7149 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7150 correct_modify_p
7151 (correct_modify_p, check_statements, number_of_lvalue_uses,
7152 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7153 instead of MODIFY_EXPR.
7154 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7155 and push new edges.
7156
71572007-05-24 Sebastian Pop <sebpop@gmail.com>
7158
7159 * tree-loop-distribution.c (struct rdg): Replace arrays by
7160 VECs for edges and vertices.
7161 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7162 (RDGV_NB_PARTITIONS): New.
7163 (PRDG_NBV, PRDG_NBE): Removed.
7164 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7165 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7166 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7167
71682007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7169 Sebastian Pop <sebpop@gmail.com>
7170
7171 * doc/invoke.texi (-ftree-loop-distribution): Document.
7172 * tree-loop-distribution.c: New file.
7173 * tree-pass.h (pass_loop_distribution): Declared.
7174 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7175 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7176 and set reversed_p.
7177 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7178 (DDR_REVERSED_P): New.
7179 * common.opt (-ftree-loop-distribution): New.
7180 * tree-flow.h (distribute_loops): Declared.
7181 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7182 * passes.c (init_optimization_passes): Schedule loop distribution.
7183
71842007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7185
7186 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7187 (print_scop): Don't print when scop is NULL.
7188 (build_scop_context, find_transform): Don't output to stderr.
7189
71902007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7191
7192 * tree-data-ref.c: Don't include graphite.h.
7193 Comment out the code for printing data reference's scop.
7194 (build_access_matrix_with_af): Moved...
7195 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7196 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7197 (print_graphite_bb): Print basic block's schedule.
7198 (print_scop): Don't print the schedule, call cloog's pretty printer.
7199 (bb_in_scop_p): A basic block is in a scop only if it is both
7200 dominated and postdominated by the scop's entry and exit basic blocks.
7201 (function_parameter_p): New.
7202 (invariant_in_scop_p): Use function_parameter_p.
7203 (new_scop, save_scop): New.
7204 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7205 save_scop.
7206 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7207 (loop_in_scop_p): New.
7208 (scop_record_loop): Use loop_in_scop_p.
7209 (build_scop_domain): Renamed build_scop_iteration_domain.
7210 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7211 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7212 setup_cloog_loop, dot_scop_1, dot_scop): New.
7213 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7214 (struct scop): Add a pointer to cloog's representation of a program.
7215
72162007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7217
7218 * doc/invoke.texi (-ftree-check-verbose): Renamed
7219 -ftree-checks-verbose.
7220 * common.opt (flag_tree_check_verbose): Renamed
7221 flag_tree_checks_verbose.
7222 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7223
72242007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7225
7226 * configure: Regenerated.
7227 * config.in: Regenerated.
7228 * tree-ssa-loop.c (graphite_transforms): Execute
7229 graphite_transform_loops only when HAVE_cloog.
7230 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7231 * graphite.c: Include polylibgmp.h and cloog.h.
7232 (graphite_transform_loops): Removed loops parameter.
7233 * tree-flow.h (graphite_transform_loops): Update declaration.
7234 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7235 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7236 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7237 (OBJS-common): Remove dependence on graphite.o.
7238 (BACKEND): Depend on @GRAPHITE@.
7239
72402007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7241
7242 * doc/invoke.texi (-ftree-check-verbose): Documented.
45489e99
SP
7243 * gcc.dg/tree-checker/tree-checks-1.c: New.
7244 * gcc.dg/tree-checker/tree-checks-2.c: New.
7245 * gcc.dg/tree-checker/tree-checks-3.c: New.
7246 * gcc.dg/tree-checker/tree-checks-4.c: New.
7247 * gcc.dg/tree-checker/tree-checks.exp: New.
7248 * gcc.dg/tree-checker/condates.crp: New.
2abae5f1
SP
7249 * common.opt (ftree-checks-verbose): New.
7250 * tree-check.c (tree_check_warning): Move extra stderr output
7251 under control of flag_tree_check_verbose.
7252
72532007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7254
7255 * tree-match.c: Fix comments formatting.
7256 * tree-match.h: Fix comments formatting.
7257 * tree-check.c: Fix comments formatting.
7258 (tree_check_init): Restructure.
7259
72602007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7261
7262 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7263
72642007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7265
7266 * Merge from mainline (r120733:123693).
7267
72682007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7269
7270 * condate.y: New file.
7271 * tree-match.h (struct patt_info_s): New field sign.
7272 (struct condate_s): New field msg.
7273 (normalize_condate, name_condate, add_condate): New.
7274 (conds[], condate_parse): Made extern.
7275 * tree-check.c (tree_check_warning): First arg changed to cond;
7276 warning reformatted.
7277 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
7278 (tree_scan): New.
7279 (tree_check): Process trivial condates.
7280 (read_delimited_string): Removed.
7281 (print_cond): Print name and msg.
7282 (conds[]): Made extern.
7283 (parse_tree_check_file_once): Rewritten to use the parser in
7284 condate.y.
7285 Processing of option --tree_check_string moved to tree_scan().
7286 * Makefile.in: Added condate.y
7287
72882007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
7289
7290 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
7291 Use VECs instead of varrays.
7292 * diagnostic.h (lazy_dump_generic_node): Update declaration.
7293 * Makefile.in (pretty-print.o): Depend on vec.h.
7294 * pretty-print.c: Include tree.h and vec.h.
7295 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
7296 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
7297 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
7298 pp_free_list): Use VECs instead of varrays.
7299 * pretty-print.h: Do not include varray.h.
7300 (struct tree_chunk_s): Declaration moved before its use.
7301 (output_buffer): Rename varray field to chunks.
7302 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
7303 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
7304 save_global_holes): Use VECs instead of varrays.
7305 * tree-match.h: Declare VECs of cfg_node, and hole_p.
7306 * tree-check.c (scan_cfg_stmts, push_node,
7307 print_matching_stmt): Removed.
7308 (tree_check_instance, push_global_holes_if_new, tree_check,
7309 execute_tree_check): Use VECs instead of varrays.
7310 (gate_tree_check): Don't execute the CFG check when basic_block_info
7311 is not available.
7312
73132007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7314
7315 * Merge from mainline (r115016:120733).
7316
73172007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7318
7319 * Merge from mainline (r117632:117661).
7320
73212007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7322
7323 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
7324 * tree-pass.h (TDF_DEBUG, debug_p): New.
7325 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
7326 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
7327 get_loop_exit_condition, analyze_evolution_in_loop,
7328 analyze_initial_condition, analyze_scalar_evolution,
7329 instantiate_parameters, number_of_latch_executions): Use debug_p.
7330 * tree-chrec.c (chrec_apply): Use debug_p.
7331 * tree-data-ref.c: Include graphite.h.
7332 (dump_data_reference): Print also the access matrix.
7333 (analyze_array, analyze_indirect_ref, init_data_ref,
7334 analyze_offset_expr, address_analysis, object_analysis,
7335 create_data_ref, finalize_ddr_dependent,
7336 non_affine_dependence_relation, analyze_ziv_subscript,
7337 analyze_siv_subscript_cst_affine,
7338 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
7339 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
7340 analyze_miv_subscript, analyze_overlapping_iterations,
7341 build_classic_dist_vector, subscript_dependence_tester,
7342 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
7343 (build_access_matrix_with_af): No longer static.
7344 * tree-data-ref.h (scop_p): ... declaration here.
7345 (data_reference.scop): New field.
7346 (DR_SCOP, DR_ACCESS_MATRIX): New.
7347 (build_access_matrix_with_af, dr_num_subscripts): Declared.
7348 * graphite.c (print_graphite_bb): Call dump_data_references.
7349 (print_scop): Use scop_nb_loops and scop_dim_domain.
7350 (test_for_scop_bound): Use debug_p.
7351 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
7352 scop_nb_params.
7353 (scop_loop_index): Moved...
7354 (scop_record_loop): New.
7355 (build_scop_loop_nests): Use scop_record_loop.
7356 (build_scop_domain): Use scop_dim_domain.
7357 (build_access_matrix): Implemented.
7358 (build_scop_canonical_schedules): Use scop_nb_loops.
7359 (build_graphite_bb): Initialize GBB_SCOP.
7360 * graphite.h (scop_p): Moved...
7361 (graphite_bb.scop): New field.
7362 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
7363 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
7364 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
7365 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
7366 scop_loop_index): New.
7367 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
7368
73692007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
7370
7371 * Merge from mainline (r117661:120450).
7372
73732006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
7374
7375 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
7376 at the first declaration outside the varying loop, instantiate as
7377 far as possible.
7378 * tree-chrec.c (for_each_scev_op): New.
7379 * tree-chrec.h (for_each_scev_op): Declared.
7380 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
7381 * tree-data-ref.c (get_references_in_stmt,
7382 find_data_references_in_stmt): New, from trunk.
7383 (find_data_references_in_loop): Use get_references_in_stmt
7384 and find_data_references_in_loop, modified as in trunk.
7385 (build_access_matrix_with_af): New.
7386 * tree-data-ref.h (data_reference): Add a field access_matrix.
7387 (data_ref_loc): New, as in trunk.
7388 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
7389 invariant_in_scop_p, param_index, scan_tree_for_params,
7390 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
7391 idx_record_param, idx_record_params, build_access_matrix,
7392 build_scop_data_accesses, build_scop_canonical_schedules,
7393 build_graphite_bb, build_scop_bbs, find_params_in_bb,
7394 build_scop_params): New.
7395 * graphite.h (graphite_bb): New.
7396 (scop): Add fields static_schedule, params, loop_nest,
7397 iteration_domain.
7398 * lambda.h: Declare vecs of lambda_matrix.
7399 * tree-flow.h (print_loop_ir_bb): Declared.
7400 * tree-cfg.c (print_loop_ir_bb): New.
7401 (print_loop): Use print_loop_ir_bb.
7402
74032006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
7404
7405 * Merge from mainline (r115016:117632).
7406
74072006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
7408
7409 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
7410 break due to a warning.
7411
74122006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
7413
7414 * graphite.c (print_scops, debug_scops): New.
7415 (graphite_transform): Renamed graphite_find_transform.
7416 * graphite.h (debug_scops): Declared.
7417
74182006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
7419
7420 * tree-match.c: Reformat following the GNU style.
7421 * tree-match.h: Reformat following the GNU style.
7422 * tree-pattern.h: Removed empty file.
7423 * Makefile.in: Remove references to tree-pattern.h.
7424 * tree-check.c: Reformat following the GNU style.
7425 (execute_tree_check): Move gate condition code to...
7426 (gate_tree_check): ...here. New function.
7427 (pass_check): Use the gate function.
7428
74292006-07-04 Nic Volanschi <nic.volanschi@free.fr>
7430
7431 * tree-pattern.h: New. Tree pattern matching and checking using
7432 concrete syntax.
7433 * tree-check.c: New. Tree/CFG checking pass.
7434 * tree-match.c: New. Library for tree pattern matching.
7435 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
7436 * toplev.c, flags.h: Add globals for tree-check pass.
7437 * Makefile.in: Integrate the files in tree-check pass.
7438 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
7439 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
7440 Introduce a "lazy" pretty-print mode.
7441 * tree.c, tree.h: Add tree_name.
7442
74432006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
7444
7445 * doc/invoke.texi (-fgraphite): Correct typo.
7446 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
7447 use of print_loop_ir.
45489e99
SP
7448 * gcc.dg/graphite/scop-1.c: New.
7449 * gcc.dg/graphite/scop-2.c: New.
7450 * gcc.dg/graphite/graphite.exp: New.
2abae5f1
SP
7451 * graphite.c: Include domwalk.h.
7452 (print_scop): Print only the entry and exit blocks.
7453 (debug_scop): No longer static.
7454 (affine_expr): Fix formating. Return also true when the expression is
7455 constant.
7456 (stmt_simple_for_scop_p): Fix formating.
7457 (build_scops): Use domwalk.
7458 (get_loop_start, end_scop, test_for_scop_bound): New.
7459 (graphite_transform_loops): Avoid printing on stderr.
7460 * graphite.h (debug_scop): Declared.
7461 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
7462 * Makefile.in (graphite.o): Depend on domwalk.h.
7463 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
7464 declarations for static functions.
7465 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
7466 controlling output verbosity.
7467
74682006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
7469 Plesco Alexandru <shurikx@gmail.com>
7470
7471 * doc/invoke.texi (-fgraphite): Document.
7472 * tree-pass.h (pass_graphite_transforms): Declared.
7473 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
7474 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
7475 (pass_graphite_transforms): Defined.
7476 * tree-data-ref.c (free_data_ref, data_reference): Extern.
7477 * tree-data-ref.h (free_data_ref, data_reference): Declared.
7478 * graphite.c, graphite.h: New.
7479 * common.opt (fgraphite): Declared.
7480 * tree-flow.h (graphite_transform_loops): Declared.
7481 * Makefile.in (OBJS-common): Add graphite.o.
7482 (graphite.o): New rule.
7483 * passes.c (pass_graphite_transforms): Scheduled.
7484