1 2010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
3 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
4 (openscop_print_polyhedron_matrix): New.
5 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
6 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
7 (openscop_print_pdr_powerset): New.
8 (openscop_print_powerset_matrix): New.
9 (openscop_print_scattering_function_1): New.
10 (print_scattering_function): Add support for scattering names and
12 (graphite_write_transforms): Remove.
13 (apply_poly_transforms): Updated to call print_scop.
14 (print_pdr_access_layout): Updated to support OpenScop format.
16 (openscop_print_pbb_domain): New.
17 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
19 (print_pbb): Updated to call the new print_pbb_body.
20 (openscop_print_scop_context): New.
21 (print_scop_header): New.
22 (print_scop): Updated to call print_scop_header.
23 * graphite-poly.h: Document OpenScop format.
25 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
27 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
28 the case removed in the previous patch, when the only phi argument
29 is defined in the same loop as the phi node itself. Handle it
30 separately from the invariant case by both propagating it outside
31 the region and replacing the phi node with an assign.
33 2010-07-28 Sebastian Pop <sebastian.pop@amd.com>
35 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
36 constant phi nodes with one argument are is_gimple_min_invariant
37 and SSA_NAME_IS_DEFAULT_DEF.
39 * gfortran.dg/graphite/id-22.f: New.
41 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
43 * graphite.c (graphite_initialize): Do not initialize
44 CLooG and initialize the Parma Polyhedra Library
45 manually when using CLOOG_ORG.
46 (graphite_finalize): Do not finalize CLooG and finalize
47 the Parma Polyhedra Library manually when using CLOOG_ORG.
48 * graphite-cloog-compat.h (cloog_initialize): Hide function
50 (cloog_finalize): Same.
52 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
54 * graphite-clast-to-gimple.c (free_scattering): Change
55 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
57 (build_cloog_prog): Same.
58 * graphite-cloog-compat.h (cloog_domain): Removed.
59 (cloog_scattering): New.
60 (cloog_set_domain): Removed.
61 (cloog_set_scattering): New.
62 (cloog_next_domain): Removed.
63 (cloog_next_scattering): New.
64 (cloog_set_next_domain): Removed.
65 (cloog_set_next_scattering): New.
66 (CloogScatteringList): New.
67 (CloogScattering): New.
68 (cloog_scattering_free): New.
69 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
70 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
73 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
75 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
77 (set_cloog_options): Same.
78 (print_clast_stmt): Same.
79 (scop_to_clast): Same.
80 (print_generated_program): Same.
82 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
83 (scop_to_clast): Extend with CloogState.
84 * graphite-cloog-util.c: Include graphite-cloog-compat.h
85 (new_Cloog_Domain_from_ppl_Polyhedron):
86 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
87 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
88 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
89 * graphite-cloog-util.h (build_cloog_prog): Same.
90 * graphite-cloog-copat.h (build_cloog_prog): New.
92 (cloog_state_malloc): New.
93 (cloog_state_free): New.
94 (cloog_loop_malloc): New.
95 (cloog_options_malloc): New.
96 (cloog_statement_alloc): New.
97 (cloog_domain_from_cloog_matrix): New.
98 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
99 (new_Cloog_Domain_from_ppl_Polyhedron): New.
101 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
103 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
104 type of NAME now depends on used CLooG version.
105 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
106 (gcc_type_for_clast_expr): Same.
107 (print_clast_stmt): Replace pprint with clast_pprint.
108 * graphite-cloog-compat.h: Provide compatibility macros for
111 (clast_expr_term): New.
112 (clast_expr_red): New.
113 (clast_expr_bin): New.
116 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
118 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
119 compatible to newer CLooG releases (CLOOG_ORG).
120 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
121 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
122 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
123 (build_cloog_prog) : New.
124 (cloog_program_extract_scalars): New.
125 (cloog_program_scatter): New.
127 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
129 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
130 conditionally (CLOOG_ORG).
131 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
132 (cloog_statement_usr): New.
133 (cloog_domain): Same.
134 (cloog_set_domain): Same.
135 (cloog_next_domain): Same.
136 (cloog_set_next_domain): Same.
137 (cloog_program_nb_scattdims): Same.
138 (cloog_program_set_nb_scattdims): Same.
139 (cloog_program_names): Same.
140 (cloog_program_set_names): Same.
141 (cloog_program_set_context): Same.
142 (cloog_program_set_loop): Same.
143 (cloog_program_blocklist): Same.
144 (cloog_program_set_blocklist): Same.
145 (cloog_program_scaldims): Same.
146 (cloog_program_set_scaldims): Same.
147 (cloog_names_nb_parameters): Same.
148 (cloog_names_set_nb_parameters): Same.
149 (cloog_names_parameters): Same.
150 (cloog_names_set_parameters): Same.
151 (cloog_names_set_nb_iterators): Same.
152 (cloog_names_set_iterators): Same.
153 (cloog_names_set_nb_scattering): Same.
154 (cloog_names_set_scattering): Same.
155 (cloog_statement_set_usr): Same.
156 (cloog_loop_set_next): Same.
157 (cloog_loop_set_domain): Same.
158 (cloog_loop_set_block): Same.
159 (cloog_block_list_next): Same.
160 (cloog_block_list_set_next):
161 (cloog_block_list_set_block): Same.
163 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
165 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
167 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
168 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
169 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
170 when something has been changed.
171 (rewrite_commutative_reductions_out_of_ssa): Same.
173 * gcc.dg/graphite/id-26.c: New.
175 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
177 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
178 handle the case when def is in the sese region.
179 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
180 for invariant expressions.
181 (rewrite_cross_bb_phi_deps): Removed.
182 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
183 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
184 rewrite_cross_bb_phi_deps.
186 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
188 * graphite-sese-to-poly.c
189 (rewrite_commutative_reductions_out_of_ssa_loop): Call
190 scev_analyzable_p only on is_gimple_reg
192 * gcc.dg/graphite/id-25.c: New.
194 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
196 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
197 (rewrite_close_phi_out_of_ssa): Propagate constant values or
198 parametric expressions outside the scop region.
199 (rewrite_cross_bb_scalar_deps): Same.
200 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
202 * gcc.dg/graphite/run-id-5.c: New.
203 * gcc.dg/graphite/run-id-6.c: New.
204 * gfortran.dg/graphite/id-21.f: New.
206 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
208 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
209 SSA_NAME_DEF_STMT only on SSA_NAMEs.
211 * gcc.dg/graphite/id-24.c: New.
213 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
215 * tree-scalar-evolution.c (instantiate_scev_name): Do not
216 instantiate default definitions.
218 2010-07-20 Vladimir Kargov <kargov@gmail.com>
220 * graphite-scop-detection.c (is_valid_stmt_p): New.
221 (is_valid_bb_p): New.
223 2010-07-20 Vladimir Kargov <kargov@gmail.com>
224 Sebastian Pop <sebastian.pop@amd.com>
226 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
227 (loop_exits_from_bb_p): New.
228 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
229 (loop_exits_from_bb_p): Declared.
230 * graphite-scop-detection.c (scopdet_basic_block_info): Call
233 2010-07-20 Vladimir Kargov <kargov@gmail.com>
235 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
237 (dot_regions_1): New.
239 * refined-regions.h (dot_regions): Declared.
240 * Makefile.in (refined-regions.o): Update dependences.
242 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
244 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
245 extra parameter for the region. Call scev_analyzable_p.
246 (rewrite_reductions_out_of_ssa): Update call to
247 rewrite_close_phi_out_of_ssa.
248 (rewrite_cross_bb_phi_deps): Same.
249 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
250 parameter for the region. Call scev_analyzable_p.
251 (rewrite_commutative_reductions_out_of_ssa): Update call to
252 rewrite_commutative_reductions_out_of_ssa_loop.
254 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
256 * gcc.dg/tree-ssa/pr20742.c: New.
258 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
260 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
262 * gcc.dg/graphite/id-23.c: New.
264 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
266 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
267 SSA scalar phi nodes that can be scev_analyzable_p.
269 * gfortran.dg/graphite/id-20.f: Adjust testcase.
271 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
273 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
274 handle SSA_NAME_IS_DEFAULT_DEF.
276 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
278 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
280 * gcc.dg/graphite/pr42729.c: New.
282 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
284 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
285 case non close-phi nodes with one argument.
287 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
289 * sese.h (scev_analyzable_p): Scevs could be expressions without
290 chrecs and still be scev_analyzable_p.
292 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
294 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
296 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
298 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
299 * cfgloop.h (struct loop): Remove single_iv field.
300 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
301 (scop_canonicalize_loops): Removed.
302 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
303 over all the loop phi nodes in loop->header.
304 (build_poly_scop): Remove use of scop_canonicalize_loops.
306 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
308 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
311 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
313 * tree-chrec.c (chrec_apply): Should only apply to the specified
314 variable. Also handle multivariate chains of recurrences that
315 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
317 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
319 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
320 (debug_clast_name_indexes_1): Removed.
321 (debug_clast_name_indexes): Removed.
322 (pbb_to_depth_to_oldiv): Removed.
323 (build_iv_mapping): Replace the use of rename_map with iv_map.
324 (translate_clast_user): Remove uses of rename_map. Allocate and
326 (translate_clast_for_loop): Remove uses of rename_map.
327 (translate_clast_for): Same.
328 (translate_clast_guard): Same.
329 (translate_clast): Same.
331 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
332 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
333 * sese.c (set_rename): Now static.
334 (rename_variables_in_stmt): Removed.
336 (is_parameter): Removed.
338 (expand_scalar_variables_call): Removed.
339 (expand_scalar_variables_ssa_name): Removed.
340 (expand_scalar_variables_expr): Removed.
341 (expand_scalar_variables_stmt): Removed.
342 (expand_scalar_variables): Removed.
343 (rename_variables): Removed.
344 (remove_condition): Removed.
345 (get_true_edge_from_guard_bb): Removed.
346 (get_false_edge_from_guard_bb): Removed.
347 (struct igp): Removed.
348 (default_before_guard): Removed.
349 (convert_for_phi_arg): Removed.
350 (add_guard_exit_phis): Removed.
351 (insert_guard_phis): Removed.
352 (graphite_copy_stmts_from_block): Now also uses iv_map and a
353 region. Do not copy conditions. Do not copy induction variables.
355 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
356 the translated statement. Use the iv_map for the induction
358 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
359 (set_rename): Removed declaration.
360 (scev_analyzable_p): ...here.
361 * tree-chrec.c (chrec_apply_map): New.
362 * tree-chrec.h (chrec_apply_map): Declared.
364 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
366 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
367 insert_loop_close_phis.
368 * sese.c (name_defined_in_loop_p): Removed.
369 (expr_defined_in_loop_p): Removed.
370 (alive_after_loop): Removed.
371 (close_phi_not_yet_inserted_p): Removed.
372 (struct alep): Removed.
373 (add_loop_exit_phis): Removed.
374 (insert_loop_close_phis): Removed.
376 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
378 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
380 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
382 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
384 * gfortran.dg/graphite/id-20.f: New.
386 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
388 * graphite-cloog-util.h: Added cloog.h.
389 * graphite-blocking.c: Removed cloog.h.
390 * graphite-dependences.c: Same.
391 * graphite-interchange.c: Same.
392 * graphite-poly.c: Same.
393 * graphite-ppl.c: Same.
394 * graphite-scop-detection.c: Same.
395 * graphite-sese-to-poly.c:
397 Removed graphite-clast-to-gimple.h.
398 (check_poly_representation): Removed (unused).
399 * graphite-sese-to-poly.h
400 (check_poly_representation): Removed (unused).
402 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
405 (OBJS-common): Added graphite-cloog-util.o.
406 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
407 (graphite-cloog-util.o): New.
408 (graphite-ppl.o): Added graphite-cloog-util.h.
409 * graphite-clast-to-gimple.c:
410 Added graphite-cloog-util.h to include statements.
411 * graphite-cloog-util.c: New.
412 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
413 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
414 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
415 (new_C_Polyhedron_from_Cloog_Matrix): Same.
416 (ppl_Constrain_System_number_of_constraints): Same.
417 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
418 (oppose_constraint): Same.
419 (cloog_matrix_to_ppl_constraint): Same.
420 (new_Constraint_System_from_Cloog_Matrix): Same.
421 (insert_constraint_into_matrix): Same. Declared static.
422 * graphite-cloog-util.h: New.
423 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
424 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
425 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
426 (new_C_Polyhedron_from_Cloog_Matrix): Same.
427 (insert_constraint_into_matrix): Same.
429 Added graphite-cloog-util.h to include statements.
430 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
431 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
432 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
433 (new_C_Polyhedron_from_Cloog_Matrix): Same.
434 (insert_constraint_into_matrix): Same.
435 (ppl_Constrain_System_number_of_constraints): Same.
436 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
437 (oppose_constraint): Same.
438 (cloog_matrix_to_ppl_constraint): Same.
439 (new_Constraint_System_from_Cloog_Matrix): Same.
441 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
442 graphite-cloog-util.h.
443 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
444 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
445 (new_C_Polyhedron_from_Cloog_Matrix): Same.
446 (insert_constraint_into_matrix): Removed.
448 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
450 * graphite-clast-to-gimple.c
451 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
452 (precision_for_interval): Same.
453 (gcc_type_for_interval): Same.
454 (compute_type_for_level): Same.
455 * graphite-interchange.c
456 (lst_interchange_profitable_p): Same.
458 (psct_scattering_dim_for_loop_depth): Same.
460 (ppl_max_for_le_pointset): Same.
461 (ppl_min_for_le_pointset): Same.
463 2010-06-25 Vladimir Kargov <kargov@gmail.com>
465 * refined-regions.c (bb_index_compare): New.
466 (get_bbs_in_region): New.
467 (print_bbs_in_region): New.
468 (print_refined_region): Add an argument that allows to print
469 all basic blocks contained in regions.
470 (debug_refined_region): Update call to print_refined_region.
471 * refined-regions.h (print_refined_region): Update declaration.
472 (get_bbs_in_region): Declared.
473 * graphite-scop-detection.c (build_scops_new): Print the refined
474 region tree into the Grahite dump file.
476 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
478 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
479 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
481 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
483 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
484 rewrite_close_phi_out_of_ssa.
486 * gcc.dg/graphite/id-22.c: New.
488 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
490 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
492 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
494 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
496 * sese.c (debug_rename_map): Same.
499 (rename_variables_in_stmt): Same.
500 (expand_scalar_variables_call): Same.
501 (expand_scalar_variables_ssa_name): Same.
502 (expand_scalar_variables_expr): Same.
503 (expand_scalar_variables_stmt): Same.
504 (expand_scalar_variables): Same.
505 (rename_variables): Same.
506 (graphite_copy_stmts_from_block): Same.
507 (copy_bb_and_scalar_dependences): Same.
509 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
511 * graphite-clast-to-gimple.c (copy_renames): Removed.
512 (translate_clast_for): Do not call copy_renames.
513 (translate_clast_guard): Same.
515 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
517 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
518 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
519 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
520 before rewrite_cross_bb_scalar_deps.
522 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
524 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
525 Early return in when flag_associative_math is not set.
527 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
529 * gcc.dg/graphite/run-id-2.c: Call abort.
531 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
533 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
534 of SSA copies on edges except for loop->latch.
536 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
538 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
539 Split out of rewrite_reductions_out_of_ssa.
540 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
542 * graphite.c (graphite_transform_loops): Call it.
544 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
546 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
548 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
550 * passes.c (init_optimization_passes): Add pass_graphite.
551 Schedule a pass_copy_prop before pass_graphite_transforms.
552 * timevar.def (TV_GRAPHITE): Declared.
553 * tree-pass.h (pass_graphite): Declared.
554 * tree-ssa-loop.c (pass_graphite): New.
556 * gcc.dg/graphite/id-20.c: New.
558 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
560 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
561 Remove calls to rename_nb_iterations and rename_sese_parameters.
562 * graphite-clast-to-gimple.h (gloog): Update declaration.
563 * graphite.c (graphite_transform_loops): Update call to gloog.
564 * sese.c (rename_variables_in_expr): Removed.
565 (rename_nb_iterations): Removed.
566 (rename_sese_parameters): Removed.
567 * sese.h (rename_nb_iterations): Removed.
568 (rename_sese_parameters): Removed.
570 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
572 * graphite-clast-to-gimple.c (gloog): Remove call to
573 sese_adjust_liveout_phis.
574 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
575 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
576 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
577 rewrite_phi_out_of_ssa.
578 * sese.c (get_vdef_before_sese): Removed.
579 (sese_adjust_vphi): Removed.
580 (sese_adjust_liveout_phis): Removed.
581 * sese.h (sese_adjust_liveout_phis): Removed.
583 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
585 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
586 argument for the place after which to insert the out of SSA copy.
587 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
588 (rewrite_phi_out_of_ssa): Same.
589 (rewrite_cross_bb_scalar_deps): Same.
590 (insert_copyout): Removed.
591 (insert_copyin): Removed.
592 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
593 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
596 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
598 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
599 (rewrite_reductions_out_of_ssa): Same.
600 (rewrite_commutative_reductions_out_of_ssa): Same.
601 (build_poly_scop): Do not call these functions.
602 * graphite-sese-to-poly.h (build_poly_scop): Declared.
603 (rewrite_reductions_out_of_ssa): Declared.
604 (rewrite_commutative_reductions_out_of_ssa): Declared.
605 * graphite.c (graphite_transform_loops): Call on every scop
606 rewrite_commutative_reductions_out_of_ssa before calling
607 rewrite_reductions_out_of_ssa and build_scop_bbs.
609 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
611 * graphite-dependences.c (dot_deps): Make system call to dotty run
613 (dot_deps_stmt): Same.
614 * graphite-poly.c (dot_lst): Same.
616 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
618 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
619 old_type in parameter.
620 (gcc_type_for_value): Update call to gcc_type_for_interval.
621 (compute_type_for_level_1): Renamed compute_type_for_level.
622 Update call to gcc_type_for_interval.
624 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
626 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
627 the scev analysis when the variable is not used outside the loop
628 in a close phi node: call compute_overall_effect_of_inner_loop.
630 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
632 * graphite-sese-to-poly.c (single_pred_cond): Renamed
633 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
634 (build_sese_conditions_before): Renamed call to single_pred_cond.
635 (build_sese_conditions_after): Same.
637 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
639 * graphite-poly.h: Fix comments and indentation.
640 * graphite-sese-to-poly.c: Same.
641 (build_sese_conditions_before): Compute stmt and gbb only when needed.
642 * tree-chrec.c: Fix comments and indentation.
643 (tree-ssa-loop-niter.c): Same.
645 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
647 * refined-regions.c (create_region): Only initialize the region.
648 (find_regions_with_entry): Initialize parent relation and bbmap
650 (build_regions_tree): Set outermost_region to region instead of
652 (calculate_region_tree): Remove unneeded parameters.
654 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
656 * graphite-scop-detection.c (is_scop_p): New.
657 (build_scops_new): New. A skeleton for the new scop detection.
658 (build_scops_old): Renamed from build_scops.
659 (build_scops): New version. Call the new and the old scop
662 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
663 Antoniu Pop <antoniu.pop@gmail.com>
665 * Makefile.in (OBJS-common): Add refined-regions.o.
666 (refined-regions.o): New.
667 (graphite-scop-detection.o): Use refined-regions.h.
668 * graphite-scop-detection.c: Include refined-regions.h
669 (build_scops): Also build the refined region tree.
670 * refined-regions.c: New. Adds an algorithm to detect refined
672 (print_refined_region): New.
673 (debug_refined_region): New.
674 (refined_region_contains_bb_p): New.
675 (refined_region_contains_region_p): New.
677 (struct find_regions_global_data): New.
679 (typedef struct bb_bb_def): New.
680 (new_bb_bb_def): New.
681 (bb_bb_map_hash): New.
685 (new_bb_reg_def): New.
686 (bb_reg_map_hash): New.
687 (eq_bb_reg_map): New.
688 (find_new_region): New.
689 (insert_new_reg): New.
690 (insert_new_bb): New.
691 (insert_shortcut): New.
692 (get_next_postdom): New.
693 (create_region): New.
694 (find_regions_with_entry): New.
695 (find_regions_adc): New.
697 (get_topmost_parent): New.
698 (build_regions_tree): New.
699 (calculate_region_tree): New.
700 (free_region_tree): New.
701 * refined-regions.h: New.
702 (struct refined_region): New.
703 (calculate_region_tree): New.
704 (free_region_tree): New.
705 (refined_region_contains_bb_p): New.
706 (refined_region_contains_region_p): New.
707 (print_refined_region): New.
708 (debug_refined_region): New.
710 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
712 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
715 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
717 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
718 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
720 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
722 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
723 phi_arg_in_outermost_loop.
724 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
725 (remove_invariant_phi): Same.
727 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
729 * graphite-blocking.c
730 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
731 * graphite-clast-to-gimple.c
732 (clast_to_gcc_expression): Same.
733 (precision_for_value): Same.
734 (precision_for_interval): Same.
735 (gcc_type_for_interval): Same.
736 (graphite_create_new_guard): Same.
737 (compute_bounds_for_level): Same.
738 (graphite_create_new_loop_guard): Same.
739 * graphite-interchange.c
740 (build_linearized_memory_access): Same.
741 (pdr_stride_in_loop): Same.
742 (memory_strides_in_loop_1): Same.
743 (memory_strides_in_loop): Same.
744 (extend_scattering): Same.
745 (psct_scattering_dim_for_loop_depth): Same.
746 (pbb_number_of_iterations): Same.
748 (debug_iteration_domains): Same.
750 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
751 (ppl_set_inhomogeneous_gmp): Same.
752 (ppl_strip_loop): Same.
753 (ppl_lexico_compare_linear_expressions): Same.
754 (ppl_read_polyhedron_matrix): Same.
755 (ppl_max_for_le_pointset): Same.
757 (ppl_read_polyhedron_matrix): Same.
758 (tree_int_to_gmp): Same.
759 (gmp_cst_to_tree): Same.
760 (ppl_set_inhomogeneous): Same.
761 (ppl_set_inhomogeneous_tree): Same.
762 (ppl_set_coef): Same.
763 (ppl_set_coef_tree): Same.
764 * graphite-sese-to-poly.c
765 (build_pbb_scattering_polyhedrons): Same.
766 (build_scop_scattering): Same.
767 (scan_tree_for_params_right_scev): Same.
768 (scan_tree_for_params): Same.
769 (find_params_in_bb): Same.
770 (find_scop_parameters): Same.
771 (add_upper_bounds_from_estimated_nit): Same.
772 (build_loop_iteration_domains): Same.
773 (add_condition_to_domain): Same.
774 (pdr_add_memory_accesses): Same.
776 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
778 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
779 CLooG's value_* macros to their respective mpz_* counterparts.
780 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
781 (graphite_create_new_loop_guard): Same.
782 * graphite-interchange.c (build_linearized_memory_access): Same.
783 (pdr_stride_in_loop): Same.
784 (memory_strides_in_loop_1): Same.
785 (1st_interchange_profitable_p): Same.
786 * graphite-poly.c (extend_scattering): Same.
787 (psct_scattering_dim_for_loop_depth): Same.
788 (pbb_number_of_iterations): Same.
789 (pbb_number_of_iterations_at_time): Same.
790 * graphite-poly.h (new_1st_loop): Same.
791 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
792 (oppose_constraint): Same.
793 (insert_constraint_into_matrix): Same.
794 (ppl_set_inhomogeneous_gmp): Same.
795 (ppl_set_coef_gmp): Same.
796 (ppl_strip_loop): Same.
797 (ppl_lexico_compare_linear_expressions): Same.
798 (ppl_max_for_le_pointset): Same.
799 (ppl_min_for_le_pointset): Same.
800 (ppl_build_realtion): Same.
801 * graphite-ppl.h (gmp_cst_to_tree): Same.
802 (ppl_set_inhomogeneous): Same.
803 (ppl_set_inhomogeneous_tree): Same.
804 (ppl_set_coef): Same.
805 (ppl_set_coef_tree): Same.
806 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
807 (build_scop_scattering): Same.
808 (add_value_to_dim): Same.
809 (scan_tree_for_params_right_scev): Same.
810 (scan_tree_for_params_int): Same.
811 (scan_tree_for_params): Same.
812 (find_params_in_bb): Same.
813 (find_scop_parameters): Same.
814 (add_upper_bounds_from_estimated_nit): Same.
815 (build_loop_iteration_domains): Same.
816 (create_linear_expr_from_tree): Same.
817 (add_condition_to_domain): Same.
818 (pdr_add_memory_accesses): Same.
820 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
823 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
824 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
825 When converting an unsigned type to signed, double its precision.
826 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
827 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
828 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
830 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
833 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
834 build_nonstandard_integer_type.
835 (gcc_type_for_interval): Same.
837 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
840 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
841 POINTER_PLUS_EXPR for pointer types.
843 * gcc.dg/graphite/id-19.c: New.
845 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
848 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
849 * graphite-clast-to-gimple.c: Include langhooks.h.
850 (max_signed_precision_type): New.
851 (max_precision_type): Takes two types as arguments.
852 (precision_for_value): New.
853 (precision_for_interval): New.
854 (gcc_type_for_interval): New.
855 (gcc_type_for_value): New.
856 (gcc_type_for_clast_term): New.
857 (gcc_type_for_clast_red): New.
858 (gcc_type_for_clast_bin): New.
859 (gcc_type_for_clast_expr): Split up into several functions.
860 (gcc_type_for_clast_eq): Rewritten.
861 (compute_bounds_for_level): New.
862 (compute_type_for_level_1): New.
863 (compute_type_for_level): New.
864 (gcc_type_for_cloog_iv): Removed.
865 (gcc_type_for_iv_of_clast_loop): Rewritten.
866 (graphite_create_new_loop): Compute the lower and upper bound types
867 with gcc_type_for_clast_expr.
868 (graphite_create_new_loop_guard): Same.
869 (find_cloog_iv_in_expr): Removed.
870 (compute_cloog_iv_types_1): Removed.
871 (compute_cloog_iv_types): Removed.
872 (gloog): Do not call compute_cloog_iv_types.
873 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
875 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
876 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
877 (GBB_CLOOG_IV_TYPES): Removed.
879 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
881 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
883 Reverted this commit: as at this point the loop closed SSA form
884 is under a canonical form respecting the single argument condition.
885 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
886 close phi nodes may have more than one argument.
888 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
890 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
891 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
892 (detect_commutative_reduction): Same.
894 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
896 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
897 close phi nodes may have more than one argument.
899 2010-03-30 Richard Guenther <rguenther@suse.de>
900 Zdenek Dvorak <ook@ucw.cz>
901 Sebastian Pop <sebastian.pop@amd.com>
904 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
905 with multiple arguments.
906 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
908 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
910 * graphite-dependences.c (print_pddr): Call print_pdr with an
912 * graphite-poly.c (debug_pdr): Add an extra argument for the
915 (print_pbb_domain): Same.
917 (print_scop_context): Same.
920 (debug_pbb_domain): Same.
924 (debug_scop_context): Same.
927 (print_scop_params): Same.
928 (debug_scop_params): Same.
929 (print_iteration_domain): Same.
930 (print_iteration_domains): Same.
931 (debug_iteration_domain): Same.
932 (debug_iteration_domains): Same.
933 (print_scattering_function): Same.
934 (print_scattering_functions): Same.
935 (debug_scattering_function): Same.
936 (debug_scattering_functions): Same.
937 * graphite-poly.h (debug_pdr): Update declaration.
939 (print_pbb_domain): Same.
941 (print_scop_context): Same.
944 (debug_pbb_domain): Same.
948 (debug_scop_context): Same.
951 (print_scop_params): Same.
952 (debug_scop_params): Same.
953 (print_iteration_domain): Same.
954 (print_iteration_domains): Same.
955 (debug_iteration_domain): Same.
956 (debug_iteration_domains): Same.
957 (print_scattering_function): Same.
958 (print_scattering_functions): Same.
959 (debug_scattering_function): Same.
960 (debug_scattering_functions): Same.
962 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
964 * graphite-poly.c (print_scattering_function_1): New.
965 (print_scattering_function): Call it.
966 (print_scop_params): Remove spaces at the end of lines.
969 * graphite-poly.h (print_cloog): Declared.
970 (debug_cloog): Declared.
972 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
974 * tree-ssa-copy.c: Revert this previous change:
975 (init_copy_prop): Loop closed phi nodes cancontain more than one
977 (execute_copy_prop): Revert the previous change: do not call
978 rewrite_into_loop_closed_ssa.
980 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
981 Richard Guenther <rguenther@suse.de>
984 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
985 contain more than one argument.
986 (execute_copy_prop): Revert the previous change: do not call
987 rewrite_into_loop_closed_ssa.
989 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
990 * gcc.dg/graphite/id-pr43464-1.c: New.
992 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
995 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
996 and verify_loop_closed_ssa when copy prop is executed in the LNO.
998 * gcc.dg/graphite/id-pr43464.c: New.
1000 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1002 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1004 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1005 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1006 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1007 to switch between adding the IV bump in loop->latch or in loop->header.
1009 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1011 * passes.c (init_optimization_passes): Add pass_copy_prop
1014 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1016 * graphite-poly.c (print_scattering_function): Pretty print following
1019 (print_pbb_domain): Same.
1020 (dump_gbb_cases): Same.
1021 (dump_gbb_conditions): Same.
1024 (print_scop_params): Same.
1025 (print_scop_context): Same.
1027 (print_pbb_body): New.
1028 (lst_indent_to): New.
1029 (print_lst): Start new lines with a #.
1030 * graphite-poly.h (pbb_bb): New.
1031 (pbb_index): Use pbb_bb.
1032 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1034 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1036 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1039 * gcc.dg/graphite/id-pr43351.c
1041 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1044 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1045 call insert_out_of_ssa_copy for default definitions.
1046 * gfortran.dg/graphite/id-pr43354.f: New.
1048 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1051 * gfortran.dg/graphite/pr43349.f: New.
1053 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1055 * graphite-clast-to-gimple.c (my_long_long): Defined.
1056 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1057 * graphite-sese-to-poly.c (my_long_long): Defined.
1058 (scop_ivs_can_be_represented): Use it.
1060 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1062 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1063 graphite-max-bbs-per-function, and loop-block-tile-size.
1064 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1066 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1068 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1070 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1071 forward declaration.
1072 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1073 (add_upper_bounds_from_estimated_nit): New.
1074 (build_loop_iteration_domains): Use it.
1076 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1078 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1080 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1083 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1084 should be an INTEGER_CST. Also handle CASE_CONVERT.
1085 * gcc.dg/graphite/pr43306.c: New.
1087 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1089 * graphite.c (graphite_initialize): To bound the number of bbs per
1090 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1091 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1092 * doc/invoke.texi: Document it.
1094 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1096 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1097 * graphite-sese-to-poly.h (build_poly_scop): Same.
1099 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1101 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1102 the number of parameters in the scop. Use as an upper bound
1103 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1104 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1105 * doc/invoke.texi: Document it.
1107 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1109 * graphite-sese-to-poly.c (add_param_constraints): Use
1110 lower_bound_in_type and upper_bound_in_type.
1112 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1114 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1115 instead of unsigned_type_node.
1117 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1118 Reza Yazdani <reza.yazdani@amd.com>
1121 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1122 on pointer type parameters.
1124 * gcc.dg/graphite/run-id-4.c: New.
1126 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1129 * gcc.dg/graphite/run-id-3.c: New.
1131 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1132 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1134 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1135 handle conversions from pointer to integers.
1136 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1137 induction variable, to be able to work with code generated by CLooG.
1138 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1139 (build_poly_scop): Bail out if we cannot codegen a loop.
1141 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1143 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1144 code generation with gloog_error.
1146 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1148 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1149 Call fold_convert on all the returned values.
1150 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1151 the type of the resulting expression.
1153 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1155 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1156 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1157 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1159 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1161 * graphite-dependences.c (map_into_dep_poly): Removed.
1162 (dependence_polyhedron_1): Use combine_context_id_scat.
1164 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1166 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1167 (struct poly_bb): Same.
1168 (combine_context_id_scat): New.
1170 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1173 * sese.c (name_defined_in_loop_p): Return false for default
1176 * gcc.dg/graphite/pr42326.c: New.
1178 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1180 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1181 and clean up the logic.
1183 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1185 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1188 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1191 * graphite-scop-detection.c (create_single_exit_edge): Move
1192 the call to find_single_exit_edge to....
1193 (create_sese_edges): ...here. Don't handle multiple edges
1194 exiting the function.
1195 (build_graphite_scops): Don't handle multiple edges
1196 exiting the function.
1198 * gcc.dg/graphite/pr43083.c: New.
1200 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1203 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1204 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1206 * gfortran.dg/graphite/pr43097.f: New.
1208 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1209 Manuel López-Ibáñez <manu@gcc.gnu.org>
1212 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1214 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1217 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1219 * g++.dg/graphite/pr43026.C: New.
1221 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1223 * Merge from mainline (154736:156693).
1225 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1228 * gcc.dg/graphite/pr43012.c: New.
1230 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1232 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1233 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1235 * g++.dg/graphite/pr42930.C: New.
1237 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1240 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1241 graphite_can_represent_init for MULT_EXPR.
1243 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1247 * graphite-sese-to-poly.c (remove_phi): New.
1248 (translate_scalar_reduction_to_array): Call remove_phi.
1250 * gcc.dg/graphite/pr42530.c: New.
1251 * gcc.dg/graphite/pr42914.c: New.
1253 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1256 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1257 * graphite-clast-to-gimple.h (gloog): Update declaration.
1258 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1259 * graphite-poly.h (struct poly_bb): Add missing comments.
1260 (struct scop): Add poly_scop_p field.
1262 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1263 * graphite.c (graphite_transform_loops): Build the polyhedral
1264 representation for each scop before code generation.
1265 * sese.c (rename_variables_in_operand): Removed.
1266 (rename_variables_in_expr): Return the renamed expression.
1267 (rename_sese_parameters): New.
1268 * sese.h (rename_sese_parameters): Declared.
1270 * gcc.dg/graphite/pr42771.c: New.
1272 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1274 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1276 * gcc.dg/graphite/block-1.c: Same.
1277 * gcc.dg/graphite/block-3.c: Same.
1278 * gcc.dg/graphite/block-4.c: Same.
1279 * gcc.dg/graphite/block-5.c: Same.
1280 * gcc.dg/graphite/block-6.c: Same.
1281 * gcc.dg/graphite/block-7.c: Same.
1282 * gcc.dg/graphite/interchange-0.c: Same.
1283 * gcc.dg/graphite/interchange-1.c: Same.
1284 * gcc.dg/graphite/interchange-10.c: Same.
1285 * gcc.dg/graphite/interchange-11.c: Same.
1286 * gcc.dg/graphite/interchange-12.c: Same.
1287 * gcc.dg/graphite/interchange-2.c: Same.
1288 * gcc.dg/graphite/interchange-3.c: Same.
1289 * gcc.dg/graphite/interchange-4.c: Same.
1290 * gcc.dg/graphite/interchange-5.c: Same.
1291 * gcc.dg/graphite/interchange-6.c: Same.
1292 * gcc.dg/graphite/interchange-7.c: Same.
1293 * gcc.dg/graphite/interchange-8.c: Same.
1294 * gcc.dg/graphite/interchange-9.c: Same.
1295 * gcc.dg/graphite/interchange-mvt.c: Same.
1297 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1299 * gfortran.dg/graphite/id-19.f: New.
1300 * gfortran.dg/graphite/pr14741.f90: New.
1301 * gfortran.dg/graphite/pr41924.f90: New.
1302 * gfortran.dg/graphite/run-id-2.f90: New.
1304 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1307 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1308 to unknown_dependence.
1309 (graphite_legal_transform_dr): Handle the unknown_dependence.
1310 (graphite_carried_dependence_level_k): Same.
1312 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1314 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1316 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1317 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1320 * graphite-dependences.c (build_lexicographical_constraint): Return
1321 a union of dependence polyhedra.
1322 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1324 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1325 * gcc.dg/graphite/block-4.c: Same.
1326 * gcc.dg/graphite/block-7.c: Same.
1327 * gcc.dg/graphite/interchange-12.c: Same.
1328 * gcc.dg/graphite/interchange-mvt.c: Same.
1329 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1330 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1331 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1333 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1335 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1336 the execution check to FAIL. This testcase is miscompiled by Graphite
1337 and the check should be re-enabled.
1338 * gcc.dg/graphite/interchange-mvt.c: Same.
1339 * gcc.dg/graphite/block-0.c: Same.
1340 * gcc.dg/graphite/block-4.c: Same.
1341 * gcc.dg/graphite/block-7.c: Same.
1343 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1345 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1346 * gcc.dg/graphite/scop-0.c: Fix spaces.
1347 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1348 * gfortran.dg/graphite/block-2.f: Same.
1349 * gfortran.dg/graphite/block-3.f90: Same.
1350 * gfortran.dg/graphite/block-4.f90: Same.
1351 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1352 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1354 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1356 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1357 PDDR_ORIGINAL_SCATTERING_P.
1358 (pddr_is_empty): Rewritten.
1359 (print_dependence_polyhedron_layout): New.
1362 (build_alias_set_powerset): Moved up.
1363 (poly_drs_may_alias_p): Moved up.
1364 (lexicographically_gt_p): Removed.
1365 (build_lexicographically_gt_constraint): Renamed
1366 build_lexicographical_constraint, reimplemented.
1367 (dependence_polyhedron_1): Simplified parameters.
1368 (dependence_polyhedron): Same. Keep along empty PDDRs
1369 to make efficient use of the cache.
1370 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1371 (graphite_legal_transform_dr): Rewritten.
1372 (graphite_legal_transform_bb): Pass fewer arguments to
1373 graphite_legal_transform_dr.
1374 (graphite_carried_dependence_level_k): Simplified implementation.
1375 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1376 (dot_transformed_deps_stmt_1): Same.
1377 (dot_original_deps): Same.
1378 (dot_transformed_deps): Same.
1379 * graphite-dependences.h (struct poly_ddr): Added a new field
1380 original_scattering_p.
1381 (PDDR_ORIGINAL_SCATTERING_P): New.
1382 (print_pddr): Declared.
1383 (debug_pddr): Declared.
1384 * graphite-ppl.c: Clarify comment.
1385 * sese.h (print_gimple_bb): Removed unused declaration.
1388 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1390 * g++.dg/graphite/graphite.exp: Rewritten.
1391 * gcc.dg/graphite/graphite.exp: Rewritten.
1392 * gfortran.dg/graphite/graphite.exp: Rewritten.
1393 * gcc.dg/graphite/block-0.c: Added runtime test.
1394 * gcc.dg/graphite/block-1.c: Same.
1395 * gcc.dg/graphite/block-3.c: Same.
1396 * gcc.dg/graphite/block-4.c: Same.
1397 * gcc.dg/graphite/block-5.c: Same.
1398 * gcc.dg/graphite/block-6.c: Same.
1399 * gcc.dg/graphite/block-7.c: Same.
1400 * gcc.dg/graphite/interchange-0.c: Same.
1401 * gcc.dg/graphite/interchange-1.c: Same.
1402 * gcc.dg/graphite/interchange-10.c: Same.
1403 * gcc.dg/graphite/interchange-11.c: Same.
1404 * gcc.dg/graphite/interchange-12.c: Same.
1405 * gcc.dg/graphite/interchange-2.c: Same.
1406 * gcc.dg/graphite/interchange-3.c: Same.
1407 * gcc.dg/graphite/interchange-4.c: Same.
1408 * gcc.dg/graphite/interchange-5.c: Same.
1409 * gcc.dg/graphite/interchange-6.c: Same.
1410 * gcc.dg/graphite/interchange-7.c: Same.
1411 * gcc.dg/graphite/interchange-8.c: Same.
1412 * gcc.dg/graphite/interchange-9.c: Same.
1413 * gcc.dg/graphite/interchange-mvt.c: Same.
1414 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1416 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1418 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1421 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1423 * common.opt: Add -fgraphite-cloog-opts.
1424 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1425 * opts.c (decode_options): Same.
1427 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1429 * gcc.dg/graphite/id-17.c: New.
1430 * gcc.dg/graphite/pr41888.c: New.
1431 * gcc.dg/graphite/scop-22.c: New.
1432 * gfortran.dg/graphite/pr40982.f90: New.
1434 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1436 * graphite-dependences.c: Clarify comments.
1437 (build_pddr): Add an extra parameter direction.
1438 (graphite_legal_transform_dr): Use build_pddr.
1439 (dot_original_deps_stmt_1): Update use of build_pddr.
1440 (dot_transformed_deps_stmt_1): Same.
1441 (dot_original_deps): Same.
1442 (dot_transformed_deps): Same.
1444 * gcc.dg/graphite/interchange-12.c: New.
1445 * gcc.dg/graphite/block-7.c: New.
1447 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1449 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1450 (pddr_transformed_scattering): Removed.
1451 (graphite_legal_transform_dr): Use build_pddr.
1452 (dot_original_deps_stmt_1): Same.
1453 (dot_transformed_deps_stmt_1): Same.
1454 (dot_original_deps): Same.
1455 (dot_transformed_deps): Same.
1457 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1459 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1460 (build_lexicographically_gt_constraint): Same.
1461 (dependence_polyhedron_1): Same.
1462 (dependence_polyhedron): Same.
1464 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1466 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1467 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1468 (lexicographically_gt_p): Change type of direction to int.
1469 (build_lexicographically_gt_constraint): Same.
1470 (dependence_polyhedron_1): Same.
1471 (dependence_polyhedron): Same.
1472 (pddr_original_scattering): Use integers for direction.
1473 (pddr_transformed_scattering): Same.
1474 (graphite_legal_transform_dr): Same.
1475 (graphite_carried_dependence_level_k): Same.
1477 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1479 * graphite-dependences.c (build_pairwise_constraint): Renamed
1480 ppl_build_relation. Moved...
1481 (dr_equality_constraints): Use ppl_build_relation.
1482 (build_pairwise_scheduling_equality): Same.
1483 (build_pairwise_scheduling_inequality): Same.
1484 * graphite-ppl.c (ppl_build_relation): ...here.
1485 * graphite-ppl.h (ppl_build_relation): Declared.
1487 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1490 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1491 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1492 Set gloog_error when such an expression failed to be built.
1493 (translate_clast): Early return when gloog_error is set.
1494 (gloog): Clear gloog_error. When gloog_error is set, call
1495 set_ifsese_condition to enable the original code. Return the status
1496 of the code generation based on gloog_error.
1497 * sese.c (set_ifsese_condition): New.
1498 * sese.h (set_ifsese_condition): Declared.
1500 * g++.dg/graphite/pr42681.C: New.
1502 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1505 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1506 rename_nb_iterations.
1507 * sese.c (rename_variables_in_operand): New.
1508 (rename_variables_in_expr): New.
1509 (rename_nb_iterations): New.
1510 (sese_adjust_liveout_phis): Update the rename_map.
1511 * sese.h (rename_nb_iterations): Declared.
1512 * tree-scalar-evolution.c (scev_reset_htab): New.
1513 (scev_reset): Call scev_reset_htab.
1514 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1516 * gfortran.dg/graphite/pr42732.f: New.
1518 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1521 * graphite-clast-to-gimple.c: Fix formatting.
1522 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1523 (expr_defined_in_loop_p): New.
1524 (add_loop_exit_phis): Also handle full expressions: remove from
1525 the rename_map the expressions defined in the loop that we're closing.
1527 * gfortran.dg/graphite/pr42393-1.f90: New.
1528 * gfortran.dg/graphite/pr42393.f90: Add new flags
1529 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1530 make this testcase useful in the Graphite branch.
1532 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1534 * graphite-scop-detection.c (exclude_component_ref): Removed.
1535 (is_simple_operand): Removed.
1536 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1538 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1541 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1542 the array indexing of ADDR_EXPRs.
1544 * gcc.dg/graphite/pr42221.c: New.
1546 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1549 * graphite.c (graphite_finalize): Call scev_reset.
1550 (graphite_transform_loops): Do not call scev_reset between the code
1551 generation of scops.
1553 * gcc.dg/graphite/pr42521.c: New.
1555 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1557 * graphite-interchange.c (memory_stride_in_loop): Renamed
1559 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1560 (memory_strides_in_loop): Memoize the memory strides per loop.
1561 (lst_interchange_profitable_p): Do not initialize to zero the memory
1563 * graphite-poly.h (struct lst): Add a field memory_strides.
1564 (LST_LOOP_MEMORY_STRIDES): New.
1565 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1566 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1568 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1570 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1571 memory_strides_in_loop. Gather memory strides on a whole loop.
1572 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1573 (lst_interchange_profitable_p): Removed.
1574 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1576 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1578 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1579 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1580 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1581 Remove context_loop and level.
1583 2010-01-07 Richard Guenther <rguenther@suse.de>
1585 PR tree-optimization/42641
1586 * sese.c (rename_map_elt_info): Use the SSA name version, do
1589 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1591 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1592 blocked" only when both the strip mine and the interchange have
1595 * gcc.dg/graphite/block-2.c: Removed.
1596 * gcc.dg/graphite/block-3.c: Add scan pattern.
1597 * gcc.dg/graphite/block-4.c: Same.
1598 * gcc.dg/graphite/block-5.c: Same.
1599 * gcc.dg/graphite/block-6.c: Same.
1601 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1603 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1604 before allocating a new one.
1605 (copy_renames): Check that slot is not NULL.
1606 (mark_bb_with_pbb): Same.
1607 (compute_cloog_iv_types_1): Same.
1608 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1609 nest, and after LSTs.
1610 (lst_try_interchange_loops): Same.
1612 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1615 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1616 the before, nest, and after LSTs.
1617 (lst_try_interchange): Removed.
1618 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1620 (lst_interchange_select_outer): Apply interchange on the outer loop
1621 until there are no more changes in the inner loops.
1623 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1625 Revert patch fixing PR middle-end/42221.
1627 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1630 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1633 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1635 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1638 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1639 that contain only one statement.
1641 * gfortran.dg/graphite/pr42180.f90: New.
1643 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1646 * gfortran.dg/graphite/pr42393.f90: New.
1648 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1651 * gfortran.dg/graphite/pr42186.f90: New.
1653 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1656 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1657 Insert the reduction copy in the same block as the phi node.
1658 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1660 * gcc.dg/graphite/pr42205-1.c: New.
1661 * gcc.dg/graphite/pr42205-2.c: New.
1663 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1666 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1667 the array indexing of ADDR_EXPRs.
1669 * gcc.dg/graphite/pr42221.c: New.
1671 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1675 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1676 index. Call lst_interchange_select_inner only once.
1677 (lst_interchange_select_inner): Update use of lst_try_interchange.
1678 (lst_interchange_select_outer): Update.
1680 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1684 * graphite-interchange.c (lst_try_interchange): Do not increment the
1685 the OUTER index when there is no AFTER kernel. Do not increment the
1686 OUTER index for after processing the AFTER kernel.
1687 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1688 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1689 index. Do not pass to lst_interchange_select_inner the OUTER index.
1690 (scop_do_interchange): Update use of lst_interchange_select_outer.
1692 * gfortran.dg/graphite/graphite.exp
1693 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1694 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1695 the graphite dump file.
1696 * gfortran.dg/graphite/interchange-2.f: Same.
1697 * gfortran.dg/graphite/pr42334-1.f: New.
1699 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1703 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1705 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1706 (lst_try_interchange): Reimplemented.
1707 (lst_interchange_select_inner): Same.
1708 (lst_do_interchange): Renamed lst_interchange_select_outer.
1710 (scop_do_interchange): Update use of lst_interchange_select_outer.
1712 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1713 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1714 * gcc.dg/graphite/pr42211.c: New.
1715 * gfortran.dg/graphite/pr42334.f90: New.
1717 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1720 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1721 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1723 * gfortran.dg/graphite/pr42181.f90: New.
1725 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1728 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1729 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1730 (detect_commutative_reduction_arg): Simplified.
1731 (detect_commutative_reduction): Early return when the argument of
1732 the close phi is not of an SSA_NAME.
1734 * gcc.dg/graphite/pr42284.c: New.
1736 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1738 * dbgcnt.def (graphite_scop): New counter.
1739 * graphite.c: Include dbgcnt.h
1740 (graphite_transform_loops): Use new counter to limit transformations.
1742 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1745 * graphite-scop-detection.c (graphite_can_represent_init): Also
1746 handle more complex MULT_EXPRs containing parameters by recursion
1749 * gfortran.dg/graphite/pr42285.f90: New.
1751 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1753 * g++.dg/graphite/pr42130.C: Fix type.
1755 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1757 * g++.dg/graphite/pr42130.C: Correct testcase.
1759 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1761 * Merge from mainline (154493:154734).
1763 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1765 * Merge from mainline (151362:154491).
1767 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1769 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1770 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1772 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1775 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1776 translate_clast_for_loop): New.
1777 (translate_clast_for): Add a condition around the loop, to do not
1778 execute loops with zero iterations.
1779 * g++.dg/graphite/pr42130.C: New.
1780 * gcc.dg/graphite/pr35356-2.c: Adapt.
1782 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1784 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1785 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1786 Remove context_loop and level.
1788 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1790 * graphite-clast-to-gimple.c (translate_clast_user,
1791 translate_clast_for, translate_clast_guard): Simplify and move common
1792 elements to translate_clast().
1793 (translate_clast): Simplify and get common elements.
1795 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1797 * graphite-clast-to-gimple.c (translate_clast_user,
1798 translate_clast_for, translate_clast_guard): Split out of
1801 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1803 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1804 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1805 debug_clast_name_indexes_1, debug_clast_name_indexes,
1806 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1807 (clast_name_to_gcc, clast_to_gcc_expression,
1808 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1809 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1810 graphite_create_guard_cond_expr, graphite_create_new_loop,
1811 translate_clast): Add params_index.
1812 (initialize_cloog_names): Create parameter strings from scratch, do
1813 not reference other strings.
1814 (create_params_index): New.
1815 (gloog): Initialize params_index.
1816 * graphite-scop-detection (free_scops_1): Removed.
1817 (limit_scops): Use normal free_scops.
1818 * graphite-sese-to-poly.c (save_var_names): Removed.
1819 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1820 and SESE_PARAMS_INDEX.
1821 * sese.c (new_sese, free_sese): Dito.
1822 * sese.h (struct sese): Remove params_index, params_names.
1823 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1825 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1827 Revert the following patch from 2009-09-14:
1828 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1829 tree-scalar-evolution.h, and then tree-data-ref.h.
1830 * graphite-clast-to-gimple.c: Same.
1831 * graphite-dependences.c: Same.
1832 * graphite-interchange.c: Same.
1833 * graphite-poly.c: Same.
1834 * graphite-scop-detection.c: Same.
1835 * graphite-sese-to-poly.c: Same.
1837 * lambda-code.c: Same.
1838 * matrix-reorg.c: Same.
1839 * tree-data-ref.c: Same.
1840 * tree-if-conv.c: Same.
1841 * tree-loop-distribu: Same.: Same.
1842 * tree-loop-linear.c: Same.
1843 * tree-parloops.c: Same.
1844 * tree-predcom.c: Same.
1845 * tree-vect-patterns.c: Same.
1847 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1849 Revert patch from 2009-09-14.
1850 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1851 passes at -O1 and below.
1853 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1856 * gcc.dg/graphite/pr40281.c: New.
1858 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1859 evolutions should not variate in inner loops.
1861 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1864 * gfortran.dg/graphite/pr42050.f90: New.
1866 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1868 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1869 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1871 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1873 * graphite-blocking.c (scop_do_block): New.
1874 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1875 * graphite-poly.h (scop_do_block): Declared.
1877 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1879 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1880 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1881 to transform depth into the time_depth before calling
1882 pbb_number_of_iterations_at_time.
1883 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1886 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1888 Reverted the patch for "scattering permutations" from 2009-10-28.
1890 * graphite-poly.c (print_permutation): New.
1891 (debug_permutation): New.
1892 (new_poly_bb): Initialize PBB_PERMUTATION.
1893 (free_poly_bb): Free PBB_PERMUTATION.
1894 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1895 (struct pbb_permutation_elt): New.
1896 (PBB_PERMUTATION_ELT_STRIDE): New.
1897 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1898 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1899 (new_pbb_permutation_elt): New.
1900 (pbb_permutation_elt_free): New.
1901 (struct poly_bb): Add field permutation.
1902 (PBB_PERMUTATION): New.
1903 (print_permutation): Declared.
1904 (debug_permutation): Declared.
1906 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1908 * graphite-interchange.c (build_partial_difference): New.
1909 (memory_stride_in_loop): Refactored the computation of
1910 equality constraints into build_partial_difference function.
1911 Added support for debugging stride computations.
1913 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1915 * graphite-clast-to-gimple.c (gloog): Free if_region,
1916 if_region->true_region, and if_region->region.
1917 * sese.c (if_region_set_false_region): Free if_region->false_region.
1918 (create_if_region_on_edge): Do not use GGC_NEW.
1919 (move_sese_in_condition): Remove useless initialization.
1921 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1923 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1924 for the loops created by the loop distribution. Do not modify the
1926 (lst_try_interchange_loops): Same. Use a temporary LST for the
1927 transformed schedule. Call lst_update_scattering before data
1928 dependence analysis.
1929 (lst_try_interchange): Pass an extra parameter INDEX.
1930 (lst_do_interchange_1): New.
1931 (lst_do_interchange): Call lst_do_interchange_1.
1932 (scop_do_interchange): Call lst_update_scattering.
1933 * graphite-poly.c (apply_poly_transforms): Do not call
1934 lst_update_scattering.
1935 * graphite-poly.h (lst_pred): New.
1937 (lst_find_first_pbb): Return NULL when not found.
1939 (lst_insert_in_sequence): Allow LST1 to be NULL.
1941 (lst_substitute_3): New.
1942 * gcc.dg/graphite/interchange-1.c: XFail.
1943 * gcc.dg/graphite/interchange-8.c: XFail.
1944 * gcc.dg/graphite/interchange-11.c: XFail.
1946 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1948 * graphite-interchange.c (lst_perfectly_nested_p): New.
1949 (lst_perfect_nestify): New.
1950 (lst_try_interchange_loops): Call store_lst_schedule,
1951 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1952 (scop_do_interchange): Avoid redundant legality test.
1953 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1954 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1955 * graphite-poly.h (psct_static_dim): New.
1956 (lst_dewey_number_at_depth): New.
1957 (lst_find_pbb): Restructured.
1958 (lst_find_first_pbb): Restructured.
1959 (lst_find_last_pbb): New.
1960 (lst_contains_p): New.
1961 (lst_contains_pbb): New.
1962 (lst_create_nest): New.
1963 (lst_remove_from_sequence): New.
1964 (pbb_update_scattering): New.
1965 (lst_update_scattering_under): New.
1966 (lst_update_scattering_seq): New.
1967 (lst_update_scattering): New.
1968 (lst_insert_in_sequence): New.
1969 (lst_distribute_lst): New.
1970 (lst_remove_all_before_including_pbb): New.
1971 (lst_remove_all_before_excluding_pbb): New.
1973 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1975 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1976 get_loop_exit_edges.
1978 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1980 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1982 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1984 * graphite-poly.c (print_permutation): New.
1985 (debug_permutation): New.
1986 (new_poly_bb): Initialize PBB_PERMUTATION.
1987 (free_poly_bb): Free PBB_PERMUTATION.
1988 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1989 (struct pbb_permutation_elt): New.
1990 (PBB_PERMUTATION_ELT_STRIDE): New.
1991 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1992 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1993 (new_pbb_permutation_elt): New.
1994 (pbb_permutation_elt_free): New.
1995 (struct poly_bb): Add field permutation.
1996 (PBB_PERMUTATION): New.
1997 (print_permutation): Declared.
1998 (debug_permutation): Declared.
2000 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2002 * graphite-clast-to-gimple.c (gloog): Do not call
2003 sese_reset_aux_in_loops.
2004 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2005 extra argument for domains. Do not use loop->aux.
2006 (build_scop_iteration_domain): Initialize and free domains, pass it
2007 to build_loop_iteration_domains and extract the information from
2008 domains. Do not use loop->aux.
2009 * sese.c (sese_reset_aux_in_loops): Removed.
2010 * sese.h (sese_reset_aux_in_loops): Removed.
2012 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2014 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2015 (dependency_in_loop_p): Same.
2016 (translate_clast): Do not use loop->aux. Initialize
2017 loop->can_be_parallel.
2018 (mark_loops_parallel): Removed.
2019 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2020 * graphite.c (free_aux_in_new_loops): Removed.
2021 (graphite_finalize): Do not call free_aux_in_new_loops.
2022 (graphite_transform_loops): Do not call mark_loops_parallel.
2024 2009-10-26 Li Feng <nemokingdom@gmail.com>
2026 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2027 (translate_clast): Pass an extra parameter LEVEL.
2028 Call get_scattering_level.
2029 * graphite-clast-to-gimple.h (get_scattering_level): New.
2031 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2033 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2034 * cfgloop.h (struct loop): New field single_iv.
2036 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2037 loop->aux anymore: use loop->single_iv.
2038 (graphite_loop_normal_form): Moved...
2039 (build_graphite_loop_normal_form): Removed.
2040 (gloog): Do not call build_graphite_loop_normal_form.
2041 (free_aux_in_new_loops): Moved...
2042 (mark_loops_parallel): Restructure.
2043 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2044 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2045 (scop_canonicalize_loops): New.
2046 (build_poly_scop): Call scop_canonicalize_loops.
2047 * graphite.c (free_aux_in_new_loops): ...here.
2049 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2051 * g++.dg/graphite/graphite.exp: Add the same rules as in
2052 gcc.dg/graphite/graphite.exp.
2054 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2056 * g++.dg/graphite/id-1.C: New.
2058 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2060 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2062 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2063 (rewrite_phi_out_of_ssa): Same.
2064 (rewrite_cross_bb_scalar_deps): Same.
2065 (translate_scalar_reduction_to_array): Same.
2067 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2069 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2072 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2074 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2075 (build_scop_drs): Call dump_alias_graphs.
2077 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2079 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2080 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2081 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2082 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2083 * graphite-poly.h (free_lst): New.
2084 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2085 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2087 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2089 * graphite-poly.h (struct scop): Add a field saved_schedule.
2090 (SCOP_SAVED_SCHEDULE): New.
2091 (store_lst_schedule): New.
2092 (restore_lst_schedule): New.
2093 (store_scattering): Call store_lst_schedule.
2094 (restore_scattering): Call restore_lst_schedule.
2096 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2098 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2099 (pdr_add_alias_set): Same.
2100 (build_poly_dr): Same.
2101 (build_alias_set_optimal_p): Same.
2102 (build_base_obj_set_for_drs): Same. Do not store the result of
2105 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2107 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2108 all_components_are_cliques to 1.
2110 2009-10-20 Li Feng <nemokingdom@gmail.com>
2112 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2114 (pdr_add_alias_set): Update retrieving alias_set_num.
2115 (build_poly_dr): Update retrieving dr_base_object_set.
2116 (partition_drs_to_sets): Remove.
2117 (build_alias_set_optimal_p): New.
2118 (build_alias_set_for_drs): Rename.
2119 (build_scop_drs): Update.
2120 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2121 (ALIAS_SET_INDEX): Remove.
2122 (BASE_OBJECT_SET_INDEX): Remove.
2124 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2126 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2128 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2130 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2131 loop upper bounds for 1-element arrays at end of structures.
2132 * tree-flow.h (array_at_struct_end_p): Declared.
2133 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2135 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2137 * g++.dg/graphite/pr41305.C: New.
2139 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2141 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2142 construction of parameter constraints from loop iteration analysis.
2143 * gcc.dg/graphite/run-id-2.c: New test.
2145 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2147 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2150 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2152 * graphite-dependences.c (dependence_polyhedron_1): Remove
2153 unused gdim dimensions from the DDR polyhedron.
2155 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2157 * graphite-dependences.c (pddr_transformed_scattering): New.
2158 (dot_original_deps_stmt_1): New.
2159 (dot_transformed_deps_stmt_1): New.
2160 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2161 dot_transformed_deps_stmt_1.
2162 (dot_original_deps): New.
2163 (dot_transformed_deps): New.
2164 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2166 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2168 * graphite-dependences.c (reduction_dr_1): Remove wrong
2169 assert: reduction BBs can have multiple reduction writes
2170 to memory. interchange-3.f90 is an example.
2172 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2174 * gfortran.dg/graphite/interchange-3.f90: New.
2176 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2178 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2180 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2182 * graphite-dependences.c (dependence_polyhedron_1): Add the
2183 context to the dependence polyhedron.
2185 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2187 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2188 PBB_PDR_DUPLICATES_REMOVED.
2189 (new_poly_bb): Same.
2191 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2193 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2195 (build_loop_iteration_domains): Extract bounds on parameters
2196 based on the data size.
2197 (build_scop_context): Do not initialize SCOP_CONTEXT;
2198 add new constraints.
2200 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2202 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2203 * graphite-ppl.h (graphite-ppl.h): Declared.
2205 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2207 * graphite-ppl.c (ppl_print_linear_expr): New.
2208 (debug_ppl_linear_expr): New.
2209 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2210 (debug_ppl_linear_expr): Declared.
2212 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2214 * graphite-interchange.c: Fix comments.
2215 * gcc.dg/graphite/block-1.c: Fix comments.
2217 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2219 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2220 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2222 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2224 Reapply the patch from Alexander Monakov that disappeared during
2225 the last merges from trunk.
2227 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2229 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2230 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2232 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2234 * graphite-interchange.c (memory_stride_in_loop): The depth
2235 argument corresponds to a dynamic time dimension, so use
2236 psct_dynamic_dim to refer to the transformed scattering dimension.
2238 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2240 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2242 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2244 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2246 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2247 the root of the LST.
2248 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2250 (print_lst): Print the root of LST in a different format.
2251 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2253 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2255 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2257 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2259 * doc/passes.texi: Document the Graphite infrastructure.
2261 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2263 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2264 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2265 and check the SSA representation.
2267 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2269 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2271 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2273 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2275 * gcc.dg/graphite/interchange-11.c: New.
2277 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2279 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2281 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2283 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2284 Add -fno-loop-strip-mine and -fno-loop-interchange.
2285 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2286 -fno-loop-strip-mine.
2287 * gfortran.dg/graphite/graphite.exp: Same.
2289 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2291 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2292 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2293 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2294 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2295 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2296 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2297 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2298 DEFAULT_FLAGS_GRAPHITE_SCOP.
2299 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2300 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2302 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2304 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2306 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2307 Sebastian Pop <sebastian.pop@amd.com>
2309 * graphite-interchange.c (build_linearized_memory_access): Pass an
2310 offset as parameter.
2311 (memory_stride_in_loop): Include transform scattering in the
2312 access functions to be able to querry the strides in the
2314 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2315 not the psct_iterator_dim.
2317 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2319 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2320 (lst_do_strip_mine_loop): New.
2321 (lst_do_strip_mine): New.
2322 (scop_do_strip_mine): Call lst_do_strip_mine.
2323 * graphite-poly.h (lst_add_loop_under_loop): New.
2324 (lst_find_first_pbb): New.
2326 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2328 * graphite-poly.c (loop_to_lst): Fix LST creation.
2330 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2332 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2333 sizeof(unsigned long) to make it run on 32bit systems.
2335 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2337 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2340 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2342 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2344 (write_alias_graph_to_ascii_dot): New.
2345 (write_alias_graph_to_ascii_ecc): Ditto.
2346 (partition_drs_to_sets): Add testing of optimality of current method
2347 which assigns alias numbers according to DFS Comopnent number. used
2348 as heuristic for the upcoming ECC algorithm.
2349 (build_scop_drs): Write to file also with the ecc and dot format.
2351 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2353 * gfortran.dg/graphite/interchange-1.f: XFail.
2355 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2357 * graphite.c (graphite_initialize): Do not handle functions with
2358 more than 100 basic blocks.
2360 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2362 * graphite-blocking.c (pbb_do_strip_mine): Use
2363 PARAM_LOOP_BLOCK_TILE_SIZE.
2365 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2367 * graphite-poly.c (dot_lst_1): New.
2369 * graphite-poly.h (dot_lst): Declared.
2371 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2373 * graphite-dependences.c (dot_deps_stmt_1): New.
2374 (dot_deps_stmt): New.
2375 * graphite-dependences.h (dot_deps_stmt): Declared.
2377 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2379 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2380 not replace cross BB scalar dependences ending on PHI nodes.
2381 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2383 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2385 * graphite-poly.c (apply_poly_transforms): Implement the high
2386 level driver for flag_loop_block.
2387 * opts.c (decode_options): Enable flag_loop_block at -O2.
2388 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2391 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2393 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2396 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2398 * graphite-poly.h (lst_find_pbb): New.
2399 (find_lst_loop): New.
2401 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2403 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2404 * graphite-poly.h (struct scop): Remove dep_graph field.
2405 (SCOP_DEP_GRAPH): Removed.
2407 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2409 * graphite-poly.h (copy_lst): Do full copy of LST.
2411 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2413 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2414 when the loop stride is zero.
2416 * gcc.dg/graphite/id-16.c: New.
2418 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2420 * graphite-dependences.c (reduction_dr_1): New.
2421 (reduction_dr_p): New.
2422 (graphite_legal_transform_dr): Call reduction_dr_p.
2423 (reduction_ddr): Renamed reduction_ddr_p.
2424 * graphite-poly.h (same_pdr_p): New.
2425 (number_of_write_pdrs): New.
2426 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2427 (split_reduction_stmt): Do not split reduction statements
2428 when there are no writes to memory.
2429 (translate_scalar_reduction_to_array_for_stmt): Insert the
2430 memory reduction statement just after the scalar reduction statement.
2432 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2434 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2435 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2437 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2439 * graphite-interchange.c (lst_apply_interchange): New.
2440 (lst_interchange_profitable_p): New.
2441 (lst_try_interchange_loops): New.
2442 (lst_try_interchange): New.
2443 (lst_do_interchange): New.
2444 (pbb_do_interchange): Removed.
2445 (scop_do_interchange): Call lst_do_interchange.
2447 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2449 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2450 SCOP_TRANSFORMED_SCHEDULE.
2455 * graphite-poly.h (lst_p): New.
2458 (LST_LOOP_FATHER): New.
2461 (scop_to_lst): Declared.
2462 (print_lst): Declared.
2463 (debug_lst): Declared.
2464 (new_lst_loop): New.
2465 (new_lst_stmt): New.
2468 (lst_dewey_number): New.
2469 (struct scop): Add original_schedule and transformed_schedule fields.
2470 (SCOP_ORIGINAL_SCHEDULE): New.
2471 (SCOP_TRANSFORMED_SCHEDULE): New.
2472 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2474 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2476 * graphite-dependences.c (reduction_ddr): New.
2477 (graphite_legal_transform_bb): Call reduction_ddr.
2478 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2479 Initialize PBB_IS_REDUCTION.
2480 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2481 (PBB_IS_REDUCTION): New.
2482 (new_poly_bb): Update declaration.
2483 * graphite-scop-detection.h (build_scop_bbs): Removed.
2484 (nb_reductions_in_loop): Removed.
2485 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2486 parameter for reductions.
2487 (try_generate_gimple_bb): Update call to new_poly_bb.
2488 (build_scop_bbs_1): Same.
2489 (build_scop_bbs): Same.
2490 (gsi_for_phi_node): New.
2491 (scalar_close_phi_node_p): Remove gcc_assert.
2492 (split_reduction_stmt): New.
2493 (is_reduction_operation_p): New.
2494 (phi_contains_arg): New.
2495 (follow_ssa_with_commutative_ops): New.
2496 (detect_commutative_reduction_arg): New.
2497 (detect_commutative_reduction_assign): New.
2498 (follow_inital_value_to_phi): New.
2499 (edge_initial_value_for_loop_phi): New.
2500 (initial_value_for_loop_phi): New.
2501 (detect_commutative_reduction): New.
2502 (translate_scalar_reduction_to_array_for_stmt): New.
2503 (insert_copyout): New.
2504 (insert_copyin): New.
2505 (translate_scalar_reduction_to_array): New.
2506 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2507 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2508 (rewrite_commutative_reductions_out_of_ssa): New.
2509 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2510 * sese.h (split_region_for_bb): New.
2512 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2513 * gcc.dg/graphite/interchange-1.c: Fix format.
2514 * gcc.dg/graphite/interchange-10.c: New.
2516 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2518 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2521 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2523 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2524 (rewrite_cross_bb_scalar_dependence): New.
2525 (rewrite_cross_bb_scalar_deps): New.
2526 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2527 Call rewrite_cross_bb_scalar_deps.
2529 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2531 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2532 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2535 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2537 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2538 * graphite-interchange.c (pbb_do_interchange): Same.
2539 * graphite-poly.c (print_scattering_function): Same.
2541 * graphite-poly.h (pbb_loop): New.
2542 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2544 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2546 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2548 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2550 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2551 so don't pass a pointer to it.
2552 (build_alias_set_for_drs): Same.
2553 (build_base_obj_set_for_drs): Same.
2554 (build_scop_drs): Same.
2556 2009-09-26 Li Feng <nemokingdom@gmail.com>
2558 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2559 the alias graph of data references.
2561 2009-09-25 Li Feng <nemokingdom@gmail.com>
2563 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2564 (build_scop_drs): When debugging, write the alias graph to file,
2565 otherwise, should be disabled.
2567 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2569 * Merge from mainline (151310:151361).
2571 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2573 * Merge from mainline (151171:151310).
2575 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2577 * Merge from mainline (151171:151806).
2579 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2581 * Revert the last commit.
2583 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2585 * Merge from mainline (151171:151819).
2587 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2589 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2590 (is_simple_operand): Remove call to stmt_simple_memref_p.
2591 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2593 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2595 * gcc.dg/graphite/interchange-mvt.c: New File.
2596 * gcc.dg/graphite/scop-dsyrk.c: New File.
2597 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2598 * gcc.dg/graphite/scop-mvt.c: New File.
2599 * gcc.dg/graphite/scop-sor.c: New File.
2601 2009-09-17 Li Feng <nemokingdom@gmail.com>
2603 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2604 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2605 (graphite_carried_dependence_level_k): Ditto.
2606 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2607 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2608 (new_poly_dr): Adjust declaration.
2609 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2610 (free_gimple_bb): Added free_data_refs_aux.
2611 (build_poly_dr): Add dr_base_object_set.
2612 (partition_drs_to_sets): New.
2613 (dr_same_base_object_p): New.
2614 (build_alias_set_for_drs): New.
2615 (build_base_object_set_for_drs): New.
2616 (build_scop_drs): Add build_base_obj_set_for_drs.
2617 * graphite-sese-to-poly.h: Added #define for alias set number index and
2618 base object set index.
2619 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2620 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2622 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2624 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2625 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2627 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2629 * graphite-sese-to-poly.c (struct irp_data): Removed.
2630 (idx_record_params): Removed.
2631 (find_params_in_bb): Scan for parameters the access functions; don't
2632 parse the tree representation.
2634 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2636 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2637 passes at -O1 and below.
2639 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2641 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2642 tree-scalar-evolution.h, and then tree-data-ref.h.
2643 * graphite-clast-to-gimple.c: Same.
2644 * graphite-dependences.c: Same.
2645 * graphite-interchange.c: Same.
2646 * graphite-poly.c: Same.
2647 * graphite-scop-detection.c: Same.
2648 * graphite-sese-to-poly.c: Same.
2650 * lambda-code.c: Same.
2651 * matrix-reorg.c: Same.
2652 * tree-data-ref.c: Same.
2653 * tree-if-conv.c: Same.
2654 * tree-loop-distribu: Same.: Same.
2655 * tree-loop-linear.c: Same.
2656 * tree-parloops.c: Same.
2657 * tree-predcom.c: Same.
2658 * tree-vect-patterns.c: Same.
2660 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2662 Partially revert the previous patch, except the following.
2663 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2664 as parameters the operands of the not expression.
2666 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2668 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2669 Do not call analyze_scalar_evolution on assignments.
2670 (instantiate_scev_phi): Call analyze_scalar_evolution.
2671 (instantiate_scev_name): Call instantiate_scev_assign and
2672 instantiate_scev_phi.
2673 (instantiate_scev_not): Adapted to pass as parameters the operands
2674 of the not expression.
2676 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2678 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2679 to pass as parameters the operands of the binary expression.
2681 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2683 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2684 instantiate_scev_not. Handle NEGATE_EXPR.
2685 (instantiate_scev_r): Handle NEGATE_EXPR.
2687 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2689 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2691 (instantiate_scev_r): Move code in instantiate_scev_2
2692 and instantiate_scev_1.
2694 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2696 * tree-scalar-evolution.c (instantiate_scev_3): New.
2697 (instantiate_scev_1): Move code in instantiate_scev_3.
2699 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2701 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2702 (instantiate_scev_1): Move code in instantiate_scev_poly.
2704 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2706 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2707 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2709 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2711 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2712 (instantiate_scev_1): Move code in instantiate_scev_convert.
2714 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2716 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2717 (instantiate_scev_1): Move code in instantiate_scev_binary.
2719 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2721 * tree-scalar-evolution.c (instantiate_scev_name): New.
2722 (instantiate_scev_1): Move code in instantiate_scev_name.
2724 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2726 * Merge from mainline (150992:151171).
2728 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2730 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2732 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2734 * graphite-dependences.c (graphite_legal_transform_bb): Call
2735 pbb_remove_duplicate_pdrs.
2736 * graphite-poly.c (can_collapse_pdr): Removed.
2737 (pdr_find_duplicate): Removed.
2738 (can_collapse_pdrs): New.
2739 (pbb_remove_duplicate_pdrs): New.
2740 (new_poly_dr): Do not look for duplicates.
2741 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2742 (PBB_PDR_DUPLICATES_REMOVED): New.
2743 (pbb_remove_duplicate_pdrs): Declared.
2745 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2747 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2748 the strides by multiplying by PDR_NB_REFS.
2749 * graphite-poly.c (can_collapse_pdr): New.
2750 (pdr_find_duplicate): New.
2751 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2752 Initialize PDR_NB_REFS.
2753 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2755 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2757 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2759 Revert one of the previous commits:
2760 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2761 the computation of symmetric data dependence relations.
2762 (dependency_between_pbbs_p): Same.
2764 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2767 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2770 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2772 * graphite-dependences.c (pddr_original_scattering): Return NULL
2773 for read-read dependence relations.
2774 * graphite-poly.h (enum poly_dr_type): Fix comment.
2777 (pdr_may_write_p): New.
2779 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2781 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2782 (struct poly_dr): Same.
2783 (new_poly_dr): Same.
2784 * graphite-poly.c (new_poly_dr): Same.
2786 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2787 Sebastian Pop <sebastian.pop@amd.com>
2789 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2790 pbb_strip_mine_time_depth. Changed the implementation so that
2791 transformation is expressed as a transformation on
2792 time (scatttering) dimensions. Also, ensures that the 2d+1
2793 scheduling format is preserved.
2794 (pbb_strip_mine_profitable_p): Profitability is based on the
2795 iteration number of a given time (scattering) dimension,
2796 and not on a original loop depth dimension.
2797 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2798 (pbb_do_strip_mine): Call psct_dynamic_dim.
2799 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2800 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2801 (pbb_nb_dynamic_scattering_transform): New.
2802 (psct_dynamic_dim): New.
2804 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2806 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2807 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2808 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2809 * graphite-interchange.c (build_linearized_memory_access): Same.
2810 (memory_stride_in_loop): Same.
2812 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2814 * graphite-dependences.c (pddr_original_scattering): New.
2815 (graphite_legal_transform_dr): Call pddr_original_scattering.
2818 * graphite-dependences.h (dot_deps): Declared.
2819 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2820 (print_pdr): Print PDR_ID.
2821 * graphite-poly.h (struct poly_dr): Add field id.
2824 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2826 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2828 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2829 not delete the original dependence relation.
2831 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2833 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2834 the computation of symmetric data dependence relations.
2835 (dependency_between_pbbs_p): Same.
2837 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2839 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2840 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2841 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2842 (free_poly_ddr): New.
2843 (pddr_is_empty): New.
2844 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2845 (dependence_polyhedron): Same. Remove useless gcc_assert.
2847 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2848 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2849 * graphite-dependences.h (enum poly_dependence_kind): New.
2850 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2851 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2852 (PDRP_SINK): Renamed PDDR_SINK.
2853 (PDRP_DDP): Renamed PDDR_DDP.
2855 (free_poly_ddr): Declared.
2856 * graphite-poly.c (new_scop): Use the new hash function names.
2857 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2858 into original_pddrs.
2859 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2861 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2863 * Merge from mainline (150764:150992).
2865 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2867 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2868 bounds with LT_EXPR to make niter analysis more precise on code
2869 generated by Graphite.
2871 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2873 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2874 (graphite_legal_transform_bb): Same.
2875 (poly_drs_may_alias_p): Same.
2877 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2880 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2881 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2883 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2885 * graphite-poly.c (print_pbb): Print PBB index.
2887 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2889 * Merge from mainline (r150672:150764).
2891 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2893 * graphite-interchange.c (ppl_max_for_le): Moved...
2894 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2895 * graphite-ppl.c (ppl_max_for_le): ... here.
2896 * graphite-ppl.h (ppl_max_for_le): Declared.
2898 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2900 * Merge from mainline (r150372:150672).
2902 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2905 * sese.c (convert_for_phi_arg): New.
2906 (add_guard_exit_phis): Use convert_for_phi_arg.
2908 * gfortran.dg/graphite/id-17.f: New.
2910 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2912 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2913 unknown subscript upper bounds.
2915 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2917 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2918 Pranav Garg <pranav.garg2107@gmail.com>
2920 * graphite-interchange.c (gather_access_strides): Removed.
2921 (ppl_max_for_le): New.
2922 (build_linearized_memory_access): New.
2923 (memory_stride_in_loop): New.
2924 (pbb_interchange_profitable_p): Reimplemented.
2925 * graphite-ppl.h (ppl_new_id_map): New.
2926 (ppl_interchange): New.
2928 * gcc.dg/graphite/interchange-6.c: XFAILed.
2930 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2932 * graphite-interchange.c (compute_subscript): Removed.
2933 (compute_array_size_cstr): Removed.
2934 (compute_array_size_poly): Removed.
2935 (compute_array_size): Removed.
2936 (gather_access_strides_poly): Removed.
2937 (gather_access_strides): Empty.
2939 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2941 * graphite-dependences.c (dependence_polyhedron_1): Replace
2942 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2943 (graphite_legal_transform_dr): Same.
2944 (graphite_carried_dependence_level_k): Same.
2945 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2946 Initialize PDR_NB_SUBSCRIPTS.
2947 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2949 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2950 (PDR_NB_SUBSCRIPTS): New.
2951 (pdr_nb_subscripts): Removed.
2952 (pdr_dim): Simplified.
2953 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2954 with PDR_NB_SUBSCRIPTS.
2956 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2958 * graphite-interchange.c (compute_array_size): Remove use of
2960 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2961 Do not initialize PDR_DATA_CONTAINER.
2962 (print_pdr): Do not print PDR_DATA_CONTAINER.
2963 * graphite-poly.h (struct poly_dr): Remove data_container field.
2964 (PDR_DATA_CONTAINER): Removed.
2965 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2967 (build_poly_dr): Same.
2969 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2971 * gcc.dg/graphite/interchange-9.c: New.
2973 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2974 Sebastian Pop <sebastian.pop@amd.com>
2976 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2977 copy of the dependence polyhedron. Free the temporary objects.
2978 (graphite_carried_dependence_level_k): Free unused objects before
2981 * gcc.dg/graphite/interchange-1.c: XFAILed.
2982 * gcc.dg/graphite/interchange-2.c: XFAILed.
2983 * gcc.dg/graphite/interchange-3.c: XFAILed.
2984 * gcc.dg/graphite/interchange-4.c: XFAILed.
2985 * gcc.dg/graphite/interchange-7.c: XFAILed.
2987 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2989 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2990 Early return without analyzing the data dependences if no
2991 transform has been done. Call restore_scattering if the transform
2993 (graphite-interchange.c): Same.
2994 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2995 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2996 (apply_poly_transforms): Do not gcc_assert that
2997 the transform is legal.
2998 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2999 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3000 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3001 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3002 * graphite-poly.h (struct poly_scattering): New.
3003 (struct poly_bb): Add original, transformed, and saved fields.
3004 Remove transformed_scattering, original_scattering, nb_local_variables,
3005 and nb_scattering_transform fields.
3006 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3007 (poly_scattering_new): New.
3008 (poly_scattering_free): New.
3009 (poly_scattering_copy): New.
3010 (store_scattering_pbb): New.
3011 (store_scattering): New.
3012 (restore_scattering_pbb): New.
3013 (restore_scattering): New.
3014 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3015 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3017 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3019 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3022 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3024 * Makefile.in (graphite.o): Depends on PREDICT_H.
3025 * graphite.c: Include predict.h.
3026 (graphite_finalize): Call tree_estimate_probability.
3027 * predict.c (predict_loops): Do not call scev_initialize and
3029 (tree_estimate_probability_bb): New.
3030 (tree_estimate_probability): Do not initialize loops: move that
3031 code to the driver. Call tree_estimate_probability_bb.
3032 (tree_estimate_probability_driver): New.
3033 (pass_profile): Use tree_estimate_probability_driver.
3034 * predict.h (tree_estimate_probability): Declared.
3036 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3038 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3039 * graphite-dependences.c (graphite_legal_transform): Add time to
3040 TV_GRAPHITE_DATA_DEPS.
3041 (dependency_between_pbbs_p): Same.
3042 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3044 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3046 * Merge from mainline (r149952:150372).
3048 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3050 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3051 * graphite-blocking.c: Same.
3052 * graphite-clast-to-gimple.c: Same.
3053 * graphite-dependences.c: Same.
3054 * graphite-poly.c: Same.
3055 * graphite-poly.h: Same.
3056 * graphite-ppl.c: Same.
3057 * graphite-scop-detection.c: Same.
3058 * graphite-sese-to-poly.c: Same.
3061 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3063 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3064 (remove_simple_copy_phi): New.
3065 (remove_invariant_phi): New.
3066 (simple_copy_phi_p): New.
3067 (reduction_phi_p): New.
3068 (gsi_for_ssa_name_def): New.
3069 (insert_out_of_ssa_copy): New.
3070 (insert_out_of_ssa_copy_on_edge): New.
3071 (create_zero_dim_array): New.
3072 (scalar_close_phi_node_p): New.
3073 (rewrite_close_phi_out_of_ssa): New.
3074 (rewrite_phi_out_of_ssa): New.
3075 (rewrite_reductions_out_of_ssa): New.
3076 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3078 * gcc.dg/graphite/id-11.c: New.
3079 * gcc.dg/graphite/id-15.c: New.
3080 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3081 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3082 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3083 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3084 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3085 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3086 * gfortran.dg/graphite/id-13.f: New.
3087 * gfortran.dg/graphite/id-5.f: New.
3089 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3091 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3092 check that nb_reductions_in_loop is zero.
3093 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3094 reduction phi nodes.
3095 (nb_reductions_in_loop): Removed.
3096 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3097 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3098 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3099 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3100 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3102 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3104 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3105 statements that have an empty iteration domain.
3106 * gfortran.dg/graphite/id-16.f: New.
3108 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3110 * tree-scalar-evolution.c (instantiate_scev_1): Return
3111 chrec_dont_know when the result is not above instantiate_below.
3112 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3113 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3114 the tree has a known scalar evolution.
3115 * gfortran.dg/graphite/id-14.f: New.
3116 * gfortran.dg/graphite/id-15.f: New.
3118 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3120 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3122 (rename_variables): Keep inserting renames after the ones already
3125 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3127 * graphite-sese-to-poly.c (compare_bb_depths): New.
3128 (graphite_sort_dominated_info): New.
3129 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3130 (build_scop_scattering): Fix comment.
3132 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3134 * graphite.c (graphite_finalize): Call print_loops instead of
3135 dump_function_to_file.
3136 * gcc.dg/graphite/graphite.exp: Fix formatting.
3137 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3138 loops generated in the graphite output file.
3139 * gcc.dg/graphite/pr35356-2.c: New.
3140 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3141 * gfortran.dg/graphite/id-12.f: New.
3143 2009-07-24 Li Feng <nemokingdom@gmail.com>
3145 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3148 2009-07-24 Li Feng <nemokingdom@gmail.com>
3149 Tobias Grosser <grosser@fim.uni-passau.de>
3151 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3152 alias set number build alias in ACCESSES polyhedron.
3153 (build_alias_set_for_drs): New.
3154 (build_pbb_drs): Added build_alias_set_for_drs.
3155 * graphite-dependences.c (poly_drs_may_alias_p): New.
3156 (graphite_carried_dependence_level_k): Check alias information
3157 before building polyhedron.
3159 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3161 * Makefile.in (lambda-code.o): Fix formatting.
3163 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3165 * Merge from mainline (r149350-149952)
3167 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3169 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3170 before interchange to prepare for loop blocking.
3172 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3174 * graphite-poly.c (apply_poly_transforms): Add checks after every
3176 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3177 done in apply_poly_transforms.
3179 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3181 * graphite-dependences.c (build_lexicographically_gt_constraint):
3182 Replace RES parameter with *RES.
3183 (dependence_polyhedron_1): Pass an address of the parameter RES
3184 instead of value of RES.
3186 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3188 * graphite.c (graphite_finalize): Fix comment.
3189 (graphite_transform_loops): Reset scev info after code generation
3192 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3194 * graphite.c (graphite_finalize): Call scev_reset.
3196 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3198 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3199 GBB_CLOOG_IV_TYPES hash table twice.
3200 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3201 (add_condition_to_domain): Clear GMP values.
3203 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3205 * graphite-dependences.c: Fix formatting.
3206 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3207 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3208 * graphite-sese-to-poly.c: Fix formatting.
3209 * graphite.c (graphite_transform_loops): Create the hash table
3210 after the early return.
3212 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3214 * gcc.dg/graphite/id-14.c: New.
3215 * gcc.dg/graphite/pr40157.c: New.
3216 * gfortran.dg/graphite/id-11.f: New.
3218 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3220 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3221 (build_poly_scop): Return false when there are no pbbs within
3222 loops to avoid to pass to cloog scops with no loops.
3224 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3226 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3227 useless test "i % 2".
3228 (build_pbb_scattering_polyhedrons): Fix formatting.
3229 (build_poly_dr): Same.
3230 * graphite.c (graphite_transform_loops): Restructure.
3232 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
3234 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3235 reduction_list parameter.
3236 (rewrite_all_phi_nodes_with_iv): Same.
3237 (canonicalize_loop_ivs): Same.
3238 * tree-parloops.c (struct brli): Removed.
3239 (build_reduction_list_info): Removed.
3240 (build_new_reduction): New.
3241 (analyze_reduction_list): Removed.
3242 (gather_scalar_reductions): Find reductions instead of phi
3243 nodes that can't be canonicalized.
3244 (try_create_reduction_list): Remove reduction_list parameter.
3245 (gen_parallel_loop): Same.
3246 (parallelize_loops): Remove analyze_reductions variable,
3247 initialization and free.
3248 Change reduction_list htab initialization to reduction_info
3249 elements instead of ssa names.
3250 Call try_create_reduction_list and gen_parallel_loop without
3251 analyzed_reduction argument.
3252 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3253 canonicalize_loop_ivs with one less argument.
3254 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3256 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3258 * graphite-dependences.c (new_poly_dr_pair): New.
3259 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3260 (new_poly_dr_pair): New.
3261 (eq_poly_dr_pair_p): New.
3262 (hash_poly_dr_pair_p): New.
3263 * graphite-dependences.h (struct poly_dr_pair): New.
3264 (eq_poly_dr_pair_p): Declared.
3265 (hash_poly_dr_pair_p): Declared.
3266 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3267 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3268 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3269 * Makefile.in (graphite-poly.o): Add dependence on
3270 graphite-dependences.h.
3272 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3274 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3275 polynomials of degree > 1 pass to Graphite.
3276 * tree-chrec.c (scev_is_linear_expression): Call
3277 evolution_function_is_affine_multivariate_p.
3278 * gfortran.dg/graphite/id-10.f90: New.
3280 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3282 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3283 Instantiate scevs varying in outer loops.
3284 * gfortran.dg/graphite/id-9.f: Correct testcase.
3286 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3288 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3289 redundant constraint.
3291 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3293 * gcc.dg/graphite/graphite.exp: Fix comments.
3294 * gfortran.dg/graphite/graphite.exp: Trigger actions
3295 based on the file names as in the C testsuite.
3296 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3297 * gfortran.dg/graphite/block-2.f: Same.
3298 * gfortran.dg/graphite/block-3.f90: Same.
3299 * gfortran.dg/graphite/block-4.f90: Same.
3300 * gfortran.dg/graphite/id-1.f90: Same.
3301 * gfortran.dg/graphite/id-2.f90: Same.
3302 * gfortran.dg/graphite/id-3.f90: Same.
3303 * gfortran.dg/graphite/id-4.f90: Same.
3304 * gfortran.dg/graphite/id-6.f: Same.
3305 * gfortran.dg/graphite/id-9.f: Same.
3306 * gfortran.dg/graphite/interchange-1.f: Same.
3307 * gfortran.dg/graphite/interchange-2.f: Same.
3308 * gfortran.dg/graphite/scop-1.f: Same.
3310 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3312 * sese.c (expand_scalar_variables_call): New.
3313 (expand_scalar_variables_ssa_name): Handle calls in expander.
3315 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3317 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3318 Expect to see the pattern twice.
3319 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3320 * gcc.dg/graphite/interchange-5.c: Same.
3321 * gcc.dg/graphite/interchange-6.c: Same.
3323 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3325 * gcc.dg/graphite/id-10.c: New.
3326 * gcc.dg/graphite/id-12.c: New.
3327 * gfortran.dg/graphite/id-7.f: New.
3328 * gfortran.dg/graphite/id-8.f: New.
3330 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3332 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3335 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3337 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3339 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3341 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3343 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3345 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3346 building PDR subscripts.
3348 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3350 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3351 computation of array sizes.
3353 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3355 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3357 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3359 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3360 build_pairwise_constraint, dr_equality_constraints,
3361 build_pairwise_scheduling_equality,
3362 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3363 build_lexicographically_gt_constraint, dependence_polyhedron,
3364 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3365 Move from NNC_Polyhedron to C_Polyhedron.
3366 * graphite-interchange.c (compute_array_size_poly,
3367 gather_access_strides): Dito.
3368 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3369 free_scop, pbb_number_of_iterations): Dito.
3370 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3371 pbb_dim_iter_domain, struct scop): Dito.
3372 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3373 new_Cloog_Domain_from_ppl_Polyhedron,
3374 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3375 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3376 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3377 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3378 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3379 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3380 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3381 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3382 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3383 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3384 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3385 build_scop_iteration_domain, build_poly_dr): Dito
3387 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3389 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3391 * gcc.dg/graphite/run-id-1.c: New.
3393 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3395 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3396 positivity constraint on the symbolic number of iterations.
3398 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3400 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3402 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3403 Tobias Grosser <grosser@fim.uni-passau.de>
3405 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3406 (build_cloog_prog): Directly use SCOP_CONTEXT.
3407 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3408 (free_scop): Free SCOP_CONTEXT.
3409 (print_scop_context): New.
3410 (print_scop): Call print_scop_context.
3411 (debug_scop_context): New.
3412 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3413 (struct scop): Added field context.
3414 (SCOP_CONTEXT): New.
3415 * graphite-sese-to-poly.c (add_param_constraints): New.
3416 (build_scop_context): New.
3417 (build_poly_scop): Call build_scop_context.
3419 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3421 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3422 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3423 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3424 * graphite-ppl.h: Include double-int.h and tree.h.
3425 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3426 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3427 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3428 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3430 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3432 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3433 POINTER_PLUS_EXPR for pointer types.
3434 (clast_to_gcc_expression): Same.
3436 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3438 * graphite-poly.c (print_scattering_function): Early return when
3439 PBB_TRANSFORMED_SCATTERING is not initialized.
3440 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3442 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3444 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3447 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3449 * tree-parloops.c (analyze_reduction_list): Change return
3451 (try_create_reduction_list): Move the call to
3452 analyze_reduction_list to the beginining.
3453 Call reduction_phi with analyzed_reductions as argument
3454 instead of reduction_list.
3456 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3458 * Merge from mainline (r148296:149346)
3460 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3462 * graphite-scop-detection.c (graphite_can_represent_init): New.
3463 (graphite_can_represent_scev): Call graphite_can_represent_init:
3464 check that the initial value does not contain multiplications of
3466 (stmt_has_simple_data_refs_p): New.
3467 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3468 (is_simple_operand): Fix formatting.
3469 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3471 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3473 * gcc.dg/graphite/id-13.c: New.
3474 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3475 analyze_scalar_evolution, use scalar_evolution_in_region.
3476 (scan_tree_for_params_right_scev): Add extra assert.
3477 (parameter_index_in_region_1): Split from parameter_index_in_region.
3478 (idx_record_params): Use scalar_evolution_in_region.
3479 (find_params_in_bb): Same.
3480 (find_scop_parameters): Same.
3481 (build_loop_iteration_domains): Same.
3482 (create_linear_expr_from_tree): Same.
3483 * sese.c (scalar_evolution_in_region): New.
3484 * sese.h (scalar_evolution_in_region): Declared.
3485 (defined_in_sese_p): New.
3486 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3488 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3491 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3493 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3494 TREE_DATA_REF_H also implies SCEV_H.
3496 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3498 * graphite-poly.c (print_scop_params): New.
3499 (print_scop): Call print_scop_params.
3500 (debug_scop_params): New.
3501 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3503 2009-07-07 Li Feng <nemokingdom@gmail.com>
3505 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3506 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3507 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3508 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3509 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3510 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3512 2009-07-07 Li Feng <nemokingdom@gmail.com>
3514 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3515 for dependency checking part.
3516 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3517 tests for dependency checking.
3518 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3519 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3520 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3521 flag -fdump-tree-graphite-all for autopar testsuites.
3523 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3525 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3526 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3527 canonicalize_loop_ivs): Moved...
3528 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3530 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3532 * tree-parloops.c (try_create_reduction_list): Pass an extra
3533 argument analyzed_reductions. Call analyze_reduction_list.
3534 (gen_parallel_loop): Do not call analyze_reduction_list.
3535 (parallelize_loops): Init and finalize analyzed_reductions.
3537 2009-07-06 Li Feng <nemokingdom@gmail.com>
3539 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3540 Added flag -fno-loop-strip-mine for autopar testcase.
3542 2009-07-04 Li Feng <nemokingdom@gmail.com>
3544 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3545 transformed scattering dimension instead of unmatch orignal when
3546 calling dependence_polyhedron.
3548 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3550 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3552 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3554 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3555 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3557 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3559 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3560 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3561 * graphite-poly.c (pbb_number_of_iterations): New.
3562 * graphite-poly.h (pbb_number_of_iterations): Declared.
3563 (pbb_iterator_dim, pbb_parameter_dim): New.
3565 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3567 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3568 last commit on type of lower and upper bound of loops.
3570 2009-06-29 Li Feng <nemokingdom@gmail.com>
3572 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3573 graphite-dependences.h.
3574 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3575 (mark_bb_with_pbb): New.
3576 (get_stmtfor_depth): New.
3577 (find_pbb_via_hash): New.
3578 (dependency_in_loop_p): New.
3579 (mark_loops_parallel): New.
3580 (free_aux_in_new_loops): New.
3581 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3582 bb with it's relevant pbb. Mark newly created loops. Remove mark
3583 innermost loop parallel without checking.
3584 (gloog): Add parameter BB_PBB_MAPPING.
3585 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3586 (gloog): Change declaration.
3587 (mark_loop_parallel): Make extern.
3588 (free_aux_in_new_loops): Declare.
3589 (bb_pbb_map_hash): New.
3590 (eq_bb_pbb_map): New.
3591 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3592 auto parallelization when flag_graphite_force_parallel is set.
3593 (graphite_finalize): Added free_aux_in_new_loops.
3594 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3595 the innermost loop that marked parallel. Use
3596 flag_graphite_force_parallel instead of loop->can_be_parallel.
3597 (loop_parallel_p): Move inner most checking out of function.
3599 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3601 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3602 type of lower and upper bound of loops signed long int.
3604 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3606 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3607 expression outside the loop.
3609 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3611 * gcc.dg/graphite/interchange-8.c: New.
3613 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3615 * gcc.dg/graphite/interchange-0.c: XFailed.
3616 * gcc.dg/graphite/interchange-5.c: XFailed.
3617 * gcc.dg/graphite/interchange-6.c: XFailed.
3619 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3621 * graphite-interchange.c (compute_array_size_poly): The end of the
3622 recursion should return 1.
3624 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3626 * graphite-interchange.c (compute_array_size_cstr): Allow the
3627 subscript multiplier to be -1.
3628 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3629 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3630 data_container. Initializes PDR_DATA_CONTAINER.
3631 (print_pdr_access_layout): New.
3632 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3633 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3635 (PDR_DATA_CONTAINER): New.
3636 (new_poly_dr): Update declaration.
3637 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3638 (build_poly_dr): Call pdr_add_data_dimensions.
3640 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3642 * graphite-poly.h (struct poly_dr): Fix comment.
3643 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3644 (pdr_add_memory_accesses): New.
3645 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3647 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3649 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3650 (print_pbb): Add call to print_pdrs.
3651 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3653 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3654 Li Feng <nemokingdom@gmail.com>
3656 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3657 (dependency_between_pbbs_p): New.
3658 (lexicographically_gt_p): Assure !empty_p before polyhedron
3659 intersection assign.
3660 (build_lexicographically_gt_constraint): Correct lexicographically
3662 * graphite-dependences.h: New.
3663 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3665 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3667 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3668 (gloog): Print to dump_file the generated clast.
3669 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3670 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3672 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3674 * graphite-poly.c (extend_scattering): Increment
3675 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3677 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3679 * graphite-interchange.c (compute_array_size_poly): Added exit of
3680 recursion condition. Continue iterating even after the first equality.
3681 (compute_array_size): Same.
3683 2009-06-24 Li Feng <nemokingdom@gmail.com>
3685 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3686 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3687 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3688 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3689 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3691 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3693 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3694 only when the use verifies is_gimple_reg.
3696 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3698 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3699 Allocate scaldims after call to unify_scattering_dimensions.
3701 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3703 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3705 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3706 Albert Cohen <albert.cohen@inria.fr>
3708 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3709 variables for the strip mining.
3711 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3712 Pranav Garg <pranav.garg2107@gmail.com>
3714 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3715 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3716 (graphite-blocking.o): New rule.
3717 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3718 * graphite-blocking.c: New.
3719 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3720 flag_loop_strip_mine.
3721 (psct_scattering_dim_for_loop_depth): New.
3722 * graphite-poly.h (scop_do_strip_mine): Declared.
3723 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3724 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3725 flag_loop_strip_mine.
3727 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3729 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3730 a GMP value and a PPL coefficient at each iteration of a loop.
3732 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3734 * graphite-dependences.c (dependence_polyhedron): Do not use
3735 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3736 pbb_nb_scattering_transform.
3737 (graphite_legal_transform_dr): Same.
3738 * graphite-poly.c (extend_scattering): Same.
3739 (unify_scattering_dimensions): Same.
3740 (print_scattering_function): Same.
3741 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3742 PBB_NB_LOCAL_VARIABLES.
3743 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3744 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3745 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3746 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3747 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3748 (pbb_nb_scattering_transform): New.
3749 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3750 (psco_scattering_dim): Add assert on parameters.
3751 (psct_scattering_dim): Same.
3752 (psct_scattering_dim_for_loop_depth): Declared.
3753 (psct_local_var_dim): New.
3754 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3755 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3756 correct layout, call pbb_nb_local_vars.
3757 (psct_add_local_variable, psct_add_scattering_dimension): New.
3758 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3759 Initialize PBB_NB_SCATTERING_TRANSFORM.
3761 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3763 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3764 (set_coef): Renamed ppl_set_coef.
3765 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3767 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3769 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3770 test a boolean against 1.
3771 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3772 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3773 (pbb_do_interchange): Returns true when a transform has been performed.
3774 (scop_do_interchange): Same.
3775 * graphite-poly.c (apply_poly_transforms): Use the return value of
3776 scop_do_interchange.
3777 * graphite-poly.h (scop_do_interchange): Update declaration.
3779 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3781 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3783 * sese.c (sese_reset_aux_in_loops): New.
3784 * sese.h (sese_reset_aux_in_loops): New.
3786 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3788 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3789 multiplier and multiply the constant by the multiplier.
3790 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3791 (build_poly_dr): Do not use the multiplier to define the subscript.
3793 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3795 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3796 compiler's data reference. Initialize PDR_CDR.
3797 (print_pdr): Call dump_data_reference.
3798 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3799 Add compiler_dr field.
3800 (PDR_BB): Renamed PDR_PBB.
3802 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3803 GCC's data reference representation.
3804 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3805 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3807 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3809 * graphite-poly.c (print_scattering_function): Also print the layout.
3810 * graphite-poly.h (pbb_nb_local_vars): New.
3812 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3814 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3816 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3818 * graphite-poly.c (print_pdr, debug_pdr): New.
3819 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3820 (PDR_BASE): Removed.
3822 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3824 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3827 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3829 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3830 subscript identification column.
3831 (pbb_do_interchange): Print to dump_file that some loops "will be
3832 interchanged". Rely on that chain of characters in the testcases.
3833 * gcc.dg/graphite/interchange-0.c: New.
3834 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3835 interchange-*.c files and compile them with -floop-interchange.
3837 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3839 * graphite-interchange.c (interchange_profitable_p): Renamed
3840 pbb_interchange_profitable_p.
3842 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3843 Harsha Jagasia <harsha.jagasia@amd.com>
3844 Pranav Garg <pranav.garg2107@gmail.com>
3846 * graphite-interchange.c (interchange_profitable_p): Make static.
3847 (pbb_interchange_loop_depths, pbb_do_interchange,
3848 scop_do_interchange): New.
3849 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3850 for flag_loop_interchange.
3851 * graphite-poly.h (scop_do_interchange): Declared.
3852 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3853 flag_loop_interchange is used.
3855 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3857 * graphite-dependences.c (dependence_polyhedron): Update use of
3858 pbb_nb_scattering_dims.
3859 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3860 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3861 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3862 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3864 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3866 * graphite.c: Cleanup foo.
3868 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3870 * Merge from mainline (r143684:148293).
3871 * Disabled libpcp until it gets fixed.
3873 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3874 Harsha Jagasia <harsha.jagasia@amd.com>
3876 * graphite-interchange.c: New.
3877 * Makefile.in (graphite-interchange.o): New.
3878 * graphite-poly.h (interchange_profitable_p): Declared.
3879 * graphite-ppl.h (value_max): New.
3881 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3883 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3884 * graphite-poly.h: Fix some comments.
3888 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3891 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3892 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3893 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3894 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3895 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3896 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3897 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3898 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3899 * graphite-clast-to-gimple.c: Same.
3900 * graphite-dependences.c: Same.
3901 * graphite-poly.c: Same.
3902 * graphite-sese-to-poly.c: Same.
3904 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3906 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3907 expressions for an IV rename, as returned by clast_to_gcc_expression.
3908 (copy_renames): Rename new_name to expr.
3909 * sese.c (debug_rename_elt): Same.
3912 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3913 the information from the rename map.
3914 (rename_variables_in_stmt): Same.
3915 (add_loop_exit_phis): Rename new_name to expr.
3916 (insert_loop_close_phis): Same.
3917 (add_guard_exit_phis): Same. Call force_gimple_operand.
3918 * sese.h (struct rename_map_elt): Rename new_name to expr.
3919 (new_rename_map_elt): Same.
3921 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3923 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3924 * sese.c (set_rename): Make it extern.
3925 * sese.h (set_rename): Declared.
3927 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3929 * graphite-poly.c (extend_scattering): Free values.
3930 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3932 (ppl_print_powerset_matrix): Same.
3933 * graphite-scop-detection.c (free_scops_1): New.
3934 (limit_scops): Call free_scops_1.
3935 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3936 (build_poly_dr): Free PPL coefficients.
3937 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3939 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3941 * graphite-dependences.c: New.
3942 * graphite-data-ref.c: Removed.
3943 * graphite-data-ref.h: Removed.
3944 * Makefile.in (graphite-data-ref.o): Removed.
3945 (graphite-dependences.o): Added.
3946 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3947 * graphite-poly.c: Same.
3948 Move the data dependence testing to graphite-dependences.c.
3950 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3952 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3953 from graphite_cannot_represent_loop. Code refactored.
3954 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3956 2009-05-17 Li Feng <nemokingdom@gmail.com>
3958 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3959 Cover all the testcases (not only the filtered ones).
3961 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3963 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3964 unnecessary check. Update comments. Move check for REAL_TYPE here.
3965 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3966 done in (stmt_simple_for_scop_p).
3968 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3970 * graphite.c (print_global_statistics): New.
3971 (print_graphite_scop_statistic): New.
3972 (print_graphite_statistics): New.
3973 (graphite_initialize, graphite_transform_loops): Print statistics.
3974 * graphite-scop-detection (build_scops): Print statistics.
3975 (print_graphite_scop_statistics): New.
3976 (print_graphite_statistics): New.
3978 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3980 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3981 (debug_clast_name_index): Removed.
3982 (debug_clast_name_indexes_1): Removed.
3983 (debug_clast_name_indexes): Removed.
3984 (clast_name_index_elt_info): Removed.
3985 (eq_clast_name_indexes): Removed.
3986 (clast_name_to_index): Removed.
3987 (new_clast_name_index): Removed.
3988 (save_clast_name_index): Removed.
3989 (save_var_name): Moved...
3990 (init_sese_params_index): Removed.
3991 (clast_name_to_gcc): Remove use of name_tree.
3992 (initialize_cloog_names): Same.
3993 (gloog): Do not call init_sese_params_index.
3994 * graphite-sese-to-poly.c (save_var_name): ...here.
3995 (parameter_index_in_region): New.
3996 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3997 (parameter_index_in_region): Removed.
3998 (is_parameter): Remove use of name_tree.
3999 * sese.h (struct name_tree): Removed.
4000 (struct sese): Remove use of name_tree. New field params_names.
4001 (SESE_PARAMS_NAMES): New.
4002 (SESE_PARAMS): Remove duplicate.
4003 (parameter_index_in_region): Removed.
4004 (sese_nb_params): Remove use of name_tree.
4005 (struct clast_name_index): New.
4006 (new_clast_name_index): New.
4007 (clast_name_to_index): New.
4008 (save_clast_name_index): New.
4009 (debug_clast_name_index): New.
4010 (debug_clast_name_indexes_1): New.
4011 (debug_clast_name_indexes): New.
4012 (clast_name_index_elt_info): New.
4013 (eq_clast_name_indexes): New.
4015 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4017 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4018 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4019 (graphite_loop_normal_form): Do not pass region. Do not
4020 initialize SESE_OLDIVS.
4021 (build_graphite_loop_normal_form): Update call to
4022 graphite_loop_normal_form.
4023 * sese.c (debug_oldivs): Removed.
4024 (new_sese): Do not initialize SESE_OLDIVS.
4025 (free_sese): Do not free SESE_OLDIVS.
4026 (oldiv_for_loop): Removed.
4027 * sese.h (struct sese): Remove old_ivs.
4028 (SESE_OLDIVS): Removed.
4029 (oldiv_for_loop): Removed.
4031 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4033 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4034 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4035 replaced by a call to newivs_to_depth_to_newiv.
4036 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4037 (clast_to_gcc_expression_red): Same.
4038 (gcc_type_for_clast_expr): Same.
4039 (gcc_type_for_clast_eq): Same.
4040 (graphite_translate_clast_equation): Same.
4041 (graphite_create_guard_cond_expr): Same.
4042 (graphite_create_new_guard): Same.
4043 (graphite_create_new_loop): Same.
4044 (build_iv_mapping): Same.
4045 (translate_clast): Same.
4047 (loop_iv_stack_patch_for_consts): Removed. *
4048 sese.c (iv_stack_entry_is_constant): Removed.
4049 (iv_stack_entry_is_iv): Removed.
4050 (loop_iv_stack_push_iv): Removed.
4051 (loop_iv_stack_insert_constant): Removed.
4052 (loop_iv_stack_pop): Removed.
4053 (loop_iv_stack_get_iv): Removed.
4054 (loop_iv_stack_get_iv_from_name): Removed.
4055 (debug_loop_iv_stack): Removed.
4056 (free_loop_iv_stack): Removed.
4057 (loop_iv_stack_remove_constants): Removed. *
4058 sese.h (iv_stack_entry_kind): Removed.
4059 (iv_stack_entry_data_union): Removed.
4060 (iv_stack_entry_struct): Removed.
4061 (iv_stack_entry_p): Removed.
4062 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4063 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4064 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4065 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4066 (gbb_loop_at_index): Fix indenting.
4067 (gbb_loop_index): Removed.
4069 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4071 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4072 Call clast_name_to_index.
4074 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4076 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4077 do not pass params. Get params from SESE_PARAMS.
4078 (clast_to_gcc_expression): Same.
4079 (clast_to_gcc_expression_red): Same.
4080 (gcc_type_for_clast_eq): Same.
4081 (graphite_translate_clast_equation): Same.
4082 (graphite_create_new_loop): Same.
4083 * sese.c (rename_variables_in_stmt): Fix comment.
4085 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4087 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4089 Call save_clast_name_index.
4090 (translate_clast): Pass newivs_index.
4091 (gloog): Create and free newivs_index.
4093 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4095 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4096 (clast_name_index_p): New type.
4097 (debug_clast_name_index): New.
4098 (debug_clast_name_indexes_1): New.
4099 (debug_clast_name_indexes): New.
4100 (clast_name_index_elt_info): New.
4101 (eq_clast_name_indexes): New.
4102 (clast_name_to_index): New.
4103 (new_clast_name_index): New.
4104 (save_clast_name_index): New.
4105 (init_sese_params_index): New.
4106 (gloog): Call init_sese_params_index.
4107 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4108 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4109 (free_sese): Free SESE_PARAMS_INDEX.
4110 * sese.h (struct sese): Add params_index.
4111 (SESE_PARAMS_INDEX): New.
4113 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4115 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4116 (graphite_create_new_loop): Pass the newivs vector. Push the
4117 newly created IV to newivs.
4118 (translate_clast): Pass the newivs vector.
4119 (gloog): Create and destroy the newivs vector.
4121 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4123 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4124 (graphite_loop_normal_form): Initialize loop->aux with the unique
4125 IV that has been created.
4127 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4129 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4130 scev with parameters in the base part. They where forbidden
4133 2009-05-11 Li Feng <nemokingdom@gmail.com>
4135 * gcc.dg/graphite/graphite.exp: Set different default
4136 compile options by file names.
4137 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4138 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4139 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4140 * gcc.dg/graphite/scop-matmult.c: Ditto.
4142 2009-05-08 Li Feng <nemokingdom@gmail.com>
4144 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4145 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4146 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4147 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4149 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4151 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4154 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4156 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4157 allow integer constant strides.
4158 (graphite_can_represent_expr): Depend on outermost_loop.
4159 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4160 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4161 build_scops_1): Same.
4162 (scopdet_basic_block_info): Same and insert layered SCoP
4164 (try_generate_gimple_bb): Cleanup.
4165 (build_scops): Enable data references.
4167 * gcc.dg/graphite/id-5.c: New.
4168 * gcc.dg/graphite/id-9.c: New.
4169 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4170 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4172 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4174 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4175 that we have not yet built for this SCoP.
4177 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4179 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4180 for complex numbers.
4182 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4184 * graphite-ppl.c: Fix build if cloog is not available.
4186 2009-05-04 Li Feng <nemokingdom@gmail.com>
4188 * tree-parloops.c (loop_parallel_p): Remove construction of
4189 NITER and REDUCTION_LIST.
4190 (try_get_loop_niter): New.
4191 (try_create_reduction_list): New.
4192 (parallelize_loops): Bypass the failed checkings in autopar
4193 when can_be_parallel in loop structure is set to true.
4195 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4197 * gcc.dg/graphite/id-6.c: Update testcase.
4198 * gcc.dg/graphite/scop-3.c: Dito.
4200 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4202 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4203 Enable EQ_EXPR and NE_EXPR again.
4205 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4207 * graphite-scop-detection.c (graphite_can_represent_scev):
4208 Add check if scev is affine multivariate.
4209 (harmful_stmt_in_bb): Check if we can represent the conditions.
4210 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4212 * gcc.dg/graphite/id-7.c: New.
4214 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4216 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4217 Check all bbs in region, not only the bbs that are represented in
4219 (build_poly_scop): Add newline.
4220 * gcc.dg/graphite/id-8.c: New.
4222 2009-04-30 Li Feng <nemokingdom@gmail.com>
4224 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4225 when loop initialize.
4226 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4227 * common.opt: Declare flag_graphite_force_parallel.
4228 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4230 * graphite-poly.c (apply_poly_transforms): Introduce
4231 flag_graphite_force_parallel.
4232 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4233 * toplev.c (process_options): ditto and replace a not correctly
4236 2009-04-30 Li Feng <nemokingdom@gmail.com>
4238 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4239 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4240 to the redefinition.
4241 (compute_cloog_iv_types_1): ditto.
4242 (build_iv_mapping): ditto.
4243 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4245 (free_gimple_bb): Removed GBB_LOOPS related free part.
4246 (build_bb_loops): Removed.
4247 * sese.h (struct gimple_bb): Removed loops.
4248 (GBB_LOOPS): Removed.
4249 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4250 (gbb_loop_index): ditto.
4252 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4254 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4255 allow non constant strides.
4256 * gcc.dg/graphite/scop-20.c: New.
4258 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4260 * graphite-scop-detection.c (dot_all_scops): Fix system call
4261 return value warning.
4264 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4266 * gcc.dg/graphite/id-6.c: Fix pattern.
4267 * gcc.dg/graphite/scop-3.c: Same.
4269 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4271 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4272 build_pairwise_constraint, dr_equality_constraints,
4273 build_pairwise_scheduling_equality,
4274 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4275 build_lexicographically_gt_constraint, dependence_polyhedron,
4276 graphite_legal_transform_dr, graphite_legal_transform_bb,
4277 graphite_legal_transform): New.
4278 * graphite-poly.h (graphite_legal_transform): Declared.
4279 * graphite-sese-to-poly.c (build_poly_scop): Call to
4280 graphite_legal_transform is disabled for the moment.
4282 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4284 * graphite-poly.h (pbb_nb_scattering_dims): New.
4285 (pbb_nb_scattering): Use it.
4287 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4289 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4290 Pointset_Powerset version of ppl_insert_dimensions.
4291 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4293 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4295 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4297 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4299 * graphite-poly.h: Fix comment.
4301 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4303 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4305 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4307 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4310 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4312 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4313 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4316 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4318 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4319 handle EQ_EXPR and NE_EXPR.
4321 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4323 * graphite-poly.h (poly_dr): Fix comment.
4325 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4326 Tobias Grosser <grosser@fim.uni-passau.de>
4328 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4329 with a zero dimension polyhedron.
4330 (find_scop_parameters): Move the call to scop_set_nb_params here.
4331 (build_loop_iteration_domains): Store in loop->aux the iteration
4333 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4334 by any loop in scop.
4335 (build_poly_scop): Do not call scop_set_nb_params.
4337 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4338 Tobias Grosser <grosser@fim.uni-passau.de>
4340 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4341 add_condition_to_domain not GT_EXPR.
4343 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4345 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4346 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4347 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4348 upper_bound_assign to calculate unions.
4349 * gcc.dg/graphite/id-6.c: New.
4351 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4353 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4354 handle abnormal edges.
4356 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4358 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4359 (free_poly_bb): Also free poly_drs.
4360 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4361 (poly_dr): Polyhedron to Pointset_Powerset.
4362 (pdr_accessp_nb_subscripts): Same.
4363 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4366 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4368 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4369 names into more meaningful names.
4371 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4373 * gfortran.dg/graphite/interchange-1.c: New.
4374 * gfortran.dg/graphite/interchange-2.c: New.
4376 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4378 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4380 * tree-parloops.c (rewrite_phi_with_iv): New.
4381 (rewrite_all_phi_nodes_with_iv): New.
4382 (canonicalize_loop_ivs): Call them.
4384 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4386 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4387 graphite_find_data_references_in_stmt.
4388 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4389 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4391 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4393 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4395 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4397 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4398 instead of bb_in_region.
4399 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4400 (build_sese_conditions): Use flag_bb_in_sese.
4401 * sese.c (register_bb_in_sese): Removed.
4402 (new_sese): Remove initialization of SESE_REGION_BBS.
4403 (free_sese): Do not free SESE_REGION_BBS.
4404 * sese.h (struct sese): Remove field region_basic_blocks.
4405 (SESE_REGION_BBS): Removed.
4406 (bb_in_sese_p): Implement in function of bb_in_region.
4408 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4410 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4413 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4415 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4417 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4418 (add_condition_to_domain): New.
4419 (add_condition_to_pbb): New.
4420 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4421 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4423 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4425 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4426 ppl_Pointset_Powerset.
4427 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4428 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4429 (pbb_nb_loops): Same.
4430 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4431 add_conditions_to_domain): Same.
4432 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4433 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4434 ppl_const_Polyhedron_t.
4435 (ppl_print_powerset_matrix): New.
4436 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4437 ppl_print_powerset_matrix): New.
4438 (ppl_print_polyhedron_matrix): Updated.
4440 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4442 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4444 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4446 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4447 (print_iteration_domains, debug_iteration_domain,
4448 debug_iteration_domains): New.
4449 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4450 debug_iteration_domains): Declared.
4451 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4454 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4455 Sebastian Pop <sebastian.pop@amd.com>
4457 * graphite-poly.h (print_iteration_domain): New.
4458 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4459 (build_sese_conditions_1, build_sese_conditions_after,
4460 build_sese_conditions_before): New.
4461 (build_sese_conditions): Rewritten.
4463 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4464 Tobias Grosser <grosser@fim.uni-passau.de>
4466 Cleanup of code generation liveouts.
4467 * graphite-clast-to-gimple.c (translate_clast): Use a single
4468 rename_map instead of one per translated statement.
4469 Do not use SESE_LIVEOUT_RENAMES.
4470 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4471 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4472 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4473 phi node of a reduction: when a loop contains a reduction used outside
4474 the loop, there should be a scalar close phi node on the exit block.
4475 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4476 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4477 (free_sese): Do not free them.
4478 (sese_build_liveouts_use): Do not use them.
4479 (sese_build_liveouts_bb): Same.
4480 (sese_build_liveouts): Same.
4481 (sese_insert_phis_for_liveouts): Same.
4482 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4483 (defined_in_loop_p): New.
4484 (alive_after_loop): New.
4485 (close_phi_not_yet_inserted_p): New.
4486 (struct alep, alep_p): New.
4487 (add_loop_exit_phis): Remove from the rename_map all the names defined
4488 in the code generated loop.
4489 (insert_loop_close_phis): Traverse the rename_map passed to it.
4490 Don't use SESE_LIVEOUT_RENAMES.
4491 (default_liveout_before_guard): Renamed default_before_guard.
4492 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4493 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4494 (register_sese_liveout_renames): Removed.
4495 (copy_bb_and_scalar_dependences): Do not call it.
4496 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4498 (SESE_LIVEOUT): Removed.
4499 (SESE_LIVEOUT_RENAMES): Removed.
4500 (SESE_REDUCTION_LIST): Removed.
4501 (sese_build_liveouts): Removed.
4502 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4503 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4504 (insert_guard_phis): Same.
4505 (rename_map_elt): Declare a VEC of them.
4506 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4507 trees not pointers to trees.
4509 Rewrite in canonical close SSA form:
4510 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4511 (limit_scops): Close the scop after the block containing the close phi
4513 (canonicalize_loop_closed_ssa): New.
4514 (canonicalize_loop_closed_ssa_form): New.
4515 (build_scops): Call canonicalize_loop_closed_ssa_form.
4517 * graphite-sese-to-poly.c: Fix typos.
4519 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4521 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4523 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4524 (print_pbb): Add conditions.
4526 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4527 Sebastian Pop <sebastian.pop@amd.com>
4529 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4530 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4531 (build_scop_bbs_1): New.
4532 (build_scop_bbs): Rewrite.
4533 * sese.h (bb_in_region): New.
4535 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4537 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4539 (print_scop): Style.
4540 * graphite-poly.h (poly_bb): Add drs vector.
4541 (PBB_DRS): Add accessor.
4542 * graphite-sese-to-poly.c (build_poly_dr): New.
4543 (build_pbb_drs, build_scop_drs): New.
4544 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4546 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4548 * tree-ssa-loop.c: Include forgotten toplev.h
4550 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4552 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4553 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4554 * gcc.dg/graphite/pr37928.c: Same
4555 * gcc.dg/graphite/pr38409.c: Same
4556 * gcc.dg/graphite/pr38498.c: Same
4557 * gcc.dg/graphite/pr38559.c: Same
4558 * gcc.dg/graphite/pr39335.c: Same
4559 * gcc.dg/graphite/pr39335_1.c: Same
4560 * gfortran.dg/graphite/block-2.f: Same
4561 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4564 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4566 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4567 build_access_matrix, build_scop_data_accesses): Remove access function
4568 building. (We get a new version soon).
4569 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4570 * sese.h (nb_loops_around_loop_in_sese): Remove.
4571 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4573 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4574 Sebastian Pop <sebastian.pop@amd.com>
4576 * graphite-scop-detection.c (struct scopdet_info): Rename last
4578 (scopdet_basic_block_info, build_scops_1): Don't use
4579 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4581 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4582 Sebastian Pop <sebastian.pop@amd.com>
4584 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4585 * sese.c (sese_build_liveouts_use): Renamed from
4586 sese_build_livein_liveouts_use. Remove liveins.
4587 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4588 Call sese_build_liveouts_use.
4589 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4590 Call sese_build_liveouts_bb.
4591 (new_sese, free_sese): Remove liveins.
4592 (sese_add_exit_phis_var): Deleted.
4593 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4595 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4597 * sese.h (sese): Remove num_ver and livein.
4598 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4600 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4602 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4604 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4606 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4607 (build_scop_scattering): Do not use compare_prefix_loops any more.
4608 (nb_common_loops): New.
4610 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4612 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4613 (register_old_and_new_names): Renamed set_rename.
4615 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4617 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4618 of the decl from the previous commit.
4620 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4622 * graphite-scop-detection.c (dot_scop): New.
4623 * graphite-scop-detection.h (dot_scop): Declared.
4625 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4627 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4629 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4631 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4632 condition at the end of the loop.
4633 * graphite.c (graphite_initialize, graphite_finalize): Print to
4634 dump_file the compiled function.
4635 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4636 of create_empty_loop_on_edge.
4637 (translate_clast): Update the code generation of loops for the new
4639 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4641 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4643 Reverted the patch from 2009-03-19.
4645 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4647 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4649 (print_scop): Style.
4650 * graphite-poly.h (poly_bb): Add drs vector.
4651 (PBB_DRS): Add accessor.
4652 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4653 (build_access_matrix_with_af, build_access_matrix,
4654 build_scop_data_accesses): Delete.
4655 (build_poly_dr): New.
4656 (build_pbb_drs, build_scop_drs): New.
4657 (build_poly_scop): call build_scop_drs.
4659 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4661 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4662 once per basic block.
4664 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4666 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4667 (graphite_can_represent_expr): Renamed from loop_affine_expr
4669 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4670 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4671 (scopdet_basic_block_info): Actually define entry_block.
4672 (stmt_simple_memref_p): Moved here from ...
4674 * tree-data-ref.c (stmt_simple_memref_p): here.
4675 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4677 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4679 * gcc.dg/graphite/id-4.c: New.
4681 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4683 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4684 (register_old_and_new_names): Update the content of the map.
4685 When there was already a rename_map_elt in the map at that
4687 (copy_bb_and_scalar_dependences): Do rename_variables after
4688 expand_scalar_variables.
4689 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4690 of the map. When there was already a rename_map_elt in the
4691 map at that location, free it.
4692 (translate_clast): Pass the rename_map. Do not initialize and free
4693 a rename_map per stmt_user.
4694 (gloog): Initialize and free one rename_map and pass it to
4697 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4699 * sese.c (expand_scalar_variables_stmt,
4700 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4702 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4703 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4704 the gimple_stmt_iterator of the statement to be expanded.
4705 * graphite-scop-detection.c (is_simple_operand): Do handle
4708 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4710 * graphite-scop-detection.c (is_simple_operand): Do not handle
4712 * gcc.dg/graphite/id-2.c: New.
4714 * graphite-sese-to-poly.c (build_bb_loops,
4715 add_value_to_dim, scan_tree_for_params_right_scev,
4716 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4717 find_params_in_bb, build_loop_iteration_domains,
4718 add_conditions_to_domain): Remove subtract.
4720 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4722 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4723 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4724 pbb_loop_at_index -> gbb_loop_at_index.
4725 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4726 (debug_loop_vec): Delete.
4727 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4728 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4729 (PBB_LOOPS): Removed.
4730 (PBB_BLACK_BOX): Insert cast.
4731 (pbb_set_black_box): New setter.
4732 (pbb_loop_at_index, pbb_loop_index): Removed.
4733 (scop_set_region, scop_set_nb_params): New.
4734 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4735 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4736 (build_poly_scop): Use scop_set_nb_params.
4737 * sese.h (gimple_bb): Add LOOPS.
4738 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4740 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4742 Revert previous commit.
4744 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4746 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4747 (register_old_and_new_names): Update the content of the map.
4748 When there was already a rename_map_elt in the map at that
4750 (copy_bb_and_scalar_dependences): Do rename_variables after
4751 expand_scalar_variables.
4752 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4753 of the map. When there was already a rename_map_elt in the
4754 map at that location, free it.
4755 (translate_clast): Pass the rename_map. Do not initialize and free
4756 a rename_map per stmt_user.
4757 (gloog): Initialize and free one rename_map and pass it to
4760 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4762 Remove forgotten line in revert.
4764 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4766 Revert previous commit.
4768 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4770 * sese.c (register_old_and_new_names): Update the content
4771 of the map. When there was already a rename_map_elt in the
4772 map at that location, free it.
4773 (copy_bb_and_scalar_dependences): Do rename_variables after
4774 expand_scalar_variables.
4775 * graphite-clast-to-gimple.c (build_iv_mapping): 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 (translate_clast): Pass the rename_map. Do not initialize and free
4779 a rename_map per stmt_user.
4780 (gloog): Initialize and free one rename_map and pass it to
4783 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4785 * graphite-clast-to-gimple.c (translate_clast): context_loop
4788 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4789 Sebastian Pop <sebastian.pop@amd.com>
4791 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4792 of the use of ppl_Polyhedron_map_space_dimensions.
4794 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4795 Sebastian Pop <sebastian.pop@amd.com>
4797 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4798 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4799 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4800 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4801 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4802 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4803 pbb_nb_params): New.
4804 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4805 nb_loops_around_pbb): Adapt return types.
4807 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4809 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4810 graphite-clast-to-gimple.o, graphite-data-ref.o,
4811 graphite-scop-detection.o, graphite-poly.o): Add
4814 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4816 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4817 graphite-clast-to-gimple.o, graphite-data-ref.o,
4818 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4820 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4822 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4823 * gcc.dg/graphite/pr37828.c: Same.
4824 * gcc.dg/graphite/pr37684.c: Same.
4825 * gcc.dg/graphite/block-0.c: Same.
4826 * gcc.dg/graphite/block-1.c: Same.
4827 * gcc.dg/graphite/block-2.c: Same.
4828 * gcc.dg/graphite/block-3.c: Same.
4829 * gcc.dg/graphite/block-4.c: Same.
4830 * gcc.dg/graphite/block-5.c: Same.
4831 * gcc.dg/graphite/block-6.c: Same.
4832 * gfortran.dg/graphite/pr38083.f90: Same.
4833 * gfortran.dg/graphite/block-1.f90: Same.
4834 * gfortran.dg/graphite/block-3.f90: Same.
4835 * gfortran.dg/graphite/pr37852.f90: Same.
4836 * gfortran.dg/graphite/block-4.f90: Same.
4837 * gfortran.dg/graphite/pr37980.f90: Same.
4838 * gfortran.dg/graphite/pr38953.f90: Same.
4839 * gfortran.dg/graphite/pr37857.f90: Same.
4840 * opts.c: Remove -floop-block from -O2.
4841 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4842 -floop-strip-mine are used.
4844 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4845 Sebastian Pop <sebastian.pop@amd.com>
4847 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4849 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4850 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4851 strip_mine_profitable_p, is_interchange_valid,
4852 graphite_trans_bb_block, graphite_trans_loop_block,
4853 graphite_trans_scop_block): Temporary removed.
4854 (extend_scattering, unify_scattering_dimensions): New.
4855 (print_scattering_function, graphite_read_transforms):
4856 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4857 (graphite_generate_scattering_fns): Removed.
4858 (apply_poly_transforms): Cleanup.
4859 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4860 (schedule_to_scattering): Moved.
4861 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4862 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4863 (pbb_nb_scattering): New.
4864 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4865 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4867 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4869 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4870 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4871 -> PBB_TRANSFORMED_SCATTERING.
4872 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4873 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4874 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4875 (check_poly_representation): Do not return bool.
4876 (graphite_transform_loops): Reformat.
4877 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4879 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4881 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4882 debug_pbb_domain, debug_pbb, debug_scop): New.
4883 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4884 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4886 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4889 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4890 when the type precision of the induction variable should be
4891 larger than the type precision of nit.
4892 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4893 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4894 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4896 * gcc.dg/graphite/pr39335_1.c: New.
4897 * gcc.dg/graphite/pr39335.c: New.
4899 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4901 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4902 SSA_NAMES not struct reduction_info.
4904 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4906 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4908 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4909 Tobias Grosser <grosser@fim.uni-passau.de>
4911 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4912 (free_sese): Free SESE_REDUCTION_LIST.
4913 * sese.h (struct sese): Add field reduction_list.
4914 (SESE_REDUCTION_LIST): New.
4915 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4916 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4918 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4919 Tobias Grosser <grosser@fim.uni-passau.de>
4921 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4924 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4925 Tobias Grosser <grosser@fim.uni-passau.de>
4927 * tree-parloops.c (struct brli, build_reduction_list_info,
4928 analyze_reduction_list, gather_scalar_reductions): New.
4929 (loop_parallel_p): Build a reduction list containing only
4930 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4931 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4932 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4933 * tree-flow.h (gather_scalar_reductions): Declared.
4935 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4938 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4939 number_of_iterations_exit from a gcc_assert.
4941 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4942 Jan Sjodin <jan.sjodin@amd.com>
4944 * output.h (graphite_out_file, graphite_in_file): Declared.
4945 * toplev.c (graphite_out_file, graphite_in_file): New.
4946 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4947 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4948 Don't call schedule_to_scattering.
4949 * common.opt (fgraphite-write, fgraphite-read): New.
4950 * graphite-poly.c: Include output.h.
4951 (print_scattering_function, print_scattering_functions,
4952 debug_scattering_function, debug_scattering_functions,
4953 graphite_write_transforms, graphite_read_transforms,
4954 graphite_generate_scattering_fns): New.
4955 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4956 Call graphite_generate_scattering_fns, graphite_write_transforms,
4957 graphite_read_transforms.
4958 (new_poly_bb): Initialize PBB_SCATTERING.
4959 (free_poly_bb): Free PBB_SCATTERING.
4960 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4961 * graphite-poly.h (struct poly_bb): Add field scattering.
4962 (PBB_SCATTERING): New.
4963 (print_scattering_function, print_scattering_functions,
4964 debug_scattering_function, debug_scattering_functions): Declared.
4965 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4966 GMP values, not integers!
4967 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4968 ppl_read_polyhedron_matrix): New.
4969 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4970 debug_ppl_polyhedron_matrix,
4971 ppl_read_polyhedron_matrix): Declared.
4972 * Makefile.in (graphite-poly.o): Depends on output.h.
4974 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4975 Tobias Grosser <grosser@fim.uni-passau.de>
4978 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4979 scalar evolutions in the scop_entry->loop_father.
4981 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4982 Tobias Grosser <grosser@fim.uni-passau.de>
4984 * graphite.h (ref_nb_loops): Remove declaration.
4985 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4986 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4987 debug_gbb): Moved to sese.h.
4990 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4991 Tobias Grosser <grosser@fim.uni-passau.de>
4993 * graphite-data-ref.[ch]: Disable.
4995 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4996 Tobias Grosser <grosser@fim.uni-passau.de>
4998 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4999 scalar evolutions in the scop_entry->loop_father.
5001 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5003 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5004 (graphite_cannot_represent_loop_niter): Renamed
5005 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5006 (limit_scops): build_sese_loop_nests does not return a bool.
5007 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5008 * sese.c (nb_reductions_in_loop): ... from here.
5009 (graphite_loop_normal_form): ... from here.
5010 (sese_record_loop): Does not fail, so does not return a bool.
5011 (build_sese_loop_nests): Same.
5012 * sese.h (build_sese_loop_nests): Update declaration.
5013 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5014 (build_graphite_loop_normal_form): New.
5015 (gloog): Call build_graphite_loop_normal_form.
5016 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5017 build_sese_loop_nests.
5019 * gcc.dg/graphite/id-1.c: New.
5021 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5022 Tobias Grosser <grosser@fim.uni-passau.de>
5024 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5025 The SCoP detection fix is sufficient.
5027 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5029 PR tree-optimization/39260
5030 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5031 the basic block contains a condition with a real type.
5032 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5034 * gcc.dg/graphite/pr39260.c: New.
5036 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5038 * graphite-poly.c: Inlcude params.h.
5039 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5041 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5042 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5044 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5045 Tobias Grosser <grosser@fim.uni-passau.de>
5047 * graphite-scop-detection.c (dot_all_scops_1,
5048 dot_all_scops): Moved here.
5049 * graphite-scop-detection.h (dot_all_scops): Declared here.
5050 * graphite.c (graphite_initialize, graphite_finalize): New.
5051 (graphite_transform_loops): Cleaned up.
5052 * sese.c (debug_oldivs): Moved here.
5053 * graphite-poly.c (graphite_apply_transformations): Renamed
5054 apply_poly_transforms.
5055 (debug_loop_vec): Moved here.
5056 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5057 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5058 find_scop_parameters, build_scop_iteration_domain,
5059 add_conditions_to_constraints, build_scop_canonical_schedules,
5060 build_scop_data_accesses): Now static.
5061 (build_poly_scop, check_poly_representation): New.
5063 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5065 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5066 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5067 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5068 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5069 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5070 scan_tree_for_params, struct irp_data, dx_record_params,
5071 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5072 build_loop_iteration_domains, add_conditions_to_domain,
5073 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5074 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5075 build_sese_conditions, add_conditions_to_constraints,
5076 build_scop_iteration_domain, build_access_matrix_with_af,
5077 build_access_matrix,
5078 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5080 * graphite-sese-to-poly.c: New.
5081 * graphite-sese-to-poly.h: New.
5083 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5085 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5087 * graphite.c: Split graphite code generation to a new file.
5088 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5089 max_precision_type, clast_to_gcc_expression_red,
5090 clast_to_gcc_expression, gcc_type_for_clast_expr,
5091 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5092 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5093 graphite_create_new_guard, clast_get_body_of_loop,
5094 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5095 graphite_create_new_loop, build_iv_mapping, copy_renames,
5096 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5097 compute_cloog_iv_types, free_scattering, save_var_name,
5098 initialize_cloog_names, build_scop_context, build_cloog_prog,
5099 set_cloog_options, debug_clast_stmt, scop_to_clast,
5100 print_generated_program, debug_generated_program,
5101 gloog): Moved to graphite-clast-to-gimple.c.
5103 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5105 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5106 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5107 loop_iv_stack_pop, loop_iv_stack_get_iv,
5108 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5109 free_loop_iv_stack, loop_iv_stack_remove_constants,
5110 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5111 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5112 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5113 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5114 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5115 get_vdef_before_sese, sese_adjust_vphi,
5116 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5117 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5118 is_iv, expand_scalar_variables_ssa_name,
5119 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5120 expand_scalar_variables, rename_variables, remove_condition,
5121 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5122 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5123 default_liveout_before_guard, add_guard_exit_phis,
5124 insert_guard_phis, register_old_and_new_names,
5125 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5126 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5127 if_region_set_false_region, create_if_region_on_edge,
5128 move_sese_in_condition): Moved to sese.c.
5130 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5131 if_region_exit, if_region_get_condition_block,
5132 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5133 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5134 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5135 ivtype_map_elt, new_ivtype_map_elt,
5136 recompute_all_dominators): Moved to sese.h.
5138 * graphite-clast-to-gimple.c: New.
5139 * graphite-clast-to-gimple.h: New.
5140 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5141 * sese.c: Modified as said above.
5144 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5146 * graphite.c: Split scop detection to a new file.
5147 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5148 move_sd_regions, loop_affine_expr, exclude_component_ref,
5149 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5150 graphite_cannot_represent_loop_niter, struct scopdet_info,
5151 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5152 find_single_entry_edge, find_single_exit_edge,
5153 create_single_entry_edge, sd_region_without_exit,
5154 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5155 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5156 Moved to graphite-scop-detection.c.
5158 * graphite-scop-detection.c: New.
5159 * graphite-scop-detection.h: New.
5160 * Makefile.in: Add new rule for graphite-scop-detection.o.
5162 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5163 tree-scalar-evolution.h.
5164 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5165 build_sese_loop_nests): Moved here from graphite.c.
5166 (param_index): Renamed parameter_index_in_region.
5168 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5169 Sebastian Pop <sebastian.pop@amd.com>
5171 * gcc.dg/graphite/block-0.c: Expected to fail now.
5172 * gcc.dg/graphite/block-1.c: Same.
5173 * gcc.dg/graphite/block-5.c: Same.
5174 * gcc.dg/graphite/block-6.c: Same.
5176 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5177 Sebastian Pop <sebastian.pop@amd.com>
5179 * graphite.h: Separate from graphite_bb_p the polyhedral
5180 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5181 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5182 graphite-data-ref.h.
5183 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5184 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5185 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5186 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5187 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5188 scop_nb_params): Moved to graphite-poly.h.
5189 * graphite-data-ref.c: Same.
5190 * graphite-data-ref.h: New.
5192 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5193 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5194 is_interchange_valid, graphite_trans_bb_block,
5195 graphite_trans_loop_block, scop_max_loop_depth,
5196 graphite_trans_scop_block, graphite_apply_transformations,
5197 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5199 * graphite-poly.h: New.
5200 * graphite-poly.c: New.
5201 * Makefile.in (OBJS-common): Add graphite-poly.o.
5202 (graphite-poly.o): New rule.
5203 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5206 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5207 Tobias Grosser <grosser@fim.uni-passau.de>
5209 * graphite.c: Replace gb -> gbb.
5211 * graphite-data-ref.c: Same.
5213 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5214 Tobias Grosser <grosser@fim.uni-passau.de>
5216 * Makefile.in (OBJS-commmon): Add sese.o.
5218 (graphite.o): Add sese.h.
5219 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5220 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5221 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5223 (block_before_scop): Add missing return.
5224 (new_scop, free_scop): Remove SESE data structures.
5225 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5226 find_scop_parameters, build_loop_iteration_domains,
5227 add_conditions_to_domain, register_scop_liveout_renames,
5228 copy_bb_and_scalar_dependences): Scop -> SESE.
5230 (add_conditions_to_domain): SCoP -> SESE and remove check
5231 (scop_contains_non_iv_scalar_phi_nodes): New.
5232 (build_scop_conditions_1, build_scop_conditions): Remove check for
5233 non iv scalar phi nodes.
5234 (print_scop_statistics): New.
5235 (graphite_transform_loops): Cleanup.
5237 * graphite.h: Move to sese & cleanup.
5241 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5242 Tobias Grosser <grosser@fim.uni-passau.de>
5244 * graphite.c (build_scop_conditions_1): Conditions are only
5245 at the end of a basic block.
5247 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5248 Tobias Grosser <grosser@fim.uni-passau>
5250 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5252 (GBB_ALPHA): Removed.
5254 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5255 Tobias Grosser <grosser@fim.uni-passau.de>
5257 * graphite-data-ref.c (graphite_test_dependence): Don't use
5258 GBB_DYNAMIC_SCHEDULE.
5259 * graphite.c (new_graphite_bb): Same.
5260 (free_graphite_bb): Same.
5261 (build_scop_dynamic_schedules): Removed.
5262 (graphite_transform_loops): Don't call it.
5263 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5264 (GBB_DYNAMIC_SCHEDULE): Removed.
5266 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5267 Tobias Grosser <grosser@fim.uni-passau.de>
5269 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5270 (print_graphite_bb): Same.
5271 (build_cloog_prog): Same.
5273 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5274 Tobias Grosser <grosser@fim.uni-passau.de>
5276 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5278 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5279 Tobias Grosser <grosser@fim.uni-passau.de>
5281 * graphite.c (build_scop_context): Don't use CloogMatrix.
5282 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5283 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5285 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5286 Tobias Grosser <grosser@fim.uni-passau.de>
5288 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5289 liveout_renames, add_params fields...
5290 (struct sese): ... here.
5291 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5292 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5294 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5295 Tobias Grosser <grosser@fim.uni-passau.de>
5297 * graphite.c (print_scop): Do not print the CLooG program.
5298 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5299 build_cloog_prog, gloog): Don't use SCOP_PROG.
5300 (find_transform): Renamed scop_to_clast.
5301 (print_generated_program, debug_generated_program): New.
5302 (graphite_transform_loops): Adapt to new interface.
5303 * graphite.h (struct scop): Remove program field.
5304 (SCOP_PROG): Removed.
5305 (print_generated_program, debug_generated_program): Declared.
5307 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5309 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5310 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5311 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5312 free_graphite_bb, build_scop_canonical_schedules,
5313 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5314 schedules are now represented using a ppl_Linear_Expression_t.
5315 * graphite.h (struct graphite_bb): Same.
5316 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5317 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5319 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5321 * graphite.c: Free local memory.
5322 * graphite-ppl.c: Same.
5324 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5326 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5327 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5328 swap_constraint_variables, scale_constraint_variable): Removed.
5329 (graphite_trans_bb_strip_mine): Remove pong.
5330 * graphite-ppl.c: Include missing header files.
5331 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5332 * graphite-ppl.h (ppl_strip_loop): Declared.
5333 * Makefile.in (graphite-ppl.o): Adjust dependences.
5335 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5337 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5338 (build_scop_iteration_domain): Same.
5340 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5342 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5344 (add_value_to_dim, scan_tree_for_params_right_scev,
5345 scan_tree_for_params_int): New.
5346 * graphite-ppl.c (oppose_constraint): New.
5347 (insert_constraint_into_matrix): Implement missing cases.
5348 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5350 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5352 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5353 use ppl_move_dimension.
5355 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5357 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5360 * graphite-ppl.c: Same.
5361 * graphite-ppl.h: Same.
5363 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5365 Revert last 3 commits.
5367 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5369 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5371 (add_value_to_dim, scan_tree_for_params_right_scev,
5372 scan_tree_for_params_int): New.
5373 * graphite-ppl.c (oppose_constraint): New.
5374 (insert_constraint_into_matrix): Implement missing cases.
5375 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5377 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5379 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5381 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5382 Tobias Grosser <grosser@fim.uni-passau.de>
5384 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5385 use ppl_move_dimension.
5386 * graphite-ppl.c (ppl_move_dimension): New.
5387 * graphite-ppl.h (ppl_move_dimension): Declared.
5389 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5391 * graphite.c: Do not include cloog/cloog.h.
5392 (print_graphite_bb): Remove ping pong, call PPL print function.
5394 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5396 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5397 (graphite.o): Add dependence on graphite-ppl.h.
5398 (graphite-ppl.o): New.
5399 (graphite-data-ref.c): Ping pong between PPL data structures
5401 * graphite-ppl.c: New.
5402 * graphite-ppl.h: New.
5403 * graphite.c: Include graphite-ppl.h.
5404 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5405 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5406 Ping pong between PPL data structures and matrices.
5407 (new_graphite_bb): Create a PPL constraint system.
5408 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5409 (build_loop_iteration_domains): Use PPL functions.
5410 * graphite.h: Include graphite-ppl.h. Fix comments.
5411 (graphite_bb): Use a ppl_Constraint_System_t instead of
5412 CloogMatrix for representing the domain.
5413 (scop): Remove static_schedule.
5414 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5416 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5418 * graphite.c: Fix some comments.
5420 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5423 * graphite.c (if_region_set_false_region): After moving a region
5424 in the false branch of a condition, remove the empty dummy
5426 (gloog): Remove wrong fix for PR38953.
5428 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5430 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5431 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5432 register_bb_in_sese, new_sese, free_sese): Moved.
5433 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5434 outermost_loop_in_scop, build_scop_iteration_domain,
5435 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5436 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5437 Use loop_in_sese_p instead of loop_in_scop_p.
5438 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5439 (free_scop): Do not free SCOP_BBS_B.
5440 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5441 ref_nb_loops): Moved here...
5442 * graphite.h (ref_nb_loops): ... from here.
5443 (struct scop): Remove bbs_b bitmap.
5444 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5445 * gcc.dg/graphite/scop-19.c: New
5447 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5449 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5452 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5454 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5455 eq_loop_to_cloog_loop): Remove.
5456 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5457 * graphite.h (struct scop): Remove loop2cloog_loop.
5458 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5460 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5462 * opts.c (decode_options): Only add graphite options to O2
5463 if we compile with graphite enabled.
5465 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5467 * Merge from mainline (r143163:143684).
5469 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5471 * graphite.c (debug_value): Removed.
5472 * graphite.h (debug_value): Removed.
5474 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5476 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5477 after graphite: pass_copy_prop does not maintain a proper loop closed
5478 SSA form. pass_copy_prop should be fixed.
5480 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5482 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5484 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5486 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5487 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5488 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5491 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5493 * graphite.c (gloog): Return true when code gen succeeded.
5494 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5495 the code of the function did not changed. After cleanup_tree_cfg
5496 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5499 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5501 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5502 gimple_call_lhs is NULL.
5504 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5505 Tobias Grosser <tobi.grosser@amd.com>
5507 * graphite.c (graphite_trans_scop_block): Do not block single
5510 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5511 Tobias Grosser <tobi.grosser@amd.com>
5513 * graphite.c (build_scop_canonical_schedules): Start schedules at
5516 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5517 Tobias Grosser <tobi.grosser@amd.com>
5519 * graphite.c (compare_prefix_loops): New.
5520 (build_scop_canonical_schedules): Rewritten.
5521 (graphite_transform_loops): Move build_scop_canonical_schedules
5522 after build_scop_iteration_domain.
5524 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5525 Tobias Grosser <tobi.grosser@amd.com>
5527 * graphite.c (add_conditions_to_domain): Add the loops to
5528 the dimension of the iteration domain. Do copy the domain
5529 only when it exists.
5530 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5531 (add_conditions_to_constraints): New.
5532 (can_generate_code_stmt, can_generate_code): Removed.
5533 (gloog): Do not call can_generate_code.
5534 (graphite_transform_loops): Call add_conditions_to_constraints
5535 after building the iteration domain.
5537 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5538 Tobias Grosser <tobi.grosser@amd.com>
5539 Jan Sjodin <jan.sjodin@amd.com>
5541 * graphite.c (scan_tree_for_params): On substractions negate
5542 all the coefficients of the term.
5543 (clast_to_gcc_expression_red): New. Handle reduction expressions
5544 of more than two operands.
5545 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5546 (get_vdef_before_scop): Handle also the case of default definitions.
5548 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5551 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5552 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5553 (gloog): Do not call cleanup_tree_cfg.
5554 (graphite_transform_loops): Call cleanup_tree_cfg after all
5555 scops have been code generated.
5557 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5559 * passes.c (init_optimization_passes): Schedule after
5560 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5562 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5564 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5566 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5567 Set the type of an expression to the type of its assign statement.
5568 (expand_scalar_variables_expr): Do not pass loop_p.
5569 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5570 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5571 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5573 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5575 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5576 an expression to the gimple_expr_type of its assign statement.
5577 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5580 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5582 PR tree-optimization/38786
5583 * gcc.dg/graphite/pr38786.c: New.
5584 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5585 the SSA_NAME case of expand_scalar_variables_expr.
5586 (expand_scalar_variables_expr): Also gather the scalar computation
5587 used to index the memory access.
5588 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5589 the gimple_stmt_iterator where it inserts new code.
5591 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5593 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5595 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5597 * opts.c (decode_options): Enable flag_graphite_identity and
5598 flag_loop_block in -O2 and above.
5600 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5602 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5603 Fix merge problem: replace with the file from trunk.
5605 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5607 * Merge from mainline (r141727:143163).
5609 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5610 Jan Sjodin <jan.sjodin@amd.com>
5612 PR tree-optimization/38559
5613 * gcc.dg/graphite/pr38559.c: New.
5615 * graphite.c (debug_value, copy_constraint,
5616 swap_constraint_variables, scale_constraint_variable, ): New.
5617 (get_lower_bound, get_upper_bound): Removed.
5618 (graphite_trans_bb_strip_mine): Clean up this code that works
5619 only for constant number of iterations. Fully copy upper and
5620 lower bound constraints, not only the constant part of them.
5621 * graphite.h (debug_value): Declared.
5623 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5625 PR tree-optimization/38492
5626 PR tree-optimization/38498
5627 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5628 * tree-chrec.h (scev_is_linear_expression): Declared.
5629 * graphite.c (graphite_cannot_represent_loop_niter): New.
5630 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5631 (graphite_loop_normal_form): Use gcc_assert.
5632 (scan_tree_for_params): Use CASE_CONVERT.
5633 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5634 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5635 Use gcc_assert. Discard scops that contain unhandled cases.
5636 (build_scop_conditions): Return a boolean status for unhandled cases.
5637 (strip_mine_profitable_p): Print the loop number, not its depth.
5638 (is_interchange_valid): Pass the depth of the loop nest, don't
5639 recompute it wrongly.
5640 (graphite_trans_bb_block): Same.
5641 (graphite_trans_bb_block): Print tentative of loop blocking.
5642 (graphite_trans_scop_block): Do not print that the loop has been
5644 (graphite_transform_loops): Do not handle scops that contain condition
5647 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5649 * gcc.dg/graphite/block-0.c: Update test.
5650 * gcc.dg/graphite/block-1.c: Same.
5651 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5653 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5654 * gcc.dg/graphite/block-3.c: New.
5655 * gcc.dg/graphite/pr38498.c: New.
5657 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5659 PR tree-optimization/38510
5660 * gcc.dg/graphite/pr38510.c: New.
5661 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5662 (translate_clast): Call recompute_all_dominators before
5664 (gloog): Call recompute_all_dominators before graphite_verify.
5666 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5668 PR tree-optimization/38492
5669 * graphite.c (rename_map_elt, debug_rename_elt,
5670 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5671 rename_map_elt_info, eq_rename_map_elts,
5672 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5673 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5674 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5675 (sese_build_livein_liveouts): New.
5676 (new_sese, free_sese): New.
5677 (new_scop): Call new_sese.
5678 (free_scop): Call free_sese.
5679 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5680 (register_old_new_names): Renamed register_old_and_new_names.
5681 (register_scop_liveout_renames, add_loop_exit_phis,
5682 insert_loop_close_phis, struct igp,
5683 default_liveout_before_guard, add_guard_exit_phis,
5684 insert_guard_phis, copy_renames): New.
5685 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5686 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5687 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5688 (scop_adjust_phis_for_liveouts): New.
5689 (gloog): Call scop_adjust_phis_for_liveouts.
5691 * graphite.h (struct sese): Documented. Added fields liveout,
5693 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5694 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5695 (struct scop): Added field liveout_renames.
5696 (SCOP_LIVEOUT_RENAMES): New.
5698 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5700 PR tree-optimization/38409
5701 * gcc.dg/graphite/pr38409.c: New.
5702 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5704 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5706 * graphite.c (gcc_type_for_cloog_iv): By default return
5708 (graphite_create_new_loop): Don't fold_convert the already
5709 fold_convert-ed expression.
5711 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5713 PR tree-optimization/38446
5714 * gcc.dg/graphite/pr38446.c: New.
5715 * graphite.c (register_bb_in_sese): New.
5716 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5717 looking at the bbs in the region.
5718 * graphite.h (sese): Add region_basic_blocks pointer set to
5719 structure and initialize at the time of defining new scop.
5721 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5723 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5724 (find_params_in_bb): Do not free data refs.
5725 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5727 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5729 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5730 * gcc.dg/graphite/scop-17.c: Same.
5731 * gcc.dg/graphite/block-5.c: New.
5732 * gcc.dg/graphite/block-6.c: New.
5733 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5734 * gcc.dg/graphite/pr37684.c: Same.
5735 * gcc.dg/graphite/block-2.c: Same.
5737 * graphite.c (struct ivtype_map_elt): New.
5738 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5739 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5740 gcc_type_for_cloog_iv): New.
5741 (loop_iv_stack_patch_for_consts): Use the type of the induction
5742 variable from the original loop, except for the automatically
5743 generated loops, i.e., in the case of a strip-mined loop, in
5744 which case there is no original loop: in that case just use
5746 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5747 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5748 (clast_name_to_gcc): Accept params to be NULL.
5749 (clast_to_gcc_expression): Take an extra parameter for the type.
5750 Convert to that type all the expressions built by this function.
5751 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5752 (graphite_translate_clast_equation): Compute the type of the
5753 clast_equation before translating its LHS and RHS.
5754 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5755 (graphite_create_new_loop): Compute the type of the induction
5756 variable before translating the lower and upper bounds and before
5757 creating the induction variable.
5758 (rename_variables_from_edge, rename_phis_end_scop): New.
5759 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5760 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5761 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5762 compute_cloog_iv_types): New.
5763 (gloog): Call compute_cloog_iv_types before starting the
5764 translation of the clast.
5766 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5767 (GBB_CLOOG_IV_TYPES): New.
5768 (debug_ivtype_map): Declared.
5769 (oldiv_for_loop): New.
5771 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5774 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5775 (param_index): Assert if parameter is not know after parameter
5777 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5778 (find_scop_parameters): Mark, that we have finished parameter
5780 (graphite_transform_loops): Move condition detection before parameter
5782 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5783 * gfortran.dg/graphite/pr38459.f90: New.
5785 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5787 * graphite.c (graphite_transform_loops): Always call find_transform ()
5788 in ENABLE_CHECKING. So we test these code paths, even if we do not
5791 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5793 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5794 (print_scop): Ditto.
5796 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5799 Fix gfortran.dg/graphite/id-3.f90.
5800 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5801 regions more than once.
5803 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5805 Fix gfortran.dg/graphite/id-4.f90.
5806 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5809 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5811 Fix gfortran.dg/graphite/id-1.f90.
5812 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5813 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5814 (max_precision_type): New.
5815 (value_clast): Removed.
5816 (clast_to_gcc_expression): Be more careful to types of expressions.
5817 Use max_precision_type and update use of gmp_cst_to_tree.
5818 (graphite_translate_clast_equation): Use max_precision_type.
5819 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5820 use the type of the condition.
5821 (graphite_create_new_loop): Do not use integer_type_node, use the
5822 max_precision_type of lb and ub.
5824 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5826 * graphite.c (build_scops_1): Initialize open_scop.exit
5829 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5831 * gcc.dg/graphite/pr38084.c: New.
5832 * gfortran.dg/graphite/id-1.f90: New.
5833 * gfortran.dg/graphite/id-2.f90: New.
5834 * gfortran.dg/graphite/id-3.f90: New.
5835 * gfortran.dg/graphite/id-4.f90: New.
5836 * gfortran.dg/graphite/pr37857.f90: New.
5838 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5839 Jan Sjodin <jan.sjodin@amd.com>
5840 Harsha Jagasia <harsha.jagasia@amd.com>
5852 * gcc.dg/graphite/pr38073.c: New.
5853 * gcc.dg/graphite/pr37928.c: New.
5854 * gcc.dg/graphite/pr37883.c: New.
5855 * gcc.dg/graphite/pr38125.c: New.
5856 * gfortran.dg/graphite/pr38083.f90: New.
5857 * gfortran.dg/graphite/pr37852.f90: New.
5858 * gfortran.dg/graphite/pr37980.f90: New.
5860 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5861 the number of detected scops. Copy exact same test for loop
5863 * gcc.dg/graphite/block-1.c: Fix the number of expected
5864 loops to be blocked as reductions are not handled.
5865 * gcc.dg/graphite/block-4.c: ...here. New.
5867 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5868 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5870 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5871 * Makefile.in (graphite.o): Depend on value-prof.h.
5872 (graphite.o-warn): Removed -Wno-error.
5873 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5874 to be a NULL pointer. Call update_stmt. Return the newly created
5875 cannonical induction variable.
5877 * graphite.h (debug_rename_map): Declared. Fix some comments.
5879 * graphite.c: Reimplement the code generation from graphite to gimple.
5880 Include value-prof.h.
5881 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5882 (get_old_iv_from_ssa_name): Removed.
5883 (graphite_stmt_p): New.
5884 (new_graphite_bb): Test for useful statements before building a
5885 graphite statement for the basic block.
5886 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5887 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5889 (recompute_all_dominators, graphite_verify,
5890 nb_reductions_in_loop, graphite_loop_normal_form): New.
5891 (scop_record_loop): Call graphite_loop_normal_form.
5892 (build_scop_loop_nests): Iterate over all the blocks of the
5893 function instead of relying on the incomplete information from
5894 SCOP_BBS. Return the success of the operation.
5895 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5896 (add_bb_domains): Removed.
5897 (build_loop_iteration_domains): Don't call add_bb_domains.
5898 Add the iteration domain only to the basic blocks that have been
5899 translated to graphite.
5900 (build_scop_conditions_1): Add constraints only if the basic
5901 block have been translated to graphite.
5902 (build_scop_data_accesses): Completely disabled until data
5903 dependence is correctly implemented.
5904 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5905 (remove_all_edges_1, remove_all_edges): Removed.
5906 (get_new_name_from_old_name): New.
5907 (graphite_rename_variables_in_stmt): Renamed
5908 rename_variables_in_stmt. Call get_new_name_from_old_name.
5909 Use replace_exp and update_stmt.
5910 (is_old_iv): Renamed is_iv.
5911 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5912 Use replace_exp and update_stmt.
5913 (expand_scalar_variables_expr): Same. Use the map to get the
5914 new names for the renaming of induction variables and for the
5915 renaming of variables after a basic block has been copied.
5916 (expand_scalar_variables): Same.
5917 (graphite_rename_variables): Renamed rename_variables.
5918 (move_phi_nodes): Removed.
5919 (get_false_edge_from_guard_bb): New.
5920 (build_iv_mapping): Do not insert the induction variable of a
5921 loop in the renaming iv map if the basic block does not belong
5923 (register_old_new_names, graphite_copy_stmts_from_block,
5924 copy_bb_and_scalar_dependences): New.
5925 (translate_clast): Heavily reimplemented: copy basic blocks,
5926 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5927 At each translation step call graphite_verify ensuring the
5928 consistency of the SSA, loops and dominators information.
5929 (collect_virtual_phis, find_vdef_for_var_in_bb,
5930 find_vdef_for_var_1, find_vdef_for_var,
5931 patch_phis_for_virtual_defs): Removed huge hack.
5932 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5933 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5934 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5935 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5936 if_region_get_condition_block, if_region_set_false_region,
5937 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5938 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5939 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5940 rewrite_into_sese_closed_ssa): New.
5941 (gloog): Remove dead code. Early return if code cannot be
5942 generated. Call cleanup_tree_cfg once the scop has been code
5944 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5945 block loops with less than two loops.
5946 (graphite_apply_transformations): Remove the call to
5947 scop_remove_ignoreable_gbbs.
5948 (limit_scops): When build_scop_loop_nests fails, continue on
5949 the next scop. Fix open_scop.entry.
5950 (graphite_transform_loops): Call recompute_all_dominators: force the
5951 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5952 Call initialize_original_copy_tables and free_original_copy_tables
5953 to be able to copy basic blocks during code generation.
5954 When build_scop_loop_nests fails, continue on next scop.
5955 (value_clast): New union.
5956 (clast_to_gcc_expression): Fix type cast warning.
5958 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5960 * Merge from mainline (r140838:141727).
5962 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5966 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5968 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5972 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5973 exits and conditions.
5974 * gcc.dg/graphite/pr37943.c: New.
5976 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5979 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5981 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5983 * doc/invoke.texi: Fix spaces.
5985 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5987 PR tree-optimization/37891
5988 Reverted last commit.
5989 * graphite.c (create_single_entry_edge): Set
5990 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5992 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5993 Mitul Thakkar <mitul.thakkar@amd.com>
5995 * graphite.c (create_single_entry_edge): Set
5996 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5998 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6000 * doc/invoke.texi: Add -fgraphite-identity.
6001 * graphite.c (graphite_apply_transformations): Check for
6002 -fgraphite-identity.
6003 * toplev.c (process_options): Add flag_graphite_identity.
6004 * tree-ssa-loop.c: Add flag_graphite_identity.
6006 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6008 Undo changes from 2008-10-02:
6009 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6010 operand type when copying the operand to a variable of different type.
6011 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6012 with the IV name after increment.
6014 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6015 Harsha Jagasia <harsha.jagasia@amd.com>
6017 PR tree-optimization/37828
6018 * gcc.dg/graphite/pr37828.c: New.
6019 * graphite.c (graphite_trans_loop_block): Do not loop block
6020 single nested loops.
6022 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6023 Sebastian Pop <sebastian.pop@amd.com>
6025 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6026 rename_map_elt_info, eq_rename_map_elts): New.
6027 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6028 (expand_scalar_variables_expr): Change parameters.
6029 (expand_scalar_variables_stmt): Same.
6030 (expand_scalar_variables): Same.
6031 (graphite_rename_ivs): Rename graphite_rename_variables.
6032 (build_iv_mapping): New.
6033 (translate_clast): Call build_iv_mapping.
6034 * graphite.h (gbb_p): New name.
6036 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6038 PR tree-optimization/37684
6039 * gcc.dg/graphite/pr37684.c: New.
6040 * graphite.c (exclude_component_ref): New.
6041 (is_simple_operand): Call exclude_component_ref.
6043 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6044 Harsha Jagasia <harsha.jagasia@amd.com>
6046 PR tree-optimization/37485
6047 * gcc.dg/graphite/block-2.c: New
6048 * graphite.c (gmp_cst_to_tree): Moved.
6049 (iv_stack_entry_is_constant): New.
6050 (iv_stack_entry_is_iv): New.
6051 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6052 (loop_iv_stack_insert_constant): New.
6053 (loop_iv_stack_pop): Use new datatpype.
6054 (loop_iv_stack_get_iv): Same.
6055 (loop_iv_stack_get_iv_from_name): Same.
6056 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6057 (loop_iv_stack_patch_for_consts): New.
6058 (loop_iv_stack_remove_constants): New.
6059 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6060 (translate_clast): Call loop_iv_stack_patch_for_consts and
6061 loop_iv_stack_remove_constants.
6062 (gloog): Use new datatype. Redirect construction edge to end
6063 block to avoid accidental deletion.
6064 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6066 (union iv_stack_entry_data): New. Data in iv stack entry.
6067 (struct iv_stack_entry): New. Datatype for iv stack entries.
6069 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6071 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6072 operand type when copying the operand to a variable of different type.
6074 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6076 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6077 with the IV name after increment.
6079 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6081 * Merge from mainline (r140164:140838).
6083 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6085 * graphite-data-ref.c: New.
6086 * graphite.c (print_scop): Also dump the dependence graph.
6087 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6088 (new_scop): Initialize SCOP_DEP_GRAPH.
6089 (build_scop_dynamic_schedules): New.
6090 (build_access_matrix_with_af): Fixed column numbering.
6091 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6092 * graphite.h: Add ifndef/define guards against multiple inclusion.
6093 (struct scop): Add dep_graph field.
6094 (SCOP_DEP_GRAPH): Defined.
6095 (ref_nb_loops): Fixed and moved to other position.
6096 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6097 (nb_loops_around_loop_in_scop): New.
6098 (graphite_dump_dependence_graph): Declared.
6099 (graphite_build_rdg_all_levels): Declared.
6100 (graphite_test_dependence): Declared.
6101 * Makefile.in (graphite-data-ref.o): New target.
6103 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6105 * Merge from mainline (139870:140164).
6107 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6109 * Merge from mainline (138275:139870).
6110 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6111 the commits from trunk broke the niter detection.
6113 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6115 * graphite.c: Add more documentation. Fix formatting.
6116 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6117 loop_iv_stack_debug): Moved...
6118 (schedule_to_scattering): Move before use.
6119 (dot_all_scops): Include in "#if 0" the code for system
6122 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6123 loop_iv_stack_debug): ...here.
6125 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6127 * tree-phinodes.c (make_phi_node): Extern.
6128 (add_phi_node_to_bb): New.
6129 (create_phi_node): Call add_phi_node_to_bb.
6130 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6131 (remove_statement): Handle case where stored phi was updated
6132 and is no longer the same.
6133 * graphite.c (is_parameter): New.
6135 (expand_scalar_variables_expr): New.
6136 (expand_scalar_variables_stmt): New.
6137 (expand_scalar_variables): New.
6138 (move_phi_nodes): Create new phi instead of moving old one.
6139 (translate_clast): Call expand_scalar_variables.
6140 (find_vdef_for_var_in_bb): Also scan regular definitions.
6141 (skip_phi_defs): New.
6142 (collect_scop_exit_phi_args): New.
6143 (patch_scop_exit_phi_args): New.
6144 (gloog): Patch phis after scop.
6145 * tree-flow.h: (add_phi_node_to_bb): Declared.
6146 (make_phi_node): Declared.
6148 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6150 * graphite.c (end_scop): Split the entry of the scop when it
6151 is the header of the loop in which the scop is ending.
6152 (build_scops_1, limit_scops): Update uses of end_scop.
6154 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6156 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6157 SCOP_ENTRY or SCOP_EXIT.
6159 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6161 * graphite.c (get_construction_edge): Removed.
6162 (gloog): Construction edge is the scop entry edge.
6164 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6166 * graphite.c (can_generate_for_scop): Removed.
6167 (gloog): Do not call it.
6169 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6171 * graphite.c (new_scop): Entry of a scop is an edge.
6172 Initialize SESE region.
6173 (free_scop): Free SESE region.
6174 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6175 (split_difficult_bb): New, split from end_scop.
6176 (end_scop): Exit of a scop is an edge.
6177 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6178 not automatically updated and thus is always wrong.
6179 * graphite.h (struct sese): New.
6182 (struct scop): New field for a SESE region. Remove entry, exit.
6183 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6184 semantics as before. Moved comment around.
6186 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6187 Sebastian Pop <sebastian.pop@amd.com>
6189 * graphite.c (graphite_transform_loops): Always enable gloog
6190 and find_transform when ENABLE_CHECKING.
6192 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6194 * graphite.c (graphite_transform_loops): Move pretty printer
6195 of SCOPs before doing any transform. Remove call to print_scops
6196 and dot_all_scops_1.
6198 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6200 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6201 (print_graphite_bb): Same.
6203 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6205 * graphite.c (dot_all_scops_1): Cleanup.
6206 (move_scops): Fix comment.
6208 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6210 * graphite.c (build_scop_bbs): Revert commit 139355:
6212 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6213 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6215 * graphite.c (build_scop_bbs): Factor up code.
6217 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6219 * graphite.c (gloog): Update dominator info.
6221 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6223 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6225 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6227 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6229 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6230 (translate_clast): Correct formatting.
6231 * graphite.h (struct num_map): Removed.
6232 (struct graphite_bb): Remove num_map field.
6233 (GBB_INDEX_TO_NUM_MAP): Removed.
6235 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6237 * graphite.c (build_access_matrix_with_af): Fix comments.
6238 (build_scop_data_accesses): Same.
6240 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6242 * graphite.c (build_scop_data_accesses): Don't construct
6243 access matrices. Add a FIXME and an assert condition that
6244 should pass when the access matrices will be needed.
6246 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6248 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6250 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6251 Moved close by free_graphite_bb.
6252 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6253 (new_scop): Move close by free_scop.
6254 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6256 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6258 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6259 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6260 instead of recursive call.
6261 (graphite_translate_clast_equation): New.
6262 (graphite_create_guard_cond_expr): New.
6263 (graphite_create_new_guard): New.
6264 (get_stack_index_from_iv): Removed.
6265 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6266 (get_true_edge_from_guard_bb): New.
6267 (translate_clast): Handle stmt_guard in clast.
6268 (get_construction_edge): Allow construction edge detection for
6269 a scope entry with multiple predecessors if one predecessor is
6270 the immediate dominator of scope entry.
6271 (can_generate_code_stmt): Enable code generation for clast_guard.
6272 (gloog): Use correct context loop. Removed check for post dominators.
6273 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6275 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6277 * graphite.c (remove_dead_loops): Document better which
6280 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6282 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6284 (graphite.o): Also depends on pointer-set.h.
6286 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6288 * graphite.c (scop_record_loop): Fix compile warning.
6290 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6291 Sebastian Pop <sebastian.pop@amd.com>
6293 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6295 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6297 * graphite.c (build_graphite_bb): Initialize bb->aux to
6298 point to the graphite_bb_p.
6299 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6301 (add_bb_domains): Does not use the scop parameter.
6302 (graphite_transform_loops): Clean bb->aux at the end.
6304 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6305 Sebastian Pop <sebastian.pop@amd.com>
6307 * lib/target-supports.exp
6308 (check_effective_target_fgraphite): New.
6310 * gcc.dg/graphite/graphite.exp: Early exit when
6311 check_effective_target_fgraphite returns false.
6312 Set dg-do-what-default to compile.
6313 (scan-graphite-dump-times): Removed.
6314 * gfortran.dg/graphite/graphite.exp: Same.
6316 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6317 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6318 * gcc.dg/graphite/scop-1.c: Same.
6319 * gcc.dg/graphite/scop-2.c: Same.
6320 * gcc.dg/graphite/scop-3.c: Same.
6321 * gcc.dg/graphite/scop-4.c: Same.
6322 * gcc.dg/graphite/scop-5.c: Same.
6323 * gcc.dg/graphite/scop-6.c: Same.
6324 * gcc.dg/graphite/scop-7.c: Same.
6325 * gcc.dg/graphite/scop-8.c: Same.
6326 * gcc.dg/graphite/scop-9.c: Same.
6327 * gcc.dg/graphite/scop-10.c: Same.
6328 * gcc.dg/graphite/scop-11.c: Same.
6329 * gcc.dg/graphite/scop-12.c: Same.
6330 * gcc.dg/graphite/scop-13.c: Same.
6331 * gcc.dg/graphite/scop-matmult.c: Same.
6332 * gcc.dg/graphite/scop-14.c: Same.
6333 * gcc.dg/graphite/scop-15.c: Same.
6334 * gcc.dg/graphite/block-0.c: Same.
6335 * gcc.dg/graphite/scop-16.c: Same.
6336 * gcc.dg/graphite/block-1.c: Same.
6337 * gcc.dg/graphite/scop-17.c: Same.
6338 * gcc.dg/graphite/scop-18.c: Same.
6339 * gfortran.dg/graphite/block-1.f90: Same.
6340 * gfortran.dg/graphite/scop-1.f: Same.
6341 * gfortran.dg/graphite/block-2.f: Same.
6343 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6345 * graphite.c: Fix some XXX comments.
6346 (build_scop_dynamic_schedules): Removed.
6348 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6350 * graphite.h (scop_max_loop_depth): Moved...
6351 * graphite.c (scop_max_loop_depth): ...here.
6352 (remove_all_edges_1): New.
6353 (remove_all_edges): Factored code.
6354 (remove_cond_exprs): Check only the last statement for
6355 a GIMPLE_COND expression.
6357 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6359 * graphite.c (scan_tree_for_params): Early return when the
6360 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6361 (find_scop_parameters): Factor out code.
6362 (graphite_trans_bb_strip_mine): Remove dead code.
6364 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6366 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6367 graphite_trans_bb_move_loop): Factor asserts.
6368 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6369 Do not call calculate_dominance_info and estimate_bb_frequencies.
6371 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6373 * graphite.c (create_loops_mapping, free_loops_mapping,
6374 create_loops_mapping_num, debug_loop_mapping_1,
6375 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6376 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6377 graphite_loops_mapping_add_child_num,
6378 graphite_loops_mapping_insert_child,
6379 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6380 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6381 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6382 create_num_from_index, get_num_from_index,
6383 swap_loop_mapped_depth): Removed.
6384 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6385 (free_scop): Do not call free_loops_mapping.
6386 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6387 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6388 get_loop_mapped_depth.
6389 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6390 (graphite_trans_bb_strip_mine): Same.
6391 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6392 (struct scop): Remove field loops_mapping.
6394 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6395 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6397 * graphite.c (scop_record_loop): Factor out one level of the
6398 condition by early return.
6399 (build_scop_loop_nests): Format following FSF coding style.
6400 (build_scop_dynamic_schedules): Factor out code.
6401 (scopdet_bb_info): Reindent. Default case should not be reachable.
6403 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6404 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6406 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6407 assignments that are not handled as simple operands for now.
6409 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6410 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6412 * graphite.c (build_scop_bbs): Factor up code.
6414 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6415 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6417 * graphite.c (stmt_simple_for_scop_p): Factor code out
6419 (enum gbb_type): New. Group all the GBB_* types under it.
6420 (is_loop_exit): Moved...
6421 (end_scop): Enable BB spliting.
6422 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6423 * cfgloop.h (is_loop_exit): Declared.
6425 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6427 * doc/invoke.texi: Remove strides from examples containing
6428 DO loops when the strides are equal to 1.
6430 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6431 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6433 * graphite.c (graphite_trans_scop_block): Or the result with
6434 the result from graphite_trans_loop_block.
6435 * gcc.dg/graphite/block-1.c: New.
6436 * gfortran.dg/graphite/block-1.f90: New.
6437 * gfortran.dg/graphite/block-2.f: New.
6439 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6441 * graphite.c (graphite_transform_loops): Call cloog_initialize
6444 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6446 * tree-data-ref.c) (stmt_simple_memref_p): New.
6447 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6448 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6449 (is_simple_operand): Call stmt_simple_memref_p.
6451 * gcc.dg/graphite/scop-matmult.c: Updated for not
6452 using pointer arithmetic, as this is optimized by PRE and
6453 makes the code too difficult to analyze.
6455 * gcc.dg/graphite/scop-18.c: Same.
6457 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6459 * gdbinit.in (pgg): New.
6461 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6463 * graphite.c (graphite_trans_loop_block): Fix warning.
6465 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6467 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6469 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6471 * graphite.c (graphite_trans_bb_block): Remove check for
6472 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6473 Check if loop blocking is profitable for every loop, before applying
6475 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6476 if flag_loop_block is set.
6478 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6480 * graphite.c: Add some more documentation for the loop
6483 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6485 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6486 * graphite.c: Format on less than 80 columns.
6489 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6491 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6493 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6495 * doc/invoke.texi (floop-block, floop-strip-mine,
6496 floop-interchange): Update documentation with examples.
6498 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6500 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6502 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6504 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6506 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6507 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6508 * tree-scalar-evolution.c: Revert useless changes.
6509 * tree-phinodes.c: Same.
6512 * tree-vectorizer.h: Same.
6513 * tree-flow.h: Same.
6515 * common.opt (fgraphite): Update documentation.
6517 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6519 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6520 -floop-interchange): Add more text for explaining what each of these
6522 * tree-into-ssa.c (gimple_vec): Moved to...
6523 * graphite.c: Include gimple.h.
6524 (gimple_vec): Moved to...
6525 (del_loop_to_cloog_loop): Removed.
6526 (loop_affine_expr): Do not call create_data_ref when the
6527 operand is a constant.
6528 (new_scop): Use free instead of del_loop_to_cloog_loop.
6529 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6530 * gimple.h (gimple_vec): ... here.
6532 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6534 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6536 (build_loop_iteration_domains): Fail, if latch executions unknown.
6538 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6540 * graphite.c (add_conditions_to_domain): New.
6541 (build_scop_conditions_1): Call add_conditions_to_domain.
6542 (set_cloog_options): Allow to disable optimizations.
6544 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6546 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6547 Do not use walk_dominator_tree.
6548 (find_scop_parameters): Do not use walk_dominator_tree.
6550 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6552 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6553 (idx_record_params): Adapt.
6554 * graphite.h (scop_gimple_loop_depth): New.
6556 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6558 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6559 (scan_tree_for_params): Remove value_init.
6560 (build_scop_context): Remove value_init.
6561 (build_loop_iteration_domains): Remove value_init.
6562 (schedule_to_scattering): Remove value_init.
6563 (graphite_trans_bb_strip_mine): Remove value_init.
6565 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6567 * gcc/graphite.c (limit_scops): New.
6568 (graphite_transform_loops): Add limit SCoPs.
6569 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6570 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6571 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6572 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6573 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6574 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6575 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6576 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6577 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6578 Change loop numbers.
6579 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6580 Change loop numbers.
6581 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6582 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6583 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6584 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6585 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6586 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6587 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6588 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6589 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6590 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6592 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6594 * graphite.c (graphite_transform_loops): Call always find_transform.
6596 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6598 * graphite.c (free_loops_mapping): New.
6599 (stmt_simple_for_scop_p): Fix typo.
6600 (stmt_simple_for_scop_p): Fix tuples functions, that
6602 (free_graphite_bb): Fix some memleaks.
6603 (free_scop): Fix some memleaks.
6604 (scopdet_bb_info): Do not forget some tmp SCoPs.
6605 (find_params_in_bb): Fix some memleaks.
6606 (clast_to_gcc_expression): Fix warning.
6608 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6610 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6611 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6613 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6615 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6616 Move code ifdef-ed HAVE_cloog...
6617 * graphite.c: Include toplev.h.
6619 * Makefile.in (OBJS-common): Always build graphite.o.
6620 (BACKEND): Remove @GRAPHITE@.
6621 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6622 (graphite.o): Depend on TOPLEV_H.
6624 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6626 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6627 Remove typo left from polylib to ppl conversion.
6628 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6630 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6632 * toplev.c (process_options): Move the graphite loop optimization
6634 * tree-ssa-loop.c (graphite_transforms): ... here.
6635 When not configured with CLooG, print to dump_file that
6636 Graphite transforms were not performed.
6637 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6639 * gcc.dg/graphite/*.c: Updated all testcases to use
6640 scan-graphite-dump-times.
6642 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6644 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6645 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6647 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6648 Jan Sjodin <jan.sjodin@amd.com>
6650 * configure: Regenerated.
6651 * omp-low.c (expand_omp_sections): Remove now unused code.
6652 * config.in (HAVE_polylib): Removed.
6653 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6654 (PPLLIBS, PPLINC): Added.
6655 * graphite.c: Replace unsigned with int wherever possible.
6656 Don't access Cloog's data structures, but use accessor functions.
6657 Clast's stmt->type is now implemented as a vtable: change the
6658 switches of stmt->type into ifs.
6659 (polylib/polylibgmp.h): Don't include.
6660 (initialize_dependence_polyhedron,
6661 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6662 statement_precedes_p, test_dependence, build_rdg_all_levels,
6663 dump_dependence_graph): Removed until this code is cleaned up
6665 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6666 (POLYLIBINC): Renamed PPLINC.
6668 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6669 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6670 Jan Sjodin <jan.sjodin@amd.com>
6672 Finish the merge and tuplification of graphite.
6674 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6675 Jan Sjodin <jan.sjodin@amd.com>
6677 Partial merge from mainline (138072:138275).
6678 * graphite.c still has to be tuplified.
6680 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6682 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6683 (create_num_from_index): New.
6684 (get_num_from_index): Also pass in the graphite BB.
6685 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6686 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6687 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6688 (is_interchange_valid): Return false when failing.
6689 * graphite.h (struct num_map): New.
6690 (struct graphite_bb): New field num_map.
6691 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6693 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6695 * graphite.c (dump_gbb_conditions): Print also conditions like
6696 "if (a)". Remove dublicated code and use print_generic_expr ().
6697 (stmt_simple_for_scop_p): Only allow conditions we can handle
6700 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6702 * graphite.h (struct scop): Removed new_ivs field.
6703 (SCOP_NEWIVS): Deleted.
6704 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6705 clast_to_gcc_expression, graphite_create_new_loop):
6706 Removed use of new_ivs.
6708 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6710 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6711 create_loops_mapping_num, debug_loop_mapping_1): New.
6712 (debug_loop_mapping): Call debug_loop_mapping_1.
6713 (get_loop_mapping_for_num,
6714 graphite_loops_mapping_add_child,
6715 graphite_loops_mapping_add_child_num,
6716 graphite_loops_mapping_insert_child,
6717 graphite_loops_mapping_parent,
6718 split_loop_mapped_depth_for_num,
6719 loop_mapped_depth_split_loop): New.
6720 (increment_loop_mapped_depths): Removed.
6721 (swap_loop_mapped_depth_for_num): Reimplemented.
6722 (new_scop): Call create_loops_mapping.
6723 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6724 (translate_clast): Pass the old loop father in parameter, and pass
6725 it to get_old_iv_from_ssa_name.
6726 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6727 can_generate_code, can_generate_for_scop): New.
6728 (graphite_trans_bb_block): Returns false when it fails to transform.
6729 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6731 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6733 Reverted all the changes related to the streamization and
6735 These changes are now tracked in the streamization branch.
6737 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6738 Jan Sjodin <jan.sjodin@amd.com>
6740 * graphite.c (gbb_compare): Correctly constify.
6741 (gbb_can_be_ignored): Indent.
6742 (graphite_trans_scop_swap_1and2): Add legality check.
6745 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6747 Remove fallouts from "Reverted the Condate changes".
6748 * tree.h: Remove unused decl.
6749 * gcc.dg/tree-checker: Same.
6750 * timevar.def: Remove counter.
6752 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6754 * Merge from mainline (135673:138072).
6756 Reverted the MIRO changes (from 2008-04-05) that are now
6757 tracked in the miro branch.
6758 * tree-bounds.c: Removed.
6759 * tree-bounds.h: Removed.
6761 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6762 are now tracked in the condate branch.
6763 * tree-check.c: Removed.
6764 * tree-match.c: Removed.
6765 * condate.y: Removed.
6767 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6769 * common.opt: New user flag -floop-block, -floop-strip-mine
6770 and -floop-interchange.
6771 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6772 graphite loop optimization flags is turned on.
6773 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6774 flag_loop_strip_mine and flag_loop_interchange checks before
6776 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6777 -floop-strip-mine and -floop-interchange.
6778 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6780 * gcc.dg/graphite/scop-16.c: Ditto.
6781 * gcc.dg/graphite/scop-17.c: Ditto.
6782 * gcc.dg/graphite/scop-18.c: Ditto.
6784 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6785 Sebastian Pop <sebastian.pop@amd.com>
6787 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6788 (create_empty_loop_on_edge): More fixes.
6789 * tree-phinodes.c (resize_phi_node): Extern.
6790 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6791 * cfghooks.c (update_dominator_information): New split from
6793 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6794 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6795 successor of the function entry block.
6797 * graphite.c: Include pointer-set.h.
6798 (debug_loop_mapping, increment_loop_mapped_depths,
6799 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6800 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6801 swap_loop_mapped_depth_for_num, get_num_from_index,
6802 swap_loop_mapped_depth, loop_iv_stack_debug,
6803 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6804 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6805 get_old_iv_from_ssa_name): New.
6806 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6807 (free_scop): Free SCOP_LOOPS_MAPPING.
6808 (scop_record_loop): Record old ivs.
6809 (create_var_name): Removed.
6810 (initialize_cloog_names): Allocate double space in case strip mine
6811 applies to all loops once.
6812 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6813 (clast_to_gcc_expression): Same. Implement more clast to gimple
6815 (graphite_create_new_loop): Pass in ivstack.
6816 (remove_all_edges): Pass in the construction_edge.
6817 (graphite_remove_iv): Removed.
6818 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6819 remove_cond_exprs): Rewritten.
6820 (move_phi_nodes): New.
6821 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6822 (translate_clast): Pass in ivstack. Rewrite some cases.
6823 (set_cloog_options, debug_clast_stmt): New.
6824 (find_transform): Use set_cloog_options.
6825 (outermost_loop_layer): Removed.
6826 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6827 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6828 mark_old_loops, remove_dead_loops): New.
6830 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6831 (const_column_index, get_first_matching_sign_row_index,
6832 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6833 get_upper_bound): New.
6834 (graphite_trans_bb_strip_mine): Also update the iv map.
6836 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6837 (struct name_tree): Add a loop field.
6838 (struct scop): Add a graphite_loops_mapping field.
6839 (SCOP_LOOPS_MAPPING): New.
6840 (debug_clast_stmt): Declare.
6841 * lambda.h (find_induction_var_from_exit_cond): Declare.
6842 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6843 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6844 (create_empty_loop_on_edge): Updated.
6845 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6846 rename_variables_in_bb): Declare.
6847 * tree-cfg.c (remove_bb): Extern.
6849 * gcc.dg/graphite/block-0.c: New.
6851 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6852 Sebastian Pop <sebastian.pop@amd.com>
6854 * graphite.c (strip_mine_profitable_p): New.
6855 (graphite_trans_bb_block): Disable strip mining if not profitable.
6857 * gcc.dg/graphite/scop-18.c: New.
6858 * gcc.dg/graphite/scop-17.c: Fixed.
6859 * gcc.dg/graphite/scop-16.c: Fixed.
6861 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6862 Jan Sjodin <jan.sjodin@amd.com>
6863 Sebastian Pop <sebastian.pop@amd.com>
6865 * graphite.c (is_interchange_valid): New.
6866 (graphite_trans_bb_block): Check loop nest of basic block for legality
6869 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6870 outer_most_loop, gbb_outer_most_loop_index): New.
6872 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6873 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6874 * gcc.dg/graphite/scop-16.c: New.
6875 * gcc.dg/graphite/scop-17.c: New.
6877 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6879 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6880 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6882 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6884 * graphite.c (new_scop): Initialize SCOP_EXIT.
6885 (scopdet_info): Add.
6886 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6887 (build_scops_1): Cleanup, bugfixes.
6888 (build_scops): Cleanup.
6890 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6891 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6893 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6895 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6897 * gfortran.dg/graphite/graphite.exp: Use
6898 DEFAULT_GRAPHITE_FLAGS.
6900 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6902 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6904 * graphite.c (scan_tree_for_params): Do not assert any more if
6905 MULT_EXPR parameter is negative.
6907 * gfortran.dg/graphite/scop-1.f: New.
6909 * gfortran.dg/graphite/graphite.exp: New.
6911 * gcc.dg/graphite/scop-15.c: New.
6913 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6915 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6917 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6919 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6920 graphite_swap_loops.
6921 (graphite_trans_bb_move_loop): New.
6922 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6923 (graphite_trans_bb_block): New.
6924 (graphite_trans_loop_block): New.
6925 (graphite_trans_scop_swap_1and2): Rename from
6926 graphite_trans_swap_1and2.
6927 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6928 (graphite_trans_scop_block): New.
6929 (graphite_apply_transformations): Rename from
6930 graphite_transformations.
6932 * gcc.dg/graphite/scop-matmult.c: New.
6934 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6936 * graphite.c (gbb_compare): New.
6937 (graphite_sort_gbbs): New.
6938 (gbb_can_be_ignored): New.
6939 (scop_remove_ignoreable_gbbs): New.
6940 (graphite_transformations): Cleanup and add
6941 scop_remove_ignoreable_gbbs.
6942 * lambda.h (lambda_vector_compare): New.
6944 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6946 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6947 (graphite_swap_loops): int -> unsigned
6948 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6949 (graphite_transformations): New.
6950 (graphite_transform_loops): Move to graphite_transformations.
6951 * graphite.h (gbb_nb_loops): Return unsigned.
6953 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6955 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6956 the domain matrix. This makes scop-0.c work again.
6958 2008-06-20 Richard Guenther <rguenther@suse.de>
6960 * graphite.h: Adjust copyright to GPLv3.
6961 * graphite.c: Likewise.
6962 (stmt_simple_memref_for_scop_p): Split out from ...
6963 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6965 (get_bb_type): Optimize.
6967 (is_bb_addable): Fix memleak, replace is_pred call with
6969 (build_scops): Use current_loops.
6970 (param_index): Fix memleak.
6972 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6974 * graphite.c: Fix formatting.
6976 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6978 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6979 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6980 (create_var_name, save_var_name): Newly defined functions.
6981 (initialize_cloog_names): Part of the code factored out to
6983 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6984 in clast_reduction statement.
6985 (graphite_create_new_loop): Now takes a new parameter
6987 (translate_clast): Now also takes the context_loop and bb_exit
6988 parameters. Rewritten the code so that it creates a gimple code
6989 inside the given context.
6990 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6991 remove_cond_expr, disconnect_cond_expr,
6992 disconnect_virtual_phi_nodes): Newly defined functions.
6993 * graphite.h (struct scop): added old_ivs vector.
6994 SCOP_OLDIVS: New macro.
6996 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6998 * cfgloopmanip.c: Add missing function comments, fix formatting.
7000 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7002 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7003 (create_empty_loop_on_edge): Defined.
7004 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7006 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7007 (update_dominators_in_loop): Declared as extern
7008 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7010 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7012 * graphite.c (print_graphite_bb): Allow changing number of loops
7014 (initialize_cloog_names): Allow changing number of loops.
7015 (build_cloog_prog): Simplify.
7016 (find_transform): Enable cloog option --strides.
7017 (graphite_swap_loops): New.
7018 (graphite_strip_mine_loop): New.
7019 (graphite_trans_swap_1and2): New.
7020 (graphite_trans_strip): New.
7021 (graphite_transform_loops): Add graphite_trans_strip.
7022 * graphite.h (scop_max_loop_depth): New.
7024 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7026 * graphite.c (build_scop_iteration_domain): Remove forgotten
7027 line. (Fixes compile)
7029 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7031 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7032 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7033 (build_bb_loops): New.
7034 (graphite_transform_loops): Add build_bb_loops.
7035 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7037 * graphite.h (graphite_bb): Add loops.
7038 (gbb_nb_loops): New.
7039 (gbb_loop_at_index): New.
7040 (gbb_loop_index): New.
7041 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7042 using nb_params_in_scop.
7044 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7046 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7047 (build_scop_canonical_schedules): Build minimized schedule.
7048 (schedule_to_scattering): Adapt to minimized schedule.
7049 * graphite.h (graphite_bb): Add/Update descriptions.
7051 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7052 Tobias Grosser <grosser@fim.uni-passau.de>
7054 * graphite.c (print_graphite_bb): Add condition printing.
7056 (dump_gbb_conditions): New.
7057 (build_scop_conditions_1): New.
7058 (build_scop_conditions): New.
7059 * graphite.h (graphite_bb): Add conditions.
7061 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7063 * graphite.c (print_graphite_bb):
7064 (free_graphite_bb): New.
7065 (free_scop): Free bbs.
7066 (get_bb_type): Free doms.
7067 (build_scop_context): Free context matrix.
7068 (build_loop_iteration_domains): Remove unused code.
7069 (build_cloog_prog): Free scattering function and blocklist.
7070 (find_transform): Free options.
7072 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7074 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7075 Remove unnecessery cloog data structures. Make a copy of the domain
7076 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7077 unnecessary cloog data structures. Fix memory leaks. Remove insert
7078 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7080 (build_scop_iteration_domain): Remove unnecessary cloog
7081 data structures. Fix memory leaks.
7082 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7083 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7085 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7087 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7089 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7091 * graphite.c (end_scop): Style fix.
7092 (schedule_to_scattering): Style and comment fix.
7094 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7095 * graphite.c (print_graphite_bb): Fix definiton of
7096 schedule_to_scattering.
7097 (initialize_cloog_names): Change nb_scattdims to max loop
7099 (schedule_to_scattering): Take parameter for number of scattering
7101 (build_cloog_prog): Only build as much scattering dimensions as
7104 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7106 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7107 in polyhedron/aermod.f90.
7109 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7110 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7111 Harsha Jagasia <harsha.jagasia@amd.com>
7113 * graphite.c (is_bb_addable): Fix segfault.
7115 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7117 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7118 with multiple exits and conditional handling in edge cases.
7119 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7121 * gcc.dg/graphite/scop-14.c: New.
7123 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7124 Adrien Eliche <aeliche@isty.uvsq.fr>
7126 * graphite.c (is_bb_addable): Add more comments and enhance
7127 readablity of the source code. Fix memory leak.
7128 (is_loop_exit): Fix memory leak.
7130 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7132 * graphite.c (first_loop_in_scop): Deleted.
7133 (setup_cloog_loop): Only walk the loop chain for inner loops.
7134 (build_scop_iteration_domain): Execute setup_cloog_loop for
7135 all loops in the first layer.
7137 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7139 * graphite.c (scan_tree_for_params): Change the way params are
7140 added to be indepenent of the number of loops.
7141 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7143 (build_cloog_prog): Revert to short matrix format.
7145 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7146 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7148 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7151 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7153 * graphite.c (nb_data_refs_in_scop): New.
7154 (graphite_transform_loops): Print more stats: number of
7155 loops, basic blocks and data references per scop.
7157 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7158 Jan Sjodin <jan.sjodin@amd.com>
7160 * graphite.c (loop_affine_expr, idx_record_params,
7161 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7162 instead of instantiate_parameters.
7164 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7166 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7167 add support for parameters, add STATIC_SCHEDULE at the right places,
7170 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7172 * graphite.c (build_scop_loop_nests): Only add the loops, that
7173 are contained completely in the SCoP.
7174 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7175 and the domains are fixed.
7176 (build_scop_canonical_schedules): Add support for bbs not contained
7179 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7181 * graphite.h (scop_contains_loop): Update comments to match
7182 the actual behavior.
7183 (scop_contains_loop): New.
7184 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7186 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7188 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7189 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7192 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7193 Tobias Grosser <grosser@fim.uni-passau.de>
7195 * graphite.c (graphite_transform_loops): Early return when
7196 there are no loops in the function.
7198 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7199 Jan Sjodin <jan.sjodin@amd.com>
7201 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7202 offset of the last loop.
7203 (setup_cloog_loop): Copy the entire outer constraint matrix.
7205 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7206 Jan Sjodin <jan.sjodin@amd.com>
7208 * graphite.c (stmt_in_scop_p, function_parameter_p,
7209 invariant_in_scop_p): Removed.
7210 (scan_tree_for_params): Can be used with no constraint
7211 matrix for gathering parameters.
7212 (idx_record_params): Don't use idx_record_param, instead use
7213 scan_tree_for_params.
7214 (find_scop_parameters): Same.
7215 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7216 Fix the size of loop domains.
7217 (schedule_to_scattering): Exit when the outer loop is not in scop.
7218 (find_transform): Enable build_cloog_prog.
7220 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7221 Jan Sjodin <jan.sjodin@amd.com>
7223 * graphite.c (schedule_to_scattering): Make scattering domains
7224 uniformly of the same size, as required by CLooG 0.14.0 and before.
7226 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7227 Jan Sjodin <jan.sjodin@amd.com>
7229 * graphite.c (schedule_to_scattering): Rewrite, correct the
7230 translation of the scheduling function to scattering.
7231 (build_cloog_prog): Call schedule_to_scattering only once.
7232 * graphite.h (scop_loop_index): Do not fail for loops not
7233 in the scop: return -1.
7235 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7237 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7238 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7239 (setup_cloog_loop): Export GBB_DOMAIN.
7240 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7241 able to rebuild the original control flow.
7242 * graphite.h (graphite_bb): Add domain field and access macro.
7245 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7247 * graphite.c (debug_gbb): New.
7248 (print_scop, build_graphite_bb): Use SCOP_BBS.
7249 (build_scop_bbs): Reimplemented.
7250 (dfs_bb_in_scop_p): Removed.
7251 (build_scop_loop_nests): Reorder loops inserted in
7252 SCOP_LOOP_NEST: outer loops should come first.
7253 (build_scop_canonical_schedules): Reinitialize at zero
7254 the components of the SCOP_STATIC_SCHEDULE for the loops
7255 that have already been parsed.
7257 * graphite.h (debug_gbb): Declared.
7259 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7260 Jan Sjodin <jan.sjodin@amd.com>
7262 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7263 (graphite_loop_to_gcc_loop): Removed.
7264 (remove_all_edges): New.
7265 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7266 (gloog): Remove useless code.
7268 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7270 * graphite.c (get_bb_type): Reworked. We distinguish between
7271 loops with one or multiple exits.
7272 (is_loop_exit): New.
7274 (is_bb_addable): Rework condition handling, now support for case
7275 case statements and loops with multiple exits.
7277 * gcc.dg/graphite/scop-11.c: New.
7278 * gcc.dg/graphite/scop-12.c: New.
7279 * gcc.dg/graphite/scop-13.c: New.
7281 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7283 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7284 we have too many colors.
7286 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7288 * doc/invoke.texi (-ftree-loop-fusion): Document.
7289 * tree-pass.h (pass_loop_fusion): Declared.
7290 * tree-loop-fusion.c: New.
7291 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7292 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7293 * tree-data-ref.h (find_data_references_in_loop): Declared.
7294 * common.opt (ftree-loop-fusion): Declared.
7295 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7297 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7299 * graphite.c (build_access_matrix): Fix typo from the merge.
7301 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7303 * Merge from mainline (130800:135673).
7305 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7307 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7308 Update dominators after splitting.
7310 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7312 * graphite.c (is_bb_addable): Return the harmful statement.
7313 Factor up some code.
7314 (end_scop): New. Splits end of scope bbs on a harmful statement.
7315 (build_scops_1): Call end_scop.
7317 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7319 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7320 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7321 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7322 build_scops_1): Removed.
7323 (build_scops_2): Renamed build_scops_1.
7325 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7327 * graphite.c: Fix formatting.
7329 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7331 * graphite.c (get_bb_type): New.
7333 (build_scops_2): New.
7334 (is_bb_addable): New.
7335 (build_scops): Switch the scop detection.
7336 (build_scop_bbs): Add entry bb to scop.
7337 * graphite.h (struct scop): Update comment.
7339 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7341 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7344 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7346 * gcc.dg/graphite/scop-1.c: Update.
7347 * gcc.dg/graphite/scop-2.c: Update.
7348 * gcc.dg/graphite/scop-4.c: Update.
7349 * gcc.dg/graphite/scop-5.c: Add.
7350 * gcc.dg/graphite/scop-6.c: Add.
7352 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7354 * gcc.dg/graphite/scop-0.c: Add.
7355 * gcc.dg/graphite/scop-7.c: Add.
7356 * gcc.dg/graphite/scop-8.c: Add.
7357 * gcc.dg/graphite/scop-9.c: Add.
7358 * gcc.dg/graphite/scop-10.c: Add.
7360 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7362 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7363 Check affine expressions depending on the outermost loop
7365 (stmt_simple_for_scop_p): Same.
7366 (harmfule_stmt_in_scop): Same.
7368 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7370 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7371 mark entry and exit, that are not part of the SCoP and update HTML
7374 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7376 * graphite.c (basic_block_simple_for_scop_p): Renamed
7378 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7379 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7380 (all_preds_visited_p, all_succs_visited_p,
7381 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7382 scop_end_loop): New.
7383 (build_scops): Do not use dfs_enumerate_from.
7385 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7387 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7389 * graphite.c: Add comments to functions that are missing a
7391 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7393 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7395 * graphite.c (nb_params_in_scop): Moved...
7396 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7397 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7398 (clast_to_gcc_expression): Reduce column size to less than 80.
7399 (graphite_create_iv): Return the new name of the IV.
7400 (find_transform): Set options->esp and options->cpp.
7401 (gloog): Comment out the invalidation of the old loop code.
7402 (initialize_dependence_polyhedron): Replace scop_nb_params with
7405 * graphite.h (nb_params_in_scop): ... here.
7406 (scop_nb_params): Removed.
7407 (loop_domain_dim): Return something even when the loop was not
7408 found in the hash table: avoid ICEing on all the graphite.exp
7411 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7413 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7415 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7416 according to nesting level.
7417 (find_scop_parameters): Call instantiate_parameters.
7418 (scan_tree_for_params): Extend it to handle general affine bounds.
7419 Inner loop bound can depend on outer loop induction variable.
7420 (setup_cloog_loop): tmp variable is allocated on stack. Call
7421 instantiate_parameters with respect to outermost_loop_in_scop.
7422 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7424 (create_empty_loop): Function loopify should be given edge
7425 probability, instead of edge frequency. Dominance relation from
7426 switch_bb to loop_header.
7427 (clast_to_gcc_expression): Added handling of clast_reduction node.
7428 (gloog): New functionality for removing old loop.
7429 (test_dependence): Factored out from build_rdg_all_levels.
7430 (build_rdg_all_levels): Dependence testing factored out to
7431 test_dependence function.
7433 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7434 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7437 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7439 * graphite.c (free_scop, param_index, initialize_cloog_names,
7440 nb_params_in_scop): Use name_tree map instead of just a tree
7441 for keeping track of the variable name associated to that tree.
7442 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7443 clast_to_gcc_expression, graphite_create_iv,
7444 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7445 graphite_stmt_to_gcc_stmt): New.
7446 (gloog): Call these.
7447 * graphite.h (struct name_tree): New.
7448 (struct scop): Use name_tree instead of tree for params.
7449 Store a vector of name_tree for new_ivs.
7451 (scop_nb_params): Use name_tree instead of tree.
7453 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7454 Sebastian Pop <sebastian.pop@amd.com>
7456 * tree-bounds.c: New.
7457 * tree-bounds.h: New.
7458 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7459 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7460 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7464 * c-cppbuiltin.c: Same.
7468 * tree-outof-ssa.c: Same.
7470 * Makefile.in: Same.
7472 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7473 Sebastian Pop <sebastian.pop@amd.com>
7475 * tree-loop-distribution.c (remaining_stmts,
7476 upstream_mem_writes): Removed static variables.
7477 (copy_loop_before, create_bb_after_loop,
7478 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7479 rdg_build_components, rdg_build_partitions,
7480 dump_rdg_partitions): Extern.
7481 (generate_loops_for_partition, generate_code_for_partition): Do not
7483 (already_processed_vertex_p, predecessor_has_mem_write,
7484 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7485 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7486 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7487 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7488 Pass remaining_stmts and upstream_mem_writes as parameters.
7489 (rdg_component): Moved...
7490 (build_rdg_partition_for_component): Do not aggregate components when
7491 flag_streamize_loops is set.
7492 (gen_sequential_loops): New.
7493 (ldist_gen): Call gen_sequential_loops.
7495 * tree-pass.h (pass_loop_streamization): Declared.
7497 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7498 basic blocks when loops structures exist.
7500 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7502 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7504 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7505 eliminate_local_variables_stmt, eliminate_local_variables,
7506 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7507 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7508 of code delimited by two edges in the CFG.
7509 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7510 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7511 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7512 the case of parallelisation of reductions.
7513 (create_loop_fn): Extern.
7514 (create_omp_parallel_region): New.
7516 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7517 dump_data_reference for printing dra and drb.
7518 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7520 (build_rdg): Don't call free_dependence_relations for the moment, as
7521 we attach dependence relations on each edge of the RDG.
7524 * tree-data-ref.h (rdg_component): ...here.
7525 (struct rdg_edge): New field ddr_p relation.
7526 (RDGE_RELATION): New.
7527 (create_bb_after_loop, copy_loop_before,
7528 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7529 rdg_build_partitions, dump_rdg_partitions,
7530 free_rdg_components): Declared.
7532 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7533 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7535 * tree-loop-streamization.c: New.
7537 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7538 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7540 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7542 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7544 * passes.c: Schedule pass_loop_streamization.
7546 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7548 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7551 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7553 * graphite.c (dot_all_scops): Update formatting.
7554 Bbs can now be part of more than one SCoP.
7556 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7558 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7560 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7561 * graphite.h (loop_to_cloog_loop): New.
7563 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7565 * graphite.c (loop_domain_dim, ref_nb_loops,
7566 loop_iteration_vector_dim): New.
7567 (build_access_matrix_with_af, build_access_matrix,
7568 initialize_dependence_polyhedron): Fixed for new matrix layout.
7569 No longer assume that all iteration domains are of the same
7572 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7574 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7575 defined in a loop at depth 0 is invariant.
7576 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7577 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7578 be called at loop depth 0.
7580 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7582 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7583 (down_open_scop): Removed.
7584 (loop_in_scop_p): Redefined.
7585 (scop_affine_expr): New argument: scop.
7586 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7587 a harmful statement ending a scop.
7588 (basic_block_simple_for_scop_p): New argument: scop.
7589 (get_loop_start): Removed.
7590 (new_scop): Initialize SCOP_LOOPS.
7591 (free_scop): Free SCOP_LOOPS.
7592 (succs_at_same_depth, preds_at_same_depth): New.
7593 (end_scop): Test the validity of a scop.
7594 (add_dominators_to_open_scops): New.
7595 (test_for_scop_bound): Call add_dominators_to_open_scops.
7596 Add cases for opening and closing multiple scops.
7597 (build_scops, build_scop_bbs): Iterate over basic blocks in
7599 (build_graphite_bb): Pass scop directly.
7600 (dfs_bb_in_scop_p): New.
7601 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7603 (nb_loops_around_gb): Use loop_in_scop_p.
7604 (schedule_to_scattering): Disabled for the moment the code computing
7605 the "textual order for outer loop".
7607 * graphite.h (struct scop): New field loops.
7609 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7611 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7613 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7614 Sebastian Pop <sebastian.pop@amd.com>
7616 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7617 * common.opt (fstreamize-loops): New.
7618 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7619 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7620 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7621 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7623 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7625 * tree-data-ref.c (build_empty_rdg): New.
7626 (build_rdg): Use it.
7627 * tree-data-ref.h (build_empty_rdg): Declared.
7628 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7629 (find_vertex_for_stmt): Removed.
7630 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7632 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7634 * tree-loop-distribution.c (generate_builtin): After cancelling the
7635 loop tree, also delete basic blocks.
7636 (rdg_flag_uses): Stop recursion when a vertex has already been
7639 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7641 * graphite.c (build_scop_alpha): Removed.
7642 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7643 and dump_dependence_graph to avoid compiler warnings.
7645 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7647 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7648 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7649 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7650 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7651 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7652 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7653 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7654 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7655 dump_dependence_graph): New.
7656 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7658 (struct scop): New field loop2cloog_loop.
7659 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7660 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7662 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7664 * graphite.c (build_graphite_bb): Fix initialization
7665 of the graphite basic block.
7667 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7669 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7670 loop domain matrix. Pass in the number of loops contained in the
7672 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7673 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7674 loops that are not surrounding the current loop are not represented
7675 in the domain constraint matrix.
7676 (build_scop_iteration_domain): Initial domain constraint matrix
7677 contains only the eq/ineq, cst, and scop parameters columns.
7679 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7681 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7682 (print_graphite_bb): Print scattering.
7684 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7686 * graphite.c (initialize_cloog_names): Initialize names of
7687 scattering variables.
7689 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7691 * graphite.c (dot_all_scops_1): Disable debug output while
7694 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7696 * graphite.c (find_transform): Change cloog output language to C.
7698 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7700 * tree-loop-distribution.c (generate_memset_zero,
7701 generate_builtin, generate_code_for_partition,
7702 rdg_flag_all_uses): New.
7703 (rdg_flag_uses): Gather in the same partition the statements defining
7704 the VUSES of the current statement.
7705 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7706 Gather in the same partition not only the stores to the same memory
7707 access, but also the reads.
7708 (ldist_generate_loops): Renamed ldist_gen.
7710 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7711 Tobias Grosser <grosser@fmi.uni-passau.de>
7713 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7714 next pointer, don't use the inner pointer.
7716 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7718 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7719 (find_transform): Call dot_all_1.
7720 * graphite.h (dot_all_scops): Declared.
7722 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7724 * tree-loop-distribution.c: Fix apsi.f ICE.
7725 (create_bb_after_loop): New.
7726 (generate_loops_for_partition): Use it.
7727 * gfortran.dg/ldist-1.f90: New.
7729 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7730 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7732 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7734 * graphite.c (find_transform): Dump cloog program sent to cloog.
7736 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7738 * graphite.c (initialize_cloog_names): Initialize cloog
7741 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7743 * graphite.c (build_scop_context): Fix typo, for the matrix
7744 format: insert '0 >= 0' instead of '-1 >= 0'.
7746 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7748 * Fix merge problems.
7750 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7752 * graphite.c (setup_cloog_loop): Fix typo.
7754 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7756 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7757 * tree-loop-distribution.c: Reimplemented.
7758 * tree-pass.h (pass_loop_distribution): New.
7759 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7761 * graphds.h (struct graph): New field indexes.
7762 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7764 * tree-vect-analyze.c: Remove declaration of static functions when not
7766 * tree-vectorizer.c: Same.
7767 (rename_variables_in_loop): Now extern.
7768 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7769 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7770 calling redirect_edge_and_branch_force.
7772 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7774 * tree-data-ref.c: Don't include tree-chrec.h.
7775 (debug_data_dependence_relations): New.
7776 (dump_data_dependence_relation): Call dump_data_reference on data refs
7778 (same_access_functions): Moved...
7779 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7780 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7781 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7782 struct rdg_vertex_info, ): New.
7783 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7785 (create_rdg_vertices): Initialize the htab of graph->indexes.
7786 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7787 (stmts_from_loop): Don't save LABEL_EXPR.
7788 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7789 hash_stmt_vertex_del): New.
7790 (build_rdg): Initialize rdg->indexes.
7791 (free_rdg, stores_from_loop, ref_base_address,
7792 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7793 have_similar_memory_accesses_1, ref_base_address_1,
7794 remove_similar_memory_refs): New.
7796 * tree-data-ref.h: Include tree-chrec.h.
7797 (debug_data_dependence_relations): Declared.
7798 (same_access_functions): ...here. Now static inline.
7799 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7800 ddr_dependence_level): New.
7801 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7802 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7803 RDG_MEM_READS_STMT): New.
7804 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7805 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7806 rdg_vertex_for_stmt): Declared.
7807 (struct rdg_edge): New field level.
7808 (RDGE_LEVEL, free_rdg): New.
7809 (stores_from_loop, remove_similar_memory_refs,
7810 rdg_defs_used_in_other_loops_p,
7811 have_similar_memory_accesses): Declared.
7812 (rdg_has_similar_memory_accesses): New.
7814 * lambda.h (dependence_level): New.
7815 * common.opt (ftree-loop-distribution): New.
7816 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7817 (print_loop_ir): Renamed print_loops.
7818 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7819 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7820 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7821 (tree-loop-distribution.o): Added.
7822 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7823 (mark_virtual_ops_in_bb): New.
7824 (print_loops_bb, debug_loop_num, debug_loop): New.
7825 * passes.c: Scheduled pass_loop_distribution.
7827 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7829 * graphite.c (scan_tree_for_params): Correct the number of columns
7831 (nb_flat_iterator): New.
7832 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7833 (build_scop_iteration_domain): Correct the number of columns for
7836 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7838 * Merge from mainline (129697:130800).
7840 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7842 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7843 dominated by SCoP's exit.
7844 (graphite_transform_loops): Compute post dominators.
7846 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7848 * Merge from mainline (127169:129697).
7850 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7852 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7853 parameter for the basic block that contains the expression. Use
7854 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7855 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7857 * graphite.h (gbb_loop): New.
7858 (GBB_LOOP): Removed.
7860 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7862 * Makefile.in: Fix merge problem.
7864 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7866 * Merge from mainline (125309:127169).
7867 * tree-loop-distribution.c: Disabled.
7869 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7871 * Merge from mainline (r123693:125309).
7873 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7875 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7877 (correct_modify_p, check_statements, number_of_lvalue_uses,
7878 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7879 instead of MODIFY_EXPR.
7880 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7883 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7885 * tree-loop-distribution.c (struct rdg): Replace arrays by
7886 VECs for edges and vertices.
7887 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7888 (RDGV_NB_PARTITIONS): New.
7889 (PRDG_NBV, PRDG_NBE): Removed.
7890 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7891 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7892 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7894 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7895 Sebastian Pop <sebpop@gmail.com>
7897 * doc/invoke.texi (-ftree-loop-distribution): Document.
7898 * tree-loop-distribution.c: New file.
7899 * tree-pass.h (pass_loop_distribution): Declared.
7900 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7901 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7903 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7904 (DDR_REVERSED_P): New.
7905 * common.opt (-ftree-loop-distribution): New.
7906 * tree-flow.h (distribute_loops): Declared.
7907 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7908 * passes.c (init_optimization_passes): Schedule loop distribution.
7910 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7912 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7913 (print_scop): Don't print when scop is NULL.
7914 (build_scop_context, find_transform): Don't output to stderr.
7916 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7918 * tree-data-ref.c: Don't include graphite.h.
7919 Comment out the code for printing data reference's scop.
7920 (build_access_matrix_with_af): Moved...
7921 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7922 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7923 (print_graphite_bb): Print basic block's schedule.
7924 (print_scop): Don't print the schedule, call cloog's pretty printer.
7925 (bb_in_scop_p): A basic block is in a scop only if it is both
7926 dominated and postdominated by the scop's entry and exit basic blocks.
7927 (function_parameter_p): New.
7928 (invariant_in_scop_p): Use function_parameter_p.
7929 (new_scop, save_scop): New.
7930 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7932 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7933 (loop_in_scop_p): New.
7934 (scop_record_loop): Use loop_in_scop_p.
7935 (build_scop_domain): Renamed build_scop_iteration_domain.
7936 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7937 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7938 setup_cloog_loop, dot_scop_1, dot_scop): New.
7939 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7940 (struct scop): Add a pointer to cloog's representation of a program.
7942 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7944 * doc/invoke.texi (-ftree-check-verbose): Renamed
7945 -ftree-checks-verbose.
7946 * common.opt (flag_tree_check_verbose): Renamed
7947 flag_tree_checks_verbose.
7948 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7950 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7952 * configure: Regenerated.
7953 * config.in: Regenerated.
7954 * tree-ssa-loop.c (graphite_transforms): Execute
7955 graphite_transform_loops only when HAVE_cloog.
7956 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7957 * graphite.c: Include polylibgmp.h and cloog.h.
7958 (graphite_transform_loops): Removed loops parameter.
7959 * tree-flow.h (graphite_transform_loops): Update declaration.
7960 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7961 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7962 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7963 (OBJS-common): Remove dependence on graphite.o.
7964 (BACKEND): Depend on @GRAPHITE@.
7966 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7968 * doc/invoke.texi (-ftree-check-verbose): Documented.
7969 * gcc.dg/tree-checker/tree-checks-1.c: New.
7970 * gcc.dg/tree-checker/tree-checks-2.c: New.
7971 * gcc.dg/tree-checker/tree-checks-3.c: New.
7972 * gcc.dg/tree-checker/tree-checks-4.c: New.
7973 * gcc.dg/tree-checker/tree-checks.exp: New.
7974 * gcc.dg/tree-checker/condates.crp: New.
7975 * common.opt (ftree-checks-verbose): New.
7976 * tree-check.c (tree_check_warning): Move extra stderr output
7977 under control of flag_tree_check_verbose.
7979 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7981 * tree-match.c: Fix comments formatting.
7982 * tree-match.h: Fix comments formatting.
7983 * tree-check.c: Fix comments formatting.
7984 (tree_check_init): Restructure.
7986 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7988 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7990 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7992 * Merge from mainline (r120733:123693).
7994 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7996 * condate.y: New file.
7997 * tree-match.h (struct patt_info_s): New field sign.
7998 (struct condate_s): New field msg.
7999 (normalize_condate, name_condate, add_condate): New.
8000 (conds[], condate_parse): Made extern.
8001 * tree-check.c (tree_check_warning): First arg changed to cond;
8002 warning reformatted.
8003 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8005 (tree_check): Process trivial condates.
8006 (read_delimited_string): Removed.
8007 (print_cond): Print name and msg.
8008 (conds[]): Made extern.
8009 (parse_tree_check_file_once): Rewritten to use the parser in
8011 Processing of option --tree_check_string moved to tree_scan().
8012 * Makefile.in: Added condate.y
8014 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8016 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8017 Use VECs instead of varrays.
8018 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8019 * Makefile.in (pretty-print.o): Depend on vec.h.
8020 * pretty-print.c: Include tree.h and vec.h.
8021 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8022 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8023 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8024 pp_free_list): Use VECs instead of varrays.
8025 * pretty-print.h: Do not include varray.h.
8026 (struct tree_chunk_s): Declaration moved before its use.
8027 (output_buffer): Rename varray field to chunks.
8028 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8029 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8030 save_global_holes): Use VECs instead of varrays.
8031 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8032 * tree-check.c (scan_cfg_stmts, push_node,
8033 print_matching_stmt): Removed.
8034 (tree_check_instance, push_global_holes_if_new, tree_check,
8035 execute_tree_check): Use VECs instead of varrays.
8036 (gate_tree_check): Don't execute the CFG check when basic_block_info
8039 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8041 * Merge from mainline (r115016:120733).
8043 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8045 * Merge from mainline (r117632:117661).
8047 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8049 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8050 * tree-pass.h (TDF_DEBUG, debug_p): New.
8051 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8052 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8053 get_loop_exit_condition, analyze_evolution_in_loop,
8054 analyze_initial_condition, analyze_scalar_evolution,
8055 instantiate_parameters, number_of_latch_executions): Use debug_p.
8056 * tree-chrec.c (chrec_apply): Use debug_p.
8057 * tree-data-ref.c: Include graphite.h.
8058 (dump_data_reference): Print also the access matrix.
8059 (analyze_array, analyze_indirect_ref, init_data_ref,
8060 analyze_offset_expr, address_analysis, object_analysis,
8061 create_data_ref, finalize_ddr_dependent,
8062 non_affine_dependence_relation, analyze_ziv_subscript,
8063 analyze_siv_subscript_cst_affine,
8064 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8065 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8066 analyze_miv_subscript, analyze_overlapping_iterations,
8067 build_classic_dist_vector, subscript_dependence_tester,
8068 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8069 (build_access_matrix_with_af): No longer static.
8070 * tree-data-ref.h (scop_p): ... declaration here.
8071 (data_reference.scop): New field.
8072 (DR_SCOP, DR_ACCESS_MATRIX): New.
8073 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8074 * graphite.c (print_graphite_bb): Call dump_data_references.
8075 (print_scop): Use scop_nb_loops and scop_dim_domain.
8076 (test_for_scop_bound): Use debug_p.
8077 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8079 (scop_loop_index): Moved...
8080 (scop_record_loop): New.
8081 (build_scop_loop_nests): Use scop_record_loop.
8082 (build_scop_domain): Use scop_dim_domain.
8083 (build_access_matrix): Implemented.
8084 (build_scop_canonical_schedules): Use scop_nb_loops.
8085 (build_graphite_bb): Initialize GBB_SCOP.
8086 * graphite.h (scop_p): Moved...
8087 (graphite_bb.scop): New field.
8088 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8089 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8090 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8091 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8092 scop_loop_index): New.
8093 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8095 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8097 * Merge from mainline (r117661:120450).
8099 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8101 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8102 at the first declaration outside the varying loop, instantiate as
8104 * tree-chrec.c (for_each_scev_op): New.
8105 * tree-chrec.h (for_each_scev_op): Declared.
8106 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8107 * tree-data-ref.c (get_references_in_stmt,
8108 find_data_references_in_stmt): New, from trunk.
8109 (find_data_references_in_loop): Use get_references_in_stmt
8110 and find_data_references_in_loop, modified as in trunk.
8111 (build_access_matrix_with_af): New.
8112 * tree-data-ref.h (data_reference): Add a field access_matrix.
8113 (data_ref_loc): New, as in trunk.
8114 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8115 invariant_in_scop_p, param_index, scan_tree_for_params,
8116 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8117 idx_record_param, idx_record_params, build_access_matrix,
8118 build_scop_data_accesses, build_scop_canonical_schedules,
8119 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8120 build_scop_params): New.
8121 * graphite.h (graphite_bb): New.
8122 (scop): Add fields static_schedule, params, loop_nest,
8124 * lambda.h: Declare vecs of lambda_matrix.
8125 * tree-flow.h (print_loop_ir_bb): Declared.
8126 * tree-cfg.c (print_loop_ir_bb): New.
8127 (print_loop): Use print_loop_ir_bb.
8129 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8131 * Merge from mainline (r115016:117632).
8133 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8135 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8136 break due to a warning.
8138 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8140 * graphite.c (print_scops, debug_scops): New.
8141 (graphite_transform): Renamed graphite_find_transform.
8142 * graphite.h (debug_scops): Declared.
8144 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8146 * tree-match.c: Reformat following the GNU style.
8147 * tree-match.h: Reformat following the GNU style.
8148 * tree-pattern.h: Removed empty file.
8149 * Makefile.in: Remove references to tree-pattern.h.
8150 * tree-check.c: Reformat following the GNU style.
8151 (execute_tree_check): Move gate condition code to...
8152 (gate_tree_check): ...here. New function.
8153 (pass_check): Use the gate function.
8155 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8157 * tree-pattern.h: New. Tree pattern matching and checking using
8159 * tree-check.c: New. Tree/CFG checking pass.
8160 * tree-match.c: New. Library for tree pattern matching.
8161 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8162 * toplev.c, flags.h: Add globals for tree-check pass.
8163 * Makefile.in: Integrate the files in tree-check pass.
8164 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8165 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8166 Introduce a "lazy" pretty-print mode.
8167 * tree.c, tree.h: Add tree_name.
8169 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8171 * doc/invoke.texi (-fgraphite): Correct typo.
8172 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8173 use of print_loop_ir.
8174 * gcc.dg/graphite/scop-1.c: New.
8175 * gcc.dg/graphite/scop-2.c: New.
8176 * gcc.dg/graphite/graphite.exp: New.
8177 * graphite.c: Include domwalk.h.
8178 (print_scop): Print only the entry and exit blocks.
8179 (debug_scop): No longer static.
8180 (affine_expr): Fix formating. Return also true when the expression is
8182 (stmt_simple_for_scop_p): Fix formating.
8183 (build_scops): Use domwalk.
8184 (get_loop_start, end_scop, test_for_scop_bound): New.
8185 (graphite_transform_loops): Avoid printing on stderr.
8186 * graphite.h (debug_scop): Declared.
8187 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8188 * Makefile.in (graphite.o): Depend on domwalk.h.
8189 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8190 declarations for static functions.
8191 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8192 controlling output verbosity.
8194 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8195 Plesco Alexandru <shurikx@gmail.com>
8197 * doc/invoke.texi (-fgraphite): Document.
8198 * tree-pass.h (pass_graphite_transforms): Declared.
8199 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8200 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8201 (pass_graphite_transforms): Defined.
8202 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8203 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8204 * graphite.c, graphite.h: New.
8205 * common.opt (fgraphite): Declared.
8206 * tree-flow.h (graphite_transform_loops): Declared.
8207 * Makefile.in (OBJS-common): Add graphite.o.
8208 (graphite.o): New rule.
8209 * passes.c (pass_graphite_transforms): Scheduled.