OSDN Git Service

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