1 2010-08-14 Riyadh Baghdadi <baghdadi.mr@gmail.com>
3 * toplev.c (process_options): Disable graphite loop optimization
4 options when -fgraphite-read flag is used.
6 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
8 * graphite-poly.c (init_graphite_out_file): New.
9 (init_graphite_in_file): New.
10 (apply_poly_transforms): Updated to enable reading and writing of
12 * toplev.c (init_asm_output): Remove graphite in/out file initialization.
14 2010-08-17 Tobias Grosser <grosser@fim.uni-passau.de>
16 * graphite-scop-detection.c (graphite_can_represent_scev): Remove
19 2010-08-12 Sebastian Pop <sebastian.pop@amd.com>
21 * graphite-clast-to-gimple.c (precision_for_value): Adjust
22 computation of precision by 1.
24 2010-08-12 Riyadh Baghdadi <baghdadi.mr@gmail.com>
26 * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
27 (openscop_read_polyhedron_matrix): New.
28 * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
29 (openscop_read_N_int): Same.
30 * graphite-poly.c (openscop_read_N_int): New.
31 (openscop_read_one_int): New.
32 (openscop_read_N_string): New.
33 (openscop_read_one_string): New.
34 (openscop_read_powerset_matrix): New.
35 (graphite_read_transforms): Remove.
36 (graphite_read_scatt): New.
37 (graphite_read_scop_file): New.
38 (apply_poly_transforms): Updated to call graphite_read_scop_file.
40 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
42 * graphite-poly.c: Change include order.
44 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
46 * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
47 (cloog_matrix_nrows): New.
49 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
51 * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
53 * graphite-poly.c (openscop_print_scattering_function_1): Same.
54 (print_scattering_function_1): Same.
55 (openscop_print_pbb_domain): Same.
56 (openscop_print_scop_context): Same.
57 (print_scop_context): Same.
59 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
61 * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
62 (openscop_print_pdr_polyhedron): Print pph.
64 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
66 * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
67 * gfortran.dg/graphite/graphite.exp: Same.
68 * gcc.dg/graphite/vect-pr43423.c: New.
70 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
72 * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
73 priority signed types.
75 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
77 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
78 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
80 2010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
82 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
83 (openscop_print_polyhedron_matrix): New.
84 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
85 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
86 (openscop_print_pdr_powerset): New.
87 (openscop_print_powerset_matrix): New.
88 (openscop_print_scattering_function_1): New.
89 (print_scattering_function): Add support for scattering names and
91 (graphite_write_transforms): Remove.
92 (apply_poly_transforms): Updated to call print_scop.
93 (print_pdr_access_layout): Updated to support OpenScop format.
95 (openscop_print_pbb_domain): New.
96 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
98 (print_pbb): Updated to call the new print_pbb_body.
99 (openscop_print_scop_context): New.
100 (print_scop_header): New.
101 (print_scop): Updated to call print_scop_header.
102 * graphite-poly.h: Document OpenScop format.
104 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
106 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
107 the case removed in the previous patch, when the only phi argument
108 is defined in the same loop as the phi node itself. Handle it
109 separately from the invariant case by both propagating it outside
110 the region and replacing the phi node with an assign.
112 2010-07-28 Sebastian Pop <sebastian.pop@amd.com>
114 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
115 constant phi nodes with one argument are is_gimple_min_invariant
116 and SSA_NAME_IS_DEFAULT_DEF.
118 * gfortran.dg/graphite/id-22.f: New.
120 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
122 * graphite.c (graphite_initialize): Do not initialize
123 CLooG and initialize the Parma Polyhedra Library
124 manually when using CLOOG_ORG.
125 (graphite_finalize): Do not finalize CLooG and finalize
126 the Parma Polyhedra Library manually when using CLOOG_ORG.
127 * graphite-cloog-compat.h (cloog_initialize): Hide function
128 when using CLOOG_ORG.
129 (cloog_finalize): Same.
131 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
133 * graphite-clast-to-gimple.c (free_scattering): Change
134 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
136 (build_cloog_prog): Same.
137 * graphite-cloog-compat.h (cloog_domain): Removed.
138 (cloog_scattering): New.
139 (cloog_set_domain): Removed.
140 (cloog_set_scattering): New.
141 (cloog_next_domain): Removed.
142 (cloog_next_scattering): New.
143 (cloog_set_next_domain): Removed.
144 (cloog_set_next_scattering): New.
145 (CloogScatteringList): New.
146 (CloogScattering): New.
147 (cloog_scattering_free): New.
148 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
149 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
152 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
154 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
156 (set_cloog_options): Same.
157 (print_clast_stmt): Same.
158 (scop_to_clast): Same.
159 (print_generated_program): Same.
161 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
162 (scop_to_clast): Extend with CloogState.
163 * graphite-cloog-util.c: Include graphite-cloog-compat.h
164 (new_Cloog_Domain_from_ppl_Polyhedron):
165 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
166 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
167 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
168 * graphite-cloog-util.h (build_cloog_prog): Same.
169 * graphite-cloog-copat.h (build_cloog_prog): New.
171 (cloog_state_malloc): New.
172 (cloog_state_free): New.
173 (cloog_loop_malloc): New.
174 (cloog_options_malloc): New.
175 (cloog_statement_alloc): New.
176 (cloog_domain_from_cloog_matrix): New.
177 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
178 (new_Cloog_Domain_from_ppl_Polyhedron): New.
180 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
182 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
183 type of NAME now depends on used CLooG version.
184 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
185 (gcc_type_for_clast_expr): Same.
186 (print_clast_stmt): Replace pprint with clast_pprint.
187 * graphite-cloog-compat.h: Provide compatibility macros for
190 (clast_expr_term): New.
191 (clast_expr_red): New.
192 (clast_expr_bin): New.
195 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
197 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
198 compatible to newer CLooG releases (CLOOG_ORG).
199 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
200 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
201 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
202 (build_cloog_prog) : New.
203 (cloog_program_extract_scalars): New.
204 (cloog_program_scatter): New.
206 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
208 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
209 conditionally (CLOOG_ORG).
210 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
211 (cloog_statement_usr): New.
212 (cloog_domain): Same.
213 (cloog_set_domain): Same.
214 (cloog_next_domain): Same.
215 (cloog_set_next_domain): Same.
216 (cloog_program_nb_scattdims): Same.
217 (cloog_program_set_nb_scattdims): Same.
218 (cloog_program_names): Same.
219 (cloog_program_set_names): Same.
220 (cloog_program_set_context): Same.
221 (cloog_program_set_loop): Same.
222 (cloog_program_blocklist): Same.
223 (cloog_program_set_blocklist): Same.
224 (cloog_program_scaldims): Same.
225 (cloog_program_set_scaldims): Same.
226 (cloog_names_nb_parameters): Same.
227 (cloog_names_set_nb_parameters): Same.
228 (cloog_names_parameters): Same.
229 (cloog_names_set_parameters): Same.
230 (cloog_names_set_nb_iterators): Same.
231 (cloog_names_set_iterators): Same.
232 (cloog_names_set_nb_scattering): Same.
233 (cloog_names_set_scattering): Same.
234 (cloog_statement_set_usr): Same.
235 (cloog_loop_set_next): Same.
236 (cloog_loop_set_domain): Same.
237 (cloog_loop_set_block): Same.
238 (cloog_block_list_next): Same.
239 (cloog_block_list_set_next):
240 (cloog_block_list_set_block): Same.
242 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
244 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
246 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
247 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
248 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
249 when something has been changed.
250 (rewrite_commutative_reductions_out_of_ssa): Same.
252 * gcc.dg/graphite/id-26.c: New.
254 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
256 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
257 handle the case when def is in the sese region.
258 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
259 for invariant expressions.
260 (rewrite_cross_bb_phi_deps): Removed.
261 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
262 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
263 rewrite_cross_bb_phi_deps.
265 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
267 * graphite-sese-to-poly.c
268 (rewrite_commutative_reductions_out_of_ssa_loop): Call
269 scev_analyzable_p only on is_gimple_reg
271 * gcc.dg/graphite/id-25.c: New.
273 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
275 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
276 (rewrite_close_phi_out_of_ssa): Propagate constant values or
277 parametric expressions outside the scop region.
278 (rewrite_cross_bb_scalar_deps): Same.
279 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
281 * gcc.dg/graphite/run-id-5.c: New.
282 * gcc.dg/graphite/run-id-6.c: New.
283 * gfortran.dg/graphite/id-21.f: New.
285 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
287 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
288 SSA_NAME_DEF_STMT only on SSA_NAMEs.
290 * gcc.dg/graphite/id-24.c: New.
292 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
294 * tree-scalar-evolution.c (instantiate_scev_name): Do not
295 instantiate default definitions.
297 2010-07-20 Vladimir Kargov <kargov@gmail.com>
299 * graphite-scop-detection.c (is_valid_stmt_p): New.
300 (is_valid_bb_p): New.
302 2010-07-20 Vladimir Kargov <kargov@gmail.com>
303 Sebastian Pop <sebastian.pop@amd.com>
305 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
306 (loop_exits_from_bb_p): New.
307 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
308 (loop_exits_from_bb_p): Declared.
309 * graphite-scop-detection.c (scopdet_basic_block_info): Call
312 2010-07-20 Vladimir Kargov <kargov@gmail.com>
314 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
316 (dot_regions_1): New.
318 * refined-regions.h (dot_regions): Declared.
319 * Makefile.in (refined-regions.o): Update dependences.
321 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
323 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
324 extra parameter for the region. Call scev_analyzable_p.
325 (rewrite_reductions_out_of_ssa): Update call to
326 rewrite_close_phi_out_of_ssa.
327 (rewrite_cross_bb_phi_deps): Same.
328 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
329 parameter for the region. Call scev_analyzable_p.
330 (rewrite_commutative_reductions_out_of_ssa): Update call to
331 rewrite_commutative_reductions_out_of_ssa_loop.
333 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
335 * gcc.dg/tree-ssa/pr20742.c: New.
337 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
339 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
341 * gcc.dg/graphite/id-23.c: New.
343 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
345 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
346 SSA scalar phi nodes that can be scev_analyzable_p.
348 * gfortran.dg/graphite/id-20.f: Adjust testcase.
350 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
352 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
353 handle SSA_NAME_IS_DEFAULT_DEF.
355 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
357 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
359 * gcc.dg/graphite/pr42729.c: New.
361 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
363 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
364 case non close-phi nodes with one argument.
366 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
368 * sese.h (scev_analyzable_p): Scevs could be expressions without
369 chrecs and still be scev_analyzable_p.
371 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
373 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
375 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
377 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
378 * cfgloop.h (struct loop): Remove single_iv field.
379 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
380 (scop_canonicalize_loops): Removed.
381 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
382 over all the loop phi nodes in loop->header.
383 (build_poly_scop): Remove use of scop_canonicalize_loops.
385 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
387 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
390 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
392 * tree-chrec.c (chrec_apply): Should only apply to the specified
393 variable. Also handle multivariate chains of recurrences that
394 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
396 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
398 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
399 (debug_clast_name_indexes_1): Removed.
400 (debug_clast_name_indexes): Removed.
401 (pbb_to_depth_to_oldiv): Removed.
402 (build_iv_mapping): Replace the use of rename_map with iv_map.
403 (translate_clast_user): Remove uses of rename_map. Allocate and
405 (translate_clast_for_loop): Remove uses of rename_map.
406 (translate_clast_for): Same.
407 (translate_clast_guard): Same.
408 (translate_clast): Same.
410 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
411 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
412 * sese.c (set_rename): Now static.
413 (rename_variables_in_stmt): Removed.
415 (is_parameter): Removed.
417 (expand_scalar_variables_call): Removed.
418 (expand_scalar_variables_ssa_name): Removed.
419 (expand_scalar_variables_expr): Removed.
420 (expand_scalar_variables_stmt): Removed.
421 (expand_scalar_variables): Removed.
422 (rename_variables): Removed.
423 (remove_condition): Removed.
424 (get_true_edge_from_guard_bb): Removed.
425 (get_false_edge_from_guard_bb): Removed.
426 (struct igp): Removed.
427 (default_before_guard): Removed.
428 (convert_for_phi_arg): Removed.
429 (add_guard_exit_phis): Removed.
430 (insert_guard_phis): Removed.
431 (graphite_copy_stmts_from_block): Now also uses iv_map and a
432 region. Do not copy conditions. Do not copy induction variables.
434 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
435 the translated statement. Use the iv_map for the induction
437 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
438 (set_rename): Removed declaration.
439 (scev_analyzable_p): ...here.
440 * tree-chrec.c (chrec_apply_map): New.
441 * tree-chrec.h (chrec_apply_map): Declared.
443 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
445 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
446 insert_loop_close_phis.
447 * sese.c (name_defined_in_loop_p): Removed.
448 (expr_defined_in_loop_p): Removed.
449 (alive_after_loop): Removed.
450 (close_phi_not_yet_inserted_p): Removed.
451 (struct alep): Removed.
452 (add_loop_exit_phis): Removed.
453 (insert_loop_close_phis): Removed.
455 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
457 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
459 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
461 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
463 * gfortran.dg/graphite/id-20.f: New.
465 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
467 * graphite-cloog-util.h: Added cloog.h.
468 * graphite-blocking.c: Removed cloog.h.
469 * graphite-dependences.c: Same.
470 * graphite-interchange.c: Same.
471 * graphite-poly.c: Same.
472 * graphite-ppl.c: Same.
473 * graphite-scop-detection.c: Same.
474 * graphite-sese-to-poly.c:
476 Removed graphite-clast-to-gimple.h.
477 (check_poly_representation): Removed (unused).
478 * graphite-sese-to-poly.h
479 (check_poly_representation): Removed (unused).
481 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
484 (OBJS-common): Added graphite-cloog-util.o.
485 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
486 (graphite-cloog-util.o): New.
487 (graphite-ppl.o): Added graphite-cloog-util.h.
488 * graphite-clast-to-gimple.c:
489 Added graphite-cloog-util.h to include statements.
490 * graphite-cloog-util.c: New.
491 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
492 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
493 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
494 (new_C_Polyhedron_from_Cloog_Matrix): Same.
495 (ppl_Constrain_System_number_of_constraints): Same.
496 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
497 (oppose_constraint): Same.
498 (cloog_matrix_to_ppl_constraint): Same.
499 (new_Constraint_System_from_Cloog_Matrix): Same.
500 (insert_constraint_into_matrix): Same. Declared static.
501 * graphite-cloog-util.h: New.
502 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
503 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
504 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
505 (new_C_Polyhedron_from_Cloog_Matrix): Same.
506 (insert_constraint_into_matrix): Same.
508 Added graphite-cloog-util.h to include statements.
509 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
510 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
511 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
512 (new_C_Polyhedron_from_Cloog_Matrix): Same.
513 (insert_constraint_into_matrix): Same.
514 (ppl_Constrain_System_number_of_constraints): Same.
515 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
516 (oppose_constraint): Same.
517 (cloog_matrix_to_ppl_constraint): Same.
518 (new_Constraint_System_from_Cloog_Matrix): Same.
520 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
521 graphite-cloog-util.h.
522 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
523 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
524 (new_C_Polyhedron_from_Cloog_Matrix): Same.
525 (insert_constraint_into_matrix): Removed.
527 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
529 * graphite-clast-to-gimple.c
530 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
531 (precision_for_interval): Same.
532 (gcc_type_for_interval): Same.
533 (compute_type_for_level): Same.
534 * graphite-interchange.c
535 (lst_interchange_profitable_p): Same.
537 (psct_scattering_dim_for_loop_depth): Same.
539 (ppl_max_for_le_pointset): Same.
540 (ppl_min_for_le_pointset): Same.
542 2010-06-25 Vladimir Kargov <kargov@gmail.com>
544 * refined-regions.c (bb_index_compare): New.
545 (get_bbs_in_region): New.
546 (print_bbs_in_region): New.
547 (print_refined_region): Add an argument that allows to print
548 all basic blocks contained in regions.
549 (debug_refined_region): Update call to print_refined_region.
550 * refined-regions.h (print_refined_region): Update declaration.
551 (get_bbs_in_region): Declared.
552 * graphite-scop-detection.c (build_scops_new): Print the refined
553 region tree into the Grahite dump file.
555 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
557 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
558 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
560 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
562 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
563 rewrite_close_phi_out_of_ssa.
565 * gcc.dg/graphite/id-22.c: New.
567 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
569 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
571 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
573 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
575 * sese.c (debug_rename_map): Same.
578 (rename_variables_in_stmt): Same.
579 (expand_scalar_variables_call): Same.
580 (expand_scalar_variables_ssa_name): Same.
581 (expand_scalar_variables_expr): Same.
582 (expand_scalar_variables_stmt): Same.
583 (expand_scalar_variables): Same.
584 (rename_variables): Same.
585 (graphite_copy_stmts_from_block): Same.
586 (copy_bb_and_scalar_dependences): Same.
588 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
590 * graphite-clast-to-gimple.c (copy_renames): Removed.
591 (translate_clast_for): Do not call copy_renames.
592 (translate_clast_guard): Same.
594 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
596 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
597 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
598 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
599 before rewrite_cross_bb_scalar_deps.
601 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
603 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
604 Early return in when flag_associative_math is not set.
606 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
608 * gcc.dg/graphite/run-id-2.c: Call abort.
610 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
612 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
613 of SSA copies on edges except for loop->latch.
615 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
617 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
618 Split out of rewrite_reductions_out_of_ssa.
619 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
621 * graphite.c (graphite_transform_loops): Call it.
623 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
625 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
627 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
629 * passes.c (init_optimization_passes): Add pass_graphite.
630 Schedule a pass_copy_prop before pass_graphite_transforms.
631 * timevar.def (TV_GRAPHITE): Declared.
632 * tree-pass.h (pass_graphite): Declared.
633 * tree-ssa-loop.c (pass_graphite): New.
635 * gcc.dg/graphite/id-20.c: New.
637 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
639 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
640 Remove calls to rename_nb_iterations and rename_sese_parameters.
641 * graphite-clast-to-gimple.h (gloog): Update declaration.
642 * graphite.c (graphite_transform_loops): Update call to gloog.
643 * sese.c (rename_variables_in_expr): Removed.
644 (rename_nb_iterations): Removed.
645 (rename_sese_parameters): Removed.
646 * sese.h (rename_nb_iterations): Removed.
647 (rename_sese_parameters): Removed.
649 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
651 * graphite-clast-to-gimple.c (gloog): Remove call to
652 sese_adjust_liveout_phis.
653 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
654 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
655 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
656 rewrite_phi_out_of_ssa.
657 * sese.c (get_vdef_before_sese): Removed.
658 (sese_adjust_vphi): Removed.
659 (sese_adjust_liveout_phis): Removed.
660 * sese.h (sese_adjust_liveout_phis): Removed.
662 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
664 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
665 argument for the place after which to insert the out of SSA copy.
666 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
667 (rewrite_phi_out_of_ssa): Same.
668 (rewrite_cross_bb_scalar_deps): Same.
669 (insert_copyout): Removed.
670 (insert_copyin): Removed.
671 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
672 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
675 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
677 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
678 (rewrite_reductions_out_of_ssa): Same.
679 (rewrite_commutative_reductions_out_of_ssa): Same.
680 (build_poly_scop): Do not call these functions.
681 * graphite-sese-to-poly.h (build_poly_scop): Declared.
682 (rewrite_reductions_out_of_ssa): Declared.
683 (rewrite_commutative_reductions_out_of_ssa): Declared.
684 * graphite.c (graphite_transform_loops): Call on every scop
685 rewrite_commutative_reductions_out_of_ssa before calling
686 rewrite_reductions_out_of_ssa and build_scop_bbs.
688 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
690 * graphite-dependences.c (dot_deps): Make system call to dotty run
692 (dot_deps_stmt): Same.
693 * graphite-poly.c (dot_lst): Same.
695 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
697 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
698 old_type in parameter.
699 (gcc_type_for_value): Update call to gcc_type_for_interval.
700 (compute_type_for_level_1): Renamed compute_type_for_level.
701 Update call to gcc_type_for_interval.
703 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
705 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
706 the scev analysis when the variable is not used outside the loop
707 in a close phi node: call compute_overall_effect_of_inner_loop.
709 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
711 * graphite-sese-to-poly.c (single_pred_cond): Renamed
712 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
713 (build_sese_conditions_before): Renamed call to single_pred_cond.
714 (build_sese_conditions_after): Same.
716 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
718 * graphite-poly.h: Fix comments and indentation.
719 * graphite-sese-to-poly.c: Same.
720 (build_sese_conditions_before): Compute stmt and gbb only when needed.
721 * tree-chrec.c: Fix comments and indentation.
722 (tree-ssa-loop-niter.c): Same.
724 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
726 * refined-regions.c (create_region): Only initialize the region.
727 (find_regions_with_entry): Initialize parent relation and bbmap
729 (build_regions_tree): Set outermost_region to region instead of
731 (calculate_region_tree): Remove unneeded parameters.
733 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
735 * graphite-scop-detection.c (is_scop_p): New.
736 (build_scops_new): New. A skeleton for the new scop detection.
737 (build_scops_old): Renamed from build_scops.
738 (build_scops): New version. Call the new and the old scop
741 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
742 Antoniu Pop <antoniu.pop@gmail.com>
744 * Makefile.in (OBJS-common): Add refined-regions.o.
745 (refined-regions.o): New.
746 (graphite-scop-detection.o): Use refined-regions.h.
747 * graphite-scop-detection.c: Include refined-regions.h
748 (build_scops): Also build the refined region tree.
749 * refined-regions.c: New. Adds an algorithm to detect refined
751 (print_refined_region): New.
752 (debug_refined_region): New.
753 (refined_region_contains_bb_p): New.
754 (refined_region_contains_region_p): New.
756 (struct find_regions_global_data): New.
758 (typedef struct bb_bb_def): New.
759 (new_bb_bb_def): New.
760 (bb_bb_map_hash): New.
764 (new_bb_reg_def): New.
765 (bb_reg_map_hash): New.
766 (eq_bb_reg_map): New.
767 (find_new_region): New.
768 (insert_new_reg): New.
769 (insert_new_bb): New.
770 (insert_shortcut): New.
771 (get_next_postdom): New.
772 (create_region): New.
773 (find_regions_with_entry): New.
774 (find_regions_adc): New.
776 (get_topmost_parent): New.
777 (build_regions_tree): New.
778 (calculate_region_tree): New.
779 (free_region_tree): New.
780 * refined-regions.h: New.
781 (struct refined_region): New.
782 (calculate_region_tree): New.
783 (free_region_tree): New.
784 (refined_region_contains_bb_p): New.
785 (refined_region_contains_region_p): New.
786 (print_refined_region): New.
787 (debug_refined_region): New.
789 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
791 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
794 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
796 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
797 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
799 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
801 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
802 phi_arg_in_outermost_loop.
803 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
804 (remove_invariant_phi): Same.
806 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
808 * graphite-blocking.c
809 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
810 * graphite-clast-to-gimple.c
811 (clast_to_gcc_expression): Same.
812 (precision_for_value): Same.
813 (precision_for_interval): Same.
814 (gcc_type_for_interval): Same.
815 (graphite_create_new_guard): Same.
816 (compute_bounds_for_level): Same.
817 (graphite_create_new_loop_guard): Same.
818 * graphite-interchange.c
819 (build_linearized_memory_access): Same.
820 (pdr_stride_in_loop): Same.
821 (memory_strides_in_loop_1): Same.
822 (memory_strides_in_loop): Same.
823 (extend_scattering): Same.
824 (psct_scattering_dim_for_loop_depth): Same.
825 (pbb_number_of_iterations): Same.
827 (debug_iteration_domains): Same.
829 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
830 (ppl_set_inhomogeneous_gmp): Same.
831 (ppl_strip_loop): Same.
832 (ppl_lexico_compare_linear_expressions): Same.
833 (ppl_read_polyhedron_matrix): Same.
834 (ppl_max_for_le_pointset): Same.
836 (ppl_read_polyhedron_matrix): Same.
837 (tree_int_to_gmp): Same.
838 (gmp_cst_to_tree): Same.
839 (ppl_set_inhomogeneous): Same.
840 (ppl_set_inhomogeneous_tree): Same.
841 (ppl_set_coef): Same.
842 (ppl_set_coef_tree): Same.
843 * graphite-sese-to-poly.c
844 (build_pbb_scattering_polyhedrons): Same.
845 (build_scop_scattering): Same.
846 (scan_tree_for_params_right_scev): Same.
847 (scan_tree_for_params): Same.
848 (find_params_in_bb): Same.
849 (find_scop_parameters): Same.
850 (add_upper_bounds_from_estimated_nit): Same.
851 (build_loop_iteration_domains): Same.
852 (add_condition_to_domain): Same.
853 (pdr_add_memory_accesses): Same.
855 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
857 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
858 CLooG's value_* macros to their respective mpz_* counterparts.
859 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
860 (graphite_create_new_loop_guard): Same.
861 * graphite-interchange.c (build_linearized_memory_access): Same.
862 (pdr_stride_in_loop): Same.
863 (memory_strides_in_loop_1): Same.
864 (1st_interchange_profitable_p): Same.
865 * graphite-poly.c (extend_scattering): Same.
866 (psct_scattering_dim_for_loop_depth): Same.
867 (pbb_number_of_iterations): Same.
868 (pbb_number_of_iterations_at_time): Same.
869 * graphite-poly.h (new_1st_loop): Same.
870 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
871 (oppose_constraint): Same.
872 (insert_constraint_into_matrix): Same.
873 (ppl_set_inhomogeneous_gmp): Same.
874 (ppl_set_coef_gmp): Same.
875 (ppl_strip_loop): Same.
876 (ppl_lexico_compare_linear_expressions): Same.
877 (ppl_max_for_le_pointset): Same.
878 (ppl_min_for_le_pointset): Same.
879 (ppl_build_realtion): Same.
880 * graphite-ppl.h (gmp_cst_to_tree): Same.
881 (ppl_set_inhomogeneous): Same.
882 (ppl_set_inhomogeneous_tree): Same.
883 (ppl_set_coef): Same.
884 (ppl_set_coef_tree): Same.
885 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
886 (build_scop_scattering): Same.
887 (add_value_to_dim): Same.
888 (scan_tree_for_params_right_scev): Same.
889 (scan_tree_for_params_int): Same.
890 (scan_tree_for_params): Same.
891 (find_params_in_bb): Same.
892 (find_scop_parameters): Same.
893 (add_upper_bounds_from_estimated_nit): Same.
894 (build_loop_iteration_domains): Same.
895 (create_linear_expr_from_tree): Same.
896 (add_condition_to_domain): Same.
897 (pdr_add_memory_accesses): Same.
899 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
902 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
903 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
904 When converting an unsigned type to signed, double its precision.
905 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
906 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
907 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
909 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
912 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
913 build_nonstandard_integer_type.
914 (gcc_type_for_interval): Same.
916 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
919 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
920 POINTER_PLUS_EXPR for pointer types.
922 * gcc.dg/graphite/id-19.c: New.
924 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
927 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
928 * graphite-clast-to-gimple.c: Include langhooks.h.
929 (max_signed_precision_type): New.
930 (max_precision_type): Takes two types as arguments.
931 (precision_for_value): New.
932 (precision_for_interval): New.
933 (gcc_type_for_interval): New.
934 (gcc_type_for_value): New.
935 (gcc_type_for_clast_term): New.
936 (gcc_type_for_clast_red): New.
937 (gcc_type_for_clast_bin): New.
938 (gcc_type_for_clast_expr): Split up into several functions.
939 (gcc_type_for_clast_eq): Rewritten.
940 (compute_bounds_for_level): New.
941 (compute_type_for_level_1): New.
942 (compute_type_for_level): New.
943 (gcc_type_for_cloog_iv): Removed.
944 (gcc_type_for_iv_of_clast_loop): Rewritten.
945 (graphite_create_new_loop): Compute the lower and upper bound types
946 with gcc_type_for_clast_expr.
947 (graphite_create_new_loop_guard): Same.
948 (find_cloog_iv_in_expr): Removed.
949 (compute_cloog_iv_types_1): Removed.
950 (compute_cloog_iv_types): Removed.
951 (gloog): Do not call compute_cloog_iv_types.
952 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
954 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
955 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
956 (GBB_CLOOG_IV_TYPES): Removed.
958 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
960 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
962 Reverted this commit: as at this point the loop closed SSA form
963 is under a canonical form respecting the single argument condition.
964 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
965 close phi nodes may have more than one argument.
967 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
969 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
970 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
971 (detect_commutative_reduction): Same.
973 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
975 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
976 close phi nodes may have more than one argument.
978 2010-03-30 Richard Guenther <rguenther@suse.de>
979 Zdenek Dvorak <ook@ucw.cz>
980 Sebastian Pop <sebastian.pop@amd.com>
983 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
984 with multiple arguments.
985 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
987 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
989 * graphite-dependences.c (print_pddr): Call print_pdr with an
991 * graphite-poly.c (debug_pdr): Add an extra argument for the
994 (print_pbb_domain): Same.
996 (print_scop_context): Same.
999 (debug_pbb_domain): Same.
1003 (debug_scop_context): Same.
1005 (debug_cloog): Same.
1006 (print_scop_params): Same.
1007 (debug_scop_params): Same.
1008 (print_iteration_domain): Same.
1009 (print_iteration_domains): Same.
1010 (debug_iteration_domain): Same.
1011 (debug_iteration_domains): Same.
1012 (print_scattering_function): Same.
1013 (print_scattering_functions): Same.
1014 (debug_scattering_function): Same.
1015 (debug_scattering_functions): Same.
1016 * graphite-poly.h (debug_pdr): Update declaration.
1018 (print_pbb_domain): Same.
1020 (print_scop_context): Same.
1022 (print_cloog): Same.
1023 (debug_pbb_domain): Same.
1027 (debug_scop_context): Same.
1029 (debug_cloog): Same.
1030 (print_scop_params): Same.
1031 (debug_scop_params): Same.
1032 (print_iteration_domain): Same.
1033 (print_iteration_domains): Same.
1034 (debug_iteration_domain): Same.
1035 (debug_iteration_domains): Same.
1036 (print_scattering_function): Same.
1037 (print_scattering_functions): Same.
1038 (debug_scattering_function): Same.
1039 (debug_scattering_functions): Same.
1041 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1043 * graphite-poly.c (print_scattering_function_1): New.
1044 (print_scattering_function): Call it.
1045 (print_scop_params): Remove spaces at the end of lines.
1048 * graphite-poly.h (print_cloog): Declared.
1049 (debug_cloog): Declared.
1051 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1053 * tree-ssa-copy.c: Revert this previous change:
1054 (init_copy_prop): Loop closed phi nodes cancontain more than one
1056 (execute_copy_prop): Revert the previous change: do not call
1057 rewrite_into_loop_closed_ssa.
1059 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1060 Richard Guenther <rguenther@suse.de>
1063 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1064 contain more than one argument.
1065 (execute_copy_prop): Revert the previous change: do not call
1066 rewrite_into_loop_closed_ssa.
1068 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1069 * gcc.dg/graphite/id-pr43464-1.c: New.
1071 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1074 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1075 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1077 * gcc.dg/graphite/id-pr43464.c: New.
1079 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1081 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1083 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1084 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1085 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1086 to switch between adding the IV bump in loop->latch or in loop->header.
1088 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1090 * passes.c (init_optimization_passes): Add pass_copy_prop
1093 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1095 * graphite-poly.c (print_scattering_function): Pretty print following
1098 (print_pbb_domain): Same.
1099 (dump_gbb_cases): Same.
1100 (dump_gbb_conditions): Same.
1103 (print_scop_params): Same.
1104 (print_scop_context): Same.
1106 (print_pbb_body): New.
1107 (lst_indent_to): New.
1108 (print_lst): Start new lines with a #.
1109 * graphite-poly.h (pbb_bb): New.
1110 (pbb_index): Use pbb_bb.
1111 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1113 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1115 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1118 * gcc.dg/graphite/id-pr43351.c
1120 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1123 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1124 call insert_out_of_ssa_copy for default definitions.
1125 * gfortran.dg/graphite/id-pr43354.f: New.
1127 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1130 * gfortran.dg/graphite/pr43349.f: New.
1132 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1134 * graphite-clast-to-gimple.c (my_long_long): Defined.
1135 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1136 * graphite-sese-to-poly.c (my_long_long): Defined.
1137 (scop_ivs_can_be_represented): Use it.
1139 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1141 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1142 graphite-max-bbs-per-function, and loop-block-tile-size.
1143 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1145 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1147 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1149 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1150 forward declaration.
1151 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1152 (add_upper_bounds_from_estimated_nit): New.
1153 (build_loop_iteration_domains): Use it.
1155 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1157 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1159 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1162 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1163 should be an INTEGER_CST. Also handle CASE_CONVERT.
1164 * gcc.dg/graphite/pr43306.c: New.
1166 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1168 * graphite.c (graphite_initialize): To bound the number of bbs per
1169 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1170 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1171 * doc/invoke.texi: Document it.
1173 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1175 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1176 * graphite-sese-to-poly.h (build_poly_scop): Same.
1178 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1180 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1181 the number of parameters in the scop. Use as an upper bound
1182 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1183 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1184 * doc/invoke.texi: Document it.
1186 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1188 * graphite-sese-to-poly.c (add_param_constraints): Use
1189 lower_bound_in_type and upper_bound_in_type.
1191 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1193 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1194 instead of unsigned_type_node.
1196 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1197 Reza Yazdani <reza.yazdani@amd.com>
1200 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1201 on pointer type parameters.
1203 * gcc.dg/graphite/run-id-4.c: New.
1205 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1208 * gcc.dg/graphite/run-id-3.c: New.
1210 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1211 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1213 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1214 handle conversions from pointer to integers.
1215 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1216 induction variable, to be able to work with code generated by CLooG.
1217 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1218 (build_poly_scop): Bail out if we cannot codegen a loop.
1220 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1222 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1223 code generation with gloog_error.
1225 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1227 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1228 Call fold_convert on all the returned values.
1229 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1230 the type of the resulting expression.
1232 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1234 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1235 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1236 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1238 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1240 * graphite-dependences.c (map_into_dep_poly): Removed.
1241 (dependence_polyhedron_1): Use combine_context_id_scat.
1243 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1245 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1246 (struct poly_bb): Same.
1247 (combine_context_id_scat): New.
1249 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1252 * sese.c (name_defined_in_loop_p): Return false for default
1255 * gcc.dg/graphite/pr42326.c: New.
1257 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1259 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1260 and clean up the logic.
1262 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1264 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1267 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1270 * graphite-scop-detection.c (create_single_exit_edge): Move
1271 the call to find_single_exit_edge to....
1272 (create_sese_edges): ...here. Don't handle multiple edges
1273 exiting the function.
1274 (build_graphite_scops): Don't handle multiple edges
1275 exiting the function.
1277 * gcc.dg/graphite/pr43083.c: New.
1279 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1282 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1283 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1285 * gfortran.dg/graphite/pr43097.f: New.
1287 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1288 Manuel López-Ibáñez <manu@gcc.gnu.org>
1291 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1293 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1296 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1298 * g++.dg/graphite/pr43026.C: New.
1300 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1302 * Merge from mainline (154736:156693).
1304 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1307 * gcc.dg/graphite/pr43012.c: New.
1309 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1311 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1312 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1314 * g++.dg/graphite/pr42930.C: New.
1316 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1319 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1320 graphite_can_represent_init for MULT_EXPR.
1322 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1326 * graphite-sese-to-poly.c (remove_phi): New.
1327 (translate_scalar_reduction_to_array): Call remove_phi.
1329 * gcc.dg/graphite/pr42530.c: New.
1330 * gcc.dg/graphite/pr42914.c: New.
1332 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1335 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1336 * graphite-clast-to-gimple.h (gloog): Update declaration.
1337 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1338 * graphite-poly.h (struct poly_bb): Add missing comments.
1339 (struct scop): Add poly_scop_p field.
1341 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1342 * graphite.c (graphite_transform_loops): Build the polyhedral
1343 representation for each scop before code generation.
1344 * sese.c (rename_variables_in_operand): Removed.
1345 (rename_variables_in_expr): Return the renamed expression.
1346 (rename_sese_parameters): New.
1347 * sese.h (rename_sese_parameters): Declared.
1349 * gcc.dg/graphite/pr42771.c: New.
1351 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1353 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1355 * gcc.dg/graphite/block-1.c: Same.
1356 * gcc.dg/graphite/block-3.c: Same.
1357 * gcc.dg/graphite/block-4.c: Same.
1358 * gcc.dg/graphite/block-5.c: Same.
1359 * gcc.dg/graphite/block-6.c: Same.
1360 * gcc.dg/graphite/block-7.c: Same.
1361 * gcc.dg/graphite/interchange-0.c: Same.
1362 * gcc.dg/graphite/interchange-1.c: Same.
1363 * gcc.dg/graphite/interchange-10.c: Same.
1364 * gcc.dg/graphite/interchange-11.c: Same.
1365 * gcc.dg/graphite/interchange-12.c: Same.
1366 * gcc.dg/graphite/interchange-2.c: Same.
1367 * gcc.dg/graphite/interchange-3.c: Same.
1368 * gcc.dg/graphite/interchange-4.c: Same.
1369 * gcc.dg/graphite/interchange-5.c: Same.
1370 * gcc.dg/graphite/interchange-6.c: Same.
1371 * gcc.dg/graphite/interchange-7.c: Same.
1372 * gcc.dg/graphite/interchange-8.c: Same.
1373 * gcc.dg/graphite/interchange-9.c: Same.
1374 * gcc.dg/graphite/interchange-mvt.c: Same.
1376 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1378 * gfortran.dg/graphite/id-19.f: New.
1379 * gfortran.dg/graphite/pr14741.f90: New.
1380 * gfortran.dg/graphite/pr41924.f90: New.
1381 * gfortran.dg/graphite/run-id-2.f90: New.
1383 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1386 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1387 to unknown_dependence.
1388 (graphite_legal_transform_dr): Handle the unknown_dependence.
1389 (graphite_carried_dependence_level_k): Same.
1391 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1393 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1395 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1396 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1399 * graphite-dependences.c (build_lexicographical_constraint): Return
1400 a union of dependence polyhedra.
1401 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1403 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1404 * gcc.dg/graphite/block-4.c: Same.
1405 * gcc.dg/graphite/block-7.c: Same.
1406 * gcc.dg/graphite/interchange-12.c: Same.
1407 * gcc.dg/graphite/interchange-mvt.c: Same.
1408 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1409 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1410 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1412 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1414 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1415 the execution check to FAIL. This testcase is miscompiled by Graphite
1416 and the check should be re-enabled.
1417 * gcc.dg/graphite/interchange-mvt.c: Same.
1418 * gcc.dg/graphite/block-0.c: Same.
1419 * gcc.dg/graphite/block-4.c: Same.
1420 * gcc.dg/graphite/block-7.c: Same.
1422 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1424 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1425 * gcc.dg/graphite/scop-0.c: Fix spaces.
1426 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1427 * gfortran.dg/graphite/block-2.f: Same.
1428 * gfortran.dg/graphite/block-3.f90: Same.
1429 * gfortran.dg/graphite/block-4.f90: Same.
1430 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1431 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1433 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1435 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1436 PDDR_ORIGINAL_SCATTERING_P.
1437 (pddr_is_empty): Rewritten.
1438 (print_dependence_polyhedron_layout): New.
1441 (build_alias_set_powerset): Moved up.
1442 (poly_drs_may_alias_p): Moved up.
1443 (lexicographically_gt_p): Removed.
1444 (build_lexicographically_gt_constraint): Renamed
1445 build_lexicographical_constraint, reimplemented.
1446 (dependence_polyhedron_1): Simplified parameters.
1447 (dependence_polyhedron): Same. Keep along empty PDDRs
1448 to make efficient use of the cache.
1449 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1450 (graphite_legal_transform_dr): Rewritten.
1451 (graphite_legal_transform_bb): Pass fewer arguments to
1452 graphite_legal_transform_dr.
1453 (graphite_carried_dependence_level_k): Simplified implementation.
1454 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1455 (dot_transformed_deps_stmt_1): Same.
1456 (dot_original_deps): Same.
1457 (dot_transformed_deps): Same.
1458 * graphite-dependences.h (struct poly_ddr): Added a new field
1459 original_scattering_p.
1460 (PDDR_ORIGINAL_SCATTERING_P): New.
1461 (print_pddr): Declared.
1462 (debug_pddr): Declared.
1463 * graphite-ppl.c: Clarify comment.
1464 * sese.h (print_gimple_bb): Removed unused declaration.
1467 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1469 * g++.dg/graphite/graphite.exp: Rewritten.
1470 * gcc.dg/graphite/graphite.exp: Rewritten.
1471 * gfortran.dg/graphite/graphite.exp: Rewritten.
1472 * gcc.dg/graphite/block-0.c: Added runtime test.
1473 * gcc.dg/graphite/block-1.c: Same.
1474 * gcc.dg/graphite/block-3.c: Same.
1475 * gcc.dg/graphite/block-4.c: Same.
1476 * gcc.dg/graphite/block-5.c: Same.
1477 * gcc.dg/graphite/block-6.c: Same.
1478 * gcc.dg/graphite/block-7.c: Same.
1479 * gcc.dg/graphite/interchange-0.c: Same.
1480 * gcc.dg/graphite/interchange-1.c: Same.
1481 * gcc.dg/graphite/interchange-10.c: Same.
1482 * gcc.dg/graphite/interchange-11.c: Same.
1483 * gcc.dg/graphite/interchange-12.c: Same.
1484 * gcc.dg/graphite/interchange-2.c: Same.
1485 * gcc.dg/graphite/interchange-3.c: Same.
1486 * gcc.dg/graphite/interchange-4.c: Same.
1487 * gcc.dg/graphite/interchange-5.c: Same.
1488 * gcc.dg/graphite/interchange-6.c: Same.
1489 * gcc.dg/graphite/interchange-7.c: Same.
1490 * gcc.dg/graphite/interchange-8.c: Same.
1491 * gcc.dg/graphite/interchange-9.c: Same.
1492 * gcc.dg/graphite/interchange-mvt.c: Same.
1493 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1495 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1497 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1500 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1502 * common.opt: Add -fgraphite-cloog-opts.
1503 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1504 * opts.c (decode_options): Same.
1506 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1508 * gcc.dg/graphite/id-17.c: New.
1509 * gcc.dg/graphite/pr41888.c: New.
1510 * gcc.dg/graphite/scop-22.c: New.
1511 * gfortran.dg/graphite/pr40982.f90: New.
1513 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1515 * graphite-dependences.c: Clarify comments.
1516 (build_pddr): Add an extra parameter direction.
1517 (graphite_legal_transform_dr): Use build_pddr.
1518 (dot_original_deps_stmt_1): Update use of build_pddr.
1519 (dot_transformed_deps_stmt_1): Same.
1520 (dot_original_deps): Same.
1521 (dot_transformed_deps): Same.
1523 * gcc.dg/graphite/interchange-12.c: New.
1524 * gcc.dg/graphite/block-7.c: New.
1526 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1528 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1529 (pddr_transformed_scattering): Removed.
1530 (graphite_legal_transform_dr): Use build_pddr.
1531 (dot_original_deps_stmt_1): Same.
1532 (dot_transformed_deps_stmt_1): Same.
1533 (dot_original_deps): Same.
1534 (dot_transformed_deps): Same.
1536 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1538 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1539 (build_lexicographically_gt_constraint): Same.
1540 (dependence_polyhedron_1): Same.
1541 (dependence_polyhedron): Same.
1543 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1545 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1546 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1547 (lexicographically_gt_p): Change type of direction to int.
1548 (build_lexicographically_gt_constraint): Same.
1549 (dependence_polyhedron_1): Same.
1550 (dependence_polyhedron): Same.
1551 (pddr_original_scattering): Use integers for direction.
1552 (pddr_transformed_scattering): Same.
1553 (graphite_legal_transform_dr): Same.
1554 (graphite_carried_dependence_level_k): Same.
1556 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1558 * graphite-dependences.c (build_pairwise_constraint): Renamed
1559 ppl_build_relation. Moved...
1560 (dr_equality_constraints): Use ppl_build_relation.
1561 (build_pairwise_scheduling_equality): Same.
1562 (build_pairwise_scheduling_inequality): Same.
1563 * graphite-ppl.c (ppl_build_relation): ...here.
1564 * graphite-ppl.h (ppl_build_relation): Declared.
1566 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1569 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1570 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1571 Set gloog_error when such an expression failed to be built.
1572 (translate_clast): Early return when gloog_error is set.
1573 (gloog): Clear gloog_error. When gloog_error is set, call
1574 set_ifsese_condition to enable the original code. Return the status
1575 of the code generation based on gloog_error.
1576 * sese.c (set_ifsese_condition): New.
1577 * sese.h (set_ifsese_condition): Declared.
1579 * g++.dg/graphite/pr42681.C: New.
1581 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1584 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1585 rename_nb_iterations.
1586 * sese.c (rename_variables_in_operand): New.
1587 (rename_variables_in_expr): New.
1588 (rename_nb_iterations): New.
1589 (sese_adjust_liveout_phis): Update the rename_map.
1590 * sese.h (rename_nb_iterations): Declared.
1591 * tree-scalar-evolution.c (scev_reset_htab): New.
1592 (scev_reset): Call scev_reset_htab.
1593 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1595 * gfortran.dg/graphite/pr42732.f: New.
1597 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1600 * graphite-clast-to-gimple.c: Fix formatting.
1601 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1602 (expr_defined_in_loop_p): New.
1603 (add_loop_exit_phis): Also handle full expressions: remove from
1604 the rename_map the expressions defined in the loop that we're closing.
1606 * gfortran.dg/graphite/pr42393-1.f90: New.
1607 * gfortran.dg/graphite/pr42393.f90: Add new flags
1608 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1609 make this testcase useful in the Graphite branch.
1611 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1613 * graphite-scop-detection.c (exclude_component_ref): Removed.
1614 (is_simple_operand): Removed.
1615 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1617 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1620 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1621 the array indexing of ADDR_EXPRs.
1623 * gcc.dg/graphite/pr42221.c: New.
1625 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1628 * graphite.c (graphite_finalize): Call scev_reset.
1629 (graphite_transform_loops): Do not call scev_reset between the code
1630 generation of scops.
1632 * gcc.dg/graphite/pr42521.c: New.
1634 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1636 * graphite-interchange.c (memory_stride_in_loop): Renamed
1638 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1639 (memory_strides_in_loop): Memoize the memory strides per loop.
1640 (lst_interchange_profitable_p): Do not initialize to zero the memory
1642 * graphite-poly.h (struct lst): Add a field memory_strides.
1643 (LST_LOOP_MEMORY_STRIDES): New.
1644 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1645 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1647 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1649 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1650 memory_strides_in_loop. Gather memory strides on a whole loop.
1651 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1652 (lst_interchange_profitable_p): Removed.
1653 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1655 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1657 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1658 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1659 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1660 Remove context_loop and level.
1662 2010-01-07 Richard Guenther <rguenther@suse.de>
1664 PR tree-optimization/42641
1665 * sese.c (rename_map_elt_info): Use the SSA name version, do
1668 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1670 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1671 blocked" only when both the strip mine and the interchange have
1674 * gcc.dg/graphite/block-2.c: Removed.
1675 * gcc.dg/graphite/block-3.c: Add scan pattern.
1676 * gcc.dg/graphite/block-4.c: Same.
1677 * gcc.dg/graphite/block-5.c: Same.
1678 * gcc.dg/graphite/block-6.c: Same.
1680 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1682 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1683 before allocating a new one.
1684 (copy_renames): Check that slot is not NULL.
1685 (mark_bb_with_pbb): Same.
1686 (compute_cloog_iv_types_1): Same.
1687 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1688 nest, and after LSTs.
1689 (lst_try_interchange_loops): Same.
1691 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1694 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1695 the before, nest, and after LSTs.
1696 (lst_try_interchange): Removed.
1697 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1699 (lst_interchange_select_outer): Apply interchange on the outer loop
1700 until there are no more changes in the inner loops.
1702 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1704 Revert patch fixing PR middle-end/42221.
1706 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1709 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1712 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1714 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1717 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1718 that contain only one statement.
1720 * gfortran.dg/graphite/pr42180.f90: New.
1722 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1725 * gfortran.dg/graphite/pr42393.f90: New.
1727 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1730 * gfortran.dg/graphite/pr42186.f90: New.
1732 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1735 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1736 Insert the reduction copy in the same block as the phi node.
1737 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1739 * gcc.dg/graphite/pr42205-1.c: New.
1740 * gcc.dg/graphite/pr42205-2.c: New.
1742 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1745 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1746 the array indexing of ADDR_EXPRs.
1748 * gcc.dg/graphite/pr42221.c: New.
1750 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1754 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1755 index. Call lst_interchange_select_inner only once.
1756 (lst_interchange_select_inner): Update use of lst_try_interchange.
1757 (lst_interchange_select_outer): Update.
1759 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1763 * graphite-interchange.c (lst_try_interchange): Do not increment the
1764 the OUTER index when there is no AFTER kernel. Do not increment the
1765 OUTER index for after processing the AFTER kernel.
1766 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1767 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1768 index. Do not pass to lst_interchange_select_inner the OUTER index.
1769 (scop_do_interchange): Update use of lst_interchange_select_outer.
1771 * gfortran.dg/graphite/graphite.exp
1772 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1773 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1774 the graphite dump file.
1775 * gfortran.dg/graphite/interchange-2.f: Same.
1776 * gfortran.dg/graphite/pr42334-1.f: New.
1778 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1782 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1784 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1785 (lst_try_interchange): Reimplemented.
1786 (lst_interchange_select_inner): Same.
1787 (lst_do_interchange): Renamed lst_interchange_select_outer.
1789 (scop_do_interchange): Update use of lst_interchange_select_outer.
1791 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1792 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1793 * gcc.dg/graphite/pr42211.c: New.
1794 * gfortran.dg/graphite/pr42334.f90: New.
1796 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1799 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1800 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1802 * gfortran.dg/graphite/pr42181.f90: New.
1804 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1807 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1808 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1809 (detect_commutative_reduction_arg): Simplified.
1810 (detect_commutative_reduction): Early return when the argument of
1811 the close phi is not of an SSA_NAME.
1813 * gcc.dg/graphite/pr42284.c: New.
1815 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1817 * dbgcnt.def (graphite_scop): New counter.
1818 * graphite.c: Include dbgcnt.h
1819 (graphite_transform_loops): Use new counter to limit transformations.
1821 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1824 * graphite-scop-detection.c (graphite_can_represent_init): Also
1825 handle more complex MULT_EXPRs containing parameters by recursion
1828 * gfortran.dg/graphite/pr42285.f90: New.
1830 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1832 * g++.dg/graphite/pr42130.C: Fix type.
1834 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1836 * g++.dg/graphite/pr42130.C: Correct testcase.
1838 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1840 * Merge from mainline (154493:154734).
1842 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1844 * Merge from mainline (151362:154491).
1846 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1848 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1849 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1851 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1854 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1855 translate_clast_for_loop): New.
1856 (translate_clast_for): Add a condition around the loop, to do not
1857 execute loops with zero iterations.
1858 * g++.dg/graphite/pr42130.C: New.
1859 * gcc.dg/graphite/pr35356-2.c: Adapt.
1861 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1863 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1864 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1865 Remove context_loop and level.
1867 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1869 * graphite-clast-to-gimple.c (translate_clast_user,
1870 translate_clast_for, translate_clast_guard): Simplify and move common
1871 elements to translate_clast().
1872 (translate_clast): Simplify and get common elements.
1874 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1876 * graphite-clast-to-gimple.c (translate_clast_user,
1877 translate_clast_for, translate_clast_guard): Split out of
1880 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1882 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1883 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1884 debug_clast_name_indexes_1, debug_clast_name_indexes,
1885 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1886 (clast_name_to_gcc, clast_to_gcc_expression,
1887 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1888 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1889 graphite_create_guard_cond_expr, graphite_create_new_loop,
1890 translate_clast): Add params_index.
1891 (initialize_cloog_names): Create parameter strings from scratch, do
1892 not reference other strings.
1893 (create_params_index): New.
1894 (gloog): Initialize params_index.
1895 * graphite-scop-detection (free_scops_1): Removed.
1896 (limit_scops): Use normal free_scops.
1897 * graphite-sese-to-poly.c (save_var_names): Removed.
1898 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1899 and SESE_PARAMS_INDEX.
1900 * sese.c (new_sese, free_sese): Dito.
1901 * sese.h (struct sese): Remove params_index, params_names.
1902 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1904 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1906 Revert the following patch from 2009-09-14:
1907 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1908 tree-scalar-evolution.h, and then tree-data-ref.h.
1909 * graphite-clast-to-gimple.c: Same.
1910 * graphite-dependences.c: Same.
1911 * graphite-interchange.c: Same.
1912 * graphite-poly.c: Same.
1913 * graphite-scop-detection.c: Same.
1914 * graphite-sese-to-poly.c: Same.
1916 * lambda-code.c: Same.
1917 * matrix-reorg.c: Same.
1918 * tree-data-ref.c: Same.
1919 * tree-if-conv.c: Same.
1920 * tree-loop-distribu: Same.: Same.
1921 * tree-loop-linear.c: Same.
1922 * tree-parloops.c: Same.
1923 * tree-predcom.c: Same.
1924 * tree-vect-patterns.c: Same.
1926 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1928 Revert patch from 2009-09-14.
1929 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1930 passes at -O1 and below.
1932 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1935 * gcc.dg/graphite/pr40281.c: New.
1937 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1938 evolutions should not variate in inner loops.
1940 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1943 * gfortran.dg/graphite/pr42050.f90: New.
1945 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1947 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1948 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1950 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1952 * graphite-blocking.c (scop_do_block): New.
1953 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1954 * graphite-poly.h (scop_do_block): Declared.
1956 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1958 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1959 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1960 to transform depth into the time_depth before calling
1961 pbb_number_of_iterations_at_time.
1962 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1965 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1967 Reverted the patch for "scattering permutations" from 2009-10-28.
1969 * graphite-poly.c (print_permutation): New.
1970 (debug_permutation): New.
1971 (new_poly_bb): Initialize PBB_PERMUTATION.
1972 (free_poly_bb): Free PBB_PERMUTATION.
1973 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1974 (struct pbb_permutation_elt): New.
1975 (PBB_PERMUTATION_ELT_STRIDE): New.
1976 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1977 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1978 (new_pbb_permutation_elt): New.
1979 (pbb_permutation_elt_free): New.
1980 (struct poly_bb): Add field permutation.
1981 (PBB_PERMUTATION): New.
1982 (print_permutation): Declared.
1983 (debug_permutation): Declared.
1985 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1987 * graphite-interchange.c (build_partial_difference): New.
1988 (memory_stride_in_loop): Refactored the computation of
1989 equality constraints into build_partial_difference function.
1990 Added support for debugging stride computations.
1992 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1994 * graphite-clast-to-gimple.c (gloog): Free if_region,
1995 if_region->true_region, and if_region->region.
1996 * sese.c (if_region_set_false_region): Free if_region->false_region.
1997 (create_if_region_on_edge): Do not use GGC_NEW.
1998 (move_sese_in_condition): Remove useless initialization.
2000 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2002 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2003 for the loops created by the loop distribution. Do not modify the
2005 (lst_try_interchange_loops): Same. Use a temporary LST for the
2006 transformed schedule. Call lst_update_scattering before data
2007 dependence analysis.
2008 (lst_try_interchange): Pass an extra parameter INDEX.
2009 (lst_do_interchange_1): New.
2010 (lst_do_interchange): Call lst_do_interchange_1.
2011 (scop_do_interchange): Call lst_update_scattering.
2012 * graphite-poly.c (apply_poly_transforms): Do not call
2013 lst_update_scattering.
2014 * graphite-poly.h (lst_pred): New.
2016 (lst_find_first_pbb): Return NULL when not found.
2018 (lst_insert_in_sequence): Allow LST1 to be NULL.
2020 (lst_substitute_3): New.
2021 * gcc.dg/graphite/interchange-1.c: XFail.
2022 * gcc.dg/graphite/interchange-8.c: XFail.
2023 * gcc.dg/graphite/interchange-11.c: XFail.
2025 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2027 * graphite-interchange.c (lst_perfectly_nested_p): New.
2028 (lst_perfect_nestify): New.
2029 (lst_try_interchange_loops): Call store_lst_schedule,
2030 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2031 (scop_do_interchange): Avoid redundant legality test.
2032 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2033 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2034 * graphite-poly.h (psct_static_dim): New.
2035 (lst_dewey_number_at_depth): New.
2036 (lst_find_pbb): Restructured.
2037 (lst_find_first_pbb): Restructured.
2038 (lst_find_last_pbb): New.
2039 (lst_contains_p): New.
2040 (lst_contains_pbb): New.
2041 (lst_create_nest): New.
2042 (lst_remove_from_sequence): New.
2043 (pbb_update_scattering): New.
2044 (lst_update_scattering_under): New.
2045 (lst_update_scattering_seq): New.
2046 (lst_update_scattering): New.
2047 (lst_insert_in_sequence): New.
2048 (lst_distribute_lst): New.
2049 (lst_remove_all_before_including_pbb): New.
2050 (lst_remove_all_before_excluding_pbb): New.
2052 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2054 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2055 get_loop_exit_edges.
2057 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2059 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2061 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2063 * graphite-poly.c (print_permutation): New.
2064 (debug_permutation): New.
2065 (new_poly_bb): Initialize PBB_PERMUTATION.
2066 (free_poly_bb): Free PBB_PERMUTATION.
2067 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2068 (struct pbb_permutation_elt): New.
2069 (PBB_PERMUTATION_ELT_STRIDE): New.
2070 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2071 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2072 (new_pbb_permutation_elt): New.
2073 (pbb_permutation_elt_free): New.
2074 (struct poly_bb): Add field permutation.
2075 (PBB_PERMUTATION): New.
2076 (print_permutation): Declared.
2077 (debug_permutation): Declared.
2079 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2081 * graphite-clast-to-gimple.c (gloog): Do not call
2082 sese_reset_aux_in_loops.
2083 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2084 extra argument for domains. Do not use loop->aux.
2085 (build_scop_iteration_domain): Initialize and free domains, pass it
2086 to build_loop_iteration_domains and extract the information from
2087 domains. Do not use loop->aux.
2088 * sese.c (sese_reset_aux_in_loops): Removed.
2089 * sese.h (sese_reset_aux_in_loops): Removed.
2091 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2093 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2094 (dependency_in_loop_p): Same.
2095 (translate_clast): Do not use loop->aux. Initialize
2096 loop->can_be_parallel.
2097 (mark_loops_parallel): Removed.
2098 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2099 * graphite.c (free_aux_in_new_loops): Removed.
2100 (graphite_finalize): Do not call free_aux_in_new_loops.
2101 (graphite_transform_loops): Do not call mark_loops_parallel.
2103 2009-10-26 Li Feng <nemokingdom@gmail.com>
2105 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2106 (translate_clast): Pass an extra parameter LEVEL.
2107 Call get_scattering_level.
2108 * graphite-clast-to-gimple.h (get_scattering_level): New.
2110 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2112 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2113 * cfgloop.h (struct loop): New field single_iv.
2115 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2116 loop->aux anymore: use loop->single_iv.
2117 (graphite_loop_normal_form): Moved...
2118 (build_graphite_loop_normal_form): Removed.
2119 (gloog): Do not call build_graphite_loop_normal_form.
2120 (free_aux_in_new_loops): Moved...
2121 (mark_loops_parallel): Restructure.
2122 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2123 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2124 (scop_canonicalize_loops): New.
2125 (build_poly_scop): Call scop_canonicalize_loops.
2126 * graphite.c (free_aux_in_new_loops): ...here.
2128 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2130 * g++.dg/graphite/graphite.exp: Add the same rules as in
2131 gcc.dg/graphite/graphite.exp.
2133 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2135 * g++.dg/graphite/id-1.C: New.
2137 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2139 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2141 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2142 (rewrite_phi_out_of_ssa): Same.
2143 (rewrite_cross_bb_scalar_deps): Same.
2144 (translate_scalar_reduction_to_array): Same.
2146 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2148 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2151 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2153 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2154 (build_scop_drs): Call dump_alias_graphs.
2156 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2158 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2159 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2160 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2161 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2162 * graphite-poly.h (free_lst): New.
2163 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2164 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2166 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2168 * graphite-poly.h (struct scop): Add a field saved_schedule.
2169 (SCOP_SAVED_SCHEDULE): New.
2170 (store_lst_schedule): New.
2171 (restore_lst_schedule): New.
2172 (store_scattering): Call store_lst_schedule.
2173 (restore_scattering): Call restore_lst_schedule.
2175 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2177 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2178 (pdr_add_alias_set): Same.
2179 (build_poly_dr): Same.
2180 (build_alias_set_optimal_p): Same.
2181 (build_base_obj_set_for_drs): Same. Do not store the result of
2184 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2186 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2187 all_components_are_cliques to 1.
2189 2009-10-20 Li Feng <nemokingdom@gmail.com>
2191 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2193 (pdr_add_alias_set): Update retrieving alias_set_num.
2194 (build_poly_dr): Update retrieving dr_base_object_set.
2195 (partition_drs_to_sets): Remove.
2196 (build_alias_set_optimal_p): New.
2197 (build_alias_set_for_drs): Rename.
2198 (build_scop_drs): Update.
2199 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2200 (ALIAS_SET_INDEX): Remove.
2201 (BASE_OBJECT_SET_INDEX): Remove.
2203 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2205 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2207 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2209 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2210 loop upper bounds for 1-element arrays at end of structures.
2211 * tree-flow.h (array_at_struct_end_p): Declared.
2212 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2214 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2216 * g++.dg/graphite/pr41305.C: New.
2218 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2220 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2221 construction of parameter constraints from loop iteration analysis.
2222 * gcc.dg/graphite/run-id-2.c: New test.
2224 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2226 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2229 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2231 * graphite-dependences.c (dependence_polyhedron_1): Remove
2232 unused gdim dimensions from the DDR polyhedron.
2234 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2236 * graphite-dependences.c (pddr_transformed_scattering): New.
2237 (dot_original_deps_stmt_1): New.
2238 (dot_transformed_deps_stmt_1): New.
2239 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2240 dot_transformed_deps_stmt_1.
2241 (dot_original_deps): New.
2242 (dot_transformed_deps): New.
2243 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2245 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2247 * graphite-dependences.c (reduction_dr_1): Remove wrong
2248 assert: reduction BBs can have multiple reduction writes
2249 to memory. interchange-3.f90 is an example.
2251 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2253 * gfortran.dg/graphite/interchange-3.f90: New.
2255 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2257 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2259 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2261 * graphite-dependences.c (dependence_polyhedron_1): Add the
2262 context to the dependence polyhedron.
2264 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2266 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2267 PBB_PDR_DUPLICATES_REMOVED.
2268 (new_poly_bb): Same.
2270 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2272 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2274 (build_loop_iteration_domains): Extract bounds on parameters
2275 based on the data size.
2276 (build_scop_context): Do not initialize SCOP_CONTEXT;
2277 add new constraints.
2279 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2281 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2282 * graphite-ppl.h (graphite-ppl.h): Declared.
2284 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2286 * graphite-ppl.c (ppl_print_linear_expr): New.
2287 (debug_ppl_linear_expr): New.
2288 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2289 (debug_ppl_linear_expr): Declared.
2291 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2293 * graphite-interchange.c: Fix comments.
2294 * gcc.dg/graphite/block-1.c: Fix comments.
2296 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2298 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2299 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2301 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2303 Reapply the patch from Alexander Monakov that disappeared during
2304 the last merges from trunk.
2306 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2308 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2309 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2311 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2313 * graphite-interchange.c (memory_stride_in_loop): The depth
2314 argument corresponds to a dynamic time dimension, so use
2315 psct_dynamic_dim to refer to the transformed scattering dimension.
2317 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2319 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2321 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2323 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2325 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2326 the root of the LST.
2327 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2329 (print_lst): Print the root of LST in a different format.
2330 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2332 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2334 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2336 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2338 * doc/passes.texi: Document the Graphite infrastructure.
2340 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2342 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2343 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2344 and check the SSA representation.
2346 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2348 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2350 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2352 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2354 * gcc.dg/graphite/interchange-11.c: New.
2356 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2358 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2360 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2362 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2363 Add -fno-loop-strip-mine and -fno-loop-interchange.
2364 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2365 -fno-loop-strip-mine.
2366 * gfortran.dg/graphite/graphite.exp: Same.
2368 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2370 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2371 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2372 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2373 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2374 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2375 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2376 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2377 DEFAULT_FLAGS_GRAPHITE_SCOP.
2378 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2379 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2381 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2383 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2385 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2386 Sebastian Pop <sebastian.pop@amd.com>
2388 * graphite-interchange.c (build_linearized_memory_access): Pass an
2389 offset as parameter.
2390 (memory_stride_in_loop): Include transform scattering in the
2391 access functions to be able to querry the strides in the
2393 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2394 not the psct_iterator_dim.
2396 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2398 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2399 (lst_do_strip_mine_loop): New.
2400 (lst_do_strip_mine): New.
2401 (scop_do_strip_mine): Call lst_do_strip_mine.
2402 * graphite-poly.h (lst_add_loop_under_loop): New.
2403 (lst_find_first_pbb): New.
2405 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2407 * graphite-poly.c (loop_to_lst): Fix LST creation.
2409 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2411 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2412 sizeof(unsigned long) to make it run on 32bit systems.
2414 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2416 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2419 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2421 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2423 (write_alias_graph_to_ascii_dot): New.
2424 (write_alias_graph_to_ascii_ecc): Ditto.
2425 (partition_drs_to_sets): Add testing of optimality of current method
2426 which assigns alias numbers according to DFS Comopnent number. used
2427 as heuristic for the upcoming ECC algorithm.
2428 (build_scop_drs): Write to file also with the ecc and dot format.
2430 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2432 * gfortran.dg/graphite/interchange-1.f: XFail.
2434 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2436 * graphite.c (graphite_initialize): Do not handle functions with
2437 more than 100 basic blocks.
2439 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2441 * graphite-blocking.c (pbb_do_strip_mine): Use
2442 PARAM_LOOP_BLOCK_TILE_SIZE.
2444 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2446 * graphite-poly.c (dot_lst_1): New.
2448 * graphite-poly.h (dot_lst): Declared.
2450 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2452 * graphite-dependences.c (dot_deps_stmt_1): New.
2453 (dot_deps_stmt): New.
2454 * graphite-dependences.h (dot_deps_stmt): Declared.
2456 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2458 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2459 not replace cross BB scalar dependences ending on PHI nodes.
2460 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2462 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2464 * graphite-poly.c (apply_poly_transforms): Implement the high
2465 level driver for flag_loop_block.
2466 * opts.c (decode_options): Enable flag_loop_block at -O2.
2467 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2470 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2472 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2475 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2477 * graphite-poly.h (lst_find_pbb): New.
2478 (find_lst_loop): New.
2480 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2482 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2483 * graphite-poly.h (struct scop): Remove dep_graph field.
2484 (SCOP_DEP_GRAPH): Removed.
2486 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2488 * graphite-poly.h (copy_lst): Do full copy of LST.
2490 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2492 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2493 when the loop stride is zero.
2495 * gcc.dg/graphite/id-16.c: New.
2497 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2499 * graphite-dependences.c (reduction_dr_1): New.
2500 (reduction_dr_p): New.
2501 (graphite_legal_transform_dr): Call reduction_dr_p.
2502 (reduction_ddr): Renamed reduction_ddr_p.
2503 * graphite-poly.h (same_pdr_p): New.
2504 (number_of_write_pdrs): New.
2505 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2506 (split_reduction_stmt): Do not split reduction statements
2507 when there are no writes to memory.
2508 (translate_scalar_reduction_to_array_for_stmt): Insert the
2509 memory reduction statement just after the scalar reduction statement.
2511 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2513 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2514 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2516 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2518 * graphite-interchange.c (lst_apply_interchange): New.
2519 (lst_interchange_profitable_p): New.
2520 (lst_try_interchange_loops): New.
2521 (lst_try_interchange): New.
2522 (lst_do_interchange): New.
2523 (pbb_do_interchange): Removed.
2524 (scop_do_interchange): Call lst_do_interchange.
2526 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2528 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2529 SCOP_TRANSFORMED_SCHEDULE.
2534 * graphite-poly.h (lst_p): New.
2537 (LST_LOOP_FATHER): New.
2540 (scop_to_lst): Declared.
2541 (print_lst): Declared.
2542 (debug_lst): Declared.
2543 (new_lst_loop): New.
2544 (new_lst_stmt): New.
2547 (lst_dewey_number): New.
2548 (struct scop): Add original_schedule and transformed_schedule fields.
2549 (SCOP_ORIGINAL_SCHEDULE): New.
2550 (SCOP_TRANSFORMED_SCHEDULE): New.
2551 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2553 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2555 * graphite-dependences.c (reduction_ddr): New.
2556 (graphite_legal_transform_bb): Call reduction_ddr.
2557 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2558 Initialize PBB_IS_REDUCTION.
2559 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2560 (PBB_IS_REDUCTION): New.
2561 (new_poly_bb): Update declaration.
2562 * graphite-scop-detection.h (build_scop_bbs): Removed.
2563 (nb_reductions_in_loop): Removed.
2564 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2565 parameter for reductions.
2566 (try_generate_gimple_bb): Update call to new_poly_bb.
2567 (build_scop_bbs_1): Same.
2568 (build_scop_bbs): Same.
2569 (gsi_for_phi_node): New.
2570 (scalar_close_phi_node_p): Remove gcc_assert.
2571 (split_reduction_stmt): New.
2572 (is_reduction_operation_p): New.
2573 (phi_contains_arg): New.
2574 (follow_ssa_with_commutative_ops): New.
2575 (detect_commutative_reduction_arg): New.
2576 (detect_commutative_reduction_assign): New.
2577 (follow_inital_value_to_phi): New.
2578 (edge_initial_value_for_loop_phi): New.
2579 (initial_value_for_loop_phi): New.
2580 (detect_commutative_reduction): New.
2581 (translate_scalar_reduction_to_array_for_stmt): New.
2582 (insert_copyout): New.
2583 (insert_copyin): New.
2584 (translate_scalar_reduction_to_array): New.
2585 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2586 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2587 (rewrite_commutative_reductions_out_of_ssa): New.
2588 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2589 * sese.h (split_region_for_bb): New.
2591 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2592 * gcc.dg/graphite/interchange-1.c: Fix format.
2593 * gcc.dg/graphite/interchange-10.c: New.
2595 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2597 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2600 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2602 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2603 (rewrite_cross_bb_scalar_dependence): New.
2604 (rewrite_cross_bb_scalar_deps): New.
2605 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2606 Call rewrite_cross_bb_scalar_deps.
2608 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2610 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2611 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2614 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2616 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2617 * graphite-interchange.c (pbb_do_interchange): Same.
2618 * graphite-poly.c (print_scattering_function): Same.
2620 * graphite-poly.h (pbb_loop): New.
2621 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2623 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2625 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2627 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2629 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2630 so don't pass a pointer to it.
2631 (build_alias_set_for_drs): Same.
2632 (build_base_obj_set_for_drs): Same.
2633 (build_scop_drs): Same.
2635 2009-09-26 Li Feng <nemokingdom@gmail.com>
2637 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2638 the alias graph of data references.
2640 2009-09-25 Li Feng <nemokingdom@gmail.com>
2642 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2643 (build_scop_drs): When debugging, write the alias graph to file,
2644 otherwise, should be disabled.
2646 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2648 * Merge from mainline (151310:151361).
2650 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2652 * Merge from mainline (151171:151310).
2654 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2656 * Merge from mainline (151171:151806).
2658 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2660 * Revert the last commit.
2662 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2664 * Merge from mainline (151171:151819).
2666 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2668 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2669 (is_simple_operand): Remove call to stmt_simple_memref_p.
2670 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2672 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2674 * gcc.dg/graphite/interchange-mvt.c: New File.
2675 * gcc.dg/graphite/scop-dsyrk.c: New File.
2676 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2677 * gcc.dg/graphite/scop-mvt.c: New File.
2678 * gcc.dg/graphite/scop-sor.c: New File.
2680 2009-09-17 Li Feng <nemokingdom@gmail.com>
2682 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2683 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2684 (graphite_carried_dependence_level_k): Ditto.
2685 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2686 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2687 (new_poly_dr): Adjust declaration.
2688 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2689 (free_gimple_bb): Added free_data_refs_aux.
2690 (build_poly_dr): Add dr_base_object_set.
2691 (partition_drs_to_sets): New.
2692 (dr_same_base_object_p): New.
2693 (build_alias_set_for_drs): New.
2694 (build_base_object_set_for_drs): New.
2695 (build_scop_drs): Add build_base_obj_set_for_drs.
2696 * graphite-sese-to-poly.h: Added #define for alias set number index and
2697 base object set index.
2698 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2699 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2701 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2703 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2704 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2706 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2708 * graphite-sese-to-poly.c (struct irp_data): Removed.
2709 (idx_record_params): Removed.
2710 (find_params_in_bb): Scan for parameters the access functions; don't
2711 parse the tree representation.
2713 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2715 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2716 passes at -O1 and below.
2718 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2720 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2721 tree-scalar-evolution.h, and then tree-data-ref.h.
2722 * graphite-clast-to-gimple.c: Same.
2723 * graphite-dependences.c: Same.
2724 * graphite-interchange.c: Same.
2725 * graphite-poly.c: Same.
2726 * graphite-scop-detection.c: Same.
2727 * graphite-sese-to-poly.c: Same.
2729 * lambda-code.c: Same.
2730 * matrix-reorg.c: Same.
2731 * tree-data-ref.c: Same.
2732 * tree-if-conv.c: Same.
2733 * tree-loop-distribu: Same.: Same.
2734 * tree-loop-linear.c: Same.
2735 * tree-parloops.c: Same.
2736 * tree-predcom.c: Same.
2737 * tree-vect-patterns.c: Same.
2739 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2741 Partially revert the previous patch, except the following.
2742 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2743 as parameters the operands of the not expression.
2745 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2747 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2748 Do not call analyze_scalar_evolution on assignments.
2749 (instantiate_scev_phi): Call analyze_scalar_evolution.
2750 (instantiate_scev_name): Call instantiate_scev_assign and
2751 instantiate_scev_phi.
2752 (instantiate_scev_not): Adapted to pass as parameters the operands
2753 of the not expression.
2755 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2757 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2758 to pass as parameters the operands of the binary expression.
2760 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2762 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2763 instantiate_scev_not. Handle NEGATE_EXPR.
2764 (instantiate_scev_r): Handle NEGATE_EXPR.
2766 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2768 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2770 (instantiate_scev_r): Move code in instantiate_scev_2
2771 and instantiate_scev_1.
2773 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2775 * tree-scalar-evolution.c (instantiate_scev_3): New.
2776 (instantiate_scev_1): Move code in instantiate_scev_3.
2778 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2780 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2781 (instantiate_scev_1): Move code in instantiate_scev_poly.
2783 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2785 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2786 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2788 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2790 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2791 (instantiate_scev_1): Move code in instantiate_scev_convert.
2793 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2795 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2796 (instantiate_scev_1): Move code in instantiate_scev_binary.
2798 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2800 * tree-scalar-evolution.c (instantiate_scev_name): New.
2801 (instantiate_scev_1): Move code in instantiate_scev_name.
2803 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2805 * Merge from mainline (150992:151171).
2807 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2809 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2811 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2813 * graphite-dependences.c (graphite_legal_transform_bb): Call
2814 pbb_remove_duplicate_pdrs.
2815 * graphite-poly.c (can_collapse_pdr): Removed.
2816 (pdr_find_duplicate): Removed.
2817 (can_collapse_pdrs): New.
2818 (pbb_remove_duplicate_pdrs): New.
2819 (new_poly_dr): Do not look for duplicates.
2820 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2821 (PBB_PDR_DUPLICATES_REMOVED): New.
2822 (pbb_remove_duplicate_pdrs): Declared.
2824 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2826 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2827 the strides by multiplying by PDR_NB_REFS.
2828 * graphite-poly.c (can_collapse_pdr): New.
2829 (pdr_find_duplicate): New.
2830 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2831 Initialize PDR_NB_REFS.
2832 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2834 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2836 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2838 Revert one of the previous commits:
2839 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2840 the computation of symmetric data dependence relations.
2841 (dependency_between_pbbs_p): Same.
2843 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2846 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2849 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2851 * graphite-dependences.c (pddr_original_scattering): Return NULL
2852 for read-read dependence relations.
2853 * graphite-poly.h (enum poly_dr_type): Fix comment.
2856 (pdr_may_write_p): New.
2858 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2860 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2861 (struct poly_dr): Same.
2862 (new_poly_dr): Same.
2863 * graphite-poly.c (new_poly_dr): Same.
2865 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2866 Sebastian Pop <sebastian.pop@amd.com>
2868 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2869 pbb_strip_mine_time_depth. Changed the implementation so that
2870 transformation is expressed as a transformation on
2871 time (scatttering) dimensions. Also, ensures that the 2d+1
2872 scheduling format is preserved.
2873 (pbb_strip_mine_profitable_p): Profitability is based on the
2874 iteration number of a given time (scattering) dimension,
2875 and not on a original loop depth dimension.
2876 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2877 (pbb_do_strip_mine): Call psct_dynamic_dim.
2878 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2879 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2880 (pbb_nb_dynamic_scattering_transform): New.
2881 (psct_dynamic_dim): New.
2883 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2885 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2886 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2887 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2888 * graphite-interchange.c (build_linearized_memory_access): Same.
2889 (memory_stride_in_loop): Same.
2891 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2893 * graphite-dependences.c (pddr_original_scattering): New.
2894 (graphite_legal_transform_dr): Call pddr_original_scattering.
2897 * graphite-dependences.h (dot_deps): Declared.
2898 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2899 (print_pdr): Print PDR_ID.
2900 * graphite-poly.h (struct poly_dr): Add field id.
2903 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2905 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2907 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2908 not delete the original dependence relation.
2910 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2912 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2913 the computation of symmetric data dependence relations.
2914 (dependency_between_pbbs_p): Same.
2916 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2918 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2919 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2920 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2921 (free_poly_ddr): New.
2922 (pddr_is_empty): New.
2923 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2924 (dependence_polyhedron): Same. Remove useless gcc_assert.
2926 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2927 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2928 * graphite-dependences.h (enum poly_dependence_kind): New.
2929 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2930 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2931 (PDRP_SINK): Renamed PDDR_SINK.
2932 (PDRP_DDP): Renamed PDDR_DDP.
2934 (free_poly_ddr): Declared.
2935 * graphite-poly.c (new_scop): Use the new hash function names.
2936 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2937 into original_pddrs.
2938 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2940 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2942 * Merge from mainline (150764:150992).
2944 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2946 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2947 bounds with LT_EXPR to make niter analysis more precise on code
2948 generated by Graphite.
2950 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2952 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2953 (graphite_legal_transform_bb): Same.
2954 (poly_drs_may_alias_p): Same.
2956 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2959 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2960 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2962 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2964 * graphite-poly.c (print_pbb): Print PBB index.
2966 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2968 * Merge from mainline (r150672:150764).
2970 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2972 * graphite-interchange.c (ppl_max_for_le): Moved...
2973 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2974 * graphite-ppl.c (ppl_max_for_le): ... here.
2975 * graphite-ppl.h (ppl_max_for_le): Declared.
2977 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2979 * Merge from mainline (r150372:150672).
2981 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2984 * sese.c (convert_for_phi_arg): New.
2985 (add_guard_exit_phis): Use convert_for_phi_arg.
2987 * gfortran.dg/graphite/id-17.f: New.
2989 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2991 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2992 unknown subscript upper bounds.
2994 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2996 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2997 Pranav Garg <pranav.garg2107@gmail.com>
2999 * graphite-interchange.c (gather_access_strides): Removed.
3000 (ppl_max_for_le): New.
3001 (build_linearized_memory_access): New.
3002 (memory_stride_in_loop): New.
3003 (pbb_interchange_profitable_p): Reimplemented.
3004 * graphite-ppl.h (ppl_new_id_map): New.
3005 (ppl_interchange): New.
3007 * gcc.dg/graphite/interchange-6.c: XFAILed.
3009 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3011 * graphite-interchange.c (compute_subscript): Removed.
3012 (compute_array_size_cstr): Removed.
3013 (compute_array_size_poly): Removed.
3014 (compute_array_size): Removed.
3015 (gather_access_strides_poly): Removed.
3016 (gather_access_strides): Empty.
3018 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3020 * graphite-dependences.c (dependence_polyhedron_1): Replace
3021 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3022 (graphite_legal_transform_dr): Same.
3023 (graphite_carried_dependence_level_k): Same.
3024 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3025 Initialize PDR_NB_SUBSCRIPTS.
3026 (print_pdr_access_layout): Replace pdr_nb_subscripts with
3028 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3029 (PDR_NB_SUBSCRIPTS): New.
3030 (pdr_nb_subscripts): Removed.
3031 (pdr_dim): Simplified.
3032 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3033 with PDR_NB_SUBSCRIPTS.
3035 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3037 * graphite-interchange.c (compute_array_size): Remove use of
3039 * graphite-poly.c (new_poly_dr): Remove argument data_container.
3040 Do not initialize PDR_DATA_CONTAINER.
3041 (print_pdr): Do not print PDR_DATA_CONTAINER.
3042 * graphite-poly.h (struct poly_dr): Remove data_container field.
3043 (PDR_DATA_CONTAINER): Removed.
3044 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3046 (build_poly_dr): Same.
3048 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3050 * gcc.dg/graphite/interchange-9.c: New.
3052 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3053 Sebastian Pop <sebastian.pop@amd.com>
3055 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3056 copy of the dependence polyhedron. Free the temporary objects.
3057 (graphite_carried_dependence_level_k): Free unused objects before
3060 * gcc.dg/graphite/interchange-1.c: XFAILed.
3061 * gcc.dg/graphite/interchange-2.c: XFAILed.
3062 * gcc.dg/graphite/interchange-3.c: XFAILed.
3063 * gcc.dg/graphite/interchange-4.c: XFAILed.
3064 * gcc.dg/graphite/interchange-7.c: XFAILed.
3066 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3068 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3069 Early return without analyzing the data dependences if no
3070 transform has been done. Call restore_scattering if the transform
3072 (graphite-interchange.c): Same.
3073 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3074 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3075 (apply_poly_transforms): Do not gcc_assert that
3076 the transform is legal.
3077 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3078 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3079 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3080 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3081 * graphite-poly.h (struct poly_scattering): New.
3082 (struct poly_bb): Add original, transformed, and saved fields.
3083 Remove transformed_scattering, original_scattering, nb_local_variables,
3084 and nb_scattering_transform fields.
3085 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3086 (poly_scattering_new): New.
3087 (poly_scattering_free): New.
3088 (poly_scattering_copy): New.
3089 (store_scattering_pbb): New.
3090 (store_scattering): New.
3091 (restore_scattering_pbb): New.
3092 (restore_scattering): New.
3093 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3094 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3096 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3098 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3101 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3103 * Makefile.in (graphite.o): Depends on PREDICT_H.
3104 * graphite.c: Include predict.h.
3105 (graphite_finalize): Call tree_estimate_probability.
3106 * predict.c (predict_loops): Do not call scev_initialize and
3108 (tree_estimate_probability_bb): New.
3109 (tree_estimate_probability): Do not initialize loops: move that
3110 code to the driver. Call tree_estimate_probability_bb.
3111 (tree_estimate_probability_driver): New.
3112 (pass_profile): Use tree_estimate_probability_driver.
3113 * predict.h (tree_estimate_probability): Declared.
3115 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3117 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3118 * graphite-dependences.c (graphite_legal_transform): Add time to
3119 TV_GRAPHITE_DATA_DEPS.
3120 (dependency_between_pbbs_p): Same.
3121 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3123 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3125 * Merge from mainline (r149952:150372).
3127 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3129 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3130 * graphite-blocking.c: Same.
3131 * graphite-clast-to-gimple.c: Same.
3132 * graphite-dependences.c: Same.
3133 * graphite-poly.c: Same.
3134 * graphite-poly.h: Same.
3135 * graphite-ppl.c: Same.
3136 * graphite-scop-detection.c: Same.
3137 * graphite-sese-to-poly.c: Same.
3140 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3142 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3143 (remove_simple_copy_phi): New.
3144 (remove_invariant_phi): New.
3145 (simple_copy_phi_p): New.
3146 (reduction_phi_p): New.
3147 (gsi_for_ssa_name_def): New.
3148 (insert_out_of_ssa_copy): New.
3149 (insert_out_of_ssa_copy_on_edge): New.
3150 (create_zero_dim_array): New.
3151 (scalar_close_phi_node_p): New.
3152 (rewrite_close_phi_out_of_ssa): New.
3153 (rewrite_phi_out_of_ssa): New.
3154 (rewrite_reductions_out_of_ssa): New.
3155 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3157 * gcc.dg/graphite/id-11.c: New.
3158 * gcc.dg/graphite/id-15.c: New.
3159 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3160 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3161 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3162 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3163 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3164 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3165 * gfortran.dg/graphite/id-13.f: New.
3166 * gfortran.dg/graphite/id-5.f: New.
3168 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3170 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3171 check that nb_reductions_in_loop is zero.
3172 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3173 reduction phi nodes.
3174 (nb_reductions_in_loop): Removed.
3175 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3176 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3177 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3178 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3179 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3181 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3183 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3184 statements that have an empty iteration domain.
3185 * gfortran.dg/graphite/id-16.f: New.
3187 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3189 * tree-scalar-evolution.c (instantiate_scev_1): Return
3190 chrec_dont_know when the result is not above instantiate_below.
3191 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3192 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3193 the tree has a known scalar evolution.
3194 * gfortran.dg/graphite/id-14.f: New.
3195 * gfortran.dg/graphite/id-15.f: New.
3197 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3199 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3201 (rename_variables): Keep inserting renames after the ones already
3204 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3206 * graphite-sese-to-poly.c (compare_bb_depths): New.
3207 (graphite_sort_dominated_info): New.
3208 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3209 (build_scop_scattering): Fix comment.
3211 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3213 * graphite.c (graphite_finalize): Call print_loops instead of
3214 dump_function_to_file.
3215 * gcc.dg/graphite/graphite.exp: Fix formatting.
3216 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3217 loops generated in the graphite output file.
3218 * gcc.dg/graphite/pr35356-2.c: New.
3219 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3220 * gfortran.dg/graphite/id-12.f: New.
3222 2009-07-24 Li Feng <nemokingdom@gmail.com>
3224 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3227 2009-07-24 Li Feng <nemokingdom@gmail.com>
3228 Tobias Grosser <grosser@fim.uni-passau.de>
3230 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3231 alias set number build alias in ACCESSES polyhedron.
3232 (build_alias_set_for_drs): New.
3233 (build_pbb_drs): Added build_alias_set_for_drs.
3234 * graphite-dependences.c (poly_drs_may_alias_p): New.
3235 (graphite_carried_dependence_level_k): Check alias information
3236 before building polyhedron.
3238 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3240 * Makefile.in (lambda-code.o): Fix formatting.
3242 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3244 * Merge from mainline (r149350-149952)
3246 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3248 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3249 before interchange to prepare for loop blocking.
3251 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3253 * graphite-poly.c (apply_poly_transforms): Add checks after every
3255 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3256 done in apply_poly_transforms.
3258 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3260 * graphite-dependences.c (build_lexicographically_gt_constraint):
3261 Replace RES parameter with *RES.
3262 (dependence_polyhedron_1): Pass an address of the parameter RES
3263 instead of value of RES.
3265 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3267 * graphite.c (graphite_finalize): Fix comment.
3268 (graphite_transform_loops): Reset scev info after code generation
3271 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3273 * graphite.c (graphite_finalize): Call scev_reset.
3275 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3277 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3278 GBB_CLOOG_IV_TYPES hash table twice.
3279 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3280 (add_condition_to_domain): Clear GMP values.
3282 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3284 * graphite-dependences.c: Fix formatting.
3285 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3286 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3287 * graphite-sese-to-poly.c: Fix formatting.
3288 * graphite.c (graphite_transform_loops): Create the hash table
3289 after the early return.
3291 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3293 * gcc.dg/graphite/id-14.c: New.
3294 * gcc.dg/graphite/pr40157.c: New.
3295 * gfortran.dg/graphite/id-11.f: New.
3297 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3299 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3300 (build_poly_scop): Return false when there are no pbbs within
3301 loops to avoid to pass to cloog scops with no loops.
3303 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3305 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3306 useless test "i % 2".
3307 (build_pbb_scattering_polyhedrons): Fix formatting.
3308 (build_poly_dr): Same.
3309 * graphite.c (graphite_transform_loops): Restructure.
3311 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
3313 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3314 reduction_list parameter.
3315 (rewrite_all_phi_nodes_with_iv): Same.
3316 (canonicalize_loop_ivs): Same.
3317 * tree-parloops.c (struct brli): Removed.
3318 (build_reduction_list_info): Removed.
3319 (build_new_reduction): New.
3320 (analyze_reduction_list): Removed.
3321 (gather_scalar_reductions): Find reductions instead of phi
3322 nodes that can't be canonicalized.
3323 (try_create_reduction_list): Remove reduction_list parameter.
3324 (gen_parallel_loop): Same.
3325 (parallelize_loops): Remove analyze_reductions variable,
3326 initialization and free.
3327 Change reduction_list htab initialization to reduction_info
3328 elements instead of ssa names.
3329 Call try_create_reduction_list and gen_parallel_loop without
3330 analyzed_reduction argument.
3331 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3332 canonicalize_loop_ivs with one less argument.
3333 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3335 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3337 * graphite-dependences.c (new_poly_dr_pair): New.
3338 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3339 (new_poly_dr_pair): New.
3340 (eq_poly_dr_pair_p): New.
3341 (hash_poly_dr_pair_p): New.
3342 * graphite-dependences.h (struct poly_dr_pair): New.
3343 (eq_poly_dr_pair_p): Declared.
3344 (hash_poly_dr_pair_p): Declared.
3345 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3346 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3347 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3348 * Makefile.in (graphite-poly.o): Add dependence on
3349 graphite-dependences.h.
3351 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3353 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3354 polynomials of degree > 1 pass to Graphite.
3355 * tree-chrec.c (scev_is_linear_expression): Call
3356 evolution_function_is_affine_multivariate_p.
3357 * gfortran.dg/graphite/id-10.f90: New.
3359 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3361 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3362 Instantiate scevs varying in outer loops.
3363 * gfortran.dg/graphite/id-9.f: Correct testcase.
3365 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3367 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3368 redundant constraint.
3370 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3372 * gcc.dg/graphite/graphite.exp: Fix comments.
3373 * gfortran.dg/graphite/graphite.exp: Trigger actions
3374 based on the file names as in the C testsuite.
3375 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3376 * gfortran.dg/graphite/block-2.f: Same.
3377 * gfortran.dg/graphite/block-3.f90: Same.
3378 * gfortran.dg/graphite/block-4.f90: Same.
3379 * gfortran.dg/graphite/id-1.f90: Same.
3380 * gfortran.dg/graphite/id-2.f90: Same.
3381 * gfortran.dg/graphite/id-3.f90: Same.
3382 * gfortran.dg/graphite/id-4.f90: Same.
3383 * gfortran.dg/graphite/id-6.f: Same.
3384 * gfortran.dg/graphite/id-9.f: Same.
3385 * gfortran.dg/graphite/interchange-1.f: Same.
3386 * gfortran.dg/graphite/interchange-2.f: Same.
3387 * gfortran.dg/graphite/scop-1.f: Same.
3389 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3391 * sese.c (expand_scalar_variables_call): New.
3392 (expand_scalar_variables_ssa_name): Handle calls in expander.
3394 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3396 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3397 Expect to see the pattern twice.
3398 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3399 * gcc.dg/graphite/interchange-5.c: Same.
3400 * gcc.dg/graphite/interchange-6.c: Same.
3402 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3404 * gcc.dg/graphite/id-10.c: New.
3405 * gcc.dg/graphite/id-12.c: New.
3406 * gfortran.dg/graphite/id-7.f: New.
3407 * gfortran.dg/graphite/id-8.f: New.
3409 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3411 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3414 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3416 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3418 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3420 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3422 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3424 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3425 building PDR subscripts.
3427 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3429 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3430 computation of array sizes.
3432 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3434 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3436 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3438 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3439 build_pairwise_constraint, dr_equality_constraints,
3440 build_pairwise_scheduling_equality,
3441 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3442 build_lexicographically_gt_constraint, dependence_polyhedron,
3443 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3444 Move from NNC_Polyhedron to C_Polyhedron.
3445 * graphite-interchange.c (compute_array_size_poly,
3446 gather_access_strides): Dito.
3447 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3448 free_scop, pbb_number_of_iterations): Dito.
3449 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3450 pbb_dim_iter_domain, struct scop): Dito.
3451 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3452 new_Cloog_Domain_from_ppl_Polyhedron,
3453 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3454 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3455 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3456 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3457 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3458 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3459 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3460 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3461 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3462 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3463 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3464 build_scop_iteration_domain, build_poly_dr): Dito
3466 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3468 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3470 * gcc.dg/graphite/run-id-1.c: New.
3472 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3474 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3475 positivity constraint on the symbolic number of iterations.
3477 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3479 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3481 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3482 Tobias Grosser <grosser@fim.uni-passau.de>
3484 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3485 (build_cloog_prog): Directly use SCOP_CONTEXT.
3486 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3487 (free_scop): Free SCOP_CONTEXT.
3488 (print_scop_context): New.
3489 (print_scop): Call print_scop_context.
3490 (debug_scop_context): New.
3491 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3492 (struct scop): Added field context.
3493 (SCOP_CONTEXT): New.
3494 * graphite-sese-to-poly.c (add_param_constraints): New.
3495 (build_scop_context): New.
3496 (build_poly_scop): Call build_scop_context.
3498 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3500 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3501 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3502 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3503 * graphite-ppl.h: Include double-int.h and tree.h.
3504 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3505 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3506 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3507 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3509 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3511 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3512 POINTER_PLUS_EXPR for pointer types.
3513 (clast_to_gcc_expression): Same.
3515 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3517 * graphite-poly.c (print_scattering_function): Early return when
3518 PBB_TRANSFORMED_SCATTERING is not initialized.
3519 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3521 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3523 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3526 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3528 * tree-parloops.c (analyze_reduction_list): Change return
3530 (try_create_reduction_list): Move the call to
3531 analyze_reduction_list to the beginining.
3532 Call reduction_phi with analyzed_reductions as argument
3533 instead of reduction_list.
3535 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3537 * Merge from mainline (r148296:149346)
3539 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3541 * graphite-scop-detection.c (graphite_can_represent_init): New.
3542 (graphite_can_represent_scev): Call graphite_can_represent_init:
3543 check that the initial value does not contain multiplications of
3545 (stmt_has_simple_data_refs_p): New.
3546 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3547 (is_simple_operand): Fix formatting.
3548 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3550 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3552 * gcc.dg/graphite/id-13.c: New.
3553 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3554 analyze_scalar_evolution, use scalar_evolution_in_region.
3555 (scan_tree_for_params_right_scev): Add extra assert.
3556 (parameter_index_in_region_1): Split from parameter_index_in_region.
3557 (idx_record_params): Use scalar_evolution_in_region.
3558 (find_params_in_bb): Same.
3559 (find_scop_parameters): Same.
3560 (build_loop_iteration_domains): Same.
3561 (create_linear_expr_from_tree): Same.
3562 * sese.c (scalar_evolution_in_region): New.
3563 * sese.h (scalar_evolution_in_region): Declared.
3564 (defined_in_sese_p): New.
3565 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3567 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3570 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3572 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3573 TREE_DATA_REF_H also implies SCEV_H.
3575 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3577 * graphite-poly.c (print_scop_params): New.
3578 (print_scop): Call print_scop_params.
3579 (debug_scop_params): New.
3580 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3582 2009-07-07 Li Feng <nemokingdom@gmail.com>
3584 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3585 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3586 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3587 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3588 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3589 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3591 2009-07-07 Li Feng <nemokingdom@gmail.com>
3593 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3594 for dependency checking part.
3595 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3596 tests for dependency checking.
3597 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3598 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3599 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3600 flag -fdump-tree-graphite-all for autopar testsuites.
3602 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3604 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3605 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3606 canonicalize_loop_ivs): Moved...
3607 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3609 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3611 * tree-parloops.c (try_create_reduction_list): Pass an extra
3612 argument analyzed_reductions. Call analyze_reduction_list.
3613 (gen_parallel_loop): Do not call analyze_reduction_list.
3614 (parallelize_loops): Init and finalize analyzed_reductions.
3616 2009-07-06 Li Feng <nemokingdom@gmail.com>
3618 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3619 Added flag -fno-loop-strip-mine for autopar testcase.
3621 2009-07-04 Li Feng <nemokingdom@gmail.com>
3623 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3624 transformed scattering dimension instead of unmatch orignal when
3625 calling dependence_polyhedron.
3627 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3629 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3631 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3633 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3634 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3636 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3638 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3639 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3640 * graphite-poly.c (pbb_number_of_iterations): New.
3641 * graphite-poly.h (pbb_number_of_iterations): Declared.
3642 (pbb_iterator_dim, pbb_parameter_dim): New.
3644 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3646 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3647 last commit on type of lower and upper bound of loops.
3649 2009-06-29 Li Feng <nemokingdom@gmail.com>
3651 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3652 graphite-dependences.h.
3653 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3654 (mark_bb_with_pbb): New.
3655 (get_stmtfor_depth): New.
3656 (find_pbb_via_hash): New.
3657 (dependency_in_loop_p): New.
3658 (mark_loops_parallel): New.
3659 (free_aux_in_new_loops): New.
3660 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3661 bb with it's relevant pbb. Mark newly created loops. Remove mark
3662 innermost loop parallel without checking.
3663 (gloog): Add parameter BB_PBB_MAPPING.
3664 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3665 (gloog): Change declaration.
3666 (mark_loop_parallel): Make extern.
3667 (free_aux_in_new_loops): Declare.
3668 (bb_pbb_map_hash): New.
3669 (eq_bb_pbb_map): New.
3670 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3671 auto parallelization when flag_graphite_force_parallel is set.
3672 (graphite_finalize): Added free_aux_in_new_loops.
3673 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3674 the innermost loop that marked parallel. Use
3675 flag_graphite_force_parallel instead of loop->can_be_parallel.
3676 (loop_parallel_p): Move inner most checking out of function.
3678 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3680 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3681 type of lower and upper bound of loops signed long int.
3683 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3685 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3686 expression outside the loop.
3688 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3690 * gcc.dg/graphite/interchange-8.c: New.
3692 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3694 * gcc.dg/graphite/interchange-0.c: XFailed.
3695 * gcc.dg/graphite/interchange-5.c: XFailed.
3696 * gcc.dg/graphite/interchange-6.c: XFailed.
3698 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3700 * graphite-interchange.c (compute_array_size_poly): The end of the
3701 recursion should return 1.
3703 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3705 * graphite-interchange.c (compute_array_size_cstr): Allow the
3706 subscript multiplier to be -1.
3707 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3708 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3709 data_container. Initializes PDR_DATA_CONTAINER.
3710 (print_pdr_access_layout): New.
3711 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3712 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3714 (PDR_DATA_CONTAINER): New.
3715 (new_poly_dr): Update declaration.
3716 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3717 (build_poly_dr): Call pdr_add_data_dimensions.
3719 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3721 * graphite-poly.h (struct poly_dr): Fix comment.
3722 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3723 (pdr_add_memory_accesses): New.
3724 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3726 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3728 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3729 (print_pbb): Add call to print_pdrs.
3730 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3732 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3733 Li Feng <nemokingdom@gmail.com>
3735 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3736 (dependency_between_pbbs_p): New.
3737 (lexicographically_gt_p): Assure !empty_p before polyhedron
3738 intersection assign.
3739 (build_lexicographically_gt_constraint): Correct lexicographically
3741 * graphite-dependences.h: New.
3742 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3744 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3746 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3747 (gloog): Print to dump_file the generated clast.
3748 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3749 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3751 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3753 * graphite-poly.c (extend_scattering): Increment
3754 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3756 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3758 * graphite-interchange.c (compute_array_size_poly): Added exit of
3759 recursion condition. Continue iterating even after the first equality.
3760 (compute_array_size): Same.
3762 2009-06-24 Li Feng <nemokingdom@gmail.com>
3764 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3765 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3766 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3767 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3768 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3770 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3772 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3773 only when the use verifies is_gimple_reg.
3775 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3777 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3778 Allocate scaldims after call to unify_scattering_dimensions.
3780 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3782 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3784 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3785 Albert Cohen <albert.cohen@inria.fr>
3787 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3788 variables for the strip mining.
3790 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3791 Pranav Garg <pranav.garg2107@gmail.com>
3793 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3794 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3795 (graphite-blocking.o): New rule.
3796 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3797 * graphite-blocking.c: New.
3798 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3799 flag_loop_strip_mine.
3800 (psct_scattering_dim_for_loop_depth): New.
3801 * graphite-poly.h (scop_do_strip_mine): Declared.
3802 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3803 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3804 flag_loop_strip_mine.
3806 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3808 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3809 a GMP value and a PPL coefficient at each iteration of a loop.
3811 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3813 * graphite-dependences.c (dependence_polyhedron): Do not use
3814 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3815 pbb_nb_scattering_transform.
3816 (graphite_legal_transform_dr): Same.
3817 * graphite-poly.c (extend_scattering): Same.
3818 (unify_scattering_dimensions): Same.
3819 (print_scattering_function): Same.
3820 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3821 PBB_NB_LOCAL_VARIABLES.
3822 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3823 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3824 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3825 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3826 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3827 (pbb_nb_scattering_transform): New.
3828 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3829 (psco_scattering_dim): Add assert on parameters.
3830 (psct_scattering_dim): Same.
3831 (psct_scattering_dim_for_loop_depth): Declared.
3832 (psct_local_var_dim): New.
3833 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3834 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3835 correct layout, call pbb_nb_local_vars.
3836 (psct_add_local_variable, psct_add_scattering_dimension): New.
3837 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3838 Initialize PBB_NB_SCATTERING_TRANSFORM.
3840 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3842 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3843 (set_coef): Renamed ppl_set_coef.
3844 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3846 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3848 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3849 test a boolean against 1.
3850 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3851 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3852 (pbb_do_interchange): Returns true when a transform has been performed.
3853 (scop_do_interchange): Same.
3854 * graphite-poly.c (apply_poly_transforms): Use the return value of
3855 scop_do_interchange.
3856 * graphite-poly.h (scop_do_interchange): Update declaration.
3858 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3860 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3862 * sese.c (sese_reset_aux_in_loops): New.
3863 * sese.h (sese_reset_aux_in_loops): New.
3865 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3867 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3868 multiplier and multiply the constant by the multiplier.
3869 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3870 (build_poly_dr): Do not use the multiplier to define the subscript.
3872 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3874 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3875 compiler's data reference. Initialize PDR_CDR.
3876 (print_pdr): Call dump_data_reference.
3877 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3878 Add compiler_dr field.
3879 (PDR_BB): Renamed PDR_PBB.
3881 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3882 GCC's data reference representation.
3883 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3884 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3886 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3888 * graphite-poly.c (print_scattering_function): Also print the layout.
3889 * graphite-poly.h (pbb_nb_local_vars): New.
3891 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3893 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3895 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3897 * graphite-poly.c (print_pdr, debug_pdr): New.
3898 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3899 (PDR_BASE): Removed.
3901 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3903 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3906 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3908 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3909 subscript identification column.
3910 (pbb_do_interchange): Print to dump_file that some loops "will be
3911 interchanged". Rely on that chain of characters in the testcases.
3912 * gcc.dg/graphite/interchange-0.c: New.
3913 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3914 interchange-*.c files and compile them with -floop-interchange.
3916 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3918 * graphite-interchange.c (interchange_profitable_p): Renamed
3919 pbb_interchange_profitable_p.
3921 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3922 Harsha Jagasia <harsha.jagasia@amd.com>
3923 Pranav Garg <pranav.garg2107@gmail.com>
3925 * graphite-interchange.c (interchange_profitable_p): Make static.
3926 (pbb_interchange_loop_depths, pbb_do_interchange,
3927 scop_do_interchange): New.
3928 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3929 for flag_loop_interchange.
3930 * graphite-poly.h (scop_do_interchange): Declared.
3931 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3932 flag_loop_interchange is used.
3934 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3936 * graphite-dependences.c (dependence_polyhedron): Update use of
3937 pbb_nb_scattering_dims.
3938 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3939 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3940 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3941 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3943 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3945 * graphite.c: Cleanup foo.
3947 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3949 * Merge from mainline (r143684:148293).
3950 * Disabled libpcp until it gets fixed.
3952 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3953 Harsha Jagasia <harsha.jagasia@amd.com>
3955 * graphite-interchange.c: New.
3956 * Makefile.in (graphite-interchange.o): New.
3957 * graphite-poly.h (interchange_profitable_p): Declared.
3958 * graphite-ppl.h (value_max): New.
3960 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3962 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3963 * graphite-poly.h: Fix some comments.
3967 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3970 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3971 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3972 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3973 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3974 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3975 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3976 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3977 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3978 * graphite-clast-to-gimple.c: Same.
3979 * graphite-dependences.c: Same.
3980 * graphite-poly.c: Same.
3981 * graphite-sese-to-poly.c: Same.
3983 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3985 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3986 expressions for an IV rename, as returned by clast_to_gcc_expression.
3987 (copy_renames): Rename new_name to expr.
3988 * sese.c (debug_rename_elt): Same.
3991 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3992 the information from the rename map.
3993 (rename_variables_in_stmt): Same.
3994 (add_loop_exit_phis): Rename new_name to expr.
3995 (insert_loop_close_phis): Same.
3996 (add_guard_exit_phis): Same. Call force_gimple_operand.
3997 * sese.h (struct rename_map_elt): Rename new_name to expr.
3998 (new_rename_map_elt): Same.
4000 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4002 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4003 * sese.c (set_rename): Make it extern.
4004 * sese.h (set_rename): Declared.
4006 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4008 * graphite-poly.c (extend_scattering): Free values.
4009 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4011 (ppl_print_powerset_matrix): Same.
4012 * graphite-scop-detection.c (free_scops_1): New.
4013 (limit_scops): Call free_scops_1.
4014 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4015 (build_poly_dr): Free PPL coefficients.
4016 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4018 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
4020 * graphite-dependences.c: New.
4021 * graphite-data-ref.c: Removed.
4022 * graphite-data-ref.h: Removed.
4023 * Makefile.in (graphite-data-ref.o): Removed.
4024 (graphite-dependences.o): Added.
4025 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4026 * graphite-poly.c: Same.
4027 Move the data dependence testing to graphite-dependences.c.
4029 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
4031 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4032 from graphite_cannot_represent_loop. Code refactored.
4033 (scopdet_basic_block_info): Call graphite_can_represent_loop.
4035 2009-05-17 Li Feng <nemokingdom@gmail.com>
4037 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4038 Cover all the testcases (not only the filtered ones).
4040 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
4042 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4043 unnecessary check. Update comments. Move check for REAL_TYPE here.
4044 (harmful_stmt_in_bb): Remove checks for conditions. This is already
4045 done in (stmt_simple_for_scop_p).
4047 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
4049 * graphite.c (print_global_statistics): New.
4050 (print_graphite_scop_statistic): New.
4051 (print_graphite_statistics): New.
4052 (graphite_initialize, graphite_transform_loops): Print statistics.
4053 * graphite-scop-detection (build_scops): Print statistics.
4054 (print_graphite_scop_statistics): New.
4055 (print_graphite_statistics): New.
4057 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4059 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4060 (debug_clast_name_index): Removed.
4061 (debug_clast_name_indexes_1): Removed.
4062 (debug_clast_name_indexes): Removed.
4063 (clast_name_index_elt_info): Removed.
4064 (eq_clast_name_indexes): Removed.
4065 (clast_name_to_index): Removed.
4066 (new_clast_name_index): Removed.
4067 (save_clast_name_index): Removed.
4068 (save_var_name): Moved...
4069 (init_sese_params_index): Removed.
4070 (clast_name_to_gcc): Remove use of name_tree.
4071 (initialize_cloog_names): Same.
4072 (gloog): Do not call init_sese_params_index.
4073 * graphite-sese-to-poly.c (save_var_name): ...here.
4074 (parameter_index_in_region): New.
4075 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4076 (parameter_index_in_region): Removed.
4077 (is_parameter): Remove use of name_tree.
4078 * sese.h (struct name_tree): Removed.
4079 (struct sese): Remove use of name_tree. New field params_names.
4080 (SESE_PARAMS_NAMES): New.
4081 (SESE_PARAMS): Remove duplicate.
4082 (parameter_index_in_region): Removed.
4083 (sese_nb_params): Remove use of name_tree.
4084 (struct clast_name_index): New.
4085 (new_clast_name_index): New.
4086 (clast_name_to_index): New.
4087 (save_clast_name_index): New.
4088 (debug_clast_name_index): New.
4089 (debug_clast_name_indexes_1): New.
4090 (debug_clast_name_indexes): New.
4091 (clast_name_index_elt_info): New.
4092 (eq_clast_name_indexes): New.
4094 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4096 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4097 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4098 (graphite_loop_normal_form): Do not pass region. Do not
4099 initialize SESE_OLDIVS.
4100 (build_graphite_loop_normal_form): Update call to
4101 graphite_loop_normal_form.
4102 * sese.c (debug_oldivs): Removed.
4103 (new_sese): Do not initialize SESE_OLDIVS.
4104 (free_sese): Do not free SESE_OLDIVS.
4105 (oldiv_for_loop): Removed.
4106 * sese.h (struct sese): Remove old_ivs.
4107 (SESE_OLDIVS): Removed.
4108 (oldiv_for_loop): Removed.
4110 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4112 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4113 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4114 replaced by a call to newivs_to_depth_to_newiv.
4115 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4116 (clast_to_gcc_expression_red): Same.
4117 (gcc_type_for_clast_expr): Same.
4118 (gcc_type_for_clast_eq): Same.
4119 (graphite_translate_clast_equation): Same.
4120 (graphite_create_guard_cond_expr): Same.
4121 (graphite_create_new_guard): Same.
4122 (graphite_create_new_loop): Same.
4123 (build_iv_mapping): Same.
4124 (translate_clast): Same.
4126 (loop_iv_stack_patch_for_consts): Removed. *
4127 sese.c (iv_stack_entry_is_constant): Removed.
4128 (iv_stack_entry_is_iv): Removed.
4129 (loop_iv_stack_push_iv): Removed.
4130 (loop_iv_stack_insert_constant): Removed.
4131 (loop_iv_stack_pop): Removed.
4132 (loop_iv_stack_get_iv): Removed.
4133 (loop_iv_stack_get_iv_from_name): Removed.
4134 (debug_loop_iv_stack): Removed.
4135 (free_loop_iv_stack): Removed.
4136 (loop_iv_stack_remove_constants): Removed. *
4137 sese.h (iv_stack_entry_kind): Removed.
4138 (iv_stack_entry_data_union): Removed.
4139 (iv_stack_entry_struct): Removed.
4140 (iv_stack_entry_p): Removed.
4141 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4142 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4143 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4144 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4145 (gbb_loop_at_index): Fix indenting.
4146 (gbb_loop_index): Removed.
4148 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4150 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4151 Call clast_name_to_index.
4153 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4155 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4156 do not pass params. Get params from SESE_PARAMS.
4157 (clast_to_gcc_expression): Same.
4158 (clast_to_gcc_expression_red): Same.
4159 (gcc_type_for_clast_eq): Same.
4160 (graphite_translate_clast_equation): Same.
4161 (graphite_create_new_loop): Same.
4162 * sese.c (rename_variables_in_stmt): Fix comment.
4164 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4166 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4168 Call save_clast_name_index.
4169 (translate_clast): Pass newivs_index.
4170 (gloog): Create and free newivs_index.
4172 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4174 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4175 (clast_name_index_p): New type.
4176 (debug_clast_name_index): New.
4177 (debug_clast_name_indexes_1): New.
4178 (debug_clast_name_indexes): New.
4179 (clast_name_index_elt_info): New.
4180 (eq_clast_name_indexes): New.
4181 (clast_name_to_index): New.
4182 (new_clast_name_index): New.
4183 (save_clast_name_index): New.
4184 (init_sese_params_index): New.
4185 (gloog): Call init_sese_params_index.
4186 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4187 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4188 (free_sese): Free SESE_PARAMS_INDEX.
4189 * sese.h (struct sese): Add params_index.
4190 (SESE_PARAMS_INDEX): New.
4192 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4194 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4195 (graphite_create_new_loop): Pass the newivs vector. Push the
4196 newly created IV to newivs.
4197 (translate_clast): Pass the newivs vector.
4198 (gloog): Create and destroy the newivs vector.
4200 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4202 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4203 (graphite_loop_normal_form): Initialize loop->aux with the unique
4204 IV that has been created.
4206 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4208 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4209 scev with parameters in the base part. They where forbidden
4212 2009-05-11 Li Feng <nemokingdom@gmail.com>
4214 * gcc.dg/graphite/graphite.exp: Set different default
4215 compile options by file names.
4216 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4217 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4218 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4219 * gcc.dg/graphite/scop-matmult.c: Ditto.
4221 2009-05-08 Li Feng <nemokingdom@gmail.com>
4223 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4224 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4225 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4226 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4228 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4230 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4233 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4235 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4236 allow integer constant strides.
4237 (graphite_can_represent_expr): Depend on outermost_loop.
4238 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4239 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4240 build_scops_1): Same.
4241 (scopdet_basic_block_info): Same and insert layered SCoP
4243 (try_generate_gimple_bb): Cleanup.
4244 (build_scops): Enable data references.
4246 * gcc.dg/graphite/id-5.c: New.
4247 * gcc.dg/graphite/id-9.c: New.
4248 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4249 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4251 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4253 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4254 that we have not yet built for this SCoP.
4256 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4258 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4259 for complex numbers.
4261 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4263 * graphite-ppl.c: Fix build if cloog is not available.
4265 2009-05-04 Li Feng <nemokingdom@gmail.com>
4267 * tree-parloops.c (loop_parallel_p): Remove construction of
4268 NITER and REDUCTION_LIST.
4269 (try_get_loop_niter): New.
4270 (try_create_reduction_list): New.
4271 (parallelize_loops): Bypass the failed checkings in autopar
4272 when can_be_parallel in loop structure is set to true.
4274 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4276 * gcc.dg/graphite/id-6.c: Update testcase.
4277 * gcc.dg/graphite/scop-3.c: Dito.
4279 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4281 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4282 Enable EQ_EXPR and NE_EXPR again.
4284 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4286 * graphite-scop-detection.c (graphite_can_represent_scev):
4287 Add check if scev is affine multivariate.
4288 (harmful_stmt_in_bb): Check if we can represent the conditions.
4289 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4291 * gcc.dg/graphite/id-7.c: New.
4293 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4295 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4296 Check all bbs in region, not only the bbs that are represented in
4298 (build_poly_scop): Add newline.
4299 * gcc.dg/graphite/id-8.c: New.
4301 2009-04-30 Li Feng <nemokingdom@gmail.com>
4303 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4304 when loop initialize.
4305 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4306 * common.opt: Declare flag_graphite_force_parallel.
4307 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4309 * graphite-poly.c (apply_poly_transforms): Introduce
4310 flag_graphite_force_parallel.
4311 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4312 * toplev.c (process_options): ditto and replace a not correctly
4315 2009-04-30 Li Feng <nemokingdom@gmail.com>
4317 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4318 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4319 to the redefinition.
4320 (compute_cloog_iv_types_1): ditto.
4321 (build_iv_mapping): ditto.
4322 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4324 (free_gimple_bb): Removed GBB_LOOPS related free part.
4325 (build_bb_loops): Removed.
4326 * sese.h (struct gimple_bb): Removed loops.
4327 (GBB_LOOPS): Removed.
4328 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4329 (gbb_loop_index): ditto.
4331 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4333 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4334 allow non constant strides.
4335 * gcc.dg/graphite/scop-20.c: New.
4337 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4339 * graphite-scop-detection.c (dot_all_scops): Fix system call
4340 return value warning.
4343 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4345 * gcc.dg/graphite/id-6.c: Fix pattern.
4346 * gcc.dg/graphite/scop-3.c: Same.
4348 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4350 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4351 build_pairwise_constraint, dr_equality_constraints,
4352 build_pairwise_scheduling_equality,
4353 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4354 build_lexicographically_gt_constraint, dependence_polyhedron,
4355 graphite_legal_transform_dr, graphite_legal_transform_bb,
4356 graphite_legal_transform): New.
4357 * graphite-poly.h (graphite_legal_transform): Declared.
4358 * graphite-sese-to-poly.c (build_poly_scop): Call to
4359 graphite_legal_transform is disabled for the moment.
4361 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4363 * graphite-poly.h (pbb_nb_scattering_dims): New.
4364 (pbb_nb_scattering): Use it.
4366 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4368 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4369 Pointset_Powerset version of ppl_insert_dimensions.
4370 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4372 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4374 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4376 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4378 * graphite-poly.h: Fix comment.
4380 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4382 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4384 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4386 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4389 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4391 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4392 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4395 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4397 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4398 handle EQ_EXPR and NE_EXPR.
4400 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4402 * graphite-poly.h (poly_dr): Fix comment.
4404 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4405 Tobias Grosser <grosser@fim.uni-passau.de>
4407 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4408 with a zero dimension polyhedron.
4409 (find_scop_parameters): Move the call to scop_set_nb_params here.
4410 (build_loop_iteration_domains): Store in loop->aux the iteration
4412 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4413 by any loop in scop.
4414 (build_poly_scop): Do not call scop_set_nb_params.
4416 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4417 Tobias Grosser <grosser@fim.uni-passau.de>
4419 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4420 add_condition_to_domain not GT_EXPR.
4422 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4424 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4425 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4426 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4427 upper_bound_assign to calculate unions.
4428 * gcc.dg/graphite/id-6.c: New.
4430 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4432 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4433 handle abnormal edges.
4435 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4437 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4438 (free_poly_bb): Also free poly_drs.
4439 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4440 (poly_dr): Polyhedron to Pointset_Powerset.
4441 (pdr_accessp_nb_subscripts): Same.
4442 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4445 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4447 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4448 names into more meaningful names.
4450 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4452 * gfortran.dg/graphite/interchange-1.c: New.
4453 * gfortran.dg/graphite/interchange-2.c: New.
4455 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4457 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4459 * tree-parloops.c (rewrite_phi_with_iv): New.
4460 (rewrite_all_phi_nodes_with_iv): New.
4461 (canonicalize_loop_ivs): Call them.
4463 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4465 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4466 graphite_find_data_references_in_stmt.
4467 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4468 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4470 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4472 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4474 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4476 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4477 instead of bb_in_region.
4478 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4479 (build_sese_conditions): Use flag_bb_in_sese.
4480 * sese.c (register_bb_in_sese): Removed.
4481 (new_sese): Remove initialization of SESE_REGION_BBS.
4482 (free_sese): Do not free SESE_REGION_BBS.
4483 * sese.h (struct sese): Remove field region_basic_blocks.
4484 (SESE_REGION_BBS): Removed.
4485 (bb_in_sese_p): Implement in function of bb_in_region.
4487 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4489 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4492 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4494 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4496 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4497 (add_condition_to_domain): New.
4498 (add_condition_to_pbb): New.
4499 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4500 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4502 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4504 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4505 ppl_Pointset_Powerset.
4506 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4507 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4508 (pbb_nb_loops): Same.
4509 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4510 add_conditions_to_domain): Same.
4511 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4512 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4513 ppl_const_Polyhedron_t.
4514 (ppl_print_powerset_matrix): New.
4515 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4516 ppl_print_powerset_matrix): New.
4517 (ppl_print_polyhedron_matrix): Updated.
4519 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4521 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4523 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4525 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4526 (print_iteration_domains, debug_iteration_domain,
4527 debug_iteration_domains): New.
4528 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4529 debug_iteration_domains): Declared.
4530 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4533 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4534 Sebastian Pop <sebastian.pop@amd.com>
4536 * graphite-poly.h (print_iteration_domain): New.
4537 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4538 (build_sese_conditions_1, build_sese_conditions_after,
4539 build_sese_conditions_before): New.
4540 (build_sese_conditions): Rewritten.
4542 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4543 Tobias Grosser <grosser@fim.uni-passau.de>
4545 Cleanup of code generation liveouts.
4546 * graphite-clast-to-gimple.c (translate_clast): Use a single
4547 rename_map instead of one per translated statement.
4548 Do not use SESE_LIVEOUT_RENAMES.
4549 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4550 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4551 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4552 phi node of a reduction: when a loop contains a reduction used outside
4553 the loop, there should be a scalar close phi node on the exit block.
4554 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4555 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4556 (free_sese): Do not free them.
4557 (sese_build_liveouts_use): Do not use them.
4558 (sese_build_liveouts_bb): Same.
4559 (sese_build_liveouts): Same.
4560 (sese_insert_phis_for_liveouts): Same.
4561 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4562 (defined_in_loop_p): New.
4563 (alive_after_loop): New.
4564 (close_phi_not_yet_inserted_p): New.
4565 (struct alep, alep_p): New.
4566 (add_loop_exit_phis): Remove from the rename_map all the names defined
4567 in the code generated loop.
4568 (insert_loop_close_phis): Traverse the rename_map passed to it.
4569 Don't use SESE_LIVEOUT_RENAMES.
4570 (default_liveout_before_guard): Renamed default_before_guard.
4571 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4572 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4573 (register_sese_liveout_renames): Removed.
4574 (copy_bb_and_scalar_dependences): Do not call it.
4575 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4577 (SESE_LIVEOUT): Removed.
4578 (SESE_LIVEOUT_RENAMES): Removed.
4579 (SESE_REDUCTION_LIST): Removed.
4580 (sese_build_liveouts): Removed.
4581 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4582 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4583 (insert_guard_phis): Same.
4584 (rename_map_elt): Declare a VEC of them.
4585 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4586 trees not pointers to trees.
4588 Rewrite in canonical close SSA form:
4589 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4590 (limit_scops): Close the scop after the block containing the close phi
4592 (canonicalize_loop_closed_ssa): New.
4593 (canonicalize_loop_closed_ssa_form): New.
4594 (build_scops): Call canonicalize_loop_closed_ssa_form.
4596 * graphite-sese-to-poly.c: Fix typos.
4598 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4600 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4602 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4603 (print_pbb): Add conditions.
4605 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4606 Sebastian Pop <sebastian.pop@amd.com>
4608 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4609 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4610 (build_scop_bbs_1): New.
4611 (build_scop_bbs): Rewrite.
4612 * sese.h (bb_in_region): New.
4614 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4616 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4618 (print_scop): Style.
4619 * graphite-poly.h (poly_bb): Add drs vector.
4620 (PBB_DRS): Add accessor.
4621 * graphite-sese-to-poly.c (build_poly_dr): New.
4622 (build_pbb_drs, build_scop_drs): New.
4623 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4625 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4627 * tree-ssa-loop.c: Include forgotten toplev.h
4629 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4631 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4632 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4633 * gcc.dg/graphite/pr37928.c: Same
4634 * gcc.dg/graphite/pr38409.c: Same
4635 * gcc.dg/graphite/pr38498.c: Same
4636 * gcc.dg/graphite/pr38559.c: Same
4637 * gcc.dg/graphite/pr39335.c: Same
4638 * gcc.dg/graphite/pr39335_1.c: Same
4639 * gfortran.dg/graphite/block-2.f: Same
4640 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4643 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4645 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4646 build_access_matrix, build_scop_data_accesses): Remove access function
4647 building. (We get a new version soon).
4648 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4649 * sese.h (nb_loops_around_loop_in_sese): Remove.
4650 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4652 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4653 Sebastian Pop <sebastian.pop@amd.com>
4655 * graphite-scop-detection.c (struct scopdet_info): Rename last
4657 (scopdet_basic_block_info, build_scops_1): Don't use
4658 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4660 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4661 Sebastian Pop <sebastian.pop@amd.com>
4663 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4664 * sese.c (sese_build_liveouts_use): Renamed from
4665 sese_build_livein_liveouts_use. Remove liveins.
4666 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4667 Call sese_build_liveouts_use.
4668 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4669 Call sese_build_liveouts_bb.
4670 (new_sese, free_sese): Remove liveins.
4671 (sese_add_exit_phis_var): Deleted.
4672 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4674 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4676 * sese.h (sese): Remove num_ver and livein.
4677 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4679 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4681 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4683 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4685 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4686 (build_scop_scattering): Do not use compare_prefix_loops any more.
4687 (nb_common_loops): New.
4689 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4691 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4692 (register_old_and_new_names): Renamed set_rename.
4694 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4696 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4697 of the decl from the previous commit.
4699 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4701 * graphite-scop-detection.c (dot_scop): New.
4702 * graphite-scop-detection.h (dot_scop): Declared.
4704 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4706 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4708 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4710 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4711 condition at the end of the loop.
4712 * graphite.c (graphite_initialize, graphite_finalize): Print to
4713 dump_file the compiled function.
4714 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4715 of create_empty_loop_on_edge.
4716 (translate_clast): Update the code generation of loops for the new
4718 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4720 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4722 Reverted the patch from 2009-03-19.
4724 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4726 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4728 (print_scop): Style.
4729 * graphite-poly.h (poly_bb): Add drs vector.
4730 (PBB_DRS): Add accessor.
4731 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4732 (build_access_matrix_with_af, build_access_matrix,
4733 build_scop_data_accesses): Delete.
4734 (build_poly_dr): New.
4735 (build_pbb_drs, build_scop_drs): New.
4736 (build_poly_scop): call build_scop_drs.
4738 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4740 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4741 once per basic block.
4743 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4745 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4746 (graphite_can_represent_expr): Renamed from loop_affine_expr
4748 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4749 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4750 (scopdet_basic_block_info): Actually define entry_block.
4751 (stmt_simple_memref_p): Moved here from ...
4753 * tree-data-ref.c (stmt_simple_memref_p): here.
4754 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4756 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4758 * gcc.dg/graphite/id-4.c: New.
4760 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4762 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4763 (register_old_and_new_names): Update the content of the map.
4764 When there was already a rename_map_elt in the map at that
4766 (copy_bb_and_scalar_dependences): Do rename_variables after
4767 expand_scalar_variables.
4768 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4769 of the map. When there was already a rename_map_elt in the
4770 map at that location, free it.
4771 (translate_clast): Pass the rename_map. Do not initialize and free
4772 a rename_map per stmt_user.
4773 (gloog): Initialize and free one rename_map and pass it to
4776 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4778 * sese.c (expand_scalar_variables_stmt,
4779 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4781 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4782 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4783 the gimple_stmt_iterator of the statement to be expanded.
4784 * graphite-scop-detection.c (is_simple_operand): Do handle
4787 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4789 * graphite-scop-detection.c (is_simple_operand): Do not handle
4791 * gcc.dg/graphite/id-2.c: New.
4793 * graphite-sese-to-poly.c (build_bb_loops,
4794 add_value_to_dim, scan_tree_for_params_right_scev,
4795 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4796 find_params_in_bb, build_loop_iteration_domains,
4797 add_conditions_to_domain): Remove subtract.
4799 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4801 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4802 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4803 pbb_loop_at_index -> gbb_loop_at_index.
4804 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4805 (debug_loop_vec): Delete.
4806 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4807 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4808 (PBB_LOOPS): Removed.
4809 (PBB_BLACK_BOX): Insert cast.
4810 (pbb_set_black_box): New setter.
4811 (pbb_loop_at_index, pbb_loop_index): Removed.
4812 (scop_set_region, scop_set_nb_params): New.
4813 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4814 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4815 (build_poly_scop): Use scop_set_nb_params.
4816 * sese.h (gimple_bb): Add LOOPS.
4817 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4819 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4821 Revert previous commit.
4823 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4825 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4826 (register_old_and_new_names): Update the content of the map.
4827 When there was already a rename_map_elt in the map at that
4829 (copy_bb_and_scalar_dependences): Do rename_variables after
4830 expand_scalar_variables.
4831 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4832 of the map. When there was already a rename_map_elt in the
4833 map at that location, free it.
4834 (translate_clast): Pass the rename_map. Do not initialize and free
4835 a rename_map per stmt_user.
4836 (gloog): Initialize and free one rename_map and pass it to
4839 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4841 Remove forgotten line in revert.
4843 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4845 Revert previous commit.
4847 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4849 * sese.c (register_old_and_new_names): Update the content
4850 of the map. When there was already a rename_map_elt in the
4851 map at that location, free it.
4852 (copy_bb_and_scalar_dependences): Do rename_variables after
4853 expand_scalar_variables.
4854 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4855 of the map. When there was already a rename_map_elt in the
4856 map at that location, free it.
4857 (translate_clast): Pass the rename_map. Do not initialize and free
4858 a rename_map per stmt_user.
4859 (gloog): Initialize and free one rename_map and pass it to
4862 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4864 * graphite-clast-to-gimple.c (translate_clast): context_loop
4867 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4868 Sebastian Pop <sebastian.pop@amd.com>
4870 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4871 of the use of ppl_Polyhedron_map_space_dimensions.
4873 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4874 Sebastian Pop <sebastian.pop@amd.com>
4876 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4877 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4878 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4879 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4880 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4881 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4882 pbb_nb_params): New.
4883 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4884 nb_loops_around_pbb): Adapt return types.
4886 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4888 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4889 graphite-clast-to-gimple.o, graphite-data-ref.o,
4890 graphite-scop-detection.o, graphite-poly.o): Add
4893 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4895 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4896 graphite-clast-to-gimple.o, graphite-data-ref.o,
4897 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4899 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4901 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4902 * gcc.dg/graphite/pr37828.c: Same.
4903 * gcc.dg/graphite/pr37684.c: Same.
4904 * gcc.dg/graphite/block-0.c: Same.
4905 * gcc.dg/graphite/block-1.c: Same.
4906 * gcc.dg/graphite/block-2.c: Same.
4907 * gcc.dg/graphite/block-3.c: Same.
4908 * gcc.dg/graphite/block-4.c: Same.
4909 * gcc.dg/graphite/block-5.c: Same.
4910 * gcc.dg/graphite/block-6.c: Same.
4911 * gfortran.dg/graphite/pr38083.f90: Same.
4912 * gfortran.dg/graphite/block-1.f90: Same.
4913 * gfortran.dg/graphite/block-3.f90: Same.
4914 * gfortran.dg/graphite/pr37852.f90: Same.
4915 * gfortran.dg/graphite/block-4.f90: Same.
4916 * gfortran.dg/graphite/pr37980.f90: Same.
4917 * gfortran.dg/graphite/pr38953.f90: Same.
4918 * gfortran.dg/graphite/pr37857.f90: Same.
4919 * opts.c: Remove -floop-block from -O2.
4920 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4921 -floop-strip-mine are used.
4923 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4924 Sebastian Pop <sebastian.pop@amd.com>
4926 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4928 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4929 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4930 strip_mine_profitable_p, is_interchange_valid,
4931 graphite_trans_bb_block, graphite_trans_loop_block,
4932 graphite_trans_scop_block): Temporary removed.
4933 (extend_scattering, unify_scattering_dimensions): New.
4934 (print_scattering_function, graphite_read_transforms):
4935 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4936 (graphite_generate_scattering_fns): Removed.
4937 (apply_poly_transforms): Cleanup.
4938 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4939 (schedule_to_scattering): Moved.
4940 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4941 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4942 (pbb_nb_scattering): New.
4943 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4944 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4946 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4948 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4949 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4950 -> PBB_TRANSFORMED_SCATTERING.
4951 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4952 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4953 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4954 (check_poly_representation): Do not return bool.
4955 (graphite_transform_loops): Reformat.
4956 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4958 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4960 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4961 debug_pbb_domain, debug_pbb, debug_scop): New.
4962 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4963 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4965 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4968 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4969 when the type precision of the induction variable should be
4970 larger than the type precision of nit.
4971 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4972 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4973 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4975 * gcc.dg/graphite/pr39335_1.c: New.
4976 * gcc.dg/graphite/pr39335.c: New.
4978 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4980 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4981 SSA_NAMES not struct reduction_info.
4983 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4985 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4987 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4988 Tobias Grosser <grosser@fim.uni-passau.de>
4990 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4991 (free_sese): Free SESE_REDUCTION_LIST.
4992 * sese.h (struct sese): Add field reduction_list.
4993 (SESE_REDUCTION_LIST): New.
4994 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4995 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4997 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4998 Tobias Grosser <grosser@fim.uni-passau.de>
5000 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5003 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5004 Tobias Grosser <grosser@fim.uni-passau.de>
5006 * tree-parloops.c (struct brli, build_reduction_list_info,
5007 analyze_reduction_list, gather_scalar_reductions): New.
5008 (loop_parallel_p): Build a reduction list containing only
5009 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5010 (gen_parallel_loop): Call the analysis analyze_reduction_list.
5011 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5012 * tree-flow.h (gather_scalar_reductions): Declared.
5014 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
5017 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5018 number_of_iterations_exit from a gcc_assert.
5020 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
5021 Jan Sjodin <jan.sjodin@amd.com>
5023 * output.h (graphite_out_file, graphite_in_file): Declared.
5024 * toplev.c (graphite_out_file, graphite_in_file): New.
5025 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5026 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5027 Don't call schedule_to_scattering.
5028 * common.opt (fgraphite-write, fgraphite-read): New.
5029 * graphite-poly.c: Include output.h.
5030 (print_scattering_function, print_scattering_functions,
5031 debug_scattering_function, debug_scattering_functions,
5032 graphite_write_transforms, graphite_read_transforms,
5033 graphite_generate_scattering_fns): New.
5034 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5035 Call graphite_generate_scattering_fns, graphite_write_transforms,
5036 graphite_read_transforms.
5037 (new_poly_bb): Initialize PBB_SCATTERING.
5038 (free_poly_bb): Free PBB_SCATTERING.
5039 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5040 * graphite-poly.h (struct poly_bb): Add field scattering.
5041 (PBB_SCATTERING): New.
5042 (print_scattering_function, print_scattering_functions,
5043 debug_scattering_function, debug_scattering_functions): Declared.
5044 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5045 GMP values, not integers!
5046 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5047 ppl_read_polyhedron_matrix): New.
5048 * graphite-ppl.h (ppl_print_polyhedron_matrix,
5049 debug_ppl_polyhedron_matrix,
5050 ppl_read_polyhedron_matrix): Declared.
5051 * Makefile.in (graphite-poly.o): Depends on output.h.
5053 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5054 Tobias Grosser <grosser@fim.uni-passau.de>
5057 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5058 scalar evolutions in the scop_entry->loop_father.
5060 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5061 Tobias Grosser <grosser@fim.uni-passau.de>
5063 * graphite.h (ref_nb_loops): Remove declaration.
5064 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5065 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5066 debug_gbb): Moved to sese.h.
5069 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5070 Tobias Grosser <grosser@fim.uni-passau.de>
5072 * graphite-data-ref.[ch]: Disable.
5074 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5075 Tobias Grosser <grosser@fim.uni-passau.de>
5077 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5078 scalar evolutions in the scop_entry->loop_father.
5080 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5082 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5083 (graphite_cannot_represent_loop_niter): Renamed
5084 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5085 (limit_scops): build_sese_loop_nests does not return a bool.
5086 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5087 * sese.c (nb_reductions_in_loop): ... from here.
5088 (graphite_loop_normal_form): ... from here.
5089 (sese_record_loop): Does not fail, so does not return a bool.
5090 (build_sese_loop_nests): Same.
5091 * sese.h (build_sese_loop_nests): Update declaration.
5092 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5093 (build_graphite_loop_normal_form): New.
5094 (gloog): Call build_graphite_loop_normal_form.
5095 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5096 build_sese_loop_nests.
5098 * gcc.dg/graphite/id-1.c: New.
5100 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5101 Tobias Grosser <grosser@fim.uni-passau.de>
5103 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5104 The SCoP detection fix is sufficient.
5106 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5108 PR tree-optimization/39260
5109 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5110 the basic block contains a condition with a real type.
5111 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5113 * gcc.dg/graphite/pr39260.c: New.
5115 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5117 * graphite-poly.c: Inlcude params.h.
5118 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5120 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5121 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5123 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5124 Tobias Grosser <grosser@fim.uni-passau.de>
5126 * graphite-scop-detection.c (dot_all_scops_1,
5127 dot_all_scops): Moved here.
5128 * graphite-scop-detection.h (dot_all_scops): Declared here.
5129 * graphite.c (graphite_initialize, graphite_finalize): New.
5130 (graphite_transform_loops): Cleaned up.
5131 * sese.c (debug_oldivs): Moved here.
5132 * graphite-poly.c (graphite_apply_transformations): Renamed
5133 apply_poly_transforms.
5134 (debug_loop_vec): Moved here.
5135 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5136 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5137 find_scop_parameters, build_scop_iteration_domain,
5138 add_conditions_to_constraints, build_scop_canonical_schedules,
5139 build_scop_data_accesses): Now static.
5140 (build_poly_scop, check_poly_representation): New.
5142 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5144 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5145 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5146 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5147 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5148 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5149 scan_tree_for_params, struct irp_data, dx_record_params,
5150 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5151 build_loop_iteration_domains, add_conditions_to_domain,
5152 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5153 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5154 build_sese_conditions, add_conditions_to_constraints,
5155 build_scop_iteration_domain, build_access_matrix_with_af,
5156 build_access_matrix,
5157 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5159 * graphite-sese-to-poly.c: New.
5160 * graphite-sese-to-poly.h: New.
5162 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5164 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5166 * graphite.c: Split graphite code generation to a new file.
5167 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5168 max_precision_type, clast_to_gcc_expression_red,
5169 clast_to_gcc_expression, gcc_type_for_clast_expr,
5170 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5171 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5172 graphite_create_new_guard, clast_get_body_of_loop,
5173 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5174 graphite_create_new_loop, build_iv_mapping, copy_renames,
5175 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5176 compute_cloog_iv_types, free_scattering, save_var_name,
5177 initialize_cloog_names, build_scop_context, build_cloog_prog,
5178 set_cloog_options, debug_clast_stmt, scop_to_clast,
5179 print_generated_program, debug_generated_program,
5180 gloog): Moved to graphite-clast-to-gimple.c.
5182 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5184 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5185 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5186 loop_iv_stack_pop, loop_iv_stack_get_iv,
5187 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5188 free_loop_iv_stack, loop_iv_stack_remove_constants,
5189 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5190 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5191 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5192 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5193 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5194 get_vdef_before_sese, sese_adjust_vphi,
5195 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5196 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5197 is_iv, expand_scalar_variables_ssa_name,
5198 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5199 expand_scalar_variables, rename_variables, remove_condition,
5200 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5201 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5202 default_liveout_before_guard, add_guard_exit_phis,
5203 insert_guard_phis, register_old_and_new_names,
5204 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5205 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5206 if_region_set_false_region, create_if_region_on_edge,
5207 move_sese_in_condition): Moved to sese.c.
5209 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5210 if_region_exit, if_region_get_condition_block,
5211 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5212 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5213 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5214 ivtype_map_elt, new_ivtype_map_elt,
5215 recompute_all_dominators): Moved to sese.h.
5217 * graphite-clast-to-gimple.c: New.
5218 * graphite-clast-to-gimple.h: New.
5219 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5220 * sese.c: Modified as said above.
5223 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5225 * graphite.c: Split scop detection to a new file.
5226 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5227 move_sd_regions, loop_affine_expr, exclude_component_ref,
5228 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5229 graphite_cannot_represent_loop_niter, struct scopdet_info,
5230 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5231 find_single_entry_edge, find_single_exit_edge,
5232 create_single_entry_edge, sd_region_without_exit,
5233 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5234 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5235 Moved to graphite-scop-detection.c.
5237 * graphite-scop-detection.c: New.
5238 * graphite-scop-detection.h: New.
5239 * Makefile.in: Add new rule for graphite-scop-detection.o.
5241 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5242 tree-scalar-evolution.h.
5243 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5244 build_sese_loop_nests): Moved here from graphite.c.
5245 (param_index): Renamed parameter_index_in_region.
5247 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5248 Sebastian Pop <sebastian.pop@amd.com>
5250 * gcc.dg/graphite/block-0.c: Expected to fail now.
5251 * gcc.dg/graphite/block-1.c: Same.
5252 * gcc.dg/graphite/block-5.c: Same.
5253 * gcc.dg/graphite/block-6.c: Same.
5255 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5256 Sebastian Pop <sebastian.pop@amd.com>
5258 * graphite.h: Separate from graphite_bb_p the polyhedral
5259 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5260 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5261 graphite-data-ref.h.
5262 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5263 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5264 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5265 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5266 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5267 scop_nb_params): Moved to graphite-poly.h.
5268 * graphite-data-ref.c: Same.
5269 * graphite-data-ref.h: New.
5271 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5272 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5273 is_interchange_valid, graphite_trans_bb_block,
5274 graphite_trans_loop_block, scop_max_loop_depth,
5275 graphite_trans_scop_block, graphite_apply_transformations,
5276 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5278 * graphite-poly.h: New.
5279 * graphite-poly.c: New.
5280 * Makefile.in (OBJS-common): Add graphite-poly.o.
5281 (graphite-poly.o): New rule.
5282 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5285 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5286 Tobias Grosser <grosser@fim.uni-passau.de>
5288 * graphite.c: Replace gb -> gbb.
5290 * graphite-data-ref.c: Same.
5292 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5293 Tobias Grosser <grosser@fim.uni-passau.de>
5295 * Makefile.in (OBJS-commmon): Add sese.o.
5297 (graphite.o): Add sese.h.
5298 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5299 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5300 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5302 (block_before_scop): Add missing return.
5303 (new_scop, free_scop): Remove SESE data structures.
5304 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5305 find_scop_parameters, build_loop_iteration_domains,
5306 add_conditions_to_domain, register_scop_liveout_renames,
5307 copy_bb_and_scalar_dependences): Scop -> SESE.
5309 (add_conditions_to_domain): SCoP -> SESE and remove check
5310 (scop_contains_non_iv_scalar_phi_nodes): New.
5311 (build_scop_conditions_1, build_scop_conditions): Remove check for
5312 non iv scalar phi nodes.
5313 (print_scop_statistics): New.
5314 (graphite_transform_loops): Cleanup.
5316 * graphite.h: Move to sese & cleanup.
5320 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5321 Tobias Grosser <grosser@fim.uni-passau.de>
5323 * graphite.c (build_scop_conditions_1): Conditions are only
5324 at the end of a basic block.
5326 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5327 Tobias Grosser <grosser@fim.uni-passau>
5329 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5331 (GBB_ALPHA): Removed.
5333 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5334 Tobias Grosser <grosser@fim.uni-passau.de>
5336 * graphite-data-ref.c (graphite_test_dependence): Don't use
5337 GBB_DYNAMIC_SCHEDULE.
5338 * graphite.c (new_graphite_bb): Same.
5339 (free_graphite_bb): Same.
5340 (build_scop_dynamic_schedules): Removed.
5341 (graphite_transform_loops): Don't call it.
5342 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5343 (GBB_DYNAMIC_SCHEDULE): Removed.
5345 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5346 Tobias Grosser <grosser@fim.uni-passau.de>
5348 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5349 (print_graphite_bb): Same.
5350 (build_cloog_prog): Same.
5352 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5353 Tobias Grosser <grosser@fim.uni-passau.de>
5355 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5357 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5358 Tobias Grosser <grosser@fim.uni-passau.de>
5360 * graphite.c (build_scop_context): Don't use CloogMatrix.
5361 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5362 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5364 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5365 Tobias Grosser <grosser@fim.uni-passau.de>
5367 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5368 liveout_renames, add_params fields...
5369 (struct sese): ... here.
5370 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5371 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5373 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5374 Tobias Grosser <grosser@fim.uni-passau.de>
5376 * graphite.c (print_scop): Do not print the CLooG program.
5377 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5378 build_cloog_prog, gloog): Don't use SCOP_PROG.
5379 (find_transform): Renamed scop_to_clast.
5380 (print_generated_program, debug_generated_program): New.
5381 (graphite_transform_loops): Adapt to new interface.
5382 * graphite.h (struct scop): Remove program field.
5383 (SCOP_PROG): Removed.
5384 (print_generated_program, debug_generated_program): Declared.
5386 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5388 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5389 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5390 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5391 free_graphite_bb, build_scop_canonical_schedules,
5392 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5393 schedules are now represented using a ppl_Linear_Expression_t.
5394 * graphite.h (struct graphite_bb): Same.
5395 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5396 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5398 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5400 * graphite.c: Free local memory.
5401 * graphite-ppl.c: Same.
5403 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5405 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5406 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5407 swap_constraint_variables, scale_constraint_variable): Removed.
5408 (graphite_trans_bb_strip_mine): Remove pong.
5409 * graphite-ppl.c: Include missing header files.
5410 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5411 * graphite-ppl.h (ppl_strip_loop): Declared.
5412 * Makefile.in (graphite-ppl.o): Adjust dependences.
5414 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5416 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5417 (build_scop_iteration_domain): Same.
5419 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5421 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5423 (add_value_to_dim, scan_tree_for_params_right_scev,
5424 scan_tree_for_params_int): New.
5425 * graphite-ppl.c (oppose_constraint): New.
5426 (insert_constraint_into_matrix): Implement missing cases.
5427 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5429 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5431 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5432 use ppl_move_dimension.
5434 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5436 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5439 * graphite-ppl.c: Same.
5440 * graphite-ppl.h: Same.
5442 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5444 Revert last 3 commits.
5446 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5448 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5450 (add_value_to_dim, scan_tree_for_params_right_scev,
5451 scan_tree_for_params_int): New.
5452 * graphite-ppl.c (oppose_constraint): New.
5453 (insert_constraint_into_matrix): Implement missing cases.
5454 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5456 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5458 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5460 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5461 Tobias Grosser <grosser@fim.uni-passau.de>
5463 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5464 use ppl_move_dimension.
5465 * graphite-ppl.c (ppl_move_dimension): New.
5466 * graphite-ppl.h (ppl_move_dimension): Declared.
5468 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5470 * graphite.c: Do not include cloog/cloog.h.
5471 (print_graphite_bb): Remove ping pong, call PPL print function.
5473 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5475 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5476 (graphite.o): Add dependence on graphite-ppl.h.
5477 (graphite-ppl.o): New.
5478 (graphite-data-ref.c): Ping pong between PPL data structures
5480 * graphite-ppl.c: New.
5481 * graphite-ppl.h: New.
5482 * graphite.c: Include graphite-ppl.h.
5483 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5484 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5485 Ping pong between PPL data structures and matrices.
5486 (new_graphite_bb): Create a PPL constraint system.
5487 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5488 (build_loop_iteration_domains): Use PPL functions.
5489 * graphite.h: Include graphite-ppl.h. Fix comments.
5490 (graphite_bb): Use a ppl_Constraint_System_t instead of
5491 CloogMatrix for representing the domain.
5492 (scop): Remove static_schedule.
5493 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5495 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5497 * graphite.c: Fix some comments.
5499 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5502 * graphite.c (if_region_set_false_region): After moving a region
5503 in the false branch of a condition, remove the empty dummy
5505 (gloog): Remove wrong fix for PR38953.
5507 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5509 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5510 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5511 register_bb_in_sese, new_sese, free_sese): Moved.
5512 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5513 outermost_loop_in_scop, build_scop_iteration_domain,
5514 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5515 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5516 Use loop_in_sese_p instead of loop_in_scop_p.
5517 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5518 (free_scop): Do not free SCOP_BBS_B.
5519 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5520 ref_nb_loops): Moved here...
5521 * graphite.h (ref_nb_loops): ... from here.
5522 (struct scop): Remove bbs_b bitmap.
5523 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5524 * gcc.dg/graphite/scop-19.c: New
5526 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5528 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5531 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5533 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5534 eq_loop_to_cloog_loop): Remove.
5535 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5536 * graphite.h (struct scop): Remove loop2cloog_loop.
5537 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5539 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5541 * opts.c (decode_options): Only add graphite options to O2
5542 if we compile with graphite enabled.
5544 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5546 * Merge from mainline (r143163:143684).
5548 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5550 * graphite.c (debug_value): Removed.
5551 * graphite.h (debug_value): Removed.
5553 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5555 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5556 after graphite: pass_copy_prop does not maintain a proper loop closed
5557 SSA form. pass_copy_prop should be fixed.
5559 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5561 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5563 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5565 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5566 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5567 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5570 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5572 * graphite.c (gloog): Return true when code gen succeeded.
5573 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5574 the code of the function did not changed. After cleanup_tree_cfg
5575 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5578 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5580 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5581 gimple_call_lhs is NULL.
5583 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5584 Tobias Grosser <tobi.grosser@amd.com>
5586 * graphite.c (graphite_trans_scop_block): Do not block single
5589 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5590 Tobias Grosser <tobi.grosser@amd.com>
5592 * graphite.c (build_scop_canonical_schedules): Start schedules at
5595 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5596 Tobias Grosser <tobi.grosser@amd.com>
5598 * graphite.c (compare_prefix_loops): New.
5599 (build_scop_canonical_schedules): Rewritten.
5600 (graphite_transform_loops): Move build_scop_canonical_schedules
5601 after build_scop_iteration_domain.
5603 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5604 Tobias Grosser <tobi.grosser@amd.com>
5606 * graphite.c (add_conditions_to_domain): Add the loops to
5607 the dimension of the iteration domain. Do copy the domain
5608 only when it exists.
5609 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5610 (add_conditions_to_constraints): New.
5611 (can_generate_code_stmt, can_generate_code): Removed.
5612 (gloog): Do not call can_generate_code.
5613 (graphite_transform_loops): Call add_conditions_to_constraints
5614 after building the iteration domain.
5616 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5617 Tobias Grosser <tobi.grosser@amd.com>
5618 Jan Sjodin <jan.sjodin@amd.com>
5620 * graphite.c (scan_tree_for_params): On substractions negate
5621 all the coefficients of the term.
5622 (clast_to_gcc_expression_red): New. Handle reduction expressions
5623 of more than two operands.
5624 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5625 (get_vdef_before_scop): Handle also the case of default definitions.
5627 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5630 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5631 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5632 (gloog): Do not call cleanup_tree_cfg.
5633 (graphite_transform_loops): Call cleanup_tree_cfg after all
5634 scops have been code generated.
5636 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5638 * passes.c (init_optimization_passes): Schedule after
5639 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5641 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5643 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5645 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5646 Set the type of an expression to the type of its assign statement.
5647 (expand_scalar_variables_expr): Do not pass loop_p.
5648 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5649 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5650 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5652 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5654 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5655 an expression to the gimple_expr_type of its assign statement.
5656 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5659 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5661 PR tree-optimization/38786
5662 * gcc.dg/graphite/pr38786.c: New.
5663 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5664 the SSA_NAME case of expand_scalar_variables_expr.
5665 (expand_scalar_variables_expr): Also gather the scalar computation
5666 used to index the memory access.
5667 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5668 the gimple_stmt_iterator where it inserts new code.
5670 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5672 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5674 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5676 * opts.c (decode_options): Enable flag_graphite_identity and
5677 flag_loop_block in -O2 and above.
5679 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5681 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5682 Fix merge problem: replace with the file from trunk.
5684 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5686 * Merge from mainline (r141727:143163).
5688 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5689 Jan Sjodin <jan.sjodin@amd.com>
5691 PR tree-optimization/38559
5692 * gcc.dg/graphite/pr38559.c: New.
5694 * graphite.c (debug_value, copy_constraint,
5695 swap_constraint_variables, scale_constraint_variable, ): New.
5696 (get_lower_bound, get_upper_bound): Removed.
5697 (graphite_trans_bb_strip_mine): Clean up this code that works
5698 only for constant number of iterations. Fully copy upper and
5699 lower bound constraints, not only the constant part of them.
5700 * graphite.h (debug_value): Declared.
5702 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5704 PR tree-optimization/38492
5705 PR tree-optimization/38498
5706 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5707 * tree-chrec.h (scev_is_linear_expression): Declared.
5708 * graphite.c (graphite_cannot_represent_loop_niter): New.
5709 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5710 (graphite_loop_normal_form): Use gcc_assert.
5711 (scan_tree_for_params): Use CASE_CONVERT.
5712 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5713 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5714 Use gcc_assert. Discard scops that contain unhandled cases.
5715 (build_scop_conditions): Return a boolean status for unhandled cases.
5716 (strip_mine_profitable_p): Print the loop number, not its depth.
5717 (is_interchange_valid): Pass the depth of the loop nest, don't
5718 recompute it wrongly.
5719 (graphite_trans_bb_block): Same.
5720 (graphite_trans_bb_block): Print tentative of loop blocking.
5721 (graphite_trans_scop_block): Do not print that the loop has been
5723 (graphite_transform_loops): Do not handle scops that contain condition
5726 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5728 * gcc.dg/graphite/block-0.c: Update test.
5729 * gcc.dg/graphite/block-1.c: Same.
5730 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5732 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5733 * gcc.dg/graphite/block-3.c: New.
5734 * gcc.dg/graphite/pr38498.c: New.
5736 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5738 PR tree-optimization/38510
5739 * gcc.dg/graphite/pr38510.c: New.
5740 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5741 (translate_clast): Call recompute_all_dominators before
5743 (gloog): Call recompute_all_dominators before graphite_verify.
5745 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5747 PR tree-optimization/38492
5748 * graphite.c (rename_map_elt, debug_rename_elt,
5749 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5750 rename_map_elt_info, eq_rename_map_elts,
5751 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5752 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5753 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5754 (sese_build_livein_liveouts): New.
5755 (new_sese, free_sese): New.
5756 (new_scop): Call new_sese.
5757 (free_scop): Call free_sese.
5758 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5759 (register_old_new_names): Renamed register_old_and_new_names.
5760 (register_scop_liveout_renames, add_loop_exit_phis,
5761 insert_loop_close_phis, struct igp,
5762 default_liveout_before_guard, add_guard_exit_phis,
5763 insert_guard_phis, copy_renames): New.
5764 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5765 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5766 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5767 (scop_adjust_phis_for_liveouts): New.
5768 (gloog): Call scop_adjust_phis_for_liveouts.
5770 * graphite.h (struct sese): Documented. Added fields liveout,
5772 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5773 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5774 (struct scop): Added field liveout_renames.
5775 (SCOP_LIVEOUT_RENAMES): New.
5777 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5779 PR tree-optimization/38409
5780 * gcc.dg/graphite/pr38409.c: New.
5781 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5783 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5785 * graphite.c (gcc_type_for_cloog_iv): By default return
5787 (graphite_create_new_loop): Don't fold_convert the already
5788 fold_convert-ed expression.
5790 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5792 PR tree-optimization/38446
5793 * gcc.dg/graphite/pr38446.c: New.
5794 * graphite.c (register_bb_in_sese): New.
5795 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5796 looking at the bbs in the region.
5797 * graphite.h (sese): Add region_basic_blocks pointer set to
5798 structure and initialize at the time of defining new scop.
5800 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5802 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5803 (find_params_in_bb): Do not free data refs.
5804 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5806 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5808 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5809 * gcc.dg/graphite/scop-17.c: Same.
5810 * gcc.dg/graphite/block-5.c: New.
5811 * gcc.dg/graphite/block-6.c: New.
5812 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5813 * gcc.dg/graphite/pr37684.c: Same.
5814 * gcc.dg/graphite/block-2.c: Same.
5816 * graphite.c (struct ivtype_map_elt): New.
5817 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5818 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5819 gcc_type_for_cloog_iv): New.
5820 (loop_iv_stack_patch_for_consts): Use the type of the induction
5821 variable from the original loop, except for the automatically
5822 generated loops, i.e., in the case of a strip-mined loop, in
5823 which case there is no original loop: in that case just use
5825 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5826 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5827 (clast_name_to_gcc): Accept params to be NULL.
5828 (clast_to_gcc_expression): Take an extra parameter for the type.
5829 Convert to that type all the expressions built by this function.
5830 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5831 (graphite_translate_clast_equation): Compute the type of the
5832 clast_equation before translating its LHS and RHS.
5833 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5834 (graphite_create_new_loop): Compute the type of the induction
5835 variable before translating the lower and upper bounds and before
5836 creating the induction variable.
5837 (rename_variables_from_edge, rename_phis_end_scop): New.
5838 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5839 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5840 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5841 compute_cloog_iv_types): New.
5842 (gloog): Call compute_cloog_iv_types before starting the
5843 translation of the clast.
5845 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5846 (GBB_CLOOG_IV_TYPES): New.
5847 (debug_ivtype_map): Declared.
5848 (oldiv_for_loop): New.
5850 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5853 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5854 (param_index): Assert if parameter is not know after parameter
5856 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5857 (find_scop_parameters): Mark, that we have finished parameter
5859 (graphite_transform_loops): Move condition detection before parameter
5861 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5862 * gfortran.dg/graphite/pr38459.f90: New.
5864 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5866 * graphite.c (graphite_transform_loops): Always call find_transform ()
5867 in ENABLE_CHECKING. So we test these code paths, even if we do not
5870 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5872 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5873 (print_scop): Ditto.
5875 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5878 Fix gfortran.dg/graphite/id-3.f90.
5879 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5880 regions more than once.
5882 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5884 Fix gfortran.dg/graphite/id-4.f90.
5885 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5888 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5890 Fix gfortran.dg/graphite/id-1.f90.
5891 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5892 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5893 (max_precision_type): New.
5894 (value_clast): Removed.
5895 (clast_to_gcc_expression): Be more careful to types of expressions.
5896 Use max_precision_type and update use of gmp_cst_to_tree.
5897 (graphite_translate_clast_equation): Use max_precision_type.
5898 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5899 use the type of the condition.
5900 (graphite_create_new_loop): Do not use integer_type_node, use the
5901 max_precision_type of lb and ub.
5903 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5905 * graphite.c (build_scops_1): Initialize open_scop.exit
5908 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5910 * gcc.dg/graphite/pr38084.c: New.
5911 * gfortran.dg/graphite/id-1.f90: New.
5912 * gfortran.dg/graphite/id-2.f90: New.
5913 * gfortran.dg/graphite/id-3.f90: New.
5914 * gfortran.dg/graphite/id-4.f90: New.
5915 * gfortran.dg/graphite/pr37857.f90: New.
5917 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5918 Jan Sjodin <jan.sjodin@amd.com>
5919 Harsha Jagasia <harsha.jagasia@amd.com>
5931 * gcc.dg/graphite/pr38073.c: New.
5932 * gcc.dg/graphite/pr37928.c: New.
5933 * gcc.dg/graphite/pr37883.c: New.
5934 * gcc.dg/graphite/pr38125.c: New.
5935 * gfortran.dg/graphite/pr38083.f90: New.
5936 * gfortran.dg/graphite/pr37852.f90: New.
5937 * gfortran.dg/graphite/pr37980.f90: New.
5939 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5940 the number of detected scops. Copy exact same test for loop
5942 * gcc.dg/graphite/block-1.c: Fix the number of expected
5943 loops to be blocked as reductions are not handled.
5944 * gcc.dg/graphite/block-4.c: ...here. New.
5946 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5947 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5949 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5950 * Makefile.in (graphite.o): Depend on value-prof.h.
5951 (graphite.o-warn): Removed -Wno-error.
5952 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5953 to be a NULL pointer. Call update_stmt. Return the newly created
5954 cannonical induction variable.
5956 * graphite.h (debug_rename_map): Declared. Fix some comments.
5958 * graphite.c: Reimplement the code generation from graphite to gimple.
5959 Include value-prof.h.
5960 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5961 (get_old_iv_from_ssa_name): Removed.
5962 (graphite_stmt_p): New.
5963 (new_graphite_bb): Test for useful statements before building a
5964 graphite statement for the basic block.
5965 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5966 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5968 (recompute_all_dominators, graphite_verify,
5969 nb_reductions_in_loop, graphite_loop_normal_form): New.
5970 (scop_record_loop): Call graphite_loop_normal_form.
5971 (build_scop_loop_nests): Iterate over all the blocks of the
5972 function instead of relying on the incomplete information from
5973 SCOP_BBS. Return the success of the operation.
5974 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5975 (add_bb_domains): Removed.
5976 (build_loop_iteration_domains): Don't call add_bb_domains.
5977 Add the iteration domain only to the basic blocks that have been
5978 translated to graphite.
5979 (build_scop_conditions_1): Add constraints only if the basic
5980 block have been translated to graphite.
5981 (build_scop_data_accesses): Completely disabled until data
5982 dependence is correctly implemented.
5983 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5984 (remove_all_edges_1, remove_all_edges): Removed.
5985 (get_new_name_from_old_name): New.
5986 (graphite_rename_variables_in_stmt): Renamed
5987 rename_variables_in_stmt. Call get_new_name_from_old_name.
5988 Use replace_exp and update_stmt.
5989 (is_old_iv): Renamed is_iv.
5990 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5991 Use replace_exp and update_stmt.
5992 (expand_scalar_variables_expr): Same. Use the map to get the
5993 new names for the renaming of induction variables and for the
5994 renaming of variables after a basic block has been copied.
5995 (expand_scalar_variables): Same.
5996 (graphite_rename_variables): Renamed rename_variables.
5997 (move_phi_nodes): Removed.
5998 (get_false_edge_from_guard_bb): New.
5999 (build_iv_mapping): Do not insert the induction variable of a
6000 loop in the renaming iv map if the basic block does not belong
6002 (register_old_new_names, graphite_copy_stmts_from_block,
6003 copy_bb_and_scalar_dependences): New.
6004 (translate_clast): Heavily reimplemented: copy basic blocks,
6005 do not move them. Finally, in call cleanup_tree_cfg in gloog.
6006 At each translation step call graphite_verify ensuring the
6007 consistency of the SSA, loops and dominators information.
6008 (collect_virtual_phis, find_vdef_for_var_in_bb,
6009 find_vdef_for_var_1, find_vdef_for_var,
6010 patch_phis_for_virtual_defs): Removed huge hack.
6011 (mark_old_loops, remove_dead_loops, skip_phi_defs,
6012 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6013 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6014 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6015 if_region_get_condition_block, if_region_set_false_region,
6016 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6017 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6018 sese_add_exit_phis_edge, sese_add_exit_phis_var,
6019 rewrite_into_sese_closed_ssa): New.
6020 (gloog): Remove dead code. Early return if code cannot be
6021 generated. Call cleanup_tree_cfg once the scop has been code
6023 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6024 block loops with less than two loops.
6025 (graphite_apply_transformations): Remove the call to
6026 scop_remove_ignoreable_gbbs.
6027 (limit_scops): When build_scop_loop_nests fails, continue on
6028 the next scop. Fix open_scop.entry.
6029 (graphite_transform_loops): Call recompute_all_dominators: force the
6030 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6031 Call initialize_original_copy_tables and free_original_copy_tables
6032 to be able to copy basic blocks during code generation.
6033 When build_scop_loop_nests fails, continue on next scop.
6034 (value_clast): New union.
6035 (clast_to_gcc_expression): Fix type cast warning.
6037 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
6039 * Merge from mainline (r140838:141727).
6041 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6045 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6047 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6051 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6052 exits and conditions.
6053 * gcc.dg/graphite/pr37943.c: New.
6055 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6058 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6060 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6062 * doc/invoke.texi: Fix spaces.
6064 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
6066 PR tree-optimization/37891
6067 Reverted last commit.
6068 * graphite.c (create_single_entry_edge): Set
6069 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6071 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
6072 Mitul Thakkar <mitul.thakkar@amd.com>
6074 * graphite.c (create_single_entry_edge): Set
6075 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6077 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6079 * doc/invoke.texi: Add -fgraphite-identity.
6080 * graphite.c (graphite_apply_transformations): Check for
6081 -fgraphite-identity.
6082 * toplev.c (process_options): Add flag_graphite_identity.
6083 * tree-ssa-loop.c: Add flag_graphite_identity.
6085 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6087 Undo changes from 2008-10-02:
6088 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6089 operand type when copying the operand to a variable of different type.
6090 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6091 with the IV name after increment.
6093 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6094 Harsha Jagasia <harsha.jagasia@amd.com>
6096 PR tree-optimization/37828
6097 * gcc.dg/graphite/pr37828.c: New.
6098 * graphite.c (graphite_trans_loop_block): Do not loop block
6099 single nested loops.
6101 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6102 Sebastian Pop <sebastian.pop@amd.com>
6104 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6105 rename_map_elt_info, eq_rename_map_elts): New.
6106 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6107 (expand_scalar_variables_expr): Change parameters.
6108 (expand_scalar_variables_stmt): Same.
6109 (expand_scalar_variables): Same.
6110 (graphite_rename_ivs): Rename graphite_rename_variables.
6111 (build_iv_mapping): New.
6112 (translate_clast): Call build_iv_mapping.
6113 * graphite.h (gbb_p): New name.
6115 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6117 PR tree-optimization/37684
6118 * gcc.dg/graphite/pr37684.c: New.
6119 * graphite.c (exclude_component_ref): New.
6120 (is_simple_operand): Call exclude_component_ref.
6122 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6123 Harsha Jagasia <harsha.jagasia@amd.com>
6125 PR tree-optimization/37485
6126 * gcc.dg/graphite/block-2.c: New
6127 * graphite.c (gmp_cst_to_tree): Moved.
6128 (iv_stack_entry_is_constant): New.
6129 (iv_stack_entry_is_iv): New.
6130 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6131 (loop_iv_stack_insert_constant): New.
6132 (loop_iv_stack_pop): Use new datatpype.
6133 (loop_iv_stack_get_iv): Same.
6134 (loop_iv_stack_get_iv_from_name): Same.
6135 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6136 (loop_iv_stack_patch_for_consts): New.
6137 (loop_iv_stack_remove_constants): New.
6138 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6139 (translate_clast): Call loop_iv_stack_patch_for_consts and
6140 loop_iv_stack_remove_constants.
6141 (gloog): Use new datatype. Redirect construction edge to end
6142 block to avoid accidental deletion.
6143 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6145 (union iv_stack_entry_data): New. Data in iv stack entry.
6146 (struct iv_stack_entry): New. Datatype for iv stack entries.
6148 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6150 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6151 operand type when copying the operand to a variable of different type.
6153 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6155 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6156 with the IV name after increment.
6158 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6160 * Merge from mainline (r140164:140838).
6162 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6164 * graphite-data-ref.c: New.
6165 * graphite.c (print_scop): Also dump the dependence graph.
6166 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6167 (new_scop): Initialize SCOP_DEP_GRAPH.
6168 (build_scop_dynamic_schedules): New.
6169 (build_access_matrix_with_af): Fixed column numbering.
6170 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6171 * graphite.h: Add ifndef/define guards against multiple inclusion.
6172 (struct scop): Add dep_graph field.
6173 (SCOP_DEP_GRAPH): Defined.
6174 (ref_nb_loops): Fixed and moved to other position.
6175 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6176 (nb_loops_around_loop_in_scop): New.
6177 (graphite_dump_dependence_graph): Declared.
6178 (graphite_build_rdg_all_levels): Declared.
6179 (graphite_test_dependence): Declared.
6180 * Makefile.in (graphite-data-ref.o): New target.
6182 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6184 * Merge from mainline (139870:140164).
6186 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6188 * Merge from mainline (138275:139870).
6189 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6190 the commits from trunk broke the niter detection.
6192 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6194 * graphite.c: Add more documentation. Fix formatting.
6195 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6196 loop_iv_stack_debug): Moved...
6197 (schedule_to_scattering): Move before use.
6198 (dot_all_scops): Include in "#if 0" the code for system
6201 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6202 loop_iv_stack_debug): ...here.
6204 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6206 * tree-phinodes.c (make_phi_node): Extern.
6207 (add_phi_node_to_bb): New.
6208 (create_phi_node): Call add_phi_node_to_bb.
6209 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6210 (remove_statement): Handle case where stored phi was updated
6211 and is no longer the same.
6212 * graphite.c (is_parameter): New.
6214 (expand_scalar_variables_expr): New.
6215 (expand_scalar_variables_stmt): New.
6216 (expand_scalar_variables): New.
6217 (move_phi_nodes): Create new phi instead of moving old one.
6218 (translate_clast): Call expand_scalar_variables.
6219 (find_vdef_for_var_in_bb): Also scan regular definitions.
6220 (skip_phi_defs): New.
6221 (collect_scop_exit_phi_args): New.
6222 (patch_scop_exit_phi_args): New.
6223 (gloog): Patch phis after scop.
6224 * tree-flow.h: (add_phi_node_to_bb): Declared.
6225 (make_phi_node): Declared.
6227 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6229 * graphite.c (end_scop): Split the entry of the scop when it
6230 is the header of the loop in which the scop is ending.
6231 (build_scops_1, limit_scops): Update uses of end_scop.
6233 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6235 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6236 SCOP_ENTRY or SCOP_EXIT.
6238 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6240 * graphite.c (get_construction_edge): Removed.
6241 (gloog): Construction edge is the scop entry edge.
6243 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6245 * graphite.c (can_generate_for_scop): Removed.
6246 (gloog): Do not call it.
6248 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6250 * graphite.c (new_scop): Entry of a scop is an edge.
6251 Initialize SESE region.
6252 (free_scop): Free SESE region.
6253 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6254 (split_difficult_bb): New, split from end_scop.
6255 (end_scop): Exit of a scop is an edge.
6256 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6257 not automatically updated and thus is always wrong.
6258 * graphite.h (struct sese): New.
6261 (struct scop): New field for a SESE region. Remove entry, exit.
6262 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6263 semantics as before. Moved comment around.
6265 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6266 Sebastian Pop <sebastian.pop@amd.com>
6268 * graphite.c (graphite_transform_loops): Always enable gloog
6269 and find_transform when ENABLE_CHECKING.
6271 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6273 * graphite.c (graphite_transform_loops): Move pretty printer
6274 of SCOPs before doing any transform. Remove call to print_scops
6275 and dot_all_scops_1.
6277 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6279 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6280 (print_graphite_bb): Same.
6282 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6284 * graphite.c (dot_all_scops_1): Cleanup.
6285 (move_scops): Fix comment.
6287 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6289 * graphite.c (build_scop_bbs): Revert commit 139355:
6291 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6292 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6294 * graphite.c (build_scop_bbs): Factor up code.
6296 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6298 * graphite.c (gloog): Update dominator info.
6300 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6302 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6304 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6306 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6308 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6309 (translate_clast): Correct formatting.
6310 * graphite.h (struct num_map): Removed.
6311 (struct graphite_bb): Remove num_map field.
6312 (GBB_INDEX_TO_NUM_MAP): Removed.
6314 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6316 * graphite.c (build_access_matrix_with_af): Fix comments.
6317 (build_scop_data_accesses): Same.
6319 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6321 * graphite.c (build_scop_data_accesses): Don't construct
6322 access matrices. Add a FIXME and an assert condition that
6323 should pass when the access matrices will be needed.
6325 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6327 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6329 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6330 Moved close by free_graphite_bb.
6331 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6332 (new_scop): Move close by free_scop.
6333 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6335 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6337 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6338 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6339 instead of recursive call.
6340 (graphite_translate_clast_equation): New.
6341 (graphite_create_guard_cond_expr): New.
6342 (graphite_create_new_guard): New.
6343 (get_stack_index_from_iv): Removed.
6344 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6345 (get_true_edge_from_guard_bb): New.
6346 (translate_clast): Handle stmt_guard in clast.
6347 (get_construction_edge): Allow construction edge detection for
6348 a scope entry with multiple predecessors if one predecessor is
6349 the immediate dominator of scope entry.
6350 (can_generate_code_stmt): Enable code generation for clast_guard.
6351 (gloog): Use correct context loop. Removed check for post dominators.
6352 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6354 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6356 * graphite.c (remove_dead_loops): Document better which
6359 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6361 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6363 (graphite.o): Also depends on pointer-set.h.
6365 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6367 * graphite.c (scop_record_loop): Fix compile warning.
6369 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6370 Sebastian Pop <sebastian.pop@amd.com>
6372 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6374 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6376 * graphite.c (build_graphite_bb): Initialize bb->aux to
6377 point to the graphite_bb_p.
6378 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6380 (add_bb_domains): Does not use the scop parameter.
6381 (graphite_transform_loops): Clean bb->aux at the end.
6383 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6384 Sebastian Pop <sebastian.pop@amd.com>
6386 * lib/target-supports.exp
6387 (check_effective_target_fgraphite): New.
6389 * gcc.dg/graphite/graphite.exp: Early exit when
6390 check_effective_target_fgraphite returns false.
6391 Set dg-do-what-default to compile.
6392 (scan-graphite-dump-times): Removed.
6393 * gfortran.dg/graphite/graphite.exp: Same.
6395 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6396 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6397 * gcc.dg/graphite/scop-1.c: Same.
6398 * gcc.dg/graphite/scop-2.c: Same.
6399 * gcc.dg/graphite/scop-3.c: Same.
6400 * gcc.dg/graphite/scop-4.c: Same.
6401 * gcc.dg/graphite/scop-5.c: Same.
6402 * gcc.dg/graphite/scop-6.c: Same.
6403 * gcc.dg/graphite/scop-7.c: Same.
6404 * gcc.dg/graphite/scop-8.c: Same.
6405 * gcc.dg/graphite/scop-9.c: Same.
6406 * gcc.dg/graphite/scop-10.c: Same.
6407 * gcc.dg/graphite/scop-11.c: Same.
6408 * gcc.dg/graphite/scop-12.c: Same.
6409 * gcc.dg/graphite/scop-13.c: Same.
6410 * gcc.dg/graphite/scop-matmult.c: Same.
6411 * gcc.dg/graphite/scop-14.c: Same.
6412 * gcc.dg/graphite/scop-15.c: Same.
6413 * gcc.dg/graphite/block-0.c: Same.
6414 * gcc.dg/graphite/scop-16.c: Same.
6415 * gcc.dg/graphite/block-1.c: Same.
6416 * gcc.dg/graphite/scop-17.c: Same.
6417 * gcc.dg/graphite/scop-18.c: Same.
6418 * gfortran.dg/graphite/block-1.f90: Same.
6419 * gfortran.dg/graphite/scop-1.f: Same.
6420 * gfortran.dg/graphite/block-2.f: Same.
6422 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6424 * graphite.c: Fix some XXX comments.
6425 (build_scop_dynamic_schedules): Removed.
6427 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6429 * graphite.h (scop_max_loop_depth): Moved...
6430 * graphite.c (scop_max_loop_depth): ...here.
6431 (remove_all_edges_1): New.
6432 (remove_all_edges): Factored code.
6433 (remove_cond_exprs): Check only the last statement for
6434 a GIMPLE_COND expression.
6436 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6438 * graphite.c (scan_tree_for_params): Early return when the
6439 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6440 (find_scop_parameters): Factor out code.
6441 (graphite_trans_bb_strip_mine): Remove dead code.
6443 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6445 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6446 graphite_trans_bb_move_loop): Factor asserts.
6447 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6448 Do not call calculate_dominance_info and estimate_bb_frequencies.
6450 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6452 * graphite.c (create_loops_mapping, free_loops_mapping,
6453 create_loops_mapping_num, debug_loop_mapping_1,
6454 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6455 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6456 graphite_loops_mapping_add_child_num,
6457 graphite_loops_mapping_insert_child,
6458 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6459 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6460 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6461 create_num_from_index, get_num_from_index,
6462 swap_loop_mapped_depth): Removed.
6463 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6464 (free_scop): Do not call free_loops_mapping.
6465 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6466 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6467 get_loop_mapped_depth.
6468 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6469 (graphite_trans_bb_strip_mine): Same.
6470 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6471 (struct scop): Remove field loops_mapping.
6473 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6474 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6476 * graphite.c (scop_record_loop): Factor out one level of the
6477 condition by early return.
6478 (build_scop_loop_nests): Format following FSF coding style.
6479 (build_scop_dynamic_schedules): Factor out code.
6480 (scopdet_bb_info): Reindent. Default case should not be reachable.
6482 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6483 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6485 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6486 assignments that are not handled as simple operands for now.
6488 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6489 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6491 * graphite.c (build_scop_bbs): Factor up code.
6493 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6494 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6496 * graphite.c (stmt_simple_for_scop_p): Factor code out
6498 (enum gbb_type): New. Group all the GBB_* types under it.
6499 (is_loop_exit): Moved...
6500 (end_scop): Enable BB spliting.
6501 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6502 * cfgloop.h (is_loop_exit): Declared.
6504 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6506 * doc/invoke.texi: Remove strides from examples containing
6507 DO loops when the strides are equal to 1.
6509 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6510 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6512 * graphite.c (graphite_trans_scop_block): Or the result with
6513 the result from graphite_trans_loop_block.
6514 * gcc.dg/graphite/block-1.c: New.
6515 * gfortran.dg/graphite/block-1.f90: New.
6516 * gfortran.dg/graphite/block-2.f: New.
6518 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6520 * graphite.c (graphite_transform_loops): Call cloog_initialize
6523 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6525 * tree-data-ref.c) (stmt_simple_memref_p): New.
6526 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6527 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6528 (is_simple_operand): Call stmt_simple_memref_p.
6530 * gcc.dg/graphite/scop-matmult.c: Updated for not
6531 using pointer arithmetic, as this is optimized by PRE and
6532 makes the code too difficult to analyze.
6534 * gcc.dg/graphite/scop-18.c: Same.
6536 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6538 * gdbinit.in (pgg): New.
6540 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6542 * graphite.c (graphite_trans_loop_block): Fix warning.
6544 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6546 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6548 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6550 * graphite.c (graphite_trans_bb_block): Remove check for
6551 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6552 Check if loop blocking is profitable for every loop, before applying
6554 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6555 if flag_loop_block is set.
6557 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6559 * graphite.c: Add some more documentation for the loop
6562 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6564 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6565 * graphite.c: Format on less than 80 columns.
6568 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6570 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6572 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6574 * doc/invoke.texi (floop-block, floop-strip-mine,
6575 floop-interchange): Update documentation with examples.
6577 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6579 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6581 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6583 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6585 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6586 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6587 * tree-scalar-evolution.c: Revert useless changes.
6588 * tree-phinodes.c: Same.
6591 * tree-vectorizer.h: Same.
6592 * tree-flow.h: Same.
6594 * common.opt (fgraphite): Update documentation.
6596 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6598 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6599 -floop-interchange): Add more text for explaining what each of these
6601 * tree-into-ssa.c (gimple_vec): Moved to...
6602 * graphite.c: Include gimple.h.
6603 (gimple_vec): Moved to...
6604 (del_loop_to_cloog_loop): Removed.
6605 (loop_affine_expr): Do not call create_data_ref when the
6606 operand is a constant.
6607 (new_scop): Use free instead of del_loop_to_cloog_loop.
6608 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6609 * gimple.h (gimple_vec): ... here.
6611 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6613 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6615 (build_loop_iteration_domains): Fail, if latch executions unknown.
6617 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6619 * graphite.c (add_conditions_to_domain): New.
6620 (build_scop_conditions_1): Call add_conditions_to_domain.
6621 (set_cloog_options): Allow to disable optimizations.
6623 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6625 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6626 Do not use walk_dominator_tree.
6627 (find_scop_parameters): Do not use walk_dominator_tree.
6629 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6631 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6632 (idx_record_params): Adapt.
6633 * graphite.h (scop_gimple_loop_depth): New.
6635 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6637 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6638 (scan_tree_for_params): Remove value_init.
6639 (build_scop_context): Remove value_init.
6640 (build_loop_iteration_domains): Remove value_init.
6641 (schedule_to_scattering): Remove value_init.
6642 (graphite_trans_bb_strip_mine): Remove value_init.
6644 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6646 * gcc/graphite.c (limit_scops): New.
6647 (graphite_transform_loops): Add limit SCoPs.
6648 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6649 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6650 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6651 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6652 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6653 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6654 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6655 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6656 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6657 Change loop numbers.
6658 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6659 Change loop numbers.
6660 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6661 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6662 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6663 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6664 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6665 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6666 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6667 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6668 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6669 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6671 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6673 * graphite.c (graphite_transform_loops): Call always find_transform.
6675 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6677 * graphite.c (free_loops_mapping): New.
6678 (stmt_simple_for_scop_p): Fix typo.
6679 (stmt_simple_for_scop_p): Fix tuples functions, that
6681 (free_graphite_bb): Fix some memleaks.
6682 (free_scop): Fix some memleaks.
6683 (scopdet_bb_info): Do not forget some tmp SCoPs.
6684 (find_params_in_bb): Fix some memleaks.
6685 (clast_to_gcc_expression): Fix warning.
6687 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6689 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6690 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6692 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6694 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6695 Move code ifdef-ed HAVE_cloog...
6696 * graphite.c: Include toplev.h.
6698 * Makefile.in (OBJS-common): Always build graphite.o.
6699 (BACKEND): Remove @GRAPHITE@.
6700 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6701 (graphite.o): Depend on TOPLEV_H.
6703 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6705 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6706 Remove typo left from polylib to ppl conversion.
6707 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6709 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6711 * toplev.c (process_options): Move the graphite loop optimization
6713 * tree-ssa-loop.c (graphite_transforms): ... here.
6714 When not configured with CLooG, print to dump_file that
6715 Graphite transforms were not performed.
6716 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6718 * gcc.dg/graphite/*.c: Updated all testcases to use
6719 scan-graphite-dump-times.
6721 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6723 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6724 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6726 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6727 Jan Sjodin <jan.sjodin@amd.com>
6729 * configure: Regenerated.
6730 * omp-low.c (expand_omp_sections): Remove now unused code.
6731 * config.in (HAVE_polylib): Removed.
6732 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6733 (PPLLIBS, PPLINC): Added.
6734 * graphite.c: Replace unsigned with int wherever possible.
6735 Don't access Cloog's data structures, but use accessor functions.
6736 Clast's stmt->type is now implemented as a vtable: change the
6737 switches of stmt->type into ifs.
6738 (polylib/polylibgmp.h): Don't include.
6739 (initialize_dependence_polyhedron,
6740 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6741 statement_precedes_p, test_dependence, build_rdg_all_levels,
6742 dump_dependence_graph): Removed until this code is cleaned up
6744 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6745 (POLYLIBINC): Renamed PPLINC.
6747 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6748 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6749 Jan Sjodin <jan.sjodin@amd.com>
6751 Finish the merge and tuplification of graphite.
6753 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6754 Jan Sjodin <jan.sjodin@amd.com>
6756 Partial merge from mainline (138072:138275).
6757 * graphite.c still has to be tuplified.
6759 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6761 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6762 (create_num_from_index): New.
6763 (get_num_from_index): Also pass in the graphite BB.
6764 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6765 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6766 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6767 (is_interchange_valid): Return false when failing.
6768 * graphite.h (struct num_map): New.
6769 (struct graphite_bb): New field num_map.
6770 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6772 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6774 * graphite.c (dump_gbb_conditions): Print also conditions like
6775 "if (a)". Remove dublicated code and use print_generic_expr ().
6776 (stmt_simple_for_scop_p): Only allow conditions we can handle
6779 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6781 * graphite.h (struct scop): Removed new_ivs field.
6782 (SCOP_NEWIVS): Deleted.
6783 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6784 clast_to_gcc_expression, graphite_create_new_loop):
6785 Removed use of new_ivs.
6787 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6789 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6790 create_loops_mapping_num, debug_loop_mapping_1): New.
6791 (debug_loop_mapping): Call debug_loop_mapping_1.
6792 (get_loop_mapping_for_num,
6793 graphite_loops_mapping_add_child,
6794 graphite_loops_mapping_add_child_num,
6795 graphite_loops_mapping_insert_child,
6796 graphite_loops_mapping_parent,
6797 split_loop_mapped_depth_for_num,
6798 loop_mapped_depth_split_loop): New.
6799 (increment_loop_mapped_depths): Removed.
6800 (swap_loop_mapped_depth_for_num): Reimplemented.
6801 (new_scop): Call create_loops_mapping.
6802 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6803 (translate_clast): Pass the old loop father in parameter, and pass
6804 it to get_old_iv_from_ssa_name.
6805 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6806 can_generate_code, can_generate_for_scop): New.
6807 (graphite_trans_bb_block): Returns false when it fails to transform.
6808 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6810 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6812 Reverted all the changes related to the streamization and
6814 These changes are now tracked in the streamization branch.
6816 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6817 Jan Sjodin <jan.sjodin@amd.com>
6819 * graphite.c (gbb_compare): Correctly constify.
6820 (gbb_can_be_ignored): Indent.
6821 (graphite_trans_scop_swap_1and2): Add legality check.
6824 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6826 Remove fallouts from "Reverted the Condate changes".
6827 * tree.h: Remove unused decl.
6828 * gcc.dg/tree-checker: Same.
6829 * timevar.def: Remove counter.
6831 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6833 * Merge from mainline (135673:138072).
6835 Reverted the MIRO changes (from 2008-04-05) that are now
6836 tracked in the miro branch.
6837 * tree-bounds.c: Removed.
6838 * tree-bounds.h: Removed.
6840 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6841 are now tracked in the condate branch.
6842 * tree-check.c: Removed.
6843 * tree-match.c: Removed.
6844 * condate.y: Removed.
6846 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6848 * common.opt: New user flag -floop-block, -floop-strip-mine
6849 and -floop-interchange.
6850 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6851 graphite loop optimization flags is turned on.
6852 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6853 flag_loop_strip_mine and flag_loop_interchange checks before
6855 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6856 -floop-strip-mine and -floop-interchange.
6857 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6859 * gcc.dg/graphite/scop-16.c: Ditto.
6860 * gcc.dg/graphite/scop-17.c: Ditto.
6861 * gcc.dg/graphite/scop-18.c: Ditto.
6863 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6864 Sebastian Pop <sebastian.pop@amd.com>
6866 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6867 (create_empty_loop_on_edge): More fixes.
6868 * tree-phinodes.c (resize_phi_node): Extern.
6869 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6870 * cfghooks.c (update_dominator_information): New split from
6872 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6873 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6874 successor of the function entry block.
6876 * graphite.c: Include pointer-set.h.
6877 (debug_loop_mapping, increment_loop_mapped_depths,
6878 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6879 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6880 swap_loop_mapped_depth_for_num, get_num_from_index,
6881 swap_loop_mapped_depth, loop_iv_stack_debug,
6882 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6883 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6884 get_old_iv_from_ssa_name): New.
6885 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6886 (free_scop): Free SCOP_LOOPS_MAPPING.
6887 (scop_record_loop): Record old ivs.
6888 (create_var_name): Removed.
6889 (initialize_cloog_names): Allocate double space in case strip mine
6890 applies to all loops once.
6891 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6892 (clast_to_gcc_expression): Same. Implement more clast to gimple
6894 (graphite_create_new_loop): Pass in ivstack.
6895 (remove_all_edges): Pass in the construction_edge.
6896 (graphite_remove_iv): Removed.
6897 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6898 remove_cond_exprs): Rewritten.
6899 (move_phi_nodes): New.
6900 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6901 (translate_clast): Pass in ivstack. Rewrite some cases.
6902 (set_cloog_options, debug_clast_stmt): New.
6903 (find_transform): Use set_cloog_options.
6904 (outermost_loop_layer): Removed.
6905 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6906 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6907 mark_old_loops, remove_dead_loops): New.
6909 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6910 (const_column_index, get_first_matching_sign_row_index,
6911 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6912 get_upper_bound): New.
6913 (graphite_trans_bb_strip_mine): Also update the iv map.
6915 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6916 (struct name_tree): Add a loop field.
6917 (struct scop): Add a graphite_loops_mapping field.
6918 (SCOP_LOOPS_MAPPING): New.
6919 (debug_clast_stmt): Declare.
6920 * lambda.h (find_induction_var_from_exit_cond): Declare.
6921 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6922 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6923 (create_empty_loop_on_edge): Updated.
6924 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6925 rename_variables_in_bb): Declare.
6926 * tree-cfg.c (remove_bb): Extern.
6928 * gcc.dg/graphite/block-0.c: New.
6930 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6931 Sebastian Pop <sebastian.pop@amd.com>
6933 * graphite.c (strip_mine_profitable_p): New.
6934 (graphite_trans_bb_block): Disable strip mining if not profitable.
6936 * gcc.dg/graphite/scop-18.c: New.
6937 * gcc.dg/graphite/scop-17.c: Fixed.
6938 * gcc.dg/graphite/scop-16.c: Fixed.
6940 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6941 Jan Sjodin <jan.sjodin@amd.com>
6942 Sebastian Pop <sebastian.pop@amd.com>
6944 * graphite.c (is_interchange_valid): New.
6945 (graphite_trans_bb_block): Check loop nest of basic block for legality
6948 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6949 outer_most_loop, gbb_outer_most_loop_index): New.
6951 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6952 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6953 * gcc.dg/graphite/scop-16.c: New.
6954 * gcc.dg/graphite/scop-17.c: New.
6956 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6958 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6959 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6961 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6963 * graphite.c (new_scop): Initialize SCOP_EXIT.
6964 (scopdet_info): Add.
6965 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6966 (build_scops_1): Cleanup, bugfixes.
6967 (build_scops): Cleanup.
6969 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6970 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6972 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6974 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6976 * gfortran.dg/graphite/graphite.exp: Use
6977 DEFAULT_GRAPHITE_FLAGS.
6979 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6981 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6983 * graphite.c (scan_tree_for_params): Do not assert any more if
6984 MULT_EXPR parameter is negative.
6986 * gfortran.dg/graphite/scop-1.f: New.
6988 * gfortran.dg/graphite/graphite.exp: New.
6990 * gcc.dg/graphite/scop-15.c: New.
6992 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6994 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6996 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6998 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6999 graphite_swap_loops.
7000 (graphite_trans_bb_move_loop): New.
7001 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7002 (graphite_trans_bb_block): New.
7003 (graphite_trans_loop_block): New.
7004 (graphite_trans_scop_swap_1and2): Rename from
7005 graphite_trans_swap_1and2.
7006 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7007 (graphite_trans_scop_block): New.
7008 (graphite_apply_transformations): Rename from
7009 graphite_transformations.
7011 * gcc.dg/graphite/scop-matmult.c: New.
7013 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7015 * graphite.c (gbb_compare): New.
7016 (graphite_sort_gbbs): New.
7017 (gbb_can_be_ignored): New.
7018 (scop_remove_ignoreable_gbbs): New.
7019 (graphite_transformations): Cleanup and add
7020 scop_remove_ignoreable_gbbs.
7021 * lambda.h (lambda_vector_compare): New.
7023 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
7025 * graphite.c (print_graphite_bb): Correct printing of static schedule.
7026 (graphite_swap_loops): int -> unsigned
7027 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7028 (graphite_transformations): New.
7029 (graphite_transform_loops): Move to graphite_transformations.
7030 * graphite.h (gbb_nb_loops): Return unsigned.
7032 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
7034 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7035 the domain matrix. This makes scop-0.c work again.
7037 2008-06-20 Richard Guenther <rguenther@suse.de>
7039 * graphite.h: Adjust copyright to GPLv3.
7040 * graphite.c: Likewise.
7041 (stmt_simple_memref_for_scop_p): Split out from ...
7042 (stmt_simple_for_scop_p): ... here. Fix handling of calls
7044 (get_bb_type): Optimize.
7046 (is_bb_addable): Fix memleak, replace is_pred call with
7048 (build_scops): Use current_loops.
7049 (param_index): Fix memleak.
7051 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7053 * graphite.c: Fix formatting.
7055 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7057 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7058 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7059 (create_var_name, save_var_name): Newly defined functions.
7060 (initialize_cloog_names): Part of the code factored out to
7062 (clast_to_gcc_expression): Now handles the case of clast_red_sum
7063 in clast_reduction statement.
7064 (graphite_create_new_loop): Now takes a new parameter
7066 (translate_clast): Now also takes the context_loop and bb_exit
7067 parameters. Rewritten the code so that it creates a gimple code
7068 inside the given context.
7069 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7070 remove_cond_expr, disconnect_cond_expr,
7071 disconnect_virtual_phi_nodes): Newly defined functions.
7072 * graphite.h (struct scop): added old_ivs vector.
7073 SCOP_OLDIVS: New macro.
7075 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7077 * cfgloopmanip.c: Add missing function comments, fix formatting.
7079 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7081 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7082 (create_empty_loop_on_edge): Defined.
7083 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7085 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7086 (update_dominators_in_loop): Declared as extern
7087 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7089 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7091 * graphite.c (print_graphite_bb): Allow changing number of loops
7093 (initialize_cloog_names): Allow changing number of loops.
7094 (build_cloog_prog): Simplify.
7095 (find_transform): Enable cloog option --strides.
7096 (graphite_swap_loops): New.
7097 (graphite_strip_mine_loop): New.
7098 (graphite_trans_swap_1and2): New.
7099 (graphite_trans_strip): New.
7100 (graphite_transform_loops): Add graphite_trans_strip.
7101 * graphite.h (scop_max_loop_depth): New.
7103 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7105 * graphite.c (build_scop_iteration_domain): Remove forgotten
7106 line. (Fixes compile)
7108 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7110 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7111 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7112 (build_bb_loops): New.
7113 (graphite_transform_loops): Add build_bb_loops.
7114 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7116 * graphite.h (graphite_bb): Add loops.
7117 (gbb_nb_loops): New.
7118 (gbb_loop_at_index): New.
7119 (gbb_loop_index): New.
7120 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7121 using nb_params_in_scop.
7123 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7125 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7126 (build_scop_canonical_schedules): Build minimized schedule.
7127 (schedule_to_scattering): Adapt to minimized schedule.
7128 * graphite.h (graphite_bb): Add/Update descriptions.
7130 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7131 Tobias Grosser <grosser@fim.uni-passau.de>
7133 * graphite.c (print_graphite_bb): Add condition printing.
7135 (dump_gbb_conditions): New.
7136 (build_scop_conditions_1): New.
7137 (build_scop_conditions): New.
7138 * graphite.h (graphite_bb): Add conditions.
7140 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7142 * graphite.c (print_graphite_bb):
7143 (free_graphite_bb): New.
7144 (free_scop): Free bbs.
7145 (get_bb_type): Free doms.
7146 (build_scop_context): Free context matrix.
7147 (build_loop_iteration_domains): Remove unused code.
7148 (build_cloog_prog): Free scattering function and blocklist.
7149 (find_transform): Free options.
7151 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7153 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7154 Remove unnecessery cloog data structures. Make a copy of the domain
7155 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7156 unnecessary cloog data structures. Fix memory leaks. Remove insert
7157 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7159 (build_scop_iteration_domain): Remove unnecessary cloog
7160 data structures. Fix memory leaks.
7161 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7162 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7164 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7166 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7168 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7170 * graphite.c (end_scop): Style fix.
7171 (schedule_to_scattering): Style and comment fix.
7173 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7174 * graphite.c (print_graphite_bb): Fix definiton of
7175 schedule_to_scattering.
7176 (initialize_cloog_names): Change nb_scattdims to max loop
7178 (schedule_to_scattering): Take parameter for number of scattering
7180 (build_cloog_prog): Only build as much scattering dimensions as
7183 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7185 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7186 in polyhedron/aermod.f90.
7188 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7189 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7190 Harsha Jagasia <harsha.jagasia@amd.com>
7192 * graphite.c (is_bb_addable): Fix segfault.
7194 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7196 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7197 with multiple exits and conditional handling in edge cases.
7198 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7200 * gcc.dg/graphite/scop-14.c: New.
7202 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7203 Adrien Eliche <aeliche@isty.uvsq.fr>
7205 * graphite.c (is_bb_addable): Add more comments and enhance
7206 readablity of the source code. Fix memory leak.
7207 (is_loop_exit): Fix memory leak.
7209 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7211 * graphite.c (first_loop_in_scop): Deleted.
7212 (setup_cloog_loop): Only walk the loop chain for inner loops.
7213 (build_scop_iteration_domain): Execute setup_cloog_loop for
7214 all loops in the first layer.
7216 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7218 * graphite.c (scan_tree_for_params): Change the way params are
7219 added to be indepenent of the number of loops.
7220 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7222 (build_cloog_prog): Revert to short matrix format.
7224 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7225 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7227 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7230 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7232 * graphite.c (nb_data_refs_in_scop): New.
7233 (graphite_transform_loops): Print more stats: number of
7234 loops, basic blocks and data references per scop.
7236 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7237 Jan Sjodin <jan.sjodin@amd.com>
7239 * graphite.c (loop_affine_expr, idx_record_params,
7240 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7241 instead of instantiate_parameters.
7243 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7245 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7246 add support for parameters, add STATIC_SCHEDULE at the right places,
7249 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7251 * graphite.c (build_scop_loop_nests): Only add the loops, that
7252 are contained completely in the SCoP.
7253 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7254 and the domains are fixed.
7255 (build_scop_canonical_schedules): Add support for bbs not contained
7258 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7260 * graphite.h (scop_contains_loop): Update comments to match
7261 the actual behavior.
7262 (scop_contains_loop): New.
7263 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7265 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7267 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7268 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7271 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7272 Tobias Grosser <grosser@fim.uni-passau.de>
7274 * graphite.c (graphite_transform_loops): Early return when
7275 there are no loops in the function.
7277 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7278 Jan Sjodin <jan.sjodin@amd.com>
7280 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7281 offset of the last loop.
7282 (setup_cloog_loop): Copy the entire outer constraint matrix.
7284 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7285 Jan Sjodin <jan.sjodin@amd.com>
7287 * graphite.c (stmt_in_scop_p, function_parameter_p,
7288 invariant_in_scop_p): Removed.
7289 (scan_tree_for_params): Can be used with no constraint
7290 matrix for gathering parameters.
7291 (idx_record_params): Don't use idx_record_param, instead use
7292 scan_tree_for_params.
7293 (find_scop_parameters): Same.
7294 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7295 Fix the size of loop domains.
7296 (schedule_to_scattering): Exit when the outer loop is not in scop.
7297 (find_transform): Enable build_cloog_prog.
7299 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7300 Jan Sjodin <jan.sjodin@amd.com>
7302 * graphite.c (schedule_to_scattering): Make scattering domains
7303 uniformly of the same size, as required by CLooG 0.14.0 and before.
7305 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7306 Jan Sjodin <jan.sjodin@amd.com>
7308 * graphite.c (schedule_to_scattering): Rewrite, correct the
7309 translation of the scheduling function to scattering.
7310 (build_cloog_prog): Call schedule_to_scattering only once.
7311 * graphite.h (scop_loop_index): Do not fail for loops not
7312 in the scop: return -1.
7314 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7316 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7317 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7318 (setup_cloog_loop): Export GBB_DOMAIN.
7319 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7320 able to rebuild the original control flow.
7321 * graphite.h (graphite_bb): Add domain field and access macro.
7324 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7326 * graphite.c (debug_gbb): New.
7327 (print_scop, build_graphite_bb): Use SCOP_BBS.
7328 (build_scop_bbs): Reimplemented.
7329 (dfs_bb_in_scop_p): Removed.
7330 (build_scop_loop_nests): Reorder loops inserted in
7331 SCOP_LOOP_NEST: outer loops should come first.
7332 (build_scop_canonical_schedules): Reinitialize at zero
7333 the components of the SCOP_STATIC_SCHEDULE for the loops
7334 that have already been parsed.
7336 * graphite.h (debug_gbb): Declared.
7338 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7339 Jan Sjodin <jan.sjodin@amd.com>
7341 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7342 (graphite_loop_to_gcc_loop): Removed.
7343 (remove_all_edges): New.
7344 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7345 (gloog): Remove useless code.
7347 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7349 * graphite.c (get_bb_type): Reworked. We distinguish between
7350 loops with one or multiple exits.
7351 (is_loop_exit): New.
7353 (is_bb_addable): Rework condition handling, now support for case
7354 case statements and loops with multiple exits.
7356 * gcc.dg/graphite/scop-11.c: New.
7357 * gcc.dg/graphite/scop-12.c: New.
7358 * gcc.dg/graphite/scop-13.c: New.
7360 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7362 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7363 we have too many colors.
7365 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7367 * doc/invoke.texi (-ftree-loop-fusion): Document.
7368 * tree-pass.h (pass_loop_fusion): Declared.
7369 * tree-loop-fusion.c: New.
7370 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7371 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7372 * tree-data-ref.h (find_data_references_in_loop): Declared.
7373 * common.opt (ftree-loop-fusion): Declared.
7374 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7376 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7378 * graphite.c (build_access_matrix): Fix typo from the merge.
7380 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7382 * Merge from mainline (130800:135673).
7384 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7386 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7387 Update dominators after splitting.
7389 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7391 * graphite.c (is_bb_addable): Return the harmful statement.
7392 Factor up some code.
7393 (end_scop): New. Splits end of scope bbs on a harmful statement.
7394 (build_scops_1): Call end_scop.
7396 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7398 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7399 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7400 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7401 build_scops_1): Removed.
7402 (build_scops_2): Renamed build_scops_1.
7404 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7406 * graphite.c: Fix formatting.
7408 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7410 * graphite.c (get_bb_type): New.
7412 (build_scops_2): New.
7413 (is_bb_addable): New.
7414 (build_scops): Switch the scop detection.
7415 (build_scop_bbs): Add entry bb to scop.
7416 * graphite.h (struct scop): Update comment.
7418 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7420 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7423 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7425 * gcc.dg/graphite/scop-1.c: Update.
7426 * gcc.dg/graphite/scop-2.c: Update.
7427 * gcc.dg/graphite/scop-4.c: Update.
7428 * gcc.dg/graphite/scop-5.c: Add.
7429 * gcc.dg/graphite/scop-6.c: Add.
7431 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7433 * gcc.dg/graphite/scop-0.c: Add.
7434 * gcc.dg/graphite/scop-7.c: Add.
7435 * gcc.dg/graphite/scop-8.c: Add.
7436 * gcc.dg/graphite/scop-9.c: Add.
7437 * gcc.dg/graphite/scop-10.c: Add.
7439 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7441 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7442 Check affine expressions depending on the outermost loop
7444 (stmt_simple_for_scop_p): Same.
7445 (harmfule_stmt_in_scop): Same.
7447 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7449 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7450 mark entry and exit, that are not part of the SCoP and update HTML
7453 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7455 * graphite.c (basic_block_simple_for_scop_p): Renamed
7457 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7458 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7459 (all_preds_visited_p, all_succs_visited_p,
7460 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7461 scop_end_loop): New.
7462 (build_scops): Do not use dfs_enumerate_from.
7464 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7466 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7468 * graphite.c: Add comments to functions that are missing a
7470 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7472 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7474 * graphite.c (nb_params_in_scop): Moved...
7475 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7476 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7477 (clast_to_gcc_expression): Reduce column size to less than 80.
7478 (graphite_create_iv): Return the new name of the IV.
7479 (find_transform): Set options->esp and options->cpp.
7480 (gloog): Comment out the invalidation of the old loop code.
7481 (initialize_dependence_polyhedron): Replace scop_nb_params with
7484 * graphite.h (nb_params_in_scop): ... here.
7485 (scop_nb_params): Removed.
7486 (loop_domain_dim): Return something even when the loop was not
7487 found in the hash table: avoid ICEing on all the graphite.exp
7490 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7492 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7494 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7495 according to nesting level.
7496 (find_scop_parameters): Call instantiate_parameters.
7497 (scan_tree_for_params): Extend it to handle general affine bounds.
7498 Inner loop bound can depend on outer loop induction variable.
7499 (setup_cloog_loop): tmp variable is allocated on stack. Call
7500 instantiate_parameters with respect to outermost_loop_in_scop.
7501 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7503 (create_empty_loop): Function loopify should be given edge
7504 probability, instead of edge frequency. Dominance relation from
7505 switch_bb to loop_header.
7506 (clast_to_gcc_expression): Added handling of clast_reduction node.
7507 (gloog): New functionality for removing old loop.
7508 (test_dependence): Factored out from build_rdg_all_levels.
7509 (build_rdg_all_levels): Dependence testing factored out to
7510 test_dependence function.
7512 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7513 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7516 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7518 * graphite.c (free_scop, param_index, initialize_cloog_names,
7519 nb_params_in_scop): Use name_tree map instead of just a tree
7520 for keeping track of the variable name associated to that tree.
7521 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7522 clast_to_gcc_expression, graphite_create_iv,
7523 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7524 graphite_stmt_to_gcc_stmt): New.
7525 (gloog): Call these.
7526 * graphite.h (struct name_tree): New.
7527 (struct scop): Use name_tree instead of tree for params.
7528 Store a vector of name_tree for new_ivs.
7530 (scop_nb_params): Use name_tree instead of tree.
7532 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7533 Sebastian Pop <sebastian.pop@amd.com>
7535 * tree-bounds.c: New.
7536 * tree-bounds.h: New.
7537 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7538 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7539 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7543 * c-cppbuiltin.c: Same.
7547 * tree-outof-ssa.c: Same.
7549 * Makefile.in: Same.
7551 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7552 Sebastian Pop <sebastian.pop@amd.com>
7554 * tree-loop-distribution.c (remaining_stmts,
7555 upstream_mem_writes): Removed static variables.
7556 (copy_loop_before, create_bb_after_loop,
7557 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7558 rdg_build_components, rdg_build_partitions,
7559 dump_rdg_partitions): Extern.
7560 (generate_loops_for_partition, generate_code_for_partition): Do not
7562 (already_processed_vertex_p, predecessor_has_mem_write,
7563 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7564 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7565 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7566 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7567 Pass remaining_stmts and upstream_mem_writes as parameters.
7568 (rdg_component): Moved...
7569 (build_rdg_partition_for_component): Do not aggregate components when
7570 flag_streamize_loops is set.
7571 (gen_sequential_loops): New.
7572 (ldist_gen): Call gen_sequential_loops.
7574 * tree-pass.h (pass_loop_streamization): Declared.
7576 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7577 basic blocks when loops structures exist.
7579 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7581 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7583 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7584 eliminate_local_variables_stmt, eliminate_local_variables,
7585 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7586 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7587 of code delimited by two edges in the CFG.
7588 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7589 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7590 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7591 the case of parallelisation of reductions.
7592 (create_loop_fn): Extern.
7593 (create_omp_parallel_region): New.
7595 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7596 dump_data_reference for printing dra and drb.
7597 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7599 (build_rdg): Don't call free_dependence_relations for the moment, as
7600 we attach dependence relations on each edge of the RDG.
7603 * tree-data-ref.h (rdg_component): ...here.
7604 (struct rdg_edge): New field ddr_p relation.
7605 (RDGE_RELATION): New.
7606 (create_bb_after_loop, copy_loop_before,
7607 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7608 rdg_build_partitions, dump_rdg_partitions,
7609 free_rdg_components): Declared.
7611 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7612 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7614 * tree-loop-streamization.c: New.
7616 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7617 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7619 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7621 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7623 * passes.c: Schedule pass_loop_streamization.
7625 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7627 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7630 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7632 * graphite.c (dot_all_scops): Update formatting.
7633 Bbs can now be part of more than one SCoP.
7635 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7637 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7639 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7640 * graphite.h (loop_to_cloog_loop): New.
7642 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7644 * graphite.c (loop_domain_dim, ref_nb_loops,
7645 loop_iteration_vector_dim): New.
7646 (build_access_matrix_with_af, build_access_matrix,
7647 initialize_dependence_polyhedron): Fixed for new matrix layout.
7648 No longer assume that all iteration domains are of the same
7651 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7653 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7654 defined in a loop at depth 0 is invariant.
7655 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7656 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7657 be called at loop depth 0.
7659 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7661 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7662 (down_open_scop): Removed.
7663 (loop_in_scop_p): Redefined.
7664 (scop_affine_expr): New argument: scop.
7665 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7666 a harmful statement ending a scop.
7667 (basic_block_simple_for_scop_p): New argument: scop.
7668 (get_loop_start): Removed.
7669 (new_scop): Initialize SCOP_LOOPS.
7670 (free_scop): Free SCOP_LOOPS.
7671 (succs_at_same_depth, preds_at_same_depth): New.
7672 (end_scop): Test the validity of a scop.
7673 (add_dominators_to_open_scops): New.
7674 (test_for_scop_bound): Call add_dominators_to_open_scops.
7675 Add cases for opening and closing multiple scops.
7676 (build_scops, build_scop_bbs): Iterate over basic blocks in
7678 (build_graphite_bb): Pass scop directly.
7679 (dfs_bb_in_scop_p): New.
7680 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7682 (nb_loops_around_gb): Use loop_in_scop_p.
7683 (schedule_to_scattering): Disabled for the moment the code computing
7684 the "textual order for outer loop".
7686 * graphite.h (struct scop): New field loops.
7688 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7690 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7692 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7693 Sebastian Pop <sebastian.pop@amd.com>
7695 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7696 * common.opt (fstreamize-loops): New.
7697 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7698 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7699 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7700 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7702 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7704 * tree-data-ref.c (build_empty_rdg): New.
7705 (build_rdg): Use it.
7706 * tree-data-ref.h (build_empty_rdg): Declared.
7707 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7708 (find_vertex_for_stmt): Removed.
7709 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7711 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7713 * tree-loop-distribution.c (generate_builtin): After cancelling the
7714 loop tree, also delete basic blocks.
7715 (rdg_flag_uses): Stop recursion when a vertex has already been
7718 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7720 * graphite.c (build_scop_alpha): Removed.
7721 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7722 and dump_dependence_graph to avoid compiler warnings.
7724 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7726 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7727 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7728 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7729 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7730 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7731 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7732 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7733 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7734 dump_dependence_graph): New.
7735 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7737 (struct scop): New field loop2cloog_loop.
7738 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7739 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7741 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7743 * graphite.c (build_graphite_bb): Fix initialization
7744 of the graphite basic block.
7746 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7748 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7749 loop domain matrix. Pass in the number of loops contained in the
7751 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7752 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7753 loops that are not surrounding the current loop are not represented
7754 in the domain constraint matrix.
7755 (build_scop_iteration_domain): Initial domain constraint matrix
7756 contains only the eq/ineq, cst, and scop parameters columns.
7758 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7760 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7761 (print_graphite_bb): Print scattering.
7763 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7765 * graphite.c (initialize_cloog_names): Initialize names of
7766 scattering variables.
7768 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7770 * graphite.c (dot_all_scops_1): Disable debug output while
7773 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7775 * graphite.c (find_transform): Change cloog output language to C.
7777 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7779 * tree-loop-distribution.c (generate_memset_zero,
7780 generate_builtin, generate_code_for_partition,
7781 rdg_flag_all_uses): New.
7782 (rdg_flag_uses): Gather in the same partition the statements defining
7783 the VUSES of the current statement.
7784 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7785 Gather in the same partition not only the stores to the same memory
7786 access, but also the reads.
7787 (ldist_generate_loops): Renamed ldist_gen.
7789 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7790 Tobias Grosser <grosser@fmi.uni-passau.de>
7792 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7793 next pointer, don't use the inner pointer.
7795 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7797 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7798 (find_transform): Call dot_all_1.
7799 * graphite.h (dot_all_scops): Declared.
7801 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7803 * tree-loop-distribution.c: Fix apsi.f ICE.
7804 (create_bb_after_loop): New.
7805 (generate_loops_for_partition): Use it.
7806 * gfortran.dg/ldist-1.f90: New.
7808 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7809 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7811 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7813 * graphite.c (find_transform): Dump cloog program sent to cloog.
7815 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7817 * graphite.c (initialize_cloog_names): Initialize cloog
7820 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7822 * graphite.c (build_scop_context): Fix typo, for the matrix
7823 format: insert '0 >= 0' instead of '-1 >= 0'.
7825 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7827 * Fix merge problems.
7829 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7831 * graphite.c (setup_cloog_loop): Fix typo.
7833 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7835 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7836 * tree-loop-distribution.c: Reimplemented.
7837 * tree-pass.h (pass_loop_distribution): New.
7838 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7840 * graphds.h (struct graph): New field indexes.
7841 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7843 * tree-vect-analyze.c: Remove declaration of static functions when not
7845 * tree-vectorizer.c: Same.
7846 (rename_variables_in_loop): Now extern.
7847 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7848 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7849 calling redirect_edge_and_branch_force.
7851 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7853 * tree-data-ref.c: Don't include tree-chrec.h.
7854 (debug_data_dependence_relations): New.
7855 (dump_data_dependence_relation): Call dump_data_reference on data refs
7857 (same_access_functions): Moved...
7858 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7859 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7860 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7861 struct rdg_vertex_info, ): New.
7862 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7864 (create_rdg_vertices): Initialize the htab of graph->indexes.
7865 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7866 (stmts_from_loop): Don't save LABEL_EXPR.
7867 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7868 hash_stmt_vertex_del): New.
7869 (build_rdg): Initialize rdg->indexes.
7870 (free_rdg, stores_from_loop, ref_base_address,
7871 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7872 have_similar_memory_accesses_1, ref_base_address_1,
7873 remove_similar_memory_refs): New.
7875 * tree-data-ref.h: Include tree-chrec.h.
7876 (debug_data_dependence_relations): Declared.
7877 (same_access_functions): ...here. Now static inline.
7878 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7879 ddr_dependence_level): New.
7880 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7881 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7882 RDG_MEM_READS_STMT): New.
7883 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7884 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7885 rdg_vertex_for_stmt): Declared.
7886 (struct rdg_edge): New field level.
7887 (RDGE_LEVEL, free_rdg): New.
7888 (stores_from_loop, remove_similar_memory_refs,
7889 rdg_defs_used_in_other_loops_p,
7890 have_similar_memory_accesses): Declared.
7891 (rdg_has_similar_memory_accesses): New.
7893 * lambda.h (dependence_level): New.
7894 * common.opt (ftree-loop-distribution): New.
7895 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7896 (print_loop_ir): Renamed print_loops.
7897 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7898 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7899 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7900 (tree-loop-distribution.o): Added.
7901 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7902 (mark_virtual_ops_in_bb): New.
7903 (print_loops_bb, debug_loop_num, debug_loop): New.
7904 * passes.c: Scheduled pass_loop_distribution.
7906 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7908 * graphite.c (scan_tree_for_params): Correct the number of columns
7910 (nb_flat_iterator): New.
7911 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7912 (build_scop_iteration_domain): Correct the number of columns for
7915 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7917 * Merge from mainline (129697:130800).
7919 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7921 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7922 dominated by SCoP's exit.
7923 (graphite_transform_loops): Compute post dominators.
7925 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7927 * Merge from mainline (127169:129697).
7929 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7931 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7932 parameter for the basic block that contains the expression. Use
7933 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7934 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7936 * graphite.h (gbb_loop): New.
7937 (GBB_LOOP): Removed.
7939 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7941 * Makefile.in: Fix merge problem.
7943 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7945 * Merge from mainline (125309:127169).
7946 * tree-loop-distribution.c: Disabled.
7948 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7950 * Merge from mainline (r123693:125309).
7952 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7954 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7956 (correct_modify_p, check_statements, number_of_lvalue_uses,
7957 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7958 instead of MODIFY_EXPR.
7959 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7962 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7964 * tree-loop-distribution.c (struct rdg): Replace arrays by
7965 VECs for edges and vertices.
7966 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7967 (RDGV_NB_PARTITIONS): New.
7968 (PRDG_NBV, PRDG_NBE): Removed.
7969 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7970 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7971 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7973 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7974 Sebastian Pop <sebpop@gmail.com>
7976 * doc/invoke.texi (-ftree-loop-distribution): Document.
7977 * tree-loop-distribution.c: New file.
7978 * tree-pass.h (pass_loop_distribution): Declared.
7979 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7980 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7982 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7983 (DDR_REVERSED_P): New.
7984 * common.opt (-ftree-loop-distribution): New.
7985 * tree-flow.h (distribute_loops): Declared.
7986 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7987 * passes.c (init_optimization_passes): Schedule loop distribution.
7989 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7991 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7992 (print_scop): Don't print when scop is NULL.
7993 (build_scop_context, find_transform): Don't output to stderr.
7995 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7997 * tree-data-ref.c: Don't include graphite.h.
7998 Comment out the code for printing data reference's scop.
7999 (build_access_matrix_with_af): Moved...
8000 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8001 * graphite.c (build_access_matrix_with_af): ... here. Now static.
8002 (print_graphite_bb): Print basic block's schedule.
8003 (print_scop): Don't print the schedule, call cloog's pretty printer.
8004 (bb_in_scop_p): A basic block is in a scop only if it is both
8005 dominated and postdominated by the scop's entry and exit basic blocks.
8006 (function_parameter_p): New.
8007 (invariant_in_scop_p): Use function_parameter_p.
8008 (new_scop, save_scop): New.
8009 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8011 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8012 (loop_in_scop_p): New.
8013 (scop_record_loop): Use loop_in_scop_p.
8014 (build_scop_domain): Renamed build_scop_iteration_domain.
8015 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8016 nb_params_in_scop, build_scop_context, first_loop_in_scop,
8017 setup_cloog_loop, dot_scop_1, dot_scop): New.
8018 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8019 (struct scop): Add a pointer to cloog's representation of a program.
8021 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8023 * doc/invoke.texi (-ftree-check-verbose): Renamed
8024 -ftree-checks-verbose.
8025 * common.opt (flag_tree_check_verbose): Renamed
8026 flag_tree_checks_verbose.
8027 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8029 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8031 * configure: Regenerated.
8032 * config.in: Regenerated.
8033 * tree-ssa-loop.c (graphite_transforms): Execute
8034 graphite_transform_loops only when HAVE_cloog.
8035 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8036 * graphite.c: Include polylibgmp.h and cloog.h.
8037 (graphite_transform_loops): Removed loops parameter.
8038 * tree-flow.h (graphite_transform_loops): Update declaration.
8039 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8040 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8041 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8042 (OBJS-common): Remove dependence on graphite.o.
8043 (BACKEND): Depend on @GRAPHITE@.
8045 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
8047 * doc/invoke.texi (-ftree-check-verbose): Documented.
8048 * gcc.dg/tree-checker/tree-checks-1.c: New.
8049 * gcc.dg/tree-checker/tree-checks-2.c: New.
8050 * gcc.dg/tree-checker/tree-checks-3.c: New.
8051 * gcc.dg/tree-checker/tree-checks-4.c: New.
8052 * gcc.dg/tree-checker/tree-checks.exp: New.
8053 * gcc.dg/tree-checker/condates.crp: New.
8054 * common.opt (ftree-checks-verbose): New.
8055 * tree-check.c (tree_check_warning): Move extra stderr output
8056 under control of flag_tree_check_verbose.
8058 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
8060 * tree-match.c: Fix comments formatting.
8061 * tree-match.h: Fix comments formatting.
8062 * tree-check.c: Fix comments formatting.
8063 (tree_check_init): Restructure.
8065 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
8067 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8069 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
8071 * Merge from mainline (r120733:123693).
8073 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8075 * condate.y: New file.
8076 * tree-match.h (struct patt_info_s): New field sign.
8077 (struct condate_s): New field msg.
8078 (normalize_condate, name_condate, add_condate): New.
8079 (conds[], condate_parse): Made extern.
8080 * tree-check.c (tree_check_warning): First arg changed to cond;
8081 warning reformatted.
8082 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8084 (tree_check): Process trivial condates.
8085 (read_delimited_string): Removed.
8086 (print_cond): Print name and msg.
8087 (conds[]): Made extern.
8088 (parse_tree_check_file_once): Rewritten to use the parser in
8090 Processing of option --tree_check_string moved to tree_scan().
8091 * Makefile.in: Added condate.y
8093 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8095 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8096 Use VECs instead of varrays.
8097 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8098 * Makefile.in (pretty-print.o): Depend on vec.h.
8099 * pretty-print.c: Include tree.h and vec.h.
8100 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8101 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8102 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8103 pp_free_list): Use VECs instead of varrays.
8104 * pretty-print.h: Do not include varray.h.
8105 (struct tree_chunk_s): Declaration moved before its use.
8106 (output_buffer): Rename varray field to chunks.
8107 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8108 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8109 save_global_holes): Use VECs instead of varrays.
8110 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8111 * tree-check.c (scan_cfg_stmts, push_node,
8112 print_matching_stmt): Removed.
8113 (tree_check_instance, push_global_holes_if_new, tree_check,
8114 execute_tree_check): Use VECs instead of varrays.
8115 (gate_tree_check): Don't execute the CFG check when basic_block_info
8118 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8120 * Merge from mainline (r115016:120733).
8122 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8124 * Merge from mainline (r117632:117661).
8126 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8128 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8129 * tree-pass.h (TDF_DEBUG, debug_p): New.
8130 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8131 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8132 get_loop_exit_condition, analyze_evolution_in_loop,
8133 analyze_initial_condition, analyze_scalar_evolution,
8134 instantiate_parameters, number_of_latch_executions): Use debug_p.
8135 * tree-chrec.c (chrec_apply): Use debug_p.
8136 * tree-data-ref.c: Include graphite.h.
8137 (dump_data_reference): Print also the access matrix.
8138 (analyze_array, analyze_indirect_ref, init_data_ref,
8139 analyze_offset_expr, address_analysis, object_analysis,
8140 create_data_ref, finalize_ddr_dependent,
8141 non_affine_dependence_relation, analyze_ziv_subscript,
8142 analyze_siv_subscript_cst_affine,
8143 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8144 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8145 analyze_miv_subscript, analyze_overlapping_iterations,
8146 build_classic_dist_vector, subscript_dependence_tester,
8147 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8148 (build_access_matrix_with_af): No longer static.
8149 * tree-data-ref.h (scop_p): ... declaration here.
8150 (data_reference.scop): New field.
8151 (DR_SCOP, DR_ACCESS_MATRIX): New.
8152 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8153 * graphite.c (print_graphite_bb): Call dump_data_references.
8154 (print_scop): Use scop_nb_loops and scop_dim_domain.
8155 (test_for_scop_bound): Use debug_p.
8156 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8158 (scop_loop_index): Moved...
8159 (scop_record_loop): New.
8160 (build_scop_loop_nests): Use scop_record_loop.
8161 (build_scop_domain): Use scop_dim_domain.
8162 (build_access_matrix): Implemented.
8163 (build_scop_canonical_schedules): Use scop_nb_loops.
8164 (build_graphite_bb): Initialize GBB_SCOP.
8165 * graphite.h (scop_p): Moved...
8166 (graphite_bb.scop): New field.
8167 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8168 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8169 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8170 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8171 scop_loop_index): New.
8172 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8174 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8176 * Merge from mainline (r117661:120450).
8178 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8180 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8181 at the first declaration outside the varying loop, instantiate as
8183 * tree-chrec.c (for_each_scev_op): New.
8184 * tree-chrec.h (for_each_scev_op): Declared.
8185 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8186 * tree-data-ref.c (get_references_in_stmt,
8187 find_data_references_in_stmt): New, from trunk.
8188 (find_data_references_in_loop): Use get_references_in_stmt
8189 and find_data_references_in_loop, modified as in trunk.
8190 (build_access_matrix_with_af): New.
8191 * tree-data-ref.h (data_reference): Add a field access_matrix.
8192 (data_ref_loc): New, as in trunk.
8193 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8194 invariant_in_scop_p, param_index, scan_tree_for_params,
8195 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8196 idx_record_param, idx_record_params, build_access_matrix,
8197 build_scop_data_accesses, build_scop_canonical_schedules,
8198 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8199 build_scop_params): New.
8200 * graphite.h (graphite_bb): New.
8201 (scop): Add fields static_schedule, params, loop_nest,
8203 * lambda.h: Declare vecs of lambda_matrix.
8204 * tree-flow.h (print_loop_ir_bb): Declared.
8205 * tree-cfg.c (print_loop_ir_bb): New.
8206 (print_loop): Use print_loop_ir_bb.
8208 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8210 * Merge from mainline (r115016:117632).
8212 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8214 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8215 break due to a warning.
8217 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8219 * graphite.c (print_scops, debug_scops): New.
8220 (graphite_transform): Renamed graphite_find_transform.
8221 * graphite.h (debug_scops): Declared.
8223 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8225 * tree-match.c: Reformat following the GNU style.
8226 * tree-match.h: Reformat following the GNU style.
8227 * tree-pattern.h: Removed empty file.
8228 * Makefile.in: Remove references to tree-pattern.h.
8229 * tree-check.c: Reformat following the GNU style.
8230 (execute_tree_check): Move gate condition code to...
8231 (gate_tree_check): ...here. New function.
8232 (pass_check): Use the gate function.
8234 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8236 * tree-pattern.h: New. Tree pattern matching and checking using
8238 * tree-check.c: New. Tree/CFG checking pass.
8239 * tree-match.c: New. Library for tree pattern matching.
8240 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8241 * toplev.c, flags.h: Add globals for tree-check pass.
8242 * Makefile.in: Integrate the files in tree-check pass.
8243 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8244 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8245 Introduce a "lazy" pretty-print mode.
8246 * tree.c, tree.h: Add tree_name.
8248 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8250 * doc/invoke.texi (-fgraphite): Correct typo.
8251 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8252 use of print_loop_ir.
8253 * gcc.dg/graphite/scop-1.c: New.
8254 * gcc.dg/graphite/scop-2.c: New.
8255 * gcc.dg/graphite/graphite.exp: New.
8256 * graphite.c: Include domwalk.h.
8257 (print_scop): Print only the entry and exit blocks.
8258 (debug_scop): No longer static.
8259 (affine_expr): Fix formating. Return also true when the expression is
8261 (stmt_simple_for_scop_p): Fix formating.
8262 (build_scops): Use domwalk.
8263 (get_loop_start, end_scop, test_for_scop_bound): New.
8264 (graphite_transform_loops): Avoid printing on stderr.
8265 * graphite.h (debug_scop): Declared.
8266 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8267 * Makefile.in (graphite.o): Depend on domwalk.h.
8268 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8269 declarations for static functions.
8270 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8271 controlling output verbosity.
8273 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8274 Plesco Alexandru <shurikx@gmail.com>
8276 * doc/invoke.texi (-fgraphite): Document.
8277 * tree-pass.h (pass_graphite_transforms): Declared.
8278 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8279 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8280 (pass_graphite_transforms): Defined.
8281 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8282 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8283 * graphite.c, graphite.h: New.
8284 * common.opt (fgraphite): Declared.
8285 * tree-flow.h (graphite_transform_loops): Declared.
8286 * Makefile.in (OBJS-common): Add graphite.o.
8287 (graphite.o): New rule.
8288 * passes.c (pass_graphite_transforms): Scheduled.