]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ChangeLog.graphite
Add testcase for PR43423.
[thirdparty/gcc.git] / gcc / ChangeLog.graphite
CommitLineData
650f2420 12010-07-29 Sebastian Pop <sebastian.pop@amd.com>
2
3 * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
4 * gfortran.dg/graphite/graphite.exp: Same.
5 * gcc.dg/graphite/vect-pr43423.c: New.
6
be90fd3f 72010-07-29 Sebastian Pop <sebastian.pop@amd.com>
8
9 * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
10 priority signed types.
11
e84af3c1 122010-07-29 Sebastian Pop <sebastian.pop@amd.com>
13
14 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
15 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
16
8c4b14b0 172010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
18
19 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
20 (openscop_print_polyhedron_matrix): New.
21 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
22 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
23 (openscop_print_pdr_powerset): New.
24 (openscop_print_powerset_matrix): New.
25 (openscop_print_scattering_function_1): New.
26 (print_scattering_function): Add support for scattering names and
27 OpenScop format.
28 (graphite_write_transforms): Remove.
29 (apply_poly_transforms): Updated to call print_scop.
30 (print_pdr_access_layout): Updated to support OpenScop format.
31 (print_pdr): Same.
32 (openscop_print_pbb_domain): New.
33 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
34 not provided.
35 (print_pbb): Updated to call the new print_pbb_body.
36 (openscop_print_scop_context): New.
37 (print_scop_header): New.
38 (print_scop): Updated to call print_scop_header.
39 * graphite-poly.h: Document OpenScop format.
40
68a6a8ba 412010-07-29 Sebastian Pop <sebastian.pop@amd.com>
42
43 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
44 the case removed in the previous patch, when the only phi argument
45 is defined in the same loop as the phi node itself. Handle it
46 separately from the invariant case by both propagating it outside
47 the region and replacing the phi node with an assign.
48
51ec8951 492010-07-28 Sebastian Pop <sebastian.pop@amd.com>
50
51 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
52 constant phi nodes with one argument are is_gimple_min_invariant
53 and SSA_NAME_IS_DEFAULT_DEF.
54
55 * gfortran.dg/graphite/id-22.f: New.
56
04b8cadb 572010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
58
f0fc00f2 59 * graphite.c (graphite_initialize): Do not initialize
60 CLooG and initialize the Parma Polyhedra Library
61 manually when using CLOOG_ORG.
62 (graphite_finalize): Do not finalize CLooG and finalize
63 the Parma Polyhedra Library manually when using CLOOG_ORG.
64 * graphite-cloog-compat.h (cloog_initialize): Hide function
65 when using CLOOG_ORG.
66 (cloog_finalize): Same.
67
a2c572ef 682010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
f0fc00f2 69
04b8cadb 70 * graphite-clast-to-gimple.c (free_scattering): Change
71 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
72 (CLOOG_ORG).
73 (build_cloog_prog): Same.
74 * graphite-cloog-compat.h (cloog_domain): Removed.
75 (cloog_scattering): New.
76 (cloog_set_domain): Removed.
77 (cloog_set_scattering): New.
78 (cloog_next_domain): Removed.
79 (cloog_next_scattering): New.
80 (cloog_set_next_domain): Removed.
81 (cloog_set_next_scattering): New.
82 (CloogScatteringList): New.
83 (CloogScattering): New.
84 (cloog_scattering_free): New.
85 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
86 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
87 New.
88
08a88144 892010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
90
91 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
92 CloogState.
93 (set_cloog_options): Same.
94 (print_clast_stmt): Same.
95 (scop_to_clast): Same.
96 (print_generated_program): Same.
97 (gloog): Same.
98 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
99 (scop_to_clast): Extend with CloogState.
100 * graphite-cloog-util.c: Include graphite-cloog-compat.h
101 (new_Cloog_Domain_from_ppl_Polyhedron):
102 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
103 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
104 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
105 * graphite-cloog-util.h (build_cloog_prog): Same.
106 * graphite-cloog-copat.h (build_cloog_prog): New.
107 (CloogState): New.
108 (cloog_state_malloc): New.
109 (cloog_state_free): New.
110 (cloog_loop_malloc): New.
111 (cloog_options_malloc): New.
112 (cloog_statement_alloc): New.
113 (cloog_domain_from_cloog_matrix): New.
114 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
115 (new_Cloog_Domain_from_ppl_Polyhedron): New.
116
2e6bc1c7 1172010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
118
119 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
120 type of NAME now depends on used CLooG version.
121 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
122 (gcc_type_for_clast_expr): Same.
123 (print_clast_stmt): Replace pprint with clast_pprint.
124 * graphite-cloog-compat.h: Provide compatibility macros for
125 CLooG Legacy.
126 (clast_name_p): New.
127 (clast_expr_term): New.
128 (clast_expr_red): New.
129 (clast_expr_bin): New.
130 (clast_pprint): New.
131
ebd32a89 1322010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
133
134 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
135 compatible to newer CLooG releases (CLOOG_ORG).
136 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
137 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
138 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
139 (build_cloog_prog) : New.
140 (cloog_program_extract_scalars): New.
141 (cloog_program_scatter): New.
142
1b2c23d4 1432010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
144
145 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
146 conditionally (CLOOG_ORG).
147 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
148 (cloog_statement_usr): New.
149 (cloog_domain): Same.
150 (cloog_set_domain): Same.
151 (cloog_next_domain): Same.
152 (cloog_set_next_domain): Same.
153 (cloog_program_nb_scattdims): Same.
154 (cloog_program_set_nb_scattdims): Same.
155 (cloog_program_names): Same.
156 (cloog_program_set_names): Same.
157 (cloog_program_set_context): Same.
158 (cloog_program_set_loop): Same.
159 (cloog_program_blocklist): Same.
160 (cloog_program_set_blocklist): Same.
161 (cloog_program_scaldims): Same.
162 (cloog_program_set_scaldims): Same.
163 (cloog_names_nb_parameters): Same.
164 (cloog_names_set_nb_parameters): Same.
165 (cloog_names_parameters): Same.
166 (cloog_names_set_parameters): Same.
167 (cloog_names_set_nb_iterators): Same.
168 (cloog_names_set_iterators): Same.
169 (cloog_names_set_nb_scattering): Same.
170 (cloog_names_set_scattering): Same.
171 (cloog_statement_set_usr): Same.
172 (cloog_loop_set_next): Same.
173 (cloog_loop_set_domain): Same.
174 (cloog_loop_set_block): Same.
175 (cloog_block_list_next): Same.
176 (cloog_block_list_set_next):
177 (cloog_block_list_set_block): Same.
178
c9a67530 1792010-07-27 Sebastian Pop <sebastian.pop@amd.com>
180
181 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
182 a bool.
183 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
184 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
185 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
186 when something has been changed.
187 (rewrite_commutative_reductions_out_of_ssa): Same.
188
189 * gcc.dg/graphite/id-26.c: New.
190
ed455480 1912010-07-26 Sebastian Pop <sebastian.pop@amd.com>
192
193 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
194 handle the case when def is in the sese region.
195 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
196 for invariant expressions.
197 (rewrite_cross_bb_phi_deps): Removed.
198 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
199 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
200 rewrite_cross_bb_phi_deps.
201
72085fb7 2022010-07-26 Sebastian Pop <sebastian.pop@amd.com>
203
204 * graphite-sese-to-poly.c
205 (rewrite_commutative_reductions_out_of_ssa_loop): Call
206 scev_analyzable_p only on is_gimple_reg
207
208 * gcc.dg/graphite/id-25.c: New.
209
5d21c24a 2102010-07-22 Sebastian Pop <sebastian.pop@amd.com>
211
212 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
213 (rewrite_close_phi_out_of_ssa): Propagate constant values or
214 parametric expressions outside the scop region.
215 (rewrite_cross_bb_scalar_deps): Same.
216 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
217
218 * gcc.dg/graphite/run-id-5.c: New.
219 * gcc.dg/graphite/run-id-6.c: New.
220 * gfortran.dg/graphite/id-21.f: New.
221
a865acd7 2222010-07-22 Sebastian Pop <sebastian.pop@amd.com>
223
224 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
225 SSA_NAME_DEF_STMT only on SSA_NAMEs.
226
227 * gcc.dg/graphite/id-24.c: New.
228
52f57b4e 2292010-07-22 Sebastian Pop <sebastian.pop@amd.com>
230
231 * tree-scalar-evolution.c (instantiate_scev_name): Do not
232 instantiate default definitions.
233
c07c57fb 2342010-07-20 Vladimir Kargov <kargov@gmail.com>
235
236 * graphite-scop-detection.c (is_valid_stmt_p): New.
237 (is_valid_bb_p): New.
238
259c0e44 2392010-07-20 Vladimir Kargov <kargov@gmail.com>
240 Sebastian Pop <sebastian.pop@amd.com>
241
242 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
243 (loop_exits_from_bb_p): New.
244 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
245 (loop_exits_from_bb_p): Declared.
246 * graphite-scop-detection.c (scopdet_basic_block_info): Call
247 loop_exits_to_bb_p.
248
000edd14 2492010-07-20 Vladimir Kargov <kargov@gmail.com>
250
251 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
252 tree-data-ref.h.
253 (dot_regions_1): New.
254 (dot_regions): New.
255 * refined-regions.h (dot_regions): Declared.
256 * Makefile.in (refined-regions.o): Update dependences.
257
38f26d41 2582010-07-20 Sebastian Pop <sebastian.pop@amd.com>
259
260 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
261 extra parameter for the region. Call scev_analyzable_p.
262 (rewrite_reductions_out_of_ssa): Update call to
263 rewrite_close_phi_out_of_ssa.
264 (rewrite_cross_bb_phi_deps): Same.
265 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
266 parameter for the region. Call scev_analyzable_p.
267 (rewrite_commutative_reductions_out_of_ssa): Update call to
268 rewrite_commutative_reductions_out_of_ssa_loop.
269
e075a7a2 2702010-07-20 Sebastian Pop <sebastian.pop@amd.com>
271
272 * gcc.dg/tree-ssa/pr20742.c: New.
273
39888e8f 2742010-07-15 Sebastian Pop <sebastian.pop@amd.com>
275
276 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
277
278 * gcc.dg/graphite/id-23.c: New.
279
15822b8e 2802010-07-15 Sebastian Pop <sebastian.pop@amd.com>
281
282 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
283 SSA scalar phi nodes that can be scev_analyzable_p.
284
285 * gfortran.dg/graphite/id-20.f: Adjust testcase.
286
49253930 2872010-07-15 Sebastian Pop <sebastian.pop@amd.com>
288
289 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
290 handle SSA_NAME_IS_DEFAULT_DEF.
291
bac2de0b 2922010-07-15 Sebastian Pop <sebastian.pop@amd.com>
293
294 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
295
296 * gcc.dg/graphite/pr42729.c: New.
297
55c89f69 2982010-07-15 Sebastian Pop <sebastian.pop@amd.com>
299
300 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
301 case non close-phi nodes with one argument.
302
32a6e336 3032010-07-15 Sebastian Pop <sebastian.pop@amd.com>
304
305 * sese.h (scev_analyzable_p): Scevs could be expressions without
306 chrecs and still be scev_analyzable_p.
307
a73166c0 3082010-07-15 Sebastian Pop <sebastian.pop@amd.com>
309
310 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
311
18046220 3122010-07-15 Sebastian Pop <sebastian.pop@amd.com>
313
314 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
315 * cfgloop.h (struct loop): Remove single_iv field.
316 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
317 (scop_canonicalize_loops): Removed.
318 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
319 over all the loop phi nodes in loop->header.
320 (build_poly_scop): Remove use of scop_canonicalize_loops.
321
b19b9f62 3222010-07-15 Sebastian Pop <sebastian.pop@amd.com>
323
324 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
325 handle GIMPLE_CALL.
326
9e4cd968 3272010-07-15 Sebastian Pop <sebastian.pop@amd.com>
328
329 * tree-chrec.c (chrec_apply): Should only apply to the specified
330 variable. Also handle multivariate chains of recurrences that
331 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
332
4ed27c8e 3332010-07-15 Sebastian Pop <sebastian.pop@amd.com>
334
335 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
336 (debug_clast_name_indexes_1): Removed.
337 (debug_clast_name_indexes): Removed.
338 (pbb_to_depth_to_oldiv): Removed.
339 (build_iv_mapping): Replace the use of rename_map with iv_map.
340 (translate_clast_user): Remove uses of rename_map. Allocate and
341 free iv_map.
342 (translate_clast_for_loop): Remove uses of rename_map.
343 (translate_clast_for): Same.
344 (translate_clast_guard): Same.
345 (translate_clast): Same.
346 (gloog): Same.
347 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
348 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
349 * sese.c (set_rename): Now static.
350 (rename_variables_in_stmt): Removed.
351 (rename_uses): New.
352 (is_parameter): Removed.
353 (is_iv): Removed.
354 (expand_scalar_variables_call): Removed.
355 (expand_scalar_variables_ssa_name): Removed.
356 (expand_scalar_variables_expr): Removed.
357 (expand_scalar_variables_stmt): Removed.
358 (expand_scalar_variables): Removed.
359 (rename_variables): Removed.
360 (remove_condition): Removed.
361 (get_true_edge_from_guard_bb): Removed.
362 (get_false_edge_from_guard_bb): Removed.
363 (struct igp): Removed.
364 (default_before_guard): Removed.
365 (convert_for_phi_arg): Removed.
366 (add_guard_exit_phis): Removed.
367 (insert_guard_phis): Removed.
368 (graphite_copy_stmts_from_block): Now also uses iv_map and a
369 region. Do not copy conditions. Do not copy induction variables.
370 Call rename_uses.
371 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
372 the translated statement. Use the iv_map for the induction
373 variable renaming.
374 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
375 (set_rename): Removed declaration.
376 (scev_analyzable_p): ...here.
377 * tree-chrec.c (chrec_apply_map): New.
378 * tree-chrec.h (chrec_apply_map): Declared.
379
5b87c555 3802010-07-15 Sebastian Pop <sebastian.pop@amd.com>
381
382 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
383 insert_loop_close_phis.
384 * sese.c (name_defined_in_loop_p): Removed.
385 (expr_defined_in_loop_p): Removed.
386 (alive_after_loop): Removed.
387 (close_phi_not_yet_inserted_p): Removed.
388 (struct alep): Removed.
389 (add_loop_exit_phis): Removed.
390 (insert_loop_close_phis): Removed.
391
2c4340a8 3922010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
393
5b87c555 394 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
395 condition.
396 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
2c4340a8 397
38df5b0a 3982010-07-07 Sebastian Pop <sebastian.pop@amd.com>
399
400 * gfortran.dg/graphite/id-20.f: New.
401
e0e27d35 4022010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
403
404 * graphite-cloog-util.h: Added cloog.h.
405 * graphite-blocking.c: Removed cloog.h.
406 * graphite-dependences.c: Same.
407 * graphite-interchange.c: Same.
408 * graphite-poly.c: Same.
409 * graphite-ppl.c: Same.
410 * graphite-scop-detection.c: Same.
411 * graphite-sese-to-poly.c:
412 Removed cloog.h.
413 Removed graphite-clast-to-gimple.h.
414 (check_poly_representation): Removed (unused).
415 * graphite-sese-to-poly.h
416 (check_poly_representation): Removed (unused).
417
30185452 4182010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
419
420 * Makefile.in
421 (OBJS-common): Added graphite-cloog-util.o.
422 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
423 (graphite-cloog-util.o): New.
424 (graphite-ppl.o): Added graphite-cloog-util.h.
425 * graphite-clast-to-gimple.c:
426 Added graphite-cloog-util.h to include statements.
427 * graphite-cloog-util.c: New.
428 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
429 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
430 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
431 (new_C_Polyhedron_from_Cloog_Matrix): Same.
432 (ppl_Constrain_System_number_of_constraints): Same.
433 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
434 (oppose_constraint): Same.
435 (cloog_matrix_to_ppl_constraint): Same.
436 (new_Constraint_System_from_Cloog_Matrix): Same.
437 (insert_constraint_into_matrix): Same. Declared static.
438 * graphite-cloog-util.h: New.
439 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
440 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
441 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
442 (new_C_Polyhedron_from_Cloog_Matrix): Same.
443 (insert_constraint_into_matrix): Same.
444 * graphite-ppl.c:
445 Added graphite-cloog-util.h to include statements.
446 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
447 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
448 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
449 (new_C_Polyhedron_from_Cloog_Matrix): Same.
450 (insert_constraint_into_matrix): Same.
451 (ppl_Constrain_System_number_of_constraints): Same.
452 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
453 (oppose_constraint): Same.
454 (cloog_matrix_to_ppl_constraint): Same.
455 (new_Constraint_System_from_Cloog_Matrix): Same.
456 * graphite-ppl.h:
457 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
458 graphite-cloog-util.h.
459 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
460 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
461 (new_C_Polyhedron_from_Cloog_Matrix): Same.
462 (insert_constraint_into_matrix): Removed.
463
6955599b 4642010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
465
466 * graphite-clast-to-gimple.c
467 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
468 (precision_for_interval): Same.
469 (gcc_type_for_interval): Same.
470 (compute_type_for_level): Same.
471 * graphite-interchange.c
472 (lst_interchange_profitable_p): Same.
473 * graphite-poly.c
474 (psct_scattering_dim_for_loop_depth): Same.
475 * graphite-ppl.c
476 (ppl_max_for_le_pointset): Same.
477 (ppl_min_for_le_pointset): Same.
478
6fba926c 4792010-06-25 Vladimir Kargov <kargov@gmail.com>
480
481 * refined-regions.c (bb_index_compare): New.
482 (get_bbs_in_region): New.
483 (print_bbs_in_region): New.
484 (print_refined_region): Add an argument that allows to print
485 all basic blocks contained in regions.
486 (debug_refined_region): Update call to print_refined_region.
487 * refined-regions.h (print_refined_region): Update declaration.
488 (get_bbs_in_region): Declared.
489 * graphite-scop-detection.c (build_scops_new): Print the refined
490 region tree into the Grahite dump file.
491
b8046a12 4922010-06-24 Sebastian Pop <sebastian.pop@amd.com>
493
494 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
495 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
496
dd966e1f 4972010-06-24 Sebastian Pop <sebastian.pop@amd.com>
498
499 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
500 rewrite_close_phi_out_of_ssa.
501
502 * gcc.dg/graphite/id-22.c: New.
503
0569d480 5042010-06-24 Sebastian Pop <sebastian.pop@amd.com>
505
506 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
507
97142493 5082010-06-24 Sebastian Pop <sebastian.pop@amd.com>
509
510 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
511 rename_map.
512 * sese.c (debug_rename_map): Same.
513 (get_rename): Same.
514 (set_rename): Same.
515 (rename_variables_in_stmt): Same.
516 (expand_scalar_variables_call): Same.
517 (expand_scalar_variables_ssa_name): Same.
518 (expand_scalar_variables_expr): Same.
519 (expand_scalar_variables_stmt): Same.
520 (expand_scalar_variables): Same.
521 (rename_variables): Same.
522 (graphite_copy_stmts_from_block): Same.
523 (copy_bb_and_scalar_dependences): Same.
524
0c663bd0 5252010-06-24 Sebastian Pop <sebastian.pop@amd.com>
526
527 * graphite-clast-to-gimple.c (copy_renames): Removed.
528 (translate_clast_for): Do not call copy_renames.
529 (translate_clast_guard): Same.
530
42ad5d61 5312010-06-23 Sebastian Pop <sebastian.pop@amd.com>
532
533 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
534 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
535 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
536 before rewrite_cross_bb_scalar_deps.
537
8643dd0a 5382010-06-23 Sebastian Pop <sebastian.pop@amd.com>
539
540 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
541 Early return in when flag_associative_math is not set.
542
9a34ebd6 5432010-06-23 Sebastian Pop <sebastian.pop@amd.com>
544
545 * gcc.dg/graphite/run-id-2.c: Call abort.
546
097e870c 5472010-06-23 Sebastian Pop <sebastian.pop@amd.com>
548
549 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
550 of SSA copies on edges except for loop->latch.
551
bf8b5699 5522010-06-23 Sebastian Pop <sebastian.pop@amd.com>
553
554 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
555 Split out of rewrite_reductions_out_of_ssa.
556 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
557 Declared.
558 * graphite.c (graphite_transform_loops): Call it.
559
e819c864 5602010-06-23 Sebastian Pop <sebastian.pop@amd.com>
561
562 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
563
b90bb125 5642010-06-15 Sebastian Pop <sebastian.pop@amd.com>
565
566 * passes.c (init_optimization_passes): Add pass_graphite.
567 Schedule a pass_copy_prop before pass_graphite_transforms.
568 * timevar.def (TV_GRAPHITE): Declared.
569 * tree-pass.h (pass_graphite): Declared.
570 * tree-ssa-loop.c (pass_graphite): New.
571
572 * gcc.dg/graphite/id-20.c: New.
573
93206bb0 5742010-06-12 Sebastian Pop <sebastian.pop@amd.com>
575
576 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
577 Remove calls to rename_nb_iterations and rename_sese_parameters.
578 * graphite-clast-to-gimple.h (gloog): Update declaration.
579 * graphite.c (graphite_transform_loops): Update call to gloog.
580 * sese.c (rename_variables_in_expr): Removed.
581 (rename_nb_iterations): Removed.
582 (rename_sese_parameters): Removed.
583 * sese.h (rename_nb_iterations): Removed.
584 (rename_sese_parameters): Removed.
585
88a551f1 5862010-06-12 Sebastian Pop <sebastian.pop@amd.com>
587
588 * graphite-clast-to-gimple.c (gloog): Remove call to
589 sese_adjust_liveout_phis.
590 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
591 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
592 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
593 rewrite_phi_out_of_ssa.
594 * sese.c (get_vdef_before_sese): Removed.
595 (sese_adjust_vphi): Removed.
596 (sese_adjust_liveout_phis): Removed.
597 * sese.h (sese_adjust_liveout_phis): Removed.
598
39a34dd8 5992010-06-12 Sebastian Pop <sebastian.pop@amd.com>
600
601 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
602 argument for the place after which to insert the out of SSA copy.
603 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
604 (rewrite_phi_out_of_ssa): Same.
605 (rewrite_cross_bb_scalar_deps): Same.
606 (insert_copyout): Removed.
607 (insert_copyin): Removed.
608 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
609 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
610 insert_copyin.
611
5d2603f9 6122010-06-12 Sebastian Pop <sebastian.pop@amd.com>
613
614 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
615 (rewrite_reductions_out_of_ssa): Same.
616 (rewrite_commutative_reductions_out_of_ssa): Same.
617 (build_poly_scop): Do not call these functions.
618 * graphite-sese-to-poly.h (build_poly_scop): Declared.
619 (rewrite_reductions_out_of_ssa): Declared.
620 (rewrite_commutative_reductions_out_of_ssa): Declared.
621 * graphite.c (graphite_transform_loops): Call on every scop
622 rewrite_commutative_reductions_out_of_ssa before calling
623 rewrite_reductions_out_of_ssa and build_scop_bbs.
624
189cea68 6252010-06-12 Sebastian Pop <sebastian.pop@amd.com>
626
627 * graphite-dependences.c (dot_deps): Make system call to dotty run
628 in background.
629 (dot_deps_stmt): Same.
630 * graphite-poly.c (dot_lst): Same.
631
1861e127 6322010-06-11 Sebastian Pop <sebastian.pop@amd.com>
633
634 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
635 old_type in parameter.
636 (gcc_type_for_value): Update call to gcc_type_for_interval.
637 (compute_type_for_level_1): Renamed compute_type_for_level.
638 Update call to gcc_type_for_interval.
639
f6a2a688 6402010-06-09 Sebastian Pop <sebastian.pop@amd.com>
641
642 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
643 the scev analysis when the variable is not used outside the loop
644 in a close phi node: call compute_overall_effect_of_inner_loop.
645
3662a419 6462010-06-09 Sebastian Pop <sebastian.pop@amd.com>
647
648 * graphite-sese-to-poly.c (single_pred_cond): Renamed
649 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
650 (build_sese_conditions_before): Renamed call to single_pred_cond.
651 (build_sese_conditions_after): Same.
652
a344bb22 6532010-06-09 Sebastian Pop <sebastian.pop@amd.com>
654
655 * graphite-poly.h: Fix comments and indentation.
656 * graphite-sese-to-poly.c: Same.
657 (build_sese_conditions_before): Compute stmt and gbb only when needed.
658 * tree-chrec.c: Fix comments and indentation.
659 (tree-ssa-loop-niter.c): Same.
660
9ac63ea9 6612010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
662
663 * refined-regions.c (create_region): Only initialize the region.
664 (find_regions_with_entry): Initialize parent relation and bbmap
665 correctly.
666 (build_regions_tree): Set outermost_region to region instead of
667 topmost_region.
668 (calculate_region_tree): Remove unneeded parameters.
669
441c9c1d 6702010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
671
672 * graphite-scop-detection.c (is_scop_p): New.
673 (build_scops_new): New. A skeleton for the new scop detection.
674 (build_scops_old): Renamed from build_scops.
675 (build_scops): New version. Call the new and the old scop
676 detection.
677
93bdb320 6782010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
679 Antoniu Pop <antoniu.pop@gmail.com>
680
681 * Makefile.in (OBJS-common): Add refined-regions.o.
682 (refined-regions.o): New.
683 (graphite-scop-detection.o): Use refined-regions.h.
684 * graphite-scop-detection.c: Include refined-regions.h
685 (build_scops): Also build the refined region tree.
686 * refined-regions.c: New. Adds an algorithm to detect refined
687 regions.
688 (print_refined_region): New.
689 (debug_refined_region): New.
690 (refined_region_contains_bb_p): New.
691 (refined_region_contains_region_p): New.
692 (is_common_df): New.
693 (struct find_regions_global_data): New.
694 (is_region): New.
695 (typedef struct bb_bb_def): New.
696 (new_bb_bb_def): New.
697 (bb_bb_map_hash): New.
698 (eq_bb_bb_map): New.
699 (find_new_bb): New.
700 (bb_reg_def): New.
701 (new_bb_reg_def): New.
702 (bb_reg_map_hash): New.
703 (eq_bb_reg_map): New.
704 (find_new_region): New.
705 (insert_new_reg): New.
706 (insert_new_bb): New.
707 (insert_shortcut): New.
708 (get_next_postdom): New.
709 (create_region): New.
710 (find_regions_with_entry): New.
711 (find_regions_adc): New.
712 (find_regions): New.
713 (get_topmost_parent): New.
714 (build_regions_tree): New.
715 (calculate_region_tree): New.
716 (free_region_tree): New.
717 * refined-regions.h: New.
718 (struct refined_region): New.
719 (calculate_region_tree): New.
720 (free_region_tree): New.
721 (refined_region_contains_bb_p): New.
722 (refined_region_contains_region_p): New.
723 (print_refined_region): New.
724 (debug_refined_region): New.
725
78b58940 7262010-05-26 Sebastian Pop <sebastian.pop@amd.com>
727
728 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
729 size_one_node.
730
9acb79e3 7312010-05-07 Sebastian Pop <sebastian.pop@amd.com>
732
733 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
734 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
735
9d828157 7362010-05-07 Sebastian Pop <sebastian.pop@amd.com>
737
738 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
739 phi_arg_in_outermost_loop.
740 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
741 (remove_invariant_phi): Same.
742
0ef84e3b 7432010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
744
745 * graphite-blocking.c
746 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
747 * graphite-clast-to-gimple.c
748 (clast_to_gcc_expression): Same.
749 (precision_for_value): Same.
750 (precision_for_interval): Same.
751 (gcc_type_for_interval): Same.
752 (graphite_create_new_guard): Same.
753 (compute_bounds_for_level): Same.
754 (graphite_create_new_loop_guard): Same.
755 * graphite-interchange.c
756 (build_linearized_memory_access): Same.
757 (pdr_stride_in_loop): Same.
758 (memory_strides_in_loop_1): Same.
759 (memory_strides_in_loop): Same.
760 (extend_scattering): Same.
761 (psct_scattering_dim_for_loop_depth): Same.
762 (pbb_number_of_iterations): Same.
763 * graphite-poly.h
764 (debug_iteration_domains): Same.
765 * graphite-ppl.c
766 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
767 (ppl_set_inhomogeneous_gmp): Same.
768 (ppl_strip_loop): Same.
769 (ppl_lexico_compare_linear_expressions): Same.
770 (ppl_read_polyhedron_matrix): Same.
771 (ppl_max_for_le_pointset): Same.
772 * graphite-ppl.h
773 (ppl_read_polyhedron_matrix): Same.
774 (tree_int_to_gmp): Same.
775 (gmp_cst_to_tree): Same.
776 (ppl_set_inhomogeneous): Same.
777 (ppl_set_inhomogeneous_tree): Same.
778 (ppl_set_coef): Same.
779 (ppl_set_coef_tree): Same.
780 * graphite-sese-to-poly.c
781 (build_pbb_scattering_polyhedrons): Same.
782 (build_scop_scattering): Same.
783 (scan_tree_for_params_right_scev): Same.
784 (scan_tree_for_params): Same.
785 (find_params_in_bb): Same.
786 (find_scop_parameters): Same.
787 (add_upper_bounds_from_estimated_nit): Same.
788 (build_loop_iteration_domains): Same.
789 (add_condition_to_domain): Same.
790 (pdr_add_memory_accesses): Same.
791
2d6fe479 7922010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
793
a2c572ef 794 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
2d6fe479 795 CLooG's value_* macros to their respective mpz_* counterparts.
796 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
797 (graphite_create_new_loop_guard): Same.
798 * graphite-interchange.c (build_linearized_memory_access): Same.
799 (pdr_stride_in_loop): Same.
800 (memory_strides_in_loop_1): Same.
801 (1st_interchange_profitable_p): Same.
802 * graphite-poly.c (extend_scattering): Same.
803 (psct_scattering_dim_for_loop_depth): Same.
804 (pbb_number_of_iterations): Same.
805 (pbb_number_of_iterations_at_time): Same.
806 * graphite-poly.h (new_1st_loop): Same.
807 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
808 (oppose_constraint): Same.
809 (insert_constraint_into_matrix): Same.
810 (ppl_set_inhomogeneous_gmp): Same.
811 (ppl_set_coef_gmp): Same.
812 (ppl_strip_loop): Same.
813 (ppl_lexico_compare_linear_expressions): Same.
814 (ppl_max_for_le_pointset): Same.
815 (ppl_min_for_le_pointset): Same.
816 (ppl_build_realtion): Same.
817 * graphite-ppl.h (gmp_cst_to_tree): Same.
818 (ppl_set_inhomogeneous): Same.
819 (ppl_set_inhomogeneous_tree): Same.
820 (ppl_set_coef): Same.
821 (ppl_set_coef_tree): Same.
822 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
823 (build_scop_scattering): Same.
824 (add_value_to_dim): Same.
825 (scan_tree_for_params_right_scev): Same.
826 (scan_tree_for_params_int): Same.
827 (scan_tree_for_params): Same.
828 (find_params_in_bb): Same.
829 (find_scop_parameters): Same.
830 (add_upper_bounds_from_estimated_nit): Same.
831 (build_loop_iteration_domains): Same.
832 (create_linear_expr_from_tree): Same.
833 (add_condition_to_domain): Same.
834 (pdr_add_memory_accesses): Same.
835
7c0d15dc 8362010-04-05 Sebastian Pop <sebastian.pop@amd.com>
837
838 PR middle-end/43519
839 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
840 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
841 When converting an unsigned type to signed, double its precision.
842 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
843 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
844 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
845
8462010-04-05 Sebastian Pop <sebastian.pop@amd.com>
847
848 PR middle-end/43519
849 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
850 build_nonstandard_integer_type.
851 (gcc_type_for_interval): Same.
852
8532010-04-05 Sebastian Pop <sebastian.pop@amd.com>
7778680e 854
855 PR middle-end/43519
856 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
857 POINTER_PLUS_EXPR for pointer types.
858
859 * gcc.dg/graphite/id-19.c: New.
860
f20b6ea9 8612010-04-04 Sebastian Pop <sebastian.pop@amd.com>
862
863 PR middle-end/43519
864 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
865 * graphite-clast-to-gimple.c: Include langhooks.h.
866 (max_signed_precision_type): New.
867 (max_precision_type): Takes two types as arguments.
868 (precision_for_value): New.
869 (precision_for_interval): New.
870 (gcc_type_for_interval): New.
871 (gcc_type_for_value): New.
872 (gcc_type_for_clast_term): New.
873 (gcc_type_for_clast_red): New.
874 (gcc_type_for_clast_bin): New.
875 (gcc_type_for_clast_expr): Split up into several functions.
876 (gcc_type_for_clast_eq): Rewritten.
877 (compute_bounds_for_level): New.
878 (compute_type_for_level_1): New.
879 (compute_type_for_level): New.
880 (gcc_type_for_cloog_iv): Removed.
881 (gcc_type_for_iv_of_clast_loop): Rewritten.
882 (graphite_create_new_loop): Compute the lower and upper bound types
883 with gcc_type_for_clast_expr.
884 (graphite_create_new_loop_guard): Same.
885 (find_cloog_iv_in_expr): Removed.
886 (compute_cloog_iv_types_1): Removed.
887 (compute_cloog_iv_types): Removed.
888 (gloog): Do not call compute_cloog_iv_types.
889 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
890 GBB_CLOOG_IV_TYPES.
891 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
892 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
893 (GBB_CLOOG_IV_TYPES): Removed.
894
895 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
896
03ce78db 8972010-04-02 Sebastian Pop <sebastian.pop@amd.com>
898
899 Reverted this commit: as at this point the loop closed SSA form
900 is under a canonical form respecting the single argument condition.
901 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
902 close phi nodes may have more than one argument.
903
9042010-04-01 Sebastian Pop <sebastian.pop@amd.com>
905
906 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
907 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
908 (detect_commutative_reduction): Same.
909
9102010-03-31 Sebastian Pop <sebastian.pop@amd.com>
911
912 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
913 close phi nodes may have more than one argument.
914
67e28d17 9152010-03-30 Richard Guenther <rguenther@suse.de>
916 Zdenek Dvorak <ook@ucw.cz>
917 Sebastian Pop <sebastian.pop@amd.com>
918
919 PR middle-end/43464
920 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
921 with multiple arguments.
922 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
923
ff4c7a5a 9242010-03-23 Sebastian Pop <sebastian.pop@amd.com>
925
926 * graphite-dependences.c (print_pddr): Call print_pdr with an
927 extra argument.
928 * graphite-poly.c (debug_pdr): Add an extra argument for the
929 verbosity level.
930 (print_pdr): Same.
931 (print_pbb_domain): Same.
932 (print_pbb): Same.
933 (print_scop_context): Same.
934 (print_scop): Same.
935 (print_cloog): Same.
936 (debug_pbb_domain): Same.
937 (debug_pbb): Same.
938 (print_pdrs): Same.
939 (debug_pdrs): Same.
940 (debug_scop_context): Same.
941 (debug_scop): Same.
942 (debug_cloog): Same.
943 (print_scop_params): Same.
944 (debug_scop_params): Same.
945 (print_iteration_domain): Same.
946 (print_iteration_domains): Same.
947 (debug_iteration_domain): Same.
948 (debug_iteration_domains): Same.
949 (print_scattering_function): Same.
950 (print_scattering_functions): Same.
951 (debug_scattering_function): Same.
952 (debug_scattering_functions): Same.
953 * graphite-poly.h (debug_pdr): Update declaration.
954 (print_pdr): Same.
955 (print_pbb_domain): Same.
956 (print_pbb): Same.
957 (print_scop_context): Same.
958 (print_scop): Same.
959 (print_cloog): Same.
960 (debug_pbb_domain): Same.
961 (debug_pbb): Same.
962 (print_pdrs): Same.
963 (debug_pdrs): Same.
964 (debug_scop_context): Same.
965 (debug_scop): Same.
966 (debug_cloog): Same.
967 (print_scop_params): Same.
968 (debug_scop_params): Same.
969 (print_iteration_domain): Same.
970 (print_iteration_domains): Same.
971 (debug_iteration_domain): Same.
972 (debug_iteration_domains): Same.
973 (print_scattering_function): Same.
974 (print_scattering_functions): Same.
975 (debug_scattering_function): Same.
976 (debug_scattering_functions): Same.
977
1f8d6d4d 9782010-03-23 Sebastian Pop <sebastian.pop@amd.com>
979
980 * graphite-poly.c (print_scattering_function_1): New.
981 (print_scattering_function): Call it.
982 (print_scop_params): Remove spaces at the end of lines.
983 (print_cloog): New.
984 (debug_cloog): New.
985 * graphite-poly.h (print_cloog): Declared.
986 (debug_cloog): Declared.
987
4de8824d 9882010-03-23 Sebastian Pop <sebastian.pop@amd.com>
989
990 * tree-ssa-copy.c: Revert this previous change:
991 (init_copy_prop): Loop closed phi nodes cancontain more than one
992 argument.
993 (execute_copy_prop): Revert the previous change: do not call
994 rewrite_into_loop_closed_ssa.
995
9962010-03-21 Sebastian Pop <sebastian.pop@amd.com>
997 Richard Guenther <rguenther@suse.de>
998
999 PR middle-end/43464
1000 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1001 contain more than one argument.
1002 (execute_copy_prop): Revert the previous change: do not call
1003 rewrite_into_loop_closed_ssa.
1004
1005 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1006 * gcc.dg/graphite/id-pr43464-1.c: New.
1007
10082010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1009
1010 PR middle-end/43464
1011 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1012 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1013
1014 * gcc.dg/graphite/id-pr43464.c: New.
1015
0207206d 10162010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1017
1018 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1019 in loop->header.
1020 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1021 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1022 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1023 to switch between adding the IV bump in loop->latch or in loop->header.
1024
a751953f 10252010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1026
1027 * passes.c (init_optimization_passes): Add pass_copy_prop
1028 after Graphite.
1029
5dc5fe13 10302010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1031
1032 * graphite-poly.c (print_scattering_function): Pretty print following
1033 the scoplib format.
1034 (print_pdr): Same.
1035 (print_pbb_domain): Same.
1036 (dump_gbb_cases): Same.
1037 (dump_gbb_conditions): Same.
1038 (print_pdrs): Same.
1039 (print_pbb): Same.
1040 (print_scop_params): Same.
1041 (print_scop_context): Same.
1042 (print_scop): Same.
1043 (print_pbb_body): New.
1044 (lst_indent_to): New.
1045 (print_lst): Start new lines with a #.
1046 * graphite-poly.h (pbb_bb): New.
1047 (pbb_index): Use pbb_bb.
1048 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1049 disjuncts.
1050 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1051
9251755b 10522010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1053
1054 PR middle-end/43351
1055 * gcc.dg/graphite/id-pr43351.c
1056
5a644317 10572010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1058
1059 PR middle-end/43354
1060 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1061 call insert_out_of_ssa_copy for default definitions.
1062 * gfortran.dg/graphite/id-pr43354.f: New.
1063
10642010-03-13 Sebastian Pop <sebastian.pop@amd.com>
197de505 1065
1066 PR middle-end/43349
1067 * gfortran.dg/graphite/pr43349.f: New.
1068
119adb56 10692010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1070
1071 * graphite-clast-to-gimple.c (my_long_long): Defined.
1072 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1073 * graphite-sese-to-poly.c (my_long_long): Defined.
1074 (scop_ivs_can_be_represented): Use it.
1075
578e3456 10762010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1077
1078 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1079 graphite-max-bbs-per-function, and loop-block-tile-size.
1080 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1081 with "maximum".
1082 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1083
5d92ac74 10842010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1085
1086 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1087 forward declaration.
1088 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1089 (add_upper_bounds_from_estimated_nit): New.
1090 (build_loop_iteration_domains): Use it.
1091
89466e43 10922010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1093
1094 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1095
c4ccbe87 10962010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1097
1098 PR middle-end/43306
1099 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1100 should be an INTEGER_CST. Also handle CASE_CONVERT.
1101 * gcc.dg/graphite/pr43306.c: New.
1102
94ba21de 11032010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1104
1105 * graphite.c (graphite_initialize): To bound the number of bbs per
1106 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1107 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1108 * doc/invoke.texi: Document it.
1109
f49215ce 11102010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1111
1112 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1113 * graphite-sese-to-poly.h (build_poly_scop): Same.
1114
c2e502a5 11152010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1116
1117 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1118 the number of parameters in the scop. Use as an upper bound
1119 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1120 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1121 * doc/invoke.texi: Document it.
1122
8424df5f 11232010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1124
1125 * graphite-sese-to-poly.c (add_param_constraints): Use
1126 lower_bound_in_type and upper_bound_in_type.
1127
d6ad5c2f 11282010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1129
1130 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1131 instead of unsigned_type_node.
1132
88a62e9b 11332010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1134 Reza Yazdani <reza.yazdani@amd.com>
1135
1136 PR middle-end/43065
1137 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1138 on pointer type parameters.
1139
1140 * gcc.dg/graphite/run-id-4.c: New.
1141
11422010-03-05 Sebastian Pop <sebastian.pop@amd.com>
bc1b5a1d 1143
1144 PR middle-end/43065
1145 * gcc.dg/graphite/run-id-3.c: New.
1146
f6fb4255 11472010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1148 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1149
1150 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1151 handle conversions from pointer to integers.
1152 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1153 induction variable, to be able to work with code generated by CLooG.
1154 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1155 (build_poly_scop): Bail out if we cannot codegen a loop.
1156
2d0a2aaa 11572010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1158
1159 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1160 code generation with gloog_error.
1161
2996b712 11622010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1163
1164 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1165 Call fold_convert on all the returned values.
1166 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1167 the type of the resulting expression.
1168
c817e987 11692010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1170
1171 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1172 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1173 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1174
5f2e51eb 11752010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1176
1177 * graphite-dependences.c (map_into_dep_poly): Removed.
1178 (dependence_polyhedron_1): Use combine_context_id_scat.
1179
7453bc3b 11802010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1181
1182 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1183 (struct poly_bb): Same.
1184 (combine_context_id_scat): New.
1185
13dca219 11862010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1187
1188 PR middle-end/42326
1189 * sese.c (name_defined_in_loop_p): Return false for default
1190 definitions.
1191
1192 * gcc.dg/graphite/pr42326.c: New.
1193
fc830e2d 11942010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1195
1196 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1197 and clean up the logic.
1198
bde82a01 11992010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1200
1201 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1202 early return.
1203
bbf92068 12042010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1205
1206 PR middle-end/43083
1207 * graphite-scop-detection.c (create_single_exit_edge): Move
1208 the call to find_single_exit_edge to....
1209 (create_sese_edges): ...here. Don't handle multiple edges
1210 exiting the function.
1211 (build_graphite_scops): Don't handle multiple edges
1212 exiting the function.
1213
1214 * gcc.dg/graphite/pr43083.c: New.
1215
27f9c4ff 12162010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1217
66bb96d4 1218 PR middle-end/43097
27f9c4ff 1219 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1220 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1221
1222 * gfortran.dg/graphite/pr43097.f: New.
1223
c3eecfcf 12242010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1225 Manuel López-Ibáñez <manu@gcc.gnu.org>
1226
1227 PR middle-end/43140
1228 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1229
12302010-02-22 Sebastian Pop <sebastian.pop@amd.com>
550c39c3 1231
1232 PR middle-end/43026
1233 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1234
1235 * g++.dg/graphite/pr43026.C: New.
1236
3dc0020f 12372010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1238
1239 * Merge from mainline (154736:156693).
1240
5b3c8b56 12412010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1242
1243 PR middle-end/43012
1244 * gcc.dg/graphite/pr43012.c: New.
65084500 1245
5b3c8b56 12462010-02-10 Sebastian Pop <sebastian.pop@amd.com>
65084500 1247
5b3c8b56 1248 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
65084500 12492010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1250
1251 * g++.dg/graphite/pr42930.C: New.
1252
5dcbb45f 12532010-02-10 Sebastian Pop <sebastian.pop@amd.com>
ce0ae3b6 1254
1255 PR middle-end/42930
1256 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1257 graphite_can_represent_init for MULT_EXPR.
1258
5dcbb45f 12592010-02-10 Sebastian Pop <sebastian.pop@amd.com>
eae8f2a1 1260
1261 PR middle-end/42914
1262 PR middle-end/42530
1263 * graphite-sese-to-poly.c (remove_phi): New.
1264 (translate_scalar_reduction_to_array): Call remove_phi.
1265
1266 * gcc.dg/graphite/pr42530.c: New.
1267 * gcc.dg/graphite/pr42914.c: New.
1268
5dcbb45f 12692010-02-10 Sebastian Pop <sebastian.pop@amd.com>
94bdcd77 1270
1271 PR middle-end/42771
1272 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1273 * graphite-clast-to-gimple.h (gloog): Update declaration.
1274 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1275 * graphite-poly.h (struct poly_bb): Add missing comments.
1276 (struct scop): Add poly_scop_p field.
1277 (POLY_SCOP_P): New.
1278 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1279 * graphite.c (graphite_transform_loops): Build the polyhedral
1280 representation for each scop before code generation.
1281 * sese.c (rename_variables_in_operand): Removed.
1282 (rename_variables_in_expr): Return the renamed expression.
1283 (rename_sese_parameters): New.
1284 * sese.h (rename_sese_parameters): Declared.
1285
1286 * gcc.dg/graphite/pr42771.c: New.
1287
9fe3fe75 12882010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1289
1290 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1291 return 0 from main.
1292 * gcc.dg/graphite/block-1.c: Same.
1293 * gcc.dg/graphite/block-3.c: Same.
1294 * gcc.dg/graphite/block-4.c: Same.
1295 * gcc.dg/graphite/block-5.c: Same.
1296 * gcc.dg/graphite/block-6.c: Same.
1297 * gcc.dg/graphite/block-7.c: Same.
1298 * gcc.dg/graphite/interchange-0.c: Same.
1299 * gcc.dg/graphite/interchange-1.c: Same.
1300 * gcc.dg/graphite/interchange-10.c: Same.
1301 * gcc.dg/graphite/interchange-11.c: Same.
1302 * gcc.dg/graphite/interchange-12.c: Same.
1303 * gcc.dg/graphite/interchange-2.c: Same.
1304 * gcc.dg/graphite/interchange-3.c: Same.
1305 * gcc.dg/graphite/interchange-4.c: Same.
1306 * gcc.dg/graphite/interchange-5.c: Same.
1307 * gcc.dg/graphite/interchange-6.c: Same.
1308 * gcc.dg/graphite/interchange-7.c: Same.
1309 * gcc.dg/graphite/interchange-8.c: Same.
1310 * gcc.dg/graphite/interchange-9.c: Same.
1311 * gcc.dg/graphite/interchange-mvt.c: Same.
1312
422538b1 13132010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1314
1315 * gfortran.dg/graphite/id-19.f: New.
1316 * gfortran.dg/graphite/pr14741.f90: New.
1317 * gfortran.dg/graphite/pr41924.f90: New.
1318 * gfortran.dg/graphite/run-id-2.f90: New.
1319
8fe76250 13202010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1321
1322 PR middle-end/42988
1323 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1324 to unknown_dependence.
1325 (graphite_legal_transform_dr): Handle the unknown_dependence.
1326 (graphite_carried_dependence_level_k): Same.
1327
6c9df8cb 13282010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1329
1330 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1331
b7ac929d 13322010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1333 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1334
1335 PR middle-end/42637
1336 * graphite-dependences.c (build_lexicographical_constraint): Return
1337 a union of dependence polyhedra.
1338 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1339
6c9df8cb 1340 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1341 * gcc.dg/graphite/block-4.c: Same.
1342 * gcc.dg/graphite/block-7.c: Same.
1343 * gcc.dg/graphite/interchange-12.c: Same.
1344 * gcc.dg/graphite/interchange-mvt.c: Same.
1345 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1346 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1347 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
b7ac929d 1348
015d0b5c 13492010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1350
6c9df8cb 1351 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
015d0b5c 1352 the execution check to FAIL. This testcase is miscompiled by Graphite
1353 and the check should be re-enabled.
6c9df8cb 1354 * gcc.dg/graphite/interchange-mvt.c: Same.
1355 * gcc.dg/graphite/block-0.c: Same.
1356 * gcc.dg/graphite/block-4.c: Same.
1357 * gcc.dg/graphite/block-7.c: Same.
015d0b5c 1358
a5414f1f 13592010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1360
6c9df8cb 1361 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1362 * gcc.dg/graphite/scop-0.c: Fix spaces.
1363 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1364 * gfortran.dg/graphite/block-2.f: Same.
1365 * gfortran.dg/graphite/block-3.f90: Same.
1366 * gfortran.dg/graphite/block-4.f90: Same.
1367 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1368 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
a5414f1f 1369
a071b80b 13702010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1371
1372 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1373 PDDR_ORIGINAL_SCATTERING_P.
1374 (pddr_is_empty): Rewritten.
1375 (print_dependence_polyhedron_layout): New.
1376 (print_pddr): New.
1377 (debug_pddr): New.
1378 (build_alias_set_powerset): Moved up.
1379 (poly_drs_may_alias_p): Moved up.
1380 (lexicographically_gt_p): Removed.
1381 (build_lexicographically_gt_constraint): Renamed
1382 build_lexicographical_constraint, reimplemented.
1383 (dependence_polyhedron_1): Simplified parameters.
1384 (dependence_polyhedron): Same. Keep along empty PDDRs
1385 to make efficient use of the cache.
1386 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1387 (graphite_legal_transform_dr): Rewritten.
1388 (graphite_legal_transform_bb): Pass fewer arguments to
1389 graphite_legal_transform_dr.
1390 (graphite_carried_dependence_level_k): Simplified implementation.
1391 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1392 (dot_transformed_deps_stmt_1): Same.
1393 (dot_original_deps): Same.
1394 (dot_transformed_deps): Same.
1395 * graphite-dependences.h (struct poly_ddr): Added a new field
1396 original_scattering_p.
1397 (PDDR_ORIGINAL_SCATTERING_P): New.
1398 (print_pddr): Declared.
1399 (debug_pddr): Declared.
1400 * graphite-ppl.c: Clarify comment.
1401 * sese.h (print_gimple_bb): Removed unused declaration.
1402 (debug_gbb): Same.
1403
d0546b2e 14042010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1405
6c9df8cb 1406 * g++.dg/graphite/graphite.exp: Rewritten.
1407 * gcc.dg/graphite/graphite.exp: Rewritten.
1408 * gfortran.dg/graphite/graphite.exp: Rewritten.
1409 * gcc.dg/graphite/block-0.c: Added runtime test.
1410 * gcc.dg/graphite/block-1.c: Same.
1411 * gcc.dg/graphite/block-3.c: Same.
1412 * gcc.dg/graphite/block-4.c: Same.
1413 * gcc.dg/graphite/block-5.c: Same.
1414 * gcc.dg/graphite/block-6.c: Same.
1415 * gcc.dg/graphite/block-7.c: Same.
1416 * gcc.dg/graphite/interchange-0.c: Same.
1417 * gcc.dg/graphite/interchange-1.c: Same.
1418 * gcc.dg/graphite/interchange-10.c: Same.
1419 * gcc.dg/graphite/interchange-11.c: Same.
1420 * gcc.dg/graphite/interchange-12.c: Same.
1421 * gcc.dg/graphite/interchange-2.c: Same.
1422 * gcc.dg/graphite/interchange-3.c: Same.
1423 * gcc.dg/graphite/interchange-4.c: Same.
1424 * gcc.dg/graphite/interchange-5.c: Same.
1425 * gcc.dg/graphite/interchange-6.c: Same.
1426 * gcc.dg/graphite/interchange-7.c: Same.
1427 * gcc.dg/graphite/interchange-8.c: Same.
1428 * gcc.dg/graphite/interchange-9.c: Same.
1429 * gcc.dg/graphite/interchange-mvt.c: Same.
1430 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
d0546b2e 1431
ce363cd5 14322010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1433
1434 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1435 background.
1436
14372010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1438
1439 * common.opt: Add -fgraphite-cloog-opts.
1440 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1441 * opts.c (decode_options): Same.
1442
7bcf2a47 14432010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1444
6c9df8cb 1445 * gcc.dg/graphite/id-17.c: New.
1446 * gcc.dg/graphite/pr41888.c: New.
1447 * gcc.dg/graphite/scop-22.c: New.
1448 * gfortran.dg/graphite/pr40982.f90: New.
7bcf2a47 1449
f21ef1e7 14502010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1451
1452 * graphite-dependences.c: Clarify comments.
1453 (build_pddr): Add an extra parameter direction.
1454 (graphite_legal_transform_dr): Use build_pddr.
1455 (dot_original_deps_stmt_1): Update use of build_pddr.
1456 (dot_transformed_deps_stmt_1): Same.
1457 (dot_original_deps): Same.
1458 (dot_transformed_deps): Same.
1459
6c9df8cb 1460 * gcc.dg/graphite/interchange-12.c: New.
1461 * gcc.dg/graphite/block-7.c: New.
f21ef1e7 1462
4f19d858 14632010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1464
1465 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1466 (pddr_transformed_scattering): Removed.
1467 (graphite_legal_transform_dr): Use build_pddr.
1468 (dot_original_deps_stmt_1): Same.
1469 (dot_transformed_deps_stmt_1): Same.
1470 (dot_original_deps): Same.
1471 (dot_transformed_deps): Same.
1472
4fe30658 14732010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1474
1475 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1476 (build_lexicographically_gt_constraint): Same.
1477 (dependence_polyhedron_1): Same.
1478 (dependence_polyhedron): Same.
1479
abc97125 14802010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1481
1482 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1483 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1484 (lexicographically_gt_p): Change type of direction to int.
1485 (build_lexicographically_gt_constraint): Same.
1486 (dependence_polyhedron_1): Same.
1487 (dependence_polyhedron): Same.
1488 (pddr_original_scattering): Use integers for direction.
1489 (pddr_transformed_scattering): Same.
1490 (graphite_legal_transform_dr): Same.
1491 (graphite_carried_dependence_level_k): Same.
1492
b57cb73e 14932010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1494
1495 * graphite-dependences.c (build_pairwise_constraint): Renamed
1496 ppl_build_relation. Moved...
1497 (dr_equality_constraints): Use ppl_build_relation.
1498 (build_pairwise_scheduling_equality): Same.
1499 (build_pairwise_scheduling_inequality): Same.
1500 * graphite-ppl.c (ppl_build_relation): ...here.
1501 * graphite-ppl.h (ppl_build_relation): Declared.
1502
2487de19 15032010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1504
1505 PR middle-end/42681
1506 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1507 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1508 Set gloog_error when such an expression failed to be built.
1509 (translate_clast): Early return when gloog_error is set.
1510 (gloog): Clear gloog_error. When gloog_error is set, call
1511 set_ifsese_condition to enable the original code. Return the status
1512 of the code generation based on gloog_error.
1513 * sese.c (set_ifsese_condition): New.
1514 * sese.h (set_ifsese_condition): Declared.
1515
6c9df8cb 1516 * g++.dg/graphite/pr42681.C: New.
2487de19 1517
efe339e3 15182010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1519
1520 PR middle-end/42732
1521 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1522 rename_nb_iterations.
1523 * sese.c (rename_variables_in_operand): New.
1524 (rename_variables_in_expr): New.
1525 (rename_nb_iterations): New.
1526 (sese_adjust_liveout_phis): Update the rename_map.
1527 * sese.h (rename_nb_iterations): Declared.
1528 * tree-scalar-evolution.c (scev_reset_htab): New.
1529 (scev_reset): Call scev_reset_htab.
1530 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1531
6c9df8cb 1532 * gfortran.dg/graphite/pr42732.f: New.
efe339e3 1533
a77f6f84 15342010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1535
1536 PR middle-end/42393
1537 * graphite-clast-to-gimple.c: Fix formatting.
1538 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1539 (expr_defined_in_loop_p): New.
1540 (add_loop_exit_phis): Also handle full expressions: remove from
1541 the rename_map the expressions defined in the loop that we're closing.
1542
6c9df8cb 1543 * gfortran.dg/graphite/pr42393-1.f90: New.
1544 * gfortran.dg/graphite/pr42393.f90: Add new flags
a77f6f84 1545 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1546 make this testcase useful in the Graphite branch.
1547
01e31b4b 15482010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1549
1550 * graphite-scop-detection.c (exclude_component_ref): Removed.
1551 (is_simple_operand): Removed.
1552 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1553
2379556f 15542010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1555
1556 PR middle-end/42221
1557 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1558 the array indexing of ADDR_EXPRs.
1559
6c9df8cb 1560 * gcc.dg/graphite/pr42221.c: New.
2379556f 1561
d9458edc 15622010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1563
1564 PR middle-end/42521
1565 * graphite.c (graphite_finalize): Call scev_reset.
1566 (graphite_transform_loops): Do not call scev_reset between the code
1567 generation of scops.
1568
6c9df8cb 1569 * gcc.dg/graphite/pr42521.c: New.
d9458edc 1570
b33d4eb4 15712010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1572
1573 * graphite-interchange.c (memory_stride_in_loop): Renamed
1574 pdr_stride_in_loop.
1575 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1576 (memory_strides_in_loop): Memoize the memory strides per loop.
1577 (lst_interchange_profitable_p): Do not initialize to zero the memory
1578 strides.
1579 * graphite-poly.h (struct lst): Add a field memory_strides.
1580 (LST_LOOP_MEMORY_STRIDES): New.
1581 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1582 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1583
a16e8346 15842010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1585
1586 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1587 memory_strides_in_loop. Gather memory strides on a whole loop.
1588 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1589 (lst_interchange_profitable_p): Removed.
1590 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1591
2edfa860 15922010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1593
1594 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1595 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1596 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1597 Remove context_loop and level.
1598
3f12432d 15992010-01-07 Richard Guenther <rguenther@suse.de>
1600
1601 PR tree-optimization/42641
1602 * sese.c (rename_map_elt_info): Use the SSA name version, do
1603 not hash pointers.
1604
16052010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1606
1607 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1608 blocked" only when both the strip mine and the interchange have
1609 been applied.
1610
6c9df8cb 1611 * gcc.dg/graphite/block-2.c: Removed.
1612 * gcc.dg/graphite/block-3.c: Add scan pattern.
1613 * gcc.dg/graphite/block-4.c: Same.
1614 * gcc.dg/graphite/block-5.c: Same.
1615 * gcc.dg/graphite/block-6.c: Same.
3f12432d 1616
cfd3faac 16172010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1618
1619 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1620 before allocating a new one.
1621 (copy_renames): Check that slot is not NULL.
1622 (mark_bb_with_pbb): Same.
1623 (compute_cloog_iv_types_1): Same.
1624 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1625 nest, and after LSTs.
1626 (lst_try_interchange_loops): Same.
1627
a1a6700b 16282010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1629
1630 PR middle-end/42178
1631 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1632 the before, nest, and after LSTs.
1633 (lst_try_interchange): Removed.
1634 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1635 were modified.
1636 (lst_interchange_select_outer): Apply interchange on the outer loop
1637 until there are no more changes in the inner loops.
1638
7f60ea7e 16392009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1640
1641 Revert patch fixing PR middle-end/42221.
1642
16432009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1644
1645 PR middle-end/42180
1646 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1647 GIMPLE_CALL.
1648
6c9df8cb 1649 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
7f60ea7e 1650
c668dee5 16512009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1652
1653 PR middle-end/42180
1654 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1655 that contain only one statement.
1656
6c9df8cb 1657 * gfortran.dg/graphite/pr42180.f90: New.
7f60ea7e 1658
a190b734 16592009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1660
1661 PR middle-end/42393
6c9df8cb 1662 * gfortran.dg/graphite/pr42393.f90: New.
a190b734 1663
1747b6ef 16642009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1665
1666 PR middle-end/42186
6c9df8cb 1667 * gfortran.dg/graphite/pr42186.f90: New.
1747b6ef 1668
36f22aa0 16692009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1670
1671 PR middle-end/42205
1672 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1673 Insert the reduction copy in the same block as the phi node.
1674 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1675
6c9df8cb 1676 * gcc.dg/graphite/pr42205-1.c: New.
1677 * gcc.dg/graphite/pr42205-2.c: New.
36f22aa0 1678
16792009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1680
1681 PR middle-end/42221
1682 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1683 the array indexing of ADDR_EXPRs.
1684
6c9df8cb 1685 * gcc.dg/graphite/pr42221.c: New.
36f22aa0 1686
673c512e 16872009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1688
1689 PR middle-end/42178
1690 PR middle-end/42334
1691 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1692 index. Call lst_interchange_select_inner only once.
1693 (lst_interchange_select_inner): Update use of lst_try_interchange.
1694 (lst_interchange_select_outer): Update.
1695
16962009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1697
1698 PR middle-end/42178
1699 PR middle-end/42334
1700 * graphite-interchange.c (lst_try_interchange): Do not increment the
1701 the OUTER index when there is no AFTER kernel. Do not increment the
1702 OUTER index for after processing the AFTER kernel.
1703 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1704 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1705 index. Do not pass to lst_interchange_select_inner the OUTER index.
1706 (scop_do_interchange): Update use of lst_interchange_select_outer.
1707
6c9df8cb 1708 * gfortran.dg/graphite/graphite.exp
673c512e 1709 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
6c9df8cb 1710 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
673c512e 1711 the graphite dump file.
6c9df8cb 1712 * gfortran.dg/graphite/interchange-2.f: Same.
1713 * gfortran.dg/graphite/pr42334-1.f: New.
673c512e 1714
17152009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1716
1717 PR middle-end/42178
1718 PR middle-end/42334
1719 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1720 that are empty.
1721 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1722 (lst_try_interchange): Reimplemented.
1723 (lst_interchange_select_inner): Same.
1724 (lst_do_interchange): Renamed lst_interchange_select_outer.
1725 Reimplemented.
1726 (scop_do_interchange): Update use of lst_interchange_select_outer.
1727
6c9df8cb 1728 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1729 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1730 * gcc.dg/graphite/pr42211.c: New.
1731 * gfortran.dg/graphite/pr42334.f90: New.
673c512e 1732
99c136a5 17332009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1734
1735 PR middle-end/42181
1736 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1737 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1738
6c9df8cb 1739 * gfortran.dg/graphite/pr42181.f90: New.
99c136a5 1740
5184a05f 17412009-12-12 Sebastian Pop <sebpop@gmail.com>
1742
1743 PR middle-end/42284
1744 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1745 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1746 (detect_commutative_reduction_arg): Simplified.
1747 (detect_commutative_reduction): Early return when the argument of
1748 the close phi is not of an SSA_NAME.
1749
6c9df8cb 1750 * gcc.dg/graphite/pr42284.c: New.
5184a05f 1751
17522009-12-11 Alexander Monakov <amonakov@ispras.ru>
1753
1754 * dbgcnt.def (graphite_scop): New counter.
1755 * graphite.c: Include dbgcnt.h
1756 (graphite_transform_loops): Use new counter to limit transformations.
1757
7464e753 17582009-12-08 Sebastian Pop <sebpop@gmail.com>
1759
1760 PR middle-end/42285
1761 * graphite-scop-detection.c (graphite_can_represent_init): Also
1762 handle more complex MULT_EXPRs containing parameters by recursion
1763 on the structure.
1764
6c9df8cb 1765 * gfortran.dg/graphite/pr42285.f90: New.
7464e753 1766
17672009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1768
6c9df8cb 1769 * g++.dg/graphite/pr42130.C: Fix type.
7464e753 1770
f96db528 17712009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1772
6c9df8cb 1773 * g++.dg/graphite/pr42130.C: Correct testcase.
1774
17752009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1776
1777 * Merge from mainline (154493:154734).
1778
17792009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1780
1781 * Merge from mainline (151362:154491).
f96db528 1782
b7bde372 17832009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1784
1785 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1786 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1787
32e78944 17882009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1789
1790 PR middle-end/42130
1791 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1792 translate_clast_for_loop): New.
1793 (translate_clast_for): Add a condition around the loop, to do not
1794 execute loops with zero iterations.
6c9df8cb 1795 * g++.dg/graphite/pr42130.C: New.
1796 * gcc.dg/graphite/pr35356-2.c: Adapt.
32e78944 1797
bafaa7f6 17982009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1799
1800 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1801 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1802 Remove context_loop and level.
1803
0f5b569a 18042009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1805
1806 * graphite-clast-to-gimple.c (translate_clast_user,
1807 translate_clast_for, translate_clast_guard): Simplify and move common
1808 elements to translate_clast().
1809 (translate_clast): Simplify and get common elements.
1810
9a75e57c 18112009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1812
1813 * graphite-clast-to-gimple.c (translate_clast_user,
1814 translate_clast_for, translate_clast_guard): Split out of
1815 translate_clast.
1816
c9ef6b0e 18172009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1818
1819 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1820 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1821 debug_clast_name_indexes_1, debug_clast_name_indexes,
1822 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1823 (clast_name_to_gcc, clast_to_gcc_expression,
1824 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1825 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1826 graphite_create_guard_cond_expr, graphite_create_new_loop,
1827 translate_clast): Add params_index.
1828 (initialize_cloog_names): Create parameter strings from scratch, do
1829 not reference other strings.
1830 (create_params_index): New.
1831 (gloog): Initialize params_index.
1832 * graphite-scop-detection (free_scops_1): Removed.
1833 (limit_scops): Use normal free_scops.
1834 * graphite-sese-to-poly.c (save_var_names): Removed.
1835 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1836 and SESE_PARAMS_INDEX.
1837 * sese.c (new_sese, free_sese): Dito.
1838 * sese.h (struct sese): Remove params_index, params_names.
1839 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1840
a2a00920 18412009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1842
1843 Revert the following patch from 2009-09-14:
1844 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1845 tree-scalar-evolution.h, and then tree-data-ref.h.
1846 * graphite-clast-to-gimple.c: Same.
1847 * graphite-dependences.c: Same.
1848 * graphite-interchange.c: Same.
1849 * graphite-poly.c: Same.
1850 * graphite-scop-detection.c: Same.
1851 * graphite-sese-to-poly.c: Same.
1852 * graphite.c: Same.
1853 * lambda-code.c: Same.
1854 * matrix-reorg.c: Same.
1855 * tree-data-ref.c: Same.
1856 * tree-if-conv.c: Same.
1857 * tree-loop-distribu: Same.: Same.
1858 * tree-loop-linear.c: Same.
1859 * tree-parloops.c: Same.
1860 * tree-predcom.c: Same.
1861 * tree-vect-patterns.c: Same.
1862
2bc59caa 18632009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1864
1865 Revert patch from 2009-09-14.
1866 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1867 passes at -O1 and below.
1868
1d4dd1ed 18692009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1870
1871 PR middle-end/40281
6c9df8cb 1872 * gcc.dg/graphite/pr40281.c: New.
1d4dd1ed 1873
1874 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1875 evolutions should not variate in inner loops.
1876
efe7b64c 18772009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1878
1879 PR middle-end/42050
6c9df8cb 1880 * gfortran.dg/graphite/pr42050.f90: New.
efe7b64c 1881
acba5819 18822009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1883
1884 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1885 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1886
64d8f27a 18872009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1888
1889 * graphite-blocking.c (scop_do_block): New.
1890 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1891 * graphite-poly.h (scop_do_block): Declared.
1892
9a0158f5 18932009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1894
1895 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1896 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1897 to transform depth into the time_depth before calling
1898 pbb_number_of_iterations_at_time.
1899 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1900 lst_depth.
1901
9d274e75 19022009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1903
1904 Reverted the patch for "scattering permutations" from 2009-10-28.
1905
1906 * graphite-poly.c (print_permutation): New.
1907 (debug_permutation): New.
1908 (new_poly_bb): Initialize PBB_PERMUTATION.
1909 (free_poly_bb): Free PBB_PERMUTATION.
1910 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1911 (struct pbb_permutation_elt): New.
1912 (PBB_PERMUTATION_ELT_STRIDE): New.
1913 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1914 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1915 (new_pbb_permutation_elt): New.
1916 (pbb_permutation_elt_free): New.
1917 (struct poly_bb): Add field permutation.
1918 (PBB_PERMUTATION): New.
1919 (print_permutation): Declared.
1920 (debug_permutation): Declared.
1921
3bcc3204 19222009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1923
1924 * graphite-interchange.c (build_partial_difference): New.
1925 (memory_stride_in_loop): Refactored the computation of
1926 equality constraints into build_partial_difference function.
1927 Added support for debugging stride computations.
1928
d996851c 19292009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1930
1931 * graphite-clast-to-gimple.c (gloog): Free if_region,
1932 if_region->true_region, and if_region->region.
1933 * sese.c (if_region_set_false_region): Free if_region->false_region.
1934 (create_if_region_on_edge): Do not use GGC_NEW.
1935 (move_sese_in_condition): Remove useless initialization.
1936
87d25ca7 19372009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1938
1939 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1940 for the loops created by the loop distribution. Do not modify the
1941 input LSTs.
1942 (lst_try_interchange_loops): Same. Use a temporary LST for the
1943 transformed schedule. Call lst_update_scattering before data
1944 dependence analysis.
1945 (lst_try_interchange): Pass an extra parameter INDEX.
1946 (lst_do_interchange_1): New.
1947 (lst_do_interchange): Call lst_do_interchange_1.
1948 (scop_do_interchange): Call lst_update_scattering.
1949 * graphite-poly.c (apply_poly_transforms): Do not call
1950 lst_update_scattering.
1951 * graphite-poly.h (lst_pred): New.
1952 (lst_succ): New.
1953 (lst_find_first_pbb): Return NULL when not found.
1954 (lst_empty_p): New.
1955 (lst_insert_in_sequence): Allow LST1 to be NULL.
1956 (lst_replace): New.
1957 (lst_substitute_3): New.
1958 * gcc.dg/graphite/interchange-1.c: XFail.
1959 * gcc.dg/graphite/interchange-8.c: XFail.
1960 * gcc.dg/graphite/interchange-11.c: XFail.
1961
06ced013 19622009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1963
1964 * graphite-interchange.c (lst_perfectly_nested_p): New.
1965 (lst_perfect_nestify): New.
1966 (lst_try_interchange_loops): Call store_lst_schedule,
1967 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1968 (scop_do_interchange): Avoid redundant legality test.
1969 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1970 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1971 * graphite-poly.h (psct_static_dim): New.
1972 (lst_dewey_number_at_depth): New.
1973 (lst_find_pbb): Restructured.
1974 (lst_find_first_pbb): Restructured.
1975 (lst_find_last_pbb): New.
1976 (lst_contains_p): New.
1977 (lst_contains_pbb): New.
1978 (lst_create_nest): New.
1979 (lst_remove_from_sequence): New.
1980 (pbb_update_scattering): New.
1981 (lst_update_scattering_under): New.
1982 (lst_update_scattering_seq): New.
1983 (lst_update_scattering): New.
1984 (lst_insert_in_sequence): New.
1985 (lst_distribute_lst): New.
1986 (lst_remove_all_before_including_pbb): New.
1987 (lst_remove_all_before_excluding_pbb): New.
1988
bf3aab8f 19892009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1990
1991 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1992 get_loop_exit_edges.
1993
06b1d38c 19942009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1995
1996 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1997
22467ffb 19982009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1999
2000 * graphite-poly.c (print_permutation): New.
2001 (debug_permutation): New.
2002 (new_poly_bb): Initialize PBB_PERMUTATION.
2003 (free_poly_bb): Free PBB_PERMUTATION.
2004 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2005 (struct pbb_permutation_elt): New.
2006 (PBB_PERMUTATION_ELT_STRIDE): New.
2007 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2008 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2009 (new_pbb_permutation_elt): New.
2010 (pbb_permutation_elt_free): New.
2011 (struct poly_bb): Add field permutation.
2012 (PBB_PERMUTATION): New.
2013 (print_permutation): Declared.
2014 (debug_permutation): Declared.
2015
628eaf60 20162009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2017
2018 * graphite-clast-to-gimple.c (gloog): Do not call
2019 sese_reset_aux_in_loops.
2020 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2021 extra argument for domains. Do not use loop->aux.
2022 (build_scop_iteration_domain): Initialize and free domains, pass it
2023 to build_loop_iteration_domains and extract the information from
2024 domains. Do not use loop->aux.
2025 * sese.c (sese_reset_aux_in_loops): Removed.
2026 * sese.h (sese_reset_aux_in_loops): Removed.
2027
2eb8c11d 20282009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2029
2030 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2031 (dependency_in_loop_p): Same.
2032 (translate_clast): Do not use loop->aux. Initialize
2033 loop->can_be_parallel.
2034 (mark_loops_parallel): Removed.
2035 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2036 * graphite.c (free_aux_in_new_loops): Removed.
2037 (graphite_finalize): Do not call free_aux_in_new_loops.
2038 (graphite_transform_loops): Do not call mark_loops_parallel.
2039
20402009-10-26 Li Feng <nemokingdom@gmail.com>
86cbf617 2041
2042 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2043 (translate_clast): Pass an extra parameter LEVEL.
2044 Call get_scattering_level.
2045 * graphite-clast-to-gimple.h (get_scattering_level): New.
2046
314c9614 20472009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2048
2049 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2050 * cfgloop.h (struct loop): New field single_iv.
2051
2052 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2053 loop->aux anymore: use loop->single_iv.
2054 (graphite_loop_normal_form): Moved...
2055 (build_graphite_loop_normal_form): Removed.
2056 (gloog): Do not call build_graphite_loop_normal_form.
2057 (free_aux_in_new_loops): Moved...
2058 (mark_loops_parallel): Restructure.
2059 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2060 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2061 (scop_canonicalize_loops): New.
2062 (build_poly_scop): Call scop_canonicalize_loops.
2063 * graphite.c (free_aux_in_new_loops): ...here.
2064
71bc7526 20652009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2066
2067 * g++.dg/graphite/graphite.exp: Add the same rules as in
2068 gcc.dg/graphite/graphite.exp.
2069
24af1ef8 20702009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2071
2072 * g++.dg/graphite/id-1.C: New.
2073
03c1327b 20742009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2075
2076 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2077 argument base_name.
2078 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2079 (rewrite_phi_out_of_ssa): Same.
2080 (rewrite_cross_bb_scalar_deps): Same.
2081 (translate_scalar_reduction_to_array): Same.
2082
8f9b64ca 20832009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2084
2085 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2086 dump_alias_graphs.
2087
aa16918e 20882009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2089
2090 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2091 (build_scop_drs): Call dump_alias_graphs.
2092
7e7ffe19 20932009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2094
2095 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2096 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2097 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2098 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2099 * graphite-poly.h (free_lst): New.
2100 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2101 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2102
e2622b4f 21032009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2104
2105 * graphite-poly.h (struct scop): Add a field saved_schedule.
2106 (SCOP_SAVED_SCHEDULE): New.
2107 (store_lst_schedule): New.
2108 (restore_lst_schedule): New.
2109 (store_scattering): Call store_lst_schedule.
2110 (restore_scattering): Call restore_lst_schedule.
2111
1a95516e 21122009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2113
2114 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2115 (pdr_add_alias_set): Same.
2116 (build_poly_dr): Same.
2117 (build_alias_set_optimal_p): Same.
2118 (build_base_obj_set_for_drs): Same. Do not store the result of
2119 graphds_dfs.
2120
f289f81b 21212009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2122
2123 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2124 all_components_are_cliques to 1.
2125
e9a3f95f 21262009-10-20 Li Feng <nemokingdom@gmail.com>
2127
2128 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2129 the new structure.
2130 (pdr_add_alias_set): Update retrieving alias_set_num.
2131 (build_poly_dr): Update retrieving dr_base_object_set.
2132 (partition_drs_to_sets): Remove.
2133 (build_alias_set_optimal_p): New.
2134 (build_alias_set_for_drs): Rename.
2135 (build_scop_drs): Update.
2136 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2137 (ALIAS_SET_INDEX): Remove.
2138 (BASE_OBJECT_SET_INDEX): Remove.
2139
a6457fb8 21402009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2141
2142 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2143
3354e72e 21442009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2145
2146 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2147 loop upper bounds for 1-element arrays at end of structures.
2148 * tree-flow.h (array_at_struct_end_p): Declared.
2149 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2150
917c8e43 21512009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2152
2153 * g++.dg/graphite/pr41305.C: New.
2154
b6410506 21552009-10-20 Alexander Monakov <amonakov@ispras.ru>
2156
2157 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2158 construction of parameter constraints from loop iteration analysis.
2159 * gcc.dg/graphite/run-id-2.c: New test.
2160
a66257d5 21612009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2162
2163 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2164 and new_cstr.
2165
38e3217b 21662009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2167
2168 * graphite-dependences.c (dependence_polyhedron_1): Remove
2169 unused gdim dimensions from the DDR polyhedron.
2170
de38f9c0 21712009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2172
2173 * graphite-dependences.c (pddr_transformed_scattering): New.
2174 (dot_original_deps_stmt_1): New.
2175 (dot_transformed_deps_stmt_1): New.
2176 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2177 dot_transformed_deps_stmt_1.
2178 (dot_original_deps): New.
2179 (dot_transformed_deps): New.
2180 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2181
ba01d66f 21822009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2183
2184 * graphite-dependences.c (reduction_dr_1): Remove wrong
2185 assert: reduction BBs can have multiple reduction writes
de38f9c0 2186 to memory. interchange-3.f90 is an example.
ba01d66f 2187
9050e62f 21882009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2189
2190 * gfortran.dg/graphite/interchange-3.f90: New.
2191
d26b2d30 21922009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2193
2194 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2195
bff9278d 21962009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2197
2198 * graphite-dependences.c (dependence_polyhedron_1): Add the
2199 context to the dependence polyhedron.
2200
13d0cae2 22012009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2202
2203 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2204 PBB_PDR_DUPLICATES_REMOVED.
2205 (new_poly_bb): Same.
2206
acb3969f 22072009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2208
2209 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2210 SCOP_CONTEXT.
2211 (build_loop_iteration_domains): Extract bounds on parameters
2212 based on the data size.
2213 (build_scop_context): Do not initialize SCOP_CONTEXT;
2214 add new constraints.
2215
e6d78739 22162009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2217
2218 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2219 * graphite-ppl.h (graphite-ppl.h): Declared.
2220
409f96c1 22212009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2222
2223 * graphite-ppl.c (ppl_print_linear_expr): New.
2224 (debug_ppl_linear_expr): New.
2225 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2226 (debug_ppl_linear_expr): Declared.
2227
3d695986 22282009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2229
2230 * graphite-interchange.c: Fix comments.
2231 * gcc.dg/graphite/block-1.c: Fix comments.
2232
ecab863e 22332009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2234
2235 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2236 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2237
3dfb9fc0 22382009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2239
2240 Reapply the patch from Alexander Monakov that disappeared during
2241 the last merges from trunk.
2242
2243 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2244
2245 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2246 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2247
a1190c1b 22482009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2249
2250 * graphite-interchange.c (memory_stride_in_loop): The depth
2251 argument corresponds to a dynamic time dimension, so use
2252 psct_dynamic_dim to refer to the transformed scattering dimension.
2253
dd3d3fae 22542009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2255
2256 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2257
43217ce9 22582009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2259
2260 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2261 root of the LST.
2262 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2263 the root of the LST.
2264 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2265 fake loop.
2266 (print_lst): Print the root of LST in a different format.
2267 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2268
9b6c835c 22692009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2270
2271 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2272
1e2a9aa7 22732009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2274
2275 * doc/passes.texi: Document the Graphite infrastructure.
2276
ff010926 22772009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2278
2279 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2280 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2281 and check the SSA representation.
2282
2283 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2284
fa846ea9 22852009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2286
2287 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2288
fe45c436 22892009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2290
2291 * gcc.dg/graphite/interchange-11.c: New.
2292
2e3e5ac8 22932009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2294
2295 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2296
93a95718 22972009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2298
2299 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2300 Add -fno-loop-strip-mine and -fno-loop-interchange.
2301 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2302 -fno-loop-strip-mine.
2303 * gfortran.dg/graphite/graphite.exp: Same.
2304
196689e3 23052009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2306
2307 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2308 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2309 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2310 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2311 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2312 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2313 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2314 DEFAULT_FLAGS_GRAPHITE_SCOP.
2315 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2316 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2317
d9e94834 23182009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2319
2320 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2321
5e18ab2b 23222009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2323 Sebastian Pop <sebastian.pop@amd.com>
2324
2325 * graphite-interchange.c (build_linearized_memory_access): Pass an
2326 offset as parameter.
2327 (memory_stride_in_loop): Include transform scattering in the
2328 access functions to be able to querry the strides in the
2329 transformed loops.
2330 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2331 not the psct_iterator_dim.
2332
0befefcc 23332009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2334
2335 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2336 (lst_do_strip_mine_loop): New.
2337 (lst_do_strip_mine): New.
2338 (scop_do_strip_mine): Call lst_do_strip_mine.
2339 * graphite-poly.h (lst_add_loop_under_loop): New.
2340 (lst_find_first_pbb): New.
2341
71b90bc3 23422009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2343
2344 * graphite-poly.c (loop_to_lst): Fix LST creation.
2345
4d6599d0 23462009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2347
6c9df8cb 2348 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
4d6599d0 2349 sizeof(unsigned long) to make it run on 32bit systems.
2350
23512009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2352
6c9df8cb 2353 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
4d6599d0 2354 SEGFAULT on 32bit.
2355
96233858 23562009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2357
4d6599d0 2358 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2359 Comment.
96233858 2360 (write_alias_graph_to_ascii_dot): New.
2361 (write_alias_graph_to_ascii_ecc): Ditto.
4d6599d0 2362 (partition_drs_to_sets): Add testing of optimality of current method
2363 which assigns alias numbers according to DFS Comopnent number. used
2364 as heuristic for the upcoming ECC algorithm.
96233858 2365 (build_scop_drs): Write to file also with the ecc and dot format.
2366
8eedbd74 23672009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2368
2369 * gfortran.dg/graphite/interchange-1.f: XFail.
2370
ef98ee10 23712009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2372
2373 * graphite.c (graphite_initialize): Do not handle functions with
2374 more than 100 basic blocks.
2375
b8ad26cc 23762009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2377
2378 * graphite-blocking.c (pbb_do_strip_mine): Use
2379 PARAM_LOOP_BLOCK_TILE_SIZE.
2380
4938b827 23812009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2382
2383 * graphite-poly.c (dot_lst_1): New.
2384 (dot_lst): New.
2385 * graphite-poly.h (dot_lst): Declared.
2386
a7d089ac 23872009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2388
2389 * graphite-dependences.c (dot_deps_stmt_1): New.
2390 (dot_deps_stmt): New.
2391 * graphite-dependences.h (dot_deps_stmt): Declared.
2392
dd27e8aa 23932009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2394
2395 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2396 not replace cross BB scalar dependences ending on PHI nodes.
2397 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2398
dbe2e816 23992009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2400
2401 * graphite-poly.c (apply_poly_transforms): Implement the high
2402 level driver for flag_loop_block.
6c9df8cb 2403 * opts.c (decode_options): Enable flag_loop_block at -O2.
dbe2e816 2404 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2405 flag_loop_block.
2406
2407 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2408 -floop-block.
2409 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2410 Add -floop-block.
2411
89d077e8 24122009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2413
2414 * graphite-poly.h (lst_find_pbb): New.
2415 (find_lst_loop): New.
2416
220b380e 24172009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2418
2419 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2420 * graphite-poly.h (struct scop): Remove dep_graph field.
2421 (SCOP_DEP_GRAPH): Removed.
2422
554eeadb 24232009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2424
2425 * graphite-poly.h (copy_lst): Do full copy of LST.
2426
30105622 24272009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2428
2429 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2430 when the loop stride is zero.
2431
2432 * gcc.dg/graphite/id-16.c: New.
2433
f007fe97 24342009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2435
2436 * graphite-dependences.c (reduction_dr_1): New.
2437 (reduction_dr_p): New.
2438 (graphite_legal_transform_dr): Call reduction_dr_p.
2439 (reduction_ddr): Renamed reduction_ddr_p.
2440 * graphite-poly.h (same_pdr_p): New.
2441 (number_of_write_pdrs): New.
2442 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2443 (split_reduction_stmt): Do not split reduction statements
2444 when there are no writes to memory.
2445 (translate_scalar_reduction_to_array_for_stmt): Insert the
2446 memory reduction statement just after the scalar reduction statement.
2447
2448 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2449 Un-XFAIL-ed.
2450 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2451 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2452
4d0382bc 24532009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2454
2455 * graphite-interchange.c (lst_apply_interchange): New.
2456 (lst_interchange_profitable_p): New.
2457 (lst_try_interchange_loops): New.
2458 (lst_try_interchange): New.
2459 (lst_do_interchange): New.
2460 (pbb_do_interchange): Removed.
2461 (scop_do_interchange): Call lst_do_interchange.
2462
f77385d3 24632009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2464
2465 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2466 SCOP_TRANSFORMED_SCHEDULE.
2467 (loop_to_lst): New.
2468 (scop_to_lst): New.
2469 (print_lst): New.
2470 (debug_lst): New.
2471 * graphite-poly.h (lst_p): New.
2472 (struct lst): New.
2473 (LST_LOOP_P): New.
2474 (LST_LOOP_FATHER): New.
2475 (LST_PBB): New.
2476 (LST_SEQ): New.
2477 (scop_to_lst): Declared.
2478 (print_lst): Declared.
2479 (debug_lst): Declared.
2480 (new_lst_loop): New.
2481 (new_lst_stmt): New.
2482 (copy_lst): New.
2483 (lst_depth): New.
2484 (lst_dewey_number): New.
2485 (struct scop): Add original_schedule and transformed_schedule fields.
2486 (SCOP_ORIGINAL_SCHEDULE): New.
2487 (SCOP_TRANSFORMED_SCHEDULE): New.
2488 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2489
30f4f4a6 24902009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2491
2492 * graphite-dependences.c (reduction_ddr): New.
2493 (graphite_legal_transform_bb): Call reduction_ddr.
2494 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2495 Initialize PBB_IS_REDUCTION.
2496 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2497 (PBB_IS_REDUCTION): New.
2498 (new_poly_bb): Update declaration.
2499 * graphite-scop-detection.h (build_scop_bbs): Removed.
2500 (nb_reductions_in_loop): Removed.
2501 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2502 parameter for reductions.
2503 (try_generate_gimple_bb): Update call to new_poly_bb.
2504 (build_scop_bbs_1): Same.
2505 (build_scop_bbs): Same.
2506 (gsi_for_phi_node): New.
2507 (scalar_close_phi_node_p): Remove gcc_assert.
2508 (split_reduction_stmt): New.
2509 (is_reduction_operation_p): New.
2510 (phi_contains_arg): New.
2511 (follow_ssa_with_commutative_ops): New.
2512 (detect_commutative_reduction_arg): New.
2513 (detect_commutative_reduction_assign): New.
2514 (follow_inital_value_to_phi): New.
2515 (edge_initial_value_for_loop_phi): New.
2516 (initial_value_for_loop_phi): New.
2517 (detect_commutative_reduction): New.
2518 (translate_scalar_reduction_to_array_for_stmt): New.
2519 (insert_copyout): New.
2520 (insert_copyin): New.
2521 (translate_scalar_reduction_to_array): New.
2522 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2523 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2524 (rewrite_commutative_reductions_out_of_ssa): New.
2525 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2526 * sese.h (split_region_for_bb): New.
2527
2528 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2529 * gcc.dg/graphite/interchange-1.c: Fix format.
2530 * gcc.dg/graphite/interchange-10.c: New.
2531
dcdff5dc 25322009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2533
2534 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2535 buggy assert.
2536
5061777c 25372009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2538
2539 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2540 (rewrite_cross_bb_scalar_dependence): New.
2541 (rewrite_cross_bb_scalar_deps): New.
2542 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2543 Call rewrite_cross_bb_scalar_deps.
2544
52123e43 25452009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2546
2547 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2548 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2549 gsi_for_stmt.
2550
ef43e998 25512009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2552
2553 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2554 * graphite-interchange.c (pbb_do_interchange): Same.
2555 * graphite-poly.c (print_scattering_function): Same.
2556 (debug_pdrs): Same.
2557 * graphite-poly.h (pbb_loop): New.
2558 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2559
7bf7d520 25602009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2561
2562 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2563
9c48819a 25642009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2565
2566 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2567 so don't pass a pointer to it.
2568 (build_alias_set_for_drs): Same.
2569 (build_base_obj_set_for_drs): Same.
2570 (build_scop_drs): Same.
2571
af3b89d1 25722009-09-26 Li Feng <nemokingdom@gmail.com>
2573
2574 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2575 the alias graph of data references.
2576
8dee37ec 25772009-09-25 Li Feng <nemokingdom@gmail.com>
2578
2579 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2580 (build_scop_drs): When debugging, write the alias graph to file,
2581 otherwise, should be disabled.
2582
6c9df8cb 25832009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2584
2585 * Merge from mainline (151310:151361).
2586
25872009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2588
2589 * Merge from mainline (151171:151310).
2590
25912009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2592
2593 * Merge from mainline (151171:151806).
2594
25952009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2596
2597 * Revert the last commit.
2598
25992009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2600
2601 * Merge from mainline (151171:151819).
2602
3cc56eaf 26032009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2604
2605 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2606 (is_simple_operand): Remove call to stmt_simple_memref_p.
2607 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2608
4d62cf0c 26092009-09-17 David Edelsohn <edelsohn@gnu.org>
2610
6c9df8cb 2611 * gcc.dg/graphite/interchange-mvt.c: New File.
2612 * gcc.dg/graphite/scop-dsyrk.c: New File.
2613 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2614 * gcc.dg/graphite/scop-mvt.c: New File.
2615 * gcc.dg/graphite/scop-sor.c: New File.
4d62cf0c 2616
ae11f03b 26172009-09-17 Li Feng <nemokingdom@gmail.com>
2618
ae11f03b 2619 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2620 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2621 (graphite_carried_dependence_level_k): Ditto.
2622 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2623 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2624 (new_poly_dr): Adjust declaration.
2625 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2626 (free_gimple_bb): Added free_data_refs_aux.
2627 (build_poly_dr): Add dr_base_object_set.
2628 (partition_drs_to_sets): New.
2629 (dr_same_base_object_p): New.
2630 (build_alias_set_for_drs): New.
2631 (build_base_object_set_for_drs): New.
2632 (build_scop_drs): Add build_base_obj_set_for_drs.
2633 * graphite-sese-to-poly.h: Added #define for alias set number index and
2634 base object set index.
2635 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2636 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2637
e5d72697 26382009-09-16 Alexander Monakov <amonakov@ispras.ru>
2639
2640 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2641 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2642
db899978 26432009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2644
2645 * graphite-sese-to-poly.c (struct irp_data): Removed.
2646 (idx_record_params): Removed.
2647 (find_params_in_bb): Scan for parameters the access functions; don't
2648 parse the tree representation.
2649
e5b6be5e 26502009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2651
2652 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2653 passes at -O1 and below.
2654
f631009f 26552009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2656
2657 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2658 tree-scalar-evolution.h, and then tree-data-ref.h.
2659 * graphite-clast-to-gimple.c: Same.
2660 * graphite-dependences.c: Same.
2661 * graphite-interchange.c: Same.
2662 * graphite-poly.c: Same.
2663 * graphite-scop-detection.c: Same.
2664 * graphite-sese-to-poly.c: Same.
2665 * graphite.c: Same.
2666 * lambda-code.c: Same.
2667 * matrix-reorg.c: Same.
2668 * tree-data-ref.c: Same.
2669 * tree-if-conv.c: Same.
2670 * tree-loop-distribu: Same.: Same.
2671 * tree-loop-linear.c: Same.
2672 * tree-parloops.c: Same.
2673 * tree-predcom.c: Same.
2674 * tree-vect-patterns.c: Same.
2675
5e803fbe 26762009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2677
2678 Partially revert the previous patch, except the following.
2679 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2680 as parameters the operands of the not expression.
2681
c43f1e90 26822009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2683
2684 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2685 Do not call analyze_scalar_evolution on assignments.
2686 (instantiate_scev_phi): Call analyze_scalar_evolution.
2687 (instantiate_scev_name): Call instantiate_scev_assign and
2688 instantiate_scev_phi.
2689 (instantiate_scev_not): Adapted to pass as parameters the operands
2690 of the not expression.
2691
9e9aa0c6 26922009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2693
2694 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2695 to pass as parameters the operands of the binary expression.
2696
9d206f16 26972009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2698
2699 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2700 instantiate_scev_not. Handle NEGATE_EXPR.
2701 (instantiate_scev_r): Handle NEGATE_EXPR.
2702
d91a99f1 27032009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2704
2705 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2706 instantiate_scev_r.
2707 (instantiate_scev_r): Move code in instantiate_scev_2
2708 and instantiate_scev_1.
2709
378a6626 27102009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2711
2712 * tree-scalar-evolution.c (instantiate_scev_3): New.
2713 (instantiate_scev_1): Move code in instantiate_scev_3.
2714
a819f845 27152009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2716
2717 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2718 (instantiate_scev_1): Move code in instantiate_scev_poly.
2719
39251a91 27202009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2721
2722 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2723 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2724
7723692a 27252009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2726
2727 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2728 (instantiate_scev_1): Move code in instantiate_scev_convert.
2729
5a10dfba 27302009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2731
2732 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2733 (instantiate_scev_1): Move code in instantiate_scev_binary.
2734
0731d869 27352009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2736
2737 * tree-scalar-evolution.c (instantiate_scev_name): New.
2738 (instantiate_scev_1): Move code in instantiate_scev_name.
2739
27402009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2741
2742 * Merge from mainline (150992:151171).
2743
6c9df8cb 27442009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2745
2746 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2747
9e3531b5 27482009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2749
2750 * graphite-dependences.c (graphite_legal_transform_bb): Call
2751 pbb_remove_duplicate_pdrs.
2752 * graphite-poly.c (can_collapse_pdr): Removed.
2753 (pdr_find_duplicate): Removed.
2754 (can_collapse_pdrs): New.
2755 (pbb_remove_duplicate_pdrs): New.
2756 (new_poly_dr): Do not look for duplicates.
2757 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2758 (PBB_PDR_DUPLICATES_REMOVED): New.
2759 (pbb_remove_duplicate_pdrs): Declared.
2760
11b2102e 27612009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2762
2763 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2764 the strides by multiplying by PDR_NB_REFS.
2765 * graphite-poly.c (can_collapse_pdr): New.
2766 (pdr_find_duplicate): New.
2767 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2768 Initialize PDR_NB_REFS.
2769 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2770 (PDR_NB_REFS): New.
2771 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2772
27732009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2774
2775 Revert one of the previous commits:
2776 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2777 the computation of symmetric data dependence relations.
2778 (dependency_between_pbbs_p): Same.
2779
d0aaf399 27802009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2781
2782 PR middle-end/40965
2783 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2784 any transform.
2785
79698ff3 27862009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2787
2788 * graphite-dependences.c (pddr_original_scattering): Return NULL
2789 for read-read dependence relations.
2790 * graphite-poly.h (enum poly_dr_type): Fix comment.
2791 (pdr_read_p): New.
2792 (pdr_write_p): New.
2793 (pdr_may_write_p): New.
2794
c04f2da7 27952009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2796
2797 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2798 (struct poly_dr): Same.
2799 (new_poly_dr): Same.
2800 * graphite-poly.c (new_poly_dr): Same.
2801
ee0d08ad 28022009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2803 Sebastian Pop <sebastian.pop@amd.com>
2804
2805 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2806 pbb_strip_mine_time_depth. Changed the implementation so that
2807 transformation is expressed as a transformation on
2808 time (scatttering) dimensions. Also, ensures that the 2d+1
2809 scheduling format is preserved.
2810 (pbb_strip_mine_profitable_p): Profitability is based on the
2811 iteration number of a given time (scattering) dimension,
2812 and not on a original loop depth dimension.
2813 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2814 (pbb_do_strip_mine): Call psct_dynamic_dim.
2815 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2816 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2817 (pbb_nb_dynamic_scattering_transform): New.
2818 (psct_dynamic_dim): New.
2819
55c54afb 28202009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2821
2822 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2823 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2824 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2825 * graphite-interchange.c (build_linearized_memory_access): Same.
2826 (memory_stride_in_loop): Same.
2827
96b6d5d7 28282009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2829
2830 * graphite-dependences.c (pddr_original_scattering): New.
2831 (graphite_legal_transform_dr): Call pddr_original_scattering.
2832 (dot_deps_1): New.
2833 (dot_deps): New.
2834 * graphite-dependences.h (dot_deps): Declared.
2835 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2836 (print_pdr): Print PDR_ID.
2837 * graphite-poly.h (struct poly_dr): Add field id.
2838 (PDR_ID): New.
2839 (pbb_index): New.
2840 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2841
2b3a572c 28422009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2843
2844 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2845 not delete the original dependence relation.
2846
28472009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2848
2849 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2850 the computation of symmetric data dependence relations.
2851 (dependency_between_pbbs_p): Same.
2852
0d6b5db2 28532009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2854
2855 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2856 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2857 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2858 (free_poly_ddr): New.
2859 (pddr_is_empty): New.
2860 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2861 (dependence_polyhedron): Same. Remove useless gcc_assert.
2862 Remove fprintfs.
2863 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2864 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2865 * graphite-dependences.h (enum poly_dependence_kind): New.
2866 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2867 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2868 (PDRP_SINK): Renamed PDDR_SINK.
2869 (PDRP_DDP): Renamed PDDR_DDP.
2870 (PDDR_KIND): New.
2871 (free_poly_ddr): Declared.
2872 * graphite-poly.c (new_scop): Use the new hash function names.
2873 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2874 into original_pddrs.
2875 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2876
28772009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2878
2879 * Merge from mainline (150764:150992).
2880
02df46c6 28812009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2882
2883 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2884 bounds with LT_EXPR to make niter analysis more precise on code
2885 generated by Graphite.
2886
70a1a7a2 28872009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2888
2889 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2890 (graphite_legal_transform_bb): Same.
2891 (poly_drs_may_alias_p): Same.
2892
19eec579 28932009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2894
2895 PR middle-end/40981
2896 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2897 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2898
28992009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2900
2901 * graphite-poly.c (print_pbb): Print PBB index.
2902
29032009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2904
2905 * Merge from mainline (r150672:150764).
2906
29072009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2908
2909 * graphite-interchange.c (ppl_max_for_le): Moved...
2910 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2911 * graphite-ppl.c (ppl_max_for_le): ... here.
2912 * graphite-ppl.h (ppl_max_for_le): Declared.
2913
29142009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2915
2916 * Merge from mainline (r150372:150672).
2917
43f8b6ab 29182009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2919
2920 PR middle-end/40980
2921 * sese.c (convert_for_phi_arg): New.
2922 (add_guard_exit_phis): Use convert_for_phi_arg.
2923
6c9df8cb 2924 * gfortran.dg/graphite/id-17.f: New.
43f8b6ab 2925
96da1999 29262009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2927
2928 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2929 unknown subscript upper bounds.
2930
6c9df8cb 2931 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
96da1999 2932
80020e9d 29332009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2934 Pranav Garg <pranav.garg2107@gmail.com>
2935
2936 * graphite-interchange.c (gather_access_strides): Removed.
2937 (ppl_max_for_le): New.
2938 (build_linearized_memory_access): New.
2939 (memory_stride_in_loop): New.
2940 (pbb_interchange_profitable_p): Reimplemented.
2941 * graphite-ppl.h (ppl_new_id_map): New.
2942 (ppl_interchange): New.
2943
6c9df8cb 2944 * gcc.dg/graphite/interchange-6.c: XFAILed.
80020e9d 2945
c9fce634 29462009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2947
2948 * graphite-interchange.c (compute_subscript): Removed.
2949 (compute_array_size_cstr): Removed.
2950 (compute_array_size_poly): Removed.
2951 (compute_array_size): Removed.
2952 (gather_access_strides_poly): Removed.
2953 (gather_access_strides): Empty.
2954
85f74b79 29552009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2956
2957 * graphite-dependences.c (dependence_polyhedron_1): Replace
2958 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2959 (graphite_legal_transform_dr): Same.
2960 (graphite_carried_dependence_level_k): Same.
2961 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2962 Initialize PDR_NB_SUBSCRIPTS.
2963 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2964 PDR_NB_SUBSCRIPTS.
2965 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2966 (PDR_NB_SUBSCRIPTS): New.
2967 (pdr_nb_subscripts): Removed.
2968 (pdr_dim): Simplified.
2969 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2970 with PDR_NB_SUBSCRIPTS.
2971
19b42529 29722009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2973
2974 * graphite-interchange.c (compute_array_size): Remove use of
2975 PDR_DATA_CONTAINER.
2976 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2977 Do not initialize PDR_DATA_CONTAINER.
2978 (print_pdr): Do not print PDR_DATA_CONTAINER.
2979 * graphite-poly.h (struct poly_dr): Remove data_container field.
2980 (PDR_DATA_CONTAINER): Removed.
2981 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2982 PDR_DATA_CONTAINER.
2983 (build_poly_dr): Same.
2984
9daa8810 29852009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2986
6c9df8cb 2987 * gcc.dg/graphite/interchange-9.c: New.
9daa8810 2988
0835eab6 29892009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2990 Sebastian Pop <sebastian.pop@amd.com>
2991
2992 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2993 copy of the dependence polyhedron. Free the temporary objects.
2994 (graphite_carried_dependence_level_k): Free unused objects before
2995 returning.
2996
6c9df8cb 2997 * gcc.dg/graphite/interchange-1.c: XFAILed.
2998 * gcc.dg/graphite/interchange-2.c: XFAILed.
2999 * gcc.dg/graphite/interchange-3.c: XFAILed.
3000 * gcc.dg/graphite/interchange-4.c: XFAILed.
3001 * gcc.dg/graphite/interchange-7.c: XFAILed.
0835eab6 3002
a741358d 30032009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3004
3005 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3006 Early return without analyzing the data dependences if no
3007 transform has been done. Call restore_scattering if the transform
3008 is not legal.
3009 (graphite-interchange.c): Same.
3010 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3011 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3012 (apply_poly_transforms): Do not gcc_assert that
3013 the transform is legal.
3014 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3015 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3016 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3017 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3018 * graphite-poly.h (struct poly_scattering): New.
3019 (struct poly_bb): Add original, transformed, and saved fields.
3020 Remove transformed_scattering, original_scattering, nb_local_variables,
3021 and nb_scattering_transform fields.
3022 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3023 (poly_scattering_new): New.
3024 (poly_scattering_free): New.
3025 (poly_scattering_copy): New.
3026 (store_scattering_pbb): New.
3027 (store_scattering): New.
3028 (restore_scattering_pbb): New.
3029 (restore_scattering): New.
3030 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3031 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
9daa8810 3032
95b2e0d3 30332009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3034
3035 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3036 (print_scop): Same.
3037
675d86b2 30382009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3039
3040 * Makefile.in (graphite.o): Depends on PREDICT_H.
3041 * graphite.c: Include predict.h.
3042 (graphite_finalize): Call tree_estimate_probability.
3043 * predict.c (predict_loops): Do not call scev_initialize and
3044 scev_finalize.
3045 (tree_estimate_probability_bb): New.
3046 (tree_estimate_probability): Do not initialize loops: move that
3047 code to the driver. Call tree_estimate_probability_bb.
3048 (tree_estimate_probability_driver): New.
3049 (pass_profile): Use tree_estimate_probability_driver.
3050 * predict.h (tree_estimate_probability): Declared.
3051
525c22c4 30522009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3053
3054 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3055 * graphite-dependences.c (graphite_legal_transform): Add time to
3056 TV_GRAPHITE_DATA_DEPS.
3057 (dependency_between_pbbs_p): Same.
3058 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3059
30602009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3061
3062 * Merge from mainline (r149952:150372).
3063
c6bb733d 30642009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3065
3066 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3067 * graphite-blocking.c: Same.
3068 * graphite-clast-to-gimple.c: Same.
3069 * graphite-dependences.c: Same.
3070 * graphite-poly.c: Same.
3071 * graphite-poly.h: Same.
3072 * graphite-ppl.c: Same.
3073 * graphite-scop-detection.c: Same.
3074 * graphite-sese-to-poly.c: Same.
3075 * graphite.c: Same.
3076
30772009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3078
3079 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3080 (remove_simple_copy_phi): New.
3081 (remove_invariant_phi): New.
3082 (simple_copy_phi_p): New.
3083 (reduction_phi_p): New.
3084 (gsi_for_ssa_name_def): New.
3085 (insert_out_of_ssa_copy): New.
3086 (insert_out_of_ssa_copy_on_edge): New.
3087 (create_zero_dim_array): New.
3088 (scalar_close_phi_node_p): New.
3089 (rewrite_close_phi_out_of_ssa): New.
3090 (rewrite_phi_out_of_ssa): New.
3091 (rewrite_reductions_out_of_ssa): New.
3092 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3093
6c9df8cb 3094 * gcc.dg/graphite/id-11.c: New.
3095 * gcc.dg/graphite/id-15.c: New.
3096 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3097 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3098 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3099 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3100 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3101 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3102 * gfortran.dg/graphite/id-13.f: New.
3103 * gfortran.dg/graphite/id-5.f: New.
c6bb733d 3104
31052009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3106
3107 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3108 check that nb_reductions_in_loop is zero.
3109 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3110 reduction phi nodes.
3111 (nb_reductions_in_loop): Removed.
3112 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3113 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3114 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3115 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3116 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3117
31182009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3119
3120 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3121 statements that have an empty iteration domain.
6c9df8cb 3122 * gfortran.dg/graphite/id-16.f: New.
c6bb733d 3123
31242009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3125
3126 * tree-scalar-evolution.c (instantiate_scev_1): Return
3127 chrec_dont_know when the result is not above instantiate_below.
3128 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3129 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3130 the tree has a known scalar evolution.
6c9df8cb 3131 * gfortran.dg/graphite/id-14.f: New.
3132 * gfortran.dg/graphite/id-15.f: New.
c6bb733d 3133
31342009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3135
3136 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3137 insert_gsi.
3138 (rename_variables): Keep inserting renames after the ones already
3139 inserted.
3140
31412009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3142
3143 * graphite-sese-to-poly.c (compare_bb_depths): New.
3144 (graphite_sort_dominated_info): New.
3145 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3146 (build_scop_scattering): Fix comment.
3147
31482009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3149
3150 * graphite.c (graphite_finalize): Call print_loops instead of
3151 dump_function_to_file.
6c9df8cb 3152 * gcc.dg/graphite/graphite.exp: Fix formatting.
3153 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
c6bb733d 3154 loops generated in the graphite output file.
6c9df8cb 3155 * gcc.dg/graphite/pr35356-2.c: New.
3156 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3157 * gfortran.dg/graphite/id-12.f: New.
c6bb733d 3158
31592009-07-24 Li Feng <nemokingdom@gmail.com>
3160
6c9df8cb 3161 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
c6bb733d 3162 Remove 2 XFAIL.
3163
31642009-07-24 Li Feng <nemokingdom@gmail.com>
3165 Tobias Grosser <grosser@fim.uni-passau.de>
3166
3167 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3168 alias set number build alias in ACCESSES polyhedron.
3169 (build_alias_set_for_drs): New.
3170 (build_pbb_drs): Added build_alias_set_for_drs.
3171 * graphite-dependences.c (poly_drs_may_alias_p): New.
3172 (graphite_carried_dependence_level_k): Check alias information
3173 before building polyhedron.
3174
31752009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3176
3177 * Makefile.in (lambda-code.o): Fix formatting.
3178
31792009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3180
3181 * Merge from mainline (r149350-149952)
3182
31832009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3184
3185 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3186 before interchange to prepare for loop blocking.
3187
31882009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3189
3190 * graphite-poly.c (apply_poly_transforms): Add checks after every
3191 transformation.
3192 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3193 done in apply_poly_transforms.
3194
31952009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3196
3197 * graphite-dependences.c (build_lexicographically_gt_constraint):
3198 Replace RES parameter with *RES.
3199 (dependence_polyhedron_1): Pass an address of the parameter RES
3200 instead of value of RES.
3201
32022009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3203
3204 * graphite.c (graphite_finalize): Fix comment.
3205 (graphite_transform_loops): Reset scev info after code generation
3206 of each scop.
3207
32082009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3209
3210 * graphite.c (graphite_finalize): Call scev_reset.
3211
32122009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3213
3214 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3215 GBB_CLOOG_IV_TYPES hash table twice.
3216 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3217 (add_condition_to_domain): Clear GMP values.
3218
32192009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3220
3221 * graphite-dependences.c: Fix formatting.
3222 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3223 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3224 * graphite-sese-to-poly.c: Fix formatting.
3225 * graphite.c (graphite_transform_loops): Create the hash table
3226 after the early return.
3227
32282009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3229
6c9df8cb 3230 * gcc.dg/graphite/id-14.c: New.
3231 * gcc.dg/graphite/pr40157.c: New.
3232 * gfortran.dg/graphite/id-11.f: New.
c6bb733d 3233
32342009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3235
3236 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3237 (build_poly_scop): Return false when there are no pbbs within
3238 loops to avoid to pass to cloog scops with no loops.
3239
32402009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3241
3242 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3243 useless test "i % 2".
3244 (build_pbb_scattering_polyhedrons): Fix formatting.
3245 (build_poly_dr): Same.
3246 * graphite.c (graphite_transform_loops): Restructure.
3247
32482009-07-14 Razya Ladelsky <razya@il.ibm.com>
3249
3250 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3251 reduction_list parameter.
3252 (rewrite_all_phi_nodes_with_iv): Same.
3253 (canonicalize_loop_ivs): Same.
3254 * tree-parloops.c (struct brli): Removed.
3255 (build_reduction_list_info): Removed.
3256 (build_new_reduction): New.
3257 (analyze_reduction_list): Removed.
3258 (gather_scalar_reductions): Find reductions instead of phi
3259 nodes that can't be canonicalized.
3260 (try_create_reduction_list): Remove reduction_list parameter.
3261 (gen_parallel_loop): Same.
3262 (parallelize_loops): Remove analyze_reductions variable,
3263 initialization and free.
3264 Change reduction_list htab initialization to reduction_info
3265 elements instead of ssa names.
3266 Call try_create_reduction_list and gen_parallel_loop without
3267 analyzed_reduction argument.
3268 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3269 canonicalize_loop_ivs with one less argument.
3270 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3271
32722009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3273
3274 * graphite-dependences.c (new_poly_dr_pair): New.
3275 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3276 (new_poly_dr_pair): New.
3277 (eq_poly_dr_pair_p): New.
3278 (hash_poly_dr_pair_p): New.
3279 * graphite-dependences.h (struct poly_dr_pair): New.
3280 (eq_poly_dr_pair_p): Declared.
3281 (hash_poly_dr_pair_p): Declared.
3282 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3283 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3284 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3285 * Makefile.in (graphite-poly.o): Add dependence on
3286 graphite-dependences.h.
3287
32882009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3289
3290 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3291 polynomials of degree > 1 pass to Graphite.
3292 * tree-chrec.c (scev_is_linear_expression): Call
3293 evolution_function_is_affine_multivariate_p.
6c9df8cb 3294 * gfortran.dg/graphite/id-10.f90: New.
c6bb733d 3295
32962009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3297
3298 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3299 Instantiate scevs varying in outer loops.
6c9df8cb 3300 * gfortran.dg/graphite/id-9.f: Correct testcase.
c6bb733d 3301
33022009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3303
3304 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3305 redundant constraint.
3306
33072009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3308
6c9df8cb 3309 * gcc.dg/graphite/graphite.exp: Fix comments.
3310 * gfortran.dg/graphite/graphite.exp: Trigger actions
c6bb733d 3311 based on the file names as in the C testsuite.
6c9df8cb 3312 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3313 * gfortran.dg/graphite/block-2.f: Same.
3314 * gfortran.dg/graphite/block-3.f90: Same.
3315 * gfortran.dg/graphite/block-4.f90: Same.
3316 * gfortran.dg/graphite/id-1.f90: Same.
3317 * gfortran.dg/graphite/id-2.f90: Same.
3318 * gfortran.dg/graphite/id-3.f90: Same.
3319 * gfortran.dg/graphite/id-4.f90: Same.
3320 * gfortran.dg/graphite/id-6.f: Same.
3321 * gfortran.dg/graphite/id-9.f: Same.
3322 * gfortran.dg/graphite/interchange-1.f: Same.
3323 * gfortran.dg/graphite/interchange-2.f: Same.
3324 * gfortran.dg/graphite/scop-1.f: Same.
c6bb733d 3325
33262009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3327
3328 * sese.c (expand_scalar_variables_call): New.
3329 (expand_scalar_variables_ssa_name): Handle calls in expander.
3330
33312009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3332
6c9df8cb 3333 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
c6bb733d 3334 Expect to see the pattern twice.
6c9df8cb 3335 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3336 * gcc.dg/graphite/interchange-5.c: Same.
3337 * gcc.dg/graphite/interchange-6.c: Same.
c6bb733d 3338
33392009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3340
6c9df8cb 3341 * gcc.dg/graphite/id-10.c: New.
3342 * gcc.dg/graphite/id-12.c: New.
3343 * gfortran.dg/graphite/id-7.f: New.
3344 * gfortran.dg/graphite/id-8.f: New.
c6bb733d 3345
33462009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3347
3348 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3349 zero.
3350
33512009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3352
3353 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3354
33552009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3356
3357 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3358
33592009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3360
3361 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3362 building PDR subscripts.
3363
33642009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3365
3366 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3367 computation of array sizes.
3368
33692009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3370
3371 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3372
33732009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3374
3375 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3376 build_pairwise_constraint, dr_equality_constraints,
3377 build_pairwise_scheduling_equality,
3378 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3379 build_lexicographically_gt_constraint, dependence_polyhedron,
3380 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3381 Move from NNC_Polyhedron to C_Polyhedron.
3382 * graphite-interchange.c (compute_array_size_poly,
3383 gather_access_strides): Dito.
3384 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3385 free_scop, pbb_number_of_iterations): Dito.
3386 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3387 pbb_dim_iter_domain, struct scop): Dito.
3388 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3389 new_Cloog_Domain_from_ppl_Polyhedron,
3390 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3391 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3392 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3393 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3394 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3395 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3396 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3397 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3398 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3399 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3400 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3401 build_scop_iteration_domain, build_poly_dr): Dito
3402
34032009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3404
6c9df8cb 3405 * gcc.dg/graphite/graphite.exp: Added a rule to execute
c6bb733d 3406 run-id-*.c files.
6c9df8cb 3407 * gcc.dg/graphite/run-id-1.c: New.
c6bb733d 3408
34092009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3410
3411 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3412 positivity constraint on the symbolic number of iterations.
3413
34142009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3415
3416 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3417
34182009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3419 Tobias Grosser <grosser@fim.uni-passau.de>
3420
3421 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3422 (build_cloog_prog): Directly use SCOP_CONTEXT.
3423 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3424 (free_scop): Free SCOP_CONTEXT.
3425 (print_scop_context): New.
3426 (print_scop): Call print_scop_context.
3427 (debug_scop_context): New.
3428 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3429 (struct scop): Added field context.
3430 (SCOP_CONTEXT): New.
3431 * graphite-sese-to-poly.c (add_param_constraints): New.
3432 (build_scop_context): New.
3433 (build_poly_scop): Call build_scop_context.
3434
34352009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3436
3437 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3438 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3439 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3440 * graphite-ppl.h: Include double-int.h and tree.h.
3441 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3442 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3443 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3444 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3445
34462009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3447
3448 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3449 POINTER_PLUS_EXPR for pointer types.
3450 (clast_to_gcc_expression): Same.
3451
34522009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3453
3454 * graphite-poly.c (print_scattering_function): Early return when
3455 PBB_TRANSFORMED_SCATTERING is not initialized.
3456 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3457
34582009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3459
3460 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3461 to fix bootstrap.
3462
34632009-07-08 Razya Ladelsky <razya@il.ibm.com>
3464
3465 * tree-parloops.c (analyze_reduction_list): Change return
3466 value to void.
3467 (try_create_reduction_list): Move the call to
3468 analyze_reduction_list to the beginining.
3469 Call reduction_phi with analyzed_reductions as argument
3470 instead of reduction_list.
3471
34722009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3473
3474 * Merge from mainline (r148296:149346)
3475
34762009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3477
3478 * graphite-scop-detection.c (graphite_can_represent_init): New.
3479 (graphite_can_represent_scev): Call graphite_can_represent_init:
3480 check that the initial value does not contain multiplications of
3481 parameters.
3482 (stmt_has_simple_data_refs_p): New.
3483 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3484 (is_simple_operand): Fix formatting.
3485 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3486
34872009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3488
6c9df8cb 3489 * gcc.dg/graphite/id-13.c: New.
c6bb733d 3490 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3491 analyze_scalar_evolution, use scalar_evolution_in_region.
3492 (scan_tree_for_params_right_scev): Add extra assert.
3493 (parameter_index_in_region_1): Split from parameter_index_in_region.
3494 (idx_record_params): Use scalar_evolution_in_region.
3495 (find_params_in_bb): Same.
3496 (find_scop_parameters): Same.
3497 (build_loop_iteration_domains): Same.
3498 (create_linear_expr_from_tree): Same.
3499 * sese.c (scalar_evolution_in_region): New.
3500 * sese.h (scalar_evolution_in_region): Declared.
3501 (defined_in_sese_p): New.
3502 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3503 static anymore.
3504 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3505 Declared.
3506
35072009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3508
3509 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3510 TREE_DATA_REF_H also implies SCEV_H.
3511
35122009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3513
3514 * graphite-poly.c (print_scop_params): New.
3515 (print_scop): Call print_scop_params.
3516 (debug_scop_params): New.
3517 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3518
35192009-07-07 Li Feng <nemokingdom@gmail.com>
3520
6c9df8cb 3521 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3522 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3523 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3524 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3525 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3526 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
c6bb733d 3527
35282009-07-07 Li Feng <nemokingdom@gmail.com>
3529
3530 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3531 for dependency checking part.
6c9df8cb 3532 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
c6bb733d 3533 tests for dependency checking.
6c9df8cb 3534 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3535 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3536 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
c6bb733d 3537 flag -fdump-tree-graphite-all for autopar testsuites.
3538
35392009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3540
3541 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3542 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3543 canonicalize_loop_ivs): Moved...
3544 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3545
35462009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3547
3548 * tree-parloops.c (try_create_reduction_list): Pass an extra
3549 argument analyzed_reductions. Call analyze_reduction_list.
3550 (gen_parallel_loop): Do not call analyze_reduction_list.
3551 (parallelize_loops): Init and finalize analyzed_reductions.
3552
35532009-07-06 Li Feng <nemokingdom@gmail.com>
3554
6c9df8cb 3555 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
c6bb733d 3556 Added flag -fno-loop-strip-mine for autopar testcase.
3557
35582009-07-04 Li Feng <nemokingdom@gmail.com>
3559
3560 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3561 transformed scattering dimension instead of unmatch orignal when
3562 calling dependence_polyhedron.
3563
35642009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3565
3566 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3567
35682009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3569
3570 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3571 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3572
35732009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3574
3575 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3576 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3577 * graphite-poly.c (pbb_number_of_iterations): New.
3578 * graphite-poly.h (pbb_number_of_iterations): Declared.
3579 (pbb_iterator_dim, pbb_parameter_dim): New.
3580
35812009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3582
3583 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3584 last commit on type of lower and upper bound of loops.
3585
35862009-06-29 Li Feng <nemokingdom@gmail.com>
3587
3588 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3589 graphite-dependences.h.
3590 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3591 (mark_bb_with_pbb): New.
3592 (get_stmtfor_depth): New.
3593 (find_pbb_via_hash): New.
3594 (dependency_in_loop_p): New.
3595 (mark_loops_parallel): New.
3596 (free_aux_in_new_loops): New.
3597 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3598 bb with it's relevant pbb. Mark newly created loops. Remove mark
3599 innermost loop parallel without checking.
3600 (gloog): Add parameter BB_PBB_MAPPING.
3601 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3602 (gloog): Change declaration.
3603 (mark_loop_parallel): Make extern.
3604 (free_aux_in_new_loops): Declare.
3605 (bb_pbb_map_hash): New.
3606 (eq_bb_pbb_map): New.
3607 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3608 auto parallelization when flag_graphite_force_parallel is set.
3609 (graphite_finalize): Added free_aux_in_new_loops.
3610 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3611 the innermost loop that marked parallel. Use
3612 flag_graphite_force_parallel instead of loop->can_be_parallel.
3613 (loop_parallel_p): Move inner most checking out of function.
3614
36152009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3616
3617 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3618 type of lower and upper bound of loops signed long int.
3619
36202009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3621
3622 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3623 expression outside the loop.
3624
36252009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3626
3627 * gcc.dg/graphite/interchange-8.c: New.
3628
36292009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3630
3631 * gcc.dg/graphite/interchange-0.c: XFailed.
3632 * gcc.dg/graphite/interchange-5.c: XFailed.
3633 * gcc.dg/graphite/interchange-6.c: XFailed.
3634
36352009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3636
3637 * graphite-interchange.c (compute_array_size_poly): The end of the
3638 recursion should return 1.
3639
36402009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3641
3642 * graphite-interchange.c (compute_array_size_cstr): Allow the
3643 subscript multiplier to be -1.
3644 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3645 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3646 data_container. Initializes PDR_DATA_CONTAINER.
3647 (print_pdr_access_layout): New.
3648 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3649 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3650 data_container.
3651 (PDR_DATA_CONTAINER): New.
3652 (new_poly_dr): Update declaration.
3653 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3654 (build_poly_dr): Call pdr_add_data_dimensions.
3655
36562009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3657
3658 * graphite-poly.h (struct poly_dr): Fix comment.
3659 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3660 (pdr_add_memory_accesses): New.
3661 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3662
36632009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3664
3665 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3666 (print_pbb): Add call to print_pdrs.
3667 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3668
36692009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3670 Li Feng <nemokingdom@gmail.com>
3671
3672 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3673 (dependency_between_pbbs_p): New.
3674 (lexicographically_gt_p): Assure !empty_p before polyhedron
3675 intersection assign.
3676 (build_lexicographically_gt_constraint): Correct lexicographically
3677 judging.
3678 * graphite-dependences.h: New.
3679 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3680
36812009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3682
3683 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3684 (gloog): Print to dump_file the generated clast.
3685 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3686 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3687
36882009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3689
3690 * graphite-poly.c (extend_scattering): Increment
3691 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3692
36932009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3694
3695 * graphite-interchange.c (compute_array_size_poly): Added exit of
3696 recursion condition. Continue iterating even after the first equality.
3697 (compute_array_size): Same.
3698
36992009-06-24 Li Feng <nemokingdom@gmail.com>
3700
6c9df8cb 3701 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
c6bb733d 3702 -fdump-tree-final_cleanup to -fdump-tree-optimized.
6c9df8cb 3703 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3704 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3705 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
c6bb733d 3706
37072009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3708
3709 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3710 only when the use verifies is_gimple_reg.
3711
37122009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3713
3714 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3715 Allocate scaldims after call to unify_scattering_dimensions.
3716
37172009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3718
3719 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3720
37212009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3722 Albert Cohen <albert.cohen@inria.fr>
3723
3724 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3725 variables for the strip mining.
3726
37272009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3728 Pranav Garg <pranav.garg2107@gmail.com>
3729
3730 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3731 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3732 (graphite-blocking.o): New rule.
3733 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3734 * graphite-blocking.c: New.
3735 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3736 flag_loop_strip_mine.
3737 (psct_scattering_dim_for_loop_depth): New.
3738 * graphite-poly.h (scop_do_strip_mine): Declared.
3739 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3740 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3741 flag_loop_strip_mine.
3742
37432009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3744
3745 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3746 a GMP value and a PPL coefficient at each iteration of a loop.
3747
37482009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3749
3750 * graphite-dependences.c (dependence_polyhedron): Do not use
3751 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3752 pbb_nb_scattering_transform.
3753 (graphite_legal_transform_dr): Same.
3754 * graphite-poly.c (extend_scattering): Same.
3755 (unify_scattering_dimensions): Same.
3756 (print_scattering_function): Same.
3757 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3758 PBB_NB_LOCAL_VARIABLES.
3759 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3760 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3761 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3762 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3763 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3764 (pbb_nb_scattering_transform): New.
3765 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3766 (psco_scattering_dim): Add assert on parameters.
3767 (psct_scattering_dim): Same.
3768 (psct_scattering_dim_for_loop_depth): Declared.
3769 (psct_local_var_dim): New.
3770 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3771 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3772 correct layout, call pbb_nb_local_vars.
3773 (psct_add_local_variable, psct_add_scattering_dimension): New.
3774 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3775 Initialize PBB_NB_SCATTERING_TRANSFORM.
3776
37772009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3778
3779 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3780 (set_coef): Renamed ppl_set_coef.
3781 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3782
37832009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3784
3785 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3786 test a boolean against 1.
3787 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3788 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3789 (pbb_do_interchange): Returns true when a transform has been performed.
3790 (scop_do_interchange): Same.
3791 * graphite-poly.c (apply_poly_transforms): Use the return value of
3792 scop_do_interchange.
3793 * graphite-poly.h (scop_do_interchange): Update declaration.
3794
37952009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3796
3797 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3798 after last use.
3799 * sese.c (sese_reset_aux_in_loops): New.
3800 * sese.h (sese_reset_aux_in_loops): New.
3801
38022009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3803
3804 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3805 multiplier and multiply the constant by the multiplier.
3806 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3807 (build_poly_dr): Do not use the multiplier to define the subscript.
3808
38092009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3810
3811 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3812 compiler's data reference. Initialize PDR_CDR.
3813 (print_pdr): Call dump_data_reference.
3814 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3815 Add compiler_dr field.
3816 (PDR_BB): Renamed PDR_PBB.
3817 (PDR_CDR): New.
3818 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3819 GCC's data reference representation.
3820 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3821 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3822
38232009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3824
3825 * graphite-poly.c (print_scattering_function): Also print the layout.
3826 * graphite-poly.h (pbb_nb_local_vars): New.
3827
38282009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3829
3830 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3831
38322009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3833
3834 * graphite-poly.c (print_pdr, debug_pdr): New.
3835 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3836 (PDR_BASE): Removed.
3837
38382009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3839
6c9df8cb 3840 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
c6bb733d 3841 ltrans-{1..6,8}.c.
3842
38432009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3844
3845 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3846 subscript identification column.
3847 (pbb_do_interchange): Print to dump_file that some loops "will be
3848 interchanged". Rely on that chain of characters in the testcases.
3849 * gcc.dg/graphite/interchange-0.c: New.
3850 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3851 interchange-*.c files and compile them with -floop-interchange.
3852
38532009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3854
3855 * graphite-interchange.c (interchange_profitable_p): Renamed
3856 pbb_interchange_profitable_p.
3857
38582009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3859 Harsha Jagasia <harsha.jagasia@amd.com>
3860 Pranav Garg <pranav.garg2107@gmail.com>
3861
3862 * graphite-interchange.c (interchange_profitable_p): Make static.
3863 (pbb_interchange_loop_depths, pbb_do_interchange,
3864 scop_do_interchange): New.
3865 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3866 for flag_loop_interchange.
3867 * graphite-poly.h (scop_do_interchange): Declared.
3868 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3869 flag_loop_interchange is used.
3870
38712009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3872
3873 * graphite-dependences.c (dependence_polyhedron): Update use of
3874 pbb_nb_scattering_dims.
3875 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3876 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3877 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3878 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3879
38802009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3881
3882 * graphite.c: Cleanup foo.
3883
38842009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3885
3886 * Merge from mainline (r143684:148293).
3887 * Disabled libpcp until it gets fixed.
3888
38892009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3890 Harsha Jagasia <harsha.jagasia@amd.com>
3891
3892 * graphite-interchange.c: New.
3893 * Makefile.in (graphite-interchange.o): New.
3894 * graphite-poly.h (interchange_profitable_p): Declared.
3895 * graphite-ppl.h (value_max): New.
3896
38972009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3898
3899 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3900 * graphite-poly.h: Fix some comments.
3901 (pdr_dim): New.
3902 (pdr_scop): New.
3903
39042009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3905
3906 * graphite-poly.h
3907 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3908 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3909 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3910 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3911 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3912 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3913 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3914 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3915 * graphite-clast-to-gimple.c: Same.
3916 * graphite-dependences.c: Same.
3917 * graphite-poly.c: Same.
3918 * graphite-sese-to-poly.c: Same.
3919
39202009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3921
3922 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3923 expressions for an IV rename, as returned by clast_to_gcc_expression.
3924 (copy_renames): Rename new_name to expr.
3925 * sese.c (debug_rename_elt): Same.
3926 (get_rename): Same.
3927 (set_rename): Same.
3928 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3929 the information from the rename map.
3930 (rename_variables_in_stmt): Same.
3931 (add_loop_exit_phis): Rename new_name to expr.
3932 (insert_loop_close_phis): Same.
3933 (add_guard_exit_phis): Same. Call force_gimple_operand.
3934 * sese.h (struct rename_map_elt): Rename new_name to expr.
3935 (new_rename_map_elt): Same.
3936
39372009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3938
3939 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3940 * sese.c (set_rename): Make it extern.
3941 * sese.h (set_rename): Declared.
3942
39432009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3944
3945 * graphite-poly.c (extend_scattering): Free values.
3946 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3947 Free iterators.
3948 (ppl_print_powerset_matrix): Same.
3949 * graphite-scop-detection.c (free_scops_1): New.
3950 (limit_scops): Call free_scops_1.
3951 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3952 (build_poly_dr): Free PPL coefficients.
3953 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3954
39552009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3956
3957 * graphite-dependences.c: New.
3958 * graphite-data-ref.c: Removed.
3959 * graphite-data-ref.h: Removed.
3960 * Makefile.in (graphite-data-ref.o): Removed.
3961 (graphite-dependences.o): Added.
3962 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3963 * graphite-poly.c: Same.
3964 Move the data dependence testing to graphite-dependences.c.
3965
39662009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3967
3968 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3969 from graphite_cannot_represent_loop. Code refactored.
3970 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3971
39722009-05-17 Li Feng <nemokingdom@gmail.com>
3973
6c9df8cb 3974 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
c6bb733d 3975 Cover all the testcases (not only the filtered ones).
3976
39772009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3978
3979 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3980 unnecessary check. Update comments. Move check for REAL_TYPE here.
3981 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3982 done in (stmt_simple_for_scop_p).
3983
39842009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3985
3986 * graphite.c (print_global_statistics): New.
3987 (print_graphite_scop_statistic): New.
3988 (print_graphite_statistics): New.
3989 (graphite_initialize, graphite_transform_loops): Print statistics.
3990 * graphite-scop-detection (build_scops): Print statistics.
3991 (print_graphite_scop_statistics): New.
3992 (print_graphite_statistics): New.
3993
39942009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3995
3996 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3997 (debug_clast_name_index): Removed.
3998 (debug_clast_name_indexes_1): Removed.
3999 (debug_clast_name_indexes): Removed.
4000 (clast_name_index_elt_info): Removed.
4001 (eq_clast_name_indexes): Removed.
4002 (clast_name_to_index): Removed.
4003 (new_clast_name_index): Removed.
4004 (save_clast_name_index): Removed.
4005 (save_var_name): Moved...
4006 (init_sese_params_index): Removed.
4007 (clast_name_to_gcc): Remove use of name_tree.
4008 (initialize_cloog_names): Same.
4009 (gloog): Do not call init_sese_params_index.
4010 * graphite-sese-to-poly.c (save_var_name): ...here.
4011 (parameter_index_in_region): New.
4012 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4013 (parameter_index_in_region): Removed.
4014 (is_parameter): Remove use of name_tree.
4015 * sese.h (struct name_tree): Removed.
4016 (struct sese): Remove use of name_tree. New field params_names.
4017 (SESE_PARAMS_NAMES): New.
4018 (SESE_PARAMS): Remove duplicate.
4019 (parameter_index_in_region): Removed.
4020 (sese_nb_params): Remove use of name_tree.
4021 (struct clast_name_index): New.
4022 (new_clast_name_index): New.
4023 (clast_name_to_index): New.
4024 (save_clast_name_index): New.
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
40312009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4032
4033 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4034 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4035 (graphite_loop_normal_form): Do not pass region. Do not
4036 initialize SESE_OLDIVS.
4037 (build_graphite_loop_normal_form): Update call to
4038 graphite_loop_normal_form.
4039 * sese.c (debug_oldivs): Removed.
4040 (new_sese): Do not initialize SESE_OLDIVS.
4041 (free_sese): Do not free SESE_OLDIVS.
4042 (oldiv_for_loop): Removed.
4043 * sese.h (struct sese): Remove old_ivs.
4044 (SESE_OLDIVS): Removed.
4045 (oldiv_for_loop): Removed.
4046
40472009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4048
4049 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4050 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4051 replaced by a call to newivs_to_depth_to_newiv.
4052 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4053 (clast_to_gcc_expression_red): Same.
4054 (gcc_type_for_clast_expr): Same.
4055 (gcc_type_for_clast_eq): Same.
4056 (graphite_translate_clast_equation): Same.
4057 (graphite_create_guard_cond_expr): Same.
4058 (graphite_create_new_guard): Same.
4059 (graphite_create_new_loop): Same.
4060 (build_iv_mapping): Same.
4061 (translate_clast): Same.
4062 (gloog): Same.
4063 (loop_iv_stack_patch_for_consts): Removed. *
4064 sese.c (iv_stack_entry_is_constant): Removed.
4065 (iv_stack_entry_is_iv): Removed.
4066 (loop_iv_stack_push_iv): Removed.
4067 (loop_iv_stack_insert_constant): Removed.
4068 (loop_iv_stack_pop): Removed.
4069 (loop_iv_stack_get_iv): Removed.
4070 (loop_iv_stack_get_iv_from_name): Removed.
4071 (debug_loop_iv_stack): Removed.
4072 (free_loop_iv_stack): Removed.
4073 (loop_iv_stack_remove_constants): Removed. *
4074 sese.h (iv_stack_entry_kind): Removed.
4075 (iv_stack_entry_data_union): Removed.
4076 (iv_stack_entry_struct): Removed.
4077 (iv_stack_entry_p): Removed.
4078 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4079 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4080 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4081 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4082 (gbb_loop_at_index): Fix indenting.
4083 (gbb_loop_index): Removed.
4084
40852009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4086
4087 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4088 Call clast_name_to_index.
4089
40902009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4091
4092 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4093 do not pass params. Get params from SESE_PARAMS.
4094 (clast_to_gcc_expression): Same.
4095 (clast_to_gcc_expression_red): Same.
4096 (gcc_type_for_clast_eq): Same.
4097 (graphite_translate_clast_equation): Same.
4098 (graphite_create_new_loop): Same.
4099 * sese.c (rename_variables_in_stmt): Fix comment.
4100
41012009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4102
4103 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4104 newivs_index.
4105 Call save_clast_name_index.
4106 (translate_clast): Pass newivs_index.
4107 (gloog): Create and free newivs_index.
4108
41092009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4110
4111 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4112 (clast_name_index_p): New type.
4113 (debug_clast_name_index): New.
4114 (debug_clast_name_indexes_1): New.
4115 (debug_clast_name_indexes): New.
4116 (clast_name_index_elt_info): New.
4117 (eq_clast_name_indexes): New.
4118 (clast_name_to_index): New.
4119 (new_clast_name_index): New.
4120 (save_clast_name_index): New.
4121 (init_sese_params_index): New.
4122 (gloog): Call init_sese_params_index.
4123 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4124 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4125 (free_sese): Free SESE_PARAMS_INDEX.
4126 * sese.h (struct sese): Add params_index.
4127 (SESE_PARAMS_INDEX): New.
4128
41292009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4130
4131 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4132 (graphite_create_new_loop): Pass the newivs vector. Push the
4133 newly created IV to newivs.
4134 (translate_clast): Pass the newivs vector.
4135 (gloog): Create and destroy the newivs vector.
4136
41372009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4138
4139 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4140 (graphite_loop_normal_form): Initialize loop->aux with the unique
4141 IV that has been created.
4142
41432009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4144
4145 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4146 scev with parameters in the base part. They where forbidden
4147 exidently.
4148
41492009-05-11 Li Feng <nemokingdom@gmail.com>
4150
6c9df8cb 4151 * gcc.dg/graphite/graphite.exp: Set different default
c6bb733d 4152 compile options by file names.
6c9df8cb 4153 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4154 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4155 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4156 * gcc.dg/graphite/scop-matmult.c: Ditto.
c6bb733d 4157
41582009-05-08 Li Feng <nemokingdom@gmail.com>
4159
6c9df8cb 4160 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4161 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4162 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4163 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
c6bb733d 4164
41652009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4166
4167 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4168 by final cleanup.
4169
41702009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4171
4172 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4173 allow integer constant strides.
4174 (graphite_can_represent_expr): Depend on outermost_loop.
4175 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4176 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4177 build_scops_1): Same.
4178 (scopdet_basic_block_info): Same and insert layered SCoP
4179 detection.
4180 (try_generate_gimple_bb): Cleanup.
4181 (build_scops): Enable data references.
4182
6c9df8cb 4183 * gcc.dg/graphite/id-5.c: New.
4184 * gcc.dg/graphite/id-9.c: New.
c6bb733d 4185 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4186 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4187
41882009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4189
4190 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4191 that we have not yet built for this SCoP.
4192
41932009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4194
4195 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4196 for complex numbers.
4197
41982009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4199
4200 * graphite-ppl.c: Fix build if cloog is not available.
4201
42022009-05-04 Li Feng <nemokingdom@gmail.com>
4203
4204 * tree-parloops.c (loop_parallel_p): Remove construction of
4205 NITER and REDUCTION_LIST.
4206 (try_get_loop_niter): New.
4207 (try_create_reduction_list): New.
4208 (parallelize_loops): Bypass the failed checkings in autopar
4209 when can_be_parallel in loop structure is set to true.
4210
42112009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4212
6c9df8cb 4213 * gcc.dg/graphite/id-6.c: Update testcase.
4214 * gcc.dg/graphite/scop-3.c: Dito.
c6bb733d 4215
42162009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4217
4218 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4219 Enable EQ_EXPR and NE_EXPR again.
4220
42212009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4222
4223 * graphite-scop-detection.c (graphite_can_represent_scev):
4224 Add check if scev is affine multivariate.
4225 (harmful_stmt_in_bb): Check if we can represent the conditions.
4226 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4227 harmful_stmt_in_bb.
6c9df8cb 4228 * gcc.dg/graphite/id-7.c: New.
c6bb733d 4229
42302009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4231
4232 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4233 Check all bbs in region, not only the bbs that are represented in
4234 GRAPHITE.
4235 (build_poly_scop): Add newline.
6c9df8cb 4236 * gcc.dg/graphite/id-8.c: New.
c6bb733d 4237
42382009-04-30 Li Feng <nemokingdom@gmail.com>
4239
4240 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4241 when loop initialize.
4242 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4243 * common.opt: Declare flag_graphite_force_parallel.
4244 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4245 loop parallel.
4246 * graphite-poly.c (apply_poly_transforms): Introduce
4247 flag_graphite_force_parallel.
4248 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4249 * toplev.c (process_options): ditto and replace a not correctly
4250 encoded space.
4251
42522009-04-30 Li Feng <nemokingdom@gmail.com>
4253
4254 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4255 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4256 to the redefinition.
4257 (compute_cloog_iv_types_1): ditto.
4258 (build_iv_mapping): ditto.
4259 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4260 initialization.
4261 (free_gimple_bb): Removed GBB_LOOPS related free part.
4262 (build_bb_loops): Removed.
4263 * sese.h (struct gimple_bb): Removed loops.
4264 (GBB_LOOPS): Removed.
4265 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4266 (gbb_loop_index): ditto.
4267
42682009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4269
4270 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4271 allow non constant strides.
6c9df8cb 4272 * gcc.dg/graphite/scop-20.c: New.
c6bb733d 4273
42742009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4275
4276 * graphite-scop-detection.c (dot_all_scops): Fix system call
4277 return value warning.
4278 (dot_scop): Same.
4279
42802009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4281
6c9df8cb 4282 * gcc.dg/graphite/id-6.c: Fix pattern.
4283 * gcc.dg/graphite/scop-3.c: Same.
c6bb733d 4284
42852009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4286
4287 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4288 build_pairwise_constraint, dr_equality_constraints,
4289 build_pairwise_scheduling_equality,
4290 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4291 build_lexicographically_gt_constraint, dependence_polyhedron,
4292 graphite_legal_transform_dr, graphite_legal_transform_bb,
4293 graphite_legal_transform): New.
4294 * graphite-poly.h (graphite_legal_transform): Declared.
4295 * graphite-sese-to-poly.c (build_poly_scop): Call to
4296 graphite_legal_transform is disabled for the moment.
4297
42982009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4299
4300 * graphite-poly.h (pbb_nb_scattering_dims): New.
4301 (pbb_nb_scattering): Use it.
4302
43032009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4304
4305 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4306 Pointset_Powerset version of ppl_insert_dimensions.
4307 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4308
43092009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4310
4311 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4312
43132009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4314
4315 * graphite-poly.h: Fix comment.
4316
43172009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4318
4319 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4320
43212009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4322
4323 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4324 statements.
4325
43262009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4327
4328 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4329 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4330 conditions.
4331
43322009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4333
4334 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4335 handle EQ_EXPR and NE_EXPR.
4336
43372009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4338
4339 * graphite-poly.h (poly_dr): Fix comment.
4340
43412009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4342 Tobias Grosser <grosser@fim.uni-passau.de>
4343
4344 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4345 with a zero dimension polyhedron.
4346 (find_scop_parameters): Move the call to scop_set_nb_params here.
4347 (build_loop_iteration_domains): Store in loop->aux the iteration
4348 domain polyhedron.
4349 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4350 by any loop in scop.
4351 (build_poly_scop): Do not call scop_set_nb_params.
4352
43532009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4354 Tobias Grosser <grosser@fim.uni-passau.de>
4355
4356 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4357 add_condition_to_domain not GT_EXPR.
4358
43592009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4360
4361 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4362 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4363 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4364 upper_bound_assign to calculate unions.
6c9df8cb 4365 * gcc.dg/graphite/id-6.c: New.
c6bb733d 4366
43672009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4368
4369 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4370 handle abnormal edges.
4371
43722009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4373
4374 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4375 (free_poly_bb): Also free poly_drs.
4376 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4377 (poly_dr): Polyhedron to Pointset_Powerset.
4378 (pdr_accessp_nb_subscripts): Same.
4379 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4380 poly_drs.
4381
43822009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4383
4384 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4385 names into more meaningful names.
4386
43872009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4388
6c9df8cb 4389 * gfortran.dg/graphite/interchange-1.c: New.
4390 * gfortran.dg/graphite/interchange-2.c: New.
c6bb733d 4391
43922009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4393
4394 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4395 the reduction_list.
4396 * tree-parloops.c (rewrite_phi_with_iv): New.
4397 (rewrite_all_phi_nodes_with_iv): New.
4398 (canonicalize_loop_ivs): Call them.
4399
44002009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4401
4402 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4403 graphite_find_data_references_in_stmt.
4404 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4405 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4406
44072009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4408
4409 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4410
44112009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4412
4413 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4414 instead of bb_in_region.
4415 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4416 (build_sese_conditions): Use flag_bb_in_sese.
4417 * sese.c (register_bb_in_sese): Removed.
4418 (new_sese): Remove initialization of SESE_REGION_BBS.
4419 (free_sese): Do not free SESE_REGION_BBS.
4420 * sese.h (struct sese): Remove field region_basic_blocks.
4421 (SESE_REGION_BBS): Removed.
4422 (bb_in_sese_p): Implement in function of bb_in_region.
4423
44242009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4425
4426 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4427 loops.
4428
44292009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4430
4431 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4432 and EQ_EXPR.
4433 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4434 (add_condition_to_domain): New.
4435 (add_condition_to_pbb): New.
4436 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
6c9df8cb 4437 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
c6bb733d 4438
44392009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4440
4441 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4442 ppl_Pointset_Powerset.
4443 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4444 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4445 (pbb_nb_loops): Same.
4446 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4447 add_conditions_to_domain): Same.
4448 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4449 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4450 ppl_const_Polyhedron_t.
4451 (ppl_print_powerset_matrix): New.
4452 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4453 ppl_print_powerset_matrix): New.
4454 (ppl_print_polyhedron_matrix): Updated.
4455
44562009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4457
4458 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4459
44602009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4461
4462 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4463 (print_iteration_domains, debug_iteration_domain,
4464 debug_iteration_domains): New.
4465 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4466 debug_iteration_domains): Declared.
4467 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4468 indenting.
4469
44702009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4471 Sebastian Pop <sebastian.pop@amd.com>
4472
4473 * graphite-poly.h (print_iteration_domain): New.
4474 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4475 (build_sese_conditions_1, build_sese_conditions_after,
4476 build_sese_conditions_before): New.
4477 (build_sese_conditions): Rewritten.
4478
44792009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4480 Tobias Grosser <grosser@fim.uni-passau.de>
4481
4482 Cleanup of code generation liveouts.
4483 * graphite-clast-to-gimple.c (translate_clast): Use a single
4484 rename_map instead of one per translated statement.
4485 Do not use SESE_LIVEOUT_RENAMES.
4486 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4487 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4488 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4489 phi node of a reduction: when a loop contains a reduction used outside
4490 the loop, there should be a scalar close phi node on the exit block.
4491 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4492 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4493 (free_sese): Do not free them.
4494 (sese_build_liveouts_use): Do not use them.
4495 (sese_build_liveouts_bb): Same.
4496 (sese_build_liveouts): Same.
4497 (sese_insert_phis_for_liveouts): Same.
4498 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4499 (defined_in_loop_p): New.
4500 (alive_after_loop): New.
4501 (close_phi_not_yet_inserted_p): New.
4502 (struct alep, alep_p): New.
4503 (add_loop_exit_phis): Remove from the rename_map all the names defined
4504 in the code generated loop.
4505 (insert_loop_close_phis): Traverse the rename_map passed to it.
4506 Don't use SESE_LIVEOUT_RENAMES.
4507 (default_liveout_before_guard): Renamed default_before_guard.
4508 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4509 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4510 (register_sese_liveout_renames): Removed.
4511 (copy_bb_and_scalar_dependences): Do not call it.
4512 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4513 reduction_list.
4514 (SESE_LIVEOUT): Removed.
4515 (SESE_LIVEOUT_RENAMES): Removed.
4516 (SESE_REDUCTION_LIST): Removed.
4517 (sese_build_liveouts): Removed.
4518 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4519 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4520 (insert_guard_phis): Same.
4521 (rename_map_elt): Declare a VEC of them.
4522 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4523 trees not pointers to trees.
4524
4525 Rewrite in canonical close SSA form:
4526 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4527 (limit_scops): Close the scop after the block containing the close phi
4528 nodes.
4529 (canonicalize_loop_closed_ssa): New.
4530 (canonicalize_loop_closed_ssa_form): New.
4531 (build_scops): Call canonicalize_loop_closed_ssa_form.
4532
4533 * graphite-sese-to-poly.c: Fix typos.
4534
45352009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4536
4537 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4538 Extended.
4539 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4540 (print_pbb): Add conditions.
4541
45422009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4543 Sebastian Pop <sebastian.pop@amd.com>
4544
4545 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4546 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4547 (build_scop_bbs_1): New.
4548 (build_scop_bbs): Rewrite.
4549 * sese.h (bb_in_region): New.
4550
45512009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4552
4553 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4554 poly_drs vector.
4555 (print_scop): Style.
4556 * graphite-poly.h (poly_bb): Add drs vector.
4557 (PBB_DRS): Add accessor.
4558 * graphite-sese-to-poly.c (build_poly_dr): New.
4559 (build_pbb_drs, build_scop_drs): New.
4560 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4561
45622009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4563
4564 * tree-ssa-loop.c: Include forgotten toplev.h
4565
45662009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4567
4568 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
6c9df8cb 4569 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4570 * gcc.dg/graphite/pr37928.c: Same
4571 * gcc.dg/graphite/pr38409.c: Same
4572 * gcc.dg/graphite/pr38498.c: Same
4573 * gcc.dg/graphite/pr38559.c: Same
4574 * gcc.dg/graphite/pr39335.c: Same
4575 * gcc.dg/graphite/pr39335_1.c: Same
4576 * gfortran.dg/graphite/block-2.f: Same
c6bb733d 4577 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4578 with -floop-*.
4579
45802009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4581
4582 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4583 build_access_matrix, build_scop_data_accesses): Remove access function
4584 building. (We get a new version soon).
4585 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4586 * sese.h (nb_loops_around_loop_in_sese): Remove.
4587 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4588
45892009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4590 Sebastian Pop <sebastian.pop@amd.com>
4591
4592 * graphite-scop-detection.c (struct scopdet_info): Rename last
4593 field to exit.
4594 (scopdet_basic_block_info, build_scops_1): Don't use
4595 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4596
45972009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4598 Sebastian Pop <sebastian.pop@amd.com>
4599
4600 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4601 * sese.c (sese_build_liveouts_use): Renamed from
4602 sese_build_livein_liveouts_use. Remove liveins.
4603 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4604 Call sese_build_liveouts_use.
4605 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4606 Call sese_build_liveouts_bb.
4607 (new_sese, free_sese): Remove liveins.
4608 (sese_add_exit_phis_var): Deleted.
4609 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4610 directly.
4611 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4612
4613 * sese.h (sese): Remove num_ver and livein.
4614 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4615
46162009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4617
4618 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4619
46202009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4621
4622 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4623 (build_scop_scattering): Do not use compare_prefix_loops any more.
4624 (nb_common_loops): New.
4625
46262009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4627
4628 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4629 (register_old_and_new_names): Renamed set_rename.
4630
46312009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4632
4633 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4634 of the decl from the previous commit.
4635
46362009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4637
4638 * graphite-scop-detection.c (dot_scop): New.
4639 * graphite-scop-detection.h (dot_scop): Declared.
4640
46412009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4642
4643 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4644
46452009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4646
4647 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4648 condition at the end of the loop.
4649 * graphite.c (graphite_initialize, graphite_finalize): Print to
4650 dump_file the compiled function.
4651 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4652 of create_empty_loop_on_edge.
4653 (translate_clast): Update the code generation of loops for the new
4654 shape of loops.
4655 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4656
46572009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4658
4659 Reverted the patch from 2009-03-19.
4660
46612009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4662
4663 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4664 poly_drs vector.
4665 (print_scop): Style.
4666 * graphite-poly.h (poly_bb): Add drs vector.
4667 (PBB_DRS): Add accessor.
4668 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4669 (build_access_matrix_with_af, build_access_matrix,
4670 build_scop_data_accesses): Delete.
4671 (build_poly_dr): New.
4672 (build_pbb_drs, build_scop_drs): New.
4673 (build_poly_scop): call build_scop_drs.
4674
46752009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4676
4677 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4678 once per basic block.
4679
46802009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4681
4682 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4683 (graphite_can_represent_expr): Renamed from loop_affine_expr
4684 and enhanced.
4685 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4686 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4687 (scopdet_basic_block_info): Actually define entry_block.
4688 (stmt_simple_memref_p): Moved here from ...
4689
4690 * tree-data-ref.c (stmt_simple_memref_p): here.
4691 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4692
46932009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4694
6c9df8cb 4695 * gcc.dg/graphite/id-4.c: New.
c6bb733d 4696
46972009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4698
4699 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4700 (register_old_and_new_names): Update the content of the map.
4701 When there was already a rename_map_elt in the map at that
4702 location, free it.
4703 (copy_bb_and_scalar_dependences): Do rename_variables after
4704 expand_scalar_variables.
4705 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4706 of the map. When there was already a rename_map_elt in the
4707 map at that location, free it.
4708 (translate_clast): Pass the rename_map. Do not initialize and free
4709 a rename_map per stmt_user.
4710 (gloog): Initialize and free one rename_map and pass it to
4711 translate_clast.
4712
47132009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4714
4715 * sese.c (expand_scalar_variables_stmt,
4716 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4717 parameter.
4718 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4719 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4720 the gimple_stmt_iterator of the statement to be expanded.
4721 * graphite-scop-detection.c (is_simple_operand): Do handle
4722 REALPART_EXPR.
4723
47242009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4725
4726 * graphite-scop-detection.c (is_simple_operand): Do not handle
4727 REALPART_EXPR.
6c9df8cb 4728 * gcc.dg/graphite/id-2.c: New.
c6bb733d 4729
4730 * graphite-sese-to-poly.c (build_bb_loops,
4731 add_value_to_dim, scan_tree_for_params_right_scev,
4732 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4733 find_params_in_bb, build_loop_iteration_domains,
4734 add_conditions_to_domain): Remove subtract.
4735
47362009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4737
4738 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4739 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4740 pbb_loop_at_index -> gbb_loop_at_index.
4741 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4742 (debug_loop_vec): Delete.
4743 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4744 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4745 (PBB_LOOPS): Removed.
4746 (PBB_BLACK_BOX): Insert cast.
4747 (pbb_set_black_box): New setter.
4748 (pbb_loop_at_index, pbb_loop_index): Removed.
4749 (scop_set_region, scop_set_nb_params): New.
4750 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4751 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4752 (build_poly_scop): Use scop_set_nb_params.
4753 * sese.h (gimple_bb): Add LOOPS.
4754 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4755
47562009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4757
4758 Revert previous commit.
4759
47602009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4761
4762 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4763 (register_old_and_new_names): Update the content of the map.
4764 When there was already a rename_map_elt in the map at that
4765 location, free it.
4766 (copy_bb_and_scalar_dependences): Do rename_variables after
4767 expand_scalar_variables.
4768 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4769 of the map. When there was already a rename_map_elt in the
4770 map at that location, free it.
4771 (translate_clast): Pass the rename_map. Do not initialize and free
4772 a rename_map per stmt_user.
4773 (gloog): Initialize and free one rename_map and pass it to
4774 translate_clast.
4775
47762009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4777
4778 Remove forgotten line in revert.
4779
47802009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4781
4782 Revert previous commit.
4783
47842009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4785
4786 * sese.c (register_old_and_new_names): Update the content
4787 of the map. When there was already a rename_map_elt in the
4788 map at that location, free it.
4789 (copy_bb_and_scalar_dependences): Do rename_variables after
4790 expand_scalar_variables.
4791 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4792 of the map. When there was already a rename_map_elt in the
4793 map at that location, free it.
4794 (translate_clast): Pass the rename_map. Do not initialize and free
4795 a rename_map per stmt_user.
4796 (gloog): Initialize and free one rename_map and pass it to
4797 translate_clast.
4798
47992009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4800
4801 * graphite-clast-to-gimple.c (translate_clast): context_loop
4802 is never NULL.
4803
48042009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4805 Sebastian Pop <sebastian.pop@amd.com>
4806
4807 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4808 of the use of ppl_Polyhedron_map_space_dimensions.
4809
48102009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4811 Sebastian Pop <sebastian.pop@amd.com>
4812
4813 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4814 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4815 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4816 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4817 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4818 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4819 pbb_nb_params): New.
4820 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4821 nb_loops_around_pbb): Adapt return types.
4822
48232009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4824
4825 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4826 graphite-clast-to-gimple.o, graphite-data-ref.o,
4827 graphite-scop-detection.o, graphite-poly.o): Add
4828 more headers.
4829
48302009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4831
4832 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4833 graphite-clast-to-gimple.o, graphite-data-ref.o,
4834 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4835
48362009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4837
6c9df8cb 4838 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4839 * gcc.dg/graphite/pr37828.c: Same.
4840 * gcc.dg/graphite/pr37684.c: Same.
4841 * gcc.dg/graphite/block-0.c: Same.
4842 * gcc.dg/graphite/block-1.c: Same.
4843 * gcc.dg/graphite/block-2.c: Same.
4844 * gcc.dg/graphite/block-3.c: Same.
4845 * gcc.dg/graphite/block-4.c: Same.
4846 * gcc.dg/graphite/block-5.c: Same.
4847 * gcc.dg/graphite/block-6.c: Same.
4848 * gfortran.dg/graphite/pr38083.f90: Same.
4849 * gfortran.dg/graphite/block-1.f90: Same.
4850 * gfortran.dg/graphite/block-3.f90: Same.
4851 * gfortran.dg/graphite/pr37852.f90: Same.
4852 * gfortran.dg/graphite/block-4.f90: Same.
4853 * gfortran.dg/graphite/pr37980.f90: Same.
4854 * gfortran.dg/graphite/pr38953.f90: Same.
4855 * gfortran.dg/graphite/pr37857.f90: Same.
c6bb733d 4856 * opts.c: Remove -floop-block from -O2.
4857 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4858 -floop-strip-mine are used.
4859
48602009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4861 Sebastian Pop <sebastian.pop@amd.com>
4862
4863 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4864 dimensions.
4865 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4866 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4867 strip_mine_profitable_p, is_interchange_valid,
4868 graphite_trans_bb_block, graphite_trans_loop_block,
4869 graphite_trans_scop_block): Temporary removed.
4870 (extend_scattering, unify_scattering_dimensions): New.
4871 (print_scattering_function, graphite_read_transforms):
4872 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4873 (graphite_generate_scattering_fns): Removed.
4874 (apply_poly_transforms): Cleanup.
4875 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4876 (schedule_to_scattering): Moved.
4877 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4878 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4879 (pbb_nb_scattering): New.
4880 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4881 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4882 Removed.
4883 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4884 shift_poly.
4885 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4886 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4887 -> PBB_TRANSFORMED_SCATTERING.
4888 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4889 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4890 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4891 (check_poly_representation): Do not return bool.
4892 (graphite_transform_loops): Reformat.
4893 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4894
48952009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4896
4897 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4898 debug_pbb_domain, debug_pbb, debug_scop): New.
4899 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4900 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4901
49022009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4903
4904 PR middle-end/39335
4905 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4906 when the type precision of the induction variable should be
4907 larger than the type precision of nit.
4908 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4909 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4910 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4911
6c9df8cb 4912 * gcc.dg/graphite/pr39335_1.c: New.
4913 * gcc.dg/graphite/pr39335.c: New.
c6bb733d 4914
49152009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4916
4917 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4918 SSA_NAMES not struct reduction_info.
4919
49202009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4921
4922 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4923
49242009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4925 Tobias Grosser <grosser@fim.uni-passau.de>
4926
4927 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4928 (free_sese): Free SESE_REDUCTION_LIST.
4929 * sese.h (struct sese): Add field reduction_list.
4930 (SESE_REDUCTION_LIST): New.
4931 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4932 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4933
49342009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4935 Tobias Grosser <grosser@fim.uni-passau.de>
4936
4937 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4938 of loop_p.
4939
49402009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4941 Tobias Grosser <grosser@fim.uni-passau.de>
4942
4943 * tree-parloops.c (struct brli, build_reduction_list_info,
4944 analyze_reduction_list, gather_scalar_reductions): New.
4945 (loop_parallel_p): Build a reduction list containing only
4946 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4947 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4948 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4949 * tree-flow.h (gather_scalar_reductions): Declared.
4950
49512009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4952
4953 PR middle-end/39308
4954 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4955 number_of_iterations_exit from a gcc_assert.
4956
49572009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4958 Jan Sjodin <jan.sjodin@amd.com>
4959
4960 * output.h (graphite_out_file, graphite_in_file): Declared.
4961 * toplev.c (graphite_out_file, graphite_in_file): New.
4962 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4963 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4964 Don't call schedule_to_scattering.
4965 * common.opt (fgraphite-write, fgraphite-read): New.
4966 * graphite-poly.c: Include output.h.
4967 (print_scattering_function, print_scattering_functions,
4968 debug_scattering_function, debug_scattering_functions,
4969 graphite_write_transforms, graphite_read_transforms,
4970 graphite_generate_scattering_fns): New.
4971 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4972 Call graphite_generate_scattering_fns, graphite_write_transforms,
4973 graphite_read_transforms.
4974 (new_poly_bb): Initialize PBB_SCATTERING.
4975 (free_poly_bb): Free PBB_SCATTERING.
4976 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4977 * graphite-poly.h (struct poly_bb): Add field scattering.
4978 (PBB_SCATTERING): New.
4979 (print_scattering_function, print_scattering_functions,
4980 debug_scattering_function, debug_scattering_functions): Declared.
4981 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4982 GMP values, not integers!
4983 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4984 ppl_read_polyhedron_matrix): New.
4985 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4986 debug_ppl_polyhedron_matrix,
4987 ppl_read_polyhedron_matrix): Declared.
4988 * Makefile.in (graphite-poly.o): Depends on output.h.
4989
49902009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4991 Tobias Grosser <grosser@fim.uni-passau.de>
4992
4993 Revert this change:
4994 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4995 scalar evolutions in the scop_entry->loop_father.
4996
49972009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4998 Tobias Grosser <grosser@fim.uni-passau.de>
4999
5000 * graphite.h (ref_nb_loops): Remove declaration.
5001 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5002 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5003 debug_gbb): Moved to sese.h.
5004 * sese.h: As said.
5005
50062009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5007 Tobias Grosser <grosser@fim.uni-passau.de>
5008
5009 * graphite-data-ref.[ch]: Disable.
5010
50112009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5012 Tobias Grosser <grosser@fim.uni-passau.de>
5013
5014 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5015 scalar evolutions in the scop_entry->loop_father.
5016
50172009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5018
5019 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5020 (graphite_cannot_represent_loop_niter): Renamed
5021 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5022 (limit_scops): build_sese_loop_nests does not return a bool.
5023 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5024 * sese.c (nb_reductions_in_loop): ... from here.
5025 (graphite_loop_normal_form): ... from here.
5026 (sese_record_loop): Does not fail, so does not return a bool.
5027 (build_sese_loop_nests): Same.
5028 * sese.h (build_sese_loop_nests): Update declaration.
5029 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5030 (build_graphite_loop_normal_form): New.
5031 (gloog): Call build_graphite_loop_normal_form.
5032 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5033 build_sese_loop_nests.
5034
6c9df8cb 5035 * gcc.dg/graphite/id-1.c: New.
c6bb733d 5036
50372009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5038 Tobias Grosser <grosser@fim.uni-passau.de>
5039
5040 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5041 The SCoP detection fix is sufficient.
5042
50432009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5044
5045 PR tree-optimization/39260
5046 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5047 the basic block contains a condition with a real type.
5048 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5049
5050 * gcc.dg/graphite/pr39260.c: New.
5051
50522009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5053
5054 * graphite-poly.c: Inlcude params.h.
5055 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5056 the size of a tile.
5057 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5058 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5059
50602009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5061 Tobias Grosser <grosser@fim.uni-passau.de>
5062
5063 * graphite-scop-detection.c (dot_all_scops_1,
5064 dot_all_scops): Moved here.
5065 * graphite-scop-detection.h (dot_all_scops): Declared here.
5066 * graphite.c (graphite_initialize, graphite_finalize): New.
5067 (graphite_transform_loops): Cleaned up.
5068 * sese.c (debug_oldivs): Moved here.
5069 * graphite-poly.c (graphite_apply_transformations): Renamed
5070 apply_poly_transforms.
5071 (debug_loop_vec): Moved here.
5072 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5073 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5074 find_scop_parameters, build_scop_iteration_domain,
5075 add_conditions_to_constraints, build_scop_canonical_schedules,
5076 build_scop_data_accesses): Now static.
5077 (build_poly_scop, check_poly_representation): New.
5078
50792009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5080
5081 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5082 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5083 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5084 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5085 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5086 scan_tree_for_params, struct irp_data, dx_record_params,
5087 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5088 build_loop_iteration_domains, add_conditions_to_domain,
5089 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5090 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5091 build_sese_conditions, add_conditions_to_constraints,
5092 build_scop_iteration_domain, build_access_matrix_with_af,
5093 build_access_matrix,
5094 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5095
5096 * graphite-sese-to-poly.c: New.
5097 * graphite-sese-to-poly.h: New.
5098
5099 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5100
51012009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5102
5103 * graphite.c: Split graphite code generation to a new file.
5104 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5105 max_precision_type, clast_to_gcc_expression_red,
5106 clast_to_gcc_expression, gcc_type_for_clast_expr,
5107 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5108 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5109 graphite_create_new_guard, clast_get_body_of_loop,
5110 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5111 graphite_create_new_loop, build_iv_mapping, copy_renames,
5112 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5113 compute_cloog_iv_types, free_scattering, save_var_name,
5114 initialize_cloog_names, build_scop_context, build_cloog_prog,
5115 set_cloog_options, debug_clast_stmt, scop_to_clast,
5116 print_generated_program, debug_generated_program,
5117 gloog): Moved to graphite-clast-to-gimple.c.
5118
5119 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5120
5121 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5122 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5123 loop_iv_stack_pop, loop_iv_stack_get_iv,
5124 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5125 free_loop_iv_stack, loop_iv_stack_remove_constants,
5126 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5127 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5128 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5129 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5130 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5131 get_vdef_before_sese, sese_adjust_vphi,
5132 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5133 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5134 is_iv, expand_scalar_variables_ssa_name,
5135 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5136 expand_scalar_variables, rename_variables, remove_condition,
5137 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5138 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5139 default_liveout_before_guard, add_guard_exit_phis,
5140 insert_guard_phis, register_old_and_new_names,
5141 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5142 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5143 if_region_set_false_region, create_if_region_on_edge,
5144 move_sese_in_condition): Moved to sese.c.
5145
5146 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5147 if_region_exit, if_region_get_condition_block,
5148 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5149 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5150 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5151 ivtype_map_elt, new_ivtype_map_elt,
5152 recompute_all_dominators): Moved to sese.h.
5153
5154 * graphite-clast-to-gimple.c: New.
5155 * graphite-clast-to-gimple.h: New.
5156 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5157 * sese.c: Modified as said above.
5158 * sese.h: Same.
5159
51602009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5161
5162 * graphite.c: Split scop detection to a new file.
5163 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5164 move_sd_regions, loop_affine_expr, exclude_component_ref,
5165 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5166 graphite_cannot_represent_loop_niter, struct scopdet_info,
5167 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5168 find_single_entry_edge, find_single_exit_edge,
5169 create_single_entry_edge, sd_region_without_exit,
5170 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5171 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5172 Moved to graphite-scop-detection.c.
5173
5174 * graphite-scop-detection.c: New.
5175 * graphite-scop-detection.h: New.
5176 * Makefile.in: Add new rule for graphite-scop-detection.o.
5177
5178 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5179 tree-scalar-evolution.h.
5180 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5181 build_sese_loop_nests): Moved here from graphite.c.
5182 (param_index): Renamed parameter_index_in_region.
5183
51842009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5185 Sebastian Pop <sebastian.pop@amd.com>
5186
5187 * gcc.dg/graphite/block-0.c: Expected to fail now.
5188 * gcc.dg/graphite/block-1.c: Same.
5189 * gcc.dg/graphite/block-5.c: Same.
5190 * gcc.dg/graphite/block-6.c: Same.
5191
51922009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5193 Sebastian Pop <sebastian.pop@amd.com>
5194
5195 * graphite.h: Separate from graphite_bb_p the polyhedral
5196 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5197 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5198 graphite-data-ref.h.
5199 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5200 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5201 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5202 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5203 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5204 scop_nb_params): Moved to graphite-poly.h.
5205 * graphite-data-ref.c: Same.
5206 * graphite-data-ref.h: New.
5207 * graphite.c: Same.
5208 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5209 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5210 is_interchange_valid, graphite_trans_bb_block,
5211 graphite_trans_loop_block, scop_max_loop_depth,
5212 graphite_trans_scop_block, graphite_apply_transformations,
5213 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5214 graphite-poly.c.
5215 * graphite-poly.h: New.
5216 * graphite-poly.c: New.
5217 * Makefile.in (OBJS-common): Add graphite-poly.o.
5218 (graphite-poly.o): New rule.
5219 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5220 (DR_SCOP): Removed.
5221
52222009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5223 Tobias Grosser <grosser@fim.uni-passau.de>
5224
5225 * graphite.c: Replace gb -> gbb.
5226 * graphite.h: Same.
5227 * graphite-data-ref.c: Same.
5228
52292009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5230 Tobias Grosser <grosser@fim.uni-passau.de>
5231
5232 * Makefile.in (OBJS-commmon): Add sese.o.
5233 (sese.o): New.
5234 (graphite.o): Add sese.h.
5235 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5236 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5237 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5238 Move to sese.
5239 (block_before_scop): Add missing return.
5240 (new_scop, free_scop): Remove SESE data structures.
5241 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5242 find_scop_parameters, build_loop_iteration_domains,
5243 add_conditions_to_domain, register_scop_liveout_renames,
5244 copy_bb_and_scalar_dependences): Scop -> SESE.
5245
5246 (add_conditions_to_domain): SCoP -> SESE and remove check
5247 (scop_contains_non_iv_scalar_phi_nodes): New.
5248 (build_scop_conditions_1, build_scop_conditions): Remove check for
5249 non iv scalar phi nodes.
5250 (print_scop_statistics): New.
5251 (graphite_transform_loops): Cleanup.
5252
5253 * graphite.h: Move to sese & cleanup.
5254 * sese.c: New.
5255 * sese.h: New.
5256
52572009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5258 Tobias Grosser <grosser@fim.uni-passau.de>
5259
5260 * graphite.c (build_scop_conditions_1): Conditions are only
5261 at the end of a basic block.
5262
52632009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5264 Tobias Grosser <grosser@fim.uni-passau>
5265
5266 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5267 field.
5268 (GBB_ALPHA): Removed.
5269
52702009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5271 Tobias Grosser <grosser@fim.uni-passau.de>
5272
5273 * graphite-data-ref.c (graphite_test_dependence): Don't use
5274 GBB_DYNAMIC_SCHEDULE.
5275 * graphite.c (new_graphite_bb): Same.
5276 (free_graphite_bb): Same.
5277 (build_scop_dynamic_schedules): Removed.
5278 (graphite_transform_loops): Don't call it.
5279 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5280 (GBB_DYNAMIC_SCHEDULE): Removed.
5281
52822009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5283 Tobias Grosser <grosser@fim.uni-passau.de>
5284
5285 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5286 (print_graphite_bb): Same.
5287 (build_cloog_prog): Same.
5288
52892009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5290 Tobias Grosser <grosser@fim.uni-passau.de>
5291
5292 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5293
52942009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5295 Tobias Grosser <grosser@fim.uni-passau.de>
5296
5297 * graphite.c (build_scop_context): Don't use CloogMatrix.
5298 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5299 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5300
53012009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5302 Tobias Grosser <grosser@fim.uni-passau.de>
5303
5304 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5305 liveout_renames, add_params fields...
5306 (struct sese): ... here.
5307 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5308 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5309
53102009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5311 Tobias Grosser <grosser@fim.uni-passau.de>
5312
5313 * graphite.c (print_scop): Do not print the CLooG program.
5314 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5315 build_cloog_prog, gloog): Don't use SCOP_PROG.
5316 (find_transform): Renamed scop_to_clast.
5317 (print_generated_program, debug_generated_program): New.
5318 (graphite_transform_loops): Adapt to new interface.
5319 * graphite.h (struct scop): Remove program field.
5320 (SCOP_PROG): Removed.
5321 (print_generated_program, debug_generated_program): Declared.
5322
53232009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5324
5325 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5326 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5327 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5328 free_graphite_bb, build_scop_canonical_schedules,
5329 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5330 schedules are now represented using a ppl_Linear_Expression_t.
5331 * graphite.h (struct graphite_bb): Same.
5332 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5333 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5334
53352009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5336
5337 * graphite.c: Free local memory.
5338 * graphite-ppl.c: Same.
5339
53402009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5341
5342 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5343 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5344 swap_constraint_variables, scale_constraint_variable): Removed.
5345 (graphite_trans_bb_strip_mine): Remove pong.
5346 * graphite-ppl.c: Include missing header files.
5347 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5348 * graphite-ppl.h (ppl_strip_loop): Declared.
5349 * Makefile.in (graphite-ppl.o): Adjust dependences.
5350
53512009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5352
5353 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5354 (build_scop_iteration_domain): Same.
5355
53562009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5357
5358 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5359 ping pong.
5360 (add_value_to_dim, scan_tree_for_params_right_scev,
5361 scan_tree_for_params_int): New.
5362 * graphite-ppl.c (oppose_constraint): New.
5363 (insert_constraint_into_matrix): Implement missing cases.
5364 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5365
53662009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5367
5368 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5369 use ppl_move_dimension.
5370
53712009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5372
5373 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5374 * graphite.c: Same.
5375 * graphite.h: Same.
5376 * graphite-ppl.c: Same.
5377 * graphite-ppl.h: Same.
5378
53792009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5380
5381 Revert last 3 commits.
5382
53832009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5384
5385 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5386 ping pong.
5387 (add_value_to_dim, scan_tree_for_params_right_scev,
5388 scan_tree_for_params_int): New.
5389 * graphite-ppl.c (oppose_constraint): New.
5390 (insert_constraint_into_matrix): Implement missing cases.
5391 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5392
53932009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5394
5395 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5396
53972009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5398 Tobias Grosser <grosser@fim.uni-passau.de>
5399
5400 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5401 use ppl_move_dimension.
5402 * graphite-ppl.c (ppl_move_dimension): New.
5403 * graphite-ppl.h (ppl_move_dimension): Declared.
5404
54052009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5406
5407 * graphite.c: Do not include cloog/cloog.h.
5408 (print_graphite_bb): Remove ping pong, call PPL print function.
5409
54102009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5411
5412 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5413 (graphite.o): Add dependence on graphite-ppl.h.
5414 (graphite-ppl.o): New.
5415 (graphite-data-ref.c): Ping pong between PPL data structures
5416 and matrices.
5417 * graphite-ppl.c: New.
5418 * graphite-ppl.h: New.
5419 * graphite.c: Include graphite-ppl.h.
5420 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5421 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5422 Ping pong between PPL data structures and matrices.
5423 (new_graphite_bb): Create a PPL constraint system.
5424 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5425 (build_loop_iteration_domains): Use PPL functions.
5426 * graphite.h: Include graphite-ppl.h. Fix comments.
5427 (graphite_bb): Use a ppl_Constraint_System_t instead of
5428 CloogMatrix for representing the domain.
5429 (scop): Remove static_schedule.
5430 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5431
54322009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5433
5434 * graphite.c: Fix some comments.
5435
54362009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5437
5438 PR middle-end/38953
5439 * graphite.c (if_region_set_false_region): After moving a region
5440 in the false branch of a condition, remove the empty dummy
5441 basic block.
5442 (gloog): Remove wrong fix for PR38953.
5443
54442009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5445
5446 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5447 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5448 register_bb_in_sese, new_sese, free_sese): Moved.
5449 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5450 outermost_loop_in_scop, build_scop_iteration_domain,
5451 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5452 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5453 Use loop_in_sese_p instead of loop_in_scop_p.
5454 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5455 (free_scop): Do not free SCOP_BBS_B.
5456 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5457 ref_nb_loops): Moved here...
5458 * graphite.h (ref_nb_loops): ... from here.
5459 (struct scop): Remove bbs_b bitmap.
5460 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
6c9df8cb 5461 * gcc.dg/graphite/scop-19.c: New
c6bb733d 5462
54632009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5464
5465 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5466 detection.
5467
54682009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5469
5470 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5471 eq_loop_to_cloog_loop): Remove.
5472 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5473 * graphite.h (struct scop): Remove loop2cloog_loop.
5474 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5475
54762009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5477
5478 * opts.c (decode_options): Only add graphite options to O2
5479 if we compile with graphite enabled.
5480
54812009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5482
5483 * Merge from mainline (r143163:143684).
5484
54852009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5486
5487 * graphite.c (debug_value): Removed.
5488 * graphite.h (debug_value): Removed.
5489
54902009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5491
5492 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5493 after graphite: pass_copy_prop does not maintain a proper loop closed
5494 SSA form. pass_copy_prop should be fixed.
5495
54962009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5497
5498 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5499
55002009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5501
5502 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5503 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5504 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5505 changed the CFG.
5506
55072009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5508
5509 * graphite.c (gloog): Return true when code gen succeeded.
5510 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5511 the code of the function did not changed. After cleanup_tree_cfg
5512 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5513 form.
5514
55152009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5516
5517 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5518 gimple_call_lhs is NULL.
5519
55202009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5521 Tobias Grosser <tobi.grosser@amd.com>
5522
5523 * graphite.c (graphite_trans_scop_block): Do not block single
5524 nested loops.
5525
55262009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5527 Tobias Grosser <tobi.grosser@amd.com>
5528
5529 * graphite.c (build_scop_canonical_schedules): Start schedules at
5530 zero.
5531
55322009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5533 Tobias Grosser <tobi.grosser@amd.com>
5534
5535 * graphite.c (compare_prefix_loops): New.
5536 (build_scop_canonical_schedules): Rewritten.
5537 (graphite_transform_loops): Move build_scop_canonical_schedules
5538 after build_scop_iteration_domain.
5539
55402009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5541 Tobias Grosser <tobi.grosser@amd.com>
5542
5543 * graphite.c (add_conditions_to_domain): Add the loops to
5544 the dimension of the iteration domain. Do copy the domain
5545 only when it exists.
5546 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5547 (add_conditions_to_constraints): New.
5548 (can_generate_code_stmt, can_generate_code): Removed.
5549 (gloog): Do not call can_generate_code.
5550 (graphite_transform_loops): Call add_conditions_to_constraints
5551 after building the iteration domain.
5552
55532009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5554 Tobias Grosser <tobi.grosser@amd.com>
5555 Jan Sjodin <jan.sjodin@amd.com>
5556
5557 * graphite.c (scan_tree_for_params): On substractions negate
5558 all the coefficients of the term.
5559 (clast_to_gcc_expression_red): New. Handle reduction expressions
5560 of more than two operands.
5561 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5562 (get_vdef_before_scop): Handle also the case of default definitions.
5563
55642009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5565
5566 PR middle-end/38431
5567 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5568 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5569 (gloog): Do not call cleanup_tree_cfg.
5570 (graphite_transform_loops): Call cleanup_tree_cfg after all
5571 scops have been code generated.
5572
55732009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5574
5575 * passes.c (init_optimization_passes): Schedule after
5576 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5577
55782009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5579
5580 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5581 Fix comment.
5582 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5583 Set the type of an expression to the type of its assign statement.
5584 (expand_scalar_variables_expr): Do not pass loop_p.
5585 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5586 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5587 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5588
55892009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5590
5591 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5592 an expression to the gimple_expr_type of its assign statement.
5593 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5594 or tcc_declaration.
5595
55962009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5597
5598 PR tree-optimization/38786
6c9df8cb 5599 * gcc.dg/graphite/pr38786.c: New.
c6bb733d 5600 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5601 the SSA_NAME case of expand_scalar_variables_expr.
5602 (expand_scalar_variables_expr): Also gather the scalar computation
5603 used to index the memory access.
5604 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5605 the gimple_stmt_iterator where it inserts new code.
5606
56072009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5608
6c9df8cb 5609 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
c6bb733d 5610
56112009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5612
5613 * opts.c (decode_options): Enable flag_graphite_identity and
5614 flag_loop_block in -O2 and above.
5615
56162009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5617
5618 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5619 Fix merge problem: replace with the file from trunk.
5620
56212009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5622
5623 * Merge from mainline (r141727:143163).
5624
56252009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5626 Jan Sjodin <jan.sjodin@amd.com>
5627
5628 PR tree-optimization/38559
6c9df8cb 5629 * gcc.dg/graphite/pr38559.c: New.
c6bb733d 5630
5631 * graphite.c (debug_value, copy_constraint,
5632 swap_constraint_variables, scale_constraint_variable, ): New.
5633 (get_lower_bound, get_upper_bound): Removed.
5634 (graphite_trans_bb_strip_mine): Clean up this code that works
5635 only for constant number of iterations. Fully copy upper and
5636 lower bound constraints, not only the constant part of them.
5637 * graphite.h (debug_value): Declared.
5638
56392009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5640
5641 PR tree-optimization/38492
5642 PR tree-optimization/38498
5643 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5644 * tree-chrec.h (scev_is_linear_expression): Declared.
5645 * graphite.c (graphite_cannot_represent_loop_niter): New.
5646 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5647 (graphite_loop_normal_form): Use gcc_assert.
5648 (scan_tree_for_params): Use CASE_CONVERT.
5649 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5650 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5651 Use gcc_assert. Discard scops that contain unhandled cases.
5652 (build_scop_conditions): Return a boolean status for unhandled cases.
5653 (strip_mine_profitable_p): Print the loop number, not its depth.
5654 (is_interchange_valid): Pass the depth of the loop nest, don't
5655 recompute it wrongly.
5656 (graphite_trans_bb_block): Same.
5657 (graphite_trans_bb_block): Print tentative of loop blocking.
5658 (graphite_trans_scop_block): Do not print that the loop has been
5659 blocked.
5660 (graphite_transform_loops): Do not handle scops that contain condition
5661 scalar phi nodes.
5662
6c9df8cb 5663 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
c6bb733d 5664 in trunk.
6c9df8cb 5665 * gcc.dg/graphite/block-0.c: Update test.
5666 * gcc.dg/graphite/block-1.c: Same.
5667 * gcc.dg/graphite/block-2.c: Remove xfail and test for
c6bb733d 5668 blocking.
6c9df8cb 5669 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5670 * gcc.dg/graphite/block-3.c: New.
5671 * gcc.dg/graphite/pr38498.c: New.
c6bb733d 5672
56732008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5674
5675 PR tree-optimization/38510
5676 * gcc.dg/graphite/pr38510.c: New.
5677 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5678 (translate_clast): Call recompute_all_dominators before
5679 graphite_verify.
5680 (gloog): Call recompute_all_dominators before graphite_verify.
5681
56822008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5683
5684 PR tree-optimization/38492
5685 * graphite.c (rename_map_elt, debug_rename_elt,
5686 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5687 rename_map_elt_info, eq_rename_map_elts,
5688 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5689 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5690 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5691 (sese_build_livein_liveouts): New.
5692 (new_sese, free_sese): New.
5693 (new_scop): Call new_sese.
5694 (free_scop): Call free_sese.
5695 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5696 (register_old_new_names): Renamed register_old_and_new_names.
5697 (register_scop_liveout_renames, add_loop_exit_phis,
5698 insert_loop_close_phis, struct igp,
5699 default_liveout_before_guard, add_guard_exit_phis,
5700 insert_guard_phis, copy_renames): New.
5701 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5702 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5703 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5704 (scop_adjust_phis_for_liveouts): New.
5705 (gloog): Call scop_adjust_phis_for_liveouts.
5706
5707 * graphite.h (struct sese): Documented. Added fields liveout,
5708 num_ver and livein.
5709 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5710 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5711 (struct scop): Added field liveout_renames.
5712 (SCOP_LIVEOUT_RENAMES): New.
5713
57142008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5715
5716 PR tree-optimization/38409
5717 * gcc.dg/graphite/pr38409.c: New.
5718 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5719
57202008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5721
5722 * graphite.c (gcc_type_for_cloog_iv): By default return
5723 integer_type_node.
5724 (graphite_create_new_loop): Don't fold_convert the already
5725 fold_convert-ed expression.
5726
57272008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5728
5729 PR tree-optimization/38446
5730 * gcc.dg/graphite/pr38446.c: New.
5731 * graphite.c (register_bb_in_sese): New.
5732 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5733 looking at the bbs in the region.
5734 * graphite.h (sese): Add region_basic_blocks pointer set to
5735 structure and initialize at the time of defining new scop.
5736
57372008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5738
5739 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5740 (find_params_in_bb): Do not free data refs.
5741 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5742
57432008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5744
6c9df8cb 5745 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5746 * gcc.dg/graphite/scop-17.c: Same.
5747 * gcc.dg/graphite/block-5.c: New.
5748 * gcc.dg/graphite/block-6.c: New.
5749 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5750 * gcc.dg/graphite/pr37684.c: Same.
5751 * gcc.dg/graphite/block-2.c: Same.
c6bb733d 5752
5753 * graphite.c (struct ivtype_map_elt): New.
5754 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5755 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5756 gcc_type_for_cloog_iv): New.
5757 (loop_iv_stack_patch_for_consts): Use the type of the induction
5758 variable from the original loop, except for the automatically
5759 generated loops, i.e., in the case of a strip-mined loop, in
5760 which case there is no original loop: in that case just use
5761 integer_type_node.
5762 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5763 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5764 (clast_name_to_gcc): Accept params to be NULL.
5765 (clast_to_gcc_expression): Take an extra parameter for the type.
5766 Convert to that type all the expressions built by this function.
5767 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5768 (graphite_translate_clast_equation): Compute the type of the
5769 clast_equation before translating its LHS and RHS.
5770 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5771 (graphite_create_new_loop): Compute the type of the induction
5772 variable before translating the lower and upper bounds and before
5773 creating the induction variable.
5774 (rename_variables_from_edge, rename_phis_end_scop): New.
5775 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5776 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5777 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5778 compute_cloog_iv_types): New.
5779 (gloog): Call compute_cloog_iv_types before starting the
5780 translation of the clast.
5781
5782 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5783 (GBB_CLOOG_IV_TYPES): New.
5784 (debug_ivtype_map): Declared.
5785 (oldiv_for_loop): New.
5786
57872008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5788
5789 PR middle-end/38459
5790 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5791 (param_index): Assert if parameter is not know after parameter
5792 detection.
5793 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5794 (find_scop_parameters): Mark, that we have finished parameter
5795 detection.
5796 (graphite_transform_loops): Move condition detection before parameter
5797 detection.
5798 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6c9df8cb 5799 * gfortran.dg/graphite/pr38459.f90: New.
c6bb733d 5800
58012008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5802
5803 * graphite.c (graphite_transform_loops): Always call find_transform ()
5804 in ENABLE_CHECKING. So we test these code paths, even if we do not
5805 generate code.
5806
58072008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5808
5809 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5810 (print_scop): Ditto.
5811
58122008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5813
5814 PR middle-end/38084
6c9df8cb 5815 Fix gfortran.dg/graphite/id-3.f90.
c6bb733d 5816 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5817 regions more than once.
5818
58192008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5820
6c9df8cb 5821 Fix gfortran.dg/graphite/id-4.f90.
c6bb733d 5822 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5823 when not needed.
5824
58252008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5826
6c9df8cb 5827 Fix gfortran.dg/graphite/id-1.f90.
c6bb733d 5828 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5829 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5830 (max_precision_type): New.
5831 (value_clast): Removed.
5832 (clast_to_gcc_expression): Be more careful to types of expressions.
5833 Use max_precision_type and update use of gmp_cst_to_tree.
5834 (graphite_translate_clast_equation): Use max_precision_type.
5835 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5836 use the type of the condition.
5837 (graphite_create_new_loop): Do not use integer_type_node, use the
5838 max_precision_type of lb and ub.
5839
58402008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5841
5842 * graphite.c (build_scops_1): Initialize open_scop.exit
5843 and sinfo.last.
5844
58452008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5846
6c9df8cb 5847 * gcc.dg/graphite/pr38084.c: New.
5848 * gfortran.dg/graphite/id-1.f90: New.
5849 * gfortran.dg/graphite/id-2.f90: New.
5850 * gfortran.dg/graphite/id-3.f90: New.
5851 * gfortran.dg/graphite/id-4.f90: New.
5852 * gfortran.dg/graphite/pr37857.f90: New.
c6bb733d 5853
58542008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5855 Jan Sjodin <jan.sjodin@amd.com>
5856 Harsha Jagasia <harsha.jagasia@amd.com>
5857
5858 PR middle-end/37852
5859 PR middle-end/37883
5860 PR middle-end/37928
5861 PR middle-end/37980
5862 PR middle-end/38038
5863 PR middle-end/38039
5864 PR middle-end/38073
5865 PR middle-end/38083
5866 PR middle-end/38125
5867
6c9df8cb 5868 * gcc.dg/graphite/pr38073.c: New.
5869 * gcc.dg/graphite/pr37928.c: New.
5870 * gcc.dg/graphite/pr37883.c: New.
5871 * gcc.dg/graphite/pr38125.c: New.
5872 * gfortran.dg/graphite/pr38083.f90: New.
5873 * gfortran.dg/graphite/pr37852.f90: New.
5874 * gfortran.dg/graphite/pr37980.f90: New.
c6bb733d 5875
6c9df8cb 5876 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
c6bb733d 5877 the number of detected scops. Copy exact same test for loop
5878 blocking...
6c9df8cb 5879 * gcc.dg/graphite/block-1.c: Fix the number of expected
c6bb733d 5880 loops to be blocked as reductions are not handled.
6c9df8cb 5881 * gcc.dg/graphite/block-4.c: ...here. New.
c6bb733d 5882
5883 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5884 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5885 ...here.
5886 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5887 * Makefile.in (graphite.o): Depend on value-prof.h.
5888 (graphite.o-warn): Removed -Wno-error.
5889 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5890 to be a NULL pointer. Call update_stmt. Return the newly created
5891 cannonical induction variable.
5892
5893 * graphite.h (debug_rename_map): Declared. Fix some comments.
5894
5895 * graphite.c: Reimplement the code generation from graphite to gimple.
5896 Include value-prof.h.
5897 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5898 (get_old_iv_from_ssa_name): Removed.
5899 (graphite_stmt_p): New.
5900 (new_graphite_bb): Test for useful statements before building a
5901 graphite statement for the basic block.
5902 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5903 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5904 reason.
5905 (recompute_all_dominators, graphite_verify,
5906 nb_reductions_in_loop, graphite_loop_normal_form): New.
5907 (scop_record_loop): Call graphite_loop_normal_form.
5908 (build_scop_loop_nests): Iterate over all the blocks of the
5909 function instead of relying on the incomplete information from
5910 SCOP_BBS. Return the success of the operation.
5911 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5912 (add_bb_domains): Removed.
5913 (build_loop_iteration_domains): Don't call add_bb_domains.
5914 Add the iteration domain only to the basic blocks that have been
5915 translated to graphite.
5916 (build_scop_conditions_1): Add constraints only if the basic
5917 block have been translated to graphite.
5918 (build_scop_data_accesses): Completely disabled until data
5919 dependence is correctly implemented.
5920 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5921 (remove_all_edges_1, remove_all_edges): Removed.
5922 (get_new_name_from_old_name): New.
5923 (graphite_rename_variables_in_stmt): Renamed
5924 rename_variables_in_stmt. Call get_new_name_from_old_name.
5925 Use replace_exp and update_stmt.
5926 (is_old_iv): Renamed is_iv.
5927 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5928 Use replace_exp and update_stmt.
5929 (expand_scalar_variables_expr): Same. Use the map to get the
5930 new names for the renaming of induction variables and for the
5931 renaming of variables after a basic block has been copied.
5932 (expand_scalar_variables): Same.
5933 (graphite_rename_variables): Renamed rename_variables.
5934 (move_phi_nodes): Removed.
5935 (get_false_edge_from_guard_bb): New.
5936 (build_iv_mapping): Do not insert the induction variable of a
5937 loop in the renaming iv map if the basic block does not belong
5938 to that loop.
5939 (register_old_new_names, graphite_copy_stmts_from_block,
5940 copy_bb_and_scalar_dependences): New.
5941 (translate_clast): Heavily reimplemented: copy basic blocks,
5942 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5943 At each translation step call graphite_verify ensuring the
5944 consistency of the SSA, loops and dominators information.
5945 (collect_virtual_phis, find_vdef_for_var_in_bb,
5946 find_vdef_for_var_1, find_vdef_for_var,
5947 patch_phis_for_virtual_defs): Removed huge hack.
5948 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5949 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5950 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5951 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5952 if_region_get_condition_block, if_region_set_false_region,
5953 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5954 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5955 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5956 rewrite_into_sese_closed_ssa): New.
5957 (gloog): Remove dead code. Early return if code cannot be
5958 generated. Call cleanup_tree_cfg once the scop has been code
5959 generated.
5960 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5961 block loops with less than two loops.
5962 (graphite_apply_transformations): Remove the call to
5963 scop_remove_ignoreable_gbbs.
5964 (limit_scops): When build_scop_loop_nests fails, continue on
5965 the next scop. Fix open_scop.entry.
5966 (graphite_transform_loops): Call recompute_all_dominators: force the
5967 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5968 Call initialize_original_copy_tables and free_original_copy_tables
5969 to be able to copy basic blocks during code generation.
5970 When build_scop_loop_nests fails, continue on next scop.
5971 (value_clast): New union.
5972 (clast_to_gcc_expression): Fix type cast warning.
5973
59742008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5975
5976 * Merge from mainline (r140838:141727).
5977
59782008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5979
5980 PR middle-end/37833
5981
5982 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5983
59842008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5985
5986 PR middle-end/37943
5987
5988 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5989 exits and conditions.
6c9df8cb 5990 * gcc.dg/graphite/pr37943.c: New.
c6bb733d 5991
59922008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5993
5994 PR middle-end/37886
5995 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5996
59972008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5998
5999 * doc/invoke.texi: Fix spaces.
6000
60012008-10-22 Sebastian Pop <sebastian.pop@amd.com>
6002
6003 PR tree-optimization/37891
6004 Reverted last commit.
6005 * graphite.c (create_single_entry_edge): Set
6006 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6007
60082008-10-21 Sebastian Pop <sebastian.pop@amd.com>
6009 Mitul Thakkar <mitul.thakkar@amd.com>
6010
6011 * graphite.c (create_single_entry_edge): Set
6012 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6013
60142008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6015
6016 * doc/invoke.texi: Add -fgraphite-identity.
6017 * graphite.c (graphite_apply_transformations): Check for
6018 -fgraphite-identity.
6019 * toplev.c (process_options): Add flag_graphite_identity.
6020 * tree-ssa-loop.c: Add flag_graphite_identity.
6021
60222008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6023
6024 Undo changes from 2008-10-02:
6025 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6026 operand type when copying the operand to a variable of different type.
6027 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6028 with the IV name after increment.
6029
60302008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6031 Harsha Jagasia <harsha.jagasia@amd.com>
6032
6033 PR tree-optimization/37828
6c9df8cb 6034 * gcc.dg/graphite/pr37828.c: New.
c6bb733d 6035 * graphite.c (graphite_trans_loop_block): Do not loop block
6036 single nested loops.
6037
60382008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6039 Sebastian Pop <sebastian.pop@amd.com>
6040
6041 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6042 rename_map_elt_info, eq_rename_map_elts): New.
6043 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6044 (expand_scalar_variables_expr): Change parameters.
6045 (expand_scalar_variables_stmt): Same.
6046 (expand_scalar_variables): Same.
6047 (graphite_rename_ivs): Rename graphite_rename_variables.
6048 (build_iv_mapping): New.
6049 (translate_clast): Call build_iv_mapping.
6050 * graphite.h (gbb_p): New name.
6051
60522008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6053
6054 PR tree-optimization/37684
6055 * gcc.dg/graphite/pr37684.c: New.
6056 * graphite.c (exclude_component_ref): New.
6057 (is_simple_operand): Call exclude_component_ref.
6058
60592008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6060 Harsha Jagasia <harsha.jagasia@amd.com>
6061
6062 PR tree-optimization/37485
6063 * gcc.dg/graphite/block-2.c: New
6064 * graphite.c (gmp_cst_to_tree): Moved.
6065 (iv_stack_entry_is_constant): New.
6066 (iv_stack_entry_is_iv): New.
6067 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6068 (loop_iv_stack_insert_constant): New.
6069 (loop_iv_stack_pop): Use new datatpype.
6070 (loop_iv_stack_get_iv): Same.
6071 (loop_iv_stack_get_iv_from_name): Same.
6072 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6073 (loop_iv_stack_patch_for_consts): New.
6074 (loop_iv_stack_remove_constants): New.
6075 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6076 (translate_clast): Call loop_iv_stack_patch_for_consts and
6077 loop_iv_stack_remove_constants.
6078 (gloog): Use new datatype. Redirect construction edge to end
6079 block to avoid accidental deletion.
6080 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6081 iv stack entry.
6082 (union iv_stack_entry_data): New. Data in iv stack entry.
6083 (struct iv_stack_entry): New. Datatype for iv stack entries.
6084
60852008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6086
6087 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6088 operand type when copying the operand to a variable of different type.
6089
60902008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6091
6092 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6093 with the IV name after increment.
6094
60952008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6096
6097 * Merge from mainline (r140164:140838).
6098
60992008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6100
6101 * graphite-data-ref.c: New.
6102 * graphite.c (print_scop): Also dump the dependence graph.
6103 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6104 (new_scop): Initialize SCOP_DEP_GRAPH.
6105 (build_scop_dynamic_schedules): New.
6106 (build_access_matrix_with_af): Fixed column numbering.
6107 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6108 * graphite.h: Add ifndef/define guards against multiple inclusion.
6109 (struct scop): Add dep_graph field.
6110 (SCOP_DEP_GRAPH): Defined.
6111 (ref_nb_loops): Fixed and moved to other position.
6112 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6113 (nb_loops_around_loop_in_scop): New.
6114 (graphite_dump_dependence_graph): Declared.
6115 (graphite_build_rdg_all_levels): Declared.
6116 (graphite_test_dependence): Declared.
6117 * Makefile.in (graphite-data-ref.o): New target.
6118
61192008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6120
6121 * Merge from mainline (139870:140164).
6122
61232008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6124
6125 * Merge from mainline (138275:139870).
6c9df8cb 6126 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
c6bb733d 6127 the commits from trunk broke the niter detection.
6128
61292008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6130
6131 * graphite.c: Add more documentation. Fix formatting.
6132 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6133 loop_iv_stack_debug): Moved...
6134 (schedule_to_scattering): Move before use.
6135 (dot_all_scops): Include in "#if 0" the code for system
6136 call dotty.
6137
6138 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6139 loop_iv_stack_debug): ...here.
6140
61412008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6142
6143 * tree-phinodes.c (make_phi_node): Extern.
6144 (add_phi_node_to_bb): New.
6145 (create_phi_node): Call add_phi_node_to_bb.
6146 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6147 (remove_statement): Handle case where stored phi was updated
6148 and is no longer the same.
6149 * graphite.c (is_parameter): New.
6150 (is_old_iv): New.
6151 (expand_scalar_variables_expr): New.
6152 (expand_scalar_variables_stmt): New.
6153 (expand_scalar_variables): New.
6154 (move_phi_nodes): Create new phi instead of moving old one.
6155 (translate_clast): Call expand_scalar_variables.
6156 (find_vdef_for_var_in_bb): Also scan regular definitions.
6157 (skip_phi_defs): New.
6158 (collect_scop_exit_phi_args): New.
6159 (patch_scop_exit_phi_args): New.
6160 (gloog): Patch phis after scop.
6161 * tree-flow.h: (add_phi_node_to_bb): Declared.
6162 (make_phi_node): Declared.
6163
61642008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6165
6166 * graphite.c (end_scop): Split the entry of the scop when it
6167 is the header of the loop in which the scop is ending.
6168 (build_scops_1, limit_scops): Update uses of end_scop.
6169
61702008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6171
6172 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6173 SCOP_ENTRY or SCOP_EXIT.
6174
61752008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6176
6177 * graphite.c (get_construction_edge): Removed.
6178 (gloog): Construction edge is the scop entry edge.
6179
61802008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6181
6182 * graphite.c (can_generate_for_scop): Removed.
6183 (gloog): Do not call it.
6184
61852008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6186
6187 * graphite.c (new_scop): Entry of a scop is an edge.
6188 Initialize SESE region.
6189 (free_scop): Free SESE region.
6190 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6191 (split_difficult_bb): New, split from end_scop.
6192 (end_scop): Exit of a scop is an edge.
6193 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6194 not automatically updated and thus is always wrong.
6195 * graphite.h (struct sese): New.
6196 (SESE_ENTRY): New.
6197 (SESE_EXIT): New.
6198 (struct scop): New field for a SESE region. Remove entry, exit.
6199 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6200 semantics as before. Moved comment around.
6201
62022008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6203 Sebastian Pop <sebastian.pop@amd.com>
6204
6205 * graphite.c (graphite_transform_loops): Always enable gloog
6206 and find_transform when ENABLE_CHECKING.
6207
62082008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6209
6210 * graphite.c (graphite_transform_loops): Move pretty printer
6211 of SCOPs before doing any transform. Remove call to print_scops
6212 and dot_all_scops_1.
6213
62142008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6215
6216 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6217 (print_graphite_bb): Same.
6218
62192008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6220
6221 * graphite.c (dot_all_scops_1): Cleanup.
6222 (move_scops): Fix comment.
6223
62242008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6225
6226 * graphite.c (build_scop_bbs): Revert commit 139355:
6227
6228 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6229 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6230
6231 * graphite.c (build_scop_bbs): Factor up code.
6232
62332008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6234
6235 * graphite.c (gloog): Update dominator info.
6236
62372008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6238
6239 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6240
62412008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6242
6243 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6244 initialization.
6245 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6246 (translate_clast): Correct formatting.
6247 * graphite.h (struct num_map): Removed.
6248 (struct graphite_bb): Remove num_map field.
6249 (GBB_INDEX_TO_NUM_MAP): Removed.
6250
62512008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6252
6253 * graphite.c (build_access_matrix_with_af): Fix comments.
6254 (build_scop_data_accesses): Same.
6255
62562008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6257
6258 * graphite.c (build_scop_data_accesses): Don't construct
6259 access matrices. Add a FIXME and an assert condition that
6260 should pass when the access matrices will be needed.
6261
62622008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6263
6264 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6265 really_constant_p.
6266 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6267 Moved close by free_graphite_bb.
6268 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6269 (new_scop): Move close by free_scop.
6270 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6271
62722008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6273
6274 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6275 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6276 instead of recursive call.
6277 (graphite_translate_clast_equation): New.
6278 (graphite_create_guard_cond_expr): New.
6279 (graphite_create_new_guard): New.
6280 (get_stack_index_from_iv): Removed.
6281 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6282 (get_true_edge_from_guard_bb): New.
6283 (translate_clast): Handle stmt_guard in clast.
6284 (get_construction_edge): Allow construction edge detection for
6285 a scope entry with multiple predecessors if one predecessor is
6286 the immediate dominator of scope entry.
6287 (can_generate_code_stmt): Enable code generation for clast_guard.
6288 (gloog): Use correct context loop. Removed check for post dominators.
6289 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6290
62912008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6292
6293 * graphite.c (remove_dead_loops): Document better which
6294 loops are removed.
6295
62962008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6297
6298 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6299 and PPLINC.
6300 (graphite.o): Also depends on pointer-set.h.
6301
63022008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6303
6304 * graphite.c (scop_record_loop): Fix compile warning.
6305
63062008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6307 Sebastian Pop <sebastian.pop@amd.com>
6308
6309 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6310
63112008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6312
6313 * graphite.c (build_graphite_bb): Initialize bb->aux to
6314 point to the graphite_bb_p.
6315 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6316 content of bb->aux.
6317 (add_bb_domains): Does not use the scop parameter.
6318 (graphite_transform_loops): Clean bb->aux at the end.
6319
63202008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6321 Sebastian Pop <sebastian.pop@amd.com>
6322
6c9df8cb 6323 * lib/target-supports.exp
c6bb733d 6324 (check_effective_target_fgraphite): New.
6325
6c9df8cb 6326 * gcc.dg/graphite/graphite.exp: Early exit when
c6bb733d 6327 check_effective_target_fgraphite returns false.
6328 Set dg-do-what-default to compile.
6329 (scan-graphite-dump-times): Removed.
6c9df8cb 6330 * gfortran.dg/graphite/graphite.exp: Same.
c6bb733d 6331
6c9df8cb 6332 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
c6bb733d 6333 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6c9df8cb 6334 * gcc.dg/graphite/scop-1.c: Same.
6335 * gcc.dg/graphite/scop-2.c: Same.
6336 * gcc.dg/graphite/scop-3.c: Same.
6337 * gcc.dg/graphite/scop-4.c: Same.
6338 * gcc.dg/graphite/scop-5.c: Same.
6339 * gcc.dg/graphite/scop-6.c: Same.
6340 * gcc.dg/graphite/scop-7.c: Same.
6341 * gcc.dg/graphite/scop-8.c: Same.
6342 * gcc.dg/graphite/scop-9.c: Same.
6343 * gcc.dg/graphite/scop-10.c: Same.
6344 * gcc.dg/graphite/scop-11.c: Same.
6345 * gcc.dg/graphite/scop-12.c: Same.
6346 * gcc.dg/graphite/scop-13.c: Same.
6347 * gcc.dg/graphite/scop-matmult.c: Same.
6348 * gcc.dg/graphite/scop-14.c: Same.
6349 * gcc.dg/graphite/scop-15.c: Same.
6350 * gcc.dg/graphite/block-0.c: Same.
6351 * gcc.dg/graphite/scop-16.c: Same.
6352 * gcc.dg/graphite/block-1.c: Same.
6353 * gcc.dg/graphite/scop-17.c: Same.
6354 * gcc.dg/graphite/scop-18.c: Same.
6355 * gfortran.dg/graphite/block-1.f90: Same.
6356 * gfortran.dg/graphite/scop-1.f: Same.
6357 * gfortran.dg/graphite/block-2.f: Same.
c6bb733d 6358
63592008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6360
6361 * graphite.c: Fix some XXX comments.
6362 (build_scop_dynamic_schedules): Removed.
6363
63642008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6365
6366 * graphite.h (scop_max_loop_depth): Moved...
6367 * graphite.c (scop_max_loop_depth): ...here.
6368 (remove_all_edges_1): New.
6369 (remove_all_edges): Factored code.
6370 (remove_cond_exprs): Check only the last statement for
6371 a GIMPLE_COND expression.
6372
63732008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6374
6375 * graphite.c (scan_tree_for_params): Early return when the
6376 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6377 (find_scop_parameters): Factor out code.
6378 (graphite_trans_bb_strip_mine): Remove dead code.
6379
63802008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6381
6382 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6383 graphite_trans_bb_move_loop): Factor asserts.
6384 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6385 Do not call calculate_dominance_info and estimate_bb_frequencies.
6386
63872008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6388
6389 * graphite.c (create_loops_mapping, free_loops_mapping,
6390 create_loops_mapping_num, debug_loop_mapping_1,
6391 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6392 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6393 graphite_loops_mapping_add_child_num,
6394 graphite_loops_mapping_insert_child,
6395 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6396 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6397 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6398 create_num_from_index, get_num_from_index,
6399 swap_loop_mapped_depth): Removed.
6400 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6401 (free_scop): Do not call free_loops_mapping.
6402 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6403 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6404 get_loop_mapped_depth.
6405 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6406 (graphite_trans_bb_strip_mine): Same.
6407 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6408 (struct scop): Remove field loops_mapping.
6409
64102008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6411 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6412
6413 * graphite.c (scop_record_loop): Factor out one level of the
6414 condition by early return.
6415 (build_scop_loop_nests): Format following FSF coding style.
6416 (build_scop_dynamic_schedules): Factor out code.
6417 (scopdet_bb_info): Reindent. Default case should not be reachable.
6418
64192008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6420 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6421
6422 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6423 assignments that are not handled as simple operands for now.
6424
64252008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6426 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6427
6428 * graphite.c (build_scop_bbs): Factor up code.
6429
64302008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6431 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6432
6433 * graphite.c (stmt_simple_for_scop_p): Factor code out
6434 of the loop.
6435 (enum gbb_type): New. Group all the GBB_* types under it.
6436 (is_loop_exit): Moved...
6437 (end_scop): Enable BB spliting.
6438 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6439 * cfgloop.h (is_loop_exit): Declared.
6440
64412008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6442
6443 * doc/invoke.texi: Remove strides from examples containing
6444 DO loops when the strides are equal to 1.
6445
64462008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6447 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6448
6449 * graphite.c (graphite_trans_scop_block): Or the result with
6450 the result from graphite_trans_loop_block.
6c9df8cb 6451 * gcc.dg/graphite/block-1.c: New.
6452 * gfortran.dg/graphite/block-1.f90: New.
6453 * gfortran.dg/graphite/block-2.f: New.
c6bb733d 6454
64552008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6456
6457 * graphite.c (graphite_transform_loops): Call cloog_initialize
6458 and cloog_finalize.
6459
64602008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6461
6462 * tree-data-ref.c) (stmt_simple_memref_p): New.
6463 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6464 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6465 (is_simple_operand): Call stmt_simple_memref_p.
6466
6c9df8cb 6467 * gcc.dg/graphite/scop-matmult.c: Updated for not
c6bb733d 6468 using pointer arithmetic, as this is optimized by PRE and
6469 makes the code too difficult to analyze.
6470
6c9df8cb 6471 * gcc.dg/graphite/scop-18.c: Same.
c6bb733d 6472
64732008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6474
6475 * gdbinit.in (pgg): New.
6476
64772008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6478
6479 * graphite.c (graphite_trans_loop_block): Fix warning.
6480
64812008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6482
6483 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6484
64852008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6486
6487 * graphite.c (graphite_trans_bb_block): Remove check for
6488 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6489 Check if loop blocking is profitable for every loop, before applying
6490 the changes.
6491 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6492 if flag_loop_block is set.
6493
64942008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6495
6496 * graphite.c: Add some more documentation for the loop
6497 mapping.
6498
64992008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6500
6501 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6502 * graphite.c: Format on less than 80 columns.
6503 * graphite.h: Same.
6504
65052008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6506
6507 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6508
65092008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6510
6511 * doc/invoke.texi (floop-block, floop-strip-mine,
6512 floop-interchange): Update documentation with examples.
6513
65142008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6515
6516 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6517 add_referenced_var.
6518 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6519
65202008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6521
6522 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6523 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6524 * tree-scalar-evolution.c: Revert useless changes.
6525 * tree-phinodes.c: Same.
6526 * cfghooks.c: Same.
6527 * vec.h: Same.
6528 * tree-vectorizer.h: Same.
6529 * tree-flow.h: Same.
6530 * tree-cfg.c: Same.
6531 * common.opt (fgraphite): Update documentation.
6532
65332008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6534
6535 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6536 -floop-interchange): Add more text for explaining what each of these
6537 flags is doing.
6538 * tree-into-ssa.c (gimple_vec): Moved to...
6539 * graphite.c: Include gimple.h.
6540 (gimple_vec): Moved to...
6541 (del_loop_to_cloog_loop): Removed.
6542 (loop_affine_expr): Do not call create_data_ref when the
6543 operand is a constant.
6544 (new_scop): Use free instead of del_loop_to_cloog_loop.
6545 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6546 * gimple.h (gimple_vec): ... here.
6547
65482008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6549
6550 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6551 latch executions.
6552 (build_loop_iteration_domains): Fail, if latch executions unknown.
6553
65542008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6555
6556 * graphite.c (add_conditions_to_domain): New.
6557 (build_scop_conditions_1): Call add_conditions_to_domain.
6558 (set_cloog_options): Allow to disable optimizations.
6559
65602008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6561
6562 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6563 Do not use walk_dominator_tree.
6564 (find_scop_parameters): Do not use walk_dominator_tree.
6565
65662008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6567
6568 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6569 (idx_record_params): Adapt.
6570 * graphite.h (scop_gimple_loop_depth): New.
6571
65722008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6573
6574 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6575 (scan_tree_for_params): Remove value_init.
6576 (build_scop_context): Remove value_init.
6577 (build_loop_iteration_domains): Remove value_init.
6578 (schedule_to_scattering): Remove value_init.
6579 (graphite_trans_bb_strip_mine): Remove value_init.
6580
65812008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6582
6583 * gcc/graphite.c (limit_scops): New.
6584 (graphite_transform_loops): Add limit SCoPs.
6c9df8cb 6585 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6586 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6587 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6588 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6589 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6590 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6591 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6592 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6593 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
c6bb733d 6594 Change loop numbers.
6c9df8cb 6595 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
c6bb733d 6596 Change loop numbers.
6c9df8cb 6597 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6598 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6599 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6600 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6601 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6602 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6603 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6604 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6605 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6606 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
c6bb733d 6607
66082008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6609
6610 * graphite.c (graphite_transform_loops): Call always find_transform.
6611
66122008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6613
6614 * graphite.c (free_loops_mapping): New.
6615 (stmt_simple_for_scop_p): Fix typo.
6616 (stmt_simple_for_scop_p): Fix tuples functions, that
6617 broke polyhedron.
6618 (free_graphite_bb): Fix some memleaks.
6619 (free_scop): Fix some memleaks.
6620 (scopdet_bb_info): Do not forget some tmp SCoPs.
6621 (find_params_in_bb): Fix some memleaks.
6622 (clast_to_gcc_expression): Fix warning.
6623
66242008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6625
6c9df8cb 6626 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6627 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
c6bb733d 6628
66292008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6630
6631 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6632 Move code ifdef-ed HAVE_cloog...
6633 * graphite.c: Include toplev.h.
6634 ... here.
6635 * Makefile.in (OBJS-common): Always build graphite.o.
6636 (BACKEND): Remove @GRAPHITE@.
6637 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6638 (graphite.o): Depend on TOPLEV_H.
6639
66402008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6641
6642 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6643 Remove typo left from polylib to ppl conversion.
6644 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6645
66462008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6647
6648 * toplev.c (process_options): Move the graphite loop optimization
6649 flags...
6650 * tree-ssa-loop.c (graphite_transforms): ... here.
6651 When not configured with CLooG, print to dump_file that
6652 Graphite transforms were not performed.
6c9df8cb 6653 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
c6bb733d 6654 New.
6c9df8cb 6655 * gcc.dg/graphite/*.c: Updated all testcases to use
c6bb733d 6656 scan-graphite-dump-times.
6657
66582008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6659
6660 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6661 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6662
66632008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6664 Jan Sjodin <jan.sjodin@amd.com>
6665
6666 * configure: Regenerated.
6667 * omp-low.c (expand_omp_sections): Remove now unused code.
6668 * config.in (HAVE_polylib): Removed.
6669 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6670 (PPLLIBS, PPLINC): Added.
6671 * graphite.c: Replace unsigned with int wherever possible.
6672 Don't access Cloog's data structures, but use accessor functions.
6673 Clast's stmt->type is now implemented as a vtable: change the
6674 switches of stmt->type into ifs.
6675 (polylib/polylibgmp.h): Don't include.
6676 (initialize_dependence_polyhedron,
6677 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6678 statement_precedes_p, test_dependence, build_rdg_all_levels,
6679 dump_dependence_graph): Removed until this code is cleaned up
6680 or ported to Cloog.
6681 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6682 (POLYLIBINC): Renamed PPLINC.
6683
66842008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6685 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6686 Jan Sjodin <jan.sjodin@amd.com>
6687
6688 Finish the merge and tuplification of graphite.
6689
66902008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6691 Jan Sjodin <jan.sjodin@amd.com>
6692
6693 Partial merge from mainline (138072:138275).
6694 * graphite.c still has to be tuplified.
6695
66962008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6697
6698 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6699 (create_num_from_index): New.
6700 (get_num_from_index): Also pass in the graphite BB.
6701 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6702 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6703 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6704 (is_interchange_valid): Return false when failing.
6705 * graphite.h (struct num_map): New.
6706 (struct graphite_bb): New field num_map.
6707 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6708
67092008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6710
6711 * graphite.c (dump_gbb_conditions): Print also conditions like
6712 "if (a)". Remove dublicated code and use print_generic_expr ().
6713 (stmt_simple_for_scop_p): Only allow conditions we can handle
6714 {<, <=, >, >=}.
6715
67162008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6717
6718 * graphite.h (struct scop): Removed new_ivs field.
6719 (SCOP_NEWIVS): Deleted.
6720 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6721 clast_to_gcc_expression, graphite_create_new_loop):
6722 Removed use of new_ivs.
6723
67242008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6725
6726 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6727 create_loops_mapping_num, debug_loop_mapping_1): New.
6728 (debug_loop_mapping): Call debug_loop_mapping_1.
6729 (get_loop_mapping_for_num,
6730 graphite_loops_mapping_add_child,
6731 graphite_loops_mapping_add_child_num,
6732 graphite_loops_mapping_insert_child,
6733 graphite_loops_mapping_parent,
6734 split_loop_mapped_depth_for_num,
6735 loop_mapped_depth_split_loop): New.
6736 (increment_loop_mapped_depths): Removed.
6737 (swap_loop_mapped_depth_for_num): Reimplemented.
6738 (new_scop): Call create_loops_mapping.
6739 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6740 (translate_clast): Pass the old loop father in parameter, and pass
6741 it to get_old_iv_from_ssa_name.
6742 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6743 can_generate_code, can_generate_for_scop): New.
6744 (graphite_trans_bb_block): Returns false when it fails to transform.
6745 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6746
67472008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6748
6749 Reverted all the changes related to the streamization and
6750 loop fusion.
6751 These changes are now tracked in the streamization branch.
6752
67532008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6754 Jan Sjodin <jan.sjodin@amd.com>
6755
6756 * graphite.c (gbb_compare): Correctly constify.
6757 (gbb_can_be_ignored): Indent.
6758 (graphite_trans_scop_swap_1and2): Add legality check.
6759 Remove dead FIXMEs.
6760
67612008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6762
6763 Remove fallouts from "Reverted the Condate changes".
6764 * tree.h: Remove unused decl.
6c9df8cb 6765 * gcc.dg/tree-checker: Same.
c6bb733d 6766 * timevar.def: Remove counter.
6767
67682008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6769
6770 * Merge from mainline (135673:138072).
6771
6772 Reverted the MIRO changes (from 2008-04-05) that are now
6773 tracked in the miro branch.
6774 * tree-bounds.c: Removed.
6775 * tree-bounds.h: Removed.
6776
6777 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6778 are now tracked in the condate branch.
6779 * tree-check.c: Removed.
6780 * tree-match.c: Removed.
6781 * condate.y: Removed.
6782
67832008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6784
6785 * common.opt: New user flag -floop-block, -floop-strip-mine
6786 and -floop-interchange.
6787 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6788 graphite loop optimization flags is turned on.
6789 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6790 flag_loop_strip_mine and flag_loop_interchange checks before
6791 optimizations.
6792 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6793 -floop-strip-mine and -floop-interchange.
6c9df8cb 6794 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
c6bb733d 6795 -fgraphite.
6c9df8cb 6796 * gcc.dg/graphite/scop-16.c: Ditto.
6797 * gcc.dg/graphite/scop-17.c: Ditto.
6798 * gcc.dg/graphite/scop-18.c: Ditto.
c6bb733d 6799
68002008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6801 Sebastian Pop <sebastian.pop@amd.com>
6802
6803 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6804 (create_empty_loop_on_edge): More fixes.
6805 * tree-phinodes.c (resize_phi_node): Extern.
6806 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6807 * cfghooks.c (update_dominator_information): New split from
6808 split_edge.
6809 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6810 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6811 successor of the function entry block.
6812
6813 * graphite.c: Include pointer-set.h.
6814 (debug_loop_mapping, increment_loop_mapped_depths,
6815 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6816 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6817 swap_loop_mapped_depth_for_num, get_num_from_index,
6818 swap_loop_mapped_depth, loop_iv_stack_debug,
6819 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6820 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6821 get_old_iv_from_ssa_name): New.
6822 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6823 (free_scop): Free SCOP_LOOPS_MAPPING.
6824 (scop_record_loop): Record old ivs.
6825 (create_var_name): Removed.
6826 (initialize_cloog_names): Allocate double space in case strip mine
6827 applies to all loops once.
6828 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6829 (clast_to_gcc_expression): Same. Implement more clast to gimple
6830 translation.
6831 (graphite_create_new_loop): Pass in ivstack.
6832 (remove_all_edges): Pass in the construction_edge.
6833 (graphite_remove_iv): Removed.
6834 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6835 remove_cond_exprs): Rewritten.
6836 (move_phi_nodes): New.
6837 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6838 (translate_clast): Pass in ivstack. Rewrite some cases.
6839 (set_cloog_options, debug_clast_stmt): New.
6840 (find_transform): Use set_cloog_options.
6841 (outermost_loop_layer): Removed.
6842 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6843 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6844 mark_old_loops, remove_dead_loops): New.
6845 (gloog): Rewritten.
6846 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6847 (const_column_index, get_first_matching_sign_row_index,
6848 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6849 get_upper_bound): New.
6850 (graphite_trans_bb_strip_mine): Also update the iv map.
6851
6852 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6853 (struct name_tree): Add a loop field.
6854 (struct scop): Add a graphite_loops_mapping field.
6855 (SCOP_LOOPS_MAPPING): New.
6856 (debug_clast_stmt): Declare.
6857 * lambda.h (find_induction_var_from_exit_cond): Declare.
6858 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6859 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6860 (create_empty_loop_on_edge): Updated.
6861 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6862 rename_variables_in_bb): Declare.
6863 * tree-cfg.c (remove_bb): Extern.
6864
6c9df8cb 6865 * gcc.dg/graphite/block-0.c: New.
c6bb733d 6866
68672008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6868 Sebastian Pop <sebastian.pop@amd.com>
6869
6870 * graphite.c (strip_mine_profitable_p): New.
6871 (graphite_trans_bb_block): Disable strip mining if not profitable.
6872
6c9df8cb 6873 * gcc.dg/graphite/scop-18.c: New.
6874 * gcc.dg/graphite/scop-17.c: Fixed.
6875 * gcc.dg/graphite/scop-16.c: Fixed.
c6bb733d 6876
68772008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6878 Jan Sjodin <jan.sjodin@amd.com>
6879 Sebastian Pop <sebastian.pop@amd.com>
6880
6881 * graphite.c (is_interchange_valid): New.
6882 (graphite_trans_bb_block): Check loop nest of basic block for legality
6883 of interchange.
6884
6885 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6886 outer_most_loop, gbb_outer_most_loop_index): New.
6887
6888 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6889 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6c9df8cb 6890 * gcc.dg/graphite/scop-16.c: New.
6891 * gcc.dg/graphite/scop-17.c: New.
c6bb733d 6892
68932008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6894
6895 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6896 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6897
68982008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6899
6900 * graphite.c (new_scop): Initialize SCOP_EXIT.
6901 (scopdet_info): Add.
6902 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6903 (build_scops_1): Cleanup, bugfixes.
6904 (build_scops): Cleanup.
6905
6c9df8cb 6906 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6907 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
c6bb733d 6908
69092008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6910
6c9df8cb 6911 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
c6bb733d 6912
6c9df8cb 6913 * gfortran.dg/graphite/graphite.exp: Use
c6bb733d 6914 DEFAULT_GRAPHITE_FLAGS.
6915
6c9df8cb 6916 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
c6bb733d 6917
69182008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6919
6920 * graphite.c (scan_tree_for_params): Do not assert any more if
6921 MULT_EXPR parameter is negative.
6922
6c9df8cb 6923 * gfortran.dg/graphite/scop-1.f: New.
c6bb733d 6924
6c9df8cb 6925 * gfortran.dg/graphite/graphite.exp: New.
c6bb733d 6926
6c9df8cb 6927 * gcc.dg/graphite/scop-15.c: New.
c6bb733d 6928
69292008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6930
6931 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6932
69332008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6934
6935 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6936 graphite_swap_loops.
6937 (graphite_trans_bb_move_loop): New.
6938 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6939 (graphite_trans_bb_block): New.
6940 (graphite_trans_loop_block): New.
6941 (graphite_trans_scop_swap_1and2): Rename from
6942 graphite_trans_swap_1and2.
6943 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6944 (graphite_trans_scop_block): New.
6945 (graphite_apply_transformations): Rename from
6946 graphite_transformations.
6947
6c9df8cb 6948 * gcc.dg/graphite/scop-matmult.c: New.
c6bb733d 6949
69502008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6951
6952 * graphite.c (gbb_compare): New.
6953 (graphite_sort_gbbs): New.
6954 (gbb_can_be_ignored): New.
6955 (scop_remove_ignoreable_gbbs): New.
6956 (graphite_transformations): Cleanup and add
6957 scop_remove_ignoreable_gbbs.
6958 * lambda.h (lambda_vector_compare): New.
6959
69602008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6961
6962 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6963 (graphite_swap_loops): int -> unsigned
6964 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6965 (graphite_transformations): New.
6966 (graphite_transform_loops): Move to graphite_transformations.
6967 * graphite.h (gbb_nb_loops): Return unsigned.
6968
69692008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6970
6971 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6972 the domain matrix. This makes scop-0.c work again.
6973
69742008-06-20 Richard Guenther <rguenther@suse.de>
6975
6976 * graphite.h: Adjust copyright to GPLv3.
6977 * graphite.c: Likewise.
6978 (stmt_simple_memref_for_scop_p): Split out from ...
6979 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6980 and simplify.
6981 (get_bb_type): Optimize.
6982 (is_pred): Remove.
6983 (is_bb_addable): Fix memleak, replace is_pred call with
6984 single_pred.
6985 (build_scops): Use current_loops.
6986 (param_index): Fix memleak.
6987
69882008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6989
6990 * graphite.c: Fix formatting.
6991
69922008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6993
6994 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6995 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6996 (create_var_name, save_var_name): Newly defined functions.
6997 (initialize_cloog_names): Part of the code factored out to
6998 save_var_name.
6999 (clast_to_gcc_expression): Now handles the case of clast_red_sum
7000 in clast_reduction statement.
7001 (graphite_create_new_loop): Now takes a new parameter
7002 for outer_loop.
7003 (translate_clast): Now also takes the context_loop and bb_exit
7004 parameters. Rewritten the code so that it creates a gimple code
7005 inside the given context.
7006 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7007 remove_cond_expr, disconnect_cond_expr,
7008 disconnect_virtual_phi_nodes): Newly defined functions.
7009 * graphite.h (struct scop): added old_ivs vector.
7010 SCOP_OLDIVS: New macro.
7011
70122008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7013
7014 * cfgloopmanip.c: Add missing function comments, fix formatting.
7015
70162008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7017
7018 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7019 (create_empty_loop_on_edge): Defined.
7020 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7021 instead of void.
7022 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7023 (update_dominators_in_loop): Declared as extern
7024 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7025
70262008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7027
7028 * graphite.c (print_graphite_bb): Allow changing number of loops
7029 in SCoP domain.
7030 (initialize_cloog_names): Allow changing number of loops.
7031 (build_cloog_prog): Simplify.
7032 (find_transform): Enable cloog option --strides.
7033 (graphite_swap_loops): New.
7034 (graphite_strip_mine_loop): New.
7035 (graphite_trans_swap_1and2): New.
7036 (graphite_trans_strip): New.
7037 (graphite_transform_loops): Add graphite_trans_strip.
7038 * graphite.h (scop_max_loop_depth): New.
7039
70402008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7041
7042 * graphite.c (build_scop_iteration_domain): Remove forgotten
7043 line. (Fixes compile)
7044
70452008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7046
7047 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7048 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7049 (build_bb_loops): New.
7050 (graphite_transform_loops): Add build_bb_loops.
7051 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7052 numbers.
7053 * graphite.h (graphite_bb): Add loops.
7054 (gbb_nb_loops): New.
7055 (gbb_loop_at_index): New.
7056 (gbb_loop_index): New.
7057 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7058 using nb_params_in_scop.
7059
70602008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7061
7062 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7063 (build_scop_canonical_schedules): Build minimized schedule.
7064 (schedule_to_scattering): Adapt to minimized schedule.
7065 * graphite.h (graphite_bb): Add/Update descriptions.
7066
70672008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7068 Tobias Grosser <grosser@fim.uni-passau.de>
7069
7070 * graphite.c (print_graphite_bb): Add condition printing.
7071 (dump_value): New.
7072 (dump_gbb_conditions): New.
7073 (build_scop_conditions_1): New.
7074 (build_scop_conditions): New.
7075 * graphite.h (graphite_bb): Add conditions.
7076
70772008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7078
7079 * graphite.c (print_graphite_bb):
7080 (free_graphite_bb): New.
7081 (free_scop): Free bbs.
7082 (get_bb_type): Free doms.
7083 (build_scop_context): Free context matrix.
7084 (build_loop_iteration_domains): Remove unused code.
7085 (build_cloog_prog): Free scattering function and blocklist.
7086 (find_transform): Free options.
7087
70882008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7089
7090 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7091 Remove unnecessery cloog data structures. Make a copy of the domain
7092 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7093 unnecessary cloog data structures. Fix memory leaks. Remove insert
7094 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7095 used.
7096 (build_scop_iteration_domain): Remove unnecessary cloog
7097 data structures. Fix memory leaks.
7098 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7099 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7100
71012008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7102
7103 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7104
71052008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7106
7107 * graphite.c (end_scop): Style fix.
7108 (schedule_to_scattering): Style and comment fix.
7109
71102008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7111 * graphite.c (print_graphite_bb): Fix definiton of
7112 schedule_to_scattering.
7113 (initialize_cloog_names): Change nb_scattdims to max loop
7114 depth in SCoP.
7115 (schedule_to_scattering): Take parameter for number of scattering
7116 dimensions.
7117 (build_cloog_prog): Only build as much scattering dimensions as
7118 necessary.
7119
71202008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7121
7122 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7123 in polyhedron/aermod.f90.
7124
71252008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7126 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7127 Harsha Jagasia <harsha.jagasia@amd.com>
7128
7129 * graphite.c (is_bb_addable): Fix segfault.
7130
71312008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7132
7133 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7134 with multiple exits and conditional handling in edge cases.
7135 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7136
6c9df8cb 7137 * gcc.dg/graphite/scop-14.c: New.
c6bb733d 7138
71392008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7140 Adrien Eliche <aeliche@isty.uvsq.fr>
7141
7142 * graphite.c (is_bb_addable): Add more comments and enhance
7143 readablity of the source code. Fix memory leak.
7144 (is_loop_exit): Fix memory leak.
7145
71462008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7147
7148 * graphite.c (first_loop_in_scop): Deleted.
7149 (setup_cloog_loop): Only walk the loop chain for inner loops.
7150 (build_scop_iteration_domain): Execute setup_cloog_loop for
7151 all loops in the first layer.
7152
71532008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7154
7155 * graphite.c (scan_tree_for_params): Change the way params are
7156 added to be indepenent of the number of loops.
7157 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7158 handling.
7159 (build_cloog_prog): Revert to short matrix format.
7160
71612008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7162 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7163
7164 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7165 warning.
7166
71672008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7168
7169 * graphite.c (nb_data_refs_in_scop): New.
7170 (graphite_transform_loops): Print more stats: number of
7171 loops, basic blocks and data references per scop.
7172
71732008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7174 Jan Sjodin <jan.sjodin@amd.com>
7175
7176 * graphite.c (loop_affine_expr, idx_record_params,
7177 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7178 instead of instantiate_parameters.
7179
71802008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7181
7182 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7183 add support for parameters, add STATIC_SCHEDULE at the right places,
7184 cleanup.
7185
71862008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7187
7188 * graphite.c (build_scop_loop_nests): Only add the loops, that
7189 are contained completely in the SCoP.
7190 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7191 and the domains are fixed.
7192 (build_scop_canonical_schedules): Add support for bbs not contained
7193 in any SCoP.
7194
71952008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7196
7197 * graphite.h (scop_contains_loop): Update comments to match
7198 the actual behavior.
7199 (scop_contains_loop): New.
7200 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7201
72022008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7203
7204 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7205 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7206 as GBB_COND_HEADER.
7207
72082008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7209 Tobias Grosser <grosser@fim.uni-passau.de>
7210
7211 * graphite.c (graphite_transform_loops): Early return when
7212 there are no loops in the function.
7213
72142008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7215 Jan Sjodin <jan.sjodin@amd.com>
7216
7217 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7218 offset of the last loop.
7219 (setup_cloog_loop): Copy the entire outer constraint matrix.
7220
72212008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7222 Jan Sjodin <jan.sjodin@amd.com>
7223
7224 * graphite.c (stmt_in_scop_p, function_parameter_p,
7225 invariant_in_scop_p): Removed.
7226 (scan_tree_for_params): Can be used with no constraint
7227 matrix for gathering parameters.
7228 (idx_record_params): Don't use idx_record_param, instead use
7229 scan_tree_for_params.
7230 (find_scop_parameters): Same.
7231 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7232 Fix the size of loop domains.
7233 (schedule_to_scattering): Exit when the outer loop is not in scop.
7234 (find_transform): Enable build_cloog_prog.
7235
72362008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7237 Jan Sjodin <jan.sjodin@amd.com>
7238
7239 * graphite.c (schedule_to_scattering): Make scattering domains
7240 uniformly of the same size, as required by CLooG 0.14.0 and before.
7241
72422008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7243 Jan Sjodin <jan.sjodin@amd.com>
7244
7245 * graphite.c (schedule_to_scattering): Rewrite, correct the
7246 translation of the scheduling function to scattering.
7247 (build_cloog_prog): Call schedule_to_scattering only once.
7248 * graphite.h (scop_loop_index): Do not fail for loops not
7249 in the scop: return -1.
7250
72512008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7252
7253 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7254 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7255 (setup_cloog_loop): Export GBB_DOMAIN.
7256 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7257 able to rebuild the original control flow.
7258 * graphite.h (graphite_bb): Add domain field and access macro.
7259 (GBB_DOMAIN): New.
7260
72612008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7262
7263 * graphite.c (debug_gbb): New.
7264 (print_scop, build_graphite_bb): Use SCOP_BBS.
7265 (build_scop_bbs): Reimplemented.
7266 (dfs_bb_in_scop_p): Removed.
7267 (build_scop_loop_nests): Reorder loops inserted in
7268 SCOP_LOOP_NEST: outer loops should come first.
7269 (build_scop_canonical_schedules): Reinitialize at zero
7270 the components of the SCOP_STATIC_SCHEDULE for the loops
7271 that have already been parsed.
7272
7273 * graphite.h (debug_gbb): Declared.
7274
72752008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7276 Jan Sjodin <jan.sjodin@amd.com>
7277
7278 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7279 (graphite_loop_to_gcc_loop): Removed.
7280 (remove_all_edges): New.
7281 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7282 (gloog): Remove useless code.
7283
72842008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7285
7286 * graphite.c (get_bb_type): Reworked. We distinguish between
7287 loops with one or multiple exits.
7288 (is_loop_exit): New.
7289 (is_pred): New.
7290 (is_bb_addable): Rework condition handling, now support for case
7291 case statements and loops with multiple exits.
7292
6c9df8cb 7293 * gcc.dg/graphite/scop-11.c: New.
7294 * gcc.dg/graphite/scop-12.c: New.
7295 * gcc.dg/graphite/scop-13.c: New.
c6bb733d 7296
72972008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7298
7299 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7300 we have too many colors.
7301
73022008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7303
7304 * doc/invoke.texi (-ftree-loop-fusion): Document.
7305 * tree-pass.h (pass_loop_fusion): Declared.
7306 * tree-loop-fusion.c: New.
7307 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7308 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7309 * tree-data-ref.h (find_data_references_in_loop): Declared.
7310 * common.opt (ftree-loop-fusion): Declared.
7311 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7312
73132008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7314
7315 * graphite.c (build_access_matrix): Fix typo from the merge.
7316
73172008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7318
7319 * Merge from mainline (130800:135673).
7320
73212008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7322
7323 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7324 Update dominators after splitting.
7325
73262008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7327
7328 * graphite.c (is_bb_addable): Return the harmful statement.
7329 Factor up some code.
7330 (end_scop): New. Splits end of scope bbs on a harmful statement.
7331 (build_scops_1): Call end_scop.
7332
73332008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7334
7335 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7336 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7337 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7338 build_scops_1): Removed.
7339 (build_scops_2): Renamed build_scops_1.
7340
73412008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7342
7343 * graphite.c: Fix formatting.
7344
73452008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7346
7347 * graphite.c (get_bb_type): New.
7348 (move_scops): New.
7349 (build_scops_2): New.
7350 (is_bb_addable): New.
7351 (build_scops): Switch the scop detection.
7352 (build_scop_bbs): Add entry bb to scop.
7353 * graphite.h (struct scop): Update comment.
7354
73552008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7356
7357 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7358 more colors.
7359
73602008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7361
6c9df8cb 7362 * gcc.dg/graphite/scop-1.c: Update.
7363 * gcc.dg/graphite/scop-2.c: Update.
7364 * gcc.dg/graphite/scop-4.c: Update.
7365 * gcc.dg/graphite/scop-5.c: Add.
7366 * gcc.dg/graphite/scop-6.c: Add.
c6bb733d 7367
73682008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7369
6c9df8cb 7370 * gcc.dg/graphite/scop-0.c: Add.
7371 * gcc.dg/graphite/scop-7.c: Add.
7372 * gcc.dg/graphite/scop-8.c: Add.
7373 * gcc.dg/graphite/scop-9.c: Add.
7374 * gcc.dg/graphite/scop-10.c: Add.
c6bb733d 7375
73762008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7377
7378 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7379 Check affine expressions depending on the outermost loop
7380 instead of a scop.
7381 (stmt_simple_for_scop_p): Same.
7382 (harmfule_stmt_in_scop): Same.
7383
73842008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7385
7386 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7387 mark entry and exit, that are not part of the SCoP and update HTML
7388 formatting.
7389
73902008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7391
7392 * graphite.c (basic_block_simple_for_scop_p): Renamed
7393 harmful_stmt_in_bb.
7394 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7395 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7396 (all_preds_visited_p, all_succs_visited_p,
7397 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7398 scop_end_loop): New.
7399 (build_scops): Do not use dfs_enumerate_from.
7400
6c9df8cb 7401 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
c6bb733d 7402
74032008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7404
7405 * graphite.c: Add comments to functions that are missing a
7406 description.
7407 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7408
74092008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7410
7411 * graphite.c (nb_params_in_scop): Moved...
7412 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7413 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7414 (clast_to_gcc_expression): Reduce column size to less than 80.
7415 (graphite_create_iv): Return the new name of the IV.
7416 (find_transform): Set options->esp and options->cpp.
7417 (gloog): Comment out the invalidation of the old loop code.
7418 (initialize_dependence_polyhedron): Replace scop_nb_params with
7419 nb_params_in_scop.
7420
7421 * graphite.h (nb_params_in_scop): ... here.
7422 (scop_nb_params): Removed.
7423 (loop_domain_dim): Return something even when the loop was not
7424 found in the hash table: avoid ICEing on all the graphite.exp
7425 testcases.
7426
74272008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7428
7429 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7430
7431 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7432 according to nesting level.
7433 (find_scop_parameters): Call instantiate_parameters.
7434 (scan_tree_for_params): Extend it to handle general affine bounds.
7435 Inner loop bound can depend on outer loop induction variable.
7436 (setup_cloog_loop): tmp variable is allocated on stack. Call
7437 instantiate_parameters with respect to outermost_loop_in_scop.
7438 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7439 graphite.h.
7440 (create_empty_loop): Function loopify should be given edge
7441 probability, instead of edge frequency. Dominance relation from
7442 switch_bb to loop_header.
7443 (clast_to_gcc_expression): Added handling of clast_reduction node.
7444 (gloog): New functionality for removing old loop.
7445 (test_dependence): Factored out from build_rdg_all_levels.
7446 (build_rdg_all_levels): Dependence testing factored out to
7447 test_dependence function.
7448
7449 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7450 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7451 from graphite.c
7452
74532008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7454
7455 * graphite.c (free_scop, param_index, initialize_cloog_names,
7456 nb_params_in_scop): Use name_tree map instead of just a tree
7457 for keeping track of the variable name associated to that tree.
7458 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7459 clast_to_gcc_expression, graphite_create_iv,
7460 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7461 graphite_stmt_to_gcc_stmt): New.
7462 (gloog): Call these.
7463 * graphite.h (struct name_tree): New.
7464 (struct scop): Use name_tree instead of tree for params.
7465 Store a vector of name_tree for new_ivs.
7466 (SCOP_NEWIVS): New.
7467 (scop_nb_params): Use name_tree instead of tree.
7468
74692008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7470 Sebastian Pop <sebastian.pop@amd.com>
7471
7472 * tree-bounds.c: New.
7473 * tree-bounds.h: New.
7474 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7475 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7476 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7477 flag_mudflap.
7478 * gcc.c: Same.
7479 * toplev.c: Same.
7480 * c-cppbuiltin.c: Same.
7481 * c-pragma.c: Same.
7482 * common.opt: Same.
7483 * varasm.c: Same.
7484 * tree-outof-ssa.c: Same.
7485 * c-common.c: Same.
7486 * Makefile.in: Same.
7487
74882008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7489 Sebastian Pop <sebastian.pop@amd.com>
7490
7491 * tree-loop-distribution.c (remaining_stmts,
7492 upstream_mem_writes): Removed static variables.
7493 (copy_loop_before, create_bb_after_loop,
7494 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7495 rdg_build_components, rdg_build_partitions,
7496 dump_rdg_partitions): Extern.
7497 (generate_loops_for_partition, generate_code_for_partition): Do not
7498 return a bool.
7499 (already_processed_vertex_p, predecessor_has_mem_write,
7500 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7501 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7502 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7503 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7504 Pass remaining_stmts and upstream_mem_writes as parameters.
7505 (rdg_component): Moved...
7506 (build_rdg_partition_for_component): Do not aggregate components when
7507 flag_streamize_loops is set.
7508 (gen_sequential_loops): New.
7509 (ldist_gen): Call gen_sequential_loops.
7510
7511 * tree-pass.h (pass_loop_streamization): Declared.
7512
7513 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7514 basic blocks when loops structures exist.
7515
7516 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7517
7518 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7519
7520 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7521 eliminate_local_variables_stmt, eliminate_local_variables,
7522 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7523 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7524 of code delimited by two edges in the CFG.
7525 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7526 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7527 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7528 the case of parallelisation of reductions.
7529 (create_loop_fn): Extern.
7530 (create_omp_parallel_region): New.
7531
7532 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7533 dump_data_reference for printing dra and drb.
7534 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7535 RDGE_RELATION.
7536 (build_rdg): Don't call free_dependence_relations for the moment, as
7537 we attach dependence relations on each edge of the RDG.
7538 To be fixed later.
7539
7540 * tree-data-ref.h (rdg_component): ...here.
7541 (struct rdg_edge): New field ddr_p relation.
7542 (RDGE_RELATION): New.
7543 (create_bb_after_loop, copy_loop_before,
7544 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7545 rdg_build_partitions, dump_rdg_partitions,
7546 free_rdg_components): Declared.
7547
7548 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7549 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7550
7551 * tree-loop-streamization.c: New.
7552
7553 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7554 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7555
7556 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7557
7558 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7559
7560 * passes.c: Schedule pass_loop_streamization.
7561
75622008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7563
7564 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7565 update comment.
7566
75672008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7568
7569 * graphite.c (dot_all_scops): Update formatting.
7570 Bbs can now be part of more than one SCoP.
7571
75722008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7573
7574 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7575 malloc problems.
7576 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7577 * graphite.h (loop_to_cloog_loop): New.
7578
75792008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7580
7581 * graphite.c (loop_domain_dim, ref_nb_loops,
7582 loop_iteration_vector_dim): New.
7583 (build_access_matrix_with_af, build_access_matrix,
7584 initialize_dependence_polyhedron): Fixed for new matrix layout.
7585 No longer assume that all iteration domains are of the same
7586 dimensionality.
7587
75882008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7589
7590 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7591 defined in a loop at depth 0 is invariant.
7592 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7593 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7594 be called at loop depth 0.
7595
7596 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7597 a parameter.
7598 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7599 (down_open_scop): Removed.
7600 (loop_in_scop_p): Redefined.
7601 (scop_affine_expr): New argument: scop.
7602 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7603 a harmful statement ending a scop.
7604 (basic_block_simple_for_scop_p): New argument: scop.
7605 (get_loop_start): Removed.
7606 (new_scop): Initialize SCOP_LOOPS.
7607 (free_scop): Free SCOP_LOOPS.
7608 (succs_at_same_depth, preds_at_same_depth): New.
7609 (end_scop): Test the validity of a scop.
7610 (add_dominators_to_open_scops): New.
7611 (test_for_scop_bound): Call add_dominators_to_open_scops.
7612 Add cases for opening and closing multiple scops.
7613 (build_scops, build_scop_bbs): Iterate over basic blocks in
7614 depth first order.
7615 (build_graphite_bb): Pass scop directly.
7616 (dfs_bb_in_scop_p): New.
7617 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7618 several times.
7619 (nb_loops_around_gb): Use loop_in_scop_p.
7620 (schedule_to_scattering): Disabled for the moment the code computing
7621 the "textual order for outer loop".
7622
7623 * graphite.h (struct scop): New field loops.
7624 (SCOP_LOOPS): New.
7625 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7626
6c9df8cb 7627 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
c6bb733d 7628
76292008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7630 Sebastian Pop <sebastian.pop@amd.com>
7631
7632 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7633 * common.opt (fstreamize-loops): New.
7634 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7635 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7636 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7637 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7638
76392008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7640
7641 * tree-data-ref.c (build_empty_rdg): New.
7642 (build_rdg): Use it.
7643 * tree-data-ref.h (build_empty_rdg): Declared.
7644 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7645 (find_vertex_for_stmt): Removed.
7646 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7647
76482008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7649
7650 * tree-loop-distribution.c (generate_builtin): After cancelling the
7651 loop tree, also delete basic blocks.
7652 (rdg_flag_uses): Stop recursion when a vertex has already been
7653 processed.
7654
76552008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7656
7657 * graphite.c (build_scop_alpha): Removed.
7658 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7659 and dump_dependence_graph to avoid compiler warnings.
7660
76612008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7662
7663 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7664 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7665 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7666 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7667 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7668 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7669 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7670 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7671 dump_dependence_graph): New.
7672 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7673 (GBB_ALPHA): New.
7674 (struct scop): New field loop2cloog_loop.
7675 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7676 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7677
76782008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7679
7680 * graphite.c (build_graphite_bb): Fix initialization
7681 of the graphite basic block.
7682
76832008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7684
7685 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7686 loop domain matrix. Pass in the number of loops contained in the
7687 constraint matrix.
7688 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7689 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7690 loops that are not surrounding the current loop are not represented
7691 in the domain constraint matrix.
7692 (build_scop_iteration_domain): Initial domain constraint matrix
7693 contains only the eq/ineq, cst, and scop parameters columns.
7694
76952008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7696
7697 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7698 (print_graphite_bb): Print scattering.
7699
77002008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7701
7702 * graphite.c (initialize_cloog_names): Initialize names of
7703 scattering variables.
7704
77052009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7706
7707 * graphite.c (dot_all_scops_1): Disable debug output while
7708 printing graph.
7709
77102008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7711
7712 * graphite.c (find_transform): Change cloog output language to C.
7713
77142008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7715
7716 * tree-loop-distribution.c (generate_memset_zero,
7717 generate_builtin, generate_code_for_partition,
7718 rdg_flag_all_uses): New.
7719 (rdg_flag_uses): Gather in the same partition the statements defining
7720 the VUSES of the current statement.
7721 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7722 Gather in the same partition not only the stores to the same memory
7723 access, but also the reads.
7724 (ldist_generate_loops): Renamed ldist_gen.
7725
77262008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7727 Tobias Grosser <grosser@fmi.uni-passau.de>
7728
7729 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7730 next pointer, don't use the inner pointer.
7731
77322008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7733
7734 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7735 (find_transform): Call dot_all_1.
7736 * graphite.h (dot_all_scops): Declared.
7737
77382007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7739
7740 * tree-loop-distribution.c: Fix apsi.f ICE.
7741 (create_bb_after_loop): New.
7742 (generate_loops_for_partition): Use it.
6c9df8cb 7743 * gfortran.dg/ldist-1.f90: New.
c6bb733d 7744
7745 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7746 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7747
77482007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7749
7750 * graphite.c (find_transform): Dump cloog program sent to cloog.
7751
77522007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7753
7754 * graphite.c (initialize_cloog_names): Initialize cloog
7755 iterator names.
7756
77572007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7758
7759 * graphite.c (build_scop_context): Fix typo, for the matrix
7760 format: insert '0 >= 0' instead of '-1 >= 0'.
7761
77622007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7763
7764 * Fix merge problems.
7765
77662007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7767
7768 * graphite.c (setup_cloog_loop): Fix typo.
7769
77702007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7771
7772 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7773 * tree-loop-distribution.c: Reimplemented.
7774 * tree-pass.h (pass_loop_distribution): New.
7775 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7776 print_loops.
7777 * graphds.h (struct graph): New field indexes.
7778 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7779
7780 * tree-vect-analyze.c: Remove declaration of static functions when not
7781 needed.
7782 * tree-vectorizer.c: Same.
7783 (rename_variables_in_loop): Now extern.
7784 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7785 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7786 calling redirect_edge_and_branch_force.
7787
7788 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7789
7790 * tree-data-ref.c: Don't include tree-chrec.h.
7791 (debug_data_dependence_relations): New.
7792 (dump_data_dependence_relation): Call dump_data_reference on data refs
7793 in the relation.
7794 (same_access_functions): Moved...
7795 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7796 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7797 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7798 struct rdg_vertex_info, ): New.
7799 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7800 at DDR_REVERSED_P.
7801 (create_rdg_vertices): Initialize the htab of graph->indexes.
7802 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7803 (stmts_from_loop): Don't save LABEL_EXPR.
7804 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7805 hash_stmt_vertex_del): New.
7806 (build_rdg): Initialize rdg->indexes.
7807 (free_rdg, stores_from_loop, ref_base_address,
7808 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7809 have_similar_memory_accesses_1, ref_base_address_1,
7810 remove_similar_memory_refs): New.
7811
7812 * tree-data-ref.h: Include tree-chrec.h.
7813 (debug_data_dependence_relations): Declared.
7814 (same_access_functions): ...here. Now static inline.
7815 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7816 ddr_dependence_level): New.
7817 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7818 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7819 RDG_MEM_READS_STMT): New.
7820 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7821 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7822 rdg_vertex_for_stmt): Declared.
7823 (struct rdg_edge): New field level.
7824 (RDGE_LEVEL, free_rdg): New.
7825 (stores_from_loop, remove_similar_memory_refs,
7826 rdg_defs_used_in_other_loops_p,
7827 have_similar_memory_accesses): Declared.
7828 (rdg_has_similar_memory_accesses): New.
7829
7830 * lambda.h (dependence_level): New.
7831 * common.opt (ftree-loop-distribution): New.
7832 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7833 (print_loop_ir): Renamed print_loops.
7834 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7835 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7836 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7837 (tree-loop-distribution.o): Added.
7838 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7839 (mark_virtual_ops_in_bb): New.
7840 (print_loops_bb, debug_loop_num, debug_loop): New.
7841 * passes.c: Scheduled pass_loop_distribution.
7842
78432007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7844
7845 * graphite.c (scan_tree_for_params): Correct the number of columns
7846 for polylib format.
7847 (nb_flat_iterator): New.
7848 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7849 (build_scop_iteration_domain): Correct the number of columns for
7850 polylib format.
7851
78522007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7853
7854 * Merge from mainline (129697:130800).
7855
78562007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7857
7858 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7859 dominated by SCoP's exit.
7860 (graphite_transform_loops): Compute post dominators.
7861
78622007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7863
7864 * Merge from mainline (127169:129697).
7865
78662007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7867
7868 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7869 parameter for the basic block that contains the expression. Use
7870 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7871 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7872 the expression.
7873 * graphite.h (gbb_loop): New.
7874 (GBB_LOOP): Removed.
7875
78762007-08-03 Sebastian Pop <sebpop@gmail.com>
7877
7878 * Makefile.in: Fix merge problem.
7879
78802007-08-03 Sebastian Pop <sebpop@gmail.com>
7881
7882 * Merge from mainline (125309:127169).
7883 * tree-loop-distribution.c: Disabled.
7884
78852007-06-05 Sebastian Pop <sebpop@gmail.com>
7886
7887 * Merge from mainline (r123693:125309).
7888
78892007-05-30 Sebastian Pop <sebpop@gmail.com>
7890
7891 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7892 correct_modify_p
7893 (correct_modify_p, check_statements, number_of_lvalue_uses,
7894 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7895 instead of MODIFY_EXPR.
7896 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7897 and push new edges.
7898
78992007-05-24 Sebastian Pop <sebpop@gmail.com>
7900
7901 * tree-loop-distribution.c (struct rdg): Replace arrays by
7902 VECs for edges and vertices.
7903 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7904 (RDGV_NB_PARTITIONS): New.
7905 (PRDG_NBV, PRDG_NBE): Removed.
7906 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7907 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7908 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7909
79102007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7911 Sebastian Pop <sebpop@gmail.com>
7912
7913 * doc/invoke.texi (-ftree-loop-distribution): Document.
7914 * tree-loop-distribution.c: New file.
7915 * tree-pass.h (pass_loop_distribution): Declared.
7916 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7917 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7918 and set reversed_p.
7919 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7920 (DDR_REVERSED_P): New.
7921 * common.opt (-ftree-loop-distribution): New.
7922 * tree-flow.h (distribute_loops): Declared.
7923 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7924 * passes.c (init_optimization_passes): Schedule loop distribution.
7925
79262007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7927
7928 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7929 (print_scop): Don't print when scop is NULL.
7930 (build_scop_context, find_transform): Don't output to stderr.
7931
79322007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7933
7934 * tree-data-ref.c: Don't include graphite.h.
7935 Comment out the code for printing data reference's scop.
7936 (build_access_matrix_with_af): Moved...
7937 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7938 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7939 (print_graphite_bb): Print basic block's schedule.
7940 (print_scop): Don't print the schedule, call cloog's pretty printer.
7941 (bb_in_scop_p): A basic block is in a scop only if it is both
7942 dominated and postdominated by the scop's entry and exit basic blocks.
7943 (function_parameter_p): New.
7944 (invariant_in_scop_p): Use function_parameter_p.
7945 (new_scop, save_scop): New.
7946 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7947 save_scop.
7948 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7949 (loop_in_scop_p): New.
7950 (scop_record_loop): Use loop_in_scop_p.
7951 (build_scop_domain): Renamed build_scop_iteration_domain.
7952 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7953 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7954 setup_cloog_loop, dot_scop_1, dot_scop): New.
7955 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7956 (struct scop): Add a pointer to cloog's representation of a program.
7957
79582007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7959
7960 * doc/invoke.texi (-ftree-check-verbose): Renamed
7961 -ftree-checks-verbose.
7962 * common.opt (flag_tree_check_verbose): Renamed
7963 flag_tree_checks_verbose.
7964 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7965
79662007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7967
7968 * configure: Regenerated.
7969 * config.in: Regenerated.
7970 * tree-ssa-loop.c (graphite_transforms): Execute
7971 graphite_transform_loops only when HAVE_cloog.
7972 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7973 * graphite.c: Include polylibgmp.h and cloog.h.
7974 (graphite_transform_loops): Removed loops parameter.
7975 * tree-flow.h (graphite_transform_loops): Update declaration.
7976 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7977 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7978 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7979 (OBJS-common): Remove dependence on graphite.o.
7980 (BACKEND): Depend on @GRAPHITE@.
7981
79822007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7983
7984 * doc/invoke.texi (-ftree-check-verbose): Documented.
6c9df8cb 7985 * gcc.dg/tree-checker/tree-checks-1.c: New.
7986 * gcc.dg/tree-checker/tree-checks-2.c: New.
7987 * gcc.dg/tree-checker/tree-checks-3.c: New.
7988 * gcc.dg/tree-checker/tree-checks-4.c: New.
7989 * gcc.dg/tree-checker/tree-checks.exp: New.
7990 * gcc.dg/tree-checker/condates.crp: New.
c6bb733d 7991 * common.opt (ftree-checks-verbose): New.
7992 * tree-check.c (tree_check_warning): Move extra stderr output
7993 under control of flag_tree_check_verbose.
7994
79952007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7996
7997 * tree-match.c: Fix comments formatting.
7998 * tree-match.h: Fix comments formatting.
7999 * tree-check.c: Fix comments formatting.
8000 (tree_check_init): Restructure.
8001
80022007-04-12 Nic Volanschi <nic.volanschi@free.fr>
8003
8004 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8005
80062007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
8007
8008 * Merge from mainline (r120733:123693).
8009
80102007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8011
8012 * condate.y: New file.
8013 * tree-match.h (struct patt_info_s): New field sign.
8014 (struct condate_s): New field msg.
8015 (normalize_condate, name_condate, add_condate): New.
8016 (conds[], condate_parse): Made extern.
8017 * tree-check.c (tree_check_warning): First arg changed to cond;
8018 warning reformatted.
8019 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8020 (tree_scan): New.
8021 (tree_check): Process trivial condates.
8022 (read_delimited_string): Removed.
8023 (print_cond): Print name and msg.
8024 (conds[]): Made extern.
8025 (parse_tree_check_file_once): Rewritten to use the parser in
8026 condate.y.
8027 Processing of option --tree_check_string moved to tree_scan().
8028 * Makefile.in: Added condate.y
8029
80302007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8031
8032 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8033 Use VECs instead of varrays.
8034 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8035 * Makefile.in (pretty-print.o): Depend on vec.h.
8036 * pretty-print.c: Include tree.h and vec.h.
8037 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8038 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8039 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8040 pp_free_list): Use VECs instead of varrays.
8041 * pretty-print.h: Do not include varray.h.
8042 (struct tree_chunk_s): Declaration moved before its use.
8043 (output_buffer): Rename varray field to chunks.
8044 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8045 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8046 save_global_holes): Use VECs instead of varrays.
8047 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8048 * tree-check.c (scan_cfg_stmts, push_node,
8049 print_matching_stmt): Removed.
8050 (tree_check_instance, push_global_holes_if_new, tree_check,
8051 execute_tree_check): Use VECs instead of varrays.
8052 (gate_tree_check): Don't execute the CFG check when basic_block_info
8053 is not available.
8054
80552007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8056
8057 * Merge from mainline (r115016:120733).
8058
80592007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8060
8061 * Merge from mainline (r117632:117661).
8062
80632007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8064
8065 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8066 * tree-pass.h (TDF_DEBUG, debug_p): New.
8067 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8068 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8069 get_loop_exit_condition, analyze_evolution_in_loop,
8070 analyze_initial_condition, analyze_scalar_evolution,
8071 instantiate_parameters, number_of_latch_executions): Use debug_p.
8072 * tree-chrec.c (chrec_apply): Use debug_p.
8073 * tree-data-ref.c: Include graphite.h.
8074 (dump_data_reference): Print also the access matrix.
8075 (analyze_array, analyze_indirect_ref, init_data_ref,
8076 analyze_offset_expr, address_analysis, object_analysis,
8077 create_data_ref, finalize_ddr_dependent,
8078 non_affine_dependence_relation, analyze_ziv_subscript,
8079 analyze_siv_subscript_cst_affine,
8080 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8081 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8082 analyze_miv_subscript, analyze_overlapping_iterations,
8083 build_classic_dist_vector, subscript_dependence_tester,
8084 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8085 (build_access_matrix_with_af): No longer static.
8086 * tree-data-ref.h (scop_p): ... declaration here.
8087 (data_reference.scop): New field.
8088 (DR_SCOP, DR_ACCESS_MATRIX): New.
8089 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8090 * graphite.c (print_graphite_bb): Call dump_data_references.
8091 (print_scop): Use scop_nb_loops and scop_dim_domain.
8092 (test_for_scop_bound): Use debug_p.
8093 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8094 scop_nb_params.
8095 (scop_loop_index): Moved...
8096 (scop_record_loop): New.
8097 (build_scop_loop_nests): Use scop_record_loop.
8098 (build_scop_domain): Use scop_dim_domain.
8099 (build_access_matrix): Implemented.
8100 (build_scop_canonical_schedules): Use scop_nb_loops.
8101 (build_graphite_bb): Initialize GBB_SCOP.
8102 * graphite.h (scop_p): Moved...
8103 (graphite_bb.scop): New field.
8104 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8105 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8106 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8107 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8108 scop_loop_index): New.
8109 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8110
81112007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8112
8113 * Merge from mainline (r117661:120450).
8114
81152006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8116
8117 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8118 at the first declaration outside the varying loop, instantiate as
8119 far as possible.
8120 * tree-chrec.c (for_each_scev_op): New.
8121 * tree-chrec.h (for_each_scev_op): Declared.
8122 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8123 * tree-data-ref.c (get_references_in_stmt,
8124 find_data_references_in_stmt): New, from trunk.
8125 (find_data_references_in_loop): Use get_references_in_stmt
8126 and find_data_references_in_loop, modified as in trunk.
8127 (build_access_matrix_with_af): New.
8128 * tree-data-ref.h (data_reference): Add a field access_matrix.
8129 (data_ref_loc): New, as in trunk.
8130 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8131 invariant_in_scop_p, param_index, scan_tree_for_params,
8132 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8133 idx_record_param, idx_record_params, build_access_matrix,
8134 build_scop_data_accesses, build_scop_canonical_schedules,
8135 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8136 build_scop_params): New.
8137 * graphite.h (graphite_bb): New.
8138 (scop): Add fields static_schedule, params, loop_nest,
8139 iteration_domain.
8140 * lambda.h: Declare vecs of lambda_matrix.
8141 * tree-flow.h (print_loop_ir_bb): Declared.
8142 * tree-cfg.c (print_loop_ir_bb): New.
8143 (print_loop): Use print_loop_ir_bb.
8144
81452006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8146
8147 * Merge from mainline (r115016:117632).
8148
81492006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8150
8151 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8152 break due to a warning.
8153
81542006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8155
8156 * graphite.c (print_scops, debug_scops): New.
8157 (graphite_transform): Renamed graphite_find_transform.
8158 * graphite.h (debug_scops): Declared.
8159
81602006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8161
8162 * tree-match.c: Reformat following the GNU style.
8163 * tree-match.h: Reformat following the GNU style.
8164 * tree-pattern.h: Removed empty file.
8165 * Makefile.in: Remove references to tree-pattern.h.
8166 * tree-check.c: Reformat following the GNU style.
8167 (execute_tree_check): Move gate condition code to...
8168 (gate_tree_check): ...here. New function.
8169 (pass_check): Use the gate function.
8170
81712006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8172
8173 * tree-pattern.h: New. Tree pattern matching and checking using
8174 concrete syntax.
8175 * tree-check.c: New. Tree/CFG checking pass.
8176 * tree-match.c: New. Library for tree pattern matching.
8177 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8178 * toplev.c, flags.h: Add globals for tree-check pass.
8179 * Makefile.in: Integrate the files in tree-check pass.
8180 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8181 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8182 Introduce a "lazy" pretty-print mode.
8183 * tree.c, tree.h: Add tree_name.
8184
81852006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8186
8187 * doc/invoke.texi (-fgraphite): Correct typo.
8188 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8189 use of print_loop_ir.
6c9df8cb 8190 * gcc.dg/graphite/scop-1.c: New.
8191 * gcc.dg/graphite/scop-2.c: New.
8192 * gcc.dg/graphite/graphite.exp: New.
c6bb733d 8193 * graphite.c: Include domwalk.h.
8194 (print_scop): Print only the entry and exit blocks.
8195 (debug_scop): No longer static.
8196 (affine_expr): Fix formating. Return also true when the expression is
8197 constant.
8198 (stmt_simple_for_scop_p): Fix formating.
8199 (build_scops): Use domwalk.
8200 (get_loop_start, end_scop, test_for_scop_bound): New.
8201 (graphite_transform_loops): Avoid printing on stderr.
8202 * graphite.h (debug_scop): Declared.
8203 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8204 * Makefile.in (graphite.o): Depend on domwalk.h.
8205 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8206 declarations for static functions.
8207 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8208 controlling output verbosity.
8209
82102006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8211 Plesco Alexandru <shurikx@gmail.com>
8212
8213 * doc/invoke.texi (-fgraphite): Document.
8214 * tree-pass.h (pass_graphite_transforms): Declared.
8215 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8216 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8217 (pass_graphite_transforms): Defined.
8218 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8219 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8220 * graphite.c, graphite.h: New.
8221 * common.opt (fgraphite): Declared.
8222 * tree-flow.h (graphite_transform_loops): Declared.
8223 * Makefile.in (OBJS-common): Add graphite.o.
8224 (graphite.o): New rule.
8225 * passes.c (pass_graphite_transforms): Scheduled.
8226