OSDN Git Service

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