Fix include order to avoid failed compilation on CLOOG_ORG.
[official-gcc/graphite-test-results.git] / gcc / ChangeLog.graphite
blobc8fc0645d44bbc1ac98b07770a438b9f15baf278
1 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
3         * graphite-poly.c: Change include order.
5 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
7         * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
8         (cloog_matrix_nrows): New.
10 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
12         * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
13         from matrix lines.
14         * graphite-poly.c (openscop_print_scattering_function_1): Same.
15         (print_scattering_function_1): Same.
16         (openscop_print_pbb_domain): Same.
17         (openscop_print_scop_context): Same.
18         (print_scop_context): Same.
20 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
22         * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
23         (openscop_print_pdr_polyhedron): Print pph.
25 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
27         * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
28         * gfortran.dg/graphite/graphite.exp: Same.
29         * gcc.dg/graphite/vect-pr43423.c: New.
31 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
33         * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
34         priority signed types.
36 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
38         * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
39         to lang_hooks.types.type_for_size.  Call build_nonstandard_integer_type.
41 2010-07-29  Riyadh Baghdadi <baghdadi.mr@gmail.com>
43         * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
44         (openscop_print_polyhedron_matrix): New.
45         * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
46         * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
47         (openscop_print_pdr_powerset): New.
48         (openscop_print_powerset_matrix): New.
49         (openscop_print_scattering_function_1): New.
50         (print_scattering_function): Add support for scattering names and
51         OpenScop format.
52         (graphite_write_transforms): Remove.
53         (apply_poly_transforms): Updated to call print_scop.
54         (print_pdr_access_layout): Updated to support OpenScop format.
55         (print_pdr): Same.
56         (openscop_print_pbb_domain): New.
57         (print_pbb_body): Added a parameter to allow indicating that pbb_body is
58         not provided.
59         (print_pbb): Updated to call the new print_pbb_body.
60         (openscop_print_scop_context): New.
61         (print_scop_header): New.
62         (print_scop): Updated to call print_scop_header.
63         * graphite-poly.h: Document OpenScop format.
65 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
67         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
68         the case removed in the previous patch, when the only phi argument
69         is defined in the same loop as the phi node itself.  Handle it
70         separately from the invariant case by both propagating it outside
71         the region and replacing the phi node with an assign.
73 2010-07-28  Sebastian Pop  <sebastian.pop@amd.com>
75         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
76         constant phi nodes with one argument are is_gimple_min_invariant
77         and SSA_NAME_IS_DEFAULT_DEF.
79         * gfortran.dg/graphite/id-22.f: New.
81 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
83         * graphite-cloog-util.c (oppose_constraint):
84         Extend loop counter's value range (CLOOG_ORG).
85         (cloog_matrix_to_ppl_constraint): Same.
86         (new_Constraint_System_from_Cloog_matrix): Same.
87         * graphite-cloog-compat.h (matrix_num_type): New.
89 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
91         * graphite.c (graphite_initialize): Do not initialize
92         CLooG and initialize the Parma Polyhedra Library
93         manually when using CLOOG_ORG.
94         (graphite_finalize): Do not finalize CLooG and finalize
95         the Parma Polyhedra Library manually when using CLOOG_ORG.
96         * graphite-cloog-compat.h (cloog_initialize): Hide function
97         when using CLOOG_ORG.
98         (cloog_finalize): Same.
100 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
102         * graphite-clast-to-gimple.c (free_scattering): Change
103         CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
104         (CLOOG_ORG).
105         (build_cloog_prog): Same.
106         * graphite-cloog-compat.h (cloog_domain): Removed.
107         (cloog_scattering): New.
108         (cloog_set_domain): Removed.
109         (cloog_set_scattering): New.
110         (cloog_next_domain): Removed.
111         (cloog_next_scattering): New.
112         (cloog_set_next_domain): Removed.
113         (cloog_set_next_scattering): New.
114         (CloogScatteringList): New.
115         (CloogScattering): New.
116         (cloog_scattering_free): New.
117         (new_Cloog_Scattering_from_ppl_Polyhedron): New.
118         * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
119         New.
121 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
123         * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
124         CloogState.
125         (set_cloog_options): Same.
126         (print_clast_stmt): Same.
127         (scop_to_clast): Same.
128         (print_generated_program): Same.
129         (gloog): Same.
130         * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
131         (scop_to_clast): Extend with CloogState.
132         * graphite-cloog-util.c: Include graphite-cloog-compat.h
133         (new_Cloog_Domain_from_ppl_Polyhedron):
134         Extend with CloogState.  Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
135         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
136         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
137         * graphite-cloog-util.h (build_cloog_prog): Same.
138         * graphite-cloog-copat.h (build_cloog_prog): New.
139         (CloogState): New.
140         (cloog_state_malloc): New.
141         (cloog_state_free): New.
142         (cloog_loop_malloc): New.
143         (cloog_options_malloc): New.
144         (cloog_statement_alloc): New.
145         (cloog_domain_from_cloog_matrix): New.
146         (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
147         (new_Cloog_Domain_from_ppl_Polyhedron): New.
149 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
151         * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
152         type of NAME now depends on used CLooG version.
153         (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
154         (gcc_type_for_clast_expr): Same.
155         (print_clast_stmt): Replace pprint with clast_pprint.
156         * graphite-cloog-compat.h: Provide compatibility macros for
157         CLooG Legacy.
158         (clast_name_p): New.
159         (clast_expr_term): New.
160         (clast_expr_red): New.
161         (clast_expr_bin): New.
162         (clast_pprint): New.
164 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
166         * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
167         compatible to newer CLooG releases (CLOOG_ORG).
168         (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
169         (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
170         * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
171         (build_cloog_prog) : New.
172         (cloog_program_extract_scalars): New.
173         (cloog_program_scatter): New.
175 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
177         * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
178         conditionally (CLOOG_ORG).
179         * graphite-cloog-compat.h: New.  Include graphite-cloog-compat.h.
180         (cloog_statement_usr): New.
181         (cloog_domain): Same.
182         (cloog_set_domain): Same.
183         (cloog_next_domain): Same.
184         (cloog_set_next_domain): Same.
185         (cloog_program_nb_scattdims): Same.
186         (cloog_program_set_nb_scattdims): Same.
187         (cloog_program_names): Same.
188         (cloog_program_set_names): Same.
189         (cloog_program_set_context): Same.
190         (cloog_program_set_loop): Same.
191         (cloog_program_blocklist): Same.
192         (cloog_program_set_blocklist): Same.
193         (cloog_program_scaldims): Same.
194         (cloog_program_set_scaldims): Same.
195         (cloog_names_nb_parameters): Same.
196         (cloog_names_set_nb_parameters): Same.
197         (cloog_names_parameters): Same.
198         (cloog_names_set_parameters): Same.
199         (cloog_names_set_nb_iterators): Same.
200         (cloog_names_set_iterators): Same.
201         (cloog_names_set_nb_scattering): Same.
202         (cloog_names_set_scattering): Same.
203         (cloog_statement_set_usr): Same.
204         (cloog_loop_set_next): Same.
205         (cloog_loop_set_domain): Same.
206         (cloog_loop_set_block): Same.
207         (cloog_block_list_next): Same.
208         (cloog_block_list_set_next):
209         (cloog_block_list_set_block): Same.
211 2010-07-27  Sebastian Pop  <sebastian.pop@amd.com>
213         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
214         a bool.
215         (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
216         (rewrite_commutative_reductions_out_of_ssa_loop): Same.
217         (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
218         when something has been changed.
219         (rewrite_commutative_reductions_out_of_ssa): Same.
221         * gcc.dg/graphite/id-26.c: New.
223 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
225         * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
226         handle the case when def is in the sese region.
227         (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
228         for invariant expressions.
229         (rewrite_cross_bb_phi_deps): Removed.
230         (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
231         (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
232         rewrite_cross_bb_phi_deps.
234 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
236         * graphite-sese-to-poly.c
237         (rewrite_commutative_reductions_out_of_ssa_loop): Call
238         scev_analyzable_p only on is_gimple_reg
240         * gcc.dg/graphite/id-25.c: New.
242 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
244         * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
245         (rewrite_close_phi_out_of_ssa): Propagate constant values or
246         parametric expressions outside the scop region.
247         (rewrite_cross_bb_scalar_deps): Same.
248         * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
250         * gcc.dg/graphite/run-id-5.c: New.
251         * gcc.dg/graphite/run-id-6.c: New.
252         * gfortran.dg/graphite/id-21.f: New.
254 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
256         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
257         SSA_NAME_DEF_STMT only on SSA_NAMEs.
259         * gcc.dg/graphite/id-24.c: New.
261 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
263         * tree-scalar-evolution.c (instantiate_scev_name): Do not
264         instantiate default definitions.
266 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
268         * graphite-scop-detection.c (is_valid_stmt_p): New.
269         (is_valid_bb_p): New.
271 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
272             Sebastian Pop  <sebastian.pop@amd.com>
274         * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
275         (loop_exits_from_bb_p): New.
276         * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
277         (loop_exits_from_bb_p): Declared.
278         * graphite-scop-detection.c (scopdet_basic_block_info): Call
279         loop_exits_to_bb_p.
281 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
283         * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
284         tree-data-ref.h.
285         (dot_regions_1): New.
286         (dot_regions): New.
287         * refined-regions.h (dot_regions): Declared.
288         * Makefile.in (refined-regions.o): Update dependences.
290 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
292         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
293         extra parameter for the region.  Call scev_analyzable_p.
294         (rewrite_reductions_out_of_ssa): Update call to
295         rewrite_close_phi_out_of_ssa.
296         (rewrite_cross_bb_phi_deps): Same.
297         (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
298         parameter for the region.  Call scev_analyzable_p.
299         (rewrite_commutative_reductions_out_of_ssa): Update call to
300         rewrite_commutative_reductions_out_of_ssa_loop.
302 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
304         * gcc.dg/tree-ssa/pr20742.c: New.
306 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
308         * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
310         * gcc.dg/graphite/id-23.c: New.
312 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
314         * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
315         SSA scalar phi nodes that can be scev_analyzable_p.
317         * gfortran.dg/graphite/id-20.f: Adjust testcase.
319 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
321         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
322         handle SSA_NAME_IS_DEFAULT_DEF.
324 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
326         * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
328         * gcc.dg/graphite/pr42729.c: New.
330 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
332         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
333         case non close-phi nodes with one argument.
335 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
337         * sese.h (scev_analyzable_p): Scevs could be expressions without
338         chrecs and still be scev_analyzable_p.
340 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
342         * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
344 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
346         * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
347         * cfgloop.h (struct loop): Remove single_iv field.
348         * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
349         (scop_canonicalize_loops): Removed.
350         (scop_ivs_can_be_represented): Do not use loop->single_iv.  Iterate
351         over all the loop phi nodes in loop->header.
352         (build_poly_scop): Remove use of scop_canonicalize_loops.
354 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
356         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
357         handle GIMPLE_CALL.
359 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
361         * tree-chrec.c (chrec_apply): Should only apply to the specified
362         variable.  Also handle multivariate chains of recurrences that
363         satisfy evolution_function_is_affine_p.  Also handle CASE_CONVERT.
365 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
367         * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
368         (debug_clast_name_indexes_1): Removed.
369         (debug_clast_name_indexes): Removed.
370         (pbb_to_depth_to_oldiv): Removed.
371         (build_iv_mapping): Replace the use of rename_map with iv_map.
372         (translate_clast_user): Remove uses of rename_map.  Allocate and
373         free iv_map.
374         (translate_clast_for_loop): Remove uses of rename_map.
375         (translate_clast_for): Same.
376         (translate_clast_guard): Same.
377         (translate_clast): Same.
378         (gloog): Same.
379         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
380         * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
381         * sese.c (set_rename): Now static.
382         (rename_variables_in_stmt): Removed.
383         (rename_uses): New.
384         (is_parameter): Removed.
385         (is_iv): Removed.
386         (expand_scalar_variables_call): Removed.
387         (expand_scalar_variables_ssa_name): Removed.
388         (expand_scalar_variables_expr): Removed.
389         (expand_scalar_variables_stmt): Removed.
390         (expand_scalar_variables): Removed.
391         (rename_variables): Removed.
392         (remove_condition): Removed.
393         (get_true_edge_from_guard_bb): Removed.
394         (get_false_edge_from_guard_bb): Removed.
395         (struct igp): Removed.
396         (default_before_guard): Removed.
397         (convert_for_phi_arg): Removed.
398         (add_guard_exit_phis): Removed.
399         (insert_guard_phis): Removed.
400         (graphite_copy_stmts_from_block): Now also uses iv_map and a
401         region.  Do not copy conditions.  Do not copy induction variables.
402         Call rename_uses.
403         (copy_bb_and_scalar_dependences): Allocate a local rename_map for
404         the translated statement.  Use the iv_map for the induction
405         variable renaming.
406         * sese.h (copy_bb_and_scalar_dependences): Update declaration.
407         (set_rename): Removed declaration.
408         (scev_analyzable_p): ...here.
409         * tree-chrec.c (chrec_apply_map): New.
410         * tree-chrec.h (chrec_apply_map): Declared.
412 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
414         * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
415         insert_loop_close_phis.
416         * sese.c (name_defined_in_loop_p): Removed.
417         (expr_defined_in_loop_p): Removed.
418         (alive_after_loop): Removed.
419         (close_phi_not_yet_inserted_p): Removed.
420         (struct alep): Removed.
421         (add_loop_exit_phis): Removed.
422         (insert_loop_close_phis): Removed.
424 2010-07-15  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
426         * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
427         condition.
428         * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
430 2010-07-07  Sebastian Pop  <sebastian.pop@amd.com>
432         * gfortran.dg/graphite/id-20.f: New.
434 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
436         * graphite-cloog-util.h: Added cloog.h.
437         * graphite-blocking.c: Removed cloog.h.
438         * graphite-dependences.c: Same.
439         * graphite-interchange.c: Same.
440         * graphite-poly.c: Same.
441         * graphite-ppl.c: Same.
442         * graphite-scop-detection.c: Same.
443         * graphite-sese-to-poly.c:
444         Removed cloog.h.
445         Removed graphite-clast-to-gimple.h.
446         (check_poly_representation): Removed (unused).
447         * graphite-sese-to-poly.h
448         (check_poly_representation): Removed (unused).
450 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
452         * Makefile.in
453         (OBJS-common): Added graphite-cloog-util.o.
454         (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
455         (graphite-cloog-util.o): New.
456         (graphite-ppl.o): Added graphite-cloog-util.h.
457         * graphite-clast-to-gimple.c:
458         Added graphite-cloog-util.h to include statements.
459         * graphite-cloog-util.c: New.
460         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
461         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
462         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
463         (new_C_Polyhedron_from_Cloog_Matrix): Same.
464         (ppl_Constrain_System_number_of_constraints): Same.
465         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
466         (oppose_constraint): Same.
467         (cloog_matrix_to_ppl_constraint): Same.
468         (new_Constraint_System_from_Cloog_Matrix): Same.
469         (insert_constraint_into_matrix): Same. Declared static.
470         * graphite-cloog-util.h: New.
471         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
472         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
473         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
474         (new_C_Polyhedron_from_Cloog_Matrix): Same.
475         (insert_constraint_into_matrix): Same.
476         * graphite-ppl.c:
477         Added graphite-cloog-util.h to include statements.
478         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
479         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
480         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
481         (new_C_Polyhedron_from_Cloog_Matrix): Same.
482         (insert_constraint_into_matrix): Same.
483         (ppl_Constrain_System_number_of_constraints): Same.
484         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
485         (oppose_constraint): Same.
486         (cloog_matrix_to_ppl_constraint): Same.
487         (new_Constraint_System_from_Cloog_Matrix): Same.
488         * graphite-ppl.h:
489         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
490         graphite-cloog-util.h.
491         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
492         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
493         (new_C_Polyhedron_from_Cloog_Matrix): Same.
494         (insert_constraint_into_matrix): Removed.
496 2010-07-04  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
498         * graphite-clast-to-gimple.c
499         (precision_for_value): Resolve value_* calls to matching mpz_* calls.
500         (precision_for_interval): Same.
501         (gcc_type_for_interval): Same.
502         (compute_type_for_level): Same.
503         * graphite-interchange.c
504         (lst_interchange_profitable_p): Same.
505         * graphite-poly.c
506         (psct_scattering_dim_for_loop_depth): Same.
507         * graphite-ppl.c
508         (ppl_max_for_le_pointset): Same.
509         (ppl_min_for_le_pointset): Same.
511 2010-06-25  Vladimir Kargov  <kargov@gmail.com>
513         * refined-regions.c (bb_index_compare): New.
514         (get_bbs_in_region): New.
515         (print_bbs_in_region): New.
516         (print_refined_region): Add an argument that allows to print
517         all basic blocks contained in regions.
518         (debug_refined_region): Update call to print_refined_region.
519         * refined-regions.h (print_refined_region): Update declaration.
520         (get_bbs_in_region): Declared.
521         * graphite-scop-detection.c (build_scops_new): Print the refined
522         region tree into the Grahite dump file.
524 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
526         * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
527         (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
529 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
531         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
532         rewrite_close_phi_out_of_ssa.
534         * gcc.dg/graphite/id-22.c: New.
536 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
538         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
540 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
542         * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
543         rename_map.
544         * sese.c (debug_rename_map): Same.
545         (get_rename): Same.
546         (set_rename): Same.
547         (rename_variables_in_stmt): Same.
548         (expand_scalar_variables_call): Same.
549         (expand_scalar_variables_ssa_name): Same.
550         (expand_scalar_variables_expr): Same.
551         (expand_scalar_variables_stmt): Same.
552         (expand_scalar_variables): Same.
553         (rename_variables): Same.
554         (graphite_copy_stmts_from_block): Same.
555         (copy_bb_and_scalar_dependences): Same.
557 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
559         * graphite-clast-to-gimple.c (copy_renames): Removed.
560         (translate_clast_for): Do not call copy_renames.
561         (translate_clast_guard): Same.
563 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
565         * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
566         (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
567         (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
568         before rewrite_cross_bb_scalar_deps.
570 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
572         * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
573         Early return in when flag_associative_math is not set.
575 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
577         * gcc.dg/graphite/run-id-2.c: Call abort.
579 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
581         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
582         of SSA copies on edges except for loop->latch.
584 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
586         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
587         Split out of rewrite_reductions_out_of_ssa.
588         * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
589         Declared.
590         * graphite.c (graphite_transform_loops): Call it.
592 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
594         * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
596 2010-06-15  Sebastian Pop  <sebastian.pop@amd.com>
598         * passes.c (init_optimization_passes): Add pass_graphite.
599         Schedule a pass_copy_prop before pass_graphite_transforms.
600         * timevar.def (TV_GRAPHITE): Declared.
601         * tree-pass.h (pass_graphite): Declared.
602         * tree-ssa-loop.c (pass_graphite): New.
604         * gcc.dg/graphite/id-20.c: New.
606 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
608         * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
609         Remove calls to rename_nb_iterations and rename_sese_parameters.
610         * graphite-clast-to-gimple.h (gloog): Update declaration.
611         * graphite.c (graphite_transform_loops): Update call to gloog.
612         * sese.c (rename_variables_in_expr): Removed.
613         (rename_nb_iterations): Removed.
614         (rename_sese_parameters): Removed.
615         * sese.h (rename_nb_iterations): Removed.
616         (rename_sese_parameters): Removed.
618 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
620         * graphite-clast-to-gimple.c (gloog): Remove call to
621         sese_adjust_liveout_phis.
622         * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
623         SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
624         (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
625         rewrite_phi_out_of_ssa.
626         * sese.c (get_vdef_before_sese): Removed.
627         (sese_adjust_vphi): Removed.
628         (sese_adjust_liveout_phis): Removed.
629         * sese.h (sese_adjust_liveout_phis): Removed.
631 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
633         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
634         argument for the place after which to insert the out of SSA copy.
635         (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
636         (rewrite_phi_out_of_ssa): Same.
637         (rewrite_cross_bb_scalar_deps): Same.
638         (insert_copyout): Removed.
639         (insert_copyin): Removed.
640         (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
641         insert_out_of_ssa_copy_on_edge instead of insert_copyout and
642         insert_copyin.
644 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
646         * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
647         (rewrite_reductions_out_of_ssa): Same.
648         (rewrite_commutative_reductions_out_of_ssa): Same.
649         (build_poly_scop): Do not call these functions.
650         * graphite-sese-to-poly.h (build_poly_scop): Declared.
651         (rewrite_reductions_out_of_ssa): Declared.
652         (rewrite_commutative_reductions_out_of_ssa): Declared.
653         * graphite.c (graphite_transform_loops): Call on every scop
654         rewrite_commutative_reductions_out_of_ssa before calling
655         rewrite_reductions_out_of_ssa and build_scop_bbs.
657 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
659         * graphite-dependences.c (dot_deps): Make system call to dotty run
660         in background.
661         (dot_deps_stmt): Same.
662         * graphite-poly.c (dot_lst): Same.
664 2010-06-11  Sebastian Pop  <sebastian.pop@amd.com>
666         * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
667         old_type in parameter.
668         (gcc_type_for_value): Update call to gcc_type_for_interval.
669         (compute_type_for_level_1): Renamed compute_type_for_level.
670         Update call to gcc_type_for_interval.
672 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
674         * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
675         the scev analysis when the variable is not used outside the loop
676         in a close phi node: call compute_overall_effect_of_inner_loop.
678 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
680         * graphite-sese-to-poly.c (single_pred_cond): Renamed
681         single_pred_cond_non_loop_exit.  Return NULL for loop exit edges.
682         (build_sese_conditions_before): Renamed call to single_pred_cond.
683         (build_sese_conditions_after): Same.
685 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
687         * graphite-poly.h: Fix comments and indentation.
688         * graphite-sese-to-poly.c: Same.
689         (build_sese_conditions_before): Compute stmt and gbb only when needed.
690         * tree-chrec.c: Fix comments and indentation.
691         (tree-ssa-loop-niter.c): Same.
693 2010-06-08  Tobias Grosser  <grosser@fim.uni-passau.de>
695         * refined-regions.c (create_region): Only initialize the region.
696         (find_regions_with_entry): Initialize parent relation and bbmap
697         correctly.
698         (build_regions_tree): Set outermost_region to region instead of
699         topmost_region.
700         (calculate_region_tree): Remove unneeded parameters.
702 2010-06-02  Tobias Grosser  <grosser@fim.uni-passau.de>
704         * graphite-scop-detection.c (is_scop_p): New.
705         (build_scops_new): New. A skeleton for the new scop detection.
706         (build_scops_old): Renamed from build_scops.
707         (build_scops): New version. Call the new and the old scop
708         detection.
710 2010-05-27  Tobias Grosser  <grosser@fim.uni-passau.de>
711             Antoniu Pop  <antoniu.pop@gmail.com>
713         * Makefile.in (OBJS-common): Add refined-regions.o.
714         (refined-regions.o): New.
715         (graphite-scop-detection.o): Use refined-regions.h.
716         * graphite-scop-detection.c: Include refined-regions.h
717         (build_scops): Also build the refined region tree.
718         * refined-regions.c: New. Adds an algorithm to detect refined
719         regions.
720         (print_refined_region): New.
721         (debug_refined_region): New.
722         (refined_region_contains_bb_p): New.
723         (refined_region_contains_region_p): New.
724         (is_common_df): New.
725         (struct find_regions_global_data): New.
726         (is_region): New.
727         (typedef struct bb_bb_def): New.
728         (new_bb_bb_def): New.
729         (bb_bb_map_hash): New.
730         (eq_bb_bb_map): New.
731         (find_new_bb): New.
732         (bb_reg_def): New.
733         (new_bb_reg_def): New.
734         (bb_reg_map_hash): New.
735         (eq_bb_reg_map): New.
736         (find_new_region): New.
737         (insert_new_reg): New.
738         (insert_new_bb): New.
739         (insert_shortcut): New.
740         (get_next_postdom): New.
741         (create_region): New.
742         (find_regions_with_entry): New.
743         (find_regions_adc): New.
744         (find_regions): New.
745         (get_topmost_parent): New.
746         (build_regions_tree): New.
747         (calculate_region_tree): New.
748         (free_region_tree): New.
749         * refined-regions.h: New.
750         (struct refined_region): New.
751         (calculate_region_tree): New.
752         (free_region_tree): New.
753         (refined_region_contains_bb_p): New.
754         (refined_region_contains_region_p): New.
755         (print_refined_region): New.
756         (debug_refined_region): New.
758 2010-05-26  Sebastian Pop  <sebastian.pop@amd.com>
760         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
761         size_one_node.
763 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
765         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
766         type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
768 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
770         * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
771         phi_arg_in_outermost_loop.
772         (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
773         (remove_invariant_phi): Same.
775 2010-04-12  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
777         * graphite-blocking.c
778         (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
779         * graphite-clast-to-gimple.c
780         (clast_to_gcc_expression): Same.
781         (precision_for_value): Same.
782         (precision_for_interval): Same.
783         (gcc_type_for_interval): Same.
784         (graphite_create_new_guard): Same.
785         (compute_bounds_for_level): Same.
786         (graphite_create_new_loop_guard): Same.
787         * graphite-interchange.c
788         (build_linearized_memory_access): Same.
789         (pdr_stride_in_loop): Same.
790         (memory_strides_in_loop_1): Same.
791         (memory_strides_in_loop): Same.
792         (extend_scattering): Same.
793         (psct_scattering_dim_for_loop_depth): Same.
794         (pbb_number_of_iterations): Same.
795         * graphite-poly.h
796         (debug_iteration_domains): Same.
797         * graphite-ppl.c
798         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
799         (ppl_set_inhomogeneous_gmp): Same.
800         (ppl_strip_loop): Same.
801         (ppl_lexico_compare_linear_expressions): Same.
802         (ppl_read_polyhedron_matrix): Same.
803         (ppl_max_for_le_pointset): Same.
804         * graphite-ppl.h
805         (ppl_read_polyhedron_matrix): Same.
806         (tree_int_to_gmp): Same.
807         (gmp_cst_to_tree): Same.
808         (ppl_set_inhomogeneous): Same.
809         (ppl_set_inhomogeneous_tree): Same.
810         (ppl_set_coef): Same.
811         (ppl_set_coef_tree): Same.
812         * graphite-sese-to-poly.c
813         (build_pbb_scattering_polyhedrons): Same.
814         (build_scop_scattering): Same.
815         (scan_tree_for_params_right_scev): Same.
816         (scan_tree_for_params): Same.
817         (find_params_in_bb): Same.
818         (find_scop_parameters): Same.
819         (add_upper_bounds_from_estimated_nit): Same.
820         (build_loop_iteration_domains): Same.
821         (add_condition_to_domain): Same.
822         (pdr_add_memory_accesses): Same.
824 2010-04-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
826         * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
827         CLooG's value_* macros to their respective mpz_* counterparts.
828         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
829         (graphite_create_new_loop_guard): Same.
830         * graphite-interchange.c (build_linearized_memory_access): Same.
831         (pdr_stride_in_loop): Same.
832         (memory_strides_in_loop_1): Same.
833         (1st_interchange_profitable_p): Same.
834         * graphite-poly.c (extend_scattering): Same.
835         (psct_scattering_dim_for_loop_depth): Same.
836         (pbb_number_of_iterations): Same.
837         (pbb_number_of_iterations_at_time): Same.
838         * graphite-poly.h (new_1st_loop): Same.
839         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
840         (oppose_constraint): Same.
841         (insert_constraint_into_matrix): Same.
842         (ppl_set_inhomogeneous_gmp): Same.
843         (ppl_set_coef_gmp): Same.
844         (ppl_strip_loop): Same.
845         (ppl_lexico_compare_linear_expressions): Same.
846         (ppl_max_for_le_pointset): Same.
847         (ppl_min_for_le_pointset): Same.
848         (ppl_build_realtion): Same.
849         * graphite-ppl.h (gmp_cst_to_tree): Same.
850         (ppl_set_inhomogeneous): Same.
851         (ppl_set_inhomogeneous_tree): Same.
852         (ppl_set_coef): Same.
853         (ppl_set_coef_tree): Same.
854         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
855         (build_scop_scattering): Same.
856         (add_value_to_dim): Same.
857         (scan_tree_for_params_right_scev): Same.
858         (scan_tree_for_params_int): Same.
859         (scan_tree_for_params): Same.
860         (find_params_in_bb): Same.
861         (find_scop_parameters): Same.
862         (add_upper_bounds_from_estimated_nit): Same.
863         (build_loop_iteration_domains): Same.
864         (create_linear_expr_from_tree): Same.
865         (add_condition_to_domain): Same.
866         (pdr_add_memory_accesses): Same.
868 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
870         PR middle-end/43519
871         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
872         lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
873         When converting an unsigned type to signed, double its precision.
874         (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
875         (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
876         (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
878 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
880         PR middle-end/43519
881         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
882         build_nonstandard_integer_type.
883         (gcc_type_for_interval): Same.
885 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
887         PR middle-end/43519
888         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
889         POINTER_PLUS_EXPR for pointer types.
891         * gcc.dg/graphite/id-19.c: New.
893 2010-04-04  Sebastian Pop  <sebastian.pop@amd.com>
895         PR middle-end/43519
896         * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
897         * graphite-clast-to-gimple.c: Include langhooks.h.
898         (max_signed_precision_type): New.
899         (max_precision_type): Takes two types as arguments.
900         (precision_for_value): New.
901         (precision_for_interval): New.
902         (gcc_type_for_interval): New.
903         (gcc_type_for_value): New.
904         (gcc_type_for_clast_term): New.
905         (gcc_type_for_clast_red): New.
906         (gcc_type_for_clast_bin): New.
907         (gcc_type_for_clast_expr): Split up into several functions.
908         (gcc_type_for_clast_eq): Rewritten.
909         (compute_bounds_for_level): New.
910         (compute_type_for_level_1): New.
911         (compute_type_for_level): New.
912         (gcc_type_for_cloog_iv): Removed.
913         (gcc_type_for_iv_of_clast_loop): Rewritten.
914         (graphite_create_new_loop): Compute the lower and upper bound types
915         with gcc_type_for_clast_expr.
916         (graphite_create_new_loop_guard): Same.
917         (find_cloog_iv_in_expr): Removed.
918         (compute_cloog_iv_types_1): Removed.
919         (compute_cloog_iv_types): Removed.
920         (gloog): Do not call compute_cloog_iv_types.
921         * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
922         GBB_CLOOG_IV_TYPES.
923         (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
924         * sese.h (struct gimple_bb): Removed field cloog_iv_types.
925         (GBB_CLOOG_IV_TYPES): Removed.
927         * gcc.dg/graphite/run-id-pr42644.c: Call abort.
929 2010-04-02  Sebastian Pop  <sebastian.pop@amd.com>
931         Reverted this commit: as at this point the loop closed SSA form
932         is under a canonical form respecting the single argument condition.
933         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
934         close phi nodes may have more than one argument.
936 2010-04-01  Sebastian Pop  <sebastian.pop@amd.com>
938         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
939         gimple_phi_num_args of the loop close SSA phi node is equal to 1.
940         (detect_commutative_reduction): Same.
942 2010-03-31  Sebastian Pop  <sebastian.pop@amd.com>
944         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
945         close phi nodes may have more than one argument.
947 2010-03-30  Richard Guenther  <rguenther@suse.de>
948             Zdenek Dvorak  <ook@ucw.cz>
949             Sebastian Pop  <sebastian.pop@amd.com>
951         PR middle-end/43464
952         * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
953         with multiple arguments.
954         (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
956 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
958         * graphite-dependences.c (print_pddr): Call print_pdr with an
959         extra argument.
960         * graphite-poly.c (debug_pdr): Add an extra argument for the
961         verbosity level.
962         (print_pdr): Same.
963         (print_pbb_domain): Same.
964         (print_pbb): Same.
965         (print_scop_context): Same.
966         (print_scop): Same.
967         (print_cloog): Same.
968         (debug_pbb_domain): Same.
969         (debug_pbb): Same.
970         (print_pdrs): Same.
971         (debug_pdrs): Same.
972         (debug_scop_context): Same.
973         (debug_scop): Same.
974         (debug_cloog): Same.
975         (print_scop_params): Same.
976         (debug_scop_params): Same.
977         (print_iteration_domain): Same.
978         (print_iteration_domains): Same.
979         (debug_iteration_domain): Same.
980         (debug_iteration_domains): Same.
981         (print_scattering_function): Same.
982         (print_scattering_functions): Same.
983         (debug_scattering_function): Same.
984         (debug_scattering_functions): Same.
985         * graphite-poly.h (debug_pdr): Update declaration.
986         (print_pdr): Same.
987         (print_pbb_domain): Same.
988         (print_pbb): Same.
989         (print_scop_context): Same.
990         (print_scop): Same.
991         (print_cloog): Same.
992         (debug_pbb_domain): Same.
993         (debug_pbb): Same.
994         (print_pdrs): Same.
995         (debug_pdrs): Same.
996         (debug_scop_context): Same.
997         (debug_scop): Same.
998         (debug_cloog): Same.
999         (print_scop_params): Same.
1000         (debug_scop_params): Same.
1001         (print_iteration_domain): Same.
1002         (print_iteration_domains): Same.
1003         (debug_iteration_domain): Same.
1004         (debug_iteration_domains): Same.
1005         (print_scattering_function): Same.
1006         (print_scattering_functions): Same.
1007         (debug_scattering_function): Same.
1008         (debug_scattering_functions): Same.
1010 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1012         * graphite-poly.c (print_scattering_function_1): New.
1013         (print_scattering_function): Call it.
1014         (print_scop_params): Remove spaces at the end of lines.
1015         (print_cloog): New.
1016         (debug_cloog): New.
1017         * graphite-poly.h (print_cloog): Declared.
1018         (debug_cloog): Declared.
1020 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1022         * tree-ssa-copy.c: Revert this previous change:
1023         (init_copy_prop): Loop closed phi nodes cancontain more than one
1024         argument.
1025         (execute_copy_prop): Revert the previous change: do not call
1026         rewrite_into_loop_closed_ssa.
1028 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1029             Richard Guenther  <rguenther@suse.de>
1031         PR middle-end/43464
1032         * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1033         contain more than one argument.
1034         (execute_copy_prop): Revert the previous change: do not call
1035         rewrite_into_loop_closed_ssa.
1037         * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1038         * gcc.dg/graphite/id-pr43464-1.c: New.
1040 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1042         PR middle-end/43464
1043         * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1044         and verify_loop_closed_ssa when copy prop is executed in the LNO.
1046         * gcc.dg/graphite/id-pr43464.c: New.
1048 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1050         * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1051         in loop->header.
1052         * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1053         * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1054         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1055         to switch between adding the IV bump in loop->latch or in loop->header.
1057 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1059         * passes.c (init_optimization_passes): Add pass_copy_prop
1060         after Graphite.
1062 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1064         * graphite-poly.c (print_scattering_function): Pretty print following
1065         the scoplib format.
1066         (print_pdr): Same.
1067         (print_pbb_domain): Same.
1068         (dump_gbb_cases): Same.
1069         (dump_gbb_conditions): Same.
1070         (print_pdrs): Same.
1071         (print_pbb): Same.
1072         (print_scop_params): Same.
1073         (print_scop_context): Same.
1074         (print_scop): Same.
1075         (print_pbb_body): New.
1076         (lst_indent_to): New.
1077         (print_lst): Start new lines with a #.
1078         * graphite-poly.h (pbb_bb): New.
1079         (pbb_index): Use pbb_bb.
1080         * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1081         disjuncts.
1082         * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1084 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1086         PR middle-end/43351
1087         * gcc.dg/graphite/id-pr43351.c
1089 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1091         PR middle-end/43354
1092         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1093         call insert_out_of_ssa_copy for default definitions.
1094         * gfortran.dg/graphite/id-pr43354.f: New.
1096 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1098         PR middle-end/43349
1099         * gfortran.dg/graphite/pr43349.f: New.
1101 2010-03-11  Sebastian Pop  <sebastian.pop@amd.com>
1103         * graphite-clast-to-gimple.c (my_long_long): Defined.
1104         (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1105         * graphite-sese-to-poly.c (my_long_long): Defined.
1106         (scop_ivs_can_be_represented): Use it.
1108 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1110         * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1111         graphite-max-bbs-per-function, and loop-block-tile-size.
1112         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1113         with "maximum".
1114         (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1116 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1118         * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1119         forward declaration.
1120         * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1121         (add_upper_bounds_from_estimated_nit): New.
1122         (build_loop_iteration_domains): Use it.
1124 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1126         * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1128 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1130         PR middle-end/43306
1131         * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1132         should be an INTEGER_CST.  Also handle CASE_CONVERT.
1133         * gcc.dg/graphite/pr43306.c: New.
1135 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1137         * graphite.c (graphite_initialize): To bound the number of bbs per
1138         function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1139         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1140         * doc/invoke.texi: Document it.
1142 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1144         * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1145         * graphite-sese-to-poly.h (build_poly_scop): Same.
1147 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1149         * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1150         the number of parameters in the scop.  Use as an upper bound
1151         PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1152         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1153         * doc/invoke.texi: Document it.
1155 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1157         * graphite-sese-to-poly.c (add_param_constraints): Use
1158         lower_bound_in_type and upper_bound_in_type.
1160 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1162         * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1163         instead of unsigned_type_node.
1165 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1166             Reza Yazdani  <reza.yazdani@amd.com>
1168         PR middle-end/43065
1169         * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1170         on pointer type parameters.
1172         * gcc.dg/graphite/run-id-4.c: New.
1174 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1176         PR middle-end/43065
1177         * gcc.dg/graphite/run-id-3.c: New.
1179 2010-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
1180             Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1182         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1183         handle conversions from pointer to integers.
1184         (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1185         induction variable, to be able to work with code generated by CLooG.
1186         * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1187         (build_poly_scop): Bail out if we cannot codegen a loop.
1189 2010-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
1191         * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1192         code generation with gloog_error.
1194 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1196         * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1197         Call fold_convert on all the returned values.
1198         (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1199         the type of the resulting expression.
1201 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1203         * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1204         ppl_min_for_le_pointset.  Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1205         * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1207 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1209         * graphite-dependences.c (map_into_dep_poly): Removed.
1210         (dependence_polyhedron_1): Use combine_context_id_scat.
1212 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1214         * graphite-poly.h (struct poly_scattering): Add layout documentation.
1215         (struct poly_bb): Same.
1216         (combine_context_id_scat): New.
1218 2010-03-02  Sebastian Pop  <sebastian.pop@amd.com>
1220         PR middle-end/42326
1221         * sese.c (name_defined_in_loop_p): Return false for default
1222         definitions.
1224         * gcc.dg/graphite/pr42326.c: New.
1226 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
1228         * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1229         and clean up the logic.
1231 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
1233         * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1234         early return.
1236 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1238         PR middle-end/43083
1239         * graphite-scop-detection.c (create_single_exit_edge): Move
1240         the call to find_single_exit_edge to....
1241         (create_sese_edges): ...here.  Don't handle multiple edges
1242         exiting the function.
1243         (build_graphite_scops): Don't handle multiple edges
1244         exiting the function.
1246         * gcc.dg/graphite/pr43083.c: New.
1248 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1250         PR middle-end/43097
1251         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1252         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1254         * gfortran.dg/graphite/pr43097.f: New.
1256 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1258         PR middle-end/43083
1259         * graphite-scop-detection.c (create_single_exit_edge): Move
1260         the call to find_single_exit_edge to....
1261         (create_sese_edges): ...here.  Don't handle multiple edges
1262         exiting the function.
1263         (build_graphite_scops): Don't handle multiple edges
1264         exiting the function.
1266         * gcc.dg/graphite/pr43083.c: New.
1268 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1270         PR middle-end/43097
1271         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1272         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1274         * gfortran.dg/graphite/pr43097.f: New.
1276 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1277             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1279         PR middle-end/43140
1280         * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1282 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1284         PR middle-end/43026
1285         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1287         * g++.dg/graphite/pr43026.C: New.
1289 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1291         * Merge from mainline (154736:156693).
1293 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
1295         PR middle-end/43026
1296         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1298         * g++.dg/graphite/pr43026.C: New.
1300 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1302         * Merge from mainline (154736:156693).
1304 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
1306         PR middle-end/43012
1307         * gcc.dg/graphite/pr43012.c: New.
1309 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1311         * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1313 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1315         * g++.dg/graphite/pr42930.C: New.
1317 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1319        * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1321 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1323         * g++.dg/graphite/pr42930.C: New.
1325 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1327         PR middle-end/42930
1328         * graphite-scop-detection.c (graphite_can_represent_scev): Call
1329         graphite_can_represent_init for MULT_EXPR.
1331 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1333         PR middle-end/42914
1334         PR middle-end/42530
1335         * graphite-sese-to-poly.c (remove_phi): New.
1336         (translate_scalar_reduction_to_array): Call remove_phi.
1338         * gcc.dg/graphite/pr42530.c: New.
1339         * gcc.dg/graphite/pr42914.c: New.
1341 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1343         PR middle-end/42930
1344         * graphite-scop-detection.c (graphite_can_represent_scev): Call
1345         graphite_can_represent_init for MULT_EXPR.
1347 2010-02-10  Sebastian Pop  <seb@napoca>
1349         PR middle-end/42914
1350         PR middle-end/42530
1351         * graphite-sese-to-poly.c (remove_phi): New.
1352         (translate_scalar_reduction_to_array): Call remove_phi.
1354         * gcc.dg/graphite/pr42530.c: New.
1355         * gcc.dg/graphite/pr42914.c: New.
1357 2010-02-10  Sebastian Pop  <seb@napoca>
1359         PR middle-end/42771
1360         * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1361         * graphite-clast-to-gimple.h (gloog): Update declaration.
1362         * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1363         * graphite-poly.h (struct poly_bb): Add missing comments.
1364         (struct scop): Add poly_scop_p field.
1365         (POLY_SCOP_P): New.
1366         * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1367         * graphite.c (graphite_transform_loops): Build the polyhedral
1368         representation for each scop before code generation.
1369         * sese.c (rename_variables_in_operand): Removed.
1370         (rename_variables_in_expr): Return the renamed expression.
1371         (rename_sese_parameters): New.
1372         * sese.h (rename_sese_parameters): Declared.
1374         * gcc.dg/graphite/pr42771.c: New.
1376 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1378         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
1379         return 0 from main.
1380         * gcc.dg/graphite/block-1.c: Same.
1381         * gcc.dg/graphite/block-3.c: Same.
1382         * gcc.dg/graphite/block-4.c: Same.
1383         * gcc.dg/graphite/block-5.c: Same.
1384         * gcc.dg/graphite/block-6.c: Same.
1385         * gcc.dg/graphite/block-7.c: Same.
1386         * gcc.dg/graphite/interchange-0.c: Same.
1387         * gcc.dg/graphite/interchange-1.c: Same.
1388         * gcc.dg/graphite/interchange-10.c: Same.
1389         * gcc.dg/graphite/interchange-11.c: Same.
1390         * gcc.dg/graphite/interchange-12.c: Same.
1391         * gcc.dg/graphite/interchange-2.c: Same.
1392         * gcc.dg/graphite/interchange-3.c: Same.
1393         * gcc.dg/graphite/interchange-4.c: Same.
1394         * gcc.dg/graphite/interchange-5.c: Same.
1395         * gcc.dg/graphite/interchange-6.c: Same.
1396         * gcc.dg/graphite/interchange-7.c: Same.
1397         * gcc.dg/graphite/interchange-8.c: Same.
1398         * gcc.dg/graphite/interchange-9.c: Same.
1399         * gcc.dg/graphite/interchange-mvt.c: Same.
1401 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1403         * gfortran.dg/graphite/id-19.f: New.
1404         * gfortran.dg/graphite/pr14741.f90: New.
1405         * gfortran.dg/graphite/pr41924.f90: New.
1406         * gfortran.dg/graphite/run-id-2.f90: New.
1408 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1410         PR middle-end/42988
1411         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1412         to unknown_dependence.
1413         (graphite_legal_transform_dr): Handle the unknown_dependence.
1414         (graphite_carried_dependence_level_k): Same.
1416 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1418         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
1419         return 0 from main.
1420         * gcc.dg/graphite/block-1.c: Same.
1421         * gcc.dg/graphite/block-3.c: Same.
1422         * gcc.dg/graphite/block-4.c: Same.
1423         * gcc.dg/graphite/block-5.c: Same.
1424         * gcc.dg/graphite/block-6.c: Same.
1425         * gcc.dg/graphite/block-7.c: Same.
1426         * gcc.dg/graphite/interchange-0.c: Same.
1427         * gcc.dg/graphite/interchange-1.c: Same.
1428         * gcc.dg/graphite/interchange-10.c: Same.
1429         * gcc.dg/graphite/interchange-11.c: Same.
1430         * gcc.dg/graphite/interchange-12.c: Same.
1431         * gcc.dg/graphite/interchange-2.c: Same.
1432         * gcc.dg/graphite/interchange-3.c: Same.
1433         * gcc.dg/graphite/interchange-4.c: Same.
1434         * gcc.dg/graphite/interchange-5.c: Same.
1435         * gcc.dg/graphite/interchange-6.c: Same.
1436         * gcc.dg/graphite/interchange-7.c: Same.
1437         * gcc.dg/graphite/interchange-8.c: Same.
1438         * gcc.dg/graphite/interchange-9.c: Same.
1439         * gcc.dg/graphite/interchange-mvt.c: Same.
1441 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1443         * gfortran.dg/graphite/id-19.f: New.
1444         * gfortran.dg/graphite/pr14741.f90: New.
1445         * gfortran.dg/graphite/pr41924.f90: New.
1446         * gfortran.dg/graphite/run-id-2.f90: New.
1448 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1450         PR middle-end/42988
1451         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1452         to unknown_dependence.
1453         (graphite_legal_transform_dr): Handle the unknown_dependence.
1454         (graphite_carried_dependence_level_k): Same.
1456 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1458         * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1460 2010-02-05  Sebastian Pop  <sebastian.pop@amd.com>
1461             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
1463         PR middle-end/42637
1464         * graphite-dependences.c (build_lexicographical_constraint): Return
1465         a union of dependence polyhedra.
1466         (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1468         * gcc.dg/graphite/block-0.c: Enable runtime check.  XFAILed.
1469         * gcc.dg/graphite/block-4.c: Same.
1470         * gcc.dg/graphite/block-7.c: Same.
1471         * gcc.dg/graphite/interchange-12.c: Same.
1472         * gcc.dg/graphite/interchange-mvt.c: Same.
1473         * gfortran.dg/graphite/interchange-1.f: XFAILed.
1474         * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1475         * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1477 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1479         * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1480         the execution check to FAIL.  This testcase is miscompiled by Graphite
1481         and the check should be re-enabled.
1482         * gcc.dg/graphite/interchange-mvt.c: Same.
1483         * gcc.dg/graphite/block-0.c: Same.
1484         * gcc.dg/graphite/block-4.c: Same.
1485         * gcc.dg/graphite/block-7.c: Same.
1487 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1489         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1490         * gcc.dg/graphite/scop-0.c: Fix spaces.
1491         * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1492         * gfortran.dg/graphite/block-2.f: Same.
1493         * gfortran.dg/graphite/block-3.f90: Same.
1494         * gfortran.dg/graphite/block-4.f90: Same.
1495         * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1496         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1498 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1500         * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1501         PDDR_ORIGINAL_SCATTERING_P.
1502         (pddr_is_empty): Rewritten.
1503         (print_dependence_polyhedron_layout): New.
1504         (print_pddr): New.
1505         (debug_pddr): New.
1506         (build_alias_set_powerset): Moved up.
1507         (poly_drs_may_alias_p): Moved up.
1508         (lexicographically_gt_p): Removed.
1509         (build_lexicographically_gt_constraint): Renamed
1510         build_lexicographical_constraint, reimplemented.
1511         (dependence_polyhedron_1): Simplified parameters.
1512         (dependence_polyhedron): Same.  Keep along empty PDDRs
1513         to make efficient use of the cache.
1514         (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1515         (graphite_legal_transform_dr): Rewritten.
1516         (graphite_legal_transform_bb): Pass fewer arguments to
1517         graphite_legal_transform_dr.
1518         (graphite_carried_dependence_level_k): Simplified implementation.
1519         (dot_original_deps_stmt_1): Call dependence_polyhedron.
1520         (dot_transformed_deps_stmt_1): Same.
1521         (dot_original_deps): Same.
1522         (dot_transformed_deps): Same.
1523         * graphite-dependences.h (struct poly_ddr): Added a new field
1524         original_scattering_p.
1525         (PDDR_ORIGINAL_SCATTERING_P): New.
1526         (print_pddr): Declared.
1527         (debug_pddr): Declared.
1528         * graphite-ppl.c: Clarify comment.
1529         * sese.h (print_gimple_bb): Removed unused declaration.
1530         (debug_gbb): Same.
1532 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1534         * g++.dg/graphite/graphite.exp: Rewritten.
1535         * gcc.dg/graphite/graphite.exp: Rewritten.
1536         * gfortran.dg/graphite/graphite.exp: Rewritten.
1537         * gcc.dg/graphite/block-0.c: Added runtime test.
1538         * gcc.dg/graphite/block-1.c: Same.
1539         * gcc.dg/graphite/block-3.c: Same.
1540         * gcc.dg/graphite/block-4.c: Same.
1541         * gcc.dg/graphite/block-5.c: Same.
1542         * gcc.dg/graphite/block-6.c: Same.
1543         * gcc.dg/graphite/block-7.c: Same.
1544         * gcc.dg/graphite/interchange-0.c: Same.
1545         * gcc.dg/graphite/interchange-1.c: Same.
1546         * gcc.dg/graphite/interchange-10.c: Same.
1547         * gcc.dg/graphite/interchange-11.c: Same.
1548         * gcc.dg/graphite/interchange-12.c: Same.
1549         * gcc.dg/graphite/interchange-2.c: Same.
1550         * gcc.dg/graphite/interchange-3.c: Same.
1551         * gcc.dg/graphite/interchange-4.c: Same.
1552         * gcc.dg/graphite/interchange-5.c: Same.
1553         * gcc.dg/graphite/interchange-6.c: Same.
1554         * gcc.dg/graphite/interchange-7.c: Same.
1555         * gcc.dg/graphite/interchange-8.c: Same.
1556         * gcc.dg/graphite/interchange-9.c: Same.
1557         * gcc.dg/graphite/interchange-mvt.c: Same.
1558         * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1560 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1562         * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1563           background.
1565 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1567         * common.opt: Add -fgraphite-cloog-opts.
1568         * graphite-clast-to-gimple.c (set_cloog_options): Same.
1569         * opts.c (decode_options): Same.
1571 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1573         * gcc.dg/graphite/id-17.c: New.
1574         * gcc.dg/graphite/pr41888.c: New.
1575         * gcc.dg/graphite/scop-22.c: New.
1576         * gfortran.dg/graphite/pr40982.f90: New.
1578 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1580         * testsuite/gcc.dg/graphite/id-17.c: New.
1581         * testsuite/gcc.dg/graphite/pr41888.c: New.
1582         * testsuite/gcc.dg/graphite/scop-22.c: New.
1583         * testsuite/gfortran.dg/graphite/pr40982.f90: New.
1585 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1587         * graphite-dependences.c: Clarify comments.
1588         (build_pddr): Add an extra parameter direction.
1589         (graphite_legal_transform_dr): Use build_pddr.
1590         (dot_original_deps_stmt_1): Update use of build_pddr.
1591         (dot_transformed_deps_stmt_1): Same.
1592         (dot_original_deps): Same.
1593         (dot_transformed_deps): Same.
1595         * gcc.dg/graphite/interchange-12.c: New.
1596         * gcc.dg/graphite/block-7.c: New.
1598 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1600         * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1601         (pddr_transformed_scattering): Removed.
1602         (graphite_legal_transform_dr): Use build_pddr.
1603         (dot_original_deps_stmt_1): Same.
1604         (dot_transformed_deps_stmt_1): Same.
1605         (dot_original_deps): Same.
1606         (dot_transformed_deps): Same.
1608 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1610         * graphite-dependences.c (lexicographically_gt_p): Add comments.
1611         (build_lexicographically_gt_constraint): Same.
1612         (dependence_polyhedron_1): Same.
1613         (dependence_polyhedron): Same.
1615 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1617         * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1618         (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1619         (lexicographically_gt_p): Change type of direction to int.
1620         (build_lexicographically_gt_constraint): Same.
1621         (dependence_polyhedron_1): Same.
1622         (dependence_polyhedron): Same.
1623         (pddr_original_scattering): Use integers for direction.
1624         (pddr_transformed_scattering): Same.
1625         (graphite_legal_transform_dr): Same.
1626         (graphite_carried_dependence_level_k): Same.
1628 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1630         * graphite-dependences.c (build_pairwise_constraint): Renamed
1631         ppl_build_relation.  Moved...
1632         (dr_equality_constraints): Use ppl_build_relation.
1633         (build_pairwise_scheduling_equality): Same.
1634         (build_pairwise_scheduling_inequality): Same.
1635         * graphite-ppl.c (ppl_build_relation): ...here.
1636         * graphite-ppl.h (ppl_build_relation): Declared.
1638 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1640         PR middle-end/42681
1641         * graphite-clast-to-gimple.c (gloog_error): New static variable.
1642         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1643         Set gloog_error when such an expression failed to be built.
1644         (translate_clast): Early return when gloog_error is set.
1645         (gloog): Clear gloog_error.  When gloog_error is set, call
1646         set_ifsese_condition to enable the original code.  Return the status
1647         of the code generation based on gloog_error.
1648         * sese.c (set_ifsese_condition): New.
1649         * sese.h (set_ifsese_condition): Declared.
1651         * g++.dg/graphite/pr42681.C: New.
1653 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1655         PR middle-end/42681
1656         * graphite-clast-to-gimple.c (gloog_error): New static variable.
1657         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1658         Set gloog_error when such an expression failed to be built.
1659         (translate_clast): Early return when gloog_error is set.
1660         (gloog): Clear gloog_error.  When gloog_error is set, call
1661         set_ifsese_condition to enable the original code.  Return the status
1662         of the code generation based on gloog_error.
1663         * sese.c (set_ifsese_condition): New.
1664         * sese.h (set_ifsese_condition): Declared.
1666         * testsuite/g++.dg/graphite/pr42681.C: New.
1668 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1670         PR middle-end/42732
1671         * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1672         rename_nb_iterations.
1673         * sese.c (rename_variables_in_operand): New.
1674         (rename_variables_in_expr): New.
1675         (rename_nb_iterations): New.
1676         (sese_adjust_liveout_phis): Update the rename_map.
1677         * sese.h (rename_nb_iterations): Declared.
1678         * tree-scalar-evolution.c (scev_reset_htab): New.
1679         (scev_reset): Call scev_reset_htab.
1680         * tree-scalar-evolution.h (scev_reset_htab): Declared.
1682         * gfortran.dg/graphite/pr42732.f: New.
1684 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
1686         PR middle-end/42393
1687         * graphite-clast-to-gimple.c: Fix formatting.
1688         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1689         (expr_defined_in_loop_p): New.
1690         (add_loop_exit_phis): Also handle full expressions: remove from
1691         the rename_map the expressions defined in the loop that we're closing.
1693         * gfortran.dg/graphite/pr42393-1.f90: New.
1694         * gfortran.dg/graphite/pr42393.f90: Add new flags
1695         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1696         make this testcase useful in the Graphite branch.
1698 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
1700         PR middle-end/42393
1701         * graphite-clast-to-gimple.c: Fix formatting.
1702         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1703         (expr_defined_in_loop_p): New.
1704         (add_loop_exit_phis): Also handle full expressions: remove from
1705         the rename_map the expressions defined in the loop that we're closing.
1707         * testsuite/gfortran.dg/graphite/pr42393-1.f90: New.
1708         * testsuite/gfortran.dg/graphite/pr42393.f90: Add new flags
1709         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1710         make this testcase useful in the Graphite branch.
1712 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
1714         * graphite-scop-detection.c (exclude_component_ref): Removed.
1715         (is_simple_operand): Removed.
1716         (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1718 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1720         PR middle-end/42221
1721         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1722         the array indexing of ADDR_EXPRs.
1724         * gcc.dg/graphite/pr42221.c: New.
1726 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1728         PR middle-end/42221
1729         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1730         the array indexing of ADDR_EXPRs.
1732         * testsuite/gcc.dg/graphite/pr42221.c: New.
1734 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1736         PR middle-end/42521
1737         * graphite.c (graphite_finalize): Call scev_reset.
1738         (graphite_transform_loops): Do not call scev_reset between the code
1739         generation of scops.
1741         * gcc.dg/graphite/pr42521.c: New.
1743 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1745         * graphite-interchange.c (memory_stride_in_loop): Renamed
1746         pdr_stride_in_loop.
1747         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1748         (memory_strides_in_loop): Memoize the memory strides per loop.
1749         (lst_interchange_profitable_p): Do not initialize to zero the memory
1750         strides.
1751         * graphite-poly.h (struct lst): Add a field memory_strides.
1752         (LST_LOOP_MEMORY_STRIDES): New.
1753         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1754         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1756 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1758         * graphite-interchange.c (memory_stride_in_loop): Renamed
1759         pdr_stride_in_loop.
1760         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1761         (memory_strides_in_loop): Memoize the memory strides per loop.
1762         (lst_interchange_profitable_p): Do not initialize to zero the memory
1763         strides.
1764         * graphite-poly.h (struct lst): Add a field memory_strides.
1765         (LST_LOOP_MEMORY_STRIDES): New.
1766         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1767         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1769 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1771         * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1772         memory_strides_in_loop.  Gather memory strides on a whole loop.
1773         (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1774         (lst_interchange_profitable_p): Removed.
1775         (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1777 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1779         Revert patch 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1780         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1781         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1782         Remove context_loop and level.
1784 2010-01-07  Richard Guenther  <rguenther@suse.de>
1786         PR tree-optimization/42641
1787         * sese.c (rename_map_elt_info): Use the SSA name version, do
1788         not hash pointers.
1790 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
1792         * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1793         blocked" only when both the strip mine and the interchange have
1794         been applied.
1796         * gcc.dg/graphite/block-2.c: Removed.
1797         * gcc.dg/graphite/block-3.c: Add scan pattern.
1798         * gcc.dg/graphite/block-4.c: Same.
1799         * gcc.dg/graphite/block-5.c: Same.
1800         * gcc.dg/graphite/block-6.c: Same.
1802 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
1804         * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1805         before allocating a new one.
1806         (copy_renames): Check that slot is not NULL.
1807         (mark_bb_with_pbb): Same.
1808         (compute_cloog_iv_types_1): Same.
1809         * graphite-interchange.c (lst_perfect_nestify): Free the before,
1810         nest, and after LSTs.
1811         (lst_try_interchange_loops): Same.
1813 2010-01-05  Sebastian Pop  <sebastian.pop@amd.com>
1815         PR middle-end/42178
1816         * graphite-interchange.c (lst_try_interchange_loops): Do not return
1817         the before, nest, and after LSTs.
1818         (lst_try_interchange): Removed.
1819         (lst_interchange_select_inner): Do not iterate over the LSTs if they
1820         were modified.
1821         (lst_interchange_select_outer): Apply interchange on the outer loop
1822         until there are no more changes in the inner loops.
1824 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
1826         Revert patch fixing PR middle-end/42221.
1828 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
1830         PR middle-end/42180
1831         * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1832         GIMPLE_CALL.
1834         * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1836 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
1838         PR middle-end/42180
1839         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1840         that contain only one statement.
1842         * gfortran.dg/graphite/pr42180.f90: New.
1844 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1846         PR middle-end/42393
1847         * gfortran.dg/graphite/pr42393.f90: New.
1849 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1851         PR middle-end/42186
1852         * gfortran.dg/graphite/pr42186.f90: New.
1854 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1856         PR middle-end/42186
1857         * testsuite/gfortran.dg/graphite/pr42186.f90: New.
1859 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1861         PR middle-end/42205
1862         * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1863         Insert the reduction copy in the same block as the phi node.
1864         (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1866         * gcc.dg/graphite/pr42205-1.c: New.
1867         * gcc.dg/graphite/pr42205-2.c: New.
1869 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1871         PR middle-end/42221
1872         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1873         the array indexing of ADDR_EXPRs.
1875         * gcc.dg/graphite/pr42221.c: New.
1877 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1879         PR middle-end/42178
1880         PR middle-end/42334
1881         * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1882         index.  Call lst_interchange_select_inner only once.
1883         (lst_interchange_select_inner): Update use of lst_try_interchange.
1884         (lst_interchange_select_outer): Update.
1886 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
1888         PR middle-end/42178
1889         PR middle-end/42334
1890         * graphite-interchange.c (lst_try_interchange): Do not increment the
1891         the OUTER index when there is no AFTER kernel.  Do not increment the
1892         OUTER index for after processing the AFTER kernel.
1893         (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1894         (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1895         index.  Do not pass to lst_interchange_select_inner the OUTER index.
1896         (scop_do_interchange): Update use of lst_interchange_select_outer.
1898         * gfortran.dg/graphite/graphite.exp
1899         (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1900         * gfortran.dg/graphite/interchange-1.f: Add comment.  Clean
1901         the graphite dump file.
1902         * gfortran.dg/graphite/interchange-2.f: Same.
1903         * gfortran.dg/graphite/pr42334-1.f: New.
1905 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
1907         PR middle-end/42178
1908         PR middle-end/42334
1909         * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1910         that are empty.
1911         (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1912         (lst_try_interchange): Reimplemented.
1913         (lst_interchange_select_inner): Same.
1914         (lst_do_interchange): Renamed lst_interchange_select_outer.
1915         Reimplemented.
1916         (scop_do_interchange): Update use of lst_interchange_select_outer.
1918         * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1919         * gcc.dg/graphite/block-0.c: Un-XFAILed.
1920         * gcc.dg/graphite/pr42211.c: New.
1921         * gfortran.dg/graphite/pr42334.f90: New.
1923 2009-12-14  Sebastian Pop  <sebastian.pop@amd.com>
1925         PR middle-end/42181
1926         * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1927         carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1929         * gfortran.dg/graphite/pr42181.f90: New.
1931 2009-12-12  Sebastian Pop  <sebpop@gmail.com>
1933         PR middle-end/42284
1934         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1935         insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1936         (detect_commutative_reduction_arg): Simplified.
1937         (detect_commutative_reduction): Early return when the argument of
1938         the close phi is not of an SSA_NAME.
1940         * gcc.dg/graphite/pr42284.c: New.
1942 2009-12-11  Alexander Monakov  <amonakov@ispras.ru>
1944         * dbgcnt.def (graphite_scop): New counter.
1945         * graphite.c: Include dbgcnt.h
1946         (graphite_transform_loops): Use new counter to limit transformations.
1948 2009-12-08  Sebastian Pop  <sebpop@gmail.com>
1950         PR middle-end/42285
1951         * graphite-scop-detection.c (graphite_can_represent_init): Also
1952         handle more complex MULT_EXPRs containing parameters by recursion
1953         on the structure.
1955         * gfortran.dg/graphite/pr42285.f90: New.
1957 2009-12-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1959         * g++.dg/graphite/pr42130.C: Fix type.
1961 2009-11-29  Alexander Monakov <amonakov@gcc.gnu.org>
1963         * g++.dg/graphite/pr42130.C: Correct testcase.
1965 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
1967         * Merge from mainline (154493:154734).
1969 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
1971         * Merge from mainline (151362:154491).
1973 2009-11-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1975         * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1976         graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1978 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1980         PR middle-end/42130
1981         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1982         translate_clast_for_loop): New.
1983         (translate_clast_for): Add a condition around the loop, to do not
1984         execute loops with zero iterations.
1985         * g++.dg/graphite/pr42130.C: New.
1986         * gcc.dg/graphite/pr35356-2.c: Adapt.
1988 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1990         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1991         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1992         Remove context_loop and level.
1994 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1996         * graphite-clast-to-gimple.c (translate_clast_user,
1997         translate_clast_for, translate_clast_guard): Simplify and move common
1998         elements to translate_clast().
1999         (translate_clast): Simplify and get common elements.
2001 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2003         * graphite-clast-to-gimple.c (translate_clast_user,
2004         translate_clast_for, translate_clast_guard): Split out of
2005         translate_clast.
2007 2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>
2009         * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2010         clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2011         debug_clast_name_indexes_1, debug_clast_name_indexes,
2012         clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2013         (clast_name_to_gcc, clast_to_gcc_expression,
2014         clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2015         gcc_type_for_clast_eq, graphite_translate_clast_equation,
2016         graphite_create_guard_cond_expr, graphite_create_new_loop,
2017         translate_clast): Add params_index.
2018         (initialize_cloog_names): Create parameter strings from scratch, do
2019         not reference other strings.
2020         (create_params_index): New.
2021         (gloog): Initialize params_index.
2022         * graphite-scop-detection (free_scops_1): Removed.
2023         (limit_scops): Use normal free_scops.
2024         * graphite-sese-to-poly.c (save_var_names): Removed.
2025         (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2026         and SESE_PARAMS_INDEX.
2027         * sese.c (new_sese, free_sese): Dito.
2028         * sese.h (struct sese): Remove params_index, params_names.
2029         (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2031 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2033         Revert the following patch from 2009-09-14:
2034         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2035         tree-scalar-evolution.h, and then tree-data-ref.h.
2036         * graphite-clast-to-gimple.c: Same.
2037         * graphite-dependences.c: Same.
2038         * graphite-interchange.c: Same.
2039         * graphite-poly.c: Same.
2040         * graphite-scop-detection.c: Same.
2041         * graphite-sese-to-poly.c: Same.
2042         * graphite.c: Same.
2043         * lambda-code.c: Same.
2044         * matrix-reorg.c: Same.
2045         * tree-data-ref.c: Same.
2046         * tree-if-conv.c: Same.
2047         * tree-loop-distribu: Same.: Same.
2048         * tree-loop-linear.c: Same.
2049         * tree-parloops.c: Same.
2050         * tree-predcom.c: Same.
2051         * tree-vect-patterns.c: Same.
2053 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2055         Revert patch from 2009-09-14.
2056         * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2057         passes at -O1 and below.
2059 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2061         PR middle-end/40281
2062         * gcc.dg/graphite/pr40281.c: New.
2064         * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2065         evolutions should not variate in inner loops.
2067 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2069         PR middle-end/42050
2070         * gfortran.dg/graphite/pr42050.f90: New.
2072 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2074         * graphite-interchange.c (memory_strides_in_loop_depth): New.
2075         (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2077 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2079         * graphite-blocking.c (scop_do_block): New.
2080         * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2081         * graphite-poly.h (scop_do_block): Declared.
2083 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2085         * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2086         depth is the loop nesting depth in the LST.  Call psct_dynamic_dim
2087         to transform depth into the time_depth before calling
2088         pbb_number_of_iterations_at_time.
2089         (lst_do_strip_mine): Use a scalar variable instead of recomputing
2090         lst_depth.
2092 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2094         Reverted the patch for "scattering permutations" from 2009-10-28.
2096         * graphite-poly.c (print_permutation): New.
2097         (debug_permutation): New.
2098         (new_poly_bb): Initialize PBB_PERMUTATION.
2099         (free_poly_bb): Free PBB_PERMUTATION.
2100         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2101         (struct pbb_permutation_elt): New.
2102         (PBB_PERMUTATION_ELT_STRIDE): New.
2103         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2104         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2105         (new_pbb_permutation_elt): New.
2106         (pbb_permutation_elt_free): New.
2107         (struct poly_bb): Add field permutation.
2108         (PBB_PERMUTATION): New.
2109         (print_permutation): Declared.
2110         (debug_permutation): Declared.
2112 2009-11-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
2114         * graphite-interchange.c (build_partial_difference): New.
2115         (memory_stride_in_loop): Refactored the computation of
2116         equality constraints into build_partial_difference function.
2117         Added support for debugging stride computations.
2119 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2121         * graphite-clast-to-gimple.c (gloog): Free if_region,
2122         if_region->true_region, and if_region->region.
2123         * sese.c (if_region_set_false_region): Free if_region->false_region.
2124         (create_if_region_on_edge): Do not use GGC_NEW.
2125         (move_sese_in_condition): Remove useless initialization.
2127 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2129         * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2130         for the loops created by the loop distribution.  Do not modify the
2131         input LSTs.
2132         (lst_try_interchange_loops): Same.  Use a temporary LST for the
2133         transformed schedule.  Call lst_update_scattering before data
2134         dependence analysis.
2135         (lst_try_interchange): Pass an extra parameter INDEX.
2136         (lst_do_interchange_1): New.
2137         (lst_do_interchange): Call lst_do_interchange_1.
2138         (scop_do_interchange): Call lst_update_scattering.
2139         * graphite-poly.c (apply_poly_transforms): Do not call
2140         lst_update_scattering.
2141         * graphite-poly.h (lst_pred): New.
2142         (lst_succ): New.
2143         (lst_find_first_pbb): Return NULL when not found.
2144         (lst_empty_p): New.
2145         (lst_insert_in_sequence): Allow LST1 to be NULL.
2146         (lst_replace): New.
2147         (lst_substitute_3): New.
2148         * gcc.dg/graphite/interchange-1.c: XFail.
2149         * gcc.dg/graphite/interchange-8.c: XFail.
2150         * gcc.dg/graphite/interchange-11.c: XFail.
2152 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2154         * graphite-interchange.c (lst_perfectly_nested_p): New.
2155         (lst_perfect_nestify): New.
2156         (lst_try_interchange_loops): Call store_lst_schedule,
2157         lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2158         (scop_do_interchange): Avoid redundant legality test.
2159         Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2160         * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2161         * graphite-poly.h (psct_static_dim): New.
2162         (lst_dewey_number_at_depth): New.
2163         (lst_find_pbb): Restructured.
2164         (lst_find_first_pbb): Restructured.
2165         (lst_find_last_pbb): New.
2166         (lst_contains_p): New.
2167         (lst_contains_pbb): New.
2168         (lst_create_nest): New.
2169         (lst_remove_from_sequence): New.
2170         (pbb_update_scattering): New.
2171         (lst_update_scattering_under): New.
2172         (lst_update_scattering_seq): New.
2173         (lst_update_scattering): New.
2174         (lst_insert_in_sequence): New.
2175         (lst_distribute_lst): New.
2176         (lst_remove_all_before_including_pbb): New.
2177         (lst_remove_all_before_excluding_pbb): New.
2179 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2181         * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2182         get_loop_exit_edges.
2184 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2186         * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2188 2009-10-28  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2190         * graphite-poly.c (print_permutation): New.
2191         (debug_permutation): New.
2192         (new_poly_bb): Initialize PBB_PERMUTATION.
2193         (free_poly_bb): Free PBB_PERMUTATION.
2194         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2195         (struct pbb_permutation_elt): New.
2196         (PBB_PERMUTATION_ELT_STRIDE): New.
2197         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2198         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2199         (new_pbb_permutation_elt): New.
2200         (pbb_permutation_elt_free): New.
2201         (struct poly_bb): Add field permutation.
2202         (PBB_PERMUTATION): New.
2203         (print_permutation): Declared.
2204         (debug_permutation): Declared.
2206 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2208         * graphite-clast-to-gimple.c (gloog): Do not call
2209         sese_reset_aux_in_loops.
2210         * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2211         extra argument for domains.  Do not use loop->aux.
2212         (build_scop_iteration_domain): Initialize and free domains, pass it
2213         to build_loop_iteration_domains and extract the information from
2214         domains.  Do not use loop->aux.
2215         * sese.c (sese_reset_aux_in_loops): Removed.
2216         * sese.h (sese_reset_aux_in_loops): Removed.
2218 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2220         * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2221         (dependency_in_loop_p): Same.
2222         (translate_clast): Do not use loop->aux.  Initialize
2223         loop->can_be_parallel.
2224         (mark_loops_parallel): Removed.
2225         * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2226         * graphite.c (free_aux_in_new_loops): Removed.
2227         (graphite_finalize): Do not call free_aux_in_new_loops.
2228         (graphite_transform_loops): Do not call mark_loops_parallel.
2230 2009-10-26  Li Feng  <nemokingdom@gmail.com>
2232         * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2233         (translate_clast): Pass an extra parameter LEVEL.
2234         Call get_scattering_level.
2235         * graphite-clast-to-gimple.h (get_scattering_level): New.
2237 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2239         * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2240         * cfgloop.h (struct loop): New field single_iv.
2242         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2243         loop->aux anymore: use loop->single_iv.
2244         (graphite_loop_normal_form): Moved...
2245         (build_graphite_loop_normal_form): Removed.
2246         (gloog): Do not call build_graphite_loop_normal_form.
2247         (free_aux_in_new_loops): Moved...
2248         (mark_loops_parallel): Restructure.
2249         * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2250         * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2251         (scop_canonicalize_loops): New.
2252         (build_poly_scop): Call scop_canonicalize_loops.
2253         * graphite.c (free_aux_in_new_loops): ...here.
2255 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2257         * g++.dg/graphite/graphite.exp: Add the same rules as in
2258         gcc.dg/graphite/graphite.exp.
2260 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2262         * g++.dg/graphite/id-1.C: New.
2264 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2266         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2267         argument base_name.
2268         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2269         (rewrite_phi_out_of_ssa): Same.
2270         (rewrite_cross_bb_scalar_deps): Same.
2271         (translate_scalar_reduction_to_array): Same.
2273 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2275         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2276         dump_alias_graphs.
2278 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2280         * graphite-sese-to-poly.c (dump_alias_graphs): New.
2281         (build_scop_drs): Call dump_alias_graphs.
2283 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2285         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2286         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2287         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2288         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2289         * graphite-poly.h (free_lst): New.
2290         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2291         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2293 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2295         * graphite-poly.h (struct scop): Add a field saved_schedule.
2296         (SCOP_SAVED_SCHEDULE): New.
2297         (store_lst_schedule): New.
2298         (restore_lst_schedule): New.
2299         (store_scattering): Call store_lst_schedule.
2300         (restore_scattering): Call restore_lst_schedule.
2302 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2304         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2305         (pdr_add_alias_set): Same.
2306         (build_poly_dr): Same.
2307         (build_alias_set_optimal_p): Same.
2308         (build_base_obj_set_for_drs): Same.  Do not store the result of
2309         graphds_dfs.
2311 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2313         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2314         all_components_are_cliques to 1.
2316 2009-10-20  Li Feng  <nemokingdom@gmail.com>
2318         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2319         the new structure.
2320         (pdr_add_alias_set): Update retrieving alias_set_num.
2321         (build_poly_dr): Update retrieving dr_base_object_set.
2322         (partition_drs_to_sets): Remove.
2323         (build_alias_set_optimal_p): New.
2324         (build_alias_set_for_drs): Rename.
2325         (build_scop_drs): Update.
2326         * graphite-sese-to-poly.h (struct base_alias_pair): New.
2327         (ALIAS_SET_INDEX): Remove.
2328         (BASE_OBJECT_SET_INDEX): Remove.
2330 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2332         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2334 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2336         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2337         loop upper bounds for 1-element arrays at end of structures.
2338         * tree-flow.h (array_at_struct_end_p): Declared.
2339         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2341 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2343         * g++.dg/graphite/pr41305.C: New.
2345 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
2347         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2348         construction of parameter constraints from loop iteration analysis.
2349         * gcc.dg/graphite/run-id-2.c: New test.
2351 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2353         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2354         and new_cstr.
2356 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2358         * graphite-dependences.c (dependence_polyhedron_1): Remove
2359         unused gdim dimensions from the DDR polyhedron.
2361 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2363         * graphite-dependences.c (pddr_transformed_scattering): New.
2364         (dot_original_deps_stmt_1): New.
2365         (dot_transformed_deps_stmt_1): New.
2366         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2367         dot_transformed_deps_stmt_1.
2368         (dot_original_deps): New.
2369         (dot_transformed_deps): New.
2370         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2372 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2374         * graphite-dependences.c (reduction_dr_1): Remove wrong
2375         assert: reduction BBs can have multiple reduction writes
2376         to memory.  interchange-3.f90 is an example.
2378 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2380         * gfortran.dg/graphite/interchange-3.f90: New.
2382 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2384         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2386 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2388         * graphite-dependences.c (dependence_polyhedron_1): Add the
2389         context to the dependence polyhedron.
2391 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2393         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2394         PBB_PDR_DUPLICATES_REMOVED.
2395         (new_poly_bb): Same.
2397 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2399         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2400         SCOP_CONTEXT.
2401         (build_loop_iteration_domains): Extract bounds on parameters
2402         based on the data size.
2403         (build_scop_context): Do not initialize SCOP_CONTEXT;
2404         add new constraints.
2406 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2408         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2409         * graphite-ppl.h (graphite-ppl.h): Declared.
2411 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2413         * graphite-ppl.c (ppl_print_linear_expr): New.
2414         (debug_ppl_linear_expr): New.
2415         * graphite-ppl.h (ppl_print_linear_expr): Declared.
2416         (debug_ppl_linear_expr): Declared.
2418 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2420         * graphite-interchange.c: Fix comments.
2421         * gcc.dg/graphite/block-1.c: Fix comments.
2423 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2425         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2426         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2428 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2430         Reapply the patch from Alexander Monakov that disappeared during
2431         the last merges from trunk.
2433         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
2435         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2436         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
2438 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2440         * graphite-interchange.c (memory_stride_in_loop): The depth
2441         argument corresponds to a dynamic time dimension, so use
2442         psct_dynamic_dim to refer to the transformed scattering dimension.
2444 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2446         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2448 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2450         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2451         root of the LST.
2452         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2453         the root of the LST.
2454         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2455         fake loop.
2456         (print_lst): Print the root of LST in a different format.
2457         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2459 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2461         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2463 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2465         * doc/passes.texi: Document the Graphite infrastructure.
2467 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2469         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2470         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2471         and check the SSA representation.
2473         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2475 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2477         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2479 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2481         * gcc.dg/graphite/interchange-11.c: New.
2483 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2485         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2487 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2489         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2490         Add -fno-loop-strip-mine and -fno-loop-interchange.
2491         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2492         -fno-loop-strip-mine.
2493         * gfortran.dg/graphite/graphite.exp: Same.
2495 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2497         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2498         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2499         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2500         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2501         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2502         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2503         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2504         DEFAULT_FLAGS_GRAPHITE_SCOP.
2505         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2506         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2508 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2510         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2512 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2513             Sebastian Pop  <sebastian.pop@amd.com>
2515         * graphite-interchange.c (build_linearized_memory_access): Pass an
2516         offset as parameter.
2517         (memory_stride_in_loop): Include transform scattering in the
2518         access functions to be able to querry the strides in the
2519         transformed loops.
2520         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2521         not the psct_iterator_dim.
2523 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2525         * graphite-blocking.c (pbb_do_strip_mine): Removed.
2526         (lst_do_strip_mine_loop): New.
2527         (lst_do_strip_mine): New.
2528         (scop_do_strip_mine): Call lst_do_strip_mine.
2529         * graphite-poly.h (lst_add_loop_under_loop): New.
2530         (lst_find_first_pbb): New.
2532 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2534         * graphite-poly.c (loop_to_lst): Fix LST creation.
2536 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
2538         * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2539         sizeof(unsigned long) to make it run on 32bit systems.
2541 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
2543         * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2544         SEGFAULT on 32bit.
2546 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2548         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2549         Comment.
2550         (write_alias_graph_to_ascii_dot): New.
2551         (write_alias_graph_to_ascii_ecc): Ditto.
2552         (partition_drs_to_sets): Add testing of optimality of current method
2553         which assigns alias numbers according to DFS Comopnent number.  used
2554         as heuristic for the upcoming ECC algorithm.
2555         (build_scop_drs): Write to file also with the ecc and dot format.
2557 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2559         * gfortran.dg/graphite/interchange-1.f: XFail.
2561 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2563         * graphite.c (graphite_initialize): Do not handle functions with
2564         more than 100 basic blocks.
2566 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2568         * graphite-blocking.c (pbb_do_strip_mine): Use
2569         PARAM_LOOP_BLOCK_TILE_SIZE.
2571 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2573         * graphite-poly.c (dot_lst_1): New.
2574         (dot_lst): New.
2575         * graphite-poly.h (dot_lst): Declared.
2577 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2579         * graphite-dependences.c (dot_deps_stmt_1): New.
2580         (dot_deps_stmt): New.
2581         * graphite-dependences.h (dot_deps_stmt): Declared.
2583 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2585         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2586         not replace cross BB scalar dependences ending on PHI nodes.
2587         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2589 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2591         * graphite-poly.c (apply_poly_transforms): Implement the high
2592         level driver for flag_loop_block.
2593         * opts.c (decode_options): Enable flag_loop_block at -O2.
2594         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2595         flag_loop_block.
2597         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2598         -floop-block.
2599         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2600         Add -floop-block.
2602 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2604         * graphite-poly.h (lst_find_pbb): New.
2605         (find_lst_loop): New.
2607 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2609         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2610         * graphite-poly.h (struct scop): Remove dep_graph field.
2611         (SCOP_DEP_GRAPH): Removed.
2613 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2615         * graphite-poly.h (copy_lst): Do full copy of LST.
2617 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
2619         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2620         when the loop stride is zero.
2622         * gcc.dg/graphite/id-16.c: New.
2624 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2626         * graphite-dependences.c (reduction_dr_1): New.
2627         (reduction_dr_p): New.
2628         (graphite_legal_transform_dr): Call reduction_dr_p.
2629         (reduction_ddr): Renamed reduction_ddr_p.
2630         * graphite-poly.h (same_pdr_p): New.
2631         (number_of_write_pdrs): New.
2632         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2633         (split_reduction_stmt): Do not split reduction statements
2634         when there are no writes to memory.
2635         (translate_scalar_reduction_to_array_for_stmt): Insert the
2636         memory reduction statement just after the scalar reduction statement.
2638         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2639         Un-XFAIL-ed.
2640         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2641         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2643 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2645         * graphite-interchange.c (lst_apply_interchange): New.
2646         (lst_interchange_profitable_p): New.
2647         (lst_try_interchange_loops): New.
2648         (lst_try_interchange): New.
2649         (lst_do_interchange): New.
2650         (pbb_do_interchange): Removed.
2651         (scop_do_interchange): Call lst_do_interchange.
2653 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2655         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2656         SCOP_TRANSFORMED_SCHEDULE.
2657         (loop_to_lst): New.
2658         (scop_to_lst): New.
2659         (print_lst): New.
2660         (debug_lst): New.
2661         * graphite-poly.h (lst_p): New.
2662         (struct lst): New.
2663         (LST_LOOP_P): New.
2664         (LST_LOOP_FATHER): New.
2665         (LST_PBB): New.
2666         (LST_SEQ): New.
2667         (scop_to_lst): Declared.
2668         (print_lst): Declared.
2669         (debug_lst): Declared.
2670         (new_lst_loop): New.
2671         (new_lst_stmt): New.
2672         (copy_lst): New.
2673         (lst_depth): New.
2674         (lst_dewey_number): New.
2675         (struct scop): Add original_schedule and transformed_schedule fields.
2676         (SCOP_ORIGINAL_SCHEDULE): New.
2677         (SCOP_TRANSFORMED_SCHEDULE): New.
2678         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2680 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2682         * graphite-dependences.c (reduction_ddr): New.
2683         (graphite_legal_transform_bb): Call reduction_ddr.
2684         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2685         Initialize PBB_IS_REDUCTION.
2686         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2687         (PBB_IS_REDUCTION): New.
2688         (new_poly_bb): Update declaration.
2689         * graphite-scop-detection.h (build_scop_bbs): Removed.
2690         (nb_reductions_in_loop): Removed.
2691         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2692         parameter for reductions.
2693         (try_generate_gimple_bb): Update call to new_poly_bb.
2694         (build_scop_bbs_1): Same.
2695         (build_scop_bbs): Same.
2696         (gsi_for_phi_node): New.
2697         (scalar_close_phi_node_p): Remove gcc_assert.
2698         (split_reduction_stmt): New.
2699         (is_reduction_operation_p): New.
2700         (phi_contains_arg): New.
2701         (follow_ssa_with_commutative_ops): New.
2702         (detect_commutative_reduction_arg): New.
2703         (detect_commutative_reduction_assign): New.
2704         (follow_inital_value_to_phi): New.
2705         (edge_initial_value_for_loop_phi): New.
2706         (initial_value_for_loop_phi): New.
2707         (detect_commutative_reduction): New.
2708         (translate_scalar_reduction_to_array_for_stmt): New.
2709         (insert_copyout): New.
2710         (insert_copyin): New.
2711         (translate_scalar_reduction_to_array): New.
2712         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2713         (rewrite_commutative_reductions_out_of_ssa_loop): New.
2714         (rewrite_commutative_reductions_out_of_ssa): New.
2715         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2716         * sese.h (split_region_for_bb): New.
2718         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2719         * gcc.dg/graphite/interchange-1.c: Fix format.
2720         * gcc.dg/graphite/interchange-10.c: New.
2722 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2724         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2725         buggy assert.
2727 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2729         * graphite-sese-to-poly.c (scev_analyzable_p): New.
2730         (rewrite_cross_bb_scalar_dependence): New.
2731         (rewrite_cross_bb_scalar_deps): New.
2732         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2733         Call rewrite_cross_bb_scalar_deps.
2735 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2737         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2738         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2739         gsi_for_stmt.
2741 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2743         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2744         * graphite-interchange.c (pbb_do_interchange): Same.
2745         * graphite-poly.c (print_scattering_function): Same.
2746         (debug_pdrs): Same.
2747         * graphite-poly.h (pbb_loop): New.
2748         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2750 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
2752         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2754 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
2756         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2757         so don't pass a pointer to it.
2758         (build_alias_set_for_drs): Same.
2759         (build_base_obj_set_for_drs): Same.
2760         (build_scop_drs): Same.
2762 2009-09-26  Li Feng  <nemokingdom@gmail.com>
2764         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2765         the alias graph of data references.
2767 2009-09-25  Li Feng  <nemokingdom@gmail.com>
2769         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2770         (build_scop_drs): When debugging, write the alias graph to file,
2771         otherwise, should be disabled.
2773 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2775         * Merge from mainline (151310:151361).
2777 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2779         * Merge from mainline (151171:151310).
2781 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2783         * Merge from mainline (151171:151806).
2785 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2787         * Revert the last commit.
2789 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2791         * Merge from mainline (151171:151819).
2793 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2795         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2796         (is_simple_operand): Remove call to stmt_simple_memref_p.
2797         (stmt_simple_for_scop_p): Update call to is_simple_operand.
2799 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
2801         * gcc.dg/graphite/interchange-mvt.c: New File.
2802         * gcc.dg/graphite/scop-dsyrk.c: New File.
2803         * gcc.dg/graphite/scop-dsyr2k.c: New File.
2804         * gcc.dg/graphite/scop-mvt.c: New File.
2805         * gcc.dg/graphite/scop-sor.c: New File.
2807 2009-09-17 Li Feng  <nemokingdom@gmail.com>
2809         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2810         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2811         (graphite_carried_dependence_level_k): Ditto.
2812         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2813         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2814         (new_poly_dr): Adjust declaration.
2815         * graphite-sese-to-poly.c (free_data_refs_aux): New.
2816         (free_gimple_bb): Added free_data_refs_aux.
2817         (build_poly_dr): Add dr_base_object_set.
2818         (partition_drs_to_sets): New.
2819         (dr_same_base_object_p): New.
2820         (build_alias_set_for_drs): New.
2821         (build_base_object_set_for_drs): New.
2822         (build_scop_drs): Add build_base_obj_set_for_drs.
2823         * graphite-sese-to-poly.h: Added #define for alias set number index and
2824         base object set index.
2825         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2826         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2828 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
2830         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2831         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
2833 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
2835         * graphite-sese-to-poly.c (struct irp_data): Removed.
2836         (idx_record_params): Removed.
2837         (find_params_in_bb): Scan for parameters the access functions; don't
2838         parse the tree representation.
2840 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
2842         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2843         passes at -O1 and below.
2845 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
2847         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2848         tree-scalar-evolution.h, and then tree-data-ref.h.
2849         * graphite-clast-to-gimple.c: Same.
2850         * graphite-dependences.c: Same.
2851         * graphite-interchange.c: Same.
2852         * graphite-poly.c: Same.
2853         * graphite-scop-detection.c: Same.
2854         * graphite-sese-to-poly.c: Same.
2855         * graphite.c: Same.
2856         * lambda-code.c: Same.
2857         * matrix-reorg.c: Same.
2858         * tree-data-ref.c: Same.
2859         * tree-if-conv.c: Same.
2860         * tree-loop-distribu: Same.: Same.
2861         * tree-loop-linear.c: Same.
2862         * tree-parloops.c: Same.
2863         * tree-predcom.c: Same.
2864         * tree-vect-patterns.c: Same.
2866 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
2868         Partially revert the previous patch, except the following.
2869         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2870         as parameters the operands of the not expression.
2872 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2874         * tree-scalar-evolution.c (instantiate_scev_assign): New.
2875         Do not call analyze_scalar_evolution on assignments.
2876         (instantiate_scev_phi): Call analyze_scalar_evolution.
2877         (instantiate_scev_name): Call instantiate_scev_assign and
2878         instantiate_scev_phi.
2879         (instantiate_scev_not): Adapted to pass as parameters the operands
2880         of the not expression.
2882 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2884         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2885         to pass as parameters the operands of the binary expression.
2887 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2889         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2890         instantiate_scev_not.  Handle NEGATE_EXPR.
2891         (instantiate_scev_r): Handle NEGATE_EXPR.
2893 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2895         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2896         instantiate_scev_r.
2897         (instantiate_scev_r): Move code in instantiate_scev_2
2898         and instantiate_scev_1.
2900 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2902         * tree-scalar-evolution.c (instantiate_scev_3): New.
2903         (instantiate_scev_1): Move code in instantiate_scev_3.
2905 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2907         * tree-scalar-evolution.c (instantiate_scev_poly): New.
2908         (instantiate_scev_1): Move code in instantiate_scev_poly.
2910 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2912         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2913         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2915 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2917         * tree-scalar-evolution.c (instantiate_scev_convert): New.
2918         (instantiate_scev_1): Move code in instantiate_scev_convert.
2920 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2922         * tree-scalar-evolution.c (instantiate_scev_binary): New.
2923         (instantiate_scev_1): Move code in instantiate_scev_binary.
2925 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2927         * tree-scalar-evolution.c (instantiate_scev_name): New.
2928         (instantiate_scev_1): Move code in instantiate_scev_name.
2930 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
2932         * Merge from mainline (150992:151171).
2934 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
2936         * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2938 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
2940         * graphite-dependences.c (graphite_legal_transform_bb): Call
2941         pbb_remove_duplicate_pdrs.
2942         * graphite-poly.c (can_collapse_pdr): Removed.
2943         (pdr_find_duplicate): Removed.
2944         (can_collapse_pdrs): New.
2945         (pbb_remove_duplicate_pdrs): New.
2946         (new_poly_dr): Do not look for duplicates.
2947         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2948         (PBB_PDR_DUPLICATES_REMOVED): New.
2949         (pbb_remove_duplicate_pdrs): Declared.
2951 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
2953         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2954         the strides by multiplying by PDR_NB_REFS.
2955         * graphite-poly.c (can_collapse_pdr): New.
2956         (pdr_find_duplicate): New.
2957         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
2958         Initialize PDR_NB_REFS.
2959         * graphite-poly.h (struct poly_dr): Add field nb_refs.
2960         (PDR_NB_REFS): New.
2961         (new_poly_dr): Number of subscripts is a graphite_dim_t.
2963 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
2965         Revert one of the previous commits:
2966         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2967         the computation of symmetric data dependence relations.
2968         (dependency_between_pbbs_p): Same.
2970 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
2972         PR middle-end/40965
2973         * graphite-poly.c (apply_poly_transforms): Remove legality test before
2974         any transform.
2976 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
2978         * graphite-dependences.c (pddr_original_scattering): Return NULL
2979         for read-read dependence relations.
2980         * graphite-poly.h (enum poly_dr_type): Fix comment.
2981         (pdr_read_p): New.
2982         (pdr_write_p): New.
2983         (pdr_may_write_p): New.
2985 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
2987         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2988         (struct poly_dr): Same.
2989         (new_poly_dr): Same.
2990         * graphite-poly.c (new_poly_dr): Same.
2992 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2993             Sebastian Pop  <sebastian.pop@amd.com>
2995         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2996         pbb_strip_mine_time_depth.  Changed the implementation so that
2997         transformation is expressed as a transformation on
2998         time (scatttering) dimensions.  Also, ensures that the 2d+1
2999         scheduling format is preserved.
3000         (pbb_strip_mine_profitable_p): Profitability is based on the
3001         iteration number of a given time (scattering) dimension,
3002         and not on a original loop depth dimension.
3003         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3004         (pbb_do_strip_mine): Call psct_dynamic_dim.
3005         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3006         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3007         (pbb_nb_dynamic_scattering_transform): New.
3008         (psct_dynamic_dim): New.
3010 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3012         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3013         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3014         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3015         * graphite-interchange.c (build_linearized_memory_access): Same.
3016         (memory_stride_in_loop): Same.
3018 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3020         * graphite-dependences.c (pddr_original_scattering): New.
3021         (graphite_legal_transform_dr): Call pddr_original_scattering.
3022         (dot_deps_1): New.
3023         (dot_deps): New.
3024         * graphite-dependences.h (dot_deps): Declared.
3025         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3026         (print_pdr): Print PDR_ID.
3027         * graphite-poly.h (struct poly_dr): Add field id.
3028         (PDR_ID): New.
3029         (pbb_index): New.
3030         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3032 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
3034         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3035         not delete the original dependence relation.
3037 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3039         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3040         the computation of symmetric data dependence relations.
3041         (dependency_between_pbbs_p): Same.
3043 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3045         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3046         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3047         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3048         (free_poly_ddr): New.
3049         (pddr_is_empty): New.
3050         (dependence_polyhedron_1): Now returns a poly_ddr_p.
3051         (dependence_polyhedron): Same.  Remove useless gcc_assert.
3052         Remove fprintfs.
3053         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3054         (graphite_carried_dependence_level_k): Call pddr_is_empty.
3055         * graphite-dependences.h (enum poly_dependence_kind): New.
3056         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
3057         (PDRP_SOURCE): Renamed PDDR_SOURCE.
3058         (PDRP_SINK): Renamed PDDR_SINK.
3059         (PDRP_DDP): Renamed PDDR_DDP.
3060         (PDDR_KIND): New.
3061         (free_poly_ddr): Declared.
3062         * graphite-poly.c (new_scop): Use the new hash function names.
3063         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3064         into original_pddrs.
3065         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3067 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3069         * Merge from mainline (150764:150992).
3071 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3073         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3074         bounds with LT_EXPR to make niter analysis more precise on code
3075         generated by Graphite.
3077 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3079         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3080         (graphite_legal_transform_bb): Same.
3081         (poly_drs_may_alias_p): Same.
3083 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
3085         PR middle-end/40981
3086         * graphite-ppl.c (ppl_max_for_le): Correct the use of
3087         ppl_Pointset_Powerset_C_Polyhedron_maximize.
3089 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3091         * graphite-poly.c (print_pbb): Print PBB index.
3093 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3095         * Merge from mainline (r150672:150764).
3097 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3099         * graphite-interchange.c (ppl_max_for_le): Moved...
3100         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3101         * graphite-ppl.c (ppl_max_for_le): ... here.
3102         * graphite-ppl.h (ppl_max_for_le): Declared.
3104 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
3106         * Merge from mainline (r150372:150672).
3108 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3110         PR middle-end/40980
3111         * sese.c (convert_for_phi_arg): New.
3112         (add_guard_exit_phis): Use convert_for_phi_arg.
3114         * gfortran.dg/graphite/id-17.f: New.
3116 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3118         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3119         unknown subscript upper bounds.
3121         * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3123 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3124             Pranav Garg  <pranav.garg2107@gmail.com>
3126         * graphite-interchange.c (gather_access_strides): Removed.
3127         (ppl_max_for_le): New.
3128         (build_linearized_memory_access): New.
3129         (memory_stride_in_loop): New.
3130         (pbb_interchange_profitable_p): Reimplemented.
3131         * graphite-ppl.h (ppl_new_id_map): New.
3132         (ppl_interchange): New.
3134         * gcc.dg/graphite/interchange-6.c: XFAILed.
3136 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3138         * graphite-interchange.c (compute_subscript): Removed.
3139         (compute_array_size_cstr): Removed.
3140         (compute_array_size_poly): Removed.
3141         (compute_array_size): Removed.
3142         (gather_access_strides_poly): Removed.
3143         (gather_access_strides): Empty.
3145 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3147         * graphite-dependences.c (dependence_polyhedron_1): Replace
3148         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3149         (graphite_legal_transform_dr): Same.
3150         (graphite_carried_dependence_level_k): Same.
3151         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3152         Initialize PDR_NB_SUBSCRIPTS.
3153         (print_pdr_access_layout): Replace pdr_nb_subscripts with
3154         PDR_NB_SUBSCRIPTS.
3155         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3156         (PDR_NB_SUBSCRIPTS): New.
3157         (pdr_nb_subscripts): Removed.
3158         (pdr_dim): Simplified.
3159         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3160         with PDR_NB_SUBSCRIPTS.
3162 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3164         * graphite-interchange.c (compute_array_size): Remove use of
3165         PDR_DATA_CONTAINER.
3166         * graphite-poly.c (new_poly_dr): Remove argument data_container.
3167         Do not initialize PDR_DATA_CONTAINER.
3168         (print_pdr): Do not print PDR_DATA_CONTAINER.
3169         * graphite-poly.h (struct poly_dr): Remove data_container field.
3170         (PDR_DATA_CONTAINER): Removed.
3171         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3172         PDR_DATA_CONTAINER.
3173         (build_poly_dr): Same.
3175 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3177         * gcc.dg/graphite/interchange-9.c: New.
3179 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3180             Sebastian Pop  <sebastian.pop@amd.com>
3182         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3183         copy of the dependence polyhedron.  Free the temporary objects.
3184         (graphite_carried_dependence_level_k): Free unused objects before
3185         returning.
3187         * gcc.dg/graphite/interchange-1.c: XFAILed.
3188         * gcc.dg/graphite/interchange-2.c: XFAILed.
3189         * gcc.dg/graphite/interchange-3.c: XFAILed.
3190         * gcc.dg/graphite/interchange-4.c: XFAILed.
3191         * gcc.dg/graphite/interchange-7.c: XFAILed.
3193 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3195         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3196         Early return without analyzing the data dependences if no
3197         transform has been done.  Call restore_scattering if the transform
3198         is not legal.
3199         (graphite-interchange.c): Same.
3200         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3201         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3202         (apply_poly_transforms): Do not gcc_assert that
3203         the transform is legal.
3204         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3205         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3206         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3207         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3208         * graphite-poly.h (struct poly_scattering): New.
3209         (struct poly_bb): Add original, transformed, and saved fields.
3210         Remove transformed_scattering, original_scattering, nb_local_variables,
3211         and nb_scattering_transform fields.
3212         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3213         (poly_scattering_new): New.
3214         (poly_scattering_free): New.
3215         (poly_scattering_copy): New.
3216         (store_scattering_pbb): New.
3217         (store_scattering): New.
3218         (restore_scattering_pbb): New.
3219         (restore_scattering): New.
3220         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3221         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3223 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3225         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3226         (print_scop): Same.
3228 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3230         * Makefile.in (graphite.o): Depends on PREDICT_H.
3231         * graphite.c: Include predict.h.
3232         (graphite_finalize): Call tree_estimate_probability.
3233         * predict.c (predict_loops): Do not call scev_initialize and
3234         scev_finalize.
3235         (tree_estimate_probability_bb): New.
3236         (tree_estimate_probability): Do not initialize loops: move that
3237         code to the driver.  Call tree_estimate_probability_bb.
3238         (tree_estimate_probability_driver): New.
3239         (pass_profile): Use tree_estimate_probability_driver.
3240         * predict.h (tree_estimate_probability): Declared.
3242 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3244         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3245         * graphite-dependences.c (graphite_legal_transform): Add time to
3246         TV_GRAPHITE_DATA_DEPS.
3247         (dependency_between_pbbs_p): Same.
3248         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3250 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3252         * Merge from mainline (r149952:150372).
3254 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3256         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3257         * graphite-blocking.c: Same.
3258         * graphite-clast-to-gimple.c: Same.
3259         * graphite-dependences.c: Same.
3260         * graphite-poly.c: Same.
3261         * graphite-poly.h: Same.
3262         * graphite-ppl.c: Same.
3263         * graphite-scop-detection.c: Same.
3264         * graphite-sese-to-poly.c: Same.
3265         * graphite.c: Same.
3267 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3269         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3270         (remove_simple_copy_phi): New.
3271         (remove_invariant_phi): New.
3272         (simple_copy_phi_p): New.
3273         (reduction_phi_p): New.
3274         (gsi_for_ssa_name_def): New.
3275         (insert_out_of_ssa_copy): New.
3276         (insert_out_of_ssa_copy_on_edge): New.
3277         (create_zero_dim_array): New.
3278         (scalar_close_phi_node_p): New.
3279         (rewrite_close_phi_out_of_ssa): New.
3280         (rewrite_phi_out_of_ssa): New.
3281         (rewrite_reductions_out_of_ssa): New.
3282         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3284         * gcc.dg/graphite/id-11.c: New.
3285         * gcc.dg/graphite/id-15.c: New.
3286         * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3287         * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3288         * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3289         * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3290         * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3291         * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3292         * gfortran.dg/graphite/id-13.f: New.
3293         * gfortran.dg/graphite/id-5.f: New.
3295 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3297         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3298         check that nb_reductions_in_loop is zero.
3299         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3300         reduction phi nodes.
3301         (nb_reductions_in_loop): Removed.
3302         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3303         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3304         (bb_contains_non_iv_scalar_phi_nodes): Removed.
3305         (scop_contains_non_iv_scalar_phi_nodes): Removed.
3306         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3308 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3310         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3311         statements that have an empty iteration domain.
3312         * gfortran.dg/graphite/id-16.f: New.
3314 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3316         * tree-scalar-evolution.c (instantiate_scev_1): Return
3317         chrec_dont_know when the result is not above instantiate_below.
3318         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3319         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3320         the tree has a known scalar evolution.
3321         * gfortran.dg/graphite/id-14.f: New.
3322         * gfortran.dg/graphite/id-15.f: New.
3324 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3326         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3327         insert_gsi.
3328         (rename_variables): Keep inserting renames after the ones already
3329         inserted.
3331 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3333         * graphite-sese-to-poly.c (compare_bb_depths): New.
3334         (graphite_sort_dominated_info): New.
3335         (build_scop_bbs_1): Call graphite_sort_dominated_info.
3336         (build_scop_scattering): Fix comment.
3338 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3340         * graphite.c (graphite_finalize): Call print_loops instead of
3341         dump_function_to_file.
3342         * gcc.dg/graphite/graphite.exp: Fix formatting.
3343         * gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
3344         loops generated in the graphite output file.
3345         * gcc.dg/graphite/pr35356-2.c: New.
3346         * gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
3347         * gfortran.dg/graphite/id-12.f: New.
3349 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3351         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3352         Remove 2 XFAIL.
3354 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3355             Tobias Grosser  <grosser@fim.uni-passau.de>
3357         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3358         alias set number build alias in ACCESSES polyhedron.
3359         (build_alias_set_for_drs): New.
3360         (build_pbb_drs): Added build_alias_set_for_drs.
3361         * graphite-dependences.c (poly_drs_may_alias_p): New.
3362         (graphite_carried_dependence_level_k): Check alias information
3363         before building polyhedron.
3365 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3367         * Makefile.in (lambda-code.o): Fix formatting.
3369 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3371         * Merge from mainline (r149350-149952)
3373 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3375         * graphite-poly.c (apply_poly_transforms): Move strip_mine
3376         before interchange to prepare for loop blocking.
3378 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3380         * graphite-poly.c (apply_poly_transforms): Add checks after every
3381         transformation.
3382         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3383         done in apply_poly_transforms.
3385 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3387         * graphite-dependences.c (build_lexicographically_gt_constraint):
3388         Replace RES parameter with *RES.
3389         (dependence_polyhedron_1): Pass an address of the parameter RES
3390         instead of value of RES.
3392 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3394         * graphite.c (graphite_finalize): Fix comment.
3395         (graphite_transform_loops): Reset scev info after code generation
3396         of each scop.
3398 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3400         * graphite.c (graphite_finalize): Call scev_reset.
3402 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3404         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3405         GBB_CLOOG_IV_TYPES hash table twice.
3406         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3407         (add_condition_to_domain): Clear GMP values.
3409 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3411         * graphite-dependences.c: Fix formatting.
3412         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3413         (pbb_number_of_iterations): Free ppl_Linear_Expression.
3414         * graphite-sese-to-poly.c: Fix formatting.
3415         * graphite.c (graphite_transform_loops): Create the hash table
3416         after the early return.
3418 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3420         * gcc.dg/graphite/id-14.c: New.
3421         * gcc.dg/graphite/pr40157.c: New.
3422         * gfortran.dg/graphite/id-11.f: New.
3424 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3426         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3427         (build_poly_scop): Return false when there are no pbbs within
3428         loops to avoid to pass to cloog scops with no loops.
3430 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3432         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3433         useless test "i % 2".
3434         (build_pbb_scattering_polyhedrons): Fix formatting.
3435         (build_poly_dr): Same.
3436         * graphite.c (graphite_transform_loops): Restructure.
3438 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
3440         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3441         reduction_list parameter.
3442         (rewrite_all_phi_nodes_with_iv): Same.
3443         (canonicalize_loop_ivs): Same.
3444         * tree-parloops.c (struct brli): Removed.
3445         (build_reduction_list_info): Removed.
3446         (build_new_reduction): New.
3447         (analyze_reduction_list): Removed.
3448         (gather_scalar_reductions): Find reductions instead of phi
3449         nodes that can't be canonicalized.
3450         (try_create_reduction_list): Remove reduction_list parameter.
3451         (gen_parallel_loop): Same.
3452         (parallelize_loops): Remove analyze_reductions variable,
3453         initialization and free.
3454         Change reduction_list htab initialization to reduction_info
3455         elements instead of ssa names.
3456         Call try_create_reduction_list and gen_parallel_loop without
3457         analyzed_reduction argument.
3458         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3459         canonicalize_loop_ivs with one less argument.
3460         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3462 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
3464         * graphite-dependences.c (new_poly_dr_pair): New.
3465         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3466         (new_poly_dr_pair): New.
3467         (eq_poly_dr_pair_p): New.
3468         (hash_poly_dr_pair_p): New.
3469         * graphite-dependences.h (struct poly_dr_pair): New.
3470         (eq_poly_dr_pair_p): Declared.
3471         (hash_poly_dr_pair_p): Declared.
3472         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3473         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3474         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3475         * Makefile.in (graphite-poly.o): Add dependence on
3476         graphite-dependences.h.
3478 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3480         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3481         polynomials of degree > 1 pass to Graphite.
3482         * tree-chrec.c (scev_is_linear_expression): Call
3483         evolution_function_is_affine_multivariate_p.
3484         * gfortran.dg/graphite/id-10.f90: New.
3486 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3488         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3489         Instantiate scevs varying in outer loops.
3490         * gfortran.dg/graphite/id-9.f: Correct testcase.
3492 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3494         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3495         redundant constraint.
3497 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3499         * gcc.dg/graphite/graphite.exp: Fix comments.
3500         * gfortran.dg/graphite/graphite.exp: Trigger actions
3501         based on the file names as in the C testsuite.
3502         * gfortran.dg/graphite/block-1.f90: Fix patterns.
3503         * gfortran.dg/graphite/block-2.f: Same.
3504         * gfortran.dg/graphite/block-3.f90: Same.
3505         * gfortran.dg/graphite/block-4.f90: Same.
3506         * gfortran.dg/graphite/id-1.f90: Same.
3507         * gfortran.dg/graphite/id-2.f90: Same.
3508         * gfortran.dg/graphite/id-3.f90: Same.
3509         * gfortran.dg/graphite/id-4.f90: Same.
3510         * gfortran.dg/graphite/id-6.f: Same.
3511         * gfortran.dg/graphite/id-9.f: Same.
3512         * gfortran.dg/graphite/interchange-1.f: Same.
3513         * gfortran.dg/graphite/interchange-2.f: Same.
3514         * gfortran.dg/graphite/scop-1.f: Same.
3516 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3518         * sese.c (expand_scalar_variables_call): New.
3519         (expand_scalar_variables_ssa_name): Handle calls in expander.
3521 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3523         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3524         Expect to see the pattern twice.
3525         * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3526         * gcc.dg/graphite/interchange-5.c: Same.
3527         * gcc.dg/graphite/interchange-6.c: Same.
3529 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3531         * gcc.dg/graphite/id-10.c: New.
3532         * gcc.dg/graphite/id-12.c: New.
3533         * gfortran.dg/graphite/id-7.f: New.
3534         * gfortran.dg/graphite/id-8.f: New.
3536 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3538         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3539         zero.
3541 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3543         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3545 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3547         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3549 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3551         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3552         building PDR subscripts.
3554 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3556         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3557         computation of array sizes.
3559 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3561         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3563 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3565         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3566         build_pairwise_constraint, dr_equality_constraints,
3567         build_pairwise_scheduling_equality,
3568         build_pairwise_scheduling_inequality, lexicographically_gt_p,
3569         build_lexicographically_gt_constraint, dependence_polyhedron,
3570         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3571         Move from NNC_Polyhedron to C_Polyhedron.
3572         * graphite-interchange.c (compute_array_size_poly,
3573         gather_access_strides): Dito.
3574         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3575         free_scop, pbb_number_of_iterations): Dito.
3576         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3577         pbb_dim_iter_domain, struct scop): Dito.
3578         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3579         new_Cloog_Domain_from_ppl_Polyhedron,
3580         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3581         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3582         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3583         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3584         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3585         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3586         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3587         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3588         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3589         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3590         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3591         build_scop_iteration_domain, build_poly_dr): Dito
3593 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3595         * gcc.dg/graphite/graphite.exp: Added a rule to execute
3596         run-id-*.c files.
3597         * gcc.dg/graphite/run-id-1.c: New.
3599 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3601         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3602         positivity constraint on the symbolic number of iterations.
3604 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3606         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3608 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3609             Tobias Grosser  <grosser@fim.uni-passau.de>
3611         * graphite-clast-to-gimple.c (build_scop_context): Removed.
3612         (build_cloog_prog): Directly use SCOP_CONTEXT.
3613         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3614         (free_scop): Free SCOP_CONTEXT.
3615         (print_scop_context): New.
3616         (print_scop): Call print_scop_context.
3617         (debug_scop_context): New.
3618         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3619         (struct scop): Added field context.
3620         (SCOP_CONTEXT): New.
3621         * graphite-sese-to-poly.c (add_param_constraints): New.
3622         (build_scop_context): New.
3623         (build_poly_scop): Call build_scop_context.
3625 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3627         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3628         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3629         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3630         * graphite-ppl.h: Include double-int.h and tree.h.
3631         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3632         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3633         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
3634         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3636 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3638         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3639         POINTER_PLUS_EXPR for pointer types.
3640         (clast_to_gcc_expression): Same.
3642 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3644         * graphite-poly.c (print_scattering_function): Early return when
3645         PBB_TRANSFORMED_SCATTERING is not initialized.
3646         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3648 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
3650         * tree-parloops.c (analyze_reduction_list): Remove unused variable
3651         to fix bootstrap.
3653 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
3655         * tree-parloops.c (analyze_reduction_list): Change return
3656         value to void.
3657         (try_create_reduction_list): Move the call to
3658         analyze_reduction_list to the beginining.
3659         Call reduction_phi with analyzed_reductions as argument
3660         instead of reduction_list.
3662 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3664         *  Merge from mainline (r148296:149346)
3666 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3668         * graphite-scop-detection.c (graphite_can_represent_init): New.
3669         (graphite_can_represent_scev): Call graphite_can_represent_init:
3670         check that the initial value does not contain multiplications of
3671         parameters.
3672         (stmt_has_simple_data_refs_p): New.
3673         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3674         (is_simple_operand): Fix formatting.
3675         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3677 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3679         * gcc.dg/graphite/id-13.c: New.
3680         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3681         analyze_scalar_evolution, use scalar_evolution_in_region.
3682         (scan_tree_for_params_right_scev): Add extra assert.
3683         (parameter_index_in_region_1): Split from parameter_index_in_region.
3684         (idx_record_params): Use scalar_evolution_in_region.
3685         (find_params_in_bb): Same.
3686         (find_scop_parameters): Same.
3687         (build_loop_iteration_domains): Same.
3688         (create_linear_expr_from_tree): Same.
3689         * sese.c (scalar_evolution_in_region): New.
3690         * sese.h (scalar_evolution_in_region): Declared.
3691         (defined_in_sese_p): New.
3692         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3693         static anymore.
3694         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3695         Declared.
3697 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3699         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3700         TREE_DATA_REF_H also implies SCEV_H.
3702 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3704         * graphite-poly.c (print_scop_params): New.
3705         (print_scop): Call print_scop_params.
3706         (debug_scop_params): New.
3707         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3709 2009-07-07  Li Feng  <nemokingdom@gmail.com>
3711         * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3712         * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3713         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3714         * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3715         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3716         * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3718 2009-07-07  Li Feng  <nemokingdom@gmail.com>
3720         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3721         for dependency checking part.
3722         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3723         tests for dependency checking.
3724         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3725         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3726         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3727         flag -fdump-tree-graphite-all for autopar testsuites.
3729 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
3731         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3732         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3733         canonicalize_loop_ivs): Moved...
3734         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
3736 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
3738         * tree-parloops.c (try_create_reduction_list): Pass an extra
3739         argument analyzed_reductions.  Call analyze_reduction_list.
3740         (gen_parallel_loop): Do not call analyze_reduction_list.
3741         (parallelize_loops): Init and finalize analyzed_reductions.
3743 2009-07-06  Li Feng  <nemokingdom@gmail.com>
3745         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3746         Added flag -fno-loop-strip-mine for autopar testcase.
3748 2009-07-04  Li Feng  <nemokingdom@gmail.com>
3750         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3751         transformed scattering dimension instead of unmatch orignal when
3752         calling dependence_polyhedron.
3754 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3756         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3758 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3760         * graphite-poly.c (pbb_number_of_iterations): Check for returned
3761         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3763 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3765         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3766         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3767         * graphite-poly.c (pbb_number_of_iterations): New.
3768         * graphite-poly.h (pbb_number_of_iterations): Declared.
3769         (pbb_iterator_dim, pbb_parameter_dim): New.
3771 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
3773         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3774         last commit on type of lower and upper bound of loops.
3776 2009-06-29  Li Feng  <nemokingdom@gmail.com>
3778         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3779         graphite-dependences.h.
3780         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3781         (mark_bb_with_pbb): New.
3782         (get_stmtfor_depth): New.
3783         (find_pbb_via_hash): New.
3784         (dependency_in_loop_p): New.
3785         (mark_loops_parallel): New.
3786         (free_aux_in_new_loops): New.
3787         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
3788         bb with it's relevant pbb. Mark newly created loops.  Remove mark
3789         innermost loop parallel without checking.
3790         (gloog): Add parameter BB_PBB_MAPPING.
3791         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3792         (gloog): Change declaration.
3793         (mark_loop_parallel): Make extern.
3794         (free_aux_in_new_loops): Declare.
3795         (bb_pbb_map_hash): New.
3796         (eq_bb_pbb_map): New.
3797         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3798         auto parallelization when flag_graphite_force_parallel is set.
3799         (graphite_finalize): Added free_aux_in_new_loops.
3800         * tree-parloops.c (parallelize_loops): Only generate parallel code for
3801         the innermost loop that marked parallel.  Use
3802         flag_graphite_force_parallel instead of loop->can_be_parallel.
3803         (loop_parallel_p): Move inner most checking out of function.
3805 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3807         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3808         type of lower and upper bound of loops signed long int.
3810 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3812         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3813         expression outside the loop.
3815 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3817         * gcc.dg/graphite/interchange-8.c: New.
3819 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3821         * gcc.dg/graphite/interchange-0.c: XFailed.
3822         * gcc.dg/graphite/interchange-5.c: XFailed.
3823         * gcc.dg/graphite/interchange-6.c: XFailed.
3825 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3827         * graphite-interchange.c (compute_array_size_poly): The end of the
3828         recursion should return 1.
3830 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3832         * graphite-interchange.c (compute_array_size_cstr): Allow the
3833         subscript multiplier to be -1.
3834         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3835         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3836         data_container.  Initializes PDR_DATA_CONTAINER.
3837         (print_pdr_access_layout): New.
3838         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
3839         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
3840         data_container.
3841         (PDR_DATA_CONTAINER): New.
3842         (new_poly_dr): Update declaration.
3843         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3844         (build_poly_dr): Call pdr_add_data_dimensions.
3846 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3848         * graphite-poly.h (struct poly_dr): Fix comment.
3849         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3850         (pdr_add_memory_accesses): New.
3851         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3853 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3855         * graphite-poly.c (print_pdrs, debug_pdrs): New.
3856         (print_pbb): Add call to print_pdrs.
3857         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3859 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
3860             Li Feng <nemokingdom@gmail.com>
3862         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3863         (dependency_between_pbbs_p): New.
3864         (lexicographically_gt_p): Assure !empty_p before polyhedron
3865         intersection assign.
3866         (build_lexicographically_gt_constraint): Correct lexicographically
3867         judging.
3868         * graphite-dependences.h: New.
3869         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3871 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
3873         * graphite-clast-to-gimple.c (print_clast_stmt): New.
3874         (gloog): Print to dump_file the generated clast.
3875         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3876         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3878 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
3880         * graphite-poly.c (extend_scattering): Increment
3881         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3883 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
3885         * graphite-interchange.c (compute_array_size_poly): Added exit of
3886         recursion condition.  Continue iterating even after the first equality.
3887         (compute_array_size): Same.
3889 2009-06-24  Li Feng  <nemokingdom@gmail.com>
3891         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3892         -fdump-tree-final_cleanup to -fdump-tree-optimized.
3893         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3894         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3895         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3897 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3899         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3900         only when the use verifies is_gimple_reg.
3902 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3904         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3905         Allocate scaldims after call to unify_scattering_dimensions.
3907 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3909         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3911 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3912             Albert Cohen  <albert.cohen@inria.fr>
3914         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3915         variables for the strip mining.
3917 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3918             Pranav Garg  <pranav.garg2107@gmail.com>
3920         * Makefile.in (OBJS-common): Added graphite-blocking.o.
3921         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3922         (graphite-blocking.o): New rule.
3923         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3924         * graphite-blocking.c: New.
3925         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3926         flag_loop_strip_mine.
3927         (psct_scattering_dim_for_loop_depth): New.
3928         * graphite-poly.h (scop_do_strip_mine): Declared.
3929         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3930         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3931         flag_loop_strip_mine.
3933 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3935         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3936         a GMP value and a PPL coefficient at each iteration of a loop.
3938 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3940         * graphite-dependences.c (dependence_polyhedron): Do not use
3941         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
3942         pbb_nb_scattering_transform.
3943         (graphite_legal_transform_dr): Same.
3944         * graphite-poly.c (extend_scattering): Same.
3945         (unify_scattering_dimensions): Same.
3946         (print_scattering_function): Same.
3947         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3948         PBB_NB_LOCAL_VARIABLES.
3949         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3950         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3951         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3952         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3953         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3954         (pbb_nb_scattering_transform): New.
3955         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3956         (psco_scattering_dim): Add assert on parameters.
3957         (psct_scattering_dim): Same.
3958         (psct_scattering_dim_for_loop_depth): Declared.
3959         (psct_local_var_dim): New.
3960         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3961         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
3962         correct layout, call pbb_nb_local_vars.
3963         (psct_add_local_variable, psct_add_scattering_dimension): New.
3964         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3965         Initialize PBB_NB_SCATTERING_TRANSFORM.
3967 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3969         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3970         (set_coef): Renamed ppl_set_coef.
3971         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3973 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3975         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3976         test a boolean against 1.
3977         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3978         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3979         (pbb_do_interchange): Returns true when a transform has been performed.
3980         (scop_do_interchange): Same.
3981         * graphite-poly.c (apply_poly_transforms): Use the return value of
3982         scop_do_interchange.
3983         * graphite-poly.h (scop_do_interchange): Update declaration.
3985 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3987         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3988         after last use.
3989         * sese.c (sese_reset_aux_in_loops): New.
3990         * sese.h (sese_reset_aux_in_loops): New.
3992 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
3994         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3995         multiplier and multiply the constant by the multiplier.
3996         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3997         (build_poly_dr): Do not use the multiplier to define the subscript.
3999 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4001         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4002         compiler's data reference.  Initialize PDR_CDR.
4003         (print_pdr): Call dump_data_reference.
4004         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4005         Add compiler_dr field.
4006         (PDR_BB): Renamed PDR_PBB.
4007         (PDR_CDR): New.
4008         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4009         GCC's data reference representation.
4010         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4011         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4013 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4015         * graphite-poly.c (print_scattering_function): Also print the layout.
4016         * graphite-poly.h (pbb_nb_local_vars): New.
4018 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4020         * graphite-poly.c (print_pbb_domain): Also print the layout names.
4022 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4024         * graphite-poly.c (print_pdr, debug_pdr): New.
4025         * graphite-poly.h (print_pdr, debug_pdr): Declared.
4026         (PDR_BASE): Removed.
4028 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4030         * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4031         ltrans-{1..6,8}.c.
4033 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4035         * graphite-interchange.c (compute_subscript): Allow also -1 in the
4036         subscript identification column.
4037         (pbb_do_interchange): Print to dump_file that some loops "will be
4038         interchanged".  Rely on that chain of characters in the testcases.
4039         * gcc.dg/graphite/interchange-0.c: New.
4040         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4041         interchange-*.c files and compile them with -floop-interchange.
4043 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
4045         * graphite-interchange.c (interchange_profitable_p): Renamed
4046         pbb_interchange_profitable_p.
4048 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4049             Harsha Jagasia  <harsha.jagasia@amd.com>
4050             Pranav Garg  <pranav.garg2107@gmail.com>
4052         * graphite-interchange.c (interchange_profitable_p): Make static.
4053         (pbb_interchange_loop_depths, pbb_do_interchange,
4054         scop_do_interchange): New.
4055         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4056         for flag_loop_interchange.
4057         * graphite-poly.h (scop_do_interchange): Declared.
4058         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4059         flag_loop_interchange is used.
4061 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4063         * graphite-dependences.c (dependence_polyhedron): Update use of
4064         pbb_nb_scattering_dims.
4065         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4066         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4067         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4068         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4070 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4072         * graphite.c: Cleanup foo.
4074 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4076         * Merge from mainline (r143684:148293).
4077         * Disabled libpcp until it gets fixed.
4079 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4080             Harsha Jagasia  <harsha.jagasia@amd.com>
4082         * graphite-interchange.c: New.
4083         * Makefile.in (graphite-interchange.o): New.
4084         * graphite-poly.h (interchange_profitable_p): Declared.
4085         * graphite-ppl.h (value_max): New.
4087 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4089         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4090         * graphite-poly.h: Fix some comments.
4091         (pdr_dim): New.
4092         (pdr_scop): New.
4094 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4096         * graphite-poly.h
4097         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4098         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4099         (pdr_accessp_nb_params): Renamed pdr_nb_params.
4100         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4101         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4102         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4103         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4104         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4105         * graphite-clast-to-gimple.c: Same.
4106         * graphite-dependences.c: Same.
4107         * graphite-poly.c: Same.
4108         * graphite-sese-to-poly.c: Same.
4110 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4112         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4113         expressions for an IV rename, as returned by clast_to_gcc_expression.
4114         (copy_renames): Rename new_name to expr.
4115         * sese.c (debug_rename_elt): Same.
4116         (get_rename): Same.
4117         (set_rename): Same.
4118         (sese_adjust_liveout_phis): Call force_gimple_operand before using
4119         the information from the rename map.
4120         (rename_variables_in_stmt): Same.
4121         (add_loop_exit_phis): Rename new_name to expr.
4122         (insert_loop_close_phis): Same.
4123         (add_guard_exit_phis): Same.  Call force_gimple_operand.
4124         * sese.h (struct rename_map_elt): Rename new_name to expr.
4125         (new_rename_map_elt): Same.
4127 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4129         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4130         * sese.c (set_rename): Make it extern.
4131         * sese.h (set_rename): Declared.
4133 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4135         * graphite-poly.c (extend_scattering): Free values.
4136         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4137         Free iterators.
4138         (ppl_print_powerset_matrix): Same.
4139         * graphite-scop-detection.c (free_scops_1): New.
4140         (limit_scops): Call free_scops_1.
4141         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4142         (build_poly_dr): Free PPL coefficients.
4143         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4145 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
4147         * graphite-dependences.c: New.
4148         * graphite-data-ref.c: Removed.
4149         * graphite-data-ref.h: Removed.
4150         * Makefile.in (graphite-data-ref.o): Removed.
4151         (graphite-dependences.o): Added.
4152         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4153         * graphite-poly.c: Same.
4154         Move the data dependence testing to graphite-dependences.c.
4156 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
4158         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4159         from graphite_cannot_represent_loop. Code refactored.
4160         (scopdet_basic_block_info): Call graphite_can_represent_loop.
4162 2009-05-17  Li Feng  <nemokingdom@gmail.com>
4164         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4165         Cover all the testcases (not only the filtered ones).
4167 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4169         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4170         unnecessary check. Update comments. Move check for REAL_TYPE here.
4171         (harmful_stmt_in_bb): Remove checks for conditions. This is already
4172         done in (stmt_simple_for_scop_p).
4174 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
4176         * graphite.c (print_global_statistics): New.
4177         (print_graphite_scop_statistic): New.
4178         (print_graphite_statistics): New.
4179         (graphite_initialize, graphite_transform_loops): Print statistics.
4180         * graphite-scop-detection (build_scops): Print statistics.
4181         (print_graphite_scop_statistics): New.
4182         (print_graphite_statistics): New.
4184 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4186         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4187         (debug_clast_name_index): Removed.
4188         (debug_clast_name_indexes_1): Removed.
4189         (debug_clast_name_indexes): Removed.
4190         (clast_name_index_elt_info): Removed.
4191         (eq_clast_name_indexes): Removed.
4192         (clast_name_to_index): Removed.
4193         (new_clast_name_index): Removed.
4194         (save_clast_name_index): Removed.
4195         (save_var_name): Moved...
4196         (init_sese_params_index): Removed.
4197         (clast_name_to_gcc): Remove use of name_tree.
4198         (initialize_cloog_names): Same.
4199         (gloog): Do not call init_sese_params_index.
4200         * graphite-sese-to-poly.c (save_var_name): ...here.
4201         (parameter_index_in_region): New.
4202         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4203         (parameter_index_in_region): Removed.
4204         (is_parameter): Remove use of name_tree.
4205         * sese.h (struct name_tree): Removed.
4206         (struct sese): Remove use of name_tree.  New field params_names.
4207         (SESE_PARAMS_NAMES): New.
4208         (SESE_PARAMS): Remove duplicate.
4209         (parameter_index_in_region): Removed.
4210         (sese_nb_params): Remove use of name_tree.
4211         (struct clast_name_index): New.
4212         (new_clast_name_index): New.
4213         (clast_name_to_index): New.
4214         (save_clast_name_index): New.
4215         (debug_clast_name_index): New.
4216         (debug_clast_name_indexes_1): New.
4217         (debug_clast_name_indexes): New.
4218         (clast_name_index_elt_info): New.
4219         (eq_clast_name_indexes): New.
4221 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4223         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4224         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
4225         (graphite_loop_normal_form): Do not pass region.  Do not
4226         initialize SESE_OLDIVS.
4227         (build_graphite_loop_normal_form): Update call to
4228         graphite_loop_normal_form.
4229         * sese.c (debug_oldivs): Removed.
4230         (new_sese): Do not initialize SESE_OLDIVS.
4231         (free_sese): Do not free SESE_OLDIVS.
4232         (oldiv_for_loop): Removed.
4233         * sese.h (struct sese): Remove old_ivs.
4234         (SESE_OLDIVS): Removed.
4235         (oldiv_for_loop): Removed.
4237 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4239         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4240         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
4241         replaced by a call to newivs_to_depth_to_newiv.
4242         (clast_to_gcc_expression): Pass newivs, remove ivstack.
4243         (clast_to_gcc_expression_red): Same.
4244         (gcc_type_for_clast_expr): Same.
4245         (gcc_type_for_clast_eq): Same.
4246         (graphite_translate_clast_equation): Same.
4247         (graphite_create_guard_cond_expr): Same.
4248         (graphite_create_new_guard): Same.
4249         (graphite_create_new_loop): Same.
4250         (build_iv_mapping): Same.
4251         (translate_clast): Same.
4252         (gloog): Same.
4253         (loop_iv_stack_patch_for_consts): Removed.  *
4254         sese.c (iv_stack_entry_is_constant): Removed.
4255         (iv_stack_entry_is_iv): Removed.
4256         (loop_iv_stack_push_iv): Removed.
4257         (loop_iv_stack_insert_constant): Removed.
4258         (loop_iv_stack_pop): Removed.
4259         (loop_iv_stack_get_iv): Removed.
4260         (loop_iv_stack_get_iv_from_name): Removed.
4261         (debug_loop_iv_stack): Removed.
4262         (free_loop_iv_stack): Removed.
4263         (loop_iv_stack_remove_constants): Removed.  *
4264         sese.h (iv_stack_entry_kind): Removed.
4265         (iv_stack_entry_data_union): Removed.
4266         (iv_stack_entry_struct): Removed.
4267         (iv_stack_entry_p): Removed.
4268         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4269         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4270         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4271         loop_iv_stack_pop, free_loop_iv_stack): Removed.
4272         (gbb_loop_at_index): Fix indenting.
4273         (gbb_loop_index): Removed.
4275 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4277         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4278         Call clast_name_to_index.
4280 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4282         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4283         do not pass params.  Get params from SESE_PARAMS.
4284         (clast_to_gcc_expression): Same.
4285         (clast_to_gcc_expression_red): Same.
4286         (gcc_type_for_clast_eq): Same.
4287         (graphite_translate_clast_equation): Same.
4288         (graphite_create_new_loop): Same.
4289         * sese.c (rename_variables_in_stmt): Fix comment.
4291 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4293         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4294         newivs_index.
4295         Call save_clast_name_index.
4296         (translate_clast): Pass newivs_index.
4297         (gloog): Create and free newivs_index.
4299 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4301         * graphite-clast-to-gimple.c (clast_name_index): New structure.
4302         (clast_name_index_p): New type.
4303         (debug_clast_name_index): New.
4304         (debug_clast_name_indexes_1): New.
4305         (debug_clast_name_indexes): New.
4306         (clast_name_index_elt_info): New.
4307         (eq_clast_name_indexes): New.
4308         (clast_name_to_index): New.
4309         (new_clast_name_index): New.
4310         (save_clast_name_index): New.
4311         (init_sese_params_index): New.
4312         (gloog): Call init_sese_params_index.
4313         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4314         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4315         (free_sese): Free SESE_PARAMS_INDEX.
4316         * sese.h (struct sese): Add params_index.
4317         (SESE_PARAMS_INDEX): New.
4319 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4321         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4322         (graphite_create_new_loop): Pass the newivs vector.  Push the
4323         newly created IV to newivs.
4324         (translate_clast): Pass the newivs vector.
4325         (gloog): Create and destroy the newivs vector.
4327 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4329         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4330         (graphite_loop_normal_form): Initialize loop->aux with the unique
4331         IV that has been created.
4333 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
4335         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4336         scev with parameters in the base part. They where forbidden
4337         exidently.
4339 2009-05-11  Li Feng  <nemokingdom@gmail.com>
4341         * gcc.dg/graphite/graphite.exp: Set different default
4342         compile options by file names.
4343         * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4344         * gcc.dg/graphite/id-{1-9}.c: Ditto.
4345         * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4346         * gcc.dg/graphite/scop-matmult.c: Ditto.
4348 2009-05-08  Li Feng <nemokingdom@gmail.com>
4350         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4351         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4352         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4353         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4355 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4357         * graphite-scop-detection (build_scops_1): Fix little bug introduced
4358         by final cleanup.
4360 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4362         * graphite-scop-detection.c (graphite_can_represent_scev): Only
4363         allow integer constant strides.
4364         (graphite_can_represent_expr): Depend on outermost_loop.
4365         (stmt_simple_memref_p, graphite_cannot_represent_loop,
4366         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4367         build_scops_1): Same.
4368         (scopdet_basic_block_info): Same and insert layered SCoP
4369         detection.
4370         (try_generate_gimple_bb): Cleanup.
4371         (build_scops): Enable data references.
4373         * gcc.dg/graphite/id-5.c: New.
4374         * gcc.dg/graphite/id-9.c: New.
4375         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4376         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4378 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4380         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4381         that we have not yet built for this SCoP.
4383 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4385         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4386         for complex numbers.
4388 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4390         * graphite-ppl.c: Fix build if cloog is not available.
4392 2009-05-04  Li Feng  <nemokingdom@gmail.com>
4394         * tree-parloops.c (loop_parallel_p): Remove construction of
4395         NITER and REDUCTION_LIST.
4396         (try_get_loop_niter): New.
4397         (try_create_reduction_list): New.
4398         (parallelize_loops): Bypass the failed checkings in autopar
4399         when can_be_parallel in loop structure is set to true.
4401 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4403         * gcc.dg/graphite/id-6.c: Update testcase.
4404         * gcc.dg/graphite/scop-3.c: Dito.
4406 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4408         * graphite-scop-detection.c (stmt_simple_for_scop_p):
4409         Enable EQ_EXPR and NE_EXPR again.
4411 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4413         * graphite-scop-detection.c (graphite_can_represent_scev):
4414         Add check if scev is affine multivariate.
4415         (harmful_stmt_in_bb): Check if we can represent the conditions.
4416         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4417         harmful_stmt_in_bb.
4418         * gcc.dg/graphite/id-7.c: New.
4420 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4422         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4423         Check all bbs in region, not only the bbs that are represented in
4424         GRAPHITE.
4425         (build_poly_scop): Add newline.
4426         * gcc.dg/graphite/id-8.c: New.
4428 2009-04-30  Li Feng  <nemokingdom@gmail.com>
4430         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4431         when loop initialize.
4432         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4433         * common.opt: Declare flag_graphite_force_parallel.
4434         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4435         loop parallel.
4436         * graphite-poly.c (apply_poly_transforms): Introduce
4437         flag_graphite_force_parallel.
4438         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4439         * toplev.c (process_options): ditto and replace a not correctly
4440         encoded space.
4442 2009-04-30  Li Feng  <nemokingdom@gmail.com>
4444         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4445         Change the call of gbb_loop_at_index and/or gbb_loop_index due
4446         to the redefinition.
4447         (compute_cloog_iv_types_1): ditto.
4448         (build_iv_mapping): ditto.
4449         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4450         initialization.
4451         (free_gimple_bb): Removed GBB_LOOPS related free part.
4452         (build_bb_loops): Removed.
4453         * sese.h (struct gimple_bb): Removed loops.
4454         (GBB_LOOPS): Removed.
4455         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4456         (gbb_loop_index): ditto.
4458 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4460         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4461         allow non constant strides.
4462         * gcc.dg/graphite/scop-20.c: New.
4464 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4466         * graphite-scop-detection.c (dot_all_scops): Fix system call
4467         return value warning.
4468         (dot_scop): Same.
4470 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4472         * gcc.dg/graphite/id-6.c: Fix pattern.
4473         * gcc.dg/graphite/scop-3.c: Same.
4475 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4477         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4478         build_pairwise_constraint, dr_equality_constraints,
4479         build_pairwise_scheduling_equality,
4480         build_pairwise_scheduling_inequality, lexicographically_gt_p,
4481         build_lexicographically_gt_constraint, dependence_polyhedron,
4482         graphite_legal_transform_dr, graphite_legal_transform_bb,
4483         graphite_legal_transform): New.
4484         * graphite-poly.h (graphite_legal_transform): Declared.
4485         * graphite-sese-to-poly.c (build_poly_scop): Call to
4486         graphite_legal_transform is disabled for the moment.
4488 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4490         * graphite-poly.h (pbb_nb_scattering_dims): New.
4491         (pbb_nb_scattering): Use it.
4493 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4495         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4496         Pointset_Powerset version of ppl_insert_dimensions.
4497         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4499 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4501         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4503 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4505         * graphite-poly.h: Fix comment.
4507 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4509         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4511 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4513         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4514         statements.
4516 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4518         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4519         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4520         conditions.
4522 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
4524         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4525         handle EQ_EXPR and NE_EXPR.
4527 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4529         * graphite-poly.h (poly_dr): Fix comment.
4531 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
4532             Tobias Grosser  <grosser@fim.uni-passau.de>
4534         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4535         with a zero dimension polyhedron.
4536         (find_scop_parameters): Move the call to scop_set_nb_params here.
4537         (build_loop_iteration_domains): Store in loop->aux the iteration
4538         domain polyhedron.
4539         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4540         by any loop in scop.
4541         (build_poly_scop): Do not call scop_set_nb_params.
4543 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
4544             Tobias Grosser  <grosser@fim.uni-passau.de>
4546         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4547         add_condition_to_domain not GT_EXPR.
4549 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4551         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4552         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4553         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4554         upper_bound_assign to calculate unions.
4555         * gcc.dg/graphite/id-6.c: New.
4557 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4559         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4560         handle abnormal edges.
4562 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4564         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4565         (free_poly_bb): Also free poly_drs.
4566         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4567         (poly_dr): Polyhedron to Pointset_Powerset.
4568         (pdr_accessp_nb_subscripts): Same.
4569         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4570         poly_drs.
4572 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4574         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4575         names into more meaningful names.
4577 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4579         * gfortran.dg/graphite/interchange-1.c: New.
4580         * gfortran.dg/graphite/interchange-2.c: New.
4582 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4584         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4585         the reduction_list.
4586         * tree-parloops.c (rewrite_phi_with_iv): New.
4587         (rewrite_all_phi_nodes_with_iv): New.
4588         (canonicalize_loop_ivs): Call them.
4590 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4592         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4593         graphite_find_data_references_in_stmt.
4594         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4595         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4597 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4599         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4601 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4603         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4604         instead of bb_in_region.
4605         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
4606         (build_sese_conditions): Use flag_bb_in_sese.
4607         * sese.c (register_bb_in_sese): Removed.
4608         (new_sese): Remove initialization of SESE_REGION_BBS.
4609         (free_sese): Do not free SESE_REGION_BBS.
4610         * sese.h (struct sese): Remove field region_basic_blocks.
4611         (SESE_REGION_BBS): Removed.
4612         (bb_in_sese_p): Implement in function of bb_in_region.
4614 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4616         * graphite-scop-detection.c (limit_scops): Deal only with single exit
4617         loops.
4619 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4621         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4622         and EQ_EXPR.
4623         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4624         (add_condition_to_domain): New.
4625         (add_condition_to_pbb): New.
4626         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4627         * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4629 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4631         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4632         ppl_Pointset_Powerset.
4633         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4634         * graphite-poly.h (poly_bb): poly_bb.domain Same.
4635         (pbb_nb_loops): Same.
4636         * graphite-sese-to-poly.c (build_loop_iteration_domains,
4637         add_conditions_to_domain): Same.
4638         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4639         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4640         ppl_const_Polyhedron_t.
4641         (ppl_print_powerset_matrix): New.
4642         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4643         ppl_print_powerset_matrix): New.
4644         (ppl_print_polyhedron_matrix): Updated.
4646 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4648         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4650 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4652         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
4653         (print_iteration_domains, debug_iteration_domain,
4654         debug_iteration_domains): New.
4655         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4656         debug_iteration_domains): Declared.
4657         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4658         indenting.
4660 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
4661             Sebastian Pop  <sebastian.pop@amd.com>
4663         * graphite-poly.h (print_iteration_domain): New.
4664         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4665         (build_sese_conditions_1, build_sese_conditions_after,
4666         build_sese_conditions_before): New.
4667         (build_sese_conditions): Rewritten.
4669 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
4670             Tobias Grosser  <grosser@fim.uni-passau.de>
4672         Cleanup of code generation liveouts.
4673         * graphite-clast-to-gimple.c (translate_clast): Use a single
4674         rename_map instead of one per translated statement.
4675         Do not use SESE_LIVEOUT_RENAMES.
4676         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4677         (gloog): Do not use SESE_LIVEOUT_RENAMES.
4678         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4679         phi node of a reduction: when a loop contains a reduction used outside
4680         the loop, there should be a scalar close phi node on the exit block.
4681         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4682         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4683         (free_sese): Do not free them.
4684         (sese_build_liveouts_use): Do not use them.
4685         (sese_build_liveouts_bb): Same.
4686         (sese_build_liveouts): Same.
4687         (sese_insert_phis_for_liveouts): Same.
4688         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
4689         (defined_in_loop_p): New.
4690         (alive_after_loop): New.
4691         (close_phi_not_yet_inserted_p): New.
4692         (struct alep, alep_p): New.
4693         (add_loop_exit_phis): Remove from the rename_map all the names defined
4694         in the code generated loop.
4695         (insert_loop_close_phis): Traverse the rename_map passed to it.
4696         Don't use SESE_LIVEOUT_RENAMES.
4697         (default_liveout_before_guard): Renamed default_before_guard.
4698         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4699         (graphite_copy_stmts_from_block): Do not directly call set_rename.
4700         (register_sese_liveout_renames): Removed.
4701         (copy_bb_and_scalar_dependences): Do not call it.
4702         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4703         reduction_list.
4704         (SESE_LIVEOUT): Removed.
4705         (SESE_LIVEOUT_RENAMES): Removed.
4706         (SESE_REDUCTION_LIST): Removed.
4707         (sese_build_liveouts): Removed.
4708         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4709         (insert_loop_close_phis): Pass a htab_t instead of a sese.
4710         (insert_guard_phis): Same.
4711         (rename_map_elt): Declare a VEC of them.
4712         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4713         trees not pointers to trees.
4715         Rewrite in canonical close SSA form:
4716         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4717         (limit_scops): Close the scop after the block containing the close phi
4718         nodes.
4719         (canonicalize_loop_closed_ssa): New.
4720         (canonicalize_loop_closed_ssa_form): New.
4721         (build_scops): Call canonicalize_loop_closed_ssa_form.
4723         * graphite-sese-to-poly.c: Fix typos.
4725 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
4727         * graphite-poly.c (print_scattering_function, print_pbb_domain):
4728         Extended.
4729         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4730         (print_pbb): Add conditions.
4732 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4733             Sebastian Pop  <sebastian.pop@amd.com>
4735         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4736         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4737         (build_scop_bbs_1): New.
4738         (build_scop_bbs): Rewrite.
4739         * sese.h (bb_in_region): New.
4741 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4743         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4744         poly_drs vector.
4745         (print_scop): Style.
4746         * graphite-poly.h (poly_bb): Add drs vector.
4747         (PBB_DRS): Add accessor.
4748         * graphite-sese-to-poly.c (build_poly_dr): New.
4749         (build_pbb_drs, build_scop_drs): New.
4750         (build_poly_scop): call build_scop_drs (Disabled at the moment).
4752 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4754         * tree-ssa-loop.c: Include forgotten toplev.h
4756 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4758         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4759         * gcc.dg/graphite/pr37883.c: Remove -floop-*
4760         * gcc.dg/graphite/pr37928.c: Same
4761         * gcc.dg/graphite/pr38409.c: Same
4762         * gcc.dg/graphite/pr38498.c: Same
4763         * gcc.dg/graphite/pr38559.c: Same
4764         * gcc.dg/graphite/pr39335.c: Same
4765         * gcc.dg/graphite/pr39335_1.c: Same
4766         * gfortran.dg/graphite/block-2.f: Same
4767         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4768         with -floop-*.
4770 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
4772         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4773         build_access_matrix, build_scop_data_accesses): Remove access function
4774         building. (We get a new version soon).
4775         (build_bb_loops, scan_tree_for_params_right_scev): Update.
4776         * sese.h (nb_loops_around_loop_in_sese): Remove.
4777         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4779 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
4780             Sebastian Pop  <sebastian.pop@amd.com>
4782         * graphite-scop-detection.c (struct scopdet_info): Rename last
4783         field to exit.
4784         (scopdet_basic_block_info, build_scops_1): Don't use
4785         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
4787 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
4788             Sebastian Pop  <sebastian.pop@amd.com>
4790         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4791         * sese.c (sese_build_liveouts_use): Renamed from
4792         sese_build_livein_liveouts_use. Remove liveins.
4793         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4794         Call sese_build_liveouts_use.
4795         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4796         Call sese_build_liveouts_bb.
4797         (new_sese, free_sese): Remove liveins.
4798         (sese_add_exit_phis_var): Deleted.
4799         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4800         directly.
4801         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4803         * sese.h (sese): Remove num_ver and livein.
4804         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4806 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4808         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4810 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4812         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4813         (build_scop_scattering): Do not use compare_prefix_loops any more.
4814         (nb_common_loops): New.
4816 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4818         * sese.c (get_new_name_from_old_name): Renamed get_rename.
4819         (register_old_and_new_names): Renamed set_rename.
4821 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4823         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4824         of the decl from the previous commit.
4826 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4828         * graphite-scop-detection.c (dot_scop): New.
4829         * graphite-scop-detection.h (dot_scop): Declared.
4831 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4833         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4835 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4837         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4838         condition at the end of the loop.
4839         * graphite.c (graphite_initialize, graphite_finalize): Print to
4840         dump_file the compiled function.
4841         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4842         of create_empty_loop_on_edge.
4843         (translate_clast): Update the code generation of loops for the new
4844         shape of loops.
4845         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4847 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4849         Reverted the patch from 2009-03-19.
4851 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
4853         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4854         poly_drs vector.
4855         (print_scop): Style.
4856         * graphite-poly.h (poly_bb): Add drs vector.
4857         (PBB_DRS): Add accessor.
4858         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4859         (build_access_matrix_with_af, build_access_matrix,
4860         build_scop_data_accesses): Delete.
4861         (build_poly_dr): New.
4862         (build_pbb_drs, build_scop_drs): New.
4863         (build_poly_scop): call build_scop_drs.
4865 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
4867         * graphite-scop-detection.c (dot_all_scops_1): Close the table
4868         once per basic block.
4870 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
4872         * graphite-scop-detection.c (graphite_can_represent_scev): New.
4873         (graphite_can_represent_expr): Renamed from loop_affine_expr
4874         and enhanced.
4875         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4876         (graphite_cannot_represent_loop): Add scop_entry to parameters.
4877         (scopdet_basic_block_info): Actually define entry_block.
4878         (stmt_simple_memref_p): Moved here from ...
4880         * tree-data-ref.c (stmt_simple_memref_p): here.
4881         * tree-data-ref.h (stmt_simple_memref_p): Removed.
4883 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
4885         * gcc.dg/graphite/id-4.c: New.
4887 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
4889         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4890         (register_old_and_new_names): Update the content of the map.
4891         When there was already a rename_map_elt in the map at that
4892         location, free it.
4893         (copy_bb_and_scalar_dependences): Do rename_variables after
4894         expand_scalar_variables.
4895         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4896         of the map.  When there was already a rename_map_elt in the
4897         map at that location, free it.
4898         (translate_clast): Pass the rename_map.  Do not initialize and free
4899         a rename_map per stmt_user.
4900         (gloog): Initialize and free one rename_map and pass it to
4901         translate_clast.
4903 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
4905         * sese.c (expand_scalar_variables_stmt,
4906         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4907         parameter.
4908         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4909         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4910         the gimple_stmt_iterator of the statement to be expanded.
4911         * graphite-scop-detection.c (is_simple_operand): Do handle
4912         REALPART_EXPR.
4914 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4916         * graphite-scop-detection.c (is_simple_operand): Do not handle
4917         REALPART_EXPR.
4918         * gcc.dg/graphite/id-2.c: New.
4920         * graphite-sese-to-poly.c (build_bb_loops,
4921         add_value_to_dim, scan_tree_for_params_right_scev,
4922         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4923         find_params_in_bb, build_loop_iteration_domains,
4924         add_conditions_to_domain): Remove subtract.
4926 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4928         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4929         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4930         pbb_loop_at_index -> gbb_loop_at_index.
4931         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4932         (debug_loop_vec): Delete.
4933         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4934         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
4935         (PBB_LOOPS): Removed.
4936         (PBB_BLACK_BOX): Insert cast.
4937         (pbb_set_black_box): New setter.
4938         (pbb_loop_at_index, pbb_loop_index): Removed.
4939         (scop_set_region, scop_set_nb_params): New.
4940         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4941         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4942         (build_poly_scop): Use scop_set_nb_params.
4943         * sese.h (gimple_bb): Add LOOPS.
4944         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4946 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4948         Revert previous commit.
4950 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
4952         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4953         (register_old_and_new_names): Update the content of the map.
4954         When there was already a rename_map_elt in the map at that
4955         location, free it.
4956         (copy_bb_and_scalar_dependences): Do rename_variables after
4957         expand_scalar_variables.
4958         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4959         of the map.  When there was already a rename_map_elt in the
4960         map at that location, free it.
4961         (translate_clast): Pass the rename_map.  Do not initialize and free
4962         a rename_map per stmt_user.
4963         (gloog): Initialize and free one rename_map and pass it to
4964         translate_clast.
4966 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4968         Remove forgotten line in revert.
4970 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
4972         Revert previous commit.
4974 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
4976         * sese.c (register_old_and_new_names): Update the content
4977         of the map.  When there was already a rename_map_elt in the
4978         map at that location, free it.
4979         (copy_bb_and_scalar_dependences): Do rename_variables after
4980         expand_scalar_variables.
4981         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4982         of the map.  When there was already a rename_map_elt in the
4983         map at that location, free it.
4984         (translate_clast): Pass the rename_map.  Do not initialize and free
4985         a rename_map per stmt_user.
4986         (gloog): Initialize and free one rename_map and pass it to
4987         translate_clast.
4989 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
4991         * graphite-clast-to-gimple.c (translate_clast): context_loop
4992         is never NULL.
4994 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4995             Sebastian Pop  <sebastian.pop@amd.com>
4997         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4998         of the use of ppl_Polyhedron_map_space_dimensions.
5000 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5001             Sebastian Pop  <sebastian.pop@amd.com>
5003         * graphite-poly.c (unify_scattering_dimensions): Fix types.
5004         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5005         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5006         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5007         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5008         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5009         pbb_nb_params): New.
5010         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5011         nb_loops_around_pbb): Adapt return types.
5013 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5015         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5016         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5017         graphite-scop-detection.o, graphite-poly.o): Add
5018         more headers.
5020 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5022         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5023         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5024         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5026 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5028         * gcc.dg/graphite/pr37485.c: Remove -floop-block
5029         * gcc.dg/graphite/pr37828.c: Same.
5030         * gcc.dg/graphite/pr37684.c: Same.
5031         * gcc.dg/graphite/block-0.c: Same.
5032         * gcc.dg/graphite/block-1.c: Same.
5033         * gcc.dg/graphite/block-2.c: Same.
5034         * gcc.dg/graphite/block-3.c: Same.
5035         * gcc.dg/graphite/block-4.c: Same.
5036         * gcc.dg/graphite/block-5.c: Same.
5037         * gcc.dg/graphite/block-6.c: Same.
5038         * gfortran.dg/graphite/pr38083.f90: Same.
5039         * gfortran.dg/graphite/block-1.f90: Same.
5040         * gfortran.dg/graphite/block-3.f90: Same.
5041         * gfortran.dg/graphite/pr37852.f90: Same.
5042         * gfortran.dg/graphite/block-4.f90: Same.
5043         * gfortran.dg/graphite/pr37980.f90: Same.
5044         * gfortran.dg/graphite/pr38953.f90: Same.
5045         * gfortran.dg/graphite/pr37857.f90: Same.
5046         * opts.c: Remove -floop-block from -O2.
5047         * graphite-poly.c: Fail if -floop-block -floop-interchange or
5048         -floop-strip-mine are used.
5050 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5051             Sebastian Pop  <sebastian.pop@amd.com>
5053         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5054         dimensions.
5055         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5056         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5057         strip_mine_profitable_p, is_interchange_valid,
5058         graphite_trans_bb_block, graphite_trans_loop_block,
5059         graphite_trans_scop_block): Temporary removed.
5060         (extend_scattering, unify_scattering_dimensions): New.
5061         (print_scattering_function, graphite_read_transforms):
5062         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5063         (graphite_generate_scattering_fns): Removed.
5064         (apply_poly_transforms): Cleanup.
5065         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5066         (schedule_to_scattering): Moved.
5067         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5068         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5069         (pbb_nb_scattering): New.
5070         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5071         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5072         Removed.
5073         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5074         shift_poly.
5075         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5076         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
5077         -> PBB_TRANSFORMED_SCATTERING.
5078         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5079         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5080         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5081         (check_poly_representation): Do not return bool.
5082         (graphite_transform_loops): Reformat.
5083         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5085 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
5087         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5088         debug_pbb_domain, debug_pbb, debug_scop): New.
5089         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5090         debug_pbb_domain, debug_pbb, debug_scop): Declared.
5092 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5094         PR middle-end/39335
5095         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5096         when the type precision of the induction variable should be
5097         larger than the type precision of nit.
5098         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5099         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5100         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5102         * gcc.dg/graphite/pr39335_1.c: New.
5103         * gcc.dg/graphite/pr39335.c: New.
5105 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5107         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5108         SSA_NAMES not struct reduction_info.
5110 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5112         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5114 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5115             Tobias Grosser  <grosser@fim.uni-passau.de>
5117         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5118         (free_sese): Free SESE_REDUCTION_LIST.
5119         * sese.h (struct sese): Add field reduction_list.
5120         (SESE_REDUCTION_LIST): New.
5121         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5122         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5124 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5125             Tobias Grosser  <grosser@fim.uni-passau.de>
5127         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5128         of loop_p.
5130 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5131             Tobias Grosser  <grosser@fim.uni-passau.de>
5133         * tree-parloops.c (struct brli, build_reduction_list_info,
5134         analyze_reduction_list, gather_scalar_reductions): New.
5135         (loop_parallel_p): Build a reduction list containing only
5136         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5137         (gen_parallel_loop): Call the analysis analyze_reduction_list.
5138         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5139         * tree-flow.h (gather_scalar_reductions): Declared.
5141 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
5143         PR middle-end/39308
5144         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5145         number_of_iterations_exit from a gcc_assert.
5147 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
5148             Jan Sjodin  <jan.sjodin@amd.com>
5150         * output.h (graphite_out_file, graphite_in_file): Declared.
5151         * toplev.c (graphite_out_file, graphite_in_file): New.
5152         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5153         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5154         Don't call schedule_to_scattering.
5155         * common.opt (fgraphite-write, fgraphite-read): New.
5156         * graphite-poly.c: Include output.h.
5157         (print_scattering_function, print_scattering_functions,
5158         debug_scattering_function, debug_scattering_functions,
5159         graphite_write_transforms, graphite_read_transforms,
5160         graphite_generate_scattering_fns): New.
5161         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5162         Call graphite_generate_scattering_fns, graphite_write_transforms,
5163         graphite_read_transforms.
5164         (new_poly_bb): Initialize PBB_SCATTERING.
5165         (free_poly_bb): Free PBB_SCATTERING.
5166         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5167         * graphite-poly.h (struct poly_bb): Add field scattering.
5168         (PBB_SCATTERING): New.
5169         (print_scattering_function, print_scattering_functions,
5170         debug_scattering_function, debug_scattering_functions): Declared.
5171         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5172         GMP values, not integers!
5173         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5174         ppl_read_polyhedron_matrix): New.
5175         * graphite-ppl.h (ppl_print_polyhedron_matrix,
5176         debug_ppl_polyhedron_matrix,
5177         ppl_read_polyhedron_matrix): Declared.
5178         * Makefile.in (graphite-poly.o): Depends on output.h.
5180 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5181             Tobias Grosser  <grosser@fim.uni-passau.de>
5183         Revert this change:
5184         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5185         scalar evolutions in the scop_entry->loop_father.
5187 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5188             Tobias Grosser  <grosser@fim.uni-passau.de>
5190         * graphite.h (ref_nb_loops): Remove declaration.
5191         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5192         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5193         debug_gbb): Moved to sese.h.
5194         * sese.h: As said.
5196 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5197             Tobias Grosser  <grosser@fim.uni-passau.de>
5199         * graphite-data-ref.[ch]: Disable.
5201 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5202             Tobias Grosser  <grosser@fim.uni-passau.de>
5204         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5205         scalar evolutions in the scop_entry->loop_father.
5207 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5209         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5210         (graphite_cannot_represent_loop_niter): Renamed
5211         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
5212         (limit_scops): build_sese_loop_nests does not return a bool.
5213         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5214         * sese.c (nb_reductions_in_loop): ... from here.
5215         (graphite_loop_normal_form): ... from here.
5216         (sese_record_loop): Does not fail, so does not return a bool.
5217         (build_sese_loop_nests): Same.
5218         * sese.h (build_sese_loop_nests): Update declaration.
5219         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5220         (build_graphite_loop_normal_form): New.
5221         (gloog): Call build_graphite_loop_normal_form.
5222         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5223         build_sese_loop_nests.
5225         * gcc.dg/graphite/id-1.c: New.
5227 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5228             Tobias Grosser  <grosser@fim.uni-passau.de>
5230         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5231         The SCoP detection fix is sufficient.
5233 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5235         PR tree-optimization/39260
5236         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5237         the basic block contains a condition with a real type.
5238         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5240         * gcc.dg/graphite/pr39260.c: New.
5242 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5244         * graphite-poly.c: Inlcude params.h.
5245         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5246         the size of a tile.
5247         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5248         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5250 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5251             Tobias Grosser  <grosser@fim.uni-passau.de>
5253         * graphite-scop-detection.c (dot_all_scops_1,
5254         dot_all_scops): Moved here.
5255         * graphite-scop-detection.h (dot_all_scops): Declared here.
5256         * graphite.c (graphite_initialize, graphite_finalize): New.
5257         (graphite_transform_loops): Cleaned up.
5258         * sese.c (debug_oldivs): Moved here.
5259         * graphite-poly.c (graphite_apply_transformations): Renamed
5260         apply_poly_transforms.
5261         (debug_loop_vec): Moved here.
5262         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5263         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5264         find_scop_parameters, build_scop_iteration_domain,
5265         add_conditions_to_constraints, build_scop_canonical_schedules,
5266         build_scop_data_accesses): Now static.
5267         (build_poly_scop, check_poly_representation): New.
5269 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5271         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5272         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5273         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5274         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5275         scan_tree_for_params_right_scev, scan_tree_for_params_int,
5276         scan_tree_for_params, struct irp_data, dx_record_params,
5277         find_params_in_bb, find_scop_parameters, gbb_from_bb,
5278         build_loop_iteration_domains, add_conditions_to_domain,
5279         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5280         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5281         build_sese_conditions, add_conditions_to_constraints,
5282         build_scop_iteration_domain, build_access_matrix_with_af,
5283         build_access_matrix,
5284         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5286         * graphite-sese-to-poly.c: New.
5287         * graphite-sese-to-poly.h: New.
5289         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5291 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5293         * graphite.c: Split graphite code generation to a new file.
5294         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5295         max_precision_type, clast_to_gcc_expression_red,
5296         clast_to_gcc_expression, gcc_type_for_clast_expr,
5297         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5298         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5299         graphite_create_new_guard, clast_get_body_of_loop,
5300         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5301         graphite_create_new_loop, build_iv_mapping, copy_renames,
5302         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5303         compute_cloog_iv_types, free_scattering, save_var_name,
5304         initialize_cloog_names, build_scop_context, build_cloog_prog,
5305         set_cloog_options, debug_clast_stmt, scop_to_clast,
5306         print_generated_program, debug_generated_program,
5307         gloog): Moved to graphite-clast-to-gimple.c.
5309         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5311         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5312         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5313         loop_iv_stack_pop, loop_iv_stack_get_iv,
5314         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5315         free_loop_iv_stack, loop_iv_stack_remove_constants,
5316         debug_rename_elt, debug_rename_map_1, debug_rename_map,
5317         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5318         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5319         eq_ivtype_map_elts, sese_add_exit_phis_edge,
5320         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5321         get_vdef_before_sese, sese_adjust_vphi,
5322         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5323         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5324         is_iv, expand_scalar_variables_ssa_name,
5325         expand_scalar_variables_expr, expand_scalar_variables_stmt,
5326         expand_scalar_variables, rename_variables, remove_condition,
5327         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5328         add_loop_exit_phis, insert_loop_close_phis, struct igp,
5329         default_liveout_before_guard, add_guard_exit_phis,
5330         insert_guard_phis, register_old_and_new_names,
5331         graphite_copy_stmts_from_block, register_sese_liveout_renames,
5332         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5333         if_region_set_false_region, create_if_region_on_edge,
5334         move_sese_in_condition): Moved to sese.c.
5336         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5337         if_region_exit, if_region_get_condition_block,
5338         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5339         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5340         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5341         ivtype_map_elt, new_ivtype_map_elt,
5342         recompute_all_dominators): Moved to sese.h.
5344         * graphite-clast-to-gimple.c: New.
5345         * graphite-clast-to-gimple.h: New.
5346         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5347         * sese.c: Modified as said above.
5348         * sese.h: Same.
5350 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5352         * graphite.c: Split scop detection to a new file.
5353         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5354         move_sd_regions, loop_affine_expr, exclude_component_ref,
5355         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5356         graphite_cannot_represent_loop_niter, struct scopdet_info,
5357         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5358         find_single_entry_edge, find_single_exit_edge,
5359         create_single_entry_edge, sd_region_without_exit,
5360         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5361         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5362         Moved to graphite-scop-detection.c.
5364         * graphite-scop-detection.c: New.
5365         * graphite-scop-detection.h: New.
5366         * Makefile.in: Add new rule for graphite-scop-detection.o.
5368         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5369         tree-scalar-evolution.h.
5370         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5371         build_sese_loop_nests): Moved here from graphite.c.
5372         (param_index): Renamed parameter_index_in_region.
5374 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
5375             Sebastian Pop  <sebastian.pop@amd.com>
5377         * gcc.dg/graphite/block-0.c: Expected to fail now.
5378         * gcc.dg/graphite/block-1.c: Same.
5379         * gcc.dg/graphite/block-5.c: Same.
5380         * gcc.dg/graphite/block-6.c: Same.
5382 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
5383             Sebastian Pop  <sebastian.pop@amd.com>
5385         * graphite.h: Separate from graphite_bb_p the polyhedral
5386         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5387         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5388         graphite-data-ref.h.
5389         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5390         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5391         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5392         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5393         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5394         scop_nb_params): Moved to graphite-poly.h.
5395         * graphite-data-ref.c: Same.
5396         * graphite-data-ref.h: New.
5397         * graphite.c: Same.
5398         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5399         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5400         is_interchange_valid, graphite_trans_bb_block,
5401         graphite_trans_loop_block, scop_max_loop_depth,
5402         graphite_trans_scop_block, graphite_apply_transformations,
5403         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5404         graphite-poly.c.
5405         * graphite-poly.h: New.
5406         * graphite-poly.c: New.
5407         * Makefile.in (OBJS-common): Add graphite-poly.o.
5408         (graphite-poly.o): New rule.
5409         * tree-data-ref.h (struct data_reference): Remove unused scop field.
5410         (DR_SCOP): Removed.
5412 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
5413             Tobias Grosser  <grosser@fim.uni-passau.de>
5415         * graphite.c: Replace gb -> gbb.
5416         * graphite.h: Same.
5417         * graphite-data-ref.c: Same.
5419 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
5420             Tobias Grosser  <grosser@fim.uni-passau.de>
5422         * Makefile.in (OBJS-commmon): Add sese.o.
5423         (sese.o): New.
5424         (graphite.o): Add sese.h.
5425         * graphite.c (bb_in_ss_p, loop_in_sese_p,
5426         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5427         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5428         Move to sese.
5429         (block_before_scop): Add missing return.
5430         (new_scop, free_scop): Remove SESE data structures.
5431         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5432         find_scop_parameters, build_loop_iteration_domains,
5433         add_conditions_to_domain, register_scop_liveout_renames,
5434         copy_bb_and_scalar_dependences): Scop -> SESE.
5436         (add_conditions_to_domain): SCoP -> SESE and remove check
5437         (scop_contains_non_iv_scalar_phi_nodes): New.
5438         (build_scop_conditions_1, build_scop_conditions): Remove check for
5439         non iv scalar phi nodes.
5440         (print_scop_statistics): New.
5441         (graphite_transform_loops): Cleanup.
5443         * graphite.h: Move to sese & cleanup.
5444         * sese.c: New.
5445         * sese.h: New.
5447 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5448             Tobias Grosser  <grosser@fim.uni-passau.de>
5450         * graphite.c (build_scop_conditions_1): Conditions are only
5451         at the end of a basic block.
5453 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5454             Tobias Grosser  <grosser@fim.uni-passau>
5456         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5457         field.
5458         (GBB_ALPHA): Removed.
5460 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5461             Tobias Grosser  <grosser@fim.uni-passau.de>
5463         * graphite-data-ref.c (graphite_test_dependence): Don't use
5464         GBB_DYNAMIC_SCHEDULE.
5465         * graphite.c (new_graphite_bb): Same.
5466         (free_graphite_bb): Same.
5467         (build_scop_dynamic_schedules): Removed.
5468         (graphite_transform_loops): Don't call it.
5469         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5470         (GBB_DYNAMIC_SCHEDULE): Removed.
5472 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5473             Tobias Grosser  <grosser@fim.uni-passau.de>
5475         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5476         (print_graphite_bb): Same.
5477         (build_cloog_prog): Same.
5479 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5480             Tobias Grosser  <grosser@fim.uni-passau.de>
5482         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5484 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5485             Tobias Grosser  <grosser@fim.uni-passau.de>
5487         * graphite.c (build_scop_context): Don't use CloogMatrix.
5488         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5489         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5491 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5492             Tobias Grosser  <grosser@fim.uni-passau.de>
5494         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5495         liveout_renames, add_params fields...
5496         (struct sese): ... here.
5497         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5498         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5500 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5501             Tobias Grosser  <grosser@fim.uni-passau.de>
5503         * graphite.c (print_scop): Do not print the CLooG program.
5504         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5505         build_cloog_prog, gloog): Don't use SCOP_PROG.
5506         (find_transform): Renamed scop_to_clast.
5507         (print_generated_program, debug_generated_program): New.
5508         (graphite_transform_loops): Adapt to new interface.
5509         * graphite.h (struct scop): Remove program field.
5510         (SCOP_PROG): Removed.
5511         (print_generated_program, debug_generated_program): Declared.
5513 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5515         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5516         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5517         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5518         free_graphite_bb, build_scop_canonical_schedules,
5519         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5520         schedules are now represented using a ppl_Linear_Expression_t.
5521         * graphite.h (struct graphite_bb): Same.
5522         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5523         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5525 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
5527         * graphite.c: Free local memory.
5528         * graphite-ppl.c: Same.
5530 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
5532         * graphite.c (const_column_index, get_first_matching_sign_row_index,
5533         get_lower_bound_row, get_upper_bound_row, copy_constraint,
5534         swap_constraint_variables, scale_constraint_variable): Removed.
5535         (graphite_trans_bb_strip_mine): Remove pong.
5536         * graphite-ppl.c: Include missing header files.
5537         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5538         * graphite-ppl.h (ppl_strip_loop): Declared.
5539         * Makefile.in (graphite-ppl.o): Adjust dependences.
5541 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
5543         * graphite.c (build_loop_iteration_domains): Remove ping pong.
5544         (build_scop_iteration_domain): Same.
5546 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
5548         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5549         ping pong.
5550         (add_value_to_dim, scan_tree_for_params_right_scev,
5551         scan_tree_for_params_int): New.
5552         * graphite-ppl.c (oppose_constraint): New.
5553         (insert_constraint_into_matrix): Implement missing cases.
5554         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5556 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
5558         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5559         use ppl_move_dimension.
5561 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
5563         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5564         * graphite.c: Same.
5565         * graphite.h: Same.
5566         * graphite-ppl.c: Same.
5567         * graphite-ppl.h: Same.
5569 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
5571         Revert last 3 commits.
5573 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5575         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5576         ping pong.
5577         (add_value_to_dim, scan_tree_for_params_right_scev,
5578         scan_tree_for_params_int): New.
5579         * graphite-ppl.c (oppose_constraint): New.
5580         (insert_constraint_into_matrix): Implement missing cases.
5581         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5583 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5585         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5587 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5588             Tobias Grosser  <grosser@fim.uni-passau.de>
5590         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5591         use ppl_move_dimension.
5592         * graphite-ppl.c (ppl_move_dimension): New.
5593         * graphite-ppl.h (ppl_move_dimension): Declared.
5595 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5597         * graphite.c: Do not include cloog/cloog.h.
5598         (print_graphite_bb): Remove ping pong, call PPL print function.
5600 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5602         * Makefile.in (OBJS-common): Add graphite-ppl.o.
5603         (graphite.o): Add dependence on graphite-ppl.h.
5604         (graphite-ppl.o): New.
5605         (graphite-data-ref.c): Ping pong between PPL data structures
5606         and matrices.
5607         * graphite-ppl.c: New.
5608         * graphite-ppl.h: New.
5609         * graphite.c: Include graphite-ppl.h.
5610         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5611         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5612         Ping pong between PPL data structures and matrices.
5613         (new_graphite_bb): Create a PPL constraint system.
5614         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5615         (build_loop_iteration_domains): Use PPL functions.
5616         * graphite.h: Include graphite-ppl.h.  Fix comments.
5617         (graphite_bb): Use a ppl_Constraint_System_t instead of
5618         CloogMatrix for representing the domain.
5619         (scop): Remove static_schedule.
5620         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5622 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
5624         * graphite.c: Fix some comments.
5626 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
5628         PR middle-end/38953
5629         * graphite.c (if_region_set_false_region): After moving a region
5630         in the false branch of a condition, remove the empty dummy
5631         basic block.
5632         (gloog): Remove wrong fix for PR38953.
5634 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5636         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5637         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5638         register_bb_in_sese, new_sese, free_sese): Moved.
5639         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5640         outermost_loop_in_scop, build_scop_iteration_domain,
5641         expand_scalar_variables_ssa_name, get_vdef_before_scop,
5642         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5643         Use loop_in_sese_p instead of loop_in_scop_p.
5644         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5645         (free_scop): Do not free SCOP_BBS_B.
5646         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5647         ref_nb_loops): Moved here...
5648         * graphite.h (ref_nb_loops): ... from here.
5649         (struct scop): Remove bbs_b bitmap.
5650         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5651         * gcc.dg/graphite/scop-19.c: New
5653 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5655         * graphite.c (scopdet_basic_block_info): Fix bug in scop
5656         detection.
5658 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5660         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5661         eq_loop_to_cloog_loop): Remove.
5662         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5663         * graphite.h (struct scop): Remove loop2cloog_loop.
5664         (loop_domain_dim, loop_iteration_vector_dim): Remove.
5666 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5668         * opts.c (decode_options): Only add graphite options to O2
5669         if we compile with graphite enabled.
5671 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
5673         * Merge from mainline (r143163:143684).
5675 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
5677         * graphite.c (debug_value): Removed.
5678         * graphite.h (debug_value): Removed.
5680 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5682         * passes.c (init_optimization_passes): Do not call pass_copy_prop
5683         after graphite: pass_copy_prop does not maintain a proper loop closed
5684         SSA form.  pass_copy_prop should be fixed.
5686 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5688         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5690 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5692         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5693         (gloog): Split the exit of the scop when the scop exit is a loop exit.
5694         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5695         changed the CFG.
5697 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
5699         * graphite.c (gloog): Return true when code gen succeeded.
5700         (graphite_transform_loops): Do not call cleanup_tree_cfg if
5701         the code of the function did not changed.  After cleanup_tree_cfg
5702         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5703         form.
5705 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
5707         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5708         gimple_call_lhs is NULL.
5710 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
5711             Tobias Grosser  <tobi.grosser@amd.com>
5713         * graphite.c (graphite_trans_scop_block): Do not block single
5714         nested loops.
5716 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
5717             Tobias Grosser  <tobi.grosser@amd.com>
5719         * graphite.c (build_scop_canonical_schedules): Start schedules at
5720         zero.
5722 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
5723             Tobias Grosser  <tobi.grosser@amd.com>
5725         * graphite.c (compare_prefix_loops): New.
5726         (build_scop_canonical_schedules): Rewritten.
5727         (graphite_transform_loops): Move build_scop_canonical_schedules
5728         after build_scop_iteration_domain.
5730 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5731             Tobias Grosser  <tobi.grosser@amd.com>
5733         * graphite.c (add_conditions_to_domain): Add the loops to
5734         the dimension of the iteration domain.  Do copy the domain
5735         only when it exists.
5736         (build_scop_conditions_1): Do not call add_conditions_to_domain.
5737         (add_conditions_to_constraints): New.
5738         (can_generate_code_stmt, can_generate_code): Removed.
5739         (gloog): Do not call can_generate_code.
5740         (graphite_transform_loops): Call add_conditions_to_constraints
5741         after building the iteration domain.
5743 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5744             Tobias Grosser  <tobi.grosser@amd.com>
5745             Jan Sjodin  <jan.sjodin@amd.com>
5747         * graphite.c (scan_tree_for_params): On substractions negate
5748         all the coefficients of the term.
5749         (clast_to_gcc_expression_red): New.  Handle reduction expressions
5750         of more than two operands.
5751         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5752         (get_vdef_before_scop): Handle also the case of default definitions.
5754 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5756         PR middle-end/38431
5757         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5758         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5759         (gloog): Do not call cleanup_tree_cfg.
5760         (graphite_transform_loops): Call cleanup_tree_cfg after all
5761         scops have been code generated.
5763 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
5765         * passes.c (init_optimization_passes): Schedule after
5766         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5768 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
5770         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5771         Fix comment.
5772         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
5773         Set the type of an expression to the type of its assign statement.
5774         (expand_scalar_variables_expr):  Do not pass loop_p.
5775         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
5776         (copy_bb_and_scalar_dependences): Do not pass loop_p.
5777         (translate_clast): Update call to copy_bb_and_scalar_dependences.
5779 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
5781         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5782         an expression to the gimple_expr_type of its assign statement.
5783         (expand_scalar_variables_expr): Stop recursion on tcc_constant
5784         or tcc_declaration.
5786 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
5788         PR tree-optimization/38786
5789         * gcc.dg/graphite/pr38786.c: New.
5790         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5791         the SSA_NAME case of expand_scalar_variables_expr.
5792         (expand_scalar_variables_expr): Also gather the scalar computation
5793         used to index the memory access.
5794         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5795         the gimple_stmt_iterator where it inserts new code.
5797 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
5799         * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5801 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
5803         * opts.c (decode_options): Enable flag_graphite_identity and
5804         flag_loop_block in -O2 and above.
5806 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
5808         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5809         Fix merge problem: replace with the file from trunk.
5811 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
5813         * Merge from mainline (r141727:143163).
5815 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
5816             Jan Sjodin  <jan.sjodin@amd.com>
5818         PR tree-optimization/38559
5819         * gcc.dg/graphite/pr38559.c: New.
5821         * graphite.c (debug_value, copy_constraint,
5822         swap_constraint_variables, scale_constraint_variable, ): New.
5823         (get_lower_bound, get_upper_bound): Removed.
5824         (graphite_trans_bb_strip_mine): Clean up this code that works
5825         only for constant number of iterations.  Fully copy upper and
5826         lower bound constraints, not only the constant part of them.
5827         * graphite.h (debug_value): Declared.
5829 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
5831         PR tree-optimization/38492
5832         PR tree-optimization/38498
5833         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5834         * tree-chrec.h (scev_is_linear_expression): Declared.
5835         * graphite.c (graphite_cannot_represent_loop_niter): New.
5836         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5837         (graphite_loop_normal_form): Use gcc_assert.
5838         (scan_tree_for_params): Use CASE_CONVERT.
5839         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5840         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5841         Use gcc_assert.  Discard scops that contain unhandled cases.
5842         (build_scop_conditions): Return a boolean status for unhandled cases.
5843         (strip_mine_profitable_p): Print the loop number, not its depth.
5844         (is_interchange_valid): Pass the depth of the loop nest, don't
5845         recompute it wrongly.
5846         (graphite_trans_bb_block): Same.
5847         (graphite_trans_bb_block): Print tentative of loop blocking.
5848         (graphite_trans_scop_block): Do not print that the loop has been
5849         blocked.
5850         (graphite_transform_loops): Do not handle scops that contain condition
5851         scalar phi nodes.
5853         * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5854         in trunk.
5855         * gcc.dg/graphite/block-0.c: Update test.
5856         * gcc.dg/graphite/block-1.c: Same.
5857         * gcc.dg/graphite/block-2.c: Remove xfail and test for
5858         blocking.
5859         * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5860         * gcc.dg/graphite/block-3.c: New.
5861         * gcc.dg/graphite/pr38498.c: New.
5863 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
5865         PR tree-optimization/38510
5866         * gcc.dg/graphite/pr38510.c: New.
5867         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5868           (translate_clast): Call recompute_all_dominators before
5869           graphite_verify.
5870           (gloog): Call recompute_all_dominators before graphite_verify.
5872 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
5874         PR tree-optimization/38492
5875         * graphite.c (rename_map_elt, debug_rename_elt,
5876         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5877         rename_map_elt_info, eq_rename_map_elts,
5878         get_new_name_from_old_name, bb_in_sese_p): Moved around.
5879         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5880         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5881         (sese_build_livein_liveouts): New.
5882         (new_sese, free_sese): New.
5883         (new_scop): Call new_sese.
5884         (free_scop): Call free_sese.
5885         (rename_variables_from_edge, rename_phis_end_scop): Removed.
5886         (register_old_new_names): Renamed register_old_and_new_names.
5887         (register_scop_liveout_renames, add_loop_exit_phis,
5888         insert_loop_close_phis, struct igp,
5889         default_liveout_before_guard, add_guard_exit_phis,
5890         insert_guard_phis, copy_renames): New.
5891         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5892         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5893         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5894         (scop_adjust_phis_for_liveouts): New.
5895         (gloog): Call scop_adjust_phis_for_liveouts.
5897         * graphite.h (struct sese): Documented.  Added fields liveout,
5898         num_ver and livein.
5899         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5900         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5901         (struct scop): Added field liveout_renames.
5902         (SCOP_LIVEOUT_RENAMES): New.
5904 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
5906         PR tree-optimization/38409
5907         * gcc.dg/graphite/pr38409.c: New.
5908         * graphite.c (nb_reductions_in_loop): Use simple_iv.
5910 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
5912         * graphite.c (gcc_type_for_cloog_iv): By default return
5913         integer_type_node.
5914         (graphite_create_new_loop): Don't fold_convert the already
5915         fold_convert-ed expression.
5917 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
5919         PR tree-optimization/38446
5920         * gcc.dg/graphite/pr38446.c: New.
5921         * graphite.c (register_bb_in_sese): New.
5922         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5923         looking at the bbs in the region.
5924         * graphite.h (sese): Add region_basic_blocks pointer set to
5925         structure and initialize at the time of defining new scop.
5927 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5929         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5930         (find_params_in_bb): Do not free data refs.
5931         (free_graphite_bb): Add FIXME on disabled free_data_refs.
5933 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
5935         * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5936         * gcc.dg/graphite/scop-17.c: Same.
5937         * gcc.dg/graphite/block-5.c: New.
5938         * gcc.dg/graphite/block-6.c: New.
5939         * gcc.dg/graphite/pr37485.c: Clean dump file after.
5940         * gcc.dg/graphite/pr37684.c: Same.
5941         * gcc.dg/graphite/block-2.c: Same.
5943         * graphite.c (struct ivtype_map_elt): New.
5944         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5945         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5946         gcc_type_for_cloog_iv): New.
5947         (loop_iv_stack_patch_for_consts): Use the type of the induction
5948         variable from the original loop, except for the automatically
5949         generated loops, i.e., in the case of a strip-mined loop, in
5950         which case there is no original loop: in that case just use
5951         integer_type_node.
5952         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5953         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5954         (clast_name_to_gcc): Accept params to be NULL.
5955         (clast_to_gcc_expression): Take an extra parameter for the type.
5956         Convert to that type all the expressions built by this function.
5957         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5958         (graphite_translate_clast_equation): Compute the type of the
5959         clast_equation before translating its LHS and RHS.
5960         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5961         (graphite_create_new_loop): Compute the type of the induction
5962         variable before translating the lower and upper bounds and before
5963         creating the induction variable.
5964         (rename_variables_from_edge, rename_phis_end_scop): New.
5965         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5966         (sese_add_exit_phis_edge): Do not use integer_zero_node.
5967         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5968         compute_cloog_iv_types): New.
5969         (gloog): Call compute_cloog_iv_types before starting the
5970         translation of the clast.
5972         * graphite.h (struct graphite_bb): New field cloog_iv_types.
5973         (GBB_CLOOG_IV_TYPES): New.
5974         (debug_ivtype_map): Declared.
5975         (oldiv_for_loop): New.
5977 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5979         PR middle-end/38459
5980         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5981         (param_index): Assert if parameter is not know after parameter
5982         detection.
5983         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5984         (find_scop_parameters): Mark, that we have finished parameter
5985         detection.
5986         (graphite_transform_loops): Move condition detection before parameter
5987         detection.
5988         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5989         * gfortran.dg/graphite/pr38459.f90: New.
5991 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5993         * graphite.c (graphite_transform_loops): Always call find_transform ()
5994         in ENABLE_CHECKING.  So we test these code paths, even if we do not
5995         generate code.
5997 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5999         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6000         (print_scop): Ditto.
6002 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6004         PR middle-end/38084
6005         Fix gfortran.dg/graphite/id-3.f90.
6006         * graphite.c (scopdet_basic_block_info): Fix bug that found some
6007         regions more than once.
6009 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6011         Fix gfortran.dg/graphite/id-4.f90.
6012         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6013         when not needed.
6015 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6017         Fix gfortran.dg/graphite/id-1.f90.
6018         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6019         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6020         (max_precision_type): New.
6021         (value_clast): Removed.
6022         (clast_to_gcc_expression): Be more careful to types of expressions.
6023         Use max_precision_type and update use of gmp_cst_to_tree.
6024         (graphite_translate_clast_equation): Use max_precision_type.
6025         (graphite_create_guard_cond_expr): Do not use integer_type_node,
6026         use the type of the condition.
6027         (graphite_create_new_loop): Do not use integer_type_node, use the
6028         max_precision_type of lb and ub.
6030 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6032         * graphite.c (build_scops_1): Initialize open_scop.exit
6033         and sinfo.last.
6035 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6037         * gcc.dg/graphite/pr38084.c: New.
6038         * gfortran.dg/graphite/id-1.f90: New.
6039         * gfortran.dg/graphite/id-2.f90: New.
6040         * gfortran.dg/graphite/id-3.f90: New.
6041         * gfortran.dg/graphite/id-4.f90: New.
6042         * gfortran.dg/graphite/pr37857.f90: New.
6044 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6045             Jan Sjodin  <jan.sjodin@amd.com>
6046             Harsha Jagasia  <harsha.jagasia@amd.com>
6048         PR middle-end/37852
6049         PR middle-end/37883
6050         PR middle-end/37928
6051         PR middle-end/37980
6052         PR middle-end/38038
6053         PR middle-end/38039
6054         PR middle-end/38073
6055         PR middle-end/38083
6056         PR middle-end/38125
6058         * gcc.dg/graphite/pr38073.c: New.
6059         * gcc.dg/graphite/pr37928.c: New.
6060         * gcc.dg/graphite/pr37883.c: New.
6061         * gcc.dg/graphite/pr38125.c: New.
6062         * gfortran.dg/graphite/pr38083.f90: New.
6063         * gfortran.dg/graphite/pr37852.f90: New.
6064         * gfortran.dg/graphite/pr37980.f90: New.
6066         * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6067         the number of detected scops.  Copy exact same test for loop
6068         blocking...
6069         * gcc.dg/graphite/block-1.c: Fix the number of expected
6070         loops to be blocked as reductions are not handled.
6071         * gcc.dg/graphite/block-4.c: ...here.  New.
6073         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6074         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6075         ...here.
6076         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6077         * Makefile.in (graphite.o): Depend on value-prof.h.
6078         (graphite.o-warn): Removed -Wno-error.
6079         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6080         to be a NULL pointer.  Call update_stmt.  Return the newly created
6081         cannonical induction variable.
6083         * graphite.h (debug_rename_map): Declared.  Fix some comments.
6085         * graphite.c: Reimplement the code generation from graphite to gimple.
6086         Include value-prof.h.
6087         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6088         (get_old_iv_from_ssa_name): Removed.
6089         (graphite_stmt_p): New.
6090         (new_graphite_bb): Test for useful statements before building a
6091         graphite statement for the basic block.
6092         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6093         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6094         reason.
6095         (recompute_all_dominators, graphite_verify,
6096         nb_reductions_in_loop, graphite_loop_normal_form): New.
6097         (scop_record_loop): Call graphite_loop_normal_form.
6098         (build_scop_loop_nests): Iterate over all the blocks of the
6099         function instead of relying on the incomplete information from
6100         SCOP_BBS.  Return the success of the operation.
6101         (find_params_in_bb): Use the data from GBB_DATA_REFS.
6102         (add_bb_domains): Removed.
6103         (build_loop_iteration_domains): Don't call add_bb_domains.
6104         Add the iteration domain only to the basic blocks that have been
6105         translated to graphite.
6106         (build_scop_conditions_1): Add constraints only if the basic
6107         block have been translated to graphite.
6108         (build_scop_data_accesses): Completely disabled until data
6109         dependence is correctly implemented.
6110         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6111         (remove_all_edges_1, remove_all_edges): Removed.
6112         (get_new_name_from_old_name): New.
6113         (graphite_rename_variables_in_stmt): Renamed
6114         rename_variables_in_stmt.  Call get_new_name_from_old_name.
6115         Use replace_exp and update_stmt.
6116         (is_old_iv): Renamed is_iv.
6117         (expand_scalar_variables_stmt): Extra parameter for renaming map.
6118         Use replace_exp and update_stmt.
6119         (expand_scalar_variables_expr): Same.  Use the map to get the
6120         new names for the renaming of induction variables and for the
6121         renaming of variables after a basic block has been copied.
6122         (expand_scalar_variables): Same.
6123         (graphite_rename_variables): Renamed rename_variables.
6124         (move_phi_nodes): Removed.
6125         (get_false_edge_from_guard_bb): New.
6126         (build_iv_mapping): Do not insert the induction variable of a
6127         loop in the renaming iv map if the basic block does not belong
6128         to that loop.
6129         (register_old_new_names, graphite_copy_stmts_from_block,
6130         copy_bb_and_scalar_dependences): New.
6131         (translate_clast): Heavily reimplemented: copy basic blocks,
6132         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
6133         At each translation step call graphite_verify ensuring the
6134         consistency of the SSA, loops and dominators information.
6135         (collect_virtual_phis, find_vdef_for_var_in_bb,
6136         find_vdef_for_var_1, find_vdef_for_var,
6137         patch_phis_for_virtual_defs): Removed huge hack.
6138         (mark_old_loops, remove_dead_loops, skip_phi_defs,
6139         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6140         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6141         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6142         if_region_get_condition_block, if_region_set_false_region,
6143         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6144         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6145         sese_add_exit_phis_edge, sese_add_exit_phis_var,
6146         rewrite_into_sese_closed_ssa): New.
6147         (gloog): Remove dead code.  Early return if code cannot be
6148         generated.  Call cleanup_tree_cfg once the scop has been code
6149         generated.
6150         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6151         block loops with less than two loops.
6152         (graphite_apply_transformations): Remove the call to
6153         scop_remove_ignoreable_gbbs.
6154         (limit_scops): When build_scop_loop_nests fails, continue on
6155         the next scop.  Fix open_scop.entry.
6156         (graphite_transform_loops): Call recompute_all_dominators: force the
6157         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6158         Call initialize_original_copy_tables and free_original_copy_tables
6159         to be able to copy basic blocks during code generation.
6160         When build_scop_loop_nests fails, continue on next scop.
6161         (value_clast): New union.
6162         (clast_to_gcc_expression): Fix type cast warning.
6164 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
6166         * Merge from mainline (r140838:141727).
6168 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6170         PR middle-end/37833
6172         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6174 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6176         PR middle-end/37943
6178         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6179         exits and conditions.
6180         * gcc.dg/graphite/pr37943.c: New.
6182 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6184         PR middle-end/37886
6185         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6187 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6189         * doc/invoke.texi: Fix spaces.
6191 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
6193         PR tree-optimization/37891
6194         Reverted last commit.
6195         * graphite.c (create_single_entry_edge): Set
6196         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6198 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
6199             Mitul Thakkar  <mitul.thakkar@amd.com>
6201         * graphite.c (create_single_entry_edge): Set
6202         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6204 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
6206         * doc/invoke.texi: Add -fgraphite-identity.
6207         * graphite.c (graphite_apply_transformations): Check for
6208         -fgraphite-identity.
6209         * toplev.c (process_options): Add flag_graphite_identity.
6210         * tree-ssa-loop.c: Add flag_graphite_identity.
6212 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6214         Undo changes from 2008-10-02:
6215         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6216         operand type when copying the operand to a variable of different type.
6217         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6218         with the IV name after increment.
6220 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6221             Harsha Jagasia  <harsha.jagasia@amd.com>
6223         PR tree-optimization/37828
6224         * gcc.dg/graphite/pr37828.c: New.
6225         * graphite.c (graphite_trans_loop_block): Do not loop block
6226         single nested loops.
6228 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
6229             Sebastian Pop  <sebastian.pop@amd.com>
6231         * graphite.c (struct rename_map_elt, new_rename_map_elt,
6232         rename_map_elt_info, eq_rename_map_elts): New.
6233         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6234         (expand_scalar_variables_expr): Change parameters.
6235         (expand_scalar_variables_stmt): Same.
6236         (expand_scalar_variables): Same.
6237         (graphite_rename_ivs): Rename graphite_rename_variables.
6238         (build_iv_mapping): New.
6239         (translate_clast): Call build_iv_mapping.
6240         * graphite.h (gbb_p): New name.
6242 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
6244         PR tree-optimization/37684
6245         * gcc.dg/graphite/pr37684.c: New.
6246         * graphite.c (exclude_component_ref): New.
6247         (is_simple_operand): Call exclude_component_ref.
6249 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
6250             Harsha Jagasia  <harsha.jagasia@amd.com>
6252         PR tree-optimization/37485
6253         * gcc.dg/graphite/block-2.c: New
6254         * graphite.c (gmp_cst_to_tree): Moved.
6255         (iv_stack_entry_is_constant): New.
6256         (iv_stack_entry_is_iv): New.
6257         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6258         (loop_iv_stack_insert_constant): New.
6259         (loop_iv_stack_pop): Use new datatpype.
6260         (loop_iv_stack_get_iv): Same.
6261         (loop_iv_stack_get_iv_from_name): Same.
6262         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6263         (loop_iv_stack_patch_for_consts): New.
6264         (loop_iv_stack_remove_constants): New.
6265         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6266         (translate_clast): Call loop_iv_stack_patch_for_consts and
6267         loop_iv_stack_remove_constants.
6268         (gloog): Use new datatype.  Redirect construction edge to end
6269         block to avoid accidental deletion.
6270         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
6271         iv stack entry.
6272         (union iv_stack_entry_data): New.  Data in iv stack entry.
6273         (struct iv_stack_entry): New.  Datatype for iv stack entries.
6275 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6277         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6278         operand type when copying the operand to a variable of different type.
6280 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6282         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6283         with the IV name after increment.
6285 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6287         * Merge from mainline (r140164:140838).
6289 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6291         * graphite-data-ref.c: New.
6292         * graphite.c (print_scop): Also dump the dependence graph.
6293         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6294         (new_scop): Initialize SCOP_DEP_GRAPH.
6295         (build_scop_dynamic_schedules): New.
6296         (build_access_matrix_with_af): Fixed column numbering.
6297         (graphite_transform_loops): Call build_scop_dynamic_schedules.
6298         * graphite.h: Add ifndef/define guards against multiple inclusion.
6299         (struct scop): Add dep_graph field.
6300         (SCOP_DEP_GRAPH): Defined.
6301         (ref_nb_loops): Fixed and moved to other position.
6302         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6303         (nb_loops_around_loop_in_scop): New.
6304         (graphite_dump_dependence_graph): Declared.
6305         (graphite_build_rdg_all_levels): Declared.
6306         (graphite_test_dependence): Declared.
6307         * Makefile.in (graphite-data-ref.o): New target.
6309 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
6311         * Merge from mainline (139870:140164).
6313 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6315         * Merge from mainline (138275:139870).
6316         * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6317         the commits from trunk broke the niter detection.
6319 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6321         * graphite.c: Add more documentation.  Fix formatting.
6322         (debug_loop_vec, debug_oldivs, loop_iv_stack,
6323         loop_iv_stack_debug): Moved...
6324         (schedule_to_scattering): Move before use.
6325         (dot_all_scops): Include in "#if 0" the code for system
6326         call dotty.
6328         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6329         loop_iv_stack_debug): ...here.
6331 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
6333         * tree-phinodes.c (make_phi_node): Extern.
6334         (add_phi_node_to_bb): New.
6335         (create_phi_node): Call add_phi_node_to_bb.
6336         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6337         (remove_statement): Handle case where stored phi was updated
6338         and is no longer the same.
6339         * graphite.c (is_parameter): New.
6340         (is_old_iv): New.
6341         (expand_scalar_variables_expr): New.
6342         (expand_scalar_variables_stmt): New.
6343         (expand_scalar_variables): New.
6344         (move_phi_nodes): Create new phi instead of moving old one.
6345         (translate_clast): Call expand_scalar_variables.
6346         (find_vdef_for_var_in_bb): Also scan regular definitions.
6347         (skip_phi_defs): New.
6348         (collect_scop_exit_phi_args): New.
6349         (patch_scop_exit_phi_args): New.
6350         (gloog): Patch phis after scop.
6351         * tree-flow.h: (add_phi_node_to_bb): Declared.
6352         (make_phi_node): Declared.
6354 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6356         * graphite.c (end_scop): Split the entry of the scop when it
6357         is the header of the loop in which the scop is ending.
6358         (build_scops_1, limit_scops): Update uses of end_scop.
6360 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6362         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6363         SCOP_ENTRY or SCOP_EXIT.
6365 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6367         * graphite.c (get_construction_edge): Removed.
6368         (gloog): Construction edge is the scop entry edge.
6370 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6372         * graphite.c (can_generate_for_scop): Removed.
6373         (gloog): Do not call it.
6375 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6377         * graphite.c (new_scop): Entry of a scop is an edge.
6378         Initialize SESE region.
6379         (free_scop): Free SESE region.
6380         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6381         (split_difficult_bb): New, split from end_scop.
6382         (end_scop): Exit of a scop is an edge.
6383         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6384         not automatically updated and thus is always wrong.
6385         * graphite.h (struct sese): New.
6386         (SESE_ENTRY): New.
6387         (SESE_EXIT): New.
6388         (struct scop): New field for a SESE region.  Remove entry, exit.
6389         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6390         semantics as before.  Moved comment around.
6392 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6393             Sebastian Pop  <sebastian.pop@amd.com>
6395         * graphite.c (graphite_transform_loops): Always enable gloog
6396         and find_transform when ENABLE_CHECKING.
6398 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6400         * graphite.c (graphite_transform_loops): Move pretty printer
6401         of SCOPs before doing any transform.  Remove call to print_scops
6402         and dot_all_scops_1.
6404 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6406         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6407         (print_graphite_bb): Same.
6409 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6411         * graphite.c (dot_all_scops_1): Cleanup.
6412         (move_scops): Fix comment.
6414 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6416         * graphite.c (build_scop_bbs): Revert commit 139355:
6418         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6419                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6421                 * graphite.c (build_scop_bbs): Factor up code.
6423 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6425         * graphite.c (gloog): Update dominator info.
6427 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6429         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6431 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6433         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6434         initialization.
6435         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6436         (translate_clast): Correct formatting.
6437         * graphite.h (struct num_map): Removed.
6438         (struct graphite_bb): Remove num_map field.
6439         (GBB_INDEX_TO_NUM_MAP): Removed.
6441 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6443         * graphite.c (build_access_matrix_with_af): Fix comments.
6444         (build_scop_data_accesses): Same.
6446 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6448         * graphite.c (build_scop_data_accesses): Don't construct
6449         access matrices.  Add a FIXME and an assert condition that
6450         should pass when the access matrices will be needed.
6452 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6454         * tree-data-ref.c (stmt_simple_memref_p): Don't call
6455         really_constant_p.
6456         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6457         Moved close by free_graphite_bb.
6458         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
6459         (new_scop): Move close by free_scop.
6460         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6462 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
6464         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6465         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6466         instead of recursive call.
6467         (graphite_translate_clast_equation): New.
6468         (graphite_create_guard_cond_expr): New.
6469         (graphite_create_new_guard): New.
6470         (get_stack_index_from_iv): Removed.
6471         (graphite_rename_ivs_stmt): Use gbb_loop_index.
6472         (get_true_edge_from_guard_bb): New.
6473         (translate_clast): Handle stmt_guard in clast.
6474         (get_construction_edge): Allow construction edge detection for
6475         a scope entry with multiple predecessors if one predecessor is
6476         the immediate dominator of scope entry.
6477         (can_generate_code_stmt): Enable code generation for clast_guard.
6478         (gloog): Use correct context loop.  Removed check for post dominators.
6479         * cfgloop.h (create_empty_if_region_on_edge): Declared.
6481 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6483         * graphite.c (remove_dead_loops): Document better which
6484         loops are removed.
6486 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6488         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6489         and PPLINC.
6490         (graphite.o): Also depends on pointer-set.h.
6492 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6494         * graphite.c (scop_record_loop): Fix compile warning.
6496 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
6497             Sebastian Pop  <sebastian.pop@amd.com>
6499         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6501 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6503         * graphite.c (build_graphite_bb): Initialize bb->aux to
6504         point to the graphite_bb_p.
6505         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6506         content of bb->aux.
6507         (add_bb_domains): Does not use the scop parameter.
6508         (graphite_transform_loops): Clean bb->aux at the end.
6510 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6511             Sebastian Pop  <sebastian.pop@amd.com>
6513         * lib/target-supports.exp
6514         (check_effective_target_fgraphite): New.
6516         * gcc.dg/graphite/graphite.exp: Early exit when
6517         check_effective_target_fgraphite returns false.
6518         Set dg-do-what-default to compile.
6519         (scan-graphite-dump-times): Removed.
6520         * gfortran.dg/graphite/graphite.exp: Same.
6522         * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6523         Use scan-tree-dump-times instead of scan-graphite-dump-times.
6524         * gcc.dg/graphite/scop-1.c: Same.
6525         * gcc.dg/graphite/scop-2.c: Same.
6526         * gcc.dg/graphite/scop-3.c: Same.
6527         * gcc.dg/graphite/scop-4.c: Same.
6528         * gcc.dg/graphite/scop-5.c: Same.
6529         * gcc.dg/graphite/scop-6.c: Same.
6530         * gcc.dg/graphite/scop-7.c: Same.
6531         * gcc.dg/graphite/scop-8.c: Same.
6532         * gcc.dg/graphite/scop-9.c: Same.
6533         * gcc.dg/graphite/scop-10.c: Same.
6534         * gcc.dg/graphite/scop-11.c: Same.
6535         * gcc.dg/graphite/scop-12.c: Same.
6536         * gcc.dg/graphite/scop-13.c: Same.
6537         * gcc.dg/graphite/scop-matmult.c: Same.
6538         * gcc.dg/graphite/scop-14.c: Same.
6539         * gcc.dg/graphite/scop-15.c: Same.
6540         * gcc.dg/graphite/block-0.c: Same.
6541         * gcc.dg/graphite/scop-16.c: Same.
6542         * gcc.dg/graphite/block-1.c: Same.
6543         * gcc.dg/graphite/scop-17.c: Same.
6544         * gcc.dg/graphite/scop-18.c: Same.
6545         * gfortran.dg/graphite/block-1.f90: Same.
6546         * gfortran.dg/graphite/scop-1.f: Same.
6547         * gfortran.dg/graphite/block-2.f: Same.
6549 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6551         * graphite.c: Fix some XXX comments.
6552         (build_scop_dynamic_schedules): Removed.
6554 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6556         * graphite.h (scop_max_loop_depth): Moved...
6557         * graphite.c (scop_max_loop_depth): ...here.
6558         (remove_all_edges_1): New.
6559         (remove_all_edges): Factored code.
6560         (remove_cond_exprs): Check only the last statement for
6561         a GIMPLE_COND expression.
6563 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6565         * graphite.c (scan_tree_for_params): Early return when the
6566         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
6567         (find_scop_parameters): Factor out code.
6568         (graphite_trans_bb_strip_mine): Remove dead code.
6570 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6572         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6573         graphite_trans_bb_move_loop): Factor asserts.
6574         (gloog): Perform sanity checks only for ENABLE_CHECKING.
6575         Do not call calculate_dominance_info and estimate_bb_frequencies.
6577 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
6579         * graphite.c (create_loops_mapping, free_loops_mapping,
6580         create_loops_mapping_num, debug_loop_mapping_1,
6581         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6582         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6583         graphite_loops_mapping_add_child_num,
6584         graphite_loops_mapping_insert_child,
6585         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6586         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6587         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6588         create_num_from_index, get_num_from_index,
6589         swap_loop_mapped_depth): Removed.
6590         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6591         (free_scop): Do not call free_loops_mapping.
6592         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6593         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
6594         get_loop_mapped_depth.
6595         (graphite_trans_bb_move_loop): Do not update the loop mapping.
6596         (graphite_trans_bb_strip_mine): Same.
6597         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6598         (struct scop): Remove field loops_mapping.
6600 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6601             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6603         * graphite.c (scop_record_loop): Factor out one level of the
6604         condition by early return.
6605         (build_scop_loop_nests): Format following FSF coding style.
6606         (build_scop_dynamic_schedules): Factor out code.
6607         (scopdet_bb_info): Reindent.  Default case should not be reachable.
6609 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6610             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6612         * graphite.c (loop_affine_expr): Check for DECL_P or struct
6613         assignments that are not handled as simple operands for now.
6615 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6616             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6618         * graphite.c (build_scop_bbs): Factor up code.
6620 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6621             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6623         * graphite.c (stmt_simple_for_scop_p): Factor code out
6624         of the loop.
6625         (enum gbb_type): New.  Group all the GBB_* types under it.
6626         (is_loop_exit): Moved...
6627         (end_scop): Enable BB spliting.
6628         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
6629         * cfgloop.h (is_loop_exit): Declared.
6631 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6633         * doc/invoke.texi: Remove strides from examples containing
6634         DO loops when the strides are equal to 1.
6636 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
6637             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6639         * graphite.c (graphite_trans_scop_block): Or the result with
6640         the result from graphite_trans_loop_block.
6641         * gcc.dg/graphite/block-1.c: New.
6642         * gfortran.dg/graphite/block-1.f90: New.
6643         * gfortran.dg/graphite/block-2.f: New.
6645 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6647         * graphite.c (graphite_transform_loops): Call cloog_initialize
6648         and cloog_finalize.
6650 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6652         * tree-data-ref.c) (stmt_simple_memref_p): New.
6653         * tree-data-ref.h (stmt_simple_memref_p): Declared.
6654         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6655         (is_simple_operand): Call stmt_simple_memref_p.
6657         * gcc.dg/graphite/scop-matmult.c: Updated for not
6658         using pointer arithmetic, as this is optimized by PRE and
6659         makes the code too difficult to analyze.
6661         * gcc.dg/graphite/scop-18.c: Same.
6663 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6665         * gdbinit.in (pgg): New.
6667 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6669         * graphite.c (graphite_trans_loop_block): Fix warning.
6671 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6673         * graphite.c (graphite_trans_loop_block): Fix my merge error.
6675 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6677         * graphite.c (graphite_trans_bb_block): Remove check for
6678         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6679         Check if loop blocking is profitable for every loop, before applying
6680         the changes.
6681         (graphite_apply_transformations): Call graphite_trans_bb_block only,
6682         if flag_loop_block is set.
6684 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6686         * graphite.c: Add some more documentation for the loop
6687         mapping.
6689 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6691         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6692         * graphite.c: Format on less than 80 columns.
6693         * graphite.h: Same.
6695 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6697         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6699 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6701         * doc/invoke.texi (floop-block, floop-strip-mine,
6702         floop-interchange): Update documentation with examples.
6704 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
6706         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6707         add_referenced_var.
6708         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6710 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
6712         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6713         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
6714         * tree-scalar-evolution.c: Revert useless changes.
6715         * tree-phinodes.c: Same.
6716         * cfghooks.c: Same.
6717         * vec.h: Same.
6718         * tree-vectorizer.h: Same.
6719         * tree-flow.h: Same.
6720         * tree-cfg.c: Same.
6721         * common.opt (fgraphite): Update documentation.
6723 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
6725         * doc/invoke.texi (-floop-block, -floop-strip-mine,
6726         -floop-interchange): Add more text for explaining what each of these
6727         flags is doing.
6728         * tree-into-ssa.c (gimple_vec): Moved to...
6729         * graphite.c: Include gimple.h.
6730         (gimple_vec): Moved to...
6731         (del_loop_to_cloog_loop): Removed.
6732         (loop_affine_expr): Do not call create_data_ref when the
6733         operand is a constant.
6734         (new_scop): Use free instead of del_loop_to_cloog_loop.
6735         * Makefile.in (graphite.o): Depend on GIMPLE_H.
6736         * gimple.h (gimple_vec): ... here.
6738 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6740         * graphite.c (scopdet_bb_info): Only allow loops with known number of
6741         latch executions.
6742         (build_loop_iteration_domains): Fail, if latch executions unknown.
6744 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6746         * graphite.c (add_conditions_to_domain): New.
6747         (build_scop_conditions_1): Call add_conditions_to_domain.
6748         (set_cloog_options): Allow to disable optimizations.
6750 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6752         * graphite.c (find_params_in_bb): Look for parameters in conditions.
6753         Do not use walk_dominator_tree.
6754         (find_scop_parameters): Do not use walk_dominator_tree.
6756 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6758         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6759         (idx_record_params): Adapt.
6760         * graphite.h (scop_gimple_loop_depth): New.
6762 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6764         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6765         (scan_tree_for_params): Remove value_init.
6766         (build_scop_context): Remove value_init.
6767         (build_loop_iteration_domains): Remove value_init.
6768         (schedule_to_scattering): Remove value_init.
6769         (graphite_trans_bb_strip_mine): Remove value_init.
6771 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6773         * gcc/graphite.c (limit_scops): New.
6774         (graphite_transform_loops): Add limit SCoPs.
6775         * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6776         * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6777         * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6778         * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6779         * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6780         * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6781         * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6782         * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6783         * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6784         Change loop numbers.
6785         * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6786         Change loop numbers.
6787         * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6788         * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6789         * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6790         * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6791         * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6792         * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6793         * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6794         * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6795         * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6796         * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6798 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6800         * graphite.c (graphite_transform_loops): Call always find_transform.
6802 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6804         * graphite.c (free_loops_mapping): New.
6805         (stmt_simple_for_scop_p): Fix typo.
6806         (stmt_simple_for_scop_p): Fix tuples functions, that
6807         broke polyhedron.
6808         (free_graphite_bb): Fix some memleaks.
6809         (free_scop): Fix some memleaks.
6810         (scopdet_bb_info): Do not forget some tmp SCoPs.
6811         (find_params_in_bb): Fix some memleaks.
6812         (clast_to_gcc_expression): Fix warning.
6814 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
6816         * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6817         * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6819 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
6821         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6822         Move code ifdef-ed HAVE_cloog...
6823         * graphite.c: Include toplev.h.
6824         ... here.
6825         * Makefile.in (OBJS-common): Always build graphite.o.
6826         (BACKEND): Remove @GRAPHITE@.
6827         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6828         (graphite.o): Depend on TOPLEV_H.
6830 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
6832         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6833         Remove typo left from polylib to ppl conversion.
6834         * graphite.c (graphite_transforms): Use sorry instead of fatal.
6836 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
6838         * toplev.c (process_options): Move the graphite loop optimization
6839         flags...
6840         * tree-ssa-loop.c (graphite_transforms): ... here.
6841         When not configured with CLooG, print to dump_file that
6842         Graphite transforms were not performed.
6843         * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6844         New.
6845         * gcc.dg/graphite/*.c: Updated all testcases to use
6846         scan-graphite-dump-times.
6848 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
6850         * graphite.c (dot_scop, dot_all_scops): Do not call system.
6851         Do not open /tmp/scop.dot and /tmp/allscops.dot.
6853 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
6854             Jan Sjodin  <jan.sjodin@amd.com>
6856         * configure: Regenerated.
6857         * omp-low.c (expand_omp_sections): Remove now unused code.
6858         * config.in (HAVE_polylib): Removed.
6859         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6860         (PPLLIBS, PPLINC): Added.
6861         * graphite.c: Replace unsigned with int wherever possible.
6862         Don't access Cloog's data structures, but use accessor functions.
6863         Clast's stmt->type is now implemented as a vtable: change the
6864         switches of stmt->type into ifs.
6865         (polylib/polylibgmp.h): Don't include.
6866         (initialize_dependence_polyhedron,
6867         initialize_data_dependence_polyhedron, is_empty_polyhedron,
6868         statement_precedes_p, test_dependence, build_rdg_all_levels,
6869         dump_dependence_graph): Removed until this code is cleaned up
6870         or ported to Cloog.
6871         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6872         (POLYLIBINC): Renamed PPLINC.
6874 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
6875             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6876             Jan Sjodin  <jan.sjodin@amd.com>
6878         Finish the merge and tuplification of graphite.
6880 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
6881             Jan Sjodin  <jan.sjodin@amd.com>
6883         Partial merge from mainline (138072:138275).
6884         * graphite.c still has to be tuplified.
6886 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
6888         * graphite.c (graphite_loops_mapping_max_loop_num): New.
6889         (create_num_from_index): New.
6890         (get_num_from_index): Also pass in the graphite BB.
6891         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6892         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6893         (graphite_trans_bb_strip_mine): Call create_num_from_index.
6894         (is_interchange_valid): Return false when failing.
6895         * graphite.h (struct num_map): New.
6896         (struct graphite_bb): New field num_map.
6897         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6899 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6901         * graphite.c (dump_gbb_conditions): Print also conditions like
6902         "if (a)".  Remove dublicated code and use print_generic_expr ().
6903         (stmt_simple_for_scop_p): Only allow conditions we can handle
6904         {<, <=, >, >=}.
6906 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
6908         * graphite.h (struct scop): Removed new_ivs field.
6909         (SCOP_NEWIVS): Deleted.
6910         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6911         clast_to_gcc_expression, graphite_create_new_loop):
6912         Removed use of new_ivs.
6914 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
6916         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6917         create_loops_mapping_num, debug_loop_mapping_1): New.
6918         (debug_loop_mapping): Call debug_loop_mapping_1.
6919         (get_loop_mapping_for_num,
6920         graphite_loops_mapping_add_child,
6921         graphite_loops_mapping_add_child_num,
6922         graphite_loops_mapping_insert_child,
6923         graphite_loops_mapping_parent,
6924         split_loop_mapped_depth_for_num,
6925         loop_mapped_depth_split_loop): New.
6926         (increment_loop_mapped_depths): Removed.
6927         (swap_loop_mapped_depth_for_num): Reimplemented.
6928         (new_scop): Call create_loops_mapping.
6929         (scop_record_loop): Call graphite_loops_mapping_insert_child.
6930         (translate_clast): Pass the old loop father in parameter, and pass
6931         it to get_old_iv_from_ssa_name.
6932         (remove_edges_around_useless_blocks, can_generate_code_stmt,
6933         can_generate_code, can_generate_for_scop): New.
6934         (graphite_trans_bb_block): Returns false when it fails to transform.
6935         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6937 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
6939         Reverted all the changes related to the streamization and
6940         loop fusion.
6941         These changes are now tracked in the streamization branch.
6943 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
6944             Jan Sjodin  <jan.sjodin@amd.com>
6946         * graphite.c (gbb_compare): Correctly constify.
6947         (gbb_can_be_ignored): Indent.
6948         (graphite_trans_scop_swap_1and2): Add legality check.
6949         Remove dead FIXMEs.
6951 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
6953         Remove fallouts from "Reverted the Condate changes".
6954         * tree.h: Remove unused decl.
6955         * gcc.dg/tree-checker: Same.
6956         * timevar.def: Remove counter.
6958 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
6960         * Merge from mainline (135673:138072).
6962         Reverted the MIRO changes (from 2008-04-05) that are now
6963         tracked in the miro branch.
6964         * tree-bounds.c: Removed.
6965         * tree-bounds.h: Removed.
6967         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6968         are now tracked in the condate branch.
6969         * tree-check.c: Removed.
6970         * tree-match.c: Removed.
6971         * condate.y: Removed.
6973 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6975         * common.opt: New user flag -floop-block, -floop-strip-mine
6976         and -floop-interchange.
6977         * toplev.c (process_options): Enable -fgraphite pass if any one of the
6978         graphite loop optimization flags is turned on.
6979         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6980         flag_loop_strip_mine and flag_loop_interchange checks before
6981         optimizations.
6982         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6983         -floop-strip-mine and -floop-interchange.
6984         * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6985         -fgraphite.
6986         * gcc.dg/graphite/scop-16.c: Ditto.
6987         * gcc.dg/graphite/scop-17.c: Ditto.
6988         * gcc.dg/graphite/scop-18.c: Ditto.
6990 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
6991             Sebastian Pop  <sebastian.pop@amd.com>
6993         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6994         (create_empty_loop_on_edge): More fixes.
6995         * tree-phinodes.c (resize_phi_node): Extern.
6996         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6997         * cfghooks.c (update_dominator_information): New split from
6998         split_edge.
6999         * tree-vectorizer.c (rename_variables_in_bb): Extern.
7000         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7001         successor of the function entry block.
7003         * graphite.c: Include pointer-set.h.
7004         (debug_loop_mapping, increment_loop_mapped_depths,
7005         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7006         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7007         swap_loop_mapped_depth_for_num, get_num_from_index,
7008         swap_loop_mapped_depth, loop_iv_stack_debug,
7009         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7010         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7011         get_old_iv_from_ssa_name): New.
7012         (new_scop): Initialize SCOP_LOOPS_MAPPING.
7013         (free_scop): Free SCOP_LOOPS_MAPPING.
7014         (scop_record_loop): Record old ivs.
7015         (create_var_name): Removed.
7016         (initialize_cloog_names): Allocate double space in case strip mine
7017         applies to all loops once.
7018         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7019         (clast_to_gcc_expression): Same.  Implement more clast to gimple
7020         translation.
7021         (graphite_create_new_loop): Pass in ivstack.
7022         (remove_all_edges): Pass in the construction_edge.
7023         (graphite_remove_iv): Removed.
7024         (graphite_rename_ivs, graphite_rename_ivs_stmt,
7025         remove_cond_exprs): Rewritten.
7026         (move_phi_nodes): New.
7027         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7028         (translate_clast): Pass in ivstack.  Rewrite some cases.
7029         (set_cloog_options, debug_clast_stmt): New.
7030         (find_transform): Use set_cloog_options.
7031         (outermost_loop_layer): Removed.
7032         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7033         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7034         mark_old_loops, remove_dead_loops): New.
7035         (gloog): Rewritten.
7036         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7037         (const_column_index, get_first_matching_sign_row_index,
7038         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7039         get_upper_bound): New.
7040         (graphite_trans_bb_strip_mine): Also update the iv map.
7042         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7043         (struct name_tree): Add a loop field.
7044         (struct scop): Add a graphite_loops_mapping field.
7045         (SCOP_LOOPS_MAPPING): New.
7046         (debug_clast_stmt): Declare.
7047         * lambda.h (find_induction_var_from_exit_cond): Declare.
7048         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7049         * cfgloop.h (update_dominators_in_loop): Removed declaration.
7050         (create_empty_loop_on_edge): Updated.
7051         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7052         rename_variables_in_bb): Declare.
7053         * tree-cfg.c (remove_bb): Extern.
7055         * gcc.dg/graphite/block-0.c: New.
7057 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7058             Sebastian Pop  <sebastian.pop@amd.com>
7060         * graphite.c (strip_mine_profitable_p): New.
7061         (graphite_trans_bb_block): Disable strip mining if not profitable.
7063         * gcc.dg/graphite/scop-18.c: New.
7064         * gcc.dg/graphite/scop-17.c: Fixed.
7065         * gcc.dg/graphite/scop-16.c: Fixed.
7067 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
7068             Jan Sjodin  <jan.sjodin@amd.com>
7069             Sebastian Pop  <sebastian.pop@amd.com>
7071         * graphite.c (is_interchange_valid): New.
7072         (graphite_trans_bb_block): Check loop nest of basic block for legality
7073         of interchange.
7075         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7076         outer_most_loop, gbb_outer_most_loop_index): New.
7078         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7079         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7080         * gcc.dg/graphite/scop-16.c: New.
7081         * gcc.dg/graphite/scop-17.c: New.
7083 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7085         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7086         (graphite_trans_scop_block): Ignore SCoPs without bbs.
7088 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7090         * graphite.c (new_scop): Initialize SCOP_EXIT.
7091         (scopdet_info): Add.
7092         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7093         (build_scops_1): Cleanup, bugfixes.
7094         (build_scops): Cleanup.
7096         * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7097         * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7099 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7101         * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7103         * gfortran.dg/graphite/graphite.exp: Use
7104         DEFAULT_GRAPHITE_FLAGS.
7106         * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7108 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7110         * graphite.c (scan_tree_for_params): Do not assert any more if
7111         MULT_EXPR parameter is negative.
7113         * gfortran.dg/graphite/scop-1.f: New.
7115         * gfortran.dg/graphite/graphite.exp: New.
7117         * gcc.dg/graphite/scop-15.c: New.
7119 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7121         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7123 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7125         * graphite.c (graphite_trans_bb_swap_loops): Rename from
7126         graphite_swap_loops.
7127         (graphite_trans_bb_move_loop): New.
7128         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7129         (graphite_trans_bb_block): New.
7130         (graphite_trans_loop_block): New.
7131         (graphite_trans_scop_swap_1and2): Rename from
7132         graphite_trans_swap_1and2.
7133         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7134         (graphite_trans_scop_block): New.
7135         (graphite_apply_transformations): Rename from
7136         graphite_transformations.
7138         * gcc.dg/graphite/scop-matmult.c: New.
7140 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7142         * graphite.c (gbb_compare): New.
7143         (graphite_sort_gbbs): New.
7144         (gbb_can_be_ignored): New.
7145         (scop_remove_ignoreable_gbbs): New.
7146         (graphite_transformations): Cleanup and add
7147         scop_remove_ignoreable_gbbs.
7148         * lambda.h (lambda_vector_compare): New.
7150 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
7152         * graphite.c (print_graphite_bb): Correct printing of static schedule.
7153         (graphite_swap_loops): int -> unsigned
7154         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7155         (graphite_transformations): New.
7156         (graphite_transform_loops): Move to graphite_transformations.
7157         * graphite.h (gbb_nb_loops): Return unsigned.
7159 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7161         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7162         the domain matrix.  This makes scop-0.c work again.
7164 2008-06-20  Richard Guenther  <rguenther@suse.de>
7166         * graphite.h: Adjust copyright to GPLv3.
7167         * graphite.c: Likewise.
7168         (stmt_simple_memref_for_scop_p): Split out from ...
7169         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
7170         and simplify.
7171         (get_bb_type): Optimize.
7172         (is_pred): Remove.
7173         (is_bb_addable): Fix memleak, replace is_pred call with
7174         single_pred.
7175         (build_scops): Use current_loops.
7176         (param_index): Fix memleak.
7178 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7180         * graphite.c: Fix formatting.
7182 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7184         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7185         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7186         (create_var_name, save_var_name): Newly defined functions.
7187         (initialize_cloog_names): Part of the code factored out to
7188         save_var_name.
7189         (clast_to_gcc_expression): Now handles the case of clast_red_sum
7190         in clast_reduction statement.
7191         (graphite_create_new_loop): Now takes a new parameter
7192         for outer_loop.
7193         (translate_clast): Now also takes the context_loop and bb_exit
7194         parameters. Rewritten the code so that it creates a gimple code
7195         inside the given context.
7196         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7197         remove_cond_expr, disconnect_cond_expr,
7198         disconnect_virtual_phi_nodes): Newly defined functions.
7199         * graphite.h (struct scop): added old_ivs vector.
7200         SCOP_OLDIVS: New macro.
7202 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
7204         * cfgloopmanip.c: Add missing function comments, fix formatting.
7206 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7208         * cfgloopmanip.c (update_dominators_in_loop): Defined.
7209         (create_empty_loop_on_edge): Defined.
7210         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7211         instead of void.
7212         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7213         (update_dominators_in_loop): Declared as extern
7214         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7216 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
7218         * graphite.c (print_graphite_bb): Allow changing number of loops
7219         in SCoP domain.
7220         (initialize_cloog_names): Allow changing number of loops.
7221         (build_cloog_prog): Simplify.
7222         (find_transform): Enable cloog option --strides.
7223         (graphite_swap_loops): New.
7224         (graphite_strip_mine_loop): New.
7225         (graphite_trans_swap_1and2): New.
7226         (graphite_trans_strip): New.
7227         (graphite_transform_loops): Add graphite_trans_strip.
7228         * graphite.h (scop_max_loop_depth): New.
7230 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7232         * graphite.c (build_scop_iteration_domain): Remove forgotten
7233         line. (Fixes compile)
7235 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7237         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7238         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7239         (build_bb_loops): New.
7240         (graphite_transform_loops): Add build_bb_loops.
7241         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7242         numbers.
7243         * graphite.h (graphite_bb): Add loops.
7244         (gbb_nb_loops): New.
7245         (gbb_loop_at_index): New.
7246         (gbb_loop_index): New.
7247         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7248         using nb_params_in_scop.
7250 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7252         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7253         (build_scop_canonical_schedules): Build minimized schedule.
7254         (schedule_to_scattering): Adapt to minimized schedule.
7255         * graphite.h (graphite_bb): Add/Update descriptions.
7257 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
7258             Tobias Grosser  <grosser@fim.uni-passau.de>
7260         * graphite.c (print_graphite_bb): Add condition printing.
7261         (dump_value): New.
7262         (dump_gbb_conditions): New.
7263         (build_scop_conditions_1): New.
7264         (build_scop_conditions): New.
7265         * graphite.h (graphite_bb): Add conditions.
7267 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7269         * graphite.c (print_graphite_bb):
7270         (free_graphite_bb): New.
7271         (free_scop): Free bbs.
7272         (get_bb_type): Free doms.
7273         (build_scop_context): Free context matrix.
7274         (build_loop_iteration_domains): Remove unused code.
7275         (build_cloog_prog): Free scattering function and blocklist.
7276         (find_transform): Free options.
7278 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
7280         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7281         Remove unnecessery cloog data structures. Make a copy of the domain
7282         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7283         unnecessary cloog data structures. Fix memory leaks. Remove insert
7284         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7285         used.
7286         (build_scop_iteration_domain): Remove unnecessary cloog
7287         data structures.  Fix memory leaks.
7288         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7289         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7291 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7293         * graphite.c (find_scop_params): Remove initialize_cloog_names.
7295 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7297         * graphite.c (end_scop): Style fix.
7298         (schedule_to_scattering): Style and comment fix.
7300 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7301         * graphite.c (print_graphite_bb): Fix definiton of
7302         schedule_to_scattering.
7303         (initialize_cloog_names): Change nb_scattdims to max loop
7304         depth in SCoP.
7305         (schedule_to_scattering): Take parameter for number of scattering
7306         dimensions.
7307         (build_cloog_prog): Only build as much scattering dimensions as
7308         necessary.
7310 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7312         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7313         in polyhedron/aermod.f90.
7315 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7316             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
7317             Harsha Jagasia  <harsha.jagasia@amd.com>
7319         * graphite.c (is_bb_addable): Fix segfault.
7321 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7323         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7324         with multiple exits and conditional handling in edge cases.
7325         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7327         * gcc.dg/graphite/scop-14.c: New.
7329 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7330             Adrien Eliche  <aeliche@isty.uvsq.fr>
7332         * graphite.c (is_bb_addable): Add more comments and enhance
7333         readablity of the source code. Fix memory leak.
7334         (is_loop_exit): Fix memory leak.
7336 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7338         * graphite.c (first_loop_in_scop): Deleted.
7339         (setup_cloog_loop): Only walk the loop chain for inner loops.
7340         (build_scop_iteration_domain): Execute setup_cloog_loop for
7341         all loops in the first layer.
7343 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7345         * graphite.c (scan_tree_for_params): Change the way params are
7346         added to be indepenent of the number of loops.
7347         (setup_cloog_loop): Revert to short matrix format. Fix parameter
7348         handling.
7349         (build_cloog_prog): Revert to short matrix format.
7351 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7352             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7354         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7355         warning.
7357 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7359         * graphite.c (nb_data_refs_in_scop): New.
7360         (graphite_transform_loops): Print more stats: number of
7361         loops, basic blocks and data references per scop.
7363 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7364             Jan Sjodin  <jan.sjodin@amd.com>
7366         * graphite.c (loop_affine_expr, idx_record_params,
7367         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7368         instead of instantiate_parameters.
7370 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7372         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7373         add support for parameters, add STATIC_SCHEDULE at the right places,
7374         cleanup.
7376 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7378         * graphite.c (build_scop_loop_nests): Only add the loops, that
7379         are contained completely in the SCoP.
7380         (build_cloog_prog): Disable scattering, until schedule_to_scattering
7381         and the domains are fixed.
7382         (build_scop_canonical_schedules): Add support for bbs not contained
7383         in any SCoP.
7385 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7387         * graphite.h (scop_contains_loop): Update comments to match
7388         the actual behavior.
7389         (scop_contains_loop): New.
7390         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7392 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7394         * graphite.c (get_bb_type): On function body, i.e. loop_0,
7395         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7396         as GBB_COND_HEADER.
7398 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7399             Tobias Grosser  <grosser@fim.uni-passau.de>
7401         * graphite.c (graphite_transform_loops): Early return when
7402         there are no loops in the function.
7404 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7405             Jan Sjodin  <jan.sjodin@amd.com>
7407         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7408         offset of the last loop.
7409         (setup_cloog_loop): Copy the entire outer constraint matrix.
7411 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7412             Jan Sjodin  <jan.sjodin@amd.com>
7414         * graphite.c (stmt_in_scop_p, function_parameter_p,
7415         invariant_in_scop_p): Removed.
7416         (scan_tree_for_params): Can be used with no constraint
7417         matrix for gathering parameters.
7418         (idx_record_params): Don't use idx_record_param, instead use
7419         scan_tree_for_params.
7420         (find_scop_parameters): Same.
7421         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7422         Fix the size of loop domains.
7423         (schedule_to_scattering): Exit when the outer loop is not in scop.
7424         (find_transform): Enable build_cloog_prog.
7426 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7427             Jan Sjodin  <jan.sjodin@amd.com>
7429         * graphite.c (schedule_to_scattering): Make scattering domains
7430         uniformly of the same size, as required by CLooG 0.14.0 and before.
7432 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7433             Jan Sjodin  <jan.sjodin@amd.com>
7435         * graphite.c (schedule_to_scattering): Rewrite, correct the
7436         translation of the scheduling function to scattering.
7437         (build_cloog_prog): Call schedule_to_scattering only once.
7438         * graphite.h (scop_loop_index): Do not fail for loops not
7439         in the scop: return -1.
7441 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
7443         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7444         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7445         (setup_cloog_loop): Export GBB_DOMAIN.
7446         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
7447         able to rebuild the original control flow.
7448         * graphite.h (graphite_bb): Add domain field and access macro.
7449         (GBB_DOMAIN): New.
7451 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
7453         * graphite.c (debug_gbb): New.
7454         (print_scop, build_graphite_bb): Use SCOP_BBS.
7455         (build_scop_bbs): Reimplemented.
7456         (dfs_bb_in_scop_p): Removed.
7457         (build_scop_loop_nests): Reorder loops inserted in
7458         SCOP_LOOP_NEST: outer loops should come first.
7459         (build_scop_canonical_schedules): Reinitialize at zero
7460         the components of the SCOP_STATIC_SCHEDULE for the loops
7461         that have already been parsed.
7463         * graphite.h (debug_gbb): Declared.
7465 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
7466             Jan Sjodin  <jan.sjodin@amd.com>
7468         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7469         (graphite_loop_to_gcc_loop): Removed.
7470         (remove_all_edges): New.
7471         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7472         (gloog): Remove useless code.
7474 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7476         * graphite.c (get_bb_type): Reworked. We distinguish between
7477         loops with one or multiple exits.
7478         (is_loop_exit): New.
7479         (is_pred): New.
7480         (is_bb_addable): Rework condition handling, now support for case
7481         case statements and loops with multiple exits.
7483         * gcc.dg/graphite/scop-11.c: New.
7484         * gcc.dg/graphite/scop-12.c: New.
7485         * gcc.dg/graphite/scop-13.c: New.
7487 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7489         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7490         we have too many colors.
7492 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
7494         * doc/invoke.texi (-ftree-loop-fusion): Document.
7495         * tree-pass.h (pass_loop_fusion): Declared.
7496         * tree-loop-fusion.c: New.
7497         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7498         * tree-data-ref.c (find_data_references_in_loop): Make extern.
7499         * tree-data-ref.h (find_data_references_in_loop): Declared.
7500         * common.opt (ftree-loop-fusion): Declared.
7501         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7503 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
7505         * graphite.c (build_access_matrix): Fix typo from the merge.
7507 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
7509         * Merge from mainline (130800:135673).
7511 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7513         * graphite.c (end_scop): The exit of the scop is not part of the scop.
7514         Update dominators after splitting.
7516 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7518         * graphite.c (is_bb_addable): Return the harmful statement.
7519         Factor up some code.
7520         (end_scop): New.  Splits end of scope bbs on a harmful statement.
7521         (build_scops_1): Call end_scop.
7523 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7525         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7526         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7527         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7528         build_scops_1): Removed.
7529         (build_scops_2): Renamed build_scops_1.
7531 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
7533         * graphite.c: Fix formatting.
7535 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7537         * graphite.c (get_bb_type): New.
7538         (move_scops): New.
7539         (build_scops_2): New.
7540         (is_bb_addable): New.
7541         (build_scops): Switch the scop detection.
7542         (build_scop_bbs): Add entry bb to scop.
7543         * graphite.h (struct scop): Update comment.
7545 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7547         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7548         more colors.
7550 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7552         * gcc.dg/graphite/scop-1.c: Update.
7553         * gcc.dg/graphite/scop-2.c: Update.
7554         * gcc.dg/graphite/scop-4.c: Update.
7555         * gcc.dg/graphite/scop-5.c: Add.
7556         * gcc.dg/graphite/scop-6.c: Add.
7558 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
7560         * gcc.dg/graphite/scop-0.c: Add.
7561         * gcc.dg/graphite/scop-7.c: Add.
7562         * gcc.dg/graphite/scop-8.c: Add.
7563         * gcc.dg/graphite/scop-9.c: Add.
7564         * gcc.dg/graphite/scop-10.c: Add.
7566 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7568         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7569         Check affine expressions depending on the outermost loop
7570         instead of a scop.
7571         (stmt_simple_for_scop_p): Same.
7572         (harmfule_stmt_in_scop): Same.
7574 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
7576         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7577         mark entry and exit, that are not part of the SCoP and update HTML
7578         formatting.
7580 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
7582         * graphite.c (basic_block_simple_for_scop_p): Renamed
7583         harmful_stmt_in_bb.
7584         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7585         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7586         (all_preds_visited_p, all_succs_visited_p,
7587         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7588         scop_end_loop): New.
7589         (build_scops): Do not use dfs_enumerate_from.
7591         * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7593 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
7595         * graphite.c: Add comments to functions that are missing a
7596         description.
7597         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
7599 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
7601         * graphite.c (nb_params_in_scop): Moved...
7602         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7603         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7604         (clast_to_gcc_expression): Reduce column size to less than 80.
7605         (graphite_create_iv): Return the new name of the IV.
7606         (find_transform): Set options->esp and options->cpp.
7607         (gloog): Comment out the invalidation of the old loop code.
7608         (initialize_dependence_polyhedron): Replace scop_nb_params with
7609         nb_params_in_scop.
7611         * graphite.h (nb_params_in_scop): ... here.
7612         (scop_nb_params): Removed.
7613         (loop_domain_dim): Return something even when the loop was not
7614         found in the hash table: avoid ICEing on all the graphite.exp
7615         testcases.
7617 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7619         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7621         * graphite.c (build_scop_dynamic_schedules): Schedule is built
7622         according to nesting level.
7623         (find_scop_parameters): Call instantiate_parameters.
7624         (scan_tree_for_params): Extend it to handle general affine bounds.
7625         Inner loop bound can depend on outer loop induction variable.
7626         (setup_cloog_loop): tmp variable is allocated on stack. Call
7627         instantiate_parameters with respect to outermost_loop_in_scop.
7628         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7629         graphite.h.
7630         (create_empty_loop): Function loopify should be given edge
7631         probability, instead of edge frequency. Dominance relation from
7632         switch_bb to loop_header.
7633         (clast_to_gcc_expression): Added handling of clast_reduction node.
7634         (gloog): New functionality for removing old loop.
7635         (test_dependence): Factored out from build_rdg_all_levels.
7636         (build_rdg_all_levels): Dependence testing factored out to
7637         test_dependence function.
7639         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7640         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7641         from graphite.c
7643 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
7645         * graphite.c (free_scop, param_index, initialize_cloog_names,
7646         nb_params_in_scop): Use name_tree map instead of just a tree
7647         for keeping track of the variable name associated to that tree.
7648         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7649         clast_to_gcc_expression, graphite_create_iv,
7650         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7651         graphite_stmt_to_gcc_stmt): New.
7652         (gloog): Call these.
7653         * graphite.h (struct name_tree): New.
7654         (struct scop): Use name_tree instead of tree for params.
7655         Store a vector of name_tree for new_ivs.
7656         (SCOP_NEWIVS): New.
7657         (scop_nb_params): Use name_tree instead of tree.
7659 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
7660             Sebastian Pop  <sebastian.pop@amd.com>
7662         * tree-bounds.c: New.
7663         * tree-bounds.h: New.
7664         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7665         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7666         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7667         flag_mudflap.
7668         * gcc.c: Same.
7669         * toplev.c: Same.
7670         * c-cppbuiltin.c: Same.
7671         * c-pragma.c: Same.
7672         * common.opt: Same.
7673         * varasm.c: Same.
7674         * tree-outof-ssa.c: Same.
7675         * c-common.c: Same.
7676         * Makefile.in: Same.
7678 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
7679             Sebastian Pop  <sebastian.pop@amd.com>
7681         * tree-loop-distribution.c (remaining_stmts,
7682         upstream_mem_writes): Removed static variables.
7683         (copy_loop_before, create_bb_after_loop,
7684         mark_nodes_having_upstream_mem_writes, free_rdg_components,
7685         rdg_build_components, rdg_build_partitions,
7686         dump_rdg_partitions): Extern.
7687         (generate_loops_for_partition, generate_code_for_partition): Do not
7688         return a bool.
7689         (already_processed_vertex_p, predecessor_has_mem_write,
7690         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7691         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7692         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7693         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7694         Pass remaining_stmts and upstream_mem_writes as parameters.
7695         (rdg_component): Moved...
7696         (build_rdg_partition_for_component): Do not aggregate components when
7697         flag_streamize_loops is set.
7698         (gen_sequential_loops): New.
7699         (ldist_gen): Call gen_sequential_loops.
7701         * tree-pass.h (pass_loop_streamization): Declared.
7703         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7704         basic blocks when loops structures exist.
7706         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7708         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7710         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7711         eliminate_local_variables_stmt, eliminate_local_variables,
7712         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7713         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7714         of code delimited by two edges in the CFG.
7715         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7716         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7717         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
7718         the case of parallelisation of reductions.
7719         (create_loop_fn): Extern.
7720         (create_omp_parallel_region): New.
7722         * tree-data-ref.c (dump_data_dependence_relation): Don't call
7723         dump_data_reference for printing dra and drb.
7724         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7725         RDGE_RELATION.
7726         (build_rdg): Don't call free_dependence_relations for the moment, as
7727         we attach dependence relations on each edge of the RDG.
7728         To be fixed later.
7730         * tree-data-ref.h (rdg_component): ...here.
7731         (struct rdg_edge): New field ddr_p relation.
7732         (RDGE_RELATION): New.
7733         (create_bb_after_loop, copy_loop_before,
7734         mark_nodes_having_upstream_mem_writes, rdg_build_components,
7735         rdg_build_partitions, dump_rdg_partitions,
7736         free_rdg_components): Declared.
7738         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7739         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7741         * tree-loop-streamization.c: New.
7743         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7744         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7746         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7748         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7750         * passes.c: Schedule pass_loop_streamization.
7752 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
7754         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7755         update comment.
7757 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
7759         * graphite.c (dot_all_scops): Update formatting.
7760         Bbs can now be part of more than one SCoP.
7762 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
7764         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7765         malloc problems.
7766         (loop_domain_dim): Check for unregistered toplev SCOP loop.
7767         * graphite.h (loop_to_cloog_loop): New.
7769 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7771         * graphite.c (loop_domain_dim, ref_nb_loops,
7772         loop_iteration_vector_dim): New.
7773         (build_access_matrix_with_af, build_access_matrix,
7774         initialize_dependence_polyhedron): Fixed for new matrix layout.
7775         No longer assume that all iteration domains are of the same
7776         dimensionality.
7778 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
7780         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7781         defined in a loop at depth 0 is invariant.
7782         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7783         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7784         be called at loop depth 0.
7786         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7787         a parameter.
7788         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7789         (down_open_scop): Removed.
7790         (loop_in_scop_p): Redefined.
7791         (scop_affine_expr): New argument: scop.
7792         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
7793         a harmful statement ending a scop.
7794         (basic_block_simple_for_scop_p): New argument: scop.
7795         (get_loop_start): Removed.
7796         (new_scop): Initialize SCOP_LOOPS.
7797         (free_scop): Free SCOP_LOOPS.
7798         (succs_at_same_depth, preds_at_same_depth): New.
7799         (end_scop): Test the validity of a scop.
7800         (add_dominators_to_open_scops): New.
7801         (test_for_scop_bound): Call add_dominators_to_open_scops.
7802         Add cases for opening and closing multiple scops.
7803         (build_scops, build_scop_bbs): Iterate over basic blocks in
7804         depth first order.
7805         (build_graphite_bb): Pass scop directly.
7806         (dfs_bb_in_scop_p): New.
7807         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7808         several times.
7809         (nb_loops_around_gb): Use loop_in_scop_p.
7810         (schedule_to_scattering): Disabled for the moment the code computing
7811         the "textual order for outer loop".
7813         * graphite.h (struct scop): New field loops.
7814         (SCOP_LOOPS): New.
7815         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7817         * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7819 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
7820             Sebastian Pop  <sebastian.pop@amd.com>
7822         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7823         * common.opt (fstreamize-loops): New.
7824         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7825         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7826         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7827         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7829 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7831         * tree-data-ref.c (build_empty_rdg): New.
7832         (build_rdg): Use it.
7833         * tree-data-ref.h (build_empty_rdg): Declared.
7834         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7835         (find_vertex_for_stmt): Removed.
7836         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7838 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
7840         * tree-loop-distribution.c (generate_builtin): After cancelling the
7841         loop tree, also delete basic blocks.
7842         (rdg_flag_uses): Stop recursion when a vertex has already been
7843         processed.
7845 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7847         * graphite.c (build_scop_alpha): Removed.
7848         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7849         and dump_dependence_graph to avoid compiler warnings.
7851 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7853         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7854         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7855         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7856         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7857         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7858         (initialize_dependence_polyhedron, find_vertex_for_stmt,
7859         initialize_data_dependence_polyhedron, is_empty_polyhedron,
7860         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7861         dump_dependence_graph): New.
7862         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7863         (GBB_ALPHA): New.
7864         (struct scop): New field loop2cloog_loop.
7865         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7866         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7868 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7870         * graphite.c (build_graphite_bb): Fix initialization
7871         of the graphite basic block.
7873 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
7875         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7876         loop domain matrix.  Pass in the number of loops contained in the
7877         constraint matrix.
7878         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7879         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7880         loops that are not surrounding the current loop are not represented
7881         in the domain constraint matrix.
7882         (build_scop_iteration_domain): Initial domain constraint matrix
7883         contains only the eq/ineq, cst, and scop parameters columns.
7885 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7887         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7888         (print_graphite_bb): Print scattering.
7890 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7892         * graphite.c (initialize_cloog_names): Initialize names of
7893         scattering variables.
7895 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7897         * graphite.c (dot_all_scops_1): Disable debug output while
7898         printing graph.
7900 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7902         * graphite.c (find_transform): Change cloog output language to C.
7904 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
7906         * tree-loop-distribution.c (generate_memset_zero,
7907         generate_builtin, generate_code_for_partition,
7908         rdg_flag_all_uses): New.
7909         (rdg_flag_uses): Gather in the same partition the statements defining
7910         the VUSES of the current statement.
7911         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7912         Gather in the same partition not only the stores to the same memory
7913         access, but also the reads.
7914         (ldist_generate_loops): Renamed ldist_gen.
7916 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
7917             Tobias Grosser  <grosser@fmi.uni-passau.de>
7919         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7920         next pointer, don't use the inner pointer.
7922 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
7924         * graphite.c (dot_all_scops, dot_all_scops_1): New.
7925         (find_transform): Call dot_all_1.
7926         * graphite.h (dot_all_scops): Declared.
7928 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
7930         * tree-loop-distribution.c: Fix apsi.f ICE.
7931         (create_bb_after_loop): New.
7932         (generate_loops_for_partition): Use it.
7933         * gfortran.dg/ldist-1.f90: New.
7935         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7936         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7938 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
7940         * graphite.c (find_transform): Dump cloog program sent to cloog.
7942 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
7944         * graphite.c (initialize_cloog_names): Initialize cloog
7945         iterator names.
7947 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
7949         * graphite.c (build_scop_context): Fix typo, for the matrix
7950         format: insert '0 >= 0' instead of '-1 >= 0'.
7952 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
7954         * Fix merge problems.
7956 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
7958         * graphite.c (setup_cloog_loop): Fix typo.
7960 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
7962         * doc/invoke.texi (-ftree-loop-distribution): Documented.
7963         * tree-loop-distribution.c: Reimplemented.
7964         * tree-pass.h (pass_loop_distribution): New.
7965         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7966         print_loops.
7967         * graphds.h (struct graph): New field indexes.
7968         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7970         * tree-vect-analyze.c: Remove declaration of static functions when not
7971         needed.
7972         * tree-vectorizer.c: Same.
7973         (rename_variables_in_loop): Now extern.
7974         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7975         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
7976         calling redirect_edge_and_branch_force.
7978         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7980         * tree-data-ref.c: Don't include tree-chrec.h.
7981         (debug_data_dependence_relations): New.
7982         (dump_data_dependence_relation): Call dump_data_reference on data refs
7983         in the relation.
7984         (same_access_functions): Moved...
7985         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7986         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7987         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7988         struct rdg_vertex_info, ): New.
7989         (create_rdg_edge_for_ddr): Compute the dependence level before looking
7990         at DDR_REVERSED_P.
7991         (create_rdg_vertices): Initialize the htab of graph->indexes.
7992         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7993         (stmts_from_loop): Don't save LABEL_EXPR.
7994         (hash_stmt_vertex_info, eq_stmt_vertex_info,
7995         hash_stmt_vertex_del): New.
7996         (build_rdg): Initialize rdg->indexes.
7997         (free_rdg, stores_from_loop, ref_base_address,
7998         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7999         have_similar_memory_accesses_1, ref_base_address_1,
8000         remove_similar_memory_refs): New.
8002         * tree-data-ref.h: Include tree-chrec.h.
8003         (debug_data_dependence_relations): Declared.
8004         (same_access_functions): ...here.  Now static inline.
8005         (ddr_is_anti_dependent, ddrs_have_anti_deps,
8006         ddr_dependence_level): New.
8007         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8008         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8009         RDG_MEM_READS_STMT): New.
8010         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8011         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8012         rdg_vertex_for_stmt): Declared.
8013         (struct rdg_edge): New field level.
8014         (RDGE_LEVEL, free_rdg): New.
8015         (stores_from_loop, remove_similar_memory_refs,
8016         rdg_defs_used_in_other_loops_p,
8017         have_similar_memory_accesses): Declared.
8018         (rdg_has_similar_memory_accesses): New.
8020         * lambda.h (dependence_level): New.
8021         * common.opt (ftree-loop-distribution): New.
8022         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8023         (print_loop_ir): Renamed print_loops.
8024         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8025         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8026         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8027         (tree-loop-distribution.o): Added.
8028         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8029         (mark_virtual_ops_in_bb): New.
8030         (print_loops_bb, debug_loop_num, debug_loop): New.
8031         * passes.c: Scheduled pass_loop_distribution.
8033 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8035         * graphite.c (scan_tree_for_params): Correct the number of columns
8036         for polylib format.
8037         (nb_flat_iterator): New.
8038         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8039         (build_scop_iteration_domain): Correct the number of columns for
8040         polylib format.
8042 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8044         * Merge from mainline (129697:130800).
8046 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
8048         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8049         dominated by SCoP's exit.
8050         (graphite_transform_loops): Compute post dominators.
8052 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8054         * Merge from mainline (127169:129697).
8056 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8058         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
8059         parameter for the basic block that contains the expression.  Use
8060         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8061         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8062         the expression.
8063         * graphite.h (gbb_loop): New.
8064         (GBB_LOOP): Removed.
8066 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8068         * Makefile.in: Fix merge problem.
8070 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8072         * Merge from mainline (125309:127169).
8073         * tree-loop-distribution.c: Disabled.
8075 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
8077         * Merge from mainline (r123693:125309).
8079 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
8081         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8082         correct_modify_p
8083         (correct_modify_p, check_statements, number_of_lvalue_uses,
8084         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8085         instead of MODIFY_EXPR.
8086         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
8087         and push new edges.
8089 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
8091         * tree-loop-distribution.c (struct rdg): Replace arrays by
8092         VECs for edges and vertices.
8093         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8094         (RDGV_NB_PARTITIONS): New.
8095         (PRDG_NBV, PRDG_NBE): Removed.
8096         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8097         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8098         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8100 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
8101             Sebastian Pop  <sebpop@gmail.com>
8103         * doc/invoke.texi (-ftree-loop-distribution): Document.
8104         * tree-loop-distribution.c: New file.
8105         * tree-pass.h (pass_loop_distribution): Declared.
8106         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8107         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8108         and set reversed_p.
8109         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8110         (DDR_REVERSED_P): New.
8111         * common.opt (-ftree-loop-distribution): New.
8112         * tree-flow.h (distribute_loops): Declared.
8113         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8114         * passes.c (init_optimization_passes): Schedule loop distribution.
8116 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
8118         * graphite.c (print_graphite_bb): Don't call dump_data_references.
8119         (print_scop): Don't print when scop is NULL.
8120         (build_scop_context, find_transform): Don't output to stderr.
8122 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
8124         * tree-data-ref.c: Don't include graphite.h.
8125         Comment out the code for printing data reference's scop.
8126         (build_access_matrix_with_af): Moved...
8127         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8128         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
8129         (print_graphite_bb): Print basic block's schedule.
8130         (print_scop): Don't print the schedule, call cloog's pretty printer.
8131         (bb_in_scop_p): A basic block is in a scop only if it is both
8132         dominated and postdominated by the scop's entry and exit basic blocks.
8133         (function_parameter_p): New.
8134         (invariant_in_scop_p): Use function_parameter_p.
8135         (new_scop, save_scop): New.
8136         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8137         save_scop.
8138         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8139         (loop_in_scop_p): New.
8140         (scop_record_loop): Use loop_in_scop_p.
8141         (build_scop_domain): Renamed build_scop_iteration_domain.
8142         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8143         nb_params_in_scop, build_scop_context, first_loop_in_scop,
8144         setup_cloog_loop, dot_scop_1, dot_scop): New.
8145         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8146         (struct scop): Add a pointer to cloog's representation of a program.
8148 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8150         * doc/invoke.texi (-ftree-check-verbose): Renamed
8151         -ftree-checks-verbose.
8152         * common.opt (flag_tree_check_verbose): Renamed
8153         flag_tree_checks_verbose.
8154         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8156 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8158         * configure: Regenerated.
8159         * config.in: Regenerated.
8160         * tree-ssa-loop.c (graphite_transforms): Execute
8161         graphite_transform_loops only when HAVE_cloog.
8162         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8163         * graphite.c: Include polylibgmp.h and cloog.h.
8164         (graphite_transform_loops): Removed loops parameter.
8165         * tree-flow.h (graphite_transform_loops): Update declaration.
8166         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8167         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8168         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8169         (OBJS-common): Remove dependence on graphite.o.
8170         (BACKEND): Depend on @GRAPHITE@.
8172 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
8174         * doc/invoke.texi (-ftree-check-verbose): Documented.
8175         * gcc.dg/tree-checker/tree-checks-1.c: New.
8176         * gcc.dg/tree-checker/tree-checks-2.c: New.
8177         * gcc.dg/tree-checker/tree-checks-3.c: New.
8178         * gcc.dg/tree-checker/tree-checks-4.c: New.
8179         * gcc.dg/tree-checker/tree-checks.exp: New.
8180         * gcc.dg/tree-checker/condates.crp: New.
8181         * common.opt (ftree-checks-verbose): New.
8182         * tree-check.c (tree_check_warning): Move extra stderr output
8183         under control of flag_tree_check_verbose.
8185 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
8187         * tree-match.c: Fix comments formatting.
8188         * tree-match.h: Fix comments formatting.
8189         * tree-check.c: Fix comments formatting.
8190         (tree_check_init): Restructure.
8192 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
8194         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8196 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
8198         * Merge from mainline (r120733:123693).
8200 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
8202         * condate.y: New file.
8203         * tree-match.h (struct patt_info_s): New field sign.
8204         (struct condate_s): New field msg.
8205         (normalize_condate, name_condate, add_condate): New.
8206         (conds[], condate_parse): Made extern.
8207         * tree-check.c (tree_check_warning): First arg changed to cond;
8208         warning reformatted.
8209         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8210         (tree_scan): New.
8211         (tree_check): Process trivial condates.
8212         (read_delimited_string): Removed.
8213         (print_cond): Print name and msg.
8214         (conds[]): Made extern.
8215         (parse_tree_check_file_once): Rewritten to use the parser in
8216         condate.y.
8217         Processing of option --tree_check_string moved to tree_scan().
8218         * Makefile.in: Added condate.y
8220 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
8222         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8223         Use VECs instead of varrays.
8224         * diagnostic.h (lazy_dump_generic_node): Update declaration.
8225         * Makefile.in (pretty-print.o): Depend on vec.h.
8226         * pretty-print.c: Include tree.h and vec.h.
8227         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8228         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8229         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8230         pp_free_list): Use VECs instead of varrays.
8231         * pretty-print.h: Do not include varray.h.
8232         (struct tree_chunk_s): Declaration moved before its use.
8233         (output_buffer): Rename varray field to chunks.
8234         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8235         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8236         save_global_holes): Use VECs instead of varrays.
8237         * tree-match.h: Declare VECs of cfg_node, and hole_p.
8238         * tree-check.c (scan_cfg_stmts, push_node,
8239         print_matching_stmt): Removed.
8240         (tree_check_instance, push_global_holes_if_new, tree_check,
8241         execute_tree_check): Use VECs instead of varrays.
8242         (gate_tree_check): Don't execute the CFG check when basic_block_info
8243         is not available.
8245 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8247         * Merge from mainline (r115016:120733).
8249 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8251         * Merge from mainline (r117632:117661).
8253 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8255         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8256         * tree-pass.h (TDF_DEBUG, debug_p): New.
8257         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8258         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8259         get_loop_exit_condition, analyze_evolution_in_loop,
8260         analyze_initial_condition, analyze_scalar_evolution,
8261         instantiate_parameters, number_of_latch_executions): Use debug_p.
8262         * tree-chrec.c (chrec_apply): Use debug_p.
8263         * tree-data-ref.c: Include graphite.h.
8264         (dump_data_reference): Print also the access matrix.
8265         (analyze_array, analyze_indirect_ref, init_data_ref,
8266         analyze_offset_expr, address_analysis, object_analysis,
8267         create_data_ref, finalize_ddr_dependent,
8268         non_affine_dependence_relation, analyze_ziv_subscript,
8269         analyze_siv_subscript_cst_affine,
8270         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8271         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8272         analyze_miv_subscript, analyze_overlapping_iterations,
8273         build_classic_dist_vector, subscript_dependence_tester,
8274         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8275         (build_access_matrix_with_af): No longer static.
8276         * tree-data-ref.h (scop_p): ... declaration here.
8277         (data_reference.scop): New field.
8278         (DR_SCOP, DR_ACCESS_MATRIX): New.
8279         (build_access_matrix_with_af, dr_num_subscripts): Declared.
8280         * graphite.c (print_graphite_bb): Call dump_data_references.
8281         (print_scop): Use scop_nb_loops and scop_dim_domain.
8282         (test_for_scop_bound): Use debug_p.
8283         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8284         scop_nb_params.
8285         (scop_loop_index): Moved...
8286         (scop_record_loop): New.
8287         (build_scop_loop_nests): Use scop_record_loop.
8288         (build_scop_domain): Use scop_dim_domain.
8289         (build_access_matrix): Implemented.
8290         (build_scop_canonical_schedules): Use scop_nb_loops.
8291         (build_graphite_bb): Initialize GBB_SCOP.
8292         * graphite.h (scop_p): Moved...
8293         (graphite_bb.scop): New field.
8294         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8295         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8296         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8297         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8298         scop_loop_index): New.
8299         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8301 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
8303         * Merge from mainline (r117661:120450).
8305 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
8307         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8308         at the first declaration outside the varying loop, instantiate as
8309         far as possible.
8310         * tree-chrec.c (for_each_scev_op): New.
8311         * tree-chrec.h (for_each_scev_op): Declared.
8312         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8313         * tree-data-ref.c (get_references_in_stmt,
8314         find_data_references_in_stmt): New, from trunk.
8315         (find_data_references_in_loop): Use get_references_in_stmt
8316         and find_data_references_in_loop, modified as in trunk.
8317         (build_access_matrix_with_af): New.
8318         * tree-data-ref.h (data_reference): Add a field access_matrix.
8319         (data_ref_loc): New, as in trunk.
8320         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8321         invariant_in_scop_p, param_index, scan_tree_for_params,
8322         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8323         idx_record_param, idx_record_params, build_access_matrix,
8324         build_scop_data_accesses, build_scop_canonical_schedules,
8325         build_graphite_bb, build_scop_bbs, find_params_in_bb,
8326         build_scop_params): New.
8327         * graphite.h (graphite_bb): New.
8328         (scop): Add fields static_schedule, params, loop_nest,
8329         iteration_domain.
8330         * lambda.h: Declare vecs of lambda_matrix.
8331         * tree-flow.h (print_loop_ir_bb): Declared.
8332         * tree-cfg.c (print_loop_ir_bb): New.
8333         (print_loop): Use print_loop_ir_bb.
8335 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
8337         * Merge from mainline (r115016:117632).
8339 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
8341         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8342         break due to a warning.
8344 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
8346         * graphite.c (print_scops, debug_scops): New.
8347         (graphite_transform): Renamed graphite_find_transform.
8348         * graphite.h (debug_scops): Declared.
8350 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
8352         * tree-match.c: Reformat following the GNU style.
8353         * tree-match.h: Reformat following the GNU style.
8354         * tree-pattern.h: Removed empty file.
8355         * Makefile.in: Remove references to tree-pattern.h.
8356         * tree-check.c: Reformat following the GNU style.
8357         (execute_tree_check): Move gate condition code to...
8358         (gate_tree_check): ...here.  New function.
8359         (pass_check): Use the gate function.
8361 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
8363         * tree-pattern.h: New. Tree pattern matching and checking using
8364         concrete syntax.
8365         * tree-check.c: New. Tree/CFG checking pass.
8366         * tree-match.c: New. Library for tree pattern matching.
8367         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8368         * toplev.c, flags.h: Add globals for tree-check pass.
8369         * Makefile.in: Integrate the files in tree-check pass.
8370         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8371         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8372         Introduce a "lazy" pretty-print mode.
8373         * tree.c, tree.h: Add tree_name.
8375 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
8377         * doc/invoke.texi (-fgraphite): Correct typo.
8378         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8379         use of print_loop_ir.
8380         * gcc.dg/graphite/scop-1.c: New.
8381         * gcc.dg/graphite/scop-2.c: New.
8382         * gcc.dg/graphite/graphite.exp: New.
8383         * graphite.c: Include domwalk.h.
8384         (print_scop): Print only the entry and exit blocks.
8385         (debug_scop): No longer static.
8386         (affine_expr): Fix formating.  Return also true when the expression is
8387         constant.
8388         (stmt_simple_for_scop_p): Fix formating.
8389         (build_scops): Use domwalk.
8390         (get_loop_start, end_scop, test_for_scop_bound): New.
8391         (graphite_transform_loops): Avoid printing on stderr.
8392         * graphite.h (debug_scop): Declared.
8393         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8394         * Makefile.in (graphite.o): Depend on domwalk.h.
8395         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8396         declarations for static functions.
8397         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8398         controlling output verbosity.
8400 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
8401             Plesco Alexandru  <shurikx@gmail.com>
8403         * doc/invoke.texi (-fgraphite): Document.
8404         * tree-pass.h (pass_graphite_transforms): Declared.
8405         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8406         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8407         (pass_graphite_transforms): Defined.
8408         * tree-data-ref.c (free_data_ref, data_reference): Extern.
8409         * tree-data-ref.h (free_data_ref, data_reference): Declared.
8410         * graphite.c, graphite.h: New.
8411         * common.opt (fgraphite): Declared.
8412         * tree-flow.h (graphite_transform_loops): Declared.
8413         * Makefile.in (OBJS-common): Add graphite.o.
8414         (graphite.o): New rule.
8415         * passes.c (pass_graphite_transforms): Scheduled.