Add documentation for -fgraphite-read and -fgraphite-write.
[official-gcc/graphite-test-results.git] / gcc / ChangeLog.graphite
blob29619f7b94e0eb355bdccc1a6e17906f15df5d23
1 2010-08-14  Riyadh Baghdadi <baghdadi.mr@gmail.com>
3         * doc/invoke.texi (debugging options): Update documentation.
4         (-floop-interchange): Same.
5         (-flopp-strip-mine): Same.
6         (-floop-block): Same.
7         (-fgraphite-read): Add documentation.
8         (-fgraphite-write): Same.
10 2010-08-14  Riyadh Baghdadi <baghdadi.mr@gmail.com>
12         * toplev.c (process_options): Disable graphite loop optimization
13         options when -fgraphite-read flag is used.
15 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
17         * graphite-poly.c (init_graphite_out_file): New.
18         (init_graphite_in_file): New.
19         (apply_poly_transforms): Updated to enable reading and writing of
20         multiple scop files.
21         * toplev.c (init_asm_output): Remove graphite in/out file initialization.
23 2010-08-17  Tobias Grosser  <grosser@fim.uni-passau.de>
25         * graphite-scop-detection.c (graphite_can_represent_scev): Remove
26         redundant checks.
28 2010-08-12  Sebastian Pop  <sebastian.pop@amd.com>
30         * graphite-clast-to-gimple.c (precision_for_value): Adjust
31         computation of precision by 1.
33 2010-08-12  Riyadh Baghdadi <baghdadi.mr@gmail.com>
35         * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
36         (openscop_read_polyhedron_matrix): New.
37         * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
38         (openscop_read_N_int): Same.
39         * graphite-poly.c (openscop_read_N_int): New.
40         (openscop_read_one_int): New.
41         (openscop_read_N_string): New.
42         (openscop_read_one_string): New.
43         (openscop_read_powerset_matrix): New.
44         (graphite_read_transforms): Remove.
45         (graphite_read_scatt): New.
46         (graphite_read_scop_file): New.
47         (apply_poly_transforms): Updated to call graphite_read_scop_file.
49 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
51         * graphite-poly.c: Change include order.
53 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
55         * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
56         (cloog_matrix_nrows): New.
58 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
60         * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
61         from matrix lines.
62         * graphite-poly.c (openscop_print_scattering_function_1): Same.
63         (print_scattering_function_1): Same.
64         (openscop_print_pbb_domain): Same.
65         (openscop_print_scop_context): Same.
66         (print_scop_context): Same.
68 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
70         * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
71         (openscop_print_pdr_polyhedron): Print pph.
73 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
75         * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
76         * gfortran.dg/graphite/graphite.exp: Same.
77         * gcc.dg/graphite/vect-pr43423.c: New.
79 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
81         * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
82         priority signed types.
84 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
86         * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
87         to lang_hooks.types.type_for_size.  Call build_nonstandard_integer_type.
89 2010-07-29  Riyadh Baghdadi <baghdadi.mr@gmail.com>
91         * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
92         (openscop_print_polyhedron_matrix): New.
93         * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
94         * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
95         (openscop_print_pdr_powerset): New.
96         (openscop_print_powerset_matrix): New.
97         (openscop_print_scattering_function_1): New.
98         (print_scattering_function): Add support for scattering names and
99         OpenScop format.
100         (graphite_write_transforms): Remove.
101         (apply_poly_transforms): Updated to call print_scop.
102         (print_pdr_access_layout): Updated to support OpenScop format.
103         (print_pdr): Same.
104         (openscop_print_pbb_domain): New.
105         (print_pbb_body): Added a parameter to allow indicating that pbb_body is
106         not provided.
107         (print_pbb): Updated to call the new print_pbb_body.
108         (openscop_print_scop_context): New.
109         (print_scop_header): New.
110         (print_scop): Updated to call print_scop_header.
111         * graphite-poly.h: Document OpenScop format.
113 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
115         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
116         the case removed in the previous patch, when the only phi argument
117         is defined in the same loop as the phi node itself.  Handle it
118         separately from the invariant case by both propagating it outside
119         the region and replacing the phi node with an assign.
121 2010-07-28  Sebastian Pop  <sebastian.pop@amd.com>
123         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
124         constant phi nodes with one argument are is_gimple_min_invariant
125         and SSA_NAME_IS_DEFAULT_DEF.
127         * gfortran.dg/graphite/id-22.f: New.
129 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
131         * graphite-cloog-util.c (oppose_constraint):
132         Extend loop counter's value range (CLOOG_ORG).
133         (cloog_matrix_to_ppl_constraint): Same.
134         (new_Constraint_System_from_Cloog_matrix): Same.
135         * graphite-cloog-compat.h (matrix_num_type): New.
137 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
139         * graphite.c (graphite_initialize): Do not initialize
140         CLooG and initialize the Parma Polyhedra Library
141         manually when using CLOOG_ORG.
142         (graphite_finalize): Do not finalize CLooG and finalize
143         the Parma Polyhedra Library manually when using CLOOG_ORG.
144         * graphite-cloog-compat.h (cloog_initialize): Hide function
145         when using CLOOG_ORG.
146         (cloog_finalize): Same.
148 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
150         * graphite-clast-to-gimple.c (free_scattering): Change
151         CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
152         (CLOOG_ORG).
153         (build_cloog_prog): Same.
154         * graphite-cloog-compat.h (cloog_domain): Removed.
155         (cloog_scattering): New.
156         (cloog_set_domain): Removed.
157         (cloog_set_scattering): New.
158         (cloog_next_domain): Removed.
159         (cloog_next_scattering): New.
160         (cloog_set_next_domain): Removed.
161         (cloog_set_next_scattering): New.
162         (CloogScatteringList): New.
163         (CloogScattering): New.
164         (cloog_scattering_free): New.
165         (new_Cloog_Scattering_from_ppl_Polyhedron): New.
166         * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
167         New.
169 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
171         * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
172         CloogState.
173         (set_cloog_options): Same.
174         (print_clast_stmt): Same.
175         (scop_to_clast): Same.
176         (print_generated_program): Same.
177         (gloog): Same.
178         * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
179         (scop_to_clast): Extend with CloogState.
180         * graphite-cloog-util.c: Include graphite-cloog-compat.h
181         (new_Cloog_Domain_from_ppl_Polyhedron):
182         Extend with CloogState.  Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
183         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
184         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
185         * graphite-cloog-util.h (build_cloog_prog): Same.
186         * graphite-cloog-copat.h (build_cloog_prog): New.
187         (CloogState): New.
188         (cloog_state_malloc): New.
189         (cloog_state_free): New.
190         (cloog_loop_malloc): New.
191         (cloog_options_malloc): New.
192         (cloog_statement_alloc): New.
193         (cloog_domain_from_cloog_matrix): New.
194         (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
195         (new_Cloog_Domain_from_ppl_Polyhedron): New.
197 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
199         * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
200         type of NAME now depends on used CLooG version.
201         (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
202         (gcc_type_for_clast_expr): Same.
203         (print_clast_stmt): Replace pprint with clast_pprint.
204         * graphite-cloog-compat.h: Provide compatibility macros for
205         CLooG Legacy.
206         (clast_name_p): New.
207         (clast_expr_term): New.
208         (clast_expr_red): New.
209         (clast_expr_bin): New.
210         (clast_pprint): New.
212 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
214         * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
215         compatible to newer CLooG releases (CLOOG_ORG).
216         (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
217         (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
218         * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
219         (build_cloog_prog) : New.
220         (cloog_program_extract_scalars): New.
221         (cloog_program_scatter): New.
223 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
225         * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
226         conditionally (CLOOG_ORG).
227         * graphite-cloog-compat.h: New.  Include graphite-cloog-compat.h.
228         (cloog_statement_usr): New.
229         (cloog_domain): Same.
230         (cloog_set_domain): Same.
231         (cloog_next_domain): Same.
232         (cloog_set_next_domain): Same.
233         (cloog_program_nb_scattdims): Same.
234         (cloog_program_set_nb_scattdims): Same.
235         (cloog_program_names): Same.
236         (cloog_program_set_names): Same.
237         (cloog_program_set_context): Same.
238         (cloog_program_set_loop): Same.
239         (cloog_program_blocklist): Same.
240         (cloog_program_set_blocklist): Same.
241         (cloog_program_scaldims): Same.
242         (cloog_program_set_scaldims): Same.
243         (cloog_names_nb_parameters): Same.
244         (cloog_names_set_nb_parameters): Same.
245         (cloog_names_parameters): Same.
246         (cloog_names_set_parameters): Same.
247         (cloog_names_set_nb_iterators): Same.
248         (cloog_names_set_iterators): Same.
249         (cloog_names_set_nb_scattering): Same.
250         (cloog_names_set_scattering): Same.
251         (cloog_statement_set_usr): Same.
252         (cloog_loop_set_next): Same.
253         (cloog_loop_set_domain): Same.
254         (cloog_loop_set_block): Same.
255         (cloog_block_list_next): Same.
256         (cloog_block_list_set_next):
257         (cloog_block_list_set_block): Same.
259 2010-07-27  Sebastian Pop  <sebastian.pop@amd.com>
261         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
262         a bool.
263         (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
264         (rewrite_commutative_reductions_out_of_ssa_loop): Same.
265         (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
266         when something has been changed.
267         (rewrite_commutative_reductions_out_of_ssa): Same.
269         * gcc.dg/graphite/id-26.c: New.
271 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
273         * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
274         handle the case when def is in the sese region.
275         (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
276         for invariant expressions.
277         (rewrite_cross_bb_phi_deps): Removed.
278         (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
279         (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
280         rewrite_cross_bb_phi_deps.
282 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
284         * graphite-sese-to-poly.c
285         (rewrite_commutative_reductions_out_of_ssa_loop): Call
286         scev_analyzable_p only on is_gimple_reg
288         * gcc.dg/graphite/id-25.c: New.
290 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
292         * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
293         (rewrite_close_phi_out_of_ssa): Propagate constant values or
294         parametric expressions outside the scop region.
295         (rewrite_cross_bb_scalar_deps): Same.
296         * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
298         * gcc.dg/graphite/run-id-5.c: New.
299         * gcc.dg/graphite/run-id-6.c: New.
300         * gfortran.dg/graphite/id-21.f: New.
302 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
304         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
305         SSA_NAME_DEF_STMT only on SSA_NAMEs.
307         * gcc.dg/graphite/id-24.c: New.
309 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
311         * tree-scalar-evolution.c (instantiate_scev_name): Do not
312         instantiate default definitions.
314 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
316         * graphite-scop-detection.c (is_valid_stmt_p): New.
317         (is_valid_bb_p): New.
319 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
320             Sebastian Pop  <sebastian.pop@amd.com>
322         * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
323         (loop_exits_from_bb_p): New.
324         * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
325         (loop_exits_from_bb_p): Declared.
326         * graphite-scop-detection.c (scopdet_basic_block_info): Call
327         loop_exits_to_bb_p.
329 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
331         * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
332         tree-data-ref.h.
333         (dot_regions_1): New.
334         (dot_regions): New.
335         * refined-regions.h (dot_regions): Declared.
336         * Makefile.in (refined-regions.o): Update dependences.
338 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
340         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
341         extra parameter for the region.  Call scev_analyzable_p.
342         (rewrite_reductions_out_of_ssa): Update call to
343         rewrite_close_phi_out_of_ssa.
344         (rewrite_cross_bb_phi_deps): Same.
345         (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
346         parameter for the region.  Call scev_analyzable_p.
347         (rewrite_commutative_reductions_out_of_ssa): Update call to
348         rewrite_commutative_reductions_out_of_ssa_loop.
350 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
352         * gcc.dg/tree-ssa/pr20742.c: New.
354 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
356         * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
358         * gcc.dg/graphite/id-23.c: New.
360 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
362         * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
363         SSA scalar phi nodes that can be scev_analyzable_p.
365         * gfortran.dg/graphite/id-20.f: Adjust testcase.
367 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
369         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
370         handle SSA_NAME_IS_DEFAULT_DEF.
372 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
374         * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
376         * gcc.dg/graphite/pr42729.c: New.
378 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
380         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
381         case non close-phi nodes with one argument.
383 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
385         * sese.h (scev_analyzable_p): Scevs could be expressions without
386         chrecs and still be scev_analyzable_p.
388 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
390         * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
392 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
394         * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
395         * cfgloop.h (struct loop): Remove single_iv field.
396         * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
397         (scop_canonicalize_loops): Removed.
398         (scop_ivs_can_be_represented): Do not use loop->single_iv.  Iterate
399         over all the loop phi nodes in loop->header.
400         (build_poly_scop): Remove use of scop_canonicalize_loops.
402 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
404         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
405         handle GIMPLE_CALL.
407 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
409         * tree-chrec.c (chrec_apply): Should only apply to the specified
410         variable.  Also handle multivariate chains of recurrences that
411         satisfy evolution_function_is_affine_p.  Also handle CASE_CONVERT.
413 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
415         * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
416         (debug_clast_name_indexes_1): Removed.
417         (debug_clast_name_indexes): Removed.
418         (pbb_to_depth_to_oldiv): Removed.
419         (build_iv_mapping): Replace the use of rename_map with iv_map.
420         (translate_clast_user): Remove uses of rename_map.  Allocate and
421         free iv_map.
422         (translate_clast_for_loop): Remove uses of rename_map.
423         (translate_clast_for): Same.
424         (translate_clast_guard): Same.
425         (translate_clast): Same.
426         (gloog): Same.
427         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
428         * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
429         * sese.c (set_rename): Now static.
430         (rename_variables_in_stmt): Removed.
431         (rename_uses): New.
432         (is_parameter): Removed.
433         (is_iv): Removed.
434         (expand_scalar_variables_call): Removed.
435         (expand_scalar_variables_ssa_name): Removed.
436         (expand_scalar_variables_expr): Removed.
437         (expand_scalar_variables_stmt): Removed.
438         (expand_scalar_variables): Removed.
439         (rename_variables): Removed.
440         (remove_condition): Removed.
441         (get_true_edge_from_guard_bb): Removed.
442         (get_false_edge_from_guard_bb): Removed.
443         (struct igp): Removed.
444         (default_before_guard): Removed.
445         (convert_for_phi_arg): Removed.
446         (add_guard_exit_phis): Removed.
447         (insert_guard_phis): Removed.
448         (graphite_copy_stmts_from_block): Now also uses iv_map and a
449         region.  Do not copy conditions.  Do not copy induction variables.
450         Call rename_uses.
451         (copy_bb_and_scalar_dependences): Allocate a local rename_map for
452         the translated statement.  Use the iv_map for the induction
453         variable renaming.
454         * sese.h (copy_bb_and_scalar_dependences): Update declaration.
455         (set_rename): Removed declaration.
456         (scev_analyzable_p): ...here.
457         * tree-chrec.c (chrec_apply_map): New.
458         * tree-chrec.h (chrec_apply_map): Declared.
460 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
462         * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
463         insert_loop_close_phis.
464         * sese.c (name_defined_in_loop_p): Removed.
465         (expr_defined_in_loop_p): Removed.
466         (alive_after_loop): Removed.
467         (close_phi_not_yet_inserted_p): Removed.
468         (struct alep): Removed.
469         (add_loop_exit_phis): Removed.
470         (insert_loop_close_phis): Removed.
472 2010-07-15  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
474         * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
475         condition.
476         * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
478 2010-07-07  Sebastian Pop  <sebastian.pop@amd.com>
480         * gfortran.dg/graphite/id-20.f: New.
482 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
484         * graphite-cloog-util.h: Added cloog.h.
485         * graphite-blocking.c: Removed cloog.h.
486         * graphite-dependences.c: Same.
487         * graphite-interchange.c: Same.
488         * graphite-poly.c: Same.
489         * graphite-ppl.c: Same.
490         * graphite-scop-detection.c: Same.
491         * graphite-sese-to-poly.c:
492         Removed cloog.h.
493         Removed graphite-clast-to-gimple.h.
494         (check_poly_representation): Removed (unused).
495         * graphite-sese-to-poly.h
496         (check_poly_representation): Removed (unused).
498 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
500         * Makefile.in
501         (OBJS-common): Added graphite-cloog-util.o.
502         (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
503         (graphite-cloog-util.o): New.
504         (graphite-ppl.o): Added graphite-cloog-util.h.
505         * graphite-clast-to-gimple.c:
506         Added graphite-cloog-util.h to include statements.
507         * graphite-cloog-util.c: New.
508         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
509         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
510         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
511         (new_C_Polyhedron_from_Cloog_Matrix): Same.
512         (ppl_Constrain_System_number_of_constraints): Same.
513         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
514         (oppose_constraint): Same.
515         (cloog_matrix_to_ppl_constraint): Same.
516         (new_Constraint_System_from_Cloog_Matrix): Same.
517         (insert_constraint_into_matrix): Same. Declared static.
518         * graphite-cloog-util.h: New.
519         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
520         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
521         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
522         (new_C_Polyhedron_from_Cloog_Matrix): Same.
523         (insert_constraint_into_matrix): Same.
524         * graphite-ppl.c:
525         Added graphite-cloog-util.h to include statements.
526         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
527         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
528         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
529         (new_C_Polyhedron_from_Cloog_Matrix): Same.
530         (insert_constraint_into_matrix): Same.
531         (ppl_Constrain_System_number_of_constraints): Same.
532         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
533         (oppose_constraint): Same.
534         (cloog_matrix_to_ppl_constraint): Same.
535         (new_Constraint_System_from_Cloog_Matrix): Same.
536         * graphite-ppl.h:
537         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
538         graphite-cloog-util.h.
539         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
540         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
541         (new_C_Polyhedron_from_Cloog_Matrix): Same.
542         (insert_constraint_into_matrix): Removed.
544 2010-07-04  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
546         * graphite-clast-to-gimple.c
547         (precision_for_value): Resolve value_* calls to matching mpz_* calls.
548         (precision_for_interval): Same.
549         (gcc_type_for_interval): Same.
550         (compute_type_for_level): Same.
551         * graphite-interchange.c
552         (lst_interchange_profitable_p): Same.
553         * graphite-poly.c
554         (psct_scattering_dim_for_loop_depth): Same.
555         * graphite-ppl.c
556         (ppl_max_for_le_pointset): Same.
557         (ppl_min_for_le_pointset): Same.
559 2010-06-25  Vladimir Kargov  <kargov@gmail.com>
561         * refined-regions.c (bb_index_compare): New.
562         (get_bbs_in_region): New.
563         (print_bbs_in_region): New.
564         (print_refined_region): Add an argument that allows to print
565         all basic blocks contained in regions.
566         (debug_refined_region): Update call to print_refined_region.
567         * refined-regions.h (print_refined_region): Update declaration.
568         (get_bbs_in_region): Declared.
569         * graphite-scop-detection.c (build_scops_new): Print the refined
570         region tree into the Grahite dump file.
572 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
574         * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
575         (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
577 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
579         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
580         rewrite_close_phi_out_of_ssa.
582         * gcc.dg/graphite/id-22.c: New.
584 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
586         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
588 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
590         * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
591         rename_map.
592         * sese.c (debug_rename_map): Same.
593         (get_rename): Same.
594         (set_rename): Same.
595         (rename_variables_in_stmt): Same.
596         (expand_scalar_variables_call): Same.
597         (expand_scalar_variables_ssa_name): Same.
598         (expand_scalar_variables_expr): Same.
599         (expand_scalar_variables_stmt): Same.
600         (expand_scalar_variables): Same.
601         (rename_variables): Same.
602         (graphite_copy_stmts_from_block): Same.
603         (copy_bb_and_scalar_dependences): Same.
605 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
607         * graphite-clast-to-gimple.c (copy_renames): Removed.
608         (translate_clast_for): Do not call copy_renames.
609         (translate_clast_guard): Same.
611 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
613         * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
614         (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
615         (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
616         before rewrite_cross_bb_scalar_deps.
618 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
620         * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
621         Early return in when flag_associative_math is not set.
623 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
625         * gcc.dg/graphite/run-id-2.c: Call abort.
627 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
629         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
630         of SSA copies on edges except for loop->latch.
632 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
634         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
635         Split out of rewrite_reductions_out_of_ssa.
636         * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
637         Declared.
638         * graphite.c (graphite_transform_loops): Call it.
640 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
642         * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
644 2010-06-15  Sebastian Pop  <sebastian.pop@amd.com>
646         * passes.c (init_optimization_passes): Add pass_graphite.
647         Schedule a pass_copy_prop before pass_graphite_transforms.
648         * timevar.def (TV_GRAPHITE): Declared.
649         * tree-pass.h (pass_graphite): Declared.
650         * tree-ssa-loop.c (pass_graphite): New.
652         * gcc.dg/graphite/id-20.c: New.
654 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
656         * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
657         Remove calls to rename_nb_iterations and rename_sese_parameters.
658         * graphite-clast-to-gimple.h (gloog): Update declaration.
659         * graphite.c (graphite_transform_loops): Update call to gloog.
660         * sese.c (rename_variables_in_expr): Removed.
661         (rename_nb_iterations): Removed.
662         (rename_sese_parameters): Removed.
663         * sese.h (rename_nb_iterations): Removed.
664         (rename_sese_parameters): Removed.
666 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
668         * graphite-clast-to-gimple.c (gloog): Remove call to
669         sese_adjust_liveout_phis.
670         * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
671         SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
672         (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
673         rewrite_phi_out_of_ssa.
674         * sese.c (get_vdef_before_sese): Removed.
675         (sese_adjust_vphi): Removed.
676         (sese_adjust_liveout_phis): Removed.
677         * sese.h (sese_adjust_liveout_phis): Removed.
679 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
681         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
682         argument for the place after which to insert the out of SSA copy.
683         (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
684         (rewrite_phi_out_of_ssa): Same.
685         (rewrite_cross_bb_scalar_deps): Same.
686         (insert_copyout): Removed.
687         (insert_copyin): Removed.
688         (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
689         insert_out_of_ssa_copy_on_edge instead of insert_copyout and
690         insert_copyin.
692 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
694         * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
695         (rewrite_reductions_out_of_ssa): Same.
696         (rewrite_commutative_reductions_out_of_ssa): Same.
697         (build_poly_scop): Do not call these functions.
698         * graphite-sese-to-poly.h (build_poly_scop): Declared.
699         (rewrite_reductions_out_of_ssa): Declared.
700         (rewrite_commutative_reductions_out_of_ssa): Declared.
701         * graphite.c (graphite_transform_loops): Call on every scop
702         rewrite_commutative_reductions_out_of_ssa before calling
703         rewrite_reductions_out_of_ssa and build_scop_bbs.
705 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
707         * graphite-dependences.c (dot_deps): Make system call to dotty run
708         in background.
709         (dot_deps_stmt): Same.
710         * graphite-poly.c (dot_lst): Same.
712 2010-06-11  Sebastian Pop  <sebastian.pop@amd.com>
714         * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
715         old_type in parameter.
716         (gcc_type_for_value): Update call to gcc_type_for_interval.
717         (compute_type_for_level_1): Renamed compute_type_for_level.
718         Update call to gcc_type_for_interval.
720 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
722         * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
723         the scev analysis when the variable is not used outside the loop
724         in a close phi node: call compute_overall_effect_of_inner_loop.
726 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
728         * graphite-sese-to-poly.c (single_pred_cond): Renamed
729         single_pred_cond_non_loop_exit.  Return NULL for loop exit edges.
730         (build_sese_conditions_before): Renamed call to single_pred_cond.
731         (build_sese_conditions_after): Same.
733 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
735         * graphite-poly.h: Fix comments and indentation.
736         * graphite-sese-to-poly.c: Same.
737         (build_sese_conditions_before): Compute stmt and gbb only when needed.
738         * tree-chrec.c: Fix comments and indentation.
739         (tree-ssa-loop-niter.c): Same.
741 2010-06-08  Tobias Grosser  <grosser@fim.uni-passau.de>
743         * refined-regions.c (create_region): Only initialize the region.
744         (find_regions_with_entry): Initialize parent relation and bbmap
745         correctly.
746         (build_regions_tree): Set outermost_region to region instead of
747         topmost_region.
748         (calculate_region_tree): Remove unneeded parameters.
750 2010-06-02  Tobias Grosser  <grosser@fim.uni-passau.de>
752         * graphite-scop-detection.c (is_scop_p): New.
753         (build_scops_new): New. A skeleton for the new scop detection.
754         (build_scops_old): Renamed from build_scops.
755         (build_scops): New version. Call the new and the old scop
756         detection.
758 2010-05-27  Tobias Grosser  <grosser@fim.uni-passau.de>
759             Antoniu Pop  <antoniu.pop@gmail.com>
761         * Makefile.in (OBJS-common): Add refined-regions.o.
762         (refined-regions.o): New.
763         (graphite-scop-detection.o): Use refined-regions.h.
764         * graphite-scop-detection.c: Include refined-regions.h
765         (build_scops): Also build the refined region tree.
766         * refined-regions.c: New. Adds an algorithm to detect refined
767         regions.
768         (print_refined_region): New.
769         (debug_refined_region): New.
770         (refined_region_contains_bb_p): New.
771         (refined_region_contains_region_p): New.
772         (is_common_df): New.
773         (struct find_regions_global_data): New.
774         (is_region): New.
775         (typedef struct bb_bb_def): New.
776         (new_bb_bb_def): New.
777         (bb_bb_map_hash): New.
778         (eq_bb_bb_map): New.
779         (find_new_bb): New.
780         (bb_reg_def): New.
781         (new_bb_reg_def): New.
782         (bb_reg_map_hash): New.
783         (eq_bb_reg_map): New.
784         (find_new_region): New.
785         (insert_new_reg): New.
786         (insert_new_bb): New.
787         (insert_shortcut): New.
788         (get_next_postdom): New.
789         (create_region): New.
790         (find_regions_with_entry): New.
791         (find_regions_adc): New.
792         (find_regions): New.
793         (get_topmost_parent): New.
794         (build_regions_tree): New.
795         (calculate_region_tree): New.
796         (free_region_tree): New.
797         * refined-regions.h: New.
798         (struct refined_region): New.
799         (calculate_region_tree): New.
800         (free_region_tree): New.
801         (refined_region_contains_bb_p): New.
802         (refined_region_contains_region_p): New.
803         (print_refined_region): New.
804         (debug_refined_region): New.
806 2010-05-26  Sebastian Pop  <sebastian.pop@amd.com>
808         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
809         size_one_node.
811 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
813         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
814         type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
816 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
818         * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
819         phi_arg_in_outermost_loop.
820         (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
821         (remove_invariant_phi): Same.
823 2010-04-12  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
825         * graphite-blocking.c
826         (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
827         * graphite-clast-to-gimple.c
828         (clast_to_gcc_expression): Same.
829         (precision_for_value): Same.
830         (precision_for_interval): Same.
831         (gcc_type_for_interval): Same.
832         (graphite_create_new_guard): Same.
833         (compute_bounds_for_level): Same.
834         (graphite_create_new_loop_guard): Same.
835         * graphite-interchange.c
836         (build_linearized_memory_access): Same.
837         (pdr_stride_in_loop): Same.
838         (memory_strides_in_loop_1): Same.
839         (memory_strides_in_loop): Same.
840         (extend_scattering): Same.
841         (psct_scattering_dim_for_loop_depth): Same.
842         (pbb_number_of_iterations): Same.
843         * graphite-poly.h
844         (debug_iteration_domains): Same.
845         * graphite-ppl.c
846         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
847         (ppl_set_inhomogeneous_gmp): Same.
848         (ppl_strip_loop): Same.
849         (ppl_lexico_compare_linear_expressions): Same.
850         (ppl_read_polyhedron_matrix): Same.
851         (ppl_max_for_le_pointset): Same.
852         * graphite-ppl.h
853         (ppl_read_polyhedron_matrix): Same.
854         (tree_int_to_gmp): Same.
855         (gmp_cst_to_tree): Same.
856         (ppl_set_inhomogeneous): Same.
857         (ppl_set_inhomogeneous_tree): Same.
858         (ppl_set_coef): Same.
859         (ppl_set_coef_tree): Same.
860         * graphite-sese-to-poly.c
861         (build_pbb_scattering_polyhedrons): Same.
862         (build_scop_scattering): Same.
863         (scan_tree_for_params_right_scev): Same.
864         (scan_tree_for_params): Same.
865         (find_params_in_bb): Same.
866         (find_scop_parameters): Same.
867         (add_upper_bounds_from_estimated_nit): Same.
868         (build_loop_iteration_domains): Same.
869         (add_condition_to_domain): Same.
870         (pdr_add_memory_accesses): Same.
872 2010-04-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
874         * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
875         CLooG's value_* macros to their respective mpz_* counterparts.
876         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
877         (graphite_create_new_loop_guard): Same.
878         * graphite-interchange.c (build_linearized_memory_access): Same.
879         (pdr_stride_in_loop): Same.
880         (memory_strides_in_loop_1): Same.
881         (1st_interchange_profitable_p): Same.
882         * graphite-poly.c (extend_scattering): Same.
883         (psct_scattering_dim_for_loop_depth): Same.
884         (pbb_number_of_iterations): Same.
885         (pbb_number_of_iterations_at_time): Same.
886         * graphite-poly.h (new_1st_loop): Same.
887         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
888         (oppose_constraint): Same.
889         (insert_constraint_into_matrix): Same.
890         (ppl_set_inhomogeneous_gmp): Same.
891         (ppl_set_coef_gmp): Same.
892         (ppl_strip_loop): Same.
893         (ppl_lexico_compare_linear_expressions): Same.
894         (ppl_max_for_le_pointset): Same.
895         (ppl_min_for_le_pointset): Same.
896         (ppl_build_realtion): Same.
897         * graphite-ppl.h (gmp_cst_to_tree): Same.
898         (ppl_set_inhomogeneous): Same.
899         (ppl_set_inhomogeneous_tree): Same.
900         (ppl_set_coef): Same.
901         (ppl_set_coef_tree): Same.
902         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
903         (build_scop_scattering): Same.
904         (add_value_to_dim): Same.
905         (scan_tree_for_params_right_scev): Same.
906         (scan_tree_for_params_int): Same.
907         (scan_tree_for_params): Same.
908         (find_params_in_bb): Same.
909         (find_scop_parameters): Same.
910         (add_upper_bounds_from_estimated_nit): Same.
911         (build_loop_iteration_domains): Same.
912         (create_linear_expr_from_tree): Same.
913         (add_condition_to_domain): Same.
914         (pdr_add_memory_accesses): Same.
916 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
918         PR middle-end/43519
919         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
920         lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
921         When converting an unsigned type to signed, double its precision.
922         (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
923         (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
924         (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
926 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
928         PR middle-end/43519
929         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
930         build_nonstandard_integer_type.
931         (gcc_type_for_interval): Same.
933 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
935         PR middle-end/43519
936         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
937         POINTER_PLUS_EXPR for pointer types.
939         * gcc.dg/graphite/id-19.c: New.
941 2010-04-04  Sebastian Pop  <sebastian.pop@amd.com>
943         PR middle-end/43519
944         * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
945         * graphite-clast-to-gimple.c: Include langhooks.h.
946         (max_signed_precision_type): New.
947         (max_precision_type): Takes two types as arguments.
948         (precision_for_value): New.
949         (precision_for_interval): New.
950         (gcc_type_for_interval): New.
951         (gcc_type_for_value): New.
952         (gcc_type_for_clast_term): New.
953         (gcc_type_for_clast_red): New.
954         (gcc_type_for_clast_bin): New.
955         (gcc_type_for_clast_expr): Split up into several functions.
956         (gcc_type_for_clast_eq): Rewritten.
957         (compute_bounds_for_level): New.
958         (compute_type_for_level_1): New.
959         (compute_type_for_level): New.
960         (gcc_type_for_cloog_iv): Removed.
961         (gcc_type_for_iv_of_clast_loop): Rewritten.
962         (graphite_create_new_loop): Compute the lower and upper bound types
963         with gcc_type_for_clast_expr.
964         (graphite_create_new_loop_guard): Same.
965         (find_cloog_iv_in_expr): Removed.
966         (compute_cloog_iv_types_1): Removed.
967         (compute_cloog_iv_types): Removed.
968         (gloog): Do not call compute_cloog_iv_types.
969         * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
970         GBB_CLOOG_IV_TYPES.
971         (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
972         * sese.h (struct gimple_bb): Removed field cloog_iv_types.
973         (GBB_CLOOG_IV_TYPES): Removed.
975         * gcc.dg/graphite/run-id-pr42644.c: Call abort.
977 2010-04-02  Sebastian Pop  <sebastian.pop@amd.com>
979         Reverted this commit: as at this point the loop closed SSA form
980         is under a canonical form respecting the single argument condition.
981         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
982         close phi nodes may have more than one argument.
984 2010-04-01  Sebastian Pop  <sebastian.pop@amd.com>
986         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
987         gimple_phi_num_args of the loop close SSA phi node is equal to 1.
988         (detect_commutative_reduction): Same.
990 2010-03-31  Sebastian Pop  <sebastian.pop@amd.com>
992         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
993         close phi nodes may have more than one argument.
995 2010-03-30  Richard Guenther  <rguenther@suse.de>
996             Zdenek Dvorak  <ook@ucw.cz>
997             Sebastian Pop  <sebastian.pop@amd.com>
999         PR middle-end/43464
1000         * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1001         with multiple arguments.
1002         (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1004 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1006         * graphite-dependences.c (print_pddr): Call print_pdr with an
1007         extra argument.
1008         * graphite-poly.c (debug_pdr): Add an extra argument for the
1009         verbosity level.
1010         (print_pdr): Same.
1011         (print_pbb_domain): Same.
1012         (print_pbb): Same.
1013         (print_scop_context): Same.
1014         (print_scop): Same.
1015         (print_cloog): Same.
1016         (debug_pbb_domain): Same.
1017         (debug_pbb): Same.
1018         (print_pdrs): Same.
1019         (debug_pdrs): Same.
1020         (debug_scop_context): Same.
1021         (debug_scop): Same.
1022         (debug_cloog): Same.
1023         (print_scop_params): Same.
1024         (debug_scop_params): Same.
1025         (print_iteration_domain): Same.
1026         (print_iteration_domains): Same.
1027         (debug_iteration_domain): Same.
1028         (debug_iteration_domains): Same.
1029         (print_scattering_function): Same.
1030         (print_scattering_functions): Same.
1031         (debug_scattering_function): Same.
1032         (debug_scattering_functions): Same.
1033         * graphite-poly.h (debug_pdr): Update declaration.
1034         (print_pdr): Same.
1035         (print_pbb_domain): Same.
1036         (print_pbb): Same.
1037         (print_scop_context): Same.
1038         (print_scop): Same.
1039         (print_cloog): Same.
1040         (debug_pbb_domain): Same.
1041         (debug_pbb): Same.
1042         (print_pdrs): Same.
1043         (debug_pdrs): Same.
1044         (debug_scop_context): Same.
1045         (debug_scop): Same.
1046         (debug_cloog): Same.
1047         (print_scop_params): Same.
1048         (debug_scop_params): Same.
1049         (print_iteration_domain): Same.
1050         (print_iteration_domains): Same.
1051         (debug_iteration_domain): Same.
1052         (debug_iteration_domains): Same.
1053         (print_scattering_function): Same.
1054         (print_scattering_functions): Same.
1055         (debug_scattering_function): Same.
1056         (debug_scattering_functions): Same.
1058 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1060         * graphite-poly.c (print_scattering_function_1): New.
1061         (print_scattering_function): Call it.
1062         (print_scop_params): Remove spaces at the end of lines.
1063         (print_cloog): New.
1064         (debug_cloog): New.
1065         * graphite-poly.h (print_cloog): Declared.
1066         (debug_cloog): Declared.
1068 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1070         * tree-ssa-copy.c: Revert this previous change:
1071         (init_copy_prop): Loop closed phi nodes cancontain more than one
1072         argument.
1073         (execute_copy_prop): Revert the previous change: do not call
1074         rewrite_into_loop_closed_ssa.
1076 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1077             Richard Guenther  <rguenther@suse.de>
1079         PR middle-end/43464
1080         * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1081         contain more than one argument.
1082         (execute_copy_prop): Revert the previous change: do not call
1083         rewrite_into_loop_closed_ssa.
1085         * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1086         * gcc.dg/graphite/id-pr43464-1.c: New.
1088 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1090         PR middle-end/43464
1091         * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1092         and verify_loop_closed_ssa when copy prop is executed in the LNO.
1094         * gcc.dg/graphite/id-pr43464.c: New.
1096 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1098         * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1099         in loop->header.
1100         * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1101         * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1102         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1103         to switch between adding the IV bump in loop->latch or in loop->header.
1105 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1107         * passes.c (init_optimization_passes): Add pass_copy_prop
1108         after Graphite.
1110 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1112         * graphite-poly.c (print_scattering_function): Pretty print following
1113         the scoplib format.
1114         (print_pdr): Same.
1115         (print_pbb_domain): Same.
1116         (dump_gbb_cases): Same.
1117         (dump_gbb_conditions): Same.
1118         (print_pdrs): Same.
1119         (print_pbb): Same.
1120         (print_scop_params): Same.
1121         (print_scop_context): Same.
1122         (print_scop): Same.
1123         (print_pbb_body): New.
1124         (lst_indent_to): New.
1125         (print_lst): Start new lines with a #.
1126         * graphite-poly.h (pbb_bb): New.
1127         (pbb_index): Use pbb_bb.
1128         * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1129         disjuncts.
1130         * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1132 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1134         PR middle-end/43351
1135         * gcc.dg/graphite/id-pr43351.c
1137 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1139         PR middle-end/43354
1140         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1141         call insert_out_of_ssa_copy for default definitions.
1142         * gfortran.dg/graphite/id-pr43354.f: New.
1144 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1146         PR middle-end/43349
1147         * gfortran.dg/graphite/pr43349.f: New.
1149 2010-03-11  Sebastian Pop  <sebastian.pop@amd.com>
1151         * graphite-clast-to-gimple.c (my_long_long): Defined.
1152         (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1153         * graphite-sese-to-poly.c (my_long_long): Defined.
1154         (scop_ivs_can_be_represented): Use it.
1156 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1158         * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1159         graphite-max-bbs-per-function, and loop-block-tile-size.
1160         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1161         with "maximum".
1162         (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1164 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1166         * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1167         forward declaration.
1168         * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1169         (add_upper_bounds_from_estimated_nit): New.
1170         (build_loop_iteration_domains): Use it.
1172 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1174         * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1176 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1178         PR middle-end/43306
1179         * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1180         should be an INTEGER_CST.  Also handle CASE_CONVERT.
1181         * gcc.dg/graphite/pr43306.c: New.
1183 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1185         * graphite.c (graphite_initialize): To bound the number of bbs per
1186         function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1187         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1188         * doc/invoke.texi: Document it.
1190 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1192         * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1193         * graphite-sese-to-poly.h (build_poly_scop): Same.
1195 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1197         * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1198         the number of parameters in the scop.  Use as an upper bound
1199         PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1200         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1201         * doc/invoke.texi: Document it.
1203 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1205         * graphite-sese-to-poly.c (add_param_constraints): Use
1206         lower_bound_in_type and upper_bound_in_type.
1208 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1210         * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1211         instead of unsigned_type_node.
1213 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1214             Reza Yazdani  <reza.yazdani@amd.com>
1216         PR middle-end/43065
1217         * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1218         on pointer type parameters.
1220         * gcc.dg/graphite/run-id-4.c: New.
1222 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1224         PR middle-end/43065
1225         * gcc.dg/graphite/run-id-3.c: New.
1227 2010-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
1228             Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1230         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1231         handle conversions from pointer to integers.
1232         (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1233         induction variable, to be able to work with code generated by CLooG.
1234         * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1235         (build_poly_scop): Bail out if we cannot codegen a loop.
1237 2010-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
1239         * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1240         code generation with gloog_error.
1242 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1244         * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1245         Call fold_convert on all the returned values.
1246         (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1247         the type of the resulting expression.
1249 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1251         * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1252         ppl_min_for_le_pointset.  Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1253         * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1255 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1257         * graphite-dependences.c (map_into_dep_poly): Removed.
1258         (dependence_polyhedron_1): Use combine_context_id_scat.
1260 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1262         * graphite-poly.h (struct poly_scattering): Add layout documentation.
1263         (struct poly_bb): Same.
1264         (combine_context_id_scat): New.
1266 2010-03-02  Sebastian Pop  <sebastian.pop@amd.com>
1268         PR middle-end/42326
1269         * sese.c (name_defined_in_loop_p): Return false for default
1270         definitions.
1272         * gcc.dg/graphite/pr42326.c: New.
1274 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
1276         * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1277         and clean up the logic.
1279 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
1281         * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1282         early return.
1284 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1286         PR middle-end/43083
1287         * graphite-scop-detection.c (create_single_exit_edge): Move
1288         the call to find_single_exit_edge to....
1289         (create_sese_edges): ...here.  Don't handle multiple edges
1290         exiting the function.
1291         (build_graphite_scops): Don't handle multiple edges
1292         exiting the function.
1294         * gcc.dg/graphite/pr43083.c: New.
1296 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1298         PR middle-end/43097
1299         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1300         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1302         * gfortran.dg/graphite/pr43097.f: New.
1304 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1306         PR middle-end/43083
1307         * graphite-scop-detection.c (create_single_exit_edge): Move
1308         the call to find_single_exit_edge to....
1309         (create_sese_edges): ...here.  Don't handle multiple edges
1310         exiting the function.
1311         (build_graphite_scops): Don't handle multiple edges
1312         exiting the function.
1314         * gcc.dg/graphite/pr43083.c: New.
1316 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1318         PR middle-end/43097
1319         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1320         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1322         * gfortran.dg/graphite/pr43097.f: New.
1324 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1325             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1327         PR middle-end/43140
1328         * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1330 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1332         PR middle-end/43026
1333         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1335         * g++.dg/graphite/pr43026.C: New.
1337 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1339         * Merge from mainline (154736:156693).
1341 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
1343         PR middle-end/43026
1344         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1346         * g++.dg/graphite/pr43026.C: New.
1348 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1350         * Merge from mainline (154736:156693).
1352 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
1354         PR middle-end/43012
1355         * gcc.dg/graphite/pr43012.c: New.
1357 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1359         * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1361 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1363         * g++.dg/graphite/pr42930.C: New.
1365 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1367        * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1369 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1371         * g++.dg/graphite/pr42930.C: New.
1373 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1375         PR middle-end/42930
1376         * graphite-scop-detection.c (graphite_can_represent_scev): Call
1377         graphite_can_represent_init for MULT_EXPR.
1379 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1381         PR middle-end/42914
1382         PR middle-end/42530
1383         * graphite-sese-to-poly.c (remove_phi): New.
1384         (translate_scalar_reduction_to_array): Call remove_phi.
1386         * gcc.dg/graphite/pr42530.c: New.
1387         * gcc.dg/graphite/pr42914.c: New.
1389 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1391         PR middle-end/42930
1392         * graphite-scop-detection.c (graphite_can_represent_scev): Call
1393         graphite_can_represent_init for MULT_EXPR.
1395 2010-02-10  Sebastian Pop  <seb@napoca>
1397         PR middle-end/42914
1398         PR middle-end/42530
1399         * graphite-sese-to-poly.c (remove_phi): New.
1400         (translate_scalar_reduction_to_array): Call remove_phi.
1402         * gcc.dg/graphite/pr42530.c: New.
1403         * gcc.dg/graphite/pr42914.c: New.
1405 2010-02-10  Sebastian Pop  <seb@napoca>
1407         PR middle-end/42771
1408         * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1409         * graphite-clast-to-gimple.h (gloog): Update declaration.
1410         * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1411         * graphite-poly.h (struct poly_bb): Add missing comments.
1412         (struct scop): Add poly_scop_p field.
1413         (POLY_SCOP_P): New.
1414         * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1415         * graphite.c (graphite_transform_loops): Build the polyhedral
1416         representation for each scop before code generation.
1417         * sese.c (rename_variables_in_operand): Removed.
1418         (rename_variables_in_expr): Return the renamed expression.
1419         (rename_sese_parameters): New.
1420         * sese.h (rename_sese_parameters): Declared.
1422         * gcc.dg/graphite/pr42771.c: New.
1424 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1426         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
1427         return 0 from main.
1428         * gcc.dg/graphite/block-1.c: Same.
1429         * gcc.dg/graphite/block-3.c: Same.
1430         * gcc.dg/graphite/block-4.c: Same.
1431         * gcc.dg/graphite/block-5.c: Same.
1432         * gcc.dg/graphite/block-6.c: Same.
1433         * gcc.dg/graphite/block-7.c: Same.
1434         * gcc.dg/graphite/interchange-0.c: Same.
1435         * gcc.dg/graphite/interchange-1.c: Same.
1436         * gcc.dg/graphite/interchange-10.c: Same.
1437         * gcc.dg/graphite/interchange-11.c: Same.
1438         * gcc.dg/graphite/interchange-12.c: Same.
1439         * gcc.dg/graphite/interchange-2.c: Same.
1440         * gcc.dg/graphite/interchange-3.c: Same.
1441         * gcc.dg/graphite/interchange-4.c: Same.
1442         * gcc.dg/graphite/interchange-5.c: Same.
1443         * gcc.dg/graphite/interchange-6.c: Same.
1444         * gcc.dg/graphite/interchange-7.c: Same.
1445         * gcc.dg/graphite/interchange-8.c: Same.
1446         * gcc.dg/graphite/interchange-9.c: Same.
1447         * gcc.dg/graphite/interchange-mvt.c: Same.
1449 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1451         * gfortran.dg/graphite/id-19.f: New.
1452         * gfortran.dg/graphite/pr14741.f90: New.
1453         * gfortran.dg/graphite/pr41924.f90: New.
1454         * gfortran.dg/graphite/run-id-2.f90: New.
1456 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1458         PR middle-end/42988
1459         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1460         to unknown_dependence.
1461         (graphite_legal_transform_dr): Handle the unknown_dependence.
1462         (graphite_carried_dependence_level_k): Same.
1464 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1466         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
1467         return 0 from main.
1468         * gcc.dg/graphite/block-1.c: Same.
1469         * gcc.dg/graphite/block-3.c: Same.
1470         * gcc.dg/graphite/block-4.c: Same.
1471         * gcc.dg/graphite/block-5.c: Same.
1472         * gcc.dg/graphite/block-6.c: Same.
1473         * gcc.dg/graphite/block-7.c: Same.
1474         * gcc.dg/graphite/interchange-0.c: Same.
1475         * gcc.dg/graphite/interchange-1.c: Same.
1476         * gcc.dg/graphite/interchange-10.c: Same.
1477         * gcc.dg/graphite/interchange-11.c: Same.
1478         * gcc.dg/graphite/interchange-12.c: Same.
1479         * gcc.dg/graphite/interchange-2.c: Same.
1480         * gcc.dg/graphite/interchange-3.c: Same.
1481         * gcc.dg/graphite/interchange-4.c: Same.
1482         * gcc.dg/graphite/interchange-5.c: Same.
1483         * gcc.dg/graphite/interchange-6.c: Same.
1484         * gcc.dg/graphite/interchange-7.c: Same.
1485         * gcc.dg/graphite/interchange-8.c: Same.
1486         * gcc.dg/graphite/interchange-9.c: Same.
1487         * gcc.dg/graphite/interchange-mvt.c: Same.
1489 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1491         * gfortran.dg/graphite/id-19.f: New.
1492         * gfortran.dg/graphite/pr14741.f90: New.
1493         * gfortran.dg/graphite/pr41924.f90: New.
1494         * gfortran.dg/graphite/run-id-2.f90: New.
1496 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1498         PR middle-end/42988
1499         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1500         to unknown_dependence.
1501         (graphite_legal_transform_dr): Handle the unknown_dependence.
1502         (graphite_carried_dependence_level_k): Same.
1504 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1506         * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1508 2010-02-05  Sebastian Pop  <sebastian.pop@amd.com>
1509             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
1511         PR middle-end/42637
1512         * graphite-dependences.c (build_lexicographical_constraint): Return
1513         a union of dependence polyhedra.
1514         (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1516         * gcc.dg/graphite/block-0.c: Enable runtime check.  XFAILed.
1517         * gcc.dg/graphite/block-4.c: Same.
1518         * gcc.dg/graphite/block-7.c: Same.
1519         * gcc.dg/graphite/interchange-12.c: Same.
1520         * gcc.dg/graphite/interchange-mvt.c: Same.
1521         * gfortran.dg/graphite/interchange-1.f: XFAILed.
1522         * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1523         * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1525 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1527         * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1528         the execution check to FAIL.  This testcase is miscompiled by Graphite
1529         and the check should be re-enabled.
1530         * gcc.dg/graphite/interchange-mvt.c: Same.
1531         * gcc.dg/graphite/block-0.c: Same.
1532         * gcc.dg/graphite/block-4.c: Same.
1533         * gcc.dg/graphite/block-7.c: Same.
1535 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1537         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1538         * gcc.dg/graphite/scop-0.c: Fix spaces.
1539         * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1540         * gfortran.dg/graphite/block-2.f: Same.
1541         * gfortran.dg/graphite/block-3.f90: Same.
1542         * gfortran.dg/graphite/block-4.f90: Same.
1543         * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1544         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1546 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1548         * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1549         PDDR_ORIGINAL_SCATTERING_P.
1550         (pddr_is_empty): Rewritten.
1551         (print_dependence_polyhedron_layout): New.
1552         (print_pddr): New.
1553         (debug_pddr): New.
1554         (build_alias_set_powerset): Moved up.
1555         (poly_drs_may_alias_p): Moved up.
1556         (lexicographically_gt_p): Removed.
1557         (build_lexicographically_gt_constraint): Renamed
1558         build_lexicographical_constraint, reimplemented.
1559         (dependence_polyhedron_1): Simplified parameters.
1560         (dependence_polyhedron): Same.  Keep along empty PDDRs
1561         to make efficient use of the cache.
1562         (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1563         (graphite_legal_transform_dr): Rewritten.
1564         (graphite_legal_transform_bb): Pass fewer arguments to
1565         graphite_legal_transform_dr.
1566         (graphite_carried_dependence_level_k): Simplified implementation.
1567         (dot_original_deps_stmt_1): Call dependence_polyhedron.
1568         (dot_transformed_deps_stmt_1): Same.
1569         (dot_original_deps): Same.
1570         (dot_transformed_deps): Same.
1571         * graphite-dependences.h (struct poly_ddr): Added a new field
1572         original_scattering_p.
1573         (PDDR_ORIGINAL_SCATTERING_P): New.
1574         (print_pddr): Declared.
1575         (debug_pddr): Declared.
1576         * graphite-ppl.c: Clarify comment.
1577         * sese.h (print_gimple_bb): Removed unused declaration.
1578         (debug_gbb): Same.
1580 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1582         * g++.dg/graphite/graphite.exp: Rewritten.
1583         * gcc.dg/graphite/graphite.exp: Rewritten.
1584         * gfortran.dg/graphite/graphite.exp: Rewritten.
1585         * gcc.dg/graphite/block-0.c: Added runtime test.
1586         * gcc.dg/graphite/block-1.c: Same.
1587         * gcc.dg/graphite/block-3.c: Same.
1588         * gcc.dg/graphite/block-4.c: Same.
1589         * gcc.dg/graphite/block-5.c: Same.
1590         * gcc.dg/graphite/block-6.c: Same.
1591         * gcc.dg/graphite/block-7.c: Same.
1592         * gcc.dg/graphite/interchange-0.c: Same.
1593         * gcc.dg/graphite/interchange-1.c: Same.
1594         * gcc.dg/graphite/interchange-10.c: Same.
1595         * gcc.dg/graphite/interchange-11.c: Same.
1596         * gcc.dg/graphite/interchange-12.c: Same.
1597         * gcc.dg/graphite/interchange-2.c: Same.
1598         * gcc.dg/graphite/interchange-3.c: Same.
1599         * gcc.dg/graphite/interchange-4.c: Same.
1600         * gcc.dg/graphite/interchange-5.c: Same.
1601         * gcc.dg/graphite/interchange-6.c: Same.
1602         * gcc.dg/graphite/interchange-7.c: Same.
1603         * gcc.dg/graphite/interchange-8.c: Same.
1604         * gcc.dg/graphite/interchange-9.c: Same.
1605         * gcc.dg/graphite/interchange-mvt.c: Same.
1606         * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1608 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1610         * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1611           background.
1613 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1615         * common.opt: Add -fgraphite-cloog-opts.
1616         * graphite-clast-to-gimple.c (set_cloog_options): Same.
1617         * opts.c (decode_options): Same.
1619 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1621         * gcc.dg/graphite/id-17.c: New.
1622         * gcc.dg/graphite/pr41888.c: New.
1623         * gcc.dg/graphite/scop-22.c: New.
1624         * gfortran.dg/graphite/pr40982.f90: New.
1626 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1628         * testsuite/gcc.dg/graphite/id-17.c: New.
1629         * testsuite/gcc.dg/graphite/pr41888.c: New.
1630         * testsuite/gcc.dg/graphite/scop-22.c: New.
1631         * testsuite/gfortran.dg/graphite/pr40982.f90: New.
1633 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1635         * graphite-dependences.c: Clarify comments.
1636         (build_pddr): Add an extra parameter direction.
1637         (graphite_legal_transform_dr): Use build_pddr.
1638         (dot_original_deps_stmt_1): Update use of build_pddr.
1639         (dot_transformed_deps_stmt_1): Same.
1640         (dot_original_deps): Same.
1641         (dot_transformed_deps): Same.
1643         * gcc.dg/graphite/interchange-12.c: New.
1644         * gcc.dg/graphite/block-7.c: New.
1646 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1648         * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1649         (pddr_transformed_scattering): Removed.
1650         (graphite_legal_transform_dr): Use build_pddr.
1651         (dot_original_deps_stmt_1): Same.
1652         (dot_transformed_deps_stmt_1): Same.
1653         (dot_original_deps): Same.
1654         (dot_transformed_deps): Same.
1656 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1658         * graphite-dependences.c (lexicographically_gt_p): Add comments.
1659         (build_lexicographically_gt_constraint): Same.
1660         (dependence_polyhedron_1): Same.
1661         (dependence_polyhedron): Same.
1663 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1665         * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1666         (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1667         (lexicographically_gt_p): Change type of direction to int.
1668         (build_lexicographically_gt_constraint): Same.
1669         (dependence_polyhedron_1): Same.
1670         (dependence_polyhedron): Same.
1671         (pddr_original_scattering): Use integers for direction.
1672         (pddr_transformed_scattering): Same.
1673         (graphite_legal_transform_dr): Same.
1674         (graphite_carried_dependence_level_k): Same.
1676 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1678         * graphite-dependences.c (build_pairwise_constraint): Renamed
1679         ppl_build_relation.  Moved...
1680         (dr_equality_constraints): Use ppl_build_relation.
1681         (build_pairwise_scheduling_equality): Same.
1682         (build_pairwise_scheduling_inequality): Same.
1683         * graphite-ppl.c (ppl_build_relation): ...here.
1684         * graphite-ppl.h (ppl_build_relation): Declared.
1686 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1688         PR middle-end/42681
1689         * graphite-clast-to-gimple.c (gloog_error): New static variable.
1690         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1691         Set gloog_error when such an expression failed to be built.
1692         (translate_clast): Early return when gloog_error is set.
1693         (gloog): Clear gloog_error.  When gloog_error is set, call
1694         set_ifsese_condition to enable the original code.  Return the status
1695         of the code generation based on gloog_error.
1696         * sese.c (set_ifsese_condition): New.
1697         * sese.h (set_ifsese_condition): Declared.
1699         * g++.dg/graphite/pr42681.C: New.
1701 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1703         PR middle-end/42681
1704         * graphite-clast-to-gimple.c (gloog_error): New static variable.
1705         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1706         Set gloog_error when such an expression failed to be built.
1707         (translate_clast): Early return when gloog_error is set.
1708         (gloog): Clear gloog_error.  When gloog_error is set, call
1709         set_ifsese_condition to enable the original code.  Return the status
1710         of the code generation based on gloog_error.
1711         * sese.c (set_ifsese_condition): New.
1712         * sese.h (set_ifsese_condition): Declared.
1714         * testsuite/g++.dg/graphite/pr42681.C: New.
1716 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1718         PR middle-end/42732
1719         * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1720         rename_nb_iterations.
1721         * sese.c (rename_variables_in_operand): New.
1722         (rename_variables_in_expr): New.
1723         (rename_nb_iterations): New.
1724         (sese_adjust_liveout_phis): Update the rename_map.
1725         * sese.h (rename_nb_iterations): Declared.
1726         * tree-scalar-evolution.c (scev_reset_htab): New.
1727         (scev_reset): Call scev_reset_htab.
1728         * tree-scalar-evolution.h (scev_reset_htab): Declared.
1730         * gfortran.dg/graphite/pr42732.f: New.
1732 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
1734         PR middle-end/42393
1735         * graphite-clast-to-gimple.c: Fix formatting.
1736         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1737         (expr_defined_in_loop_p): New.
1738         (add_loop_exit_phis): Also handle full expressions: remove from
1739         the rename_map the expressions defined in the loop that we're closing.
1741         * gfortran.dg/graphite/pr42393-1.f90: New.
1742         * gfortran.dg/graphite/pr42393.f90: Add new flags
1743         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1744         make this testcase useful in the Graphite branch.
1746 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
1748         PR middle-end/42393
1749         * graphite-clast-to-gimple.c: Fix formatting.
1750         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1751         (expr_defined_in_loop_p): New.
1752         (add_loop_exit_phis): Also handle full expressions: remove from
1753         the rename_map the expressions defined in the loop that we're closing.
1755         * testsuite/gfortran.dg/graphite/pr42393-1.f90: New.
1756         * testsuite/gfortran.dg/graphite/pr42393.f90: Add new flags
1757         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1758         make this testcase useful in the Graphite branch.
1760 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
1762         * graphite-scop-detection.c (exclude_component_ref): Removed.
1763         (is_simple_operand): Removed.
1764         (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1766 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1768         PR middle-end/42221
1769         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1770         the array indexing of ADDR_EXPRs.
1772         * gcc.dg/graphite/pr42221.c: New.
1774 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1776         PR middle-end/42221
1777         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1778         the array indexing of ADDR_EXPRs.
1780         * testsuite/gcc.dg/graphite/pr42221.c: New.
1782 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1784         PR middle-end/42521
1785         * graphite.c (graphite_finalize): Call scev_reset.
1786         (graphite_transform_loops): Do not call scev_reset between the code
1787         generation of scops.
1789         * gcc.dg/graphite/pr42521.c: New.
1791 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1793         * graphite-interchange.c (memory_stride_in_loop): Renamed
1794         pdr_stride_in_loop.
1795         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1796         (memory_strides_in_loop): Memoize the memory strides per loop.
1797         (lst_interchange_profitable_p): Do not initialize to zero the memory
1798         strides.
1799         * graphite-poly.h (struct lst): Add a field memory_strides.
1800         (LST_LOOP_MEMORY_STRIDES): New.
1801         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1802         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1804 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1806         * graphite-interchange.c (memory_stride_in_loop): Renamed
1807         pdr_stride_in_loop.
1808         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1809         (memory_strides_in_loop): Memoize the memory strides per loop.
1810         (lst_interchange_profitable_p): Do not initialize to zero the memory
1811         strides.
1812         * graphite-poly.h (struct lst): Add a field memory_strides.
1813         (LST_LOOP_MEMORY_STRIDES): New.
1814         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1815         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1817 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1819         * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1820         memory_strides_in_loop.  Gather memory strides on a whole loop.
1821         (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1822         (lst_interchange_profitable_p): Removed.
1823         (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1825 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1827         Revert patch 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1828         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1829         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1830         Remove context_loop and level.
1832 2010-01-07  Richard Guenther  <rguenther@suse.de>
1834         PR tree-optimization/42641
1835         * sese.c (rename_map_elt_info): Use the SSA name version, do
1836         not hash pointers.
1838 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
1840         * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1841         blocked" only when both the strip mine and the interchange have
1842         been applied.
1844         * gcc.dg/graphite/block-2.c: Removed.
1845         * gcc.dg/graphite/block-3.c: Add scan pattern.
1846         * gcc.dg/graphite/block-4.c: Same.
1847         * gcc.dg/graphite/block-5.c: Same.
1848         * gcc.dg/graphite/block-6.c: Same.
1850 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
1852         * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1853         before allocating a new one.
1854         (copy_renames): Check that slot is not NULL.
1855         (mark_bb_with_pbb): Same.
1856         (compute_cloog_iv_types_1): Same.
1857         * graphite-interchange.c (lst_perfect_nestify): Free the before,
1858         nest, and after LSTs.
1859         (lst_try_interchange_loops): Same.
1861 2010-01-05  Sebastian Pop  <sebastian.pop@amd.com>
1863         PR middle-end/42178
1864         * graphite-interchange.c (lst_try_interchange_loops): Do not return
1865         the before, nest, and after LSTs.
1866         (lst_try_interchange): Removed.
1867         (lst_interchange_select_inner): Do not iterate over the LSTs if they
1868         were modified.
1869         (lst_interchange_select_outer): Apply interchange on the outer loop
1870         until there are no more changes in the inner loops.
1872 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
1874         Revert patch fixing PR middle-end/42221.
1876 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
1878         PR middle-end/42180
1879         * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1880         GIMPLE_CALL.
1882         * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1884 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
1886         PR middle-end/42180
1887         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1888         that contain only one statement.
1890         * gfortran.dg/graphite/pr42180.f90: New.
1892 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1894         PR middle-end/42393
1895         * gfortran.dg/graphite/pr42393.f90: New.
1897 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1899         PR middle-end/42186
1900         * gfortran.dg/graphite/pr42186.f90: New.
1902 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1904         PR middle-end/42186
1905         * testsuite/gfortran.dg/graphite/pr42186.f90: New.
1907 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1909         PR middle-end/42205
1910         * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1911         Insert the reduction copy in the same block as the phi node.
1912         (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1914         * gcc.dg/graphite/pr42205-1.c: New.
1915         * gcc.dg/graphite/pr42205-2.c: New.
1917 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1919         PR middle-end/42221
1920         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1921         the array indexing of ADDR_EXPRs.
1923         * gcc.dg/graphite/pr42221.c: New.
1925 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1927         PR middle-end/42178
1928         PR middle-end/42334
1929         * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1930         index.  Call lst_interchange_select_inner only once.
1931         (lst_interchange_select_inner): Update use of lst_try_interchange.
1932         (lst_interchange_select_outer): Update.
1934 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
1936         PR middle-end/42178
1937         PR middle-end/42334
1938         * graphite-interchange.c (lst_try_interchange): Do not increment the
1939         the OUTER index when there is no AFTER kernel.  Do not increment the
1940         OUTER index for after processing the AFTER kernel.
1941         (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1942         (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1943         index.  Do not pass to lst_interchange_select_inner the OUTER index.
1944         (scop_do_interchange): Update use of lst_interchange_select_outer.
1946         * gfortran.dg/graphite/graphite.exp
1947         (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1948         * gfortran.dg/graphite/interchange-1.f: Add comment.  Clean
1949         the graphite dump file.
1950         * gfortran.dg/graphite/interchange-2.f: Same.
1951         * gfortran.dg/graphite/pr42334-1.f: New.
1953 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
1955         PR middle-end/42178
1956         PR middle-end/42334
1957         * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1958         that are empty.
1959         (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1960         (lst_try_interchange): Reimplemented.
1961         (lst_interchange_select_inner): Same.
1962         (lst_do_interchange): Renamed lst_interchange_select_outer.
1963         Reimplemented.
1964         (scop_do_interchange): Update use of lst_interchange_select_outer.
1966         * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1967         * gcc.dg/graphite/block-0.c: Un-XFAILed.
1968         * gcc.dg/graphite/pr42211.c: New.
1969         * gfortran.dg/graphite/pr42334.f90: New.
1971 2009-12-14  Sebastian Pop  <sebastian.pop@amd.com>
1973         PR middle-end/42181
1974         * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1975         carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1977         * gfortran.dg/graphite/pr42181.f90: New.
1979 2009-12-12  Sebastian Pop  <sebpop@gmail.com>
1981         PR middle-end/42284
1982         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1983         insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1984         (detect_commutative_reduction_arg): Simplified.
1985         (detect_commutative_reduction): Early return when the argument of
1986         the close phi is not of an SSA_NAME.
1988         * gcc.dg/graphite/pr42284.c: New.
1990 2009-12-11  Alexander Monakov  <amonakov@ispras.ru>
1992         * dbgcnt.def (graphite_scop): New counter.
1993         * graphite.c: Include dbgcnt.h
1994         (graphite_transform_loops): Use new counter to limit transformations.
1996 2009-12-08  Sebastian Pop  <sebpop@gmail.com>
1998         PR middle-end/42285
1999         * graphite-scop-detection.c (graphite_can_represent_init): Also
2000         handle more complex MULT_EXPRs containing parameters by recursion
2001         on the structure.
2003         * gfortran.dg/graphite/pr42285.f90: New.
2005 2009-12-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2007         * g++.dg/graphite/pr42130.C: Fix type.
2009 2009-11-29  Alexander Monakov <amonakov@gcc.gnu.org>
2011         * g++.dg/graphite/pr42130.C: Correct testcase.
2013 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2015         * Merge from mainline (154493:154734).
2017 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2019         * Merge from mainline (151362:154491).
2021 2009-11-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2023         * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2024         graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2026 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2028         PR middle-end/42130
2029         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2030         translate_clast_for_loop): New.
2031         (translate_clast_for): Add a condition around the loop, to do not
2032         execute loops with zero iterations.
2033         * g++.dg/graphite/pr42130.C: New.
2034         * gcc.dg/graphite/pr35356-2.c: Adapt.
2036 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2038         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2039         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2040         Remove context_loop and level.
2042 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2044         * graphite-clast-to-gimple.c (translate_clast_user,
2045         translate_clast_for, translate_clast_guard): Simplify and move common
2046         elements to translate_clast().
2047         (translate_clast): Simplify and get common elements.
2049 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2051         * graphite-clast-to-gimple.c (translate_clast_user,
2052         translate_clast_for, translate_clast_guard): Split out of
2053         translate_clast.
2055 2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>
2057         * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2058         clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2059         debug_clast_name_indexes_1, debug_clast_name_indexes,
2060         clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2061         (clast_name_to_gcc, clast_to_gcc_expression,
2062         clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2063         gcc_type_for_clast_eq, graphite_translate_clast_equation,
2064         graphite_create_guard_cond_expr, graphite_create_new_loop,
2065         translate_clast): Add params_index.
2066         (initialize_cloog_names): Create parameter strings from scratch, do
2067         not reference other strings.
2068         (create_params_index): New.
2069         (gloog): Initialize params_index.
2070         * graphite-scop-detection (free_scops_1): Removed.
2071         (limit_scops): Use normal free_scops.
2072         * graphite-sese-to-poly.c (save_var_names): Removed.
2073         (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2074         and SESE_PARAMS_INDEX.
2075         * sese.c (new_sese, free_sese): Dito.
2076         * sese.h (struct sese): Remove params_index, params_names.
2077         (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2079 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2081         Revert the following patch from 2009-09-14:
2082         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2083         tree-scalar-evolution.h, and then tree-data-ref.h.
2084         * graphite-clast-to-gimple.c: Same.
2085         * graphite-dependences.c: Same.
2086         * graphite-interchange.c: Same.
2087         * graphite-poly.c: Same.
2088         * graphite-scop-detection.c: Same.
2089         * graphite-sese-to-poly.c: Same.
2090         * graphite.c: Same.
2091         * lambda-code.c: Same.
2092         * matrix-reorg.c: Same.
2093         * tree-data-ref.c: Same.
2094         * tree-if-conv.c: Same.
2095         * tree-loop-distribu: Same.: Same.
2096         * tree-loop-linear.c: Same.
2097         * tree-parloops.c: Same.
2098         * tree-predcom.c: Same.
2099         * tree-vect-patterns.c: Same.
2101 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2103         Revert patch from 2009-09-14.
2104         * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2105         passes at -O1 and below.
2107 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2109         PR middle-end/40281
2110         * gcc.dg/graphite/pr40281.c: New.
2112         * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2113         evolutions should not variate in inner loops.
2115 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2117         PR middle-end/42050
2118         * gfortran.dg/graphite/pr42050.f90: New.
2120 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2122         * graphite-interchange.c (memory_strides_in_loop_depth): New.
2123         (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2125 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2127         * graphite-blocking.c (scop_do_block): New.
2128         * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2129         * graphite-poly.h (scop_do_block): Declared.
2131 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2133         * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2134         depth is the loop nesting depth in the LST.  Call psct_dynamic_dim
2135         to transform depth into the time_depth before calling
2136         pbb_number_of_iterations_at_time.
2137         (lst_do_strip_mine): Use a scalar variable instead of recomputing
2138         lst_depth.
2140 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2142         Reverted the patch for "scattering permutations" from 2009-10-28.
2144         * graphite-poly.c (print_permutation): New.
2145         (debug_permutation): New.
2146         (new_poly_bb): Initialize PBB_PERMUTATION.
2147         (free_poly_bb): Free PBB_PERMUTATION.
2148         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2149         (struct pbb_permutation_elt): New.
2150         (PBB_PERMUTATION_ELT_STRIDE): New.
2151         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2152         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2153         (new_pbb_permutation_elt): New.
2154         (pbb_permutation_elt_free): New.
2155         (struct poly_bb): Add field permutation.
2156         (PBB_PERMUTATION): New.
2157         (print_permutation): Declared.
2158         (debug_permutation): Declared.
2160 2009-11-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
2162         * graphite-interchange.c (build_partial_difference): New.
2163         (memory_stride_in_loop): Refactored the computation of
2164         equality constraints into build_partial_difference function.
2165         Added support for debugging stride computations.
2167 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2169         * graphite-clast-to-gimple.c (gloog): Free if_region,
2170         if_region->true_region, and if_region->region.
2171         * sese.c (if_region_set_false_region): Free if_region->false_region.
2172         (create_if_region_on_edge): Do not use GGC_NEW.
2173         (move_sese_in_condition): Remove useless initialization.
2175 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2177         * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2178         for the loops created by the loop distribution.  Do not modify the
2179         input LSTs.
2180         (lst_try_interchange_loops): Same.  Use a temporary LST for the
2181         transformed schedule.  Call lst_update_scattering before data
2182         dependence analysis.
2183         (lst_try_interchange): Pass an extra parameter INDEX.
2184         (lst_do_interchange_1): New.
2185         (lst_do_interchange): Call lst_do_interchange_1.
2186         (scop_do_interchange): Call lst_update_scattering.
2187         * graphite-poly.c (apply_poly_transforms): Do not call
2188         lst_update_scattering.
2189         * graphite-poly.h (lst_pred): New.
2190         (lst_succ): New.
2191         (lst_find_first_pbb): Return NULL when not found.
2192         (lst_empty_p): New.
2193         (lst_insert_in_sequence): Allow LST1 to be NULL.
2194         (lst_replace): New.
2195         (lst_substitute_3): New.
2196         * gcc.dg/graphite/interchange-1.c: XFail.
2197         * gcc.dg/graphite/interchange-8.c: XFail.
2198         * gcc.dg/graphite/interchange-11.c: XFail.
2200 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2202         * graphite-interchange.c (lst_perfectly_nested_p): New.
2203         (lst_perfect_nestify): New.
2204         (lst_try_interchange_loops): Call store_lst_schedule,
2205         lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2206         (scop_do_interchange): Avoid redundant legality test.
2207         Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2208         * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2209         * graphite-poly.h (psct_static_dim): New.
2210         (lst_dewey_number_at_depth): New.
2211         (lst_find_pbb): Restructured.
2212         (lst_find_first_pbb): Restructured.
2213         (lst_find_last_pbb): New.
2214         (lst_contains_p): New.
2215         (lst_contains_pbb): New.
2216         (lst_create_nest): New.
2217         (lst_remove_from_sequence): New.
2218         (pbb_update_scattering): New.
2219         (lst_update_scattering_under): New.
2220         (lst_update_scattering_seq): New.
2221         (lst_update_scattering): New.
2222         (lst_insert_in_sequence): New.
2223         (lst_distribute_lst): New.
2224         (lst_remove_all_before_including_pbb): New.
2225         (lst_remove_all_before_excluding_pbb): New.
2227 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2229         * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2230         get_loop_exit_edges.
2232 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2234         * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2236 2009-10-28  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2238         * graphite-poly.c (print_permutation): New.
2239         (debug_permutation): New.
2240         (new_poly_bb): Initialize PBB_PERMUTATION.
2241         (free_poly_bb): Free PBB_PERMUTATION.
2242         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2243         (struct pbb_permutation_elt): New.
2244         (PBB_PERMUTATION_ELT_STRIDE): New.
2245         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2246         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2247         (new_pbb_permutation_elt): New.
2248         (pbb_permutation_elt_free): New.
2249         (struct poly_bb): Add field permutation.
2250         (PBB_PERMUTATION): New.
2251         (print_permutation): Declared.
2252         (debug_permutation): Declared.
2254 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2256         * graphite-clast-to-gimple.c (gloog): Do not call
2257         sese_reset_aux_in_loops.
2258         * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2259         extra argument for domains.  Do not use loop->aux.
2260         (build_scop_iteration_domain): Initialize and free domains, pass it
2261         to build_loop_iteration_domains and extract the information from
2262         domains.  Do not use loop->aux.
2263         * sese.c (sese_reset_aux_in_loops): Removed.
2264         * sese.h (sese_reset_aux_in_loops): Removed.
2266 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2268         * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2269         (dependency_in_loop_p): Same.
2270         (translate_clast): Do not use loop->aux.  Initialize
2271         loop->can_be_parallel.
2272         (mark_loops_parallel): Removed.
2273         * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2274         * graphite.c (free_aux_in_new_loops): Removed.
2275         (graphite_finalize): Do not call free_aux_in_new_loops.
2276         (graphite_transform_loops): Do not call mark_loops_parallel.
2278 2009-10-26  Li Feng  <nemokingdom@gmail.com>
2280         * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2281         (translate_clast): Pass an extra parameter LEVEL.
2282         Call get_scattering_level.
2283         * graphite-clast-to-gimple.h (get_scattering_level): New.
2285 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2287         * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2288         * cfgloop.h (struct loop): New field single_iv.
2290         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2291         loop->aux anymore: use loop->single_iv.
2292         (graphite_loop_normal_form): Moved...
2293         (build_graphite_loop_normal_form): Removed.
2294         (gloog): Do not call build_graphite_loop_normal_form.
2295         (free_aux_in_new_loops): Moved...
2296         (mark_loops_parallel): Restructure.
2297         * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2298         * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2299         (scop_canonicalize_loops): New.
2300         (build_poly_scop): Call scop_canonicalize_loops.
2301         * graphite.c (free_aux_in_new_loops): ...here.
2303 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2305         * g++.dg/graphite/graphite.exp: Add the same rules as in
2306         gcc.dg/graphite/graphite.exp.
2308 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2310         * g++.dg/graphite/id-1.C: New.
2312 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2314         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2315         argument base_name.
2316         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2317         (rewrite_phi_out_of_ssa): Same.
2318         (rewrite_cross_bb_scalar_deps): Same.
2319         (translate_scalar_reduction_to_array): Same.
2321 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2323         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2324         dump_alias_graphs.
2326 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2328         * graphite-sese-to-poly.c (dump_alias_graphs): New.
2329         (build_scop_drs): Call dump_alias_graphs.
2331 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2333         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2334         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2335         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2336         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2337         * graphite-poly.h (free_lst): New.
2338         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2339         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2341 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2343         * graphite-poly.h (struct scop): Add a field saved_schedule.
2344         (SCOP_SAVED_SCHEDULE): New.
2345         (store_lst_schedule): New.
2346         (restore_lst_schedule): New.
2347         (store_scattering): Call store_lst_schedule.
2348         (restore_scattering): Call restore_lst_schedule.
2350 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2352         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2353         (pdr_add_alias_set): Same.
2354         (build_poly_dr): Same.
2355         (build_alias_set_optimal_p): Same.
2356         (build_base_obj_set_for_drs): Same.  Do not store the result of
2357         graphds_dfs.
2359 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2361         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2362         all_components_are_cliques to 1.
2364 2009-10-20  Li Feng  <nemokingdom@gmail.com>
2366         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2367         the new structure.
2368         (pdr_add_alias_set): Update retrieving alias_set_num.
2369         (build_poly_dr): Update retrieving dr_base_object_set.
2370         (partition_drs_to_sets): Remove.
2371         (build_alias_set_optimal_p): New.
2372         (build_alias_set_for_drs): Rename.
2373         (build_scop_drs): Update.
2374         * graphite-sese-to-poly.h (struct base_alias_pair): New.
2375         (ALIAS_SET_INDEX): Remove.
2376         (BASE_OBJECT_SET_INDEX): Remove.
2378 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2380         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2382 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2384         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2385         loop upper bounds for 1-element arrays at end of structures.
2386         * tree-flow.h (array_at_struct_end_p): Declared.
2387         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2389 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2391         * g++.dg/graphite/pr41305.C: New.
2393 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
2395         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2396         construction of parameter constraints from loop iteration analysis.
2397         * gcc.dg/graphite/run-id-2.c: New test.
2399 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2401         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2402         and new_cstr.
2404 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2406         * graphite-dependences.c (dependence_polyhedron_1): Remove
2407         unused gdim dimensions from the DDR polyhedron.
2409 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2411         * graphite-dependences.c (pddr_transformed_scattering): New.
2412         (dot_original_deps_stmt_1): New.
2413         (dot_transformed_deps_stmt_1): New.
2414         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2415         dot_transformed_deps_stmt_1.
2416         (dot_original_deps): New.
2417         (dot_transformed_deps): New.
2418         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2420 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2422         * graphite-dependences.c (reduction_dr_1): Remove wrong
2423         assert: reduction BBs can have multiple reduction writes
2424         to memory.  interchange-3.f90 is an example.
2426 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2428         * gfortran.dg/graphite/interchange-3.f90: New.
2430 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2432         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2434 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2436         * graphite-dependences.c (dependence_polyhedron_1): Add the
2437         context to the dependence polyhedron.
2439 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2441         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2442         PBB_PDR_DUPLICATES_REMOVED.
2443         (new_poly_bb): Same.
2445 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2447         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2448         SCOP_CONTEXT.
2449         (build_loop_iteration_domains): Extract bounds on parameters
2450         based on the data size.
2451         (build_scop_context): Do not initialize SCOP_CONTEXT;
2452         add new constraints.
2454 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2456         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2457         * graphite-ppl.h (graphite-ppl.h): Declared.
2459 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2461         * graphite-ppl.c (ppl_print_linear_expr): New.
2462         (debug_ppl_linear_expr): New.
2463         * graphite-ppl.h (ppl_print_linear_expr): Declared.
2464         (debug_ppl_linear_expr): Declared.
2466 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2468         * graphite-interchange.c: Fix comments.
2469         * gcc.dg/graphite/block-1.c: Fix comments.
2471 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2473         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2474         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2476 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2478         Reapply the patch from Alexander Monakov that disappeared during
2479         the last merges from trunk.
2481         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
2483         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2484         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
2486 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2488         * graphite-interchange.c (memory_stride_in_loop): The depth
2489         argument corresponds to a dynamic time dimension, so use
2490         psct_dynamic_dim to refer to the transformed scattering dimension.
2492 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2494         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2496 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2498         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2499         root of the LST.
2500         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2501         the root of the LST.
2502         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2503         fake loop.
2504         (print_lst): Print the root of LST in a different format.
2505         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2507 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2509         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2511 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2513         * doc/passes.texi: Document the Graphite infrastructure.
2515 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2517         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2518         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2519         and check the SSA representation.
2521         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2523 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2525         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2527 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2529         * gcc.dg/graphite/interchange-11.c: New.
2531 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2533         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2535 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2537         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2538         Add -fno-loop-strip-mine and -fno-loop-interchange.
2539         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2540         -fno-loop-strip-mine.
2541         * gfortran.dg/graphite/graphite.exp: Same.
2543 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2545         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2546         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2547         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2548         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2549         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2550         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2551         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2552         DEFAULT_FLAGS_GRAPHITE_SCOP.
2553         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2554         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2556 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2558         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2560 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2561             Sebastian Pop  <sebastian.pop@amd.com>
2563         * graphite-interchange.c (build_linearized_memory_access): Pass an
2564         offset as parameter.
2565         (memory_stride_in_loop): Include transform scattering in the
2566         access functions to be able to querry the strides in the
2567         transformed loops.
2568         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2569         not the psct_iterator_dim.
2571 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2573         * graphite-blocking.c (pbb_do_strip_mine): Removed.
2574         (lst_do_strip_mine_loop): New.
2575         (lst_do_strip_mine): New.
2576         (scop_do_strip_mine): Call lst_do_strip_mine.
2577         * graphite-poly.h (lst_add_loop_under_loop): New.
2578         (lst_find_first_pbb): New.
2580 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2582         * graphite-poly.c (loop_to_lst): Fix LST creation.
2584 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
2586         * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2587         sizeof(unsigned long) to make it run on 32bit systems.
2589 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
2591         * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2592         SEGFAULT on 32bit.
2594 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2596         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2597         Comment.
2598         (write_alias_graph_to_ascii_dot): New.
2599         (write_alias_graph_to_ascii_ecc): Ditto.
2600         (partition_drs_to_sets): Add testing of optimality of current method
2601         which assigns alias numbers according to DFS Comopnent number.  used
2602         as heuristic for the upcoming ECC algorithm.
2603         (build_scop_drs): Write to file also with the ecc and dot format.
2605 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2607         * gfortran.dg/graphite/interchange-1.f: XFail.
2609 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2611         * graphite.c (graphite_initialize): Do not handle functions with
2612         more than 100 basic blocks.
2614 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2616         * graphite-blocking.c (pbb_do_strip_mine): Use
2617         PARAM_LOOP_BLOCK_TILE_SIZE.
2619 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2621         * graphite-poly.c (dot_lst_1): New.
2622         (dot_lst): New.
2623         * graphite-poly.h (dot_lst): Declared.
2625 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2627         * graphite-dependences.c (dot_deps_stmt_1): New.
2628         (dot_deps_stmt): New.
2629         * graphite-dependences.h (dot_deps_stmt): Declared.
2631 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2633         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2634         not replace cross BB scalar dependences ending on PHI nodes.
2635         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2637 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2639         * graphite-poly.c (apply_poly_transforms): Implement the high
2640         level driver for flag_loop_block.
2641         * opts.c (decode_options): Enable flag_loop_block at -O2.
2642         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2643         flag_loop_block.
2645         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2646         -floop-block.
2647         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2648         Add -floop-block.
2650 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2652         * graphite-poly.h (lst_find_pbb): New.
2653         (find_lst_loop): New.
2655 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2657         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2658         * graphite-poly.h (struct scop): Remove dep_graph field.
2659         (SCOP_DEP_GRAPH): Removed.
2661 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2663         * graphite-poly.h (copy_lst): Do full copy of LST.
2665 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
2667         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2668         when the loop stride is zero.
2670         * gcc.dg/graphite/id-16.c: New.
2672 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2674         * graphite-dependences.c (reduction_dr_1): New.
2675         (reduction_dr_p): New.
2676         (graphite_legal_transform_dr): Call reduction_dr_p.
2677         (reduction_ddr): Renamed reduction_ddr_p.
2678         * graphite-poly.h (same_pdr_p): New.
2679         (number_of_write_pdrs): New.
2680         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2681         (split_reduction_stmt): Do not split reduction statements
2682         when there are no writes to memory.
2683         (translate_scalar_reduction_to_array_for_stmt): Insert the
2684         memory reduction statement just after the scalar reduction statement.
2686         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2687         Un-XFAIL-ed.
2688         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2689         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2691 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2693         * graphite-interchange.c (lst_apply_interchange): New.
2694         (lst_interchange_profitable_p): New.
2695         (lst_try_interchange_loops): New.
2696         (lst_try_interchange): New.
2697         (lst_do_interchange): New.
2698         (pbb_do_interchange): Removed.
2699         (scop_do_interchange): Call lst_do_interchange.
2701 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2703         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2704         SCOP_TRANSFORMED_SCHEDULE.
2705         (loop_to_lst): New.
2706         (scop_to_lst): New.
2707         (print_lst): New.
2708         (debug_lst): New.
2709         * graphite-poly.h (lst_p): New.
2710         (struct lst): New.
2711         (LST_LOOP_P): New.
2712         (LST_LOOP_FATHER): New.
2713         (LST_PBB): New.
2714         (LST_SEQ): New.
2715         (scop_to_lst): Declared.
2716         (print_lst): Declared.
2717         (debug_lst): Declared.
2718         (new_lst_loop): New.
2719         (new_lst_stmt): New.
2720         (copy_lst): New.
2721         (lst_depth): New.
2722         (lst_dewey_number): New.
2723         (struct scop): Add original_schedule and transformed_schedule fields.
2724         (SCOP_ORIGINAL_SCHEDULE): New.
2725         (SCOP_TRANSFORMED_SCHEDULE): New.
2726         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2728 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2730         * graphite-dependences.c (reduction_ddr): New.
2731         (graphite_legal_transform_bb): Call reduction_ddr.
2732         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2733         Initialize PBB_IS_REDUCTION.
2734         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2735         (PBB_IS_REDUCTION): New.
2736         (new_poly_bb): Update declaration.
2737         * graphite-scop-detection.h (build_scop_bbs): Removed.
2738         (nb_reductions_in_loop): Removed.
2739         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2740         parameter for reductions.
2741         (try_generate_gimple_bb): Update call to new_poly_bb.
2742         (build_scop_bbs_1): Same.
2743         (build_scop_bbs): Same.
2744         (gsi_for_phi_node): New.
2745         (scalar_close_phi_node_p): Remove gcc_assert.
2746         (split_reduction_stmt): New.
2747         (is_reduction_operation_p): New.
2748         (phi_contains_arg): New.
2749         (follow_ssa_with_commutative_ops): New.
2750         (detect_commutative_reduction_arg): New.
2751         (detect_commutative_reduction_assign): New.
2752         (follow_inital_value_to_phi): New.
2753         (edge_initial_value_for_loop_phi): New.
2754         (initial_value_for_loop_phi): New.
2755         (detect_commutative_reduction): New.
2756         (translate_scalar_reduction_to_array_for_stmt): New.
2757         (insert_copyout): New.
2758         (insert_copyin): New.
2759         (translate_scalar_reduction_to_array): New.
2760         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2761         (rewrite_commutative_reductions_out_of_ssa_loop): New.
2762         (rewrite_commutative_reductions_out_of_ssa): New.
2763         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2764         * sese.h (split_region_for_bb): New.
2766         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2767         * gcc.dg/graphite/interchange-1.c: Fix format.
2768         * gcc.dg/graphite/interchange-10.c: New.
2770 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2772         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2773         buggy assert.
2775 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2777         * graphite-sese-to-poly.c (scev_analyzable_p): New.
2778         (rewrite_cross_bb_scalar_dependence): New.
2779         (rewrite_cross_bb_scalar_deps): New.
2780         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2781         Call rewrite_cross_bb_scalar_deps.
2783 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2785         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2786         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2787         gsi_for_stmt.
2789 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2791         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2792         * graphite-interchange.c (pbb_do_interchange): Same.
2793         * graphite-poly.c (print_scattering_function): Same.
2794         (debug_pdrs): Same.
2795         * graphite-poly.h (pbb_loop): New.
2796         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2798 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
2800         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2802 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
2804         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2805         so don't pass a pointer to it.
2806         (build_alias_set_for_drs): Same.
2807         (build_base_obj_set_for_drs): Same.
2808         (build_scop_drs): Same.
2810 2009-09-26  Li Feng  <nemokingdom@gmail.com>
2812         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2813         the alias graph of data references.
2815 2009-09-25  Li Feng  <nemokingdom@gmail.com>
2817         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2818         (build_scop_drs): When debugging, write the alias graph to file,
2819         otherwise, should be disabled.
2821 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2823         * Merge from mainline (151310:151361).
2825 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2827         * Merge from mainline (151171:151310).
2829 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2831         * Merge from mainline (151171:151806).
2833 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2835         * Revert the last commit.
2837 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2839         * Merge from mainline (151171:151819).
2841 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2843         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2844         (is_simple_operand): Remove call to stmt_simple_memref_p.
2845         (stmt_simple_for_scop_p): Update call to is_simple_operand.
2847 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
2849         * gcc.dg/graphite/interchange-mvt.c: New File.
2850         * gcc.dg/graphite/scop-dsyrk.c: New File.
2851         * gcc.dg/graphite/scop-dsyr2k.c: New File.
2852         * gcc.dg/graphite/scop-mvt.c: New File.
2853         * gcc.dg/graphite/scop-sor.c: New File.
2855 2009-09-17 Li Feng  <nemokingdom@gmail.com>
2857         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2858         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2859         (graphite_carried_dependence_level_k): Ditto.
2860         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2861         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2862         (new_poly_dr): Adjust declaration.
2863         * graphite-sese-to-poly.c (free_data_refs_aux): New.
2864         (free_gimple_bb): Added free_data_refs_aux.
2865         (build_poly_dr): Add dr_base_object_set.
2866         (partition_drs_to_sets): New.
2867         (dr_same_base_object_p): New.
2868         (build_alias_set_for_drs): New.
2869         (build_base_object_set_for_drs): New.
2870         (build_scop_drs): Add build_base_obj_set_for_drs.
2871         * graphite-sese-to-poly.h: Added #define for alias set number index and
2872         base object set index.
2873         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2874         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2876 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
2878         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2879         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
2881 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
2883         * graphite-sese-to-poly.c (struct irp_data): Removed.
2884         (idx_record_params): Removed.
2885         (find_params_in_bb): Scan for parameters the access functions; don't
2886         parse the tree representation.
2888 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
2890         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2891         passes at -O1 and below.
2893 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
2895         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2896         tree-scalar-evolution.h, and then tree-data-ref.h.
2897         * graphite-clast-to-gimple.c: Same.
2898         * graphite-dependences.c: Same.
2899         * graphite-interchange.c: Same.
2900         * graphite-poly.c: Same.
2901         * graphite-scop-detection.c: Same.
2902         * graphite-sese-to-poly.c: Same.
2903         * graphite.c: Same.
2904         * lambda-code.c: Same.
2905         * matrix-reorg.c: Same.
2906         * tree-data-ref.c: Same.
2907         * tree-if-conv.c: Same.
2908         * tree-loop-distribu: Same.: Same.
2909         * tree-loop-linear.c: Same.
2910         * tree-parloops.c: Same.
2911         * tree-predcom.c: Same.
2912         * tree-vect-patterns.c: Same.
2914 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
2916         Partially revert the previous patch, except the following.
2917         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2918         as parameters the operands of the not expression.
2920 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2922         * tree-scalar-evolution.c (instantiate_scev_assign): New.
2923         Do not call analyze_scalar_evolution on assignments.
2924         (instantiate_scev_phi): Call analyze_scalar_evolution.
2925         (instantiate_scev_name): Call instantiate_scev_assign and
2926         instantiate_scev_phi.
2927         (instantiate_scev_not): Adapted to pass as parameters the operands
2928         of the not expression.
2930 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2932         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2933         to pass as parameters the operands of the binary expression.
2935 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2937         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2938         instantiate_scev_not.  Handle NEGATE_EXPR.
2939         (instantiate_scev_r): Handle NEGATE_EXPR.
2941 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2943         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2944         instantiate_scev_r.
2945         (instantiate_scev_r): Move code in instantiate_scev_2
2946         and instantiate_scev_1.
2948 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2950         * tree-scalar-evolution.c (instantiate_scev_3): New.
2951         (instantiate_scev_1): Move code in instantiate_scev_3.
2953 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2955         * tree-scalar-evolution.c (instantiate_scev_poly): New.
2956         (instantiate_scev_1): Move code in instantiate_scev_poly.
2958 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2960         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2961         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2963 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2965         * tree-scalar-evolution.c (instantiate_scev_convert): New.
2966         (instantiate_scev_1): Move code in instantiate_scev_convert.
2968 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2970         * tree-scalar-evolution.c (instantiate_scev_binary): New.
2971         (instantiate_scev_1): Move code in instantiate_scev_binary.
2973 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2975         * tree-scalar-evolution.c (instantiate_scev_name): New.
2976         (instantiate_scev_1): Move code in instantiate_scev_name.
2978 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
2980         * Merge from mainline (150992:151171).
2982 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
2984         * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2986 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
2988         * graphite-dependences.c (graphite_legal_transform_bb): Call
2989         pbb_remove_duplicate_pdrs.
2990         * graphite-poly.c (can_collapse_pdr): Removed.
2991         (pdr_find_duplicate): Removed.
2992         (can_collapse_pdrs): New.
2993         (pbb_remove_duplicate_pdrs): New.
2994         (new_poly_dr): Do not look for duplicates.
2995         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2996         (PBB_PDR_DUPLICATES_REMOVED): New.
2997         (pbb_remove_duplicate_pdrs): Declared.
2999 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3001         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3002         the strides by multiplying by PDR_NB_REFS.
3003         * graphite-poly.c (can_collapse_pdr): New.
3004         (pdr_find_duplicate): New.
3005         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
3006         Initialize PDR_NB_REFS.
3007         * graphite-poly.h (struct poly_dr): Add field nb_refs.
3008         (PDR_NB_REFS): New.
3009         (new_poly_dr): Number of subscripts is a graphite_dim_t.
3011 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3013         Revert one of the previous commits:
3014         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3015         the computation of symmetric data dependence relations.
3016         (dependency_between_pbbs_p): Same.
3018 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3020         PR middle-end/40965
3021         * graphite-poly.c (apply_poly_transforms): Remove legality test before
3022         any transform.
3024 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3026         * graphite-dependences.c (pddr_original_scattering): Return NULL
3027         for read-read dependence relations.
3028         * graphite-poly.h (enum poly_dr_type): Fix comment.
3029         (pdr_read_p): New.
3030         (pdr_write_p): New.
3031         (pdr_may_write_p): New.
3033 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3035         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3036         (struct poly_dr): Same.
3037         (new_poly_dr): Same.
3038         * graphite-poly.c (new_poly_dr): Same.
3040 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3041             Sebastian Pop  <sebastian.pop@amd.com>
3043         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3044         pbb_strip_mine_time_depth.  Changed the implementation so that
3045         transformation is expressed as a transformation on
3046         time (scatttering) dimensions.  Also, ensures that the 2d+1
3047         scheduling format is preserved.
3048         (pbb_strip_mine_profitable_p): Profitability is based on the
3049         iteration number of a given time (scattering) dimension,
3050         and not on a original loop depth dimension.
3051         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3052         (pbb_do_strip_mine): Call psct_dynamic_dim.
3053         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3054         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3055         (pbb_nb_dynamic_scattering_transform): New.
3056         (psct_dynamic_dim): New.
3058 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3060         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3061         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3062         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3063         * graphite-interchange.c (build_linearized_memory_access): Same.
3064         (memory_stride_in_loop): Same.
3066 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3068         * graphite-dependences.c (pddr_original_scattering): New.
3069         (graphite_legal_transform_dr): Call pddr_original_scattering.
3070         (dot_deps_1): New.
3071         (dot_deps): New.
3072         * graphite-dependences.h (dot_deps): Declared.
3073         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3074         (print_pdr): Print PDR_ID.
3075         * graphite-poly.h (struct poly_dr): Add field id.
3076         (PDR_ID): New.
3077         (pbb_index): New.
3078         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3080 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
3082         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3083         not delete the original dependence relation.
3085 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3087         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3088         the computation of symmetric data dependence relations.
3089         (dependency_between_pbbs_p): Same.
3091 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3093         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3094         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3095         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3096         (free_poly_ddr): New.
3097         (pddr_is_empty): New.
3098         (dependence_polyhedron_1): Now returns a poly_ddr_p.
3099         (dependence_polyhedron): Same.  Remove useless gcc_assert.
3100         Remove fprintfs.
3101         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3102         (graphite_carried_dependence_level_k): Call pddr_is_empty.
3103         * graphite-dependences.h (enum poly_dependence_kind): New.
3104         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
3105         (PDRP_SOURCE): Renamed PDDR_SOURCE.
3106         (PDRP_SINK): Renamed PDDR_SINK.
3107         (PDRP_DDP): Renamed PDDR_DDP.
3108         (PDDR_KIND): New.
3109         (free_poly_ddr): Declared.
3110         * graphite-poly.c (new_scop): Use the new hash function names.
3111         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3112         into original_pddrs.
3113         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3115 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3117         * Merge from mainline (150764:150992).
3119 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3121         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3122         bounds with LT_EXPR to make niter analysis more precise on code
3123         generated by Graphite.
3125 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3127         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3128         (graphite_legal_transform_bb): Same.
3129         (poly_drs_may_alias_p): Same.
3131 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
3133         PR middle-end/40981
3134         * graphite-ppl.c (ppl_max_for_le): Correct the use of
3135         ppl_Pointset_Powerset_C_Polyhedron_maximize.
3137 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3139         * graphite-poly.c (print_pbb): Print PBB index.
3141 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3143         * Merge from mainline (r150672:150764).
3145 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3147         * graphite-interchange.c (ppl_max_for_le): Moved...
3148         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3149         * graphite-ppl.c (ppl_max_for_le): ... here.
3150         * graphite-ppl.h (ppl_max_for_le): Declared.
3152 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
3154         * Merge from mainline (r150372:150672).
3156 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3158         PR middle-end/40980
3159         * sese.c (convert_for_phi_arg): New.
3160         (add_guard_exit_phis): Use convert_for_phi_arg.
3162         * gfortran.dg/graphite/id-17.f: New.
3164 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3166         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3167         unknown subscript upper bounds.
3169         * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3171 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3172             Pranav Garg  <pranav.garg2107@gmail.com>
3174         * graphite-interchange.c (gather_access_strides): Removed.
3175         (ppl_max_for_le): New.
3176         (build_linearized_memory_access): New.
3177         (memory_stride_in_loop): New.
3178         (pbb_interchange_profitable_p): Reimplemented.
3179         * graphite-ppl.h (ppl_new_id_map): New.
3180         (ppl_interchange): New.
3182         * gcc.dg/graphite/interchange-6.c: XFAILed.
3184 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3186         * graphite-interchange.c (compute_subscript): Removed.
3187         (compute_array_size_cstr): Removed.
3188         (compute_array_size_poly): Removed.
3189         (compute_array_size): Removed.
3190         (gather_access_strides_poly): Removed.
3191         (gather_access_strides): Empty.
3193 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3195         * graphite-dependences.c (dependence_polyhedron_1): Replace
3196         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3197         (graphite_legal_transform_dr): Same.
3198         (graphite_carried_dependence_level_k): Same.
3199         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3200         Initialize PDR_NB_SUBSCRIPTS.
3201         (print_pdr_access_layout): Replace pdr_nb_subscripts with
3202         PDR_NB_SUBSCRIPTS.
3203         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3204         (PDR_NB_SUBSCRIPTS): New.
3205         (pdr_nb_subscripts): Removed.
3206         (pdr_dim): Simplified.
3207         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3208         with PDR_NB_SUBSCRIPTS.
3210 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3212         * graphite-interchange.c (compute_array_size): Remove use of
3213         PDR_DATA_CONTAINER.
3214         * graphite-poly.c (new_poly_dr): Remove argument data_container.
3215         Do not initialize PDR_DATA_CONTAINER.
3216         (print_pdr): Do not print PDR_DATA_CONTAINER.
3217         * graphite-poly.h (struct poly_dr): Remove data_container field.
3218         (PDR_DATA_CONTAINER): Removed.
3219         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3220         PDR_DATA_CONTAINER.
3221         (build_poly_dr): Same.
3223 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3225         * gcc.dg/graphite/interchange-9.c: New.
3227 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3228             Sebastian Pop  <sebastian.pop@amd.com>
3230         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3231         copy of the dependence polyhedron.  Free the temporary objects.
3232         (graphite_carried_dependence_level_k): Free unused objects before
3233         returning.
3235         * gcc.dg/graphite/interchange-1.c: XFAILed.
3236         * gcc.dg/graphite/interchange-2.c: XFAILed.
3237         * gcc.dg/graphite/interchange-3.c: XFAILed.
3238         * gcc.dg/graphite/interchange-4.c: XFAILed.
3239         * gcc.dg/graphite/interchange-7.c: XFAILed.
3241 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3243         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3244         Early return without analyzing the data dependences if no
3245         transform has been done.  Call restore_scattering if the transform
3246         is not legal.
3247         (graphite-interchange.c): Same.
3248         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3249         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3250         (apply_poly_transforms): Do not gcc_assert that
3251         the transform is legal.
3252         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3253         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3254         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3255         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3256         * graphite-poly.h (struct poly_scattering): New.
3257         (struct poly_bb): Add original, transformed, and saved fields.
3258         Remove transformed_scattering, original_scattering, nb_local_variables,
3259         and nb_scattering_transform fields.
3260         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3261         (poly_scattering_new): New.
3262         (poly_scattering_free): New.
3263         (poly_scattering_copy): New.
3264         (store_scattering_pbb): New.
3265         (store_scattering): New.
3266         (restore_scattering_pbb): New.
3267         (restore_scattering): New.
3268         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3269         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3271 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3273         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3274         (print_scop): Same.
3276 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3278         * Makefile.in (graphite.o): Depends on PREDICT_H.
3279         * graphite.c: Include predict.h.
3280         (graphite_finalize): Call tree_estimate_probability.
3281         * predict.c (predict_loops): Do not call scev_initialize and
3282         scev_finalize.
3283         (tree_estimate_probability_bb): New.
3284         (tree_estimate_probability): Do not initialize loops: move that
3285         code to the driver.  Call tree_estimate_probability_bb.
3286         (tree_estimate_probability_driver): New.
3287         (pass_profile): Use tree_estimate_probability_driver.
3288         * predict.h (tree_estimate_probability): Declared.
3290 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3292         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3293         * graphite-dependences.c (graphite_legal_transform): Add time to
3294         TV_GRAPHITE_DATA_DEPS.
3295         (dependency_between_pbbs_p): Same.
3296         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3298 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3300         * Merge from mainline (r149952:150372).
3302 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3304         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3305         * graphite-blocking.c: Same.
3306         * graphite-clast-to-gimple.c: Same.
3307         * graphite-dependences.c: Same.
3308         * graphite-poly.c: Same.
3309         * graphite-poly.h: Same.
3310         * graphite-ppl.c: Same.
3311         * graphite-scop-detection.c: Same.
3312         * graphite-sese-to-poly.c: Same.
3313         * graphite.c: Same.
3315 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3317         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3318         (remove_simple_copy_phi): New.
3319         (remove_invariant_phi): New.
3320         (simple_copy_phi_p): New.
3321         (reduction_phi_p): New.
3322         (gsi_for_ssa_name_def): New.
3323         (insert_out_of_ssa_copy): New.
3324         (insert_out_of_ssa_copy_on_edge): New.
3325         (create_zero_dim_array): New.
3326         (scalar_close_phi_node_p): New.
3327         (rewrite_close_phi_out_of_ssa): New.
3328         (rewrite_phi_out_of_ssa): New.
3329         (rewrite_reductions_out_of_ssa): New.
3330         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3332         * gcc.dg/graphite/id-11.c: New.
3333         * gcc.dg/graphite/id-15.c: New.
3334         * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3335         * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3336         * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3337         * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3338         * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3339         * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3340         * gfortran.dg/graphite/id-13.f: New.
3341         * gfortran.dg/graphite/id-5.f: New.
3343 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3345         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3346         check that nb_reductions_in_loop is zero.
3347         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3348         reduction phi nodes.
3349         (nb_reductions_in_loop): Removed.
3350         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3351         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3352         (bb_contains_non_iv_scalar_phi_nodes): Removed.
3353         (scop_contains_non_iv_scalar_phi_nodes): Removed.
3354         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3356 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3358         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3359         statements that have an empty iteration domain.
3360         * gfortran.dg/graphite/id-16.f: New.
3362 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3364         * tree-scalar-evolution.c (instantiate_scev_1): Return
3365         chrec_dont_know when the result is not above instantiate_below.
3366         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3367         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3368         the tree has a known scalar evolution.
3369         * gfortran.dg/graphite/id-14.f: New.
3370         * gfortran.dg/graphite/id-15.f: New.
3372 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3374         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3375         insert_gsi.
3376         (rename_variables): Keep inserting renames after the ones already
3377         inserted.
3379 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3381         * graphite-sese-to-poly.c (compare_bb_depths): New.
3382         (graphite_sort_dominated_info): New.
3383         (build_scop_bbs_1): Call graphite_sort_dominated_info.
3384         (build_scop_scattering): Fix comment.
3386 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3388         * graphite.c (graphite_finalize): Call print_loops instead of
3389         dump_function_to_file.
3390         * gcc.dg/graphite/graphite.exp: Fix formatting.
3391         * gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
3392         loops generated in the graphite output file.
3393         * gcc.dg/graphite/pr35356-2.c: New.
3394         * gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
3395         * gfortran.dg/graphite/id-12.f: New.
3397 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3399         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3400         Remove 2 XFAIL.
3402 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3403             Tobias Grosser  <grosser@fim.uni-passau.de>
3405         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3406         alias set number build alias in ACCESSES polyhedron.
3407         (build_alias_set_for_drs): New.
3408         (build_pbb_drs): Added build_alias_set_for_drs.
3409         * graphite-dependences.c (poly_drs_may_alias_p): New.
3410         (graphite_carried_dependence_level_k): Check alias information
3411         before building polyhedron.
3413 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3415         * Makefile.in (lambda-code.o): Fix formatting.
3417 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3419         * Merge from mainline (r149350-149952)
3421 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3423         * graphite-poly.c (apply_poly_transforms): Move strip_mine
3424         before interchange to prepare for loop blocking.
3426 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3428         * graphite-poly.c (apply_poly_transforms): Add checks after every
3429         transformation.
3430         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3431         done in apply_poly_transforms.
3433 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3435         * graphite-dependences.c (build_lexicographically_gt_constraint):
3436         Replace RES parameter with *RES.
3437         (dependence_polyhedron_1): Pass an address of the parameter RES
3438         instead of value of RES.
3440 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3442         * graphite.c (graphite_finalize): Fix comment.
3443         (graphite_transform_loops): Reset scev info after code generation
3444         of each scop.
3446 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3448         * graphite.c (graphite_finalize): Call scev_reset.
3450 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3452         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3453         GBB_CLOOG_IV_TYPES hash table twice.
3454         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3455         (add_condition_to_domain): Clear GMP values.
3457 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3459         * graphite-dependences.c: Fix formatting.
3460         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3461         (pbb_number_of_iterations): Free ppl_Linear_Expression.
3462         * graphite-sese-to-poly.c: Fix formatting.
3463         * graphite.c (graphite_transform_loops): Create the hash table
3464         after the early return.
3466 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3468         * gcc.dg/graphite/id-14.c: New.
3469         * gcc.dg/graphite/pr40157.c: New.
3470         * gfortran.dg/graphite/id-11.f: New.
3472 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3474         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3475         (build_poly_scop): Return false when there are no pbbs within
3476         loops to avoid to pass to cloog scops with no loops.
3478 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3480         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3481         useless test "i % 2".
3482         (build_pbb_scattering_polyhedrons): Fix formatting.
3483         (build_poly_dr): Same.
3484         * graphite.c (graphite_transform_loops): Restructure.
3486 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
3488         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3489         reduction_list parameter.
3490         (rewrite_all_phi_nodes_with_iv): Same.
3491         (canonicalize_loop_ivs): Same.
3492         * tree-parloops.c (struct brli): Removed.
3493         (build_reduction_list_info): Removed.
3494         (build_new_reduction): New.
3495         (analyze_reduction_list): Removed.
3496         (gather_scalar_reductions): Find reductions instead of phi
3497         nodes that can't be canonicalized.
3498         (try_create_reduction_list): Remove reduction_list parameter.
3499         (gen_parallel_loop): Same.
3500         (parallelize_loops): Remove analyze_reductions variable,
3501         initialization and free.
3502         Change reduction_list htab initialization to reduction_info
3503         elements instead of ssa names.
3504         Call try_create_reduction_list and gen_parallel_loop without
3505         analyzed_reduction argument.
3506         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3507         canonicalize_loop_ivs with one less argument.
3508         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3510 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
3512         * graphite-dependences.c (new_poly_dr_pair): New.
3513         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3514         (new_poly_dr_pair): New.
3515         (eq_poly_dr_pair_p): New.
3516         (hash_poly_dr_pair_p): New.
3517         * graphite-dependences.h (struct poly_dr_pair): New.
3518         (eq_poly_dr_pair_p): Declared.
3519         (hash_poly_dr_pair_p): Declared.
3520         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3521         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3522         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3523         * Makefile.in (graphite-poly.o): Add dependence on
3524         graphite-dependences.h.
3526 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3528         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3529         polynomials of degree > 1 pass to Graphite.
3530         * tree-chrec.c (scev_is_linear_expression): Call
3531         evolution_function_is_affine_multivariate_p.
3532         * gfortran.dg/graphite/id-10.f90: New.
3534 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3536         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3537         Instantiate scevs varying in outer loops.
3538         * gfortran.dg/graphite/id-9.f: Correct testcase.
3540 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3542         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3543         redundant constraint.
3545 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3547         * gcc.dg/graphite/graphite.exp: Fix comments.
3548         * gfortran.dg/graphite/graphite.exp: Trigger actions
3549         based on the file names as in the C testsuite.
3550         * gfortran.dg/graphite/block-1.f90: Fix patterns.
3551         * gfortran.dg/graphite/block-2.f: Same.
3552         * gfortran.dg/graphite/block-3.f90: Same.
3553         * gfortran.dg/graphite/block-4.f90: Same.
3554         * gfortran.dg/graphite/id-1.f90: Same.
3555         * gfortran.dg/graphite/id-2.f90: Same.
3556         * gfortran.dg/graphite/id-3.f90: Same.
3557         * gfortran.dg/graphite/id-4.f90: Same.
3558         * gfortran.dg/graphite/id-6.f: Same.
3559         * gfortran.dg/graphite/id-9.f: Same.
3560         * gfortran.dg/graphite/interchange-1.f: Same.
3561         * gfortran.dg/graphite/interchange-2.f: Same.
3562         * gfortran.dg/graphite/scop-1.f: Same.
3564 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3566         * sese.c (expand_scalar_variables_call): New.
3567         (expand_scalar_variables_ssa_name): Handle calls in expander.
3569 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3571         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3572         Expect to see the pattern twice.
3573         * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3574         * gcc.dg/graphite/interchange-5.c: Same.
3575         * gcc.dg/graphite/interchange-6.c: Same.
3577 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3579         * gcc.dg/graphite/id-10.c: New.
3580         * gcc.dg/graphite/id-12.c: New.
3581         * gfortran.dg/graphite/id-7.f: New.
3582         * gfortran.dg/graphite/id-8.f: New.
3584 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3586         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3587         zero.
3589 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3591         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3593 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3595         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3597 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3599         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3600         building PDR subscripts.
3602 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3604         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3605         computation of array sizes.
3607 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3609         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3611 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3613         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3614         build_pairwise_constraint, dr_equality_constraints,
3615         build_pairwise_scheduling_equality,
3616         build_pairwise_scheduling_inequality, lexicographically_gt_p,
3617         build_lexicographically_gt_constraint, dependence_polyhedron,
3618         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3619         Move from NNC_Polyhedron to C_Polyhedron.
3620         * graphite-interchange.c (compute_array_size_poly,
3621         gather_access_strides): Dito.
3622         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3623         free_scop, pbb_number_of_iterations): Dito.
3624         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3625         pbb_dim_iter_domain, struct scop): Dito.
3626         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3627         new_Cloog_Domain_from_ppl_Polyhedron,
3628         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3629         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3630         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3631         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3632         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3633         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3634         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3635         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3636         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3637         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3638         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3639         build_scop_iteration_domain, build_poly_dr): Dito
3641 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3643         * gcc.dg/graphite/graphite.exp: Added a rule to execute
3644         run-id-*.c files.
3645         * gcc.dg/graphite/run-id-1.c: New.
3647 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3649         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3650         positivity constraint on the symbolic number of iterations.
3652 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3654         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3656 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3657             Tobias Grosser  <grosser@fim.uni-passau.de>
3659         * graphite-clast-to-gimple.c (build_scop_context): Removed.
3660         (build_cloog_prog): Directly use SCOP_CONTEXT.
3661         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3662         (free_scop): Free SCOP_CONTEXT.
3663         (print_scop_context): New.
3664         (print_scop): Call print_scop_context.
3665         (debug_scop_context): New.
3666         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3667         (struct scop): Added field context.
3668         (SCOP_CONTEXT): New.
3669         * graphite-sese-to-poly.c (add_param_constraints): New.
3670         (build_scop_context): New.
3671         (build_poly_scop): Call build_scop_context.
3673 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3675         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3676         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3677         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3678         * graphite-ppl.h: Include double-int.h and tree.h.
3679         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3680         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3681         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
3682         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3684 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3686         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3687         POINTER_PLUS_EXPR for pointer types.
3688         (clast_to_gcc_expression): Same.
3690 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3692         * graphite-poly.c (print_scattering_function): Early return when
3693         PBB_TRANSFORMED_SCATTERING is not initialized.
3694         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3696 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
3698         * tree-parloops.c (analyze_reduction_list): Remove unused variable
3699         to fix bootstrap.
3701 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
3703         * tree-parloops.c (analyze_reduction_list): Change return
3704         value to void.
3705         (try_create_reduction_list): Move the call to
3706         analyze_reduction_list to the beginining.
3707         Call reduction_phi with analyzed_reductions as argument
3708         instead of reduction_list.
3710 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3712         *  Merge from mainline (r148296:149346)
3714 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3716         * graphite-scop-detection.c (graphite_can_represent_init): New.
3717         (graphite_can_represent_scev): Call graphite_can_represent_init:
3718         check that the initial value does not contain multiplications of
3719         parameters.
3720         (stmt_has_simple_data_refs_p): New.
3721         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3722         (is_simple_operand): Fix formatting.
3723         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3725 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3727         * gcc.dg/graphite/id-13.c: New.
3728         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3729         analyze_scalar_evolution, use scalar_evolution_in_region.
3730         (scan_tree_for_params_right_scev): Add extra assert.
3731         (parameter_index_in_region_1): Split from parameter_index_in_region.
3732         (idx_record_params): Use scalar_evolution_in_region.
3733         (find_params_in_bb): Same.
3734         (find_scop_parameters): Same.
3735         (build_loop_iteration_domains): Same.
3736         (create_linear_expr_from_tree): Same.
3737         * sese.c (scalar_evolution_in_region): New.
3738         * sese.h (scalar_evolution_in_region): Declared.
3739         (defined_in_sese_p): New.
3740         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3741         static anymore.
3742         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3743         Declared.
3745 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3747         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3748         TREE_DATA_REF_H also implies SCEV_H.
3750 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3752         * graphite-poly.c (print_scop_params): New.
3753         (print_scop): Call print_scop_params.
3754         (debug_scop_params): New.
3755         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3757 2009-07-07  Li Feng  <nemokingdom@gmail.com>
3759         * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3760         * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3761         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3762         * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3763         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3764         * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3766 2009-07-07  Li Feng  <nemokingdom@gmail.com>
3768         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3769         for dependency checking part.
3770         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3771         tests for dependency checking.
3772         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3773         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3774         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3775         flag -fdump-tree-graphite-all for autopar testsuites.
3777 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
3779         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3780         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3781         canonicalize_loop_ivs): Moved...
3782         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
3784 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
3786         * tree-parloops.c (try_create_reduction_list): Pass an extra
3787         argument analyzed_reductions.  Call analyze_reduction_list.
3788         (gen_parallel_loop): Do not call analyze_reduction_list.
3789         (parallelize_loops): Init and finalize analyzed_reductions.
3791 2009-07-06  Li Feng  <nemokingdom@gmail.com>
3793         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3794         Added flag -fno-loop-strip-mine for autopar testcase.
3796 2009-07-04  Li Feng  <nemokingdom@gmail.com>
3798         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3799         transformed scattering dimension instead of unmatch orignal when
3800         calling dependence_polyhedron.
3802 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3804         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3806 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3808         * graphite-poly.c (pbb_number_of_iterations): Check for returned
3809         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3811 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3813         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3814         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3815         * graphite-poly.c (pbb_number_of_iterations): New.
3816         * graphite-poly.h (pbb_number_of_iterations): Declared.
3817         (pbb_iterator_dim, pbb_parameter_dim): New.
3819 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
3821         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3822         last commit on type of lower and upper bound of loops.
3824 2009-06-29  Li Feng  <nemokingdom@gmail.com>
3826         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3827         graphite-dependences.h.
3828         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3829         (mark_bb_with_pbb): New.
3830         (get_stmtfor_depth): New.
3831         (find_pbb_via_hash): New.
3832         (dependency_in_loop_p): New.
3833         (mark_loops_parallel): New.
3834         (free_aux_in_new_loops): New.
3835         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
3836         bb with it's relevant pbb. Mark newly created loops.  Remove mark
3837         innermost loop parallel without checking.
3838         (gloog): Add parameter BB_PBB_MAPPING.
3839         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3840         (gloog): Change declaration.
3841         (mark_loop_parallel): Make extern.
3842         (free_aux_in_new_loops): Declare.
3843         (bb_pbb_map_hash): New.
3844         (eq_bb_pbb_map): New.
3845         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3846         auto parallelization when flag_graphite_force_parallel is set.
3847         (graphite_finalize): Added free_aux_in_new_loops.
3848         * tree-parloops.c (parallelize_loops): Only generate parallel code for
3849         the innermost loop that marked parallel.  Use
3850         flag_graphite_force_parallel instead of loop->can_be_parallel.
3851         (loop_parallel_p): Move inner most checking out of function.
3853 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3855         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3856         type of lower and upper bound of loops signed long int.
3858 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3860         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3861         expression outside the loop.
3863 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3865         * gcc.dg/graphite/interchange-8.c: New.
3867 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3869         * gcc.dg/graphite/interchange-0.c: XFailed.
3870         * gcc.dg/graphite/interchange-5.c: XFailed.
3871         * gcc.dg/graphite/interchange-6.c: XFailed.
3873 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3875         * graphite-interchange.c (compute_array_size_poly): The end of the
3876         recursion should return 1.
3878 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3880         * graphite-interchange.c (compute_array_size_cstr): Allow the
3881         subscript multiplier to be -1.
3882         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3883         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3884         data_container.  Initializes PDR_DATA_CONTAINER.
3885         (print_pdr_access_layout): New.
3886         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
3887         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
3888         data_container.
3889         (PDR_DATA_CONTAINER): New.
3890         (new_poly_dr): Update declaration.
3891         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3892         (build_poly_dr): Call pdr_add_data_dimensions.
3894 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3896         * graphite-poly.h (struct poly_dr): Fix comment.
3897         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3898         (pdr_add_memory_accesses): New.
3899         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3901 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3903         * graphite-poly.c (print_pdrs, debug_pdrs): New.
3904         (print_pbb): Add call to print_pdrs.
3905         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3907 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
3908             Li Feng <nemokingdom@gmail.com>
3910         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3911         (dependency_between_pbbs_p): New.
3912         (lexicographically_gt_p): Assure !empty_p before polyhedron
3913         intersection assign.
3914         (build_lexicographically_gt_constraint): Correct lexicographically
3915         judging.
3916         * graphite-dependences.h: New.
3917         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3919 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
3921         * graphite-clast-to-gimple.c (print_clast_stmt): New.
3922         (gloog): Print to dump_file the generated clast.
3923         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3924         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3926 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
3928         * graphite-poly.c (extend_scattering): Increment
3929         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3931 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
3933         * graphite-interchange.c (compute_array_size_poly): Added exit of
3934         recursion condition.  Continue iterating even after the first equality.
3935         (compute_array_size): Same.
3937 2009-06-24  Li Feng  <nemokingdom@gmail.com>
3939         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3940         -fdump-tree-final_cleanup to -fdump-tree-optimized.
3941         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3942         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3943         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3945 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3947         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3948         only when the use verifies is_gimple_reg.
3950 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3952         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3953         Allocate scaldims after call to unify_scattering_dimensions.
3955 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3957         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3959 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3960             Albert Cohen  <albert.cohen@inria.fr>
3962         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3963         variables for the strip mining.
3965 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3966             Pranav Garg  <pranav.garg2107@gmail.com>
3968         * Makefile.in (OBJS-common): Added graphite-blocking.o.
3969         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3970         (graphite-blocking.o): New rule.
3971         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3972         * graphite-blocking.c: New.
3973         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3974         flag_loop_strip_mine.
3975         (psct_scattering_dim_for_loop_depth): New.
3976         * graphite-poly.h (scop_do_strip_mine): Declared.
3977         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3978         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3979         flag_loop_strip_mine.
3981 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3983         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3984         a GMP value and a PPL coefficient at each iteration of a loop.
3986 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3988         * graphite-dependences.c (dependence_polyhedron): Do not use
3989         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
3990         pbb_nb_scattering_transform.
3991         (graphite_legal_transform_dr): Same.
3992         * graphite-poly.c (extend_scattering): Same.
3993         (unify_scattering_dimensions): Same.
3994         (print_scattering_function): Same.
3995         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3996         PBB_NB_LOCAL_VARIABLES.
3997         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3998         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3999         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4000         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4001         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4002         (pbb_nb_scattering_transform): New.
4003         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4004         (psco_scattering_dim): Add assert on parameters.
4005         (psct_scattering_dim): Same.
4006         (psct_scattering_dim_for_loop_depth): Declared.
4007         (psct_local_var_dim): New.
4008         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4009         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
4010         correct layout, call pbb_nb_local_vars.
4011         (psct_add_local_variable, psct_add_scattering_dimension): New.
4012         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4013         Initialize PBB_NB_SCATTERING_TRANSFORM.
4015 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4017         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4018         (set_coef): Renamed ppl_set_coef.
4019         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4021 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4023         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4024         test a boolean against 1.
4025         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4026         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4027         (pbb_do_interchange): Returns true when a transform has been performed.
4028         (scop_do_interchange): Same.
4029         * graphite-poly.c (apply_poly_transforms): Use the return value of
4030         scop_do_interchange.
4031         * graphite-poly.h (scop_do_interchange): Update declaration.
4033 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
4035         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4036         after last use.
4037         * sese.c (sese_reset_aux_in_loops): New.
4038         * sese.h (sese_reset_aux_in_loops): New.
4040 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4042         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4043         multiplier and multiply the constant by the multiplier.
4044         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4045         (build_poly_dr): Do not use the multiplier to define the subscript.
4047 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4049         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4050         compiler's data reference.  Initialize PDR_CDR.
4051         (print_pdr): Call dump_data_reference.
4052         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4053         Add compiler_dr field.
4054         (PDR_BB): Renamed PDR_PBB.
4055         (PDR_CDR): New.
4056         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4057         GCC's data reference representation.
4058         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4059         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4061 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4063         * graphite-poly.c (print_scattering_function): Also print the layout.
4064         * graphite-poly.h (pbb_nb_local_vars): New.
4066 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4068         * graphite-poly.c (print_pbb_domain): Also print the layout names.
4070 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4072         * graphite-poly.c (print_pdr, debug_pdr): New.
4073         * graphite-poly.h (print_pdr, debug_pdr): Declared.
4074         (PDR_BASE): Removed.
4076 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4078         * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4079         ltrans-{1..6,8}.c.
4081 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4083         * graphite-interchange.c (compute_subscript): Allow also -1 in the
4084         subscript identification column.
4085         (pbb_do_interchange): Print to dump_file that some loops "will be
4086         interchanged".  Rely on that chain of characters in the testcases.
4087         * gcc.dg/graphite/interchange-0.c: New.
4088         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4089         interchange-*.c files and compile them with -floop-interchange.
4091 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
4093         * graphite-interchange.c (interchange_profitable_p): Renamed
4094         pbb_interchange_profitable_p.
4096 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4097             Harsha Jagasia  <harsha.jagasia@amd.com>
4098             Pranav Garg  <pranav.garg2107@gmail.com>
4100         * graphite-interchange.c (interchange_profitable_p): Make static.
4101         (pbb_interchange_loop_depths, pbb_do_interchange,
4102         scop_do_interchange): New.
4103         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4104         for flag_loop_interchange.
4105         * graphite-poly.h (scop_do_interchange): Declared.
4106         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4107         flag_loop_interchange is used.
4109 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4111         * graphite-dependences.c (dependence_polyhedron): Update use of
4112         pbb_nb_scattering_dims.
4113         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4114         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4115         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4116         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4118 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4120         * graphite.c: Cleanup foo.
4122 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4124         * Merge from mainline (r143684:148293).
4125         * Disabled libpcp until it gets fixed.
4127 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4128             Harsha Jagasia  <harsha.jagasia@amd.com>
4130         * graphite-interchange.c: New.
4131         * Makefile.in (graphite-interchange.o): New.
4132         * graphite-poly.h (interchange_profitable_p): Declared.
4133         * graphite-ppl.h (value_max): New.
4135 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4137         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4138         * graphite-poly.h: Fix some comments.
4139         (pdr_dim): New.
4140         (pdr_scop): New.
4142 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4144         * graphite-poly.h
4145         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4146         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4147         (pdr_accessp_nb_params): Renamed pdr_nb_params.
4148         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4149         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4150         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4151         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4152         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4153         * graphite-clast-to-gimple.c: Same.
4154         * graphite-dependences.c: Same.
4155         * graphite-poly.c: Same.
4156         * graphite-sese-to-poly.c: Same.
4158 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4160         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4161         expressions for an IV rename, as returned by clast_to_gcc_expression.
4162         (copy_renames): Rename new_name to expr.
4163         * sese.c (debug_rename_elt): Same.
4164         (get_rename): Same.
4165         (set_rename): Same.
4166         (sese_adjust_liveout_phis): Call force_gimple_operand before using
4167         the information from the rename map.
4168         (rename_variables_in_stmt): Same.
4169         (add_loop_exit_phis): Rename new_name to expr.
4170         (insert_loop_close_phis): Same.
4171         (add_guard_exit_phis): Same.  Call force_gimple_operand.
4172         * sese.h (struct rename_map_elt): Rename new_name to expr.
4173         (new_rename_map_elt): Same.
4175 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4177         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4178         * sese.c (set_rename): Make it extern.
4179         * sese.h (set_rename): Declared.
4181 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4183         * graphite-poly.c (extend_scattering): Free values.
4184         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4185         Free iterators.
4186         (ppl_print_powerset_matrix): Same.
4187         * graphite-scop-detection.c (free_scops_1): New.
4188         (limit_scops): Call free_scops_1.
4189         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4190         (build_poly_dr): Free PPL coefficients.
4191         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4193 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
4195         * graphite-dependences.c: New.
4196         * graphite-data-ref.c: Removed.
4197         * graphite-data-ref.h: Removed.
4198         * Makefile.in (graphite-data-ref.o): Removed.
4199         (graphite-dependences.o): Added.
4200         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4201         * graphite-poly.c: Same.
4202         Move the data dependence testing to graphite-dependences.c.
4204 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
4206         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4207         from graphite_cannot_represent_loop. Code refactored.
4208         (scopdet_basic_block_info): Call graphite_can_represent_loop.
4210 2009-05-17  Li Feng  <nemokingdom@gmail.com>
4212         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4213         Cover all the testcases (not only the filtered ones).
4215 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4217         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4218         unnecessary check. Update comments. Move check for REAL_TYPE here.
4219         (harmful_stmt_in_bb): Remove checks for conditions. This is already
4220         done in (stmt_simple_for_scop_p).
4222 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
4224         * graphite.c (print_global_statistics): New.
4225         (print_graphite_scop_statistic): New.
4226         (print_graphite_statistics): New.
4227         (graphite_initialize, graphite_transform_loops): Print statistics.
4228         * graphite-scop-detection (build_scops): Print statistics.
4229         (print_graphite_scop_statistics): New.
4230         (print_graphite_statistics): New.
4232 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4234         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4235         (debug_clast_name_index): Removed.
4236         (debug_clast_name_indexes_1): Removed.
4237         (debug_clast_name_indexes): Removed.
4238         (clast_name_index_elt_info): Removed.
4239         (eq_clast_name_indexes): Removed.
4240         (clast_name_to_index): Removed.
4241         (new_clast_name_index): Removed.
4242         (save_clast_name_index): Removed.
4243         (save_var_name): Moved...
4244         (init_sese_params_index): Removed.
4245         (clast_name_to_gcc): Remove use of name_tree.
4246         (initialize_cloog_names): Same.
4247         (gloog): Do not call init_sese_params_index.
4248         * graphite-sese-to-poly.c (save_var_name): ...here.
4249         (parameter_index_in_region): New.
4250         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4251         (parameter_index_in_region): Removed.
4252         (is_parameter): Remove use of name_tree.
4253         * sese.h (struct name_tree): Removed.
4254         (struct sese): Remove use of name_tree.  New field params_names.
4255         (SESE_PARAMS_NAMES): New.
4256         (SESE_PARAMS): Remove duplicate.
4257         (parameter_index_in_region): Removed.
4258         (sese_nb_params): Remove use of name_tree.
4259         (struct clast_name_index): New.
4260         (new_clast_name_index): New.
4261         (clast_name_to_index): New.
4262         (save_clast_name_index): New.
4263         (debug_clast_name_index): New.
4264         (debug_clast_name_indexes_1): New.
4265         (debug_clast_name_indexes): New.
4266         (clast_name_index_elt_info): New.
4267         (eq_clast_name_indexes): New.
4269 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4271         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4272         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
4273         (graphite_loop_normal_form): Do not pass region.  Do not
4274         initialize SESE_OLDIVS.
4275         (build_graphite_loop_normal_form): Update call to
4276         graphite_loop_normal_form.
4277         * sese.c (debug_oldivs): Removed.
4278         (new_sese): Do not initialize SESE_OLDIVS.
4279         (free_sese): Do not free SESE_OLDIVS.
4280         (oldiv_for_loop): Removed.
4281         * sese.h (struct sese): Remove old_ivs.
4282         (SESE_OLDIVS): Removed.
4283         (oldiv_for_loop): Removed.
4285 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4287         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4288         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
4289         replaced by a call to newivs_to_depth_to_newiv.
4290         (clast_to_gcc_expression): Pass newivs, remove ivstack.
4291         (clast_to_gcc_expression_red): Same.
4292         (gcc_type_for_clast_expr): Same.
4293         (gcc_type_for_clast_eq): Same.
4294         (graphite_translate_clast_equation): Same.
4295         (graphite_create_guard_cond_expr): Same.
4296         (graphite_create_new_guard): Same.
4297         (graphite_create_new_loop): Same.
4298         (build_iv_mapping): Same.
4299         (translate_clast): Same.
4300         (gloog): Same.
4301         (loop_iv_stack_patch_for_consts): Removed.  *
4302         sese.c (iv_stack_entry_is_constant): Removed.
4303         (iv_stack_entry_is_iv): Removed.
4304         (loop_iv_stack_push_iv): Removed.
4305         (loop_iv_stack_insert_constant): Removed.
4306         (loop_iv_stack_pop): Removed.
4307         (loop_iv_stack_get_iv): Removed.
4308         (loop_iv_stack_get_iv_from_name): Removed.
4309         (debug_loop_iv_stack): Removed.
4310         (free_loop_iv_stack): Removed.
4311         (loop_iv_stack_remove_constants): Removed.  *
4312         sese.h (iv_stack_entry_kind): Removed.
4313         (iv_stack_entry_data_union): Removed.
4314         (iv_stack_entry_struct): Removed.
4315         (iv_stack_entry_p): Removed.
4316         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4317         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4318         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4319         loop_iv_stack_pop, free_loop_iv_stack): Removed.
4320         (gbb_loop_at_index): Fix indenting.
4321         (gbb_loop_index): Removed.
4323 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4325         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4326         Call clast_name_to_index.
4328 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4330         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4331         do not pass params.  Get params from SESE_PARAMS.
4332         (clast_to_gcc_expression): Same.
4333         (clast_to_gcc_expression_red): Same.
4334         (gcc_type_for_clast_eq): Same.
4335         (graphite_translate_clast_equation): Same.
4336         (graphite_create_new_loop): Same.
4337         * sese.c (rename_variables_in_stmt): Fix comment.
4339 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4341         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4342         newivs_index.
4343         Call save_clast_name_index.
4344         (translate_clast): Pass newivs_index.
4345         (gloog): Create and free newivs_index.
4347 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4349         * graphite-clast-to-gimple.c (clast_name_index): New structure.
4350         (clast_name_index_p): New type.
4351         (debug_clast_name_index): New.
4352         (debug_clast_name_indexes_1): New.
4353         (debug_clast_name_indexes): New.
4354         (clast_name_index_elt_info): New.
4355         (eq_clast_name_indexes): New.
4356         (clast_name_to_index): New.
4357         (new_clast_name_index): New.
4358         (save_clast_name_index): New.
4359         (init_sese_params_index): New.
4360         (gloog): Call init_sese_params_index.
4361         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4362         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4363         (free_sese): Free SESE_PARAMS_INDEX.
4364         * sese.h (struct sese): Add params_index.
4365         (SESE_PARAMS_INDEX): New.
4367 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4369         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4370         (graphite_create_new_loop): Pass the newivs vector.  Push the
4371         newly created IV to newivs.
4372         (translate_clast): Pass the newivs vector.
4373         (gloog): Create and destroy the newivs vector.
4375 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4377         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4378         (graphite_loop_normal_form): Initialize loop->aux with the unique
4379         IV that has been created.
4381 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
4383         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4384         scev with parameters in the base part. They where forbidden
4385         exidently.
4387 2009-05-11  Li Feng  <nemokingdom@gmail.com>
4389         * gcc.dg/graphite/graphite.exp: Set different default
4390         compile options by file names.
4391         * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4392         * gcc.dg/graphite/id-{1-9}.c: Ditto.
4393         * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4394         * gcc.dg/graphite/scop-matmult.c: Ditto.
4396 2009-05-08  Li Feng <nemokingdom@gmail.com>
4398         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4399         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4400         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4401         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4403 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4405         * graphite-scop-detection (build_scops_1): Fix little bug introduced
4406         by final cleanup.
4408 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4410         * graphite-scop-detection.c (graphite_can_represent_scev): Only
4411         allow integer constant strides.
4412         (graphite_can_represent_expr): Depend on outermost_loop.
4413         (stmt_simple_memref_p, graphite_cannot_represent_loop,
4414         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4415         build_scops_1): Same.
4416         (scopdet_basic_block_info): Same and insert layered SCoP
4417         detection.
4418         (try_generate_gimple_bb): Cleanup.
4419         (build_scops): Enable data references.
4421         * gcc.dg/graphite/id-5.c: New.
4422         * gcc.dg/graphite/id-9.c: New.
4423         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4424         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4426 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4428         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4429         that we have not yet built for this SCoP.
4431 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4433         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4434         for complex numbers.
4436 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4438         * graphite-ppl.c: Fix build if cloog is not available.
4440 2009-05-04  Li Feng  <nemokingdom@gmail.com>
4442         * tree-parloops.c (loop_parallel_p): Remove construction of
4443         NITER and REDUCTION_LIST.
4444         (try_get_loop_niter): New.
4445         (try_create_reduction_list): New.
4446         (parallelize_loops): Bypass the failed checkings in autopar
4447         when can_be_parallel in loop structure is set to true.
4449 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4451         * gcc.dg/graphite/id-6.c: Update testcase.
4452         * gcc.dg/graphite/scop-3.c: Dito.
4454 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4456         * graphite-scop-detection.c (stmt_simple_for_scop_p):
4457         Enable EQ_EXPR and NE_EXPR again.
4459 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4461         * graphite-scop-detection.c (graphite_can_represent_scev):
4462         Add check if scev is affine multivariate.
4463         (harmful_stmt_in_bb): Check if we can represent the conditions.
4464         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4465         harmful_stmt_in_bb.
4466         * gcc.dg/graphite/id-7.c: New.
4468 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4470         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4471         Check all bbs in region, not only the bbs that are represented in
4472         GRAPHITE.
4473         (build_poly_scop): Add newline.
4474         * gcc.dg/graphite/id-8.c: New.
4476 2009-04-30  Li Feng  <nemokingdom@gmail.com>
4478         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4479         when loop initialize.
4480         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4481         * common.opt: Declare flag_graphite_force_parallel.
4482         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4483         loop parallel.
4484         * graphite-poly.c (apply_poly_transforms): Introduce
4485         flag_graphite_force_parallel.
4486         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4487         * toplev.c (process_options): ditto and replace a not correctly
4488         encoded space.
4490 2009-04-30  Li Feng  <nemokingdom@gmail.com>
4492         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4493         Change the call of gbb_loop_at_index and/or gbb_loop_index due
4494         to the redefinition.
4495         (compute_cloog_iv_types_1): ditto.
4496         (build_iv_mapping): ditto.
4497         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4498         initialization.
4499         (free_gimple_bb): Removed GBB_LOOPS related free part.
4500         (build_bb_loops): Removed.
4501         * sese.h (struct gimple_bb): Removed loops.
4502         (GBB_LOOPS): Removed.
4503         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4504         (gbb_loop_index): ditto.
4506 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4508         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4509         allow non constant strides.
4510         * gcc.dg/graphite/scop-20.c: New.
4512 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4514         * graphite-scop-detection.c (dot_all_scops): Fix system call
4515         return value warning.
4516         (dot_scop): Same.
4518 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4520         * gcc.dg/graphite/id-6.c: Fix pattern.
4521         * gcc.dg/graphite/scop-3.c: Same.
4523 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4525         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4526         build_pairwise_constraint, dr_equality_constraints,
4527         build_pairwise_scheduling_equality,
4528         build_pairwise_scheduling_inequality, lexicographically_gt_p,
4529         build_lexicographically_gt_constraint, dependence_polyhedron,
4530         graphite_legal_transform_dr, graphite_legal_transform_bb,
4531         graphite_legal_transform): New.
4532         * graphite-poly.h (graphite_legal_transform): Declared.
4533         * graphite-sese-to-poly.c (build_poly_scop): Call to
4534         graphite_legal_transform is disabled for the moment.
4536 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4538         * graphite-poly.h (pbb_nb_scattering_dims): New.
4539         (pbb_nb_scattering): Use it.
4541 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4543         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4544         Pointset_Powerset version of ppl_insert_dimensions.
4545         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4547 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4549         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4551 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4553         * graphite-poly.h: Fix comment.
4555 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4557         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4559 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4561         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4562         statements.
4564 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4566         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4567         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4568         conditions.
4570 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
4572         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4573         handle EQ_EXPR and NE_EXPR.
4575 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4577         * graphite-poly.h (poly_dr): Fix comment.
4579 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
4580             Tobias Grosser  <grosser@fim.uni-passau.de>
4582         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4583         with a zero dimension polyhedron.
4584         (find_scop_parameters): Move the call to scop_set_nb_params here.
4585         (build_loop_iteration_domains): Store in loop->aux the iteration
4586         domain polyhedron.
4587         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4588         by any loop in scop.
4589         (build_poly_scop): Do not call scop_set_nb_params.
4591 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
4592             Tobias Grosser  <grosser@fim.uni-passau.de>
4594         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4595         add_condition_to_domain not GT_EXPR.
4597 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4599         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4600         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4601         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4602         upper_bound_assign to calculate unions.
4603         * gcc.dg/graphite/id-6.c: New.
4605 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4607         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4608         handle abnormal edges.
4610 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4612         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4613         (free_poly_bb): Also free poly_drs.
4614         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4615         (poly_dr): Polyhedron to Pointset_Powerset.
4616         (pdr_accessp_nb_subscripts): Same.
4617         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4618         poly_drs.
4620 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4622         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4623         names into more meaningful names.
4625 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4627         * gfortran.dg/graphite/interchange-1.c: New.
4628         * gfortran.dg/graphite/interchange-2.c: New.
4630 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4632         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4633         the reduction_list.
4634         * tree-parloops.c (rewrite_phi_with_iv): New.
4635         (rewrite_all_phi_nodes_with_iv): New.
4636         (canonicalize_loop_ivs): Call them.
4638 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4640         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4641         graphite_find_data_references_in_stmt.
4642         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4643         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4645 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4647         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4649 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4651         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4652         instead of bb_in_region.
4653         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
4654         (build_sese_conditions): Use flag_bb_in_sese.
4655         * sese.c (register_bb_in_sese): Removed.
4656         (new_sese): Remove initialization of SESE_REGION_BBS.
4657         (free_sese): Do not free SESE_REGION_BBS.
4658         * sese.h (struct sese): Remove field region_basic_blocks.
4659         (SESE_REGION_BBS): Removed.
4660         (bb_in_sese_p): Implement in function of bb_in_region.
4662 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4664         * graphite-scop-detection.c (limit_scops): Deal only with single exit
4665         loops.
4667 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4669         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4670         and EQ_EXPR.
4671         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4672         (add_condition_to_domain): New.
4673         (add_condition_to_pbb): New.
4674         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4675         * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4677 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4679         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4680         ppl_Pointset_Powerset.
4681         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4682         * graphite-poly.h (poly_bb): poly_bb.domain Same.
4683         (pbb_nb_loops): Same.
4684         * graphite-sese-to-poly.c (build_loop_iteration_domains,
4685         add_conditions_to_domain): Same.
4686         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4687         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4688         ppl_const_Polyhedron_t.
4689         (ppl_print_powerset_matrix): New.
4690         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4691         ppl_print_powerset_matrix): New.
4692         (ppl_print_polyhedron_matrix): Updated.
4694 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4696         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4698 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4700         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
4701         (print_iteration_domains, debug_iteration_domain,
4702         debug_iteration_domains): New.
4703         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4704         debug_iteration_domains): Declared.
4705         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4706         indenting.
4708 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
4709             Sebastian Pop  <sebastian.pop@amd.com>
4711         * graphite-poly.h (print_iteration_domain): New.
4712         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4713         (build_sese_conditions_1, build_sese_conditions_after,
4714         build_sese_conditions_before): New.
4715         (build_sese_conditions): Rewritten.
4717 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
4718             Tobias Grosser  <grosser@fim.uni-passau.de>
4720         Cleanup of code generation liveouts.
4721         * graphite-clast-to-gimple.c (translate_clast): Use a single
4722         rename_map instead of one per translated statement.
4723         Do not use SESE_LIVEOUT_RENAMES.
4724         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4725         (gloog): Do not use SESE_LIVEOUT_RENAMES.
4726         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4727         phi node of a reduction: when a loop contains a reduction used outside
4728         the loop, there should be a scalar close phi node on the exit block.
4729         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4730         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4731         (free_sese): Do not free them.
4732         (sese_build_liveouts_use): Do not use them.
4733         (sese_build_liveouts_bb): Same.
4734         (sese_build_liveouts): Same.
4735         (sese_insert_phis_for_liveouts): Same.
4736         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
4737         (defined_in_loop_p): New.
4738         (alive_after_loop): New.
4739         (close_phi_not_yet_inserted_p): New.
4740         (struct alep, alep_p): New.
4741         (add_loop_exit_phis): Remove from the rename_map all the names defined
4742         in the code generated loop.
4743         (insert_loop_close_phis): Traverse the rename_map passed to it.
4744         Don't use SESE_LIVEOUT_RENAMES.
4745         (default_liveout_before_guard): Renamed default_before_guard.
4746         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4747         (graphite_copy_stmts_from_block): Do not directly call set_rename.
4748         (register_sese_liveout_renames): Removed.
4749         (copy_bb_and_scalar_dependences): Do not call it.
4750         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4751         reduction_list.
4752         (SESE_LIVEOUT): Removed.
4753         (SESE_LIVEOUT_RENAMES): Removed.
4754         (SESE_REDUCTION_LIST): Removed.
4755         (sese_build_liveouts): Removed.
4756         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4757         (insert_loop_close_phis): Pass a htab_t instead of a sese.
4758         (insert_guard_phis): Same.
4759         (rename_map_elt): Declare a VEC of them.
4760         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4761         trees not pointers to trees.
4763         Rewrite in canonical close SSA form:
4764         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4765         (limit_scops): Close the scop after the block containing the close phi
4766         nodes.
4767         (canonicalize_loop_closed_ssa): New.
4768         (canonicalize_loop_closed_ssa_form): New.
4769         (build_scops): Call canonicalize_loop_closed_ssa_form.
4771         * graphite-sese-to-poly.c: Fix typos.
4773 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
4775         * graphite-poly.c (print_scattering_function, print_pbb_domain):
4776         Extended.
4777         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4778         (print_pbb): Add conditions.
4780 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4781             Sebastian Pop  <sebastian.pop@amd.com>
4783         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4784         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4785         (build_scop_bbs_1): New.
4786         (build_scop_bbs): Rewrite.
4787         * sese.h (bb_in_region): New.
4789 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4791         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4792         poly_drs vector.
4793         (print_scop): Style.
4794         * graphite-poly.h (poly_bb): Add drs vector.
4795         (PBB_DRS): Add accessor.
4796         * graphite-sese-to-poly.c (build_poly_dr): New.
4797         (build_pbb_drs, build_scop_drs): New.
4798         (build_poly_scop): call build_scop_drs (Disabled at the moment).
4800 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4802         * tree-ssa-loop.c: Include forgotten toplev.h
4804 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4806         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4807         * gcc.dg/graphite/pr37883.c: Remove -floop-*
4808         * gcc.dg/graphite/pr37928.c: Same
4809         * gcc.dg/graphite/pr38409.c: Same
4810         * gcc.dg/graphite/pr38498.c: Same
4811         * gcc.dg/graphite/pr38559.c: Same
4812         * gcc.dg/graphite/pr39335.c: Same
4813         * gcc.dg/graphite/pr39335_1.c: Same
4814         * gfortran.dg/graphite/block-2.f: Same
4815         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4816         with -floop-*.
4818 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
4820         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4821         build_access_matrix, build_scop_data_accesses): Remove access function
4822         building. (We get a new version soon).
4823         (build_bb_loops, scan_tree_for_params_right_scev): Update.
4824         * sese.h (nb_loops_around_loop_in_sese): Remove.
4825         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4827 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
4828             Sebastian Pop  <sebastian.pop@amd.com>
4830         * graphite-scop-detection.c (struct scopdet_info): Rename last
4831         field to exit.
4832         (scopdet_basic_block_info, build_scops_1): Don't use
4833         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
4835 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
4836             Sebastian Pop  <sebastian.pop@amd.com>
4838         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4839         * sese.c (sese_build_liveouts_use): Renamed from
4840         sese_build_livein_liveouts_use. Remove liveins.
4841         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4842         Call sese_build_liveouts_use.
4843         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4844         Call sese_build_liveouts_bb.
4845         (new_sese, free_sese): Remove liveins.
4846         (sese_add_exit_phis_var): Deleted.
4847         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4848         directly.
4849         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4851         * sese.h (sese): Remove num_ver and livein.
4852         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4854 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4856         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4858 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4860         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4861         (build_scop_scattering): Do not use compare_prefix_loops any more.
4862         (nb_common_loops): New.
4864 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4866         * sese.c (get_new_name_from_old_name): Renamed get_rename.
4867         (register_old_and_new_names): Renamed set_rename.
4869 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4871         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4872         of the decl from the previous commit.
4874 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4876         * graphite-scop-detection.c (dot_scop): New.
4877         * graphite-scop-detection.h (dot_scop): Declared.
4879 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4881         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4883 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4885         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4886         condition at the end of the loop.
4887         * graphite.c (graphite_initialize, graphite_finalize): Print to
4888         dump_file the compiled function.
4889         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4890         of create_empty_loop_on_edge.
4891         (translate_clast): Update the code generation of loops for the new
4892         shape of loops.
4893         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4895 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4897         Reverted the patch from 2009-03-19.
4899 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
4901         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4902         poly_drs vector.
4903         (print_scop): Style.
4904         * graphite-poly.h (poly_bb): Add drs vector.
4905         (PBB_DRS): Add accessor.
4906         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4907         (build_access_matrix_with_af, build_access_matrix,
4908         build_scop_data_accesses): Delete.
4909         (build_poly_dr): New.
4910         (build_pbb_drs, build_scop_drs): New.
4911         (build_poly_scop): call build_scop_drs.
4913 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
4915         * graphite-scop-detection.c (dot_all_scops_1): Close the table
4916         once per basic block.
4918 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
4920         * graphite-scop-detection.c (graphite_can_represent_scev): New.
4921         (graphite_can_represent_expr): Renamed from loop_affine_expr
4922         and enhanced.
4923         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4924         (graphite_cannot_represent_loop): Add scop_entry to parameters.
4925         (scopdet_basic_block_info): Actually define entry_block.
4926         (stmt_simple_memref_p): Moved here from ...
4928         * tree-data-ref.c (stmt_simple_memref_p): here.
4929         * tree-data-ref.h (stmt_simple_memref_p): Removed.
4931 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
4933         * gcc.dg/graphite/id-4.c: New.
4935 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
4937         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4938         (register_old_and_new_names): Update the content of the map.
4939         When there was already a rename_map_elt in the map at that
4940         location, free it.
4941         (copy_bb_and_scalar_dependences): Do rename_variables after
4942         expand_scalar_variables.
4943         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4944         of the map.  When there was already a rename_map_elt in the
4945         map at that location, free it.
4946         (translate_clast): Pass the rename_map.  Do not initialize and free
4947         a rename_map per stmt_user.
4948         (gloog): Initialize and free one rename_map and pass it to
4949         translate_clast.
4951 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
4953         * sese.c (expand_scalar_variables_stmt,
4954         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4955         parameter.
4956         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4957         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4958         the gimple_stmt_iterator of the statement to be expanded.
4959         * graphite-scop-detection.c (is_simple_operand): Do handle
4960         REALPART_EXPR.
4962 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4964         * graphite-scop-detection.c (is_simple_operand): Do not handle
4965         REALPART_EXPR.
4966         * gcc.dg/graphite/id-2.c: New.
4968         * graphite-sese-to-poly.c (build_bb_loops,
4969         add_value_to_dim, scan_tree_for_params_right_scev,
4970         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4971         find_params_in_bb, build_loop_iteration_domains,
4972         add_conditions_to_domain): Remove subtract.
4974 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4976         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4977         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4978         pbb_loop_at_index -> gbb_loop_at_index.
4979         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4980         (debug_loop_vec): Delete.
4981         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4982         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
4983         (PBB_LOOPS): Removed.
4984         (PBB_BLACK_BOX): Insert cast.
4985         (pbb_set_black_box): New setter.
4986         (pbb_loop_at_index, pbb_loop_index): Removed.
4987         (scop_set_region, scop_set_nb_params): New.
4988         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4989         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4990         (build_poly_scop): Use scop_set_nb_params.
4991         * sese.h (gimple_bb): Add LOOPS.
4992         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4994 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4996         Revert previous commit.
4998 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5000         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5001         (register_old_and_new_names): Update the content of the map.
5002         When there was already a rename_map_elt in the map at that
5003         location, free it.
5004         (copy_bb_and_scalar_dependences): Do rename_variables after
5005         expand_scalar_variables.
5006         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5007         of the map.  When there was already a rename_map_elt in the
5008         map at that location, free it.
5009         (translate_clast): Pass the rename_map.  Do not initialize and free
5010         a rename_map per stmt_user.
5011         (gloog): Initialize and free one rename_map and pass it to
5012         translate_clast.
5014 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5016         Remove forgotten line in revert.
5018 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5020         Revert previous commit.
5022 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5024         * sese.c (register_old_and_new_names): Update the content
5025         of the map.  When there was already a rename_map_elt in the
5026         map at that location, free it.
5027         (copy_bb_and_scalar_dependences): Do rename_variables after
5028         expand_scalar_variables.
5029         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5030         of the map.  When there was already a rename_map_elt in the
5031         map at that location, free it.
5032         (translate_clast): Pass the rename_map.  Do not initialize and free
5033         a rename_map per stmt_user.
5034         (gloog): Initialize and free one rename_map and pass it to
5035         translate_clast.
5037 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5039         * graphite-clast-to-gimple.c (translate_clast): context_loop
5040         is never NULL.
5042 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5043             Sebastian Pop  <sebastian.pop@amd.com>
5045         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5046         of the use of ppl_Polyhedron_map_space_dimensions.
5048 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5049             Sebastian Pop  <sebastian.pop@amd.com>
5051         * graphite-poly.c (unify_scattering_dimensions): Fix types.
5052         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5053         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5054         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5055         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5056         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5057         pbb_nb_params): New.
5058         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5059         nb_loops_around_pbb): Adapt return types.
5061 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5063         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5064         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5065         graphite-scop-detection.o, graphite-poly.o): Add
5066         more headers.
5068 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5070         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5071         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5072         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5074 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5076         * gcc.dg/graphite/pr37485.c: Remove -floop-block
5077         * gcc.dg/graphite/pr37828.c: Same.
5078         * gcc.dg/graphite/pr37684.c: Same.
5079         * gcc.dg/graphite/block-0.c: Same.
5080         * gcc.dg/graphite/block-1.c: Same.
5081         * gcc.dg/graphite/block-2.c: Same.
5082         * gcc.dg/graphite/block-3.c: Same.
5083         * gcc.dg/graphite/block-4.c: Same.
5084         * gcc.dg/graphite/block-5.c: Same.
5085         * gcc.dg/graphite/block-6.c: Same.
5086         * gfortran.dg/graphite/pr38083.f90: Same.
5087         * gfortran.dg/graphite/block-1.f90: Same.
5088         * gfortran.dg/graphite/block-3.f90: Same.
5089         * gfortran.dg/graphite/pr37852.f90: Same.
5090         * gfortran.dg/graphite/block-4.f90: Same.
5091         * gfortran.dg/graphite/pr37980.f90: Same.
5092         * gfortran.dg/graphite/pr38953.f90: Same.
5093         * gfortran.dg/graphite/pr37857.f90: Same.
5094         * opts.c: Remove -floop-block from -O2.
5095         * graphite-poly.c: Fail if -floop-block -floop-interchange or
5096         -floop-strip-mine are used.
5098 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5099             Sebastian Pop  <sebastian.pop@amd.com>
5101         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5102         dimensions.
5103         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5104         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5105         strip_mine_profitable_p, is_interchange_valid,
5106         graphite_trans_bb_block, graphite_trans_loop_block,
5107         graphite_trans_scop_block): Temporary removed.
5108         (extend_scattering, unify_scattering_dimensions): New.
5109         (print_scattering_function, graphite_read_transforms):
5110         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5111         (graphite_generate_scattering_fns): Removed.
5112         (apply_poly_transforms): Cleanup.
5113         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5114         (schedule_to_scattering): Moved.
5115         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5116         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5117         (pbb_nb_scattering): New.
5118         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5119         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5120         Removed.
5121         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5122         shift_poly.
5123         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5124         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
5125         -> PBB_TRANSFORMED_SCATTERING.
5126         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5127         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5128         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5129         (check_poly_representation): Do not return bool.
5130         (graphite_transform_loops): Reformat.
5131         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5133 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
5135         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5136         debug_pbb_domain, debug_pbb, debug_scop): New.
5137         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5138         debug_pbb_domain, debug_pbb, debug_scop): Declared.
5140 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5142         PR middle-end/39335
5143         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5144         when the type precision of the induction variable should be
5145         larger than the type precision of nit.
5146         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5147         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5148         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5150         * gcc.dg/graphite/pr39335_1.c: New.
5151         * gcc.dg/graphite/pr39335.c: New.
5153 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5155         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5156         SSA_NAMES not struct reduction_info.
5158 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5160         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5162 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5163             Tobias Grosser  <grosser@fim.uni-passau.de>
5165         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5166         (free_sese): Free SESE_REDUCTION_LIST.
5167         * sese.h (struct sese): Add field reduction_list.
5168         (SESE_REDUCTION_LIST): New.
5169         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5170         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5172 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5173             Tobias Grosser  <grosser@fim.uni-passau.de>
5175         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5176         of loop_p.
5178 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5179             Tobias Grosser  <grosser@fim.uni-passau.de>
5181         * tree-parloops.c (struct brli, build_reduction_list_info,
5182         analyze_reduction_list, gather_scalar_reductions): New.
5183         (loop_parallel_p): Build a reduction list containing only
5184         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5185         (gen_parallel_loop): Call the analysis analyze_reduction_list.
5186         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5187         * tree-flow.h (gather_scalar_reductions): Declared.
5189 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
5191         PR middle-end/39308
5192         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5193         number_of_iterations_exit from a gcc_assert.
5195 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
5196             Jan Sjodin  <jan.sjodin@amd.com>
5198         * output.h (graphite_out_file, graphite_in_file): Declared.
5199         * toplev.c (graphite_out_file, graphite_in_file): New.
5200         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5201         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5202         Don't call schedule_to_scattering.
5203         * common.opt (fgraphite-write, fgraphite-read): New.
5204         * graphite-poly.c: Include output.h.
5205         (print_scattering_function, print_scattering_functions,
5206         debug_scattering_function, debug_scattering_functions,
5207         graphite_write_transforms, graphite_read_transforms,
5208         graphite_generate_scattering_fns): New.
5209         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5210         Call graphite_generate_scattering_fns, graphite_write_transforms,
5211         graphite_read_transforms.
5212         (new_poly_bb): Initialize PBB_SCATTERING.
5213         (free_poly_bb): Free PBB_SCATTERING.
5214         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5215         * graphite-poly.h (struct poly_bb): Add field scattering.
5216         (PBB_SCATTERING): New.
5217         (print_scattering_function, print_scattering_functions,
5218         debug_scattering_function, debug_scattering_functions): Declared.
5219         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5220         GMP values, not integers!
5221         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5222         ppl_read_polyhedron_matrix): New.
5223         * graphite-ppl.h (ppl_print_polyhedron_matrix,
5224         debug_ppl_polyhedron_matrix,
5225         ppl_read_polyhedron_matrix): Declared.
5226         * Makefile.in (graphite-poly.o): Depends on output.h.
5228 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5229             Tobias Grosser  <grosser@fim.uni-passau.de>
5231         Revert this change:
5232         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5233         scalar evolutions in the scop_entry->loop_father.
5235 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5236             Tobias Grosser  <grosser@fim.uni-passau.de>
5238         * graphite.h (ref_nb_loops): Remove declaration.
5239         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5240         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5241         debug_gbb): Moved to sese.h.
5242         * sese.h: As said.
5244 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5245             Tobias Grosser  <grosser@fim.uni-passau.de>
5247         * graphite-data-ref.[ch]: Disable.
5249 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5250             Tobias Grosser  <grosser@fim.uni-passau.de>
5252         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5253         scalar evolutions in the scop_entry->loop_father.
5255 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5257         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5258         (graphite_cannot_represent_loop_niter): Renamed
5259         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
5260         (limit_scops): build_sese_loop_nests does not return a bool.
5261         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5262         * sese.c (nb_reductions_in_loop): ... from here.
5263         (graphite_loop_normal_form): ... from here.
5264         (sese_record_loop): Does not fail, so does not return a bool.
5265         (build_sese_loop_nests): Same.
5266         * sese.h (build_sese_loop_nests): Update declaration.
5267         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5268         (build_graphite_loop_normal_form): New.
5269         (gloog): Call build_graphite_loop_normal_form.
5270         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5271         build_sese_loop_nests.
5273         * gcc.dg/graphite/id-1.c: New.
5275 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5276             Tobias Grosser  <grosser@fim.uni-passau.de>
5278         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5279         The SCoP detection fix is sufficient.
5281 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5283         PR tree-optimization/39260
5284         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5285         the basic block contains a condition with a real type.
5286         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5288         * gcc.dg/graphite/pr39260.c: New.
5290 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5292         * graphite-poly.c: Inlcude params.h.
5293         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5294         the size of a tile.
5295         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5296         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5298 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5299             Tobias Grosser  <grosser@fim.uni-passau.de>
5301         * graphite-scop-detection.c (dot_all_scops_1,
5302         dot_all_scops): Moved here.
5303         * graphite-scop-detection.h (dot_all_scops): Declared here.
5304         * graphite.c (graphite_initialize, graphite_finalize): New.
5305         (graphite_transform_loops): Cleaned up.
5306         * sese.c (debug_oldivs): Moved here.
5307         * graphite-poly.c (graphite_apply_transformations): Renamed
5308         apply_poly_transforms.
5309         (debug_loop_vec): Moved here.
5310         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5311         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5312         find_scop_parameters, build_scop_iteration_domain,
5313         add_conditions_to_constraints, build_scop_canonical_schedules,
5314         build_scop_data_accesses): Now static.
5315         (build_poly_scop, check_poly_representation): New.
5317 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5319         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5320         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5321         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5322         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5323         scan_tree_for_params_right_scev, scan_tree_for_params_int,
5324         scan_tree_for_params, struct irp_data, dx_record_params,
5325         find_params_in_bb, find_scop_parameters, gbb_from_bb,
5326         build_loop_iteration_domains, add_conditions_to_domain,
5327         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5328         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5329         build_sese_conditions, add_conditions_to_constraints,
5330         build_scop_iteration_domain, build_access_matrix_with_af,
5331         build_access_matrix,
5332         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5334         * graphite-sese-to-poly.c: New.
5335         * graphite-sese-to-poly.h: New.
5337         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5339 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5341         * graphite.c: Split graphite code generation to a new file.
5342         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5343         max_precision_type, clast_to_gcc_expression_red,
5344         clast_to_gcc_expression, gcc_type_for_clast_expr,
5345         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5346         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5347         graphite_create_new_guard, clast_get_body_of_loop,
5348         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5349         graphite_create_new_loop, build_iv_mapping, copy_renames,
5350         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5351         compute_cloog_iv_types, free_scattering, save_var_name,
5352         initialize_cloog_names, build_scop_context, build_cloog_prog,
5353         set_cloog_options, debug_clast_stmt, scop_to_clast,
5354         print_generated_program, debug_generated_program,
5355         gloog): Moved to graphite-clast-to-gimple.c.
5357         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5359         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5360         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5361         loop_iv_stack_pop, loop_iv_stack_get_iv,
5362         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5363         free_loop_iv_stack, loop_iv_stack_remove_constants,
5364         debug_rename_elt, debug_rename_map_1, debug_rename_map,
5365         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5366         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5367         eq_ivtype_map_elts, sese_add_exit_phis_edge,
5368         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5369         get_vdef_before_sese, sese_adjust_vphi,
5370         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5371         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5372         is_iv, expand_scalar_variables_ssa_name,
5373         expand_scalar_variables_expr, expand_scalar_variables_stmt,
5374         expand_scalar_variables, rename_variables, remove_condition,
5375         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5376         add_loop_exit_phis, insert_loop_close_phis, struct igp,
5377         default_liveout_before_guard, add_guard_exit_phis,
5378         insert_guard_phis, register_old_and_new_names,
5379         graphite_copy_stmts_from_block, register_sese_liveout_renames,
5380         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5381         if_region_set_false_region, create_if_region_on_edge,
5382         move_sese_in_condition): Moved to sese.c.
5384         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5385         if_region_exit, if_region_get_condition_block,
5386         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5387         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5388         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5389         ivtype_map_elt, new_ivtype_map_elt,
5390         recompute_all_dominators): Moved to sese.h.
5392         * graphite-clast-to-gimple.c: New.
5393         * graphite-clast-to-gimple.h: New.
5394         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5395         * sese.c: Modified as said above.
5396         * sese.h: Same.
5398 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5400         * graphite.c: Split scop detection to a new file.
5401         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5402         move_sd_regions, loop_affine_expr, exclude_component_ref,
5403         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5404         graphite_cannot_represent_loop_niter, struct scopdet_info,
5405         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5406         find_single_entry_edge, find_single_exit_edge,
5407         create_single_entry_edge, sd_region_without_exit,
5408         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5409         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5410         Moved to graphite-scop-detection.c.
5412         * graphite-scop-detection.c: New.
5413         * graphite-scop-detection.h: New.
5414         * Makefile.in: Add new rule for graphite-scop-detection.o.
5416         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5417         tree-scalar-evolution.h.
5418         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5419         build_sese_loop_nests): Moved here from graphite.c.
5420         (param_index): Renamed parameter_index_in_region.
5422 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
5423             Sebastian Pop  <sebastian.pop@amd.com>
5425         * gcc.dg/graphite/block-0.c: Expected to fail now.
5426         * gcc.dg/graphite/block-1.c: Same.
5427         * gcc.dg/graphite/block-5.c: Same.
5428         * gcc.dg/graphite/block-6.c: Same.
5430 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
5431             Sebastian Pop  <sebastian.pop@amd.com>
5433         * graphite.h: Separate from graphite_bb_p the polyhedral
5434         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5435         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5436         graphite-data-ref.h.
5437         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5438         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5439         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5440         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5441         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5442         scop_nb_params): Moved to graphite-poly.h.
5443         * graphite-data-ref.c: Same.
5444         * graphite-data-ref.h: New.
5445         * graphite.c: Same.
5446         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5447         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5448         is_interchange_valid, graphite_trans_bb_block,
5449         graphite_trans_loop_block, scop_max_loop_depth,
5450         graphite_trans_scop_block, graphite_apply_transformations,
5451         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5452         graphite-poly.c.
5453         * graphite-poly.h: New.
5454         * graphite-poly.c: New.
5455         * Makefile.in (OBJS-common): Add graphite-poly.o.
5456         (graphite-poly.o): New rule.
5457         * tree-data-ref.h (struct data_reference): Remove unused scop field.
5458         (DR_SCOP): Removed.
5460 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
5461             Tobias Grosser  <grosser@fim.uni-passau.de>
5463         * graphite.c: Replace gb -> gbb.
5464         * graphite.h: Same.
5465         * graphite-data-ref.c: Same.
5467 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
5468             Tobias Grosser  <grosser@fim.uni-passau.de>
5470         * Makefile.in (OBJS-commmon): Add sese.o.
5471         (sese.o): New.
5472         (graphite.o): Add sese.h.
5473         * graphite.c (bb_in_ss_p, loop_in_sese_p,
5474         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5475         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5476         Move to sese.
5477         (block_before_scop): Add missing return.
5478         (new_scop, free_scop): Remove SESE data structures.
5479         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5480         find_scop_parameters, build_loop_iteration_domains,
5481         add_conditions_to_domain, register_scop_liveout_renames,
5482         copy_bb_and_scalar_dependences): Scop -> SESE.
5484         (add_conditions_to_domain): SCoP -> SESE and remove check
5485         (scop_contains_non_iv_scalar_phi_nodes): New.
5486         (build_scop_conditions_1, build_scop_conditions): Remove check for
5487         non iv scalar phi nodes.
5488         (print_scop_statistics): New.
5489         (graphite_transform_loops): Cleanup.
5491         * graphite.h: Move to sese & cleanup.
5492         * sese.c: New.
5493         * sese.h: New.
5495 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5496             Tobias Grosser  <grosser@fim.uni-passau.de>
5498         * graphite.c (build_scop_conditions_1): Conditions are only
5499         at the end of a basic block.
5501 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5502             Tobias Grosser  <grosser@fim.uni-passau>
5504         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5505         field.
5506         (GBB_ALPHA): Removed.
5508 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5509             Tobias Grosser  <grosser@fim.uni-passau.de>
5511         * graphite-data-ref.c (graphite_test_dependence): Don't use
5512         GBB_DYNAMIC_SCHEDULE.
5513         * graphite.c (new_graphite_bb): Same.
5514         (free_graphite_bb): Same.
5515         (build_scop_dynamic_schedules): Removed.
5516         (graphite_transform_loops): Don't call it.
5517         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5518         (GBB_DYNAMIC_SCHEDULE): Removed.
5520 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5521             Tobias Grosser  <grosser@fim.uni-passau.de>
5523         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5524         (print_graphite_bb): Same.
5525         (build_cloog_prog): Same.
5527 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5528             Tobias Grosser  <grosser@fim.uni-passau.de>
5530         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5532 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5533             Tobias Grosser  <grosser@fim.uni-passau.de>
5535         * graphite.c (build_scop_context): Don't use CloogMatrix.
5536         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5537         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5539 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5540             Tobias Grosser  <grosser@fim.uni-passau.de>
5542         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5543         liveout_renames, add_params fields...
5544         (struct sese): ... here.
5545         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5546         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5548 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5549             Tobias Grosser  <grosser@fim.uni-passau.de>
5551         * graphite.c (print_scop): Do not print the CLooG program.
5552         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5553         build_cloog_prog, gloog): Don't use SCOP_PROG.
5554         (find_transform): Renamed scop_to_clast.
5555         (print_generated_program, debug_generated_program): New.
5556         (graphite_transform_loops): Adapt to new interface.
5557         * graphite.h (struct scop): Remove program field.
5558         (SCOP_PROG): Removed.
5559         (print_generated_program, debug_generated_program): Declared.
5561 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5563         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5564         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5565         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5566         free_graphite_bb, build_scop_canonical_schedules,
5567         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5568         schedules are now represented using a ppl_Linear_Expression_t.
5569         * graphite.h (struct graphite_bb): Same.
5570         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5571         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5573 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
5575         * graphite.c: Free local memory.
5576         * graphite-ppl.c: Same.
5578 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
5580         * graphite.c (const_column_index, get_first_matching_sign_row_index,
5581         get_lower_bound_row, get_upper_bound_row, copy_constraint,
5582         swap_constraint_variables, scale_constraint_variable): Removed.
5583         (graphite_trans_bb_strip_mine): Remove pong.
5584         * graphite-ppl.c: Include missing header files.
5585         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5586         * graphite-ppl.h (ppl_strip_loop): Declared.
5587         * Makefile.in (graphite-ppl.o): Adjust dependences.
5589 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
5591         * graphite.c (build_loop_iteration_domains): Remove ping pong.
5592         (build_scop_iteration_domain): Same.
5594 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
5596         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5597         ping pong.
5598         (add_value_to_dim, scan_tree_for_params_right_scev,
5599         scan_tree_for_params_int): New.
5600         * graphite-ppl.c (oppose_constraint): New.
5601         (insert_constraint_into_matrix): Implement missing cases.
5602         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5604 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
5606         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5607         use ppl_move_dimension.
5609 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
5611         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5612         * graphite.c: Same.
5613         * graphite.h: Same.
5614         * graphite-ppl.c: Same.
5615         * graphite-ppl.h: Same.
5617 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
5619         Revert last 3 commits.
5621 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5623         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5624         ping pong.
5625         (add_value_to_dim, scan_tree_for_params_right_scev,
5626         scan_tree_for_params_int): New.
5627         * graphite-ppl.c (oppose_constraint): New.
5628         (insert_constraint_into_matrix): Implement missing cases.
5629         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5631 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5633         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5635 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5636             Tobias Grosser  <grosser@fim.uni-passau.de>
5638         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5639         use ppl_move_dimension.
5640         * graphite-ppl.c (ppl_move_dimension): New.
5641         * graphite-ppl.h (ppl_move_dimension): Declared.
5643 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5645         * graphite.c: Do not include cloog/cloog.h.
5646         (print_graphite_bb): Remove ping pong, call PPL print function.
5648 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5650         * Makefile.in (OBJS-common): Add graphite-ppl.o.
5651         (graphite.o): Add dependence on graphite-ppl.h.
5652         (graphite-ppl.o): New.
5653         (graphite-data-ref.c): Ping pong between PPL data structures
5654         and matrices.
5655         * graphite-ppl.c: New.
5656         * graphite-ppl.h: New.
5657         * graphite.c: Include graphite-ppl.h.
5658         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5659         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5660         Ping pong between PPL data structures and matrices.
5661         (new_graphite_bb): Create a PPL constraint system.
5662         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5663         (build_loop_iteration_domains): Use PPL functions.
5664         * graphite.h: Include graphite-ppl.h.  Fix comments.
5665         (graphite_bb): Use a ppl_Constraint_System_t instead of
5666         CloogMatrix for representing the domain.
5667         (scop): Remove static_schedule.
5668         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5670 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
5672         * graphite.c: Fix some comments.
5674 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
5676         PR middle-end/38953
5677         * graphite.c (if_region_set_false_region): After moving a region
5678         in the false branch of a condition, remove the empty dummy
5679         basic block.
5680         (gloog): Remove wrong fix for PR38953.
5682 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5684         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5685         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5686         register_bb_in_sese, new_sese, free_sese): Moved.
5687         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5688         outermost_loop_in_scop, build_scop_iteration_domain,
5689         expand_scalar_variables_ssa_name, get_vdef_before_scop,
5690         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5691         Use loop_in_sese_p instead of loop_in_scop_p.
5692         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5693         (free_scop): Do not free SCOP_BBS_B.
5694         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5695         ref_nb_loops): Moved here...
5696         * graphite.h (ref_nb_loops): ... from here.
5697         (struct scop): Remove bbs_b bitmap.
5698         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5699         * gcc.dg/graphite/scop-19.c: New
5701 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5703         * graphite.c (scopdet_basic_block_info): Fix bug in scop
5704         detection.
5706 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5708         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5709         eq_loop_to_cloog_loop): Remove.
5710         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5711         * graphite.h (struct scop): Remove loop2cloog_loop.
5712         (loop_domain_dim, loop_iteration_vector_dim): Remove.
5714 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5716         * opts.c (decode_options): Only add graphite options to O2
5717         if we compile with graphite enabled.
5719 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
5721         * Merge from mainline (r143163:143684).
5723 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
5725         * graphite.c (debug_value): Removed.
5726         * graphite.h (debug_value): Removed.
5728 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5730         * passes.c (init_optimization_passes): Do not call pass_copy_prop
5731         after graphite: pass_copy_prop does not maintain a proper loop closed
5732         SSA form.  pass_copy_prop should be fixed.
5734 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5736         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5738 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5740         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5741         (gloog): Split the exit of the scop when the scop exit is a loop exit.
5742         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5743         changed the CFG.
5745 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
5747         * graphite.c (gloog): Return true when code gen succeeded.
5748         (graphite_transform_loops): Do not call cleanup_tree_cfg if
5749         the code of the function did not changed.  After cleanup_tree_cfg
5750         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5751         form.
5753 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
5755         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5756         gimple_call_lhs is NULL.
5758 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
5759             Tobias Grosser  <tobi.grosser@amd.com>
5761         * graphite.c (graphite_trans_scop_block): Do not block single
5762         nested loops.
5764 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
5765             Tobias Grosser  <tobi.grosser@amd.com>
5767         * graphite.c (build_scop_canonical_schedules): Start schedules at
5768         zero.
5770 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
5771             Tobias Grosser  <tobi.grosser@amd.com>
5773         * graphite.c (compare_prefix_loops): New.
5774         (build_scop_canonical_schedules): Rewritten.
5775         (graphite_transform_loops): Move build_scop_canonical_schedules
5776         after build_scop_iteration_domain.
5778 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5779             Tobias Grosser  <tobi.grosser@amd.com>
5781         * graphite.c (add_conditions_to_domain): Add the loops to
5782         the dimension of the iteration domain.  Do copy the domain
5783         only when it exists.
5784         (build_scop_conditions_1): Do not call add_conditions_to_domain.
5785         (add_conditions_to_constraints): New.
5786         (can_generate_code_stmt, can_generate_code): Removed.
5787         (gloog): Do not call can_generate_code.
5788         (graphite_transform_loops): Call add_conditions_to_constraints
5789         after building the iteration domain.
5791 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5792             Tobias Grosser  <tobi.grosser@amd.com>
5793             Jan Sjodin  <jan.sjodin@amd.com>
5795         * graphite.c (scan_tree_for_params): On substractions negate
5796         all the coefficients of the term.
5797         (clast_to_gcc_expression_red): New.  Handle reduction expressions
5798         of more than two operands.
5799         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5800         (get_vdef_before_scop): Handle also the case of default definitions.
5802 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5804         PR middle-end/38431
5805         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5806         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5807         (gloog): Do not call cleanup_tree_cfg.
5808         (graphite_transform_loops): Call cleanup_tree_cfg after all
5809         scops have been code generated.
5811 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
5813         * passes.c (init_optimization_passes): Schedule after
5814         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5816 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
5818         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5819         Fix comment.
5820         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
5821         Set the type of an expression to the type of its assign statement.
5822         (expand_scalar_variables_expr):  Do not pass loop_p.
5823         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
5824         (copy_bb_and_scalar_dependences): Do not pass loop_p.
5825         (translate_clast): Update call to copy_bb_and_scalar_dependences.
5827 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
5829         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5830         an expression to the gimple_expr_type of its assign statement.
5831         (expand_scalar_variables_expr): Stop recursion on tcc_constant
5832         or tcc_declaration.
5834 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
5836         PR tree-optimization/38786
5837         * gcc.dg/graphite/pr38786.c: New.
5838         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5839         the SSA_NAME case of expand_scalar_variables_expr.
5840         (expand_scalar_variables_expr): Also gather the scalar computation
5841         used to index the memory access.
5842         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5843         the gimple_stmt_iterator where it inserts new code.
5845 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
5847         * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5849 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
5851         * opts.c (decode_options): Enable flag_graphite_identity and
5852         flag_loop_block in -O2 and above.
5854 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
5856         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5857         Fix merge problem: replace with the file from trunk.
5859 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
5861         * Merge from mainline (r141727:143163).
5863 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
5864             Jan Sjodin  <jan.sjodin@amd.com>
5866         PR tree-optimization/38559
5867         * gcc.dg/graphite/pr38559.c: New.
5869         * graphite.c (debug_value, copy_constraint,
5870         swap_constraint_variables, scale_constraint_variable, ): New.
5871         (get_lower_bound, get_upper_bound): Removed.
5872         (graphite_trans_bb_strip_mine): Clean up this code that works
5873         only for constant number of iterations.  Fully copy upper and
5874         lower bound constraints, not only the constant part of them.
5875         * graphite.h (debug_value): Declared.
5877 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
5879         PR tree-optimization/38492
5880         PR tree-optimization/38498
5881         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5882         * tree-chrec.h (scev_is_linear_expression): Declared.
5883         * graphite.c (graphite_cannot_represent_loop_niter): New.
5884         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5885         (graphite_loop_normal_form): Use gcc_assert.
5886         (scan_tree_for_params): Use CASE_CONVERT.
5887         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5888         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5889         Use gcc_assert.  Discard scops that contain unhandled cases.
5890         (build_scop_conditions): Return a boolean status for unhandled cases.
5891         (strip_mine_profitable_p): Print the loop number, not its depth.
5892         (is_interchange_valid): Pass the depth of the loop nest, don't
5893         recompute it wrongly.
5894         (graphite_trans_bb_block): Same.
5895         (graphite_trans_bb_block): Print tentative of loop blocking.
5896         (graphite_trans_scop_block): Do not print that the loop has been
5897         blocked.
5898         (graphite_transform_loops): Do not handle scops that contain condition
5899         scalar phi nodes.
5901         * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5902         in trunk.
5903         * gcc.dg/graphite/block-0.c: Update test.
5904         * gcc.dg/graphite/block-1.c: Same.
5905         * gcc.dg/graphite/block-2.c: Remove xfail and test for
5906         blocking.
5907         * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5908         * gcc.dg/graphite/block-3.c: New.
5909         * gcc.dg/graphite/pr38498.c: New.
5911 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
5913         PR tree-optimization/38510
5914         * gcc.dg/graphite/pr38510.c: New.
5915         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5916           (translate_clast): Call recompute_all_dominators before
5917           graphite_verify.
5918           (gloog): Call recompute_all_dominators before graphite_verify.
5920 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
5922         PR tree-optimization/38492
5923         * graphite.c (rename_map_elt, debug_rename_elt,
5924         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5925         rename_map_elt_info, eq_rename_map_elts,
5926         get_new_name_from_old_name, bb_in_sese_p): Moved around.
5927         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5928         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5929         (sese_build_livein_liveouts): New.
5930         (new_sese, free_sese): New.
5931         (new_scop): Call new_sese.
5932         (free_scop): Call free_sese.
5933         (rename_variables_from_edge, rename_phis_end_scop): Removed.
5934         (register_old_new_names): Renamed register_old_and_new_names.
5935         (register_scop_liveout_renames, add_loop_exit_phis,
5936         insert_loop_close_phis, struct igp,
5937         default_liveout_before_guard, add_guard_exit_phis,
5938         insert_guard_phis, copy_renames): New.
5939         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5940         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5941         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5942         (scop_adjust_phis_for_liveouts): New.
5943         (gloog): Call scop_adjust_phis_for_liveouts.
5945         * graphite.h (struct sese): Documented.  Added fields liveout,
5946         num_ver and livein.
5947         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5948         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5949         (struct scop): Added field liveout_renames.
5950         (SCOP_LIVEOUT_RENAMES): New.
5952 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
5954         PR tree-optimization/38409
5955         * gcc.dg/graphite/pr38409.c: New.
5956         * graphite.c (nb_reductions_in_loop): Use simple_iv.
5958 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
5960         * graphite.c (gcc_type_for_cloog_iv): By default return
5961         integer_type_node.
5962         (graphite_create_new_loop): Don't fold_convert the already
5963         fold_convert-ed expression.
5965 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
5967         PR tree-optimization/38446
5968         * gcc.dg/graphite/pr38446.c: New.
5969         * graphite.c (register_bb_in_sese): New.
5970         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5971         looking at the bbs in the region.
5972         * graphite.h (sese): Add region_basic_blocks pointer set to
5973         structure and initialize at the time of defining new scop.
5975 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5977         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5978         (find_params_in_bb): Do not free data refs.
5979         (free_graphite_bb): Add FIXME on disabled free_data_refs.
5981 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
5983         * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5984         * gcc.dg/graphite/scop-17.c: Same.
5985         * gcc.dg/graphite/block-5.c: New.
5986         * gcc.dg/graphite/block-6.c: New.
5987         * gcc.dg/graphite/pr37485.c: Clean dump file after.
5988         * gcc.dg/graphite/pr37684.c: Same.
5989         * gcc.dg/graphite/block-2.c: Same.
5991         * graphite.c (struct ivtype_map_elt): New.
5992         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5993         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5994         gcc_type_for_cloog_iv): New.
5995         (loop_iv_stack_patch_for_consts): Use the type of the induction
5996         variable from the original loop, except for the automatically
5997         generated loops, i.e., in the case of a strip-mined loop, in
5998         which case there is no original loop: in that case just use
5999         integer_type_node.
6000         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6001         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6002         (clast_name_to_gcc): Accept params to be NULL.
6003         (clast_to_gcc_expression): Take an extra parameter for the type.
6004         Convert to that type all the expressions built by this function.
6005         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6006         (graphite_translate_clast_equation): Compute the type of the
6007         clast_equation before translating its LHS and RHS.
6008         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6009         (graphite_create_new_loop): Compute the type of the induction
6010         variable before translating the lower and upper bounds and before
6011         creating the induction variable.
6012         (rename_variables_from_edge, rename_phis_end_scop): New.
6013         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6014         (sese_add_exit_phis_edge): Do not use integer_zero_node.
6015         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6016         compute_cloog_iv_types): New.
6017         (gloog): Call compute_cloog_iv_types before starting the
6018         translation of the clast.
6020         * graphite.h (struct graphite_bb): New field cloog_iv_types.
6021         (GBB_CLOOG_IV_TYPES): New.
6022         (debug_ivtype_map): Declared.
6023         (oldiv_for_loop): New.
6025 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
6027         PR middle-end/38459
6028         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6029         (param_index): Assert if parameter is not know after parameter
6030         detection.
6031         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6032         (find_scop_parameters): Mark, that we have finished parameter
6033         detection.
6034         (graphite_transform_loops): Move condition detection before parameter
6035         detection.
6036         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6037         * gfortran.dg/graphite/pr38459.f90: New.
6039 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6041         * graphite.c (graphite_transform_loops): Always call find_transform ()
6042         in ENABLE_CHECKING.  So we test these code paths, even if we do not
6043         generate code.
6045 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6047         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6048         (print_scop): Ditto.
6050 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6052         PR middle-end/38084
6053         Fix gfortran.dg/graphite/id-3.f90.
6054         * graphite.c (scopdet_basic_block_info): Fix bug that found some
6055         regions more than once.
6057 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6059         Fix gfortran.dg/graphite/id-4.f90.
6060         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6061         when not needed.
6063 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6065         Fix gfortran.dg/graphite/id-1.f90.
6066         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6067         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6068         (max_precision_type): New.
6069         (value_clast): Removed.
6070         (clast_to_gcc_expression): Be more careful to types of expressions.
6071         Use max_precision_type and update use of gmp_cst_to_tree.
6072         (graphite_translate_clast_equation): Use max_precision_type.
6073         (graphite_create_guard_cond_expr): Do not use integer_type_node,
6074         use the type of the condition.
6075         (graphite_create_new_loop): Do not use integer_type_node, use the
6076         max_precision_type of lb and ub.
6078 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6080         * graphite.c (build_scops_1): Initialize open_scop.exit
6081         and sinfo.last.
6083 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6085         * gcc.dg/graphite/pr38084.c: New.
6086         * gfortran.dg/graphite/id-1.f90: New.
6087         * gfortran.dg/graphite/id-2.f90: New.
6088         * gfortran.dg/graphite/id-3.f90: New.
6089         * gfortran.dg/graphite/id-4.f90: New.
6090         * gfortran.dg/graphite/pr37857.f90: New.
6092 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6093             Jan Sjodin  <jan.sjodin@amd.com>
6094             Harsha Jagasia  <harsha.jagasia@amd.com>
6096         PR middle-end/37852
6097         PR middle-end/37883
6098         PR middle-end/37928
6099         PR middle-end/37980
6100         PR middle-end/38038
6101         PR middle-end/38039
6102         PR middle-end/38073
6103         PR middle-end/38083
6104         PR middle-end/38125
6106         * gcc.dg/graphite/pr38073.c: New.
6107         * gcc.dg/graphite/pr37928.c: New.
6108         * gcc.dg/graphite/pr37883.c: New.
6109         * gcc.dg/graphite/pr38125.c: New.
6110         * gfortran.dg/graphite/pr38083.f90: New.
6111         * gfortran.dg/graphite/pr37852.f90: New.
6112         * gfortran.dg/graphite/pr37980.f90: New.
6114         * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6115         the number of detected scops.  Copy exact same test for loop
6116         blocking...
6117         * gcc.dg/graphite/block-1.c: Fix the number of expected
6118         loops to be blocked as reductions are not handled.
6119         * gcc.dg/graphite/block-4.c: ...here.  New.
6121         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6122         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6123         ...here.
6124         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6125         * Makefile.in (graphite.o): Depend on value-prof.h.
6126         (graphite.o-warn): Removed -Wno-error.
6127         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6128         to be a NULL pointer.  Call update_stmt.  Return the newly created
6129         cannonical induction variable.
6131         * graphite.h (debug_rename_map): Declared.  Fix some comments.
6133         * graphite.c: Reimplement the code generation from graphite to gimple.
6134         Include value-prof.h.
6135         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6136         (get_old_iv_from_ssa_name): Removed.
6137         (graphite_stmt_p): New.
6138         (new_graphite_bb): Test for useful statements before building a
6139         graphite statement for the basic block.
6140         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6141         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6142         reason.
6143         (recompute_all_dominators, graphite_verify,
6144         nb_reductions_in_loop, graphite_loop_normal_form): New.
6145         (scop_record_loop): Call graphite_loop_normal_form.
6146         (build_scop_loop_nests): Iterate over all the blocks of the
6147         function instead of relying on the incomplete information from
6148         SCOP_BBS.  Return the success of the operation.
6149         (find_params_in_bb): Use the data from GBB_DATA_REFS.
6150         (add_bb_domains): Removed.
6151         (build_loop_iteration_domains): Don't call add_bb_domains.
6152         Add the iteration domain only to the basic blocks that have been
6153         translated to graphite.
6154         (build_scop_conditions_1): Add constraints only if the basic
6155         block have been translated to graphite.
6156         (build_scop_data_accesses): Completely disabled until data
6157         dependence is correctly implemented.
6158         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6159         (remove_all_edges_1, remove_all_edges): Removed.
6160         (get_new_name_from_old_name): New.
6161         (graphite_rename_variables_in_stmt): Renamed
6162         rename_variables_in_stmt.  Call get_new_name_from_old_name.
6163         Use replace_exp and update_stmt.
6164         (is_old_iv): Renamed is_iv.
6165         (expand_scalar_variables_stmt): Extra parameter for renaming map.
6166         Use replace_exp and update_stmt.
6167         (expand_scalar_variables_expr): Same.  Use the map to get the
6168         new names for the renaming of induction variables and for the
6169         renaming of variables after a basic block has been copied.
6170         (expand_scalar_variables): Same.
6171         (graphite_rename_variables): Renamed rename_variables.
6172         (move_phi_nodes): Removed.
6173         (get_false_edge_from_guard_bb): New.
6174         (build_iv_mapping): Do not insert the induction variable of a
6175         loop in the renaming iv map if the basic block does not belong
6176         to that loop.
6177         (register_old_new_names, graphite_copy_stmts_from_block,
6178         copy_bb_and_scalar_dependences): New.
6179         (translate_clast): Heavily reimplemented: copy basic blocks,
6180         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
6181         At each translation step call graphite_verify ensuring the
6182         consistency of the SSA, loops and dominators information.
6183         (collect_virtual_phis, find_vdef_for_var_in_bb,
6184         find_vdef_for_var_1, find_vdef_for_var,
6185         patch_phis_for_virtual_defs): Removed huge hack.
6186         (mark_old_loops, remove_dead_loops, skip_phi_defs,
6187         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6188         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6189         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6190         if_region_get_condition_block, if_region_set_false_region,
6191         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6192         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6193         sese_add_exit_phis_edge, sese_add_exit_phis_var,
6194         rewrite_into_sese_closed_ssa): New.
6195         (gloog): Remove dead code.  Early return if code cannot be
6196         generated.  Call cleanup_tree_cfg once the scop has been code
6197         generated.
6198         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6199         block loops with less than two loops.
6200         (graphite_apply_transformations): Remove the call to
6201         scop_remove_ignoreable_gbbs.
6202         (limit_scops): When build_scop_loop_nests fails, continue on
6203         the next scop.  Fix open_scop.entry.
6204         (graphite_transform_loops): Call recompute_all_dominators: force the
6205         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6206         Call initialize_original_copy_tables and free_original_copy_tables
6207         to be able to copy basic blocks during code generation.
6208         When build_scop_loop_nests fails, continue on next scop.
6209         (value_clast): New union.
6210         (clast_to_gcc_expression): Fix type cast warning.
6212 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
6214         * Merge from mainline (r140838:141727).
6216 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6218         PR middle-end/37833
6220         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6222 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6224         PR middle-end/37943
6226         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6227         exits and conditions.
6228         * gcc.dg/graphite/pr37943.c: New.
6230 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6232         PR middle-end/37886
6233         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6235 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6237         * doc/invoke.texi: Fix spaces.
6239 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
6241         PR tree-optimization/37891
6242         Reverted last commit.
6243         * graphite.c (create_single_entry_edge): Set
6244         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6246 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
6247             Mitul Thakkar  <mitul.thakkar@amd.com>
6249         * graphite.c (create_single_entry_edge): Set
6250         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6252 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
6254         * doc/invoke.texi: Add -fgraphite-identity.
6255         * graphite.c (graphite_apply_transformations): Check for
6256         -fgraphite-identity.
6257         * toplev.c (process_options): Add flag_graphite_identity.
6258         * tree-ssa-loop.c: Add flag_graphite_identity.
6260 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6262         Undo changes from 2008-10-02:
6263         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6264         operand type when copying the operand to a variable of different type.
6265         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6266         with the IV name after increment.
6268 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6269             Harsha Jagasia  <harsha.jagasia@amd.com>
6271         PR tree-optimization/37828
6272         * gcc.dg/graphite/pr37828.c: New.
6273         * graphite.c (graphite_trans_loop_block): Do not loop block
6274         single nested loops.
6276 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
6277             Sebastian Pop  <sebastian.pop@amd.com>
6279         * graphite.c (struct rename_map_elt, new_rename_map_elt,
6280         rename_map_elt_info, eq_rename_map_elts): New.
6281         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6282         (expand_scalar_variables_expr): Change parameters.
6283         (expand_scalar_variables_stmt): Same.
6284         (expand_scalar_variables): Same.
6285         (graphite_rename_ivs): Rename graphite_rename_variables.
6286         (build_iv_mapping): New.
6287         (translate_clast): Call build_iv_mapping.
6288         * graphite.h (gbb_p): New name.
6290 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
6292         PR tree-optimization/37684
6293         * gcc.dg/graphite/pr37684.c: New.
6294         * graphite.c (exclude_component_ref): New.
6295         (is_simple_operand): Call exclude_component_ref.
6297 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
6298             Harsha Jagasia  <harsha.jagasia@amd.com>
6300         PR tree-optimization/37485
6301         * gcc.dg/graphite/block-2.c: New
6302         * graphite.c (gmp_cst_to_tree): Moved.
6303         (iv_stack_entry_is_constant): New.
6304         (iv_stack_entry_is_iv): New.
6305         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6306         (loop_iv_stack_insert_constant): New.
6307         (loop_iv_stack_pop): Use new datatpype.
6308         (loop_iv_stack_get_iv): Same.
6309         (loop_iv_stack_get_iv_from_name): Same.
6310         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6311         (loop_iv_stack_patch_for_consts): New.
6312         (loop_iv_stack_remove_constants): New.
6313         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6314         (translate_clast): Call loop_iv_stack_patch_for_consts and
6315         loop_iv_stack_remove_constants.
6316         (gloog): Use new datatype.  Redirect construction edge to end
6317         block to avoid accidental deletion.
6318         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
6319         iv stack entry.
6320         (union iv_stack_entry_data): New.  Data in iv stack entry.
6321         (struct iv_stack_entry): New.  Datatype for iv stack entries.
6323 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6325         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6326         operand type when copying the operand to a variable of different type.
6328 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6330         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6331         with the IV name after increment.
6333 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6335         * Merge from mainline (r140164:140838).
6337 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6339         * graphite-data-ref.c: New.
6340         * graphite.c (print_scop): Also dump the dependence graph.
6341         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6342         (new_scop): Initialize SCOP_DEP_GRAPH.
6343         (build_scop_dynamic_schedules): New.
6344         (build_access_matrix_with_af): Fixed column numbering.
6345         (graphite_transform_loops): Call build_scop_dynamic_schedules.
6346         * graphite.h: Add ifndef/define guards against multiple inclusion.
6347         (struct scop): Add dep_graph field.
6348         (SCOP_DEP_GRAPH): Defined.
6349         (ref_nb_loops): Fixed and moved to other position.
6350         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6351         (nb_loops_around_loop_in_scop): New.
6352         (graphite_dump_dependence_graph): Declared.
6353         (graphite_build_rdg_all_levels): Declared.
6354         (graphite_test_dependence): Declared.
6355         * Makefile.in (graphite-data-ref.o): New target.
6357 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
6359         * Merge from mainline (139870:140164).
6361 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6363         * Merge from mainline (138275:139870).
6364         * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6365         the commits from trunk broke the niter detection.
6367 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6369         * graphite.c: Add more documentation.  Fix formatting.
6370         (debug_loop_vec, debug_oldivs, loop_iv_stack,
6371         loop_iv_stack_debug): Moved...
6372         (schedule_to_scattering): Move before use.
6373         (dot_all_scops): Include in "#if 0" the code for system
6374         call dotty.
6376         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6377         loop_iv_stack_debug): ...here.
6379 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
6381         * tree-phinodes.c (make_phi_node): Extern.
6382         (add_phi_node_to_bb): New.
6383         (create_phi_node): Call add_phi_node_to_bb.
6384         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6385         (remove_statement): Handle case where stored phi was updated
6386         and is no longer the same.
6387         * graphite.c (is_parameter): New.
6388         (is_old_iv): New.
6389         (expand_scalar_variables_expr): New.
6390         (expand_scalar_variables_stmt): New.
6391         (expand_scalar_variables): New.
6392         (move_phi_nodes): Create new phi instead of moving old one.
6393         (translate_clast): Call expand_scalar_variables.
6394         (find_vdef_for_var_in_bb): Also scan regular definitions.
6395         (skip_phi_defs): New.
6396         (collect_scop_exit_phi_args): New.
6397         (patch_scop_exit_phi_args): New.
6398         (gloog): Patch phis after scop.
6399         * tree-flow.h: (add_phi_node_to_bb): Declared.
6400         (make_phi_node): Declared.
6402 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6404         * graphite.c (end_scop): Split the entry of the scop when it
6405         is the header of the loop in which the scop is ending.
6406         (build_scops_1, limit_scops): Update uses of end_scop.
6408 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6410         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6411         SCOP_ENTRY or SCOP_EXIT.
6413 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6415         * graphite.c (get_construction_edge): Removed.
6416         (gloog): Construction edge is the scop entry edge.
6418 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6420         * graphite.c (can_generate_for_scop): Removed.
6421         (gloog): Do not call it.
6423 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6425         * graphite.c (new_scop): Entry of a scop is an edge.
6426         Initialize SESE region.
6427         (free_scop): Free SESE region.
6428         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6429         (split_difficult_bb): New, split from end_scop.
6430         (end_scop): Exit of a scop is an edge.
6431         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6432         not automatically updated and thus is always wrong.
6433         * graphite.h (struct sese): New.
6434         (SESE_ENTRY): New.
6435         (SESE_EXIT): New.
6436         (struct scop): New field for a SESE region.  Remove entry, exit.
6437         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6438         semantics as before.  Moved comment around.
6440 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6441             Sebastian Pop  <sebastian.pop@amd.com>
6443         * graphite.c (graphite_transform_loops): Always enable gloog
6444         and find_transform when ENABLE_CHECKING.
6446 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6448         * graphite.c (graphite_transform_loops): Move pretty printer
6449         of SCOPs before doing any transform.  Remove call to print_scops
6450         and dot_all_scops_1.
6452 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6454         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6455         (print_graphite_bb): Same.
6457 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6459         * graphite.c (dot_all_scops_1): Cleanup.
6460         (move_scops): Fix comment.
6462 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6464         * graphite.c (build_scop_bbs): Revert commit 139355:
6466         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6467                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6469                 * graphite.c (build_scop_bbs): Factor up code.
6471 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6473         * graphite.c (gloog): Update dominator info.
6475 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6477         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6479 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6481         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6482         initialization.
6483         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6484         (translate_clast): Correct formatting.
6485         * graphite.h (struct num_map): Removed.
6486         (struct graphite_bb): Remove num_map field.
6487         (GBB_INDEX_TO_NUM_MAP): Removed.
6489 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6491         * graphite.c (build_access_matrix_with_af): Fix comments.
6492         (build_scop_data_accesses): Same.
6494 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6496         * graphite.c (build_scop_data_accesses): Don't construct
6497         access matrices.  Add a FIXME and an assert condition that
6498         should pass when the access matrices will be needed.
6500 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6502         * tree-data-ref.c (stmt_simple_memref_p): Don't call
6503         really_constant_p.
6504         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6505         Moved close by free_graphite_bb.
6506         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
6507         (new_scop): Move close by free_scop.
6508         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6510 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
6512         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6513         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6514         instead of recursive call.
6515         (graphite_translate_clast_equation): New.
6516         (graphite_create_guard_cond_expr): New.
6517         (graphite_create_new_guard): New.
6518         (get_stack_index_from_iv): Removed.
6519         (graphite_rename_ivs_stmt): Use gbb_loop_index.
6520         (get_true_edge_from_guard_bb): New.
6521         (translate_clast): Handle stmt_guard in clast.
6522         (get_construction_edge): Allow construction edge detection for
6523         a scope entry with multiple predecessors if one predecessor is
6524         the immediate dominator of scope entry.
6525         (can_generate_code_stmt): Enable code generation for clast_guard.
6526         (gloog): Use correct context loop.  Removed check for post dominators.
6527         * cfgloop.h (create_empty_if_region_on_edge): Declared.
6529 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6531         * graphite.c (remove_dead_loops): Document better which
6532         loops are removed.
6534 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6536         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6537         and PPLINC.
6538         (graphite.o): Also depends on pointer-set.h.
6540 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6542         * graphite.c (scop_record_loop): Fix compile warning.
6544 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
6545             Sebastian Pop  <sebastian.pop@amd.com>
6547         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6549 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6551         * graphite.c (build_graphite_bb): Initialize bb->aux to
6552         point to the graphite_bb_p.
6553         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6554         content of bb->aux.
6555         (add_bb_domains): Does not use the scop parameter.
6556         (graphite_transform_loops): Clean bb->aux at the end.
6558 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6559             Sebastian Pop  <sebastian.pop@amd.com>
6561         * lib/target-supports.exp
6562         (check_effective_target_fgraphite): New.
6564         * gcc.dg/graphite/graphite.exp: Early exit when
6565         check_effective_target_fgraphite returns false.
6566         Set dg-do-what-default to compile.
6567         (scan-graphite-dump-times): Removed.
6568         * gfortran.dg/graphite/graphite.exp: Same.
6570         * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6571         Use scan-tree-dump-times instead of scan-graphite-dump-times.
6572         * gcc.dg/graphite/scop-1.c: Same.
6573         * gcc.dg/graphite/scop-2.c: Same.
6574         * gcc.dg/graphite/scop-3.c: Same.
6575         * gcc.dg/graphite/scop-4.c: Same.
6576         * gcc.dg/graphite/scop-5.c: Same.
6577         * gcc.dg/graphite/scop-6.c: Same.
6578         * gcc.dg/graphite/scop-7.c: Same.
6579         * gcc.dg/graphite/scop-8.c: Same.
6580         * gcc.dg/graphite/scop-9.c: Same.
6581         * gcc.dg/graphite/scop-10.c: Same.
6582         * gcc.dg/graphite/scop-11.c: Same.
6583         * gcc.dg/graphite/scop-12.c: Same.
6584         * gcc.dg/graphite/scop-13.c: Same.
6585         * gcc.dg/graphite/scop-matmult.c: Same.
6586         * gcc.dg/graphite/scop-14.c: Same.
6587         * gcc.dg/graphite/scop-15.c: Same.
6588         * gcc.dg/graphite/block-0.c: Same.
6589         * gcc.dg/graphite/scop-16.c: Same.
6590         * gcc.dg/graphite/block-1.c: Same.
6591         * gcc.dg/graphite/scop-17.c: Same.
6592         * gcc.dg/graphite/scop-18.c: Same.
6593         * gfortran.dg/graphite/block-1.f90: Same.
6594         * gfortran.dg/graphite/scop-1.f: Same.
6595         * gfortran.dg/graphite/block-2.f: Same.
6597 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6599         * graphite.c: Fix some XXX comments.
6600         (build_scop_dynamic_schedules): Removed.
6602 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6604         * graphite.h (scop_max_loop_depth): Moved...
6605         * graphite.c (scop_max_loop_depth): ...here.
6606         (remove_all_edges_1): New.
6607         (remove_all_edges): Factored code.
6608         (remove_cond_exprs): Check only the last statement for
6609         a GIMPLE_COND expression.
6611 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6613         * graphite.c (scan_tree_for_params): Early return when the
6614         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
6615         (find_scop_parameters): Factor out code.
6616         (graphite_trans_bb_strip_mine): Remove dead code.
6618 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6620         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6621         graphite_trans_bb_move_loop): Factor asserts.
6622         (gloog): Perform sanity checks only for ENABLE_CHECKING.
6623         Do not call calculate_dominance_info and estimate_bb_frequencies.
6625 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
6627         * graphite.c (create_loops_mapping, free_loops_mapping,
6628         create_loops_mapping_num, debug_loop_mapping_1,
6629         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6630         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6631         graphite_loops_mapping_add_child_num,
6632         graphite_loops_mapping_insert_child,
6633         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6634         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6635         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6636         create_num_from_index, get_num_from_index,
6637         swap_loop_mapped_depth): Removed.
6638         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6639         (free_scop): Do not call free_loops_mapping.
6640         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6641         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
6642         get_loop_mapped_depth.
6643         (graphite_trans_bb_move_loop): Do not update the loop mapping.
6644         (graphite_trans_bb_strip_mine): Same.
6645         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6646         (struct scop): Remove field loops_mapping.
6648 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6649             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6651         * graphite.c (scop_record_loop): Factor out one level of the
6652         condition by early return.
6653         (build_scop_loop_nests): Format following FSF coding style.
6654         (build_scop_dynamic_schedules): Factor out code.
6655         (scopdet_bb_info): Reindent.  Default case should not be reachable.
6657 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6658             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6660         * graphite.c (loop_affine_expr): Check for DECL_P or struct
6661         assignments that are not handled as simple operands for now.
6663 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6664             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6666         * graphite.c (build_scop_bbs): Factor up code.
6668 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6669             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6671         * graphite.c (stmt_simple_for_scop_p): Factor code out
6672         of the loop.
6673         (enum gbb_type): New.  Group all the GBB_* types under it.
6674         (is_loop_exit): Moved...
6675         (end_scop): Enable BB spliting.
6676         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
6677         * cfgloop.h (is_loop_exit): Declared.
6679 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6681         * doc/invoke.texi: Remove strides from examples containing
6682         DO loops when the strides are equal to 1.
6684 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
6685             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6687         * graphite.c (graphite_trans_scop_block): Or the result with
6688         the result from graphite_trans_loop_block.
6689         * gcc.dg/graphite/block-1.c: New.
6690         * gfortran.dg/graphite/block-1.f90: New.
6691         * gfortran.dg/graphite/block-2.f: New.
6693 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6695         * graphite.c (graphite_transform_loops): Call cloog_initialize
6696         and cloog_finalize.
6698 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6700         * tree-data-ref.c) (stmt_simple_memref_p): New.
6701         * tree-data-ref.h (stmt_simple_memref_p): Declared.
6702         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6703         (is_simple_operand): Call stmt_simple_memref_p.
6705         * gcc.dg/graphite/scop-matmult.c: Updated for not
6706         using pointer arithmetic, as this is optimized by PRE and
6707         makes the code too difficult to analyze.
6709         * gcc.dg/graphite/scop-18.c: Same.
6711 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6713         * gdbinit.in (pgg): New.
6715 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6717         * graphite.c (graphite_trans_loop_block): Fix warning.
6719 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6721         * graphite.c (graphite_trans_loop_block): Fix my merge error.
6723 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6725         * graphite.c (graphite_trans_bb_block): Remove check for
6726         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6727         Check if loop blocking is profitable for every loop, before applying
6728         the changes.
6729         (graphite_apply_transformations): Call graphite_trans_bb_block only,
6730         if flag_loop_block is set.
6732 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6734         * graphite.c: Add some more documentation for the loop
6735         mapping.
6737 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6739         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6740         * graphite.c: Format on less than 80 columns.
6741         * graphite.h: Same.
6743 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6745         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6747 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6749         * doc/invoke.texi (floop-block, floop-strip-mine,
6750         floop-interchange): Update documentation with examples.
6752 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
6754         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6755         add_referenced_var.
6756         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6758 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
6760         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6761         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
6762         * tree-scalar-evolution.c: Revert useless changes.
6763         * tree-phinodes.c: Same.
6764         * cfghooks.c: Same.
6765         * vec.h: Same.
6766         * tree-vectorizer.h: Same.
6767         * tree-flow.h: Same.
6768         * tree-cfg.c: Same.
6769         * common.opt (fgraphite): Update documentation.
6771 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
6773         * doc/invoke.texi (-floop-block, -floop-strip-mine,
6774         -floop-interchange): Add more text for explaining what each of these
6775         flags is doing.
6776         * tree-into-ssa.c (gimple_vec): Moved to...
6777         * graphite.c: Include gimple.h.
6778         (gimple_vec): Moved to...
6779         (del_loop_to_cloog_loop): Removed.
6780         (loop_affine_expr): Do not call create_data_ref when the
6781         operand is a constant.
6782         (new_scop): Use free instead of del_loop_to_cloog_loop.
6783         * Makefile.in (graphite.o): Depend on GIMPLE_H.
6784         * gimple.h (gimple_vec): ... here.
6786 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6788         * graphite.c (scopdet_bb_info): Only allow loops with known number of
6789         latch executions.
6790         (build_loop_iteration_domains): Fail, if latch executions unknown.
6792 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6794         * graphite.c (add_conditions_to_domain): New.
6795         (build_scop_conditions_1): Call add_conditions_to_domain.
6796         (set_cloog_options): Allow to disable optimizations.
6798 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6800         * graphite.c (find_params_in_bb): Look for parameters in conditions.
6801         Do not use walk_dominator_tree.
6802         (find_scop_parameters): Do not use walk_dominator_tree.
6804 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6806         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6807         (idx_record_params): Adapt.
6808         * graphite.h (scop_gimple_loop_depth): New.
6810 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6812         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6813         (scan_tree_for_params): Remove value_init.
6814         (build_scop_context): Remove value_init.
6815         (build_loop_iteration_domains): Remove value_init.
6816         (schedule_to_scattering): Remove value_init.
6817         (graphite_trans_bb_strip_mine): Remove value_init.
6819 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6821         * gcc/graphite.c (limit_scops): New.
6822         (graphite_transform_loops): Add limit SCoPs.
6823         * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6824         * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6825         * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6826         * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6827         * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6828         * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6829         * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6830         * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6831         * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6832         Change loop numbers.
6833         * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6834         Change loop numbers.
6835         * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6836         * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6837         * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6838         * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6839         * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6840         * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6841         * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6842         * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6843         * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6844         * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6846 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6848         * graphite.c (graphite_transform_loops): Call always find_transform.
6850 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6852         * graphite.c (free_loops_mapping): New.
6853         (stmt_simple_for_scop_p): Fix typo.
6854         (stmt_simple_for_scop_p): Fix tuples functions, that
6855         broke polyhedron.
6856         (free_graphite_bb): Fix some memleaks.
6857         (free_scop): Fix some memleaks.
6858         (scopdet_bb_info): Do not forget some tmp SCoPs.
6859         (find_params_in_bb): Fix some memleaks.
6860         (clast_to_gcc_expression): Fix warning.
6862 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
6864         * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6865         * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6867 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
6869         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6870         Move code ifdef-ed HAVE_cloog...
6871         * graphite.c: Include toplev.h.
6872         ... here.
6873         * Makefile.in (OBJS-common): Always build graphite.o.
6874         (BACKEND): Remove @GRAPHITE@.
6875         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6876         (graphite.o): Depend on TOPLEV_H.
6878 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
6880         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6881         Remove typo left from polylib to ppl conversion.
6882         * graphite.c (graphite_transforms): Use sorry instead of fatal.
6884 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
6886         * toplev.c (process_options): Move the graphite loop optimization
6887         flags...
6888         * tree-ssa-loop.c (graphite_transforms): ... here.
6889         When not configured with CLooG, print to dump_file that
6890         Graphite transforms were not performed.
6891         * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6892         New.
6893         * gcc.dg/graphite/*.c: Updated all testcases to use
6894         scan-graphite-dump-times.
6896 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
6898         * graphite.c (dot_scop, dot_all_scops): Do not call system.
6899         Do not open /tmp/scop.dot and /tmp/allscops.dot.
6901 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
6902             Jan Sjodin  <jan.sjodin@amd.com>
6904         * configure: Regenerated.
6905         * omp-low.c (expand_omp_sections): Remove now unused code.
6906         * config.in (HAVE_polylib): Removed.
6907         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6908         (PPLLIBS, PPLINC): Added.
6909         * graphite.c: Replace unsigned with int wherever possible.
6910         Don't access Cloog's data structures, but use accessor functions.
6911         Clast's stmt->type is now implemented as a vtable: change the
6912         switches of stmt->type into ifs.
6913         (polylib/polylibgmp.h): Don't include.
6914         (initialize_dependence_polyhedron,
6915         initialize_data_dependence_polyhedron, is_empty_polyhedron,
6916         statement_precedes_p, test_dependence, build_rdg_all_levels,
6917         dump_dependence_graph): Removed until this code is cleaned up
6918         or ported to Cloog.
6919         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6920         (POLYLIBINC): Renamed PPLINC.
6922 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
6923             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6924             Jan Sjodin  <jan.sjodin@amd.com>
6926         Finish the merge and tuplification of graphite.
6928 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
6929             Jan Sjodin  <jan.sjodin@amd.com>
6931         Partial merge from mainline (138072:138275).
6932         * graphite.c still has to be tuplified.
6934 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
6936         * graphite.c (graphite_loops_mapping_max_loop_num): New.
6937         (create_num_from_index): New.
6938         (get_num_from_index): Also pass in the graphite BB.
6939         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6940         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6941         (graphite_trans_bb_strip_mine): Call create_num_from_index.
6942         (is_interchange_valid): Return false when failing.
6943         * graphite.h (struct num_map): New.
6944         (struct graphite_bb): New field num_map.
6945         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6947 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6949         * graphite.c (dump_gbb_conditions): Print also conditions like
6950         "if (a)".  Remove dublicated code and use print_generic_expr ().
6951         (stmt_simple_for_scop_p): Only allow conditions we can handle
6952         {<, <=, >, >=}.
6954 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
6956         * graphite.h (struct scop): Removed new_ivs field.
6957         (SCOP_NEWIVS): Deleted.
6958         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6959         clast_to_gcc_expression, graphite_create_new_loop):
6960         Removed use of new_ivs.
6962 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
6964         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6965         create_loops_mapping_num, debug_loop_mapping_1): New.
6966         (debug_loop_mapping): Call debug_loop_mapping_1.
6967         (get_loop_mapping_for_num,
6968         graphite_loops_mapping_add_child,
6969         graphite_loops_mapping_add_child_num,
6970         graphite_loops_mapping_insert_child,
6971         graphite_loops_mapping_parent,
6972         split_loop_mapped_depth_for_num,
6973         loop_mapped_depth_split_loop): New.
6974         (increment_loop_mapped_depths): Removed.
6975         (swap_loop_mapped_depth_for_num): Reimplemented.
6976         (new_scop): Call create_loops_mapping.
6977         (scop_record_loop): Call graphite_loops_mapping_insert_child.
6978         (translate_clast): Pass the old loop father in parameter, and pass
6979         it to get_old_iv_from_ssa_name.
6980         (remove_edges_around_useless_blocks, can_generate_code_stmt,
6981         can_generate_code, can_generate_for_scop): New.
6982         (graphite_trans_bb_block): Returns false when it fails to transform.
6983         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6985 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
6987         Reverted all the changes related to the streamization and
6988         loop fusion.
6989         These changes are now tracked in the streamization branch.
6991 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
6992             Jan Sjodin  <jan.sjodin@amd.com>
6994         * graphite.c (gbb_compare): Correctly constify.
6995         (gbb_can_be_ignored): Indent.
6996         (graphite_trans_scop_swap_1and2): Add legality check.
6997         Remove dead FIXMEs.
6999 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7001         Remove fallouts from "Reverted the Condate changes".
7002         * tree.h: Remove unused decl.
7003         * gcc.dg/tree-checker: Same.
7004         * timevar.def: Remove counter.
7006 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
7008         * Merge from mainline (135673:138072).
7010         Reverted the MIRO changes (from 2008-04-05) that are now
7011         tracked in the miro branch.
7012         * tree-bounds.c: Removed.
7013         * tree-bounds.h: Removed.
7015         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7016         are now tracked in the condate branch.
7017         * tree-check.c: Removed.
7018         * tree-match.c: Removed.
7019         * condate.y: Removed.
7021 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7023         * common.opt: New user flag -floop-block, -floop-strip-mine
7024         and -floop-interchange.
7025         * toplev.c (process_options): Enable -fgraphite pass if any one of the
7026         graphite loop optimization flags is turned on.
7027         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7028         flag_loop_strip_mine and flag_loop_interchange checks before
7029         optimizations.
7030         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7031         -floop-strip-mine and -floop-interchange.
7032         * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7033         -fgraphite.
7034         * gcc.dg/graphite/scop-16.c: Ditto.
7035         * gcc.dg/graphite/scop-17.c: Ditto.
7036         * gcc.dg/graphite/scop-18.c: Ditto.
7038 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
7039             Sebastian Pop  <sebastian.pop@amd.com>
7041         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7042         (create_empty_loop_on_edge): More fixes.
7043         * tree-phinodes.c (resize_phi_node): Extern.
7044         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7045         * cfghooks.c (update_dominator_information): New split from
7046         split_edge.
7047         * tree-vectorizer.c (rename_variables_in_bb): Extern.
7048         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7049         successor of the function entry block.
7051         * graphite.c: Include pointer-set.h.
7052         (debug_loop_mapping, increment_loop_mapped_depths,
7053         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7054         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7055         swap_loop_mapped_depth_for_num, get_num_from_index,
7056         swap_loop_mapped_depth, loop_iv_stack_debug,
7057         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7058         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7059         get_old_iv_from_ssa_name): New.
7060         (new_scop): Initialize SCOP_LOOPS_MAPPING.
7061         (free_scop): Free SCOP_LOOPS_MAPPING.
7062         (scop_record_loop): Record old ivs.
7063         (create_var_name): Removed.
7064         (initialize_cloog_names): Allocate double space in case strip mine
7065         applies to all loops once.
7066         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7067         (clast_to_gcc_expression): Same.  Implement more clast to gimple
7068         translation.
7069         (graphite_create_new_loop): Pass in ivstack.
7070         (remove_all_edges): Pass in the construction_edge.
7071         (graphite_remove_iv): Removed.
7072         (graphite_rename_ivs, graphite_rename_ivs_stmt,
7073         remove_cond_exprs): Rewritten.
7074         (move_phi_nodes): New.
7075         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7076         (translate_clast): Pass in ivstack.  Rewrite some cases.
7077         (set_cloog_options, debug_clast_stmt): New.
7078         (find_transform): Use set_cloog_options.
7079         (outermost_loop_layer): Removed.
7080         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7081         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7082         mark_old_loops, remove_dead_loops): New.
7083         (gloog): Rewritten.
7084         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7085         (const_column_index, get_first_matching_sign_row_index,
7086         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7087         get_upper_bound): New.
7088         (graphite_trans_bb_strip_mine): Also update the iv map.
7090         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7091         (struct name_tree): Add a loop field.
7092         (struct scop): Add a graphite_loops_mapping field.
7093         (SCOP_LOOPS_MAPPING): New.
7094         (debug_clast_stmt): Declare.
7095         * lambda.h (find_induction_var_from_exit_cond): Declare.
7096         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7097         * cfgloop.h (update_dominators_in_loop): Removed declaration.
7098         (create_empty_loop_on_edge): Updated.
7099         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7100         rename_variables_in_bb): Declare.
7101         * tree-cfg.c (remove_bb): Extern.
7103         * gcc.dg/graphite/block-0.c: New.
7105 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7106             Sebastian Pop  <sebastian.pop@amd.com>
7108         * graphite.c (strip_mine_profitable_p): New.
7109         (graphite_trans_bb_block): Disable strip mining if not profitable.
7111         * gcc.dg/graphite/scop-18.c: New.
7112         * gcc.dg/graphite/scop-17.c: Fixed.
7113         * gcc.dg/graphite/scop-16.c: Fixed.
7115 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
7116             Jan Sjodin  <jan.sjodin@amd.com>
7117             Sebastian Pop  <sebastian.pop@amd.com>
7119         * graphite.c (is_interchange_valid): New.
7120         (graphite_trans_bb_block): Check loop nest of basic block for legality
7121         of interchange.
7123         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7124         outer_most_loop, gbb_outer_most_loop_index): New.
7126         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7127         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7128         * gcc.dg/graphite/scop-16.c: New.
7129         * gcc.dg/graphite/scop-17.c: New.
7131 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7133         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7134         (graphite_trans_scop_block): Ignore SCoPs without bbs.
7136 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7138         * graphite.c (new_scop): Initialize SCOP_EXIT.
7139         (scopdet_info): Add.
7140         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7141         (build_scops_1): Cleanup, bugfixes.
7142         (build_scops): Cleanup.
7144         * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7145         * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7147 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7149         * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7151         * gfortran.dg/graphite/graphite.exp: Use
7152         DEFAULT_GRAPHITE_FLAGS.
7154         * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7156 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7158         * graphite.c (scan_tree_for_params): Do not assert any more if
7159         MULT_EXPR parameter is negative.
7161         * gfortran.dg/graphite/scop-1.f: New.
7163         * gfortran.dg/graphite/graphite.exp: New.
7165         * gcc.dg/graphite/scop-15.c: New.
7167 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7169         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7171 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7173         * graphite.c (graphite_trans_bb_swap_loops): Rename from
7174         graphite_swap_loops.
7175         (graphite_trans_bb_move_loop): New.
7176         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7177         (graphite_trans_bb_block): New.
7178         (graphite_trans_loop_block): New.
7179         (graphite_trans_scop_swap_1and2): Rename from
7180         graphite_trans_swap_1and2.
7181         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7182         (graphite_trans_scop_block): New.
7183         (graphite_apply_transformations): Rename from
7184         graphite_transformations.
7186         * gcc.dg/graphite/scop-matmult.c: New.
7188 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7190         * graphite.c (gbb_compare): New.
7191         (graphite_sort_gbbs): New.
7192         (gbb_can_be_ignored): New.
7193         (scop_remove_ignoreable_gbbs): New.
7194         (graphite_transformations): Cleanup and add
7195         scop_remove_ignoreable_gbbs.
7196         * lambda.h (lambda_vector_compare): New.
7198 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
7200         * graphite.c (print_graphite_bb): Correct printing of static schedule.
7201         (graphite_swap_loops): int -> unsigned
7202         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7203         (graphite_transformations): New.
7204         (graphite_transform_loops): Move to graphite_transformations.
7205         * graphite.h (gbb_nb_loops): Return unsigned.
7207 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7209         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7210         the domain matrix.  This makes scop-0.c work again.
7212 2008-06-20  Richard Guenther  <rguenther@suse.de>
7214         * graphite.h: Adjust copyright to GPLv3.
7215         * graphite.c: Likewise.
7216         (stmt_simple_memref_for_scop_p): Split out from ...
7217         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
7218         and simplify.
7219         (get_bb_type): Optimize.
7220         (is_pred): Remove.
7221         (is_bb_addable): Fix memleak, replace is_pred call with
7222         single_pred.
7223         (build_scops): Use current_loops.
7224         (param_index): Fix memleak.
7226 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7228         * graphite.c: Fix formatting.
7230 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7232         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7233         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7234         (create_var_name, save_var_name): Newly defined functions.
7235         (initialize_cloog_names): Part of the code factored out to
7236         save_var_name.
7237         (clast_to_gcc_expression): Now handles the case of clast_red_sum
7238         in clast_reduction statement.
7239         (graphite_create_new_loop): Now takes a new parameter
7240         for outer_loop.
7241         (translate_clast): Now also takes the context_loop and bb_exit
7242         parameters. Rewritten the code so that it creates a gimple code
7243         inside the given context.
7244         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7245         remove_cond_expr, disconnect_cond_expr,
7246         disconnect_virtual_phi_nodes): Newly defined functions.
7247         * graphite.h (struct scop): added old_ivs vector.
7248         SCOP_OLDIVS: New macro.
7250 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
7252         * cfgloopmanip.c: Add missing function comments, fix formatting.
7254 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7256         * cfgloopmanip.c (update_dominators_in_loop): Defined.
7257         (create_empty_loop_on_edge): Defined.
7258         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7259         instead of void.
7260         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7261         (update_dominators_in_loop): Declared as extern
7262         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7264 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
7266         * graphite.c (print_graphite_bb): Allow changing number of loops
7267         in SCoP domain.
7268         (initialize_cloog_names): Allow changing number of loops.
7269         (build_cloog_prog): Simplify.
7270         (find_transform): Enable cloog option --strides.
7271         (graphite_swap_loops): New.
7272         (graphite_strip_mine_loop): New.
7273         (graphite_trans_swap_1and2): New.
7274         (graphite_trans_strip): New.
7275         (graphite_transform_loops): Add graphite_trans_strip.
7276         * graphite.h (scop_max_loop_depth): New.
7278 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7280         * graphite.c (build_scop_iteration_domain): Remove forgotten
7281         line. (Fixes compile)
7283 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7285         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7286         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7287         (build_bb_loops): New.
7288         (graphite_transform_loops): Add build_bb_loops.
7289         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7290         numbers.
7291         * graphite.h (graphite_bb): Add loops.
7292         (gbb_nb_loops): New.
7293         (gbb_loop_at_index): New.
7294         (gbb_loop_index): New.
7295         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7296         using nb_params_in_scop.
7298 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7300         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7301         (build_scop_canonical_schedules): Build minimized schedule.
7302         (schedule_to_scattering): Adapt to minimized schedule.
7303         * graphite.h (graphite_bb): Add/Update descriptions.
7305 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
7306             Tobias Grosser  <grosser@fim.uni-passau.de>
7308         * graphite.c (print_graphite_bb): Add condition printing.
7309         (dump_value): New.
7310         (dump_gbb_conditions): New.
7311         (build_scop_conditions_1): New.
7312         (build_scop_conditions): New.
7313         * graphite.h (graphite_bb): Add conditions.
7315 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7317         * graphite.c (print_graphite_bb):
7318         (free_graphite_bb): New.
7319         (free_scop): Free bbs.
7320         (get_bb_type): Free doms.
7321         (build_scop_context): Free context matrix.
7322         (build_loop_iteration_domains): Remove unused code.
7323         (build_cloog_prog): Free scattering function and blocklist.
7324         (find_transform): Free options.
7326 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
7328         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7329         Remove unnecessery cloog data structures. Make a copy of the domain
7330         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7331         unnecessary cloog data structures. Fix memory leaks. Remove insert
7332         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7333         used.
7334         (build_scop_iteration_domain): Remove unnecessary cloog
7335         data structures.  Fix memory leaks.
7336         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7337         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7339 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7341         * graphite.c (find_scop_params): Remove initialize_cloog_names.
7343 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7345         * graphite.c (end_scop): Style fix.
7346         (schedule_to_scattering): Style and comment fix.
7348 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7349         * graphite.c (print_graphite_bb): Fix definiton of
7350         schedule_to_scattering.
7351         (initialize_cloog_names): Change nb_scattdims to max loop
7352         depth in SCoP.
7353         (schedule_to_scattering): Take parameter for number of scattering
7354         dimensions.
7355         (build_cloog_prog): Only build as much scattering dimensions as
7356         necessary.
7358 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7360         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7361         in polyhedron/aermod.f90.
7363 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7364             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
7365             Harsha Jagasia  <harsha.jagasia@amd.com>
7367         * graphite.c (is_bb_addable): Fix segfault.
7369 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7371         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7372         with multiple exits and conditional handling in edge cases.
7373         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7375         * gcc.dg/graphite/scop-14.c: New.
7377 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7378             Adrien Eliche  <aeliche@isty.uvsq.fr>
7380         * graphite.c (is_bb_addable): Add more comments and enhance
7381         readablity of the source code. Fix memory leak.
7382         (is_loop_exit): Fix memory leak.
7384 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7386         * graphite.c (first_loop_in_scop): Deleted.
7387         (setup_cloog_loop): Only walk the loop chain for inner loops.
7388         (build_scop_iteration_domain): Execute setup_cloog_loop for
7389         all loops in the first layer.
7391 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7393         * graphite.c (scan_tree_for_params): Change the way params are
7394         added to be indepenent of the number of loops.
7395         (setup_cloog_loop): Revert to short matrix format. Fix parameter
7396         handling.
7397         (build_cloog_prog): Revert to short matrix format.
7399 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7400             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7402         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7403         warning.
7405 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7407         * graphite.c (nb_data_refs_in_scop): New.
7408         (graphite_transform_loops): Print more stats: number of
7409         loops, basic blocks and data references per scop.
7411 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7412             Jan Sjodin  <jan.sjodin@amd.com>
7414         * graphite.c (loop_affine_expr, idx_record_params,
7415         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7416         instead of instantiate_parameters.
7418 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7420         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7421         add support for parameters, add STATIC_SCHEDULE at the right places,
7422         cleanup.
7424 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7426         * graphite.c (build_scop_loop_nests): Only add the loops, that
7427         are contained completely in the SCoP.
7428         (build_cloog_prog): Disable scattering, until schedule_to_scattering
7429         and the domains are fixed.
7430         (build_scop_canonical_schedules): Add support for bbs not contained
7431         in any SCoP.
7433 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7435         * graphite.h (scop_contains_loop): Update comments to match
7436         the actual behavior.
7437         (scop_contains_loop): New.
7438         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7440 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7442         * graphite.c (get_bb_type): On function body, i.e. loop_0,
7443         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7444         as GBB_COND_HEADER.
7446 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7447             Tobias Grosser  <grosser@fim.uni-passau.de>
7449         * graphite.c (graphite_transform_loops): Early return when
7450         there are no loops in the function.
7452 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7453             Jan Sjodin  <jan.sjodin@amd.com>
7455         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7456         offset of the last loop.
7457         (setup_cloog_loop): Copy the entire outer constraint matrix.
7459 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7460             Jan Sjodin  <jan.sjodin@amd.com>
7462         * graphite.c (stmt_in_scop_p, function_parameter_p,
7463         invariant_in_scop_p): Removed.
7464         (scan_tree_for_params): Can be used with no constraint
7465         matrix for gathering parameters.
7466         (idx_record_params): Don't use idx_record_param, instead use
7467         scan_tree_for_params.
7468         (find_scop_parameters): Same.
7469         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7470         Fix the size of loop domains.
7471         (schedule_to_scattering): Exit when the outer loop is not in scop.
7472         (find_transform): Enable build_cloog_prog.
7474 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7475             Jan Sjodin  <jan.sjodin@amd.com>
7477         * graphite.c (schedule_to_scattering): Make scattering domains
7478         uniformly of the same size, as required by CLooG 0.14.0 and before.
7480 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7481             Jan Sjodin  <jan.sjodin@amd.com>
7483         * graphite.c (schedule_to_scattering): Rewrite, correct the
7484         translation of the scheduling function to scattering.
7485         (build_cloog_prog): Call schedule_to_scattering only once.
7486         * graphite.h (scop_loop_index): Do not fail for loops not
7487         in the scop: return -1.
7489 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
7491         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7492         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7493         (setup_cloog_loop): Export GBB_DOMAIN.
7494         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
7495         able to rebuild the original control flow.
7496         * graphite.h (graphite_bb): Add domain field and access macro.
7497         (GBB_DOMAIN): New.
7499 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
7501         * graphite.c (debug_gbb): New.
7502         (print_scop, build_graphite_bb): Use SCOP_BBS.
7503         (build_scop_bbs): Reimplemented.
7504         (dfs_bb_in_scop_p): Removed.
7505         (build_scop_loop_nests): Reorder loops inserted in
7506         SCOP_LOOP_NEST: outer loops should come first.
7507         (build_scop_canonical_schedules): Reinitialize at zero
7508         the components of the SCOP_STATIC_SCHEDULE for the loops
7509         that have already been parsed.
7511         * graphite.h (debug_gbb): Declared.
7513 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
7514             Jan Sjodin  <jan.sjodin@amd.com>
7516         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7517         (graphite_loop_to_gcc_loop): Removed.
7518         (remove_all_edges): New.
7519         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7520         (gloog): Remove useless code.
7522 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7524         * graphite.c (get_bb_type): Reworked. We distinguish between
7525         loops with one or multiple exits.
7526         (is_loop_exit): New.
7527         (is_pred): New.
7528         (is_bb_addable): Rework condition handling, now support for case
7529         case statements and loops with multiple exits.
7531         * gcc.dg/graphite/scop-11.c: New.
7532         * gcc.dg/graphite/scop-12.c: New.
7533         * gcc.dg/graphite/scop-13.c: New.
7535 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7537         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7538         we have too many colors.
7540 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
7542         * doc/invoke.texi (-ftree-loop-fusion): Document.
7543         * tree-pass.h (pass_loop_fusion): Declared.
7544         * tree-loop-fusion.c: New.
7545         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7546         * tree-data-ref.c (find_data_references_in_loop): Make extern.
7547         * tree-data-ref.h (find_data_references_in_loop): Declared.
7548         * common.opt (ftree-loop-fusion): Declared.
7549         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7551 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
7553         * graphite.c (build_access_matrix): Fix typo from the merge.
7555 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
7557         * Merge from mainline (130800:135673).
7559 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7561         * graphite.c (end_scop): The exit of the scop is not part of the scop.
7562         Update dominators after splitting.
7564 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7566         * graphite.c (is_bb_addable): Return the harmful statement.
7567         Factor up some code.
7568         (end_scop): New.  Splits end of scope bbs on a harmful statement.
7569         (build_scops_1): Call end_scop.
7571 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7573         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7574         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7575         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7576         build_scops_1): Removed.
7577         (build_scops_2): Renamed build_scops_1.
7579 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
7581         * graphite.c: Fix formatting.
7583 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7585         * graphite.c (get_bb_type): New.
7586         (move_scops): New.
7587         (build_scops_2): New.
7588         (is_bb_addable): New.
7589         (build_scops): Switch the scop detection.
7590         (build_scop_bbs): Add entry bb to scop.
7591         * graphite.h (struct scop): Update comment.
7593 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7595         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7596         more colors.
7598 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7600         * gcc.dg/graphite/scop-1.c: Update.
7601         * gcc.dg/graphite/scop-2.c: Update.
7602         * gcc.dg/graphite/scop-4.c: Update.
7603         * gcc.dg/graphite/scop-5.c: Add.
7604         * gcc.dg/graphite/scop-6.c: Add.
7606 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
7608         * gcc.dg/graphite/scop-0.c: Add.
7609         * gcc.dg/graphite/scop-7.c: Add.
7610         * gcc.dg/graphite/scop-8.c: Add.
7611         * gcc.dg/graphite/scop-9.c: Add.
7612         * gcc.dg/graphite/scop-10.c: Add.
7614 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7616         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7617         Check affine expressions depending on the outermost loop
7618         instead of a scop.
7619         (stmt_simple_for_scop_p): Same.
7620         (harmfule_stmt_in_scop): Same.
7622 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
7624         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7625         mark entry and exit, that are not part of the SCoP and update HTML
7626         formatting.
7628 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
7630         * graphite.c (basic_block_simple_for_scop_p): Renamed
7631         harmful_stmt_in_bb.
7632         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7633         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7634         (all_preds_visited_p, all_succs_visited_p,
7635         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7636         scop_end_loop): New.
7637         (build_scops): Do not use dfs_enumerate_from.
7639         * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7641 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
7643         * graphite.c: Add comments to functions that are missing a
7644         description.
7645         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
7647 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
7649         * graphite.c (nb_params_in_scop): Moved...
7650         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7651         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7652         (clast_to_gcc_expression): Reduce column size to less than 80.
7653         (graphite_create_iv): Return the new name of the IV.
7654         (find_transform): Set options->esp and options->cpp.
7655         (gloog): Comment out the invalidation of the old loop code.
7656         (initialize_dependence_polyhedron): Replace scop_nb_params with
7657         nb_params_in_scop.
7659         * graphite.h (nb_params_in_scop): ... here.
7660         (scop_nb_params): Removed.
7661         (loop_domain_dim): Return something even when the loop was not
7662         found in the hash table: avoid ICEing on all the graphite.exp
7663         testcases.
7665 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7667         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7669         * graphite.c (build_scop_dynamic_schedules): Schedule is built
7670         according to nesting level.
7671         (find_scop_parameters): Call instantiate_parameters.
7672         (scan_tree_for_params): Extend it to handle general affine bounds.
7673         Inner loop bound can depend on outer loop induction variable.
7674         (setup_cloog_loop): tmp variable is allocated on stack. Call
7675         instantiate_parameters with respect to outermost_loop_in_scop.
7676         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7677         graphite.h.
7678         (create_empty_loop): Function loopify should be given edge
7679         probability, instead of edge frequency. Dominance relation from
7680         switch_bb to loop_header.
7681         (clast_to_gcc_expression): Added handling of clast_reduction node.
7682         (gloog): New functionality for removing old loop.
7683         (test_dependence): Factored out from build_rdg_all_levels.
7684         (build_rdg_all_levels): Dependence testing factored out to
7685         test_dependence function.
7687         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7688         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7689         from graphite.c
7691 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
7693         * graphite.c (free_scop, param_index, initialize_cloog_names,
7694         nb_params_in_scop): Use name_tree map instead of just a tree
7695         for keeping track of the variable name associated to that tree.
7696         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7697         clast_to_gcc_expression, graphite_create_iv,
7698         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7699         graphite_stmt_to_gcc_stmt): New.
7700         (gloog): Call these.
7701         * graphite.h (struct name_tree): New.
7702         (struct scop): Use name_tree instead of tree for params.
7703         Store a vector of name_tree for new_ivs.
7704         (SCOP_NEWIVS): New.
7705         (scop_nb_params): Use name_tree instead of tree.
7707 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
7708             Sebastian Pop  <sebastian.pop@amd.com>
7710         * tree-bounds.c: New.
7711         * tree-bounds.h: New.
7712         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7713         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7714         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7715         flag_mudflap.
7716         * gcc.c: Same.
7717         * toplev.c: Same.
7718         * c-cppbuiltin.c: Same.
7719         * c-pragma.c: Same.
7720         * common.opt: Same.
7721         * varasm.c: Same.
7722         * tree-outof-ssa.c: Same.
7723         * c-common.c: Same.
7724         * Makefile.in: Same.
7726 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
7727             Sebastian Pop  <sebastian.pop@amd.com>
7729         * tree-loop-distribution.c (remaining_stmts,
7730         upstream_mem_writes): Removed static variables.
7731         (copy_loop_before, create_bb_after_loop,
7732         mark_nodes_having_upstream_mem_writes, free_rdg_components,
7733         rdg_build_components, rdg_build_partitions,
7734         dump_rdg_partitions): Extern.
7735         (generate_loops_for_partition, generate_code_for_partition): Do not
7736         return a bool.
7737         (already_processed_vertex_p, predecessor_has_mem_write,
7738         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7739         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7740         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7741         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7742         Pass remaining_stmts and upstream_mem_writes as parameters.
7743         (rdg_component): Moved...
7744         (build_rdg_partition_for_component): Do not aggregate components when
7745         flag_streamize_loops is set.
7746         (gen_sequential_loops): New.
7747         (ldist_gen): Call gen_sequential_loops.
7749         * tree-pass.h (pass_loop_streamization): Declared.
7751         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7752         basic blocks when loops structures exist.
7754         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7756         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7758         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7759         eliminate_local_variables_stmt, eliminate_local_variables,
7760         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7761         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7762         of code delimited by two edges in the CFG.
7763         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7764         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7765         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
7766         the case of parallelisation of reductions.
7767         (create_loop_fn): Extern.
7768         (create_omp_parallel_region): New.
7770         * tree-data-ref.c (dump_data_dependence_relation): Don't call
7771         dump_data_reference for printing dra and drb.
7772         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7773         RDGE_RELATION.
7774         (build_rdg): Don't call free_dependence_relations for the moment, as
7775         we attach dependence relations on each edge of the RDG.
7776         To be fixed later.
7778         * tree-data-ref.h (rdg_component): ...here.
7779         (struct rdg_edge): New field ddr_p relation.
7780         (RDGE_RELATION): New.
7781         (create_bb_after_loop, copy_loop_before,
7782         mark_nodes_having_upstream_mem_writes, rdg_build_components,
7783         rdg_build_partitions, dump_rdg_partitions,
7784         free_rdg_components): Declared.
7786         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7787         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7789         * tree-loop-streamization.c: New.
7791         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7792         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7794         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7796         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7798         * passes.c: Schedule pass_loop_streamization.
7800 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
7802         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7803         update comment.
7805 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
7807         * graphite.c (dot_all_scops): Update formatting.
7808         Bbs can now be part of more than one SCoP.
7810 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
7812         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7813         malloc problems.
7814         (loop_domain_dim): Check for unregistered toplev SCOP loop.
7815         * graphite.h (loop_to_cloog_loop): New.
7817 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7819         * graphite.c (loop_domain_dim, ref_nb_loops,
7820         loop_iteration_vector_dim): New.
7821         (build_access_matrix_with_af, build_access_matrix,
7822         initialize_dependence_polyhedron): Fixed for new matrix layout.
7823         No longer assume that all iteration domains are of the same
7824         dimensionality.
7826 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
7828         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7829         defined in a loop at depth 0 is invariant.
7830         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7831         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7832         be called at loop depth 0.
7834         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7835         a parameter.
7836         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7837         (down_open_scop): Removed.
7838         (loop_in_scop_p): Redefined.
7839         (scop_affine_expr): New argument: scop.
7840         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
7841         a harmful statement ending a scop.
7842         (basic_block_simple_for_scop_p): New argument: scop.
7843         (get_loop_start): Removed.
7844         (new_scop): Initialize SCOP_LOOPS.
7845         (free_scop): Free SCOP_LOOPS.
7846         (succs_at_same_depth, preds_at_same_depth): New.
7847         (end_scop): Test the validity of a scop.
7848         (add_dominators_to_open_scops): New.
7849         (test_for_scop_bound): Call add_dominators_to_open_scops.
7850         Add cases for opening and closing multiple scops.
7851         (build_scops, build_scop_bbs): Iterate over basic blocks in
7852         depth first order.
7853         (build_graphite_bb): Pass scop directly.
7854         (dfs_bb_in_scop_p): New.
7855         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7856         several times.
7857         (nb_loops_around_gb): Use loop_in_scop_p.
7858         (schedule_to_scattering): Disabled for the moment the code computing
7859         the "textual order for outer loop".
7861         * graphite.h (struct scop): New field loops.
7862         (SCOP_LOOPS): New.
7863         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7865         * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7867 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
7868             Sebastian Pop  <sebastian.pop@amd.com>
7870         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7871         * common.opt (fstreamize-loops): New.
7872         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7873         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7874         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7875         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7877 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7879         * tree-data-ref.c (build_empty_rdg): New.
7880         (build_rdg): Use it.
7881         * tree-data-ref.h (build_empty_rdg): Declared.
7882         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7883         (find_vertex_for_stmt): Removed.
7884         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7886 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
7888         * tree-loop-distribution.c (generate_builtin): After cancelling the
7889         loop tree, also delete basic blocks.
7890         (rdg_flag_uses): Stop recursion when a vertex has already been
7891         processed.
7893 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7895         * graphite.c (build_scop_alpha): Removed.
7896         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7897         and dump_dependence_graph to avoid compiler warnings.
7899 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7901         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7902         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7903         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7904         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7905         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7906         (initialize_dependence_polyhedron, find_vertex_for_stmt,
7907         initialize_data_dependence_polyhedron, is_empty_polyhedron,
7908         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7909         dump_dependence_graph): New.
7910         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7911         (GBB_ALPHA): New.
7912         (struct scop): New field loop2cloog_loop.
7913         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7914         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7916 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7918         * graphite.c (build_graphite_bb): Fix initialization
7919         of the graphite basic block.
7921 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
7923         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7924         loop domain matrix.  Pass in the number of loops contained in the
7925         constraint matrix.
7926         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7927         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7928         loops that are not surrounding the current loop are not represented
7929         in the domain constraint matrix.
7930         (build_scop_iteration_domain): Initial domain constraint matrix
7931         contains only the eq/ineq, cst, and scop parameters columns.
7933 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7935         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7936         (print_graphite_bb): Print scattering.
7938 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7940         * graphite.c (initialize_cloog_names): Initialize names of
7941         scattering variables.
7943 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7945         * graphite.c (dot_all_scops_1): Disable debug output while
7946         printing graph.
7948 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7950         * graphite.c (find_transform): Change cloog output language to C.
7952 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
7954         * tree-loop-distribution.c (generate_memset_zero,
7955         generate_builtin, generate_code_for_partition,
7956         rdg_flag_all_uses): New.
7957         (rdg_flag_uses): Gather in the same partition the statements defining
7958         the VUSES of the current statement.
7959         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7960         Gather in the same partition not only the stores to the same memory
7961         access, but also the reads.
7962         (ldist_generate_loops): Renamed ldist_gen.
7964 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
7965             Tobias Grosser  <grosser@fmi.uni-passau.de>
7967         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7968         next pointer, don't use the inner pointer.
7970 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
7972         * graphite.c (dot_all_scops, dot_all_scops_1): New.
7973         (find_transform): Call dot_all_1.
7974         * graphite.h (dot_all_scops): Declared.
7976 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
7978         * tree-loop-distribution.c: Fix apsi.f ICE.
7979         (create_bb_after_loop): New.
7980         (generate_loops_for_partition): Use it.
7981         * gfortran.dg/ldist-1.f90: New.
7983         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7984         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7986 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
7988         * graphite.c (find_transform): Dump cloog program sent to cloog.
7990 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
7992         * graphite.c (initialize_cloog_names): Initialize cloog
7993         iterator names.
7995 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
7997         * graphite.c (build_scop_context): Fix typo, for the matrix
7998         format: insert '0 >= 0' instead of '-1 >= 0'.
8000 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8002         * Fix merge problems.
8004 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8006         * graphite.c (setup_cloog_loop): Fix typo.
8008 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8010         * doc/invoke.texi (-ftree-loop-distribution): Documented.
8011         * tree-loop-distribution.c: Reimplemented.
8012         * tree-pass.h (pass_loop_distribution): New.
8013         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8014         print_loops.
8015         * graphds.h (struct graph): New field indexes.
8016         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8018         * tree-vect-analyze.c: Remove declaration of static functions when not
8019         needed.
8020         * tree-vectorizer.c: Same.
8021         (rename_variables_in_loop): Now extern.
8022         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8023         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
8024         calling redirect_edge_and_branch_force.
8026         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8028         * tree-data-ref.c: Don't include tree-chrec.h.
8029         (debug_data_dependence_relations): New.
8030         (dump_data_dependence_relation): Call dump_data_reference on data refs
8031         in the relation.
8032         (same_access_functions): Moved...
8033         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8034         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8035         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8036         struct rdg_vertex_info, ): New.
8037         (create_rdg_edge_for_ddr): Compute the dependence level before looking
8038         at DDR_REVERSED_P.
8039         (create_rdg_vertices): Initialize the htab of graph->indexes.
8040         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8041         (stmts_from_loop): Don't save LABEL_EXPR.
8042         (hash_stmt_vertex_info, eq_stmt_vertex_info,
8043         hash_stmt_vertex_del): New.
8044         (build_rdg): Initialize rdg->indexes.
8045         (free_rdg, stores_from_loop, ref_base_address,
8046         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8047         have_similar_memory_accesses_1, ref_base_address_1,
8048         remove_similar_memory_refs): New.
8050         * tree-data-ref.h: Include tree-chrec.h.
8051         (debug_data_dependence_relations): Declared.
8052         (same_access_functions): ...here.  Now static inline.
8053         (ddr_is_anti_dependent, ddrs_have_anti_deps,
8054         ddr_dependence_level): New.
8055         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8056         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8057         RDG_MEM_READS_STMT): New.
8058         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8059         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8060         rdg_vertex_for_stmt): Declared.
8061         (struct rdg_edge): New field level.
8062         (RDGE_LEVEL, free_rdg): New.
8063         (stores_from_loop, remove_similar_memory_refs,
8064         rdg_defs_used_in_other_loops_p,
8065         have_similar_memory_accesses): Declared.
8066         (rdg_has_similar_memory_accesses): New.
8068         * lambda.h (dependence_level): New.
8069         * common.opt (ftree-loop-distribution): New.
8070         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8071         (print_loop_ir): Renamed print_loops.
8072         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8073         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8074         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8075         (tree-loop-distribution.o): Added.
8076         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8077         (mark_virtual_ops_in_bb): New.
8078         (print_loops_bb, debug_loop_num, debug_loop): New.
8079         * passes.c: Scheduled pass_loop_distribution.
8081 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8083         * graphite.c (scan_tree_for_params): Correct the number of columns
8084         for polylib format.
8085         (nb_flat_iterator): New.
8086         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8087         (build_scop_iteration_domain): Correct the number of columns for
8088         polylib format.
8090 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8092         * Merge from mainline (129697:130800).
8094 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
8096         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8097         dominated by SCoP's exit.
8098         (graphite_transform_loops): Compute post dominators.
8100 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8102         * Merge from mainline (127169:129697).
8104 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8106         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
8107         parameter for the basic block that contains the expression.  Use
8108         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8109         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8110         the expression.
8111         * graphite.h (gbb_loop): New.
8112         (GBB_LOOP): Removed.
8114 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8116         * Makefile.in: Fix merge problem.
8118 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8120         * Merge from mainline (125309:127169).
8121         * tree-loop-distribution.c: Disabled.
8123 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
8125         * Merge from mainline (r123693:125309).
8127 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
8129         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8130         correct_modify_p
8131         (correct_modify_p, check_statements, number_of_lvalue_uses,
8132         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8133         instead of MODIFY_EXPR.
8134         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
8135         and push new edges.
8137 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
8139         * tree-loop-distribution.c (struct rdg): Replace arrays by
8140         VECs for edges and vertices.
8141         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8142         (RDGV_NB_PARTITIONS): New.
8143         (PRDG_NBV, PRDG_NBE): Removed.
8144         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8145         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8146         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8148 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
8149             Sebastian Pop  <sebpop@gmail.com>
8151         * doc/invoke.texi (-ftree-loop-distribution): Document.
8152         * tree-loop-distribution.c: New file.
8153         * tree-pass.h (pass_loop_distribution): Declared.
8154         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8155         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8156         and set reversed_p.
8157         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8158         (DDR_REVERSED_P): New.
8159         * common.opt (-ftree-loop-distribution): New.
8160         * tree-flow.h (distribute_loops): Declared.
8161         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8162         * passes.c (init_optimization_passes): Schedule loop distribution.
8164 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
8166         * graphite.c (print_graphite_bb): Don't call dump_data_references.
8167         (print_scop): Don't print when scop is NULL.
8168         (build_scop_context, find_transform): Don't output to stderr.
8170 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
8172         * tree-data-ref.c: Don't include graphite.h.
8173         Comment out the code for printing data reference's scop.
8174         (build_access_matrix_with_af): Moved...
8175         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8176         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
8177         (print_graphite_bb): Print basic block's schedule.
8178         (print_scop): Don't print the schedule, call cloog's pretty printer.
8179         (bb_in_scop_p): A basic block is in a scop only if it is both
8180         dominated and postdominated by the scop's entry and exit basic blocks.
8181         (function_parameter_p): New.
8182         (invariant_in_scop_p): Use function_parameter_p.
8183         (new_scop, save_scop): New.
8184         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8185         save_scop.
8186         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8187         (loop_in_scop_p): New.
8188         (scop_record_loop): Use loop_in_scop_p.
8189         (build_scop_domain): Renamed build_scop_iteration_domain.
8190         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8191         nb_params_in_scop, build_scop_context, first_loop_in_scop,
8192         setup_cloog_loop, dot_scop_1, dot_scop): New.
8193         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8194         (struct scop): Add a pointer to cloog's representation of a program.
8196 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8198         * doc/invoke.texi (-ftree-check-verbose): Renamed
8199         -ftree-checks-verbose.
8200         * common.opt (flag_tree_check_verbose): Renamed
8201         flag_tree_checks_verbose.
8202         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8204 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8206         * configure: Regenerated.
8207         * config.in: Regenerated.
8208         * tree-ssa-loop.c (graphite_transforms): Execute
8209         graphite_transform_loops only when HAVE_cloog.
8210         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8211         * graphite.c: Include polylibgmp.h and cloog.h.
8212         (graphite_transform_loops): Removed loops parameter.
8213         * tree-flow.h (graphite_transform_loops): Update declaration.
8214         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8215         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8216         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8217         (OBJS-common): Remove dependence on graphite.o.
8218         (BACKEND): Depend on @GRAPHITE@.
8220 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
8222         * doc/invoke.texi (-ftree-check-verbose): Documented.
8223         * gcc.dg/tree-checker/tree-checks-1.c: New.
8224         * gcc.dg/tree-checker/tree-checks-2.c: New.
8225         * gcc.dg/tree-checker/tree-checks-3.c: New.
8226         * gcc.dg/tree-checker/tree-checks-4.c: New.
8227         * gcc.dg/tree-checker/tree-checks.exp: New.
8228         * gcc.dg/tree-checker/condates.crp: New.
8229         * common.opt (ftree-checks-verbose): New.
8230         * tree-check.c (tree_check_warning): Move extra stderr output
8231         under control of flag_tree_check_verbose.
8233 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
8235         * tree-match.c: Fix comments formatting.
8236         * tree-match.h: Fix comments formatting.
8237         * tree-check.c: Fix comments formatting.
8238         (tree_check_init): Restructure.
8240 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
8242         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8244 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
8246         * Merge from mainline (r120733:123693).
8248 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
8250         * condate.y: New file.
8251         * tree-match.h (struct patt_info_s): New field sign.
8252         (struct condate_s): New field msg.
8253         (normalize_condate, name_condate, add_condate): New.
8254         (conds[], condate_parse): Made extern.
8255         * tree-check.c (tree_check_warning): First arg changed to cond;
8256         warning reformatted.
8257         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8258         (tree_scan): New.
8259         (tree_check): Process trivial condates.
8260         (read_delimited_string): Removed.
8261         (print_cond): Print name and msg.
8262         (conds[]): Made extern.
8263         (parse_tree_check_file_once): Rewritten to use the parser in
8264         condate.y.
8265         Processing of option --tree_check_string moved to tree_scan().
8266         * Makefile.in: Added condate.y
8268 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
8270         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8271         Use VECs instead of varrays.
8272         * diagnostic.h (lazy_dump_generic_node): Update declaration.
8273         * Makefile.in (pretty-print.o): Depend on vec.h.
8274         * pretty-print.c: Include tree.h and vec.h.
8275         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8276         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8277         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8278         pp_free_list): Use VECs instead of varrays.
8279         * pretty-print.h: Do not include varray.h.
8280         (struct tree_chunk_s): Declaration moved before its use.
8281         (output_buffer): Rename varray field to chunks.
8282         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8283         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8284         save_global_holes): Use VECs instead of varrays.
8285         * tree-match.h: Declare VECs of cfg_node, and hole_p.
8286         * tree-check.c (scan_cfg_stmts, push_node,
8287         print_matching_stmt): Removed.
8288         (tree_check_instance, push_global_holes_if_new, tree_check,
8289         execute_tree_check): Use VECs instead of varrays.
8290         (gate_tree_check): Don't execute the CFG check when basic_block_info
8291         is not available.
8293 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8295         * Merge from mainline (r115016:120733).
8297 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8299         * Merge from mainline (r117632:117661).
8301 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8303         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8304         * tree-pass.h (TDF_DEBUG, debug_p): New.
8305         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8306         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8307         get_loop_exit_condition, analyze_evolution_in_loop,
8308         analyze_initial_condition, analyze_scalar_evolution,
8309         instantiate_parameters, number_of_latch_executions): Use debug_p.
8310         * tree-chrec.c (chrec_apply): Use debug_p.
8311         * tree-data-ref.c: Include graphite.h.
8312         (dump_data_reference): Print also the access matrix.
8313         (analyze_array, analyze_indirect_ref, init_data_ref,
8314         analyze_offset_expr, address_analysis, object_analysis,
8315         create_data_ref, finalize_ddr_dependent,
8316         non_affine_dependence_relation, analyze_ziv_subscript,
8317         analyze_siv_subscript_cst_affine,
8318         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8319         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8320         analyze_miv_subscript, analyze_overlapping_iterations,
8321         build_classic_dist_vector, subscript_dependence_tester,
8322         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8323         (build_access_matrix_with_af): No longer static.
8324         * tree-data-ref.h (scop_p): ... declaration here.
8325         (data_reference.scop): New field.
8326         (DR_SCOP, DR_ACCESS_MATRIX): New.
8327         (build_access_matrix_with_af, dr_num_subscripts): Declared.
8328         * graphite.c (print_graphite_bb): Call dump_data_references.
8329         (print_scop): Use scop_nb_loops and scop_dim_domain.
8330         (test_for_scop_bound): Use debug_p.
8331         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8332         scop_nb_params.
8333         (scop_loop_index): Moved...
8334         (scop_record_loop): New.
8335         (build_scop_loop_nests): Use scop_record_loop.
8336         (build_scop_domain): Use scop_dim_domain.
8337         (build_access_matrix): Implemented.
8338         (build_scop_canonical_schedules): Use scop_nb_loops.
8339         (build_graphite_bb): Initialize GBB_SCOP.
8340         * graphite.h (scop_p): Moved...
8341         (graphite_bb.scop): New field.
8342         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8343         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8344         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8345         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8346         scop_loop_index): New.
8347         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8349 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
8351         * Merge from mainline (r117661:120450).
8353 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
8355         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8356         at the first declaration outside the varying loop, instantiate as
8357         far as possible.
8358         * tree-chrec.c (for_each_scev_op): New.
8359         * tree-chrec.h (for_each_scev_op): Declared.
8360         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8361         * tree-data-ref.c (get_references_in_stmt,
8362         find_data_references_in_stmt): New, from trunk.
8363         (find_data_references_in_loop): Use get_references_in_stmt
8364         and find_data_references_in_loop, modified as in trunk.
8365         (build_access_matrix_with_af): New.
8366         * tree-data-ref.h (data_reference): Add a field access_matrix.
8367         (data_ref_loc): New, as in trunk.
8368         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8369         invariant_in_scop_p, param_index, scan_tree_for_params,
8370         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8371         idx_record_param, idx_record_params, build_access_matrix,
8372         build_scop_data_accesses, build_scop_canonical_schedules,
8373         build_graphite_bb, build_scop_bbs, find_params_in_bb,
8374         build_scop_params): New.
8375         * graphite.h (graphite_bb): New.
8376         (scop): Add fields static_schedule, params, loop_nest,
8377         iteration_domain.
8378         * lambda.h: Declare vecs of lambda_matrix.
8379         * tree-flow.h (print_loop_ir_bb): Declared.
8380         * tree-cfg.c (print_loop_ir_bb): New.
8381         (print_loop): Use print_loop_ir_bb.
8383 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
8385         * Merge from mainline (r115016:117632).
8387 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
8389         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8390         break due to a warning.
8392 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
8394         * graphite.c (print_scops, debug_scops): New.
8395         (graphite_transform): Renamed graphite_find_transform.
8396         * graphite.h (debug_scops): Declared.
8398 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
8400         * tree-match.c: Reformat following the GNU style.
8401         * tree-match.h: Reformat following the GNU style.
8402         * tree-pattern.h: Removed empty file.
8403         * Makefile.in: Remove references to tree-pattern.h.
8404         * tree-check.c: Reformat following the GNU style.
8405         (execute_tree_check): Move gate condition code to...
8406         (gate_tree_check): ...here.  New function.
8407         (pass_check): Use the gate function.
8409 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
8411         * tree-pattern.h: New. Tree pattern matching and checking using
8412         concrete syntax.
8413         * tree-check.c: New. Tree/CFG checking pass.
8414         * tree-match.c: New. Library for tree pattern matching.
8415         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8416         * toplev.c, flags.h: Add globals for tree-check pass.
8417         * Makefile.in: Integrate the files in tree-check pass.
8418         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8419         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8420         Introduce a "lazy" pretty-print mode.
8421         * tree.c, tree.h: Add tree_name.
8423 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
8425         * doc/invoke.texi (-fgraphite): Correct typo.
8426         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8427         use of print_loop_ir.
8428         * gcc.dg/graphite/scop-1.c: New.
8429         * gcc.dg/graphite/scop-2.c: New.
8430         * gcc.dg/graphite/graphite.exp: New.
8431         * graphite.c: Include domwalk.h.
8432         (print_scop): Print only the entry and exit blocks.
8433         (debug_scop): No longer static.
8434         (affine_expr): Fix formating.  Return also true when the expression is
8435         constant.
8436         (stmt_simple_for_scop_p): Fix formating.
8437         (build_scops): Use domwalk.
8438         (get_loop_start, end_scop, test_for_scop_bound): New.
8439         (graphite_transform_loops): Avoid printing on stderr.
8440         * graphite.h (debug_scop): Declared.
8441         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8442         * Makefile.in (graphite.o): Depend on domwalk.h.
8443         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8444         declarations for static functions.
8445         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8446         controlling output verbosity.
8448 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
8449             Plesco Alexandru  <shurikx@gmail.com>
8451         * doc/invoke.texi (-fgraphite): Document.
8452         * tree-pass.h (pass_graphite_transforms): Declared.
8453         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8454         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8455         (pass_graphite_transforms): Defined.
8456         * tree-data-ref.c (free_data_ref, data_reference): Extern.
8457         * tree-data-ref.h (free_data_ref, data_reference): Declared.
8458         * graphite.c, graphite.h: New.
8459         * common.opt (fgraphite): Declared.
8460         * tree-flow.h (graphite_transform_loops): Declared.
8461         * Makefile.in (OBJS-common): Add graphite.o.
8462         (graphite.o): New rule.
8463         * passes.c (pass_graphite_transforms): Scheduled.