]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ChangeLog.graphite
Introduce compatibility to newer CLooG's CloogState and mask the use with macros...
[thirdparty/gcc.git] / gcc / ChangeLog.graphite
CommitLineData
08a88144 12010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
2
3 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
4 CloogState.
5 (set_cloog_options): Same.
6 (print_clast_stmt): Same.
7 (scop_to_clast): Same.
8 (print_generated_program): Same.
9 (gloog): Same.
10 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
11 (scop_to_clast): Extend with CloogState.
12 * graphite-cloog-util.c: Include graphite-cloog-compat.h
13 (new_Cloog_Domain_from_ppl_Polyhedron):
14 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
15 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
16 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
17 * graphite-cloog-util.h (build_cloog_prog): Same.
18 * graphite-cloog-copat.h (build_cloog_prog): New.
19 (CloogState): New.
20 (cloog_state_malloc): New.
21 (cloog_state_free): New.
22 (cloog_loop_malloc): New.
23 (cloog_options_malloc): New.
24 (cloog_statement_alloc): New.
25 (cloog_domain_from_cloog_matrix): New.
26 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
27 (new_Cloog_Domain_from_ppl_Polyhedron): New.
28
2e6bc1c7 292010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
30
31 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
32 type of NAME now depends on used CLooG version.
33 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
34 (gcc_type_for_clast_expr): Same.
35 (print_clast_stmt): Replace pprint with clast_pprint.
36 * graphite-cloog-compat.h: Provide compatibility macros for
37 CLooG Legacy.
38 (clast_name_p): New.
39 (clast_expr_term): New.
40 (clast_expr_red): New.
41 (clast_expr_bin): New.
42 (clast_pprint): New.
43
ebd32a89 442010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
45
46 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
47 compatible to newer CLooG releases (CLOOG_ORG).
48 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
49 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
50 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
51 (build_cloog_prog) : New.
52 (cloog_program_extract_scalars): New.
53 (cloog_program_scatter): New.
54
1b2c23d4 552010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
56
57 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
58 conditionally (CLOOG_ORG).
59 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
60 (cloog_statement_usr): New.
61 (cloog_domain): Same.
62 (cloog_set_domain): Same.
63 (cloog_next_domain): Same.
64 (cloog_set_next_domain): Same.
65 (cloog_program_nb_scattdims): Same.
66 (cloog_program_set_nb_scattdims): Same.
67 (cloog_program_names): Same.
68 (cloog_program_set_names): Same.
69 (cloog_program_set_context): Same.
70 (cloog_program_set_loop): Same.
71 (cloog_program_blocklist): Same.
72 (cloog_program_set_blocklist): Same.
73 (cloog_program_scaldims): Same.
74 (cloog_program_set_scaldims): Same.
75 (cloog_names_nb_parameters): Same.
76 (cloog_names_set_nb_parameters): Same.
77 (cloog_names_parameters): Same.
78 (cloog_names_set_parameters): Same.
79 (cloog_names_set_nb_iterators): Same.
80 (cloog_names_set_iterators): Same.
81 (cloog_names_set_nb_scattering): Same.
82 (cloog_names_set_scattering): Same.
83 (cloog_statement_set_usr): Same.
84 (cloog_loop_set_next): Same.
85 (cloog_loop_set_domain): Same.
86 (cloog_loop_set_block): Same.
87 (cloog_block_list_next): Same.
88 (cloog_block_list_set_next):
89 (cloog_block_list_set_block): Same.
90
c9a67530 912010-07-27 Sebastian Pop <sebastian.pop@amd.com>
92
93 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
94 a bool.
95 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
96 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
97 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
98 when something has been changed.
99 (rewrite_commutative_reductions_out_of_ssa): Same.
100
101 * gcc.dg/graphite/id-26.c: New.
102
ed455480 1032010-07-26 Sebastian Pop <sebastian.pop@amd.com>
104
105 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
106 handle the case when def is in the sese region.
107 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
108 for invariant expressions.
109 (rewrite_cross_bb_phi_deps): Removed.
110 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
111 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
112 rewrite_cross_bb_phi_deps.
113
72085fb7 1142010-07-26 Sebastian Pop <sebastian.pop@amd.com>
115
116 * graphite-sese-to-poly.c
117 (rewrite_commutative_reductions_out_of_ssa_loop): Call
118 scev_analyzable_p only on is_gimple_reg
119
120 * gcc.dg/graphite/id-25.c: New.
121
5d21c24a 1222010-07-22 Sebastian Pop <sebastian.pop@amd.com>
123
124 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
125 (rewrite_close_phi_out_of_ssa): Propagate constant values or
126 parametric expressions outside the scop region.
127 (rewrite_cross_bb_scalar_deps): Same.
128 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
129
130 * gcc.dg/graphite/run-id-5.c: New.
131 * gcc.dg/graphite/run-id-6.c: New.
132 * gfortran.dg/graphite/id-21.f: New.
133
a865acd7 1342010-07-22 Sebastian Pop <sebastian.pop@amd.com>
135
136 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
137 SSA_NAME_DEF_STMT only on SSA_NAMEs.
138
139 * gcc.dg/graphite/id-24.c: New.
140
52f57b4e 1412010-07-22 Sebastian Pop <sebastian.pop@amd.com>
142
143 * tree-scalar-evolution.c (instantiate_scev_name): Do not
144 instantiate default definitions.
145
c07c57fb 1462010-07-20 Vladimir Kargov <kargov@gmail.com>
147
148 * graphite-scop-detection.c (is_valid_stmt_p): New.
149 (is_valid_bb_p): New.
150
259c0e44 1512010-07-20 Vladimir Kargov <kargov@gmail.com>
152 Sebastian Pop <sebastian.pop@amd.com>
153
154 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
155 (loop_exits_from_bb_p): New.
156 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
157 (loop_exits_from_bb_p): Declared.
158 * graphite-scop-detection.c (scopdet_basic_block_info): Call
159 loop_exits_to_bb_p.
160
000edd14 1612010-07-20 Vladimir Kargov <kargov@gmail.com>
162
163 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
164 tree-data-ref.h.
165 (dot_regions_1): New.
166 (dot_regions): New.
167 * refined-regions.h (dot_regions): Declared.
168 * Makefile.in (refined-regions.o): Update dependences.
169
38f26d41 1702010-07-20 Sebastian Pop <sebastian.pop@amd.com>
171
172 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
173 extra parameter for the region. Call scev_analyzable_p.
174 (rewrite_reductions_out_of_ssa): Update call to
175 rewrite_close_phi_out_of_ssa.
176 (rewrite_cross_bb_phi_deps): Same.
177 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
178 parameter for the region. Call scev_analyzable_p.
179 (rewrite_commutative_reductions_out_of_ssa): Update call to
180 rewrite_commutative_reductions_out_of_ssa_loop.
181
e075a7a2 1822010-07-20 Sebastian Pop <sebastian.pop@amd.com>
183
184 * gcc.dg/tree-ssa/pr20742.c: New.
185
39888e8f 1862010-07-15 Sebastian Pop <sebastian.pop@amd.com>
187
188 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
189
190 * gcc.dg/graphite/id-23.c: New.
191
15822b8e 1922010-07-15 Sebastian Pop <sebastian.pop@amd.com>
193
194 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
195 SSA scalar phi nodes that can be scev_analyzable_p.
196
197 * gfortran.dg/graphite/id-20.f: Adjust testcase.
198
49253930 1992010-07-15 Sebastian Pop <sebastian.pop@amd.com>
200
201 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
202 handle SSA_NAME_IS_DEFAULT_DEF.
203
bac2de0b 2042010-07-15 Sebastian Pop <sebastian.pop@amd.com>
205
206 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
207
208 * gcc.dg/graphite/pr42729.c: New.
209
55c89f69 2102010-07-15 Sebastian Pop <sebastian.pop@amd.com>
211
212 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
213 case non close-phi nodes with one argument.
214
32a6e336 2152010-07-15 Sebastian Pop <sebastian.pop@amd.com>
216
217 * sese.h (scev_analyzable_p): Scevs could be expressions without
218 chrecs and still be scev_analyzable_p.
219
a73166c0 2202010-07-15 Sebastian Pop <sebastian.pop@amd.com>
221
222 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
223
18046220 2242010-07-15 Sebastian Pop <sebastian.pop@amd.com>
225
226 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
227 * cfgloop.h (struct loop): Remove single_iv field.
228 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
229 (scop_canonicalize_loops): Removed.
230 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
231 over all the loop phi nodes in loop->header.
232 (build_poly_scop): Remove use of scop_canonicalize_loops.
233
b19b9f62 2342010-07-15 Sebastian Pop <sebastian.pop@amd.com>
235
236 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
237 handle GIMPLE_CALL.
238
9e4cd968 2392010-07-15 Sebastian Pop <sebastian.pop@amd.com>
240
241 * tree-chrec.c (chrec_apply): Should only apply to the specified
242 variable. Also handle multivariate chains of recurrences that
243 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
244
4ed27c8e 2452010-07-15 Sebastian Pop <sebastian.pop@amd.com>
246
247 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
248 (debug_clast_name_indexes_1): Removed.
249 (debug_clast_name_indexes): Removed.
250 (pbb_to_depth_to_oldiv): Removed.
251 (build_iv_mapping): Replace the use of rename_map with iv_map.
252 (translate_clast_user): Remove uses of rename_map. Allocate and
253 free iv_map.
254 (translate_clast_for_loop): Remove uses of rename_map.
255 (translate_clast_for): Same.
256 (translate_clast_guard): Same.
257 (translate_clast): Same.
258 (gloog): Same.
259 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
260 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
261 * sese.c (set_rename): Now static.
262 (rename_variables_in_stmt): Removed.
263 (rename_uses): New.
264 (is_parameter): Removed.
265 (is_iv): Removed.
266 (expand_scalar_variables_call): Removed.
267 (expand_scalar_variables_ssa_name): Removed.
268 (expand_scalar_variables_expr): Removed.
269 (expand_scalar_variables_stmt): Removed.
270 (expand_scalar_variables): Removed.
271 (rename_variables): Removed.
272 (remove_condition): Removed.
273 (get_true_edge_from_guard_bb): Removed.
274 (get_false_edge_from_guard_bb): Removed.
275 (struct igp): Removed.
276 (default_before_guard): Removed.
277 (convert_for_phi_arg): Removed.
278 (add_guard_exit_phis): Removed.
279 (insert_guard_phis): Removed.
280 (graphite_copy_stmts_from_block): Now also uses iv_map and a
281 region. Do not copy conditions. Do not copy induction variables.
282 Call rename_uses.
283 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
284 the translated statement. Use the iv_map for the induction
285 variable renaming.
286 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
287 (set_rename): Removed declaration.
288 (scev_analyzable_p): ...here.
289 * tree-chrec.c (chrec_apply_map): New.
290 * tree-chrec.h (chrec_apply_map): Declared.
291
5b87c555 2922010-07-15 Sebastian Pop <sebastian.pop@amd.com>
293
294 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
295 insert_loop_close_phis.
296 * sese.c (name_defined_in_loop_p): Removed.
297 (expr_defined_in_loop_p): Removed.
298 (alive_after_loop): Removed.
299 (close_phi_not_yet_inserted_p): Removed.
300 (struct alep): Removed.
301 (add_loop_exit_phis): Removed.
302 (insert_loop_close_phis): Removed.
303
2c4340a8 3042010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
305
5b87c555 306 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
307 condition.
308 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
2c4340a8 309
38df5b0a 3102010-07-07 Sebastian Pop <sebastian.pop@amd.com>
311
312 * gfortran.dg/graphite/id-20.f: New.
313
e0e27d35 3142010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
315
316 * graphite-cloog-util.h: Added cloog.h.
317 * graphite-blocking.c: Removed cloog.h.
318 * graphite-dependences.c: Same.
319 * graphite-interchange.c: Same.
320 * graphite-poly.c: Same.
321 * graphite-ppl.c: Same.
322 * graphite-scop-detection.c: Same.
323 * graphite-sese-to-poly.c:
324 Removed cloog.h.
325 Removed graphite-clast-to-gimple.h.
326 (check_poly_representation): Removed (unused).
327 * graphite-sese-to-poly.h
328 (check_poly_representation): Removed (unused).
329
30185452 3302010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
331
332 * Makefile.in
333 (OBJS-common): Added graphite-cloog-util.o.
334 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
335 (graphite-cloog-util.o): New.
336 (graphite-ppl.o): Added graphite-cloog-util.h.
337 * graphite-clast-to-gimple.c:
338 Added graphite-cloog-util.h to include statements.
339 * graphite-cloog-util.c: New.
340 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
341 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
342 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
343 (new_C_Polyhedron_from_Cloog_Matrix): Same.
344 (ppl_Constrain_System_number_of_constraints): Same.
345 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
346 (oppose_constraint): Same.
347 (cloog_matrix_to_ppl_constraint): Same.
348 (new_Constraint_System_from_Cloog_Matrix): Same.
349 (insert_constraint_into_matrix): Same. Declared static.
350 * graphite-cloog-util.h: New.
351 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
352 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
353 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
354 (new_C_Polyhedron_from_Cloog_Matrix): Same.
355 (insert_constraint_into_matrix): Same.
356 * graphite-ppl.c:
357 Added graphite-cloog-util.h to include statements.
358 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
359 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
360 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
361 (new_C_Polyhedron_from_Cloog_Matrix): Same.
362 (insert_constraint_into_matrix): Same.
363 (ppl_Constrain_System_number_of_constraints): Same.
364 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
365 (oppose_constraint): Same.
366 (cloog_matrix_to_ppl_constraint): Same.
367 (new_Constraint_System_from_Cloog_Matrix): Same.
368 * graphite-ppl.h:
369 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
370 graphite-cloog-util.h.
371 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
372 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
373 (new_C_Polyhedron_from_Cloog_Matrix): Same.
374 (insert_constraint_into_matrix): Removed.
375
6955599b 3762010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
377
378 * graphite-clast-to-gimple.c
379 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
380 (precision_for_interval): Same.
381 (gcc_type_for_interval): Same.
382 (compute_type_for_level): Same.
383 * graphite-interchange.c
384 (lst_interchange_profitable_p): Same.
385 * graphite-poly.c
386 (psct_scattering_dim_for_loop_depth): Same.
387 * graphite-ppl.c
388 (ppl_max_for_le_pointset): Same.
389 (ppl_min_for_le_pointset): Same.
390
6fba926c 3912010-06-25 Vladimir Kargov <kargov@gmail.com>
392
393 * refined-regions.c (bb_index_compare): New.
394 (get_bbs_in_region): New.
395 (print_bbs_in_region): New.
396 (print_refined_region): Add an argument that allows to print
397 all basic blocks contained in regions.
398 (debug_refined_region): Update call to print_refined_region.
399 * refined-regions.h (print_refined_region): Update declaration.
400 (get_bbs_in_region): Declared.
401 * graphite-scop-detection.c (build_scops_new): Print the refined
402 region tree into the Grahite dump file.
403
b8046a12 4042010-06-24 Sebastian Pop <sebastian.pop@amd.com>
405
406 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
407 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
408
dd966e1f 4092010-06-24 Sebastian Pop <sebastian.pop@amd.com>
410
411 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
412 rewrite_close_phi_out_of_ssa.
413
414 * gcc.dg/graphite/id-22.c: New.
415
0569d480 4162010-06-24 Sebastian Pop <sebastian.pop@amd.com>
417
418 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
419
97142493 4202010-06-24 Sebastian Pop <sebastian.pop@amd.com>
421
422 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
423 rename_map.
424 * sese.c (debug_rename_map): Same.
425 (get_rename): Same.
426 (set_rename): Same.
427 (rename_variables_in_stmt): Same.
428 (expand_scalar_variables_call): Same.
429 (expand_scalar_variables_ssa_name): Same.
430 (expand_scalar_variables_expr): Same.
431 (expand_scalar_variables_stmt): Same.
432 (expand_scalar_variables): Same.
433 (rename_variables): Same.
434 (graphite_copy_stmts_from_block): Same.
435 (copy_bb_and_scalar_dependences): Same.
436
0c663bd0 4372010-06-24 Sebastian Pop <sebastian.pop@amd.com>
438
439 * graphite-clast-to-gimple.c (copy_renames): Removed.
440 (translate_clast_for): Do not call copy_renames.
441 (translate_clast_guard): Same.
442
42ad5d61 4432010-06-23 Sebastian Pop <sebastian.pop@amd.com>
444
445 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
446 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
447 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
448 before rewrite_cross_bb_scalar_deps.
449
8643dd0a 4502010-06-23 Sebastian Pop <sebastian.pop@amd.com>
451
452 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
453 Early return in when flag_associative_math is not set.
454
9a34ebd6 4552010-06-23 Sebastian Pop <sebastian.pop@amd.com>
456
457 * gcc.dg/graphite/run-id-2.c: Call abort.
458
097e870c 4592010-06-23 Sebastian Pop <sebastian.pop@amd.com>
460
461 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
462 of SSA copies on edges except for loop->latch.
463
bf8b5699 4642010-06-23 Sebastian Pop <sebastian.pop@amd.com>
465
466 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
467 Split out of rewrite_reductions_out_of_ssa.
468 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
469 Declared.
470 * graphite.c (graphite_transform_loops): Call it.
471
e819c864 4722010-06-23 Sebastian Pop <sebastian.pop@amd.com>
473
474 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
475
b90bb125 4762010-06-15 Sebastian Pop <sebastian.pop@amd.com>
477
478 * passes.c (init_optimization_passes): Add pass_graphite.
479 Schedule a pass_copy_prop before pass_graphite_transforms.
480 * timevar.def (TV_GRAPHITE): Declared.
481 * tree-pass.h (pass_graphite): Declared.
482 * tree-ssa-loop.c (pass_graphite): New.
483
484 * gcc.dg/graphite/id-20.c: New.
485
93206bb0 4862010-06-12 Sebastian Pop <sebastian.pop@amd.com>
487
488 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
489 Remove calls to rename_nb_iterations and rename_sese_parameters.
490 * graphite-clast-to-gimple.h (gloog): Update declaration.
491 * graphite.c (graphite_transform_loops): Update call to gloog.
492 * sese.c (rename_variables_in_expr): Removed.
493 (rename_nb_iterations): Removed.
494 (rename_sese_parameters): Removed.
495 * sese.h (rename_nb_iterations): Removed.
496 (rename_sese_parameters): Removed.
497
88a551f1 4982010-06-12 Sebastian Pop <sebastian.pop@amd.com>
499
500 * graphite-clast-to-gimple.c (gloog): Remove call to
501 sese_adjust_liveout_phis.
502 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
503 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
504 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
505 rewrite_phi_out_of_ssa.
506 * sese.c (get_vdef_before_sese): Removed.
507 (sese_adjust_vphi): Removed.
508 (sese_adjust_liveout_phis): Removed.
509 * sese.h (sese_adjust_liveout_phis): Removed.
510
39a34dd8 5112010-06-12 Sebastian Pop <sebastian.pop@amd.com>
512
513 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
514 argument for the place after which to insert the out of SSA copy.
515 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
516 (rewrite_phi_out_of_ssa): Same.
517 (rewrite_cross_bb_scalar_deps): Same.
518 (insert_copyout): Removed.
519 (insert_copyin): Removed.
520 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
521 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
522 insert_copyin.
523
5d2603f9 5242010-06-12 Sebastian Pop <sebastian.pop@amd.com>
525
526 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
527 (rewrite_reductions_out_of_ssa): Same.
528 (rewrite_commutative_reductions_out_of_ssa): Same.
529 (build_poly_scop): Do not call these functions.
530 * graphite-sese-to-poly.h (build_poly_scop): Declared.
531 (rewrite_reductions_out_of_ssa): Declared.
532 (rewrite_commutative_reductions_out_of_ssa): Declared.
533 * graphite.c (graphite_transform_loops): Call on every scop
534 rewrite_commutative_reductions_out_of_ssa before calling
535 rewrite_reductions_out_of_ssa and build_scop_bbs.
536
189cea68 5372010-06-12 Sebastian Pop <sebastian.pop@amd.com>
538
539 * graphite-dependences.c (dot_deps): Make system call to dotty run
540 in background.
541 (dot_deps_stmt): Same.
542 * graphite-poly.c (dot_lst): Same.
543
1861e127 5442010-06-11 Sebastian Pop <sebastian.pop@amd.com>
545
546 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
547 old_type in parameter.
548 (gcc_type_for_value): Update call to gcc_type_for_interval.
549 (compute_type_for_level_1): Renamed compute_type_for_level.
550 Update call to gcc_type_for_interval.
551
f6a2a688 5522010-06-09 Sebastian Pop <sebastian.pop@amd.com>
553
554 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
555 the scev analysis when the variable is not used outside the loop
556 in a close phi node: call compute_overall_effect_of_inner_loop.
557
3662a419 5582010-06-09 Sebastian Pop <sebastian.pop@amd.com>
559
560 * graphite-sese-to-poly.c (single_pred_cond): Renamed
561 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
562 (build_sese_conditions_before): Renamed call to single_pred_cond.
563 (build_sese_conditions_after): Same.
564
a344bb22 5652010-06-09 Sebastian Pop <sebastian.pop@amd.com>
566
567 * graphite-poly.h: Fix comments and indentation.
568 * graphite-sese-to-poly.c: Same.
569 (build_sese_conditions_before): Compute stmt and gbb only when needed.
570 * tree-chrec.c: Fix comments and indentation.
571 (tree-ssa-loop-niter.c): Same.
572
9ac63ea9 5732010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
574
575 * refined-regions.c (create_region): Only initialize the region.
576 (find_regions_with_entry): Initialize parent relation and bbmap
577 correctly.
578 (build_regions_tree): Set outermost_region to region instead of
579 topmost_region.
580 (calculate_region_tree): Remove unneeded parameters.
581
441c9c1d 5822010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
583
584 * graphite-scop-detection.c (is_scop_p): New.
585 (build_scops_new): New. A skeleton for the new scop detection.
586 (build_scops_old): Renamed from build_scops.
587 (build_scops): New version. Call the new and the old scop
588 detection.
589
93bdb320 5902010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
591 Antoniu Pop <antoniu.pop@gmail.com>
592
593 * Makefile.in (OBJS-common): Add refined-regions.o.
594 (refined-regions.o): New.
595 (graphite-scop-detection.o): Use refined-regions.h.
596 * graphite-scop-detection.c: Include refined-regions.h
597 (build_scops): Also build the refined region tree.
598 * refined-regions.c: New. Adds an algorithm to detect refined
599 regions.
600 (print_refined_region): New.
601 (debug_refined_region): New.
602 (refined_region_contains_bb_p): New.
603 (refined_region_contains_region_p): New.
604 (is_common_df): New.
605 (struct find_regions_global_data): New.
606 (is_region): New.
607 (typedef struct bb_bb_def): New.
608 (new_bb_bb_def): New.
609 (bb_bb_map_hash): New.
610 (eq_bb_bb_map): New.
611 (find_new_bb): New.
612 (bb_reg_def): New.
613 (new_bb_reg_def): New.
614 (bb_reg_map_hash): New.
615 (eq_bb_reg_map): New.
616 (find_new_region): New.
617 (insert_new_reg): New.
618 (insert_new_bb): New.
619 (insert_shortcut): New.
620 (get_next_postdom): New.
621 (create_region): New.
622 (find_regions_with_entry): New.
623 (find_regions_adc): New.
624 (find_regions): New.
625 (get_topmost_parent): New.
626 (build_regions_tree): New.
627 (calculate_region_tree): New.
628 (free_region_tree): New.
629 * refined-regions.h: New.
630 (struct refined_region): New.
631 (calculate_region_tree): New.
632 (free_region_tree): New.
633 (refined_region_contains_bb_p): New.
634 (refined_region_contains_region_p): New.
635 (print_refined_region): New.
636 (debug_refined_region): New.
637
78b58940 6382010-05-26 Sebastian Pop <sebastian.pop@amd.com>
639
640 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
641 size_one_node.
642
9acb79e3 6432010-05-07 Sebastian Pop <sebastian.pop@amd.com>
644
645 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
646 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
647
9d828157 6482010-05-07 Sebastian Pop <sebastian.pop@amd.com>
649
650 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
651 phi_arg_in_outermost_loop.
652 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
653 (remove_invariant_phi): Same.
654
0ef84e3b 6552010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
656
657 * graphite-blocking.c
658 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
659 * graphite-clast-to-gimple.c
660 (clast_to_gcc_expression): Same.
661 (precision_for_value): Same.
662 (precision_for_interval): Same.
663 (gcc_type_for_interval): Same.
664 (graphite_create_new_guard): Same.
665 (compute_bounds_for_level): Same.
666 (graphite_create_new_loop_guard): Same.
667 * graphite-interchange.c
668 (build_linearized_memory_access): Same.
669 (pdr_stride_in_loop): Same.
670 (memory_strides_in_loop_1): Same.
671 (memory_strides_in_loop): Same.
672 (extend_scattering): Same.
673 (psct_scattering_dim_for_loop_depth): Same.
674 (pbb_number_of_iterations): Same.
675 * graphite-poly.h
676 (debug_iteration_domains): Same.
677 * graphite-ppl.c
678 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
679 (ppl_set_inhomogeneous_gmp): Same.
680 (ppl_strip_loop): Same.
681 (ppl_lexico_compare_linear_expressions): Same.
682 (ppl_read_polyhedron_matrix): Same.
683 (ppl_max_for_le_pointset): Same.
684 * graphite-ppl.h
685 (ppl_read_polyhedron_matrix): Same.
686 (tree_int_to_gmp): Same.
687 (gmp_cst_to_tree): Same.
688 (ppl_set_inhomogeneous): Same.
689 (ppl_set_inhomogeneous_tree): Same.
690 (ppl_set_coef): Same.
691 (ppl_set_coef_tree): Same.
692 * graphite-sese-to-poly.c
693 (build_pbb_scattering_polyhedrons): Same.
694 (build_scop_scattering): Same.
695 (scan_tree_for_params_right_scev): Same.
696 (scan_tree_for_params): Same.
697 (find_params_in_bb): Same.
698 (find_scop_parameters): Same.
699 (add_upper_bounds_from_estimated_nit): Same.
700 (build_loop_iteration_domains): Same.
701 (add_condition_to_domain): Same.
702 (pdr_add_memory_accesses): Same.
703
2d6fe479 7042010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
705
706 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
707 CLooG's value_* macros to their respective mpz_* counterparts.
708 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
709 (graphite_create_new_loop_guard): Same.
710 * graphite-interchange.c (build_linearized_memory_access): Same.
711 (pdr_stride_in_loop): Same.
712 (memory_strides_in_loop_1): Same.
713 (1st_interchange_profitable_p): Same.
714 * graphite-poly.c (extend_scattering): Same.
715 (psct_scattering_dim_for_loop_depth): Same.
716 (pbb_number_of_iterations): Same.
717 (pbb_number_of_iterations_at_time): Same.
718 * graphite-poly.h (new_1st_loop): Same.
719 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
720 (oppose_constraint): Same.
721 (insert_constraint_into_matrix): Same.
722 (ppl_set_inhomogeneous_gmp): Same.
723 (ppl_set_coef_gmp): Same.
724 (ppl_strip_loop): Same.
725 (ppl_lexico_compare_linear_expressions): Same.
726 (ppl_max_for_le_pointset): Same.
727 (ppl_min_for_le_pointset): Same.
728 (ppl_build_realtion): Same.
729 * graphite-ppl.h (gmp_cst_to_tree): Same.
730 (ppl_set_inhomogeneous): Same.
731 (ppl_set_inhomogeneous_tree): Same.
732 (ppl_set_coef): Same.
733 (ppl_set_coef_tree): Same.
734 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
735 (build_scop_scattering): Same.
736 (add_value_to_dim): Same.
737 (scan_tree_for_params_right_scev): Same.
738 (scan_tree_for_params_int): Same.
739 (scan_tree_for_params): Same.
740 (find_params_in_bb): Same.
741 (find_scop_parameters): Same.
742 (add_upper_bounds_from_estimated_nit): Same.
743 (build_loop_iteration_domains): Same.
744 (create_linear_expr_from_tree): Same.
745 (add_condition_to_domain): Same.
746 (pdr_add_memory_accesses): Same.
747
7c0d15dc 7482010-04-05 Sebastian Pop <sebastian.pop@amd.com>
749
750 PR middle-end/43519
751 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
752 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
753 When converting an unsigned type to signed, double its precision.
754 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
755 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
756 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
757
7582010-04-05 Sebastian Pop <sebastian.pop@amd.com>
759
760 PR middle-end/43519
761 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
762 build_nonstandard_integer_type.
763 (gcc_type_for_interval): Same.
764
7652010-04-05 Sebastian Pop <sebastian.pop@amd.com>
7778680e 766
767 PR middle-end/43519
768 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
769 POINTER_PLUS_EXPR for pointer types.
770
771 * gcc.dg/graphite/id-19.c: New.
772
f20b6ea9 7732010-04-04 Sebastian Pop <sebastian.pop@amd.com>
774
775 PR middle-end/43519
776 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
777 * graphite-clast-to-gimple.c: Include langhooks.h.
778 (max_signed_precision_type): New.
779 (max_precision_type): Takes two types as arguments.
780 (precision_for_value): New.
781 (precision_for_interval): New.
782 (gcc_type_for_interval): New.
783 (gcc_type_for_value): New.
784 (gcc_type_for_clast_term): New.
785 (gcc_type_for_clast_red): New.
786 (gcc_type_for_clast_bin): New.
787 (gcc_type_for_clast_expr): Split up into several functions.
788 (gcc_type_for_clast_eq): Rewritten.
789 (compute_bounds_for_level): New.
790 (compute_type_for_level_1): New.
791 (compute_type_for_level): New.
792 (gcc_type_for_cloog_iv): Removed.
793 (gcc_type_for_iv_of_clast_loop): Rewritten.
794 (graphite_create_new_loop): Compute the lower and upper bound types
795 with gcc_type_for_clast_expr.
796 (graphite_create_new_loop_guard): Same.
797 (find_cloog_iv_in_expr): Removed.
798 (compute_cloog_iv_types_1): Removed.
799 (compute_cloog_iv_types): Removed.
800 (gloog): Do not call compute_cloog_iv_types.
801 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
802 GBB_CLOOG_IV_TYPES.
803 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
804 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
805 (GBB_CLOOG_IV_TYPES): Removed.
806
807 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
808
03ce78db 8092010-04-02 Sebastian Pop <sebastian.pop@amd.com>
810
811 Reverted this commit: as at this point the loop closed SSA form
812 is under a canonical form respecting the single argument condition.
813 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
814 close phi nodes may have more than one argument.
815
8162010-04-01 Sebastian Pop <sebastian.pop@amd.com>
817
818 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
819 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
820 (detect_commutative_reduction): Same.
821
8222010-03-31 Sebastian Pop <sebastian.pop@amd.com>
823
824 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
825 close phi nodes may have more than one argument.
826
67e28d17 8272010-03-30 Richard Guenther <rguenther@suse.de>
828 Zdenek Dvorak <ook@ucw.cz>
829 Sebastian Pop <sebastian.pop@amd.com>
830
831 PR middle-end/43464
832 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
833 with multiple arguments.
834 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
835
ff4c7a5a 8362010-03-23 Sebastian Pop <sebastian.pop@amd.com>
837
838 * graphite-dependences.c (print_pddr): Call print_pdr with an
839 extra argument.
840 * graphite-poly.c (debug_pdr): Add an extra argument for the
841 verbosity level.
842 (print_pdr): Same.
843 (print_pbb_domain): Same.
844 (print_pbb): Same.
845 (print_scop_context): Same.
846 (print_scop): Same.
847 (print_cloog): Same.
848 (debug_pbb_domain): Same.
849 (debug_pbb): Same.
850 (print_pdrs): Same.
851 (debug_pdrs): Same.
852 (debug_scop_context): Same.
853 (debug_scop): Same.
854 (debug_cloog): Same.
855 (print_scop_params): Same.
856 (debug_scop_params): Same.
857 (print_iteration_domain): Same.
858 (print_iteration_domains): Same.
859 (debug_iteration_domain): Same.
860 (debug_iteration_domains): Same.
861 (print_scattering_function): Same.
862 (print_scattering_functions): Same.
863 (debug_scattering_function): Same.
864 (debug_scattering_functions): Same.
865 * graphite-poly.h (debug_pdr): Update declaration.
866 (print_pdr): Same.
867 (print_pbb_domain): Same.
868 (print_pbb): Same.
869 (print_scop_context): Same.
870 (print_scop): Same.
871 (print_cloog): Same.
872 (debug_pbb_domain): Same.
873 (debug_pbb): Same.
874 (print_pdrs): Same.
875 (debug_pdrs): Same.
876 (debug_scop_context): Same.
877 (debug_scop): Same.
878 (debug_cloog): Same.
879 (print_scop_params): Same.
880 (debug_scop_params): Same.
881 (print_iteration_domain): Same.
882 (print_iteration_domains): Same.
883 (debug_iteration_domain): Same.
884 (debug_iteration_domains): Same.
885 (print_scattering_function): Same.
886 (print_scattering_functions): Same.
887 (debug_scattering_function): Same.
888 (debug_scattering_functions): Same.
889
1f8d6d4d 8902010-03-23 Sebastian Pop <sebastian.pop@amd.com>
891
892 * graphite-poly.c (print_scattering_function_1): New.
893 (print_scattering_function): Call it.
894 (print_scop_params): Remove spaces at the end of lines.
895 (print_cloog): New.
896 (debug_cloog): New.
897 * graphite-poly.h (print_cloog): Declared.
898 (debug_cloog): Declared.
899
4de8824d 9002010-03-23 Sebastian Pop <sebastian.pop@amd.com>
901
902 * tree-ssa-copy.c: Revert this previous change:
903 (init_copy_prop): Loop closed phi nodes cancontain more than one
904 argument.
905 (execute_copy_prop): Revert the previous change: do not call
906 rewrite_into_loop_closed_ssa.
907
9082010-03-21 Sebastian Pop <sebastian.pop@amd.com>
909 Richard Guenther <rguenther@suse.de>
910
911 PR middle-end/43464
912 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
913 contain more than one argument.
914 (execute_copy_prop): Revert the previous change: do not call
915 rewrite_into_loop_closed_ssa.
916
917 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
918 * gcc.dg/graphite/id-pr43464-1.c: New.
919
9202010-03-21 Sebastian Pop <sebastian.pop@amd.com>
921
922 PR middle-end/43464
923 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
924 and verify_loop_closed_ssa when copy prop is executed in the LNO.
925
926 * gcc.dg/graphite/id-pr43464.c: New.
927
0207206d 9282010-03-16 Sebastian Pop <sebastian.pop@amd.com>
929
930 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
931 in loop->header.
932 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
933 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
934 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
935 to switch between adding the IV bump in loop->latch or in loop->header.
936
a751953f 9372010-03-16 Sebastian Pop <sebastian.pop@amd.com>
938
939 * passes.c (init_optimization_passes): Add pass_copy_prop
940 after Graphite.
941
5dc5fe13 9422010-03-16 Sebastian Pop <sebastian.pop@amd.com>
943
944 * graphite-poly.c (print_scattering_function): Pretty print following
945 the scoplib format.
946 (print_pdr): Same.
947 (print_pbb_domain): Same.
948 (dump_gbb_cases): Same.
949 (dump_gbb_conditions): Same.
950 (print_pdrs): Same.
951 (print_pbb): Same.
952 (print_scop_params): Same.
953 (print_scop_context): Same.
954 (print_scop): Same.
955 (print_pbb_body): New.
956 (lst_indent_to): New.
957 (print_lst): Start new lines with a #.
958 * graphite-poly.h (pbb_bb): New.
959 (pbb_index): Use pbb_bb.
960 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
961 disjuncts.
962 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
963
9251755b 9642010-03-13 Sebastian Pop <sebastian.pop@amd.com>
965
966 PR middle-end/43351
967 * gcc.dg/graphite/id-pr43351.c
968
5a644317 9692010-03-13 Sebastian Pop <sebastian.pop@amd.com>
970
971 PR middle-end/43354
972 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
973 call insert_out_of_ssa_copy for default definitions.
974 * gfortran.dg/graphite/id-pr43354.f: New.
975
9762010-03-13 Sebastian Pop <sebastian.pop@amd.com>
197de505 977
978 PR middle-end/43349
979 * gfortran.dg/graphite/pr43349.f: New.
980
119adb56 9812010-03-11 Sebastian Pop <sebastian.pop@amd.com>
982
983 * graphite-clast-to-gimple.c (my_long_long): Defined.
984 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
985 * graphite-sese-to-poly.c (my_long_long): Defined.
986 (scop_ivs_can_be_represented): Use it.
987
578e3456 9882010-03-10 Sebastian Pop <sebastian.pop@amd.com>
989
990 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
991 graphite-max-bbs-per-function, and loop-block-tile-size.
992 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
993 with "maximum".
994 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
995
5d92ac74 9962010-03-10 Sebastian Pop <sebastian.pop@amd.com>
997
998 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
999 forward declaration.
1000 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1001 (add_upper_bounds_from_estimated_nit): New.
1002 (build_loop_iteration_domains): Use it.
1003
89466e43 10042010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1005
1006 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1007
c4ccbe87 10082010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1009
1010 PR middle-end/43306
1011 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1012 should be an INTEGER_CST. Also handle CASE_CONVERT.
1013 * gcc.dg/graphite/pr43306.c: New.
1014
94ba21de 10152010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1016
1017 * graphite.c (graphite_initialize): To bound the number of bbs per
1018 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1019 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1020 * doc/invoke.texi: Document it.
1021
f49215ce 10222010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1023
1024 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1025 * graphite-sese-to-poly.h (build_poly_scop): Same.
1026
c2e502a5 10272010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1028
1029 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1030 the number of parameters in the scop. Use as an upper bound
1031 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1032 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1033 * doc/invoke.texi: Document it.
1034
8424df5f 10352010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1036
1037 * graphite-sese-to-poly.c (add_param_constraints): Use
1038 lower_bound_in_type and upper_bound_in_type.
1039
d6ad5c2f 10402010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1041
1042 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1043 instead of unsigned_type_node.
1044
88a62e9b 10452010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1046 Reza Yazdani <reza.yazdani@amd.com>
1047
1048 PR middle-end/43065
1049 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1050 on pointer type parameters.
1051
1052 * gcc.dg/graphite/run-id-4.c: New.
1053
10542010-03-05 Sebastian Pop <sebastian.pop@amd.com>
bc1b5a1d 1055
1056 PR middle-end/43065
1057 * gcc.dg/graphite/run-id-3.c: New.
1058
f6fb4255 10592010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1060 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1061
1062 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1063 handle conversions from pointer to integers.
1064 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1065 induction variable, to be able to work with code generated by CLooG.
1066 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1067 (build_poly_scop): Bail out if we cannot codegen a loop.
1068
2d0a2aaa 10692010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1070
1071 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1072 code generation with gloog_error.
1073
2996b712 10742010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1075
1076 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1077 Call fold_convert on all the returned values.
1078 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1079 the type of the resulting expression.
1080
c817e987 10812010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1082
1083 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1084 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1085 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1086
5f2e51eb 10872010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1088
1089 * graphite-dependences.c (map_into_dep_poly): Removed.
1090 (dependence_polyhedron_1): Use combine_context_id_scat.
1091
7453bc3b 10922010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1093
1094 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1095 (struct poly_bb): Same.
1096 (combine_context_id_scat): New.
1097
13dca219 10982010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1099
1100 PR middle-end/42326
1101 * sese.c (name_defined_in_loop_p): Return false for default
1102 definitions.
1103
1104 * gcc.dg/graphite/pr42326.c: New.
1105
fc830e2d 11062010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1107
1108 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1109 and clean up the logic.
1110
bde82a01 11112010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1112
1113 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1114 early return.
1115
bbf92068 11162010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1117
1118 PR middle-end/43083
1119 * graphite-scop-detection.c (create_single_exit_edge): Move
1120 the call to find_single_exit_edge to....
1121 (create_sese_edges): ...here. Don't handle multiple edges
1122 exiting the function.
1123 (build_graphite_scops): Don't handle multiple edges
1124 exiting the function.
1125
1126 * gcc.dg/graphite/pr43083.c: New.
1127
27f9c4ff 11282010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1129
66bb96d4 1130 PR middle-end/43097
27f9c4ff 1131 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1132 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1133
1134 * gfortran.dg/graphite/pr43097.f: New.
1135
c3eecfcf 11362010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1137 Manuel López-Ibáñez <manu@gcc.gnu.org>
1138
1139 PR middle-end/43140
1140 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1141
11422010-02-22 Sebastian Pop <sebastian.pop@amd.com>
550c39c3 1143
1144 PR middle-end/43026
1145 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1146
1147 * g++.dg/graphite/pr43026.C: New.
1148
3dc0020f 11492010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1150
1151 * Merge from mainline (154736:156693).
1152
5b3c8b56 11532010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1154
1155 PR middle-end/43012
1156 * gcc.dg/graphite/pr43012.c: New.
65084500 1157
5b3c8b56 11582010-02-10 Sebastian Pop <sebastian.pop@amd.com>
65084500 1159
5b3c8b56 1160 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
65084500 11612010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1162
1163 * g++.dg/graphite/pr42930.C: New.
1164
5dcbb45f 11652010-02-10 Sebastian Pop <sebastian.pop@amd.com>
ce0ae3b6 1166
1167 PR middle-end/42930
1168 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1169 graphite_can_represent_init for MULT_EXPR.
1170
5dcbb45f 11712010-02-10 Sebastian Pop <sebastian.pop@amd.com>
eae8f2a1 1172
1173 PR middle-end/42914
1174 PR middle-end/42530
1175 * graphite-sese-to-poly.c (remove_phi): New.
1176 (translate_scalar_reduction_to_array): Call remove_phi.
1177
1178 * gcc.dg/graphite/pr42530.c: New.
1179 * gcc.dg/graphite/pr42914.c: New.
1180
5dcbb45f 11812010-02-10 Sebastian Pop <sebastian.pop@amd.com>
94bdcd77 1182
1183 PR middle-end/42771
1184 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1185 * graphite-clast-to-gimple.h (gloog): Update declaration.
1186 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1187 * graphite-poly.h (struct poly_bb): Add missing comments.
1188 (struct scop): Add poly_scop_p field.
1189 (POLY_SCOP_P): New.
1190 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1191 * graphite.c (graphite_transform_loops): Build the polyhedral
1192 representation for each scop before code generation.
1193 * sese.c (rename_variables_in_operand): Removed.
1194 (rename_variables_in_expr): Return the renamed expression.
1195 (rename_sese_parameters): New.
1196 * sese.h (rename_sese_parameters): Declared.
1197
1198 * gcc.dg/graphite/pr42771.c: New.
1199
9fe3fe75 12002010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1201
1202 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1203 return 0 from main.
1204 * gcc.dg/graphite/block-1.c: Same.
1205 * gcc.dg/graphite/block-3.c: Same.
1206 * gcc.dg/graphite/block-4.c: Same.
1207 * gcc.dg/graphite/block-5.c: Same.
1208 * gcc.dg/graphite/block-6.c: Same.
1209 * gcc.dg/graphite/block-7.c: Same.
1210 * gcc.dg/graphite/interchange-0.c: Same.
1211 * gcc.dg/graphite/interchange-1.c: Same.
1212 * gcc.dg/graphite/interchange-10.c: Same.
1213 * gcc.dg/graphite/interchange-11.c: Same.
1214 * gcc.dg/graphite/interchange-12.c: Same.
1215 * gcc.dg/graphite/interchange-2.c: Same.
1216 * gcc.dg/graphite/interchange-3.c: Same.
1217 * gcc.dg/graphite/interchange-4.c: Same.
1218 * gcc.dg/graphite/interchange-5.c: Same.
1219 * gcc.dg/graphite/interchange-6.c: Same.
1220 * gcc.dg/graphite/interchange-7.c: Same.
1221 * gcc.dg/graphite/interchange-8.c: Same.
1222 * gcc.dg/graphite/interchange-9.c: Same.
1223 * gcc.dg/graphite/interchange-mvt.c: Same.
1224
422538b1 12252010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1226
1227 * gfortran.dg/graphite/id-19.f: New.
1228 * gfortran.dg/graphite/pr14741.f90: New.
1229 * gfortran.dg/graphite/pr41924.f90: New.
1230 * gfortran.dg/graphite/run-id-2.f90: New.
1231
8fe76250 12322010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1233
1234 PR middle-end/42988
1235 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1236 to unknown_dependence.
1237 (graphite_legal_transform_dr): Handle the unknown_dependence.
1238 (graphite_carried_dependence_level_k): Same.
1239
6c9df8cb 12402010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1241
1242 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1243
b7ac929d 12442010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1245 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1246
1247 PR middle-end/42637
1248 * graphite-dependences.c (build_lexicographical_constraint): Return
1249 a union of dependence polyhedra.
1250 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1251
6c9df8cb 1252 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1253 * gcc.dg/graphite/block-4.c: Same.
1254 * gcc.dg/graphite/block-7.c: Same.
1255 * gcc.dg/graphite/interchange-12.c: Same.
1256 * gcc.dg/graphite/interchange-mvt.c: Same.
1257 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1258 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1259 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
b7ac929d 1260
015d0b5c 12612010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1262
6c9df8cb 1263 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
015d0b5c 1264 the execution check to FAIL. This testcase is miscompiled by Graphite
1265 and the check should be re-enabled.
6c9df8cb 1266 * gcc.dg/graphite/interchange-mvt.c: Same.
1267 * gcc.dg/graphite/block-0.c: Same.
1268 * gcc.dg/graphite/block-4.c: Same.
1269 * gcc.dg/graphite/block-7.c: Same.
015d0b5c 1270
a5414f1f 12712010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1272
6c9df8cb 1273 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1274 * gcc.dg/graphite/scop-0.c: Fix spaces.
1275 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1276 * gfortran.dg/graphite/block-2.f: Same.
1277 * gfortran.dg/graphite/block-3.f90: Same.
1278 * gfortran.dg/graphite/block-4.f90: Same.
1279 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1280 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
a5414f1f 1281
a071b80b 12822010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1283
1284 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1285 PDDR_ORIGINAL_SCATTERING_P.
1286 (pddr_is_empty): Rewritten.
1287 (print_dependence_polyhedron_layout): New.
1288 (print_pddr): New.
1289 (debug_pddr): New.
1290 (build_alias_set_powerset): Moved up.
1291 (poly_drs_may_alias_p): Moved up.
1292 (lexicographically_gt_p): Removed.
1293 (build_lexicographically_gt_constraint): Renamed
1294 build_lexicographical_constraint, reimplemented.
1295 (dependence_polyhedron_1): Simplified parameters.
1296 (dependence_polyhedron): Same. Keep along empty PDDRs
1297 to make efficient use of the cache.
1298 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1299 (graphite_legal_transform_dr): Rewritten.
1300 (graphite_legal_transform_bb): Pass fewer arguments to
1301 graphite_legal_transform_dr.
1302 (graphite_carried_dependence_level_k): Simplified implementation.
1303 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1304 (dot_transformed_deps_stmt_1): Same.
1305 (dot_original_deps): Same.
1306 (dot_transformed_deps): Same.
1307 * graphite-dependences.h (struct poly_ddr): Added a new field
1308 original_scattering_p.
1309 (PDDR_ORIGINAL_SCATTERING_P): New.
1310 (print_pddr): Declared.
1311 (debug_pddr): Declared.
1312 * graphite-ppl.c: Clarify comment.
1313 * sese.h (print_gimple_bb): Removed unused declaration.
1314 (debug_gbb): Same.
1315
d0546b2e 13162010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1317
6c9df8cb 1318 * g++.dg/graphite/graphite.exp: Rewritten.
1319 * gcc.dg/graphite/graphite.exp: Rewritten.
1320 * gfortran.dg/graphite/graphite.exp: Rewritten.
1321 * gcc.dg/graphite/block-0.c: Added runtime test.
1322 * gcc.dg/graphite/block-1.c: Same.
1323 * gcc.dg/graphite/block-3.c: Same.
1324 * gcc.dg/graphite/block-4.c: Same.
1325 * gcc.dg/graphite/block-5.c: Same.
1326 * gcc.dg/graphite/block-6.c: Same.
1327 * gcc.dg/graphite/block-7.c: Same.
1328 * gcc.dg/graphite/interchange-0.c: Same.
1329 * gcc.dg/graphite/interchange-1.c: Same.
1330 * gcc.dg/graphite/interchange-10.c: Same.
1331 * gcc.dg/graphite/interchange-11.c: Same.
1332 * gcc.dg/graphite/interchange-12.c: Same.
1333 * gcc.dg/graphite/interchange-2.c: Same.
1334 * gcc.dg/graphite/interchange-3.c: Same.
1335 * gcc.dg/graphite/interchange-4.c: Same.
1336 * gcc.dg/graphite/interchange-5.c: Same.
1337 * gcc.dg/graphite/interchange-6.c: Same.
1338 * gcc.dg/graphite/interchange-7.c: Same.
1339 * gcc.dg/graphite/interchange-8.c: Same.
1340 * gcc.dg/graphite/interchange-9.c: Same.
1341 * gcc.dg/graphite/interchange-mvt.c: Same.
1342 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
d0546b2e 1343
ce363cd5 13442010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1345
1346 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1347 background.
1348
13492010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1350
1351 * common.opt: Add -fgraphite-cloog-opts.
1352 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1353 * opts.c (decode_options): Same.
1354
7bcf2a47 13552010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1356
6c9df8cb 1357 * gcc.dg/graphite/id-17.c: New.
1358 * gcc.dg/graphite/pr41888.c: New.
1359 * gcc.dg/graphite/scop-22.c: New.
1360 * gfortran.dg/graphite/pr40982.f90: New.
7bcf2a47 1361
f21ef1e7 13622010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1363
1364 * graphite-dependences.c: Clarify comments.
1365 (build_pddr): Add an extra parameter direction.
1366 (graphite_legal_transform_dr): Use build_pddr.
1367 (dot_original_deps_stmt_1): Update use of build_pddr.
1368 (dot_transformed_deps_stmt_1): Same.
1369 (dot_original_deps): Same.
1370 (dot_transformed_deps): Same.
1371
6c9df8cb 1372 * gcc.dg/graphite/interchange-12.c: New.
1373 * gcc.dg/graphite/block-7.c: New.
f21ef1e7 1374
4f19d858 13752010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1376
1377 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1378 (pddr_transformed_scattering): Removed.
1379 (graphite_legal_transform_dr): Use build_pddr.
1380 (dot_original_deps_stmt_1): Same.
1381 (dot_transformed_deps_stmt_1): Same.
1382 (dot_original_deps): Same.
1383 (dot_transformed_deps): Same.
1384
4fe30658 13852010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1386
1387 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1388 (build_lexicographically_gt_constraint): Same.
1389 (dependence_polyhedron_1): Same.
1390 (dependence_polyhedron): Same.
1391
abc97125 13922010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1393
1394 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1395 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1396 (lexicographically_gt_p): Change type of direction to int.
1397 (build_lexicographically_gt_constraint): Same.
1398 (dependence_polyhedron_1): Same.
1399 (dependence_polyhedron): Same.
1400 (pddr_original_scattering): Use integers for direction.
1401 (pddr_transformed_scattering): Same.
1402 (graphite_legal_transform_dr): Same.
1403 (graphite_carried_dependence_level_k): Same.
1404
b57cb73e 14052010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1406
1407 * graphite-dependences.c (build_pairwise_constraint): Renamed
1408 ppl_build_relation. Moved...
1409 (dr_equality_constraints): Use ppl_build_relation.
1410 (build_pairwise_scheduling_equality): Same.
1411 (build_pairwise_scheduling_inequality): Same.
1412 * graphite-ppl.c (ppl_build_relation): ...here.
1413 * graphite-ppl.h (ppl_build_relation): Declared.
1414
2487de19 14152010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1416
1417 PR middle-end/42681
1418 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1419 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1420 Set gloog_error when such an expression failed to be built.
1421 (translate_clast): Early return when gloog_error is set.
1422 (gloog): Clear gloog_error. When gloog_error is set, call
1423 set_ifsese_condition to enable the original code. Return the status
1424 of the code generation based on gloog_error.
1425 * sese.c (set_ifsese_condition): New.
1426 * sese.h (set_ifsese_condition): Declared.
1427
6c9df8cb 1428 * g++.dg/graphite/pr42681.C: New.
2487de19 1429
efe339e3 14302010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1431
1432 PR middle-end/42732
1433 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1434 rename_nb_iterations.
1435 * sese.c (rename_variables_in_operand): New.
1436 (rename_variables_in_expr): New.
1437 (rename_nb_iterations): New.
1438 (sese_adjust_liveout_phis): Update the rename_map.
1439 * sese.h (rename_nb_iterations): Declared.
1440 * tree-scalar-evolution.c (scev_reset_htab): New.
1441 (scev_reset): Call scev_reset_htab.
1442 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1443
6c9df8cb 1444 * gfortran.dg/graphite/pr42732.f: New.
efe339e3 1445
a77f6f84 14462010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1447
1448 PR middle-end/42393
1449 * graphite-clast-to-gimple.c: Fix formatting.
1450 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1451 (expr_defined_in_loop_p): New.
1452 (add_loop_exit_phis): Also handle full expressions: remove from
1453 the rename_map the expressions defined in the loop that we're closing.
1454
6c9df8cb 1455 * gfortran.dg/graphite/pr42393-1.f90: New.
1456 * gfortran.dg/graphite/pr42393.f90: Add new flags
a77f6f84 1457 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1458 make this testcase useful in the Graphite branch.
1459
01e31b4b 14602010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1461
1462 * graphite-scop-detection.c (exclude_component_ref): Removed.
1463 (is_simple_operand): Removed.
1464 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1465
2379556f 14662010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1467
1468 PR middle-end/42221
1469 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1470 the array indexing of ADDR_EXPRs.
1471
6c9df8cb 1472 * gcc.dg/graphite/pr42221.c: New.
2379556f 1473
d9458edc 14742010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1475
1476 PR middle-end/42521
1477 * graphite.c (graphite_finalize): Call scev_reset.
1478 (graphite_transform_loops): Do not call scev_reset between the code
1479 generation of scops.
1480
6c9df8cb 1481 * gcc.dg/graphite/pr42521.c: New.
d9458edc 1482
b33d4eb4 14832010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1484
1485 * graphite-interchange.c (memory_stride_in_loop): Renamed
1486 pdr_stride_in_loop.
1487 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1488 (memory_strides_in_loop): Memoize the memory strides per loop.
1489 (lst_interchange_profitable_p): Do not initialize to zero the memory
1490 strides.
1491 * graphite-poly.h (struct lst): Add a field memory_strides.
1492 (LST_LOOP_MEMORY_STRIDES): New.
1493 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1494 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1495
a16e8346 14962010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1497
1498 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1499 memory_strides_in_loop. Gather memory strides on a whole loop.
1500 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1501 (lst_interchange_profitable_p): Removed.
1502 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1503
2edfa860 15042010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1505
1506 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1507 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1508 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1509 Remove context_loop and level.
1510
3f12432d 15112010-01-07 Richard Guenther <rguenther@suse.de>
1512
1513 PR tree-optimization/42641
1514 * sese.c (rename_map_elt_info): Use the SSA name version, do
1515 not hash pointers.
1516
15172010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1518
1519 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1520 blocked" only when both the strip mine and the interchange have
1521 been applied.
1522
6c9df8cb 1523 * gcc.dg/graphite/block-2.c: Removed.
1524 * gcc.dg/graphite/block-3.c: Add scan pattern.
1525 * gcc.dg/graphite/block-4.c: Same.
1526 * gcc.dg/graphite/block-5.c: Same.
1527 * gcc.dg/graphite/block-6.c: Same.
3f12432d 1528
cfd3faac 15292010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1530
1531 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1532 before allocating a new one.
1533 (copy_renames): Check that slot is not NULL.
1534 (mark_bb_with_pbb): Same.
1535 (compute_cloog_iv_types_1): Same.
1536 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1537 nest, and after LSTs.
1538 (lst_try_interchange_loops): Same.
1539
a1a6700b 15402010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1541
1542 PR middle-end/42178
1543 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1544 the before, nest, and after LSTs.
1545 (lst_try_interchange): Removed.
1546 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1547 were modified.
1548 (lst_interchange_select_outer): Apply interchange on the outer loop
1549 until there are no more changes in the inner loops.
1550
7f60ea7e 15512009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1552
1553 Revert patch fixing PR middle-end/42221.
1554
15552009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1556
1557 PR middle-end/42180
1558 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1559 GIMPLE_CALL.
1560
6c9df8cb 1561 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
7f60ea7e 1562
c668dee5 15632009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1564
1565 PR middle-end/42180
1566 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1567 that contain only one statement.
1568
6c9df8cb 1569 * gfortran.dg/graphite/pr42180.f90: New.
7f60ea7e 1570
a190b734 15712009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1572
1573 PR middle-end/42393
6c9df8cb 1574 * gfortran.dg/graphite/pr42393.f90: New.
a190b734 1575
1747b6ef 15762009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1577
1578 PR middle-end/42186
6c9df8cb 1579 * gfortran.dg/graphite/pr42186.f90: New.
1747b6ef 1580
36f22aa0 15812009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1582
1583 PR middle-end/42205
1584 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1585 Insert the reduction copy in the same block as the phi node.
1586 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1587
6c9df8cb 1588 * gcc.dg/graphite/pr42205-1.c: New.
1589 * gcc.dg/graphite/pr42205-2.c: New.
36f22aa0 1590
15912009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1592
1593 PR middle-end/42221
1594 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1595 the array indexing of ADDR_EXPRs.
1596
6c9df8cb 1597 * gcc.dg/graphite/pr42221.c: New.
36f22aa0 1598
673c512e 15992009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1600
1601 PR middle-end/42178
1602 PR middle-end/42334
1603 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1604 index. Call lst_interchange_select_inner only once.
1605 (lst_interchange_select_inner): Update use of lst_try_interchange.
1606 (lst_interchange_select_outer): Update.
1607
16082009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1609
1610 PR middle-end/42178
1611 PR middle-end/42334
1612 * graphite-interchange.c (lst_try_interchange): Do not increment the
1613 the OUTER index when there is no AFTER kernel. Do not increment the
1614 OUTER index for after processing the AFTER kernel.
1615 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1616 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1617 index. Do not pass to lst_interchange_select_inner the OUTER index.
1618 (scop_do_interchange): Update use of lst_interchange_select_outer.
1619
6c9df8cb 1620 * gfortran.dg/graphite/graphite.exp
673c512e 1621 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
6c9df8cb 1622 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
673c512e 1623 the graphite dump file.
6c9df8cb 1624 * gfortran.dg/graphite/interchange-2.f: Same.
1625 * gfortran.dg/graphite/pr42334-1.f: New.
673c512e 1626
16272009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1628
1629 PR middle-end/42178
1630 PR middle-end/42334
1631 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1632 that are empty.
1633 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1634 (lst_try_interchange): Reimplemented.
1635 (lst_interchange_select_inner): Same.
1636 (lst_do_interchange): Renamed lst_interchange_select_outer.
1637 Reimplemented.
1638 (scop_do_interchange): Update use of lst_interchange_select_outer.
1639
6c9df8cb 1640 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1641 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1642 * gcc.dg/graphite/pr42211.c: New.
1643 * gfortran.dg/graphite/pr42334.f90: New.
673c512e 1644
99c136a5 16452009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1646
1647 PR middle-end/42181
1648 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1649 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1650
6c9df8cb 1651 * gfortran.dg/graphite/pr42181.f90: New.
99c136a5 1652
5184a05f 16532009-12-12 Sebastian Pop <sebpop@gmail.com>
1654
1655 PR middle-end/42284
1656 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1657 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1658 (detect_commutative_reduction_arg): Simplified.
1659 (detect_commutative_reduction): Early return when the argument of
1660 the close phi is not of an SSA_NAME.
1661
6c9df8cb 1662 * gcc.dg/graphite/pr42284.c: New.
5184a05f 1663
16642009-12-11 Alexander Monakov <amonakov@ispras.ru>
1665
1666 * dbgcnt.def (graphite_scop): New counter.
1667 * graphite.c: Include dbgcnt.h
1668 (graphite_transform_loops): Use new counter to limit transformations.
1669
7464e753 16702009-12-08 Sebastian Pop <sebpop@gmail.com>
1671
1672 PR middle-end/42285
1673 * graphite-scop-detection.c (graphite_can_represent_init): Also
1674 handle more complex MULT_EXPRs containing parameters by recursion
1675 on the structure.
1676
6c9df8cb 1677 * gfortran.dg/graphite/pr42285.f90: New.
7464e753 1678
16792009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1680
6c9df8cb 1681 * g++.dg/graphite/pr42130.C: Fix type.
7464e753 1682
f96db528 16832009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1684
6c9df8cb 1685 * g++.dg/graphite/pr42130.C: Correct testcase.
1686
16872009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1688
1689 * Merge from mainline (154493:154734).
1690
16912009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1692
1693 * Merge from mainline (151362:154491).
f96db528 1694
b7bde372 16952009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1696
1697 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1698 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1699
32e78944 17002009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1701
1702 PR middle-end/42130
1703 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1704 translate_clast_for_loop): New.
1705 (translate_clast_for): Add a condition around the loop, to do not
1706 execute loops with zero iterations.
6c9df8cb 1707 * g++.dg/graphite/pr42130.C: New.
1708 * gcc.dg/graphite/pr35356-2.c: Adapt.
32e78944 1709
bafaa7f6 17102009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1711
1712 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1713 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1714 Remove context_loop and level.
1715
0f5b569a 17162009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1717
1718 * graphite-clast-to-gimple.c (translate_clast_user,
1719 translate_clast_for, translate_clast_guard): Simplify and move common
1720 elements to translate_clast().
1721 (translate_clast): Simplify and get common elements.
1722
9a75e57c 17232009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1724
1725 * graphite-clast-to-gimple.c (translate_clast_user,
1726 translate_clast_for, translate_clast_guard): Split out of
1727 translate_clast.
1728
c9ef6b0e 17292009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1730
1731 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1732 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1733 debug_clast_name_indexes_1, debug_clast_name_indexes,
1734 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1735 (clast_name_to_gcc, clast_to_gcc_expression,
1736 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1737 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1738 graphite_create_guard_cond_expr, graphite_create_new_loop,
1739 translate_clast): Add params_index.
1740 (initialize_cloog_names): Create parameter strings from scratch, do
1741 not reference other strings.
1742 (create_params_index): New.
1743 (gloog): Initialize params_index.
1744 * graphite-scop-detection (free_scops_1): Removed.
1745 (limit_scops): Use normal free_scops.
1746 * graphite-sese-to-poly.c (save_var_names): Removed.
1747 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1748 and SESE_PARAMS_INDEX.
1749 * sese.c (new_sese, free_sese): Dito.
1750 * sese.h (struct sese): Remove params_index, params_names.
1751 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1752
a2a00920 17532009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1754
1755 Revert the following patch from 2009-09-14:
1756 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1757 tree-scalar-evolution.h, and then tree-data-ref.h.
1758 * graphite-clast-to-gimple.c: Same.
1759 * graphite-dependences.c: Same.
1760 * graphite-interchange.c: Same.
1761 * graphite-poly.c: Same.
1762 * graphite-scop-detection.c: Same.
1763 * graphite-sese-to-poly.c: Same.
1764 * graphite.c: Same.
1765 * lambda-code.c: Same.
1766 * matrix-reorg.c: Same.
1767 * tree-data-ref.c: Same.
1768 * tree-if-conv.c: Same.
1769 * tree-loop-distribu: Same.: Same.
1770 * tree-loop-linear.c: Same.
1771 * tree-parloops.c: Same.
1772 * tree-predcom.c: Same.
1773 * tree-vect-patterns.c: Same.
1774
2bc59caa 17752009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1776
1777 Revert patch from 2009-09-14.
1778 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1779 passes at -O1 and below.
1780
1d4dd1ed 17812009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1782
1783 PR middle-end/40281
6c9df8cb 1784 * gcc.dg/graphite/pr40281.c: New.
1d4dd1ed 1785
1786 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1787 evolutions should not variate in inner loops.
1788
efe7b64c 17892009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1790
1791 PR middle-end/42050
6c9df8cb 1792 * gfortran.dg/graphite/pr42050.f90: New.
efe7b64c 1793
acba5819 17942009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1795
1796 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1797 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1798
64d8f27a 17992009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1800
1801 * graphite-blocking.c (scop_do_block): New.
1802 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1803 * graphite-poly.h (scop_do_block): Declared.
1804
9a0158f5 18052009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1806
1807 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1808 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1809 to transform depth into the time_depth before calling
1810 pbb_number_of_iterations_at_time.
1811 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1812 lst_depth.
1813
9d274e75 18142009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1815
1816 Reverted the patch for "scattering permutations" from 2009-10-28.
1817
1818 * graphite-poly.c (print_permutation): New.
1819 (debug_permutation): New.
1820 (new_poly_bb): Initialize PBB_PERMUTATION.
1821 (free_poly_bb): Free PBB_PERMUTATION.
1822 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1823 (struct pbb_permutation_elt): New.
1824 (PBB_PERMUTATION_ELT_STRIDE): New.
1825 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1826 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1827 (new_pbb_permutation_elt): New.
1828 (pbb_permutation_elt_free): New.
1829 (struct poly_bb): Add field permutation.
1830 (PBB_PERMUTATION): New.
1831 (print_permutation): Declared.
1832 (debug_permutation): Declared.
1833
3bcc3204 18342009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1835
1836 * graphite-interchange.c (build_partial_difference): New.
1837 (memory_stride_in_loop): Refactored the computation of
1838 equality constraints into build_partial_difference function.
1839 Added support for debugging stride computations.
1840
d996851c 18412009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1842
1843 * graphite-clast-to-gimple.c (gloog): Free if_region,
1844 if_region->true_region, and if_region->region.
1845 * sese.c (if_region_set_false_region): Free if_region->false_region.
1846 (create_if_region_on_edge): Do not use GGC_NEW.
1847 (move_sese_in_condition): Remove useless initialization.
1848
87d25ca7 18492009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1850
1851 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1852 for the loops created by the loop distribution. Do not modify the
1853 input LSTs.
1854 (lst_try_interchange_loops): Same. Use a temporary LST for the
1855 transformed schedule. Call lst_update_scattering before data
1856 dependence analysis.
1857 (lst_try_interchange): Pass an extra parameter INDEX.
1858 (lst_do_interchange_1): New.
1859 (lst_do_interchange): Call lst_do_interchange_1.
1860 (scop_do_interchange): Call lst_update_scattering.
1861 * graphite-poly.c (apply_poly_transforms): Do not call
1862 lst_update_scattering.
1863 * graphite-poly.h (lst_pred): New.
1864 (lst_succ): New.
1865 (lst_find_first_pbb): Return NULL when not found.
1866 (lst_empty_p): New.
1867 (lst_insert_in_sequence): Allow LST1 to be NULL.
1868 (lst_replace): New.
1869 (lst_substitute_3): New.
1870 * gcc.dg/graphite/interchange-1.c: XFail.
1871 * gcc.dg/graphite/interchange-8.c: XFail.
1872 * gcc.dg/graphite/interchange-11.c: XFail.
1873
06ced013 18742009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1875
1876 * graphite-interchange.c (lst_perfectly_nested_p): New.
1877 (lst_perfect_nestify): New.
1878 (lst_try_interchange_loops): Call store_lst_schedule,
1879 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1880 (scop_do_interchange): Avoid redundant legality test.
1881 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1882 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1883 * graphite-poly.h (psct_static_dim): New.
1884 (lst_dewey_number_at_depth): New.
1885 (lst_find_pbb): Restructured.
1886 (lst_find_first_pbb): Restructured.
1887 (lst_find_last_pbb): New.
1888 (lst_contains_p): New.
1889 (lst_contains_pbb): New.
1890 (lst_create_nest): New.
1891 (lst_remove_from_sequence): New.
1892 (pbb_update_scattering): New.
1893 (lst_update_scattering_under): New.
1894 (lst_update_scattering_seq): New.
1895 (lst_update_scattering): New.
1896 (lst_insert_in_sequence): New.
1897 (lst_distribute_lst): New.
1898 (lst_remove_all_before_including_pbb): New.
1899 (lst_remove_all_before_excluding_pbb): New.
1900
bf3aab8f 19012009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1902
1903 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1904 get_loop_exit_edges.
1905
06b1d38c 19062009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1907
1908 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1909
22467ffb 19102009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1911
1912 * graphite-poly.c (print_permutation): New.
1913 (debug_permutation): New.
1914 (new_poly_bb): Initialize PBB_PERMUTATION.
1915 (free_poly_bb): Free PBB_PERMUTATION.
1916 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1917 (struct pbb_permutation_elt): New.
1918 (PBB_PERMUTATION_ELT_STRIDE): New.
1919 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1920 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1921 (new_pbb_permutation_elt): New.
1922 (pbb_permutation_elt_free): New.
1923 (struct poly_bb): Add field permutation.
1924 (PBB_PERMUTATION): New.
1925 (print_permutation): Declared.
1926 (debug_permutation): Declared.
1927
628eaf60 19282009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1929
1930 * graphite-clast-to-gimple.c (gloog): Do not call
1931 sese_reset_aux_in_loops.
1932 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
1933 extra argument for domains. Do not use loop->aux.
1934 (build_scop_iteration_domain): Initialize and free domains, pass it
1935 to build_loop_iteration_domains and extract the information from
1936 domains. Do not use loop->aux.
1937 * sese.c (sese_reset_aux_in_loops): Removed.
1938 * sese.h (sese_reset_aux_in_loops): Removed.
1939
2eb8c11d 19402009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1941
1942 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
1943 (dependency_in_loop_p): Same.
1944 (translate_clast): Do not use loop->aux. Initialize
1945 loop->can_be_parallel.
1946 (mark_loops_parallel): Removed.
1947 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
1948 * graphite.c (free_aux_in_new_loops): Removed.
1949 (graphite_finalize): Do not call free_aux_in_new_loops.
1950 (graphite_transform_loops): Do not call mark_loops_parallel.
1951
19522009-10-26 Li Feng <nemokingdom@gmail.com>
86cbf617 1953
1954 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
1955 (translate_clast): Pass an extra parameter LEVEL.
1956 Call get_scattering_level.
1957 * graphite-clast-to-gimple.h (get_scattering_level): New.
1958
314c9614 19592009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1960
1961 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
1962 * cfgloop.h (struct loop): New field single_iv.
1963
1964 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
1965 loop->aux anymore: use loop->single_iv.
1966 (graphite_loop_normal_form): Moved...
1967 (build_graphite_loop_normal_form): Removed.
1968 (gloog): Do not call build_graphite_loop_normal_form.
1969 (free_aux_in_new_loops): Moved...
1970 (mark_loops_parallel): Restructure.
1971 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
1972 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
1973 (scop_canonicalize_loops): New.
1974 (build_poly_scop): Call scop_canonicalize_loops.
1975 * graphite.c (free_aux_in_new_loops): ...here.
1976
71bc7526 19772009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1978
1979 * g++.dg/graphite/graphite.exp: Add the same rules as in
1980 gcc.dg/graphite/graphite.exp.
1981
24af1ef8 19822009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1983
1984 * g++.dg/graphite/id-1.C: New.
1985
03c1327b 19862009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1987
1988 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
1989 argument base_name.
1990 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
1991 (rewrite_phi_out_of_ssa): Same.
1992 (rewrite_cross_bb_scalar_deps): Same.
1993 (translate_scalar_reduction_to_array): Same.
1994
8f9b64ca 19952009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1996
1997 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
1998 dump_alias_graphs.
1999
aa16918e 20002009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2001
2002 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2003 (build_scop_drs): Call dump_alias_graphs.
2004
7e7ffe19 20052009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2006
2007 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2008 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2009 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2010 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2011 * graphite-poly.h (free_lst): New.
2012 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2013 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2014
e2622b4f 20152009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2016
2017 * graphite-poly.h (struct scop): Add a field saved_schedule.
2018 (SCOP_SAVED_SCHEDULE): New.
2019 (store_lst_schedule): New.
2020 (restore_lst_schedule): New.
2021 (store_scattering): Call store_lst_schedule.
2022 (restore_scattering): Call restore_lst_schedule.
2023
1a95516e 20242009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2025
2026 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2027 (pdr_add_alias_set): Same.
2028 (build_poly_dr): Same.
2029 (build_alias_set_optimal_p): Same.
2030 (build_base_obj_set_for_drs): Same. Do not store the result of
2031 graphds_dfs.
2032
f289f81b 20332009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2034
2035 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2036 all_components_are_cliques to 1.
2037
e9a3f95f 20382009-10-20 Li Feng <nemokingdom@gmail.com>
2039
2040 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2041 the new structure.
2042 (pdr_add_alias_set): Update retrieving alias_set_num.
2043 (build_poly_dr): Update retrieving dr_base_object_set.
2044 (partition_drs_to_sets): Remove.
2045 (build_alias_set_optimal_p): New.
2046 (build_alias_set_for_drs): Rename.
2047 (build_scop_drs): Update.
2048 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2049 (ALIAS_SET_INDEX): Remove.
2050 (BASE_OBJECT_SET_INDEX): Remove.
2051
a6457fb8 20522009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2053
2054 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2055
3354e72e 20562009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2057
2058 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2059 loop upper bounds for 1-element arrays at end of structures.
2060 * tree-flow.h (array_at_struct_end_p): Declared.
2061 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2062
917c8e43 20632009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2064
2065 * g++.dg/graphite/pr41305.C: New.
2066
b6410506 20672009-10-20 Alexander Monakov <amonakov@ispras.ru>
2068
2069 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2070 construction of parameter constraints from loop iteration analysis.
2071 * gcc.dg/graphite/run-id-2.c: New test.
2072
a66257d5 20732009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2074
2075 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2076 and new_cstr.
2077
38e3217b 20782009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2079
2080 * graphite-dependences.c (dependence_polyhedron_1): Remove
2081 unused gdim dimensions from the DDR polyhedron.
2082
de38f9c0 20832009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2084
2085 * graphite-dependences.c (pddr_transformed_scattering): New.
2086 (dot_original_deps_stmt_1): New.
2087 (dot_transformed_deps_stmt_1): New.
2088 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2089 dot_transformed_deps_stmt_1.
2090 (dot_original_deps): New.
2091 (dot_transformed_deps): New.
2092 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2093
ba01d66f 20942009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2095
2096 * graphite-dependences.c (reduction_dr_1): Remove wrong
2097 assert: reduction BBs can have multiple reduction writes
de38f9c0 2098 to memory. interchange-3.f90 is an example.
ba01d66f 2099
9050e62f 21002009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2101
2102 * gfortran.dg/graphite/interchange-3.f90: New.
2103
d26b2d30 21042009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2105
2106 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2107
bff9278d 21082009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2109
2110 * graphite-dependences.c (dependence_polyhedron_1): Add the
2111 context to the dependence polyhedron.
2112
13d0cae2 21132009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2114
2115 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2116 PBB_PDR_DUPLICATES_REMOVED.
2117 (new_poly_bb): Same.
2118
acb3969f 21192009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2120
2121 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2122 SCOP_CONTEXT.
2123 (build_loop_iteration_domains): Extract bounds on parameters
2124 based on the data size.
2125 (build_scop_context): Do not initialize SCOP_CONTEXT;
2126 add new constraints.
2127
e6d78739 21282009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2129
2130 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2131 * graphite-ppl.h (graphite-ppl.h): Declared.
2132
409f96c1 21332009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2134
2135 * graphite-ppl.c (ppl_print_linear_expr): New.
2136 (debug_ppl_linear_expr): New.
2137 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2138 (debug_ppl_linear_expr): Declared.
2139
3d695986 21402009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2141
2142 * graphite-interchange.c: Fix comments.
2143 * gcc.dg/graphite/block-1.c: Fix comments.
2144
ecab863e 21452009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2146
2147 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2148 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2149
3dfb9fc0 21502009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2151
2152 Reapply the patch from Alexander Monakov that disappeared during
2153 the last merges from trunk.
2154
2155 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2156
2157 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2158 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2159
a1190c1b 21602009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2161
2162 * graphite-interchange.c (memory_stride_in_loop): The depth
2163 argument corresponds to a dynamic time dimension, so use
2164 psct_dynamic_dim to refer to the transformed scattering dimension.
2165
dd3d3fae 21662009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2167
2168 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2169
43217ce9 21702009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2171
2172 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2173 root of the LST.
2174 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2175 the root of the LST.
2176 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2177 fake loop.
2178 (print_lst): Print the root of LST in a different format.
2179 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2180
9b6c835c 21812009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2182
2183 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2184
1e2a9aa7 21852009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2186
2187 * doc/passes.texi: Document the Graphite infrastructure.
2188
ff010926 21892009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2190
2191 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2192 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2193 and check the SSA representation.
2194
2195 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2196
fa846ea9 21972009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2198
2199 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2200
fe45c436 22012009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2202
2203 * gcc.dg/graphite/interchange-11.c: New.
2204
2e3e5ac8 22052009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2206
2207 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2208
93a95718 22092009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2210
2211 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2212 Add -fno-loop-strip-mine and -fno-loop-interchange.
2213 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2214 -fno-loop-strip-mine.
2215 * gfortran.dg/graphite/graphite.exp: Same.
2216
196689e3 22172009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2218
2219 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2220 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2221 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2222 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2223 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2224 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2225 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2226 DEFAULT_FLAGS_GRAPHITE_SCOP.
2227 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2228 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2229
d9e94834 22302009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2231
2232 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2233
5e18ab2b 22342009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2235 Sebastian Pop <sebastian.pop@amd.com>
2236
2237 * graphite-interchange.c (build_linearized_memory_access): Pass an
2238 offset as parameter.
2239 (memory_stride_in_loop): Include transform scattering in the
2240 access functions to be able to querry the strides in the
2241 transformed loops.
2242 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2243 not the psct_iterator_dim.
2244
0befefcc 22452009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2246
2247 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2248 (lst_do_strip_mine_loop): New.
2249 (lst_do_strip_mine): New.
2250 (scop_do_strip_mine): Call lst_do_strip_mine.
2251 * graphite-poly.h (lst_add_loop_under_loop): New.
2252 (lst_find_first_pbb): New.
2253
71b90bc3 22542009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2255
2256 * graphite-poly.c (loop_to_lst): Fix LST creation.
2257
4d6599d0 22582009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2259
6c9df8cb 2260 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
4d6599d0 2261 sizeof(unsigned long) to make it run on 32bit systems.
2262
22632009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2264
6c9df8cb 2265 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
4d6599d0 2266 SEGFAULT on 32bit.
2267
96233858 22682009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2269
4d6599d0 2270 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2271 Comment.
96233858 2272 (write_alias_graph_to_ascii_dot): New.
2273 (write_alias_graph_to_ascii_ecc): Ditto.
4d6599d0 2274 (partition_drs_to_sets): Add testing of optimality of current method
2275 which assigns alias numbers according to DFS Comopnent number. used
2276 as heuristic for the upcoming ECC algorithm.
96233858 2277 (build_scop_drs): Write to file also with the ecc and dot format.
2278
8eedbd74 22792009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2280
2281 * gfortran.dg/graphite/interchange-1.f: XFail.
2282
ef98ee10 22832009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2284
2285 * graphite.c (graphite_initialize): Do not handle functions with
2286 more than 100 basic blocks.
2287
b8ad26cc 22882009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2289
2290 * graphite-blocking.c (pbb_do_strip_mine): Use
2291 PARAM_LOOP_BLOCK_TILE_SIZE.
2292
4938b827 22932009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2294
2295 * graphite-poly.c (dot_lst_1): New.
2296 (dot_lst): New.
2297 * graphite-poly.h (dot_lst): Declared.
2298
a7d089ac 22992009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2300
2301 * graphite-dependences.c (dot_deps_stmt_1): New.
2302 (dot_deps_stmt): New.
2303 * graphite-dependences.h (dot_deps_stmt): Declared.
2304
dd27e8aa 23052009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2306
2307 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2308 not replace cross BB scalar dependences ending on PHI nodes.
2309 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2310
dbe2e816 23112009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2312
2313 * graphite-poly.c (apply_poly_transforms): Implement the high
2314 level driver for flag_loop_block.
6c9df8cb 2315 * opts.c (decode_options): Enable flag_loop_block at -O2.
dbe2e816 2316 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2317 flag_loop_block.
2318
2319 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2320 -floop-block.
2321 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2322 Add -floop-block.
2323
89d077e8 23242009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2325
2326 * graphite-poly.h (lst_find_pbb): New.
2327 (find_lst_loop): New.
2328
220b380e 23292009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2330
2331 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2332 * graphite-poly.h (struct scop): Remove dep_graph field.
2333 (SCOP_DEP_GRAPH): Removed.
2334
554eeadb 23352009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2336
2337 * graphite-poly.h (copy_lst): Do full copy of LST.
2338
30105622 23392009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2340
2341 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2342 when the loop stride is zero.
2343
2344 * gcc.dg/graphite/id-16.c: New.
2345
f007fe97 23462009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2347
2348 * graphite-dependences.c (reduction_dr_1): New.
2349 (reduction_dr_p): New.
2350 (graphite_legal_transform_dr): Call reduction_dr_p.
2351 (reduction_ddr): Renamed reduction_ddr_p.
2352 * graphite-poly.h (same_pdr_p): New.
2353 (number_of_write_pdrs): New.
2354 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2355 (split_reduction_stmt): Do not split reduction statements
2356 when there are no writes to memory.
2357 (translate_scalar_reduction_to_array_for_stmt): Insert the
2358 memory reduction statement just after the scalar reduction statement.
2359
2360 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2361 Un-XFAIL-ed.
2362 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2363 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2364
4d0382bc 23652009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2366
2367 * graphite-interchange.c (lst_apply_interchange): New.
2368 (lst_interchange_profitable_p): New.
2369 (lst_try_interchange_loops): New.
2370 (lst_try_interchange): New.
2371 (lst_do_interchange): New.
2372 (pbb_do_interchange): Removed.
2373 (scop_do_interchange): Call lst_do_interchange.
2374
f77385d3 23752009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2376
2377 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2378 SCOP_TRANSFORMED_SCHEDULE.
2379 (loop_to_lst): New.
2380 (scop_to_lst): New.
2381 (print_lst): New.
2382 (debug_lst): New.
2383 * graphite-poly.h (lst_p): New.
2384 (struct lst): New.
2385 (LST_LOOP_P): New.
2386 (LST_LOOP_FATHER): New.
2387 (LST_PBB): New.
2388 (LST_SEQ): New.
2389 (scop_to_lst): Declared.
2390 (print_lst): Declared.
2391 (debug_lst): Declared.
2392 (new_lst_loop): New.
2393 (new_lst_stmt): New.
2394 (copy_lst): New.
2395 (lst_depth): New.
2396 (lst_dewey_number): New.
2397 (struct scop): Add original_schedule and transformed_schedule fields.
2398 (SCOP_ORIGINAL_SCHEDULE): New.
2399 (SCOP_TRANSFORMED_SCHEDULE): New.
2400 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2401
30f4f4a6 24022009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2403
2404 * graphite-dependences.c (reduction_ddr): New.
2405 (graphite_legal_transform_bb): Call reduction_ddr.
2406 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2407 Initialize PBB_IS_REDUCTION.
2408 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2409 (PBB_IS_REDUCTION): New.
2410 (new_poly_bb): Update declaration.
2411 * graphite-scop-detection.h (build_scop_bbs): Removed.
2412 (nb_reductions_in_loop): Removed.
2413 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2414 parameter for reductions.
2415 (try_generate_gimple_bb): Update call to new_poly_bb.
2416 (build_scop_bbs_1): Same.
2417 (build_scop_bbs): Same.
2418 (gsi_for_phi_node): New.
2419 (scalar_close_phi_node_p): Remove gcc_assert.
2420 (split_reduction_stmt): New.
2421 (is_reduction_operation_p): New.
2422 (phi_contains_arg): New.
2423 (follow_ssa_with_commutative_ops): New.
2424 (detect_commutative_reduction_arg): New.
2425 (detect_commutative_reduction_assign): New.
2426 (follow_inital_value_to_phi): New.
2427 (edge_initial_value_for_loop_phi): New.
2428 (initial_value_for_loop_phi): New.
2429 (detect_commutative_reduction): New.
2430 (translate_scalar_reduction_to_array_for_stmt): New.
2431 (insert_copyout): New.
2432 (insert_copyin): New.
2433 (translate_scalar_reduction_to_array): New.
2434 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2435 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2436 (rewrite_commutative_reductions_out_of_ssa): New.
2437 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2438 * sese.h (split_region_for_bb): New.
2439
2440 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2441 * gcc.dg/graphite/interchange-1.c: Fix format.
2442 * gcc.dg/graphite/interchange-10.c: New.
2443
dcdff5dc 24442009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2445
2446 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2447 buggy assert.
2448
5061777c 24492009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2450
2451 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2452 (rewrite_cross_bb_scalar_dependence): New.
2453 (rewrite_cross_bb_scalar_deps): New.
2454 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2455 Call rewrite_cross_bb_scalar_deps.
2456
52123e43 24572009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2458
2459 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2460 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2461 gsi_for_stmt.
2462
ef43e998 24632009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2464
2465 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2466 * graphite-interchange.c (pbb_do_interchange): Same.
2467 * graphite-poly.c (print_scattering_function): Same.
2468 (debug_pdrs): Same.
2469 * graphite-poly.h (pbb_loop): New.
2470 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2471
7bf7d520 24722009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2473
2474 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2475
9c48819a 24762009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2477
2478 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2479 so don't pass a pointer to it.
2480 (build_alias_set_for_drs): Same.
2481 (build_base_obj_set_for_drs): Same.
2482 (build_scop_drs): Same.
2483
af3b89d1 24842009-09-26 Li Feng <nemokingdom@gmail.com>
2485
2486 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2487 the alias graph of data references.
2488
8dee37ec 24892009-09-25 Li Feng <nemokingdom@gmail.com>
2490
2491 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2492 (build_scop_drs): When debugging, write the alias graph to file,
2493 otherwise, should be disabled.
2494
6c9df8cb 24952009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2496
2497 * Merge from mainline (151310:151361).
2498
24992009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2500
2501 * Merge from mainline (151171:151310).
2502
25032009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2504
2505 * Merge from mainline (151171:151806).
2506
25072009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2508
2509 * Revert the last commit.
2510
25112009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2512
2513 * Merge from mainline (151171:151819).
2514
3cc56eaf 25152009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2516
2517 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2518 (is_simple_operand): Remove call to stmt_simple_memref_p.
2519 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2520
4d62cf0c 25212009-09-17 David Edelsohn <edelsohn@gnu.org>
2522
6c9df8cb 2523 * gcc.dg/graphite/interchange-mvt.c: New File.
2524 * gcc.dg/graphite/scop-dsyrk.c: New File.
2525 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2526 * gcc.dg/graphite/scop-mvt.c: New File.
2527 * gcc.dg/graphite/scop-sor.c: New File.
4d62cf0c 2528
ae11f03b 25292009-09-17 Li Feng <nemokingdom@gmail.com>
2530
ae11f03b 2531 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2532 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2533 (graphite_carried_dependence_level_k): Ditto.
2534 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2535 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2536 (new_poly_dr): Adjust declaration.
2537 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2538 (free_gimple_bb): Added free_data_refs_aux.
2539 (build_poly_dr): Add dr_base_object_set.
2540 (partition_drs_to_sets): New.
2541 (dr_same_base_object_p): New.
2542 (build_alias_set_for_drs): New.
2543 (build_base_object_set_for_drs): New.
2544 (build_scop_drs): Add build_base_obj_set_for_drs.
2545 * graphite-sese-to-poly.h: Added #define for alias set number index and
2546 base object set index.
2547 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2548 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2549
e5d72697 25502009-09-16 Alexander Monakov <amonakov@ispras.ru>
2551
2552 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2553 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2554
db899978 25552009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2556
2557 * graphite-sese-to-poly.c (struct irp_data): Removed.
2558 (idx_record_params): Removed.
2559 (find_params_in_bb): Scan for parameters the access functions; don't
2560 parse the tree representation.
2561
e5b6be5e 25622009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2563
2564 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2565 passes at -O1 and below.
2566
f631009f 25672009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2568
2569 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2570 tree-scalar-evolution.h, and then tree-data-ref.h.
2571 * graphite-clast-to-gimple.c: Same.
2572 * graphite-dependences.c: Same.
2573 * graphite-interchange.c: Same.
2574 * graphite-poly.c: Same.
2575 * graphite-scop-detection.c: Same.
2576 * graphite-sese-to-poly.c: Same.
2577 * graphite.c: Same.
2578 * lambda-code.c: Same.
2579 * matrix-reorg.c: Same.
2580 * tree-data-ref.c: Same.
2581 * tree-if-conv.c: Same.
2582 * tree-loop-distribu: Same.: Same.
2583 * tree-loop-linear.c: Same.
2584 * tree-parloops.c: Same.
2585 * tree-predcom.c: Same.
2586 * tree-vect-patterns.c: Same.
2587
5e803fbe 25882009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2589
2590 Partially revert the previous patch, except the following.
2591 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2592 as parameters the operands of the not expression.
2593
c43f1e90 25942009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2595
2596 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2597 Do not call analyze_scalar_evolution on assignments.
2598 (instantiate_scev_phi): Call analyze_scalar_evolution.
2599 (instantiate_scev_name): Call instantiate_scev_assign and
2600 instantiate_scev_phi.
2601 (instantiate_scev_not): Adapted to pass as parameters the operands
2602 of the not expression.
2603
9e9aa0c6 26042009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2605
2606 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2607 to pass as parameters the operands of the binary expression.
2608
9d206f16 26092009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2610
2611 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2612 instantiate_scev_not. Handle NEGATE_EXPR.
2613 (instantiate_scev_r): Handle NEGATE_EXPR.
2614
d91a99f1 26152009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2616
2617 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2618 instantiate_scev_r.
2619 (instantiate_scev_r): Move code in instantiate_scev_2
2620 and instantiate_scev_1.
2621
378a6626 26222009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2623
2624 * tree-scalar-evolution.c (instantiate_scev_3): New.
2625 (instantiate_scev_1): Move code in instantiate_scev_3.
2626
a819f845 26272009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2628
2629 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2630 (instantiate_scev_1): Move code in instantiate_scev_poly.
2631
39251a91 26322009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2633
2634 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2635 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2636
7723692a 26372009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2638
2639 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2640 (instantiate_scev_1): Move code in instantiate_scev_convert.
2641
5a10dfba 26422009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2643
2644 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2645 (instantiate_scev_1): Move code in instantiate_scev_binary.
2646
0731d869 26472009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2648
2649 * tree-scalar-evolution.c (instantiate_scev_name): New.
2650 (instantiate_scev_1): Move code in instantiate_scev_name.
2651
26522009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2653
2654 * Merge from mainline (150992:151171).
2655
6c9df8cb 26562009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2657
2658 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2659
9e3531b5 26602009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2661
2662 * graphite-dependences.c (graphite_legal_transform_bb): Call
2663 pbb_remove_duplicate_pdrs.
2664 * graphite-poly.c (can_collapse_pdr): Removed.
2665 (pdr_find_duplicate): Removed.
2666 (can_collapse_pdrs): New.
2667 (pbb_remove_duplicate_pdrs): New.
2668 (new_poly_dr): Do not look for duplicates.
2669 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2670 (PBB_PDR_DUPLICATES_REMOVED): New.
2671 (pbb_remove_duplicate_pdrs): Declared.
2672
11b2102e 26732009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2674
2675 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2676 the strides by multiplying by PDR_NB_REFS.
2677 * graphite-poly.c (can_collapse_pdr): New.
2678 (pdr_find_duplicate): New.
2679 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2680 Initialize PDR_NB_REFS.
2681 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2682 (PDR_NB_REFS): New.
2683 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2684
26852009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2686
2687 Revert one of the previous commits:
2688 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2689 the computation of symmetric data dependence relations.
2690 (dependency_between_pbbs_p): Same.
2691
d0aaf399 26922009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2693
2694 PR middle-end/40965
2695 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2696 any transform.
2697
79698ff3 26982009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2699
2700 * graphite-dependences.c (pddr_original_scattering): Return NULL
2701 for read-read dependence relations.
2702 * graphite-poly.h (enum poly_dr_type): Fix comment.
2703 (pdr_read_p): New.
2704 (pdr_write_p): New.
2705 (pdr_may_write_p): New.
2706
c04f2da7 27072009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2708
2709 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2710 (struct poly_dr): Same.
2711 (new_poly_dr): Same.
2712 * graphite-poly.c (new_poly_dr): Same.
2713
ee0d08ad 27142009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2715 Sebastian Pop <sebastian.pop@amd.com>
2716
2717 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2718 pbb_strip_mine_time_depth. Changed the implementation so that
2719 transformation is expressed as a transformation on
2720 time (scatttering) dimensions. Also, ensures that the 2d+1
2721 scheduling format is preserved.
2722 (pbb_strip_mine_profitable_p): Profitability is based on the
2723 iteration number of a given time (scattering) dimension,
2724 and not on a original loop depth dimension.
2725 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2726 (pbb_do_strip_mine): Call psct_dynamic_dim.
2727 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2728 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2729 (pbb_nb_dynamic_scattering_transform): New.
2730 (psct_dynamic_dim): New.
2731
55c54afb 27322009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2733
2734 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2735 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2736 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2737 * graphite-interchange.c (build_linearized_memory_access): Same.
2738 (memory_stride_in_loop): Same.
2739
96b6d5d7 27402009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2741
2742 * graphite-dependences.c (pddr_original_scattering): New.
2743 (graphite_legal_transform_dr): Call pddr_original_scattering.
2744 (dot_deps_1): New.
2745 (dot_deps): New.
2746 * graphite-dependences.h (dot_deps): Declared.
2747 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2748 (print_pdr): Print PDR_ID.
2749 * graphite-poly.h (struct poly_dr): Add field id.
2750 (PDR_ID): New.
2751 (pbb_index): New.
2752 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2753
2b3a572c 27542009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2755
2756 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2757 not delete the original dependence relation.
2758
27592009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2760
2761 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2762 the computation of symmetric data dependence relations.
2763 (dependency_between_pbbs_p): Same.
2764
0d6b5db2 27652009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2766
2767 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2768 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2769 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2770 (free_poly_ddr): New.
2771 (pddr_is_empty): New.
2772 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2773 (dependence_polyhedron): Same. Remove useless gcc_assert.
2774 Remove fprintfs.
2775 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2776 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2777 * graphite-dependences.h (enum poly_dependence_kind): New.
2778 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2779 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2780 (PDRP_SINK): Renamed PDDR_SINK.
2781 (PDRP_DDP): Renamed PDDR_DDP.
2782 (PDDR_KIND): New.
2783 (free_poly_ddr): Declared.
2784 * graphite-poly.c (new_scop): Use the new hash function names.
2785 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2786 into original_pddrs.
2787 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2788
27892009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2790
2791 * Merge from mainline (150764:150992).
2792
02df46c6 27932009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2794
2795 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2796 bounds with LT_EXPR to make niter analysis more precise on code
2797 generated by Graphite.
2798
70a1a7a2 27992009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2800
2801 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2802 (graphite_legal_transform_bb): Same.
2803 (poly_drs_may_alias_p): Same.
2804
19eec579 28052009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2806
2807 PR middle-end/40981
2808 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2809 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2810
28112009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2812
2813 * graphite-poly.c (print_pbb): Print PBB index.
2814
28152009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2816
2817 * Merge from mainline (r150672:150764).
2818
28192009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2820
2821 * graphite-interchange.c (ppl_max_for_le): Moved...
2822 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2823 * graphite-ppl.c (ppl_max_for_le): ... here.
2824 * graphite-ppl.h (ppl_max_for_le): Declared.
2825
28262009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2827
2828 * Merge from mainline (r150372:150672).
2829
43f8b6ab 28302009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2831
2832 PR middle-end/40980
2833 * sese.c (convert_for_phi_arg): New.
2834 (add_guard_exit_phis): Use convert_for_phi_arg.
2835
6c9df8cb 2836 * gfortran.dg/graphite/id-17.f: New.
43f8b6ab 2837
96da1999 28382009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2839
2840 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2841 unknown subscript upper bounds.
2842
6c9df8cb 2843 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
96da1999 2844
80020e9d 28452009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2846 Pranav Garg <pranav.garg2107@gmail.com>
2847
2848 * graphite-interchange.c (gather_access_strides): Removed.
2849 (ppl_max_for_le): New.
2850 (build_linearized_memory_access): New.
2851 (memory_stride_in_loop): New.
2852 (pbb_interchange_profitable_p): Reimplemented.
2853 * graphite-ppl.h (ppl_new_id_map): New.
2854 (ppl_interchange): New.
2855
6c9df8cb 2856 * gcc.dg/graphite/interchange-6.c: XFAILed.
80020e9d 2857
c9fce634 28582009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2859
2860 * graphite-interchange.c (compute_subscript): Removed.
2861 (compute_array_size_cstr): Removed.
2862 (compute_array_size_poly): Removed.
2863 (compute_array_size): Removed.
2864 (gather_access_strides_poly): Removed.
2865 (gather_access_strides): Empty.
2866
85f74b79 28672009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2868
2869 * graphite-dependences.c (dependence_polyhedron_1): Replace
2870 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2871 (graphite_legal_transform_dr): Same.
2872 (graphite_carried_dependence_level_k): Same.
2873 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2874 Initialize PDR_NB_SUBSCRIPTS.
2875 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2876 PDR_NB_SUBSCRIPTS.
2877 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2878 (PDR_NB_SUBSCRIPTS): New.
2879 (pdr_nb_subscripts): Removed.
2880 (pdr_dim): Simplified.
2881 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2882 with PDR_NB_SUBSCRIPTS.
2883
19b42529 28842009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2885
2886 * graphite-interchange.c (compute_array_size): Remove use of
2887 PDR_DATA_CONTAINER.
2888 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2889 Do not initialize PDR_DATA_CONTAINER.
2890 (print_pdr): Do not print PDR_DATA_CONTAINER.
2891 * graphite-poly.h (struct poly_dr): Remove data_container field.
2892 (PDR_DATA_CONTAINER): Removed.
2893 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2894 PDR_DATA_CONTAINER.
2895 (build_poly_dr): Same.
2896
9daa8810 28972009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2898
6c9df8cb 2899 * gcc.dg/graphite/interchange-9.c: New.
9daa8810 2900
0835eab6 29012009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2902 Sebastian Pop <sebastian.pop@amd.com>
2903
2904 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2905 copy of the dependence polyhedron. Free the temporary objects.
2906 (graphite_carried_dependence_level_k): Free unused objects before
2907 returning.
2908
6c9df8cb 2909 * gcc.dg/graphite/interchange-1.c: XFAILed.
2910 * gcc.dg/graphite/interchange-2.c: XFAILed.
2911 * gcc.dg/graphite/interchange-3.c: XFAILed.
2912 * gcc.dg/graphite/interchange-4.c: XFAILed.
2913 * gcc.dg/graphite/interchange-7.c: XFAILed.
0835eab6 2914
a741358d 29152009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2916
2917 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2918 Early return without analyzing the data dependences if no
2919 transform has been done. Call restore_scattering if the transform
2920 is not legal.
2921 (graphite-interchange.c): Same.
2922 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2923 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2924 (apply_poly_transforms): Do not gcc_assert that
2925 the transform is legal.
2926 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2927 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
2928 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
2929 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2930 * graphite-poly.h (struct poly_scattering): New.
2931 (struct poly_bb): Add original, transformed, and saved fields.
2932 Remove transformed_scattering, original_scattering, nb_local_variables,
2933 and nb_scattering_transform fields.
2934 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
2935 (poly_scattering_new): New.
2936 (poly_scattering_free): New.
2937 (poly_scattering_copy): New.
2938 (store_scattering_pbb): New.
2939 (store_scattering): New.
2940 (restore_scattering_pbb): New.
2941 (restore_scattering): New.
2942 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2943 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
9daa8810 2944
95b2e0d3 29452009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2946
2947 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
2948 (print_scop): Same.
2949
675d86b2 29502009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2951
2952 * Makefile.in (graphite.o): Depends on PREDICT_H.
2953 * graphite.c: Include predict.h.
2954 (graphite_finalize): Call tree_estimate_probability.
2955 * predict.c (predict_loops): Do not call scev_initialize and
2956 scev_finalize.
2957 (tree_estimate_probability_bb): New.
2958 (tree_estimate_probability): Do not initialize loops: move that
2959 code to the driver. Call tree_estimate_probability_bb.
2960 (tree_estimate_probability_driver): New.
2961 (pass_profile): Use tree_estimate_probability_driver.
2962 * predict.h (tree_estimate_probability): Declared.
2963
525c22c4 29642009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2965
2966 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
2967 * graphite-dependences.c (graphite_legal_transform): Add time to
2968 TV_GRAPHITE_DATA_DEPS.
2969 (dependency_between_pbbs_p): Same.
2970 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2971
29722009-08-03 Sebastian Pop <sebastian.pop@amd.com>
2973
2974 * Merge from mainline (r149952:150372).
2975
c6bb733d 29762009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2977
2978 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
2979 * graphite-blocking.c: Same.
2980 * graphite-clast-to-gimple.c: Same.
2981 * graphite-dependences.c: Same.
2982 * graphite-poly.c: Same.
2983 * graphite-poly.h: Same.
2984 * graphite-ppl.c: Same.
2985 * graphite-scop-detection.c: Same.
2986 * graphite-sese-to-poly.c: Same.
2987 * graphite.c: Same.
2988
29892009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2990
2991 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
2992 (remove_simple_copy_phi): New.
2993 (remove_invariant_phi): New.
2994 (simple_copy_phi_p): New.
2995 (reduction_phi_p): New.
2996 (gsi_for_ssa_name_def): New.
2997 (insert_out_of_ssa_copy): New.
2998 (insert_out_of_ssa_copy_on_edge): New.
2999 (create_zero_dim_array): New.
3000 (scalar_close_phi_node_p): New.
3001 (rewrite_close_phi_out_of_ssa): New.
3002 (rewrite_phi_out_of_ssa): New.
3003 (rewrite_reductions_out_of_ssa): New.
3004 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3005
6c9df8cb 3006 * gcc.dg/graphite/id-11.c: New.
3007 * gcc.dg/graphite/id-15.c: New.
3008 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3009 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3010 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3011 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3012 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3013 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3014 * gfortran.dg/graphite/id-13.f: New.
3015 * gfortran.dg/graphite/id-5.f: New.
c6bb733d 3016
30172009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3018
3019 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3020 check that nb_reductions_in_loop is zero.
3021 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3022 reduction phi nodes.
3023 (nb_reductions_in_loop): Removed.
3024 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3025 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3026 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3027 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3028 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3029
30302009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3031
3032 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3033 statements that have an empty iteration domain.
6c9df8cb 3034 * gfortran.dg/graphite/id-16.f: New.
c6bb733d 3035
30362009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3037
3038 * tree-scalar-evolution.c (instantiate_scev_1): Return
3039 chrec_dont_know when the result is not above instantiate_below.
3040 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3041 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3042 the tree has a known scalar evolution.
6c9df8cb 3043 * gfortran.dg/graphite/id-14.f: New.
3044 * gfortran.dg/graphite/id-15.f: New.
c6bb733d 3045
30462009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3047
3048 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3049 insert_gsi.
3050 (rename_variables): Keep inserting renames after the ones already
3051 inserted.
3052
30532009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3054
3055 * graphite-sese-to-poly.c (compare_bb_depths): New.
3056 (graphite_sort_dominated_info): New.
3057 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3058 (build_scop_scattering): Fix comment.
3059
30602009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3061
3062 * graphite.c (graphite_finalize): Call print_loops instead of
3063 dump_function_to_file.
6c9df8cb 3064 * gcc.dg/graphite/graphite.exp: Fix formatting.
3065 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
c6bb733d 3066 loops generated in the graphite output file.
6c9df8cb 3067 * gcc.dg/graphite/pr35356-2.c: New.
3068 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3069 * gfortran.dg/graphite/id-12.f: New.
c6bb733d 3070
30712009-07-24 Li Feng <nemokingdom@gmail.com>
3072
6c9df8cb 3073 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
c6bb733d 3074 Remove 2 XFAIL.
3075
30762009-07-24 Li Feng <nemokingdom@gmail.com>
3077 Tobias Grosser <grosser@fim.uni-passau.de>
3078
3079 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3080 alias set number build alias in ACCESSES polyhedron.
3081 (build_alias_set_for_drs): New.
3082 (build_pbb_drs): Added build_alias_set_for_drs.
3083 * graphite-dependences.c (poly_drs_may_alias_p): New.
3084 (graphite_carried_dependence_level_k): Check alias information
3085 before building polyhedron.
3086
30872009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3088
3089 * Makefile.in (lambda-code.o): Fix formatting.
3090
30912009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3092
3093 * Merge from mainline (r149350-149952)
3094
30952009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3096
3097 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3098 before interchange to prepare for loop blocking.
3099
31002009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3101
3102 * graphite-poly.c (apply_poly_transforms): Add checks after every
3103 transformation.
3104 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3105 done in apply_poly_transforms.
3106
31072009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3108
3109 * graphite-dependences.c (build_lexicographically_gt_constraint):
3110 Replace RES parameter with *RES.
3111 (dependence_polyhedron_1): Pass an address of the parameter RES
3112 instead of value of RES.
3113
31142009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3115
3116 * graphite.c (graphite_finalize): Fix comment.
3117 (graphite_transform_loops): Reset scev info after code generation
3118 of each scop.
3119
31202009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3121
3122 * graphite.c (graphite_finalize): Call scev_reset.
3123
31242009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3125
3126 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3127 GBB_CLOOG_IV_TYPES hash table twice.
3128 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3129 (add_condition_to_domain): Clear GMP values.
3130
31312009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3132
3133 * graphite-dependences.c: Fix formatting.
3134 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3135 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3136 * graphite-sese-to-poly.c: Fix formatting.
3137 * graphite.c (graphite_transform_loops): Create the hash table
3138 after the early return.
3139
31402009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3141
6c9df8cb 3142 * gcc.dg/graphite/id-14.c: New.
3143 * gcc.dg/graphite/pr40157.c: New.
3144 * gfortran.dg/graphite/id-11.f: New.
c6bb733d 3145
31462009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3147
3148 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3149 (build_poly_scop): Return false when there are no pbbs within
3150 loops to avoid to pass to cloog scops with no loops.
3151
31522009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3153
3154 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3155 useless test "i % 2".
3156 (build_pbb_scattering_polyhedrons): Fix formatting.
3157 (build_poly_dr): Same.
3158 * graphite.c (graphite_transform_loops): Restructure.
3159
31602009-07-14 Razya Ladelsky <razya@il.ibm.com>
3161
3162 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3163 reduction_list parameter.
3164 (rewrite_all_phi_nodes_with_iv): Same.
3165 (canonicalize_loop_ivs): Same.
3166 * tree-parloops.c (struct brli): Removed.
3167 (build_reduction_list_info): Removed.
3168 (build_new_reduction): New.
3169 (analyze_reduction_list): Removed.
3170 (gather_scalar_reductions): Find reductions instead of phi
3171 nodes that can't be canonicalized.
3172 (try_create_reduction_list): Remove reduction_list parameter.
3173 (gen_parallel_loop): Same.
3174 (parallelize_loops): Remove analyze_reductions variable,
3175 initialization and free.
3176 Change reduction_list htab initialization to reduction_info
3177 elements instead of ssa names.
3178 Call try_create_reduction_list and gen_parallel_loop without
3179 analyzed_reduction argument.
3180 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3181 canonicalize_loop_ivs with one less argument.
3182 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3183
31842009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3185
3186 * graphite-dependences.c (new_poly_dr_pair): New.
3187 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3188 (new_poly_dr_pair): New.
3189 (eq_poly_dr_pair_p): New.
3190 (hash_poly_dr_pair_p): New.
3191 * graphite-dependences.h (struct poly_dr_pair): New.
3192 (eq_poly_dr_pair_p): Declared.
3193 (hash_poly_dr_pair_p): Declared.
3194 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3195 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3196 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3197 * Makefile.in (graphite-poly.o): Add dependence on
3198 graphite-dependences.h.
3199
32002009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3201
3202 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3203 polynomials of degree > 1 pass to Graphite.
3204 * tree-chrec.c (scev_is_linear_expression): Call
3205 evolution_function_is_affine_multivariate_p.
6c9df8cb 3206 * gfortran.dg/graphite/id-10.f90: New.
c6bb733d 3207
32082009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3209
3210 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3211 Instantiate scevs varying in outer loops.
6c9df8cb 3212 * gfortran.dg/graphite/id-9.f: Correct testcase.
c6bb733d 3213
32142009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3215
3216 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3217 redundant constraint.
3218
32192009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3220
6c9df8cb 3221 * gcc.dg/graphite/graphite.exp: Fix comments.
3222 * gfortran.dg/graphite/graphite.exp: Trigger actions
c6bb733d 3223 based on the file names as in the C testsuite.
6c9df8cb 3224 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3225 * gfortran.dg/graphite/block-2.f: Same.
3226 * gfortran.dg/graphite/block-3.f90: Same.
3227 * gfortran.dg/graphite/block-4.f90: Same.
3228 * gfortran.dg/graphite/id-1.f90: Same.
3229 * gfortran.dg/graphite/id-2.f90: Same.
3230 * gfortran.dg/graphite/id-3.f90: Same.
3231 * gfortran.dg/graphite/id-4.f90: Same.
3232 * gfortran.dg/graphite/id-6.f: Same.
3233 * gfortran.dg/graphite/id-9.f: Same.
3234 * gfortran.dg/graphite/interchange-1.f: Same.
3235 * gfortran.dg/graphite/interchange-2.f: Same.
3236 * gfortran.dg/graphite/scop-1.f: Same.
c6bb733d 3237
32382009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3239
3240 * sese.c (expand_scalar_variables_call): New.
3241 (expand_scalar_variables_ssa_name): Handle calls in expander.
3242
32432009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3244
6c9df8cb 3245 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
c6bb733d 3246 Expect to see the pattern twice.
6c9df8cb 3247 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3248 * gcc.dg/graphite/interchange-5.c: Same.
3249 * gcc.dg/graphite/interchange-6.c: Same.
c6bb733d 3250
32512009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3252
6c9df8cb 3253 * gcc.dg/graphite/id-10.c: New.
3254 * gcc.dg/graphite/id-12.c: New.
3255 * gfortran.dg/graphite/id-7.f: New.
3256 * gfortran.dg/graphite/id-8.f: New.
c6bb733d 3257
32582009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3259
3260 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3261 zero.
3262
32632009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3264
3265 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3266
32672009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3268
3269 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3270
32712009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3272
3273 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3274 building PDR subscripts.
3275
32762009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3277
3278 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3279 computation of array sizes.
3280
32812009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3282
3283 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3284
32852009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3286
3287 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3288 build_pairwise_constraint, dr_equality_constraints,
3289 build_pairwise_scheduling_equality,
3290 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3291 build_lexicographically_gt_constraint, dependence_polyhedron,
3292 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3293 Move from NNC_Polyhedron to C_Polyhedron.
3294 * graphite-interchange.c (compute_array_size_poly,
3295 gather_access_strides): Dito.
3296 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3297 free_scop, pbb_number_of_iterations): Dito.
3298 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3299 pbb_dim_iter_domain, struct scop): Dito.
3300 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3301 new_Cloog_Domain_from_ppl_Polyhedron,
3302 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3303 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3304 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3305 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3306 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3307 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3308 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3309 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3310 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3311 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3312 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3313 build_scop_iteration_domain, build_poly_dr): Dito
3314
33152009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3316
6c9df8cb 3317 * gcc.dg/graphite/graphite.exp: Added a rule to execute
c6bb733d 3318 run-id-*.c files.
6c9df8cb 3319 * gcc.dg/graphite/run-id-1.c: New.
c6bb733d 3320
33212009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3322
3323 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3324 positivity constraint on the symbolic number of iterations.
3325
33262009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3327
3328 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3329
33302009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3331 Tobias Grosser <grosser@fim.uni-passau.de>
3332
3333 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3334 (build_cloog_prog): Directly use SCOP_CONTEXT.
3335 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3336 (free_scop): Free SCOP_CONTEXT.
3337 (print_scop_context): New.
3338 (print_scop): Call print_scop_context.
3339 (debug_scop_context): New.
3340 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3341 (struct scop): Added field context.
3342 (SCOP_CONTEXT): New.
3343 * graphite-sese-to-poly.c (add_param_constraints): New.
3344 (build_scop_context): New.
3345 (build_poly_scop): Call build_scop_context.
3346
33472009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3348
3349 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3350 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3351 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3352 * graphite-ppl.h: Include double-int.h and tree.h.
3353 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3354 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3355 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3356 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3357
33582009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3359
3360 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3361 POINTER_PLUS_EXPR for pointer types.
3362 (clast_to_gcc_expression): Same.
3363
33642009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3365
3366 * graphite-poly.c (print_scattering_function): Early return when
3367 PBB_TRANSFORMED_SCATTERING is not initialized.
3368 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3369
33702009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3371
3372 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3373 to fix bootstrap.
3374
33752009-07-08 Razya Ladelsky <razya@il.ibm.com>
3376
3377 * tree-parloops.c (analyze_reduction_list): Change return
3378 value to void.
3379 (try_create_reduction_list): Move the call to
3380 analyze_reduction_list to the beginining.
3381 Call reduction_phi with analyzed_reductions as argument
3382 instead of reduction_list.
3383
33842009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3385
3386 * Merge from mainline (r148296:149346)
3387
33882009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3389
3390 * graphite-scop-detection.c (graphite_can_represent_init): New.
3391 (graphite_can_represent_scev): Call graphite_can_represent_init:
3392 check that the initial value does not contain multiplications of
3393 parameters.
3394 (stmt_has_simple_data_refs_p): New.
3395 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3396 (is_simple_operand): Fix formatting.
3397 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3398
33992009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3400
6c9df8cb 3401 * gcc.dg/graphite/id-13.c: New.
c6bb733d 3402 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3403 analyze_scalar_evolution, use scalar_evolution_in_region.
3404 (scan_tree_for_params_right_scev): Add extra assert.
3405 (parameter_index_in_region_1): Split from parameter_index_in_region.
3406 (idx_record_params): Use scalar_evolution_in_region.
3407 (find_params_in_bb): Same.
3408 (find_scop_parameters): Same.
3409 (build_loop_iteration_domains): Same.
3410 (create_linear_expr_from_tree): Same.
3411 * sese.c (scalar_evolution_in_region): New.
3412 * sese.h (scalar_evolution_in_region): Declared.
3413 (defined_in_sese_p): New.
3414 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3415 static anymore.
3416 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3417 Declared.
3418
34192009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3420
3421 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3422 TREE_DATA_REF_H also implies SCEV_H.
3423
34242009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3425
3426 * graphite-poly.c (print_scop_params): New.
3427 (print_scop): Call print_scop_params.
3428 (debug_scop_params): New.
3429 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3430
34312009-07-07 Li Feng <nemokingdom@gmail.com>
3432
6c9df8cb 3433 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3434 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3435 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3436 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3437 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3438 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
c6bb733d 3439
34402009-07-07 Li Feng <nemokingdom@gmail.com>
3441
3442 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3443 for dependency checking part.
6c9df8cb 3444 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
c6bb733d 3445 tests for dependency checking.
6c9df8cb 3446 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3447 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3448 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
c6bb733d 3449 flag -fdump-tree-graphite-all for autopar testsuites.
3450
34512009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3452
3453 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3454 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3455 canonicalize_loop_ivs): Moved...
3456 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3457
34582009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3459
3460 * tree-parloops.c (try_create_reduction_list): Pass an extra
3461 argument analyzed_reductions. Call analyze_reduction_list.
3462 (gen_parallel_loop): Do not call analyze_reduction_list.
3463 (parallelize_loops): Init and finalize analyzed_reductions.
3464
34652009-07-06 Li Feng <nemokingdom@gmail.com>
3466
6c9df8cb 3467 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
c6bb733d 3468 Added flag -fno-loop-strip-mine for autopar testcase.
3469
34702009-07-04 Li Feng <nemokingdom@gmail.com>
3471
3472 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3473 transformed scattering dimension instead of unmatch orignal when
3474 calling dependence_polyhedron.
3475
34762009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3477
3478 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3479
34802009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3481
3482 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3483 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3484
34852009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3486
3487 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3488 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3489 * graphite-poly.c (pbb_number_of_iterations): New.
3490 * graphite-poly.h (pbb_number_of_iterations): Declared.
3491 (pbb_iterator_dim, pbb_parameter_dim): New.
3492
34932009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3494
3495 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3496 last commit on type of lower and upper bound of loops.
3497
34982009-06-29 Li Feng <nemokingdom@gmail.com>
3499
3500 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3501 graphite-dependences.h.
3502 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3503 (mark_bb_with_pbb): New.
3504 (get_stmtfor_depth): New.
3505 (find_pbb_via_hash): New.
3506 (dependency_in_loop_p): New.
3507 (mark_loops_parallel): New.
3508 (free_aux_in_new_loops): New.
3509 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3510 bb with it's relevant pbb. Mark newly created loops. Remove mark
3511 innermost loop parallel without checking.
3512 (gloog): Add parameter BB_PBB_MAPPING.
3513 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3514 (gloog): Change declaration.
3515 (mark_loop_parallel): Make extern.
3516 (free_aux_in_new_loops): Declare.
3517 (bb_pbb_map_hash): New.
3518 (eq_bb_pbb_map): New.
3519 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3520 auto parallelization when flag_graphite_force_parallel is set.
3521 (graphite_finalize): Added free_aux_in_new_loops.
3522 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3523 the innermost loop that marked parallel. Use
3524 flag_graphite_force_parallel instead of loop->can_be_parallel.
3525 (loop_parallel_p): Move inner most checking out of function.
3526
35272009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3528
3529 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3530 type of lower and upper bound of loops signed long int.
3531
35322009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3533
3534 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3535 expression outside the loop.
3536
35372009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3538
3539 * gcc.dg/graphite/interchange-8.c: New.
3540
35412009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3542
3543 * gcc.dg/graphite/interchange-0.c: XFailed.
3544 * gcc.dg/graphite/interchange-5.c: XFailed.
3545 * gcc.dg/graphite/interchange-6.c: XFailed.
3546
35472009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3548
3549 * graphite-interchange.c (compute_array_size_poly): The end of the
3550 recursion should return 1.
3551
35522009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3553
3554 * graphite-interchange.c (compute_array_size_cstr): Allow the
3555 subscript multiplier to be -1.
3556 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3557 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3558 data_container. Initializes PDR_DATA_CONTAINER.
3559 (print_pdr_access_layout): New.
3560 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3561 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3562 data_container.
3563 (PDR_DATA_CONTAINER): New.
3564 (new_poly_dr): Update declaration.
3565 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3566 (build_poly_dr): Call pdr_add_data_dimensions.
3567
35682009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3569
3570 * graphite-poly.h (struct poly_dr): Fix comment.
3571 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3572 (pdr_add_memory_accesses): New.
3573 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3574
35752009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3576
3577 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3578 (print_pbb): Add call to print_pdrs.
3579 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3580
35812009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3582 Li Feng <nemokingdom@gmail.com>
3583
3584 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3585 (dependency_between_pbbs_p): New.
3586 (lexicographically_gt_p): Assure !empty_p before polyhedron
3587 intersection assign.
3588 (build_lexicographically_gt_constraint): Correct lexicographically
3589 judging.
3590 * graphite-dependences.h: New.
3591 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3592
35932009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3594
3595 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3596 (gloog): Print to dump_file the generated clast.
3597 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3598 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3599
36002009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3601
3602 * graphite-poly.c (extend_scattering): Increment
3603 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3604
36052009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3606
3607 * graphite-interchange.c (compute_array_size_poly): Added exit of
3608 recursion condition. Continue iterating even after the first equality.
3609 (compute_array_size): Same.
3610
36112009-06-24 Li Feng <nemokingdom@gmail.com>
3612
6c9df8cb 3613 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
c6bb733d 3614 -fdump-tree-final_cleanup to -fdump-tree-optimized.
6c9df8cb 3615 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3616 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3617 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
c6bb733d 3618
36192009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3620
3621 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3622 only when the use verifies is_gimple_reg.
3623
36242009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3625
3626 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3627 Allocate scaldims after call to unify_scattering_dimensions.
3628
36292009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3630
3631 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3632
36332009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3634 Albert Cohen <albert.cohen@inria.fr>
3635
3636 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3637 variables for the strip mining.
3638
36392009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3640 Pranav Garg <pranav.garg2107@gmail.com>
3641
3642 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3643 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3644 (graphite-blocking.o): New rule.
3645 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3646 * graphite-blocking.c: New.
3647 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3648 flag_loop_strip_mine.
3649 (psct_scattering_dim_for_loop_depth): New.
3650 * graphite-poly.h (scop_do_strip_mine): Declared.
3651 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3652 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3653 flag_loop_strip_mine.
3654
36552009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3656
3657 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3658 a GMP value and a PPL coefficient at each iteration of a loop.
3659
36602009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3661
3662 * graphite-dependences.c (dependence_polyhedron): Do not use
3663 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3664 pbb_nb_scattering_transform.
3665 (graphite_legal_transform_dr): Same.
3666 * graphite-poly.c (extend_scattering): Same.
3667 (unify_scattering_dimensions): Same.
3668 (print_scattering_function): Same.
3669 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3670 PBB_NB_LOCAL_VARIABLES.
3671 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3672 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3673 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3674 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3675 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3676 (pbb_nb_scattering_transform): New.
3677 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3678 (psco_scattering_dim): Add assert on parameters.
3679 (psct_scattering_dim): Same.
3680 (psct_scattering_dim_for_loop_depth): Declared.
3681 (psct_local_var_dim): New.
3682 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3683 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3684 correct layout, call pbb_nb_local_vars.
3685 (psct_add_local_variable, psct_add_scattering_dimension): New.
3686 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3687 Initialize PBB_NB_SCATTERING_TRANSFORM.
3688
36892009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3690
3691 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3692 (set_coef): Renamed ppl_set_coef.
3693 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3694
36952009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3696
3697 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3698 test a boolean against 1.
3699 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3700 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3701 (pbb_do_interchange): Returns true when a transform has been performed.
3702 (scop_do_interchange): Same.
3703 * graphite-poly.c (apply_poly_transforms): Use the return value of
3704 scop_do_interchange.
3705 * graphite-poly.h (scop_do_interchange): Update declaration.
3706
37072009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3708
3709 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3710 after last use.
3711 * sese.c (sese_reset_aux_in_loops): New.
3712 * sese.h (sese_reset_aux_in_loops): New.
3713
37142009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3715
3716 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3717 multiplier and multiply the constant by the multiplier.
3718 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3719 (build_poly_dr): Do not use the multiplier to define the subscript.
3720
37212009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3722
3723 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3724 compiler's data reference. Initialize PDR_CDR.
3725 (print_pdr): Call dump_data_reference.
3726 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3727 Add compiler_dr field.
3728 (PDR_BB): Renamed PDR_PBB.
3729 (PDR_CDR): New.
3730 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3731 GCC's data reference representation.
3732 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3733 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3734
37352009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3736
3737 * graphite-poly.c (print_scattering_function): Also print the layout.
3738 * graphite-poly.h (pbb_nb_local_vars): New.
3739
37402009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3741
3742 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3743
37442009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3745
3746 * graphite-poly.c (print_pdr, debug_pdr): New.
3747 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3748 (PDR_BASE): Removed.
3749
37502009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3751
6c9df8cb 3752 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
c6bb733d 3753 ltrans-{1..6,8}.c.
3754
37552009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3756
3757 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3758 subscript identification column.
3759 (pbb_do_interchange): Print to dump_file that some loops "will be
3760 interchanged". Rely on that chain of characters in the testcases.
3761 * gcc.dg/graphite/interchange-0.c: New.
3762 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3763 interchange-*.c files and compile them with -floop-interchange.
3764
37652009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3766
3767 * graphite-interchange.c (interchange_profitable_p): Renamed
3768 pbb_interchange_profitable_p.
3769
37702009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3771 Harsha Jagasia <harsha.jagasia@amd.com>
3772 Pranav Garg <pranav.garg2107@gmail.com>
3773
3774 * graphite-interchange.c (interchange_profitable_p): Make static.
3775 (pbb_interchange_loop_depths, pbb_do_interchange,
3776 scop_do_interchange): New.
3777 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3778 for flag_loop_interchange.
3779 * graphite-poly.h (scop_do_interchange): Declared.
3780 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3781 flag_loop_interchange is used.
3782
37832009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3784
3785 * graphite-dependences.c (dependence_polyhedron): Update use of
3786 pbb_nb_scattering_dims.
3787 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3788 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3789 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3790 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3791
37922009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3793
3794 * graphite.c: Cleanup foo.
3795
37962009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3797
3798 * Merge from mainline (r143684:148293).
3799 * Disabled libpcp until it gets fixed.
3800
38012009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3802 Harsha Jagasia <harsha.jagasia@amd.com>
3803
3804 * graphite-interchange.c: New.
3805 * Makefile.in (graphite-interchange.o): New.
3806 * graphite-poly.h (interchange_profitable_p): Declared.
3807 * graphite-ppl.h (value_max): New.
3808
38092009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3810
3811 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3812 * graphite-poly.h: Fix some comments.
3813 (pdr_dim): New.
3814 (pdr_scop): New.
3815
38162009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3817
3818 * graphite-poly.h
3819 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3820 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3821 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3822 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3823 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3824 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3825 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3826 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3827 * graphite-clast-to-gimple.c: Same.
3828 * graphite-dependences.c: Same.
3829 * graphite-poly.c: Same.
3830 * graphite-sese-to-poly.c: Same.
3831
38322009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3833
3834 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3835 expressions for an IV rename, as returned by clast_to_gcc_expression.
3836 (copy_renames): Rename new_name to expr.
3837 * sese.c (debug_rename_elt): Same.
3838 (get_rename): Same.
3839 (set_rename): Same.
3840 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3841 the information from the rename map.
3842 (rename_variables_in_stmt): Same.
3843 (add_loop_exit_phis): Rename new_name to expr.
3844 (insert_loop_close_phis): Same.
3845 (add_guard_exit_phis): Same. Call force_gimple_operand.
3846 * sese.h (struct rename_map_elt): Rename new_name to expr.
3847 (new_rename_map_elt): Same.
3848
38492009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3850
3851 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3852 * sese.c (set_rename): Make it extern.
3853 * sese.h (set_rename): Declared.
3854
38552009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3856
3857 * graphite-poly.c (extend_scattering): Free values.
3858 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3859 Free iterators.
3860 (ppl_print_powerset_matrix): Same.
3861 * graphite-scop-detection.c (free_scops_1): New.
3862 (limit_scops): Call free_scops_1.
3863 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3864 (build_poly_dr): Free PPL coefficients.
3865 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3866
38672009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3868
3869 * graphite-dependences.c: New.
3870 * graphite-data-ref.c: Removed.
3871 * graphite-data-ref.h: Removed.
3872 * Makefile.in (graphite-data-ref.o): Removed.
3873 (graphite-dependences.o): Added.
3874 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3875 * graphite-poly.c: Same.
3876 Move the data dependence testing to graphite-dependences.c.
3877
38782009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3879
3880 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3881 from graphite_cannot_represent_loop. Code refactored.
3882 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3883
38842009-05-17 Li Feng <nemokingdom@gmail.com>
3885
6c9df8cb 3886 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
c6bb733d 3887 Cover all the testcases (not only the filtered ones).
3888
38892009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3890
3891 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3892 unnecessary check. Update comments. Move check for REAL_TYPE here.
3893 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3894 done in (stmt_simple_for_scop_p).
3895
38962009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3897
3898 * graphite.c (print_global_statistics): New.
3899 (print_graphite_scop_statistic): New.
3900 (print_graphite_statistics): New.
3901 (graphite_initialize, graphite_transform_loops): Print statistics.
3902 * graphite-scop-detection (build_scops): Print statistics.
3903 (print_graphite_scop_statistics): New.
3904 (print_graphite_statistics): New.
3905
39062009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3907
3908 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3909 (debug_clast_name_index): Removed.
3910 (debug_clast_name_indexes_1): Removed.
3911 (debug_clast_name_indexes): Removed.
3912 (clast_name_index_elt_info): Removed.
3913 (eq_clast_name_indexes): Removed.
3914 (clast_name_to_index): Removed.
3915 (new_clast_name_index): Removed.
3916 (save_clast_name_index): Removed.
3917 (save_var_name): Moved...
3918 (init_sese_params_index): Removed.
3919 (clast_name_to_gcc): Remove use of name_tree.
3920 (initialize_cloog_names): Same.
3921 (gloog): Do not call init_sese_params_index.
3922 * graphite-sese-to-poly.c (save_var_name): ...here.
3923 (parameter_index_in_region): New.
3924 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3925 (parameter_index_in_region): Removed.
3926 (is_parameter): Remove use of name_tree.
3927 * sese.h (struct name_tree): Removed.
3928 (struct sese): Remove use of name_tree. New field params_names.
3929 (SESE_PARAMS_NAMES): New.
3930 (SESE_PARAMS): Remove duplicate.
3931 (parameter_index_in_region): Removed.
3932 (sese_nb_params): Remove use of name_tree.
3933 (struct clast_name_index): New.
3934 (new_clast_name_index): New.
3935 (clast_name_to_index): New.
3936 (save_clast_name_index): New.
3937 (debug_clast_name_index): New.
3938 (debug_clast_name_indexes_1): New.
3939 (debug_clast_name_indexes): New.
3940 (clast_name_index_elt_info): New.
3941 (eq_clast_name_indexes): New.
3942
39432009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3944
3945 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
3946 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
3947 (graphite_loop_normal_form): Do not pass region. Do not
3948 initialize SESE_OLDIVS.
3949 (build_graphite_loop_normal_form): Update call to
3950 graphite_loop_normal_form.
3951 * sese.c (debug_oldivs): Removed.
3952 (new_sese): Do not initialize SESE_OLDIVS.
3953 (free_sese): Do not free SESE_OLDIVS.
3954 (oldiv_for_loop): Removed.
3955 * sese.h (struct sese): Remove old_ivs.
3956 (SESE_OLDIVS): Removed.
3957 (oldiv_for_loop): Removed.
3958
39592009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3960
3961 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
3962 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
3963 replaced by a call to newivs_to_depth_to_newiv.
3964 (clast_to_gcc_expression): Pass newivs, remove ivstack.
3965 (clast_to_gcc_expression_red): Same.
3966 (gcc_type_for_clast_expr): Same.
3967 (gcc_type_for_clast_eq): Same.
3968 (graphite_translate_clast_equation): Same.
3969 (graphite_create_guard_cond_expr): Same.
3970 (graphite_create_new_guard): Same.
3971 (graphite_create_new_loop): Same.
3972 (build_iv_mapping): Same.
3973 (translate_clast): Same.
3974 (gloog): Same.
3975 (loop_iv_stack_patch_for_consts): Removed. *
3976 sese.c (iv_stack_entry_is_constant): Removed.
3977 (iv_stack_entry_is_iv): Removed.
3978 (loop_iv_stack_push_iv): Removed.
3979 (loop_iv_stack_insert_constant): Removed.
3980 (loop_iv_stack_pop): Removed.
3981 (loop_iv_stack_get_iv): Removed.
3982 (loop_iv_stack_get_iv_from_name): Removed.
3983 (debug_loop_iv_stack): Removed.
3984 (free_loop_iv_stack): Removed.
3985 (loop_iv_stack_remove_constants): Removed. *
3986 sese.h (iv_stack_entry_kind): Removed.
3987 (iv_stack_entry_data_union): Removed.
3988 (iv_stack_entry_struct): Removed.
3989 (iv_stack_entry_p): Removed.
3990 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
3991 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
3992 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
3993 loop_iv_stack_pop, free_loop_iv_stack): Removed.
3994 (gbb_loop_at_index): Fix indenting.
3995 (gbb_loop_index): Removed.
3996
39972009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3998
3999 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4000 Call clast_name_to_index.
4001
40022009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4003
4004 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4005 do not pass params. Get params from SESE_PARAMS.
4006 (clast_to_gcc_expression): Same.
4007 (clast_to_gcc_expression_red): Same.
4008 (gcc_type_for_clast_eq): Same.
4009 (graphite_translate_clast_equation): Same.
4010 (graphite_create_new_loop): Same.
4011 * sese.c (rename_variables_in_stmt): Fix comment.
4012
40132009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4014
4015 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4016 newivs_index.
4017 Call save_clast_name_index.
4018 (translate_clast): Pass newivs_index.
4019 (gloog): Create and free newivs_index.
4020
40212009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4022
4023 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4024 (clast_name_index_p): New type.
4025 (debug_clast_name_index): New.
4026 (debug_clast_name_indexes_1): New.
4027 (debug_clast_name_indexes): New.
4028 (clast_name_index_elt_info): New.
4029 (eq_clast_name_indexes): New.
4030 (clast_name_to_index): New.
4031 (new_clast_name_index): New.
4032 (save_clast_name_index): New.
4033 (init_sese_params_index): New.
4034 (gloog): Call init_sese_params_index.
4035 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4036 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4037 (free_sese): Free SESE_PARAMS_INDEX.
4038 * sese.h (struct sese): Add params_index.
4039 (SESE_PARAMS_INDEX): New.
4040
40412009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4042
4043 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4044 (graphite_create_new_loop): Pass the newivs vector. Push the
4045 newly created IV to newivs.
4046 (translate_clast): Pass the newivs vector.
4047 (gloog): Create and destroy the newivs vector.
4048
40492009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4050
4051 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4052 (graphite_loop_normal_form): Initialize loop->aux with the unique
4053 IV that has been created.
4054
40552009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4056
4057 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4058 scev with parameters in the base part. They where forbidden
4059 exidently.
4060
40612009-05-11 Li Feng <nemokingdom@gmail.com>
4062
6c9df8cb 4063 * gcc.dg/graphite/graphite.exp: Set different default
c6bb733d 4064 compile options by file names.
6c9df8cb 4065 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4066 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4067 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4068 * gcc.dg/graphite/scop-matmult.c: Ditto.
c6bb733d 4069
40702009-05-08 Li Feng <nemokingdom@gmail.com>
4071
6c9df8cb 4072 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4073 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4074 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4075 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
c6bb733d 4076
40772009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4078
4079 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4080 by final cleanup.
4081
40822009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4083
4084 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4085 allow integer constant strides.
4086 (graphite_can_represent_expr): Depend on outermost_loop.
4087 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4088 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4089 build_scops_1): Same.
4090 (scopdet_basic_block_info): Same and insert layered SCoP
4091 detection.
4092 (try_generate_gimple_bb): Cleanup.
4093 (build_scops): Enable data references.
4094
6c9df8cb 4095 * gcc.dg/graphite/id-5.c: New.
4096 * gcc.dg/graphite/id-9.c: New.
c6bb733d 4097 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4098 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4099
41002009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4101
4102 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4103 that we have not yet built for this SCoP.
4104
41052009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4106
4107 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4108 for complex numbers.
4109
41102009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4111
4112 * graphite-ppl.c: Fix build if cloog is not available.
4113
41142009-05-04 Li Feng <nemokingdom@gmail.com>
4115
4116 * tree-parloops.c (loop_parallel_p): Remove construction of
4117 NITER and REDUCTION_LIST.
4118 (try_get_loop_niter): New.
4119 (try_create_reduction_list): New.
4120 (parallelize_loops): Bypass the failed checkings in autopar
4121 when can_be_parallel in loop structure is set to true.
4122
41232009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4124
6c9df8cb 4125 * gcc.dg/graphite/id-6.c: Update testcase.
4126 * gcc.dg/graphite/scop-3.c: Dito.
c6bb733d 4127
41282009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4129
4130 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4131 Enable EQ_EXPR and NE_EXPR again.
4132
41332009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4134
4135 * graphite-scop-detection.c (graphite_can_represent_scev):
4136 Add check if scev is affine multivariate.
4137 (harmful_stmt_in_bb): Check if we can represent the conditions.
4138 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4139 harmful_stmt_in_bb.
6c9df8cb 4140 * gcc.dg/graphite/id-7.c: New.
c6bb733d 4141
41422009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4143
4144 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4145 Check all bbs in region, not only the bbs that are represented in
4146 GRAPHITE.
4147 (build_poly_scop): Add newline.
6c9df8cb 4148 * gcc.dg/graphite/id-8.c: New.
c6bb733d 4149
41502009-04-30 Li Feng <nemokingdom@gmail.com>
4151
4152 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4153 when loop initialize.
4154 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4155 * common.opt: Declare flag_graphite_force_parallel.
4156 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4157 loop parallel.
4158 * graphite-poly.c (apply_poly_transforms): Introduce
4159 flag_graphite_force_parallel.
4160 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4161 * toplev.c (process_options): ditto and replace a not correctly
4162 encoded space.
4163
41642009-04-30 Li Feng <nemokingdom@gmail.com>
4165
4166 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4167 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4168 to the redefinition.
4169 (compute_cloog_iv_types_1): ditto.
4170 (build_iv_mapping): ditto.
4171 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4172 initialization.
4173 (free_gimple_bb): Removed GBB_LOOPS related free part.
4174 (build_bb_loops): Removed.
4175 * sese.h (struct gimple_bb): Removed loops.
4176 (GBB_LOOPS): Removed.
4177 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4178 (gbb_loop_index): ditto.
4179
41802009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4181
4182 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4183 allow non constant strides.
6c9df8cb 4184 * gcc.dg/graphite/scop-20.c: New.
c6bb733d 4185
41862009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4187
4188 * graphite-scop-detection.c (dot_all_scops): Fix system call
4189 return value warning.
4190 (dot_scop): Same.
4191
41922009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4193
6c9df8cb 4194 * gcc.dg/graphite/id-6.c: Fix pattern.
4195 * gcc.dg/graphite/scop-3.c: Same.
c6bb733d 4196
41972009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4198
4199 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4200 build_pairwise_constraint, dr_equality_constraints,
4201 build_pairwise_scheduling_equality,
4202 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4203 build_lexicographically_gt_constraint, dependence_polyhedron,
4204 graphite_legal_transform_dr, graphite_legal_transform_bb,
4205 graphite_legal_transform): New.
4206 * graphite-poly.h (graphite_legal_transform): Declared.
4207 * graphite-sese-to-poly.c (build_poly_scop): Call to
4208 graphite_legal_transform is disabled for the moment.
4209
42102009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4211
4212 * graphite-poly.h (pbb_nb_scattering_dims): New.
4213 (pbb_nb_scattering): Use it.
4214
42152009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4216
4217 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4218 Pointset_Powerset version of ppl_insert_dimensions.
4219 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4220
42212009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4222
4223 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4224
42252009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4226
4227 * graphite-poly.h: Fix comment.
4228
42292009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4230
4231 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4232
42332009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4234
4235 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4236 statements.
4237
42382009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4239
4240 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4241 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4242 conditions.
4243
42442009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4245
4246 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4247 handle EQ_EXPR and NE_EXPR.
4248
42492009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4250
4251 * graphite-poly.h (poly_dr): Fix comment.
4252
42532009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4254 Tobias Grosser <grosser@fim.uni-passau.de>
4255
4256 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4257 with a zero dimension polyhedron.
4258 (find_scop_parameters): Move the call to scop_set_nb_params here.
4259 (build_loop_iteration_domains): Store in loop->aux the iteration
4260 domain polyhedron.
4261 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4262 by any loop in scop.
4263 (build_poly_scop): Do not call scop_set_nb_params.
4264
42652009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4266 Tobias Grosser <grosser@fim.uni-passau.de>
4267
4268 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4269 add_condition_to_domain not GT_EXPR.
4270
42712009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4272
4273 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4274 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4275 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4276 upper_bound_assign to calculate unions.
6c9df8cb 4277 * gcc.dg/graphite/id-6.c: New.
c6bb733d 4278
42792009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4280
4281 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4282 handle abnormal edges.
4283
42842009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4285
4286 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4287 (free_poly_bb): Also free poly_drs.
4288 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4289 (poly_dr): Polyhedron to Pointset_Powerset.
4290 (pdr_accessp_nb_subscripts): Same.
4291 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4292 poly_drs.
4293
42942009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4295
4296 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4297 names into more meaningful names.
4298
42992009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4300
6c9df8cb 4301 * gfortran.dg/graphite/interchange-1.c: New.
4302 * gfortran.dg/graphite/interchange-2.c: New.
c6bb733d 4303
43042009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4305
4306 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4307 the reduction_list.
4308 * tree-parloops.c (rewrite_phi_with_iv): New.
4309 (rewrite_all_phi_nodes_with_iv): New.
4310 (canonicalize_loop_ivs): Call them.
4311
43122009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4313
4314 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4315 graphite_find_data_references_in_stmt.
4316 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4317 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4318
43192009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4320
4321 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4322
43232009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4324
4325 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4326 instead of bb_in_region.
4327 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4328 (build_sese_conditions): Use flag_bb_in_sese.
4329 * sese.c (register_bb_in_sese): Removed.
4330 (new_sese): Remove initialization of SESE_REGION_BBS.
4331 (free_sese): Do not free SESE_REGION_BBS.
4332 * sese.h (struct sese): Remove field region_basic_blocks.
4333 (SESE_REGION_BBS): Removed.
4334 (bb_in_sese_p): Implement in function of bb_in_region.
4335
43362009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4337
4338 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4339 loops.
4340
43412009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4342
4343 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4344 and EQ_EXPR.
4345 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4346 (add_condition_to_domain): New.
4347 (add_condition_to_pbb): New.
4348 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
6c9df8cb 4349 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
c6bb733d 4350
43512009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4352
4353 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4354 ppl_Pointset_Powerset.
4355 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4356 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4357 (pbb_nb_loops): Same.
4358 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4359 add_conditions_to_domain): Same.
4360 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4361 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4362 ppl_const_Polyhedron_t.
4363 (ppl_print_powerset_matrix): New.
4364 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4365 ppl_print_powerset_matrix): New.
4366 (ppl_print_polyhedron_matrix): Updated.
4367
43682009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4369
4370 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4371
43722009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4373
4374 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4375 (print_iteration_domains, debug_iteration_domain,
4376 debug_iteration_domains): New.
4377 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4378 debug_iteration_domains): Declared.
4379 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4380 indenting.
4381
43822009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4383 Sebastian Pop <sebastian.pop@amd.com>
4384
4385 * graphite-poly.h (print_iteration_domain): New.
4386 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4387 (build_sese_conditions_1, build_sese_conditions_after,
4388 build_sese_conditions_before): New.
4389 (build_sese_conditions): Rewritten.
4390
43912009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4392 Tobias Grosser <grosser@fim.uni-passau.de>
4393
4394 Cleanup of code generation liveouts.
4395 * graphite-clast-to-gimple.c (translate_clast): Use a single
4396 rename_map instead of one per translated statement.
4397 Do not use SESE_LIVEOUT_RENAMES.
4398 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4399 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4400 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4401 phi node of a reduction: when a loop contains a reduction used outside
4402 the loop, there should be a scalar close phi node on the exit block.
4403 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4404 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4405 (free_sese): Do not free them.
4406 (sese_build_liveouts_use): Do not use them.
4407 (sese_build_liveouts_bb): Same.
4408 (sese_build_liveouts): Same.
4409 (sese_insert_phis_for_liveouts): Same.
4410 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4411 (defined_in_loop_p): New.
4412 (alive_after_loop): New.
4413 (close_phi_not_yet_inserted_p): New.
4414 (struct alep, alep_p): New.
4415 (add_loop_exit_phis): Remove from the rename_map all the names defined
4416 in the code generated loop.
4417 (insert_loop_close_phis): Traverse the rename_map passed to it.
4418 Don't use SESE_LIVEOUT_RENAMES.
4419 (default_liveout_before_guard): Renamed default_before_guard.
4420 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4421 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4422 (register_sese_liveout_renames): Removed.
4423 (copy_bb_and_scalar_dependences): Do not call it.
4424 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4425 reduction_list.
4426 (SESE_LIVEOUT): Removed.
4427 (SESE_LIVEOUT_RENAMES): Removed.
4428 (SESE_REDUCTION_LIST): Removed.
4429 (sese_build_liveouts): Removed.
4430 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4431 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4432 (insert_guard_phis): Same.
4433 (rename_map_elt): Declare a VEC of them.
4434 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4435 trees not pointers to trees.
4436
4437 Rewrite in canonical close SSA form:
4438 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4439 (limit_scops): Close the scop after the block containing the close phi
4440 nodes.
4441 (canonicalize_loop_closed_ssa): New.
4442 (canonicalize_loop_closed_ssa_form): New.
4443 (build_scops): Call canonicalize_loop_closed_ssa_form.
4444
4445 * graphite-sese-to-poly.c: Fix typos.
4446
44472009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4448
4449 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4450 Extended.
4451 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4452 (print_pbb): Add conditions.
4453
44542009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4455 Sebastian Pop <sebastian.pop@amd.com>
4456
4457 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4458 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4459 (build_scop_bbs_1): New.
4460 (build_scop_bbs): Rewrite.
4461 * sese.h (bb_in_region): New.
4462
44632009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4464
4465 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4466 poly_drs vector.
4467 (print_scop): Style.
4468 * graphite-poly.h (poly_bb): Add drs vector.
4469 (PBB_DRS): Add accessor.
4470 * graphite-sese-to-poly.c (build_poly_dr): New.
4471 (build_pbb_drs, build_scop_drs): New.
4472 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4473
44742009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4475
4476 * tree-ssa-loop.c: Include forgotten toplev.h
4477
44782009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4479
4480 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
6c9df8cb 4481 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4482 * gcc.dg/graphite/pr37928.c: Same
4483 * gcc.dg/graphite/pr38409.c: Same
4484 * gcc.dg/graphite/pr38498.c: Same
4485 * gcc.dg/graphite/pr38559.c: Same
4486 * gcc.dg/graphite/pr39335.c: Same
4487 * gcc.dg/graphite/pr39335_1.c: Same
4488 * gfortran.dg/graphite/block-2.f: Same
c6bb733d 4489 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4490 with -floop-*.
4491
44922009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4493
4494 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4495 build_access_matrix, build_scop_data_accesses): Remove access function
4496 building. (We get a new version soon).
4497 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4498 * sese.h (nb_loops_around_loop_in_sese): Remove.
4499 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4500
45012009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4502 Sebastian Pop <sebastian.pop@amd.com>
4503
4504 * graphite-scop-detection.c (struct scopdet_info): Rename last
4505 field to exit.
4506 (scopdet_basic_block_info, build_scops_1): Don't use
4507 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4508
45092009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4510 Sebastian Pop <sebastian.pop@amd.com>
4511
4512 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4513 * sese.c (sese_build_liveouts_use): Renamed from
4514 sese_build_livein_liveouts_use. Remove liveins.
4515 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4516 Call sese_build_liveouts_use.
4517 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4518 Call sese_build_liveouts_bb.
4519 (new_sese, free_sese): Remove liveins.
4520 (sese_add_exit_phis_var): Deleted.
4521 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4522 directly.
4523 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4524
4525 * sese.h (sese): Remove num_ver and livein.
4526 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4527
45282009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4529
4530 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4531
45322009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4533
4534 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4535 (build_scop_scattering): Do not use compare_prefix_loops any more.
4536 (nb_common_loops): New.
4537
45382009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4539
4540 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4541 (register_old_and_new_names): Renamed set_rename.
4542
45432009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4544
4545 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4546 of the decl from the previous commit.
4547
45482009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4549
4550 * graphite-scop-detection.c (dot_scop): New.
4551 * graphite-scop-detection.h (dot_scop): Declared.
4552
45532009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4554
4555 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4556
45572009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4558
4559 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4560 condition at the end of the loop.
4561 * graphite.c (graphite_initialize, graphite_finalize): Print to
4562 dump_file the compiled function.
4563 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4564 of create_empty_loop_on_edge.
4565 (translate_clast): Update the code generation of loops for the new
4566 shape of loops.
4567 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4568
45692009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4570
4571 Reverted the patch from 2009-03-19.
4572
45732009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4574
4575 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4576 poly_drs vector.
4577 (print_scop): Style.
4578 * graphite-poly.h (poly_bb): Add drs vector.
4579 (PBB_DRS): Add accessor.
4580 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4581 (build_access_matrix_with_af, build_access_matrix,
4582 build_scop_data_accesses): Delete.
4583 (build_poly_dr): New.
4584 (build_pbb_drs, build_scop_drs): New.
4585 (build_poly_scop): call build_scop_drs.
4586
45872009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4588
4589 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4590 once per basic block.
4591
45922009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4593
4594 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4595 (graphite_can_represent_expr): Renamed from loop_affine_expr
4596 and enhanced.
4597 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4598 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4599 (scopdet_basic_block_info): Actually define entry_block.
4600 (stmt_simple_memref_p): Moved here from ...
4601
4602 * tree-data-ref.c (stmt_simple_memref_p): here.
4603 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4604
46052009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4606
6c9df8cb 4607 * gcc.dg/graphite/id-4.c: New.
c6bb733d 4608
46092009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4610
4611 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4612 (register_old_and_new_names): Update the content of the map.
4613 When there was already a rename_map_elt in the map at that
4614 location, free it.
4615 (copy_bb_and_scalar_dependences): Do rename_variables after
4616 expand_scalar_variables.
4617 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4618 of the map. When there was already a rename_map_elt in the
4619 map at that location, free it.
4620 (translate_clast): Pass the rename_map. Do not initialize and free
4621 a rename_map per stmt_user.
4622 (gloog): Initialize and free one rename_map and pass it to
4623 translate_clast.
4624
46252009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4626
4627 * sese.c (expand_scalar_variables_stmt,
4628 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4629 parameter.
4630 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4631 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4632 the gimple_stmt_iterator of the statement to be expanded.
4633 * graphite-scop-detection.c (is_simple_operand): Do handle
4634 REALPART_EXPR.
4635
46362009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4637
4638 * graphite-scop-detection.c (is_simple_operand): Do not handle
4639 REALPART_EXPR.
6c9df8cb 4640 * gcc.dg/graphite/id-2.c: New.
c6bb733d 4641
4642 * graphite-sese-to-poly.c (build_bb_loops,
4643 add_value_to_dim, scan_tree_for_params_right_scev,
4644 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4645 find_params_in_bb, build_loop_iteration_domains,
4646 add_conditions_to_domain): Remove subtract.
4647
46482009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4649
4650 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4651 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4652 pbb_loop_at_index -> gbb_loop_at_index.
4653 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4654 (debug_loop_vec): Delete.
4655 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4656 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4657 (PBB_LOOPS): Removed.
4658 (PBB_BLACK_BOX): Insert cast.
4659 (pbb_set_black_box): New setter.
4660 (pbb_loop_at_index, pbb_loop_index): Removed.
4661 (scop_set_region, scop_set_nb_params): New.
4662 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4663 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4664 (build_poly_scop): Use scop_set_nb_params.
4665 * sese.h (gimple_bb): Add LOOPS.
4666 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4667
46682009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4669
4670 Revert previous commit.
4671
46722009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4673
4674 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4675 (register_old_and_new_names): Update the content of the map.
4676 When there was already a rename_map_elt in the map at that
4677 location, free it.
4678 (copy_bb_and_scalar_dependences): Do rename_variables after
4679 expand_scalar_variables.
4680 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4681 of the map. When there was already a rename_map_elt in the
4682 map at that location, free it.
4683 (translate_clast): Pass the rename_map. Do not initialize and free
4684 a rename_map per stmt_user.
4685 (gloog): Initialize and free one rename_map and pass it to
4686 translate_clast.
4687
46882009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4689
4690 Remove forgotten line in revert.
4691
46922009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4693
4694 Revert previous commit.
4695
46962009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4697
4698 * sese.c (register_old_and_new_names): Update the content
4699 of the map. When there was already a rename_map_elt in the
4700 map at that location, free it.
4701 (copy_bb_and_scalar_dependences): Do rename_variables after
4702 expand_scalar_variables.
4703 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4704 of the map. When there was already a rename_map_elt in the
4705 map at that location, free it.
4706 (translate_clast): Pass the rename_map. Do not initialize and free
4707 a rename_map per stmt_user.
4708 (gloog): Initialize and free one rename_map and pass it to
4709 translate_clast.
4710
47112009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4712
4713 * graphite-clast-to-gimple.c (translate_clast): context_loop
4714 is never NULL.
4715
47162009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4717 Sebastian Pop <sebastian.pop@amd.com>
4718
4719 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4720 of the use of ppl_Polyhedron_map_space_dimensions.
4721
47222009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4723 Sebastian Pop <sebastian.pop@amd.com>
4724
4725 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4726 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4727 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4728 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4729 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4730 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4731 pbb_nb_params): New.
4732 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4733 nb_loops_around_pbb): Adapt return types.
4734
47352009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4736
4737 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4738 graphite-clast-to-gimple.o, graphite-data-ref.o,
4739 graphite-scop-detection.o, graphite-poly.o): Add
4740 more headers.
4741
47422009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4743
4744 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4745 graphite-clast-to-gimple.o, graphite-data-ref.o,
4746 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4747
47482009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4749
6c9df8cb 4750 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4751 * gcc.dg/graphite/pr37828.c: Same.
4752 * gcc.dg/graphite/pr37684.c: Same.
4753 * gcc.dg/graphite/block-0.c: Same.
4754 * gcc.dg/graphite/block-1.c: Same.
4755 * gcc.dg/graphite/block-2.c: Same.
4756 * gcc.dg/graphite/block-3.c: Same.
4757 * gcc.dg/graphite/block-4.c: Same.
4758 * gcc.dg/graphite/block-5.c: Same.
4759 * gcc.dg/graphite/block-6.c: Same.
4760 * gfortran.dg/graphite/pr38083.f90: Same.
4761 * gfortran.dg/graphite/block-1.f90: Same.
4762 * gfortran.dg/graphite/block-3.f90: Same.
4763 * gfortran.dg/graphite/pr37852.f90: Same.
4764 * gfortran.dg/graphite/block-4.f90: Same.
4765 * gfortran.dg/graphite/pr37980.f90: Same.
4766 * gfortran.dg/graphite/pr38953.f90: Same.
4767 * gfortran.dg/graphite/pr37857.f90: Same.
c6bb733d 4768 * opts.c: Remove -floop-block from -O2.
4769 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4770 -floop-strip-mine are used.
4771
47722009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4773 Sebastian Pop <sebastian.pop@amd.com>
4774
4775 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4776 dimensions.
4777 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4778 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4779 strip_mine_profitable_p, is_interchange_valid,
4780 graphite_trans_bb_block, graphite_trans_loop_block,
4781 graphite_trans_scop_block): Temporary removed.
4782 (extend_scattering, unify_scattering_dimensions): New.
4783 (print_scattering_function, graphite_read_transforms):
4784 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4785 (graphite_generate_scattering_fns): Removed.
4786 (apply_poly_transforms): Cleanup.
4787 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4788 (schedule_to_scattering): Moved.
4789 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4790 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4791 (pbb_nb_scattering): New.
4792 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4793 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4794 Removed.
4795 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4796 shift_poly.
4797 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4798 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4799 -> PBB_TRANSFORMED_SCATTERING.
4800 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4801 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4802 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4803 (check_poly_representation): Do not return bool.
4804 (graphite_transform_loops): Reformat.
4805 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4806
48072009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4808
4809 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4810 debug_pbb_domain, debug_pbb, debug_scop): New.
4811 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4812 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4813
48142009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4815
4816 PR middle-end/39335
4817 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4818 when the type precision of the induction variable should be
4819 larger than the type precision of nit.
4820 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4821 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4822 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4823
6c9df8cb 4824 * gcc.dg/graphite/pr39335_1.c: New.
4825 * gcc.dg/graphite/pr39335.c: New.
c6bb733d 4826
48272009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4828
4829 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4830 SSA_NAMES not struct reduction_info.
4831
48322009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4833
4834 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4835
48362009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4837 Tobias Grosser <grosser@fim.uni-passau.de>
4838
4839 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4840 (free_sese): Free SESE_REDUCTION_LIST.
4841 * sese.h (struct sese): Add field reduction_list.
4842 (SESE_REDUCTION_LIST): New.
4843 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4844 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4845
48462009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4847 Tobias Grosser <grosser@fim.uni-passau.de>
4848
4849 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4850 of loop_p.
4851
48522009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4853 Tobias Grosser <grosser@fim.uni-passau.de>
4854
4855 * tree-parloops.c (struct brli, build_reduction_list_info,
4856 analyze_reduction_list, gather_scalar_reductions): New.
4857 (loop_parallel_p): Build a reduction list containing only
4858 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4859 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4860 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4861 * tree-flow.h (gather_scalar_reductions): Declared.
4862
48632009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4864
4865 PR middle-end/39308
4866 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4867 number_of_iterations_exit from a gcc_assert.
4868
48692009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4870 Jan Sjodin <jan.sjodin@amd.com>
4871
4872 * output.h (graphite_out_file, graphite_in_file): Declared.
4873 * toplev.c (graphite_out_file, graphite_in_file): New.
4874 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4875 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4876 Don't call schedule_to_scattering.
4877 * common.opt (fgraphite-write, fgraphite-read): New.
4878 * graphite-poly.c: Include output.h.
4879 (print_scattering_function, print_scattering_functions,
4880 debug_scattering_function, debug_scattering_functions,
4881 graphite_write_transforms, graphite_read_transforms,
4882 graphite_generate_scattering_fns): New.
4883 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4884 Call graphite_generate_scattering_fns, graphite_write_transforms,
4885 graphite_read_transforms.
4886 (new_poly_bb): Initialize PBB_SCATTERING.
4887 (free_poly_bb): Free PBB_SCATTERING.
4888 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4889 * graphite-poly.h (struct poly_bb): Add field scattering.
4890 (PBB_SCATTERING): New.
4891 (print_scattering_function, print_scattering_functions,
4892 debug_scattering_function, debug_scattering_functions): Declared.
4893 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4894 GMP values, not integers!
4895 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4896 ppl_read_polyhedron_matrix): New.
4897 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4898 debug_ppl_polyhedron_matrix,
4899 ppl_read_polyhedron_matrix): Declared.
4900 * Makefile.in (graphite-poly.o): Depends on output.h.
4901
49022009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4903 Tobias Grosser <grosser@fim.uni-passau.de>
4904
4905 Revert this change:
4906 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4907 scalar evolutions in the scop_entry->loop_father.
4908
49092009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4910 Tobias Grosser <grosser@fim.uni-passau.de>
4911
4912 * graphite.h (ref_nb_loops): Remove declaration.
4913 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4914 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4915 debug_gbb): Moved to sese.h.
4916 * sese.h: As said.
4917
49182009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4919 Tobias Grosser <grosser@fim.uni-passau.de>
4920
4921 * graphite-data-ref.[ch]: Disable.
4922
49232009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4924 Tobias Grosser <grosser@fim.uni-passau.de>
4925
4926 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4927 scalar evolutions in the scop_entry->loop_father.
4928
49292009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4930
4931 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
4932 (graphite_cannot_represent_loop_niter): Renamed
4933 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
4934 (limit_scops): build_sese_loop_nests does not return a bool.
4935 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
4936 * sese.c (nb_reductions_in_loop): ... from here.
4937 (graphite_loop_normal_form): ... from here.
4938 (sese_record_loop): Does not fail, so does not return a bool.
4939 (build_sese_loop_nests): Same.
4940 * sese.h (build_sese_loop_nests): Update declaration.
4941 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
4942 (build_graphite_loop_normal_form): New.
4943 (gloog): Call build_graphite_loop_normal_form.
4944 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
4945 build_sese_loop_nests.
4946
6c9df8cb 4947 * gcc.dg/graphite/id-1.c: New.
c6bb733d 4948
49492009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4950 Tobias Grosser <grosser@fim.uni-passau.de>
4951
4952 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
4953 The SCoP detection fix is sufficient.
4954
49552009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4956
4957 PR tree-optimization/39260
4958 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
4959 the basic block contains a condition with a real type.
4960 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
4961
4962 * gcc.dg/graphite/pr39260.c: New.
4963
49642009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4965
4966 * graphite-poly.c: Inlcude params.h.
4967 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
4968 the size of a tile.
4969 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
4970 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
4971
49722009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4973 Tobias Grosser <grosser@fim.uni-passau.de>
4974
4975 * graphite-scop-detection.c (dot_all_scops_1,
4976 dot_all_scops): Moved here.
4977 * graphite-scop-detection.h (dot_all_scops): Declared here.
4978 * graphite.c (graphite_initialize, graphite_finalize): New.
4979 (graphite_transform_loops): Cleaned up.
4980 * sese.c (debug_oldivs): Moved here.
4981 * graphite-poly.c (graphite_apply_transformations): Renamed
4982 apply_poly_transforms.
4983 (debug_loop_vec): Moved here.
4984 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
4985 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
4986 find_scop_parameters, build_scop_iteration_domain,
4987 add_conditions_to_constraints, build_scop_canonical_schedules,
4988 build_scop_data_accesses): Now static.
4989 (build_poly_scop, check_poly_representation): New.
4990
49912009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4992
4993 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
4994 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
4995 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
4996 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
4997 scan_tree_for_params_right_scev, scan_tree_for_params_int,
4998 scan_tree_for_params, struct irp_data, dx_record_params,
4999 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5000 build_loop_iteration_domains, add_conditions_to_domain,
5001 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5002 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5003 build_sese_conditions, add_conditions_to_constraints,
5004 build_scop_iteration_domain, build_access_matrix_with_af,
5005 build_access_matrix,
5006 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5007
5008 * graphite-sese-to-poly.c: New.
5009 * graphite-sese-to-poly.h: New.
5010
5011 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5012
50132009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5014
5015 * graphite.c: Split graphite code generation to a new file.
5016 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5017 max_precision_type, clast_to_gcc_expression_red,
5018 clast_to_gcc_expression, gcc_type_for_clast_expr,
5019 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5020 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5021 graphite_create_new_guard, clast_get_body_of_loop,
5022 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5023 graphite_create_new_loop, build_iv_mapping, copy_renames,
5024 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5025 compute_cloog_iv_types, free_scattering, save_var_name,
5026 initialize_cloog_names, build_scop_context, build_cloog_prog,
5027 set_cloog_options, debug_clast_stmt, scop_to_clast,
5028 print_generated_program, debug_generated_program,
5029 gloog): Moved to graphite-clast-to-gimple.c.
5030
5031 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5032
5033 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5034 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5035 loop_iv_stack_pop, loop_iv_stack_get_iv,
5036 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5037 free_loop_iv_stack, loop_iv_stack_remove_constants,
5038 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5039 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5040 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5041 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5042 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5043 get_vdef_before_sese, sese_adjust_vphi,
5044 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5045 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5046 is_iv, expand_scalar_variables_ssa_name,
5047 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5048 expand_scalar_variables, rename_variables, remove_condition,
5049 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5050 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5051 default_liveout_before_guard, add_guard_exit_phis,
5052 insert_guard_phis, register_old_and_new_names,
5053 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5054 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5055 if_region_set_false_region, create_if_region_on_edge,
5056 move_sese_in_condition): Moved to sese.c.
5057
5058 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5059 if_region_exit, if_region_get_condition_block,
5060 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5061 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5062 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5063 ivtype_map_elt, new_ivtype_map_elt,
5064 recompute_all_dominators): Moved to sese.h.
5065
5066 * graphite-clast-to-gimple.c: New.
5067 * graphite-clast-to-gimple.h: New.
5068 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5069 * sese.c: Modified as said above.
5070 * sese.h: Same.
5071
50722009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5073
5074 * graphite.c: Split scop detection to a new file.
5075 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5076 move_sd_regions, loop_affine_expr, exclude_component_ref,
5077 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5078 graphite_cannot_represent_loop_niter, struct scopdet_info,
5079 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5080 find_single_entry_edge, find_single_exit_edge,
5081 create_single_entry_edge, sd_region_without_exit,
5082 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5083 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5084 Moved to graphite-scop-detection.c.
5085
5086 * graphite-scop-detection.c: New.
5087 * graphite-scop-detection.h: New.
5088 * Makefile.in: Add new rule for graphite-scop-detection.o.
5089
5090 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5091 tree-scalar-evolution.h.
5092 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5093 build_sese_loop_nests): Moved here from graphite.c.
5094 (param_index): Renamed parameter_index_in_region.
5095
50962009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5097 Sebastian Pop <sebastian.pop@amd.com>
5098
5099 * gcc.dg/graphite/block-0.c: Expected to fail now.
5100 * gcc.dg/graphite/block-1.c: Same.
5101 * gcc.dg/graphite/block-5.c: Same.
5102 * gcc.dg/graphite/block-6.c: Same.
5103
51042009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5105 Sebastian Pop <sebastian.pop@amd.com>
5106
5107 * graphite.h: Separate from graphite_bb_p the polyhedral
5108 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5109 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5110 graphite-data-ref.h.
5111 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5112 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5113 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5114 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5115 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5116 scop_nb_params): Moved to graphite-poly.h.
5117 * graphite-data-ref.c: Same.
5118 * graphite-data-ref.h: New.
5119 * graphite.c: Same.
5120 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5121 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5122 is_interchange_valid, graphite_trans_bb_block,
5123 graphite_trans_loop_block, scop_max_loop_depth,
5124 graphite_trans_scop_block, graphite_apply_transformations,
5125 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5126 graphite-poly.c.
5127 * graphite-poly.h: New.
5128 * graphite-poly.c: New.
5129 * Makefile.in (OBJS-common): Add graphite-poly.o.
5130 (graphite-poly.o): New rule.
5131 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5132 (DR_SCOP): Removed.
5133
51342009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5135 Tobias Grosser <grosser@fim.uni-passau.de>
5136
5137 * graphite.c: Replace gb -> gbb.
5138 * graphite.h: Same.
5139 * graphite-data-ref.c: Same.
5140
51412009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5142 Tobias Grosser <grosser@fim.uni-passau.de>
5143
5144 * Makefile.in (OBJS-commmon): Add sese.o.
5145 (sese.o): New.
5146 (graphite.o): Add sese.h.
5147 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5148 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5149 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5150 Move to sese.
5151 (block_before_scop): Add missing return.
5152 (new_scop, free_scop): Remove SESE data structures.
5153 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5154 find_scop_parameters, build_loop_iteration_domains,
5155 add_conditions_to_domain, register_scop_liveout_renames,
5156 copy_bb_and_scalar_dependences): Scop -> SESE.
5157
5158 (add_conditions_to_domain): SCoP -> SESE and remove check
5159 (scop_contains_non_iv_scalar_phi_nodes): New.
5160 (build_scop_conditions_1, build_scop_conditions): Remove check for
5161 non iv scalar phi nodes.
5162 (print_scop_statistics): New.
5163 (graphite_transform_loops): Cleanup.
5164
5165 * graphite.h: Move to sese & cleanup.
5166 * sese.c: New.
5167 * sese.h: New.
5168
51692009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5170 Tobias Grosser <grosser@fim.uni-passau.de>
5171
5172 * graphite.c (build_scop_conditions_1): Conditions are only
5173 at the end of a basic block.
5174
51752009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5176 Tobias Grosser <grosser@fim.uni-passau>
5177
5178 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5179 field.
5180 (GBB_ALPHA): Removed.
5181
51822009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5183 Tobias Grosser <grosser@fim.uni-passau.de>
5184
5185 * graphite-data-ref.c (graphite_test_dependence): Don't use
5186 GBB_DYNAMIC_SCHEDULE.
5187 * graphite.c (new_graphite_bb): Same.
5188 (free_graphite_bb): Same.
5189 (build_scop_dynamic_schedules): Removed.
5190 (graphite_transform_loops): Don't call it.
5191 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5192 (GBB_DYNAMIC_SCHEDULE): Removed.
5193
51942009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5195 Tobias Grosser <grosser@fim.uni-passau.de>
5196
5197 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5198 (print_graphite_bb): Same.
5199 (build_cloog_prog): Same.
5200
52012009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5202 Tobias Grosser <grosser@fim.uni-passau.de>
5203
5204 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5205
52062009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5207 Tobias Grosser <grosser@fim.uni-passau.de>
5208
5209 * graphite.c (build_scop_context): Don't use CloogMatrix.
5210 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5211 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5212
52132009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5214 Tobias Grosser <grosser@fim.uni-passau.de>
5215
5216 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5217 liveout_renames, add_params fields...
5218 (struct sese): ... here.
5219 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5220 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5221
52222009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5223 Tobias Grosser <grosser@fim.uni-passau.de>
5224
5225 * graphite.c (print_scop): Do not print the CLooG program.
5226 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5227 build_cloog_prog, gloog): Don't use SCOP_PROG.
5228 (find_transform): Renamed scop_to_clast.
5229 (print_generated_program, debug_generated_program): New.
5230 (graphite_transform_loops): Adapt to new interface.
5231 * graphite.h (struct scop): Remove program field.
5232 (SCOP_PROG): Removed.
5233 (print_generated_program, debug_generated_program): Declared.
5234
52352009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5236
5237 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5238 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5239 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5240 free_graphite_bb, build_scop_canonical_schedules,
5241 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5242 schedules are now represented using a ppl_Linear_Expression_t.
5243 * graphite.h (struct graphite_bb): Same.
5244 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5245 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5246
52472009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5248
5249 * graphite.c: Free local memory.
5250 * graphite-ppl.c: Same.
5251
52522009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5253
5254 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5255 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5256 swap_constraint_variables, scale_constraint_variable): Removed.
5257 (graphite_trans_bb_strip_mine): Remove pong.
5258 * graphite-ppl.c: Include missing header files.
5259 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5260 * graphite-ppl.h (ppl_strip_loop): Declared.
5261 * Makefile.in (graphite-ppl.o): Adjust dependences.
5262
52632009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5264
5265 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5266 (build_scop_iteration_domain): Same.
5267
52682009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5269
5270 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5271 ping pong.
5272 (add_value_to_dim, scan_tree_for_params_right_scev,
5273 scan_tree_for_params_int): New.
5274 * graphite-ppl.c (oppose_constraint): New.
5275 (insert_constraint_into_matrix): Implement missing cases.
5276 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5277
52782009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5279
5280 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5281 use ppl_move_dimension.
5282
52832009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5284
5285 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5286 * graphite.c: Same.
5287 * graphite.h: Same.
5288 * graphite-ppl.c: Same.
5289 * graphite-ppl.h: Same.
5290
52912009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5292
5293 Revert last 3 commits.
5294
52952009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5296
5297 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5298 ping pong.
5299 (add_value_to_dim, scan_tree_for_params_right_scev,
5300 scan_tree_for_params_int): New.
5301 * graphite-ppl.c (oppose_constraint): New.
5302 (insert_constraint_into_matrix): Implement missing cases.
5303 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5304
53052009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5306
5307 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5308
53092009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5310 Tobias Grosser <grosser@fim.uni-passau.de>
5311
5312 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5313 use ppl_move_dimension.
5314 * graphite-ppl.c (ppl_move_dimension): New.
5315 * graphite-ppl.h (ppl_move_dimension): Declared.
5316
53172009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5318
5319 * graphite.c: Do not include cloog/cloog.h.
5320 (print_graphite_bb): Remove ping pong, call PPL print function.
5321
53222009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5323
5324 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5325 (graphite.o): Add dependence on graphite-ppl.h.
5326 (graphite-ppl.o): New.
5327 (graphite-data-ref.c): Ping pong between PPL data structures
5328 and matrices.
5329 * graphite-ppl.c: New.
5330 * graphite-ppl.h: New.
5331 * graphite.c: Include graphite-ppl.h.
5332 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5333 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5334 Ping pong between PPL data structures and matrices.
5335 (new_graphite_bb): Create a PPL constraint system.
5336 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5337 (build_loop_iteration_domains): Use PPL functions.
5338 * graphite.h: Include graphite-ppl.h. Fix comments.
5339 (graphite_bb): Use a ppl_Constraint_System_t instead of
5340 CloogMatrix for representing the domain.
5341 (scop): Remove static_schedule.
5342 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5343
53442009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5345
5346 * graphite.c: Fix some comments.
5347
53482009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5349
5350 PR middle-end/38953
5351 * graphite.c (if_region_set_false_region): After moving a region
5352 in the false branch of a condition, remove the empty dummy
5353 basic block.
5354 (gloog): Remove wrong fix for PR38953.
5355
53562009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5357
5358 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5359 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5360 register_bb_in_sese, new_sese, free_sese): Moved.
5361 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5362 outermost_loop_in_scop, build_scop_iteration_domain,
5363 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5364 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5365 Use loop_in_sese_p instead of loop_in_scop_p.
5366 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5367 (free_scop): Do not free SCOP_BBS_B.
5368 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5369 ref_nb_loops): Moved here...
5370 * graphite.h (ref_nb_loops): ... from here.
5371 (struct scop): Remove bbs_b bitmap.
5372 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
6c9df8cb 5373 * gcc.dg/graphite/scop-19.c: New
c6bb733d 5374
53752009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5376
5377 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5378 detection.
5379
53802009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5381
5382 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5383 eq_loop_to_cloog_loop): Remove.
5384 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5385 * graphite.h (struct scop): Remove loop2cloog_loop.
5386 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5387
53882009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5389
5390 * opts.c (decode_options): Only add graphite options to O2
5391 if we compile with graphite enabled.
5392
53932009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5394
5395 * Merge from mainline (r143163:143684).
5396
53972009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5398
5399 * graphite.c (debug_value): Removed.
5400 * graphite.h (debug_value): Removed.
5401
54022009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5403
5404 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5405 after graphite: pass_copy_prop does not maintain a proper loop closed
5406 SSA form. pass_copy_prop should be fixed.
5407
54082009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5409
5410 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5411
54122009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5413
5414 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5415 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5416 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5417 changed the CFG.
5418
54192009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5420
5421 * graphite.c (gloog): Return true when code gen succeeded.
5422 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5423 the code of the function did not changed. After cleanup_tree_cfg
5424 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5425 form.
5426
54272009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5428
5429 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5430 gimple_call_lhs is NULL.
5431
54322009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5433 Tobias Grosser <tobi.grosser@amd.com>
5434
5435 * graphite.c (graphite_trans_scop_block): Do not block single
5436 nested loops.
5437
54382009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5439 Tobias Grosser <tobi.grosser@amd.com>
5440
5441 * graphite.c (build_scop_canonical_schedules): Start schedules at
5442 zero.
5443
54442009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5445 Tobias Grosser <tobi.grosser@amd.com>
5446
5447 * graphite.c (compare_prefix_loops): New.
5448 (build_scop_canonical_schedules): Rewritten.
5449 (graphite_transform_loops): Move build_scop_canonical_schedules
5450 after build_scop_iteration_domain.
5451
54522009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5453 Tobias Grosser <tobi.grosser@amd.com>
5454
5455 * graphite.c (add_conditions_to_domain): Add the loops to
5456 the dimension of the iteration domain. Do copy the domain
5457 only when it exists.
5458 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5459 (add_conditions_to_constraints): New.
5460 (can_generate_code_stmt, can_generate_code): Removed.
5461 (gloog): Do not call can_generate_code.
5462 (graphite_transform_loops): Call add_conditions_to_constraints
5463 after building the iteration domain.
5464
54652009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5466 Tobias Grosser <tobi.grosser@amd.com>
5467 Jan Sjodin <jan.sjodin@amd.com>
5468
5469 * graphite.c (scan_tree_for_params): On substractions negate
5470 all the coefficients of the term.
5471 (clast_to_gcc_expression_red): New. Handle reduction expressions
5472 of more than two operands.
5473 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5474 (get_vdef_before_scop): Handle also the case of default definitions.
5475
54762009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5477
5478 PR middle-end/38431
5479 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5480 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5481 (gloog): Do not call cleanup_tree_cfg.
5482 (graphite_transform_loops): Call cleanup_tree_cfg after all
5483 scops have been code generated.
5484
54852009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5486
5487 * passes.c (init_optimization_passes): Schedule after
5488 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5489
54902009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5491
5492 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5493 Fix comment.
5494 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5495 Set the type of an expression to the type of its assign statement.
5496 (expand_scalar_variables_expr): Do not pass loop_p.
5497 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5498 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5499 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5500
55012009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5502
5503 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5504 an expression to the gimple_expr_type of its assign statement.
5505 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5506 or tcc_declaration.
5507
55082009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5509
5510 PR tree-optimization/38786
6c9df8cb 5511 * gcc.dg/graphite/pr38786.c: New.
c6bb733d 5512 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5513 the SSA_NAME case of expand_scalar_variables_expr.
5514 (expand_scalar_variables_expr): Also gather the scalar computation
5515 used to index the memory access.
5516 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5517 the gimple_stmt_iterator where it inserts new code.
5518
55192009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5520
6c9df8cb 5521 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
c6bb733d 5522
55232009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5524
5525 * opts.c (decode_options): Enable flag_graphite_identity and
5526 flag_loop_block in -O2 and above.
5527
55282009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5529
5530 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5531 Fix merge problem: replace with the file from trunk.
5532
55332009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5534
5535 * Merge from mainline (r141727:143163).
5536
55372009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5538 Jan Sjodin <jan.sjodin@amd.com>
5539
5540 PR tree-optimization/38559
6c9df8cb 5541 * gcc.dg/graphite/pr38559.c: New.
c6bb733d 5542
5543 * graphite.c (debug_value, copy_constraint,
5544 swap_constraint_variables, scale_constraint_variable, ): New.
5545 (get_lower_bound, get_upper_bound): Removed.
5546 (graphite_trans_bb_strip_mine): Clean up this code that works
5547 only for constant number of iterations. Fully copy upper and
5548 lower bound constraints, not only the constant part of them.
5549 * graphite.h (debug_value): Declared.
5550
55512009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5552
5553 PR tree-optimization/38492
5554 PR tree-optimization/38498
5555 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5556 * tree-chrec.h (scev_is_linear_expression): Declared.
5557 * graphite.c (graphite_cannot_represent_loop_niter): New.
5558 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5559 (graphite_loop_normal_form): Use gcc_assert.
5560 (scan_tree_for_params): Use CASE_CONVERT.
5561 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5562 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5563 Use gcc_assert. Discard scops that contain unhandled cases.
5564 (build_scop_conditions): Return a boolean status for unhandled cases.
5565 (strip_mine_profitable_p): Print the loop number, not its depth.
5566 (is_interchange_valid): Pass the depth of the loop nest, don't
5567 recompute it wrongly.
5568 (graphite_trans_bb_block): Same.
5569 (graphite_trans_bb_block): Print tentative of loop blocking.
5570 (graphite_trans_scop_block): Do not print that the loop has been
5571 blocked.
5572 (graphite_transform_loops): Do not handle scops that contain condition
5573 scalar phi nodes.
5574
6c9df8cb 5575 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
c6bb733d 5576 in trunk.
6c9df8cb 5577 * gcc.dg/graphite/block-0.c: Update test.
5578 * gcc.dg/graphite/block-1.c: Same.
5579 * gcc.dg/graphite/block-2.c: Remove xfail and test for
c6bb733d 5580 blocking.
6c9df8cb 5581 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5582 * gcc.dg/graphite/block-3.c: New.
5583 * gcc.dg/graphite/pr38498.c: New.
c6bb733d 5584
55852008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5586
5587 PR tree-optimization/38510
5588 * gcc.dg/graphite/pr38510.c: New.
5589 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5590 (translate_clast): Call recompute_all_dominators before
5591 graphite_verify.
5592 (gloog): Call recompute_all_dominators before graphite_verify.
5593
55942008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5595
5596 PR tree-optimization/38492
5597 * graphite.c (rename_map_elt, debug_rename_elt,
5598 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5599 rename_map_elt_info, eq_rename_map_elts,
5600 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5601 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5602 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5603 (sese_build_livein_liveouts): New.
5604 (new_sese, free_sese): New.
5605 (new_scop): Call new_sese.
5606 (free_scop): Call free_sese.
5607 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5608 (register_old_new_names): Renamed register_old_and_new_names.
5609 (register_scop_liveout_renames, add_loop_exit_phis,
5610 insert_loop_close_phis, struct igp,
5611 default_liveout_before_guard, add_guard_exit_phis,
5612 insert_guard_phis, copy_renames): New.
5613 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5614 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5615 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5616 (scop_adjust_phis_for_liveouts): New.
5617 (gloog): Call scop_adjust_phis_for_liveouts.
5618
5619 * graphite.h (struct sese): Documented. Added fields liveout,
5620 num_ver and livein.
5621 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5622 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5623 (struct scop): Added field liveout_renames.
5624 (SCOP_LIVEOUT_RENAMES): New.
5625
56262008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5627
5628 PR tree-optimization/38409
5629 * gcc.dg/graphite/pr38409.c: New.
5630 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5631
56322008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5633
5634 * graphite.c (gcc_type_for_cloog_iv): By default return
5635 integer_type_node.
5636 (graphite_create_new_loop): Don't fold_convert the already
5637 fold_convert-ed expression.
5638
56392008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5640
5641 PR tree-optimization/38446
5642 * gcc.dg/graphite/pr38446.c: New.
5643 * graphite.c (register_bb_in_sese): New.
5644 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5645 looking at the bbs in the region.
5646 * graphite.h (sese): Add region_basic_blocks pointer set to
5647 structure and initialize at the time of defining new scop.
5648
56492008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5650
5651 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5652 (find_params_in_bb): Do not free data refs.
5653 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5654
56552008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5656
6c9df8cb 5657 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5658 * gcc.dg/graphite/scop-17.c: Same.
5659 * gcc.dg/graphite/block-5.c: New.
5660 * gcc.dg/graphite/block-6.c: New.
5661 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5662 * gcc.dg/graphite/pr37684.c: Same.
5663 * gcc.dg/graphite/block-2.c: Same.
c6bb733d 5664
5665 * graphite.c (struct ivtype_map_elt): New.
5666 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5667 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5668 gcc_type_for_cloog_iv): New.
5669 (loop_iv_stack_patch_for_consts): Use the type of the induction
5670 variable from the original loop, except for the automatically
5671 generated loops, i.e., in the case of a strip-mined loop, in
5672 which case there is no original loop: in that case just use
5673 integer_type_node.
5674 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5675 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5676 (clast_name_to_gcc): Accept params to be NULL.
5677 (clast_to_gcc_expression): Take an extra parameter for the type.
5678 Convert to that type all the expressions built by this function.
5679 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5680 (graphite_translate_clast_equation): Compute the type of the
5681 clast_equation before translating its LHS and RHS.
5682 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5683 (graphite_create_new_loop): Compute the type of the induction
5684 variable before translating the lower and upper bounds and before
5685 creating the induction variable.
5686 (rename_variables_from_edge, rename_phis_end_scop): New.
5687 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5688 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5689 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5690 compute_cloog_iv_types): New.
5691 (gloog): Call compute_cloog_iv_types before starting the
5692 translation of the clast.
5693
5694 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5695 (GBB_CLOOG_IV_TYPES): New.
5696 (debug_ivtype_map): Declared.
5697 (oldiv_for_loop): New.
5698
56992008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5700
5701 PR middle-end/38459
5702 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5703 (param_index): Assert if parameter is not know after parameter
5704 detection.
5705 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5706 (find_scop_parameters): Mark, that we have finished parameter
5707 detection.
5708 (graphite_transform_loops): Move condition detection before parameter
5709 detection.
5710 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6c9df8cb 5711 * gfortran.dg/graphite/pr38459.f90: New.
c6bb733d 5712
57132008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5714
5715 * graphite.c (graphite_transform_loops): Always call find_transform ()
5716 in ENABLE_CHECKING. So we test these code paths, even if we do not
5717 generate code.
5718
57192008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5720
5721 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5722 (print_scop): Ditto.
5723
57242008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5725
5726 PR middle-end/38084
6c9df8cb 5727 Fix gfortran.dg/graphite/id-3.f90.
c6bb733d 5728 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5729 regions more than once.
5730
57312008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5732
6c9df8cb 5733 Fix gfortran.dg/graphite/id-4.f90.
c6bb733d 5734 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5735 when not needed.
5736
57372008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5738
6c9df8cb 5739 Fix gfortran.dg/graphite/id-1.f90.
c6bb733d 5740 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5741 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5742 (max_precision_type): New.
5743 (value_clast): Removed.
5744 (clast_to_gcc_expression): Be more careful to types of expressions.
5745 Use max_precision_type and update use of gmp_cst_to_tree.
5746 (graphite_translate_clast_equation): Use max_precision_type.
5747 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5748 use the type of the condition.
5749 (graphite_create_new_loop): Do not use integer_type_node, use the
5750 max_precision_type of lb and ub.
5751
57522008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5753
5754 * graphite.c (build_scops_1): Initialize open_scop.exit
5755 and sinfo.last.
5756
57572008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5758
6c9df8cb 5759 * gcc.dg/graphite/pr38084.c: New.
5760 * gfortran.dg/graphite/id-1.f90: New.
5761 * gfortran.dg/graphite/id-2.f90: New.
5762 * gfortran.dg/graphite/id-3.f90: New.
5763 * gfortran.dg/graphite/id-4.f90: New.
5764 * gfortran.dg/graphite/pr37857.f90: New.
c6bb733d 5765
57662008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5767 Jan Sjodin <jan.sjodin@amd.com>
5768 Harsha Jagasia <harsha.jagasia@amd.com>
5769
5770 PR middle-end/37852
5771 PR middle-end/37883
5772 PR middle-end/37928
5773 PR middle-end/37980
5774 PR middle-end/38038
5775 PR middle-end/38039
5776 PR middle-end/38073
5777 PR middle-end/38083
5778 PR middle-end/38125
5779
6c9df8cb 5780 * gcc.dg/graphite/pr38073.c: New.
5781 * gcc.dg/graphite/pr37928.c: New.
5782 * gcc.dg/graphite/pr37883.c: New.
5783 * gcc.dg/graphite/pr38125.c: New.
5784 * gfortran.dg/graphite/pr38083.f90: New.
5785 * gfortran.dg/graphite/pr37852.f90: New.
5786 * gfortran.dg/graphite/pr37980.f90: New.
c6bb733d 5787
6c9df8cb 5788 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
c6bb733d 5789 the number of detected scops. Copy exact same test for loop
5790 blocking...
6c9df8cb 5791 * gcc.dg/graphite/block-1.c: Fix the number of expected
c6bb733d 5792 loops to be blocked as reductions are not handled.
6c9df8cb 5793 * gcc.dg/graphite/block-4.c: ...here. New.
c6bb733d 5794
5795 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5796 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5797 ...here.
5798 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5799 * Makefile.in (graphite.o): Depend on value-prof.h.
5800 (graphite.o-warn): Removed -Wno-error.
5801 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5802 to be a NULL pointer. Call update_stmt. Return the newly created
5803 cannonical induction variable.
5804
5805 * graphite.h (debug_rename_map): Declared. Fix some comments.
5806
5807 * graphite.c: Reimplement the code generation from graphite to gimple.
5808 Include value-prof.h.
5809 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5810 (get_old_iv_from_ssa_name): Removed.
5811 (graphite_stmt_p): New.
5812 (new_graphite_bb): Test for useful statements before building a
5813 graphite statement for the basic block.
5814 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5815 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5816 reason.
5817 (recompute_all_dominators, graphite_verify,
5818 nb_reductions_in_loop, graphite_loop_normal_form): New.
5819 (scop_record_loop): Call graphite_loop_normal_form.
5820 (build_scop_loop_nests): Iterate over all the blocks of the
5821 function instead of relying on the incomplete information from
5822 SCOP_BBS. Return the success of the operation.
5823 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5824 (add_bb_domains): Removed.
5825 (build_loop_iteration_domains): Don't call add_bb_domains.
5826 Add the iteration domain only to the basic blocks that have been
5827 translated to graphite.
5828 (build_scop_conditions_1): Add constraints only if the basic
5829 block have been translated to graphite.
5830 (build_scop_data_accesses): Completely disabled until data
5831 dependence is correctly implemented.
5832 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5833 (remove_all_edges_1, remove_all_edges): Removed.
5834 (get_new_name_from_old_name): New.
5835 (graphite_rename_variables_in_stmt): Renamed
5836 rename_variables_in_stmt. Call get_new_name_from_old_name.
5837 Use replace_exp and update_stmt.
5838 (is_old_iv): Renamed is_iv.
5839 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5840 Use replace_exp and update_stmt.
5841 (expand_scalar_variables_expr): Same. Use the map to get the
5842 new names for the renaming of induction variables and for the
5843 renaming of variables after a basic block has been copied.
5844 (expand_scalar_variables): Same.
5845 (graphite_rename_variables): Renamed rename_variables.
5846 (move_phi_nodes): Removed.
5847 (get_false_edge_from_guard_bb): New.
5848 (build_iv_mapping): Do not insert the induction variable of a
5849 loop in the renaming iv map if the basic block does not belong
5850 to that loop.
5851 (register_old_new_names, graphite_copy_stmts_from_block,
5852 copy_bb_and_scalar_dependences): New.
5853 (translate_clast): Heavily reimplemented: copy basic blocks,
5854 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5855 At each translation step call graphite_verify ensuring the
5856 consistency of the SSA, loops and dominators information.
5857 (collect_virtual_phis, find_vdef_for_var_in_bb,
5858 find_vdef_for_var_1, find_vdef_for_var,
5859 patch_phis_for_virtual_defs): Removed huge hack.
5860 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5861 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5862 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5863 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5864 if_region_get_condition_block, if_region_set_false_region,
5865 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5866 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5867 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5868 rewrite_into_sese_closed_ssa): New.
5869 (gloog): Remove dead code. Early return if code cannot be
5870 generated. Call cleanup_tree_cfg once the scop has been code
5871 generated.
5872 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5873 block loops with less than two loops.
5874 (graphite_apply_transformations): Remove the call to
5875 scop_remove_ignoreable_gbbs.
5876 (limit_scops): When build_scop_loop_nests fails, continue on
5877 the next scop. Fix open_scop.entry.
5878 (graphite_transform_loops): Call recompute_all_dominators: force the
5879 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5880 Call initialize_original_copy_tables and free_original_copy_tables
5881 to be able to copy basic blocks during code generation.
5882 When build_scop_loop_nests fails, continue on next scop.
5883 (value_clast): New union.
5884 (clast_to_gcc_expression): Fix type cast warning.
5885
58862008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5887
5888 * Merge from mainline (r140838:141727).
5889
58902008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5891
5892 PR middle-end/37833
5893
5894 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5895
58962008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5897
5898 PR middle-end/37943
5899
5900 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5901 exits and conditions.
6c9df8cb 5902 * gcc.dg/graphite/pr37943.c: New.
c6bb733d 5903
59042008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5905
5906 PR middle-end/37886
5907 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5908
59092008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5910
5911 * doc/invoke.texi: Fix spaces.
5912
59132008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5914
5915 PR tree-optimization/37891
5916 Reverted last commit.
5917 * graphite.c (create_single_entry_edge): Set
5918 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5919
59202008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5921 Mitul Thakkar <mitul.thakkar@amd.com>
5922
5923 * graphite.c (create_single_entry_edge): Set
5924 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5925
59262008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
5927
5928 * doc/invoke.texi: Add -fgraphite-identity.
5929 * graphite.c (graphite_apply_transformations): Check for
5930 -fgraphite-identity.
5931 * toplev.c (process_options): Add flag_graphite_identity.
5932 * tree-ssa-loop.c: Add flag_graphite_identity.
5933
59342008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5935
5936 Undo changes from 2008-10-02:
5937 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5938 operand type when copying the operand to a variable of different type.
5939 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5940 with the IV name after increment.
5941
59422008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5943 Harsha Jagasia <harsha.jagasia@amd.com>
5944
5945 PR tree-optimization/37828
6c9df8cb 5946 * gcc.dg/graphite/pr37828.c: New.
c6bb733d 5947 * graphite.c (graphite_trans_loop_block): Do not loop block
5948 single nested loops.
5949
59502008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
5951 Sebastian Pop <sebastian.pop@amd.com>
5952
5953 * graphite.c (struct rename_map_elt, new_rename_map_elt,
5954 rename_map_elt_info, eq_rename_map_elts): New.
5955 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
5956 (expand_scalar_variables_expr): Change parameters.
5957 (expand_scalar_variables_stmt): Same.
5958 (expand_scalar_variables): Same.
5959 (graphite_rename_ivs): Rename graphite_rename_variables.
5960 (build_iv_mapping): New.
5961 (translate_clast): Call build_iv_mapping.
5962 * graphite.h (gbb_p): New name.
5963
59642008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
5965
5966 PR tree-optimization/37684
5967 * gcc.dg/graphite/pr37684.c: New.
5968 * graphite.c (exclude_component_ref): New.
5969 (is_simple_operand): Call exclude_component_ref.
5970
59712008-10-02 Jan Sjodin <jan.sjodin@amd.com>
5972 Harsha Jagasia <harsha.jagasia@amd.com>
5973
5974 PR tree-optimization/37485
5975 * gcc.dg/graphite/block-2.c: New
5976 * graphite.c (gmp_cst_to_tree): Moved.
5977 (iv_stack_entry_is_constant): New.
5978 (iv_stack_entry_is_iv): New.
5979 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
5980 (loop_iv_stack_insert_constant): New.
5981 (loop_iv_stack_pop): Use new datatpype.
5982 (loop_iv_stack_get_iv): Same.
5983 (loop_iv_stack_get_iv_from_name): Same.
5984 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
5985 (loop_iv_stack_patch_for_consts): New.
5986 (loop_iv_stack_remove_constants): New.
5987 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
5988 (translate_clast): Call loop_iv_stack_patch_for_consts and
5989 loop_iv_stack_remove_constants.
5990 (gloog): Use new datatype. Redirect construction edge to end
5991 block to avoid accidental deletion.
5992 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
5993 iv stack entry.
5994 (union iv_stack_entry_data): New. Data in iv stack entry.
5995 (struct iv_stack_entry): New. Datatype for iv stack entries.
5996
59972008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5998
5999 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6000 operand type when copying the operand to a variable of different type.
6001
60022008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6003
6004 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6005 with the IV name after increment.
6006
60072008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6008
6009 * Merge from mainline (r140164:140838).
6010
60112008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6012
6013 * graphite-data-ref.c: New.
6014 * graphite.c (print_scop): Also dump the dependence graph.
6015 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6016 (new_scop): Initialize SCOP_DEP_GRAPH.
6017 (build_scop_dynamic_schedules): New.
6018 (build_access_matrix_with_af): Fixed column numbering.
6019 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6020 * graphite.h: Add ifndef/define guards against multiple inclusion.
6021 (struct scop): Add dep_graph field.
6022 (SCOP_DEP_GRAPH): Defined.
6023 (ref_nb_loops): Fixed and moved to other position.
6024 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6025 (nb_loops_around_loop_in_scop): New.
6026 (graphite_dump_dependence_graph): Declared.
6027 (graphite_build_rdg_all_levels): Declared.
6028 (graphite_test_dependence): Declared.
6029 * Makefile.in (graphite-data-ref.o): New target.
6030
60312008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6032
6033 * Merge from mainline (139870:140164).
6034
60352008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6036
6037 * Merge from mainline (138275:139870).
6c9df8cb 6038 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
c6bb733d 6039 the commits from trunk broke the niter detection.
6040
60412008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6042
6043 * graphite.c: Add more documentation. Fix formatting.
6044 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6045 loop_iv_stack_debug): Moved...
6046 (schedule_to_scattering): Move before use.
6047 (dot_all_scops): Include in "#if 0" the code for system
6048 call dotty.
6049
6050 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6051 loop_iv_stack_debug): ...here.
6052
60532008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6054
6055 * tree-phinodes.c (make_phi_node): Extern.
6056 (add_phi_node_to_bb): New.
6057 (create_phi_node): Call add_phi_node_to_bb.
6058 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6059 (remove_statement): Handle case where stored phi was updated
6060 and is no longer the same.
6061 * graphite.c (is_parameter): New.
6062 (is_old_iv): New.
6063 (expand_scalar_variables_expr): New.
6064 (expand_scalar_variables_stmt): New.
6065 (expand_scalar_variables): New.
6066 (move_phi_nodes): Create new phi instead of moving old one.
6067 (translate_clast): Call expand_scalar_variables.
6068 (find_vdef_for_var_in_bb): Also scan regular definitions.
6069 (skip_phi_defs): New.
6070 (collect_scop_exit_phi_args): New.
6071 (patch_scop_exit_phi_args): New.
6072 (gloog): Patch phis after scop.
6073 * tree-flow.h: (add_phi_node_to_bb): Declared.
6074 (make_phi_node): Declared.
6075
60762008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6077
6078 * graphite.c (end_scop): Split the entry of the scop when it
6079 is the header of the loop in which the scop is ending.
6080 (build_scops_1, limit_scops): Update uses of end_scop.
6081
60822008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6083
6084 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6085 SCOP_ENTRY or SCOP_EXIT.
6086
60872008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6088
6089 * graphite.c (get_construction_edge): Removed.
6090 (gloog): Construction edge is the scop entry edge.
6091
60922008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6093
6094 * graphite.c (can_generate_for_scop): Removed.
6095 (gloog): Do not call it.
6096
60972008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6098
6099 * graphite.c (new_scop): Entry of a scop is an edge.
6100 Initialize SESE region.
6101 (free_scop): Free SESE region.
6102 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6103 (split_difficult_bb): New, split from end_scop.
6104 (end_scop): Exit of a scop is an edge.
6105 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6106 not automatically updated and thus is always wrong.
6107 * graphite.h (struct sese): New.
6108 (SESE_ENTRY): New.
6109 (SESE_EXIT): New.
6110 (struct scop): New field for a SESE region. Remove entry, exit.
6111 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6112 semantics as before. Moved comment around.
6113
61142008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6115 Sebastian Pop <sebastian.pop@amd.com>
6116
6117 * graphite.c (graphite_transform_loops): Always enable gloog
6118 and find_transform when ENABLE_CHECKING.
6119
61202008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6121
6122 * graphite.c (graphite_transform_loops): Move pretty printer
6123 of SCOPs before doing any transform. Remove call to print_scops
6124 and dot_all_scops_1.
6125
61262008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6127
6128 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6129 (print_graphite_bb): Same.
6130
61312008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6132
6133 * graphite.c (dot_all_scops_1): Cleanup.
6134 (move_scops): Fix comment.
6135
61362008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6137
6138 * graphite.c (build_scop_bbs): Revert commit 139355:
6139
6140 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6141 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6142
6143 * graphite.c (build_scop_bbs): Factor up code.
6144
61452008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6146
6147 * graphite.c (gloog): Update dominator info.
6148
61492008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6150
6151 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6152
61532008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6154
6155 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6156 initialization.
6157 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6158 (translate_clast): Correct formatting.
6159 * graphite.h (struct num_map): Removed.
6160 (struct graphite_bb): Remove num_map field.
6161 (GBB_INDEX_TO_NUM_MAP): Removed.
6162
61632008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6164
6165 * graphite.c (build_access_matrix_with_af): Fix comments.
6166 (build_scop_data_accesses): Same.
6167
61682008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6169
6170 * graphite.c (build_scop_data_accesses): Don't construct
6171 access matrices. Add a FIXME and an assert condition that
6172 should pass when the access matrices will be needed.
6173
61742008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6175
6176 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6177 really_constant_p.
6178 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6179 Moved close by free_graphite_bb.
6180 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6181 (new_scop): Move close by free_scop.
6182 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6183
61842008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6185
6186 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6187 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6188 instead of recursive call.
6189 (graphite_translate_clast_equation): New.
6190 (graphite_create_guard_cond_expr): New.
6191 (graphite_create_new_guard): New.
6192 (get_stack_index_from_iv): Removed.
6193 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6194 (get_true_edge_from_guard_bb): New.
6195 (translate_clast): Handle stmt_guard in clast.
6196 (get_construction_edge): Allow construction edge detection for
6197 a scope entry with multiple predecessors if one predecessor is
6198 the immediate dominator of scope entry.
6199 (can_generate_code_stmt): Enable code generation for clast_guard.
6200 (gloog): Use correct context loop. Removed check for post dominators.
6201 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6202
62032008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6204
6205 * graphite.c (remove_dead_loops): Document better which
6206 loops are removed.
6207
62082008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6209
6210 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6211 and PPLINC.
6212 (graphite.o): Also depends on pointer-set.h.
6213
62142008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6215
6216 * graphite.c (scop_record_loop): Fix compile warning.
6217
62182008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6219 Sebastian Pop <sebastian.pop@amd.com>
6220
6221 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6222
62232008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6224
6225 * graphite.c (build_graphite_bb): Initialize bb->aux to
6226 point to the graphite_bb_p.
6227 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6228 content of bb->aux.
6229 (add_bb_domains): Does not use the scop parameter.
6230 (graphite_transform_loops): Clean bb->aux at the end.
6231
62322008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6233 Sebastian Pop <sebastian.pop@amd.com>
6234
6c9df8cb 6235 * lib/target-supports.exp
c6bb733d 6236 (check_effective_target_fgraphite): New.
6237
6c9df8cb 6238 * gcc.dg/graphite/graphite.exp: Early exit when
c6bb733d 6239 check_effective_target_fgraphite returns false.
6240 Set dg-do-what-default to compile.
6241 (scan-graphite-dump-times): Removed.
6c9df8cb 6242 * gfortran.dg/graphite/graphite.exp: Same.
c6bb733d 6243
6c9df8cb 6244 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
c6bb733d 6245 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6c9df8cb 6246 * gcc.dg/graphite/scop-1.c: Same.
6247 * gcc.dg/graphite/scop-2.c: Same.
6248 * gcc.dg/graphite/scop-3.c: Same.
6249 * gcc.dg/graphite/scop-4.c: Same.
6250 * gcc.dg/graphite/scop-5.c: Same.
6251 * gcc.dg/graphite/scop-6.c: Same.
6252 * gcc.dg/graphite/scop-7.c: Same.
6253 * gcc.dg/graphite/scop-8.c: Same.
6254 * gcc.dg/graphite/scop-9.c: Same.
6255 * gcc.dg/graphite/scop-10.c: Same.
6256 * gcc.dg/graphite/scop-11.c: Same.
6257 * gcc.dg/graphite/scop-12.c: Same.
6258 * gcc.dg/graphite/scop-13.c: Same.
6259 * gcc.dg/graphite/scop-matmult.c: Same.
6260 * gcc.dg/graphite/scop-14.c: Same.
6261 * gcc.dg/graphite/scop-15.c: Same.
6262 * gcc.dg/graphite/block-0.c: Same.
6263 * gcc.dg/graphite/scop-16.c: Same.
6264 * gcc.dg/graphite/block-1.c: Same.
6265 * gcc.dg/graphite/scop-17.c: Same.
6266 * gcc.dg/graphite/scop-18.c: Same.
6267 * gfortran.dg/graphite/block-1.f90: Same.
6268 * gfortran.dg/graphite/scop-1.f: Same.
6269 * gfortran.dg/graphite/block-2.f: Same.
c6bb733d 6270
62712008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6272
6273 * graphite.c: Fix some XXX comments.
6274 (build_scop_dynamic_schedules): Removed.
6275
62762008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6277
6278 * graphite.h (scop_max_loop_depth): Moved...
6279 * graphite.c (scop_max_loop_depth): ...here.
6280 (remove_all_edges_1): New.
6281 (remove_all_edges): Factored code.
6282 (remove_cond_exprs): Check only the last statement for
6283 a GIMPLE_COND expression.
6284
62852008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6286
6287 * graphite.c (scan_tree_for_params): Early return when the
6288 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6289 (find_scop_parameters): Factor out code.
6290 (graphite_trans_bb_strip_mine): Remove dead code.
6291
62922008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6293
6294 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6295 graphite_trans_bb_move_loop): Factor asserts.
6296 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6297 Do not call calculate_dominance_info and estimate_bb_frequencies.
6298
62992008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6300
6301 * graphite.c (create_loops_mapping, free_loops_mapping,
6302 create_loops_mapping_num, debug_loop_mapping_1,
6303 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6304 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6305 graphite_loops_mapping_add_child_num,
6306 graphite_loops_mapping_insert_child,
6307 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6308 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6309 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6310 create_num_from_index, get_num_from_index,
6311 swap_loop_mapped_depth): Removed.
6312 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6313 (free_scop): Do not call free_loops_mapping.
6314 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6315 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6316 get_loop_mapped_depth.
6317 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6318 (graphite_trans_bb_strip_mine): Same.
6319 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6320 (struct scop): Remove field loops_mapping.
6321
63222008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6323 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6324
6325 * graphite.c (scop_record_loop): Factor out one level of the
6326 condition by early return.
6327 (build_scop_loop_nests): Format following FSF coding style.
6328 (build_scop_dynamic_schedules): Factor out code.
6329 (scopdet_bb_info): Reindent. Default case should not be reachable.
6330
63312008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6332 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6333
6334 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6335 assignments that are not handled as simple operands for now.
6336
63372008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6338 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6339
6340 * graphite.c (build_scop_bbs): Factor up code.
6341
63422008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6343 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6344
6345 * graphite.c (stmt_simple_for_scop_p): Factor code out
6346 of the loop.
6347 (enum gbb_type): New. Group all the GBB_* types under it.
6348 (is_loop_exit): Moved...
6349 (end_scop): Enable BB spliting.
6350 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6351 * cfgloop.h (is_loop_exit): Declared.
6352
63532008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6354
6355 * doc/invoke.texi: Remove strides from examples containing
6356 DO loops when the strides are equal to 1.
6357
63582008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6359 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6360
6361 * graphite.c (graphite_trans_scop_block): Or the result with
6362 the result from graphite_trans_loop_block.
6c9df8cb 6363 * gcc.dg/graphite/block-1.c: New.
6364 * gfortran.dg/graphite/block-1.f90: New.
6365 * gfortran.dg/graphite/block-2.f: New.
c6bb733d 6366
63672008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6368
6369 * graphite.c (graphite_transform_loops): Call cloog_initialize
6370 and cloog_finalize.
6371
63722008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6373
6374 * tree-data-ref.c) (stmt_simple_memref_p): New.
6375 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6376 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6377 (is_simple_operand): Call stmt_simple_memref_p.
6378
6c9df8cb 6379 * gcc.dg/graphite/scop-matmult.c: Updated for not
c6bb733d 6380 using pointer arithmetic, as this is optimized by PRE and
6381 makes the code too difficult to analyze.
6382
6c9df8cb 6383 * gcc.dg/graphite/scop-18.c: Same.
c6bb733d 6384
63852008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6386
6387 * gdbinit.in (pgg): New.
6388
63892008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6390
6391 * graphite.c (graphite_trans_loop_block): Fix warning.
6392
63932008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6394
6395 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6396
63972008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6398
6399 * graphite.c (graphite_trans_bb_block): Remove check for
6400 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6401 Check if loop blocking is profitable for every loop, before applying
6402 the changes.
6403 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6404 if flag_loop_block is set.
6405
64062008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6407
6408 * graphite.c: Add some more documentation for the loop
6409 mapping.
6410
64112008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6412
6413 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6414 * graphite.c: Format on less than 80 columns.
6415 * graphite.h: Same.
6416
64172008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6418
6419 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6420
64212008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6422
6423 * doc/invoke.texi (floop-block, floop-strip-mine,
6424 floop-interchange): Update documentation with examples.
6425
64262008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6427
6428 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6429 add_referenced_var.
6430 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6431
64322008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6433
6434 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6435 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6436 * tree-scalar-evolution.c: Revert useless changes.
6437 * tree-phinodes.c: Same.
6438 * cfghooks.c: Same.
6439 * vec.h: Same.
6440 * tree-vectorizer.h: Same.
6441 * tree-flow.h: Same.
6442 * tree-cfg.c: Same.
6443 * common.opt (fgraphite): Update documentation.
6444
64452008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6446
6447 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6448 -floop-interchange): Add more text for explaining what each of these
6449 flags is doing.
6450 * tree-into-ssa.c (gimple_vec): Moved to...
6451 * graphite.c: Include gimple.h.
6452 (gimple_vec): Moved to...
6453 (del_loop_to_cloog_loop): Removed.
6454 (loop_affine_expr): Do not call create_data_ref when the
6455 operand is a constant.
6456 (new_scop): Use free instead of del_loop_to_cloog_loop.
6457 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6458 * gimple.h (gimple_vec): ... here.
6459
64602008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6461
6462 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6463 latch executions.
6464 (build_loop_iteration_domains): Fail, if latch executions unknown.
6465
64662008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6467
6468 * graphite.c (add_conditions_to_domain): New.
6469 (build_scop_conditions_1): Call add_conditions_to_domain.
6470 (set_cloog_options): Allow to disable optimizations.
6471
64722008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6473
6474 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6475 Do not use walk_dominator_tree.
6476 (find_scop_parameters): Do not use walk_dominator_tree.
6477
64782008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6479
6480 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6481 (idx_record_params): Adapt.
6482 * graphite.h (scop_gimple_loop_depth): New.
6483
64842008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6485
6486 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6487 (scan_tree_for_params): Remove value_init.
6488 (build_scop_context): Remove value_init.
6489 (build_loop_iteration_domains): Remove value_init.
6490 (schedule_to_scattering): Remove value_init.
6491 (graphite_trans_bb_strip_mine): Remove value_init.
6492
64932008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6494
6495 * gcc/graphite.c (limit_scops): New.
6496 (graphite_transform_loops): Add limit SCoPs.
6c9df8cb 6497 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6498 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6499 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6500 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6501 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6502 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6503 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6504 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6505 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
c6bb733d 6506 Change loop numbers.
6c9df8cb 6507 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
c6bb733d 6508 Change loop numbers.
6c9df8cb 6509 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6510 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6511 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6512 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6513 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6514 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6515 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6516 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6517 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6518 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
c6bb733d 6519
65202008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6521
6522 * graphite.c (graphite_transform_loops): Call always find_transform.
6523
65242008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6525
6526 * graphite.c (free_loops_mapping): New.
6527 (stmt_simple_for_scop_p): Fix typo.
6528 (stmt_simple_for_scop_p): Fix tuples functions, that
6529 broke polyhedron.
6530 (free_graphite_bb): Fix some memleaks.
6531 (free_scop): Fix some memleaks.
6532 (scopdet_bb_info): Do not forget some tmp SCoPs.
6533 (find_params_in_bb): Fix some memleaks.
6534 (clast_to_gcc_expression): Fix warning.
6535
65362008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6537
6c9df8cb 6538 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6539 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
c6bb733d 6540
65412008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6542
6543 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6544 Move code ifdef-ed HAVE_cloog...
6545 * graphite.c: Include toplev.h.
6546 ... here.
6547 * Makefile.in (OBJS-common): Always build graphite.o.
6548 (BACKEND): Remove @GRAPHITE@.
6549 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6550 (graphite.o): Depend on TOPLEV_H.
6551
65522008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6553
6554 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6555 Remove typo left from polylib to ppl conversion.
6556 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6557
65582008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6559
6560 * toplev.c (process_options): Move the graphite loop optimization
6561 flags...
6562 * tree-ssa-loop.c (graphite_transforms): ... here.
6563 When not configured with CLooG, print to dump_file that
6564 Graphite transforms were not performed.
6c9df8cb 6565 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
c6bb733d 6566 New.
6c9df8cb 6567 * gcc.dg/graphite/*.c: Updated all testcases to use
c6bb733d 6568 scan-graphite-dump-times.
6569
65702008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6571
6572 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6573 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6574
65752008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6576 Jan Sjodin <jan.sjodin@amd.com>
6577
6578 * configure: Regenerated.
6579 * omp-low.c (expand_omp_sections): Remove now unused code.
6580 * config.in (HAVE_polylib): Removed.
6581 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6582 (PPLLIBS, PPLINC): Added.
6583 * graphite.c: Replace unsigned with int wherever possible.
6584 Don't access Cloog's data structures, but use accessor functions.
6585 Clast's stmt->type is now implemented as a vtable: change the
6586 switches of stmt->type into ifs.
6587 (polylib/polylibgmp.h): Don't include.
6588 (initialize_dependence_polyhedron,
6589 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6590 statement_precedes_p, test_dependence, build_rdg_all_levels,
6591 dump_dependence_graph): Removed until this code is cleaned up
6592 or ported to Cloog.
6593 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6594 (POLYLIBINC): Renamed PPLINC.
6595
65962008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6597 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6598 Jan Sjodin <jan.sjodin@amd.com>
6599
6600 Finish the merge and tuplification of graphite.
6601
66022008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6603 Jan Sjodin <jan.sjodin@amd.com>
6604
6605 Partial merge from mainline (138072:138275).
6606 * graphite.c still has to be tuplified.
6607
66082008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6609
6610 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6611 (create_num_from_index): New.
6612 (get_num_from_index): Also pass in the graphite BB.
6613 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6614 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6615 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6616 (is_interchange_valid): Return false when failing.
6617 * graphite.h (struct num_map): New.
6618 (struct graphite_bb): New field num_map.
6619 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6620
66212008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6622
6623 * graphite.c (dump_gbb_conditions): Print also conditions like
6624 "if (a)". Remove dublicated code and use print_generic_expr ().
6625 (stmt_simple_for_scop_p): Only allow conditions we can handle
6626 {<, <=, >, >=}.
6627
66282008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6629
6630 * graphite.h (struct scop): Removed new_ivs field.
6631 (SCOP_NEWIVS): Deleted.
6632 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6633 clast_to_gcc_expression, graphite_create_new_loop):
6634 Removed use of new_ivs.
6635
66362008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6637
6638 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6639 create_loops_mapping_num, debug_loop_mapping_1): New.
6640 (debug_loop_mapping): Call debug_loop_mapping_1.
6641 (get_loop_mapping_for_num,
6642 graphite_loops_mapping_add_child,
6643 graphite_loops_mapping_add_child_num,
6644 graphite_loops_mapping_insert_child,
6645 graphite_loops_mapping_parent,
6646 split_loop_mapped_depth_for_num,
6647 loop_mapped_depth_split_loop): New.
6648 (increment_loop_mapped_depths): Removed.
6649 (swap_loop_mapped_depth_for_num): Reimplemented.
6650 (new_scop): Call create_loops_mapping.
6651 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6652 (translate_clast): Pass the old loop father in parameter, and pass
6653 it to get_old_iv_from_ssa_name.
6654 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6655 can_generate_code, can_generate_for_scop): New.
6656 (graphite_trans_bb_block): Returns false when it fails to transform.
6657 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6658
66592008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6660
6661 Reverted all the changes related to the streamization and
6662 loop fusion.
6663 These changes are now tracked in the streamization branch.
6664
66652008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6666 Jan Sjodin <jan.sjodin@amd.com>
6667
6668 * graphite.c (gbb_compare): Correctly constify.
6669 (gbb_can_be_ignored): Indent.
6670 (graphite_trans_scop_swap_1and2): Add legality check.
6671 Remove dead FIXMEs.
6672
66732008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6674
6675 Remove fallouts from "Reverted the Condate changes".
6676 * tree.h: Remove unused decl.
6c9df8cb 6677 * gcc.dg/tree-checker: Same.
c6bb733d 6678 * timevar.def: Remove counter.
6679
66802008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6681
6682 * Merge from mainline (135673:138072).
6683
6684 Reverted the MIRO changes (from 2008-04-05) that are now
6685 tracked in the miro branch.
6686 * tree-bounds.c: Removed.
6687 * tree-bounds.h: Removed.
6688
6689 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6690 are now tracked in the condate branch.
6691 * tree-check.c: Removed.
6692 * tree-match.c: Removed.
6693 * condate.y: Removed.
6694
66952008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6696
6697 * common.opt: New user flag -floop-block, -floop-strip-mine
6698 and -floop-interchange.
6699 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6700 graphite loop optimization flags is turned on.
6701 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6702 flag_loop_strip_mine and flag_loop_interchange checks before
6703 optimizations.
6704 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6705 -floop-strip-mine and -floop-interchange.
6c9df8cb 6706 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
c6bb733d 6707 -fgraphite.
6c9df8cb 6708 * gcc.dg/graphite/scop-16.c: Ditto.
6709 * gcc.dg/graphite/scop-17.c: Ditto.
6710 * gcc.dg/graphite/scop-18.c: Ditto.
c6bb733d 6711
67122008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6713 Sebastian Pop <sebastian.pop@amd.com>
6714
6715 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6716 (create_empty_loop_on_edge): More fixes.
6717 * tree-phinodes.c (resize_phi_node): Extern.
6718 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6719 * cfghooks.c (update_dominator_information): New split from
6720 split_edge.
6721 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6722 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6723 successor of the function entry block.
6724
6725 * graphite.c: Include pointer-set.h.
6726 (debug_loop_mapping, increment_loop_mapped_depths,
6727 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6728 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6729 swap_loop_mapped_depth_for_num, get_num_from_index,
6730 swap_loop_mapped_depth, loop_iv_stack_debug,
6731 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6732 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6733 get_old_iv_from_ssa_name): New.
6734 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6735 (free_scop): Free SCOP_LOOPS_MAPPING.
6736 (scop_record_loop): Record old ivs.
6737 (create_var_name): Removed.
6738 (initialize_cloog_names): Allocate double space in case strip mine
6739 applies to all loops once.
6740 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6741 (clast_to_gcc_expression): Same. Implement more clast to gimple
6742 translation.
6743 (graphite_create_new_loop): Pass in ivstack.
6744 (remove_all_edges): Pass in the construction_edge.
6745 (graphite_remove_iv): Removed.
6746 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6747 remove_cond_exprs): Rewritten.
6748 (move_phi_nodes): New.
6749 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6750 (translate_clast): Pass in ivstack. Rewrite some cases.
6751 (set_cloog_options, debug_clast_stmt): New.
6752 (find_transform): Use set_cloog_options.
6753 (outermost_loop_layer): Removed.
6754 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6755 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6756 mark_old_loops, remove_dead_loops): New.
6757 (gloog): Rewritten.
6758 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6759 (const_column_index, get_first_matching_sign_row_index,
6760 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6761 get_upper_bound): New.
6762 (graphite_trans_bb_strip_mine): Also update the iv map.
6763
6764 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6765 (struct name_tree): Add a loop field.
6766 (struct scop): Add a graphite_loops_mapping field.
6767 (SCOP_LOOPS_MAPPING): New.
6768 (debug_clast_stmt): Declare.
6769 * lambda.h (find_induction_var_from_exit_cond): Declare.
6770 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6771 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6772 (create_empty_loop_on_edge): Updated.
6773 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6774 rename_variables_in_bb): Declare.
6775 * tree-cfg.c (remove_bb): Extern.
6776
6c9df8cb 6777 * gcc.dg/graphite/block-0.c: New.
c6bb733d 6778
67792008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6780 Sebastian Pop <sebastian.pop@amd.com>
6781
6782 * graphite.c (strip_mine_profitable_p): New.
6783 (graphite_trans_bb_block): Disable strip mining if not profitable.
6784
6c9df8cb 6785 * gcc.dg/graphite/scop-18.c: New.
6786 * gcc.dg/graphite/scop-17.c: Fixed.
6787 * gcc.dg/graphite/scop-16.c: Fixed.
c6bb733d 6788
67892008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6790 Jan Sjodin <jan.sjodin@amd.com>
6791 Sebastian Pop <sebastian.pop@amd.com>
6792
6793 * graphite.c (is_interchange_valid): New.
6794 (graphite_trans_bb_block): Check loop nest of basic block for legality
6795 of interchange.
6796
6797 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6798 outer_most_loop, gbb_outer_most_loop_index): New.
6799
6800 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6801 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6c9df8cb 6802 * gcc.dg/graphite/scop-16.c: New.
6803 * gcc.dg/graphite/scop-17.c: New.
c6bb733d 6804
68052008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6806
6807 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6808 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6809
68102008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6811
6812 * graphite.c (new_scop): Initialize SCOP_EXIT.
6813 (scopdet_info): Add.
6814 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6815 (build_scops_1): Cleanup, bugfixes.
6816 (build_scops): Cleanup.
6817
6c9df8cb 6818 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6819 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
c6bb733d 6820
68212008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6822
6c9df8cb 6823 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
c6bb733d 6824
6c9df8cb 6825 * gfortran.dg/graphite/graphite.exp: Use
c6bb733d 6826 DEFAULT_GRAPHITE_FLAGS.
6827
6c9df8cb 6828 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
c6bb733d 6829
68302008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6831
6832 * graphite.c (scan_tree_for_params): Do not assert any more if
6833 MULT_EXPR parameter is negative.
6834
6c9df8cb 6835 * gfortran.dg/graphite/scop-1.f: New.
c6bb733d 6836
6c9df8cb 6837 * gfortran.dg/graphite/graphite.exp: New.
c6bb733d 6838
6c9df8cb 6839 * gcc.dg/graphite/scop-15.c: New.
c6bb733d 6840
68412008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6842
6843 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6844
68452008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6846
6847 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6848 graphite_swap_loops.
6849 (graphite_trans_bb_move_loop): New.
6850 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6851 (graphite_trans_bb_block): New.
6852 (graphite_trans_loop_block): New.
6853 (graphite_trans_scop_swap_1and2): Rename from
6854 graphite_trans_swap_1and2.
6855 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6856 (graphite_trans_scop_block): New.
6857 (graphite_apply_transformations): Rename from
6858 graphite_transformations.
6859
6c9df8cb 6860 * gcc.dg/graphite/scop-matmult.c: New.
c6bb733d 6861
68622008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6863
6864 * graphite.c (gbb_compare): New.
6865 (graphite_sort_gbbs): New.
6866 (gbb_can_be_ignored): New.
6867 (scop_remove_ignoreable_gbbs): New.
6868 (graphite_transformations): Cleanup and add
6869 scop_remove_ignoreable_gbbs.
6870 * lambda.h (lambda_vector_compare): New.
6871
68722008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6873
6874 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6875 (graphite_swap_loops): int -> unsigned
6876 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6877 (graphite_transformations): New.
6878 (graphite_transform_loops): Move to graphite_transformations.
6879 * graphite.h (gbb_nb_loops): Return unsigned.
6880
68812008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6882
6883 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6884 the domain matrix. This makes scop-0.c work again.
6885
68862008-06-20 Richard Guenther <rguenther@suse.de>
6887
6888 * graphite.h: Adjust copyright to GPLv3.
6889 * graphite.c: Likewise.
6890 (stmt_simple_memref_for_scop_p): Split out from ...
6891 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6892 and simplify.
6893 (get_bb_type): Optimize.
6894 (is_pred): Remove.
6895 (is_bb_addable): Fix memleak, replace is_pred call with
6896 single_pred.
6897 (build_scops): Use current_loops.
6898 (param_index): Fix memleak.
6899
69002008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6901
6902 * graphite.c: Fix formatting.
6903
69042008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6905
6906 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6907 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6908 (create_var_name, save_var_name): Newly defined functions.
6909 (initialize_cloog_names): Part of the code factored out to
6910 save_var_name.
6911 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6912 in clast_reduction statement.
6913 (graphite_create_new_loop): Now takes a new parameter
6914 for outer_loop.
6915 (translate_clast): Now also takes the context_loop and bb_exit
6916 parameters. Rewritten the code so that it creates a gimple code
6917 inside the given context.
6918 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6919 remove_cond_expr, disconnect_cond_expr,
6920 disconnect_virtual_phi_nodes): Newly defined functions.
6921 * graphite.h (struct scop): added old_ivs vector.
6922 SCOP_OLDIVS: New macro.
6923
69242008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6925
6926 * cfgloopmanip.c: Add missing function comments, fix formatting.
6927
69282008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6929
6930 * cfgloopmanip.c (update_dominators_in_loop): Defined.
6931 (create_empty_loop_on_edge): Defined.
6932 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
6933 instead of void.
6934 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
6935 (update_dominators_in_loop): Declared as extern
6936 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
6937
69382008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
6939
6940 * graphite.c (print_graphite_bb): Allow changing number of loops
6941 in SCoP domain.
6942 (initialize_cloog_names): Allow changing number of loops.
6943 (build_cloog_prog): Simplify.
6944 (find_transform): Enable cloog option --strides.
6945 (graphite_swap_loops): New.
6946 (graphite_strip_mine_loop): New.
6947 (graphite_trans_swap_1and2): New.
6948 (graphite_trans_strip): New.
6949 (graphite_transform_loops): Add graphite_trans_strip.
6950 * graphite.h (scop_max_loop_depth): New.
6951
69522008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6953
6954 * graphite.c (build_scop_iteration_domain): Remove forgotten
6955 line. (Fixes compile)
6956
69572008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6958
6959 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
6960 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
6961 (build_bb_loops): New.
6962 (graphite_transform_loops): Add build_bb_loops.
6963 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
6964 numbers.
6965 * graphite.h (graphite_bb): Add loops.
6966 (gbb_nb_loops): New.
6967 (gbb_loop_at_index): New.
6968 (gbb_loop_index): New.
6969 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
6970 using nb_params_in_scop.
6971
69722008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6973
6974 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
6975 (build_scop_canonical_schedules): Build minimized schedule.
6976 (schedule_to_scattering): Adapt to minimized schedule.
6977 * graphite.h (graphite_bb): Add/Update descriptions.
6978
69792008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
6980 Tobias Grosser <grosser@fim.uni-passau.de>
6981
6982 * graphite.c (print_graphite_bb): Add condition printing.
6983 (dump_value): New.
6984 (dump_gbb_conditions): New.
6985 (build_scop_conditions_1): New.
6986 (build_scop_conditions): New.
6987 * graphite.h (graphite_bb): Add conditions.
6988
69892008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6990
6991 * graphite.c (print_graphite_bb):
6992 (free_graphite_bb): New.
6993 (free_scop): Free bbs.
6994 (get_bb_type): Free doms.
6995 (build_scop_context): Free context matrix.
6996 (build_loop_iteration_domains): Remove unused code.
6997 (build_cloog_prog): Free scattering function and blocklist.
6998 (find_transform): Free options.
6999
70002008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7001
7002 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7003 Remove unnecessery cloog data structures. Make a copy of the domain
7004 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7005 unnecessary cloog data structures. Fix memory leaks. Remove insert
7006 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7007 used.
7008 (build_scop_iteration_domain): Remove unnecessary cloog
7009 data structures. Fix memory leaks.
7010 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7011 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7012
70132008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7014
7015 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7016
70172008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7018
7019 * graphite.c (end_scop): Style fix.
7020 (schedule_to_scattering): Style and comment fix.
7021
70222008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7023 * graphite.c (print_graphite_bb): Fix definiton of
7024 schedule_to_scattering.
7025 (initialize_cloog_names): Change nb_scattdims to max loop
7026 depth in SCoP.
7027 (schedule_to_scattering): Take parameter for number of scattering
7028 dimensions.
7029 (build_cloog_prog): Only build as much scattering dimensions as
7030 necessary.
7031
70322008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7033
7034 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7035 in polyhedron/aermod.f90.
7036
70372008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7038 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7039 Harsha Jagasia <harsha.jagasia@amd.com>
7040
7041 * graphite.c (is_bb_addable): Fix segfault.
7042
70432008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7044
7045 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7046 with multiple exits and conditional handling in edge cases.
7047 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7048
6c9df8cb 7049 * gcc.dg/graphite/scop-14.c: New.
c6bb733d 7050
70512008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7052 Adrien Eliche <aeliche@isty.uvsq.fr>
7053
7054 * graphite.c (is_bb_addable): Add more comments and enhance
7055 readablity of the source code. Fix memory leak.
7056 (is_loop_exit): Fix memory leak.
7057
70582008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7059
7060 * graphite.c (first_loop_in_scop): Deleted.
7061 (setup_cloog_loop): Only walk the loop chain for inner loops.
7062 (build_scop_iteration_domain): Execute setup_cloog_loop for
7063 all loops in the first layer.
7064
70652008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7066
7067 * graphite.c (scan_tree_for_params): Change the way params are
7068 added to be indepenent of the number of loops.
7069 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7070 handling.
7071 (build_cloog_prog): Revert to short matrix format.
7072
70732008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7074 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7075
7076 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7077 warning.
7078
70792008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7080
7081 * graphite.c (nb_data_refs_in_scop): New.
7082 (graphite_transform_loops): Print more stats: number of
7083 loops, basic blocks and data references per scop.
7084
70852008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7086 Jan Sjodin <jan.sjodin@amd.com>
7087
7088 * graphite.c (loop_affine_expr, idx_record_params,
7089 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7090 instead of instantiate_parameters.
7091
70922008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7093
7094 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7095 add support for parameters, add STATIC_SCHEDULE at the right places,
7096 cleanup.
7097
70982008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7099
7100 * graphite.c (build_scop_loop_nests): Only add the loops, that
7101 are contained completely in the SCoP.
7102 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7103 and the domains are fixed.
7104 (build_scop_canonical_schedules): Add support for bbs not contained
7105 in any SCoP.
7106
71072008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7108
7109 * graphite.h (scop_contains_loop): Update comments to match
7110 the actual behavior.
7111 (scop_contains_loop): New.
7112 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7113
71142008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7115
7116 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7117 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7118 as GBB_COND_HEADER.
7119
71202008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7121 Tobias Grosser <grosser@fim.uni-passau.de>
7122
7123 * graphite.c (graphite_transform_loops): Early return when
7124 there are no loops in the function.
7125
71262008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7127 Jan Sjodin <jan.sjodin@amd.com>
7128
7129 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7130 offset of the last loop.
7131 (setup_cloog_loop): Copy the entire outer constraint matrix.
7132
71332008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7134 Jan Sjodin <jan.sjodin@amd.com>
7135
7136 * graphite.c (stmt_in_scop_p, function_parameter_p,
7137 invariant_in_scop_p): Removed.
7138 (scan_tree_for_params): Can be used with no constraint
7139 matrix for gathering parameters.
7140 (idx_record_params): Don't use idx_record_param, instead use
7141 scan_tree_for_params.
7142 (find_scop_parameters): Same.
7143 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7144 Fix the size of loop domains.
7145 (schedule_to_scattering): Exit when the outer loop is not in scop.
7146 (find_transform): Enable build_cloog_prog.
7147
71482008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7149 Jan Sjodin <jan.sjodin@amd.com>
7150
7151 * graphite.c (schedule_to_scattering): Make scattering domains
7152 uniformly of the same size, as required by CLooG 0.14.0 and before.
7153
71542008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7155 Jan Sjodin <jan.sjodin@amd.com>
7156
7157 * graphite.c (schedule_to_scattering): Rewrite, correct the
7158 translation of the scheduling function to scattering.
7159 (build_cloog_prog): Call schedule_to_scattering only once.
7160 * graphite.h (scop_loop_index): Do not fail for loops not
7161 in the scop: return -1.
7162
71632008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7164
7165 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7166 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7167 (setup_cloog_loop): Export GBB_DOMAIN.
7168 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7169 able to rebuild the original control flow.
7170 * graphite.h (graphite_bb): Add domain field and access macro.
7171 (GBB_DOMAIN): New.
7172
71732008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7174
7175 * graphite.c (debug_gbb): New.
7176 (print_scop, build_graphite_bb): Use SCOP_BBS.
7177 (build_scop_bbs): Reimplemented.
7178 (dfs_bb_in_scop_p): Removed.
7179 (build_scop_loop_nests): Reorder loops inserted in
7180 SCOP_LOOP_NEST: outer loops should come first.
7181 (build_scop_canonical_schedules): Reinitialize at zero
7182 the components of the SCOP_STATIC_SCHEDULE for the loops
7183 that have already been parsed.
7184
7185 * graphite.h (debug_gbb): Declared.
7186
71872008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7188 Jan Sjodin <jan.sjodin@amd.com>
7189
7190 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7191 (graphite_loop_to_gcc_loop): Removed.
7192 (remove_all_edges): New.
7193 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7194 (gloog): Remove useless code.
7195
71962008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7197
7198 * graphite.c (get_bb_type): Reworked. We distinguish between
7199 loops with one or multiple exits.
7200 (is_loop_exit): New.
7201 (is_pred): New.
7202 (is_bb_addable): Rework condition handling, now support for case
7203 case statements and loops with multiple exits.
7204
6c9df8cb 7205 * gcc.dg/graphite/scop-11.c: New.
7206 * gcc.dg/graphite/scop-12.c: New.
7207 * gcc.dg/graphite/scop-13.c: New.
c6bb733d 7208
72092008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7210
7211 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7212 we have too many colors.
7213
72142008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7215
7216 * doc/invoke.texi (-ftree-loop-fusion): Document.
7217 * tree-pass.h (pass_loop_fusion): Declared.
7218 * tree-loop-fusion.c: New.
7219 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7220 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7221 * tree-data-ref.h (find_data_references_in_loop): Declared.
7222 * common.opt (ftree-loop-fusion): Declared.
7223 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7224
72252008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7226
7227 * graphite.c (build_access_matrix): Fix typo from the merge.
7228
72292008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7230
7231 * Merge from mainline (130800:135673).
7232
72332008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7234
7235 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7236 Update dominators after splitting.
7237
72382008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7239
7240 * graphite.c (is_bb_addable): Return the harmful statement.
7241 Factor up some code.
7242 (end_scop): New. Splits end of scope bbs on a harmful statement.
7243 (build_scops_1): Call end_scop.
7244
72452008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7246
7247 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7248 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7249 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7250 build_scops_1): Removed.
7251 (build_scops_2): Renamed build_scops_1.
7252
72532008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7254
7255 * graphite.c: Fix formatting.
7256
72572008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7258
7259 * graphite.c (get_bb_type): New.
7260 (move_scops): New.
7261 (build_scops_2): New.
7262 (is_bb_addable): New.
7263 (build_scops): Switch the scop detection.
7264 (build_scop_bbs): Add entry bb to scop.
7265 * graphite.h (struct scop): Update comment.
7266
72672008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7268
7269 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7270 more colors.
7271
72722008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7273
6c9df8cb 7274 * gcc.dg/graphite/scop-1.c: Update.
7275 * gcc.dg/graphite/scop-2.c: Update.
7276 * gcc.dg/graphite/scop-4.c: Update.
7277 * gcc.dg/graphite/scop-5.c: Add.
7278 * gcc.dg/graphite/scop-6.c: Add.
c6bb733d 7279
72802008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7281
6c9df8cb 7282 * gcc.dg/graphite/scop-0.c: Add.
7283 * gcc.dg/graphite/scop-7.c: Add.
7284 * gcc.dg/graphite/scop-8.c: Add.
7285 * gcc.dg/graphite/scop-9.c: Add.
7286 * gcc.dg/graphite/scop-10.c: Add.
c6bb733d 7287
72882008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7289
7290 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7291 Check affine expressions depending on the outermost loop
7292 instead of a scop.
7293 (stmt_simple_for_scop_p): Same.
7294 (harmfule_stmt_in_scop): Same.
7295
72962008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7297
7298 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7299 mark entry and exit, that are not part of the SCoP and update HTML
7300 formatting.
7301
73022008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7303
7304 * graphite.c (basic_block_simple_for_scop_p): Renamed
7305 harmful_stmt_in_bb.
7306 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7307 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7308 (all_preds_visited_p, all_succs_visited_p,
7309 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7310 scop_end_loop): New.
7311 (build_scops): Do not use dfs_enumerate_from.
7312
6c9df8cb 7313 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
c6bb733d 7314
73152008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7316
7317 * graphite.c: Add comments to functions that are missing a
7318 description.
7319 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7320
73212008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7322
7323 * graphite.c (nb_params_in_scop): Moved...
7324 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7325 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7326 (clast_to_gcc_expression): Reduce column size to less than 80.
7327 (graphite_create_iv): Return the new name of the IV.
7328 (find_transform): Set options->esp and options->cpp.
7329 (gloog): Comment out the invalidation of the old loop code.
7330 (initialize_dependence_polyhedron): Replace scop_nb_params with
7331 nb_params_in_scop.
7332
7333 * graphite.h (nb_params_in_scop): ... here.
7334 (scop_nb_params): Removed.
7335 (loop_domain_dim): Return something even when the loop was not
7336 found in the hash table: avoid ICEing on all the graphite.exp
7337 testcases.
7338
73392008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7340
7341 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7342
7343 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7344 according to nesting level.
7345 (find_scop_parameters): Call instantiate_parameters.
7346 (scan_tree_for_params): Extend it to handle general affine bounds.
7347 Inner loop bound can depend on outer loop induction variable.
7348 (setup_cloog_loop): tmp variable is allocated on stack. Call
7349 instantiate_parameters with respect to outermost_loop_in_scop.
7350 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7351 graphite.h.
7352 (create_empty_loop): Function loopify should be given edge
7353 probability, instead of edge frequency. Dominance relation from
7354 switch_bb to loop_header.
7355 (clast_to_gcc_expression): Added handling of clast_reduction node.
7356 (gloog): New functionality for removing old loop.
7357 (test_dependence): Factored out from build_rdg_all_levels.
7358 (build_rdg_all_levels): Dependence testing factored out to
7359 test_dependence function.
7360
7361 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7362 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7363 from graphite.c
7364
73652008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7366
7367 * graphite.c (free_scop, param_index, initialize_cloog_names,
7368 nb_params_in_scop): Use name_tree map instead of just a tree
7369 for keeping track of the variable name associated to that tree.
7370 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7371 clast_to_gcc_expression, graphite_create_iv,
7372 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7373 graphite_stmt_to_gcc_stmt): New.
7374 (gloog): Call these.
7375 * graphite.h (struct name_tree): New.
7376 (struct scop): Use name_tree instead of tree for params.
7377 Store a vector of name_tree for new_ivs.
7378 (SCOP_NEWIVS): New.
7379 (scop_nb_params): Use name_tree instead of tree.
7380
73812008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7382 Sebastian Pop <sebastian.pop@amd.com>
7383
7384 * tree-bounds.c: New.
7385 * tree-bounds.h: New.
7386 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7387 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7388 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7389 flag_mudflap.
7390 * gcc.c: Same.
7391 * toplev.c: Same.
7392 * c-cppbuiltin.c: Same.
7393 * c-pragma.c: Same.
7394 * common.opt: Same.
7395 * varasm.c: Same.
7396 * tree-outof-ssa.c: Same.
7397 * c-common.c: Same.
7398 * Makefile.in: Same.
7399
74002008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7401 Sebastian Pop <sebastian.pop@amd.com>
7402
7403 * tree-loop-distribution.c (remaining_stmts,
7404 upstream_mem_writes): Removed static variables.
7405 (copy_loop_before, create_bb_after_loop,
7406 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7407 rdg_build_components, rdg_build_partitions,
7408 dump_rdg_partitions): Extern.
7409 (generate_loops_for_partition, generate_code_for_partition): Do not
7410 return a bool.
7411 (already_processed_vertex_p, predecessor_has_mem_write,
7412 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7413 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7414 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7415 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7416 Pass remaining_stmts and upstream_mem_writes as parameters.
7417 (rdg_component): Moved...
7418 (build_rdg_partition_for_component): Do not aggregate components when
7419 flag_streamize_loops is set.
7420 (gen_sequential_loops): New.
7421 (ldist_gen): Call gen_sequential_loops.
7422
7423 * tree-pass.h (pass_loop_streamization): Declared.
7424
7425 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7426 basic blocks when loops structures exist.
7427
7428 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7429
7430 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7431
7432 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7433 eliminate_local_variables_stmt, eliminate_local_variables,
7434 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7435 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7436 of code delimited by two edges in the CFG.
7437 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7438 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7439 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7440 the case of parallelisation of reductions.
7441 (create_loop_fn): Extern.
7442 (create_omp_parallel_region): New.
7443
7444 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7445 dump_data_reference for printing dra and drb.
7446 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7447 RDGE_RELATION.
7448 (build_rdg): Don't call free_dependence_relations for the moment, as
7449 we attach dependence relations on each edge of the RDG.
7450 To be fixed later.
7451
7452 * tree-data-ref.h (rdg_component): ...here.
7453 (struct rdg_edge): New field ddr_p relation.
7454 (RDGE_RELATION): New.
7455 (create_bb_after_loop, copy_loop_before,
7456 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7457 rdg_build_partitions, dump_rdg_partitions,
7458 free_rdg_components): Declared.
7459
7460 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7461 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7462
7463 * tree-loop-streamization.c: New.
7464
7465 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7466 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7467
7468 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7469
7470 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7471
7472 * passes.c: Schedule pass_loop_streamization.
7473
74742008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7475
7476 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7477 update comment.
7478
74792008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7480
7481 * graphite.c (dot_all_scops): Update formatting.
7482 Bbs can now be part of more than one SCoP.
7483
74842008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7485
7486 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7487 malloc problems.
7488 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7489 * graphite.h (loop_to_cloog_loop): New.
7490
74912008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7492
7493 * graphite.c (loop_domain_dim, ref_nb_loops,
7494 loop_iteration_vector_dim): New.
7495 (build_access_matrix_with_af, build_access_matrix,
7496 initialize_dependence_polyhedron): Fixed for new matrix layout.
7497 No longer assume that all iteration domains are of the same
7498 dimensionality.
7499
75002008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7501
7502 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7503 defined in a loop at depth 0 is invariant.
7504 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7505 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7506 be called at loop depth 0.
7507
7508 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7509 a parameter.
7510 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7511 (down_open_scop): Removed.
7512 (loop_in_scop_p): Redefined.
7513 (scop_affine_expr): New argument: scop.
7514 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7515 a harmful statement ending a scop.
7516 (basic_block_simple_for_scop_p): New argument: scop.
7517 (get_loop_start): Removed.
7518 (new_scop): Initialize SCOP_LOOPS.
7519 (free_scop): Free SCOP_LOOPS.
7520 (succs_at_same_depth, preds_at_same_depth): New.
7521 (end_scop): Test the validity of a scop.
7522 (add_dominators_to_open_scops): New.
7523 (test_for_scop_bound): Call add_dominators_to_open_scops.
7524 Add cases for opening and closing multiple scops.
7525 (build_scops, build_scop_bbs): Iterate over basic blocks in
7526 depth first order.
7527 (build_graphite_bb): Pass scop directly.
7528 (dfs_bb_in_scop_p): New.
7529 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7530 several times.
7531 (nb_loops_around_gb): Use loop_in_scop_p.
7532 (schedule_to_scattering): Disabled for the moment the code computing
7533 the "textual order for outer loop".
7534
7535 * graphite.h (struct scop): New field loops.
7536 (SCOP_LOOPS): New.
7537 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7538
6c9df8cb 7539 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
c6bb733d 7540
75412008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7542 Sebastian Pop <sebastian.pop@amd.com>
7543
7544 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7545 * common.opt (fstreamize-loops): New.
7546 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7547 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7548 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7549 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7550
75512008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7552
7553 * tree-data-ref.c (build_empty_rdg): New.
7554 (build_rdg): Use it.
7555 * tree-data-ref.h (build_empty_rdg): Declared.
7556 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7557 (find_vertex_for_stmt): Removed.
7558 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7559
75602008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7561
7562 * tree-loop-distribution.c (generate_builtin): After cancelling the
7563 loop tree, also delete basic blocks.
7564 (rdg_flag_uses): Stop recursion when a vertex has already been
7565 processed.
7566
75672008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7568
7569 * graphite.c (build_scop_alpha): Removed.
7570 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7571 and dump_dependence_graph to avoid compiler warnings.
7572
75732008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7574
7575 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7576 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7577 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7578 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7579 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7580 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7581 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7582 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7583 dump_dependence_graph): New.
7584 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7585 (GBB_ALPHA): New.
7586 (struct scop): New field loop2cloog_loop.
7587 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7588 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7589
75902008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7591
7592 * graphite.c (build_graphite_bb): Fix initialization
7593 of the graphite basic block.
7594
75952008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7596
7597 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7598 loop domain matrix. Pass in the number of loops contained in the
7599 constraint matrix.
7600 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7601 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7602 loops that are not surrounding the current loop are not represented
7603 in the domain constraint matrix.
7604 (build_scop_iteration_domain): Initial domain constraint matrix
7605 contains only the eq/ineq, cst, and scop parameters columns.
7606
76072008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7608
7609 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7610 (print_graphite_bb): Print scattering.
7611
76122008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7613
7614 * graphite.c (initialize_cloog_names): Initialize names of
7615 scattering variables.
7616
76172009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7618
7619 * graphite.c (dot_all_scops_1): Disable debug output while
7620 printing graph.
7621
76222008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7623
7624 * graphite.c (find_transform): Change cloog output language to C.
7625
76262008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7627
7628 * tree-loop-distribution.c (generate_memset_zero,
7629 generate_builtin, generate_code_for_partition,
7630 rdg_flag_all_uses): New.
7631 (rdg_flag_uses): Gather in the same partition the statements defining
7632 the VUSES of the current statement.
7633 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7634 Gather in the same partition not only the stores to the same memory
7635 access, but also the reads.
7636 (ldist_generate_loops): Renamed ldist_gen.
7637
76382008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7639 Tobias Grosser <grosser@fmi.uni-passau.de>
7640
7641 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7642 next pointer, don't use the inner pointer.
7643
76442008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7645
7646 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7647 (find_transform): Call dot_all_1.
7648 * graphite.h (dot_all_scops): Declared.
7649
76502007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7651
7652 * tree-loop-distribution.c: Fix apsi.f ICE.
7653 (create_bb_after_loop): New.
7654 (generate_loops_for_partition): Use it.
6c9df8cb 7655 * gfortran.dg/ldist-1.f90: New.
c6bb733d 7656
7657 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7658 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7659
76602007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7661
7662 * graphite.c (find_transform): Dump cloog program sent to cloog.
7663
76642007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7665
7666 * graphite.c (initialize_cloog_names): Initialize cloog
7667 iterator names.
7668
76692007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7670
7671 * graphite.c (build_scop_context): Fix typo, for the matrix
7672 format: insert '0 >= 0' instead of '-1 >= 0'.
7673
76742007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7675
7676 * Fix merge problems.
7677
76782007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7679
7680 * graphite.c (setup_cloog_loop): Fix typo.
7681
76822007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7683
7684 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7685 * tree-loop-distribution.c: Reimplemented.
7686 * tree-pass.h (pass_loop_distribution): New.
7687 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7688 print_loops.
7689 * graphds.h (struct graph): New field indexes.
7690 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7691
7692 * tree-vect-analyze.c: Remove declaration of static functions when not
7693 needed.
7694 * tree-vectorizer.c: Same.
7695 (rename_variables_in_loop): Now extern.
7696 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7697 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7698 calling redirect_edge_and_branch_force.
7699
7700 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7701
7702 * tree-data-ref.c: Don't include tree-chrec.h.
7703 (debug_data_dependence_relations): New.
7704 (dump_data_dependence_relation): Call dump_data_reference on data refs
7705 in the relation.
7706 (same_access_functions): Moved...
7707 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7708 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7709 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7710 struct rdg_vertex_info, ): New.
7711 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7712 at DDR_REVERSED_P.
7713 (create_rdg_vertices): Initialize the htab of graph->indexes.
7714 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7715 (stmts_from_loop): Don't save LABEL_EXPR.
7716 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7717 hash_stmt_vertex_del): New.
7718 (build_rdg): Initialize rdg->indexes.
7719 (free_rdg, stores_from_loop, ref_base_address,
7720 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7721 have_similar_memory_accesses_1, ref_base_address_1,
7722 remove_similar_memory_refs): New.
7723
7724 * tree-data-ref.h: Include tree-chrec.h.
7725 (debug_data_dependence_relations): Declared.
7726 (same_access_functions): ...here. Now static inline.
7727 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7728 ddr_dependence_level): New.
7729 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7730 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7731 RDG_MEM_READS_STMT): New.
7732 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7733 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7734 rdg_vertex_for_stmt): Declared.
7735 (struct rdg_edge): New field level.
7736 (RDGE_LEVEL, free_rdg): New.
7737 (stores_from_loop, remove_similar_memory_refs,
7738 rdg_defs_used_in_other_loops_p,
7739 have_similar_memory_accesses): Declared.
7740 (rdg_has_similar_memory_accesses): New.
7741
7742 * lambda.h (dependence_level): New.
7743 * common.opt (ftree-loop-distribution): New.
7744 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7745 (print_loop_ir): Renamed print_loops.
7746 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7747 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7748 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7749 (tree-loop-distribution.o): Added.
7750 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7751 (mark_virtual_ops_in_bb): New.
7752 (print_loops_bb, debug_loop_num, debug_loop): New.
7753 * passes.c: Scheduled pass_loop_distribution.
7754
77552007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7756
7757 * graphite.c (scan_tree_for_params): Correct the number of columns
7758 for polylib format.
7759 (nb_flat_iterator): New.
7760 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7761 (build_scop_iteration_domain): Correct the number of columns for
7762 polylib format.
7763
77642007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7765
7766 * Merge from mainline (129697:130800).
7767
77682007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7769
7770 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7771 dominated by SCoP's exit.
7772 (graphite_transform_loops): Compute post dominators.
7773
77742007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7775
7776 * Merge from mainline (127169:129697).
7777
77782007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7779
7780 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7781 parameter for the basic block that contains the expression. Use
7782 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7783 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7784 the expression.
7785 * graphite.h (gbb_loop): New.
7786 (GBB_LOOP): Removed.
7787
77882007-08-03 Sebastian Pop <sebpop@gmail.com>
7789
7790 * Makefile.in: Fix merge problem.
7791
77922007-08-03 Sebastian Pop <sebpop@gmail.com>
7793
7794 * Merge from mainline (125309:127169).
7795 * tree-loop-distribution.c: Disabled.
7796
77972007-06-05 Sebastian Pop <sebpop@gmail.com>
7798
7799 * Merge from mainline (r123693:125309).
7800
78012007-05-30 Sebastian Pop <sebpop@gmail.com>
7802
7803 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7804 correct_modify_p
7805 (correct_modify_p, check_statements, number_of_lvalue_uses,
7806 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7807 instead of MODIFY_EXPR.
7808 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7809 and push new edges.
7810
78112007-05-24 Sebastian Pop <sebpop@gmail.com>
7812
7813 * tree-loop-distribution.c (struct rdg): Replace arrays by
7814 VECs for edges and vertices.
7815 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7816 (RDGV_NB_PARTITIONS): New.
7817 (PRDG_NBV, PRDG_NBE): Removed.
7818 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7819 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7820 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7821
78222007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7823 Sebastian Pop <sebpop@gmail.com>
7824
7825 * doc/invoke.texi (-ftree-loop-distribution): Document.
7826 * tree-loop-distribution.c: New file.
7827 * tree-pass.h (pass_loop_distribution): Declared.
7828 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7829 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7830 and set reversed_p.
7831 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7832 (DDR_REVERSED_P): New.
7833 * common.opt (-ftree-loop-distribution): New.
7834 * tree-flow.h (distribute_loops): Declared.
7835 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7836 * passes.c (init_optimization_passes): Schedule loop distribution.
7837
78382007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7839
7840 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7841 (print_scop): Don't print when scop is NULL.
7842 (build_scop_context, find_transform): Don't output to stderr.
7843
78442007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7845
7846 * tree-data-ref.c: Don't include graphite.h.
7847 Comment out the code for printing data reference's scop.
7848 (build_access_matrix_with_af): Moved...
7849 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7850 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7851 (print_graphite_bb): Print basic block's schedule.
7852 (print_scop): Don't print the schedule, call cloog's pretty printer.
7853 (bb_in_scop_p): A basic block is in a scop only if it is both
7854 dominated and postdominated by the scop's entry and exit basic blocks.
7855 (function_parameter_p): New.
7856 (invariant_in_scop_p): Use function_parameter_p.
7857 (new_scop, save_scop): New.
7858 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7859 save_scop.
7860 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7861 (loop_in_scop_p): New.
7862 (scop_record_loop): Use loop_in_scop_p.
7863 (build_scop_domain): Renamed build_scop_iteration_domain.
7864 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7865 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7866 setup_cloog_loop, dot_scop_1, dot_scop): New.
7867 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7868 (struct scop): Add a pointer to cloog's representation of a program.
7869
78702007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7871
7872 * doc/invoke.texi (-ftree-check-verbose): Renamed
7873 -ftree-checks-verbose.
7874 * common.opt (flag_tree_check_verbose): Renamed
7875 flag_tree_checks_verbose.
7876 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7877
78782007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7879
7880 * configure: Regenerated.
7881 * config.in: Regenerated.
7882 * tree-ssa-loop.c (graphite_transforms): Execute
7883 graphite_transform_loops only when HAVE_cloog.
7884 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7885 * graphite.c: Include polylibgmp.h and cloog.h.
7886 (graphite_transform_loops): Removed loops parameter.
7887 * tree-flow.h (graphite_transform_loops): Update declaration.
7888 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7889 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7890 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7891 (OBJS-common): Remove dependence on graphite.o.
7892 (BACKEND): Depend on @GRAPHITE@.
7893
78942007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7895
7896 * doc/invoke.texi (-ftree-check-verbose): Documented.
6c9df8cb 7897 * gcc.dg/tree-checker/tree-checks-1.c: New.
7898 * gcc.dg/tree-checker/tree-checks-2.c: New.
7899 * gcc.dg/tree-checker/tree-checks-3.c: New.
7900 * gcc.dg/tree-checker/tree-checks-4.c: New.
7901 * gcc.dg/tree-checker/tree-checks.exp: New.
7902 * gcc.dg/tree-checker/condates.crp: New.
c6bb733d 7903 * common.opt (ftree-checks-verbose): New.
7904 * tree-check.c (tree_check_warning): Move extra stderr output
7905 under control of flag_tree_check_verbose.
7906
79072007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7908
7909 * tree-match.c: Fix comments formatting.
7910 * tree-match.h: Fix comments formatting.
7911 * tree-check.c: Fix comments formatting.
7912 (tree_check_init): Restructure.
7913
79142007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7915
7916 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7917
79182007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7919
7920 * Merge from mainline (r120733:123693).
7921
79222007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7923
7924 * condate.y: New file.
7925 * tree-match.h (struct patt_info_s): New field sign.
7926 (struct condate_s): New field msg.
7927 (normalize_condate, name_condate, add_condate): New.
7928 (conds[], condate_parse): Made extern.
7929 * tree-check.c (tree_check_warning): First arg changed to cond;
7930 warning reformatted.
7931 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
7932 (tree_scan): New.
7933 (tree_check): Process trivial condates.
7934 (read_delimited_string): Removed.
7935 (print_cond): Print name and msg.
7936 (conds[]): Made extern.
7937 (parse_tree_check_file_once): Rewritten to use the parser in
7938 condate.y.
7939 Processing of option --tree_check_string moved to tree_scan().
7940 * Makefile.in: Added condate.y
7941
79422007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
7943
7944 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
7945 Use VECs instead of varrays.
7946 * diagnostic.h (lazy_dump_generic_node): Update declaration.
7947 * Makefile.in (pretty-print.o): Depend on vec.h.
7948 * pretty-print.c: Include tree.h and vec.h.
7949 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
7950 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
7951 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
7952 pp_free_list): Use VECs instead of varrays.
7953 * pretty-print.h: Do not include varray.h.
7954 (struct tree_chunk_s): Declaration moved before its use.
7955 (output_buffer): Rename varray field to chunks.
7956 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
7957 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
7958 save_global_holes): Use VECs instead of varrays.
7959 * tree-match.h: Declare VECs of cfg_node, and hole_p.
7960 * tree-check.c (scan_cfg_stmts, push_node,
7961 print_matching_stmt): Removed.
7962 (tree_check_instance, push_global_holes_if_new, tree_check,
7963 execute_tree_check): Use VECs instead of varrays.
7964 (gate_tree_check): Don't execute the CFG check when basic_block_info
7965 is not available.
7966
79672007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7968
7969 * Merge from mainline (r115016:120733).
7970
79712007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7972
7973 * Merge from mainline (r117632:117661).
7974
79752007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7976
7977 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
7978 * tree-pass.h (TDF_DEBUG, debug_p): New.
7979 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
7980 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
7981 get_loop_exit_condition, analyze_evolution_in_loop,
7982 analyze_initial_condition, analyze_scalar_evolution,
7983 instantiate_parameters, number_of_latch_executions): Use debug_p.
7984 * tree-chrec.c (chrec_apply): Use debug_p.
7985 * tree-data-ref.c: Include graphite.h.
7986 (dump_data_reference): Print also the access matrix.
7987 (analyze_array, analyze_indirect_ref, init_data_ref,
7988 analyze_offset_expr, address_analysis, object_analysis,
7989 create_data_ref, finalize_ddr_dependent,
7990 non_affine_dependence_relation, analyze_ziv_subscript,
7991 analyze_siv_subscript_cst_affine,
7992 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
7993 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
7994 analyze_miv_subscript, analyze_overlapping_iterations,
7995 build_classic_dist_vector, subscript_dependence_tester,
7996 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
7997 (build_access_matrix_with_af): No longer static.
7998 * tree-data-ref.h (scop_p): ... declaration here.
7999 (data_reference.scop): New field.
8000 (DR_SCOP, DR_ACCESS_MATRIX): New.
8001 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8002 * graphite.c (print_graphite_bb): Call dump_data_references.
8003 (print_scop): Use scop_nb_loops and scop_dim_domain.
8004 (test_for_scop_bound): Use debug_p.
8005 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8006 scop_nb_params.
8007 (scop_loop_index): Moved...
8008 (scop_record_loop): New.
8009 (build_scop_loop_nests): Use scop_record_loop.
8010 (build_scop_domain): Use scop_dim_domain.
8011 (build_access_matrix): Implemented.
8012 (build_scop_canonical_schedules): Use scop_nb_loops.
8013 (build_graphite_bb): Initialize GBB_SCOP.
8014 * graphite.h (scop_p): Moved...
8015 (graphite_bb.scop): New field.
8016 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8017 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8018 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8019 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8020 scop_loop_index): New.
8021 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8022
80232007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8024
8025 * Merge from mainline (r117661:120450).
8026
80272006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8028
8029 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8030 at the first declaration outside the varying loop, instantiate as
8031 far as possible.
8032 * tree-chrec.c (for_each_scev_op): New.
8033 * tree-chrec.h (for_each_scev_op): Declared.
8034 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8035 * tree-data-ref.c (get_references_in_stmt,
8036 find_data_references_in_stmt): New, from trunk.
8037 (find_data_references_in_loop): Use get_references_in_stmt
8038 and find_data_references_in_loop, modified as in trunk.
8039 (build_access_matrix_with_af): New.
8040 * tree-data-ref.h (data_reference): Add a field access_matrix.
8041 (data_ref_loc): New, as in trunk.
8042 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8043 invariant_in_scop_p, param_index, scan_tree_for_params,
8044 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8045 idx_record_param, idx_record_params, build_access_matrix,
8046 build_scop_data_accesses, build_scop_canonical_schedules,
8047 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8048 build_scop_params): New.
8049 * graphite.h (graphite_bb): New.
8050 (scop): Add fields static_schedule, params, loop_nest,
8051 iteration_domain.
8052 * lambda.h: Declare vecs of lambda_matrix.
8053 * tree-flow.h (print_loop_ir_bb): Declared.
8054 * tree-cfg.c (print_loop_ir_bb): New.
8055 (print_loop): Use print_loop_ir_bb.
8056
80572006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8058
8059 * Merge from mainline (r115016:117632).
8060
80612006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8062
8063 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8064 break due to a warning.
8065
80662006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8067
8068 * graphite.c (print_scops, debug_scops): New.
8069 (graphite_transform): Renamed graphite_find_transform.
8070 * graphite.h (debug_scops): Declared.
8071
80722006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8073
8074 * tree-match.c: Reformat following the GNU style.
8075 * tree-match.h: Reformat following the GNU style.
8076 * tree-pattern.h: Removed empty file.
8077 * Makefile.in: Remove references to tree-pattern.h.
8078 * tree-check.c: Reformat following the GNU style.
8079 (execute_tree_check): Move gate condition code to...
8080 (gate_tree_check): ...here. New function.
8081 (pass_check): Use the gate function.
8082
80832006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8084
8085 * tree-pattern.h: New. Tree pattern matching and checking using
8086 concrete syntax.
8087 * tree-check.c: New. Tree/CFG checking pass.
8088 * tree-match.c: New. Library for tree pattern matching.
8089 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8090 * toplev.c, flags.h: Add globals for tree-check pass.
8091 * Makefile.in: Integrate the files in tree-check pass.
8092 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8093 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8094 Introduce a "lazy" pretty-print mode.
8095 * tree.c, tree.h: Add tree_name.
8096
80972006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8098
8099 * doc/invoke.texi (-fgraphite): Correct typo.
8100 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8101 use of print_loop_ir.
6c9df8cb 8102 * gcc.dg/graphite/scop-1.c: New.
8103 * gcc.dg/graphite/scop-2.c: New.
8104 * gcc.dg/graphite/graphite.exp: New.
c6bb733d 8105 * graphite.c: Include domwalk.h.
8106 (print_scop): Print only the entry and exit blocks.
8107 (debug_scop): No longer static.
8108 (affine_expr): Fix formating. Return also true when the expression is
8109 constant.
8110 (stmt_simple_for_scop_p): Fix formating.
8111 (build_scops): Use domwalk.
8112 (get_loop_start, end_scop, test_for_scop_bound): New.
8113 (graphite_transform_loops): Avoid printing on stderr.
8114 * graphite.h (debug_scop): Declared.
8115 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8116 * Makefile.in (graphite.o): Depend on domwalk.h.
8117 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8118 declarations for static functions.
8119 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8120 controlling output verbosity.
8121
81222006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8123 Plesco Alexandru <shurikx@gmail.com>
8124
8125 * doc/invoke.texi (-fgraphite): Document.
8126 * tree-pass.h (pass_graphite_transforms): Declared.
8127 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8128 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8129 (pass_graphite_transforms): Defined.
8130 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8131 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8132 * graphite.c, graphite.h: New.
8133 * common.opt (fgraphite): Declared.
8134 * tree-flow.h (graphite_transform_loops): Declared.
8135 * Makefile.in (OBJS-common): Add graphite.o.
8136 (graphite.o): New rule.
8137 * passes.c (pass_graphite_transforms): Scheduled.
8138