OSDN Git Service

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