1 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
4 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
6 2010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
8 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
9 (openscop_print_polyhedron_matrix): New.
10 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
11 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
12 (openscop_print_pdr_powerset): New.
13 (openscop_print_powerset_matrix): New.
14 (openscop_print_scattering_function_1): New.
15 (print_scattering_function): Add support for scattering names and
17 (graphite_write_transforms): Remove.
18 (apply_poly_transforms): Updated to call print_scop.
19 (print_pdr_access_layout): Updated to support OpenScop format.
21 (openscop_print_pbb_domain): New.
22 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
24 (print_pbb): Updated to call the new print_pbb_body.
25 (openscop_print_scop_context): New.
26 (print_scop_header): New.
27 (print_scop): Updated to call print_scop_header.
28 * graphite-poly.h: Document OpenScop format.
30 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
32 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
33 the case removed in the previous patch, when the only phi argument
34 is defined in the same loop as the phi node itself. Handle it
35 separately from the invariant case by both propagating it outside
36 the region and replacing the phi node with an assign.
38 2010-07-28 Sebastian Pop <sebastian.pop@amd.com>
40 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
41 constant phi nodes with one argument are is_gimple_min_invariant
42 and SSA_NAME_IS_DEFAULT_DEF.
44 * gfortran.dg/graphite/id-22.f: New.
46 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
48 * graphite.c (graphite_initialize): Do not initialize
49 CLooG and initialize the Parma Polyhedra Library
50 manually when using CLOOG_ORG.
51 (graphite_finalize): Do not finalize CLooG and finalize
52 the Parma Polyhedra Library manually when using CLOOG_ORG.
53 * graphite-cloog-compat.h (cloog_initialize): Hide function
55 (cloog_finalize): Same.
57 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
59 * graphite-clast-to-gimple.c (free_scattering): Change
60 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
62 (build_cloog_prog): Same.
63 * graphite-cloog-compat.h (cloog_domain): Removed.
64 (cloog_scattering): New.
65 (cloog_set_domain): Removed.
66 (cloog_set_scattering): New.
67 (cloog_next_domain): Removed.
68 (cloog_next_scattering): New.
69 (cloog_set_next_domain): Removed.
70 (cloog_set_next_scattering): New.
71 (CloogScatteringList): New.
72 (CloogScattering): New.
73 (cloog_scattering_free): New.
74 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
75 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
78 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
80 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
82 (set_cloog_options): Same.
83 (print_clast_stmt): Same.
84 (scop_to_clast): Same.
85 (print_generated_program): Same.
87 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
88 (scop_to_clast): Extend with CloogState.
89 * graphite-cloog-util.c: Include graphite-cloog-compat.h
90 (new_Cloog_Domain_from_ppl_Polyhedron):
91 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
92 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
93 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
94 * graphite-cloog-util.h (build_cloog_prog): Same.
95 * graphite-cloog-copat.h (build_cloog_prog): New.
97 (cloog_state_malloc): New.
98 (cloog_state_free): New.
99 (cloog_loop_malloc): New.
100 (cloog_options_malloc): New.
101 (cloog_statement_alloc): New.
102 (cloog_domain_from_cloog_matrix): New.
103 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
104 (new_Cloog_Domain_from_ppl_Polyhedron): New.
106 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
108 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
109 type of NAME now depends on used CLooG version.
110 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
111 (gcc_type_for_clast_expr): Same.
112 (print_clast_stmt): Replace pprint with clast_pprint.
113 * graphite-cloog-compat.h: Provide compatibility macros for
116 (clast_expr_term): New.
117 (clast_expr_red): New.
118 (clast_expr_bin): New.
121 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
123 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
124 compatible to newer CLooG releases (CLOOG_ORG).
125 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
126 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
127 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
128 (build_cloog_prog) : New.
129 (cloog_program_extract_scalars): New.
130 (cloog_program_scatter): New.
132 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
134 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
135 conditionally (CLOOG_ORG).
136 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
137 (cloog_statement_usr): New.
138 (cloog_domain): Same.
139 (cloog_set_domain): Same.
140 (cloog_next_domain): Same.
141 (cloog_set_next_domain): Same.
142 (cloog_program_nb_scattdims): Same.
143 (cloog_program_set_nb_scattdims): Same.
144 (cloog_program_names): Same.
145 (cloog_program_set_names): Same.
146 (cloog_program_set_context): Same.
147 (cloog_program_set_loop): Same.
148 (cloog_program_blocklist): Same.
149 (cloog_program_set_blocklist): Same.
150 (cloog_program_scaldims): Same.
151 (cloog_program_set_scaldims): Same.
152 (cloog_names_nb_parameters): Same.
153 (cloog_names_set_nb_parameters): Same.
154 (cloog_names_parameters): Same.
155 (cloog_names_set_parameters): Same.
156 (cloog_names_set_nb_iterators): Same.
157 (cloog_names_set_iterators): Same.
158 (cloog_names_set_nb_scattering): Same.
159 (cloog_names_set_scattering): Same.
160 (cloog_statement_set_usr): Same.
161 (cloog_loop_set_next): Same.
162 (cloog_loop_set_domain): Same.
163 (cloog_loop_set_block): Same.
164 (cloog_block_list_next): Same.
165 (cloog_block_list_set_next):
166 (cloog_block_list_set_block): Same.
168 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
170 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
172 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
173 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
174 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
175 when something has been changed.
176 (rewrite_commutative_reductions_out_of_ssa): Same.
178 * gcc.dg/graphite/id-26.c: New.
180 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
182 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
183 handle the case when def is in the sese region.
184 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
185 for invariant expressions.
186 (rewrite_cross_bb_phi_deps): Removed.
187 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
188 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
189 rewrite_cross_bb_phi_deps.
191 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
193 * graphite-sese-to-poly.c
194 (rewrite_commutative_reductions_out_of_ssa_loop): Call
195 scev_analyzable_p only on is_gimple_reg
197 * gcc.dg/graphite/id-25.c: New.
199 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
201 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
202 (rewrite_close_phi_out_of_ssa): Propagate constant values or
203 parametric expressions outside the scop region.
204 (rewrite_cross_bb_scalar_deps): Same.
205 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
207 * gcc.dg/graphite/run-id-5.c: New.
208 * gcc.dg/graphite/run-id-6.c: New.
209 * gfortran.dg/graphite/id-21.f: New.
211 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
213 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
214 SSA_NAME_DEF_STMT only on SSA_NAMEs.
216 * gcc.dg/graphite/id-24.c: New.
218 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
220 * tree-scalar-evolution.c (instantiate_scev_name): Do not
221 instantiate default definitions.
223 2010-07-20 Vladimir Kargov <kargov@gmail.com>
225 * graphite-scop-detection.c (is_valid_stmt_p): New.
226 (is_valid_bb_p): New.
228 2010-07-20 Vladimir Kargov <kargov@gmail.com>
229 Sebastian Pop <sebastian.pop@amd.com>
231 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
232 (loop_exits_from_bb_p): New.
233 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
234 (loop_exits_from_bb_p): Declared.
235 * graphite-scop-detection.c (scopdet_basic_block_info): Call
238 2010-07-20 Vladimir Kargov <kargov@gmail.com>
240 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
242 (dot_regions_1): New.
244 * refined-regions.h (dot_regions): Declared.
245 * Makefile.in (refined-regions.o): Update dependences.
247 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
249 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
250 extra parameter for the region. Call scev_analyzable_p.
251 (rewrite_reductions_out_of_ssa): Update call to
252 rewrite_close_phi_out_of_ssa.
253 (rewrite_cross_bb_phi_deps): Same.
254 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
255 parameter for the region. Call scev_analyzable_p.
256 (rewrite_commutative_reductions_out_of_ssa): Update call to
257 rewrite_commutative_reductions_out_of_ssa_loop.
259 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
261 * gcc.dg/tree-ssa/pr20742.c: New.
263 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
265 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
267 * gcc.dg/graphite/id-23.c: New.
269 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
271 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
272 SSA scalar phi nodes that can be scev_analyzable_p.
274 * gfortran.dg/graphite/id-20.f: Adjust testcase.
276 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
278 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
279 handle SSA_NAME_IS_DEFAULT_DEF.
281 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
283 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
285 * gcc.dg/graphite/pr42729.c: New.
287 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
289 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
290 case non close-phi nodes with one argument.
292 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
294 * sese.h (scev_analyzable_p): Scevs could be expressions without
295 chrecs and still be scev_analyzable_p.
297 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
299 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
301 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
303 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
304 * cfgloop.h (struct loop): Remove single_iv field.
305 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
306 (scop_canonicalize_loops): Removed.
307 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
308 over all the loop phi nodes in loop->header.
309 (build_poly_scop): Remove use of scop_canonicalize_loops.
311 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
313 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
316 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
318 * tree-chrec.c (chrec_apply): Should only apply to the specified
319 variable. Also handle multivariate chains of recurrences that
320 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
322 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
324 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
325 (debug_clast_name_indexes_1): Removed.
326 (debug_clast_name_indexes): Removed.
327 (pbb_to_depth_to_oldiv): Removed.
328 (build_iv_mapping): Replace the use of rename_map with iv_map.
329 (translate_clast_user): Remove uses of rename_map. Allocate and
331 (translate_clast_for_loop): Remove uses of rename_map.
332 (translate_clast_for): Same.
333 (translate_clast_guard): Same.
334 (translate_clast): Same.
336 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
337 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
338 * sese.c (set_rename): Now static.
339 (rename_variables_in_stmt): Removed.
341 (is_parameter): Removed.
343 (expand_scalar_variables_call): Removed.
344 (expand_scalar_variables_ssa_name): Removed.
345 (expand_scalar_variables_expr): Removed.
346 (expand_scalar_variables_stmt): Removed.
347 (expand_scalar_variables): Removed.
348 (rename_variables): Removed.
349 (remove_condition): Removed.
350 (get_true_edge_from_guard_bb): Removed.
351 (get_false_edge_from_guard_bb): Removed.
352 (struct igp): Removed.
353 (default_before_guard): Removed.
354 (convert_for_phi_arg): Removed.
355 (add_guard_exit_phis): Removed.
356 (insert_guard_phis): Removed.
357 (graphite_copy_stmts_from_block): Now also uses iv_map and a
358 region. Do not copy conditions. Do not copy induction variables.
360 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
361 the translated statement. Use the iv_map for the induction
363 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
364 (set_rename): Removed declaration.
365 (scev_analyzable_p): ...here.
366 * tree-chrec.c (chrec_apply_map): New.
367 * tree-chrec.h (chrec_apply_map): Declared.
369 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
371 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
372 insert_loop_close_phis.
373 * sese.c (name_defined_in_loop_p): Removed.
374 (expr_defined_in_loop_p): Removed.
375 (alive_after_loop): Removed.
376 (close_phi_not_yet_inserted_p): Removed.
377 (struct alep): Removed.
378 (add_loop_exit_phis): Removed.
379 (insert_loop_close_phis): Removed.
381 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
383 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
385 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
387 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
389 * gfortran.dg/graphite/id-20.f: New.
391 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
393 * graphite-cloog-util.h: Added cloog.h.
394 * graphite-blocking.c: Removed cloog.h.
395 * graphite-dependences.c: Same.
396 * graphite-interchange.c: Same.
397 * graphite-poly.c: Same.
398 * graphite-ppl.c: Same.
399 * graphite-scop-detection.c: Same.
400 * graphite-sese-to-poly.c:
402 Removed graphite-clast-to-gimple.h.
403 (check_poly_representation): Removed (unused).
404 * graphite-sese-to-poly.h
405 (check_poly_representation): Removed (unused).
407 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
410 (OBJS-common): Added graphite-cloog-util.o.
411 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
412 (graphite-cloog-util.o): New.
413 (graphite-ppl.o): Added graphite-cloog-util.h.
414 * graphite-clast-to-gimple.c:
415 Added graphite-cloog-util.h to include statements.
416 * graphite-cloog-util.c: New.
417 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
418 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
419 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
420 (new_C_Polyhedron_from_Cloog_Matrix): Same.
421 (ppl_Constrain_System_number_of_constraints): Same.
422 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
423 (oppose_constraint): Same.
424 (cloog_matrix_to_ppl_constraint): Same.
425 (new_Constraint_System_from_Cloog_Matrix): Same.
426 (insert_constraint_into_matrix): Same. Declared static.
427 * graphite-cloog-util.h: New.
428 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
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 (insert_constraint_into_matrix): Same.
434 Added graphite-cloog-util.h to include statements.
435 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
436 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
437 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
438 (new_C_Polyhedron_from_Cloog_Matrix): Same.
439 (insert_constraint_into_matrix): Same.
440 (ppl_Constrain_System_number_of_constraints): Same.
441 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
442 (oppose_constraint): Same.
443 (cloog_matrix_to_ppl_constraint): Same.
444 (new_Constraint_System_from_Cloog_Matrix): Same.
446 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
447 graphite-cloog-util.h.
448 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
449 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
450 (new_C_Polyhedron_from_Cloog_Matrix): Same.
451 (insert_constraint_into_matrix): Removed.
453 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
455 * graphite-clast-to-gimple.c
456 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
457 (precision_for_interval): Same.
458 (gcc_type_for_interval): Same.
459 (compute_type_for_level): Same.
460 * graphite-interchange.c
461 (lst_interchange_profitable_p): Same.
463 (psct_scattering_dim_for_loop_depth): Same.
465 (ppl_max_for_le_pointset): Same.
466 (ppl_min_for_le_pointset): Same.
468 2010-06-25 Vladimir Kargov <kargov@gmail.com>
470 * refined-regions.c (bb_index_compare): New.
471 (get_bbs_in_region): New.
472 (print_bbs_in_region): New.
473 (print_refined_region): Add an argument that allows to print
474 all basic blocks contained in regions.
475 (debug_refined_region): Update call to print_refined_region.
476 * refined-regions.h (print_refined_region): Update declaration.
477 (get_bbs_in_region): Declared.
478 * graphite-scop-detection.c (build_scops_new): Print the refined
479 region tree into the Grahite dump file.
481 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
483 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
484 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
486 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
488 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
489 rewrite_close_phi_out_of_ssa.
491 * gcc.dg/graphite/id-22.c: New.
493 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
495 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
497 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
499 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
501 * sese.c (debug_rename_map): Same.
504 (rename_variables_in_stmt): Same.
505 (expand_scalar_variables_call): Same.
506 (expand_scalar_variables_ssa_name): Same.
507 (expand_scalar_variables_expr): Same.
508 (expand_scalar_variables_stmt): Same.
509 (expand_scalar_variables): Same.
510 (rename_variables): Same.
511 (graphite_copy_stmts_from_block): Same.
512 (copy_bb_and_scalar_dependences): Same.
514 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
516 * graphite-clast-to-gimple.c (copy_renames): Removed.
517 (translate_clast_for): Do not call copy_renames.
518 (translate_clast_guard): Same.
520 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
522 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
523 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
524 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
525 before rewrite_cross_bb_scalar_deps.
527 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
529 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
530 Early return in when flag_associative_math is not set.
532 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
534 * gcc.dg/graphite/run-id-2.c: Call abort.
536 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
538 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
539 of SSA copies on edges except for loop->latch.
541 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
543 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
544 Split out of rewrite_reductions_out_of_ssa.
545 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
547 * graphite.c (graphite_transform_loops): Call it.
549 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
551 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
553 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
555 * passes.c (init_optimization_passes): Add pass_graphite.
556 Schedule a pass_copy_prop before pass_graphite_transforms.
557 * timevar.def (TV_GRAPHITE): Declared.
558 * tree-pass.h (pass_graphite): Declared.
559 * tree-ssa-loop.c (pass_graphite): New.
561 * gcc.dg/graphite/id-20.c: New.
563 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
565 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
566 Remove calls to rename_nb_iterations and rename_sese_parameters.
567 * graphite-clast-to-gimple.h (gloog): Update declaration.
568 * graphite.c (graphite_transform_loops): Update call to gloog.
569 * sese.c (rename_variables_in_expr): Removed.
570 (rename_nb_iterations): Removed.
571 (rename_sese_parameters): Removed.
572 * sese.h (rename_nb_iterations): Removed.
573 (rename_sese_parameters): Removed.
575 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
577 * graphite-clast-to-gimple.c (gloog): Remove call to
578 sese_adjust_liveout_phis.
579 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
580 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
581 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
582 rewrite_phi_out_of_ssa.
583 * sese.c (get_vdef_before_sese): Removed.
584 (sese_adjust_vphi): Removed.
585 (sese_adjust_liveout_phis): Removed.
586 * sese.h (sese_adjust_liveout_phis): Removed.
588 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
590 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
591 argument for the place after which to insert the out of SSA copy.
592 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
593 (rewrite_phi_out_of_ssa): Same.
594 (rewrite_cross_bb_scalar_deps): Same.
595 (insert_copyout): Removed.
596 (insert_copyin): Removed.
597 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
598 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
601 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
603 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
604 (rewrite_reductions_out_of_ssa): Same.
605 (rewrite_commutative_reductions_out_of_ssa): Same.
606 (build_poly_scop): Do not call these functions.
607 * graphite-sese-to-poly.h (build_poly_scop): Declared.
608 (rewrite_reductions_out_of_ssa): Declared.
609 (rewrite_commutative_reductions_out_of_ssa): Declared.
610 * graphite.c (graphite_transform_loops): Call on every scop
611 rewrite_commutative_reductions_out_of_ssa before calling
612 rewrite_reductions_out_of_ssa and build_scop_bbs.
614 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
616 * graphite-dependences.c (dot_deps): Make system call to dotty run
618 (dot_deps_stmt): Same.
619 * graphite-poly.c (dot_lst): Same.
621 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
623 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
624 old_type in parameter.
625 (gcc_type_for_value): Update call to gcc_type_for_interval.
626 (compute_type_for_level_1): Renamed compute_type_for_level.
627 Update call to gcc_type_for_interval.
629 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
631 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
632 the scev analysis when the variable is not used outside the loop
633 in a close phi node: call compute_overall_effect_of_inner_loop.
635 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
637 * graphite-sese-to-poly.c (single_pred_cond): Renamed
638 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
639 (build_sese_conditions_before): Renamed call to single_pred_cond.
640 (build_sese_conditions_after): Same.
642 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
644 * graphite-poly.h: Fix comments and indentation.
645 * graphite-sese-to-poly.c: Same.
646 (build_sese_conditions_before): Compute stmt and gbb only when needed.
647 * tree-chrec.c: Fix comments and indentation.
648 (tree-ssa-loop-niter.c): Same.
650 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
652 * refined-regions.c (create_region): Only initialize the region.
653 (find_regions_with_entry): Initialize parent relation and bbmap
655 (build_regions_tree): Set outermost_region to region instead of
657 (calculate_region_tree): Remove unneeded parameters.
659 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
661 * graphite-scop-detection.c (is_scop_p): New.
662 (build_scops_new): New. A skeleton for the new scop detection.
663 (build_scops_old): Renamed from build_scops.
664 (build_scops): New version. Call the new and the old scop
667 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
668 Antoniu Pop <antoniu.pop@gmail.com>
670 * Makefile.in (OBJS-common): Add refined-regions.o.
671 (refined-regions.o): New.
672 (graphite-scop-detection.o): Use refined-regions.h.
673 * graphite-scop-detection.c: Include refined-regions.h
674 (build_scops): Also build the refined region tree.
675 * refined-regions.c: New. Adds an algorithm to detect refined
677 (print_refined_region): New.
678 (debug_refined_region): New.
679 (refined_region_contains_bb_p): New.
680 (refined_region_contains_region_p): New.
682 (struct find_regions_global_data): New.
684 (typedef struct bb_bb_def): New.
685 (new_bb_bb_def): New.
686 (bb_bb_map_hash): New.
690 (new_bb_reg_def): New.
691 (bb_reg_map_hash): New.
692 (eq_bb_reg_map): New.
693 (find_new_region): New.
694 (insert_new_reg): New.
695 (insert_new_bb): New.
696 (insert_shortcut): New.
697 (get_next_postdom): New.
698 (create_region): New.
699 (find_regions_with_entry): New.
700 (find_regions_adc): New.
702 (get_topmost_parent): New.
703 (build_regions_tree): New.
704 (calculate_region_tree): New.
705 (free_region_tree): New.
706 * refined-regions.h: New.
707 (struct refined_region): New.
708 (calculate_region_tree): New.
709 (free_region_tree): New.
710 (refined_region_contains_bb_p): New.
711 (refined_region_contains_region_p): New.
712 (print_refined_region): New.
713 (debug_refined_region): New.
715 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
717 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
720 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
722 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
723 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
725 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
727 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
728 phi_arg_in_outermost_loop.
729 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
730 (remove_invariant_phi): Same.
732 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
734 * graphite-blocking.c
735 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
736 * graphite-clast-to-gimple.c
737 (clast_to_gcc_expression): Same.
738 (precision_for_value): Same.
739 (precision_for_interval): Same.
740 (gcc_type_for_interval): Same.
741 (graphite_create_new_guard): Same.
742 (compute_bounds_for_level): Same.
743 (graphite_create_new_loop_guard): Same.
744 * graphite-interchange.c
745 (build_linearized_memory_access): Same.
746 (pdr_stride_in_loop): Same.
747 (memory_strides_in_loop_1): Same.
748 (memory_strides_in_loop): Same.
749 (extend_scattering): Same.
750 (psct_scattering_dim_for_loop_depth): Same.
751 (pbb_number_of_iterations): Same.
753 (debug_iteration_domains): Same.
755 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
756 (ppl_set_inhomogeneous_gmp): Same.
757 (ppl_strip_loop): Same.
758 (ppl_lexico_compare_linear_expressions): Same.
759 (ppl_read_polyhedron_matrix): Same.
760 (ppl_max_for_le_pointset): Same.
762 (ppl_read_polyhedron_matrix): Same.
763 (tree_int_to_gmp): Same.
764 (gmp_cst_to_tree): Same.
765 (ppl_set_inhomogeneous): Same.
766 (ppl_set_inhomogeneous_tree): Same.
767 (ppl_set_coef): Same.
768 (ppl_set_coef_tree): Same.
769 * graphite-sese-to-poly.c
770 (build_pbb_scattering_polyhedrons): Same.
771 (build_scop_scattering): Same.
772 (scan_tree_for_params_right_scev): Same.
773 (scan_tree_for_params): Same.
774 (find_params_in_bb): Same.
775 (find_scop_parameters): Same.
776 (add_upper_bounds_from_estimated_nit): Same.
777 (build_loop_iteration_domains): Same.
778 (add_condition_to_domain): Same.
779 (pdr_add_memory_accesses): Same.
781 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
783 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
784 CLooG's value_* macros to their respective mpz_* counterparts.
785 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
786 (graphite_create_new_loop_guard): Same.
787 * graphite-interchange.c (build_linearized_memory_access): Same.
788 (pdr_stride_in_loop): Same.
789 (memory_strides_in_loop_1): Same.
790 (1st_interchange_profitable_p): Same.
791 * graphite-poly.c (extend_scattering): Same.
792 (psct_scattering_dim_for_loop_depth): Same.
793 (pbb_number_of_iterations): Same.
794 (pbb_number_of_iterations_at_time): Same.
795 * graphite-poly.h (new_1st_loop): Same.
796 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
797 (oppose_constraint): Same.
798 (insert_constraint_into_matrix): Same.
799 (ppl_set_inhomogeneous_gmp): Same.
800 (ppl_set_coef_gmp): Same.
801 (ppl_strip_loop): Same.
802 (ppl_lexico_compare_linear_expressions): Same.
803 (ppl_max_for_le_pointset): Same.
804 (ppl_min_for_le_pointset): Same.
805 (ppl_build_realtion): Same.
806 * graphite-ppl.h (gmp_cst_to_tree): Same.
807 (ppl_set_inhomogeneous): Same.
808 (ppl_set_inhomogeneous_tree): Same.
809 (ppl_set_coef): Same.
810 (ppl_set_coef_tree): Same.
811 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
812 (build_scop_scattering): Same.
813 (add_value_to_dim): Same.
814 (scan_tree_for_params_right_scev): Same.
815 (scan_tree_for_params_int): Same.
816 (scan_tree_for_params): Same.
817 (find_params_in_bb): Same.
818 (find_scop_parameters): Same.
819 (add_upper_bounds_from_estimated_nit): Same.
820 (build_loop_iteration_domains): Same.
821 (create_linear_expr_from_tree): Same.
822 (add_condition_to_domain): Same.
823 (pdr_add_memory_accesses): Same.
825 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
828 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
829 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
830 When converting an unsigned type to signed, double its precision.
831 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
832 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
833 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
835 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
838 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
839 build_nonstandard_integer_type.
840 (gcc_type_for_interval): Same.
842 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
845 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
846 POINTER_PLUS_EXPR for pointer types.
848 * gcc.dg/graphite/id-19.c: New.
850 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
853 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
854 * graphite-clast-to-gimple.c: Include langhooks.h.
855 (max_signed_precision_type): New.
856 (max_precision_type): Takes two types as arguments.
857 (precision_for_value): New.
858 (precision_for_interval): New.
859 (gcc_type_for_interval): New.
860 (gcc_type_for_value): New.
861 (gcc_type_for_clast_term): New.
862 (gcc_type_for_clast_red): New.
863 (gcc_type_for_clast_bin): New.
864 (gcc_type_for_clast_expr): Split up into several functions.
865 (gcc_type_for_clast_eq): Rewritten.
866 (compute_bounds_for_level): New.
867 (compute_type_for_level_1): New.
868 (compute_type_for_level): New.
869 (gcc_type_for_cloog_iv): Removed.
870 (gcc_type_for_iv_of_clast_loop): Rewritten.
871 (graphite_create_new_loop): Compute the lower and upper bound types
872 with gcc_type_for_clast_expr.
873 (graphite_create_new_loop_guard): Same.
874 (find_cloog_iv_in_expr): Removed.
875 (compute_cloog_iv_types_1): Removed.
876 (compute_cloog_iv_types): Removed.
877 (gloog): Do not call compute_cloog_iv_types.
878 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
880 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
881 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
882 (GBB_CLOOG_IV_TYPES): Removed.
884 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
886 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
888 Reverted this commit: as at this point the loop closed SSA form
889 is under a canonical form respecting the single argument condition.
890 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
891 close phi nodes may have more than one argument.
893 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
895 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
896 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
897 (detect_commutative_reduction): Same.
899 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
901 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
902 close phi nodes may have more than one argument.
904 2010-03-30 Richard Guenther <rguenther@suse.de>
905 Zdenek Dvorak <ook@ucw.cz>
906 Sebastian Pop <sebastian.pop@amd.com>
909 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
910 with multiple arguments.
911 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
913 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
915 * graphite-dependences.c (print_pddr): Call print_pdr with an
917 * graphite-poly.c (debug_pdr): Add an extra argument for the
920 (print_pbb_domain): Same.
922 (print_scop_context): Same.
925 (debug_pbb_domain): Same.
929 (debug_scop_context): Same.
932 (print_scop_params): Same.
933 (debug_scop_params): Same.
934 (print_iteration_domain): Same.
935 (print_iteration_domains): Same.
936 (debug_iteration_domain): Same.
937 (debug_iteration_domains): Same.
938 (print_scattering_function): Same.
939 (print_scattering_functions): Same.
940 (debug_scattering_function): Same.
941 (debug_scattering_functions): Same.
942 * graphite-poly.h (debug_pdr): Update declaration.
944 (print_pbb_domain): Same.
946 (print_scop_context): Same.
949 (debug_pbb_domain): Same.
953 (debug_scop_context): Same.
956 (print_scop_params): Same.
957 (debug_scop_params): Same.
958 (print_iteration_domain): Same.
959 (print_iteration_domains): Same.
960 (debug_iteration_domain): Same.
961 (debug_iteration_domains): Same.
962 (print_scattering_function): Same.
963 (print_scattering_functions): Same.
964 (debug_scattering_function): Same.
965 (debug_scattering_functions): Same.
967 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
969 * graphite-poly.c (print_scattering_function_1): New.
970 (print_scattering_function): Call it.
971 (print_scop_params): Remove spaces at the end of lines.
974 * graphite-poly.h (print_cloog): Declared.
975 (debug_cloog): Declared.
977 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
979 * tree-ssa-copy.c: Revert this previous change:
980 (init_copy_prop): Loop closed phi nodes cancontain more than one
982 (execute_copy_prop): Revert the previous change: do not call
983 rewrite_into_loop_closed_ssa.
985 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
986 Richard Guenther <rguenther@suse.de>
989 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
990 contain more than one argument.
991 (execute_copy_prop): Revert the previous change: do not call
992 rewrite_into_loop_closed_ssa.
994 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
995 * gcc.dg/graphite/id-pr43464-1.c: New.
997 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1000 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1001 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1003 * gcc.dg/graphite/id-pr43464.c: New.
1005 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1007 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1009 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1010 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1011 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1012 to switch between adding the IV bump in loop->latch or in loop->header.
1014 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1016 * passes.c (init_optimization_passes): Add pass_copy_prop
1019 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1021 * graphite-poly.c (print_scattering_function): Pretty print following
1024 (print_pbb_domain): Same.
1025 (dump_gbb_cases): Same.
1026 (dump_gbb_conditions): Same.
1029 (print_scop_params): Same.
1030 (print_scop_context): Same.
1032 (print_pbb_body): New.
1033 (lst_indent_to): New.
1034 (print_lst): Start new lines with a #.
1035 * graphite-poly.h (pbb_bb): New.
1036 (pbb_index): Use pbb_bb.
1037 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1039 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1041 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1044 * gcc.dg/graphite/id-pr43351.c
1046 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1049 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1050 call insert_out_of_ssa_copy for default definitions.
1051 * gfortran.dg/graphite/id-pr43354.f: New.
1053 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1056 * gfortran.dg/graphite/pr43349.f: New.
1058 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1060 * graphite-clast-to-gimple.c (my_long_long): Defined.
1061 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1062 * graphite-sese-to-poly.c (my_long_long): Defined.
1063 (scop_ivs_can_be_represented): Use it.
1065 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1067 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1068 graphite-max-bbs-per-function, and loop-block-tile-size.
1069 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1071 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1073 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1075 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1076 forward declaration.
1077 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1078 (add_upper_bounds_from_estimated_nit): New.
1079 (build_loop_iteration_domains): Use it.
1081 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1083 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1085 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1088 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1089 should be an INTEGER_CST. Also handle CASE_CONVERT.
1090 * gcc.dg/graphite/pr43306.c: New.
1092 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1094 * graphite.c (graphite_initialize): To bound the number of bbs per
1095 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1096 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1097 * doc/invoke.texi: Document it.
1099 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1101 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1102 * graphite-sese-to-poly.h (build_poly_scop): Same.
1104 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1106 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1107 the number of parameters in the scop. Use as an upper bound
1108 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1109 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1110 * doc/invoke.texi: Document it.
1112 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1114 * graphite-sese-to-poly.c (add_param_constraints): Use
1115 lower_bound_in_type and upper_bound_in_type.
1117 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1119 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1120 instead of unsigned_type_node.
1122 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1123 Reza Yazdani <reza.yazdani@amd.com>
1126 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1127 on pointer type parameters.
1129 * gcc.dg/graphite/run-id-4.c: New.
1131 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1134 * gcc.dg/graphite/run-id-3.c: New.
1136 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1137 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1139 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1140 handle conversions from pointer to integers.
1141 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1142 induction variable, to be able to work with code generated by CLooG.
1143 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1144 (build_poly_scop): Bail out if we cannot codegen a loop.
1146 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1148 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1149 code generation with gloog_error.
1151 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1153 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1154 Call fold_convert on all the returned values.
1155 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1156 the type of the resulting expression.
1158 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1160 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1161 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1162 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1164 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1166 * graphite-dependences.c (map_into_dep_poly): Removed.
1167 (dependence_polyhedron_1): Use combine_context_id_scat.
1169 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1171 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1172 (struct poly_bb): Same.
1173 (combine_context_id_scat): New.
1175 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1178 * sese.c (name_defined_in_loop_p): Return false for default
1181 * gcc.dg/graphite/pr42326.c: New.
1183 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1185 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1186 and clean up the logic.
1188 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1190 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1193 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1196 * graphite-scop-detection.c (create_single_exit_edge): Move
1197 the call to find_single_exit_edge to....
1198 (create_sese_edges): ...here. Don't handle multiple edges
1199 exiting the function.
1200 (build_graphite_scops): Don't handle multiple edges
1201 exiting the function.
1203 * gcc.dg/graphite/pr43083.c: New.
1205 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1208 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1209 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1211 * gfortran.dg/graphite/pr43097.f: New.
1213 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1214 Manuel López-Ibáñez <manu@gcc.gnu.org>
1217 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1219 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1222 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1224 * g++.dg/graphite/pr43026.C: New.
1226 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1228 * Merge from mainline (154736:156693).
1230 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1233 * gcc.dg/graphite/pr43012.c: New.
1235 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1237 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1238 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1240 * g++.dg/graphite/pr42930.C: New.
1242 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1245 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1246 graphite_can_represent_init for MULT_EXPR.
1248 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1252 * graphite-sese-to-poly.c (remove_phi): New.
1253 (translate_scalar_reduction_to_array): Call remove_phi.
1255 * gcc.dg/graphite/pr42530.c: New.
1256 * gcc.dg/graphite/pr42914.c: New.
1258 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1261 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1262 * graphite-clast-to-gimple.h (gloog): Update declaration.
1263 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1264 * graphite-poly.h (struct poly_bb): Add missing comments.
1265 (struct scop): Add poly_scop_p field.
1267 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1268 * graphite.c (graphite_transform_loops): Build the polyhedral
1269 representation for each scop before code generation.
1270 * sese.c (rename_variables_in_operand): Removed.
1271 (rename_variables_in_expr): Return the renamed expression.
1272 (rename_sese_parameters): New.
1273 * sese.h (rename_sese_parameters): Declared.
1275 * gcc.dg/graphite/pr42771.c: New.
1277 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1279 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1281 * gcc.dg/graphite/block-1.c: Same.
1282 * gcc.dg/graphite/block-3.c: Same.
1283 * gcc.dg/graphite/block-4.c: Same.
1284 * gcc.dg/graphite/block-5.c: Same.
1285 * gcc.dg/graphite/block-6.c: Same.
1286 * gcc.dg/graphite/block-7.c: Same.
1287 * gcc.dg/graphite/interchange-0.c: Same.
1288 * gcc.dg/graphite/interchange-1.c: Same.
1289 * gcc.dg/graphite/interchange-10.c: Same.
1290 * gcc.dg/graphite/interchange-11.c: Same.
1291 * gcc.dg/graphite/interchange-12.c: Same.
1292 * gcc.dg/graphite/interchange-2.c: Same.
1293 * gcc.dg/graphite/interchange-3.c: Same.
1294 * gcc.dg/graphite/interchange-4.c: Same.
1295 * gcc.dg/graphite/interchange-5.c: Same.
1296 * gcc.dg/graphite/interchange-6.c: Same.
1297 * gcc.dg/graphite/interchange-7.c: Same.
1298 * gcc.dg/graphite/interchange-8.c: Same.
1299 * gcc.dg/graphite/interchange-9.c: Same.
1300 * gcc.dg/graphite/interchange-mvt.c: Same.
1302 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1304 * gfortran.dg/graphite/id-19.f: New.
1305 * gfortran.dg/graphite/pr14741.f90: New.
1306 * gfortran.dg/graphite/pr41924.f90: New.
1307 * gfortran.dg/graphite/run-id-2.f90: New.
1309 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1312 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1313 to unknown_dependence.
1314 (graphite_legal_transform_dr): Handle the unknown_dependence.
1315 (graphite_carried_dependence_level_k): Same.
1317 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1319 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1321 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1322 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1325 * graphite-dependences.c (build_lexicographical_constraint): Return
1326 a union of dependence polyhedra.
1327 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1329 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1330 * gcc.dg/graphite/block-4.c: Same.
1331 * gcc.dg/graphite/block-7.c: Same.
1332 * gcc.dg/graphite/interchange-12.c: Same.
1333 * gcc.dg/graphite/interchange-mvt.c: Same.
1334 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1335 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1336 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1338 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1340 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1341 the execution check to FAIL. This testcase is miscompiled by Graphite
1342 and the check should be re-enabled.
1343 * gcc.dg/graphite/interchange-mvt.c: Same.
1344 * gcc.dg/graphite/block-0.c: Same.
1345 * gcc.dg/graphite/block-4.c: Same.
1346 * gcc.dg/graphite/block-7.c: Same.
1348 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1350 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1351 * gcc.dg/graphite/scop-0.c: Fix spaces.
1352 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1353 * gfortran.dg/graphite/block-2.f: Same.
1354 * gfortran.dg/graphite/block-3.f90: Same.
1355 * gfortran.dg/graphite/block-4.f90: Same.
1356 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1357 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1359 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1361 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1362 PDDR_ORIGINAL_SCATTERING_P.
1363 (pddr_is_empty): Rewritten.
1364 (print_dependence_polyhedron_layout): New.
1367 (build_alias_set_powerset): Moved up.
1368 (poly_drs_may_alias_p): Moved up.
1369 (lexicographically_gt_p): Removed.
1370 (build_lexicographically_gt_constraint): Renamed
1371 build_lexicographical_constraint, reimplemented.
1372 (dependence_polyhedron_1): Simplified parameters.
1373 (dependence_polyhedron): Same. Keep along empty PDDRs
1374 to make efficient use of the cache.
1375 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1376 (graphite_legal_transform_dr): Rewritten.
1377 (graphite_legal_transform_bb): Pass fewer arguments to
1378 graphite_legal_transform_dr.
1379 (graphite_carried_dependence_level_k): Simplified implementation.
1380 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1381 (dot_transformed_deps_stmt_1): Same.
1382 (dot_original_deps): Same.
1383 (dot_transformed_deps): Same.
1384 * graphite-dependences.h (struct poly_ddr): Added a new field
1385 original_scattering_p.
1386 (PDDR_ORIGINAL_SCATTERING_P): New.
1387 (print_pddr): Declared.
1388 (debug_pddr): Declared.
1389 * graphite-ppl.c: Clarify comment.
1390 * sese.h (print_gimple_bb): Removed unused declaration.
1393 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1395 * g++.dg/graphite/graphite.exp: Rewritten.
1396 * gcc.dg/graphite/graphite.exp: Rewritten.
1397 * gfortran.dg/graphite/graphite.exp: Rewritten.
1398 * gcc.dg/graphite/block-0.c: Added runtime test.
1399 * gcc.dg/graphite/block-1.c: Same.
1400 * gcc.dg/graphite/block-3.c: Same.
1401 * gcc.dg/graphite/block-4.c: Same.
1402 * gcc.dg/graphite/block-5.c: Same.
1403 * gcc.dg/graphite/block-6.c: Same.
1404 * gcc.dg/graphite/block-7.c: Same.
1405 * gcc.dg/graphite/interchange-0.c: Same.
1406 * gcc.dg/graphite/interchange-1.c: Same.
1407 * gcc.dg/graphite/interchange-10.c: Same.
1408 * gcc.dg/graphite/interchange-11.c: Same.
1409 * gcc.dg/graphite/interchange-12.c: Same.
1410 * gcc.dg/graphite/interchange-2.c: Same.
1411 * gcc.dg/graphite/interchange-3.c: Same.
1412 * gcc.dg/graphite/interchange-4.c: Same.
1413 * gcc.dg/graphite/interchange-5.c: Same.
1414 * gcc.dg/graphite/interchange-6.c: Same.
1415 * gcc.dg/graphite/interchange-7.c: Same.
1416 * gcc.dg/graphite/interchange-8.c: Same.
1417 * gcc.dg/graphite/interchange-9.c: Same.
1418 * gcc.dg/graphite/interchange-mvt.c: Same.
1419 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1421 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1423 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1426 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1428 * common.opt: Add -fgraphite-cloog-opts.
1429 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1430 * opts.c (decode_options): Same.
1432 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1434 * gcc.dg/graphite/id-17.c: New.
1435 * gcc.dg/graphite/pr41888.c: New.
1436 * gcc.dg/graphite/scop-22.c: New.
1437 * gfortran.dg/graphite/pr40982.f90: New.
1439 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1441 * graphite-dependences.c: Clarify comments.
1442 (build_pddr): Add an extra parameter direction.
1443 (graphite_legal_transform_dr): Use build_pddr.
1444 (dot_original_deps_stmt_1): Update use of build_pddr.
1445 (dot_transformed_deps_stmt_1): Same.
1446 (dot_original_deps): Same.
1447 (dot_transformed_deps): Same.
1449 * gcc.dg/graphite/interchange-12.c: New.
1450 * gcc.dg/graphite/block-7.c: New.
1452 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1454 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1455 (pddr_transformed_scattering): Removed.
1456 (graphite_legal_transform_dr): Use build_pddr.
1457 (dot_original_deps_stmt_1): Same.
1458 (dot_transformed_deps_stmt_1): Same.
1459 (dot_original_deps): Same.
1460 (dot_transformed_deps): Same.
1462 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1464 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1465 (build_lexicographically_gt_constraint): Same.
1466 (dependence_polyhedron_1): Same.
1467 (dependence_polyhedron): Same.
1469 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1471 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1472 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1473 (lexicographically_gt_p): Change type of direction to int.
1474 (build_lexicographically_gt_constraint): Same.
1475 (dependence_polyhedron_1): Same.
1476 (dependence_polyhedron): Same.
1477 (pddr_original_scattering): Use integers for direction.
1478 (pddr_transformed_scattering): Same.
1479 (graphite_legal_transform_dr): Same.
1480 (graphite_carried_dependence_level_k): Same.
1482 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1484 * graphite-dependences.c (build_pairwise_constraint): Renamed
1485 ppl_build_relation. Moved...
1486 (dr_equality_constraints): Use ppl_build_relation.
1487 (build_pairwise_scheduling_equality): Same.
1488 (build_pairwise_scheduling_inequality): Same.
1489 * graphite-ppl.c (ppl_build_relation): ...here.
1490 * graphite-ppl.h (ppl_build_relation): Declared.
1492 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1495 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1496 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1497 Set gloog_error when such an expression failed to be built.
1498 (translate_clast): Early return when gloog_error is set.
1499 (gloog): Clear gloog_error. When gloog_error is set, call
1500 set_ifsese_condition to enable the original code. Return the status
1501 of the code generation based on gloog_error.
1502 * sese.c (set_ifsese_condition): New.
1503 * sese.h (set_ifsese_condition): Declared.
1505 * g++.dg/graphite/pr42681.C: New.
1507 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1510 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1511 rename_nb_iterations.
1512 * sese.c (rename_variables_in_operand): New.
1513 (rename_variables_in_expr): New.
1514 (rename_nb_iterations): New.
1515 (sese_adjust_liveout_phis): Update the rename_map.
1516 * sese.h (rename_nb_iterations): Declared.
1517 * tree-scalar-evolution.c (scev_reset_htab): New.
1518 (scev_reset): Call scev_reset_htab.
1519 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1521 * gfortran.dg/graphite/pr42732.f: New.
1523 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1526 * graphite-clast-to-gimple.c: Fix formatting.
1527 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1528 (expr_defined_in_loop_p): New.
1529 (add_loop_exit_phis): Also handle full expressions: remove from
1530 the rename_map the expressions defined in the loop that we're closing.
1532 * gfortran.dg/graphite/pr42393-1.f90: New.
1533 * gfortran.dg/graphite/pr42393.f90: Add new flags
1534 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1535 make this testcase useful in the Graphite branch.
1537 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1539 * graphite-scop-detection.c (exclude_component_ref): Removed.
1540 (is_simple_operand): Removed.
1541 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1543 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1546 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1547 the array indexing of ADDR_EXPRs.
1549 * gcc.dg/graphite/pr42221.c: New.
1551 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1554 * graphite.c (graphite_finalize): Call scev_reset.
1555 (graphite_transform_loops): Do not call scev_reset between the code
1556 generation of scops.
1558 * gcc.dg/graphite/pr42521.c: New.
1560 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1562 * graphite-interchange.c (memory_stride_in_loop): Renamed
1564 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1565 (memory_strides_in_loop): Memoize the memory strides per loop.
1566 (lst_interchange_profitable_p): Do not initialize to zero the memory
1568 * graphite-poly.h (struct lst): Add a field memory_strides.
1569 (LST_LOOP_MEMORY_STRIDES): New.
1570 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1571 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1573 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1575 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1576 memory_strides_in_loop. Gather memory strides on a whole loop.
1577 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1578 (lst_interchange_profitable_p): Removed.
1579 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1581 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1583 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1584 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1585 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1586 Remove context_loop and level.
1588 2010-01-07 Richard Guenther <rguenther@suse.de>
1590 PR tree-optimization/42641
1591 * sese.c (rename_map_elt_info): Use the SSA name version, do
1594 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1596 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1597 blocked" only when both the strip mine and the interchange have
1600 * gcc.dg/graphite/block-2.c: Removed.
1601 * gcc.dg/graphite/block-3.c: Add scan pattern.
1602 * gcc.dg/graphite/block-4.c: Same.
1603 * gcc.dg/graphite/block-5.c: Same.
1604 * gcc.dg/graphite/block-6.c: Same.
1606 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1608 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1609 before allocating a new one.
1610 (copy_renames): Check that slot is not NULL.
1611 (mark_bb_with_pbb): Same.
1612 (compute_cloog_iv_types_1): Same.
1613 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1614 nest, and after LSTs.
1615 (lst_try_interchange_loops): Same.
1617 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1620 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1621 the before, nest, and after LSTs.
1622 (lst_try_interchange): Removed.
1623 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1625 (lst_interchange_select_outer): Apply interchange on the outer loop
1626 until there are no more changes in the inner loops.
1628 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1630 Revert patch fixing PR middle-end/42221.
1632 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1635 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1638 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1640 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1643 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1644 that contain only one statement.
1646 * gfortran.dg/graphite/pr42180.f90: New.
1648 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1651 * gfortran.dg/graphite/pr42393.f90: New.
1653 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1656 * gfortran.dg/graphite/pr42186.f90: New.
1658 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1661 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1662 Insert the reduction copy in the same block as the phi node.
1663 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1665 * gcc.dg/graphite/pr42205-1.c: New.
1666 * gcc.dg/graphite/pr42205-2.c: New.
1668 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1671 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1672 the array indexing of ADDR_EXPRs.
1674 * gcc.dg/graphite/pr42221.c: New.
1676 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1680 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1681 index. Call lst_interchange_select_inner only once.
1682 (lst_interchange_select_inner): Update use of lst_try_interchange.
1683 (lst_interchange_select_outer): Update.
1685 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1689 * graphite-interchange.c (lst_try_interchange): Do not increment the
1690 the OUTER index when there is no AFTER kernel. Do not increment the
1691 OUTER index for after processing the AFTER kernel.
1692 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1693 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1694 index. Do not pass to lst_interchange_select_inner the OUTER index.
1695 (scop_do_interchange): Update use of lst_interchange_select_outer.
1697 * gfortran.dg/graphite/graphite.exp
1698 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1699 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1700 the graphite dump file.
1701 * gfortran.dg/graphite/interchange-2.f: Same.
1702 * gfortran.dg/graphite/pr42334-1.f: New.
1704 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1708 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1710 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1711 (lst_try_interchange): Reimplemented.
1712 (lst_interchange_select_inner): Same.
1713 (lst_do_interchange): Renamed lst_interchange_select_outer.
1715 (scop_do_interchange): Update use of lst_interchange_select_outer.
1717 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1718 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1719 * gcc.dg/graphite/pr42211.c: New.
1720 * gfortran.dg/graphite/pr42334.f90: New.
1722 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1725 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1726 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1728 * gfortran.dg/graphite/pr42181.f90: New.
1730 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1733 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1734 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1735 (detect_commutative_reduction_arg): Simplified.
1736 (detect_commutative_reduction): Early return when the argument of
1737 the close phi is not of an SSA_NAME.
1739 * gcc.dg/graphite/pr42284.c: New.
1741 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1743 * dbgcnt.def (graphite_scop): New counter.
1744 * graphite.c: Include dbgcnt.h
1745 (graphite_transform_loops): Use new counter to limit transformations.
1747 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1750 * graphite-scop-detection.c (graphite_can_represent_init): Also
1751 handle more complex MULT_EXPRs containing parameters by recursion
1754 * gfortran.dg/graphite/pr42285.f90: New.
1756 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1758 * g++.dg/graphite/pr42130.C: Fix type.
1760 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1762 * g++.dg/graphite/pr42130.C: Correct testcase.
1764 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1766 * Merge from mainline (154493:154734).
1768 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1770 * Merge from mainline (151362:154491).
1772 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1774 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1775 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1777 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1780 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1781 translate_clast_for_loop): New.
1782 (translate_clast_for): Add a condition around the loop, to do not
1783 execute loops with zero iterations.
1784 * g++.dg/graphite/pr42130.C: New.
1785 * gcc.dg/graphite/pr35356-2.c: Adapt.
1787 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1789 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1790 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1791 Remove context_loop and level.
1793 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1795 * graphite-clast-to-gimple.c (translate_clast_user,
1796 translate_clast_for, translate_clast_guard): Simplify and move common
1797 elements to translate_clast().
1798 (translate_clast): Simplify and get common elements.
1800 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1802 * graphite-clast-to-gimple.c (translate_clast_user,
1803 translate_clast_for, translate_clast_guard): Split out of
1806 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1808 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1809 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1810 debug_clast_name_indexes_1, debug_clast_name_indexes,
1811 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1812 (clast_name_to_gcc, clast_to_gcc_expression,
1813 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1814 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1815 graphite_create_guard_cond_expr, graphite_create_new_loop,
1816 translate_clast): Add params_index.
1817 (initialize_cloog_names): Create parameter strings from scratch, do
1818 not reference other strings.
1819 (create_params_index): New.
1820 (gloog): Initialize params_index.
1821 * graphite-scop-detection (free_scops_1): Removed.
1822 (limit_scops): Use normal free_scops.
1823 * graphite-sese-to-poly.c (save_var_names): Removed.
1824 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1825 and SESE_PARAMS_INDEX.
1826 * sese.c (new_sese, free_sese): Dito.
1827 * sese.h (struct sese): Remove params_index, params_names.
1828 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1830 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1832 Revert the following patch from 2009-09-14:
1833 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1834 tree-scalar-evolution.h, and then tree-data-ref.h.
1835 * graphite-clast-to-gimple.c: Same.
1836 * graphite-dependences.c: Same.
1837 * graphite-interchange.c: Same.
1838 * graphite-poly.c: Same.
1839 * graphite-scop-detection.c: Same.
1840 * graphite-sese-to-poly.c: Same.
1842 * lambda-code.c: Same.
1843 * matrix-reorg.c: Same.
1844 * tree-data-ref.c: Same.
1845 * tree-if-conv.c: Same.
1846 * tree-loop-distribu: Same.: Same.
1847 * tree-loop-linear.c: Same.
1848 * tree-parloops.c: Same.
1849 * tree-predcom.c: Same.
1850 * tree-vect-patterns.c: Same.
1852 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1854 Revert patch from 2009-09-14.
1855 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1856 passes at -O1 and below.
1858 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1861 * gcc.dg/graphite/pr40281.c: New.
1863 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1864 evolutions should not variate in inner loops.
1866 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1869 * gfortran.dg/graphite/pr42050.f90: New.
1871 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1873 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1874 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1876 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1878 * graphite-blocking.c (scop_do_block): New.
1879 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1880 * graphite-poly.h (scop_do_block): Declared.
1882 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1884 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1885 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1886 to transform depth into the time_depth before calling
1887 pbb_number_of_iterations_at_time.
1888 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1891 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1893 Reverted the patch for "scattering permutations" from 2009-10-28.
1895 * graphite-poly.c (print_permutation): New.
1896 (debug_permutation): New.
1897 (new_poly_bb): Initialize PBB_PERMUTATION.
1898 (free_poly_bb): Free PBB_PERMUTATION.
1899 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1900 (struct pbb_permutation_elt): New.
1901 (PBB_PERMUTATION_ELT_STRIDE): New.
1902 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1903 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1904 (new_pbb_permutation_elt): New.
1905 (pbb_permutation_elt_free): New.
1906 (struct poly_bb): Add field permutation.
1907 (PBB_PERMUTATION): New.
1908 (print_permutation): Declared.
1909 (debug_permutation): Declared.
1911 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1913 * graphite-interchange.c (build_partial_difference): New.
1914 (memory_stride_in_loop): Refactored the computation of
1915 equality constraints into build_partial_difference function.
1916 Added support for debugging stride computations.
1918 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1920 * graphite-clast-to-gimple.c (gloog): Free if_region,
1921 if_region->true_region, and if_region->region.
1922 * sese.c (if_region_set_false_region): Free if_region->false_region.
1923 (create_if_region_on_edge): Do not use GGC_NEW.
1924 (move_sese_in_condition): Remove useless initialization.
1926 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1928 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1929 for the loops created by the loop distribution. Do not modify the
1931 (lst_try_interchange_loops): Same. Use a temporary LST for the
1932 transformed schedule. Call lst_update_scattering before data
1933 dependence analysis.
1934 (lst_try_interchange): Pass an extra parameter INDEX.
1935 (lst_do_interchange_1): New.
1936 (lst_do_interchange): Call lst_do_interchange_1.
1937 (scop_do_interchange): Call lst_update_scattering.
1938 * graphite-poly.c (apply_poly_transforms): Do not call
1939 lst_update_scattering.
1940 * graphite-poly.h (lst_pred): New.
1942 (lst_find_first_pbb): Return NULL when not found.
1944 (lst_insert_in_sequence): Allow LST1 to be NULL.
1946 (lst_substitute_3): New.
1947 * gcc.dg/graphite/interchange-1.c: XFail.
1948 * gcc.dg/graphite/interchange-8.c: XFail.
1949 * gcc.dg/graphite/interchange-11.c: XFail.
1951 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1953 * graphite-interchange.c (lst_perfectly_nested_p): New.
1954 (lst_perfect_nestify): New.
1955 (lst_try_interchange_loops): Call store_lst_schedule,
1956 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1957 (scop_do_interchange): Avoid redundant legality test.
1958 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1959 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1960 * graphite-poly.h (psct_static_dim): New.
1961 (lst_dewey_number_at_depth): New.
1962 (lst_find_pbb): Restructured.
1963 (lst_find_first_pbb): Restructured.
1964 (lst_find_last_pbb): New.
1965 (lst_contains_p): New.
1966 (lst_contains_pbb): New.
1967 (lst_create_nest): New.
1968 (lst_remove_from_sequence): New.
1969 (pbb_update_scattering): New.
1970 (lst_update_scattering_under): New.
1971 (lst_update_scattering_seq): New.
1972 (lst_update_scattering): New.
1973 (lst_insert_in_sequence): New.
1974 (lst_distribute_lst): New.
1975 (lst_remove_all_before_including_pbb): New.
1976 (lst_remove_all_before_excluding_pbb): New.
1978 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1980 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1981 get_loop_exit_edges.
1983 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1985 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1987 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1989 * graphite-poly.c (print_permutation): New.
1990 (debug_permutation): New.
1991 (new_poly_bb): Initialize PBB_PERMUTATION.
1992 (free_poly_bb): Free PBB_PERMUTATION.
1993 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1994 (struct pbb_permutation_elt): New.
1995 (PBB_PERMUTATION_ELT_STRIDE): New.
1996 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1997 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1998 (new_pbb_permutation_elt): New.
1999 (pbb_permutation_elt_free): New.
2000 (struct poly_bb): Add field permutation.
2001 (PBB_PERMUTATION): New.
2002 (print_permutation): Declared.
2003 (debug_permutation): Declared.
2005 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2007 * graphite-clast-to-gimple.c (gloog): Do not call
2008 sese_reset_aux_in_loops.
2009 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2010 extra argument for domains. Do not use loop->aux.
2011 (build_scop_iteration_domain): Initialize and free domains, pass it
2012 to build_loop_iteration_domains and extract the information from
2013 domains. Do not use loop->aux.
2014 * sese.c (sese_reset_aux_in_loops): Removed.
2015 * sese.h (sese_reset_aux_in_loops): Removed.
2017 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2019 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2020 (dependency_in_loop_p): Same.
2021 (translate_clast): Do not use loop->aux. Initialize
2022 loop->can_be_parallel.
2023 (mark_loops_parallel): Removed.
2024 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2025 * graphite.c (free_aux_in_new_loops): Removed.
2026 (graphite_finalize): Do not call free_aux_in_new_loops.
2027 (graphite_transform_loops): Do not call mark_loops_parallel.
2029 2009-10-26 Li Feng <nemokingdom@gmail.com>
2031 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2032 (translate_clast): Pass an extra parameter LEVEL.
2033 Call get_scattering_level.
2034 * graphite-clast-to-gimple.h (get_scattering_level): New.
2036 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2038 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2039 * cfgloop.h (struct loop): New field single_iv.
2041 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2042 loop->aux anymore: use loop->single_iv.
2043 (graphite_loop_normal_form): Moved...
2044 (build_graphite_loop_normal_form): Removed.
2045 (gloog): Do not call build_graphite_loop_normal_form.
2046 (free_aux_in_new_loops): Moved...
2047 (mark_loops_parallel): Restructure.
2048 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2049 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2050 (scop_canonicalize_loops): New.
2051 (build_poly_scop): Call scop_canonicalize_loops.
2052 * graphite.c (free_aux_in_new_loops): ...here.
2054 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2056 * g++.dg/graphite/graphite.exp: Add the same rules as in
2057 gcc.dg/graphite/graphite.exp.
2059 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2061 * g++.dg/graphite/id-1.C: New.
2063 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2065 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2067 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2068 (rewrite_phi_out_of_ssa): Same.
2069 (rewrite_cross_bb_scalar_deps): Same.
2070 (translate_scalar_reduction_to_array): Same.
2072 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2074 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2077 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2079 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2080 (build_scop_drs): Call dump_alias_graphs.
2082 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2084 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2085 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2086 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2087 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2088 * graphite-poly.h (free_lst): New.
2089 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2090 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2092 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2094 * graphite-poly.h (struct scop): Add a field saved_schedule.
2095 (SCOP_SAVED_SCHEDULE): New.
2096 (store_lst_schedule): New.
2097 (restore_lst_schedule): New.
2098 (store_scattering): Call store_lst_schedule.
2099 (restore_scattering): Call restore_lst_schedule.
2101 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2103 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2104 (pdr_add_alias_set): Same.
2105 (build_poly_dr): Same.
2106 (build_alias_set_optimal_p): Same.
2107 (build_base_obj_set_for_drs): Same. Do not store the result of
2110 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2112 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2113 all_components_are_cliques to 1.
2115 2009-10-20 Li Feng <nemokingdom@gmail.com>
2117 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2119 (pdr_add_alias_set): Update retrieving alias_set_num.
2120 (build_poly_dr): Update retrieving dr_base_object_set.
2121 (partition_drs_to_sets): Remove.
2122 (build_alias_set_optimal_p): New.
2123 (build_alias_set_for_drs): Rename.
2124 (build_scop_drs): Update.
2125 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2126 (ALIAS_SET_INDEX): Remove.
2127 (BASE_OBJECT_SET_INDEX): Remove.
2129 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2131 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2133 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2135 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2136 loop upper bounds for 1-element arrays at end of structures.
2137 * tree-flow.h (array_at_struct_end_p): Declared.
2138 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2140 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2142 * g++.dg/graphite/pr41305.C: New.
2144 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2146 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2147 construction of parameter constraints from loop iteration analysis.
2148 * gcc.dg/graphite/run-id-2.c: New test.
2150 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2152 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2155 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2157 * graphite-dependences.c (dependence_polyhedron_1): Remove
2158 unused gdim dimensions from the DDR polyhedron.
2160 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2162 * graphite-dependences.c (pddr_transformed_scattering): New.
2163 (dot_original_deps_stmt_1): New.
2164 (dot_transformed_deps_stmt_1): New.
2165 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2166 dot_transformed_deps_stmt_1.
2167 (dot_original_deps): New.
2168 (dot_transformed_deps): New.
2169 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2171 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2173 * graphite-dependences.c (reduction_dr_1): Remove wrong
2174 assert: reduction BBs can have multiple reduction writes
2175 to memory. interchange-3.f90 is an example.
2177 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2179 * gfortran.dg/graphite/interchange-3.f90: New.
2181 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2183 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2185 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2187 * graphite-dependences.c (dependence_polyhedron_1): Add the
2188 context to the dependence polyhedron.
2190 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2192 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2193 PBB_PDR_DUPLICATES_REMOVED.
2194 (new_poly_bb): Same.
2196 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2198 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2200 (build_loop_iteration_domains): Extract bounds on parameters
2201 based on the data size.
2202 (build_scop_context): Do not initialize SCOP_CONTEXT;
2203 add new constraints.
2205 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2207 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2208 * graphite-ppl.h (graphite-ppl.h): Declared.
2210 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2212 * graphite-ppl.c (ppl_print_linear_expr): New.
2213 (debug_ppl_linear_expr): New.
2214 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2215 (debug_ppl_linear_expr): Declared.
2217 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2219 * graphite-interchange.c: Fix comments.
2220 * gcc.dg/graphite/block-1.c: Fix comments.
2222 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2224 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2225 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2227 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2229 Reapply the patch from Alexander Monakov that disappeared during
2230 the last merges from trunk.
2232 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2234 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2235 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2237 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2239 * graphite-interchange.c (memory_stride_in_loop): The depth
2240 argument corresponds to a dynamic time dimension, so use
2241 psct_dynamic_dim to refer to the transformed scattering dimension.
2243 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2245 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2247 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2249 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2251 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2252 the root of the LST.
2253 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2255 (print_lst): Print the root of LST in a different format.
2256 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2258 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2260 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2262 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2264 * doc/passes.texi: Document the Graphite infrastructure.
2266 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2268 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2269 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2270 and check the SSA representation.
2272 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2274 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2276 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2278 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2280 * gcc.dg/graphite/interchange-11.c: New.
2282 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2284 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2286 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2288 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2289 Add -fno-loop-strip-mine and -fno-loop-interchange.
2290 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2291 -fno-loop-strip-mine.
2292 * gfortran.dg/graphite/graphite.exp: Same.
2294 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2296 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2297 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2298 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2299 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2300 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2301 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2302 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2303 DEFAULT_FLAGS_GRAPHITE_SCOP.
2304 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2305 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2307 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2309 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2311 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2312 Sebastian Pop <sebastian.pop@amd.com>
2314 * graphite-interchange.c (build_linearized_memory_access): Pass an
2315 offset as parameter.
2316 (memory_stride_in_loop): Include transform scattering in the
2317 access functions to be able to querry the strides in the
2319 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2320 not the psct_iterator_dim.
2322 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2324 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2325 (lst_do_strip_mine_loop): New.
2326 (lst_do_strip_mine): New.
2327 (scop_do_strip_mine): Call lst_do_strip_mine.
2328 * graphite-poly.h (lst_add_loop_under_loop): New.
2329 (lst_find_first_pbb): New.
2331 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2333 * graphite-poly.c (loop_to_lst): Fix LST creation.
2335 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2337 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2338 sizeof(unsigned long) to make it run on 32bit systems.
2340 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2342 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2345 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2347 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2349 (write_alias_graph_to_ascii_dot): New.
2350 (write_alias_graph_to_ascii_ecc): Ditto.
2351 (partition_drs_to_sets): Add testing of optimality of current method
2352 which assigns alias numbers according to DFS Comopnent number. used
2353 as heuristic for the upcoming ECC algorithm.
2354 (build_scop_drs): Write to file also with the ecc and dot format.
2356 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2358 * gfortran.dg/graphite/interchange-1.f: XFail.
2360 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2362 * graphite.c (graphite_initialize): Do not handle functions with
2363 more than 100 basic blocks.
2365 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2367 * graphite-blocking.c (pbb_do_strip_mine): Use
2368 PARAM_LOOP_BLOCK_TILE_SIZE.
2370 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2372 * graphite-poly.c (dot_lst_1): New.
2374 * graphite-poly.h (dot_lst): Declared.
2376 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2378 * graphite-dependences.c (dot_deps_stmt_1): New.
2379 (dot_deps_stmt): New.
2380 * graphite-dependences.h (dot_deps_stmt): Declared.
2382 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2384 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2385 not replace cross BB scalar dependences ending on PHI nodes.
2386 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2388 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2390 * graphite-poly.c (apply_poly_transforms): Implement the high
2391 level driver for flag_loop_block.
2392 * opts.c (decode_options): Enable flag_loop_block at -O2.
2393 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2396 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2398 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2401 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2403 * graphite-poly.h (lst_find_pbb): New.
2404 (find_lst_loop): New.
2406 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2408 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2409 * graphite-poly.h (struct scop): Remove dep_graph field.
2410 (SCOP_DEP_GRAPH): Removed.
2412 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2414 * graphite-poly.h (copy_lst): Do full copy of LST.
2416 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2418 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2419 when the loop stride is zero.
2421 * gcc.dg/graphite/id-16.c: New.
2423 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2425 * graphite-dependences.c (reduction_dr_1): New.
2426 (reduction_dr_p): New.
2427 (graphite_legal_transform_dr): Call reduction_dr_p.
2428 (reduction_ddr): Renamed reduction_ddr_p.
2429 * graphite-poly.h (same_pdr_p): New.
2430 (number_of_write_pdrs): New.
2431 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2432 (split_reduction_stmt): Do not split reduction statements
2433 when there are no writes to memory.
2434 (translate_scalar_reduction_to_array_for_stmt): Insert the
2435 memory reduction statement just after the scalar reduction statement.
2437 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2439 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2440 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2442 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2444 * graphite-interchange.c (lst_apply_interchange): New.
2445 (lst_interchange_profitable_p): New.
2446 (lst_try_interchange_loops): New.
2447 (lst_try_interchange): New.
2448 (lst_do_interchange): New.
2449 (pbb_do_interchange): Removed.
2450 (scop_do_interchange): Call lst_do_interchange.
2452 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2454 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2455 SCOP_TRANSFORMED_SCHEDULE.
2460 * graphite-poly.h (lst_p): New.
2463 (LST_LOOP_FATHER): New.
2466 (scop_to_lst): Declared.
2467 (print_lst): Declared.
2468 (debug_lst): Declared.
2469 (new_lst_loop): New.
2470 (new_lst_stmt): New.
2473 (lst_dewey_number): New.
2474 (struct scop): Add original_schedule and transformed_schedule fields.
2475 (SCOP_ORIGINAL_SCHEDULE): New.
2476 (SCOP_TRANSFORMED_SCHEDULE): New.
2477 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2479 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2481 * graphite-dependences.c (reduction_ddr): New.
2482 (graphite_legal_transform_bb): Call reduction_ddr.
2483 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2484 Initialize PBB_IS_REDUCTION.
2485 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2486 (PBB_IS_REDUCTION): New.
2487 (new_poly_bb): Update declaration.
2488 * graphite-scop-detection.h (build_scop_bbs): Removed.
2489 (nb_reductions_in_loop): Removed.
2490 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2491 parameter for reductions.
2492 (try_generate_gimple_bb): Update call to new_poly_bb.
2493 (build_scop_bbs_1): Same.
2494 (build_scop_bbs): Same.
2495 (gsi_for_phi_node): New.
2496 (scalar_close_phi_node_p): Remove gcc_assert.
2497 (split_reduction_stmt): New.
2498 (is_reduction_operation_p): New.
2499 (phi_contains_arg): New.
2500 (follow_ssa_with_commutative_ops): New.
2501 (detect_commutative_reduction_arg): New.
2502 (detect_commutative_reduction_assign): New.
2503 (follow_inital_value_to_phi): New.
2504 (edge_initial_value_for_loop_phi): New.
2505 (initial_value_for_loop_phi): New.
2506 (detect_commutative_reduction): New.
2507 (translate_scalar_reduction_to_array_for_stmt): New.
2508 (insert_copyout): New.
2509 (insert_copyin): New.
2510 (translate_scalar_reduction_to_array): New.
2511 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2512 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2513 (rewrite_commutative_reductions_out_of_ssa): New.
2514 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2515 * sese.h (split_region_for_bb): New.
2517 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2518 * gcc.dg/graphite/interchange-1.c: Fix format.
2519 * gcc.dg/graphite/interchange-10.c: New.
2521 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2523 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2526 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2528 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2529 (rewrite_cross_bb_scalar_dependence): New.
2530 (rewrite_cross_bb_scalar_deps): New.
2531 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2532 Call rewrite_cross_bb_scalar_deps.
2534 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2536 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2537 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2540 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2542 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2543 * graphite-interchange.c (pbb_do_interchange): Same.
2544 * graphite-poly.c (print_scattering_function): Same.
2546 * graphite-poly.h (pbb_loop): New.
2547 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2549 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2551 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2553 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2555 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2556 so don't pass a pointer to it.
2557 (build_alias_set_for_drs): Same.
2558 (build_base_obj_set_for_drs): Same.
2559 (build_scop_drs): Same.
2561 2009-09-26 Li Feng <nemokingdom@gmail.com>
2563 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2564 the alias graph of data references.
2566 2009-09-25 Li Feng <nemokingdom@gmail.com>
2568 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2569 (build_scop_drs): When debugging, write the alias graph to file,
2570 otherwise, should be disabled.
2572 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2574 * Merge from mainline (151310:151361).
2576 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2578 * Merge from mainline (151171:151310).
2580 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2582 * Merge from mainline (151171:151806).
2584 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2586 * Revert the last commit.
2588 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2590 * Merge from mainline (151171:151819).
2592 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2594 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2595 (is_simple_operand): Remove call to stmt_simple_memref_p.
2596 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2598 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2600 * gcc.dg/graphite/interchange-mvt.c: New File.
2601 * gcc.dg/graphite/scop-dsyrk.c: New File.
2602 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2603 * gcc.dg/graphite/scop-mvt.c: New File.
2604 * gcc.dg/graphite/scop-sor.c: New File.
2606 2009-09-17 Li Feng <nemokingdom@gmail.com>
2608 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2609 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2610 (graphite_carried_dependence_level_k): Ditto.
2611 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2612 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2613 (new_poly_dr): Adjust declaration.
2614 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2615 (free_gimple_bb): Added free_data_refs_aux.
2616 (build_poly_dr): Add dr_base_object_set.
2617 (partition_drs_to_sets): New.
2618 (dr_same_base_object_p): New.
2619 (build_alias_set_for_drs): New.
2620 (build_base_object_set_for_drs): New.
2621 (build_scop_drs): Add build_base_obj_set_for_drs.
2622 * graphite-sese-to-poly.h: Added #define for alias set number index and
2623 base object set index.
2624 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2625 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2627 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2629 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2630 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2632 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2634 * graphite-sese-to-poly.c (struct irp_data): Removed.
2635 (idx_record_params): Removed.
2636 (find_params_in_bb): Scan for parameters the access functions; don't
2637 parse the tree representation.
2639 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2641 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2642 passes at -O1 and below.
2644 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2646 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2647 tree-scalar-evolution.h, and then tree-data-ref.h.
2648 * graphite-clast-to-gimple.c: Same.
2649 * graphite-dependences.c: Same.
2650 * graphite-interchange.c: Same.
2651 * graphite-poly.c: Same.
2652 * graphite-scop-detection.c: Same.
2653 * graphite-sese-to-poly.c: Same.
2655 * lambda-code.c: Same.
2656 * matrix-reorg.c: Same.
2657 * tree-data-ref.c: Same.
2658 * tree-if-conv.c: Same.
2659 * tree-loop-distribu: Same.: Same.
2660 * tree-loop-linear.c: Same.
2661 * tree-parloops.c: Same.
2662 * tree-predcom.c: Same.
2663 * tree-vect-patterns.c: Same.
2665 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2667 Partially revert the previous patch, except the following.
2668 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2669 as parameters the operands of the not expression.
2671 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2673 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2674 Do not call analyze_scalar_evolution on assignments.
2675 (instantiate_scev_phi): Call analyze_scalar_evolution.
2676 (instantiate_scev_name): Call instantiate_scev_assign and
2677 instantiate_scev_phi.
2678 (instantiate_scev_not): Adapted to pass as parameters the operands
2679 of the not expression.
2681 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2683 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2684 to pass as parameters the operands of the binary expression.
2686 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2688 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2689 instantiate_scev_not. Handle NEGATE_EXPR.
2690 (instantiate_scev_r): Handle NEGATE_EXPR.
2692 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2694 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2696 (instantiate_scev_r): Move code in instantiate_scev_2
2697 and instantiate_scev_1.
2699 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2701 * tree-scalar-evolution.c (instantiate_scev_3): New.
2702 (instantiate_scev_1): Move code in instantiate_scev_3.
2704 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2706 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2707 (instantiate_scev_1): Move code in instantiate_scev_poly.
2709 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2711 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2712 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2714 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2716 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2717 (instantiate_scev_1): Move code in instantiate_scev_convert.
2719 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2721 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2722 (instantiate_scev_1): Move code in instantiate_scev_binary.
2724 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2726 * tree-scalar-evolution.c (instantiate_scev_name): New.
2727 (instantiate_scev_1): Move code in instantiate_scev_name.
2729 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2731 * Merge from mainline (150992:151171).
2733 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2735 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2737 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2739 * graphite-dependences.c (graphite_legal_transform_bb): Call
2740 pbb_remove_duplicate_pdrs.
2741 * graphite-poly.c (can_collapse_pdr): Removed.
2742 (pdr_find_duplicate): Removed.
2743 (can_collapse_pdrs): New.
2744 (pbb_remove_duplicate_pdrs): New.
2745 (new_poly_dr): Do not look for duplicates.
2746 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2747 (PBB_PDR_DUPLICATES_REMOVED): New.
2748 (pbb_remove_duplicate_pdrs): Declared.
2750 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2752 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2753 the strides by multiplying by PDR_NB_REFS.
2754 * graphite-poly.c (can_collapse_pdr): New.
2755 (pdr_find_duplicate): New.
2756 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2757 Initialize PDR_NB_REFS.
2758 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2760 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2762 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2764 Revert one of the previous commits:
2765 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2766 the computation of symmetric data dependence relations.
2767 (dependency_between_pbbs_p): Same.
2769 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2772 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2775 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2777 * graphite-dependences.c (pddr_original_scattering): Return NULL
2778 for read-read dependence relations.
2779 * graphite-poly.h (enum poly_dr_type): Fix comment.
2782 (pdr_may_write_p): New.
2784 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2786 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2787 (struct poly_dr): Same.
2788 (new_poly_dr): Same.
2789 * graphite-poly.c (new_poly_dr): Same.
2791 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2792 Sebastian Pop <sebastian.pop@amd.com>
2794 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2795 pbb_strip_mine_time_depth. Changed the implementation so that
2796 transformation is expressed as a transformation on
2797 time (scatttering) dimensions. Also, ensures that the 2d+1
2798 scheduling format is preserved.
2799 (pbb_strip_mine_profitable_p): Profitability is based on the
2800 iteration number of a given time (scattering) dimension,
2801 and not on a original loop depth dimension.
2802 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2803 (pbb_do_strip_mine): Call psct_dynamic_dim.
2804 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2805 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2806 (pbb_nb_dynamic_scattering_transform): New.
2807 (psct_dynamic_dim): New.
2809 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2811 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2812 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2813 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2814 * graphite-interchange.c (build_linearized_memory_access): Same.
2815 (memory_stride_in_loop): Same.
2817 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2819 * graphite-dependences.c (pddr_original_scattering): New.
2820 (graphite_legal_transform_dr): Call pddr_original_scattering.
2823 * graphite-dependences.h (dot_deps): Declared.
2824 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2825 (print_pdr): Print PDR_ID.
2826 * graphite-poly.h (struct poly_dr): Add field id.
2829 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2831 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2833 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2834 not delete the original dependence relation.
2836 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2838 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2839 the computation of symmetric data dependence relations.
2840 (dependency_between_pbbs_p): Same.
2842 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2844 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2845 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2846 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2847 (free_poly_ddr): New.
2848 (pddr_is_empty): New.
2849 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2850 (dependence_polyhedron): Same. Remove useless gcc_assert.
2852 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2853 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2854 * graphite-dependences.h (enum poly_dependence_kind): New.
2855 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2856 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2857 (PDRP_SINK): Renamed PDDR_SINK.
2858 (PDRP_DDP): Renamed PDDR_DDP.
2860 (free_poly_ddr): Declared.
2861 * graphite-poly.c (new_scop): Use the new hash function names.
2862 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2863 into original_pddrs.
2864 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2866 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2868 * Merge from mainline (150764:150992).
2870 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2872 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2873 bounds with LT_EXPR to make niter analysis more precise on code
2874 generated by Graphite.
2876 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2878 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2879 (graphite_legal_transform_bb): Same.
2880 (poly_drs_may_alias_p): Same.
2882 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2885 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2886 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2888 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2890 * graphite-poly.c (print_pbb): Print PBB index.
2892 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2894 * Merge from mainline (r150672:150764).
2896 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2898 * graphite-interchange.c (ppl_max_for_le): Moved...
2899 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2900 * graphite-ppl.c (ppl_max_for_le): ... here.
2901 * graphite-ppl.h (ppl_max_for_le): Declared.
2903 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2905 * Merge from mainline (r150372:150672).
2907 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2910 * sese.c (convert_for_phi_arg): New.
2911 (add_guard_exit_phis): Use convert_for_phi_arg.
2913 * gfortran.dg/graphite/id-17.f: New.
2915 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2917 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2918 unknown subscript upper bounds.
2920 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2922 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2923 Pranav Garg <pranav.garg2107@gmail.com>
2925 * graphite-interchange.c (gather_access_strides): Removed.
2926 (ppl_max_for_le): New.
2927 (build_linearized_memory_access): New.
2928 (memory_stride_in_loop): New.
2929 (pbb_interchange_profitable_p): Reimplemented.
2930 * graphite-ppl.h (ppl_new_id_map): New.
2931 (ppl_interchange): New.
2933 * gcc.dg/graphite/interchange-6.c: XFAILed.
2935 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2937 * graphite-interchange.c (compute_subscript): Removed.
2938 (compute_array_size_cstr): Removed.
2939 (compute_array_size_poly): Removed.
2940 (compute_array_size): Removed.
2941 (gather_access_strides_poly): Removed.
2942 (gather_access_strides): Empty.
2944 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2946 * graphite-dependences.c (dependence_polyhedron_1): Replace
2947 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2948 (graphite_legal_transform_dr): Same.
2949 (graphite_carried_dependence_level_k): Same.
2950 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2951 Initialize PDR_NB_SUBSCRIPTS.
2952 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2954 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2955 (PDR_NB_SUBSCRIPTS): New.
2956 (pdr_nb_subscripts): Removed.
2957 (pdr_dim): Simplified.
2958 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2959 with PDR_NB_SUBSCRIPTS.
2961 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2963 * graphite-interchange.c (compute_array_size): Remove use of
2965 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2966 Do not initialize PDR_DATA_CONTAINER.
2967 (print_pdr): Do not print PDR_DATA_CONTAINER.
2968 * graphite-poly.h (struct poly_dr): Remove data_container field.
2969 (PDR_DATA_CONTAINER): Removed.
2970 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2972 (build_poly_dr): Same.
2974 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2976 * gcc.dg/graphite/interchange-9.c: New.
2978 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2979 Sebastian Pop <sebastian.pop@amd.com>
2981 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2982 copy of the dependence polyhedron. Free the temporary objects.
2983 (graphite_carried_dependence_level_k): Free unused objects before
2986 * gcc.dg/graphite/interchange-1.c: XFAILed.
2987 * gcc.dg/graphite/interchange-2.c: XFAILed.
2988 * gcc.dg/graphite/interchange-3.c: XFAILed.
2989 * gcc.dg/graphite/interchange-4.c: XFAILed.
2990 * gcc.dg/graphite/interchange-7.c: XFAILed.
2992 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2994 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2995 Early return without analyzing the data dependences if no
2996 transform has been done. Call restore_scattering if the transform
2998 (graphite-interchange.c): Same.
2999 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3000 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3001 (apply_poly_transforms): Do not gcc_assert that
3002 the transform is legal.
3003 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3004 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3005 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3006 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3007 * graphite-poly.h (struct poly_scattering): New.
3008 (struct poly_bb): Add original, transformed, and saved fields.
3009 Remove transformed_scattering, original_scattering, nb_local_variables,
3010 and nb_scattering_transform fields.
3011 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3012 (poly_scattering_new): New.
3013 (poly_scattering_free): New.
3014 (poly_scattering_copy): New.
3015 (store_scattering_pbb): New.
3016 (store_scattering): New.
3017 (restore_scattering_pbb): New.
3018 (restore_scattering): New.
3019 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3020 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3022 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3024 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3027 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3029 * Makefile.in (graphite.o): Depends on PREDICT_H.
3030 * graphite.c: Include predict.h.
3031 (graphite_finalize): Call tree_estimate_probability.
3032 * predict.c (predict_loops): Do not call scev_initialize and
3034 (tree_estimate_probability_bb): New.
3035 (tree_estimate_probability): Do not initialize loops: move that
3036 code to the driver. Call tree_estimate_probability_bb.
3037 (tree_estimate_probability_driver): New.
3038 (pass_profile): Use tree_estimate_probability_driver.
3039 * predict.h (tree_estimate_probability): Declared.
3041 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3043 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3044 * graphite-dependences.c (graphite_legal_transform): Add time to
3045 TV_GRAPHITE_DATA_DEPS.
3046 (dependency_between_pbbs_p): Same.
3047 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3049 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3051 * Merge from mainline (r149952:150372).
3053 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3055 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3056 * graphite-blocking.c: Same.
3057 * graphite-clast-to-gimple.c: Same.
3058 * graphite-dependences.c: Same.
3059 * graphite-poly.c: Same.
3060 * graphite-poly.h: Same.
3061 * graphite-ppl.c: Same.
3062 * graphite-scop-detection.c: Same.
3063 * graphite-sese-to-poly.c: Same.
3066 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3068 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3069 (remove_simple_copy_phi): New.
3070 (remove_invariant_phi): New.
3071 (simple_copy_phi_p): New.
3072 (reduction_phi_p): New.
3073 (gsi_for_ssa_name_def): New.
3074 (insert_out_of_ssa_copy): New.
3075 (insert_out_of_ssa_copy_on_edge): New.
3076 (create_zero_dim_array): New.
3077 (scalar_close_phi_node_p): New.
3078 (rewrite_close_phi_out_of_ssa): New.
3079 (rewrite_phi_out_of_ssa): New.
3080 (rewrite_reductions_out_of_ssa): New.
3081 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3083 * gcc.dg/graphite/id-11.c: New.
3084 * gcc.dg/graphite/id-15.c: New.
3085 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3086 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3087 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3088 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3089 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3090 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3091 * gfortran.dg/graphite/id-13.f: New.
3092 * gfortran.dg/graphite/id-5.f: New.
3094 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3096 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3097 check that nb_reductions_in_loop is zero.
3098 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3099 reduction phi nodes.
3100 (nb_reductions_in_loop): Removed.
3101 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3102 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3103 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3104 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3105 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3107 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3109 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3110 statements that have an empty iteration domain.
3111 * gfortran.dg/graphite/id-16.f: New.
3113 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3115 * tree-scalar-evolution.c (instantiate_scev_1): Return
3116 chrec_dont_know when the result is not above instantiate_below.
3117 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3118 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3119 the tree has a known scalar evolution.
3120 * gfortran.dg/graphite/id-14.f: New.
3121 * gfortran.dg/graphite/id-15.f: New.
3123 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3125 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3127 (rename_variables): Keep inserting renames after the ones already
3130 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3132 * graphite-sese-to-poly.c (compare_bb_depths): New.
3133 (graphite_sort_dominated_info): New.
3134 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3135 (build_scop_scattering): Fix comment.
3137 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3139 * graphite.c (graphite_finalize): Call print_loops instead of
3140 dump_function_to_file.
3141 * gcc.dg/graphite/graphite.exp: Fix formatting.
3142 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3143 loops generated in the graphite output file.
3144 * gcc.dg/graphite/pr35356-2.c: New.
3145 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3146 * gfortran.dg/graphite/id-12.f: New.
3148 2009-07-24 Li Feng <nemokingdom@gmail.com>
3150 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3153 2009-07-24 Li Feng <nemokingdom@gmail.com>
3154 Tobias Grosser <grosser@fim.uni-passau.de>
3156 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3157 alias set number build alias in ACCESSES polyhedron.
3158 (build_alias_set_for_drs): New.
3159 (build_pbb_drs): Added build_alias_set_for_drs.
3160 * graphite-dependences.c (poly_drs_may_alias_p): New.
3161 (graphite_carried_dependence_level_k): Check alias information
3162 before building polyhedron.
3164 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3166 * Makefile.in (lambda-code.o): Fix formatting.
3168 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3170 * Merge from mainline (r149350-149952)
3172 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3174 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3175 before interchange to prepare for loop blocking.
3177 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3179 * graphite-poly.c (apply_poly_transforms): Add checks after every
3181 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3182 done in apply_poly_transforms.
3184 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3186 * graphite-dependences.c (build_lexicographically_gt_constraint):
3187 Replace RES parameter with *RES.
3188 (dependence_polyhedron_1): Pass an address of the parameter RES
3189 instead of value of RES.
3191 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3193 * graphite.c (graphite_finalize): Fix comment.
3194 (graphite_transform_loops): Reset scev info after code generation
3197 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3199 * graphite.c (graphite_finalize): Call scev_reset.
3201 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3203 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3204 GBB_CLOOG_IV_TYPES hash table twice.
3205 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3206 (add_condition_to_domain): Clear GMP values.
3208 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3210 * graphite-dependences.c: Fix formatting.
3211 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3212 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3213 * graphite-sese-to-poly.c: Fix formatting.
3214 * graphite.c (graphite_transform_loops): Create the hash table
3215 after the early return.
3217 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3219 * gcc.dg/graphite/id-14.c: New.
3220 * gcc.dg/graphite/pr40157.c: New.
3221 * gfortran.dg/graphite/id-11.f: New.
3223 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3225 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3226 (build_poly_scop): Return false when there are no pbbs within
3227 loops to avoid to pass to cloog scops with no loops.
3229 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3231 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3232 useless test "i % 2".
3233 (build_pbb_scattering_polyhedrons): Fix formatting.
3234 (build_poly_dr): Same.
3235 * graphite.c (graphite_transform_loops): Restructure.
3237 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
3239 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3240 reduction_list parameter.
3241 (rewrite_all_phi_nodes_with_iv): Same.
3242 (canonicalize_loop_ivs): Same.
3243 * tree-parloops.c (struct brli): Removed.
3244 (build_reduction_list_info): Removed.
3245 (build_new_reduction): New.
3246 (analyze_reduction_list): Removed.
3247 (gather_scalar_reductions): Find reductions instead of phi
3248 nodes that can't be canonicalized.
3249 (try_create_reduction_list): Remove reduction_list parameter.
3250 (gen_parallel_loop): Same.
3251 (parallelize_loops): Remove analyze_reductions variable,
3252 initialization and free.
3253 Change reduction_list htab initialization to reduction_info
3254 elements instead of ssa names.
3255 Call try_create_reduction_list and gen_parallel_loop without
3256 analyzed_reduction argument.
3257 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3258 canonicalize_loop_ivs with one less argument.
3259 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3261 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3263 * graphite-dependences.c (new_poly_dr_pair): New.
3264 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3265 (new_poly_dr_pair): New.
3266 (eq_poly_dr_pair_p): New.
3267 (hash_poly_dr_pair_p): New.
3268 * graphite-dependences.h (struct poly_dr_pair): New.
3269 (eq_poly_dr_pair_p): Declared.
3270 (hash_poly_dr_pair_p): Declared.
3271 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3272 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3273 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3274 * Makefile.in (graphite-poly.o): Add dependence on
3275 graphite-dependences.h.
3277 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3279 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3280 polynomials of degree > 1 pass to Graphite.
3281 * tree-chrec.c (scev_is_linear_expression): Call
3282 evolution_function_is_affine_multivariate_p.
3283 * gfortran.dg/graphite/id-10.f90: New.
3285 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3287 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3288 Instantiate scevs varying in outer loops.
3289 * gfortran.dg/graphite/id-9.f: Correct testcase.
3291 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3293 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3294 redundant constraint.
3296 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3298 * gcc.dg/graphite/graphite.exp: Fix comments.
3299 * gfortran.dg/graphite/graphite.exp: Trigger actions
3300 based on the file names as in the C testsuite.
3301 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3302 * gfortran.dg/graphite/block-2.f: Same.
3303 * gfortran.dg/graphite/block-3.f90: Same.
3304 * gfortran.dg/graphite/block-4.f90: Same.
3305 * gfortran.dg/graphite/id-1.f90: Same.
3306 * gfortran.dg/graphite/id-2.f90: Same.
3307 * gfortran.dg/graphite/id-3.f90: Same.
3308 * gfortran.dg/graphite/id-4.f90: Same.
3309 * gfortran.dg/graphite/id-6.f: Same.
3310 * gfortran.dg/graphite/id-9.f: Same.
3311 * gfortran.dg/graphite/interchange-1.f: Same.
3312 * gfortran.dg/graphite/interchange-2.f: Same.
3313 * gfortran.dg/graphite/scop-1.f: Same.
3315 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3317 * sese.c (expand_scalar_variables_call): New.
3318 (expand_scalar_variables_ssa_name): Handle calls in expander.
3320 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3322 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3323 Expect to see the pattern twice.
3324 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3325 * gcc.dg/graphite/interchange-5.c: Same.
3326 * gcc.dg/graphite/interchange-6.c: Same.
3328 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3330 * gcc.dg/graphite/id-10.c: New.
3331 * gcc.dg/graphite/id-12.c: New.
3332 * gfortran.dg/graphite/id-7.f: New.
3333 * gfortran.dg/graphite/id-8.f: New.
3335 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3337 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3340 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3342 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3344 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3346 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3348 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3350 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3351 building PDR subscripts.
3353 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3355 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3356 computation of array sizes.
3358 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3360 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3362 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3364 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3365 build_pairwise_constraint, dr_equality_constraints,
3366 build_pairwise_scheduling_equality,
3367 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3368 build_lexicographically_gt_constraint, dependence_polyhedron,
3369 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3370 Move from NNC_Polyhedron to C_Polyhedron.
3371 * graphite-interchange.c (compute_array_size_poly,
3372 gather_access_strides): Dito.
3373 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3374 free_scop, pbb_number_of_iterations): Dito.
3375 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3376 pbb_dim_iter_domain, struct scop): Dito.
3377 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3378 new_Cloog_Domain_from_ppl_Polyhedron,
3379 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3380 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3381 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3382 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3383 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3384 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3385 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3386 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3387 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3388 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3389 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3390 build_scop_iteration_domain, build_poly_dr): Dito
3392 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3394 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3396 * gcc.dg/graphite/run-id-1.c: New.
3398 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3400 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3401 positivity constraint on the symbolic number of iterations.
3403 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3405 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3407 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3408 Tobias Grosser <grosser@fim.uni-passau.de>
3410 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3411 (build_cloog_prog): Directly use SCOP_CONTEXT.
3412 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3413 (free_scop): Free SCOP_CONTEXT.
3414 (print_scop_context): New.
3415 (print_scop): Call print_scop_context.
3416 (debug_scop_context): New.
3417 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3418 (struct scop): Added field context.
3419 (SCOP_CONTEXT): New.
3420 * graphite-sese-to-poly.c (add_param_constraints): New.
3421 (build_scop_context): New.
3422 (build_poly_scop): Call build_scop_context.
3424 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3426 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3427 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3428 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3429 * graphite-ppl.h: Include double-int.h and tree.h.
3430 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3431 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3432 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3433 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3435 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3437 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3438 POINTER_PLUS_EXPR for pointer types.
3439 (clast_to_gcc_expression): Same.
3441 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3443 * graphite-poly.c (print_scattering_function): Early return when
3444 PBB_TRANSFORMED_SCATTERING is not initialized.
3445 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3447 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3449 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3452 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3454 * tree-parloops.c (analyze_reduction_list): Change return
3456 (try_create_reduction_list): Move the call to
3457 analyze_reduction_list to the beginining.
3458 Call reduction_phi with analyzed_reductions as argument
3459 instead of reduction_list.
3461 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3463 * Merge from mainline (r148296:149346)
3465 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3467 * graphite-scop-detection.c (graphite_can_represent_init): New.
3468 (graphite_can_represent_scev): Call graphite_can_represent_init:
3469 check that the initial value does not contain multiplications of
3471 (stmt_has_simple_data_refs_p): New.
3472 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3473 (is_simple_operand): Fix formatting.
3474 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3476 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3478 * gcc.dg/graphite/id-13.c: New.
3479 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3480 analyze_scalar_evolution, use scalar_evolution_in_region.
3481 (scan_tree_for_params_right_scev): Add extra assert.
3482 (parameter_index_in_region_1): Split from parameter_index_in_region.
3483 (idx_record_params): Use scalar_evolution_in_region.
3484 (find_params_in_bb): Same.
3485 (find_scop_parameters): Same.
3486 (build_loop_iteration_domains): Same.
3487 (create_linear_expr_from_tree): Same.
3488 * sese.c (scalar_evolution_in_region): New.
3489 * sese.h (scalar_evolution_in_region): Declared.
3490 (defined_in_sese_p): New.
3491 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3493 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3496 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3498 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3499 TREE_DATA_REF_H also implies SCEV_H.
3501 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3503 * graphite-poly.c (print_scop_params): New.
3504 (print_scop): Call print_scop_params.
3505 (debug_scop_params): New.
3506 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3508 2009-07-07 Li Feng <nemokingdom@gmail.com>
3510 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3511 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3512 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3513 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3514 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3515 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3517 2009-07-07 Li Feng <nemokingdom@gmail.com>
3519 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3520 for dependency checking part.
3521 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3522 tests for dependency checking.
3523 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3524 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3525 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3526 flag -fdump-tree-graphite-all for autopar testsuites.
3528 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3530 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3531 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3532 canonicalize_loop_ivs): Moved...
3533 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3535 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3537 * tree-parloops.c (try_create_reduction_list): Pass an extra
3538 argument analyzed_reductions. Call analyze_reduction_list.
3539 (gen_parallel_loop): Do not call analyze_reduction_list.
3540 (parallelize_loops): Init and finalize analyzed_reductions.
3542 2009-07-06 Li Feng <nemokingdom@gmail.com>
3544 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3545 Added flag -fno-loop-strip-mine for autopar testcase.
3547 2009-07-04 Li Feng <nemokingdom@gmail.com>
3549 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3550 transformed scattering dimension instead of unmatch orignal when
3551 calling dependence_polyhedron.
3553 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3555 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3557 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3559 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3560 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3562 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3564 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3565 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3566 * graphite-poly.c (pbb_number_of_iterations): New.
3567 * graphite-poly.h (pbb_number_of_iterations): Declared.
3568 (pbb_iterator_dim, pbb_parameter_dim): New.
3570 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3572 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3573 last commit on type of lower and upper bound of loops.
3575 2009-06-29 Li Feng <nemokingdom@gmail.com>
3577 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3578 graphite-dependences.h.
3579 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3580 (mark_bb_with_pbb): New.
3581 (get_stmtfor_depth): New.
3582 (find_pbb_via_hash): New.
3583 (dependency_in_loop_p): New.
3584 (mark_loops_parallel): New.
3585 (free_aux_in_new_loops): New.
3586 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3587 bb with it's relevant pbb. Mark newly created loops. Remove mark
3588 innermost loop parallel without checking.
3589 (gloog): Add parameter BB_PBB_MAPPING.
3590 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3591 (gloog): Change declaration.
3592 (mark_loop_parallel): Make extern.
3593 (free_aux_in_new_loops): Declare.
3594 (bb_pbb_map_hash): New.
3595 (eq_bb_pbb_map): New.
3596 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3597 auto parallelization when flag_graphite_force_parallel is set.
3598 (graphite_finalize): Added free_aux_in_new_loops.
3599 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3600 the innermost loop that marked parallel. Use
3601 flag_graphite_force_parallel instead of loop->can_be_parallel.
3602 (loop_parallel_p): Move inner most checking out of function.
3604 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3606 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3607 type of lower and upper bound of loops signed long int.
3609 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3611 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3612 expression outside the loop.
3614 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3616 * gcc.dg/graphite/interchange-8.c: New.
3618 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3620 * gcc.dg/graphite/interchange-0.c: XFailed.
3621 * gcc.dg/graphite/interchange-5.c: XFailed.
3622 * gcc.dg/graphite/interchange-6.c: XFailed.
3624 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3626 * graphite-interchange.c (compute_array_size_poly): The end of the
3627 recursion should return 1.
3629 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3631 * graphite-interchange.c (compute_array_size_cstr): Allow the
3632 subscript multiplier to be -1.
3633 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3634 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3635 data_container. Initializes PDR_DATA_CONTAINER.
3636 (print_pdr_access_layout): New.
3637 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3638 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3640 (PDR_DATA_CONTAINER): New.
3641 (new_poly_dr): Update declaration.
3642 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3643 (build_poly_dr): Call pdr_add_data_dimensions.
3645 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3647 * graphite-poly.h (struct poly_dr): Fix comment.
3648 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3649 (pdr_add_memory_accesses): New.
3650 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3652 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3654 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3655 (print_pbb): Add call to print_pdrs.
3656 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3658 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3659 Li Feng <nemokingdom@gmail.com>
3661 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3662 (dependency_between_pbbs_p): New.
3663 (lexicographically_gt_p): Assure !empty_p before polyhedron
3664 intersection assign.
3665 (build_lexicographically_gt_constraint): Correct lexicographically
3667 * graphite-dependences.h: New.
3668 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3670 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3672 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3673 (gloog): Print to dump_file the generated clast.
3674 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3675 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3677 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3679 * graphite-poly.c (extend_scattering): Increment
3680 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3682 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3684 * graphite-interchange.c (compute_array_size_poly): Added exit of
3685 recursion condition. Continue iterating even after the first equality.
3686 (compute_array_size): Same.
3688 2009-06-24 Li Feng <nemokingdom@gmail.com>
3690 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3691 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3692 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3693 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3694 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3696 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3698 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3699 only when the use verifies is_gimple_reg.
3701 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3703 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3704 Allocate scaldims after call to unify_scattering_dimensions.
3706 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3708 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3710 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3711 Albert Cohen <albert.cohen@inria.fr>
3713 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3714 variables for the strip mining.
3716 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3717 Pranav Garg <pranav.garg2107@gmail.com>
3719 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3720 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3721 (graphite-blocking.o): New rule.
3722 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3723 * graphite-blocking.c: New.
3724 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3725 flag_loop_strip_mine.
3726 (psct_scattering_dim_for_loop_depth): New.
3727 * graphite-poly.h (scop_do_strip_mine): Declared.
3728 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3729 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3730 flag_loop_strip_mine.
3732 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3734 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3735 a GMP value and a PPL coefficient at each iteration of a loop.
3737 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3739 * graphite-dependences.c (dependence_polyhedron): Do not use
3740 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3741 pbb_nb_scattering_transform.
3742 (graphite_legal_transform_dr): Same.
3743 * graphite-poly.c (extend_scattering): Same.
3744 (unify_scattering_dimensions): Same.
3745 (print_scattering_function): Same.
3746 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3747 PBB_NB_LOCAL_VARIABLES.
3748 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3749 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3750 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3751 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3752 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3753 (pbb_nb_scattering_transform): New.
3754 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3755 (psco_scattering_dim): Add assert on parameters.
3756 (psct_scattering_dim): Same.
3757 (psct_scattering_dim_for_loop_depth): Declared.
3758 (psct_local_var_dim): New.
3759 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3760 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3761 correct layout, call pbb_nb_local_vars.
3762 (psct_add_local_variable, psct_add_scattering_dimension): New.
3763 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3764 Initialize PBB_NB_SCATTERING_TRANSFORM.
3766 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3768 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3769 (set_coef): Renamed ppl_set_coef.
3770 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3772 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3774 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3775 test a boolean against 1.
3776 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3777 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3778 (pbb_do_interchange): Returns true when a transform has been performed.
3779 (scop_do_interchange): Same.
3780 * graphite-poly.c (apply_poly_transforms): Use the return value of
3781 scop_do_interchange.
3782 * graphite-poly.h (scop_do_interchange): Update declaration.
3784 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3786 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3788 * sese.c (sese_reset_aux_in_loops): New.
3789 * sese.h (sese_reset_aux_in_loops): New.
3791 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3793 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3794 multiplier and multiply the constant by the multiplier.
3795 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3796 (build_poly_dr): Do not use the multiplier to define the subscript.
3798 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3800 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3801 compiler's data reference. Initialize PDR_CDR.
3802 (print_pdr): Call dump_data_reference.
3803 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3804 Add compiler_dr field.
3805 (PDR_BB): Renamed PDR_PBB.
3807 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3808 GCC's data reference representation.
3809 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3810 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3812 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3814 * graphite-poly.c (print_scattering_function): Also print the layout.
3815 * graphite-poly.h (pbb_nb_local_vars): New.
3817 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3819 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3821 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3823 * graphite-poly.c (print_pdr, debug_pdr): New.
3824 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3825 (PDR_BASE): Removed.
3827 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3829 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3832 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3834 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3835 subscript identification column.
3836 (pbb_do_interchange): Print to dump_file that some loops "will be
3837 interchanged". Rely on that chain of characters in the testcases.
3838 * gcc.dg/graphite/interchange-0.c: New.
3839 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3840 interchange-*.c files and compile them with -floop-interchange.
3842 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3844 * graphite-interchange.c (interchange_profitable_p): Renamed
3845 pbb_interchange_profitable_p.
3847 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3848 Harsha Jagasia <harsha.jagasia@amd.com>
3849 Pranav Garg <pranav.garg2107@gmail.com>
3851 * graphite-interchange.c (interchange_profitable_p): Make static.
3852 (pbb_interchange_loop_depths, pbb_do_interchange,
3853 scop_do_interchange): New.
3854 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3855 for flag_loop_interchange.
3856 * graphite-poly.h (scop_do_interchange): Declared.
3857 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3858 flag_loop_interchange is used.
3860 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3862 * graphite-dependences.c (dependence_polyhedron): Update use of
3863 pbb_nb_scattering_dims.
3864 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3865 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3866 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3867 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3869 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3871 * graphite.c: Cleanup foo.
3873 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3875 * Merge from mainline (r143684:148293).
3876 * Disabled libpcp until it gets fixed.
3878 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3879 Harsha Jagasia <harsha.jagasia@amd.com>
3881 * graphite-interchange.c: New.
3882 * Makefile.in (graphite-interchange.o): New.
3883 * graphite-poly.h (interchange_profitable_p): Declared.
3884 * graphite-ppl.h (value_max): New.
3886 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3888 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3889 * graphite-poly.h: Fix some comments.
3893 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3896 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3897 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3898 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3899 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3900 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3901 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3902 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3903 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3904 * graphite-clast-to-gimple.c: Same.
3905 * graphite-dependences.c: Same.
3906 * graphite-poly.c: Same.
3907 * graphite-sese-to-poly.c: Same.
3909 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3911 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3912 expressions for an IV rename, as returned by clast_to_gcc_expression.
3913 (copy_renames): Rename new_name to expr.
3914 * sese.c (debug_rename_elt): Same.
3917 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3918 the information from the rename map.
3919 (rename_variables_in_stmt): Same.
3920 (add_loop_exit_phis): Rename new_name to expr.
3921 (insert_loop_close_phis): Same.
3922 (add_guard_exit_phis): Same. Call force_gimple_operand.
3923 * sese.h (struct rename_map_elt): Rename new_name to expr.
3924 (new_rename_map_elt): Same.
3926 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3928 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3929 * sese.c (set_rename): Make it extern.
3930 * sese.h (set_rename): Declared.
3932 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3934 * graphite-poly.c (extend_scattering): Free values.
3935 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3937 (ppl_print_powerset_matrix): Same.
3938 * graphite-scop-detection.c (free_scops_1): New.
3939 (limit_scops): Call free_scops_1.
3940 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3941 (build_poly_dr): Free PPL coefficients.
3942 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3944 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3946 * graphite-dependences.c: New.
3947 * graphite-data-ref.c: Removed.
3948 * graphite-data-ref.h: Removed.
3949 * Makefile.in (graphite-data-ref.o): Removed.
3950 (graphite-dependences.o): Added.
3951 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3952 * graphite-poly.c: Same.
3953 Move the data dependence testing to graphite-dependences.c.
3955 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3957 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3958 from graphite_cannot_represent_loop. Code refactored.
3959 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3961 2009-05-17 Li Feng <nemokingdom@gmail.com>
3963 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3964 Cover all the testcases (not only the filtered ones).
3966 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3968 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3969 unnecessary check. Update comments. Move check for REAL_TYPE here.
3970 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3971 done in (stmt_simple_for_scop_p).
3973 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3975 * graphite.c (print_global_statistics): New.
3976 (print_graphite_scop_statistic): New.
3977 (print_graphite_statistics): New.
3978 (graphite_initialize, graphite_transform_loops): Print statistics.
3979 * graphite-scop-detection (build_scops): Print statistics.
3980 (print_graphite_scop_statistics): New.
3981 (print_graphite_statistics): New.
3983 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3985 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3986 (debug_clast_name_index): Removed.
3987 (debug_clast_name_indexes_1): Removed.
3988 (debug_clast_name_indexes): Removed.
3989 (clast_name_index_elt_info): Removed.
3990 (eq_clast_name_indexes): Removed.
3991 (clast_name_to_index): Removed.
3992 (new_clast_name_index): Removed.
3993 (save_clast_name_index): Removed.
3994 (save_var_name): Moved...
3995 (init_sese_params_index): Removed.
3996 (clast_name_to_gcc): Remove use of name_tree.
3997 (initialize_cloog_names): Same.
3998 (gloog): Do not call init_sese_params_index.
3999 * graphite-sese-to-poly.c (save_var_name): ...here.
4000 (parameter_index_in_region): New.
4001 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4002 (parameter_index_in_region): Removed.
4003 (is_parameter): Remove use of name_tree.
4004 * sese.h (struct name_tree): Removed.
4005 (struct sese): Remove use of name_tree. New field params_names.
4006 (SESE_PARAMS_NAMES): New.
4007 (SESE_PARAMS): Remove duplicate.
4008 (parameter_index_in_region): Removed.
4009 (sese_nb_params): Remove use of name_tree.
4010 (struct clast_name_index): New.
4011 (new_clast_name_index): New.
4012 (clast_name_to_index): New.
4013 (save_clast_name_index): New.
4014 (debug_clast_name_index): New.
4015 (debug_clast_name_indexes_1): New.
4016 (debug_clast_name_indexes): New.
4017 (clast_name_index_elt_info): New.
4018 (eq_clast_name_indexes): New.
4020 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4022 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4023 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4024 (graphite_loop_normal_form): Do not pass region. Do not
4025 initialize SESE_OLDIVS.
4026 (build_graphite_loop_normal_form): Update call to
4027 graphite_loop_normal_form.
4028 * sese.c (debug_oldivs): Removed.
4029 (new_sese): Do not initialize SESE_OLDIVS.
4030 (free_sese): Do not free SESE_OLDIVS.
4031 (oldiv_for_loop): Removed.
4032 * sese.h (struct sese): Remove old_ivs.
4033 (SESE_OLDIVS): Removed.
4034 (oldiv_for_loop): Removed.
4036 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4038 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4039 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4040 replaced by a call to newivs_to_depth_to_newiv.
4041 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4042 (clast_to_gcc_expression_red): Same.
4043 (gcc_type_for_clast_expr): Same.
4044 (gcc_type_for_clast_eq): Same.
4045 (graphite_translate_clast_equation): Same.
4046 (graphite_create_guard_cond_expr): Same.
4047 (graphite_create_new_guard): Same.
4048 (graphite_create_new_loop): Same.
4049 (build_iv_mapping): Same.
4050 (translate_clast): Same.
4052 (loop_iv_stack_patch_for_consts): Removed. *
4053 sese.c (iv_stack_entry_is_constant): Removed.
4054 (iv_stack_entry_is_iv): Removed.
4055 (loop_iv_stack_push_iv): Removed.
4056 (loop_iv_stack_insert_constant): Removed.
4057 (loop_iv_stack_pop): Removed.
4058 (loop_iv_stack_get_iv): Removed.
4059 (loop_iv_stack_get_iv_from_name): Removed.
4060 (debug_loop_iv_stack): Removed.
4061 (free_loop_iv_stack): Removed.
4062 (loop_iv_stack_remove_constants): Removed. *
4063 sese.h (iv_stack_entry_kind): Removed.
4064 (iv_stack_entry_data_union): Removed.
4065 (iv_stack_entry_struct): Removed.
4066 (iv_stack_entry_p): Removed.
4067 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4068 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4069 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4070 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4071 (gbb_loop_at_index): Fix indenting.
4072 (gbb_loop_index): Removed.
4074 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4076 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4077 Call clast_name_to_index.
4079 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4081 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4082 do not pass params. Get params from SESE_PARAMS.
4083 (clast_to_gcc_expression): Same.
4084 (clast_to_gcc_expression_red): Same.
4085 (gcc_type_for_clast_eq): Same.
4086 (graphite_translate_clast_equation): Same.
4087 (graphite_create_new_loop): Same.
4088 * sese.c (rename_variables_in_stmt): Fix comment.
4090 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4092 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4094 Call save_clast_name_index.
4095 (translate_clast): Pass newivs_index.
4096 (gloog): Create and free newivs_index.
4098 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4100 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4101 (clast_name_index_p): New type.
4102 (debug_clast_name_index): New.
4103 (debug_clast_name_indexes_1): New.
4104 (debug_clast_name_indexes): New.
4105 (clast_name_index_elt_info): New.
4106 (eq_clast_name_indexes): New.
4107 (clast_name_to_index): New.
4108 (new_clast_name_index): New.
4109 (save_clast_name_index): New.
4110 (init_sese_params_index): New.
4111 (gloog): Call init_sese_params_index.
4112 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4113 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4114 (free_sese): Free SESE_PARAMS_INDEX.
4115 * sese.h (struct sese): Add params_index.
4116 (SESE_PARAMS_INDEX): New.
4118 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4120 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4121 (graphite_create_new_loop): Pass the newivs vector. Push the
4122 newly created IV to newivs.
4123 (translate_clast): Pass the newivs vector.
4124 (gloog): Create and destroy the newivs vector.
4126 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4128 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4129 (graphite_loop_normal_form): Initialize loop->aux with the unique
4130 IV that has been created.
4132 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4134 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4135 scev with parameters in the base part. They where forbidden
4138 2009-05-11 Li Feng <nemokingdom@gmail.com>
4140 * gcc.dg/graphite/graphite.exp: Set different default
4141 compile options by file names.
4142 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4143 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4144 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4145 * gcc.dg/graphite/scop-matmult.c: Ditto.
4147 2009-05-08 Li Feng <nemokingdom@gmail.com>
4149 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4150 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4151 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4152 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4154 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4156 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4159 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4161 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4162 allow integer constant strides.
4163 (graphite_can_represent_expr): Depend on outermost_loop.
4164 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4165 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4166 build_scops_1): Same.
4167 (scopdet_basic_block_info): Same and insert layered SCoP
4169 (try_generate_gimple_bb): Cleanup.
4170 (build_scops): Enable data references.
4172 * gcc.dg/graphite/id-5.c: New.
4173 * gcc.dg/graphite/id-9.c: New.
4174 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4175 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4177 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4179 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4180 that we have not yet built for this SCoP.
4182 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4184 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4185 for complex numbers.
4187 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4189 * graphite-ppl.c: Fix build if cloog is not available.
4191 2009-05-04 Li Feng <nemokingdom@gmail.com>
4193 * tree-parloops.c (loop_parallel_p): Remove construction of
4194 NITER and REDUCTION_LIST.
4195 (try_get_loop_niter): New.
4196 (try_create_reduction_list): New.
4197 (parallelize_loops): Bypass the failed checkings in autopar
4198 when can_be_parallel in loop structure is set to true.
4200 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4202 * gcc.dg/graphite/id-6.c: Update testcase.
4203 * gcc.dg/graphite/scop-3.c: Dito.
4205 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4207 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4208 Enable EQ_EXPR and NE_EXPR again.
4210 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4212 * graphite-scop-detection.c (graphite_can_represent_scev):
4213 Add check if scev is affine multivariate.
4214 (harmful_stmt_in_bb): Check if we can represent the conditions.
4215 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4217 * gcc.dg/graphite/id-7.c: New.
4219 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4221 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4222 Check all bbs in region, not only the bbs that are represented in
4224 (build_poly_scop): Add newline.
4225 * gcc.dg/graphite/id-8.c: New.
4227 2009-04-30 Li Feng <nemokingdom@gmail.com>
4229 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4230 when loop initialize.
4231 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4232 * common.opt: Declare flag_graphite_force_parallel.
4233 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4235 * graphite-poly.c (apply_poly_transforms): Introduce
4236 flag_graphite_force_parallel.
4237 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4238 * toplev.c (process_options): ditto and replace a not correctly
4241 2009-04-30 Li Feng <nemokingdom@gmail.com>
4243 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4244 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4245 to the redefinition.
4246 (compute_cloog_iv_types_1): ditto.
4247 (build_iv_mapping): ditto.
4248 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4250 (free_gimple_bb): Removed GBB_LOOPS related free part.
4251 (build_bb_loops): Removed.
4252 * sese.h (struct gimple_bb): Removed loops.
4253 (GBB_LOOPS): Removed.
4254 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4255 (gbb_loop_index): ditto.
4257 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4259 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4260 allow non constant strides.
4261 * gcc.dg/graphite/scop-20.c: New.
4263 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4265 * graphite-scop-detection.c (dot_all_scops): Fix system call
4266 return value warning.
4269 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4271 * gcc.dg/graphite/id-6.c: Fix pattern.
4272 * gcc.dg/graphite/scop-3.c: Same.
4274 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4276 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4277 build_pairwise_constraint, dr_equality_constraints,
4278 build_pairwise_scheduling_equality,
4279 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4280 build_lexicographically_gt_constraint, dependence_polyhedron,
4281 graphite_legal_transform_dr, graphite_legal_transform_bb,
4282 graphite_legal_transform): New.
4283 * graphite-poly.h (graphite_legal_transform): Declared.
4284 * graphite-sese-to-poly.c (build_poly_scop): Call to
4285 graphite_legal_transform is disabled for the moment.
4287 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4289 * graphite-poly.h (pbb_nb_scattering_dims): New.
4290 (pbb_nb_scattering): Use it.
4292 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4294 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4295 Pointset_Powerset version of ppl_insert_dimensions.
4296 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4298 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4300 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4302 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4304 * graphite-poly.h: Fix comment.
4306 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4308 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4310 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4312 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4315 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4317 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4318 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4321 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4323 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4324 handle EQ_EXPR and NE_EXPR.
4326 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4328 * graphite-poly.h (poly_dr): Fix comment.
4330 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4331 Tobias Grosser <grosser@fim.uni-passau.de>
4333 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4334 with a zero dimension polyhedron.
4335 (find_scop_parameters): Move the call to scop_set_nb_params here.
4336 (build_loop_iteration_domains): Store in loop->aux the iteration
4338 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4339 by any loop in scop.
4340 (build_poly_scop): Do not call scop_set_nb_params.
4342 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4343 Tobias Grosser <grosser@fim.uni-passau.de>
4345 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4346 add_condition_to_domain not GT_EXPR.
4348 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4350 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4351 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4352 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4353 upper_bound_assign to calculate unions.
4354 * gcc.dg/graphite/id-6.c: New.
4356 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4358 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4359 handle abnormal edges.
4361 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4363 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4364 (free_poly_bb): Also free poly_drs.
4365 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4366 (poly_dr): Polyhedron to Pointset_Powerset.
4367 (pdr_accessp_nb_subscripts): Same.
4368 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4371 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4373 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4374 names into more meaningful names.
4376 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4378 * gfortran.dg/graphite/interchange-1.c: New.
4379 * gfortran.dg/graphite/interchange-2.c: New.
4381 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4383 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4385 * tree-parloops.c (rewrite_phi_with_iv): New.
4386 (rewrite_all_phi_nodes_with_iv): New.
4387 (canonicalize_loop_ivs): Call them.
4389 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4391 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4392 graphite_find_data_references_in_stmt.
4393 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4394 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4396 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4398 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4400 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4402 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4403 instead of bb_in_region.
4404 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4405 (build_sese_conditions): Use flag_bb_in_sese.
4406 * sese.c (register_bb_in_sese): Removed.
4407 (new_sese): Remove initialization of SESE_REGION_BBS.
4408 (free_sese): Do not free SESE_REGION_BBS.
4409 * sese.h (struct sese): Remove field region_basic_blocks.
4410 (SESE_REGION_BBS): Removed.
4411 (bb_in_sese_p): Implement in function of bb_in_region.
4413 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4415 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4418 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4420 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4422 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4423 (add_condition_to_domain): New.
4424 (add_condition_to_pbb): New.
4425 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4426 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4428 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4430 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4431 ppl_Pointset_Powerset.
4432 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4433 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4434 (pbb_nb_loops): Same.
4435 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4436 add_conditions_to_domain): Same.
4437 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4438 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4439 ppl_const_Polyhedron_t.
4440 (ppl_print_powerset_matrix): New.
4441 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4442 ppl_print_powerset_matrix): New.
4443 (ppl_print_polyhedron_matrix): Updated.
4445 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4447 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4449 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4451 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4452 (print_iteration_domains, debug_iteration_domain,
4453 debug_iteration_domains): New.
4454 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4455 debug_iteration_domains): Declared.
4456 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4459 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4460 Sebastian Pop <sebastian.pop@amd.com>
4462 * graphite-poly.h (print_iteration_domain): New.
4463 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4464 (build_sese_conditions_1, build_sese_conditions_after,
4465 build_sese_conditions_before): New.
4466 (build_sese_conditions): Rewritten.
4468 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4469 Tobias Grosser <grosser@fim.uni-passau.de>
4471 Cleanup of code generation liveouts.
4472 * graphite-clast-to-gimple.c (translate_clast): Use a single
4473 rename_map instead of one per translated statement.
4474 Do not use SESE_LIVEOUT_RENAMES.
4475 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4476 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4477 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4478 phi node of a reduction: when a loop contains a reduction used outside
4479 the loop, there should be a scalar close phi node on the exit block.
4480 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4481 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4482 (free_sese): Do not free them.
4483 (sese_build_liveouts_use): Do not use them.
4484 (sese_build_liveouts_bb): Same.
4485 (sese_build_liveouts): Same.
4486 (sese_insert_phis_for_liveouts): Same.
4487 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4488 (defined_in_loop_p): New.
4489 (alive_after_loop): New.
4490 (close_phi_not_yet_inserted_p): New.
4491 (struct alep, alep_p): New.
4492 (add_loop_exit_phis): Remove from the rename_map all the names defined
4493 in the code generated loop.
4494 (insert_loop_close_phis): Traverse the rename_map passed to it.
4495 Don't use SESE_LIVEOUT_RENAMES.
4496 (default_liveout_before_guard): Renamed default_before_guard.
4497 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4498 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4499 (register_sese_liveout_renames): Removed.
4500 (copy_bb_and_scalar_dependences): Do not call it.
4501 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4503 (SESE_LIVEOUT): Removed.
4504 (SESE_LIVEOUT_RENAMES): Removed.
4505 (SESE_REDUCTION_LIST): Removed.
4506 (sese_build_liveouts): Removed.
4507 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4508 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4509 (insert_guard_phis): Same.
4510 (rename_map_elt): Declare a VEC of them.
4511 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4512 trees not pointers to trees.
4514 Rewrite in canonical close SSA form:
4515 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4516 (limit_scops): Close the scop after the block containing the close phi
4518 (canonicalize_loop_closed_ssa): New.
4519 (canonicalize_loop_closed_ssa_form): New.
4520 (build_scops): Call canonicalize_loop_closed_ssa_form.
4522 * graphite-sese-to-poly.c: Fix typos.
4524 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4526 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4528 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4529 (print_pbb): Add conditions.
4531 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4532 Sebastian Pop <sebastian.pop@amd.com>
4534 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4535 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4536 (build_scop_bbs_1): New.
4537 (build_scop_bbs): Rewrite.
4538 * sese.h (bb_in_region): New.
4540 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4542 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4544 (print_scop): Style.
4545 * graphite-poly.h (poly_bb): Add drs vector.
4546 (PBB_DRS): Add accessor.
4547 * graphite-sese-to-poly.c (build_poly_dr): New.
4548 (build_pbb_drs, build_scop_drs): New.
4549 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4551 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4553 * tree-ssa-loop.c: Include forgotten toplev.h
4555 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4557 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4558 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4559 * gcc.dg/graphite/pr37928.c: Same
4560 * gcc.dg/graphite/pr38409.c: Same
4561 * gcc.dg/graphite/pr38498.c: Same
4562 * gcc.dg/graphite/pr38559.c: Same
4563 * gcc.dg/graphite/pr39335.c: Same
4564 * gcc.dg/graphite/pr39335_1.c: Same
4565 * gfortran.dg/graphite/block-2.f: Same
4566 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4569 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4571 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4572 build_access_matrix, build_scop_data_accesses): Remove access function
4573 building. (We get a new version soon).
4574 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4575 * sese.h (nb_loops_around_loop_in_sese): Remove.
4576 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4578 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4579 Sebastian Pop <sebastian.pop@amd.com>
4581 * graphite-scop-detection.c (struct scopdet_info): Rename last
4583 (scopdet_basic_block_info, build_scops_1): Don't use
4584 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4586 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4587 Sebastian Pop <sebastian.pop@amd.com>
4589 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4590 * sese.c (sese_build_liveouts_use): Renamed from
4591 sese_build_livein_liveouts_use. Remove liveins.
4592 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4593 Call sese_build_liveouts_use.
4594 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4595 Call sese_build_liveouts_bb.
4596 (new_sese, free_sese): Remove liveins.
4597 (sese_add_exit_phis_var): Deleted.
4598 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4600 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4602 * sese.h (sese): Remove num_ver and livein.
4603 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4605 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4607 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4609 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4611 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4612 (build_scop_scattering): Do not use compare_prefix_loops any more.
4613 (nb_common_loops): New.
4615 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4617 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4618 (register_old_and_new_names): Renamed set_rename.
4620 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4622 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4623 of the decl from the previous commit.
4625 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4627 * graphite-scop-detection.c (dot_scop): New.
4628 * graphite-scop-detection.h (dot_scop): Declared.
4630 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4632 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4634 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4636 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4637 condition at the end of the loop.
4638 * graphite.c (graphite_initialize, graphite_finalize): Print to
4639 dump_file the compiled function.
4640 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4641 of create_empty_loop_on_edge.
4642 (translate_clast): Update the code generation of loops for the new
4644 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4646 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4648 Reverted the patch from 2009-03-19.
4650 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4652 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4654 (print_scop): Style.
4655 * graphite-poly.h (poly_bb): Add drs vector.
4656 (PBB_DRS): Add accessor.
4657 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4658 (build_access_matrix_with_af, build_access_matrix,
4659 build_scop_data_accesses): Delete.
4660 (build_poly_dr): New.
4661 (build_pbb_drs, build_scop_drs): New.
4662 (build_poly_scop): call build_scop_drs.
4664 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4666 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4667 once per basic block.
4669 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4671 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4672 (graphite_can_represent_expr): Renamed from loop_affine_expr
4674 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4675 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4676 (scopdet_basic_block_info): Actually define entry_block.
4677 (stmt_simple_memref_p): Moved here from ...
4679 * tree-data-ref.c (stmt_simple_memref_p): here.
4680 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4682 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4684 * gcc.dg/graphite/id-4.c: New.
4686 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4688 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4689 (register_old_and_new_names): Update the content of the map.
4690 When there was already a rename_map_elt in the map at that
4692 (copy_bb_and_scalar_dependences): Do rename_variables after
4693 expand_scalar_variables.
4694 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4695 of the map. When there was already a rename_map_elt in the
4696 map at that location, free it.
4697 (translate_clast): Pass the rename_map. Do not initialize and free
4698 a rename_map per stmt_user.
4699 (gloog): Initialize and free one rename_map and pass it to
4702 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4704 * sese.c (expand_scalar_variables_stmt,
4705 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4707 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4708 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4709 the gimple_stmt_iterator of the statement to be expanded.
4710 * graphite-scop-detection.c (is_simple_operand): Do handle
4713 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4715 * graphite-scop-detection.c (is_simple_operand): Do not handle
4717 * gcc.dg/graphite/id-2.c: New.
4719 * graphite-sese-to-poly.c (build_bb_loops,
4720 add_value_to_dim, scan_tree_for_params_right_scev,
4721 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4722 find_params_in_bb, build_loop_iteration_domains,
4723 add_conditions_to_domain): Remove subtract.
4725 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4727 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4728 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4729 pbb_loop_at_index -> gbb_loop_at_index.
4730 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4731 (debug_loop_vec): Delete.
4732 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4733 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4734 (PBB_LOOPS): Removed.
4735 (PBB_BLACK_BOX): Insert cast.
4736 (pbb_set_black_box): New setter.
4737 (pbb_loop_at_index, pbb_loop_index): Removed.
4738 (scop_set_region, scop_set_nb_params): New.
4739 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4740 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4741 (build_poly_scop): Use scop_set_nb_params.
4742 * sese.h (gimple_bb): Add LOOPS.
4743 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4745 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4747 Revert previous commit.
4749 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4751 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4752 (register_old_and_new_names): Update the content of the map.
4753 When there was already a rename_map_elt in the map at that
4755 (copy_bb_and_scalar_dependences): Do rename_variables after
4756 expand_scalar_variables.
4757 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4758 of the map. When there was already a rename_map_elt in the
4759 map at that location, free it.
4760 (translate_clast): Pass the rename_map. Do not initialize and free
4761 a rename_map per stmt_user.
4762 (gloog): Initialize and free one rename_map and pass it to
4765 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4767 Remove forgotten line in revert.
4769 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4771 Revert previous commit.
4773 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4775 * sese.c (register_old_and_new_names): Update the content
4776 of the map. When there was already a rename_map_elt in the
4777 map at that location, free it.
4778 (copy_bb_and_scalar_dependences): Do rename_variables after
4779 expand_scalar_variables.
4780 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4781 of the map. When there was already a rename_map_elt in the
4782 map at that location, free it.
4783 (translate_clast): Pass the rename_map. Do not initialize and free
4784 a rename_map per stmt_user.
4785 (gloog): Initialize and free one rename_map and pass it to
4788 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4790 * graphite-clast-to-gimple.c (translate_clast): context_loop
4793 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4794 Sebastian Pop <sebastian.pop@amd.com>
4796 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4797 of the use of ppl_Polyhedron_map_space_dimensions.
4799 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4800 Sebastian Pop <sebastian.pop@amd.com>
4802 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4803 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4804 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4805 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4806 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4807 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4808 pbb_nb_params): New.
4809 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4810 nb_loops_around_pbb): Adapt return types.
4812 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4814 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4815 graphite-clast-to-gimple.o, graphite-data-ref.o,
4816 graphite-scop-detection.o, graphite-poly.o): Add
4819 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4821 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4822 graphite-clast-to-gimple.o, graphite-data-ref.o,
4823 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4825 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4827 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4828 * gcc.dg/graphite/pr37828.c: Same.
4829 * gcc.dg/graphite/pr37684.c: Same.
4830 * gcc.dg/graphite/block-0.c: Same.
4831 * gcc.dg/graphite/block-1.c: Same.
4832 * gcc.dg/graphite/block-2.c: Same.
4833 * gcc.dg/graphite/block-3.c: Same.
4834 * gcc.dg/graphite/block-4.c: Same.
4835 * gcc.dg/graphite/block-5.c: Same.
4836 * gcc.dg/graphite/block-6.c: Same.
4837 * gfortran.dg/graphite/pr38083.f90: Same.
4838 * gfortran.dg/graphite/block-1.f90: Same.
4839 * gfortran.dg/graphite/block-3.f90: Same.
4840 * gfortran.dg/graphite/pr37852.f90: Same.
4841 * gfortran.dg/graphite/block-4.f90: Same.
4842 * gfortran.dg/graphite/pr37980.f90: Same.
4843 * gfortran.dg/graphite/pr38953.f90: Same.
4844 * gfortran.dg/graphite/pr37857.f90: Same.
4845 * opts.c: Remove -floop-block from -O2.
4846 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4847 -floop-strip-mine are used.
4849 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4850 Sebastian Pop <sebastian.pop@amd.com>
4852 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4854 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4855 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4856 strip_mine_profitable_p, is_interchange_valid,
4857 graphite_trans_bb_block, graphite_trans_loop_block,
4858 graphite_trans_scop_block): Temporary removed.
4859 (extend_scattering, unify_scattering_dimensions): New.
4860 (print_scattering_function, graphite_read_transforms):
4861 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4862 (graphite_generate_scattering_fns): Removed.
4863 (apply_poly_transforms): Cleanup.
4864 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4865 (schedule_to_scattering): Moved.
4866 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4867 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4868 (pbb_nb_scattering): New.
4869 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4870 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4872 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4874 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4875 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4876 -> PBB_TRANSFORMED_SCATTERING.
4877 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4878 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4879 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4880 (check_poly_representation): Do not return bool.
4881 (graphite_transform_loops): Reformat.
4882 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4884 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4886 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4887 debug_pbb_domain, debug_pbb, debug_scop): New.
4888 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4889 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4891 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4894 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4895 when the type precision of the induction variable should be
4896 larger than the type precision of nit.
4897 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4898 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4899 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4901 * gcc.dg/graphite/pr39335_1.c: New.
4902 * gcc.dg/graphite/pr39335.c: New.
4904 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4906 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4907 SSA_NAMES not struct reduction_info.
4909 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4911 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4913 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4914 Tobias Grosser <grosser@fim.uni-passau.de>
4916 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4917 (free_sese): Free SESE_REDUCTION_LIST.
4918 * sese.h (struct sese): Add field reduction_list.
4919 (SESE_REDUCTION_LIST): New.
4920 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4921 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4923 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4924 Tobias Grosser <grosser@fim.uni-passau.de>
4926 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4929 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4930 Tobias Grosser <grosser@fim.uni-passau.de>
4932 * tree-parloops.c (struct brli, build_reduction_list_info,
4933 analyze_reduction_list, gather_scalar_reductions): New.
4934 (loop_parallel_p): Build a reduction list containing only
4935 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4936 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4937 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4938 * tree-flow.h (gather_scalar_reductions): Declared.
4940 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4943 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4944 number_of_iterations_exit from a gcc_assert.
4946 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4947 Jan Sjodin <jan.sjodin@amd.com>
4949 * output.h (graphite_out_file, graphite_in_file): Declared.
4950 * toplev.c (graphite_out_file, graphite_in_file): New.
4951 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4952 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4953 Don't call schedule_to_scattering.
4954 * common.opt (fgraphite-write, fgraphite-read): New.
4955 * graphite-poly.c: Include output.h.
4956 (print_scattering_function, print_scattering_functions,
4957 debug_scattering_function, debug_scattering_functions,
4958 graphite_write_transforms, graphite_read_transforms,
4959 graphite_generate_scattering_fns): New.
4960 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4961 Call graphite_generate_scattering_fns, graphite_write_transforms,
4962 graphite_read_transforms.
4963 (new_poly_bb): Initialize PBB_SCATTERING.
4964 (free_poly_bb): Free PBB_SCATTERING.
4965 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4966 * graphite-poly.h (struct poly_bb): Add field scattering.
4967 (PBB_SCATTERING): New.
4968 (print_scattering_function, print_scattering_functions,
4969 debug_scattering_function, debug_scattering_functions): Declared.
4970 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4971 GMP values, not integers!
4972 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4973 ppl_read_polyhedron_matrix): New.
4974 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4975 debug_ppl_polyhedron_matrix,
4976 ppl_read_polyhedron_matrix): Declared.
4977 * Makefile.in (graphite-poly.o): Depends on output.h.
4979 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4980 Tobias Grosser <grosser@fim.uni-passau.de>
4983 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4984 scalar evolutions in the scop_entry->loop_father.
4986 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4987 Tobias Grosser <grosser@fim.uni-passau.de>
4989 * graphite.h (ref_nb_loops): Remove declaration.
4990 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4991 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4992 debug_gbb): Moved to sese.h.
4995 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4996 Tobias Grosser <grosser@fim.uni-passau.de>
4998 * graphite-data-ref.[ch]: Disable.
5000 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5001 Tobias Grosser <grosser@fim.uni-passau.de>
5003 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5004 scalar evolutions in the scop_entry->loop_father.
5006 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5008 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5009 (graphite_cannot_represent_loop_niter): Renamed
5010 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5011 (limit_scops): build_sese_loop_nests does not return a bool.
5012 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5013 * sese.c (nb_reductions_in_loop): ... from here.
5014 (graphite_loop_normal_form): ... from here.
5015 (sese_record_loop): Does not fail, so does not return a bool.
5016 (build_sese_loop_nests): Same.
5017 * sese.h (build_sese_loop_nests): Update declaration.
5018 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5019 (build_graphite_loop_normal_form): New.
5020 (gloog): Call build_graphite_loop_normal_form.
5021 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5022 build_sese_loop_nests.
5024 * gcc.dg/graphite/id-1.c: New.
5026 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5027 Tobias Grosser <grosser@fim.uni-passau.de>
5029 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5030 The SCoP detection fix is sufficient.
5032 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5034 PR tree-optimization/39260
5035 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5036 the basic block contains a condition with a real type.
5037 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5039 * gcc.dg/graphite/pr39260.c: New.
5041 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5043 * graphite-poly.c: Inlcude params.h.
5044 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5046 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5047 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5049 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5050 Tobias Grosser <grosser@fim.uni-passau.de>
5052 * graphite-scop-detection.c (dot_all_scops_1,
5053 dot_all_scops): Moved here.
5054 * graphite-scop-detection.h (dot_all_scops): Declared here.
5055 * graphite.c (graphite_initialize, graphite_finalize): New.
5056 (graphite_transform_loops): Cleaned up.
5057 * sese.c (debug_oldivs): Moved here.
5058 * graphite-poly.c (graphite_apply_transformations): Renamed
5059 apply_poly_transforms.
5060 (debug_loop_vec): Moved here.
5061 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5062 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5063 find_scop_parameters, build_scop_iteration_domain,
5064 add_conditions_to_constraints, build_scop_canonical_schedules,
5065 build_scop_data_accesses): Now static.
5066 (build_poly_scop, check_poly_representation): New.
5068 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5070 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5071 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5072 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5073 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5074 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5075 scan_tree_for_params, struct irp_data, dx_record_params,
5076 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5077 build_loop_iteration_domains, add_conditions_to_domain,
5078 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5079 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5080 build_sese_conditions, add_conditions_to_constraints,
5081 build_scop_iteration_domain, build_access_matrix_with_af,
5082 build_access_matrix,
5083 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5085 * graphite-sese-to-poly.c: New.
5086 * graphite-sese-to-poly.h: New.
5088 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5090 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5092 * graphite.c: Split graphite code generation to a new file.
5093 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5094 max_precision_type, clast_to_gcc_expression_red,
5095 clast_to_gcc_expression, gcc_type_for_clast_expr,
5096 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5097 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5098 graphite_create_new_guard, clast_get_body_of_loop,
5099 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5100 graphite_create_new_loop, build_iv_mapping, copy_renames,
5101 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5102 compute_cloog_iv_types, free_scattering, save_var_name,
5103 initialize_cloog_names, build_scop_context, build_cloog_prog,
5104 set_cloog_options, debug_clast_stmt, scop_to_clast,
5105 print_generated_program, debug_generated_program,
5106 gloog): Moved to graphite-clast-to-gimple.c.
5108 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5110 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5111 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5112 loop_iv_stack_pop, loop_iv_stack_get_iv,
5113 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5114 free_loop_iv_stack, loop_iv_stack_remove_constants,
5115 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5116 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5117 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5118 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5119 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5120 get_vdef_before_sese, sese_adjust_vphi,
5121 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5122 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5123 is_iv, expand_scalar_variables_ssa_name,
5124 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5125 expand_scalar_variables, rename_variables, remove_condition,
5126 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5127 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5128 default_liveout_before_guard, add_guard_exit_phis,
5129 insert_guard_phis, register_old_and_new_names,
5130 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5131 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5132 if_region_set_false_region, create_if_region_on_edge,
5133 move_sese_in_condition): Moved to sese.c.
5135 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5136 if_region_exit, if_region_get_condition_block,
5137 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5138 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5139 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5140 ivtype_map_elt, new_ivtype_map_elt,
5141 recompute_all_dominators): Moved to sese.h.
5143 * graphite-clast-to-gimple.c: New.
5144 * graphite-clast-to-gimple.h: New.
5145 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5146 * sese.c: Modified as said above.
5149 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5151 * graphite.c: Split scop detection to a new file.
5152 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5153 move_sd_regions, loop_affine_expr, exclude_component_ref,
5154 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5155 graphite_cannot_represent_loop_niter, struct scopdet_info,
5156 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5157 find_single_entry_edge, find_single_exit_edge,
5158 create_single_entry_edge, sd_region_without_exit,
5159 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5160 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5161 Moved to graphite-scop-detection.c.
5163 * graphite-scop-detection.c: New.
5164 * graphite-scop-detection.h: New.
5165 * Makefile.in: Add new rule for graphite-scop-detection.o.
5167 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5168 tree-scalar-evolution.h.
5169 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5170 build_sese_loop_nests): Moved here from graphite.c.
5171 (param_index): Renamed parameter_index_in_region.
5173 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5174 Sebastian Pop <sebastian.pop@amd.com>
5176 * gcc.dg/graphite/block-0.c: Expected to fail now.
5177 * gcc.dg/graphite/block-1.c: Same.
5178 * gcc.dg/graphite/block-5.c: Same.
5179 * gcc.dg/graphite/block-6.c: Same.
5181 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5182 Sebastian Pop <sebastian.pop@amd.com>
5184 * graphite.h: Separate from graphite_bb_p the polyhedral
5185 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5186 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5187 graphite-data-ref.h.
5188 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5189 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5190 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5191 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5192 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5193 scop_nb_params): Moved to graphite-poly.h.
5194 * graphite-data-ref.c: Same.
5195 * graphite-data-ref.h: New.
5197 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5198 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5199 is_interchange_valid, graphite_trans_bb_block,
5200 graphite_trans_loop_block, scop_max_loop_depth,
5201 graphite_trans_scop_block, graphite_apply_transformations,
5202 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5204 * graphite-poly.h: New.
5205 * graphite-poly.c: New.
5206 * Makefile.in (OBJS-common): Add graphite-poly.o.
5207 (graphite-poly.o): New rule.
5208 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5211 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5212 Tobias Grosser <grosser@fim.uni-passau.de>
5214 * graphite.c: Replace gb -> gbb.
5216 * graphite-data-ref.c: Same.
5218 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5219 Tobias Grosser <grosser@fim.uni-passau.de>
5221 * Makefile.in (OBJS-commmon): Add sese.o.
5223 (graphite.o): Add sese.h.
5224 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5225 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5226 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5228 (block_before_scop): Add missing return.
5229 (new_scop, free_scop): Remove SESE data structures.
5230 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5231 find_scop_parameters, build_loop_iteration_domains,
5232 add_conditions_to_domain, register_scop_liveout_renames,
5233 copy_bb_and_scalar_dependences): Scop -> SESE.
5235 (add_conditions_to_domain): SCoP -> SESE and remove check
5236 (scop_contains_non_iv_scalar_phi_nodes): New.
5237 (build_scop_conditions_1, build_scop_conditions): Remove check for
5238 non iv scalar phi nodes.
5239 (print_scop_statistics): New.
5240 (graphite_transform_loops): Cleanup.
5242 * graphite.h: Move to sese & cleanup.
5246 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5247 Tobias Grosser <grosser@fim.uni-passau.de>
5249 * graphite.c (build_scop_conditions_1): Conditions are only
5250 at the end of a basic block.
5252 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5253 Tobias Grosser <grosser@fim.uni-passau>
5255 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5257 (GBB_ALPHA): Removed.
5259 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5260 Tobias Grosser <grosser@fim.uni-passau.de>
5262 * graphite-data-ref.c (graphite_test_dependence): Don't use
5263 GBB_DYNAMIC_SCHEDULE.
5264 * graphite.c (new_graphite_bb): Same.
5265 (free_graphite_bb): Same.
5266 (build_scop_dynamic_schedules): Removed.
5267 (graphite_transform_loops): Don't call it.
5268 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5269 (GBB_DYNAMIC_SCHEDULE): Removed.
5271 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5272 Tobias Grosser <grosser@fim.uni-passau.de>
5274 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5275 (print_graphite_bb): Same.
5276 (build_cloog_prog): Same.
5278 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5279 Tobias Grosser <grosser@fim.uni-passau.de>
5281 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5283 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5284 Tobias Grosser <grosser@fim.uni-passau.de>
5286 * graphite.c (build_scop_context): Don't use CloogMatrix.
5287 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5288 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5290 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5291 Tobias Grosser <grosser@fim.uni-passau.de>
5293 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5294 liveout_renames, add_params fields...
5295 (struct sese): ... here.
5296 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5297 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5299 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5300 Tobias Grosser <grosser@fim.uni-passau.de>
5302 * graphite.c (print_scop): Do not print the CLooG program.
5303 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5304 build_cloog_prog, gloog): Don't use SCOP_PROG.
5305 (find_transform): Renamed scop_to_clast.
5306 (print_generated_program, debug_generated_program): New.
5307 (graphite_transform_loops): Adapt to new interface.
5308 * graphite.h (struct scop): Remove program field.
5309 (SCOP_PROG): Removed.
5310 (print_generated_program, debug_generated_program): Declared.
5312 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5314 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5315 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5316 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5317 free_graphite_bb, build_scop_canonical_schedules,
5318 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5319 schedules are now represented using a ppl_Linear_Expression_t.
5320 * graphite.h (struct graphite_bb): Same.
5321 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5322 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5324 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5326 * graphite.c: Free local memory.
5327 * graphite-ppl.c: Same.
5329 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5331 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5332 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5333 swap_constraint_variables, scale_constraint_variable): Removed.
5334 (graphite_trans_bb_strip_mine): Remove pong.
5335 * graphite-ppl.c: Include missing header files.
5336 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5337 * graphite-ppl.h (ppl_strip_loop): Declared.
5338 * Makefile.in (graphite-ppl.o): Adjust dependences.
5340 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5342 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5343 (build_scop_iteration_domain): Same.
5345 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5347 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5349 (add_value_to_dim, scan_tree_for_params_right_scev,
5350 scan_tree_for_params_int): New.
5351 * graphite-ppl.c (oppose_constraint): New.
5352 (insert_constraint_into_matrix): Implement missing cases.
5353 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5355 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5357 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5358 use ppl_move_dimension.
5360 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5362 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5365 * graphite-ppl.c: Same.
5366 * graphite-ppl.h: Same.
5368 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5370 Revert last 3 commits.
5372 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5374 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5376 (add_value_to_dim, scan_tree_for_params_right_scev,
5377 scan_tree_for_params_int): New.
5378 * graphite-ppl.c (oppose_constraint): New.
5379 (insert_constraint_into_matrix): Implement missing cases.
5380 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5382 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5384 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5386 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5387 Tobias Grosser <grosser@fim.uni-passau.de>
5389 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5390 use ppl_move_dimension.
5391 * graphite-ppl.c (ppl_move_dimension): New.
5392 * graphite-ppl.h (ppl_move_dimension): Declared.
5394 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5396 * graphite.c: Do not include cloog/cloog.h.
5397 (print_graphite_bb): Remove ping pong, call PPL print function.
5399 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5401 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5402 (graphite.o): Add dependence on graphite-ppl.h.
5403 (graphite-ppl.o): New.
5404 (graphite-data-ref.c): Ping pong between PPL data structures
5406 * graphite-ppl.c: New.
5407 * graphite-ppl.h: New.
5408 * graphite.c: Include graphite-ppl.h.
5409 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5410 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5411 Ping pong between PPL data structures and matrices.
5412 (new_graphite_bb): Create a PPL constraint system.
5413 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5414 (build_loop_iteration_domains): Use PPL functions.
5415 * graphite.h: Include graphite-ppl.h. Fix comments.
5416 (graphite_bb): Use a ppl_Constraint_System_t instead of
5417 CloogMatrix for representing the domain.
5418 (scop): Remove static_schedule.
5419 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5421 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5423 * graphite.c: Fix some comments.
5425 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5428 * graphite.c (if_region_set_false_region): After moving a region
5429 in the false branch of a condition, remove the empty dummy
5431 (gloog): Remove wrong fix for PR38953.
5433 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5435 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5436 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5437 register_bb_in_sese, new_sese, free_sese): Moved.
5438 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5439 outermost_loop_in_scop, build_scop_iteration_domain,
5440 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5441 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5442 Use loop_in_sese_p instead of loop_in_scop_p.
5443 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5444 (free_scop): Do not free SCOP_BBS_B.
5445 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5446 ref_nb_loops): Moved here...
5447 * graphite.h (ref_nb_loops): ... from here.
5448 (struct scop): Remove bbs_b bitmap.
5449 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5450 * gcc.dg/graphite/scop-19.c: New
5452 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5454 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5457 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5459 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5460 eq_loop_to_cloog_loop): Remove.
5461 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5462 * graphite.h (struct scop): Remove loop2cloog_loop.
5463 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5465 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5467 * opts.c (decode_options): Only add graphite options to O2
5468 if we compile with graphite enabled.
5470 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5472 * Merge from mainline (r143163:143684).
5474 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5476 * graphite.c (debug_value): Removed.
5477 * graphite.h (debug_value): Removed.
5479 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5481 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5482 after graphite: pass_copy_prop does not maintain a proper loop closed
5483 SSA form. pass_copy_prop should be fixed.
5485 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5487 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5489 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5491 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5492 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5493 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5496 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5498 * graphite.c (gloog): Return true when code gen succeeded.
5499 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5500 the code of the function did not changed. After cleanup_tree_cfg
5501 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5504 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5506 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5507 gimple_call_lhs is NULL.
5509 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5510 Tobias Grosser <tobi.grosser@amd.com>
5512 * graphite.c (graphite_trans_scop_block): Do not block single
5515 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5516 Tobias Grosser <tobi.grosser@amd.com>
5518 * graphite.c (build_scop_canonical_schedules): Start schedules at
5521 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5522 Tobias Grosser <tobi.grosser@amd.com>
5524 * graphite.c (compare_prefix_loops): New.
5525 (build_scop_canonical_schedules): Rewritten.
5526 (graphite_transform_loops): Move build_scop_canonical_schedules
5527 after build_scop_iteration_domain.
5529 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5530 Tobias Grosser <tobi.grosser@amd.com>
5532 * graphite.c (add_conditions_to_domain): Add the loops to
5533 the dimension of the iteration domain. Do copy the domain
5534 only when it exists.
5535 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5536 (add_conditions_to_constraints): New.
5537 (can_generate_code_stmt, can_generate_code): Removed.
5538 (gloog): Do not call can_generate_code.
5539 (graphite_transform_loops): Call add_conditions_to_constraints
5540 after building the iteration domain.
5542 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5543 Tobias Grosser <tobi.grosser@amd.com>
5544 Jan Sjodin <jan.sjodin@amd.com>
5546 * graphite.c (scan_tree_for_params): On substractions negate
5547 all the coefficients of the term.
5548 (clast_to_gcc_expression_red): New. Handle reduction expressions
5549 of more than two operands.
5550 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5551 (get_vdef_before_scop): Handle also the case of default definitions.
5553 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5556 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5557 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5558 (gloog): Do not call cleanup_tree_cfg.
5559 (graphite_transform_loops): Call cleanup_tree_cfg after all
5560 scops have been code generated.
5562 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5564 * passes.c (init_optimization_passes): Schedule after
5565 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5567 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5569 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5571 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5572 Set the type of an expression to the type of its assign statement.
5573 (expand_scalar_variables_expr): Do not pass loop_p.
5574 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5575 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5576 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5578 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5580 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5581 an expression to the gimple_expr_type of its assign statement.
5582 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5585 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5587 PR tree-optimization/38786
5588 * gcc.dg/graphite/pr38786.c: New.
5589 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5590 the SSA_NAME case of expand_scalar_variables_expr.
5591 (expand_scalar_variables_expr): Also gather the scalar computation
5592 used to index the memory access.
5593 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5594 the gimple_stmt_iterator where it inserts new code.
5596 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5598 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5600 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5602 * opts.c (decode_options): Enable flag_graphite_identity and
5603 flag_loop_block in -O2 and above.
5605 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5607 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5608 Fix merge problem: replace with the file from trunk.
5610 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5612 * Merge from mainline (r141727:143163).
5614 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5615 Jan Sjodin <jan.sjodin@amd.com>
5617 PR tree-optimization/38559
5618 * gcc.dg/graphite/pr38559.c: New.
5620 * graphite.c (debug_value, copy_constraint,
5621 swap_constraint_variables, scale_constraint_variable, ): New.
5622 (get_lower_bound, get_upper_bound): Removed.
5623 (graphite_trans_bb_strip_mine): Clean up this code that works
5624 only for constant number of iterations. Fully copy upper and
5625 lower bound constraints, not only the constant part of them.
5626 * graphite.h (debug_value): Declared.
5628 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5630 PR tree-optimization/38492
5631 PR tree-optimization/38498
5632 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5633 * tree-chrec.h (scev_is_linear_expression): Declared.
5634 * graphite.c (graphite_cannot_represent_loop_niter): New.
5635 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5636 (graphite_loop_normal_form): Use gcc_assert.
5637 (scan_tree_for_params): Use CASE_CONVERT.
5638 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5639 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5640 Use gcc_assert. Discard scops that contain unhandled cases.
5641 (build_scop_conditions): Return a boolean status for unhandled cases.
5642 (strip_mine_profitable_p): Print the loop number, not its depth.
5643 (is_interchange_valid): Pass the depth of the loop nest, don't
5644 recompute it wrongly.
5645 (graphite_trans_bb_block): Same.
5646 (graphite_trans_bb_block): Print tentative of loop blocking.
5647 (graphite_trans_scop_block): Do not print that the loop has been
5649 (graphite_transform_loops): Do not handle scops that contain condition
5652 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5654 * gcc.dg/graphite/block-0.c: Update test.
5655 * gcc.dg/graphite/block-1.c: Same.
5656 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5658 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5659 * gcc.dg/graphite/block-3.c: New.
5660 * gcc.dg/graphite/pr38498.c: New.
5662 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5664 PR tree-optimization/38510
5665 * gcc.dg/graphite/pr38510.c: New.
5666 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5667 (translate_clast): Call recompute_all_dominators before
5669 (gloog): Call recompute_all_dominators before graphite_verify.
5671 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5673 PR tree-optimization/38492
5674 * graphite.c (rename_map_elt, debug_rename_elt,
5675 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5676 rename_map_elt_info, eq_rename_map_elts,
5677 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5678 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5679 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5680 (sese_build_livein_liveouts): New.
5681 (new_sese, free_sese): New.
5682 (new_scop): Call new_sese.
5683 (free_scop): Call free_sese.
5684 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5685 (register_old_new_names): Renamed register_old_and_new_names.
5686 (register_scop_liveout_renames, add_loop_exit_phis,
5687 insert_loop_close_phis, struct igp,
5688 default_liveout_before_guard, add_guard_exit_phis,
5689 insert_guard_phis, copy_renames): New.
5690 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5691 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5692 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5693 (scop_adjust_phis_for_liveouts): New.
5694 (gloog): Call scop_adjust_phis_for_liveouts.
5696 * graphite.h (struct sese): Documented. Added fields liveout,
5698 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5699 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5700 (struct scop): Added field liveout_renames.
5701 (SCOP_LIVEOUT_RENAMES): New.
5703 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5705 PR tree-optimization/38409
5706 * gcc.dg/graphite/pr38409.c: New.
5707 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5709 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5711 * graphite.c (gcc_type_for_cloog_iv): By default return
5713 (graphite_create_new_loop): Don't fold_convert the already
5714 fold_convert-ed expression.
5716 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5718 PR tree-optimization/38446
5719 * gcc.dg/graphite/pr38446.c: New.
5720 * graphite.c (register_bb_in_sese): New.
5721 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5722 looking at the bbs in the region.
5723 * graphite.h (sese): Add region_basic_blocks pointer set to
5724 structure and initialize at the time of defining new scop.
5726 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5728 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5729 (find_params_in_bb): Do not free data refs.
5730 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5732 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5734 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5735 * gcc.dg/graphite/scop-17.c: Same.
5736 * gcc.dg/graphite/block-5.c: New.
5737 * gcc.dg/graphite/block-6.c: New.
5738 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5739 * gcc.dg/graphite/pr37684.c: Same.
5740 * gcc.dg/graphite/block-2.c: Same.
5742 * graphite.c (struct ivtype_map_elt): New.
5743 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5744 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5745 gcc_type_for_cloog_iv): New.
5746 (loop_iv_stack_patch_for_consts): Use the type of the induction
5747 variable from the original loop, except for the automatically
5748 generated loops, i.e., in the case of a strip-mined loop, in
5749 which case there is no original loop: in that case just use
5751 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5752 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5753 (clast_name_to_gcc): Accept params to be NULL.
5754 (clast_to_gcc_expression): Take an extra parameter for the type.
5755 Convert to that type all the expressions built by this function.
5756 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5757 (graphite_translate_clast_equation): Compute the type of the
5758 clast_equation before translating its LHS and RHS.
5759 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5760 (graphite_create_new_loop): Compute the type of the induction
5761 variable before translating the lower and upper bounds and before
5762 creating the induction variable.
5763 (rename_variables_from_edge, rename_phis_end_scop): New.
5764 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5765 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5766 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5767 compute_cloog_iv_types): New.
5768 (gloog): Call compute_cloog_iv_types before starting the
5769 translation of the clast.
5771 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5772 (GBB_CLOOG_IV_TYPES): New.
5773 (debug_ivtype_map): Declared.
5774 (oldiv_for_loop): New.
5776 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5779 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5780 (param_index): Assert if parameter is not know after parameter
5782 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5783 (find_scop_parameters): Mark, that we have finished parameter
5785 (graphite_transform_loops): Move condition detection before parameter
5787 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5788 * gfortran.dg/graphite/pr38459.f90: New.
5790 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5792 * graphite.c (graphite_transform_loops): Always call find_transform ()
5793 in ENABLE_CHECKING. So we test these code paths, even if we do not
5796 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5798 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5799 (print_scop): Ditto.
5801 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5804 Fix gfortran.dg/graphite/id-3.f90.
5805 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5806 regions more than once.
5808 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5810 Fix gfortran.dg/graphite/id-4.f90.
5811 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5814 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5816 Fix gfortran.dg/graphite/id-1.f90.
5817 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5818 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5819 (max_precision_type): New.
5820 (value_clast): Removed.
5821 (clast_to_gcc_expression): Be more careful to types of expressions.
5822 Use max_precision_type and update use of gmp_cst_to_tree.
5823 (graphite_translate_clast_equation): Use max_precision_type.
5824 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5825 use the type of the condition.
5826 (graphite_create_new_loop): Do not use integer_type_node, use the
5827 max_precision_type of lb and ub.
5829 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5831 * graphite.c (build_scops_1): Initialize open_scop.exit
5834 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5836 * gcc.dg/graphite/pr38084.c: New.
5837 * gfortran.dg/graphite/id-1.f90: New.
5838 * gfortran.dg/graphite/id-2.f90: New.
5839 * gfortran.dg/graphite/id-3.f90: New.
5840 * gfortran.dg/graphite/id-4.f90: New.
5841 * gfortran.dg/graphite/pr37857.f90: New.
5843 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5844 Jan Sjodin <jan.sjodin@amd.com>
5845 Harsha Jagasia <harsha.jagasia@amd.com>
5857 * gcc.dg/graphite/pr38073.c: New.
5858 * gcc.dg/graphite/pr37928.c: New.
5859 * gcc.dg/graphite/pr37883.c: New.
5860 * gcc.dg/graphite/pr38125.c: New.
5861 * gfortran.dg/graphite/pr38083.f90: New.
5862 * gfortran.dg/graphite/pr37852.f90: New.
5863 * gfortran.dg/graphite/pr37980.f90: New.
5865 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5866 the number of detected scops. Copy exact same test for loop
5868 * gcc.dg/graphite/block-1.c: Fix the number of expected
5869 loops to be blocked as reductions are not handled.
5870 * gcc.dg/graphite/block-4.c: ...here. New.
5872 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5873 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5875 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5876 * Makefile.in (graphite.o): Depend on value-prof.h.
5877 (graphite.o-warn): Removed -Wno-error.
5878 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5879 to be a NULL pointer. Call update_stmt. Return the newly created
5880 cannonical induction variable.
5882 * graphite.h (debug_rename_map): Declared. Fix some comments.
5884 * graphite.c: Reimplement the code generation from graphite to gimple.
5885 Include value-prof.h.
5886 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5887 (get_old_iv_from_ssa_name): Removed.
5888 (graphite_stmt_p): New.
5889 (new_graphite_bb): Test for useful statements before building a
5890 graphite statement for the basic block.
5891 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5892 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5894 (recompute_all_dominators, graphite_verify,
5895 nb_reductions_in_loop, graphite_loop_normal_form): New.
5896 (scop_record_loop): Call graphite_loop_normal_form.
5897 (build_scop_loop_nests): Iterate over all the blocks of the
5898 function instead of relying on the incomplete information from
5899 SCOP_BBS. Return the success of the operation.
5900 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5901 (add_bb_domains): Removed.
5902 (build_loop_iteration_domains): Don't call add_bb_domains.
5903 Add the iteration domain only to the basic blocks that have been
5904 translated to graphite.
5905 (build_scop_conditions_1): Add constraints only if the basic
5906 block have been translated to graphite.
5907 (build_scop_data_accesses): Completely disabled until data
5908 dependence is correctly implemented.
5909 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5910 (remove_all_edges_1, remove_all_edges): Removed.
5911 (get_new_name_from_old_name): New.
5912 (graphite_rename_variables_in_stmt): Renamed
5913 rename_variables_in_stmt. Call get_new_name_from_old_name.
5914 Use replace_exp and update_stmt.
5915 (is_old_iv): Renamed is_iv.
5916 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5917 Use replace_exp and update_stmt.
5918 (expand_scalar_variables_expr): Same. Use the map to get the
5919 new names for the renaming of induction variables and for the
5920 renaming of variables after a basic block has been copied.
5921 (expand_scalar_variables): Same.
5922 (graphite_rename_variables): Renamed rename_variables.
5923 (move_phi_nodes): Removed.
5924 (get_false_edge_from_guard_bb): New.
5925 (build_iv_mapping): Do not insert the induction variable of a
5926 loop in the renaming iv map if the basic block does not belong
5928 (register_old_new_names, graphite_copy_stmts_from_block,
5929 copy_bb_and_scalar_dependences): New.
5930 (translate_clast): Heavily reimplemented: copy basic blocks,
5931 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5932 At each translation step call graphite_verify ensuring the
5933 consistency of the SSA, loops and dominators information.
5934 (collect_virtual_phis, find_vdef_for_var_in_bb,
5935 find_vdef_for_var_1, find_vdef_for_var,
5936 patch_phis_for_virtual_defs): Removed huge hack.
5937 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5938 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5939 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5940 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5941 if_region_get_condition_block, if_region_set_false_region,
5942 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5943 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5944 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5945 rewrite_into_sese_closed_ssa): New.
5946 (gloog): Remove dead code. Early return if code cannot be
5947 generated. Call cleanup_tree_cfg once the scop has been code
5949 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5950 block loops with less than two loops.
5951 (graphite_apply_transformations): Remove the call to
5952 scop_remove_ignoreable_gbbs.
5953 (limit_scops): When build_scop_loop_nests fails, continue on
5954 the next scop. Fix open_scop.entry.
5955 (graphite_transform_loops): Call recompute_all_dominators: force the
5956 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5957 Call initialize_original_copy_tables and free_original_copy_tables
5958 to be able to copy basic blocks during code generation.
5959 When build_scop_loop_nests fails, continue on next scop.
5960 (value_clast): New union.
5961 (clast_to_gcc_expression): Fix type cast warning.
5963 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5965 * Merge from mainline (r140838:141727).
5967 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5971 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5973 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5977 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5978 exits and conditions.
5979 * gcc.dg/graphite/pr37943.c: New.
5981 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5984 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5986 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5988 * doc/invoke.texi: Fix spaces.
5990 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5992 PR tree-optimization/37891
5993 Reverted last commit.
5994 * graphite.c (create_single_entry_edge): Set
5995 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5997 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5998 Mitul Thakkar <mitul.thakkar@amd.com>
6000 * graphite.c (create_single_entry_edge): Set
6001 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6003 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6005 * doc/invoke.texi: Add -fgraphite-identity.
6006 * graphite.c (graphite_apply_transformations): Check for
6007 -fgraphite-identity.
6008 * toplev.c (process_options): Add flag_graphite_identity.
6009 * tree-ssa-loop.c: Add flag_graphite_identity.
6011 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6013 Undo changes from 2008-10-02:
6014 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6015 operand type when copying the operand to a variable of different type.
6016 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6017 with the IV name after increment.
6019 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6020 Harsha Jagasia <harsha.jagasia@amd.com>
6022 PR tree-optimization/37828
6023 * gcc.dg/graphite/pr37828.c: New.
6024 * graphite.c (graphite_trans_loop_block): Do not loop block
6025 single nested loops.
6027 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6028 Sebastian Pop <sebastian.pop@amd.com>
6030 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6031 rename_map_elt_info, eq_rename_map_elts): New.
6032 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6033 (expand_scalar_variables_expr): Change parameters.
6034 (expand_scalar_variables_stmt): Same.
6035 (expand_scalar_variables): Same.
6036 (graphite_rename_ivs): Rename graphite_rename_variables.
6037 (build_iv_mapping): New.
6038 (translate_clast): Call build_iv_mapping.
6039 * graphite.h (gbb_p): New name.
6041 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6043 PR tree-optimization/37684
6044 * gcc.dg/graphite/pr37684.c: New.
6045 * graphite.c (exclude_component_ref): New.
6046 (is_simple_operand): Call exclude_component_ref.
6048 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6049 Harsha Jagasia <harsha.jagasia@amd.com>
6051 PR tree-optimization/37485
6052 * gcc.dg/graphite/block-2.c: New
6053 * graphite.c (gmp_cst_to_tree): Moved.
6054 (iv_stack_entry_is_constant): New.
6055 (iv_stack_entry_is_iv): New.
6056 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6057 (loop_iv_stack_insert_constant): New.
6058 (loop_iv_stack_pop): Use new datatpype.
6059 (loop_iv_stack_get_iv): Same.
6060 (loop_iv_stack_get_iv_from_name): Same.
6061 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6062 (loop_iv_stack_patch_for_consts): New.
6063 (loop_iv_stack_remove_constants): New.
6064 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6065 (translate_clast): Call loop_iv_stack_patch_for_consts and
6066 loop_iv_stack_remove_constants.
6067 (gloog): Use new datatype. Redirect construction edge to end
6068 block to avoid accidental deletion.
6069 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6071 (union iv_stack_entry_data): New. Data in iv stack entry.
6072 (struct iv_stack_entry): New. Datatype for iv stack entries.
6074 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6076 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6077 operand type when copying the operand to a variable of different type.
6079 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6081 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6082 with the IV name after increment.
6084 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6086 * Merge from mainline (r140164:140838).
6088 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6090 * graphite-data-ref.c: New.
6091 * graphite.c (print_scop): Also dump the dependence graph.
6092 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6093 (new_scop): Initialize SCOP_DEP_GRAPH.
6094 (build_scop_dynamic_schedules): New.
6095 (build_access_matrix_with_af): Fixed column numbering.
6096 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6097 * graphite.h: Add ifndef/define guards against multiple inclusion.
6098 (struct scop): Add dep_graph field.
6099 (SCOP_DEP_GRAPH): Defined.
6100 (ref_nb_loops): Fixed and moved to other position.
6101 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6102 (nb_loops_around_loop_in_scop): New.
6103 (graphite_dump_dependence_graph): Declared.
6104 (graphite_build_rdg_all_levels): Declared.
6105 (graphite_test_dependence): Declared.
6106 * Makefile.in (graphite-data-ref.o): New target.
6108 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6110 * Merge from mainline (139870:140164).
6112 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6114 * Merge from mainline (138275:139870).
6115 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6116 the commits from trunk broke the niter detection.
6118 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6120 * graphite.c: Add more documentation. Fix formatting.
6121 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6122 loop_iv_stack_debug): Moved...
6123 (schedule_to_scattering): Move before use.
6124 (dot_all_scops): Include in "#if 0" the code for system
6127 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6128 loop_iv_stack_debug): ...here.
6130 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6132 * tree-phinodes.c (make_phi_node): Extern.
6133 (add_phi_node_to_bb): New.
6134 (create_phi_node): Call add_phi_node_to_bb.
6135 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6136 (remove_statement): Handle case where stored phi was updated
6137 and is no longer the same.
6138 * graphite.c (is_parameter): New.
6140 (expand_scalar_variables_expr): New.
6141 (expand_scalar_variables_stmt): New.
6142 (expand_scalar_variables): New.
6143 (move_phi_nodes): Create new phi instead of moving old one.
6144 (translate_clast): Call expand_scalar_variables.
6145 (find_vdef_for_var_in_bb): Also scan regular definitions.
6146 (skip_phi_defs): New.
6147 (collect_scop_exit_phi_args): New.
6148 (patch_scop_exit_phi_args): New.
6149 (gloog): Patch phis after scop.
6150 * tree-flow.h: (add_phi_node_to_bb): Declared.
6151 (make_phi_node): Declared.
6153 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6155 * graphite.c (end_scop): Split the entry of the scop when it
6156 is the header of the loop in which the scop is ending.
6157 (build_scops_1, limit_scops): Update uses of end_scop.
6159 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6161 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6162 SCOP_ENTRY or SCOP_EXIT.
6164 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6166 * graphite.c (get_construction_edge): Removed.
6167 (gloog): Construction edge is the scop entry edge.
6169 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6171 * graphite.c (can_generate_for_scop): Removed.
6172 (gloog): Do not call it.
6174 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6176 * graphite.c (new_scop): Entry of a scop is an edge.
6177 Initialize SESE region.
6178 (free_scop): Free SESE region.
6179 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6180 (split_difficult_bb): New, split from end_scop.
6181 (end_scop): Exit of a scop is an edge.
6182 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6183 not automatically updated and thus is always wrong.
6184 * graphite.h (struct sese): New.
6187 (struct scop): New field for a SESE region. Remove entry, exit.
6188 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6189 semantics as before. Moved comment around.
6191 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6192 Sebastian Pop <sebastian.pop@amd.com>
6194 * graphite.c (graphite_transform_loops): Always enable gloog
6195 and find_transform when ENABLE_CHECKING.
6197 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6199 * graphite.c (graphite_transform_loops): Move pretty printer
6200 of SCOPs before doing any transform. Remove call to print_scops
6201 and dot_all_scops_1.
6203 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6205 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6206 (print_graphite_bb): Same.
6208 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6210 * graphite.c (dot_all_scops_1): Cleanup.
6211 (move_scops): Fix comment.
6213 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6215 * graphite.c (build_scop_bbs): Revert commit 139355:
6217 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6218 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6220 * graphite.c (build_scop_bbs): Factor up code.
6222 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6224 * graphite.c (gloog): Update dominator info.
6226 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6228 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6230 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6232 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6234 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6235 (translate_clast): Correct formatting.
6236 * graphite.h (struct num_map): Removed.
6237 (struct graphite_bb): Remove num_map field.
6238 (GBB_INDEX_TO_NUM_MAP): Removed.
6240 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6242 * graphite.c (build_access_matrix_with_af): Fix comments.
6243 (build_scop_data_accesses): Same.
6245 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6247 * graphite.c (build_scop_data_accesses): Don't construct
6248 access matrices. Add a FIXME and an assert condition that
6249 should pass when the access matrices will be needed.
6251 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6253 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6255 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6256 Moved close by free_graphite_bb.
6257 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6258 (new_scop): Move close by free_scop.
6259 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6261 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6263 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6264 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6265 instead of recursive call.
6266 (graphite_translate_clast_equation): New.
6267 (graphite_create_guard_cond_expr): New.
6268 (graphite_create_new_guard): New.
6269 (get_stack_index_from_iv): Removed.
6270 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6271 (get_true_edge_from_guard_bb): New.
6272 (translate_clast): Handle stmt_guard in clast.
6273 (get_construction_edge): Allow construction edge detection for
6274 a scope entry with multiple predecessors if one predecessor is
6275 the immediate dominator of scope entry.
6276 (can_generate_code_stmt): Enable code generation for clast_guard.
6277 (gloog): Use correct context loop. Removed check for post dominators.
6278 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6280 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6282 * graphite.c (remove_dead_loops): Document better which
6285 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6287 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6289 (graphite.o): Also depends on pointer-set.h.
6291 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6293 * graphite.c (scop_record_loop): Fix compile warning.
6295 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6296 Sebastian Pop <sebastian.pop@amd.com>
6298 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6300 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6302 * graphite.c (build_graphite_bb): Initialize bb->aux to
6303 point to the graphite_bb_p.
6304 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6306 (add_bb_domains): Does not use the scop parameter.
6307 (graphite_transform_loops): Clean bb->aux at the end.
6309 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6310 Sebastian Pop <sebastian.pop@amd.com>
6312 * lib/target-supports.exp
6313 (check_effective_target_fgraphite): New.
6315 * gcc.dg/graphite/graphite.exp: Early exit when
6316 check_effective_target_fgraphite returns false.
6317 Set dg-do-what-default to compile.
6318 (scan-graphite-dump-times): Removed.
6319 * gfortran.dg/graphite/graphite.exp: Same.
6321 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6322 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6323 * gcc.dg/graphite/scop-1.c: Same.
6324 * gcc.dg/graphite/scop-2.c: Same.
6325 * gcc.dg/graphite/scop-3.c: Same.
6326 * gcc.dg/graphite/scop-4.c: Same.
6327 * gcc.dg/graphite/scop-5.c: Same.
6328 * gcc.dg/graphite/scop-6.c: Same.
6329 * gcc.dg/graphite/scop-7.c: Same.
6330 * gcc.dg/graphite/scop-8.c: Same.
6331 * gcc.dg/graphite/scop-9.c: Same.
6332 * gcc.dg/graphite/scop-10.c: Same.
6333 * gcc.dg/graphite/scop-11.c: Same.
6334 * gcc.dg/graphite/scop-12.c: Same.
6335 * gcc.dg/graphite/scop-13.c: Same.
6336 * gcc.dg/graphite/scop-matmult.c: Same.
6337 * gcc.dg/graphite/scop-14.c: Same.
6338 * gcc.dg/graphite/scop-15.c: Same.
6339 * gcc.dg/graphite/block-0.c: Same.
6340 * gcc.dg/graphite/scop-16.c: Same.
6341 * gcc.dg/graphite/block-1.c: Same.
6342 * gcc.dg/graphite/scop-17.c: Same.
6343 * gcc.dg/graphite/scop-18.c: Same.
6344 * gfortran.dg/graphite/block-1.f90: Same.
6345 * gfortran.dg/graphite/scop-1.f: Same.
6346 * gfortran.dg/graphite/block-2.f: Same.
6348 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6350 * graphite.c: Fix some XXX comments.
6351 (build_scop_dynamic_schedules): Removed.
6353 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6355 * graphite.h (scop_max_loop_depth): Moved...
6356 * graphite.c (scop_max_loop_depth): ...here.
6357 (remove_all_edges_1): New.
6358 (remove_all_edges): Factored code.
6359 (remove_cond_exprs): Check only the last statement for
6360 a GIMPLE_COND expression.
6362 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6364 * graphite.c (scan_tree_for_params): Early return when the
6365 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6366 (find_scop_parameters): Factor out code.
6367 (graphite_trans_bb_strip_mine): Remove dead code.
6369 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6371 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6372 graphite_trans_bb_move_loop): Factor asserts.
6373 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6374 Do not call calculate_dominance_info and estimate_bb_frequencies.
6376 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6378 * graphite.c (create_loops_mapping, free_loops_mapping,
6379 create_loops_mapping_num, debug_loop_mapping_1,
6380 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6381 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6382 graphite_loops_mapping_add_child_num,
6383 graphite_loops_mapping_insert_child,
6384 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6385 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6386 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6387 create_num_from_index, get_num_from_index,
6388 swap_loop_mapped_depth): Removed.
6389 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6390 (free_scop): Do not call free_loops_mapping.
6391 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6392 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6393 get_loop_mapped_depth.
6394 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6395 (graphite_trans_bb_strip_mine): Same.
6396 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6397 (struct scop): Remove field loops_mapping.
6399 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6400 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6402 * graphite.c (scop_record_loop): Factor out one level of the
6403 condition by early return.
6404 (build_scop_loop_nests): Format following FSF coding style.
6405 (build_scop_dynamic_schedules): Factor out code.
6406 (scopdet_bb_info): Reindent. Default case should not be reachable.
6408 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6409 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6411 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6412 assignments that are not handled as simple operands for now.
6414 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6415 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6417 * graphite.c (build_scop_bbs): Factor up code.
6419 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6420 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6422 * graphite.c (stmt_simple_for_scop_p): Factor code out
6424 (enum gbb_type): New. Group all the GBB_* types under it.
6425 (is_loop_exit): Moved...
6426 (end_scop): Enable BB spliting.
6427 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6428 * cfgloop.h (is_loop_exit): Declared.
6430 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6432 * doc/invoke.texi: Remove strides from examples containing
6433 DO loops when the strides are equal to 1.
6435 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6436 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6438 * graphite.c (graphite_trans_scop_block): Or the result with
6439 the result from graphite_trans_loop_block.
6440 * gcc.dg/graphite/block-1.c: New.
6441 * gfortran.dg/graphite/block-1.f90: New.
6442 * gfortran.dg/graphite/block-2.f: New.
6444 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6446 * graphite.c (graphite_transform_loops): Call cloog_initialize
6449 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6451 * tree-data-ref.c) (stmt_simple_memref_p): New.
6452 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6453 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6454 (is_simple_operand): Call stmt_simple_memref_p.
6456 * gcc.dg/graphite/scop-matmult.c: Updated for not
6457 using pointer arithmetic, as this is optimized by PRE and
6458 makes the code too difficult to analyze.
6460 * gcc.dg/graphite/scop-18.c: Same.
6462 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6464 * gdbinit.in (pgg): New.
6466 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6468 * graphite.c (graphite_trans_loop_block): Fix warning.
6470 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6472 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6474 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6476 * graphite.c (graphite_trans_bb_block): Remove check for
6477 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6478 Check if loop blocking is profitable for every loop, before applying
6480 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6481 if flag_loop_block is set.
6483 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6485 * graphite.c: Add some more documentation for the loop
6488 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6490 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6491 * graphite.c: Format on less than 80 columns.
6494 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6496 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6498 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6500 * doc/invoke.texi (floop-block, floop-strip-mine,
6501 floop-interchange): Update documentation with examples.
6503 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6505 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6507 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6509 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6511 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6512 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6513 * tree-scalar-evolution.c: Revert useless changes.
6514 * tree-phinodes.c: Same.
6517 * tree-vectorizer.h: Same.
6518 * tree-flow.h: Same.
6520 * common.opt (fgraphite): Update documentation.
6522 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6524 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6525 -floop-interchange): Add more text for explaining what each of these
6527 * tree-into-ssa.c (gimple_vec): Moved to...
6528 * graphite.c: Include gimple.h.
6529 (gimple_vec): Moved to...
6530 (del_loop_to_cloog_loop): Removed.
6531 (loop_affine_expr): Do not call create_data_ref when the
6532 operand is a constant.
6533 (new_scop): Use free instead of del_loop_to_cloog_loop.
6534 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6535 * gimple.h (gimple_vec): ... here.
6537 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6539 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6541 (build_loop_iteration_domains): Fail, if latch executions unknown.
6543 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6545 * graphite.c (add_conditions_to_domain): New.
6546 (build_scop_conditions_1): Call add_conditions_to_domain.
6547 (set_cloog_options): Allow to disable optimizations.
6549 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6551 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6552 Do not use walk_dominator_tree.
6553 (find_scop_parameters): Do not use walk_dominator_tree.
6555 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6557 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6558 (idx_record_params): Adapt.
6559 * graphite.h (scop_gimple_loop_depth): New.
6561 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6563 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6564 (scan_tree_for_params): Remove value_init.
6565 (build_scop_context): Remove value_init.
6566 (build_loop_iteration_domains): Remove value_init.
6567 (schedule_to_scattering): Remove value_init.
6568 (graphite_trans_bb_strip_mine): Remove value_init.
6570 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6572 * gcc/graphite.c (limit_scops): New.
6573 (graphite_transform_loops): Add limit SCoPs.
6574 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6575 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6576 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6577 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6578 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6579 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6580 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6581 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6582 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6583 Change loop numbers.
6584 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6585 Change loop numbers.
6586 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6587 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6588 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6589 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6590 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6591 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6592 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6593 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6594 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6595 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6597 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6599 * graphite.c (graphite_transform_loops): Call always find_transform.
6601 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6603 * graphite.c (free_loops_mapping): New.
6604 (stmt_simple_for_scop_p): Fix typo.
6605 (stmt_simple_for_scop_p): Fix tuples functions, that
6607 (free_graphite_bb): Fix some memleaks.
6608 (free_scop): Fix some memleaks.
6609 (scopdet_bb_info): Do not forget some tmp SCoPs.
6610 (find_params_in_bb): Fix some memleaks.
6611 (clast_to_gcc_expression): Fix warning.
6613 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6615 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6616 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6618 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6620 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6621 Move code ifdef-ed HAVE_cloog...
6622 * graphite.c: Include toplev.h.
6624 * Makefile.in (OBJS-common): Always build graphite.o.
6625 (BACKEND): Remove @GRAPHITE@.
6626 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6627 (graphite.o): Depend on TOPLEV_H.
6629 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6631 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6632 Remove typo left from polylib to ppl conversion.
6633 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6635 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6637 * toplev.c (process_options): Move the graphite loop optimization
6639 * tree-ssa-loop.c (graphite_transforms): ... here.
6640 When not configured with CLooG, print to dump_file that
6641 Graphite transforms were not performed.
6642 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6644 * gcc.dg/graphite/*.c: Updated all testcases to use
6645 scan-graphite-dump-times.
6647 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6649 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6650 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6652 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6653 Jan Sjodin <jan.sjodin@amd.com>
6655 * configure: Regenerated.
6656 * omp-low.c (expand_omp_sections): Remove now unused code.
6657 * config.in (HAVE_polylib): Removed.
6658 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6659 (PPLLIBS, PPLINC): Added.
6660 * graphite.c: Replace unsigned with int wherever possible.
6661 Don't access Cloog's data structures, but use accessor functions.
6662 Clast's stmt->type is now implemented as a vtable: change the
6663 switches of stmt->type into ifs.
6664 (polylib/polylibgmp.h): Don't include.
6665 (initialize_dependence_polyhedron,
6666 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6667 statement_precedes_p, test_dependence, build_rdg_all_levels,
6668 dump_dependence_graph): Removed until this code is cleaned up
6670 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6671 (POLYLIBINC): Renamed PPLINC.
6673 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6674 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6675 Jan Sjodin <jan.sjodin@amd.com>
6677 Finish the merge and tuplification of graphite.
6679 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6680 Jan Sjodin <jan.sjodin@amd.com>
6682 Partial merge from mainline (138072:138275).
6683 * graphite.c still has to be tuplified.
6685 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6687 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6688 (create_num_from_index): New.
6689 (get_num_from_index): Also pass in the graphite BB.
6690 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6691 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6692 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6693 (is_interchange_valid): Return false when failing.
6694 * graphite.h (struct num_map): New.
6695 (struct graphite_bb): New field num_map.
6696 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6698 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6700 * graphite.c (dump_gbb_conditions): Print also conditions like
6701 "if (a)". Remove dublicated code and use print_generic_expr ().
6702 (stmt_simple_for_scop_p): Only allow conditions we can handle
6705 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6707 * graphite.h (struct scop): Removed new_ivs field.
6708 (SCOP_NEWIVS): Deleted.
6709 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6710 clast_to_gcc_expression, graphite_create_new_loop):
6711 Removed use of new_ivs.
6713 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6715 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6716 create_loops_mapping_num, debug_loop_mapping_1): New.
6717 (debug_loop_mapping): Call debug_loop_mapping_1.
6718 (get_loop_mapping_for_num,
6719 graphite_loops_mapping_add_child,
6720 graphite_loops_mapping_add_child_num,
6721 graphite_loops_mapping_insert_child,
6722 graphite_loops_mapping_parent,
6723 split_loop_mapped_depth_for_num,
6724 loop_mapped_depth_split_loop): New.
6725 (increment_loop_mapped_depths): Removed.
6726 (swap_loop_mapped_depth_for_num): Reimplemented.
6727 (new_scop): Call create_loops_mapping.
6728 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6729 (translate_clast): Pass the old loop father in parameter, and pass
6730 it to get_old_iv_from_ssa_name.
6731 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6732 can_generate_code, can_generate_for_scop): New.
6733 (graphite_trans_bb_block): Returns false when it fails to transform.
6734 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6736 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6738 Reverted all the changes related to the streamization and
6740 These changes are now tracked in the streamization branch.
6742 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6743 Jan Sjodin <jan.sjodin@amd.com>
6745 * graphite.c (gbb_compare): Correctly constify.
6746 (gbb_can_be_ignored): Indent.
6747 (graphite_trans_scop_swap_1and2): Add legality check.
6750 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6752 Remove fallouts from "Reverted the Condate changes".
6753 * tree.h: Remove unused decl.
6754 * gcc.dg/tree-checker: Same.
6755 * timevar.def: Remove counter.
6757 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6759 * Merge from mainline (135673:138072).
6761 Reverted the MIRO changes (from 2008-04-05) that are now
6762 tracked in the miro branch.
6763 * tree-bounds.c: Removed.
6764 * tree-bounds.h: Removed.
6766 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6767 are now tracked in the condate branch.
6768 * tree-check.c: Removed.
6769 * tree-match.c: Removed.
6770 * condate.y: Removed.
6772 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6774 * common.opt: New user flag -floop-block, -floop-strip-mine
6775 and -floop-interchange.
6776 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6777 graphite loop optimization flags is turned on.
6778 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6779 flag_loop_strip_mine and flag_loop_interchange checks before
6781 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6782 -floop-strip-mine and -floop-interchange.
6783 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6785 * gcc.dg/graphite/scop-16.c: Ditto.
6786 * gcc.dg/graphite/scop-17.c: Ditto.
6787 * gcc.dg/graphite/scop-18.c: Ditto.
6789 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6790 Sebastian Pop <sebastian.pop@amd.com>
6792 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6793 (create_empty_loop_on_edge): More fixes.
6794 * tree-phinodes.c (resize_phi_node): Extern.
6795 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6796 * cfghooks.c (update_dominator_information): New split from
6798 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6799 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6800 successor of the function entry block.
6802 * graphite.c: Include pointer-set.h.
6803 (debug_loop_mapping, increment_loop_mapped_depths,
6804 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6805 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6806 swap_loop_mapped_depth_for_num, get_num_from_index,
6807 swap_loop_mapped_depth, loop_iv_stack_debug,
6808 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6809 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6810 get_old_iv_from_ssa_name): New.
6811 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6812 (free_scop): Free SCOP_LOOPS_MAPPING.
6813 (scop_record_loop): Record old ivs.
6814 (create_var_name): Removed.
6815 (initialize_cloog_names): Allocate double space in case strip mine
6816 applies to all loops once.
6817 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6818 (clast_to_gcc_expression): Same. Implement more clast to gimple
6820 (graphite_create_new_loop): Pass in ivstack.
6821 (remove_all_edges): Pass in the construction_edge.
6822 (graphite_remove_iv): Removed.
6823 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6824 remove_cond_exprs): Rewritten.
6825 (move_phi_nodes): New.
6826 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6827 (translate_clast): Pass in ivstack. Rewrite some cases.
6828 (set_cloog_options, debug_clast_stmt): New.
6829 (find_transform): Use set_cloog_options.
6830 (outermost_loop_layer): Removed.
6831 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6832 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6833 mark_old_loops, remove_dead_loops): New.
6835 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6836 (const_column_index, get_first_matching_sign_row_index,
6837 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6838 get_upper_bound): New.
6839 (graphite_trans_bb_strip_mine): Also update the iv map.
6841 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6842 (struct name_tree): Add a loop field.
6843 (struct scop): Add a graphite_loops_mapping field.
6844 (SCOP_LOOPS_MAPPING): New.
6845 (debug_clast_stmt): Declare.
6846 * lambda.h (find_induction_var_from_exit_cond): Declare.
6847 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6848 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6849 (create_empty_loop_on_edge): Updated.
6850 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6851 rename_variables_in_bb): Declare.
6852 * tree-cfg.c (remove_bb): Extern.
6854 * gcc.dg/graphite/block-0.c: New.
6856 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6857 Sebastian Pop <sebastian.pop@amd.com>
6859 * graphite.c (strip_mine_profitable_p): New.
6860 (graphite_trans_bb_block): Disable strip mining if not profitable.
6862 * gcc.dg/graphite/scop-18.c: New.
6863 * gcc.dg/graphite/scop-17.c: Fixed.
6864 * gcc.dg/graphite/scop-16.c: Fixed.
6866 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6867 Jan Sjodin <jan.sjodin@amd.com>
6868 Sebastian Pop <sebastian.pop@amd.com>
6870 * graphite.c (is_interchange_valid): New.
6871 (graphite_trans_bb_block): Check loop nest of basic block for legality
6874 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6875 outer_most_loop, gbb_outer_most_loop_index): New.
6877 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6878 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6879 * gcc.dg/graphite/scop-16.c: New.
6880 * gcc.dg/graphite/scop-17.c: New.
6882 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6884 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6885 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6887 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6889 * graphite.c (new_scop): Initialize SCOP_EXIT.
6890 (scopdet_info): Add.
6891 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6892 (build_scops_1): Cleanup, bugfixes.
6893 (build_scops): Cleanup.
6895 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6896 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6898 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6900 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6902 * gfortran.dg/graphite/graphite.exp: Use
6903 DEFAULT_GRAPHITE_FLAGS.
6905 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6907 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6909 * graphite.c (scan_tree_for_params): Do not assert any more if
6910 MULT_EXPR parameter is negative.
6912 * gfortran.dg/graphite/scop-1.f: New.
6914 * gfortran.dg/graphite/graphite.exp: New.
6916 * gcc.dg/graphite/scop-15.c: New.
6918 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6920 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6922 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6924 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6925 graphite_swap_loops.
6926 (graphite_trans_bb_move_loop): New.
6927 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6928 (graphite_trans_bb_block): New.
6929 (graphite_trans_loop_block): New.
6930 (graphite_trans_scop_swap_1and2): Rename from
6931 graphite_trans_swap_1and2.
6932 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6933 (graphite_trans_scop_block): New.
6934 (graphite_apply_transformations): Rename from
6935 graphite_transformations.
6937 * gcc.dg/graphite/scop-matmult.c: New.
6939 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6941 * graphite.c (gbb_compare): New.
6942 (graphite_sort_gbbs): New.
6943 (gbb_can_be_ignored): New.
6944 (scop_remove_ignoreable_gbbs): New.
6945 (graphite_transformations): Cleanup and add
6946 scop_remove_ignoreable_gbbs.
6947 * lambda.h (lambda_vector_compare): New.
6949 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6951 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6952 (graphite_swap_loops): int -> unsigned
6953 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6954 (graphite_transformations): New.
6955 (graphite_transform_loops): Move to graphite_transformations.
6956 * graphite.h (gbb_nb_loops): Return unsigned.
6958 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6960 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6961 the domain matrix. This makes scop-0.c work again.
6963 2008-06-20 Richard Guenther <rguenther@suse.de>
6965 * graphite.h: Adjust copyright to GPLv3.
6966 * graphite.c: Likewise.
6967 (stmt_simple_memref_for_scop_p): Split out from ...
6968 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6970 (get_bb_type): Optimize.
6972 (is_bb_addable): Fix memleak, replace is_pred call with
6974 (build_scops): Use current_loops.
6975 (param_index): Fix memleak.
6977 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6979 * graphite.c: Fix formatting.
6981 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6983 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6984 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6985 (create_var_name, save_var_name): Newly defined functions.
6986 (initialize_cloog_names): Part of the code factored out to
6988 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6989 in clast_reduction statement.
6990 (graphite_create_new_loop): Now takes a new parameter
6992 (translate_clast): Now also takes the context_loop and bb_exit
6993 parameters. Rewritten the code so that it creates a gimple code
6994 inside the given context.
6995 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6996 remove_cond_expr, disconnect_cond_expr,
6997 disconnect_virtual_phi_nodes): Newly defined functions.
6998 * graphite.h (struct scop): added old_ivs vector.
6999 SCOP_OLDIVS: New macro.
7001 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7003 * cfgloopmanip.c: Add missing function comments, fix formatting.
7005 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7007 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7008 (create_empty_loop_on_edge): Defined.
7009 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7011 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7012 (update_dominators_in_loop): Declared as extern
7013 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7015 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7017 * graphite.c (print_graphite_bb): Allow changing number of loops
7019 (initialize_cloog_names): Allow changing number of loops.
7020 (build_cloog_prog): Simplify.
7021 (find_transform): Enable cloog option --strides.
7022 (graphite_swap_loops): New.
7023 (graphite_strip_mine_loop): New.
7024 (graphite_trans_swap_1and2): New.
7025 (graphite_trans_strip): New.
7026 (graphite_transform_loops): Add graphite_trans_strip.
7027 * graphite.h (scop_max_loop_depth): New.
7029 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7031 * graphite.c (build_scop_iteration_domain): Remove forgotten
7032 line. (Fixes compile)
7034 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7036 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7037 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7038 (build_bb_loops): New.
7039 (graphite_transform_loops): Add build_bb_loops.
7040 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7042 * graphite.h (graphite_bb): Add loops.
7043 (gbb_nb_loops): New.
7044 (gbb_loop_at_index): New.
7045 (gbb_loop_index): New.
7046 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7047 using nb_params_in_scop.
7049 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7051 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7052 (build_scop_canonical_schedules): Build minimized schedule.
7053 (schedule_to_scattering): Adapt to minimized schedule.
7054 * graphite.h (graphite_bb): Add/Update descriptions.
7056 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7057 Tobias Grosser <grosser@fim.uni-passau.de>
7059 * graphite.c (print_graphite_bb): Add condition printing.
7061 (dump_gbb_conditions): New.
7062 (build_scop_conditions_1): New.
7063 (build_scop_conditions): New.
7064 * graphite.h (graphite_bb): Add conditions.
7066 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7068 * graphite.c (print_graphite_bb):
7069 (free_graphite_bb): New.
7070 (free_scop): Free bbs.
7071 (get_bb_type): Free doms.
7072 (build_scop_context): Free context matrix.
7073 (build_loop_iteration_domains): Remove unused code.
7074 (build_cloog_prog): Free scattering function and blocklist.
7075 (find_transform): Free options.
7077 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7079 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7080 Remove unnecessery cloog data structures. Make a copy of the domain
7081 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7082 unnecessary cloog data structures. Fix memory leaks. Remove insert
7083 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7085 (build_scop_iteration_domain): Remove unnecessary cloog
7086 data structures. Fix memory leaks.
7087 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7088 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7090 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7092 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7094 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7096 * graphite.c (end_scop): Style fix.
7097 (schedule_to_scattering): Style and comment fix.
7099 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7100 * graphite.c (print_graphite_bb): Fix definiton of
7101 schedule_to_scattering.
7102 (initialize_cloog_names): Change nb_scattdims to max loop
7104 (schedule_to_scattering): Take parameter for number of scattering
7106 (build_cloog_prog): Only build as much scattering dimensions as
7109 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7111 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7112 in polyhedron/aermod.f90.
7114 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7115 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7116 Harsha Jagasia <harsha.jagasia@amd.com>
7118 * graphite.c (is_bb_addable): Fix segfault.
7120 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7122 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7123 with multiple exits and conditional handling in edge cases.
7124 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7126 * gcc.dg/graphite/scop-14.c: New.
7128 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7129 Adrien Eliche <aeliche@isty.uvsq.fr>
7131 * graphite.c (is_bb_addable): Add more comments and enhance
7132 readablity of the source code. Fix memory leak.
7133 (is_loop_exit): Fix memory leak.
7135 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7137 * graphite.c (first_loop_in_scop): Deleted.
7138 (setup_cloog_loop): Only walk the loop chain for inner loops.
7139 (build_scop_iteration_domain): Execute setup_cloog_loop for
7140 all loops in the first layer.
7142 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7144 * graphite.c (scan_tree_for_params): Change the way params are
7145 added to be indepenent of the number of loops.
7146 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7148 (build_cloog_prog): Revert to short matrix format.
7150 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7151 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7153 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7156 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7158 * graphite.c (nb_data_refs_in_scop): New.
7159 (graphite_transform_loops): Print more stats: number of
7160 loops, basic blocks and data references per scop.
7162 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7163 Jan Sjodin <jan.sjodin@amd.com>
7165 * graphite.c (loop_affine_expr, idx_record_params,
7166 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7167 instead of instantiate_parameters.
7169 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7171 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7172 add support for parameters, add STATIC_SCHEDULE at the right places,
7175 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7177 * graphite.c (build_scop_loop_nests): Only add the loops, that
7178 are contained completely in the SCoP.
7179 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7180 and the domains are fixed.
7181 (build_scop_canonical_schedules): Add support for bbs not contained
7184 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7186 * graphite.h (scop_contains_loop): Update comments to match
7187 the actual behavior.
7188 (scop_contains_loop): New.
7189 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7191 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7193 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7194 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7197 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7198 Tobias Grosser <grosser@fim.uni-passau.de>
7200 * graphite.c (graphite_transform_loops): Early return when
7201 there are no loops in the function.
7203 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7204 Jan Sjodin <jan.sjodin@amd.com>
7206 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7207 offset of the last loop.
7208 (setup_cloog_loop): Copy the entire outer constraint matrix.
7210 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7211 Jan Sjodin <jan.sjodin@amd.com>
7213 * graphite.c (stmt_in_scop_p, function_parameter_p,
7214 invariant_in_scop_p): Removed.
7215 (scan_tree_for_params): Can be used with no constraint
7216 matrix for gathering parameters.
7217 (idx_record_params): Don't use idx_record_param, instead use
7218 scan_tree_for_params.
7219 (find_scop_parameters): Same.
7220 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7221 Fix the size of loop domains.
7222 (schedule_to_scattering): Exit when the outer loop is not in scop.
7223 (find_transform): Enable build_cloog_prog.
7225 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7226 Jan Sjodin <jan.sjodin@amd.com>
7228 * graphite.c (schedule_to_scattering): Make scattering domains
7229 uniformly of the same size, as required by CLooG 0.14.0 and before.
7231 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7232 Jan Sjodin <jan.sjodin@amd.com>
7234 * graphite.c (schedule_to_scattering): Rewrite, correct the
7235 translation of the scheduling function to scattering.
7236 (build_cloog_prog): Call schedule_to_scattering only once.
7237 * graphite.h (scop_loop_index): Do not fail for loops not
7238 in the scop: return -1.
7240 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7242 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7243 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7244 (setup_cloog_loop): Export GBB_DOMAIN.
7245 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7246 able to rebuild the original control flow.
7247 * graphite.h (graphite_bb): Add domain field and access macro.
7250 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7252 * graphite.c (debug_gbb): New.
7253 (print_scop, build_graphite_bb): Use SCOP_BBS.
7254 (build_scop_bbs): Reimplemented.
7255 (dfs_bb_in_scop_p): Removed.
7256 (build_scop_loop_nests): Reorder loops inserted in
7257 SCOP_LOOP_NEST: outer loops should come first.
7258 (build_scop_canonical_schedules): Reinitialize at zero
7259 the components of the SCOP_STATIC_SCHEDULE for the loops
7260 that have already been parsed.
7262 * graphite.h (debug_gbb): Declared.
7264 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7265 Jan Sjodin <jan.sjodin@amd.com>
7267 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7268 (graphite_loop_to_gcc_loop): Removed.
7269 (remove_all_edges): New.
7270 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7271 (gloog): Remove useless code.
7273 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7275 * graphite.c (get_bb_type): Reworked. We distinguish between
7276 loops with one or multiple exits.
7277 (is_loop_exit): New.
7279 (is_bb_addable): Rework condition handling, now support for case
7280 case statements and loops with multiple exits.
7282 * gcc.dg/graphite/scop-11.c: New.
7283 * gcc.dg/graphite/scop-12.c: New.
7284 * gcc.dg/graphite/scop-13.c: New.
7286 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7288 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7289 we have too many colors.
7291 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7293 * doc/invoke.texi (-ftree-loop-fusion): Document.
7294 * tree-pass.h (pass_loop_fusion): Declared.
7295 * tree-loop-fusion.c: New.
7296 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7297 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7298 * tree-data-ref.h (find_data_references_in_loop): Declared.
7299 * common.opt (ftree-loop-fusion): Declared.
7300 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7302 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7304 * graphite.c (build_access_matrix): Fix typo from the merge.
7306 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7308 * Merge from mainline (130800:135673).
7310 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7312 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7313 Update dominators after splitting.
7315 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7317 * graphite.c (is_bb_addable): Return the harmful statement.
7318 Factor up some code.
7319 (end_scop): New. Splits end of scope bbs on a harmful statement.
7320 (build_scops_1): Call end_scop.
7322 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7324 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7325 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7326 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7327 build_scops_1): Removed.
7328 (build_scops_2): Renamed build_scops_1.
7330 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7332 * graphite.c: Fix formatting.
7334 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7336 * graphite.c (get_bb_type): New.
7338 (build_scops_2): New.
7339 (is_bb_addable): New.
7340 (build_scops): Switch the scop detection.
7341 (build_scop_bbs): Add entry bb to scop.
7342 * graphite.h (struct scop): Update comment.
7344 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7346 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7349 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7351 * gcc.dg/graphite/scop-1.c: Update.
7352 * gcc.dg/graphite/scop-2.c: Update.
7353 * gcc.dg/graphite/scop-4.c: Update.
7354 * gcc.dg/graphite/scop-5.c: Add.
7355 * gcc.dg/graphite/scop-6.c: Add.
7357 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7359 * gcc.dg/graphite/scop-0.c: Add.
7360 * gcc.dg/graphite/scop-7.c: Add.
7361 * gcc.dg/graphite/scop-8.c: Add.
7362 * gcc.dg/graphite/scop-9.c: Add.
7363 * gcc.dg/graphite/scop-10.c: Add.
7365 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7367 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7368 Check affine expressions depending on the outermost loop
7370 (stmt_simple_for_scop_p): Same.
7371 (harmfule_stmt_in_scop): Same.
7373 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7375 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7376 mark entry and exit, that are not part of the SCoP and update HTML
7379 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7381 * graphite.c (basic_block_simple_for_scop_p): Renamed
7383 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7384 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7385 (all_preds_visited_p, all_succs_visited_p,
7386 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7387 scop_end_loop): New.
7388 (build_scops): Do not use dfs_enumerate_from.
7390 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7392 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7394 * graphite.c: Add comments to functions that are missing a
7396 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7398 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7400 * graphite.c (nb_params_in_scop): Moved...
7401 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7402 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7403 (clast_to_gcc_expression): Reduce column size to less than 80.
7404 (graphite_create_iv): Return the new name of the IV.
7405 (find_transform): Set options->esp and options->cpp.
7406 (gloog): Comment out the invalidation of the old loop code.
7407 (initialize_dependence_polyhedron): Replace scop_nb_params with
7410 * graphite.h (nb_params_in_scop): ... here.
7411 (scop_nb_params): Removed.
7412 (loop_domain_dim): Return something even when the loop was not
7413 found in the hash table: avoid ICEing on all the graphite.exp
7416 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7418 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7420 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7421 according to nesting level.
7422 (find_scop_parameters): Call instantiate_parameters.
7423 (scan_tree_for_params): Extend it to handle general affine bounds.
7424 Inner loop bound can depend on outer loop induction variable.
7425 (setup_cloog_loop): tmp variable is allocated on stack. Call
7426 instantiate_parameters with respect to outermost_loop_in_scop.
7427 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7429 (create_empty_loop): Function loopify should be given edge
7430 probability, instead of edge frequency. Dominance relation from
7431 switch_bb to loop_header.
7432 (clast_to_gcc_expression): Added handling of clast_reduction node.
7433 (gloog): New functionality for removing old loop.
7434 (test_dependence): Factored out from build_rdg_all_levels.
7435 (build_rdg_all_levels): Dependence testing factored out to
7436 test_dependence function.
7438 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7439 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7442 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7444 * graphite.c (free_scop, param_index, initialize_cloog_names,
7445 nb_params_in_scop): Use name_tree map instead of just a tree
7446 for keeping track of the variable name associated to that tree.
7447 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7448 clast_to_gcc_expression, graphite_create_iv,
7449 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7450 graphite_stmt_to_gcc_stmt): New.
7451 (gloog): Call these.
7452 * graphite.h (struct name_tree): New.
7453 (struct scop): Use name_tree instead of tree for params.
7454 Store a vector of name_tree for new_ivs.
7456 (scop_nb_params): Use name_tree instead of tree.
7458 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7459 Sebastian Pop <sebastian.pop@amd.com>
7461 * tree-bounds.c: New.
7462 * tree-bounds.h: New.
7463 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7464 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7465 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7469 * c-cppbuiltin.c: Same.
7473 * tree-outof-ssa.c: Same.
7475 * Makefile.in: Same.
7477 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7478 Sebastian Pop <sebastian.pop@amd.com>
7480 * tree-loop-distribution.c (remaining_stmts,
7481 upstream_mem_writes): Removed static variables.
7482 (copy_loop_before, create_bb_after_loop,
7483 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7484 rdg_build_components, rdg_build_partitions,
7485 dump_rdg_partitions): Extern.
7486 (generate_loops_for_partition, generate_code_for_partition): Do not
7488 (already_processed_vertex_p, predecessor_has_mem_write,
7489 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7490 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7491 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7492 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7493 Pass remaining_stmts and upstream_mem_writes as parameters.
7494 (rdg_component): Moved...
7495 (build_rdg_partition_for_component): Do not aggregate components when
7496 flag_streamize_loops is set.
7497 (gen_sequential_loops): New.
7498 (ldist_gen): Call gen_sequential_loops.
7500 * tree-pass.h (pass_loop_streamization): Declared.
7502 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7503 basic blocks when loops structures exist.
7505 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7507 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7509 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7510 eliminate_local_variables_stmt, eliminate_local_variables,
7511 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7512 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7513 of code delimited by two edges in the CFG.
7514 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7515 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7516 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7517 the case of parallelisation of reductions.
7518 (create_loop_fn): Extern.
7519 (create_omp_parallel_region): New.
7521 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7522 dump_data_reference for printing dra and drb.
7523 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7525 (build_rdg): Don't call free_dependence_relations for the moment, as
7526 we attach dependence relations on each edge of the RDG.
7529 * tree-data-ref.h (rdg_component): ...here.
7530 (struct rdg_edge): New field ddr_p relation.
7531 (RDGE_RELATION): New.
7532 (create_bb_after_loop, copy_loop_before,
7533 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7534 rdg_build_partitions, dump_rdg_partitions,
7535 free_rdg_components): Declared.
7537 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7538 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7540 * tree-loop-streamization.c: New.
7542 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7543 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7545 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7547 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7549 * passes.c: Schedule pass_loop_streamization.
7551 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7553 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7556 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7558 * graphite.c (dot_all_scops): Update formatting.
7559 Bbs can now be part of more than one SCoP.
7561 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7563 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7565 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7566 * graphite.h (loop_to_cloog_loop): New.
7568 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7570 * graphite.c (loop_domain_dim, ref_nb_loops,
7571 loop_iteration_vector_dim): New.
7572 (build_access_matrix_with_af, build_access_matrix,
7573 initialize_dependence_polyhedron): Fixed for new matrix layout.
7574 No longer assume that all iteration domains are of the same
7577 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7579 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7580 defined in a loop at depth 0 is invariant.
7581 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7582 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7583 be called at loop depth 0.
7585 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7587 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7588 (down_open_scop): Removed.
7589 (loop_in_scop_p): Redefined.
7590 (scop_affine_expr): New argument: scop.
7591 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7592 a harmful statement ending a scop.
7593 (basic_block_simple_for_scop_p): New argument: scop.
7594 (get_loop_start): Removed.
7595 (new_scop): Initialize SCOP_LOOPS.
7596 (free_scop): Free SCOP_LOOPS.
7597 (succs_at_same_depth, preds_at_same_depth): New.
7598 (end_scop): Test the validity of a scop.
7599 (add_dominators_to_open_scops): New.
7600 (test_for_scop_bound): Call add_dominators_to_open_scops.
7601 Add cases for opening and closing multiple scops.
7602 (build_scops, build_scop_bbs): Iterate over basic blocks in
7604 (build_graphite_bb): Pass scop directly.
7605 (dfs_bb_in_scop_p): New.
7606 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7608 (nb_loops_around_gb): Use loop_in_scop_p.
7609 (schedule_to_scattering): Disabled for the moment the code computing
7610 the "textual order for outer loop".
7612 * graphite.h (struct scop): New field loops.
7614 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7616 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7618 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7619 Sebastian Pop <sebastian.pop@amd.com>
7621 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7622 * common.opt (fstreamize-loops): New.
7623 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7624 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7625 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7626 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7628 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7630 * tree-data-ref.c (build_empty_rdg): New.
7631 (build_rdg): Use it.
7632 * tree-data-ref.h (build_empty_rdg): Declared.
7633 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7634 (find_vertex_for_stmt): Removed.
7635 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7637 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7639 * tree-loop-distribution.c (generate_builtin): After cancelling the
7640 loop tree, also delete basic blocks.
7641 (rdg_flag_uses): Stop recursion when a vertex has already been
7644 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7646 * graphite.c (build_scop_alpha): Removed.
7647 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7648 and dump_dependence_graph to avoid compiler warnings.
7650 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7652 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7653 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7654 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7655 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7656 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7657 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7658 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7659 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7660 dump_dependence_graph): New.
7661 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7663 (struct scop): New field loop2cloog_loop.
7664 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7665 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7667 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7669 * graphite.c (build_graphite_bb): Fix initialization
7670 of the graphite basic block.
7672 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7674 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7675 loop domain matrix. Pass in the number of loops contained in the
7677 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7678 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7679 loops that are not surrounding the current loop are not represented
7680 in the domain constraint matrix.
7681 (build_scop_iteration_domain): Initial domain constraint matrix
7682 contains only the eq/ineq, cst, and scop parameters columns.
7684 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7686 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7687 (print_graphite_bb): Print scattering.
7689 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7691 * graphite.c (initialize_cloog_names): Initialize names of
7692 scattering variables.
7694 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7696 * graphite.c (dot_all_scops_1): Disable debug output while
7699 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7701 * graphite.c (find_transform): Change cloog output language to C.
7703 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7705 * tree-loop-distribution.c (generate_memset_zero,
7706 generate_builtin, generate_code_for_partition,
7707 rdg_flag_all_uses): New.
7708 (rdg_flag_uses): Gather in the same partition the statements defining
7709 the VUSES of the current statement.
7710 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7711 Gather in the same partition not only the stores to the same memory
7712 access, but also the reads.
7713 (ldist_generate_loops): Renamed ldist_gen.
7715 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7716 Tobias Grosser <grosser@fmi.uni-passau.de>
7718 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7719 next pointer, don't use the inner pointer.
7721 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7723 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7724 (find_transform): Call dot_all_1.
7725 * graphite.h (dot_all_scops): Declared.
7727 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7729 * tree-loop-distribution.c: Fix apsi.f ICE.
7730 (create_bb_after_loop): New.
7731 (generate_loops_for_partition): Use it.
7732 * gfortran.dg/ldist-1.f90: New.
7734 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7735 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7737 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7739 * graphite.c (find_transform): Dump cloog program sent to cloog.
7741 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7743 * graphite.c (initialize_cloog_names): Initialize cloog
7746 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7748 * graphite.c (build_scop_context): Fix typo, for the matrix
7749 format: insert '0 >= 0' instead of '-1 >= 0'.
7751 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7753 * Fix merge problems.
7755 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7757 * graphite.c (setup_cloog_loop): Fix typo.
7759 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7761 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7762 * tree-loop-distribution.c: Reimplemented.
7763 * tree-pass.h (pass_loop_distribution): New.
7764 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7766 * graphds.h (struct graph): New field indexes.
7767 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7769 * tree-vect-analyze.c: Remove declaration of static functions when not
7771 * tree-vectorizer.c: Same.
7772 (rename_variables_in_loop): Now extern.
7773 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7774 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7775 calling redirect_edge_and_branch_force.
7777 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7779 * tree-data-ref.c: Don't include tree-chrec.h.
7780 (debug_data_dependence_relations): New.
7781 (dump_data_dependence_relation): Call dump_data_reference on data refs
7783 (same_access_functions): Moved...
7784 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7785 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7786 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7787 struct rdg_vertex_info, ): New.
7788 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7790 (create_rdg_vertices): Initialize the htab of graph->indexes.
7791 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7792 (stmts_from_loop): Don't save LABEL_EXPR.
7793 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7794 hash_stmt_vertex_del): New.
7795 (build_rdg): Initialize rdg->indexes.
7796 (free_rdg, stores_from_loop, ref_base_address,
7797 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7798 have_similar_memory_accesses_1, ref_base_address_1,
7799 remove_similar_memory_refs): New.
7801 * tree-data-ref.h: Include tree-chrec.h.
7802 (debug_data_dependence_relations): Declared.
7803 (same_access_functions): ...here. Now static inline.
7804 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7805 ddr_dependence_level): New.
7806 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7807 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7808 RDG_MEM_READS_STMT): New.
7809 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7810 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7811 rdg_vertex_for_stmt): Declared.
7812 (struct rdg_edge): New field level.
7813 (RDGE_LEVEL, free_rdg): New.
7814 (stores_from_loop, remove_similar_memory_refs,
7815 rdg_defs_used_in_other_loops_p,
7816 have_similar_memory_accesses): Declared.
7817 (rdg_has_similar_memory_accesses): New.
7819 * lambda.h (dependence_level): New.
7820 * common.opt (ftree-loop-distribution): New.
7821 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7822 (print_loop_ir): Renamed print_loops.
7823 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7824 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7825 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7826 (tree-loop-distribution.o): Added.
7827 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7828 (mark_virtual_ops_in_bb): New.
7829 (print_loops_bb, debug_loop_num, debug_loop): New.
7830 * passes.c: Scheduled pass_loop_distribution.
7832 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7834 * graphite.c (scan_tree_for_params): Correct the number of columns
7836 (nb_flat_iterator): New.
7837 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7838 (build_scop_iteration_domain): Correct the number of columns for
7841 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7843 * Merge from mainline (129697:130800).
7845 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7847 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7848 dominated by SCoP's exit.
7849 (graphite_transform_loops): Compute post dominators.
7851 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7853 * Merge from mainline (127169:129697).
7855 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7857 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7858 parameter for the basic block that contains the expression. Use
7859 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7860 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7862 * graphite.h (gbb_loop): New.
7863 (GBB_LOOP): Removed.
7865 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7867 * Makefile.in: Fix merge problem.
7869 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7871 * Merge from mainline (125309:127169).
7872 * tree-loop-distribution.c: Disabled.
7874 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7876 * Merge from mainline (r123693:125309).
7878 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7880 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7882 (correct_modify_p, check_statements, number_of_lvalue_uses,
7883 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7884 instead of MODIFY_EXPR.
7885 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7888 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7890 * tree-loop-distribution.c (struct rdg): Replace arrays by
7891 VECs for edges and vertices.
7892 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7893 (RDGV_NB_PARTITIONS): New.
7894 (PRDG_NBV, PRDG_NBE): Removed.
7895 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7896 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7897 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7899 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7900 Sebastian Pop <sebpop@gmail.com>
7902 * doc/invoke.texi (-ftree-loop-distribution): Document.
7903 * tree-loop-distribution.c: New file.
7904 * tree-pass.h (pass_loop_distribution): Declared.
7905 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7906 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7908 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7909 (DDR_REVERSED_P): New.
7910 * common.opt (-ftree-loop-distribution): New.
7911 * tree-flow.h (distribute_loops): Declared.
7912 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7913 * passes.c (init_optimization_passes): Schedule loop distribution.
7915 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7917 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7918 (print_scop): Don't print when scop is NULL.
7919 (build_scop_context, find_transform): Don't output to stderr.
7921 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7923 * tree-data-ref.c: Don't include graphite.h.
7924 Comment out the code for printing data reference's scop.
7925 (build_access_matrix_with_af): Moved...
7926 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7927 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7928 (print_graphite_bb): Print basic block's schedule.
7929 (print_scop): Don't print the schedule, call cloog's pretty printer.
7930 (bb_in_scop_p): A basic block is in a scop only if it is both
7931 dominated and postdominated by the scop's entry and exit basic blocks.
7932 (function_parameter_p): New.
7933 (invariant_in_scop_p): Use function_parameter_p.
7934 (new_scop, save_scop): New.
7935 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7937 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7938 (loop_in_scop_p): New.
7939 (scop_record_loop): Use loop_in_scop_p.
7940 (build_scop_domain): Renamed build_scop_iteration_domain.
7941 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7942 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7943 setup_cloog_loop, dot_scop_1, dot_scop): New.
7944 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7945 (struct scop): Add a pointer to cloog's representation of a program.
7947 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7949 * doc/invoke.texi (-ftree-check-verbose): Renamed
7950 -ftree-checks-verbose.
7951 * common.opt (flag_tree_check_verbose): Renamed
7952 flag_tree_checks_verbose.
7953 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7955 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7957 * configure: Regenerated.
7958 * config.in: Regenerated.
7959 * tree-ssa-loop.c (graphite_transforms): Execute
7960 graphite_transform_loops only when HAVE_cloog.
7961 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7962 * graphite.c: Include polylibgmp.h and cloog.h.
7963 (graphite_transform_loops): Removed loops parameter.
7964 * tree-flow.h (graphite_transform_loops): Update declaration.
7965 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7966 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7967 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7968 (OBJS-common): Remove dependence on graphite.o.
7969 (BACKEND): Depend on @GRAPHITE@.
7971 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7973 * doc/invoke.texi (-ftree-check-verbose): Documented.
7974 * gcc.dg/tree-checker/tree-checks-1.c: New.
7975 * gcc.dg/tree-checker/tree-checks-2.c: New.
7976 * gcc.dg/tree-checker/tree-checks-3.c: New.
7977 * gcc.dg/tree-checker/tree-checks-4.c: New.
7978 * gcc.dg/tree-checker/tree-checks.exp: New.
7979 * gcc.dg/tree-checker/condates.crp: New.
7980 * common.opt (ftree-checks-verbose): New.
7981 * tree-check.c (tree_check_warning): Move extra stderr output
7982 under control of flag_tree_check_verbose.
7984 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7986 * tree-match.c: Fix comments formatting.
7987 * tree-match.h: Fix comments formatting.
7988 * tree-check.c: Fix comments formatting.
7989 (tree_check_init): Restructure.
7991 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7993 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7995 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7997 * Merge from mainline (r120733:123693).
7999 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8001 * condate.y: New file.
8002 * tree-match.h (struct patt_info_s): New field sign.
8003 (struct condate_s): New field msg.
8004 (normalize_condate, name_condate, add_condate): New.
8005 (conds[], condate_parse): Made extern.
8006 * tree-check.c (tree_check_warning): First arg changed to cond;
8007 warning reformatted.
8008 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8010 (tree_check): Process trivial condates.
8011 (read_delimited_string): Removed.
8012 (print_cond): Print name and msg.
8013 (conds[]): Made extern.
8014 (parse_tree_check_file_once): Rewritten to use the parser in
8016 Processing of option --tree_check_string moved to tree_scan().
8017 * Makefile.in: Added condate.y
8019 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8021 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8022 Use VECs instead of varrays.
8023 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8024 * Makefile.in (pretty-print.o): Depend on vec.h.
8025 * pretty-print.c: Include tree.h and vec.h.
8026 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8027 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8028 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8029 pp_free_list): Use VECs instead of varrays.
8030 * pretty-print.h: Do not include varray.h.
8031 (struct tree_chunk_s): Declaration moved before its use.
8032 (output_buffer): Rename varray field to chunks.
8033 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8034 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8035 save_global_holes): Use VECs instead of varrays.
8036 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8037 * tree-check.c (scan_cfg_stmts, push_node,
8038 print_matching_stmt): Removed.
8039 (tree_check_instance, push_global_holes_if_new, tree_check,
8040 execute_tree_check): Use VECs instead of varrays.
8041 (gate_tree_check): Don't execute the CFG check when basic_block_info
8044 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8046 * Merge from mainline (r115016:120733).
8048 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8050 * Merge from mainline (r117632:117661).
8052 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8054 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8055 * tree-pass.h (TDF_DEBUG, debug_p): New.
8056 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8057 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8058 get_loop_exit_condition, analyze_evolution_in_loop,
8059 analyze_initial_condition, analyze_scalar_evolution,
8060 instantiate_parameters, number_of_latch_executions): Use debug_p.
8061 * tree-chrec.c (chrec_apply): Use debug_p.
8062 * tree-data-ref.c: Include graphite.h.
8063 (dump_data_reference): Print also the access matrix.
8064 (analyze_array, analyze_indirect_ref, init_data_ref,
8065 analyze_offset_expr, address_analysis, object_analysis,
8066 create_data_ref, finalize_ddr_dependent,
8067 non_affine_dependence_relation, analyze_ziv_subscript,
8068 analyze_siv_subscript_cst_affine,
8069 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8070 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8071 analyze_miv_subscript, analyze_overlapping_iterations,
8072 build_classic_dist_vector, subscript_dependence_tester,
8073 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8074 (build_access_matrix_with_af): No longer static.
8075 * tree-data-ref.h (scop_p): ... declaration here.
8076 (data_reference.scop): New field.
8077 (DR_SCOP, DR_ACCESS_MATRIX): New.
8078 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8079 * graphite.c (print_graphite_bb): Call dump_data_references.
8080 (print_scop): Use scop_nb_loops and scop_dim_domain.
8081 (test_for_scop_bound): Use debug_p.
8082 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8084 (scop_loop_index): Moved...
8085 (scop_record_loop): New.
8086 (build_scop_loop_nests): Use scop_record_loop.
8087 (build_scop_domain): Use scop_dim_domain.
8088 (build_access_matrix): Implemented.
8089 (build_scop_canonical_schedules): Use scop_nb_loops.
8090 (build_graphite_bb): Initialize GBB_SCOP.
8091 * graphite.h (scop_p): Moved...
8092 (graphite_bb.scop): New field.
8093 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8094 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8095 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8096 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8097 scop_loop_index): New.
8098 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8100 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8102 * Merge from mainline (r117661:120450).
8104 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8106 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8107 at the first declaration outside the varying loop, instantiate as
8109 * tree-chrec.c (for_each_scev_op): New.
8110 * tree-chrec.h (for_each_scev_op): Declared.
8111 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8112 * tree-data-ref.c (get_references_in_stmt,
8113 find_data_references_in_stmt): New, from trunk.
8114 (find_data_references_in_loop): Use get_references_in_stmt
8115 and find_data_references_in_loop, modified as in trunk.
8116 (build_access_matrix_with_af): New.
8117 * tree-data-ref.h (data_reference): Add a field access_matrix.
8118 (data_ref_loc): New, as in trunk.
8119 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8120 invariant_in_scop_p, param_index, scan_tree_for_params,
8121 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8122 idx_record_param, idx_record_params, build_access_matrix,
8123 build_scop_data_accesses, build_scop_canonical_schedules,
8124 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8125 build_scop_params): New.
8126 * graphite.h (graphite_bb): New.
8127 (scop): Add fields static_schedule, params, loop_nest,
8129 * lambda.h: Declare vecs of lambda_matrix.
8130 * tree-flow.h (print_loop_ir_bb): Declared.
8131 * tree-cfg.c (print_loop_ir_bb): New.
8132 (print_loop): Use print_loop_ir_bb.
8134 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8136 * Merge from mainline (r115016:117632).
8138 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8140 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8141 break due to a warning.
8143 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8145 * graphite.c (print_scops, debug_scops): New.
8146 (graphite_transform): Renamed graphite_find_transform.
8147 * graphite.h (debug_scops): Declared.
8149 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8151 * tree-match.c: Reformat following the GNU style.
8152 * tree-match.h: Reformat following the GNU style.
8153 * tree-pattern.h: Removed empty file.
8154 * Makefile.in: Remove references to tree-pattern.h.
8155 * tree-check.c: Reformat following the GNU style.
8156 (execute_tree_check): Move gate condition code to...
8157 (gate_tree_check): ...here. New function.
8158 (pass_check): Use the gate function.
8160 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8162 * tree-pattern.h: New. Tree pattern matching and checking using
8164 * tree-check.c: New. Tree/CFG checking pass.
8165 * tree-match.c: New. Library for tree pattern matching.
8166 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8167 * toplev.c, flags.h: Add globals for tree-check pass.
8168 * Makefile.in: Integrate the files in tree-check pass.
8169 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8170 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8171 Introduce a "lazy" pretty-print mode.
8172 * tree.c, tree.h: Add tree_name.
8174 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8176 * doc/invoke.texi (-fgraphite): Correct typo.
8177 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8178 use of print_loop_ir.
8179 * gcc.dg/graphite/scop-1.c: New.
8180 * gcc.dg/graphite/scop-2.c: New.
8181 * gcc.dg/graphite/graphite.exp: New.
8182 * graphite.c: Include domwalk.h.
8183 (print_scop): Print only the entry and exit blocks.
8184 (debug_scop): No longer static.
8185 (affine_expr): Fix formating. Return also true when the expression is
8187 (stmt_simple_for_scop_p): Fix formating.
8188 (build_scops): Use domwalk.
8189 (get_loop_start, end_scop, test_for_scop_bound): New.
8190 (graphite_transform_loops): Avoid printing on stderr.
8191 * graphite.h (debug_scop): Declared.
8192 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8193 * Makefile.in (graphite.o): Depend on domwalk.h.
8194 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8195 declarations for static functions.
8196 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8197 controlling output verbosity.
8199 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8200 Plesco Alexandru <shurikx@gmail.com>
8202 * doc/invoke.texi (-fgraphite): Document.
8203 * tree-pass.h (pass_graphite_transforms): Declared.
8204 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8205 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8206 (pass_graphite_transforms): Defined.
8207 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8208 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8209 * graphite.c, graphite.h: New.
8210 * common.opt (fgraphite): Declared.
8211 * tree-flow.h (graphite_transform_loops): Declared.
8212 * Makefile.in (OBJS-common): Add graphite.o.
8213 (graphite.o): New rule.
8214 * passes.c (pass_graphite_transforms): Scheduled.