OSDN Git Service

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