Add missing changelog entry.
[official-gcc/constexpr.git] / gcc / ChangeLog.graphite
blob17712840a105c9bdc8da59a3624f060da0ffb7d9
1 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
3         PR middle-end/43083
4         * graphite-scop-detection.c (create_single_exit_edge): Move
5         the call to find_single_exit_edge to....
6         (create_sese_edges): ...here.  Don't handle multiple edges
7         exiting the function.
8         (build_graphite_scops): Don't handle multiple edges
9         exiting the function.
11         * gcc.dg/graphite/pr43083.c: New.
13 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
15         PR middle-end/43097
16         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
17         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
19         * gfortran.dg/graphite/pr43097.f: New.
21 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
22             Manuel López-Ibáñez  <manu@gcc.gnu.org>
24         PR middle-end/43140
25         * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
27 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
29         PR middle-end/43026
30         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
32         * g++.dg/graphite/pr43026.C: New.
34 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
36         * Merge from mainline (154736:156693).
38 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
40         PR middle-end/43012
41         * gcc.dg/graphite/pr43012.c: New.
43 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
45         * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
46 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
48         * g++.dg/graphite/pr42930.C: New.
50 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
52         PR middle-end/42930
53         * graphite-scop-detection.c (graphite_can_represent_scev): Call
54         graphite_can_represent_init for MULT_EXPR.
56 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
58         PR middle-end/42914
59         PR middle-end/42530
60         * graphite-sese-to-poly.c (remove_phi): New.
61         (translate_scalar_reduction_to_array): Call remove_phi.
63         * gcc.dg/graphite/pr42530.c: New.
64         * gcc.dg/graphite/pr42914.c: New.
66 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
68         PR middle-end/42771
69         * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
70         * graphite-clast-to-gimple.h (gloog): Update declaration.
71         * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
72         * graphite-poly.h (struct poly_bb): Add missing comments.
73         (struct scop): Add poly_scop_p field.
74         (POLY_SCOP_P): New.
75         * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
76         * graphite.c (graphite_transform_loops): Build the polyhedral
77         representation for each scop before code generation.
78         * sese.c (rename_variables_in_operand): Removed.
79         (rename_variables_in_expr): Return the renamed expression.
80         (rename_sese_parameters): New.
81         * sese.h (rename_sese_parameters): Declared.
83         * gcc.dg/graphite/pr42771.c: New.
85 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
87         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
88         return 0 from main.
89         * gcc.dg/graphite/block-1.c: Same.
90         * gcc.dg/graphite/block-3.c: Same.
91         * gcc.dg/graphite/block-4.c: Same.
92         * gcc.dg/graphite/block-5.c: Same.
93         * gcc.dg/graphite/block-6.c: Same.
94         * gcc.dg/graphite/block-7.c: Same.
95         * gcc.dg/graphite/interchange-0.c: Same.
96         * gcc.dg/graphite/interchange-1.c: Same.
97         * gcc.dg/graphite/interchange-10.c: Same.
98         * gcc.dg/graphite/interchange-11.c: Same.
99         * gcc.dg/graphite/interchange-12.c: Same.
100         * gcc.dg/graphite/interchange-2.c: Same.
101         * gcc.dg/graphite/interchange-3.c: Same.
102         * gcc.dg/graphite/interchange-4.c: Same.
103         * gcc.dg/graphite/interchange-5.c: Same.
104         * gcc.dg/graphite/interchange-6.c: Same.
105         * gcc.dg/graphite/interchange-7.c: Same.
106         * gcc.dg/graphite/interchange-8.c: Same.
107         * gcc.dg/graphite/interchange-9.c: Same.
108         * gcc.dg/graphite/interchange-mvt.c: Same.
110 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
112         * gfortran.dg/graphite/id-19.f: New.
113         * gfortran.dg/graphite/pr14741.f90: New.
114         * gfortran.dg/graphite/pr41924.f90: New.
115         * gfortran.dg/graphite/run-id-2.f90: New.
117 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
119         PR middle-end/42988
120         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
121         to unknown_dependence.
122         (graphite_legal_transform_dr): Handle the unknown_dependence.
123         (graphite_carried_dependence_level_k): Same.
125 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
127         * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
129 2010-02-05  Sebastian Pop  <sebastian.pop@amd.com>
130             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
132         PR middle-end/42637
133         * graphite-dependences.c (build_lexicographical_constraint): Return
134         a union of dependence polyhedra.
135         (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
137         * gcc.dg/graphite/block-0.c: Enable runtime check.  XFAILed.
138         * gcc.dg/graphite/block-4.c: Same.
139         * gcc.dg/graphite/block-7.c: Same.
140         * gcc.dg/graphite/interchange-12.c: Same.
141         * gcc.dg/graphite/interchange-mvt.c: Same.
142         * gfortran.dg/graphite/interchange-1.f: XFAILed.
143         * gfortran.dg/graphite/interchange-3.f90: XFAILed.
144         * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
146 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
148         * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
149         the execution check to FAIL.  This testcase is miscompiled by Graphite
150         and the check should be re-enabled.
151         * gcc.dg/graphite/interchange-mvt.c: Same.
152         * gcc.dg/graphite/block-0.c: Same.
153         * gcc.dg/graphite/block-4.c: Same.
154         * gcc.dg/graphite/block-7.c: Same.
156 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
158         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
159         * gcc.dg/graphite/scop-0.c: Fix spaces.
160         * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
161         * gfortran.dg/graphite/block-2.f: Same.
162         * gfortran.dg/graphite/block-3.f90: Same.
163         * gfortran.dg/graphite/block-4.f90: Same.
164         * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
165         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
167 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
169         * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
170         PDDR_ORIGINAL_SCATTERING_P.
171         (pddr_is_empty): Rewritten.
172         (print_dependence_polyhedron_layout): New.
173         (print_pddr): New.
174         (debug_pddr): New.
175         (build_alias_set_powerset): Moved up.
176         (poly_drs_may_alias_p): Moved up.
177         (lexicographically_gt_p): Removed.
178         (build_lexicographically_gt_constraint): Renamed
179         build_lexicographical_constraint, reimplemented.
180         (dependence_polyhedron_1): Simplified parameters.
181         (dependence_polyhedron): Same.  Keep along empty PDDRs
182         to make efficient use of the cache.
183         (reduction_dr_p): Compute the PBBs don't pass them as parameters.
184         (graphite_legal_transform_dr): Rewritten.
185         (graphite_legal_transform_bb): Pass fewer arguments to
186         graphite_legal_transform_dr.
187         (graphite_carried_dependence_level_k): Simplified implementation.
188         (dot_original_deps_stmt_1): Call dependence_polyhedron.
189         (dot_transformed_deps_stmt_1): Same.
190         (dot_original_deps): Same.
191         (dot_transformed_deps): Same.
192         * graphite-dependences.h (struct poly_ddr): Added a new field
193         original_scattering_p.
194         (PDDR_ORIGINAL_SCATTERING_P): New.
195         (print_pddr): Declared.
196         (debug_pddr): Declared.
197         * graphite-ppl.c: Clarify comment.
198         * sese.h (print_gimple_bb): Removed unused declaration.
199         (debug_gbb): Same.
201 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
203         * g++.dg/graphite/graphite.exp: Rewritten.
204         * gcc.dg/graphite/graphite.exp: Rewritten.
205         * gfortran.dg/graphite/graphite.exp: Rewritten.
206         * gcc.dg/graphite/block-0.c: Added runtime test.
207         * gcc.dg/graphite/block-1.c: Same.
208         * gcc.dg/graphite/block-3.c: Same.
209         * gcc.dg/graphite/block-4.c: Same.
210         * gcc.dg/graphite/block-5.c: Same.
211         * gcc.dg/graphite/block-6.c: Same.
212         * gcc.dg/graphite/block-7.c: Same.
213         * gcc.dg/graphite/interchange-0.c: Same.
214         * gcc.dg/graphite/interchange-1.c: Same.
215         * gcc.dg/graphite/interchange-10.c: Same.
216         * gcc.dg/graphite/interchange-11.c: Same.
217         * gcc.dg/graphite/interchange-12.c: Same.
218         * gcc.dg/graphite/interchange-2.c: Same.
219         * gcc.dg/graphite/interchange-3.c: Same.
220         * gcc.dg/graphite/interchange-4.c: Same.
221         * gcc.dg/graphite/interchange-5.c: Same.
222         * gcc.dg/graphite/interchange-6.c: Same.
223         * gcc.dg/graphite/interchange-7.c: Same.
224         * gcc.dg/graphite/interchange-8.c: Same.
225         * gcc.dg/graphite/interchange-9.c: Same.
226         * gcc.dg/graphite/interchange-mvt.c: Same.
227         * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
229 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
231         * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
232           background.
234 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
236         * common.opt: Add -fgraphite-cloog-opts.
237         * graphite-clast-to-gimple.c (set_cloog_options): Same.
238         * opts.c (decode_options): Same.
240 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
242         * gcc.dg/graphite/id-17.c: New.
243         * gcc.dg/graphite/pr41888.c: New.
244         * gcc.dg/graphite/scop-22.c: New.
245         * gfortran.dg/graphite/pr40982.f90: New.
247 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
249         * graphite-dependences.c: Clarify comments.
250         (build_pddr): Add an extra parameter direction.
251         (graphite_legal_transform_dr): Use build_pddr.
252         (dot_original_deps_stmt_1): Update use of build_pddr.
253         (dot_transformed_deps_stmt_1): Same.
254         (dot_original_deps): Same.
255         (dot_transformed_deps): Same.
257         * gcc.dg/graphite/interchange-12.c: New.
258         * gcc.dg/graphite/block-7.c: New.
260 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
262         * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
263         (pddr_transformed_scattering): Removed.
264         (graphite_legal_transform_dr): Use build_pddr.
265         (dot_original_deps_stmt_1): Same.
266         (dot_transformed_deps_stmt_1): Same.
267         (dot_original_deps): Same.
268         (dot_transformed_deps): Same.
270 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
272         * graphite-dependences.c (lexicographically_gt_p): Add comments.
273         (build_lexicographically_gt_constraint): Same.
274         (dependence_polyhedron_1): Same.
275         (dependence_polyhedron): Same.
277 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
279         * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
280         (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
281         (lexicographically_gt_p): Change type of direction to int.
282         (build_lexicographically_gt_constraint): Same.
283         (dependence_polyhedron_1): Same.
284         (dependence_polyhedron): Same.
285         (pddr_original_scattering): Use integers for direction.
286         (pddr_transformed_scattering): Same.
287         (graphite_legal_transform_dr): Same.
288         (graphite_carried_dependence_level_k): Same.
290 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
292         * graphite-dependences.c (build_pairwise_constraint): Renamed
293         ppl_build_relation.  Moved...
294         (dr_equality_constraints): Use ppl_build_relation.
295         (build_pairwise_scheduling_equality): Same.
296         (build_pairwise_scheduling_inequality): Same.
297         * graphite-ppl.c (ppl_build_relation): ...here.
298         * graphite-ppl.h (ppl_build_relation): Declared.
300 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
302         PR middle-end/42681
303         * graphite-clast-to-gimple.c (gloog_error): New static variable.
304         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
305         Set gloog_error when such an expression failed to be built.
306         (translate_clast): Early return when gloog_error is set.
307         (gloog): Clear gloog_error.  When gloog_error is set, call
308         set_ifsese_condition to enable the original code.  Return the status
309         of the code generation based on gloog_error.
310         * sese.c (set_ifsese_condition): New.
311         * sese.h (set_ifsese_condition): Declared.
313         * g++.dg/graphite/pr42681.C: New.
315 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
317         PR middle-end/42732
318         * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
319         rename_nb_iterations.
320         * sese.c (rename_variables_in_operand): New.
321         (rename_variables_in_expr): New.
322         (rename_nb_iterations): New.
323         (sese_adjust_liveout_phis): Update the rename_map.
324         * sese.h (rename_nb_iterations): Declared.
325         * tree-scalar-evolution.c (scev_reset_htab): New.
326         (scev_reset): Call scev_reset_htab.
327         * tree-scalar-evolution.h (scev_reset_htab): Declared.
329         * gfortran.dg/graphite/pr42732.f: New.
331 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
333         PR middle-end/42393
334         * graphite-clast-to-gimple.c: Fix formatting.
335         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
336         (expr_defined_in_loop_p): New.
337         (add_loop_exit_phis): Also handle full expressions: remove from
338         the rename_map the expressions defined in the loop that we're closing.
340         * gfortran.dg/graphite/pr42393-1.f90: New.
341         * gfortran.dg/graphite/pr42393.f90: Add new flags
342         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
343         make this testcase useful in the Graphite branch.
345 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
347         * graphite-scop-detection.c (exclude_component_ref): Removed.
348         (is_simple_operand): Removed.
349         (stmt_simple_for_scop_p): Remove use of is_simple_operand.
351 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
353         PR middle-end/42221
354         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
355         the array indexing of ADDR_EXPRs.
357         * gcc.dg/graphite/pr42221.c: New.
359 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
361         PR middle-end/42521
362         * graphite.c (graphite_finalize): Call scev_reset.
363         (graphite_transform_loops): Do not call scev_reset between the code
364         generation of scops.
366         * gcc.dg/graphite/pr42521.c: New.
368 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
370         * graphite-interchange.c (memory_stride_in_loop): Renamed
371         pdr_stride_in_loop.
372         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
373         (memory_strides_in_loop): Memoize the memory strides per loop.
374         (lst_interchange_profitable_p): Do not initialize to zero the memory
375         strides.
376         * graphite-poly.h (struct lst): Add a field memory_strides.
377         (LST_LOOP_MEMORY_STRIDES): New.
378         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
379         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
381 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
383         * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
384         memory_strides_in_loop.  Gather memory strides on a whole loop.
385         (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
386         (lst_interchange_profitable_p): Removed.
387         (lst_try_interchange_loops): Call lst_interchange_profitable_p.
389 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
391         Revert patch 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
392         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
393         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
394         Remove context_loop and level.
396 2010-01-07  Richard Guenther  <rguenther@suse.de>
398         PR tree-optimization/42641
399         * sese.c (rename_map_elt_info): Use the SSA name version, do
400         not hash pointers.
402 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
404         * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
405         blocked" only when both the strip mine and the interchange have
406         been applied.
408         * gcc.dg/graphite/block-2.c: Removed.
409         * gcc.dg/graphite/block-3.c: Add scan pattern.
410         * gcc.dg/graphite/block-4.c: Same.
411         * gcc.dg/graphite/block-5.c: Same.
412         * gcc.dg/graphite/block-6.c: Same.
414 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
416         * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
417         before allocating a new one.
418         (copy_renames): Check that slot is not NULL.
419         (mark_bb_with_pbb): Same.
420         (compute_cloog_iv_types_1): Same.
421         * graphite-interchange.c (lst_perfect_nestify): Free the before,
422         nest, and after LSTs.
423         (lst_try_interchange_loops): Same.
425 2010-01-05  Sebastian Pop  <sebastian.pop@amd.com>
427         PR middle-end/42178
428         * graphite-interchange.c (lst_try_interchange_loops): Do not return
429         the before, nest, and after LSTs.
430         (lst_try_interchange): Removed.
431         (lst_interchange_select_inner): Do not iterate over the LSTs if they
432         were modified.
433         (lst_interchange_select_outer): Apply interchange on the outer loop
434         until there are no more changes in the inner loops.
436 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
438         Revert patch fixing PR middle-end/42221.
440 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
442         PR middle-end/42180
443         * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
444         GIMPLE_CALL.
446         * gfortran.dg/graphite/pr42180.f90: Add compile flags.
448 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
450         PR middle-end/42180
451         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
452         that contain only one statement.
454         * gfortran.dg/graphite/pr42180.f90: New.
456 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
458         PR middle-end/42393
459         * gfortran.dg/graphite/pr42393.f90: New.
461 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
463         PR middle-end/42186
464         * gfortran.dg/graphite/pr42186.f90: New.
466 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
468         PR middle-end/42205
469         * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
470         Insert the reduction copy in the same block as the phi node.
471         (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
473         * gcc.dg/graphite/pr42205-1.c: New.
474         * gcc.dg/graphite/pr42205-2.c: New.
476 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
478         PR middle-end/42221
479         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
480         the array indexing of ADDR_EXPRs.
482         * gcc.dg/graphite/pr42221.c: New.
484 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
486         PR middle-end/42178
487         PR middle-end/42334
488         * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
489         index.  Call lst_interchange_select_inner only once.
490         (lst_interchange_select_inner): Update use of lst_try_interchange.
491         (lst_interchange_select_outer): Update.
493 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
495         PR middle-end/42178
496         PR middle-end/42334
497         * graphite-interchange.c (lst_try_interchange): Do not increment the
498         the OUTER index when there is no AFTER kernel.  Do not increment the
499         OUTER index for after processing the AFTER kernel.
500         (lst_interchange_select_inner): Call lst_try_interchange only on loops.
501         (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
502         index.  Do not pass to lst_interchange_select_inner the OUTER index.
503         (scop_do_interchange): Update use of lst_interchange_select_outer.
505         * gfortran.dg/graphite/graphite.exp
506         (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
507         * gfortran.dg/graphite/interchange-1.f: Add comment.  Clean
508         the graphite dump file.
509         * gfortran.dg/graphite/interchange-2.f: Same.
510         * gfortran.dg/graphite/pr42334-1.f: New.
512 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
514         PR middle-end/42178
515         PR middle-end/42334
516         * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
517         that are empty.
518         (lst_do_interchange_1): Renamed lst_interchange_select_inner.
519         (lst_try_interchange): Reimplemented.
520         (lst_interchange_select_inner): Same.
521         (lst_do_interchange): Renamed lst_interchange_select_outer.
522         Reimplemented.
523         (scop_do_interchange): Update use of lst_interchange_select_outer.
525         * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
526         * gcc.dg/graphite/block-0.c: Un-XFAILed.
527         * gcc.dg/graphite/pr42211.c: New.
528         * gfortran.dg/graphite/pr42334.f90: New.
530 2009-12-14  Sebastian Pop  <sebastian.pop@amd.com>
532         PR middle-end/42181
533         * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
534         carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
536         * gfortran.dg/graphite/pr42181.f90: New.
538 2009-12-12  Sebastian Pop  <sebpop@gmail.com>
540         PR middle-end/42284
541         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
542         insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
543         (detect_commutative_reduction_arg): Simplified.
544         (detect_commutative_reduction): Early return when the argument of
545         the close phi is not of an SSA_NAME.
547         * gcc.dg/graphite/pr42284.c: New.
549 2009-12-11  Alexander Monakov  <amonakov@ispras.ru>
551         * dbgcnt.def (graphite_scop): New counter.
552         * graphite.c: Include dbgcnt.h
553         (graphite_transform_loops): Use new counter to limit transformations.
555 2009-12-08  Sebastian Pop  <sebpop@gmail.com>
557         PR middle-end/42285
558         * graphite-scop-detection.c (graphite_can_represent_init): Also
559         handle more complex MULT_EXPRs containing parameters by recursion
560         on the structure.
562         * gfortran.dg/graphite/pr42285.f90: New.
564 2009-12-01  Tobias Grosser  <grosser@fim.uni-passau.de>
566         * g++.dg/graphite/pr42130.C: Fix type.
568 2009-11-29  Alexander Monakov <amonakov@gcc.gnu.org>
570         * g++.dg/graphite/pr42130.C: Correct testcase.
572 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
574         * Merge from mainline (154493:154734).
576 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
578         * Merge from mainline (151362:154491).
580 2009-11-24  Tobias Grosser  <grosser@fim.uni-passau.de>
582         * graphite-clast-to-gimple.c (try_mark_loop_parallel,
583         graphite_create_new_loop_guard, translate_clast_for): Fix comments.
585 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
587         PR middle-end/42130
588         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
589         translate_clast_for_loop): New.
590         (translate_clast_for): Add a condition around the loop, to do not
591         execute loops with zero iterations.
592         * g++.dg/graphite/pr42130.C: New.
593         * gcc.dg/graphite/pr35356-2.c: Adapt.
595 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
597         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
598         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
599         Remove context_loop and level.
601 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
603         * graphite-clast-to-gimple.c (translate_clast_user,
604         translate_clast_for, translate_clast_guard): Simplify and move common
605         elements to translate_clast().
606         (translate_clast): Simplify and get common elements.
608 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
610         * graphite-clast-to-gimple.c (translate_clast_user,
611         translate_clast_for, translate_clast_guard): Split out of
612         translate_clast.
614 2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>
616         * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
617         clast_name_to_index, save_clast_name_index, debug_clast_name_index,
618         debug_clast_name_indexes_1, debug_clast_name_indexes,
619         clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
620         (clast_name_to_gcc, clast_to_gcc_expression,
621         clast_to_gcc_expression_red, gcc_type_for_clast_expr,
622         gcc_type_for_clast_eq, graphite_translate_clast_equation,
623         graphite_create_guard_cond_expr, graphite_create_new_loop,
624         translate_clast): Add params_index.
625         (initialize_cloog_names): Create parameter strings from scratch, do
626         not reference other strings.
627         (create_params_index): New.
628         (gloog): Initialize params_index.
629         * graphite-scop-detection (free_scops_1): Removed.
630         (limit_scops): Use normal free_scops.
631         * graphite-sese-to-poly.c (save_var_names): Removed.
632         (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
633         and SESE_PARAMS_INDEX.
634         * sese.c (new_sese, free_sese): Dito.
635         * sese.h (struct sese): Remove params_index, params_names.
636         (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
638 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
640         Revert the following patch from 2009-09-14:
641         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
642         tree-scalar-evolution.h, and then tree-data-ref.h.
643         * graphite-clast-to-gimple.c: Same.
644         * graphite-dependences.c: Same.
645         * graphite-interchange.c: Same.
646         * graphite-poly.c: Same.
647         * graphite-scop-detection.c: Same.
648         * graphite-sese-to-poly.c: Same.
649         * graphite.c: Same.
650         * lambda-code.c: Same.
651         * matrix-reorg.c: Same.
652         * tree-data-ref.c: Same.
653         * tree-if-conv.c: Same.
654         * tree-loop-distribu: Same.: Same.
655         * tree-loop-linear.c: Same.
656         * tree-parloops.c: Same.
657         * tree-predcom.c: Same.
658         * tree-vect-patterns.c: Same.
660 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
662         Revert patch from 2009-09-14.
663         * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
664         passes at -O1 and below.
666 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
668         PR middle-end/40281
669         * gcc.dg/graphite/pr40281.c: New.
671         * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
672         evolutions should not variate in inner loops.
674 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
676         PR middle-end/42050
677         * gfortran.dg/graphite/pr42050.f90: New.
679 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
681         * graphite-interchange.c (memory_strides_in_loop_depth): New.
682         (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
684 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
686         * graphite-blocking.c (scop_do_block): New.
687         * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
688         * graphite-poly.h (scop_do_block): Declared.
690 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
692         * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
693         depth is the loop nesting depth in the LST.  Call psct_dynamic_dim
694         to transform depth into the time_depth before calling
695         pbb_number_of_iterations_at_time.
696         (lst_do_strip_mine): Use a scalar variable instead of recomputing
697         lst_depth.
699 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
701         Reverted the patch for "scattering permutations" from 2009-10-28.
703         * graphite-poly.c (print_permutation): New.
704         (debug_permutation): New.
705         (new_poly_bb): Initialize PBB_PERMUTATION.
706         (free_poly_bb): Free PBB_PERMUTATION.
707         * graphite-poly.h (pbb_permutation_elt_p): Declared.
708         (struct pbb_permutation_elt): New.
709         (PBB_PERMUTATION_ELT_STRIDE): New.
710         (PBB_PERMUTATION_ELT_STRIDED_P): New.
711         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
712         (new_pbb_permutation_elt): New.
713         (pbb_permutation_elt_free): New.
714         (struct poly_bb): Add field permutation.
715         (PBB_PERMUTATION): New.
716         (print_permutation): Declared.
717         (debug_permutation): Declared.
719 2009-11-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
721         * graphite-interchange.c (build_partial_difference): New.
722         (memory_stride_in_loop): Refactored the computation of
723         equality constraints into build_partial_difference function.
724         Added support for debugging stride computations.
726 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
728         * graphite-clast-to-gimple.c (gloog): Free if_region,
729         if_region->true_region, and if_region->region.
730         * sese.c (if_region_set_false_region): Free if_region->false_region.
731         (create_if_region_on_edge): Do not use GGC_NEW.
732         (move_sese_in_condition): Remove useless initialization.
734 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
736         * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
737         for the loops created by the loop distribution.  Do not modify the
738         input LSTs.
739         (lst_try_interchange_loops): Same.  Use a temporary LST for the
740         transformed schedule.  Call lst_update_scattering before data
741         dependence analysis.
742         (lst_try_interchange): Pass an extra parameter INDEX.
743         (lst_do_interchange_1): New.
744         (lst_do_interchange): Call lst_do_interchange_1.
745         (scop_do_interchange): Call lst_update_scattering.
746         * graphite-poly.c (apply_poly_transforms): Do not call
747         lst_update_scattering.
748         * graphite-poly.h (lst_pred): New.
749         (lst_succ): New.
750         (lst_find_first_pbb): Return NULL when not found.
751         (lst_empty_p): New.
752         (lst_insert_in_sequence): Allow LST1 to be NULL.
753         (lst_replace): New.
754         (lst_substitute_3): New.
755         * gcc.dg/graphite/interchange-1.c: XFail.
756         * gcc.dg/graphite/interchange-8.c: XFail.
757         * gcc.dg/graphite/interchange-11.c: XFail.
759 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
761         * graphite-interchange.c (lst_perfectly_nested_p): New.
762         (lst_perfect_nestify): New.
763         (lst_try_interchange_loops): Call store_lst_schedule,
764         lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
765         (scop_do_interchange): Avoid redundant legality test.
766         Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
767         * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
768         * graphite-poly.h (psct_static_dim): New.
769         (lst_dewey_number_at_depth): New.
770         (lst_find_pbb): Restructured.
771         (lst_find_first_pbb): Restructured.
772         (lst_find_last_pbb): New.
773         (lst_contains_p): New.
774         (lst_contains_pbb): New.
775         (lst_create_nest): New.
776         (lst_remove_from_sequence): New.
777         (pbb_update_scattering): New.
778         (lst_update_scattering_under): New.
779         (lst_update_scattering_seq): New.
780         (lst_update_scattering): New.
781         (lst_insert_in_sequence): New.
782         (lst_distribute_lst): New.
783         (lst_remove_all_before_including_pbb): New.
784         (lst_remove_all_before_excluding_pbb): New.
786 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
788         * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
789         get_loop_exit_edges.
791 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
793         * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
795 2009-10-28  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
797         * graphite-poly.c (print_permutation): New.
798         (debug_permutation): New.
799         (new_poly_bb): Initialize PBB_PERMUTATION.
800         (free_poly_bb): Free PBB_PERMUTATION.
801         * graphite-poly.h (pbb_permutation_elt_p): Declared.
802         (struct pbb_permutation_elt): New.
803         (PBB_PERMUTATION_ELT_STRIDE): New.
804         (PBB_PERMUTATION_ELT_STRIDED_P): New.
805         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
806         (new_pbb_permutation_elt): New.
807         (pbb_permutation_elt_free): New.
808         (struct poly_bb): Add field permutation.
809         (PBB_PERMUTATION): New.
810         (print_permutation): Declared.
811         (debug_permutation): Declared.
813 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
815         * graphite-clast-to-gimple.c (gloog): Do not call
816         sese_reset_aux_in_loops.
817         * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
818         extra argument for domains.  Do not use loop->aux.
819         (build_scop_iteration_domain): Initialize and free domains, pass it
820         to build_loop_iteration_domains and extract the information from
821         domains.  Do not use loop->aux.
822         * sese.c (sese_reset_aux_in_loops): Removed.
823         * sese.h (sese_reset_aux_in_loops): Removed.
825 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
827         * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
828         (dependency_in_loop_p): Same.
829         (translate_clast): Do not use loop->aux.  Initialize
830         loop->can_be_parallel.
831         (mark_loops_parallel): Removed.
832         * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
833         * graphite.c (free_aux_in_new_loops): Removed.
834         (graphite_finalize): Do not call free_aux_in_new_loops.
835         (graphite_transform_loops): Do not call mark_loops_parallel.
837 2009-10-26  Li Feng  <nemokingdom@gmail.com>
839         * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
840         (translate_clast): Pass an extra parameter LEVEL.
841         Call get_scattering_level.
842         * graphite-clast-to-gimple.h (get_scattering_level): New.
844 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
846         * cfgloop.c (alloc_loop): Initialize loop->single_iv.
847         * cfgloop.h (struct loop): New field single_iv.
849         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
850         loop->aux anymore: use loop->single_iv.
851         (graphite_loop_normal_form): Moved...
852         (build_graphite_loop_normal_form): Removed.
853         (gloog): Do not call build_graphite_loop_normal_form.
854         (free_aux_in_new_loops): Moved...
855         (mark_loops_parallel): Restructure.
856         * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
857         * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
858         (scop_canonicalize_loops): New.
859         (build_poly_scop): Call scop_canonicalize_loops.
860         * graphite.c (free_aux_in_new_loops): ...here.
862 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
864         * g++.dg/graphite/graphite.exp: Add the same rules as in
865         gcc.dg/graphite/graphite.exp.
867 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
869         * g++.dg/graphite/id-1.C: New.
871 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
873         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
874         argument base_name.
875         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
876         (rewrite_phi_out_of_ssa): Same.
877         (rewrite_cross_bb_scalar_deps): Same.
878         (translate_scalar_reduction_to_array): Same.
880 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
882         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
883         dump_alias_graphs.
885 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
887         * graphite-sese-to-poly.c (dump_alias_graphs): New.
888         (build_scop_drs): Call dump_alias_graphs.
890 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
892         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
893         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
894         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
895         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
896         * graphite-poly.h (free_lst): New.
897         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
898         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
900 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
902         * graphite-poly.h (struct scop): Add a field saved_schedule.
903         (SCOP_SAVED_SCHEDULE): New.
904         (store_lst_schedule): New.
905         (restore_lst_schedule): New.
906         (store_scattering): Call store_lst_schedule.
907         (restore_scattering): Call restore_lst_schedule.
909 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
911         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
912         (pdr_add_alias_set): Same.
913         (build_poly_dr): Same.
914         (build_alias_set_optimal_p): Same.
915         (build_base_obj_set_for_drs): Same.  Do not store the result of
916         graphds_dfs.
918 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
920         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
921         all_components_are_cliques to 1.
923 2009-10-20  Li Feng  <nemokingdom@gmail.com>
925         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
926         the new structure.
927         (pdr_add_alias_set): Update retrieving alias_set_num.
928         (build_poly_dr): Update retrieving dr_base_object_set.
929         (partition_drs_to_sets): Remove.
930         (build_alias_set_optimal_p): New.
931         (build_alias_set_for_drs): Rename.
932         (build_scop_drs): Update.
933         * graphite-sese-to-poly.h (struct base_alias_pair): New.
934         (ALIAS_SET_INDEX): Remove.
935         (BASE_OBJECT_SET_INDEX): Remove.
937 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
939         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
941 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
943         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
944         loop upper bounds for 1-element arrays at end of structures.
945         * tree-flow.h (array_at_struct_end_p): Declared.
946         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
948 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
950         * g++.dg/graphite/pr41305.C: New.
952 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
954         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
955         construction of parameter constraints from loop iteration analysis.
956         * gcc.dg/graphite/run-id-2.c: New test.
958 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
960         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
961         and new_cstr.
963 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
965         * graphite-dependences.c (dependence_polyhedron_1): Remove
966         unused gdim dimensions from the DDR polyhedron.
968 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
970         * graphite-dependences.c (pddr_transformed_scattering): New.
971         (dot_original_deps_stmt_1): New.
972         (dot_transformed_deps_stmt_1): New.
973         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
974         dot_transformed_deps_stmt_1.
975         (dot_original_deps): New.
976         (dot_transformed_deps): New.
977         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
979 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
981         * graphite-dependences.c (reduction_dr_1): Remove wrong
982         assert: reduction BBs can have multiple reduction writes
983         to memory.  interchange-3.f90 is an example.
985 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
987         * gfortran.dg/graphite/interchange-3.f90: New.
989 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
991         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
993 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
995         * graphite-dependences.c (dependence_polyhedron_1): Add the
996         context to the dependence polyhedron.
998 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
1000         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
1001         PBB_PDR_DUPLICATES_REMOVED.
1002         (new_poly_bb): Same.
1004 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
1006         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
1007         SCOP_CONTEXT.
1008         (build_loop_iteration_domains): Extract bounds on parameters
1009         based on the data size.
1010         (build_scop_context): Do not initialize SCOP_CONTEXT;
1011         add new constraints.
1013 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
1015         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
1016         * graphite-ppl.h (graphite-ppl.h): Declared.
1018 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
1020         * graphite-ppl.c (ppl_print_linear_expr): New.
1021         (debug_ppl_linear_expr): New.
1022         * graphite-ppl.h (ppl_print_linear_expr): Declared.
1023         (debug_ppl_linear_expr): Declared.
1025 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
1027         * graphite-interchange.c: Fix comments.
1028         * gcc.dg/graphite/block-1.c: Fix comments.
1030 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
1032         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
1033         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
1035 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
1037         Reapply the patch from Alexander Monakov that disappeared during
1038         the last merges from trunk.
1040         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
1042         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1043         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
1045 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1047         * graphite-interchange.c (memory_stride_in_loop): The depth
1048         argument corresponds to a dynamic time dimension, so use
1049         psct_dynamic_dim to refer to the transformed scattering dimension.
1051 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1053         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
1055 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1057         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
1058         root of the LST.
1059         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
1060         the root of the LST.
1061         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
1062         fake loop.
1063         (print_lst): Print the root of LST in a different format.
1064         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
1066 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1068         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
1070 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1072         * doc/passes.texi: Document the Graphite infrastructure.
1074 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1076         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
1077         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
1078         and check the SSA representation.
1080         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
1082 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1084         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
1086 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1088         * gcc.dg/graphite/interchange-11.c: New.
1090 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1092         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
1094 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1096         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1097         Add -fno-loop-strip-mine and -fno-loop-interchange.
1098         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
1099         -fno-loop-strip-mine.
1100         * gfortran.dg/graphite/graphite.exp: Same.
1102 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1104         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1105         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
1106         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
1107         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
1108         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
1109         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
1110         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
1111         DEFAULT_FLAGS_GRAPHITE_SCOP.
1112         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
1113         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
1115 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1117         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
1119 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1120             Sebastian Pop  <sebastian.pop@amd.com>
1122         * graphite-interchange.c (build_linearized_memory_access): Pass an
1123         offset as parameter.
1124         (memory_stride_in_loop): Include transform scattering in the
1125         access functions to be able to querry the strides in the
1126         transformed loops.
1127         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
1128         not the psct_iterator_dim.
1130 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1132         * graphite-blocking.c (pbb_do_strip_mine): Removed.
1133         (lst_do_strip_mine_loop): New.
1134         (lst_do_strip_mine): New.
1135         (scop_do_strip_mine): Call lst_do_strip_mine.
1136         * graphite-poly.h (lst_add_loop_under_loop): New.
1137         (lst_find_first_pbb): New.
1139 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1141         * graphite-poly.c (loop_to_lst): Fix LST creation.
1143 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
1145         * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
1146         sizeof(unsigned long) to make it run on 32bit systems.
1148 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
1150         * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
1151         SEGFAULT on 32bit.
1153 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1155         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
1156         Comment.
1157         (write_alias_graph_to_ascii_dot): New.
1158         (write_alias_graph_to_ascii_ecc): Ditto.
1159         (partition_drs_to_sets): Add testing of optimality of current method
1160         which assigns alias numbers according to DFS Comopnent number.  used
1161         as heuristic for the upcoming ECC algorithm.
1162         (build_scop_drs): Write to file also with the ecc and dot format.
1164 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
1166         * gfortran.dg/graphite/interchange-1.f: XFail.
1168 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
1170         * graphite.c (graphite_initialize): Do not handle functions with
1171         more than 100 basic blocks.
1173 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
1175         * graphite-blocking.c (pbb_do_strip_mine): Use
1176         PARAM_LOOP_BLOCK_TILE_SIZE.
1178 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
1180         * graphite-poly.c (dot_lst_1): New.
1181         (dot_lst): New.
1182         * graphite-poly.h (dot_lst): Declared.
1184 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
1186         * graphite-dependences.c (dot_deps_stmt_1): New.
1187         (dot_deps_stmt): New.
1188         * graphite-dependences.h (dot_deps_stmt): Declared.
1190 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
1192         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
1193         not replace cross BB scalar dependences ending on PHI nodes.
1194         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
1196 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
1198         * graphite-poly.c (apply_poly_transforms): Implement the high
1199         level driver for flag_loop_block.
1200         * opts.c (decode_options): Enable flag_loop_block at -O2.
1201         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
1202         flag_loop_block.
1204         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
1205         -floop-block.
1206         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1207         Add -floop-block.
1209 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
1211         * graphite-poly.h (lst_find_pbb): New.
1212         (find_lst_loop): New.
1214 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
1216         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
1217         * graphite-poly.h (struct scop): Remove dep_graph field.
1218         (SCOP_DEP_GRAPH): Removed.
1220 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
1222         * graphite-poly.h (copy_lst): Do full copy of LST.
1224 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
1226         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
1227         when the loop stride is zero.
1229         * gcc.dg/graphite/id-16.c: New.
1231 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
1233         * graphite-dependences.c (reduction_dr_1): New.
1234         (reduction_dr_p): New.
1235         (graphite_legal_transform_dr): Call reduction_dr_p.
1236         (reduction_ddr): Renamed reduction_ddr_p.
1237         * graphite-poly.h (same_pdr_p): New.
1238         (number_of_write_pdrs): New.
1239         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
1240         (split_reduction_stmt): Do not split reduction statements
1241         when there are no writes to memory.
1242         (translate_scalar_reduction_to_array_for_stmt): Insert the
1243         memory reduction statement just after the scalar reduction statement.
1245         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
1246         Un-XFAIL-ed.
1247         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
1248         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
1250 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
1252         * graphite-interchange.c (lst_apply_interchange): New.
1253         (lst_interchange_profitable_p): New.
1254         (lst_try_interchange_loops): New.
1255         (lst_try_interchange): New.
1256         (lst_do_interchange): New.
1257         (pbb_do_interchange): Removed.
1258         (scop_do_interchange): Call lst_do_interchange.
1260 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
1262         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
1263         SCOP_TRANSFORMED_SCHEDULE.
1264         (loop_to_lst): New.
1265         (scop_to_lst): New.
1266         (print_lst): New.
1267         (debug_lst): New.
1268         * graphite-poly.h (lst_p): New.
1269         (struct lst): New.
1270         (LST_LOOP_P): New.
1271         (LST_LOOP_FATHER): New.
1272         (LST_PBB): New.
1273         (LST_SEQ): New.
1274         (scop_to_lst): Declared.
1275         (print_lst): Declared.
1276         (debug_lst): Declared.
1277         (new_lst_loop): New.
1278         (new_lst_stmt): New.
1279         (copy_lst): New.
1280         (lst_depth): New.
1281         (lst_dewey_number): New.
1282         (struct scop): Add original_schedule and transformed_schedule fields.
1283         (SCOP_ORIGINAL_SCHEDULE): New.
1284         (SCOP_TRANSFORMED_SCHEDULE): New.
1285         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
1287 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1289         * graphite-dependences.c (reduction_ddr): New.
1290         (graphite_legal_transform_bb): Call reduction_ddr.
1291         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
1292         Initialize PBB_IS_REDUCTION.
1293         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
1294         (PBB_IS_REDUCTION): New.
1295         (new_poly_bb): Update declaration.
1296         * graphite-scop-detection.h (build_scop_bbs): Removed.
1297         (nb_reductions_in_loop): Removed.
1298         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
1299         parameter for reductions.
1300         (try_generate_gimple_bb): Update call to new_poly_bb.
1301         (build_scop_bbs_1): Same.
1302         (build_scop_bbs): Same.
1303         (gsi_for_phi_node): New.
1304         (scalar_close_phi_node_p): Remove gcc_assert.
1305         (split_reduction_stmt): New.
1306         (is_reduction_operation_p): New.
1307         (phi_contains_arg): New.
1308         (follow_ssa_with_commutative_ops): New.
1309         (detect_commutative_reduction_arg): New.
1310         (detect_commutative_reduction_assign): New.
1311         (follow_inital_value_to_phi): New.
1312         (edge_initial_value_for_loop_phi): New.
1313         (initial_value_for_loop_phi): New.
1314         (detect_commutative_reduction): New.
1315         (translate_scalar_reduction_to_array_for_stmt): New.
1316         (insert_copyout): New.
1317         (insert_copyin): New.
1318         (translate_scalar_reduction_to_array): New.
1319         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
1320         (rewrite_commutative_reductions_out_of_ssa_loop): New.
1321         (rewrite_commutative_reductions_out_of_ssa): New.
1322         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
1323         * sese.h (split_region_for_bb): New.
1325         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
1326         * gcc.dg/graphite/interchange-1.c: Fix format.
1327         * gcc.dg/graphite/interchange-10.c: New.
1329 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1331         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
1332         buggy assert.
1334 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1336         * graphite-sese-to-poly.c (scev_analyzable_p): New.
1337         (rewrite_cross_bb_scalar_dependence): New.
1338         (rewrite_cross_bb_scalar_deps): New.
1339         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
1340         Call rewrite_cross_bb_scalar_deps.
1342 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1344         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
1345         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
1346         gsi_for_stmt.
1348 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1350         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
1351         * graphite-interchange.c (pbb_do_interchange): Same.
1352         * graphite-poly.c (print_scattering_function): Same.
1353         (debug_pdrs): Same.
1354         * graphite-poly.h (pbb_loop): New.
1355         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
1357 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
1359         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
1361 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
1363         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
1364         so don't pass a pointer to it.
1365         (build_alias_set_for_drs): Same.
1366         (build_base_obj_set_for_drs): Same.
1367         (build_scop_drs): Same.
1369 2009-09-26  Li Feng  <nemokingdom@gmail.com>
1371         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
1372         the alias graph of data references.
1374 2009-09-25  Li Feng  <nemokingdom@gmail.com>
1376         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
1377         (build_scop_drs): When debugging, write the alias graph to file,
1378         otherwise, should be disabled.
1380 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1382         * Merge from mainline (151310:151361).
1384 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1386         * Merge from mainline (151171:151310).
1388 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1390         * Merge from mainline (151171:151806).
1392 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1394         * Revert the last commit.
1396 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1398         * Merge from mainline (151171:151819).
1400 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1402         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
1403         (is_simple_operand): Remove call to stmt_simple_memref_p.
1404         (stmt_simple_for_scop_p): Update call to is_simple_operand.
1406 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
1408         * gcc.dg/graphite/interchange-mvt.c: New File.
1409         * gcc.dg/graphite/scop-dsyrk.c: New File.
1410         * gcc.dg/graphite/scop-dsyr2k.c: New File.
1411         * gcc.dg/graphite/scop-mvt.c: New File.
1412         * gcc.dg/graphite/scop-sor.c: New File.
1414 2009-09-17 Li Feng  <nemokingdom@gmail.com>
1416         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
1417         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
1418         (graphite_carried_dependence_level_k): Ditto.
1419         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
1420         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
1421         (new_poly_dr): Adjust declaration.
1422         * graphite-sese-to-poly.c (free_data_refs_aux): New.
1423         (free_gimple_bb): Added free_data_refs_aux.
1424         (build_poly_dr): Add dr_base_object_set.
1425         (partition_drs_to_sets): New.
1426         (dr_same_base_object_p): New.
1427         (build_alias_set_for_drs): New.
1428         (build_base_object_set_for_drs): New.
1429         (build_scop_drs): Add build_base_obj_set_for_drs.
1430         * graphite-sese-to-poly.h: Added #define for alias set number index and
1431         base object set index.
1432         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
1433         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
1435 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
1437         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1438         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
1440 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
1442         * graphite-sese-to-poly.c (struct irp_data): Removed.
1443         (idx_record_params): Removed.
1444         (find_params_in_bb): Scan for parameters the access functions; don't
1445         parse the tree representation.
1447 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
1449         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
1450         passes at -O1 and below.
1452 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
1454         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1455         tree-scalar-evolution.h, and then tree-data-ref.h.
1456         * graphite-clast-to-gimple.c: Same.
1457         * graphite-dependences.c: Same.
1458         * graphite-interchange.c: Same.
1459         * graphite-poly.c: Same.
1460         * graphite-scop-detection.c: Same.
1461         * graphite-sese-to-poly.c: Same.
1462         * graphite.c: Same.
1463         * lambda-code.c: Same.
1464         * matrix-reorg.c: Same.
1465         * tree-data-ref.c: Same.
1466         * tree-if-conv.c: Same.
1467         * tree-loop-distribu: Same.: Same.
1468         * tree-loop-linear.c: Same.
1469         * tree-parloops.c: Same.
1470         * tree-predcom.c: Same.
1471         * tree-vect-patterns.c: Same.
1473 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
1475         Partially revert the previous patch, except the following.
1476         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
1477         as parameters the operands of the not expression.
1479 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1481         * tree-scalar-evolution.c (instantiate_scev_assign): New.
1482         Do not call analyze_scalar_evolution on assignments.
1483         (instantiate_scev_phi): Call analyze_scalar_evolution.
1484         (instantiate_scev_name): Call instantiate_scev_assign and
1485         instantiate_scev_phi.
1486         (instantiate_scev_not): Adapted to pass as parameters the operands
1487         of the not expression.
1489 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1491         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
1492         to pass as parameters the operands of the binary expression.
1494 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1496         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
1497         instantiate_scev_not.  Handle NEGATE_EXPR.
1498         (instantiate_scev_r): Handle NEGATE_EXPR.
1500 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1502         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
1503         instantiate_scev_r.
1504         (instantiate_scev_r): Move code in instantiate_scev_2
1505         and instantiate_scev_1.
1507 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1509         * tree-scalar-evolution.c (instantiate_scev_3): New.
1510         (instantiate_scev_1): Move code in instantiate_scev_3.
1512 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1514         * tree-scalar-evolution.c (instantiate_scev_poly): New.
1515         (instantiate_scev_1): Move code in instantiate_scev_poly.
1517 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1519         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
1520         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
1522 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1524         * tree-scalar-evolution.c (instantiate_scev_convert): New.
1525         (instantiate_scev_1): Move code in instantiate_scev_convert.
1527 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1529         * tree-scalar-evolution.c (instantiate_scev_binary): New.
1530         (instantiate_scev_1): Move code in instantiate_scev_binary.
1532 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1534         * tree-scalar-evolution.c (instantiate_scev_name): New.
1535         (instantiate_scev_1): Move code in instantiate_scev_name.
1537 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
1539         * Merge from mainline (150992:151171).
1541 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1543         * opts.c (decode_options): Enable flag_loop_interchange at -O2.
1545 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1547         * graphite-dependences.c (graphite_legal_transform_bb): Call
1548         pbb_remove_duplicate_pdrs.
1549         * graphite-poly.c (can_collapse_pdr): Removed.
1550         (pdr_find_duplicate): Removed.
1551         (can_collapse_pdrs): New.
1552         (pbb_remove_duplicate_pdrs): New.
1553         (new_poly_dr): Do not look for duplicates.
1554         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
1555         (PBB_PDR_DUPLICATES_REMOVED): New.
1556         (pbb_remove_duplicate_pdrs): Declared.
1558 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1560         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
1561         the strides by multiplying by PDR_NB_REFS.
1562         * graphite-poly.c (can_collapse_pdr): New.
1563         (pdr_find_duplicate): New.
1564         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
1565         Initialize PDR_NB_REFS.
1566         * graphite-poly.h (struct poly_dr): Add field nb_refs.
1567         (PDR_NB_REFS): New.
1568         (new_poly_dr): Number of subscripts is a graphite_dim_t.
1570 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1572         Revert one of the previous commits:
1573         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1574         the computation of symmetric data dependence relations.
1575         (dependency_between_pbbs_p): Same.
1577 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1579         PR middle-end/40965
1580         * graphite-poly.c (apply_poly_transforms): Remove legality test before
1581         any transform.
1583 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1585         * graphite-dependences.c (pddr_original_scattering): Return NULL
1586         for read-read dependence relations.
1587         * graphite-poly.h (enum poly_dr_type): Fix comment.
1588         (pdr_read_p): New.
1589         (pdr_write_p): New.
1590         (pdr_may_write_p): New.
1592 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1594         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
1595         (struct poly_dr): Same.
1596         (new_poly_dr): Same.
1597         * graphite-poly.c (new_poly_dr): Same.
1599 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1600             Sebastian Pop  <sebastian.pop@amd.com>
1602         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
1603         pbb_strip_mine_time_depth.  Changed the implementation so that
1604         transformation is expressed as a transformation on
1605         time (scatttering) dimensions.  Also, ensures that the 2d+1
1606         scheduling format is preserved.
1607         (pbb_strip_mine_profitable_p): Profitability is based on the
1608         iteration number of a given time (scattering) dimension,
1609         and not on a original loop depth dimension.
1610         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
1611         (pbb_do_strip_mine): Call psct_dynamic_dim.
1612         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
1613         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
1614         (pbb_nb_dynamic_scattering_transform): New.
1615         (psct_dynamic_dim): New.
1617 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1619         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1620         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1621         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
1622         * graphite-interchange.c (build_linearized_memory_access): Same.
1623         (memory_stride_in_loop): Same.
1625 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1627         * graphite-dependences.c (pddr_original_scattering): New.
1628         (graphite_legal_transform_dr): Call pddr_original_scattering.
1629         (dot_deps_1): New.
1630         (dot_deps): New.
1631         * graphite-dependences.h (dot_deps): Declared.
1632         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
1633         (print_pdr): Print PDR_ID.
1634         * graphite-poly.h (struct poly_dr): Add field id.
1635         (PDR_ID): New.
1636         (pbb_index): New.
1637         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
1639 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
1641         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
1642         not delete the original dependence relation.
1644 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
1646         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1647         the computation of symmetric data dependence relations.
1648         (dependency_between_pbbs_p): Same.
1650 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
1652         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
1653         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
1654         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
1655         (free_poly_ddr): New.
1656         (pddr_is_empty): New.
1657         (dependence_polyhedron_1): Now returns a poly_ddr_p.
1658         (dependence_polyhedron): Same.  Remove useless gcc_assert.
1659         Remove fprintfs.
1660         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
1661         (graphite_carried_dependence_level_k): Call pddr_is_empty.
1662         * graphite-dependences.h (enum poly_dependence_kind): New.
1663         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
1664         (PDRP_SOURCE): Renamed PDDR_SOURCE.
1665         (PDRP_SINK): Renamed PDDR_SINK.
1666         (PDRP_DDP): Renamed PDDR_DDP.
1667         (PDDR_KIND): New.
1668         (free_poly_ddr): Declared.
1669         * graphite-poly.c (new_scop): Use the new hash function names.
1670         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
1671         into original_pddrs.
1672         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
1674 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
1676         * Merge from mainline (150764:150992).
1678 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
1680         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
1681         bounds with LT_EXPR to make niter analysis more precise on code
1682         generated by Graphite.
1684 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
1686         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
1687         (graphite_legal_transform_bb): Same.
1688         (poly_drs_may_alias_p): Same.
1690 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
1692         PR middle-end/40981
1693         * graphite-ppl.c (ppl_max_for_le): Correct the use of
1694         ppl_Pointset_Powerset_C_Polyhedron_maximize.
1696 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
1698         * graphite-poly.c (print_pbb): Print PBB index.
1700 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
1702         * Merge from mainline (r150672:150764).
1704 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
1706         * graphite-interchange.c (ppl_max_for_le): Moved...
1707         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
1708         * graphite-ppl.c (ppl_max_for_le): ... here.
1709         * graphite-ppl.h (ppl_max_for_le): Declared.
1711 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
1713         * Merge from mainline (r150372:150672).
1715 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1717         PR middle-end/40980
1718         * sese.c (convert_for_phi_arg): New.
1719         (add_guard_exit_phis): Use convert_for_phi_arg.
1721         * gfortran.dg/graphite/id-17.f: New.
1723 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1725         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
1726         unknown subscript upper bounds.
1728         * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
1730 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1731             Pranav Garg  <pranav.garg2107@gmail.com>
1733         * graphite-interchange.c (gather_access_strides): Removed.
1734         (ppl_max_for_le): New.
1735         (build_linearized_memory_access): New.
1736         (memory_stride_in_loop): New.
1737         (pbb_interchange_profitable_p): Reimplemented.
1738         * graphite-ppl.h (ppl_new_id_map): New.
1739         (ppl_interchange): New.
1741         * gcc.dg/graphite/interchange-6.c: XFAILed.
1743 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1745         * graphite-interchange.c (compute_subscript): Removed.
1746         (compute_array_size_cstr): Removed.
1747         (compute_array_size_poly): Removed.
1748         (compute_array_size): Removed.
1749         (gather_access_strides_poly): Removed.
1750         (gather_access_strides): Empty.
1752 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1754         * graphite-dependences.c (dependence_polyhedron_1): Replace
1755         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
1756         (graphite_legal_transform_dr): Same.
1757         (graphite_carried_dependence_level_k): Same.
1758         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
1759         Initialize PDR_NB_SUBSCRIPTS.
1760         (print_pdr_access_layout): Replace pdr_nb_subscripts with
1761         PDR_NB_SUBSCRIPTS.
1762         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
1763         (PDR_NB_SUBSCRIPTS): New.
1764         (pdr_nb_subscripts): Removed.
1765         (pdr_dim): Simplified.
1766         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
1767         with PDR_NB_SUBSCRIPTS.
1769 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1771         * graphite-interchange.c (compute_array_size): Remove use of
1772         PDR_DATA_CONTAINER.
1773         * graphite-poly.c (new_poly_dr): Remove argument data_container.
1774         Do not initialize PDR_DATA_CONTAINER.
1775         (print_pdr): Do not print PDR_DATA_CONTAINER.
1776         * graphite-poly.h (struct poly_dr): Remove data_container field.
1777         (PDR_DATA_CONTAINER): Removed.
1778         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
1779         PDR_DATA_CONTAINER.
1780         (build_poly_dr): Same.
1782 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1784         * gcc.dg/graphite/interchange-9.c: New.
1786 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1787             Sebastian Pop  <sebastian.pop@amd.com>
1789         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
1790         copy of the dependence polyhedron.  Free the temporary objects.
1791         (graphite_carried_dependence_level_k): Free unused objects before
1792         returning.
1794         * gcc.dg/graphite/interchange-1.c: XFAILed.
1795         * gcc.dg/graphite/interchange-2.c: XFAILed.
1796         * gcc.dg/graphite/interchange-3.c: XFAILed.
1797         * gcc.dg/graphite/interchange-4.c: XFAILed.
1798         * gcc.dg/graphite/interchange-7.c: XFAILed.
1800 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1802         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
1803         Early return without analyzing the data dependences if no
1804         transform has been done.  Call restore_scattering if the transform
1805         is not legal.
1806         (graphite-interchange.c): Same.
1807         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
1808         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
1809         (apply_poly_transforms): Do not gcc_assert that
1810         the transform is legal.
1811         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1812         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
1813         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
1814         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1815         * graphite-poly.h (struct poly_scattering): New.
1816         (struct poly_bb): Add original, transformed, and saved fields.
1817         Remove transformed_scattering, original_scattering, nb_local_variables,
1818         and nb_scattering_transform fields.
1819         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
1820         (poly_scattering_new): New.
1821         (poly_scattering_free): New.
1822         (poly_scattering_copy): New.
1823         (store_scattering_pbb): New.
1824         (store_scattering): New.
1825         (restore_scattering_pbb): New.
1826         (restore_scattering): New.
1827         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1828         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
1830 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1832         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
1833         (print_scop): Same.
1835 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1837         * Makefile.in (graphite.o): Depends on PREDICT_H.
1838         * graphite.c: Include predict.h.
1839         (graphite_finalize): Call tree_estimate_probability.
1840         * predict.c (predict_loops): Do not call scev_initialize and
1841         scev_finalize.
1842         (tree_estimate_probability_bb): New.
1843         (tree_estimate_probability): Do not initialize loops: move that
1844         code to the driver.  Call tree_estimate_probability_bb.
1845         (tree_estimate_probability_driver): New.
1846         (pass_profile): Use tree_estimate_probability_driver.
1847         * predict.h (tree_estimate_probability): Declared.
1849 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1851         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1852         * graphite-dependences.c (graphite_legal_transform): Add time to
1853         TV_GRAPHITE_DATA_DEPS.
1854         (dependency_between_pbbs_p): Same.
1855         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1857 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
1859         * Merge from mainline (r149952:150372).
1861 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1863         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1864         * graphite-blocking.c: Same.
1865         * graphite-clast-to-gimple.c: Same.
1866         * graphite-dependences.c: Same.
1867         * graphite-poly.c: Same.
1868         * graphite-poly.h: Same.
1869         * graphite-ppl.c: Same.
1870         * graphite-scop-detection.c: Same.
1871         * graphite-sese-to-poly.c: Same.
1872         * graphite.c: Same.
1874 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1876         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1877         (remove_simple_copy_phi): New.
1878         (remove_invariant_phi): New.
1879         (simple_copy_phi_p): New.
1880         (reduction_phi_p): New.
1881         (gsi_for_ssa_name_def): New.
1882         (insert_out_of_ssa_copy): New.
1883         (insert_out_of_ssa_copy_on_edge): New.
1884         (create_zero_dim_array): New.
1885         (scalar_close_phi_node_p): New.
1886         (rewrite_close_phi_out_of_ssa): New.
1887         (rewrite_phi_out_of_ssa): New.
1888         (rewrite_reductions_out_of_ssa): New.
1889         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1891         * gcc.dg/graphite/id-11.c: New.
1892         * gcc.dg/graphite/id-15.c: New.
1893         * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1894         * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1895         * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1896         * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1897         * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1898         * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1899         * gfortran.dg/graphite/id-13.f: New.
1900         * gfortran.dg/graphite/id-5.f: New.
1902 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1904         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1905         check that nb_reductions_in_loop is zero.
1906         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1907         reduction phi nodes.
1908         (nb_reductions_in_loop): Removed.
1909         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1910         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1911         (bb_contains_non_iv_scalar_phi_nodes): Removed.
1912         (scop_contains_non_iv_scalar_phi_nodes): Removed.
1913         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1915 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1917         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1918         statements that have an empty iteration domain.
1919         * gfortran.dg/graphite/id-16.f: New.
1921 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1923         * tree-scalar-evolution.c (instantiate_scev_1): Return
1924         chrec_dont_know when the result is not above instantiate_below.
1925         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1926         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1927         the tree has a known scalar evolution.
1928         * gfortran.dg/graphite/id-14.f: New.
1929         * gfortran.dg/graphite/id-15.f: New.
1931 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1933         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1934         insert_gsi.
1935         (rename_variables): Keep inserting renames after the ones already
1936         inserted.
1938 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1940         * graphite-sese-to-poly.c (compare_bb_depths): New.
1941         (graphite_sort_dominated_info): New.
1942         (build_scop_bbs_1): Call graphite_sort_dominated_info.
1943         (build_scop_scattering): Fix comment.
1945 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1947         * graphite.c (graphite_finalize): Call print_loops instead of
1948         dump_function_to_file.
1949         * gcc.dg/graphite/graphite.exp: Fix formatting.
1950         * gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
1951         loops generated in the graphite output file.
1952         * gcc.dg/graphite/pr35356-2.c: New.
1953         * gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
1954         * gfortran.dg/graphite/id-12.f: New.
1956 2009-07-24  Li Feng  <nemokingdom@gmail.com>
1958         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1959         Remove 2 XFAIL.
1961 2009-07-24  Li Feng  <nemokingdom@gmail.com>
1962             Tobias Grosser  <grosser@fim.uni-passau.de>
1964         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1965         alias set number build alias in ACCESSES polyhedron.
1966         (build_alias_set_for_drs): New.
1967         (build_pbb_drs): Added build_alias_set_for_drs.
1968         * graphite-dependences.c (poly_drs_may_alias_p): New.
1969         (graphite_carried_dependence_level_k): Check alias information
1970         before building polyhedron.
1972 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1974         * Makefile.in (lambda-code.o): Fix formatting.
1976 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1978         * Merge from mainline (r149350-149952)
1980 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
1982         * graphite-poly.c (apply_poly_transforms): Move strip_mine
1983         before interchange to prepare for loop blocking.
1985 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
1987         * graphite-poly.c (apply_poly_transforms): Add checks after every
1988         transformation.
1989         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1990         done in apply_poly_transforms.
1992 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1994         * graphite-dependences.c (build_lexicographically_gt_constraint):
1995         Replace RES parameter with *RES.
1996         (dependence_polyhedron_1): Pass an address of the parameter RES
1997         instead of value of RES.
1999 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2001         * graphite.c (graphite_finalize): Fix comment.
2002         (graphite_transform_loops): Reset scev info after code generation
2003         of each scop.
2005 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2007         * graphite.c (graphite_finalize): Call scev_reset.
2009 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2011         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
2012         GBB_CLOOG_IV_TYPES hash table twice.
2013         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
2014         (add_condition_to_domain): Clear GMP values.
2016 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2018         * graphite-dependences.c: Fix formatting.
2019         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
2020         (pbb_number_of_iterations): Free ppl_Linear_Expression.
2021         * graphite-sese-to-poly.c: Fix formatting.
2022         * graphite.c (graphite_transform_loops): Create the hash table
2023         after the early return.
2025 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2027         * gcc.dg/graphite/id-14.c: New.
2028         * gcc.dg/graphite/pr40157.c: New.
2029         * gfortran.dg/graphite/id-11.f: New.
2031 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2033         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
2034         (build_poly_scop): Return false when there are no pbbs within
2035         loops to avoid to pass to cloog scops with no loops.
2037 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2039         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
2040         useless test "i % 2".
2041         (build_pbb_scattering_polyhedrons): Fix formatting.
2042         (build_poly_dr): Same.
2043         * graphite.c (graphite_transform_loops): Restructure.
2045 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
2047         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
2048         reduction_list parameter.
2049         (rewrite_all_phi_nodes_with_iv): Same.
2050         (canonicalize_loop_ivs): Same.
2051         * tree-parloops.c (struct brli): Removed.
2052         (build_reduction_list_info): Removed.
2053         (build_new_reduction): New.
2054         (analyze_reduction_list): Removed.
2055         (gather_scalar_reductions): Find reductions instead of phi
2056         nodes that can't be canonicalized.
2057         (try_create_reduction_list): Remove reduction_list parameter.
2058         (gen_parallel_loop): Same.
2059         (parallelize_loops): Remove analyze_reductions variable,
2060         initialization and free.
2061         Change reduction_list htab initialization to reduction_info
2062         elements instead of ssa names.
2063         Call try_create_reduction_list and gen_parallel_loop without
2064         analyzed_reduction argument.
2065         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
2066         canonicalize_loop_ivs with one less argument.
2067         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
2069 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
2071         * graphite-dependences.c (new_poly_dr_pair): New.
2072         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
2073         (new_poly_dr_pair): New.
2074         (eq_poly_dr_pair_p): New.
2075         (hash_poly_dr_pair_p): New.
2076         * graphite-dependences.h (struct poly_dr_pair): New.
2077         (eq_poly_dr_pair_p): Declared.
2078         (hash_poly_dr_pair_p): Declared.
2079         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
2080         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
2081         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
2082         * Makefile.in (graphite-poly.o): Add dependence on
2083         graphite-dependences.h.
2085 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
2087         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
2088         polynomials of degree > 1 pass to Graphite.
2089         * tree-chrec.c (scev_is_linear_expression): Call
2090         evolution_function_is_affine_multivariate_p.
2091         * gfortran.dg/graphite/id-10.f90: New.
2093 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
2095         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
2096         Instantiate scevs varying in outer loops.
2097         * gfortran.dg/graphite/id-9.f: Correct testcase.
2099 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
2101         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
2102         redundant constraint.
2104 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
2106         * gcc.dg/graphite/graphite.exp: Fix comments.
2107         * gfortran.dg/graphite/graphite.exp: Trigger actions
2108         based on the file names as in the C testsuite.
2109         * gfortran.dg/graphite/block-1.f90: Fix patterns.
2110         * gfortran.dg/graphite/block-2.f: Same.
2111         * gfortran.dg/graphite/block-3.f90: Same.
2112         * gfortran.dg/graphite/block-4.f90: Same.
2113         * gfortran.dg/graphite/id-1.f90: Same.
2114         * gfortran.dg/graphite/id-2.f90: Same.
2115         * gfortran.dg/graphite/id-3.f90: Same.
2116         * gfortran.dg/graphite/id-4.f90: Same.
2117         * gfortran.dg/graphite/id-6.f: Same.
2118         * gfortran.dg/graphite/id-9.f: Same.
2119         * gfortran.dg/graphite/interchange-1.f: Same.
2120         * gfortran.dg/graphite/interchange-2.f: Same.
2121         * gfortran.dg/graphite/scop-1.f: Same.
2123 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
2125         * sese.c (expand_scalar_variables_call): New.
2126         (expand_scalar_variables_ssa_name): Handle calls in expander.
2128 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
2130         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
2131         Expect to see the pattern twice.
2132         * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
2133         * gcc.dg/graphite/interchange-5.c: Same.
2134         * gcc.dg/graphite/interchange-6.c: Same.
2136 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
2138         * gcc.dg/graphite/id-10.c: New.
2139         * gcc.dg/graphite/id-12.c: New.
2140         * gfortran.dg/graphite/id-7.f: New.
2141         * gfortran.dg/graphite/id-8.f: New.
2143 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
2145         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
2146         zero.
2148 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
2150         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
2152 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
2154         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
2156 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
2158         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
2159         building PDR subscripts.
2161 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
2163         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
2164         computation of array sizes.
2166 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
2168         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
2170 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2172         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
2173         build_pairwise_constraint, dr_equality_constraints,
2174         build_pairwise_scheduling_equality,
2175         build_pairwise_scheduling_inequality, lexicographically_gt_p,
2176         build_lexicographically_gt_constraint, dependence_polyhedron,
2177         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
2178         Move from NNC_Polyhedron to C_Polyhedron.
2179         * graphite-interchange.c (compute_array_size_poly,
2180         gather_access_strides): Dito.
2181         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
2182         free_scop, pbb_number_of_iterations): Dito.
2183         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
2184         pbb_dim_iter_domain, struct scop): Dito.
2185         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
2186         new_Cloog_Domain_from_ppl_Polyhedron,
2187         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
2188         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
2189         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
2190         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
2191         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
2192         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
2193         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
2194         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
2195         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
2196         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
2197         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
2198         build_scop_iteration_domain, build_poly_dr): Dito
2200 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2202         * gcc.dg/graphite/graphite.exp: Added a rule to execute
2203         run-id-*.c files.
2204         * gcc.dg/graphite/run-id-1.c: New.
2206 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2208         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
2209         positivity constraint on the symbolic number of iterations.
2211 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2213         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
2215 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2216             Tobias Grosser  <grosser@fim.uni-passau.de>
2218         * graphite-clast-to-gimple.c (build_scop_context): Removed.
2219         (build_cloog_prog): Directly use SCOP_CONTEXT.
2220         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
2221         (free_scop): Free SCOP_CONTEXT.
2222         (print_scop_context): New.
2223         (print_scop): Call print_scop_context.
2224         (debug_scop_context): New.
2225         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
2226         (struct scop): Added field context.
2227         (SCOP_CONTEXT): New.
2228         * graphite-sese-to-poly.c (add_param_constraints): New.
2229         (build_scop_context): New.
2230         (build_poly_scop): Call build_scop_context.
2232 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2234         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
2235         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
2236         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
2237         * graphite-ppl.h: Include double-int.h and tree.h.
2238         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
2239         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
2240         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
2241         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
2243 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2245         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
2246         POINTER_PLUS_EXPR for pointer types.
2247         (clast_to_gcc_expression): Same.
2249 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2251         * graphite-poly.c (print_scattering_function): Early return when
2252         PBB_TRANSFORMED_SCATTERING is not initialized.
2253         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
2255 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
2257         * tree-parloops.c (analyze_reduction_list): Remove unused variable
2258         to fix bootstrap.
2260 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
2262         * tree-parloops.c (analyze_reduction_list): Change return
2263         value to void.
2264         (try_create_reduction_list): Move the call to
2265         analyze_reduction_list to the beginining.
2266         Call reduction_phi with analyzed_reductions as argument
2267         instead of reduction_list.
2269 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2271         *  Merge from mainline (r148296:149346)
2273 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2275         * graphite-scop-detection.c (graphite_can_represent_init): New.
2276         (graphite_can_represent_scev): Call graphite_can_represent_init:
2277         check that the initial value does not contain multiplications of
2278         parameters.
2279         (stmt_has_simple_data_refs_p): New.
2280         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
2281         (is_simple_operand): Fix formatting.
2282         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
2284 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2286         * gcc.dg/graphite/id-13.c: New.
2287         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
2288         analyze_scalar_evolution, use scalar_evolution_in_region.
2289         (scan_tree_for_params_right_scev): Add extra assert.
2290         (parameter_index_in_region_1): Split from parameter_index_in_region.
2291         (idx_record_params): Use scalar_evolution_in_region.
2292         (find_params_in_bb): Same.
2293         (find_scop_parameters): Same.
2294         (build_loop_iteration_domains): Same.
2295         (create_linear_expr_from_tree): Same.
2296         * sese.c (scalar_evolution_in_region): New.
2297         * sese.h (scalar_evolution_in_region): Declared.
2298         (defined_in_sese_p): New.
2299         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
2300         static anymore.
2301         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
2302         Declared.
2304 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2306         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
2307         TREE_DATA_REF_H also implies SCEV_H.
2309 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2311         * graphite-poly.c (print_scop_params): New.
2312         (print_scop): Call print_scop_params.
2313         (debug_scop_params): New.
2314         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
2316 2009-07-07  Li Feng  <nemokingdom@gmail.com>
2318         * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
2319         * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
2320         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
2321         * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
2322         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
2323         * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
2325 2009-07-07  Li Feng  <nemokingdom@gmail.com>
2327         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
2328         for dependency checking part.
2329         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
2330         tests for dependency checking.
2331         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2332         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2333         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
2334         flag -fdump-tree-graphite-all for autopar testsuites.
2336 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
2338         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
2339         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
2340         canonicalize_loop_ivs): Moved...
2341         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
2343 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
2345         * tree-parloops.c (try_create_reduction_list): Pass an extra
2346         argument analyzed_reductions.  Call analyze_reduction_list.
2347         (gen_parallel_loop): Do not call analyze_reduction_list.
2348         (parallelize_loops): Init and finalize analyzed_reductions.
2350 2009-07-06  Li Feng  <nemokingdom@gmail.com>
2352         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2353         Added flag -fno-loop-strip-mine for autopar testcase.
2355 2009-07-04  Li Feng  <nemokingdom@gmail.com>
2357         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
2358         transformed scattering dimension instead of unmatch orignal when
2359         calling dependence_polyhedron.
2361 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
2363         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
2365 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
2367         * graphite-poly.c (pbb_number_of_iterations): Check for returned
2368         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
2370 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
2372         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
2373         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
2374         * graphite-poly.c (pbb_number_of_iterations): New.
2375         * graphite-poly.h (pbb_number_of_iterations): Declared.
2376         (pbb_iterator_dim, pbb_parameter_dim): New.
2378 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
2380         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
2381         last commit on type of lower and upper bound of loops.
2383 2009-06-29  Li Feng  <nemokingdom@gmail.com>
2385         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
2386         graphite-dependences.h.
2387         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
2388         (mark_bb_with_pbb): New.
2389         (get_stmtfor_depth): New.
2390         (find_pbb_via_hash): New.
2391         (dependency_in_loop_p): New.
2392         (mark_loops_parallel): New.
2393         (free_aux_in_new_loops): New.
2394         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
2395         bb with it's relevant pbb. Mark newly created loops.  Remove mark
2396         innermost loop parallel without checking.
2397         (gloog): Add parameter BB_PBB_MAPPING.
2398         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
2399         (gloog): Change declaration.
2400         (mark_loop_parallel): Make extern.
2401         (free_aux_in_new_loops): Declare.
2402         (bb_pbb_map_hash): New.
2403         (eq_bb_pbb_map): New.
2404         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
2405         auto parallelization when flag_graphite_force_parallel is set.
2406         (graphite_finalize): Added free_aux_in_new_loops.
2407         * tree-parloops.c (parallelize_loops): Only generate parallel code for
2408         the innermost loop that marked parallel.  Use
2409         flag_graphite_force_parallel instead of loop->can_be_parallel.
2410         (loop_parallel_p): Move inner most checking out of function.
2412 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2414         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
2415         type of lower and upper bound of loops signed long int.
2417 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2419         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
2420         expression outside the loop.
2422 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2424         * gcc.dg/graphite/interchange-8.c: New.
2426 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2428         * gcc.dg/graphite/interchange-0.c: XFailed.
2429         * gcc.dg/graphite/interchange-5.c: XFailed.
2430         * gcc.dg/graphite/interchange-6.c: XFailed.
2432 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2434         * graphite-interchange.c (compute_array_size_poly): The end of the
2435         recursion should return 1.
2437 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2439         * graphite-interchange.c (compute_array_size_cstr): Allow the
2440         subscript multiplier to be -1.
2441         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
2442         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
2443         data_container.  Initializes PDR_DATA_CONTAINER.
2444         (print_pdr_access_layout): New.
2445         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
2446         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
2447         data_container.
2448         (PDR_DATA_CONTAINER): New.
2449         (new_poly_dr): Update declaration.
2450         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
2451         (build_poly_dr): Call pdr_add_data_dimensions.
2453 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2455         * graphite-poly.h (struct poly_dr): Fix comment.
2456         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
2457         (pdr_add_memory_accesses): New.
2458         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
2460 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2462         * graphite-poly.c (print_pdrs, debug_pdrs): New.
2463         (print_pbb): Add call to print_pdrs.
2464         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
2466 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
2467             Li Feng <nemokingdom@gmail.com>
2469         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
2470         (dependency_between_pbbs_p): New.
2471         (lexicographically_gt_p): Assure !empty_p before polyhedron
2472         intersection assign.
2473         (build_lexicographically_gt_constraint): Correct lexicographically
2474         judging.
2475         * graphite-dependences.h: New.
2476         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
2478 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
2480         * graphite-clast-to-gimple.c (print_clast_stmt): New.
2481         (gloog): Print to dump_file the generated clast.
2482         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
2483         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
2485 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
2487         * graphite-poly.c (extend_scattering): Increment
2488         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
2490 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
2492         * graphite-interchange.c (compute_array_size_poly): Added exit of
2493         recursion condition.  Continue iterating even after the first equality.
2494         (compute_array_size): Same.
2496 2009-06-24  Li Feng  <nemokingdom@gmail.com>
2498         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
2499         -fdump-tree-final_cleanup to -fdump-tree-optimized.
2500         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2501         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2502         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
2504 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2506         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
2507         only when the use verifies is_gimple_reg.
2509 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2511         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
2512         Allocate scaldims after call to unify_scattering_dimensions.
2514 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2516         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
2518 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2519             Albert Cohen  <albert.cohen@inria.fr>
2521         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
2522         variables for the strip mining.
2524 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2525             Pranav Garg  <pranav.garg2107@gmail.com>
2527         * Makefile.in (OBJS-common): Added graphite-blocking.o.
2528         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
2529         (graphite-blocking.o): New rule.
2530         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
2531         * graphite-blocking.c: New.
2532         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
2533         flag_loop_strip_mine.
2534         (psct_scattering_dim_for_loop_depth): New.
2535         * graphite-poly.h (scop_do_strip_mine): Declared.
2536         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
2537         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
2538         flag_loop_strip_mine.
2540 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2542         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
2543         a GMP value and a PPL coefficient at each iteration of a loop.
2545 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2547         * graphite-dependences.c (dependence_polyhedron): Do not use
2548         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
2549         pbb_nb_scattering_transform.
2550         (graphite_legal_transform_dr): Same.
2551         * graphite-poly.c (extend_scattering): Same.
2552         (unify_scattering_dimensions): Same.
2553         (print_scattering_function): Same.
2554         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
2555         PBB_NB_LOCAL_VARIABLES.
2556         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
2557         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
2558         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
2559         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
2560         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
2561         (pbb_nb_scattering_transform): New.
2562         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
2563         (psco_scattering_dim): Add assert on parameters.
2564         (psct_scattering_dim): Same.
2565         (psct_scattering_dim_for_loop_depth): Declared.
2566         (psct_local_var_dim): New.
2567         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
2568         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
2569         correct layout, call pbb_nb_local_vars.
2570         (psct_add_local_variable, psct_add_scattering_dimension): New.
2571         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2572         Initialize PBB_NB_SCATTERING_TRANSFORM.
2574 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2576         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
2577         (set_coef): Renamed ppl_set_coef.
2578         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
2580 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2582         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
2583         test a boolean against 1.
2584         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
2585         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
2586         (pbb_do_interchange): Returns true when a transform has been performed.
2587         (scop_do_interchange): Same.
2588         * graphite-poly.c (apply_poly_transforms): Use the return value of
2589         scop_do_interchange.
2590         * graphite-poly.h (scop_do_interchange): Update declaration.
2592 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2594         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
2595         after last use.
2596         * sese.c (sese_reset_aux_in_loops): New.
2597         * sese.h (sese_reset_aux_in_loops): New.
2599 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2601         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
2602         multiplier and multiply the constant by the multiplier.
2603         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
2604         (build_poly_dr): Do not use the multiplier to define the subscript.
2606 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2608         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
2609         compiler's data reference.  Initialize PDR_CDR.
2610         (print_pdr): Call dump_data_reference.
2611         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
2612         Add compiler_dr field.
2613         (PDR_BB): Renamed PDR_PBB.
2614         (PDR_CDR): New.
2615         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
2616         GCC's data reference representation.
2617         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
2618         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
2620 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2622         * graphite-poly.c (print_scattering_function): Also print the layout.
2623         * graphite-poly.h (pbb_nb_local_vars): New.
2625 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2627         * graphite-poly.c (print_pbb_domain): Also print the layout names.
2629 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2631         * graphite-poly.c (print_pdr, debug_pdr): New.
2632         * graphite-poly.h (print_pdr, debug_pdr): Declared.
2633         (PDR_BASE): Removed.
2635 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2637         * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
2638         ltrans-{1..6,8}.c.
2640 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2642         * graphite-interchange.c (compute_subscript): Allow also -1 in the
2643         subscript identification column.
2644         (pbb_do_interchange): Print to dump_file that some loops "will be
2645         interchanged".  Rely on that chain of characters in the testcases.
2646         * gcc.dg/graphite/interchange-0.c: New.
2647         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
2648         interchange-*.c files and compile them with -floop-interchange.
2650 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
2652         * graphite-interchange.c (interchange_profitable_p): Renamed
2653         pbb_interchange_profitable_p.
2655 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2656             Harsha Jagasia  <harsha.jagasia@amd.com>
2657             Pranav Garg  <pranav.garg2107@gmail.com>
2659         * graphite-interchange.c (interchange_profitable_p): Make static.
2660         (pbb_interchange_loop_depths, pbb_do_interchange,
2661         scop_do_interchange): New.
2662         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
2663         for flag_loop_interchange.
2664         * graphite-poly.h (scop_do_interchange): Declared.
2665         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
2666         flag_loop_interchange is used.
2668 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2670         * graphite-dependences.c (dependence_polyhedron): Update use of
2671         pbb_nb_scattering_dims.
2672         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
2673         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
2674         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
2675         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
2677 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
2679         * graphite.c: Cleanup foo.
2681 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
2683         * Merge from mainline (r143684:148293).
2684         * Disabled libpcp until it gets fixed.
2686 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
2687             Harsha Jagasia  <harsha.jagasia@amd.com>
2689         * graphite-interchange.c: New.
2690         * Makefile.in (graphite-interchange.o): New.
2691         * graphite-poly.h (interchange_profitable_p): Declared.
2692         * graphite-ppl.h (value_max): New.
2694 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
2696         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
2697         * graphite-poly.h: Fix some comments.
2698         (pdr_dim): New.
2699         (pdr_scop): New.
2701 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
2703         * graphite-poly.h
2704         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
2705         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
2706         (pdr_accessp_nb_params): Renamed pdr_nb_params.
2707         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
2708         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
2709         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
2710         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
2711         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
2712         * graphite-clast-to-gimple.c: Same.
2713         * graphite-dependences.c: Same.
2714         * graphite-poly.c: Same.
2715         * graphite-sese-to-poly.c: Same.
2717 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
2719         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
2720         expressions for an IV rename, as returned by clast_to_gcc_expression.
2721         (copy_renames): Rename new_name to expr.
2722         * sese.c (debug_rename_elt): Same.
2723         (get_rename): Same.
2724         (set_rename): Same.
2725         (sese_adjust_liveout_phis): Call force_gimple_operand before using
2726         the information from the rename map.
2727         (rename_variables_in_stmt): Same.
2728         (add_loop_exit_phis): Rename new_name to expr.
2729         (insert_loop_close_phis): Same.
2730         (add_guard_exit_phis): Same.  Call force_gimple_operand.
2731         * sese.h (struct rename_map_elt): Rename new_name to expr.
2732         (new_rename_map_elt): Same.
2734 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
2736         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
2737         * sese.c (set_rename): Make it extern.
2738         * sese.h (set_rename): Declared.
2740 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
2742         * graphite-poly.c (extend_scattering): Free values.
2743         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
2744         Free iterators.
2745         (ppl_print_powerset_matrix): Same.
2746         * graphite-scop-detection.c (free_scops_1): New.
2747         (limit_scops): Call free_scops_1.
2748         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
2749         (build_poly_dr): Free PPL coefficients.
2750         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
2752 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
2754         * graphite-dependences.c: New.
2755         * graphite-data-ref.c: Removed.
2756         * graphite-data-ref.h: Removed.
2757         * Makefile.in (graphite-data-ref.o): Removed.
2758         (graphite-dependences.o): Added.
2759         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
2760         * graphite-poly.c: Same.
2761         Move the data dependence testing to graphite-dependences.c.
2763 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
2765         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
2766         from graphite_cannot_represent_loop. Code refactored.
2767         (scopdet_basic_block_info): Call graphite_can_represent_loop.
2769 2009-05-17  Li Feng  <nemokingdom@gmail.com>
2771         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2772         Cover all the testcases (not only the filtered ones).
2774 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
2776         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
2777         unnecessary check. Update comments. Move check for REAL_TYPE here.
2778         (harmful_stmt_in_bb): Remove checks for conditions. This is already
2779         done in (stmt_simple_for_scop_p).
2781 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
2783         * graphite.c (print_global_statistics): New.
2784         (print_graphite_scop_statistic): New.
2785         (print_graphite_statistics): New.
2786         (graphite_initialize, graphite_transform_loops): Print statistics.
2787         * graphite-scop-detection (build_scops): Print statistics.
2788         (print_graphite_scop_statistics): New.
2789         (print_graphite_statistics): New.
2791 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2793         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
2794         (debug_clast_name_index): Removed.
2795         (debug_clast_name_indexes_1): Removed.
2796         (debug_clast_name_indexes): Removed.
2797         (clast_name_index_elt_info): Removed.
2798         (eq_clast_name_indexes): Removed.
2799         (clast_name_to_index): Removed.
2800         (new_clast_name_index): Removed.
2801         (save_clast_name_index): Removed.
2802         (save_var_name): Moved...
2803         (init_sese_params_index): Removed.
2804         (clast_name_to_gcc): Remove use of name_tree.
2805         (initialize_cloog_names): Same.
2806         (gloog): Do not call init_sese_params_index.
2807         * graphite-sese-to-poly.c (save_var_name): ...here.
2808         (parameter_index_in_region): New.
2809         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
2810         (parameter_index_in_region): Removed.
2811         (is_parameter): Remove use of name_tree.
2812         * sese.h (struct name_tree): Removed.
2813         (struct sese): Remove use of name_tree.  New field params_names.
2814         (SESE_PARAMS_NAMES): New.
2815         (SESE_PARAMS): Remove duplicate.
2816         (parameter_index_in_region): Removed.
2817         (sese_nb_params): Remove use of name_tree.
2818         (struct clast_name_index): New.
2819         (new_clast_name_index): New.
2820         (clast_name_to_index): New.
2821         (save_clast_name_index): New.
2822         (debug_clast_name_index): New.
2823         (debug_clast_name_indexes_1): New.
2824         (debug_clast_name_indexes): New.
2825         (clast_name_index_elt_info): New.
2826         (eq_clast_name_indexes): New.
2828 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2830         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
2831         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
2832         (graphite_loop_normal_form): Do not pass region.  Do not
2833         initialize SESE_OLDIVS.
2834         (build_graphite_loop_normal_form): Update call to
2835         graphite_loop_normal_form.
2836         * sese.c (debug_oldivs): Removed.
2837         (new_sese): Do not initialize SESE_OLDIVS.
2838         (free_sese): Do not free SESE_OLDIVS.
2839         (oldiv_for_loop): Removed.
2840         * sese.h (struct sese): Remove old_ivs.
2841         (SESE_OLDIVS): Removed.
2842         (oldiv_for_loop): Removed.
2844 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2846         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2847         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
2848         replaced by a call to newivs_to_depth_to_newiv.
2849         (clast_to_gcc_expression): Pass newivs, remove ivstack.
2850         (clast_to_gcc_expression_red): Same.
2851         (gcc_type_for_clast_expr): Same.
2852         (gcc_type_for_clast_eq): Same.
2853         (graphite_translate_clast_equation): Same.
2854         (graphite_create_guard_cond_expr): Same.
2855         (graphite_create_new_guard): Same.
2856         (graphite_create_new_loop): Same.
2857         (build_iv_mapping): Same.
2858         (translate_clast): Same.
2859         (gloog): Same.
2860         (loop_iv_stack_patch_for_consts): Removed.  *
2861         sese.c (iv_stack_entry_is_constant): Removed.
2862         (iv_stack_entry_is_iv): Removed.
2863         (loop_iv_stack_push_iv): Removed.
2864         (loop_iv_stack_insert_constant): Removed.
2865         (loop_iv_stack_pop): Removed.
2866         (loop_iv_stack_get_iv): Removed.
2867         (loop_iv_stack_get_iv_from_name): Removed.
2868         (debug_loop_iv_stack): Removed.
2869         (free_loop_iv_stack): Removed.
2870         (loop_iv_stack_remove_constants): Removed.  *
2871         sese.h (iv_stack_entry_kind): Removed.
2872         (iv_stack_entry_data_union): Removed.
2873         (iv_stack_entry_struct): Removed.
2874         (iv_stack_entry_p): Removed.
2875         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2876         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2877         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2878         loop_iv_stack_pop, free_loop_iv_stack): Removed.
2879         (gbb_loop_at_index): Fix indenting.
2880         (gbb_loop_index): Removed.
2882 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2884         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2885         Call clast_name_to_index.
2887 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2889         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2890         do not pass params.  Get params from SESE_PARAMS.
2891         (clast_to_gcc_expression): Same.
2892         (clast_to_gcc_expression_red): Same.
2893         (gcc_type_for_clast_eq): Same.
2894         (graphite_translate_clast_equation): Same.
2895         (graphite_create_new_loop): Same.
2896         * sese.c (rename_variables_in_stmt): Fix comment.
2898 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2900         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2901         newivs_index.
2902         Call save_clast_name_index.
2903         (translate_clast): Pass newivs_index.
2904         (gloog): Create and free newivs_index.
2906 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2908         * graphite-clast-to-gimple.c (clast_name_index): New structure.
2909         (clast_name_index_p): New type.
2910         (debug_clast_name_index): New.
2911         (debug_clast_name_indexes_1): New.
2912         (debug_clast_name_indexes): New.
2913         (clast_name_index_elt_info): New.
2914         (eq_clast_name_indexes): New.
2915         (clast_name_to_index): New.
2916         (new_clast_name_index): New.
2917         (save_clast_name_index): New.
2918         (init_sese_params_index): New.
2919         (gloog): Call init_sese_params_index.
2920         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2921         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2922         (free_sese): Free SESE_PARAMS_INDEX.
2923         * sese.h (struct sese): Add params_index.
2924         (SESE_PARAMS_INDEX): New.
2926 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2928         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2929         (graphite_create_new_loop): Pass the newivs vector.  Push the
2930         newly created IV to newivs.
2931         (translate_clast): Pass the newivs vector.
2932         (gloog): Create and destroy the newivs vector.
2934 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2936         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2937         (graphite_loop_normal_form): Initialize loop->aux with the unique
2938         IV that has been created.
2940 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
2942         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2943         scev with parameters in the base part. They where forbidden
2944         exidently.
2946 2009-05-11  Li Feng  <nemokingdom@gmail.com>
2948         * gcc.dg/graphite/graphite.exp: Set different default
2949         compile options by file names.
2950         * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2951         * gcc.dg/graphite/id-{1-9}.c: Ditto.
2952         * gcc.dg/graphite/scop-{0-20}.c: Ditto.
2953         * gcc.dg/graphite/scop-matmult.c: Ditto.
2955 2009-05-08  Li Feng <nemokingdom@gmail.com>
2957         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2958         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2959         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2960         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2962 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
2964         * graphite-scop-detection (build_scops_1): Fix little bug introduced
2965         by final cleanup.
2967 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
2969         * graphite-scop-detection.c (graphite_can_represent_scev): Only
2970         allow integer constant strides.
2971         (graphite_can_represent_expr): Depend on outermost_loop.
2972         (stmt_simple_memref_p, graphite_cannot_represent_loop,
2973         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2974         build_scops_1): Same.
2975         (scopdet_basic_block_info): Same and insert layered SCoP
2976         detection.
2977         (try_generate_gimple_bb): Cleanup.
2978         (build_scops): Enable data references.
2980         * gcc.dg/graphite/id-5.c: New.
2981         * gcc.dg/graphite/id-9.c: New.
2982         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2983         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2985 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2987         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2988         that we have not yet built for this SCoP.
2990 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2992         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2993         for complex numbers.
2995 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2997         * graphite-ppl.c: Fix build if cloog is not available.
2999 2009-05-04  Li Feng  <nemokingdom@gmail.com>
3001         * tree-parloops.c (loop_parallel_p): Remove construction of
3002         NITER and REDUCTION_LIST.
3003         (try_get_loop_niter): New.
3004         (try_create_reduction_list): New.
3005         (parallelize_loops): Bypass the failed checkings in autopar
3006         when can_be_parallel in loop structure is set to true.
3008 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
3010         * gcc.dg/graphite/id-6.c: Update testcase.
3011         * gcc.dg/graphite/scop-3.c: Dito.
3013 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
3015         * graphite-scop-detection.c (stmt_simple_for_scop_p):
3016         Enable EQ_EXPR and NE_EXPR again.
3018 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3020         * graphite-scop-detection.c (graphite_can_represent_scev):
3021         Add check if scev is affine multivariate.
3022         (harmful_stmt_in_bb): Check if we can represent the conditions.
3023         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
3024         harmful_stmt_in_bb.
3025         * gcc.dg/graphite/id-7.c: New.
3027 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3029         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
3030         Check all bbs in region, not only the bbs that are represented in
3031         GRAPHITE.
3032         (build_poly_scop): Add newline.
3033         * gcc.dg/graphite/id-8.c: New.
3035 2009-04-30  Li Feng  <nemokingdom@gmail.com>
3037         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
3038         when loop initialize.
3039         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
3040         * common.opt: Declare flag_graphite_force_parallel.
3041         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
3042         loop parallel.
3043         * graphite-poly.c (apply_poly_transforms): Introduce
3044         flag_graphite_force_parallel.
3045         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
3046         * toplev.c (process_options): ditto and replace a not correctly
3047         encoded space.
3049 2009-04-30  Li Feng  <nemokingdom@gmail.com>
3051         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
3052         Change the call of gbb_loop_at_index and/or gbb_loop_index due
3053         to the redefinition.
3054         (compute_cloog_iv_types_1): ditto.
3055         (build_iv_mapping): ditto.
3056         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
3057         initialization.
3058         (free_gimple_bb): Removed GBB_LOOPS related free part.
3059         (build_bb_loops): Removed.
3060         * sese.h (struct gimple_bb): Removed loops.
3061         (GBB_LOOPS): Removed.
3062         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
3063         (gbb_loop_index): ditto.
3065 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3067         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
3068         allow non constant strides.
3069         * gcc.dg/graphite/scop-20.c: New.
3071 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3073         * graphite-scop-detection.c (dot_all_scops): Fix system call
3074         return value warning.
3075         (dot_scop): Same.
3077 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3079         * gcc.dg/graphite/id-6.c: Fix pattern.
3080         * gcc.dg/graphite/scop-3.c: Same.
3082 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3084         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
3085         build_pairwise_constraint, dr_equality_constraints,
3086         build_pairwise_scheduling_equality,
3087         build_pairwise_scheduling_inequality, lexicographically_gt_p,
3088         build_lexicographically_gt_constraint, dependence_polyhedron,
3089         graphite_legal_transform_dr, graphite_legal_transform_bb,
3090         graphite_legal_transform): New.
3091         * graphite-poly.h (graphite_legal_transform): Declared.
3092         * graphite-sese-to-poly.c (build_poly_scop): Call to
3093         graphite_legal_transform is disabled for the moment.
3095 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3097         * graphite-poly.h (pbb_nb_scattering_dims): New.
3098         (pbb_nb_scattering): Use it.
3100 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3102         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
3103         Pointset_Powerset version of ppl_insert_dimensions.
3104         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
3106 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3108         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
3110 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3112         * graphite-poly.h: Fix comment.
3114 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3116         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
3118 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3120         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
3121         statements.
3123 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3125         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
3126         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
3127         conditions.
3129 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
3131         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
3132         handle EQ_EXPR and NE_EXPR.
3134 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
3136         * graphite-poly.h (poly_dr): Fix comment.
3138 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
3139             Tobias Grosser  <grosser@fim.uni-passau.de>
3141         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
3142         with a zero dimension polyhedron.
3143         (find_scop_parameters): Move the call to scop_set_nb_params here.
3144         (build_loop_iteration_domains): Store in loop->aux the iteration
3145         domain polyhedron.
3146         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
3147         by any loop in scop.
3148         (build_poly_scop): Do not call scop_set_nb_params.
3150 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
3151             Tobias Grosser  <grosser@fim.uni-passau.de>
3153         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
3154         add_condition_to_domain not GT_EXPR.
3156 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3158         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
3159         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
3160         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
3161         upper_bound_assign to calculate unions.
3162         * gcc.dg/graphite/id-6.c: New.
3164 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3166         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
3167         handle abnormal edges.
3169 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3171         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
3172         (free_poly_bb): Also free poly_drs.
3173         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
3174         (poly_dr): Polyhedron to Pointset_Powerset.
3175         (pdr_accessp_nb_subscripts): Same.
3176         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
3177         poly_drs.
3179 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3181         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
3182         names into more meaningful names.
3184 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3186         * gfortran.dg/graphite/interchange-1.c: New.
3187         * gfortran.dg/graphite/interchange-2.c: New.
3189 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3191         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
3192         the reduction_list.
3193         * tree-parloops.c (rewrite_phi_with_iv): New.
3194         (rewrite_all_phi_nodes_with_iv): New.
3195         (canonicalize_loop_ivs): Call them.
3197 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3199         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
3200         graphite_find_data_references_in_stmt.
3201         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
3202         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
3204 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3206         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
3208 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3210         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
3211         instead of bb_in_region.
3212         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
3213         (build_sese_conditions): Use flag_bb_in_sese.
3214         * sese.c (register_bb_in_sese): Removed.
3215         (new_sese): Remove initialization of SESE_REGION_BBS.
3216         (free_sese): Do not free SESE_REGION_BBS.
3217         * sese.h (struct sese): Remove field region_basic_blocks.
3218         (SESE_REGION_BBS): Removed.
3219         (bb_in_sese_p): Implement in function of bb_in_region.
3221 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3223         * graphite-scop-detection.c (limit_scops): Deal only with single exit
3224         loops.
3226 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3228         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
3229         and EQ_EXPR.
3230         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
3231         (add_condition_to_domain): New.
3232         (add_condition_to_pbb): New.
3233         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
3234         * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
3236 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3238         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
3239         ppl_Pointset_Powerset.
3240         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
3241         * graphite-poly.h (poly_bb): poly_bb.domain Same.
3242         (pbb_nb_loops): Same.
3243         * graphite-sese-to-poly.c (build_loop_iteration_domains,
3244         add_conditions_to_domain): Same.
3245         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
3246         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
3247         ppl_const_Polyhedron_t.
3248         (ppl_print_powerset_matrix): New.
3249         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
3250         ppl_print_powerset_matrix): New.
3251         (ppl_print_polyhedron_matrix): Updated.
3253 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
3255         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
3257 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
3259         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
3260         (print_iteration_domains, debug_iteration_domain,
3261         debug_iteration_domains): New.
3262         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
3263         debug_iteration_domains): Declared.
3264         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
3265         indenting.
3267 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
3268             Sebastian Pop  <sebastian.pop@amd.com>
3270         * graphite-poly.h (print_iteration_domain): New.
3271         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
3272         (build_sese_conditions_1, build_sese_conditions_after,
3273         build_sese_conditions_before): New.
3274         (build_sese_conditions): Rewritten.
3276 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
3277             Tobias Grosser  <grosser@fim.uni-passau.de>
3279         Cleanup of code generation liveouts.
3280         * graphite-clast-to-gimple.c (translate_clast): Use a single
3281         rename_map instead of one per translated statement.
3282         Do not use SESE_LIVEOUT_RENAMES.
3283         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
3284         (gloog): Do not use SESE_LIVEOUT_RENAMES.
3285         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
3286         phi node of a reduction: when a loop contains a reduction used outside
3287         the loop, there should be a scalar close phi node on the exit block.
3288         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
3289         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
3290         (free_sese): Do not free them.
3291         (sese_build_liveouts_use): Do not use them.
3292         (sese_build_liveouts_bb): Same.
3293         (sese_build_liveouts): Same.
3294         (sese_insert_phis_for_liveouts): Same.
3295         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
3296         (defined_in_loop_p): New.
3297         (alive_after_loop): New.
3298         (close_phi_not_yet_inserted_p): New.
3299         (struct alep, alep_p): New.
3300         (add_loop_exit_phis): Remove from the rename_map all the names defined
3301         in the code generated loop.
3302         (insert_loop_close_phis): Traverse the rename_map passed to it.
3303         Don't use SESE_LIVEOUT_RENAMES.
3304         (default_liveout_before_guard): Renamed default_before_guard.
3305         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
3306         (graphite_copy_stmts_from_block): Do not directly call set_rename.
3307         (register_sese_liveout_renames): Removed.
3308         (copy_bb_and_scalar_dependences): Do not call it.
3309         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
3310         reduction_list.
3311         (SESE_LIVEOUT): Removed.
3312         (SESE_LIVEOUT_RENAMES): Removed.
3313         (SESE_REDUCTION_LIST): Removed.
3314         (sese_build_liveouts): Removed.
3315         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
3316         (insert_loop_close_phis): Pass a htab_t instead of a sese.
3317         (insert_guard_phis): Same.
3318         (rename_map_elt): Declare a VEC of them.
3319         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3320         trees not pointers to trees.
3322         Rewrite in canonical close SSA form:
3323         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
3324         (limit_scops): Close the scop after the block containing the close phi
3325         nodes.
3326         (canonicalize_loop_closed_ssa): New.
3327         (canonicalize_loop_closed_ssa_form): New.
3328         (build_scops): Call canonicalize_loop_closed_ssa_form.
3330         * graphite-sese-to-poly.c: Fix typos.
3332 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
3334         * graphite-poly.c (print_scattering_function, print_pbb_domain):
3335         Extended.
3336         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
3337         (print_pbb): Add conditions.
3339 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
3340             Sebastian Pop  <sebastian.pop@amd.com>
3342         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
3343         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
3344         (build_scop_bbs_1): New.
3345         (build_scop_bbs): Rewrite.
3346         * sese.h (bb_in_region): New.
3348 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3350         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3351         poly_drs vector.
3352         (print_scop): Style.
3353         * graphite-poly.h (poly_bb): Add drs vector.
3354         (PBB_DRS): Add accessor.
3355         * graphite-sese-to-poly.c (build_poly_dr): New.
3356         (build_pbb_drs, build_scop_drs): New.
3357         (build_poly_scop): call build_scop_drs (Disabled at the moment).
3359 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3361         * tree-ssa-loop.c: Include forgotten toplev.h
3363 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3365         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
3366         * gcc.dg/graphite/pr37883.c: Remove -floop-*
3367         * gcc.dg/graphite/pr37928.c: Same
3368         * gcc.dg/graphite/pr38409.c: Same
3369         * gcc.dg/graphite/pr38498.c: Same
3370         * gcc.dg/graphite/pr38559.c: Same
3371         * gcc.dg/graphite/pr39335.c: Same
3372         * gcc.dg/graphite/pr39335_1.c: Same
3373         * gfortran.dg/graphite/block-2.f: Same
3374         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
3375         with -floop-*.
3377 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
3379         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
3380         build_access_matrix, build_scop_data_accesses): Remove access function
3381         building. (We get a new version soon).
3382         (build_bb_loops, scan_tree_for_params_right_scev): Update.
3383         * sese.h (nb_loops_around_loop_in_sese): Remove.
3384         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
3386 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
3387             Sebastian Pop  <sebastian.pop@amd.com>
3389         * graphite-scop-detection.c (struct scopdet_info): Rename last
3390         field to exit.
3391         (scopdet_basic_block_info, build_scops_1): Don't use
3392         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
3394 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
3395             Sebastian Pop  <sebastian.pop@amd.com>
3397         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
3398         * sese.c (sese_build_liveouts_use): Renamed from
3399         sese_build_livein_liveouts_use. Remove liveins.
3400         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
3401         Call sese_build_liveouts_use.
3402         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
3403         Call sese_build_liveouts_bb.
3404         (new_sese, free_sese): Remove liveins.
3405         (sese_add_exit_phis_var): Deleted.
3406         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
3407         directly.
3408         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
3410         * sese.h (sese): Remove num_ver and livein.
3411         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
3413 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3415         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
3417 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3419         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
3420         (build_scop_scattering): Do not use compare_prefix_loops any more.
3421         (nb_common_loops): New.
3423 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3425         * sese.c (get_new_name_from_old_name): Renamed get_rename.
3426         (register_old_and_new_names): Renamed set_rename.
3428 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3430         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
3431         of the decl from the previous commit.
3433 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3435         * graphite-scop-detection.c (dot_scop): New.
3436         * graphite-scop-detection.h (dot_scop): Declared.
3438 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3440         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
3442 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3444         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
3445         condition at the end of the loop.
3446         * graphite.c (graphite_initialize, graphite_finalize): Print to
3447         dump_file the compiled function.
3448         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
3449         of create_empty_loop_on_edge.
3450         (translate_clast): Update the code generation of loops for the new
3451         shape of loops.
3452         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
3454 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3456         Reverted the patch from 2009-03-19.
3458 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
3460         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3461         poly_drs vector.
3462         (print_scop): Style.
3463         * graphite-poly.h (poly_bb): Add drs vector.
3464         (PBB_DRS): Add accessor.
3465         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
3466         (build_access_matrix_with_af, build_access_matrix,
3467         build_scop_data_accesses): Delete.
3468         (build_poly_dr): New.
3469         (build_pbb_drs, build_scop_drs): New.
3470         (build_poly_scop): call build_scop_drs.
3472 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
3474         * graphite-scop-detection.c (dot_all_scops_1): Close the table
3475         once per basic block.
3477 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
3479         * graphite-scop-detection.c (graphite_can_represent_scev): New.
3480         (graphite_can_represent_expr): Renamed from loop_affine_expr
3481         and enhanced.
3482         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
3483         (graphite_cannot_represent_loop): Add scop_entry to parameters.
3484         (scopdet_basic_block_info): Actually define entry_block.
3485         (stmt_simple_memref_p): Moved here from ...
3487         * tree-data-ref.c (stmt_simple_memref_p): here.
3488         * tree-data-ref.h (stmt_simple_memref_p): Removed.
3490 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
3492         * gcc.dg/graphite/id-4.c: New.
3494 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
3496         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3497         (register_old_and_new_names): Update the content of the map.
3498         When there was already a rename_map_elt in the map at that
3499         location, free it.
3500         (copy_bb_and_scalar_dependences): Do rename_variables after
3501         expand_scalar_variables.
3502         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3503         of the map.  When there was already a rename_map_elt in the
3504         map at that location, free it.
3505         (translate_clast): Pass the rename_map.  Do not initialize and free
3506         a rename_map per stmt_user.
3507         (gloog): Initialize and free one rename_map and pass it to
3508         translate_clast.
3510 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
3512         * sese.c (expand_scalar_variables_stmt,
3513         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
3514         parameter.
3515         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
3516         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
3517         the gimple_stmt_iterator of the statement to be expanded.
3518         * graphite-scop-detection.c (is_simple_operand): Do handle
3519         REALPART_EXPR.
3521 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3523         * graphite-scop-detection.c (is_simple_operand): Do not handle
3524         REALPART_EXPR.
3525         * gcc.dg/graphite/id-2.c: New.
3527         * graphite-sese-to-poly.c (build_bb_loops,
3528         add_value_to_dim, scan_tree_for_params_right_scev,
3529         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
3530         find_params_in_bb, build_loop_iteration_domains,
3531         add_conditions_to_domain): Remove subtract.
3533 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3535         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
3536         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
3537         pbb_loop_at_index -> gbb_loop_at_index.
3538         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
3539         (debug_loop_vec): Delete.
3540         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
3541         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
3542         (PBB_LOOPS): Removed.
3543         (PBB_BLACK_BOX): Insert cast.
3544         (pbb_set_black_box): New setter.
3545         (pbb_loop_at_index, pbb_loop_index): Removed.
3546         (scop_set_region, scop_set_nb_params): New.
3547         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
3548         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
3549         (build_poly_scop): Use scop_set_nb_params.
3550         * sese.h (gimple_bb): Add LOOPS.
3551         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
3553 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3555         Revert previous commit.
3557 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
3559         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3560         (register_old_and_new_names): Update the content of the map.
3561         When there was already a rename_map_elt in the map at that
3562         location, free it.
3563         (copy_bb_and_scalar_dependences): Do rename_variables after
3564         expand_scalar_variables.
3565         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3566         of the map.  When there was already a rename_map_elt in the
3567         map at that location, free it.
3568         (translate_clast): Pass the rename_map.  Do not initialize and free
3569         a rename_map per stmt_user.
3570         (gloog): Initialize and free one rename_map and pass it to
3571         translate_clast.
3573 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3575         Remove forgotten line in revert.
3577 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
3579         Revert previous commit.
3581 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
3583         * sese.c (register_old_and_new_names): Update the content
3584         of the map.  When there was already a rename_map_elt in the
3585         map at that location, free it.
3586         (copy_bb_and_scalar_dependences): Do rename_variables after
3587         expand_scalar_variables.
3588         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3589         of the map.  When there was already a rename_map_elt in the
3590         map at that location, free it.
3591         (translate_clast): Pass the rename_map.  Do not initialize and free
3592         a rename_map per stmt_user.
3593         (gloog): Initialize and free one rename_map and pass it to
3594         translate_clast.
3596 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
3598         * graphite-clast-to-gimple.c (translate_clast): context_loop
3599         is never NULL.
3601 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3602             Sebastian Pop  <sebastian.pop@amd.com>
3604         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
3605         of the use of ppl_Polyhedron_map_space_dimensions.
3607 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3608             Sebastian Pop  <sebastian.pop@amd.com>
3610         * graphite-poly.c (unify_scattering_dimensions): Fix types.
3611         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
3612         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
3613         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
3614         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
3615         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
3616         pbb_nb_params): New.
3617         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
3618         nb_loops_around_pbb): Adapt return types.
3620 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3622         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3623         graphite-clast-to-gimple.o,  graphite-data-ref.o,
3624         graphite-scop-detection.o, graphite-poly.o): Add
3625         more headers.
3627 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3629         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3630         graphite-clast-to-gimple.o,  graphite-data-ref.o,
3631         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
3633 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
3635         * gcc.dg/graphite/pr37485.c: Remove -floop-block
3636         * gcc.dg/graphite/pr37828.c: Same.
3637         * gcc.dg/graphite/pr37684.c: Same.
3638         * gcc.dg/graphite/block-0.c: Same.
3639         * gcc.dg/graphite/block-1.c: Same.
3640         * gcc.dg/graphite/block-2.c: Same.
3641         * gcc.dg/graphite/block-3.c: Same.
3642         * gcc.dg/graphite/block-4.c: Same.
3643         * gcc.dg/graphite/block-5.c: Same.
3644         * gcc.dg/graphite/block-6.c: Same.
3645         * gfortran.dg/graphite/pr38083.f90: Same.
3646         * gfortran.dg/graphite/block-1.f90: Same.
3647         * gfortran.dg/graphite/block-3.f90: Same.
3648         * gfortran.dg/graphite/pr37852.f90: Same.
3649         * gfortran.dg/graphite/block-4.f90: Same.
3650         * gfortran.dg/graphite/pr37980.f90: Same.
3651         * gfortran.dg/graphite/pr38953.f90: Same.
3652         * gfortran.dg/graphite/pr37857.f90: Same.
3653         * opts.c: Remove -floop-block from -O2.
3654         * graphite-poly.c: Fail if -floop-block -floop-interchange or
3655         -floop-strip-mine are used.
3657 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
3658             Sebastian Pop  <sebastian.pop@amd.com>
3660         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
3661         dimensions.
3662         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
3663         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
3664         strip_mine_profitable_p, is_interchange_valid,
3665         graphite_trans_bb_block, graphite_trans_loop_block,
3666         graphite_trans_scop_block): Temporary removed.
3667         (extend_scattering, unify_scattering_dimensions): New.
3668         (print_scattering_function, graphite_read_transforms):
3669         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3670         (graphite_generate_scattering_fns): Removed.
3671         (apply_poly_transforms): Cleanup.
3672         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3673         (schedule_to_scattering): Moved.
3674         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
3675         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
3676         (pbb_nb_scattering): New.
3677         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3678         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
3679         Removed.
3680         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
3681         shift_poly.
3682         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3683         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
3684         -> PBB_TRANSFORMED_SCATTERING.
3685         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
3686         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
3687         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
3688         (check_poly_representation): Do not return bool.
3689         (graphite_transform_loops): Reformat.
3690         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
3692 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
3694         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
3695         debug_pbb_domain, debug_pbb, debug_scop): New.
3696         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
3697         debug_pbb_domain, debug_pbb, debug_scop): Declared.
3699 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
3701         PR middle-end/39335
3702         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
3703         when the type precision of the induction variable should be
3704         larger than the type precision of nit.
3705         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
3706         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
3707         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
3709         * gcc.dg/graphite/pr39335_1.c: New.
3710         * gcc.dg/graphite/pr39335.c: New.
3712 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
3714         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3715         SSA_NAMES not struct reduction_info.
3717 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
3719         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
3721 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
3722             Tobias Grosser  <grosser@fim.uni-passau.de>
3724         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
3725         (free_sese): Free SESE_REDUCTION_LIST.
3726         * sese.h (struct sese): Add field reduction_list.
3727         (SESE_REDUCTION_LIST): New.
3728         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
3729         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
3731 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
3732             Tobias Grosser  <grosser@fim.uni-passau.de>
3734         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
3735         of loop_p.
3737 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
3738             Tobias Grosser  <grosser@fim.uni-passau.de>
3740         * tree-parloops.c (struct brli, build_reduction_list_info,
3741         analyze_reduction_list, gather_scalar_reductions): New.
3742         (loop_parallel_p): Build a reduction list containing only
3743         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
3744         (gen_parallel_loop): Call the analysis analyze_reduction_list.
3745         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
3746         * tree-flow.h (gather_scalar_reductions): Declared.
3748 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
3750         PR middle-end/39308
3751         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
3752         number_of_iterations_exit from a gcc_assert.
3754 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
3755             Jan Sjodin  <jan.sjodin@amd.com>
3757         * output.h (graphite_out_file, graphite_in_file): Declared.
3758         * toplev.c (graphite_out_file, graphite_in_file): New.
3759         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
3760         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
3761         Don't call schedule_to_scattering.
3762         * common.opt (fgraphite-write, fgraphite-read): New.
3763         * graphite-poly.c: Include output.h.
3764         (print_scattering_function, print_scattering_functions,
3765         debug_scattering_function, debug_scattering_functions,
3766         graphite_write_transforms, graphite_read_transforms,
3767         graphite_generate_scattering_fns): New.
3768         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
3769         Call graphite_generate_scattering_fns, graphite_write_transforms,
3770         graphite_read_transforms.
3771         (new_poly_bb): Initialize PBB_SCATTERING.
3772         (free_poly_bb): Free PBB_SCATTERING.
3773         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
3774         * graphite-poly.h (struct poly_bb): Add field scattering.
3775         (PBB_SCATTERING): New.
3776         (print_scattering_function, print_scattering_functions,
3777         debug_scattering_function, debug_scattering_functions): Declared.
3778         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
3779         GMP values, not integers!
3780         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
3781         ppl_read_polyhedron_matrix): New.
3782         * graphite-ppl.h (ppl_print_polyhedron_matrix,
3783         debug_ppl_polyhedron_matrix,
3784         ppl_read_polyhedron_matrix): Declared.
3785         * Makefile.in (graphite-poly.o): Depends on output.h.
3787 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3788             Tobias Grosser  <grosser@fim.uni-passau.de>
3790         Revert this change:
3791         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3792         scalar evolutions in the scop_entry->loop_father.
3794 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3795             Tobias Grosser  <grosser@fim.uni-passau.de>
3797         * graphite.h (ref_nb_loops): Remove declaration.
3798         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
3799         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
3800         debug_gbb): Moved to sese.h.
3801         * sese.h: As said.
3803 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3804             Tobias Grosser  <grosser@fim.uni-passau.de>
3806         * graphite-data-ref.[ch]: Disable.
3808 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3809             Tobias Grosser  <grosser@fim.uni-passau.de>
3811         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3812         scalar evolutions in the scop_entry->loop_father.
3814 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3816         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
3817         (graphite_cannot_represent_loop_niter): Renamed
3818         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
3819         (limit_scops): build_sese_loop_nests does not return a bool.
3820         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
3821         * sese.c (nb_reductions_in_loop): ... from here.
3822         (graphite_loop_normal_form): ... from here.
3823         (sese_record_loop): Does not fail, so does not return a bool.
3824         (build_sese_loop_nests): Same.
3825         * sese.h (build_sese_loop_nests): Update declaration.
3826         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
3827         (build_graphite_loop_normal_form): New.
3828         (gloog): Call build_graphite_loop_normal_form.
3829         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
3830         build_sese_loop_nests.
3832         * gcc.dg/graphite/id-1.c: New.
3834 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3835             Tobias Grosser  <grosser@fim.uni-passau.de>
3837         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
3838         The SCoP detection fix is sufficient.
3840 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
3842         PR tree-optimization/39260
3843         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
3844         the basic block contains a condition with a real type.
3845         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
3847         * gcc.dg/graphite/pr39260.c: New.
3849 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
3851         * graphite-poly.c: Inlcude params.h.
3852         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
3853         the size of a tile.
3854         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
3855         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
3857 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
3858             Tobias Grosser  <grosser@fim.uni-passau.de>
3860         * graphite-scop-detection.c (dot_all_scops_1,
3861         dot_all_scops): Moved here.
3862         * graphite-scop-detection.h (dot_all_scops): Declared here.
3863         * graphite.c (graphite_initialize, graphite_finalize): New.
3864         (graphite_transform_loops): Cleaned up.
3865         * sese.c (debug_oldivs): Moved here.
3866         * graphite-poly.c (graphite_apply_transformations): Renamed
3867         apply_poly_transforms.
3868         (debug_loop_vec): Moved here.
3869         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
3870         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
3871         find_scop_parameters, build_scop_iteration_domain,
3872         add_conditions_to_constraints, build_scop_canonical_schedules,
3873         build_scop_data_accesses): Now static.
3874         (build_poly_scop, check_poly_representation): New.
3876 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
3878         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
3879         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
3880         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
3881         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
3882         scan_tree_for_params_right_scev, scan_tree_for_params_int,
3883         scan_tree_for_params, struct irp_data, dx_record_params,
3884         find_params_in_bb, find_scop_parameters, gbb_from_bb,
3885         build_loop_iteration_domains, add_conditions_to_domain,
3886         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
3887         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
3888         build_sese_conditions, add_conditions_to_constraints,
3889         build_scop_iteration_domain, build_access_matrix_with_af,
3890         build_access_matrix,
3891         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
3893         * graphite-sese-to-poly.c: New.
3894         * graphite-sese-to-poly.h: New.
3896         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3898 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
3900         * graphite.c: Split graphite code generation to a new file.
3901         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3902         max_precision_type, clast_to_gcc_expression_red,
3903         clast_to_gcc_expression, gcc_type_for_clast_expr,
3904         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3905         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3906         graphite_create_new_guard, clast_get_body_of_loop,
3907         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3908         graphite_create_new_loop, build_iv_mapping, copy_renames,
3909         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3910         compute_cloog_iv_types, free_scattering, save_var_name,
3911         initialize_cloog_names, build_scop_context, build_cloog_prog,
3912         set_cloog_options, debug_clast_stmt, scop_to_clast,
3913         print_generated_program, debug_generated_program,
3914         gloog): Moved to graphite-clast-to-gimple.c.
3916         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3918         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3919         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3920         loop_iv_stack_pop, loop_iv_stack_get_iv,
3921         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3922         free_loop_iv_stack, loop_iv_stack_remove_constants,
3923         debug_rename_elt, debug_rename_map_1, debug_rename_map,
3924         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3925         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3926         eq_ivtype_map_elts, sese_add_exit_phis_edge,
3927         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3928         get_vdef_before_sese, sese_adjust_vphi,
3929         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3930         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3931         is_iv, expand_scalar_variables_ssa_name,
3932         expand_scalar_variables_expr, expand_scalar_variables_stmt,
3933         expand_scalar_variables, rename_variables, remove_condition,
3934         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3935         add_loop_exit_phis, insert_loop_close_phis, struct igp,
3936         default_liveout_before_guard, add_guard_exit_phis,
3937         insert_guard_phis, register_old_and_new_names,
3938         graphite_copy_stmts_from_block, register_sese_liveout_renames,
3939         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3940         if_region_set_false_region, create_if_region_on_edge,
3941         move_sese_in_condition): Moved to sese.c.
3943         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3944         if_region_exit, if_region_get_condition_block,
3945         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3946         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3947         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3948         ivtype_map_elt, new_ivtype_map_elt,
3949         recompute_all_dominators): Moved to sese.h.
3951         * graphite-clast-to-gimple.c: New.
3952         * graphite-clast-to-gimple.h: New.
3953         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3954         * sese.c: Modified as said above.
3955         * sese.h: Same.
3957 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
3959         * graphite.c: Split scop detection to a new file.
3960         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3961         move_sd_regions, loop_affine_expr, exclude_component_ref,
3962         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3963         graphite_cannot_represent_loop_niter, struct scopdet_info,
3964         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3965         find_single_entry_edge, find_single_exit_edge,
3966         create_single_entry_edge, sd_region_without_exit,
3967         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3968         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3969         Moved to graphite-scop-detection.c.
3971         * graphite-scop-detection.c: New.
3972         * graphite-scop-detection.h: New.
3973         * Makefile.in: Add new rule for graphite-scop-detection.o.
3975         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3976         tree-scalar-evolution.h.
3977         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3978         build_sese_loop_nests): Moved here from graphite.c.
3979         (param_index): Renamed parameter_index_in_region.
3981 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3982             Sebastian Pop  <sebastian.pop@amd.com>
3984         * gcc.dg/graphite/block-0.c: Expected to fail now.
3985         * gcc.dg/graphite/block-1.c: Same.
3986         * gcc.dg/graphite/block-5.c: Same.
3987         * gcc.dg/graphite/block-6.c: Same.
3989 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3990             Sebastian Pop  <sebastian.pop@amd.com>
3992         * graphite.h: Separate from graphite_bb_p the polyhedral
3993         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3994         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3995         graphite-data-ref.h.
3996         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3997         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3998         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3999         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4000         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
4001         scop_nb_params): Moved to graphite-poly.h.
4002         * graphite-data-ref.c: Same.
4003         * graphite-data-ref.h: New.
4004         * graphite.c: Same.
4005         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
4006         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
4007         is_interchange_valid, graphite_trans_bb_block,
4008         graphite_trans_loop_block, scop_max_loop_depth,
4009         graphite_trans_scop_block, graphite_apply_transformations,
4010         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
4011         graphite-poly.c.
4012         * graphite-poly.h: New.
4013         * graphite-poly.c: New.
4014         * Makefile.in (OBJS-common): Add graphite-poly.o.
4015         (graphite-poly.o): New rule.
4016         * tree-data-ref.h (struct data_reference): Remove unused scop field.
4017         (DR_SCOP): Removed.
4019 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
4020             Tobias Grosser  <grosser@fim.uni-passau.de>
4022         * graphite.c: Replace gb -> gbb.
4023         * graphite.h: Same.
4024         * graphite-data-ref.c: Same.
4026 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
4027             Tobias Grosser  <grosser@fim.uni-passau.de>
4029         * Makefile.in (OBJS-commmon): Add sese.o.
4030         (sese.o): New.
4031         (graphite.o): Add sese.h.
4032         * graphite.c (bb_in_ss_p, loop_in_sese_p,
4033         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
4034         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
4035         Move to sese.
4036         (block_before_scop): Add missing return.
4037         (new_scop, free_scop): Remove SESE data structures.
4038         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
4039         find_scop_parameters, build_loop_iteration_domains,
4040         add_conditions_to_domain, register_scop_liveout_renames,
4041         copy_bb_and_scalar_dependences): Scop -> SESE.
4043         (add_conditions_to_domain): SCoP -> SESE and remove check
4044         (scop_contains_non_iv_scalar_phi_nodes): New.
4045         (build_scop_conditions_1, build_scop_conditions): Remove check for
4046         non iv scalar phi nodes.
4047         (print_scop_statistics): New.
4048         (graphite_transform_loops): Cleanup.
4050         * graphite.h: Move to sese & cleanup.
4051         * sese.c: New.
4052         * sese.h: New.
4054 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
4055             Tobias Grosser  <grosser@fim.uni-passau.de>
4057         * graphite.c (build_scop_conditions_1): Conditions are only
4058         at the end of a basic block.
4060 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
4061             Tobias Grosser  <grosser@fim.uni-passau>
4063         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
4064         field.
4065         (GBB_ALPHA): Removed.
4067 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
4068             Tobias Grosser  <grosser@fim.uni-passau.de>
4070         * graphite-data-ref.c (graphite_test_dependence): Don't use
4071         GBB_DYNAMIC_SCHEDULE.
4072         * graphite.c (new_graphite_bb): Same.
4073         (free_graphite_bb): Same.
4074         (build_scop_dynamic_schedules): Removed.
4075         (graphite_transform_loops): Don't call it.
4076         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
4077         (GBB_DYNAMIC_SCHEDULE): Removed.
4079 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
4080             Tobias Grosser  <grosser@fim.uni-passau.de>
4082         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
4083         (print_graphite_bb): Same.
4084         (build_cloog_prog): Same.
4086 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
4087             Tobias Grosser  <grosser@fim.uni-passau.de>
4089         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
4091 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
4092             Tobias Grosser  <grosser@fim.uni-passau.de>
4094         * graphite.c (build_scop_context): Don't use CloogMatrix.
4095         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
4096         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
4098 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
4099             Tobias Grosser  <grosser@fim.uni-passau.de>
4101         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
4102         liveout_renames, add_params fields...
4103         (struct sese): ... here.
4104         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
4105         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
4107 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
4108             Tobias Grosser  <grosser@fim.uni-passau.de>
4110         * graphite.c (print_scop): Do not print the CLooG program.
4111         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
4112         build_cloog_prog, gloog): Don't use SCOP_PROG.
4113         (find_transform): Renamed scop_to_clast.
4114         (print_generated_program, debug_generated_program): New.
4115         (graphite_transform_loops): Adapt to new interface.
4116         * graphite.h (struct scop): Remove program field.
4117         (SCOP_PROG): Removed.
4118         (print_generated_program, debug_generated_program): Declared.
4120 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
4122         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
4123         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
4124         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
4125         free_graphite_bb, build_scop_canonical_schedules,
4126         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
4127         schedules are now represented using a ppl_Linear_Expression_t.
4128         * graphite.h (struct graphite_bb): Same.
4129         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
4130         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
4132 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
4134         * graphite.c: Free local memory.
4135         * graphite-ppl.c: Same.
4137 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
4139         * graphite.c (const_column_index, get_first_matching_sign_row_index,
4140         get_lower_bound_row, get_upper_bound_row, copy_constraint,
4141         swap_constraint_variables, scale_constraint_variable): Removed.
4142         (graphite_trans_bb_strip_mine): Remove pong.
4143         * graphite-ppl.c: Include missing header files.
4144         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
4145         * graphite-ppl.h (ppl_strip_loop): Declared.
4146         * Makefile.in (graphite-ppl.o): Adjust dependences.
4148 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
4150         * graphite.c (build_loop_iteration_domains): Remove ping pong.
4151         (build_scop_iteration_domain): Same.
4153 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
4155         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
4156         ping pong.
4157         (add_value_to_dim, scan_tree_for_params_right_scev,
4158         scan_tree_for_params_int): New.
4159         * graphite-ppl.c (oppose_constraint): New.
4160         (insert_constraint_into_matrix): Implement missing cases.
4161         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
4163 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
4165         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
4166         use ppl_move_dimension.
4168 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
4170         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
4171         * graphite.c: Same.
4172         * graphite.h: Same.
4173         * graphite-ppl.c: Same.
4174         * graphite-ppl.h: Same.
4176 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
4178         Revert last 3 commits.
4180 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
4182         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
4183         ping pong.
4184         (add_value_to_dim, scan_tree_for_params_right_scev,
4185         scan_tree_for_params_int): New.
4186         * graphite-ppl.c (oppose_constraint): New.
4187         (insert_constraint_into_matrix): Implement missing cases.
4188         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
4190 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
4192         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
4194 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
4195             Tobias Grosser  <grosser@fim.uni-passau.de>
4197         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
4198         use ppl_move_dimension.
4199         * graphite-ppl.c (ppl_move_dimension): New.
4200         * graphite-ppl.h (ppl_move_dimension): Declared.
4202 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
4204         * graphite.c: Do not include cloog/cloog.h.
4205         (print_graphite_bb): Remove ping pong, call PPL print function.
4207 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4209         * Makefile.in (OBJS-common): Add graphite-ppl.o.
4210         (graphite.o): Add dependence on graphite-ppl.h.
4211         (graphite-ppl.o): New.
4212         (graphite-data-ref.c): Ping pong between PPL data structures
4213         and matrices.
4214         * graphite-ppl.c: New.
4215         * graphite-ppl.h: New.
4216         * graphite.c: Include graphite-ppl.h.
4217         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
4218         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
4219         Ping pong between PPL data structures and matrices.
4220         (new_graphite_bb): Create a PPL constraint system.
4221         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
4222         (build_loop_iteration_domains): Use PPL functions.
4223         * graphite.h: Include graphite-ppl.h.  Fix comments.
4224         (graphite_bb): Use a ppl_Constraint_System_t instead of
4225         CloogMatrix for representing the domain.
4226         (scop): Remove static_schedule.
4227         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
4229 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
4231         * graphite.c: Fix some comments.
4233 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
4235         PR middle-end/38953
4236         * graphite.c (if_region_set_false_region): After moving a region
4237         in the false branch of a condition, remove the empty dummy
4238         basic block.
4239         (gloog): Remove wrong fix for PR38953.
4241 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
4243         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
4244         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
4245         register_bb_in_sese, new_sese, free_sese): Moved.
4246         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
4247         outermost_loop_in_scop, build_scop_iteration_domain,
4248         expand_scalar_variables_ssa_name, get_vdef_before_scop,
4249         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
4250         Use loop_in_sese_p instead of loop_in_scop_p.
4251         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
4252         (free_scop): Do not free SCOP_BBS_B.
4253         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
4254         ref_nb_loops): Moved here...
4255         * graphite.h (ref_nb_loops): ... from here.
4256         (struct scop): Remove bbs_b bitmap.
4257         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
4258         * gcc.dg/graphite/scop-19.c: New
4260 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
4262         * graphite.c (scopdet_basic_block_info): Fix bug in scop
4263         detection.
4265 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4267         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4268         eq_loop_to_cloog_loop): Remove.
4269         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
4270         * graphite.h (struct scop): Remove loop2cloog_loop.
4271         (loop_domain_dim, loop_iteration_vector_dim): Remove.
4273 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4275         * opts.c (decode_options): Only add graphite options to O2
4276         if we compile with graphite enabled.
4278 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
4280         * Merge from mainline (r143163:143684).
4282 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
4284         * graphite.c (debug_value): Removed.
4285         * graphite.h (debug_value): Removed.
4287 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
4289         * passes.c (init_optimization_passes): Do not call pass_copy_prop
4290         after graphite: pass_copy_prop does not maintain a proper loop closed
4291         SSA form.  pass_copy_prop should be fixed.
4293 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
4295         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
4297 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
4299         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
4300         (gloog): Split the exit of the scop when the scop exit is a loop exit.
4301         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
4302         changed the CFG.
4304 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
4306         * graphite.c (gloog): Return true when code gen succeeded.
4307         (graphite_transform_loops): Do not call cleanup_tree_cfg if
4308         the code of the function did not changed.  After cleanup_tree_cfg
4309         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
4310         form.
4312 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
4314         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
4315         gimple_call_lhs is NULL.
4317 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
4318             Tobias Grosser  <tobi.grosser@amd.com>
4320         * graphite.c (graphite_trans_scop_block): Do not block single
4321         nested loops.
4323 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
4324             Tobias Grosser  <tobi.grosser@amd.com>
4326         * graphite.c (build_scop_canonical_schedules): Start schedules at
4327         zero.
4329 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
4330             Tobias Grosser  <tobi.grosser@amd.com>
4332         * graphite.c (compare_prefix_loops): New.
4333         (build_scop_canonical_schedules): Rewritten.
4334         (graphite_transform_loops): Move build_scop_canonical_schedules
4335         after build_scop_iteration_domain.
4337 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
4338             Tobias Grosser  <tobi.grosser@amd.com>
4340         * graphite.c (add_conditions_to_domain): Add the loops to
4341         the dimension of the iteration domain.  Do copy the domain
4342         only when it exists.
4343         (build_scop_conditions_1): Do not call add_conditions_to_domain.
4344         (add_conditions_to_constraints): New.
4345         (can_generate_code_stmt, can_generate_code): Removed.
4346         (gloog): Do not call can_generate_code.
4347         (graphite_transform_loops): Call add_conditions_to_constraints
4348         after building the iteration domain.
4350 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
4351             Tobias Grosser  <tobi.grosser@amd.com>
4352             Jan Sjodin  <jan.sjodin@amd.com>
4354         * graphite.c (scan_tree_for_params): On substractions negate
4355         all the coefficients of the term.
4356         (clast_to_gcc_expression_red): New.  Handle reduction expressions
4357         of more than two operands.
4358         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
4359         (get_vdef_before_scop): Handle also the case of default definitions.
4361 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
4363         PR middle-end/38431
4364         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
4365         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
4366         (gloog): Do not call cleanup_tree_cfg.
4367         (graphite_transform_loops): Call cleanup_tree_cfg after all
4368         scops have been code generated.
4370 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
4372         * passes.c (init_optimization_passes): Schedule after
4373         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
4375 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
4377         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
4378         Fix comment.
4379         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
4380         Set the type of an expression to the type of its assign statement.
4381         (expand_scalar_variables_expr):  Do not pass loop_p.
4382         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
4383         (copy_bb_and_scalar_dependences): Do not pass loop_p.
4384         (translate_clast): Update call to copy_bb_and_scalar_dependences.
4386 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
4388         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
4389         an expression to the gimple_expr_type of its assign statement.
4390         (expand_scalar_variables_expr): Stop recursion on tcc_constant
4391         or tcc_declaration.
4393 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
4395         PR tree-optimization/38786
4396         * gcc.dg/graphite/pr38786.c: New.
4397         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
4398         the SSA_NAME case of expand_scalar_variables_expr.
4399         (expand_scalar_variables_expr): Also gather the scalar computation
4400         used to index the memory access.
4401         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
4402         the gimple_stmt_iterator where it inserts new code.
4404 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
4406         * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
4408 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
4410         * opts.c (decode_options): Enable flag_graphite_identity and
4411         flag_loop_block in -O2 and above.
4413 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
4415         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
4416         Fix merge problem: replace with the file from trunk.
4418 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
4420         * Merge from mainline (r141727:143163).
4422 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
4423             Jan Sjodin  <jan.sjodin@amd.com>
4425         PR tree-optimization/38559
4426         * gcc.dg/graphite/pr38559.c: New.
4428         * graphite.c (debug_value, copy_constraint,
4429         swap_constraint_variables, scale_constraint_variable, ): New.
4430         (get_lower_bound, get_upper_bound): Removed.
4431         (graphite_trans_bb_strip_mine): Clean up this code that works
4432         only for constant number of iterations.  Fully copy upper and
4433         lower bound constraints, not only the constant part of them.
4434         * graphite.h (debug_value): Declared.
4436 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
4438         PR tree-optimization/38492
4439         PR tree-optimization/38498
4440         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
4441         * tree-chrec.h (scev_is_linear_expression): Declared.
4442         * graphite.c (graphite_cannot_represent_loop_niter): New.
4443         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
4444         (graphite_loop_normal_form): Use gcc_assert.
4445         (scan_tree_for_params): Use CASE_CONVERT.
4446         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
4447         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
4448         Use gcc_assert.  Discard scops that contain unhandled cases.
4449         (build_scop_conditions): Return a boolean status for unhandled cases.
4450         (strip_mine_profitable_p): Print the loop number, not its depth.
4451         (is_interchange_valid): Pass the depth of the loop nest, don't
4452         recompute it wrongly.
4453         (graphite_trans_bb_block): Same.
4454         (graphite_trans_bb_block): Print tentative of loop blocking.
4455         (graphite_trans_scop_block): Do not print that the loop has been
4456         blocked.
4457         (graphite_transform_loops): Do not handle scops that contain condition
4458         scalar phi nodes.
4460         * gcc.dg/graphite/pr38500.c: Fixed warning as committed
4461         in trunk.
4462         * gcc.dg/graphite/block-0.c: Update test.
4463         * gcc.dg/graphite/block-1.c: Same.
4464         * gcc.dg/graphite/block-2.c: Remove xfail and test for
4465         blocking.
4466         * gcc.dg/graphite/block-4.c: Remove test for strip mine.
4467         * gcc.dg/graphite/block-3.c: New.
4468         * gcc.dg/graphite/pr38498.c: New.
4470 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
4472         PR tree-optimization/38510
4473         * gcc.dg/graphite/pr38510.c: New.
4474         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
4475           (translate_clast): Call recompute_all_dominators before
4476           graphite_verify.
4477           (gloog): Call recompute_all_dominators before graphite_verify.
4479 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
4481         PR tree-optimization/38492
4482         * graphite.c (rename_map_elt, debug_rename_elt,
4483         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
4484         rename_map_elt_info, eq_rename_map_elts,
4485         get_new_name_from_old_name, bb_in_sese_p): Moved around.
4486         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
4487         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
4488         (sese_build_livein_liveouts): New.
4489         (new_sese, free_sese): New.
4490         (new_scop): Call new_sese.
4491         (free_scop): Call free_sese.
4492         (rename_variables_from_edge, rename_phis_end_scop): Removed.
4493         (register_old_new_names): Renamed register_old_and_new_names.
4494         (register_scop_liveout_renames, add_loop_exit_phis,
4495         insert_loop_close_phis, struct igp,
4496         default_liveout_before_guard, add_guard_exit_phis,
4497         insert_guard_phis, copy_renames): New.
4498         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
4499         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
4500         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
4501         (scop_adjust_phis_for_liveouts): New.
4502         (gloog): Call scop_adjust_phis_for_liveouts.
4504         * graphite.h (struct sese): Documented.  Added fields liveout,
4505         num_ver and livein.
4506         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
4507         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
4508         (struct scop): Added field liveout_renames.
4509         (SCOP_LIVEOUT_RENAMES): New.
4511 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
4513         PR tree-optimization/38409
4514         * gcc.dg/graphite/pr38409.c: New.
4515         * graphite.c (nb_reductions_in_loop): Use simple_iv.
4517 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
4519         * graphite.c (gcc_type_for_cloog_iv): By default return
4520         integer_type_node.
4521         (graphite_create_new_loop): Don't fold_convert the already
4522         fold_convert-ed expression.
4524 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
4526         PR tree-optimization/38446
4527         * gcc.dg/graphite/pr38446.c: New.
4528         * graphite.c (register_bb_in_sese): New.
4529         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
4530         looking at the bbs in the region.
4531         * graphite.h (sese): Add region_basic_blocks pointer set to
4532         structure and initialize at the time of defining new scop.
4534 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4536         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
4537         (find_params_in_bb): Do not free data refs.
4538         (free_graphite_bb): Add FIXME on disabled free_data_refs.
4540 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
4542         * gcc.dg/graphite/scop-16.c: Test only scop specific info.
4543         * gcc.dg/graphite/scop-17.c: Same.
4544         * gcc.dg/graphite/block-5.c: New.
4545         * gcc.dg/graphite/block-6.c: New.
4546         * gcc.dg/graphite/pr37485.c: Clean dump file after.
4547         * gcc.dg/graphite/pr37684.c: Same.
4548         * gcc.dg/graphite/block-2.c: Same.
4550         * graphite.c (struct ivtype_map_elt): New.
4551         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
4552         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
4553         gcc_type_for_cloog_iv): New.
4554         (loop_iv_stack_patch_for_consts): Use the type of the induction
4555         variable from the original loop, except for the automatically
4556         generated loops, i.e., in the case of a strip-mined loop, in
4557         which case there is no original loop: in that case just use
4558         integer_type_node.
4559         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
4560         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
4561         (clast_name_to_gcc): Accept params to be NULL.
4562         (clast_to_gcc_expression): Take an extra parameter for the type.
4563         Convert to that type all the expressions built by this function.
4564         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
4565         (graphite_translate_clast_equation): Compute the type of the
4566         clast_equation before translating its LHS and RHS.
4567         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
4568         (graphite_create_new_loop): Compute the type of the induction
4569         variable before translating the lower and upper bounds and before
4570         creating the induction variable.
4571         (rename_variables_from_edge, rename_phis_end_scop): New.
4572         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
4573         (sese_add_exit_phis_edge): Do not use integer_zero_node.
4574         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4575         compute_cloog_iv_types): New.
4576         (gloog): Call compute_cloog_iv_types before starting the
4577         translation of the clast.
4579         * graphite.h (struct graphite_bb): New field cloog_iv_types.
4580         (GBB_CLOOG_IV_TYPES): New.
4581         (debug_ivtype_map): Declared.
4582         (oldiv_for_loop): New.
4584 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4586         PR middle-end/38459
4587         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
4588         (param_index): Assert if parameter is not know after parameter
4589         detection.
4590         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
4591         (find_scop_parameters): Mark, that we have finished parameter
4592         detection.
4593         (graphite_transform_loops): Move condition detection before parameter
4594         detection.
4595         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
4596         * gfortran.dg/graphite/pr38459.f90: New.
4598 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4600         * graphite.c (graphite_transform_loops): Always call find_transform ()
4601         in ENABLE_CHECKING.  So we test these code paths, even if we do not
4602         generate code.
4604 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4606         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
4607         (print_scop): Ditto.
4609 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4611         PR middle-end/38084
4612         Fix gfortran.dg/graphite/id-3.f90.
4613         * graphite.c (scopdet_basic_block_info): Fix bug that found some
4614         regions more than once.
4616 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
4618         Fix gfortran.dg/graphite/id-4.f90.
4619         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
4620         when not needed.
4622 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
4624         Fix gfortran.dg/graphite/id-1.f90.
4625         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
4626         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
4627         (max_precision_type): New.
4628         (value_clast): Removed.
4629         (clast_to_gcc_expression): Be more careful to types of expressions.
4630         Use max_precision_type and update use of gmp_cst_to_tree.
4631         (graphite_translate_clast_equation): Use max_precision_type.
4632         (graphite_create_guard_cond_expr): Do not use integer_type_node,
4633         use the type of the condition.
4634         (graphite_create_new_loop): Do not use integer_type_node, use the
4635         max_precision_type of lb and ub.
4637 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
4639         * graphite.c (build_scops_1): Initialize open_scop.exit
4640         and sinfo.last.
4642 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
4644         * gcc.dg/graphite/pr38084.c: New.
4645         * gfortran.dg/graphite/id-1.f90: New.
4646         * gfortran.dg/graphite/id-2.f90: New.
4647         * gfortran.dg/graphite/id-3.f90: New.
4648         * gfortran.dg/graphite/id-4.f90: New.
4649         * gfortran.dg/graphite/pr37857.f90: New.
4651 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
4652             Jan Sjodin  <jan.sjodin@amd.com>
4653             Harsha Jagasia  <harsha.jagasia@amd.com>
4655         PR middle-end/37852
4656         PR middle-end/37883
4657         PR middle-end/37928
4658         PR middle-end/37980
4659         PR middle-end/38038
4660         PR middle-end/38039
4661         PR middle-end/38073
4662         PR middle-end/38083
4663         PR middle-end/38125
4665         * gcc.dg/graphite/pr38073.c: New.
4666         * gcc.dg/graphite/pr37928.c: New.
4667         * gcc.dg/graphite/pr37883.c: New.
4668         * gcc.dg/graphite/pr38125.c: New.
4669         * gfortran.dg/graphite/pr38083.f90: New.
4670         * gfortran.dg/graphite/pr37852.f90: New.
4671         * gfortran.dg/graphite/pr37980.f90: New.
4673         * gcc.dg/graphite/scop-18.c: Remove reduction, test for
4674         the number of detected scops.  Copy exact same test for loop
4675         blocking...
4676         * gcc.dg/graphite/block-1.c: Fix the number of expected
4677         loops to be blocked as reductions are not handled.
4678         * gcc.dg/graphite/block-4.c: ...here.  New.
4680         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
4681         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
4682         ...here.
4683         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
4684         * Makefile.in (graphite.o): Depend on value-prof.h.
4685         (graphite.o-warn): Removed -Wno-error.
4686         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
4687         to be a NULL pointer.  Call update_stmt.  Return the newly created
4688         cannonical induction variable.
4690         * graphite.h (debug_rename_map): Declared.  Fix some comments.
4692         * graphite.c: Reimplement the code generation from graphite to gimple.
4693         Include value-prof.h.
4694         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
4695         (get_old_iv_from_ssa_name): Removed.
4696         (graphite_stmt_p): New.
4697         (new_graphite_bb): Test for useful statements before building a
4698         graphite statement for the basic block.
4699         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
4700         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
4701         reason.
4702         (recompute_all_dominators, graphite_verify,
4703         nb_reductions_in_loop, graphite_loop_normal_form): New.
4704         (scop_record_loop): Call graphite_loop_normal_form.
4705         (build_scop_loop_nests): Iterate over all the blocks of the
4706         function instead of relying on the incomplete information from
4707         SCOP_BBS.  Return the success of the operation.
4708         (find_params_in_bb): Use the data from GBB_DATA_REFS.
4709         (add_bb_domains): Removed.
4710         (build_loop_iteration_domains): Don't call add_bb_domains.
4711         Add the iteration domain only to the basic blocks that have been
4712         translated to graphite.
4713         (build_scop_conditions_1): Add constraints only if the basic
4714         block have been translated to graphite.
4715         (build_scop_data_accesses): Completely disabled until data
4716         dependence is correctly implemented.
4717         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
4718         (remove_all_edges_1, remove_all_edges): Removed.
4719         (get_new_name_from_old_name): New.
4720         (graphite_rename_variables_in_stmt): Renamed
4721         rename_variables_in_stmt.  Call get_new_name_from_old_name.
4722         Use replace_exp and update_stmt.
4723         (is_old_iv): Renamed is_iv.
4724         (expand_scalar_variables_stmt): Extra parameter for renaming map.
4725         Use replace_exp and update_stmt.
4726         (expand_scalar_variables_expr): Same.  Use the map to get the
4727         new names for the renaming of induction variables and for the
4728         renaming of variables after a basic block has been copied.
4729         (expand_scalar_variables): Same.
4730         (graphite_rename_variables): Renamed rename_variables.
4731         (move_phi_nodes): Removed.
4732         (get_false_edge_from_guard_bb): New.
4733         (build_iv_mapping): Do not insert the induction variable of a
4734         loop in the renaming iv map if the basic block does not belong
4735         to that loop.
4736         (register_old_new_names, graphite_copy_stmts_from_block,
4737         copy_bb_and_scalar_dependences): New.
4738         (translate_clast): Heavily reimplemented: copy basic blocks,
4739         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
4740         At each translation step call graphite_verify ensuring the
4741         consistency of the SSA, loops and dominators information.
4742         (collect_virtual_phis, find_vdef_for_var_in_bb,
4743         find_vdef_for_var_1, find_vdef_for_var,
4744         patch_phis_for_virtual_defs): Removed huge hack.
4745         (mark_old_loops, remove_dead_loops, skip_phi_defs,
4746         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
4747         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
4748         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
4749         if_region_get_condition_block, if_region_set_false_region,
4750         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
4751         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
4752         sese_add_exit_phis_edge, sese_add_exit_phis_var,
4753         rewrite_into_sese_closed_ssa): New.
4754         (gloog): Remove dead code.  Early return if code cannot be
4755         generated.  Call cleanup_tree_cfg once the scop has been code
4756         generated.
4757         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
4758         block loops with less than two loops.
4759         (graphite_apply_transformations): Remove the call to
4760         scop_remove_ignoreable_gbbs.
4761         (limit_scops): When build_scop_loop_nests fails, continue on
4762         the next scop.  Fix open_scop.entry.
4763         (graphite_transform_loops): Call recompute_all_dominators: force the
4764         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
4765         Call initialize_original_copy_tables and free_original_copy_tables
4766         to be able to copy basic blocks during code generation.
4767         When build_scop_loop_nests fails, continue on next scop.
4768         (value_clast): New union.
4769         (clast_to_gcc_expression): Fix type cast warning.
4771 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
4773         * Merge from mainline (r140838:141727).
4775 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
4777         PR middle-end/37833
4779         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
4781 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
4783         PR middle-end/37943
4785         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
4786         exits and conditions.
4787         * gcc.dg/graphite/pr37943.c: New.
4789 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
4791         PR middle-end/37886
4792         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
4794 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
4796         * doc/invoke.texi: Fix spaces.
4798 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
4800         PR tree-optimization/37891
4801         Reverted last commit.
4802         * graphite.c (create_single_entry_edge): Set
4803         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4805 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
4806             Mitul Thakkar  <mitul.thakkar@amd.com>
4808         * graphite.c (create_single_entry_edge): Set
4809         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4811 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
4813         * doc/invoke.texi: Add -fgraphite-identity.
4814         * graphite.c (graphite_apply_transformations): Check for
4815         -fgraphite-identity.
4816         * toplev.c (process_options): Add flag_graphite_identity.
4817         * tree-ssa-loop.c: Add flag_graphite_identity.
4819 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
4821         Undo changes from 2008-10-02:
4822         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4823         operand type when copying the operand to a variable of different type.
4824         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4825         with the IV name after increment.
4827 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
4828             Harsha Jagasia  <harsha.jagasia@amd.com>
4830         PR tree-optimization/37828
4831         * gcc.dg/graphite/pr37828.c: New.
4832         * graphite.c (graphite_trans_loop_block): Do not loop block
4833         single nested loops.
4835 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
4836             Sebastian Pop  <sebastian.pop@amd.com>
4838         * graphite.c (struct rename_map_elt, new_rename_map_elt,
4839         rename_map_elt_info, eq_rename_map_elts): New.
4840         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
4841         (expand_scalar_variables_expr): Change parameters.
4842         (expand_scalar_variables_stmt): Same.
4843         (expand_scalar_variables): Same.
4844         (graphite_rename_ivs): Rename graphite_rename_variables.
4845         (build_iv_mapping): New.
4846         (translate_clast): Call build_iv_mapping.
4847         * graphite.h (gbb_p): New name.
4849 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
4851         PR tree-optimization/37684
4852         * gcc.dg/graphite/pr37684.c: New.
4853         * graphite.c (exclude_component_ref): New.
4854         (is_simple_operand): Call exclude_component_ref.
4856 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
4857             Harsha Jagasia  <harsha.jagasia@amd.com>
4859         PR tree-optimization/37485
4860         * gcc.dg/graphite/block-2.c: New
4861         * graphite.c (gmp_cst_to_tree): Moved.
4862         (iv_stack_entry_is_constant): New.
4863         (iv_stack_entry_is_iv): New.
4864         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
4865         (loop_iv_stack_insert_constant): New.
4866         (loop_iv_stack_pop): Use new datatpype.
4867         (loop_iv_stack_get_iv): Same.
4868         (loop_iv_stack_get_iv_from_name): Same.
4869         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
4870         (loop_iv_stack_patch_for_consts): New.
4871         (loop_iv_stack_remove_constants): New.
4872         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
4873         (translate_clast): Call loop_iv_stack_patch_for_consts and
4874         loop_iv_stack_remove_constants.
4875         (gloog): Use new datatype.  Redirect construction edge to end
4876         block to avoid accidental deletion.
4877         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
4878         iv stack entry.
4879         (union iv_stack_entry_data): New.  Data in iv stack entry.
4880         (struct iv_stack_entry): New.  Datatype for iv stack entries.
4882 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
4884         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4885         operand type when copying the operand to a variable of different type.
4887 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
4889         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4890         with the IV name after increment.
4892 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
4894         * Merge from mainline (r140164:140838).
4896 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4898         * graphite-data-ref.c: New.
4899         * graphite.c (print_scop): Also dump the dependence graph.
4900         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
4901         (new_scop): Initialize SCOP_DEP_GRAPH.
4902         (build_scop_dynamic_schedules): New.
4903         (build_access_matrix_with_af): Fixed column numbering.
4904         (graphite_transform_loops): Call build_scop_dynamic_schedules.
4905         * graphite.h: Add ifndef/define guards against multiple inclusion.
4906         (struct scop): Add dep_graph field.
4907         (SCOP_DEP_GRAPH): Defined.
4908         (ref_nb_loops): Fixed and moved to other position.
4909         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
4910         (nb_loops_around_loop_in_scop): New.
4911         (graphite_dump_dependence_graph): Declared.
4912         (graphite_build_rdg_all_levels): Declared.
4913         (graphite_test_dependence): Declared.
4914         * Makefile.in (graphite-data-ref.o): New target.
4916 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
4918         * Merge from mainline (139870:140164).
4920 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
4922         * Merge from mainline (138275:139870).
4923         * gcc.dg/graphite/scop-matmult.c: XFailed as one of
4924         the commits from trunk broke the niter detection.
4926 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
4928         * graphite.c: Add more documentation.  Fix formatting.
4929         (debug_loop_vec, debug_oldivs, loop_iv_stack,
4930         loop_iv_stack_debug): Moved...
4931         (schedule_to_scattering): Move before use.
4932         (dot_all_scops): Include in "#if 0" the code for system
4933         call dotty.
4935         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
4936         loop_iv_stack_debug): ...here.
4938 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
4940         * tree-phinodes.c (make_phi_node): Extern.
4941         (add_phi_node_to_bb): New.
4942         (create_phi_node): Call add_phi_node_to_bb.
4943         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
4944         (remove_statement): Handle case where stored phi was updated
4945         and is no longer the same.
4946         * graphite.c (is_parameter): New.
4947         (is_old_iv): New.
4948         (expand_scalar_variables_expr): New.
4949         (expand_scalar_variables_stmt): New.
4950         (expand_scalar_variables): New.
4951         (move_phi_nodes): Create new phi instead of moving old one.
4952         (translate_clast): Call expand_scalar_variables.
4953         (find_vdef_for_var_in_bb): Also scan regular definitions.
4954         (skip_phi_defs): New.
4955         (collect_scop_exit_phi_args): New.
4956         (patch_scop_exit_phi_args): New.
4957         (gloog): Patch phis after scop.
4958         * tree-flow.h: (add_phi_node_to_bb): Declared.
4959         (make_phi_node): Declared.
4961 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
4963         * graphite.c (end_scop): Split the entry of the scop when it
4964         is the header of the loop in which the scop is ending.
4965         (build_scops_1, limit_scops): Update uses of end_scop.
4967 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
4969         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
4970         SCOP_ENTRY or SCOP_EXIT.
4972 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4974         * graphite.c (get_construction_edge): Removed.
4975         (gloog): Construction edge is the scop entry edge.
4977 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4979         * graphite.c (can_generate_for_scop): Removed.
4980         (gloog): Do not call it.
4982 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4984         * graphite.c (new_scop): Entry of a scop is an edge.
4985         Initialize SESE region.
4986         (free_scop): Free SESE region.
4987         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
4988         (split_difficult_bb): New, split from end_scop.
4989         (end_scop): Exit of a scop is an edge.
4990         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
4991         not automatically updated and thus is always wrong.
4992         * graphite.h (struct sese): New.
4993         (SESE_ENTRY): New.
4994         (SESE_EXIT): New.
4995         (struct scop): New field for a SESE region.  Remove entry, exit.
4996         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
4997         semantics as before.  Moved comment around.
4999 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
5000             Sebastian Pop  <sebastian.pop@amd.com>
5002         * graphite.c (graphite_transform_loops): Always enable gloog
5003         and find_transform when ENABLE_CHECKING.
5005 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
5007         * graphite.c (graphite_transform_loops): Move pretty printer
5008         of SCOPs before doing any transform.  Remove call to print_scops
5009         and dot_all_scops_1.
5011 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
5013         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
5014         (print_graphite_bb): Same.
5016 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
5018         * graphite.c (dot_all_scops_1): Cleanup.
5019         (move_scops): Fix comment.
5021 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
5023         * graphite.c (build_scop_bbs): Revert commit 139355:
5025         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5026                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5028                 * graphite.c (build_scop_bbs): Factor up code.
5030 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
5032         * graphite.c (gloog): Update dominator info.
5034 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
5036         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
5038 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
5040         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
5041         initialization.
5042         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
5043         (translate_clast): Correct formatting.
5044         * graphite.h (struct num_map): Removed.
5045         (struct graphite_bb): Remove num_map field.
5046         (GBB_INDEX_TO_NUM_MAP): Removed.
5048 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
5050         * graphite.c (build_access_matrix_with_af): Fix comments.
5051         (build_scop_data_accesses): Same.
5053 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
5055         * graphite.c (build_scop_data_accesses): Don't construct
5056         access matrices.  Add a FIXME and an assert condition that
5057         should pass when the access matrices will be needed.
5059 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
5061         * tree-data-ref.c (stmt_simple_memref_p): Don't call
5062         really_constant_p.
5063         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
5064         Moved close by free_graphite_bb.
5065         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
5066         (new_scop): Move close by free_scop.
5067         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
5069 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
5071         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
5072         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
5073         instead of recursive call.
5074         (graphite_translate_clast_equation): New.
5075         (graphite_create_guard_cond_expr): New.
5076         (graphite_create_new_guard): New.
5077         (get_stack_index_from_iv): Removed.
5078         (graphite_rename_ivs_stmt): Use gbb_loop_index.
5079         (get_true_edge_from_guard_bb): New.
5080         (translate_clast): Handle stmt_guard in clast.
5081         (get_construction_edge): Allow construction edge detection for
5082         a scope entry with multiple predecessors if one predecessor is
5083         the immediate dominator of scope entry.
5084         (can_generate_code_stmt): Enable code generation for clast_guard.
5085         (gloog): Use correct context loop.  Removed check for post dominators.
5086         * cfgloop.h (create_empty_if_region_on_edge): Declared.
5088 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
5090         * graphite.c (remove_dead_loops): Document better which
5091         loops are removed.
5093 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
5095         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
5096         and PPLINC.
5097         (graphite.o): Also depends on pointer-set.h.
5099 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
5101         * graphite.c (scop_record_loop): Fix compile warning.
5103 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
5104             Sebastian Pop  <sebastian.pop@amd.com>
5106         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
5108 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
5110         * graphite.c (build_graphite_bb): Initialize bb->aux to
5111         point to the graphite_bb_p.
5112         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
5113         content of bb->aux.
5114         (add_bb_domains): Does not use the scop parameter.
5115         (graphite_transform_loops): Clean bb->aux at the end.
5117 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5118             Sebastian Pop  <sebastian.pop@amd.com>
5120         * lib/target-supports.exp
5121         (check_effective_target_fgraphite): New.
5123         * gcc.dg/graphite/graphite.exp: Early exit when
5124         check_effective_target_fgraphite returns false.
5125         Set dg-do-what-default to compile.
5126         (scan-graphite-dump-times): Removed.
5127         * gfortran.dg/graphite/graphite.exp: Same.
5129         * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
5130         Use scan-tree-dump-times instead of scan-graphite-dump-times.
5131         * gcc.dg/graphite/scop-1.c: Same.
5132         * gcc.dg/graphite/scop-2.c: Same.
5133         * gcc.dg/graphite/scop-3.c: Same.
5134         * gcc.dg/graphite/scop-4.c: Same.
5135         * gcc.dg/graphite/scop-5.c: Same.
5136         * gcc.dg/graphite/scop-6.c: Same.
5137         * gcc.dg/graphite/scop-7.c: Same.
5138         * gcc.dg/graphite/scop-8.c: Same.
5139         * gcc.dg/graphite/scop-9.c: Same.
5140         * gcc.dg/graphite/scop-10.c: Same.
5141         * gcc.dg/graphite/scop-11.c: Same.
5142         * gcc.dg/graphite/scop-12.c: Same.
5143         * gcc.dg/graphite/scop-13.c: Same.
5144         * gcc.dg/graphite/scop-matmult.c: Same.
5145         * gcc.dg/graphite/scop-14.c: Same.
5146         * gcc.dg/graphite/scop-15.c: Same.
5147         * gcc.dg/graphite/block-0.c: Same.
5148         * gcc.dg/graphite/scop-16.c: Same.
5149         * gcc.dg/graphite/block-1.c: Same.
5150         * gcc.dg/graphite/scop-17.c: Same.
5151         * gcc.dg/graphite/scop-18.c: Same.
5152         * gfortran.dg/graphite/block-1.f90: Same.
5153         * gfortran.dg/graphite/scop-1.f: Same.
5154         * gfortran.dg/graphite/block-2.f: Same.
5156 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5158         * graphite.c: Fix some XXX comments.
5159         (build_scop_dynamic_schedules): Removed.
5161 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5163         * graphite.h (scop_max_loop_depth): Moved...
5164         * graphite.c (scop_max_loop_depth): ...here.
5165         (remove_all_edges_1): New.
5166         (remove_all_edges): Factored code.
5167         (remove_cond_exprs): Check only the last statement for
5168         a GIMPLE_COND expression.
5170 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5172         * graphite.c (scan_tree_for_params): Early return when the
5173         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
5174         (find_scop_parameters): Factor out code.
5175         (graphite_trans_bb_strip_mine): Remove dead code.
5177 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5179         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
5180         graphite_trans_bb_move_loop): Factor asserts.
5181         (gloog): Perform sanity checks only for ENABLE_CHECKING.
5182         Do not call calculate_dominance_info and estimate_bb_frequencies.
5184 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
5186         * graphite.c (create_loops_mapping, free_loops_mapping,
5187         create_loops_mapping_num, debug_loop_mapping_1,
5188         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
5189         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
5190         graphite_loops_mapping_add_child_num,
5191         graphite_loops_mapping_insert_child,
5192         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
5193         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
5194         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
5195         create_num_from_index, get_num_from_index,
5196         swap_loop_mapped_depth): Removed.
5197         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
5198         (free_scop): Do not call free_loops_mapping.
5199         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
5200         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
5201         get_loop_mapped_depth.
5202         (graphite_trans_bb_move_loop): Do not update the loop mapping.
5203         (graphite_trans_bb_strip_mine): Same.
5204         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
5205         (struct scop): Remove field loops_mapping.
5207 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5208             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5210         * graphite.c (scop_record_loop): Factor out one level of the
5211         condition by early return.
5212         (build_scop_loop_nests): Format following FSF coding style.
5213         (build_scop_dynamic_schedules): Factor out code.
5214         (scopdet_bb_info): Reindent.  Default case should not be reachable.
5216 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5217             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5219         * graphite.c (loop_affine_expr): Check for DECL_P or struct
5220         assignments that are not handled as simple operands for now.
5222 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5223             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5225         * graphite.c (build_scop_bbs): Factor up code.
5227 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5228             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5230         * graphite.c (stmt_simple_for_scop_p): Factor code out
5231         of the loop.
5232         (enum gbb_type): New.  Group all the GBB_* types under it.
5233         (is_loop_exit): Moved...
5234         (end_scop): Enable BB spliting.
5235         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
5236         * cfgloop.h (is_loop_exit): Declared.
5238 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5240         * doc/invoke.texi: Remove strides from examples containing
5241         DO loops when the strides are equal to 1.
5243 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
5244             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5246         * graphite.c (graphite_trans_scop_block): Or the result with
5247         the result from graphite_trans_loop_block.
5248         * gcc.dg/graphite/block-1.c: New.
5249         * gfortran.dg/graphite/block-1.f90: New.
5250         * gfortran.dg/graphite/block-2.f: New.
5252 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5254         * graphite.c (graphite_transform_loops): Call cloog_initialize
5255         and cloog_finalize.
5257 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5259         * tree-data-ref.c) (stmt_simple_memref_p): New.
5260         * tree-data-ref.h (stmt_simple_memref_p): Declared.
5261         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
5262         (is_simple_operand): Call stmt_simple_memref_p.
5264         * gcc.dg/graphite/scop-matmult.c: Updated for not
5265         using pointer arithmetic, as this is optimized by PRE and
5266         makes the code too difficult to analyze.
5268         * gcc.dg/graphite/scop-18.c: Same.
5270 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
5272         * gdbinit.in (pgg): New.
5274 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
5276         * graphite.c (graphite_trans_loop_block): Fix warning.
5278 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
5280         * graphite.c (graphite_trans_loop_block): Fix my merge error.
5282 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
5284         * graphite.c (graphite_trans_bb_block): Remove check for
5285         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
5286         Check if loop blocking is profitable for every loop, before applying
5287         the changes.
5288         (graphite_apply_transformations): Call graphite_trans_bb_block only,
5289         if flag_loop_block is set.
5291 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
5293         * graphite.c: Add some more documentation for the loop
5294         mapping.
5296 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
5298         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
5299         * graphite.c: Format on less than 80 columns.
5300         * graphite.h: Same.
5302 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
5304         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
5306 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
5308         * doc/invoke.texi (floop-block, floop-strip-mine,
5309         floop-interchange): Update documentation with examples.
5311 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
5313         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
5314         add_referenced_var.
5315         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
5317 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
5319         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
5320         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
5321         * tree-scalar-evolution.c: Revert useless changes.
5322         * tree-phinodes.c: Same.
5323         * cfghooks.c: Same.
5324         * vec.h: Same.
5325         * tree-vectorizer.h: Same.
5326         * tree-flow.h: Same.
5327         * tree-cfg.c: Same.
5328         * common.opt (fgraphite): Update documentation.
5330 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
5332         * doc/invoke.texi (-floop-block, -floop-strip-mine,
5333         -floop-interchange): Add more text for explaining what each of these
5334         flags is doing.
5335         * tree-into-ssa.c (gimple_vec): Moved to...
5336         * graphite.c: Include gimple.h.
5337         (gimple_vec): Moved to...
5338         (del_loop_to_cloog_loop): Removed.
5339         (loop_affine_expr): Do not call create_data_ref when the
5340         operand is a constant.
5341         (new_scop): Use free instead of del_loop_to_cloog_loop.
5342         * Makefile.in (graphite.o): Depend on GIMPLE_H.
5343         * gimple.h (gimple_vec): ... here.
5345 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5347         * graphite.c (scopdet_bb_info): Only allow loops with known number of
5348         latch executions.
5349         (build_loop_iteration_domains): Fail, if latch executions unknown.
5351 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5353         * graphite.c (add_conditions_to_domain): New.
5354         (build_scop_conditions_1): Call add_conditions_to_domain.
5355         (set_cloog_options): Allow to disable optimizations.
5357 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5359         * graphite.c (find_params_in_bb): Look for parameters in conditions.
5360         Do not use walk_dominator_tree.
5361         (find_scop_parameters): Do not use walk_dominator_tree.
5363 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5365         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
5366         (idx_record_params): Adapt.
5367         * graphite.h (scop_gimple_loop_depth): New.
5369 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5371         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
5372         (scan_tree_for_params): Remove value_init.
5373         (build_scop_context): Remove value_init.
5374         (build_loop_iteration_domains): Remove value_init.
5375         (schedule_to_scattering): Remove value_init.
5376         (graphite_trans_bb_strip_mine): Remove value_init.
5378 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5380         * gcc/graphite.c (limit_scops): New.
5381         (graphite_transform_loops): Add limit SCoPs.
5382         * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
5383         * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
5384         * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
5385         * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
5386         * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
5387         * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
5388         * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
5389         * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
5390         * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
5391         Change loop numbers.
5392         * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
5393         Change loop numbers.
5394         * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
5395         * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
5396         * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
5397         * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
5398         * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
5399         * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
5400         * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
5401         * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
5402         * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
5403         * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
5405 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5407         * graphite.c (graphite_transform_loops): Call always find_transform.
5409 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
5411         * graphite.c (free_loops_mapping): New.
5412         (stmt_simple_for_scop_p): Fix typo.
5413         (stmt_simple_for_scop_p): Fix tuples functions, that
5414         broke polyhedron.
5415         (free_graphite_bb): Fix some memleaks.
5416         (free_scop): Fix some memleaks.
5417         (scopdet_bb_info): Do not forget some tmp SCoPs.
5418         (find_params_in_bb): Fix some memleaks.
5419         (clast_to_gcc_expression): Fix warning.
5421 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
5423         * gcc.dg/graphite/scop-16.c: Fix for 32bit.
5424         * gcc.dg/graphite/scop-17.c: Fix for 32bit.
5426 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
5428         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
5429         Move code ifdef-ed HAVE_cloog...
5430         * graphite.c: Include toplev.h.
5431         ... here.
5432         * Makefile.in (OBJS-common): Always build graphite.o.
5433         (BACKEND): Remove @GRAPHITE@.
5434         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
5435         (graphite.o): Depend on TOPLEV_H.
5437 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
5439         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
5440         Remove typo left from polylib to ppl conversion.
5441         * graphite.c (graphite_transforms): Use sorry instead of fatal.
5443 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
5445         * toplev.c (process_options): Move the graphite loop optimization
5446         flags...
5447         * tree-ssa-loop.c (graphite_transforms): ... here.
5448         When not configured with CLooG, print to dump_file that
5449         Graphite transforms were not performed.
5450         * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
5451         New.
5452         * gcc.dg/graphite/*.c: Updated all testcases to use
5453         scan-graphite-dump-times.
5455 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
5457         * graphite.c (dot_scop, dot_all_scops): Do not call system.
5458         Do not open /tmp/scop.dot and /tmp/allscops.dot.
5460 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
5461             Jan Sjodin  <jan.sjodin@amd.com>
5463         * configure: Regenerated.
5464         * omp-low.c (expand_omp_sections): Remove now unused code.
5465         * config.in (HAVE_polylib): Removed.
5466         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
5467         (PPLLIBS, PPLINC): Added.
5468         * graphite.c: Replace unsigned with int wherever possible.
5469         Don't access Cloog's data structures, but use accessor functions.
5470         Clast's stmt->type is now implemented as a vtable: change the
5471         switches of stmt->type into ifs.
5472         (polylib/polylibgmp.h): Don't include.
5473         (initialize_dependence_polyhedron,
5474         initialize_data_dependence_polyhedron, is_empty_polyhedron,
5475         statement_precedes_p, test_dependence, build_rdg_all_levels,
5476         dump_dependence_graph): Removed until this code is cleaned up
5477         or ported to Cloog.
5478         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
5479         (POLYLIBINC): Renamed PPLINC.
5481 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
5482             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5483             Jan Sjodin  <jan.sjodin@amd.com>
5485         Finish the merge and tuplification of graphite.
5487 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
5488             Jan Sjodin  <jan.sjodin@amd.com>
5490         Partial merge from mainline (138072:138275).
5491         * graphite.c still has to be tuplified.
5493 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
5495         * graphite.c (graphite_loops_mapping_max_loop_num): New.
5496         (create_num_from_index): New.
5497         (get_num_from_index): Also pass in the graphite BB.
5498         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
5499         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
5500         (graphite_trans_bb_strip_mine): Call create_num_from_index.
5501         (is_interchange_valid): Return false when failing.
5502         * graphite.h (struct num_map): New.
5503         (struct graphite_bb): New field num_map.
5504         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
5506 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5508         * graphite.c (dump_gbb_conditions): Print also conditions like
5509         "if (a)".  Remove dublicated code and use print_generic_expr ().
5510         (stmt_simple_for_scop_p): Only allow conditions we can handle
5511         {<, <=, >, >=}.
5513 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
5515         * graphite.h (struct scop): Removed new_ivs field.
5516         (SCOP_NEWIVS): Deleted.
5517         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
5518         clast_to_gcc_expression, graphite_create_new_loop):
5519         Removed use of new_ivs.
5521 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
5523         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
5524         create_loops_mapping_num, debug_loop_mapping_1): New.
5525         (debug_loop_mapping): Call debug_loop_mapping_1.
5526         (get_loop_mapping_for_num,
5527         graphite_loops_mapping_add_child,
5528         graphite_loops_mapping_add_child_num,
5529         graphite_loops_mapping_insert_child,
5530         graphite_loops_mapping_parent,
5531         split_loop_mapped_depth_for_num,
5532         loop_mapped_depth_split_loop): New.
5533         (increment_loop_mapped_depths): Removed.
5534         (swap_loop_mapped_depth_for_num): Reimplemented.
5535         (new_scop): Call create_loops_mapping.
5536         (scop_record_loop): Call graphite_loops_mapping_insert_child.
5537         (translate_clast): Pass the old loop father in parameter, and pass
5538         it to get_old_iv_from_ssa_name.
5539         (remove_edges_around_useless_blocks, can_generate_code_stmt,
5540         can_generate_code, can_generate_for_scop): New.
5541         (graphite_trans_bb_block): Returns false when it fails to transform.
5542         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
5544 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
5546         Reverted all the changes related to the streamization and
5547         loop fusion.
5548         These changes are now tracked in the streamization branch.
5550 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
5551             Jan Sjodin  <jan.sjodin@amd.com>
5553         * graphite.c (gbb_compare): Correctly constify.
5554         (gbb_can_be_ignored): Indent.
5555         (graphite_trans_scop_swap_1and2): Add legality check.
5556         Remove dead FIXMEs.
5558 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
5560         Remove fallouts from "Reverted the Condate changes".
5561         * tree.h: Remove unused decl.
5562         * gcc.dg/tree-checker: Same.
5563         * timevar.def: Remove counter.
5565 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
5567         * Merge from mainline (135673:138072).
5569         Reverted the MIRO changes (from 2008-04-05) that are now
5570         tracked in the miro branch.
5571         * tree-bounds.c: Removed.
5572         * tree-bounds.h: Removed.
5574         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
5575         are now tracked in the condate branch.
5576         * tree-check.c: Removed.
5577         * tree-match.c: Removed.
5578         * condate.y: Removed.
5580 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5582         * common.opt: New user flag -floop-block, -floop-strip-mine
5583         and -floop-interchange.
5584         * toplev.c (process_options): Enable -fgraphite pass if any one of the
5585         graphite loop optimization flags is turned on.
5586         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
5587         flag_loop_strip_mine and flag_loop_interchange checks before
5588         optimizations.
5589         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
5590         -floop-strip-mine and -floop-interchange.
5591         * gcc.dg/graphite/block-0.c: Add -floop-block and remove
5592         -fgraphite.
5593         * gcc.dg/graphite/scop-16.c: Ditto.
5594         * gcc.dg/graphite/scop-17.c: Ditto.
5595         * gcc.dg/graphite/scop-18.c: Ditto.
5597 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
5598             Sebastian Pop  <sebastian.pop@amd.com>
5600         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
5601         (create_empty_loop_on_edge): More fixes.
5602         * tree-phinodes.c (resize_phi_node): Extern.
5603         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
5604         * cfghooks.c (update_dominator_information): New split from
5605         split_edge.
5606         * tree-vectorizer.c (rename_variables_in_bb): Extern.
5607         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
5608         successor of the function entry block.
5610         * graphite.c: Include pointer-set.h.
5611         (debug_loop_mapping, increment_loop_mapped_depths,
5612         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
5613         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
5614         swap_loop_mapped_depth_for_num, get_num_from_index,
5615         swap_loop_mapped_depth, loop_iv_stack_debug,
5616         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
5617         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
5618         get_old_iv_from_ssa_name): New.
5619         (new_scop): Initialize SCOP_LOOPS_MAPPING.
5620         (free_scop): Free SCOP_LOOPS_MAPPING.
5621         (scop_record_loop): Record old ivs.
5622         (create_var_name): Removed.
5623         (initialize_cloog_names): Allocate double space in case strip mine
5624         applies to all loops once.
5625         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
5626         (clast_to_gcc_expression): Same.  Implement more clast to gimple
5627         translation.
5628         (graphite_create_new_loop): Pass in ivstack.
5629         (remove_all_edges): Pass in the construction_edge.
5630         (graphite_remove_iv): Removed.
5631         (graphite_rename_ivs, graphite_rename_ivs_stmt,
5632         remove_cond_exprs): Rewritten.
5633         (move_phi_nodes): New.
5634         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
5635         (translate_clast): Pass in ivstack.  Rewrite some cases.
5636         (set_cloog_options, debug_clast_stmt): New.
5637         (find_transform): Use set_cloog_options.
5638         (outermost_loop_layer): Removed.
5639         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
5640         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
5641         mark_old_loops, remove_dead_loops): New.
5642         (gloog): Rewritten.
5643         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
5644         (const_column_index, get_first_matching_sign_row_index,
5645         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
5646         get_upper_bound): New.
5647         (graphite_trans_bb_strip_mine): Also update the iv map.
5649         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
5650         (struct name_tree): Add a loop field.
5651         (struct scop): Add a graphite_loops_mapping field.
5652         (SCOP_LOOPS_MAPPING): New.
5653         (debug_clast_stmt): Declare.
5654         * lambda.h (find_induction_var_from_exit_cond): Declare.
5655         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
5656         * cfgloop.h (update_dominators_in_loop): Removed declaration.
5657         (create_empty_loop_on_edge): Updated.
5658         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
5659         rename_variables_in_bb): Declare.
5660         * tree-cfg.c (remove_bb): Extern.
5662         * gcc.dg/graphite/block-0.c: New.
5664 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5665             Sebastian Pop  <sebastian.pop@amd.com>
5667         * graphite.c (strip_mine_profitable_p): New.
5668         (graphite_trans_bb_block): Disable strip mining if not profitable.
5670         * gcc.dg/graphite/scop-18.c: New.
5671         * gcc.dg/graphite/scop-17.c: Fixed.
5672         * gcc.dg/graphite/scop-16.c: Fixed.
5674 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
5675             Jan Sjodin  <jan.sjodin@amd.com>
5676             Sebastian Pop  <sebastian.pop@amd.com>
5678         * graphite.c (is_interchange_valid): New.
5679         (graphite_trans_bb_block): Check loop nest of basic block for legality
5680         of interchange.
5682         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
5683         outer_most_loop, gbb_outer_most_loop_index): New.
5685         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
5686         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
5687         * gcc.dg/graphite/scop-16.c: New.
5688         * gcc.dg/graphite/scop-17.c: New.
5690 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5692         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
5693         (graphite_trans_scop_block): Ignore SCoPs without bbs.
5695 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5697         * graphite.c (new_scop): Initialize SCOP_EXIT.
5698         (scopdet_info): Add.
5699         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
5700         (build_scops_1): Cleanup, bugfixes.
5701         (build_scops): Cleanup.
5703         * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
5704         * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
5706 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
5708         * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
5710         * gfortran.dg/graphite/graphite.exp: Use
5711         DEFAULT_GRAPHITE_FLAGS.
5713         * gcc.dg/graphite/scop-15.c: Update to reduced test case.
5715 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
5717         * graphite.c (scan_tree_for_params): Do not assert any more if
5718         MULT_EXPR parameter is negative.
5720         * gfortran.dg/graphite/scop-1.f: New.
5722         * gfortran.dg/graphite/graphite.exp: New.
5724         * gcc.dg/graphite/scop-15.c: New.
5726 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
5728         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
5730 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5732         * graphite.c (graphite_trans_bb_swap_loops): Rename from
5733         graphite_swap_loops.
5734         (graphite_trans_bb_move_loop): New.
5735         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
5736         (graphite_trans_bb_block): New.
5737         (graphite_trans_loop_block): New.
5738         (graphite_trans_scop_swap_1and2): Rename from
5739         graphite_trans_swap_1and2.
5740         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
5741         (graphite_trans_scop_block): New.
5742         (graphite_apply_transformations): Rename from
5743         graphite_transformations.
5745         * gcc.dg/graphite/scop-matmult.c: New.
5747 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5749         * graphite.c (gbb_compare): New.
5750         (graphite_sort_gbbs): New.
5751         (gbb_can_be_ignored): New.
5752         (scop_remove_ignoreable_gbbs): New.
5753         (graphite_transformations): Cleanup and add
5754         scop_remove_ignoreable_gbbs.
5755         * lambda.h (lambda_vector_compare): New.
5757 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5759         * graphite.c (print_graphite_bb): Correct printing of static schedule.
5760         (graphite_swap_loops): int -> unsigned
5761         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
5762         (graphite_transformations): New.
5763         (graphite_transform_loops): Move to graphite_transformations.
5764         * graphite.h (gbb_nb_loops): Return unsigned.
5766 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5768         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
5769         the domain matrix.  This makes scop-0.c work again.
5771 2008-06-20  Richard Guenther  <rguenther@suse.de>
5773         * graphite.h: Adjust copyright to GPLv3.
5774         * graphite.c: Likewise.
5775         (stmt_simple_memref_for_scop_p): Split out from ...
5776         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
5777         and simplify.
5778         (get_bb_type): Optimize.
5779         (is_pred): Remove.
5780         (is_bb_addable): Fix memleak, replace is_pred call with
5781         single_pred.
5782         (build_scops): Use current_loops.
5783         (param_index): Fix memleak.
5785 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5787         * graphite.c: Fix formatting.
5789 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5791         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
5792         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
5793         (create_var_name, save_var_name): Newly defined functions.
5794         (initialize_cloog_names): Part of the code factored out to
5795         save_var_name.
5796         (clast_to_gcc_expression): Now handles the case of clast_red_sum
5797         in clast_reduction statement.
5798         (graphite_create_new_loop): Now takes a new parameter
5799         for outer_loop.
5800         (translate_clast): Now also takes the context_loop and bb_exit
5801         parameters. Rewritten the code so that it creates a gimple code
5802         inside the given context.
5803         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
5804         remove_cond_expr, disconnect_cond_expr,
5805         disconnect_virtual_phi_nodes): Newly defined functions.
5806         * graphite.h (struct scop): added old_ivs vector.
5807         SCOP_OLDIVS: New macro.
5809 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
5811         * cfgloopmanip.c: Add missing function comments, fix formatting.
5813 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5815         * cfgloopmanip.c (update_dominators_in_loop): Defined.
5816         (create_empty_loop_on_edge): Defined.
5817         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
5818         instead of void.
5819         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
5820         (update_dominators_in_loop): Declared as extern
5821         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
5823 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
5825         * graphite.c (print_graphite_bb): Allow changing number of loops
5826         in SCoP domain.
5827         (initialize_cloog_names): Allow changing number of loops.
5828         (build_cloog_prog): Simplify.
5829         (find_transform): Enable cloog option --strides.
5830         (graphite_swap_loops): New.
5831         (graphite_strip_mine_loop): New.
5832         (graphite_trans_swap_1and2): New.
5833         (graphite_trans_strip): New.
5834         (graphite_transform_loops): Add graphite_trans_strip.
5835         * graphite.h (scop_max_loop_depth): New.
5837 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
5839         * graphite.c (build_scop_iteration_domain): Remove forgotten
5840         line. (Fixes compile)
5842 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
5844         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
5845         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
5846         (build_bb_loops): New.
5847         (graphite_transform_loops): Add build_bb_loops.
5848         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
5849         numbers.
5850         * graphite.h (graphite_bb): Add loops.
5851         (gbb_nb_loops): New.
5852         (gbb_loop_at_index): New.
5853         (gbb_loop_index): New.
5854         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
5855         using nb_params_in_scop.
5857 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
5859         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
5860         (build_scop_canonical_schedules): Build minimized schedule.
5861         (schedule_to_scattering): Adapt to minimized schedule.
5862         * graphite.h (graphite_bb): Add/Update descriptions.
5864 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
5865             Tobias Grosser  <grosser@fim.uni-passau.de>
5867         * graphite.c (print_graphite_bb): Add condition printing.
5868         (dump_value): New.
5869         (dump_gbb_conditions): New.
5870         (build_scop_conditions_1): New.
5871         (build_scop_conditions): New.
5872         * graphite.h (graphite_bb): Add conditions.
5874 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
5876         * graphite.c (print_graphite_bb):
5877         (free_graphite_bb): New.
5878         (free_scop): Free bbs.
5879         (get_bb_type): Free doms.
5880         (build_scop_context): Free context matrix.
5881         (build_loop_iteration_domains): Remove unused code.
5882         (build_cloog_prog): Free scattering function and blocklist.
5883         (find_transform): Free options.
5885 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
5887         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
5888         Remove unnecessery cloog data structures. Make a copy of the domain
5889         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
5890         unnecessary cloog data structures. Fix memory leaks. Remove insert
5891         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
5892         used.
5893         (build_scop_iteration_domain): Remove unnecessary cloog
5894         data structures.  Fix memory leaks.
5895         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
5896         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
5898 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5900         * graphite.c (find_scop_params): Remove initialize_cloog_names.
5902 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5904         * graphite.c (end_scop): Style fix.
5905         (schedule_to_scattering): Style and comment fix.
5907 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5908         * graphite.c (print_graphite_bb): Fix definiton of
5909         schedule_to_scattering.
5910         (initialize_cloog_names): Change nb_scattdims to max loop
5911         depth in SCoP.
5912         (schedule_to_scattering): Take parameter for number of scattering
5913         dimensions.
5914         (build_cloog_prog): Only build as much scattering dimensions as
5915         necessary.
5917 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5919         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
5920         in polyhedron/aermod.f90.
5922 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5923             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
5924             Harsha Jagasia  <harsha.jagasia@amd.com>
5926         * graphite.c (is_bb_addable): Fix segfault.
5928 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5930         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
5931         with multiple exits and conditional handling in edge cases.
5932         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
5934         * gcc.dg/graphite/scop-14.c: New.
5936 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5937             Adrien Eliche  <aeliche@isty.uvsq.fr>
5939         * graphite.c (is_bb_addable): Add more comments and enhance
5940         readablity of the source code. Fix memory leak.
5941         (is_loop_exit): Fix memory leak.
5943 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5945         * graphite.c (first_loop_in_scop): Deleted.
5946         (setup_cloog_loop): Only walk the loop chain for inner loops.
5947         (build_scop_iteration_domain): Execute setup_cloog_loop for
5948         all loops in the first layer.
5950 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5952         * graphite.c (scan_tree_for_params): Change the way params are
5953         added to be indepenent of the number of loops.
5954         (setup_cloog_loop): Revert to short matrix format. Fix parameter
5955         handling.
5956         (build_cloog_prog): Revert to short matrix format.
5958 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
5959             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5961         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
5962         warning.
5964 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
5966         * graphite.c (nb_data_refs_in_scop): New.
5967         (graphite_transform_loops): Print more stats: number of
5968         loops, basic blocks and data references per scop.
5970 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
5971             Jan Sjodin  <jan.sjodin@amd.com>
5973         * graphite.c (loop_affine_expr, idx_record_params,
5974         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
5975         instead of instantiate_parameters.
5977 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5979         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
5980         add support for parameters, add STATIC_SCHEDULE at the right places,
5981         cleanup.
5983 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5985         * graphite.c (build_scop_loop_nests): Only add the loops, that
5986         are contained completely in the SCoP.
5987         (build_cloog_prog): Disable scattering, until schedule_to_scattering
5988         and the domains are fixed.
5989         (build_scop_canonical_schedules): Add support for bbs not contained
5990         in any SCoP.
5992 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5994         * graphite.h (scop_contains_loop): Update comments to match
5995         the actual behavior.
5996         (scop_contains_loop): New.
5997         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
5999 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
6001         * graphite.c (get_bb_type): On function body, i.e. loop_0,
6002         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
6003         as GBB_COND_HEADER.
6005 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
6006             Tobias Grosser  <grosser@fim.uni-passau.de>
6008         * graphite.c (graphite_transform_loops): Early return when
6009         there are no loops in the function.
6011 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
6012             Jan Sjodin  <jan.sjodin@amd.com>
6014         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
6015         offset of the last loop.
6016         (setup_cloog_loop): Copy the entire outer constraint matrix.
6018 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
6019             Jan Sjodin  <jan.sjodin@amd.com>
6021         * graphite.c (stmt_in_scop_p, function_parameter_p,
6022         invariant_in_scop_p): Removed.
6023         (scan_tree_for_params): Can be used with no constraint
6024         matrix for gathering parameters.
6025         (idx_record_params): Don't use idx_record_param, instead use
6026         scan_tree_for_params.
6027         (find_scop_parameters): Same.
6028         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
6029         Fix the size of loop domains.
6030         (schedule_to_scattering): Exit when the outer loop is not in scop.
6031         (find_transform): Enable build_cloog_prog.
6033 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
6034             Jan Sjodin  <jan.sjodin@amd.com>
6036         * graphite.c (schedule_to_scattering): Make scattering domains
6037         uniformly of the same size, as required by CLooG 0.14.0 and before.
6039 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
6040             Jan Sjodin  <jan.sjodin@amd.com>
6042         * graphite.c (schedule_to_scattering): Rewrite, correct the
6043         translation of the scheduling function to scattering.
6044         (build_cloog_prog): Call schedule_to_scattering only once.
6045         * graphite.h (scop_loop_index): Do not fail for loops not
6046         in the scop: return -1.
6048 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
6050         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
6051         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
6052         (setup_cloog_loop): Export GBB_DOMAIN.
6053         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
6054         able to rebuild the original control flow.
6055         * graphite.h (graphite_bb): Add domain field and access macro.
6056         (GBB_DOMAIN): New.
6058 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
6060         * graphite.c (debug_gbb): New.
6061         (print_scop, build_graphite_bb): Use SCOP_BBS.
6062         (build_scop_bbs): Reimplemented.
6063         (dfs_bb_in_scop_p): Removed.
6064         (build_scop_loop_nests): Reorder loops inserted in
6065         SCOP_LOOP_NEST: outer loops should come first.
6066         (build_scop_canonical_schedules): Reinitialize at zero
6067         the components of the SCOP_STATIC_SCHEDULE for the loops
6068         that have already been parsed.
6070         * graphite.h (debug_gbb): Declared.
6072 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
6073             Jan Sjodin  <jan.sjodin@amd.com>
6075         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
6076         (graphite_loop_to_gcc_loop): Removed.
6077         (remove_all_edges): New.
6078         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
6079         (gloog): Remove useless code.
6081 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6083         * graphite.c (get_bb_type): Reworked. We distinguish between
6084         loops with one or multiple exits.
6085         (is_loop_exit): New.
6086         (is_pred): New.
6087         (is_bb_addable): Rework condition handling, now support for case
6088         case statements and loops with multiple exits.
6090         * gcc.dg/graphite/scop-11.c: New.
6091         * gcc.dg/graphite/scop-12.c: New.
6092         * gcc.dg/graphite/scop-13.c: New.
6094 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6096         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
6097         we have too many colors.
6099 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
6101         * doc/invoke.texi (-ftree-loop-fusion): Document.
6102         * tree-pass.h (pass_loop_fusion): Declared.
6103         * tree-loop-fusion.c: New.
6104         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
6105         * tree-data-ref.c (find_data_references_in_loop): Make extern.
6106         * tree-data-ref.h (find_data_references_in_loop): Declared.
6107         * common.opt (ftree-loop-fusion): Declared.
6108         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
6110 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
6112         * graphite.c (build_access_matrix): Fix typo from the merge.
6114 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
6116         * Merge from mainline (130800:135673).
6118 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
6120         * graphite.c (end_scop): The exit of the scop is not part of the scop.
6121         Update dominators after splitting.
6123 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
6125         * graphite.c (is_bb_addable): Return the harmful statement.
6126         Factor up some code.
6127         (end_scop): New.  Splits end of scope bbs on a harmful statement.
6128         (build_scops_1): Call end_scop.
6130 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
6132         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
6133         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
6134         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
6135         build_scops_1): Removed.
6136         (build_scops_2): Renamed build_scops_1.
6138 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
6140         * graphite.c: Fix formatting.
6142 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
6144         * graphite.c (get_bb_type): New.
6145         (move_scops): New.
6146         (build_scops_2): New.
6147         (is_bb_addable): New.
6148         (build_scops): Switch the scop detection.
6149         (build_scop_bbs): Add entry bb to scop.
6150         * graphite.h (struct scop): Update comment.
6152 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
6154         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
6155         more colors.
6157 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
6159         * gcc.dg/graphite/scop-1.c: Update.
6160         * gcc.dg/graphite/scop-2.c: Update.
6161         * gcc.dg/graphite/scop-4.c: Update.
6162         * gcc.dg/graphite/scop-5.c: Add.
6163         * gcc.dg/graphite/scop-6.c: Add.
6165 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
6167         * gcc.dg/graphite/scop-0.c: Add.
6168         * gcc.dg/graphite/scop-7.c: Add.
6169         * gcc.dg/graphite/scop-8.c: Add.
6170         * gcc.dg/graphite/scop-9.c: Add.
6171         * gcc.dg/graphite/scop-10.c: Add.
6173 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
6175         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
6176         Check affine expressions depending on the outermost loop
6177         instead of a scop.
6178         (stmt_simple_for_scop_p): Same.
6179         (harmfule_stmt_in_scop): Same.
6181 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
6183         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
6184         mark entry and exit, that are not part of the SCoP and update HTML
6185         formatting.
6187 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
6189         * graphite.c (basic_block_simple_for_scop_p): Renamed
6190         harmful_stmt_in_bb.
6191         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
6192         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
6193         (all_preds_visited_p, all_succs_visited_p,
6194         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
6195         scop_end_loop): New.
6196         (build_scops): Do not use dfs_enumerate_from.
6198         * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
6200 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
6202         * graphite.c: Add comments to functions that are missing a
6203         description.
6204         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
6206 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
6208         * graphite.c (nb_params_in_scop): Moved...
6209         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
6210         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
6211         (clast_to_gcc_expression): Reduce column size to less than 80.
6212         (graphite_create_iv): Return the new name of the IV.
6213         (find_transform): Set options->esp and options->cpp.
6214         (gloog): Comment out the invalidation of the old loop code.
6215         (initialize_dependence_polyhedron): Replace scop_nb_params with
6216         nb_params_in_scop.
6218         * graphite.h (nb_params_in_scop): ... here.
6219         (scop_nb_params): Removed.
6220         (loop_domain_dim): Return something even when the loop was not
6221         found in the hash table: avoid ICEing on all the graphite.exp
6222         testcases.
6224 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6226         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
6228         * graphite.c (build_scop_dynamic_schedules): Schedule is built
6229         according to nesting level.
6230         (find_scop_parameters): Call instantiate_parameters.
6231         (scan_tree_for_params): Extend it to handle general affine bounds.
6232         Inner loop bound can depend on outer loop induction variable.
6233         (setup_cloog_loop): tmp variable is allocated on stack. Call
6234         instantiate_parameters with respect to outermost_loop_in_scop.
6235         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
6236         graphite.h.
6237         (create_empty_loop): Function loopify should be given edge
6238         probability, instead of edge frequency. Dominance relation from
6239         switch_bb to loop_header.
6240         (clast_to_gcc_expression): Added handling of clast_reduction node.
6241         (gloog): New functionality for removing old loop.
6242         (test_dependence): Factored out from build_rdg_all_levels.
6243         (build_rdg_all_levels): Dependence testing factored out to
6244         test_dependence function.
6246         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
6247         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
6248         from graphite.c
6250 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
6252         * graphite.c (free_scop, param_index, initialize_cloog_names,
6253         nb_params_in_scop): Use name_tree map instead of just a tree
6254         for keeping track of the variable name associated to that tree.
6255         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
6256         clast_to_gcc_expression, graphite_create_iv,
6257         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
6258         graphite_stmt_to_gcc_stmt): New.
6259         (gloog): Call these.
6260         * graphite.h (struct name_tree): New.
6261         (struct scop): Use name_tree instead of tree for params.
6262         Store a vector of name_tree for new_ivs.
6263         (SCOP_NEWIVS): New.
6264         (scop_nb_params): Use name_tree instead of tree.
6266 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
6267             Sebastian Pop  <sebastian.pop@amd.com>
6269         * tree-bounds.c: New.
6270         * tree-bounds.h: New.
6271         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
6272         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
6273         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
6274         flag_mudflap.
6275         * gcc.c: Same.
6276         * toplev.c: Same.
6277         * c-cppbuiltin.c: Same.
6278         * c-pragma.c: Same.
6279         * common.opt: Same.
6280         * varasm.c: Same.
6281         * tree-outof-ssa.c: Same.
6282         * c-common.c: Same.
6283         * Makefile.in: Same.
6285 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
6286             Sebastian Pop  <sebastian.pop@amd.com>
6288         * tree-loop-distribution.c (remaining_stmts,
6289         upstream_mem_writes): Removed static variables.
6290         (copy_loop_before, create_bb_after_loop,
6291         mark_nodes_having_upstream_mem_writes, free_rdg_components,
6292         rdg_build_components, rdg_build_partitions,
6293         dump_rdg_partitions): Extern.
6294         (generate_loops_for_partition, generate_code_for_partition): Do not
6295         return a bool.
6296         (already_processed_vertex_p, predecessor_has_mem_write,
6297         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
6298         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
6299         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
6300         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
6301         Pass remaining_stmts and upstream_mem_writes as parameters.
6302         (rdg_component): Moved...
6303         (build_rdg_partition_for_component): Do not aggregate components when
6304         flag_streamize_loops is set.
6305         (gen_sequential_loops): New.
6306         (ldist_gen): Call gen_sequential_loops.
6308         * tree-pass.h (pass_loop_streamization): Declared.
6310         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
6311         basic blocks when loops structures exist.
6313         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
6315         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
6317         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
6318         eliminate_local_variables_stmt, eliminate_local_variables,
6319         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
6320         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
6321         of code delimited by two edges in the CFG.
6322         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
6323         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
6324         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
6325         the case of parallelisation of reductions.
6326         (create_loop_fn): Extern.
6327         (create_omp_parallel_region): New.
6329         * tree-data-ref.c (dump_data_dependence_relation): Don't call
6330         dump_data_reference for printing dra and drb.
6331         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
6332         RDGE_RELATION.
6333         (build_rdg): Don't call free_dependence_relations for the moment, as
6334         we attach dependence relations on each edge of the RDG.
6335         To be fixed later.
6337         * tree-data-ref.h (rdg_component): ...here.
6338         (struct rdg_edge): New field ddr_p relation.
6339         (RDGE_RELATION): New.
6340         (create_bb_after_loop, copy_loop_before,
6341         mark_nodes_having_upstream_mem_writes, rdg_build_components,
6342         rdg_build_partitions, dump_rdg_partitions,
6343         free_rdg_components): Declared.
6345         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
6346         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
6348         * tree-loop-streamization.c: New.
6350         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
6351         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
6353         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
6355         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
6357         * passes.c: Schedule pass_loop_streamization.
6359 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
6361         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
6362         update comment.
6364 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
6366         * graphite.c (dot_all_scops): Update formatting.
6367         Bbs can now be part of more than one SCoP.
6369 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
6371         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
6372         malloc problems.
6373         (loop_domain_dim): Check for unregistered toplev SCOP loop.
6374         * graphite.h (loop_to_cloog_loop): New.
6376 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6378         * graphite.c (loop_domain_dim, ref_nb_loops,
6379         loop_iteration_vector_dim): New.
6380         (build_access_matrix_with_af, build_access_matrix,
6381         initialize_dependence_polyhedron): Fixed for new matrix layout.
6382         No longer assume that all iteration domains are of the same
6383         dimensionality.
6385 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
6387         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
6388         defined in a loop at depth 0 is invariant.
6389         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
6390         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
6391         be called at loop depth 0.
6393         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
6394         a parameter.
6395         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
6396         (down_open_scop): Removed.
6397         (loop_in_scop_p): Redefined.
6398         (scop_affine_expr): New argument: scop.
6399         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
6400         a harmful statement ending a scop.
6401         (basic_block_simple_for_scop_p): New argument: scop.
6402         (get_loop_start): Removed.
6403         (new_scop): Initialize SCOP_LOOPS.
6404         (free_scop): Free SCOP_LOOPS.
6405         (succs_at_same_depth, preds_at_same_depth): New.
6406         (end_scop): Test the validity of a scop.
6407         (add_dominators_to_open_scops): New.
6408         (test_for_scop_bound): Call add_dominators_to_open_scops.
6409         Add cases for opening and closing multiple scops.
6410         (build_scops, build_scop_bbs): Iterate over basic blocks in
6411         depth first order.
6412         (build_graphite_bb): Pass scop directly.
6413         (dfs_bb_in_scop_p): New.
6414         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
6415         several times.
6416         (nb_loops_around_gb): Use loop_in_scop_p.
6417         (schedule_to_scattering): Disabled for the moment the code computing
6418         the "textual order for outer loop".
6420         * graphite.h (struct scop): New field loops.
6421         (SCOP_LOOPS): New.
6422         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
6424         * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
6426 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
6427             Sebastian Pop  <sebastian.pop@amd.com>
6429         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
6430         * common.opt (fstreamize-loops): New.
6431         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
6432         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
6433         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
6434         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
6436 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6438         * tree-data-ref.c (build_empty_rdg): New.
6439         (build_rdg): Use it.
6440         * tree-data-ref.h (build_empty_rdg): Declared.
6441         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
6442         (find_vertex_for_stmt): Removed.
6443         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
6445 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
6447         * tree-loop-distribution.c (generate_builtin): After cancelling the
6448         loop tree, also delete basic blocks.
6449         (rdg_flag_uses): Stop recursion when a vertex has already been
6450         processed.
6452 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6454         * graphite.c (build_scop_alpha): Removed.
6455         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
6456         and dump_dependence_graph to avoid compiler warnings.
6458 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6460         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
6461         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
6462         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6463         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
6464         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
6465         (initialize_dependence_polyhedron, find_vertex_for_stmt,
6466         initialize_data_dependence_polyhedron, is_empty_polyhedron,
6467         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
6468         dump_dependence_graph): New.
6469         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
6470         (GBB_ALPHA): New.
6471         (struct scop): New field loop2cloog_loop.
6472         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
6473         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
6475 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6477         * graphite.c (build_graphite_bb): Fix initialization
6478         of the graphite basic block.
6480 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
6482         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
6483         loop domain matrix.  Pass in the number of loops contained in the
6484         constraint matrix.
6485         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
6486         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
6487         loops that are not surrounding the current loop are not represented
6488         in the domain constraint matrix.
6489         (build_scop_iteration_domain): Initial domain constraint matrix
6490         contains only the eq/ineq, cst, and scop parameters columns.
6492 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6494         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
6495         (print_graphite_bb): Print scattering.
6497 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6499         * graphite.c (initialize_cloog_names): Initialize names of
6500         scattering variables.
6502 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6504         * graphite.c (dot_all_scops_1): Disable debug output while
6505         printing graph.
6507 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6509         * graphite.c (find_transform): Change cloog output language to C.
6511 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
6513         * tree-loop-distribution.c (generate_memset_zero,
6514         generate_builtin, generate_code_for_partition,
6515         rdg_flag_all_uses): New.
6516         (rdg_flag_uses): Gather in the same partition the statements defining
6517         the VUSES of the current statement.
6518         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
6519         Gather in the same partition not only the stores to the same memory
6520         access, but also the reads.
6521         (ldist_generate_loops): Renamed ldist_gen.
6523 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
6524             Tobias Grosser  <grosser@fmi.uni-passau.de>
6526         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
6527         next pointer, don't use the inner pointer.
6529 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
6531         * graphite.c (dot_all_scops, dot_all_scops_1): New.
6532         (find_transform): Call dot_all_1.
6533         * graphite.h (dot_all_scops): Declared.
6535 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
6537         * tree-loop-distribution.c: Fix apsi.f ICE.
6538         (create_bb_after_loop): New.
6539         (generate_loops_for_partition): Use it.
6540         * gfortran.dg/ldist-1.f90: New.
6542         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
6543         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
6545 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
6547         * graphite.c (find_transform): Dump cloog program sent to cloog.
6549 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
6551         * graphite.c (initialize_cloog_names): Initialize cloog
6552         iterator names.
6554 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
6556         * graphite.c (build_scop_context): Fix typo, for the matrix
6557         format: insert '0 >= 0' instead of '-1 >= 0'.
6559 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
6561         * Fix merge problems.
6563 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
6565         * graphite.c (setup_cloog_loop): Fix typo.
6567 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
6569         * doc/invoke.texi (-ftree-loop-distribution): Documented.
6570         * tree-loop-distribution.c: Reimplemented.
6571         * tree-pass.h (pass_loop_distribution): New.
6572         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
6573         print_loops.
6574         * graphds.h (struct graph): New field indexes.
6575         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6577         * tree-vect-analyze.c: Remove declaration of static functions when not
6578         needed.
6579         * tree-vectorizer.c: Same.
6580         (rename_variables_in_loop): Now extern.
6581         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
6582         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
6583         calling redirect_edge_and_branch_force.
6585         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
6587         * tree-data-ref.c: Don't include tree-chrec.h.
6588         (debug_data_dependence_relations): New.
6589         (dump_data_dependence_relation): Call dump_data_reference on data refs
6590         in the relation.
6591         (same_access_functions): Moved...
6592         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
6593         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6594         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
6595         struct rdg_vertex_info, ): New.
6596         (create_rdg_edge_for_ddr): Compute the dependence level before looking
6597         at DDR_REVERSED_P.
6598         (create_rdg_vertices): Initialize the htab of graph->indexes.
6599         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
6600         (stmts_from_loop): Don't save LABEL_EXPR.
6601         (hash_stmt_vertex_info, eq_stmt_vertex_info,
6602         hash_stmt_vertex_del): New.
6603         (build_rdg): Initialize rdg->indexes.
6604         (free_rdg, stores_from_loop, ref_base_address,
6605         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
6606         have_similar_memory_accesses_1, ref_base_address_1,
6607         remove_similar_memory_refs): New.
6609         * tree-data-ref.h: Include tree-chrec.h.
6610         (debug_data_dependence_relations): Declared.
6611         (same_access_functions): ...here.  Now static inline.
6612         (ddr_is_anti_dependent, ddrs_have_anti_deps,
6613         ddr_dependence_level): New.
6614         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
6615         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
6616         RDG_MEM_READS_STMT): New.
6617         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6618         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
6619         rdg_vertex_for_stmt): Declared.
6620         (struct rdg_edge): New field level.
6621         (RDGE_LEVEL, free_rdg): New.
6622         (stores_from_loop, remove_similar_memory_refs,
6623         rdg_defs_used_in_other_loops_p,
6624         have_similar_memory_accesses): Declared.
6625         (rdg_has_similar_memory_accesses): New.
6627         * lambda.h (dependence_level): New.
6628         * common.opt (ftree-loop-distribution): New.
6629         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
6630         (print_loop_ir): Renamed print_loops.
6631         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
6632         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
6633         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
6634         (tree-loop-distribution.o): Added.
6635         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
6636         (mark_virtual_ops_in_bb): New.
6637         (print_loops_bb, debug_loop_num, debug_loop): New.
6638         * passes.c: Scheduled pass_loop_distribution.
6640 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6642         * graphite.c (scan_tree_for_params): Correct the number of columns
6643         for polylib format.
6644         (nb_flat_iterator): New.
6645         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
6646         (build_scop_iteration_domain): Correct the number of columns for
6647         polylib format.
6649 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
6651         * Merge from mainline (129697:130800).
6653 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
6655         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
6656         dominated by SCoP's exit.
6657         (graphite_transform_loops): Compute post dominators.
6659 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
6661         * Merge from mainline (127169:129697).
6663 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
6665         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
6666         parameter for the basic block that contains the expression.  Use
6667         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
6668         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
6669         the expression.
6670         * graphite.h (gbb_loop): New.
6671         (GBB_LOOP): Removed.
6673 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
6675         * Makefile.in: Fix merge problem.
6677 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
6679         * Merge from mainline (125309:127169).
6680         * tree-loop-distribution.c: Disabled.
6682 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
6684         * Merge from mainline (r123693:125309).
6686 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
6688         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
6689         correct_modify_p
6690         (correct_modify_p, check_statements, number_of_lvalue_uses,
6691         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
6692         instead of MODIFY_EXPR.
6693         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
6694         and push new edges.
6696 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
6698         * tree-loop-distribution.c (struct rdg): Replace arrays by
6699         VECs for edges and vertices.
6700         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
6701         (RDGV_NB_PARTITIONS): New.
6702         (PRDG_NBV, PRDG_NBE): Removed.
6703         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
6704         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
6705         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
6707 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
6708             Sebastian Pop  <sebpop@gmail.com>
6710         * doc/invoke.texi (-ftree-loop-distribution): Document.
6711         * tree-loop-distribution.c: New file.
6712         * tree-pass.h (pass_loop_distribution): Declared.
6713         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6714         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
6715         and set reversed_p.
6716         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
6717         (DDR_REVERSED_P): New.
6718         * common.opt (-ftree-loop-distribution): New.
6719         * tree-flow.h (distribute_loops): Declared.
6720         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
6721         * passes.c (init_optimization_passes): Schedule loop distribution.
6723 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
6725         * graphite.c (print_graphite_bb): Don't call dump_data_references.
6726         (print_scop): Don't print when scop is NULL.
6727         (build_scop_context, find_transform): Don't output to stderr.
6729 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
6731         * tree-data-ref.c: Don't include graphite.h.
6732         Comment out the code for printing data reference's scop.
6733         (build_access_matrix_with_af): Moved...
6734         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
6735         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
6736         (print_graphite_bb): Print basic block's schedule.
6737         (print_scop): Don't print the schedule, call cloog's pretty printer.
6738         (bb_in_scop_p): A basic block is in a scop only if it is both
6739         dominated and postdominated by the scop's entry and exit basic blocks.
6740         (function_parameter_p): New.
6741         (invariant_in_scop_p): Use function_parameter_p.
6742         (new_scop, save_scop): New.
6743         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
6744         save_scop.
6745         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
6746         (loop_in_scop_p): New.
6747         (scop_record_loop): Use loop_in_scop_p.
6748         (build_scop_domain): Renamed build_scop_iteration_domain.
6749         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
6750         nb_params_in_scop, build_scop_context, first_loop_in_scop,
6751         setup_cloog_loop, dot_scop_1, dot_scop): New.
6752         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
6753         (struct scop): Add a pointer to cloog's representation of a program.
6755 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
6757         * doc/invoke.texi (-ftree-check-verbose): Renamed
6758         -ftree-checks-verbose.
6759         * common.opt (flag_tree_check_verbose): Renamed
6760         flag_tree_checks_verbose.
6761         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
6763 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
6765         * configure: Regenerated.
6766         * config.in: Regenerated.
6767         * tree-ssa-loop.c (graphite_transforms): Execute
6768         graphite_transform_loops only when HAVE_cloog.
6769         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
6770         * graphite.c: Include polylibgmp.h and cloog.h.
6771         (graphite_transform_loops): Removed loops parameter.
6772         * tree-flow.h (graphite_transform_loops): Update declaration.
6773         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
6774         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
6775         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
6776         (OBJS-common): Remove dependence on graphite.o.
6777         (BACKEND): Depend on @GRAPHITE@.
6779 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
6781         * doc/invoke.texi (-ftree-check-verbose): Documented.
6782         * gcc.dg/tree-checker/tree-checks-1.c: New.
6783         * gcc.dg/tree-checker/tree-checks-2.c: New.
6784         * gcc.dg/tree-checker/tree-checks-3.c: New.
6785         * gcc.dg/tree-checker/tree-checks-4.c: New.
6786         * gcc.dg/tree-checker/tree-checks.exp: New.
6787         * gcc.dg/tree-checker/condates.crp: New.
6788         * common.opt (ftree-checks-verbose): New.
6789         * tree-check.c (tree_check_warning): Move extra stderr output
6790         under control of flag_tree_check_verbose.
6792 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
6794         * tree-match.c: Fix comments formatting.
6795         * tree-match.h: Fix comments formatting.
6796         * tree-check.c: Fix comments formatting.
6797         (tree_check_init): Restructure.
6799 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
6801         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
6803 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
6805         * Merge from mainline (r120733:123693).
6807 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
6809         * condate.y: New file.
6810         * tree-match.h (struct patt_info_s): New field sign.
6811         (struct condate_s): New field msg.
6812         (normalize_condate, name_condate, add_condate): New.
6813         (conds[], condate_parse): Made extern.
6814         * tree-check.c (tree_check_warning): First arg changed to cond;
6815         warning reformatted.
6816         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
6817         (tree_scan): New.
6818         (tree_check): Process trivial condates.
6819         (read_delimited_string): Removed.
6820         (print_cond): Print name and msg.
6821         (conds[]): Made extern.
6822         (parse_tree_check_file_once): Rewritten to use the parser in
6823         condate.y.
6824         Processing of option --tree_check_string moved to tree_scan().
6825         * Makefile.in: Added condate.y
6827 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
6829         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
6830         Use VECs instead of varrays.
6831         * diagnostic.h (lazy_dump_generic_node): Update declaration.
6832         * Makefile.in (pretty-print.o): Depend on vec.h.
6833         * pretty-print.c: Include tree.h and vec.h.
6834         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
6835         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
6836         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
6837         pp_free_list): Use VECs instead of varrays.
6838         * pretty-print.h: Do not include varray.h.
6839         (struct tree_chunk_s): Declaration moved before its use.
6840         (output_buffer): Rename varray field to chunks.
6841         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
6842         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
6843         save_global_holes): Use VECs instead of varrays.
6844         * tree-match.h: Declare VECs of cfg_node, and hole_p.
6845         * tree-check.c (scan_cfg_stmts, push_node,
6846         print_matching_stmt): Removed.
6847         (tree_check_instance, push_global_holes_if_new, tree_check,
6848         execute_tree_check): Use VECs instead of varrays.
6849         (gate_tree_check): Don't execute the CFG check when basic_block_info
6850         is not available.
6852 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
6854         * Merge from mainline (r115016:120733).
6856 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
6858         * Merge from mainline (r117632:117661).
6860 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
6862         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
6863         * tree-pass.h (TDF_DEBUG, debug_p): New.
6864         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
6865         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
6866         get_loop_exit_condition, analyze_evolution_in_loop,
6867         analyze_initial_condition, analyze_scalar_evolution,
6868         instantiate_parameters, number_of_latch_executions): Use debug_p.
6869         * tree-chrec.c (chrec_apply): Use debug_p.
6870         * tree-data-ref.c: Include graphite.h.
6871         (dump_data_reference): Print also the access matrix.
6872         (analyze_array, analyze_indirect_ref, init_data_ref,
6873         analyze_offset_expr, address_analysis, object_analysis,
6874         create_data_ref, finalize_ddr_dependent,
6875         non_affine_dependence_relation, analyze_ziv_subscript,
6876         analyze_siv_subscript_cst_affine,
6877         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
6878         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
6879         analyze_miv_subscript, analyze_overlapping_iterations,
6880         build_classic_dist_vector, subscript_dependence_tester,
6881         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
6882         (build_access_matrix_with_af): No longer static.
6883         * tree-data-ref.h (scop_p): ... declaration here.
6884         (data_reference.scop): New field.
6885         (DR_SCOP, DR_ACCESS_MATRIX): New.
6886         (build_access_matrix_with_af, dr_num_subscripts): Declared.
6887         * graphite.c (print_graphite_bb): Call dump_data_references.
6888         (print_scop): Use scop_nb_loops and scop_dim_domain.
6889         (test_for_scop_bound): Use debug_p.
6890         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
6891         scop_nb_params.
6892         (scop_loop_index): Moved...
6893         (scop_record_loop): New.
6894         (build_scop_loop_nests): Use scop_record_loop.
6895         (build_scop_domain): Use scop_dim_domain.
6896         (build_access_matrix): Implemented.
6897         (build_scop_canonical_schedules): Use scop_nb_loops.
6898         (build_graphite_bb): Initialize GBB_SCOP.
6899         * graphite.h (scop_p): Moved...
6900         (graphite_bb.scop): New field.
6901         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
6902         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
6903         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
6904         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
6905         scop_loop_index): New.
6906         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
6908 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
6910         * Merge from mainline (r117661:120450).
6912 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
6914         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
6915         at the first declaration outside the varying loop, instantiate as
6916         far as possible.
6917         * tree-chrec.c (for_each_scev_op): New.
6918         * tree-chrec.h (for_each_scev_op): Declared.
6919         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
6920         * tree-data-ref.c (get_references_in_stmt,
6921         find_data_references_in_stmt): New, from trunk.
6922         (find_data_references_in_loop): Use get_references_in_stmt
6923         and find_data_references_in_loop, modified as in trunk.
6924         (build_access_matrix_with_af): New.
6925         * tree-data-ref.h (data_reference): Add a field access_matrix.
6926         (data_ref_loc): New, as in trunk.
6927         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
6928         invariant_in_scop_p, param_index, scan_tree_for_params,
6929         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
6930         idx_record_param, idx_record_params, build_access_matrix,
6931         build_scop_data_accesses, build_scop_canonical_schedules,
6932         build_graphite_bb, build_scop_bbs, find_params_in_bb,
6933         build_scop_params): New.
6934         * graphite.h (graphite_bb): New.
6935         (scop): Add fields static_schedule, params, loop_nest,
6936         iteration_domain.
6937         * lambda.h: Declare vecs of lambda_matrix.
6938         * tree-flow.h (print_loop_ir_bb): Declared.
6939         * tree-cfg.c (print_loop_ir_bb): New.
6940         (print_loop): Use print_loop_ir_bb.
6942 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
6944         * Merge from mainline (r115016:117632).
6946 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
6948         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
6949         break due to a warning.
6951 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
6953         * graphite.c (print_scops, debug_scops): New.
6954         (graphite_transform): Renamed graphite_find_transform.
6955         * graphite.h (debug_scops): Declared.
6957 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
6959         * tree-match.c: Reformat following the GNU style.
6960         * tree-match.h: Reformat following the GNU style.
6961         * tree-pattern.h: Removed empty file.
6962         * Makefile.in: Remove references to tree-pattern.h.
6963         * tree-check.c: Reformat following the GNU style.
6964         (execute_tree_check): Move gate condition code to...
6965         (gate_tree_check): ...here.  New function.
6966         (pass_check): Use the gate function.
6968 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
6970         * tree-pattern.h: New. Tree pattern matching and checking using
6971         concrete syntax.
6972         * tree-check.c: New. Tree/CFG checking pass.
6973         * tree-match.c: New. Library for tree pattern matching.
6974         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
6975         * toplev.c, flags.h: Add globals for tree-check pass.
6976         * Makefile.in: Integrate the files in tree-check pass.
6977         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
6978         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
6979         Introduce a "lazy" pretty-print mode.
6980         * tree.c, tree.h: Add tree_name.
6982 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
6984         * doc/invoke.texi (-fgraphite): Correct typo.
6985         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
6986         use of print_loop_ir.
6987         * gcc.dg/graphite/scop-1.c: New.
6988         * gcc.dg/graphite/scop-2.c: New.
6989         * gcc.dg/graphite/graphite.exp: New.
6990         * graphite.c: Include domwalk.h.
6991         (print_scop): Print only the entry and exit blocks.
6992         (debug_scop): No longer static.
6993         (affine_expr): Fix formating.  Return also true when the expression is
6994         constant.
6995         (stmt_simple_for_scop_p): Fix formating.
6996         (build_scops): Use domwalk.
6997         (get_loop_start, end_scop, test_for_scop_bound): New.
6998         (graphite_transform_loops): Avoid printing on stderr.
6999         * graphite.h (debug_scop): Declared.
7000         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
7001         * Makefile.in (graphite.o): Depend on domwalk.h.
7002         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
7003         declarations for static functions.
7004         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
7005         controlling output verbosity.
7007 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
7008             Plesco Alexandru  <shurikx@gmail.com>
7010         * doc/invoke.texi (-fgraphite): Document.
7011         * tree-pass.h (pass_graphite_transforms): Declared.
7012         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
7013         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
7014         (pass_graphite_transforms): Defined.
7015         * tree-data-ref.c (free_data_ref, data_reference): Extern.
7016         * tree-data-ref.h (free_data_ref, data_reference): Declared.
7017         * graphite.c, graphite.h: New.
7018         * common.opt (fgraphite): Declared.
7019         * tree-flow.h (graphite_transform_loops): Declared.
7020         * Makefile.in (OBJS-common): Add graphite.o.
7021         (graphite.o): New rule.
7022         * passes.c (pass_graphite_transforms): Scheduled.