OSDN Git Service

Fix PR43083: Do not handle regions ending with multiple edges on the exit BB.
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
2
3         PR middle-end/43083
4         * graphite-scop-detection.c (create_single_exit_edge): Move
5         the call to find_single_exit_edge to....
6         (create_sese_edges): ...here.  Don't handle multiple edges
7         exiting the function.
8         (build_graphite_scops): Don't handle multiple edges
9         exiting the function.
10
11         * gcc.dg/graphite/pr43083.c: New.
12
13 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
14
15         PR middle-end/43097
16         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
17         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
18
19         * gfortran.dg/graphite/pr43097.f: New.
20
21 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
22             Manuel López-Ibáñez  <manu@gcc.gnu.org>
23
24         PR middle-end/43140
25         * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
26
27 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
28
29         PR middle-end/43026
30         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
31
32         * g++.dg/graphite/pr43026.C: New.
33
34 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
35
36         PR middle-end/43012
37         * gcc.dg/graphite/pr43012.c: New.
38
39 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
40
41         * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
42 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
43
44         * g++.dg/graphite/pr42930.C: New.
45
46 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
47
48         PR middle-end/42930
49         * graphite-scop-detection.c (graphite_can_represent_scev): Call
50         graphite_can_represent_init for MULT_EXPR.
51
52 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
53
54         PR middle-end/42914
55         PR middle-end/42530
56         * graphite-sese-to-poly.c (remove_phi): New.
57         (translate_scalar_reduction_to_array): Call remove_phi.
58
59         * gcc.dg/graphite/pr42530.c: New.
60         * gcc.dg/graphite/pr42914.c: New.
61
62 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
63
64         PR middle-end/42771
65         * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
66         * graphite-clast-to-gimple.h (gloog): Update declaration.
67         * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
68         * graphite-poly.h (struct poly_bb): Add missing comments.
69         (struct scop): Add poly_scop_p field.
70         (POLY_SCOP_P): New.
71         * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
72         * graphite.c (graphite_transform_loops): Build the polyhedral
73         representation for each scop before code generation.
74         * sese.c (rename_variables_in_operand): Removed.
75         (rename_variables_in_expr): Return the renamed expression.
76         (rename_sese_parameters): New.
77         * sese.h (rename_sese_parameters): Declared.
78
79         * gcc.dg/graphite/pr42771.c: New.
80
81 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
82
83         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
84         return 0 from main.
85         * gcc.dg/graphite/block-1.c: Same.
86         * gcc.dg/graphite/block-3.c: Same.
87         * gcc.dg/graphite/block-4.c: Same.
88         * gcc.dg/graphite/block-5.c: Same.
89         * gcc.dg/graphite/block-6.c: Same.
90         * gcc.dg/graphite/block-7.c: Same.
91         * gcc.dg/graphite/interchange-0.c: Same.
92         * gcc.dg/graphite/interchange-1.c: Same.
93         * gcc.dg/graphite/interchange-10.c: Same.
94         * gcc.dg/graphite/interchange-11.c: Same.
95         * gcc.dg/graphite/interchange-12.c: Same.
96         * gcc.dg/graphite/interchange-2.c: Same.
97         * gcc.dg/graphite/interchange-3.c: Same.
98         * gcc.dg/graphite/interchange-4.c: Same.
99         * gcc.dg/graphite/interchange-5.c: Same.
100         * gcc.dg/graphite/interchange-6.c: Same.
101         * gcc.dg/graphite/interchange-7.c: Same.
102         * gcc.dg/graphite/interchange-8.c: Same.
103         * gcc.dg/graphite/interchange-9.c: Same.
104         * gcc.dg/graphite/interchange-mvt.c: Same.
105
106 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
107
108         * gfortran.dg/graphite/id-19.f: New.
109         * gfortran.dg/graphite/pr14741.f90: New.
110         * gfortran.dg/graphite/pr41924.f90: New.
111         * gfortran.dg/graphite/run-id-2.f90: New.
112
113 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
114
115         PR middle-end/42988
116         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
117         to unknown_dependence.
118         (graphite_legal_transform_dr): Handle the unknown_dependence.
119         (graphite_carried_dependence_level_k): Same.
120
121 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
122
123         * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
124
125 2010-02-05  Sebastian Pop  <sebastian.pop@amd.com>
126             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
127
128         PR middle-end/42637
129         * graphite-dependences.c (build_lexicographical_constraint): Return
130         a union of dependence polyhedra.
131         (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
132
133         * gcc.dg/graphite/block-0.c: Enable runtime check.  XFAILed.
134         * gcc.dg/graphite/block-4.c: Same.
135         * gcc.dg/graphite/block-7.c: Same.
136         * gcc.dg/graphite/interchange-12.c: Same.
137         * gcc.dg/graphite/interchange-mvt.c: Same.
138         * gfortran.dg/graphite/interchange-1.f: XFAILed.
139         * gfortran.dg/graphite/interchange-3.f90: XFAILed.
140         * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
141
142 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
143
144         * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
145         the execution check to FAIL.  This testcase is miscompiled by Graphite
146         and the check should be re-enabled.
147         * gcc.dg/graphite/interchange-mvt.c: Same.
148         * gcc.dg/graphite/block-0.c: Same.
149         * gcc.dg/graphite/block-4.c: Same.
150         * gcc.dg/graphite/block-7.c: Same.
151
152 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
153
154         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
155         * gcc.dg/graphite/scop-0.c: Fix spaces.
156         * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
157         * gfortran.dg/graphite/block-2.f: Same.
158         * gfortran.dg/graphite/block-3.f90: Same.
159         * gfortran.dg/graphite/block-4.f90: Same.
160         * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
161         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
162
163 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
164
165         * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
166         PDDR_ORIGINAL_SCATTERING_P.
167         (pddr_is_empty): Rewritten.
168         (print_dependence_polyhedron_layout): New.
169         (print_pddr): New.
170         (debug_pddr): New.
171         (build_alias_set_powerset): Moved up.
172         (poly_drs_may_alias_p): Moved up.
173         (lexicographically_gt_p): Removed.
174         (build_lexicographically_gt_constraint): Renamed
175         build_lexicographical_constraint, reimplemented.
176         (dependence_polyhedron_1): Simplified parameters.
177         (dependence_polyhedron): Same.  Keep along empty PDDRs
178         to make efficient use of the cache.
179         (reduction_dr_p): Compute the PBBs don't pass them as parameters.
180         (graphite_legal_transform_dr): Rewritten.
181         (graphite_legal_transform_bb): Pass fewer arguments to
182         graphite_legal_transform_dr.
183         (graphite_carried_dependence_level_k): Simplified implementation.
184         (dot_original_deps_stmt_1): Call dependence_polyhedron.
185         (dot_transformed_deps_stmt_1): Same.
186         (dot_original_deps): Same.
187         (dot_transformed_deps): Same.
188         * graphite-dependences.h (struct poly_ddr): Added a new field
189         original_scattering_p.
190         (PDDR_ORIGINAL_SCATTERING_P): New.
191         (print_pddr): Declared.
192         (debug_pddr): Declared.
193         * graphite-ppl.c: Clarify comment.
194         * sese.h (print_gimple_bb): Removed unused declaration.
195         (debug_gbb): Same.
196
197 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
198
199         * g++.dg/graphite/graphite.exp: Rewritten.
200         * gcc.dg/graphite/graphite.exp: Rewritten.
201         * gfortran.dg/graphite/graphite.exp: Rewritten.
202         * gcc.dg/graphite/block-0.c: Added runtime test.
203         * gcc.dg/graphite/block-1.c: Same.
204         * gcc.dg/graphite/block-3.c: Same.
205         * gcc.dg/graphite/block-4.c: Same.
206         * gcc.dg/graphite/block-5.c: Same.
207         * gcc.dg/graphite/block-6.c: Same.
208         * gcc.dg/graphite/block-7.c: Same.
209         * gcc.dg/graphite/interchange-0.c: Same.
210         * gcc.dg/graphite/interchange-1.c: Same.
211         * gcc.dg/graphite/interchange-10.c: Same.
212         * gcc.dg/graphite/interchange-11.c: Same.
213         * gcc.dg/graphite/interchange-12.c: Same.
214         * gcc.dg/graphite/interchange-2.c: Same.
215         * gcc.dg/graphite/interchange-3.c: Same.
216         * gcc.dg/graphite/interchange-4.c: Same.
217         * gcc.dg/graphite/interchange-5.c: Same.
218         * gcc.dg/graphite/interchange-6.c: Same.
219         * gcc.dg/graphite/interchange-7.c: Same.
220         * gcc.dg/graphite/interchange-8.c: Same.
221         * gcc.dg/graphite/interchange-9.c: Same.
222         * gcc.dg/graphite/interchange-mvt.c: Same.
223         * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
224
225 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
226
227         * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
228           background.
229
230 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
231
232         * common.opt: Add -fgraphite-cloog-opts.
233         * graphite-clast-to-gimple.c (set_cloog_options): Same.
234         * opts.c (decode_options): Same.
235
236 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
237
238         * gcc.dg/graphite/id-17.c: New.
239         * gcc.dg/graphite/pr41888.c: New.
240         * gcc.dg/graphite/scop-22.c: New.
241         * gfortran.dg/graphite/pr40982.f90: New.
242
243 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
244
245         * graphite-dependences.c: Clarify comments.
246         (build_pddr): Add an extra parameter direction.
247         (graphite_legal_transform_dr): Use build_pddr.
248         (dot_original_deps_stmt_1): Update use of build_pddr.
249         (dot_transformed_deps_stmt_1): Same.
250         (dot_original_deps): Same.
251         (dot_transformed_deps): Same.
252
253         * gcc.dg/graphite/interchange-12.c: New.
254         * gcc.dg/graphite/block-7.c: New.
255
256 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
257
258         * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
259         (pddr_transformed_scattering): Removed.
260         (graphite_legal_transform_dr): Use build_pddr.
261         (dot_original_deps_stmt_1): Same.
262         (dot_transformed_deps_stmt_1): Same.
263         (dot_original_deps): Same.
264         (dot_transformed_deps): Same.
265
266 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
267
268         * graphite-dependences.c (lexicographically_gt_p): Add comments.
269         (build_lexicographically_gt_constraint): Same.
270         (dependence_polyhedron_1): Same.
271         (dependence_polyhedron): Same.
272
273 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
274
275         * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
276         (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
277         (lexicographically_gt_p): Change type of direction to int.
278         (build_lexicographically_gt_constraint): Same.
279         (dependence_polyhedron_1): Same.
280         (dependence_polyhedron): Same.
281         (pddr_original_scattering): Use integers for direction.
282         (pddr_transformed_scattering): Same.
283         (graphite_legal_transform_dr): Same.
284         (graphite_carried_dependence_level_k): Same.
285
286 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
287
288         * graphite-dependences.c (build_pairwise_constraint): Renamed
289         ppl_build_relation.  Moved...
290         (dr_equality_constraints): Use ppl_build_relation.
291         (build_pairwise_scheduling_equality): Same.
292         (build_pairwise_scheduling_inequality): Same.
293         * graphite-ppl.c (ppl_build_relation): ...here.
294         * graphite-ppl.h (ppl_build_relation): Declared.
295
296 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
297
298         PR middle-end/42681
299         * graphite-clast-to-gimple.c (gloog_error): New static variable.
300         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
301         Set gloog_error when such an expression failed to be built.
302         (translate_clast): Early return when gloog_error is set.
303         (gloog): Clear gloog_error.  When gloog_error is set, call
304         set_ifsese_condition to enable the original code.  Return the status
305         of the code generation based on gloog_error.
306         * sese.c (set_ifsese_condition): New.
307         * sese.h (set_ifsese_condition): Declared.
308
309         * g++.dg/graphite/pr42681.C: New.
310
311 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
312
313         PR middle-end/42732
314         * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
315         rename_nb_iterations.
316         * sese.c (rename_variables_in_operand): New.
317         (rename_variables_in_expr): New.
318         (rename_nb_iterations): New.
319         (sese_adjust_liveout_phis): Update the rename_map.
320         * sese.h (rename_nb_iterations): Declared.
321         * tree-scalar-evolution.c (scev_reset_htab): New.
322         (scev_reset): Call scev_reset_htab.
323         * tree-scalar-evolution.h (scev_reset_htab): Declared.
324
325         * gfortran.dg/graphite/pr42732.f: New.
326
327 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
328
329         PR middle-end/42393
330         * graphite-clast-to-gimple.c: Fix formatting.
331         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
332         (expr_defined_in_loop_p): New.
333         (add_loop_exit_phis): Also handle full expressions: remove from
334         the rename_map the expressions defined in the loop that we're closing.
335
336         * gfortran.dg/graphite/pr42393-1.f90: New.
337         * gfortran.dg/graphite/pr42393.f90: Add new flags
338         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
339         make this testcase useful in the Graphite branch.
340
341 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
342
343         * graphite-scop-detection.c (exclude_component_ref): Removed.
344         (is_simple_operand): Removed.
345         (stmt_simple_for_scop_p): Remove use of is_simple_operand.
346
347 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
348
349         PR middle-end/42221
350         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
351         the array indexing of ADDR_EXPRs.
352
353         * gcc.dg/graphite/pr42221.c: New.
354
355 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
356
357         PR middle-end/42521
358         * graphite.c (graphite_finalize): Call scev_reset.
359         (graphite_transform_loops): Do not call scev_reset between the code
360         generation of scops.
361
362         * gcc.dg/graphite/pr42521.c: New.
363
364 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
365
366         * graphite-interchange.c (memory_stride_in_loop): Renamed
367         pdr_stride_in_loop.
368         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
369         (memory_strides_in_loop): Memoize the memory strides per loop.
370         (lst_interchange_profitable_p): Do not initialize to zero the memory
371         strides.
372         * graphite-poly.h (struct lst): Add a field memory_strides.
373         (LST_LOOP_MEMORY_STRIDES): New.
374         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
375         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
376
377 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
378
379         * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
380         memory_strides_in_loop.  Gather memory strides on a whole loop.
381         (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
382         (lst_interchange_profitable_p): Removed.
383         (lst_try_interchange_loops): Call lst_interchange_profitable_p.
384
385 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
386
387         Revert patch 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
388         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
389         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
390         Remove context_loop and level.
391
392 2010-01-07  Richard Guenther  <rguenther@suse.de>
393
394         PR tree-optimization/42641
395         * sese.c (rename_map_elt_info): Use the SSA name version, do
396         not hash pointers.
397
398 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
399
400         * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
401         blocked" only when both the strip mine and the interchange have
402         been applied.
403
404         * gcc.dg/graphite/block-2.c: Removed.
405         * gcc.dg/graphite/block-3.c: Add scan pattern.
406         * gcc.dg/graphite/block-4.c: Same.
407         * gcc.dg/graphite/block-5.c: Same.
408         * gcc.dg/graphite/block-6.c: Same.
409
410 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
411
412         * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
413         before allocating a new one.
414         (copy_renames): Check that slot is not NULL.
415         (mark_bb_with_pbb): Same.
416         (compute_cloog_iv_types_1): Same.
417         * graphite-interchange.c (lst_perfect_nestify): Free the before,
418         nest, and after LSTs.
419         (lst_try_interchange_loops): Same.
420
421 2010-01-05  Sebastian Pop  <sebastian.pop@amd.com>
422
423         PR middle-end/42178
424         * graphite-interchange.c (lst_try_interchange_loops): Do not return
425         the before, nest, and after LSTs.
426         (lst_try_interchange): Removed.
427         (lst_interchange_select_inner): Do not iterate over the LSTs if they
428         were modified.
429         (lst_interchange_select_outer): Apply interchange on the outer loop
430         until there are no more changes in the inner loops.
431
432 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
433
434         Revert patch fixing PR middle-end/42221.
435
436 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
437
438         PR middle-end/42180
439         * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
440         GIMPLE_CALL.
441
442         * gfortran.dg/graphite/pr42180.f90: Add compile flags.
443
444 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
445
446         PR middle-end/42180
447         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
448         that contain only one statement.
449
450         * gfortran.dg/graphite/pr42180.f90: New.
451
452 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
453
454         PR middle-end/42393
455         * gfortran.dg/graphite/pr42393.f90: New.
456
457 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
458
459         PR middle-end/42186
460         * gfortran.dg/graphite/pr42186.f90: New.
461
462 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
463
464         PR middle-end/42205
465         * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
466         Insert the reduction copy in the same block as the phi node.
467         (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
468
469         * gcc.dg/graphite/pr42205-1.c: New.
470         * gcc.dg/graphite/pr42205-2.c: New.
471
472 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
473
474         PR middle-end/42221
475         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
476         the array indexing of ADDR_EXPRs.
477
478         * gcc.dg/graphite/pr42221.c: New.
479
480 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
481
482         PR middle-end/42178
483         PR middle-end/42334
484         * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
485         index.  Call lst_interchange_select_inner only once.
486         (lst_interchange_select_inner): Update use of lst_try_interchange.
487         (lst_interchange_select_outer): Update.
488
489 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
490
491         PR middle-end/42178
492         PR middle-end/42334
493         * graphite-interchange.c (lst_try_interchange): Do not increment the
494         the OUTER index when there is no AFTER kernel.  Do not increment the
495         OUTER index for after processing the AFTER kernel.
496         (lst_interchange_select_inner): Call lst_try_interchange only on loops.
497         (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
498         index.  Do not pass to lst_interchange_select_inner the OUTER index.
499         (scop_do_interchange): Update use of lst_interchange_select_outer.
500
501         * gfortran.dg/graphite/graphite.exp
502         (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
503         * gfortran.dg/graphite/interchange-1.f: Add comment.  Clean
504         the graphite dump file.
505         * gfortran.dg/graphite/interchange-2.f: Same.
506         * gfortran.dg/graphite/pr42334-1.f: New.
507
508 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
509
510         PR middle-end/42178
511         PR middle-end/42334
512         * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
513         that are empty.
514         (lst_do_interchange_1): Renamed lst_interchange_select_inner.
515         (lst_try_interchange): Reimplemented.
516         (lst_interchange_select_inner): Same.
517         (lst_do_interchange): Renamed lst_interchange_select_outer.
518         Reimplemented.
519         (scop_do_interchange): Update use of lst_interchange_select_outer.
520
521         * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
522         * gcc.dg/graphite/block-0.c: Un-XFAILed.
523         * gcc.dg/graphite/pr42211.c: New.
524         * gfortran.dg/graphite/pr42334.f90: New.
525
526 2009-12-14  Sebastian Pop  <sebastian.pop@amd.com>
527
528         PR middle-end/42181
529         * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
530         carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
531
532         * gfortran.dg/graphite/pr42181.f90: New.
533
534 2009-12-12  Sebastian Pop  <sebpop@gmail.com>
535
536         PR middle-end/42284
537         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
538         insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
539         (detect_commutative_reduction_arg): Simplified.
540         (detect_commutative_reduction): Early return when the argument of
541         the close phi is not of an SSA_NAME.
542
543         * gcc.dg/graphite/pr42284.c: New.
544
545 2009-12-11  Alexander Monakov  <amonakov@ispras.ru>
546
547         * dbgcnt.def (graphite_scop): New counter.
548         * graphite.c: Include dbgcnt.h
549         (graphite_transform_loops): Use new counter to limit transformations.
550
551 2009-12-08  Sebastian Pop  <sebpop@gmail.com>
552
553         PR middle-end/42285
554         * graphite-scop-detection.c (graphite_can_represent_init): Also
555         handle more complex MULT_EXPRs containing parameters by recursion
556         on the structure.
557
558         * gfortran.dg/graphite/pr42285.f90: New.
559
560 2009-12-01  Tobias Grosser  <grosser@fim.uni-passau.de>
561
562         * g++.dg/graphite/pr42130.C: Fix type.
563
564 2009-11-29  Alexander Monakov <amonakov@gcc.gnu.org>
565
566         * g++.dg/graphite/pr42130.C: Correct testcase.
567
568 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
569
570         * Merge from mainline (154493:154734).
571
572 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
573
574         * Merge from mainline (151362:154491).
575
576 2009-11-24  Tobias Grosser  <grosser@fim.uni-passau.de>
577
578         * graphite-clast-to-gimple.c (try_mark_loop_parallel,
579         graphite_create_new_loop_guard, translate_clast_for): Fix comments.
580
581 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
582
583         PR middle-end/42130
584         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
585         translate_clast_for_loop): New.
586         (translate_clast_for): Add a condition around the loop, to do not
587         execute loops with zero iterations.
588         * g++.dg/graphite/pr42130.C: New.
589         * gcc.dg/graphite/pr35356-2.c: Adapt.
590
591 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
592
593         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
594         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
595         Remove context_loop and level.
596
597 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
598
599         * graphite-clast-to-gimple.c (translate_clast_user,
600         translate_clast_for, translate_clast_guard): Simplify and move common
601         elements to translate_clast().
602         (translate_clast): Simplify and get common elements.
603
604 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
605
606         * graphite-clast-to-gimple.c (translate_clast_user,
607         translate_clast_for, translate_clast_guard): Split out of
608         translate_clast.
609
610 2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>
611
612         * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
613         clast_name_to_index, save_clast_name_index, debug_clast_name_index,
614         debug_clast_name_indexes_1, debug_clast_name_indexes,
615         clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
616         (clast_name_to_gcc, clast_to_gcc_expression,
617         clast_to_gcc_expression_red, gcc_type_for_clast_expr,
618         gcc_type_for_clast_eq, graphite_translate_clast_equation,
619         graphite_create_guard_cond_expr, graphite_create_new_loop,
620         translate_clast): Add params_index.
621         (initialize_cloog_names): Create parameter strings from scratch, do
622         not reference other strings.
623         (create_params_index): New.
624         (gloog): Initialize params_index.
625         * graphite-scop-detection (free_scops_1): Removed.
626         (limit_scops): Use normal free_scops.
627         * graphite-sese-to-poly.c (save_var_names): Removed.
628         (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
629         and SESE_PARAMS_INDEX.
630         * sese.c (new_sese, free_sese): Dito.
631         * sese.h (struct sese): Remove params_index, params_names.
632         (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
633
634 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
635
636         Revert the following patch from 2009-09-14:
637         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
638         tree-scalar-evolution.h, and then tree-data-ref.h.
639         * graphite-clast-to-gimple.c: Same.
640         * graphite-dependences.c: Same.
641         * graphite-interchange.c: Same.
642         * graphite-poly.c: Same.
643         * graphite-scop-detection.c: Same.
644         * graphite-sese-to-poly.c: Same.
645         * graphite.c: Same.
646         * lambda-code.c: Same.
647         * matrix-reorg.c: Same.
648         * tree-data-ref.c: Same.
649         * tree-if-conv.c: Same.
650         * tree-loop-distribu: Same.: Same.
651         * tree-loop-linear.c: Same.
652         * tree-parloops.c: Same.
653         * tree-predcom.c: Same.
654         * tree-vect-patterns.c: Same.
655
656 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
657
658         Revert patch from 2009-09-14.
659         * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
660         passes at -O1 and below.
661
662 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
663
664         PR middle-end/40281
665         * gcc.dg/graphite/pr40281.c: New.
666
667         * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
668         evolutions should not variate in inner loops.
669
670 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
671
672         PR middle-end/42050
673         * gfortran.dg/graphite/pr42050.f90: New.
674
675 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
676
677         * graphite-interchange.c (memory_strides_in_loop_depth): New.
678         (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
679
680 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
681
682         * graphite-blocking.c (scop_do_block): New.
683         * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
684         * graphite-poly.h (scop_do_block): Declared.
685
686 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
687
688         * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
689         depth is the loop nesting depth in the LST.  Call psct_dynamic_dim
690         to transform depth into the time_depth before calling
691         pbb_number_of_iterations_at_time.
692         (lst_do_strip_mine): Use a scalar variable instead of recomputing
693         lst_depth.
694
695 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
696
697         Reverted the patch for "scattering permutations" from 2009-10-28.
698
699         * graphite-poly.c (print_permutation): New.
700         (debug_permutation): New.
701         (new_poly_bb): Initialize PBB_PERMUTATION.
702         (free_poly_bb): Free PBB_PERMUTATION.
703         * graphite-poly.h (pbb_permutation_elt_p): Declared.
704         (struct pbb_permutation_elt): New.
705         (PBB_PERMUTATION_ELT_STRIDE): New.
706         (PBB_PERMUTATION_ELT_STRIDED_P): New.
707         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
708         (new_pbb_permutation_elt): New.
709         (pbb_permutation_elt_free): New.
710         (struct poly_bb): Add field permutation.
711         (PBB_PERMUTATION): New.
712         (print_permutation): Declared.
713         (debug_permutation): Declared.
714
715 2009-11-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
716
717         * graphite-interchange.c (build_partial_difference): New.
718         (memory_stride_in_loop): Refactored the computation of
719         equality constraints into build_partial_difference function.
720         Added support for debugging stride computations.
721
722 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
723
724         * graphite-clast-to-gimple.c (gloog): Free if_region,
725         if_region->true_region, and if_region->region.
726         * sese.c (if_region_set_false_region): Free if_region->false_region.
727         (create_if_region_on_edge): Do not use GGC_NEW.
728         (move_sese_in_condition): Remove useless initialization.
729
730 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
731
732         * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
733         for the loops created by the loop distribution.  Do not modify the
734         input LSTs.
735         (lst_try_interchange_loops): Same.  Use a temporary LST for the
736         transformed schedule.  Call lst_update_scattering before data
737         dependence analysis.
738         (lst_try_interchange): Pass an extra parameter INDEX.
739         (lst_do_interchange_1): New.
740         (lst_do_interchange): Call lst_do_interchange_1.
741         (scop_do_interchange): Call lst_update_scattering.
742         * graphite-poly.c (apply_poly_transforms): Do not call
743         lst_update_scattering.
744         * graphite-poly.h (lst_pred): New.
745         (lst_succ): New.
746         (lst_find_first_pbb): Return NULL when not found.
747         (lst_empty_p): New.
748         (lst_insert_in_sequence): Allow LST1 to be NULL.
749         (lst_replace): New.
750         (lst_substitute_3): New.
751         * gcc.dg/graphite/interchange-1.c: XFail.
752         * gcc.dg/graphite/interchange-8.c: XFail.
753         * gcc.dg/graphite/interchange-11.c: XFail.
754
755 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
756
757         * graphite-interchange.c (lst_perfectly_nested_p): New.
758         (lst_perfect_nestify): New.
759         (lst_try_interchange_loops): Call store_lst_schedule,
760         lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
761         (scop_do_interchange): Avoid redundant legality test.
762         Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
763         * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
764         * graphite-poly.h (psct_static_dim): New.
765         (lst_dewey_number_at_depth): New.
766         (lst_find_pbb): Restructured.
767         (lst_find_first_pbb): Restructured.
768         (lst_find_last_pbb): New.
769         (lst_contains_p): New.
770         (lst_contains_pbb): New.
771         (lst_create_nest): New.
772         (lst_remove_from_sequence): New.
773         (pbb_update_scattering): New.
774         (lst_update_scattering_under): New.
775         (lst_update_scattering_seq): New.
776         (lst_update_scattering): New.
777         (lst_insert_in_sequence): New.
778         (lst_distribute_lst): New.
779         (lst_remove_all_before_including_pbb): New.
780         (lst_remove_all_before_excluding_pbb): New.
781
782 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
783
784         * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
785         get_loop_exit_edges.
786
787 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
788
789         * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
790
791 2009-10-28  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
792
793         * graphite-poly.c (print_permutation): New.
794         (debug_permutation): New.
795         (new_poly_bb): Initialize PBB_PERMUTATION.
796         (free_poly_bb): Free PBB_PERMUTATION.
797         * graphite-poly.h (pbb_permutation_elt_p): Declared.
798         (struct pbb_permutation_elt): New.
799         (PBB_PERMUTATION_ELT_STRIDE): New.
800         (PBB_PERMUTATION_ELT_STRIDED_P): New.
801         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
802         (new_pbb_permutation_elt): New.
803         (pbb_permutation_elt_free): New.
804         (struct poly_bb): Add field permutation.
805         (PBB_PERMUTATION): New.
806         (print_permutation): Declared.
807         (debug_permutation): Declared.
808
809 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
810
811         * graphite-clast-to-gimple.c (gloog): Do not call
812         sese_reset_aux_in_loops.
813         * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
814         extra argument for domains.  Do not use loop->aux.
815         (build_scop_iteration_domain): Initialize and free domains, pass it
816         to build_loop_iteration_domains and extract the information from
817         domains.  Do not use loop->aux.
818         * sese.c (sese_reset_aux_in_loops): Removed.
819         * sese.h (sese_reset_aux_in_loops): Removed.
820
821 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
822
823         * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
824         (dependency_in_loop_p): Same.
825         (translate_clast): Do not use loop->aux.  Initialize
826         loop->can_be_parallel.
827         (mark_loops_parallel): Removed.
828         * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
829         * graphite.c (free_aux_in_new_loops): Removed.
830         (graphite_finalize): Do not call free_aux_in_new_loops.
831         (graphite_transform_loops): Do not call mark_loops_parallel.
832
833 2009-10-26  Li Feng  <nemokingdom@gmail.com>
834
835         * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
836         (translate_clast): Pass an extra parameter LEVEL.
837         Call get_scattering_level.
838         * graphite-clast-to-gimple.h (get_scattering_level): New.
839
840 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
841
842         * cfgloop.c (alloc_loop): Initialize loop->single_iv.
843         * cfgloop.h (struct loop): New field single_iv.
844
845         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
846         loop->aux anymore: use loop->single_iv.
847         (graphite_loop_normal_form): Moved...
848         (build_graphite_loop_normal_form): Removed.
849         (gloog): Do not call build_graphite_loop_normal_form.
850         (free_aux_in_new_loops): Moved...
851         (mark_loops_parallel): Restructure.
852         * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
853         * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
854         (scop_canonicalize_loops): New.
855         (build_poly_scop): Call scop_canonicalize_loops.
856         * graphite.c (free_aux_in_new_loops): ...here.
857
858 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
859
860         * g++.dg/graphite/graphite.exp: Add the same rules as in
861         gcc.dg/graphite/graphite.exp.
862
863 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
864
865         * g++.dg/graphite/id-1.C: New.
866
867 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
868
869         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
870         argument base_name.
871         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
872         (rewrite_phi_out_of_ssa): Same.
873         (rewrite_cross_bb_scalar_deps): Same.
874         (translate_scalar_reduction_to_array): Same.
875
876 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
877
878         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
879         dump_alias_graphs.
880
881 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
882
883         * graphite-sese-to-poly.c (dump_alias_graphs): New.
884         (build_scop_drs): Call dump_alias_graphs.
885
886 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
887
888         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
889         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
890         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
891         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
892         * graphite-poly.h (free_lst): New.
893         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
894         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
895
896 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
897
898         * graphite-poly.h (struct scop): Add a field saved_schedule.
899         (SCOP_SAVED_SCHEDULE): New.
900         (store_lst_schedule): New.
901         (restore_lst_schedule): New.
902         (store_scattering): Call store_lst_schedule.
903         (restore_scattering): Call restore_lst_schedule.
904
905 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
906
907         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
908         (pdr_add_alias_set): Same.
909         (build_poly_dr): Same.
910         (build_alias_set_optimal_p): Same.
911         (build_base_obj_set_for_drs): Same.  Do not store the result of
912         graphds_dfs.
913
914 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
915
916         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
917         all_components_are_cliques to 1.
918
919 2009-10-20  Li Feng  <nemokingdom@gmail.com>
920
921         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
922         the new structure.
923         (pdr_add_alias_set): Update retrieving alias_set_num.
924         (build_poly_dr): Update retrieving dr_base_object_set.
925         (partition_drs_to_sets): Remove.
926         (build_alias_set_optimal_p): New.
927         (build_alias_set_for_drs): Rename.
928         (build_scop_drs): Update.
929         * graphite-sese-to-poly.h (struct base_alias_pair): New.
930         (ALIAS_SET_INDEX): Remove.
931         (BASE_OBJECT_SET_INDEX): Remove.
932
933 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
934
935         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
936
937 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
938
939         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
940         loop upper bounds for 1-element arrays at end of structures.
941         * tree-flow.h (array_at_struct_end_p): Declared.
942         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
943
944 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
945
946         * g++.dg/graphite/pr41305.C: New.
947
948 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
949
950         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
951         construction of parameter constraints from loop iteration analysis.
952         * gcc.dg/graphite/run-id-2.c: New test.
953
954 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
955
956         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
957         and new_cstr.
958
959 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
960
961         * graphite-dependences.c (dependence_polyhedron_1): Remove
962         unused gdim dimensions from the DDR polyhedron.
963
964 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
965
966         * graphite-dependences.c (pddr_transformed_scattering): New.
967         (dot_original_deps_stmt_1): New.
968         (dot_transformed_deps_stmt_1): New.
969         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
970         dot_transformed_deps_stmt_1.
971         (dot_original_deps): New.
972         (dot_transformed_deps): New.
973         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
974
975 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
976
977         * graphite-dependences.c (reduction_dr_1): Remove wrong
978         assert: reduction BBs can have multiple reduction writes
979         to memory.  interchange-3.f90 is an example.
980
981 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
982
983         * gfortran.dg/graphite/interchange-3.f90: New.
984
985 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
986
987         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
988
989 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
990
991         * graphite-dependences.c (dependence_polyhedron_1): Add the
992         context to the dependence polyhedron.
993
994 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
995
996         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
997         PBB_PDR_DUPLICATES_REMOVED.
998         (new_poly_bb): Same.
999
1000 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
1001
1002         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
1003         SCOP_CONTEXT.
1004         (build_loop_iteration_domains): Extract bounds on parameters
1005         based on the data size.
1006         (build_scop_context): Do not initialize SCOP_CONTEXT;
1007         add new constraints.
1008
1009 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
1010
1011         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
1012         * graphite-ppl.h (graphite-ppl.h): Declared.
1013
1014 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
1015
1016         * graphite-ppl.c (ppl_print_linear_expr): New.
1017         (debug_ppl_linear_expr): New.
1018         * graphite-ppl.h (ppl_print_linear_expr): Declared.
1019         (debug_ppl_linear_expr): Declared.
1020
1021 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
1022
1023         * graphite-interchange.c: Fix comments.
1024         * gcc.dg/graphite/block-1.c: Fix comments.
1025
1026 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
1027
1028         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
1029         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
1030
1031 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
1032
1033         Reapply the patch from Alexander Monakov that disappeared during
1034         the last merges from trunk.
1035
1036         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
1037
1038         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1039         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
1040
1041 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1042
1043         * graphite-interchange.c (memory_stride_in_loop): The depth
1044         argument corresponds to a dynamic time dimension, so use
1045         psct_dynamic_dim to refer to the transformed scattering dimension.
1046
1047 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1048
1049         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
1050
1051 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1052
1053         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
1054         root of the LST.
1055         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
1056         the root of the LST.
1057         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
1058         fake loop.
1059         (print_lst): Print the root of LST in a different format.
1060         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
1061
1062 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1063
1064         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
1065
1066 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1067
1068         * doc/passes.texi: Document the Graphite infrastructure.
1069
1070 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1071
1072         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
1073         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
1074         and check the SSA representation.
1075
1076         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
1077
1078 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
1079
1080         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
1081
1082 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1083
1084         * gcc.dg/graphite/interchange-11.c: New.
1085
1086 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1087
1088         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
1089
1090 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1091
1092         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1093         Add -fno-loop-strip-mine and -fno-loop-interchange.
1094         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
1095         -fno-loop-strip-mine.
1096         * gfortran.dg/graphite/graphite.exp: Same.
1097
1098 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1099
1100         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1101         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
1102         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
1103         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
1104         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
1105         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
1106         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
1107         DEFAULT_FLAGS_GRAPHITE_SCOP.
1108         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
1109         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
1110
1111 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1112
1113         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
1114
1115 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1116             Sebastian Pop  <sebastian.pop@amd.com>
1117
1118         * graphite-interchange.c (build_linearized_memory_access): Pass an
1119         offset as parameter.
1120         (memory_stride_in_loop): Include transform scattering in the
1121         access functions to be able to querry the strides in the
1122         transformed loops.
1123         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
1124         not the psct_iterator_dim.
1125
1126 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1127
1128         * graphite-blocking.c (pbb_do_strip_mine): Removed.
1129         (lst_do_strip_mine_loop): New.
1130         (lst_do_strip_mine): New.
1131         (scop_do_strip_mine): Call lst_do_strip_mine.
1132         * graphite-poly.h (lst_add_loop_under_loop): New.
1133         (lst_find_first_pbb): New.
1134
1135 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
1136
1137         * graphite-poly.c (loop_to_lst): Fix LST creation.
1138
1139 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
1140
1141         * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
1142         sizeof(unsigned long) to make it run on 32bit systems.
1143
1144 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
1145
1146         * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
1147         SEGFAULT on 32bit.
1148
1149 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1150
1151         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
1152         Comment.
1153         (write_alias_graph_to_ascii_dot): New.
1154         (write_alias_graph_to_ascii_ecc): Ditto.
1155         (partition_drs_to_sets): Add testing of optimality of current method
1156         which assigns alias numbers according to DFS Comopnent number.  used
1157         as heuristic for the upcoming ECC algorithm.
1158         (build_scop_drs): Write to file also with the ecc and dot format.
1159
1160 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
1161
1162         * gfortran.dg/graphite/interchange-1.f: XFail.
1163
1164 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
1165
1166         * graphite.c (graphite_initialize): Do not handle functions with
1167         more than 100 basic blocks.
1168
1169 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
1170
1171         * graphite-blocking.c (pbb_do_strip_mine): Use
1172         PARAM_LOOP_BLOCK_TILE_SIZE.
1173
1174 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
1175
1176         * graphite-poly.c (dot_lst_1): New.
1177         (dot_lst): New.
1178         * graphite-poly.h (dot_lst): Declared.
1179
1180 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
1181
1182         * graphite-dependences.c (dot_deps_stmt_1): New.
1183         (dot_deps_stmt): New.
1184         * graphite-dependences.h (dot_deps_stmt): Declared.
1185
1186 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
1187
1188         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
1189         not replace cross BB scalar dependences ending on PHI nodes.
1190         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
1191
1192 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
1193
1194         * graphite-poly.c (apply_poly_transforms): Implement the high
1195         level driver for flag_loop_block.
1196         * opts.c (decode_options): Enable flag_loop_block at -O2.
1197         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
1198         flag_loop_block.
1199
1200         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
1201         -floop-block.
1202         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1203         Add -floop-block.
1204
1205 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
1206
1207         * graphite-poly.h (lst_find_pbb): New.
1208         (find_lst_loop): New.
1209
1210 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
1211
1212         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
1213         * graphite-poly.h (struct scop): Remove dep_graph field.
1214         (SCOP_DEP_GRAPH): Removed.
1215
1216 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
1217
1218         * graphite-poly.h (copy_lst): Do full copy of LST.
1219
1220 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
1221
1222         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
1223         when the loop stride is zero.
1224
1225         * gcc.dg/graphite/id-16.c: New.
1226
1227 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
1228
1229         * graphite-dependences.c (reduction_dr_1): New.
1230         (reduction_dr_p): New.
1231         (graphite_legal_transform_dr): Call reduction_dr_p.
1232         (reduction_ddr): Renamed reduction_ddr_p.
1233         * graphite-poly.h (same_pdr_p): New.
1234         (number_of_write_pdrs): New.
1235         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
1236         (split_reduction_stmt): Do not split reduction statements
1237         when there are no writes to memory.
1238         (translate_scalar_reduction_to_array_for_stmt): Insert the
1239         memory reduction statement just after the scalar reduction statement.
1240
1241         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
1242         Un-XFAIL-ed.
1243         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
1244         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
1245
1246 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
1247
1248         * graphite-interchange.c (lst_apply_interchange): New.
1249         (lst_interchange_profitable_p): New.
1250         (lst_try_interchange_loops): New.
1251         (lst_try_interchange): New.
1252         (lst_do_interchange): New.
1253         (pbb_do_interchange): Removed.
1254         (scop_do_interchange): Call lst_do_interchange.
1255
1256 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
1257
1258         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
1259         SCOP_TRANSFORMED_SCHEDULE.
1260         (loop_to_lst): New.
1261         (scop_to_lst): New.
1262         (print_lst): New.
1263         (debug_lst): New.
1264         * graphite-poly.h (lst_p): New.
1265         (struct lst): New.
1266         (LST_LOOP_P): New.
1267         (LST_LOOP_FATHER): New.
1268         (LST_PBB): New.
1269         (LST_SEQ): New.
1270         (scop_to_lst): Declared.
1271         (print_lst): Declared.
1272         (debug_lst): Declared.
1273         (new_lst_loop): New.
1274         (new_lst_stmt): New.
1275         (copy_lst): New.
1276         (lst_depth): New.
1277         (lst_dewey_number): New.
1278         (struct scop): Add original_schedule and transformed_schedule fields.
1279         (SCOP_ORIGINAL_SCHEDULE): New.
1280         (SCOP_TRANSFORMED_SCHEDULE): New.
1281         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
1282
1283 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1284
1285         * graphite-dependences.c (reduction_ddr): New.
1286         (graphite_legal_transform_bb): Call reduction_ddr.
1287         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
1288         Initialize PBB_IS_REDUCTION.
1289         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
1290         (PBB_IS_REDUCTION): New.
1291         (new_poly_bb): Update declaration.
1292         * graphite-scop-detection.h (build_scop_bbs): Removed.
1293         (nb_reductions_in_loop): Removed.
1294         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
1295         parameter for reductions.
1296         (try_generate_gimple_bb): Update call to new_poly_bb.
1297         (build_scop_bbs_1): Same.
1298         (build_scop_bbs): Same.
1299         (gsi_for_phi_node): New.
1300         (scalar_close_phi_node_p): Remove gcc_assert.
1301         (split_reduction_stmt): New.
1302         (is_reduction_operation_p): New.
1303         (phi_contains_arg): New.
1304         (follow_ssa_with_commutative_ops): New.
1305         (detect_commutative_reduction_arg): New.
1306         (detect_commutative_reduction_assign): New.
1307         (follow_inital_value_to_phi): New.
1308         (edge_initial_value_for_loop_phi): New.
1309         (initial_value_for_loop_phi): New.
1310         (detect_commutative_reduction): New.
1311         (translate_scalar_reduction_to_array_for_stmt): New.
1312         (insert_copyout): New.
1313         (insert_copyin): New.
1314         (translate_scalar_reduction_to_array): New.
1315         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
1316         (rewrite_commutative_reductions_out_of_ssa_loop): New.
1317         (rewrite_commutative_reductions_out_of_ssa): New.
1318         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
1319         * sese.h (split_region_for_bb): New.
1320
1321         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
1322         * gcc.dg/graphite/interchange-1.c: Fix format.
1323         * gcc.dg/graphite/interchange-10.c: New.
1324
1325 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1326
1327         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
1328         buggy assert.
1329
1330 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1331
1332         * graphite-sese-to-poly.c (scev_analyzable_p): New.
1333         (rewrite_cross_bb_scalar_dependence): New.
1334         (rewrite_cross_bb_scalar_deps): New.
1335         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
1336         Call rewrite_cross_bb_scalar_deps.
1337
1338 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1339
1340         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
1341         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
1342         gsi_for_stmt.
1343
1344 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1345
1346         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
1347         * graphite-interchange.c (pbb_do_interchange): Same.
1348         * graphite-poly.c (print_scattering_function): Same.
1349         (debug_pdrs): Same.
1350         * graphite-poly.h (pbb_loop): New.
1351         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
1352
1353 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
1354
1355         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
1356
1357 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
1358
1359         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
1360         so don't pass a pointer to it.
1361         (build_alias_set_for_drs): Same.
1362         (build_base_obj_set_for_drs): Same.
1363         (build_scop_drs): Same.
1364
1365 2009-09-26  Li Feng  <nemokingdom@gmail.com>
1366
1367         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
1368         the alias graph of data references.
1369
1370 2009-09-25  Li Feng  <nemokingdom@gmail.com>
1371
1372         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
1373         (build_scop_drs): When debugging, write the alias graph to file,
1374         otherwise, should be disabled.
1375
1376 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1377
1378         * Merge from mainline (151310:151361).
1379
1380 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1381
1382         * Merge from mainline (151171:151310).
1383
1384 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1385
1386         * Merge from mainline (151171:151806).
1387
1388 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1389
1390         * Revert the last commit.
1391
1392 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1393
1394         * Merge from mainline (151171:151819).
1395
1396 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1397
1398         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
1399         (is_simple_operand): Remove call to stmt_simple_memref_p.
1400         (stmt_simple_for_scop_p): Update call to is_simple_operand.
1401
1402 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
1403
1404         * gcc.dg/graphite/interchange-mvt.c: New File.
1405         * gcc.dg/graphite/scop-dsyrk.c: New File.
1406         * gcc.dg/graphite/scop-dsyr2k.c: New File.
1407         * gcc.dg/graphite/scop-mvt.c: New File.
1408         * gcc.dg/graphite/scop-sor.c: New File.
1409
1410 2009-09-17 Li Feng  <nemokingdom@gmail.com>
1411
1412         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
1413         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
1414         (graphite_carried_dependence_level_k): Ditto.
1415         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
1416         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
1417         (new_poly_dr): Adjust declaration.
1418         * graphite-sese-to-poly.c (free_data_refs_aux): New.
1419         (free_gimple_bb): Added free_data_refs_aux.
1420         (build_poly_dr): Add dr_base_object_set.
1421         (partition_drs_to_sets): New.
1422         (dr_same_base_object_p): New.
1423         (build_alias_set_for_drs): New.
1424         (build_base_object_set_for_drs): New.
1425         (build_scop_drs): Add build_base_obj_set_for_drs.
1426         * graphite-sese-to-poly.h: Added #define for alias set number index and
1427         base object set index.
1428         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
1429         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
1430
1431 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
1432
1433         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1434         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
1435
1436 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
1437
1438         * graphite-sese-to-poly.c (struct irp_data): Removed.
1439         (idx_record_params): Removed.
1440         (find_params_in_bb): Scan for parameters the access functions; don't
1441         parse the tree representation.
1442
1443 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
1444
1445         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
1446         passes at -O1 and below.
1447
1448 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
1449
1450         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1451         tree-scalar-evolution.h, and then tree-data-ref.h.
1452         * graphite-clast-to-gimple.c: Same.
1453         * graphite-dependences.c: Same.
1454         * graphite-interchange.c: Same.
1455         * graphite-poly.c: Same.
1456         * graphite-scop-detection.c: Same.
1457         * graphite-sese-to-poly.c: Same.
1458         * graphite.c: Same.
1459         * lambda-code.c: Same.
1460         * matrix-reorg.c: Same.
1461         * tree-data-ref.c: Same.
1462         * tree-if-conv.c: Same.
1463         * tree-loop-distribu: Same.: Same.
1464         * tree-loop-linear.c: Same.
1465         * tree-parloops.c: Same.
1466         * tree-predcom.c: Same.
1467         * tree-vect-patterns.c: Same.
1468
1469 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
1470
1471         Partially revert the previous patch, except the following.
1472         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
1473         as parameters the operands of the not expression.
1474
1475 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1476
1477         * tree-scalar-evolution.c (instantiate_scev_assign): New.
1478         Do not call analyze_scalar_evolution on assignments.
1479         (instantiate_scev_phi): Call analyze_scalar_evolution.
1480         (instantiate_scev_name): Call instantiate_scev_assign and
1481         instantiate_scev_phi.
1482         (instantiate_scev_not): Adapted to pass as parameters the operands
1483         of the not expression.
1484
1485 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1486
1487         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
1488         to pass as parameters the operands of the binary expression.
1489
1490 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1491
1492         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
1493         instantiate_scev_not.  Handle NEGATE_EXPR.
1494         (instantiate_scev_r): Handle NEGATE_EXPR.
1495
1496 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1497
1498         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
1499         instantiate_scev_r.
1500         (instantiate_scev_r): Move code in instantiate_scev_2
1501         and instantiate_scev_1.
1502
1503 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1504
1505         * tree-scalar-evolution.c (instantiate_scev_3): New.
1506         (instantiate_scev_1): Move code in instantiate_scev_3.
1507
1508 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1509
1510         * tree-scalar-evolution.c (instantiate_scev_poly): New.
1511         (instantiate_scev_1): Move code in instantiate_scev_poly.
1512
1513 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1514
1515         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
1516         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
1517
1518 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1519
1520         * tree-scalar-evolution.c (instantiate_scev_convert): New.
1521         (instantiate_scev_1): Move code in instantiate_scev_convert.
1522
1523 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1524
1525         * tree-scalar-evolution.c (instantiate_scev_binary): New.
1526         (instantiate_scev_1): Move code in instantiate_scev_binary.
1527
1528 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1529
1530         * tree-scalar-evolution.c (instantiate_scev_name): New.
1531         (instantiate_scev_1): Move code in instantiate_scev_name.
1532
1533 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
1534
1535         * Merge from mainline (150992:151171).
1536
1537 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1538
1539         * opts.c (decode_options): Enable flag_loop_interchange at -O2.
1540
1541 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1542
1543         * graphite-dependences.c (graphite_legal_transform_bb): Call
1544         pbb_remove_duplicate_pdrs.
1545         * graphite-poly.c (can_collapse_pdr): Removed.
1546         (pdr_find_duplicate): Removed.
1547         (can_collapse_pdrs): New.
1548         (pbb_remove_duplicate_pdrs): New.
1549         (new_poly_dr): Do not look for duplicates.
1550         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
1551         (PBB_PDR_DUPLICATES_REMOVED): New.
1552         (pbb_remove_duplicate_pdrs): Declared.
1553
1554 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1555
1556         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
1557         the strides by multiplying by PDR_NB_REFS.
1558         * graphite-poly.c (can_collapse_pdr): New.
1559         (pdr_find_duplicate): New.
1560         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
1561         Initialize PDR_NB_REFS.
1562         * graphite-poly.h (struct poly_dr): Add field nb_refs.
1563         (PDR_NB_REFS): New.
1564         (new_poly_dr): Number of subscripts is a graphite_dim_t.
1565
1566 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1567
1568         Revert one of the previous commits:
1569         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1570         the computation of symmetric data dependence relations.
1571         (dependency_between_pbbs_p): Same.
1572
1573 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1574
1575         PR middle-end/40965
1576         * graphite-poly.c (apply_poly_transforms): Remove legality test before
1577         any transform.
1578
1579 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1580
1581         * graphite-dependences.c (pddr_original_scattering): Return NULL
1582         for read-read dependence relations.
1583         * graphite-poly.h (enum poly_dr_type): Fix comment.
1584         (pdr_read_p): New.
1585         (pdr_write_p): New.
1586         (pdr_may_write_p): New.
1587
1588 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1589
1590         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
1591         (struct poly_dr): Same.
1592         (new_poly_dr): Same.
1593         * graphite-poly.c (new_poly_dr): Same.
1594
1595 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1596             Sebastian Pop  <sebastian.pop@amd.com>
1597
1598         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
1599         pbb_strip_mine_time_depth.  Changed the implementation so that
1600         transformation is expressed as a transformation on
1601         time (scatttering) dimensions.  Also, ensures that the 2d+1
1602         scheduling format is preserved.
1603         (pbb_strip_mine_profitable_p): Profitability is based on the
1604         iteration number of a given time (scattering) dimension,
1605         and not on a original loop depth dimension.
1606         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
1607         (pbb_do_strip_mine): Call psct_dynamic_dim.
1608         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
1609         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
1610         (pbb_nb_dynamic_scattering_transform): New.
1611         (psct_dynamic_dim): New.
1612
1613 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1614
1615         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1616         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1617         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
1618         * graphite-interchange.c (build_linearized_memory_access): Same.
1619         (memory_stride_in_loop): Same.
1620
1621 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1622
1623         * graphite-dependences.c (pddr_original_scattering): New.
1624         (graphite_legal_transform_dr): Call pddr_original_scattering.
1625         (dot_deps_1): New.
1626         (dot_deps): New.
1627         * graphite-dependences.h (dot_deps): Declared.
1628         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
1629         (print_pdr): Print PDR_ID.
1630         * graphite-poly.h (struct poly_dr): Add field id.
1631         (PDR_ID): New.
1632         (pbb_index): New.
1633         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
1634
1635 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
1636
1637         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
1638         not delete the original dependence relation.
1639
1640 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
1641
1642         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1643         the computation of symmetric data dependence relations.
1644         (dependency_between_pbbs_p): Same.
1645
1646 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
1647
1648         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
1649         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
1650         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
1651         (free_poly_ddr): New.
1652         (pddr_is_empty): New.
1653         (dependence_polyhedron_1): Now returns a poly_ddr_p.
1654         (dependence_polyhedron): Same.  Remove useless gcc_assert.
1655         Remove fprintfs.
1656         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
1657         (graphite_carried_dependence_level_k): Call pddr_is_empty.
1658         * graphite-dependences.h (enum poly_dependence_kind): New.
1659         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
1660         (PDRP_SOURCE): Renamed PDDR_SOURCE.
1661         (PDRP_SINK): Renamed PDDR_SINK.
1662         (PDRP_DDP): Renamed PDDR_DDP.
1663         (PDDR_KIND): New.
1664         (free_poly_ddr): Declared.
1665         * graphite-poly.c (new_scop): Use the new hash function names.
1666         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
1667         into original_pddrs.
1668         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
1669
1670 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
1671
1672         * Merge from mainline (150764:150992).
1673
1674 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
1675
1676         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
1677         bounds with LT_EXPR to make niter analysis more precise on code
1678         generated by Graphite.
1679
1680 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
1681
1682         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
1683         (graphite_legal_transform_bb): Same.
1684         (poly_drs_may_alias_p): Same.
1685
1686 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
1687
1688         PR middle-end/40981
1689         * graphite-ppl.c (ppl_max_for_le): Correct the use of
1690         ppl_Pointset_Powerset_C_Polyhedron_maximize.
1691
1692 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
1693
1694         * graphite-poly.c (print_pbb): Print PBB index.
1695
1696 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
1697
1698         * Merge from mainline (r150672:150764).
1699
1700 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
1701
1702         * graphite-interchange.c (ppl_max_for_le): Moved...
1703         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
1704         * graphite-ppl.c (ppl_max_for_le): ... here.
1705         * graphite-ppl.h (ppl_max_for_le): Declared.
1706
1707 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
1708
1709         * Merge from mainline (r150372:150672).
1710
1711 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1712
1713         PR middle-end/40980
1714         * sese.c (convert_for_phi_arg): New.
1715         (add_guard_exit_phis): Use convert_for_phi_arg.
1716
1717         * gfortran.dg/graphite/id-17.f: New.
1718
1719 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1720
1721         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
1722         unknown subscript upper bounds.
1723
1724         * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
1725
1726 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1727             Pranav Garg  <pranav.garg2107@gmail.com>
1728
1729         * graphite-interchange.c (gather_access_strides): Removed.
1730         (ppl_max_for_le): New.
1731         (build_linearized_memory_access): New.
1732         (memory_stride_in_loop): New.
1733         (pbb_interchange_profitable_p): Reimplemented.
1734         * graphite-ppl.h (ppl_new_id_map): New.
1735         (ppl_interchange): New.
1736
1737         * gcc.dg/graphite/interchange-6.c: XFAILed.
1738
1739 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1740
1741         * graphite-interchange.c (compute_subscript): Removed.
1742         (compute_array_size_cstr): Removed.
1743         (compute_array_size_poly): Removed.
1744         (compute_array_size): Removed.
1745         (gather_access_strides_poly): Removed.
1746         (gather_access_strides): Empty.
1747
1748 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1749
1750         * graphite-dependences.c (dependence_polyhedron_1): Replace
1751         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
1752         (graphite_legal_transform_dr): Same.
1753         (graphite_carried_dependence_level_k): Same.
1754         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
1755         Initialize PDR_NB_SUBSCRIPTS.
1756         (print_pdr_access_layout): Replace pdr_nb_subscripts with
1757         PDR_NB_SUBSCRIPTS.
1758         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
1759         (PDR_NB_SUBSCRIPTS): New.
1760         (pdr_nb_subscripts): Removed.
1761         (pdr_dim): Simplified.
1762         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
1763         with PDR_NB_SUBSCRIPTS.
1764
1765 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1766
1767         * graphite-interchange.c (compute_array_size): Remove use of
1768         PDR_DATA_CONTAINER.
1769         * graphite-poly.c (new_poly_dr): Remove argument data_container.
1770         Do not initialize PDR_DATA_CONTAINER.
1771         (print_pdr): Do not print PDR_DATA_CONTAINER.
1772         * graphite-poly.h (struct poly_dr): Remove data_container field.
1773         (PDR_DATA_CONTAINER): Removed.
1774         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
1775         PDR_DATA_CONTAINER.
1776         (build_poly_dr): Same.
1777
1778 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1779
1780         * gcc.dg/graphite/interchange-9.c: New.
1781
1782 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1783             Sebastian Pop  <sebastian.pop@amd.com>
1784
1785         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
1786         copy of the dependence polyhedron.  Free the temporary objects.
1787         (graphite_carried_dependence_level_k): Free unused objects before
1788         returning.
1789
1790         * gcc.dg/graphite/interchange-1.c: XFAILed.
1791         * gcc.dg/graphite/interchange-2.c: XFAILed.
1792         * gcc.dg/graphite/interchange-3.c: XFAILed.
1793         * gcc.dg/graphite/interchange-4.c: XFAILed.
1794         * gcc.dg/graphite/interchange-7.c: XFAILed.
1795
1796 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1797
1798         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
1799         Early return without analyzing the data dependences if no
1800         transform has been done.  Call restore_scattering if the transform
1801         is not legal.
1802         (graphite-interchange.c): Same.
1803         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
1804         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
1805         (apply_poly_transforms): Do not gcc_assert that
1806         the transform is legal.
1807         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1808         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
1809         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
1810         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1811         * graphite-poly.h (struct poly_scattering): New.
1812         (struct poly_bb): Add original, transformed, and saved fields.
1813         Remove transformed_scattering, original_scattering, nb_local_variables,
1814         and nb_scattering_transform fields.
1815         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
1816         (poly_scattering_new): New.
1817         (poly_scattering_free): New.
1818         (poly_scattering_copy): New.
1819         (store_scattering_pbb): New.
1820         (store_scattering): New.
1821         (restore_scattering_pbb): New.
1822         (restore_scattering): New.
1823         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1824         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
1825
1826 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1827
1828         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
1829         (print_scop): Same.
1830
1831 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1832
1833         * Makefile.in (graphite.o): Depends on PREDICT_H.
1834         * graphite.c: Include predict.h.
1835         (graphite_finalize): Call tree_estimate_probability.
1836         * predict.c (predict_loops): Do not call scev_initialize and
1837         scev_finalize.
1838         (tree_estimate_probability_bb): New.
1839         (tree_estimate_probability): Do not initialize loops: move that
1840         code to the driver.  Call tree_estimate_probability_bb.
1841         (tree_estimate_probability_driver): New.
1842         (pass_profile): Use tree_estimate_probability_driver.
1843         * predict.h (tree_estimate_probability): Declared.
1844
1845 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1846
1847         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1848         * graphite-dependences.c (graphite_legal_transform): Add time to
1849         TV_GRAPHITE_DATA_DEPS.
1850         (dependency_between_pbbs_p): Same.
1851         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1852
1853 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
1854
1855         * Merge from mainline (r149952:150372).
1856
1857 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1858
1859         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1860         * graphite-blocking.c: Same.
1861         * graphite-clast-to-gimple.c: Same.
1862         * graphite-dependences.c: Same.
1863         * graphite-poly.c: Same.
1864         * graphite-poly.h: Same.
1865         * graphite-ppl.c: Same.
1866         * graphite-scop-detection.c: Same.
1867         * graphite-sese-to-poly.c: Same.
1868         * graphite.c: Same.
1869
1870 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1871
1872         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1873         (remove_simple_copy_phi): New.
1874         (remove_invariant_phi): New.
1875         (simple_copy_phi_p): New.
1876         (reduction_phi_p): New.
1877         (gsi_for_ssa_name_def): New.
1878         (insert_out_of_ssa_copy): New.
1879         (insert_out_of_ssa_copy_on_edge): New.
1880         (create_zero_dim_array): New.
1881         (scalar_close_phi_node_p): New.
1882         (rewrite_close_phi_out_of_ssa): New.
1883         (rewrite_phi_out_of_ssa): New.
1884         (rewrite_reductions_out_of_ssa): New.
1885         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1886
1887         * gcc.dg/graphite/id-11.c: New.
1888         * gcc.dg/graphite/id-15.c: New.
1889         * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1890         * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1891         * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1892         * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1893         * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1894         * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1895         * gfortran.dg/graphite/id-13.f: New.
1896         * gfortran.dg/graphite/id-5.f: New.
1897
1898 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1899
1900         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1901         check that nb_reductions_in_loop is zero.
1902         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1903         reduction phi nodes.
1904         (nb_reductions_in_loop): Removed.
1905         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1906         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1907         (bb_contains_non_iv_scalar_phi_nodes): Removed.
1908         (scop_contains_non_iv_scalar_phi_nodes): Removed.
1909         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1910
1911 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1912
1913         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1914         statements that have an empty iteration domain.
1915         * gfortran.dg/graphite/id-16.f: New.
1916
1917 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1918
1919         * tree-scalar-evolution.c (instantiate_scev_1): Return
1920         chrec_dont_know when the result is not above instantiate_below.
1921         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1922         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1923         the tree has a known scalar evolution.
1924         * gfortran.dg/graphite/id-14.f: New.
1925         * gfortran.dg/graphite/id-15.f: New.
1926
1927 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1928
1929         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1930         insert_gsi.
1931         (rename_variables): Keep inserting renames after the ones already
1932         inserted.
1933
1934 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1935
1936         * graphite-sese-to-poly.c (compare_bb_depths): New.
1937         (graphite_sort_dominated_info): New.
1938         (build_scop_bbs_1): Call graphite_sort_dominated_info.
1939         (build_scop_scattering): Fix comment.
1940
1941 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1942
1943         * graphite.c (graphite_finalize): Call print_loops instead of
1944         dump_function_to_file.
1945         * gcc.dg/graphite/graphite.exp: Fix formatting.
1946         * gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
1947         loops generated in the graphite output file.
1948         * gcc.dg/graphite/pr35356-2.c: New.
1949         * gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
1950         * gfortran.dg/graphite/id-12.f: New.
1951
1952 2009-07-24  Li Feng  <nemokingdom@gmail.com>
1953
1954         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1955         Remove 2 XFAIL.
1956
1957 2009-07-24  Li Feng  <nemokingdom@gmail.com>
1958             Tobias Grosser  <grosser@fim.uni-passau.de>
1959
1960         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1961         alias set number build alias in ACCESSES polyhedron.
1962         (build_alias_set_for_drs): New.
1963         (build_pbb_drs): Added build_alias_set_for_drs.
1964         * graphite-dependences.c (poly_drs_may_alias_p): New.
1965         (graphite_carried_dependence_level_k): Check alias information
1966         before building polyhedron.
1967
1968 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1969
1970         * Makefile.in (lambda-code.o): Fix formatting.
1971
1972 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1973
1974         * Merge from mainline (r149350-149952)
1975
1976 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
1977
1978         * graphite-poly.c (apply_poly_transforms): Move strip_mine
1979         before interchange to prepare for loop blocking.
1980
1981 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
1982
1983         * graphite-poly.c (apply_poly_transforms): Add checks after every
1984         transformation.
1985         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1986         done in apply_poly_transforms.
1987
1988 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1989
1990         * graphite-dependences.c (build_lexicographically_gt_constraint):
1991         Replace RES parameter with *RES.
1992         (dependence_polyhedron_1): Pass an address of the parameter RES
1993         instead of value of RES.
1994
1995 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1996
1997         * graphite.c (graphite_finalize): Fix comment.
1998         (graphite_transform_loops): Reset scev info after code generation
1999         of each scop.
2000
2001 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2002
2003         * graphite.c (graphite_finalize): Call scev_reset.
2004
2005 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2006
2007         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
2008         GBB_CLOOG_IV_TYPES hash table twice.
2009         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
2010         (add_condition_to_domain): Clear GMP values.
2011
2012 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2013
2014         * graphite-dependences.c: Fix formatting.
2015         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
2016         (pbb_number_of_iterations): Free ppl_Linear_Expression.
2017         * graphite-sese-to-poly.c: Fix formatting.
2018         * graphite.c (graphite_transform_loops): Create the hash table
2019         after the early return.
2020
2021 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2022
2023         * gcc.dg/graphite/id-14.c: New.
2024         * gcc.dg/graphite/pr40157.c: New.
2025         * gfortran.dg/graphite/id-11.f: New.
2026
2027 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2028
2029         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
2030         (build_poly_scop): Return false when there are no pbbs within
2031         loops to avoid to pass to cloog scops with no loops.
2032
2033 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
2034
2035         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
2036         useless test "i % 2".
2037         (build_pbb_scattering_polyhedrons): Fix formatting.
2038         (build_poly_dr): Same.
2039         * graphite.c (graphite_transform_loops): Restructure.
2040
2041 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
2042
2043         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
2044         reduction_list parameter.
2045         (rewrite_all_phi_nodes_with_iv): Same.
2046         (canonicalize_loop_ivs): Same.
2047         * tree-parloops.c (struct brli): Removed.
2048         (build_reduction_list_info): Removed.
2049         (build_new_reduction): New.
2050         (analyze_reduction_list): Removed.
2051         (gather_scalar_reductions): Find reductions instead of phi
2052         nodes that can't be canonicalized.
2053         (try_create_reduction_list): Remove reduction_list parameter.
2054         (gen_parallel_loop): Same.
2055         (parallelize_loops): Remove analyze_reductions variable,
2056         initialization and free.
2057         Change reduction_list htab initialization to reduction_info
2058         elements instead of ssa names.
2059         Call try_create_reduction_list and gen_parallel_loop without
2060         analyzed_reduction argument.
2061         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
2062         canonicalize_loop_ivs with one less argument.
2063         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
2064
2065 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
2066
2067         * graphite-dependences.c (new_poly_dr_pair): New.
2068         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
2069         (new_poly_dr_pair): New.
2070         (eq_poly_dr_pair_p): New.
2071         (hash_poly_dr_pair_p): New.
2072         * graphite-dependences.h (struct poly_dr_pair): New.
2073         (eq_poly_dr_pair_p): Declared.
2074         (hash_poly_dr_pair_p): Declared.
2075         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
2076         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
2077         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
2078         * Makefile.in (graphite-poly.o): Add dependence on
2079         graphite-dependences.h.
2080
2081 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
2082
2083         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
2084         polynomials of degree > 1 pass to Graphite.
2085         * tree-chrec.c (scev_is_linear_expression): Call
2086         evolution_function_is_affine_multivariate_p.
2087         * gfortran.dg/graphite/id-10.f90: New.
2088
2089 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
2090
2091         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
2092         Instantiate scevs varying in outer loops.
2093         * gfortran.dg/graphite/id-9.f: Correct testcase.
2094
2095 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
2096
2097         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
2098         redundant constraint.
2099
2100 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
2101
2102         * gcc.dg/graphite/graphite.exp: Fix comments.
2103         * gfortran.dg/graphite/graphite.exp: Trigger actions
2104         based on the file names as in the C testsuite.
2105         * gfortran.dg/graphite/block-1.f90: Fix patterns.
2106         * gfortran.dg/graphite/block-2.f: Same.
2107         * gfortran.dg/graphite/block-3.f90: Same.
2108         * gfortran.dg/graphite/block-4.f90: Same.
2109         * gfortran.dg/graphite/id-1.f90: Same.
2110         * gfortran.dg/graphite/id-2.f90: Same.
2111         * gfortran.dg/graphite/id-3.f90: Same.
2112         * gfortran.dg/graphite/id-4.f90: Same.
2113         * gfortran.dg/graphite/id-6.f: Same.
2114         * gfortran.dg/graphite/id-9.f: Same.
2115         * gfortran.dg/graphite/interchange-1.f: Same.
2116         * gfortran.dg/graphite/interchange-2.f: Same.
2117         * gfortran.dg/graphite/scop-1.f: Same.
2118
2119 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
2120
2121         * sese.c (expand_scalar_variables_call): New.
2122         (expand_scalar_variables_ssa_name): Handle calls in expander.
2123
2124 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
2125
2126         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
2127         Expect to see the pattern twice.
2128         * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
2129         * gcc.dg/graphite/interchange-5.c: Same.
2130         * gcc.dg/graphite/interchange-6.c: Same.
2131
2132 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
2133
2134         * gcc.dg/graphite/id-10.c: New.
2135         * gcc.dg/graphite/id-12.c: New.
2136         * gfortran.dg/graphite/id-7.f: New.
2137         * gfortran.dg/graphite/id-8.f: New.
2138
2139 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
2140
2141         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
2142         zero.
2143
2144 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
2145
2146         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
2147
2148 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
2149
2150         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
2151
2152 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
2153
2154         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
2155         building PDR subscripts.
2156
2157 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
2158
2159         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
2160         computation of array sizes.
2161
2162 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
2163
2164         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
2165
2166 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2167
2168         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
2169         build_pairwise_constraint, dr_equality_constraints,
2170         build_pairwise_scheduling_equality,
2171         build_pairwise_scheduling_inequality, lexicographically_gt_p,
2172         build_lexicographically_gt_constraint, dependence_polyhedron,
2173         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
2174         Move from NNC_Polyhedron to C_Polyhedron.
2175         * graphite-interchange.c (compute_array_size_poly,
2176         gather_access_strides): Dito.
2177         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
2178         free_scop, pbb_number_of_iterations): Dito.
2179         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
2180         pbb_dim_iter_domain, struct scop): Dito.
2181         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
2182         new_Cloog_Domain_from_ppl_Polyhedron,
2183         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
2184         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
2185         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
2186         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
2187         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
2188         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
2189         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
2190         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
2191         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
2192         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
2193         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
2194         build_scop_iteration_domain, build_poly_dr): Dito
2195
2196 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2197
2198         * gcc.dg/graphite/graphite.exp: Added a rule to execute
2199         run-id-*.c files.
2200         * gcc.dg/graphite/run-id-1.c: New.
2201
2202 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2203
2204         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
2205         positivity constraint on the symbolic number of iterations.
2206
2207 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2208
2209         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
2210
2211 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2212             Tobias Grosser  <grosser@fim.uni-passau.de>
2213
2214         * graphite-clast-to-gimple.c (build_scop_context): Removed.
2215         (build_cloog_prog): Directly use SCOP_CONTEXT.
2216         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
2217         (free_scop): Free SCOP_CONTEXT.
2218         (print_scop_context): New.
2219         (print_scop): Call print_scop_context.
2220         (debug_scop_context): New.
2221         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
2222         (struct scop): Added field context.
2223         (SCOP_CONTEXT): New.
2224         * graphite-sese-to-poly.c (add_param_constraints): New.
2225         (build_scop_context): New.
2226         (build_poly_scop): Call build_scop_context.
2227
2228 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2229
2230         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
2231         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
2232         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
2233         * graphite-ppl.h: Include double-int.h and tree.h.
2234         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
2235         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
2236         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
2237         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
2238
2239 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2240
2241         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
2242         POINTER_PLUS_EXPR for pointer types.
2243         (clast_to_gcc_expression): Same.
2244
2245 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
2246
2247         * graphite-poly.c (print_scattering_function): Early return when
2248         PBB_TRANSFORMED_SCATTERING is not initialized.
2249         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
2250
2251 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
2252
2253         * tree-parloops.c (analyze_reduction_list): Remove unused variable
2254         to fix bootstrap.
2255
2256 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
2257
2258         * tree-parloops.c (analyze_reduction_list): Change return
2259         value to void.
2260         (try_create_reduction_list): Move the call to
2261         analyze_reduction_list to the beginining.
2262         Call reduction_phi with analyzed_reductions as argument
2263         instead of reduction_list.
2264
2265 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2266
2267         *  Merge from mainline (r148296:149346)
2268
2269 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2270
2271         * graphite-scop-detection.c (graphite_can_represent_init): New.
2272         (graphite_can_represent_scev): Call graphite_can_represent_init:
2273         check that the initial value does not contain multiplications of
2274         parameters.
2275         (stmt_has_simple_data_refs_p): New.
2276         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
2277         (is_simple_operand): Fix formatting.
2278         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
2279
2280 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2281
2282         * gcc.dg/graphite/id-13.c: New.
2283         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
2284         analyze_scalar_evolution, use scalar_evolution_in_region.
2285         (scan_tree_for_params_right_scev): Add extra assert.
2286         (parameter_index_in_region_1): Split from parameter_index_in_region.
2287         (idx_record_params): Use scalar_evolution_in_region.
2288         (find_params_in_bb): Same.
2289         (find_scop_parameters): Same.
2290         (build_loop_iteration_domains): Same.
2291         (create_linear_expr_from_tree): Same.
2292         * sese.c (scalar_evolution_in_region): New.
2293         * sese.h (scalar_evolution_in_region): Declared.
2294         (defined_in_sese_p): New.
2295         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
2296         static anymore.
2297         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
2298         Declared.
2299
2300 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2301
2302         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
2303         TREE_DATA_REF_H also implies SCEV_H.
2304
2305 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2306
2307         * graphite-poly.c (print_scop_params): New.
2308         (print_scop): Call print_scop_params.
2309         (debug_scop_params): New.
2310         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
2311
2312 2009-07-07  Li Feng  <nemokingdom@gmail.com>
2313
2314         * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
2315         * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
2316         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
2317         * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
2318         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
2319         * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
2320
2321 2009-07-07  Li Feng  <nemokingdom@gmail.com>
2322
2323         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
2324         for dependency checking part.
2325         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
2326         tests for dependency checking.
2327         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2328         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2329         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
2330         flag -fdump-tree-graphite-all for autopar testsuites.
2331
2332 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
2333
2334         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
2335         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
2336         canonicalize_loop_ivs): Moved...
2337         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
2338
2339 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
2340
2341         * tree-parloops.c (try_create_reduction_list): Pass an extra
2342         argument analyzed_reductions.  Call analyze_reduction_list.
2343         (gen_parallel_loop): Do not call analyze_reduction_list.
2344         (parallelize_loops): Init and finalize analyzed_reductions.
2345
2346 2009-07-06  Li Feng  <nemokingdom@gmail.com>
2347
2348         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2349         Added flag -fno-loop-strip-mine for autopar testcase.
2350
2351 2009-07-04  Li Feng  <nemokingdom@gmail.com>
2352
2353         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
2354         transformed scattering dimension instead of unmatch orignal when
2355         calling dependence_polyhedron.
2356
2357 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
2358
2359         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
2360
2361 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
2362
2363         * graphite-poly.c (pbb_number_of_iterations): Check for returned
2364         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
2365
2366 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
2367
2368         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
2369         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
2370         * graphite-poly.c (pbb_number_of_iterations): New.
2371         * graphite-poly.h (pbb_number_of_iterations): Declared.
2372         (pbb_iterator_dim, pbb_parameter_dim): New.
2373
2374 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
2375
2376         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
2377         last commit on type of lower and upper bound of loops.
2378
2379 2009-06-29  Li Feng  <nemokingdom@gmail.com>
2380
2381         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
2382         graphite-dependences.h.
2383         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
2384         (mark_bb_with_pbb): New.
2385         (get_stmtfor_depth): New.
2386         (find_pbb_via_hash): New.
2387         (dependency_in_loop_p): New.
2388         (mark_loops_parallel): New.
2389         (free_aux_in_new_loops): New.
2390         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
2391         bb with it's relevant pbb. Mark newly created loops.  Remove mark
2392         innermost loop parallel without checking.
2393         (gloog): Add parameter BB_PBB_MAPPING.
2394         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
2395         (gloog): Change declaration.
2396         (mark_loop_parallel): Make extern.
2397         (free_aux_in_new_loops): Declare.
2398         (bb_pbb_map_hash): New.
2399         (eq_bb_pbb_map): New.
2400         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
2401         auto parallelization when flag_graphite_force_parallel is set.
2402         (graphite_finalize): Added free_aux_in_new_loops.
2403         * tree-parloops.c (parallelize_loops): Only generate parallel code for
2404         the innermost loop that marked parallel.  Use
2405         flag_graphite_force_parallel instead of loop->can_be_parallel.
2406         (loop_parallel_p): Move inner most checking out of function.
2407
2408 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2409
2410         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
2411         type of lower and upper bound of loops signed long int.
2412
2413 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2414
2415         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
2416         expression outside the loop.
2417
2418 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2419
2420         * gcc.dg/graphite/interchange-8.c: New.
2421
2422 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2423
2424         * gcc.dg/graphite/interchange-0.c: XFailed.
2425         * gcc.dg/graphite/interchange-5.c: XFailed.
2426         * gcc.dg/graphite/interchange-6.c: XFailed.
2427
2428 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2429
2430         * graphite-interchange.c (compute_array_size_poly): The end of the
2431         recursion should return 1.
2432
2433 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2434
2435         * graphite-interchange.c (compute_array_size_cstr): Allow the
2436         subscript multiplier to be -1.
2437         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
2438         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
2439         data_container.  Initializes PDR_DATA_CONTAINER.
2440         (print_pdr_access_layout): New.
2441         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
2442         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
2443         data_container.
2444         (PDR_DATA_CONTAINER): New.
2445         (new_poly_dr): Update declaration.
2446         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
2447         (build_poly_dr): Call pdr_add_data_dimensions.
2448
2449 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2450
2451         * graphite-poly.h (struct poly_dr): Fix comment.
2452         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
2453         (pdr_add_memory_accesses): New.
2454         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
2455
2456 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2457
2458         * graphite-poly.c (print_pdrs, debug_pdrs): New.
2459         (print_pbb): Add call to print_pdrs.
2460         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
2461
2462 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
2463             Li Feng <nemokingdom@gmail.com>
2464
2465         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
2466         (dependency_between_pbbs_p): New.
2467         (lexicographically_gt_p): Assure !empty_p before polyhedron
2468         intersection assign.
2469         (build_lexicographically_gt_constraint): Correct lexicographically
2470         judging.
2471         * graphite-dependences.h: New.
2472         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
2473
2474 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
2475
2476         * graphite-clast-to-gimple.c (print_clast_stmt): New.
2477         (gloog): Print to dump_file the generated clast.
2478         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
2479         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
2480
2481 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
2482
2483         * graphite-poly.c (extend_scattering): Increment
2484         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
2485
2486 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
2487
2488         * graphite-interchange.c (compute_array_size_poly): Added exit of
2489         recursion condition.  Continue iterating even after the first equality.
2490         (compute_array_size): Same.
2491
2492 2009-06-24  Li Feng  <nemokingdom@gmail.com>
2493
2494         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
2495         -fdump-tree-final_cleanup to -fdump-tree-optimized.
2496         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2497         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2498         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
2499
2500 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2501
2502         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
2503         only when the use verifies is_gimple_reg.
2504
2505 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2506
2507         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
2508         Allocate scaldims after call to unify_scattering_dimensions.
2509
2510 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2511
2512         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
2513
2514 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2515             Albert Cohen  <albert.cohen@inria.fr>
2516
2517         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
2518         variables for the strip mining.
2519
2520 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2521             Pranav Garg  <pranav.garg2107@gmail.com>
2522
2523         * Makefile.in (OBJS-common): Added graphite-blocking.o.
2524         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
2525         (graphite-blocking.o): New rule.
2526         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
2527         * graphite-blocking.c: New.
2528         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
2529         flag_loop_strip_mine.
2530         (psct_scattering_dim_for_loop_depth): New.
2531         * graphite-poly.h (scop_do_strip_mine): Declared.
2532         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
2533         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
2534         flag_loop_strip_mine.
2535
2536 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2537
2538         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
2539         a GMP value and a PPL coefficient at each iteration of a loop.
2540
2541 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2542
2543         * graphite-dependences.c (dependence_polyhedron): Do not use
2544         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
2545         pbb_nb_scattering_transform.
2546         (graphite_legal_transform_dr): Same.
2547         * graphite-poly.c (extend_scattering): Same.
2548         (unify_scattering_dimensions): Same.
2549         (print_scattering_function): Same.
2550         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
2551         PBB_NB_LOCAL_VARIABLES.
2552         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
2553         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
2554         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
2555         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
2556         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
2557         (pbb_nb_scattering_transform): New.
2558         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
2559         (psco_scattering_dim): Add assert on parameters.
2560         (psct_scattering_dim): Same.
2561         (psct_scattering_dim_for_loop_depth): Declared.
2562         (psct_local_var_dim): New.
2563         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
2564         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
2565         correct layout, call pbb_nb_local_vars.
2566         (psct_add_local_variable, psct_add_scattering_dimension): New.
2567         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2568         Initialize PBB_NB_SCATTERING_TRANSFORM.
2569
2570 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2571
2572         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
2573         (set_coef): Renamed ppl_set_coef.
2574         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
2575
2576 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2577
2578         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
2579         test a boolean against 1.
2580         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
2581         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
2582         (pbb_do_interchange): Returns true when a transform has been performed.
2583         (scop_do_interchange): Same.
2584         * graphite-poly.c (apply_poly_transforms): Use the return value of
2585         scop_do_interchange.
2586         * graphite-poly.h (scop_do_interchange): Update declaration.
2587
2588 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2589
2590         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
2591         after last use.
2592         * sese.c (sese_reset_aux_in_loops): New.
2593         * sese.h (sese_reset_aux_in_loops): New.
2594
2595 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2596
2597         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
2598         multiplier and multiply the constant by the multiplier.
2599         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
2600         (build_poly_dr): Do not use the multiplier to define the subscript.
2601
2602 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2603
2604         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
2605         compiler's data reference.  Initialize PDR_CDR.
2606         (print_pdr): Call dump_data_reference.
2607         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
2608         Add compiler_dr field.
2609         (PDR_BB): Renamed PDR_PBB.
2610         (PDR_CDR): New.
2611         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
2612         GCC's data reference representation.
2613         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
2614         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
2615
2616 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2617
2618         * graphite-poly.c (print_scattering_function): Also print the layout.
2619         * graphite-poly.h (pbb_nb_local_vars): New.
2620
2621 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2622
2623         * graphite-poly.c (print_pbb_domain): Also print the layout names.
2624
2625 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2626
2627         * graphite-poly.c (print_pdr, debug_pdr): New.
2628         * graphite-poly.h (print_pdr, debug_pdr): Declared.
2629         (PDR_BASE): Removed.
2630
2631 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2632
2633         * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
2634         ltrans-{1..6,8}.c.
2635
2636 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2637
2638         * graphite-interchange.c (compute_subscript): Allow also -1 in the
2639         subscript identification column.
2640         (pbb_do_interchange): Print to dump_file that some loops "will be
2641         interchanged".  Rely on that chain of characters in the testcases.
2642         * gcc.dg/graphite/interchange-0.c: New.
2643         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
2644         interchange-*.c files and compile them with -floop-interchange.
2645
2646 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
2647
2648         * graphite-interchange.c (interchange_profitable_p): Renamed
2649         pbb_interchange_profitable_p.
2650
2651 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2652             Harsha Jagasia  <harsha.jagasia@amd.com>
2653             Pranav Garg  <pranav.garg2107@gmail.com>
2654
2655         * graphite-interchange.c (interchange_profitable_p): Make static.
2656         (pbb_interchange_loop_depths, pbb_do_interchange,
2657         scop_do_interchange): New.
2658         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
2659         for flag_loop_interchange.
2660         * graphite-poly.h (scop_do_interchange): Declared.
2661         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
2662         flag_loop_interchange is used.
2663
2664 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2665
2666         * graphite-dependences.c (dependence_polyhedron): Update use of
2667         pbb_nb_scattering_dims.
2668         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
2669         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
2670         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
2671         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
2672
2673 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
2674
2675         * graphite.c: Cleanup foo.
2676
2677 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
2678
2679         * Merge from mainline (r143684:148293).
2680         * Disabled libpcp until it gets fixed.
2681
2682 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
2683             Harsha Jagasia  <harsha.jagasia@amd.com>
2684
2685         * graphite-interchange.c: New.
2686         * Makefile.in (graphite-interchange.o): New.
2687         * graphite-poly.h (interchange_profitable_p): Declared.
2688         * graphite-ppl.h (value_max): New.
2689
2690 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
2691
2692         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
2693         * graphite-poly.h: Fix some comments.
2694         (pdr_dim): New.
2695         (pdr_scop): New.
2696
2697 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
2698
2699         * graphite-poly.h
2700         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
2701         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
2702         (pdr_accessp_nb_params): Renamed pdr_nb_params.
2703         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
2704         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
2705         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
2706         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
2707         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
2708         * graphite-clast-to-gimple.c: Same.
2709         * graphite-dependences.c: Same.
2710         * graphite-poly.c: Same.
2711         * graphite-sese-to-poly.c: Same.
2712
2713 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
2714
2715         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
2716         expressions for an IV rename, as returned by clast_to_gcc_expression.
2717         (copy_renames): Rename new_name to expr.
2718         * sese.c (debug_rename_elt): Same.
2719         (get_rename): Same.
2720         (set_rename): Same.
2721         (sese_adjust_liveout_phis): Call force_gimple_operand before using
2722         the information from the rename map.
2723         (rename_variables_in_stmt): Same.
2724         (add_loop_exit_phis): Rename new_name to expr.
2725         (insert_loop_close_phis): Same.
2726         (add_guard_exit_phis): Same.  Call force_gimple_operand.
2727         * sese.h (struct rename_map_elt): Rename new_name to expr.
2728         (new_rename_map_elt): Same.
2729
2730 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
2731
2732         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
2733         * sese.c (set_rename): Make it extern.
2734         * sese.h (set_rename): Declared.
2735
2736 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
2737
2738         * graphite-poly.c (extend_scattering): Free values.
2739         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
2740         Free iterators.
2741         (ppl_print_powerset_matrix): Same.
2742         * graphite-scop-detection.c (free_scops_1): New.
2743         (limit_scops): Call free_scops_1.
2744         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
2745         (build_poly_dr): Free PPL coefficients.
2746         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
2747
2748 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
2749
2750         * graphite-dependences.c: New.
2751         * graphite-data-ref.c: Removed.
2752         * graphite-data-ref.h: Removed.
2753         * Makefile.in (graphite-data-ref.o): Removed.
2754         (graphite-dependences.o): Added.
2755         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
2756         * graphite-poly.c: Same.
2757         Move the data dependence testing to graphite-dependences.c.
2758
2759 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
2760
2761         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
2762         from graphite_cannot_represent_loop. Code refactored.
2763         (scopdet_basic_block_info): Call graphite_can_represent_loop.
2764
2765 2009-05-17  Li Feng  <nemokingdom@gmail.com>
2766
2767         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2768         Cover all the testcases (not only the filtered ones).
2769
2770 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
2771
2772         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
2773         unnecessary check. Update comments. Move check for REAL_TYPE here.
2774         (harmful_stmt_in_bb): Remove checks for conditions. This is already
2775         done in (stmt_simple_for_scop_p).
2776
2777 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
2778
2779         * graphite.c (print_global_statistics): New.
2780         (print_graphite_scop_statistic): New.
2781         (print_graphite_statistics): New.
2782         (graphite_initialize, graphite_transform_loops): Print statistics.
2783         * graphite-scop-detection (build_scops): Print statistics.
2784         (print_graphite_scop_statistics): New.
2785         (print_graphite_statistics): New.
2786
2787 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2788
2789         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
2790         (debug_clast_name_index): Removed.
2791         (debug_clast_name_indexes_1): Removed.
2792         (debug_clast_name_indexes): Removed.
2793         (clast_name_index_elt_info): Removed.
2794         (eq_clast_name_indexes): Removed.
2795         (clast_name_to_index): Removed.
2796         (new_clast_name_index): Removed.
2797         (save_clast_name_index): Removed.
2798         (save_var_name): Moved...
2799         (init_sese_params_index): Removed.
2800         (clast_name_to_gcc): Remove use of name_tree.
2801         (initialize_cloog_names): Same.
2802         (gloog): Do not call init_sese_params_index.
2803         * graphite-sese-to-poly.c (save_var_name): ...here.
2804         (parameter_index_in_region): New.
2805         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
2806         (parameter_index_in_region): Removed.
2807         (is_parameter): Remove use of name_tree.
2808         * sese.h (struct name_tree): Removed.
2809         (struct sese): Remove use of name_tree.  New field params_names.
2810         (SESE_PARAMS_NAMES): New.
2811         (SESE_PARAMS): Remove duplicate.
2812         (parameter_index_in_region): Removed.
2813         (sese_nb_params): Remove use of name_tree.
2814         (struct clast_name_index): New.
2815         (new_clast_name_index): New.
2816         (clast_name_to_index): New.
2817         (save_clast_name_index): New.
2818         (debug_clast_name_index): New.
2819         (debug_clast_name_indexes_1): New.
2820         (debug_clast_name_indexes): New.
2821         (clast_name_index_elt_info): New.
2822         (eq_clast_name_indexes): New.
2823
2824 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2825
2826         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
2827         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
2828         (graphite_loop_normal_form): Do not pass region.  Do not
2829         initialize SESE_OLDIVS.
2830         (build_graphite_loop_normal_form): Update call to
2831         graphite_loop_normal_form.
2832         * sese.c (debug_oldivs): Removed.
2833         (new_sese): Do not initialize SESE_OLDIVS.
2834         (free_sese): Do not free SESE_OLDIVS.
2835         (oldiv_for_loop): Removed.
2836         * sese.h (struct sese): Remove old_ivs.
2837         (SESE_OLDIVS): Removed.
2838         (oldiv_for_loop): Removed.
2839
2840 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2841
2842         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2843         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
2844         replaced by a call to newivs_to_depth_to_newiv.
2845         (clast_to_gcc_expression): Pass newivs, remove ivstack.
2846         (clast_to_gcc_expression_red): Same.
2847         (gcc_type_for_clast_expr): Same.
2848         (gcc_type_for_clast_eq): Same.
2849         (graphite_translate_clast_equation): Same.
2850         (graphite_create_guard_cond_expr): Same.
2851         (graphite_create_new_guard): Same.
2852         (graphite_create_new_loop): Same.
2853         (build_iv_mapping): Same.
2854         (translate_clast): Same.
2855         (gloog): Same.
2856         (loop_iv_stack_patch_for_consts): Removed.  *
2857         sese.c (iv_stack_entry_is_constant): Removed.
2858         (iv_stack_entry_is_iv): Removed.
2859         (loop_iv_stack_push_iv): Removed.
2860         (loop_iv_stack_insert_constant): Removed.
2861         (loop_iv_stack_pop): Removed.
2862         (loop_iv_stack_get_iv): Removed.
2863         (loop_iv_stack_get_iv_from_name): Removed.
2864         (debug_loop_iv_stack): Removed.
2865         (free_loop_iv_stack): Removed.
2866         (loop_iv_stack_remove_constants): Removed.  *
2867         sese.h (iv_stack_entry_kind): Removed.
2868         (iv_stack_entry_data_union): Removed.
2869         (iv_stack_entry_struct): Removed.
2870         (iv_stack_entry_p): Removed.
2871         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2872         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2873         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2874         loop_iv_stack_pop, free_loop_iv_stack): Removed.
2875         (gbb_loop_at_index): Fix indenting.
2876         (gbb_loop_index): Removed.
2877
2878 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2879
2880         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2881         Call clast_name_to_index.
2882
2883 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2884
2885         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2886         do not pass params.  Get params from SESE_PARAMS.
2887         (clast_to_gcc_expression): Same.
2888         (clast_to_gcc_expression_red): Same.
2889         (gcc_type_for_clast_eq): Same.
2890         (graphite_translate_clast_equation): Same.
2891         (graphite_create_new_loop): Same.
2892         * sese.c (rename_variables_in_stmt): Fix comment.
2893
2894 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2895
2896         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2897         newivs_index.
2898         Call save_clast_name_index.
2899         (translate_clast): Pass newivs_index.
2900         (gloog): Create and free newivs_index.
2901
2902 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2903
2904         * graphite-clast-to-gimple.c (clast_name_index): New structure.
2905         (clast_name_index_p): New type.
2906         (debug_clast_name_index): New.
2907         (debug_clast_name_indexes_1): New.
2908         (debug_clast_name_indexes): New.
2909         (clast_name_index_elt_info): New.
2910         (eq_clast_name_indexes): New.
2911         (clast_name_to_index): New.
2912         (new_clast_name_index): New.
2913         (save_clast_name_index): New.
2914         (init_sese_params_index): New.
2915         (gloog): Call init_sese_params_index.
2916         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2917         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2918         (free_sese): Free SESE_PARAMS_INDEX.
2919         * sese.h (struct sese): Add params_index.
2920         (SESE_PARAMS_INDEX): New.
2921
2922 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2923
2924         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2925         (graphite_create_new_loop): Pass the newivs vector.  Push the
2926         newly created IV to newivs.
2927         (translate_clast): Pass the newivs vector.
2928         (gloog): Create and destroy the newivs vector.
2929
2930 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2931
2932         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2933         (graphite_loop_normal_form): Initialize loop->aux with the unique
2934         IV that has been created.
2935
2936 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
2937
2938         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2939         scev with parameters in the base part. They where forbidden
2940         exidently.
2941
2942 2009-05-11  Li Feng  <nemokingdom@gmail.com>
2943
2944         * gcc.dg/graphite/graphite.exp: Set different default
2945         compile options by file names.
2946         * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2947         * gcc.dg/graphite/id-{1-9}.c: Ditto.
2948         * gcc.dg/graphite/scop-{0-20}.c: Ditto.
2949         * gcc.dg/graphite/scop-matmult.c: Ditto.
2950
2951 2009-05-08  Li Feng <nemokingdom@gmail.com>
2952
2953         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2954         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2955         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2956         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2957
2958 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
2959
2960         * graphite-scop-detection (build_scops_1): Fix little bug introduced
2961         by final cleanup.
2962
2963 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
2964
2965         * graphite-scop-detection.c (graphite_can_represent_scev): Only
2966         allow integer constant strides.
2967         (graphite_can_represent_expr): Depend on outermost_loop.
2968         (stmt_simple_memref_p, graphite_cannot_represent_loop,
2969         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2970         build_scops_1): Same.
2971         (scopdet_basic_block_info): Same and insert layered SCoP
2972         detection.
2973         (try_generate_gimple_bb): Cleanup.
2974         (build_scops): Enable data references.
2975
2976         * gcc.dg/graphite/id-5.c: New.
2977         * gcc.dg/graphite/id-9.c: New.
2978         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2979         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2980
2981 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2982
2983         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2984         that we have not yet built for this SCoP.
2985
2986 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2987
2988         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2989         for complex numbers.
2990
2991 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2992
2993         * graphite-ppl.c: Fix build if cloog is not available.
2994
2995 2009-05-04  Li Feng  <nemokingdom@gmail.com>
2996
2997         * tree-parloops.c (loop_parallel_p): Remove construction of
2998         NITER and REDUCTION_LIST.
2999         (try_get_loop_niter): New.
3000         (try_create_reduction_list): New.
3001         (parallelize_loops): Bypass the failed checkings in autopar
3002         when can_be_parallel in loop structure is set to true.
3003
3004 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
3005
3006         * gcc.dg/graphite/id-6.c: Update testcase.
3007         * gcc.dg/graphite/scop-3.c: Dito.
3008
3009 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
3010
3011         * graphite-scop-detection.c (stmt_simple_for_scop_p):
3012         Enable EQ_EXPR and NE_EXPR again.
3013
3014 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3015
3016         * graphite-scop-detection.c (graphite_can_represent_scev):
3017         Add check if scev is affine multivariate.
3018         (harmful_stmt_in_bb): Check if we can represent the conditions.
3019         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
3020         harmful_stmt_in_bb.
3021         * gcc.dg/graphite/id-7.c: New.
3022
3023 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3024
3025         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
3026         Check all bbs in region, not only the bbs that are represented in
3027         GRAPHITE.
3028         (build_poly_scop): Add newline.
3029         * gcc.dg/graphite/id-8.c: New.
3030
3031 2009-04-30  Li Feng  <nemokingdom@gmail.com>
3032
3033         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
3034         when loop initialize.
3035         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
3036         * common.opt: Declare flag_graphite_force_parallel.
3037         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
3038         loop parallel.
3039         * graphite-poly.c (apply_poly_transforms): Introduce
3040         flag_graphite_force_parallel.
3041         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
3042         * toplev.c (process_options): ditto and replace a not correctly
3043         encoded space.
3044
3045 2009-04-30  Li Feng  <nemokingdom@gmail.com>
3046
3047         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
3048         Change the call of gbb_loop_at_index and/or gbb_loop_index due
3049         to the redefinition.
3050         (compute_cloog_iv_types_1): ditto.
3051         (build_iv_mapping): ditto.
3052         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
3053         initialization.
3054         (free_gimple_bb): Removed GBB_LOOPS related free part.
3055         (build_bb_loops): Removed.
3056         * sese.h (struct gimple_bb): Removed loops.
3057         (GBB_LOOPS): Removed.
3058         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
3059         (gbb_loop_index): ditto.
3060
3061 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3062
3063         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
3064         allow non constant strides.
3065         * gcc.dg/graphite/scop-20.c: New.
3066
3067 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3068
3069         * graphite-scop-detection.c (dot_all_scops): Fix system call
3070         return value warning.
3071         (dot_scop): Same.
3072
3073 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3074
3075         * gcc.dg/graphite/id-6.c: Fix pattern.
3076         * gcc.dg/graphite/scop-3.c: Same.
3077
3078 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3079
3080         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
3081         build_pairwise_constraint, dr_equality_constraints,
3082         build_pairwise_scheduling_equality,
3083         build_pairwise_scheduling_inequality, lexicographically_gt_p,
3084         build_lexicographically_gt_constraint, dependence_polyhedron,
3085         graphite_legal_transform_dr, graphite_legal_transform_bb,
3086         graphite_legal_transform): New.
3087         * graphite-poly.h (graphite_legal_transform): Declared.
3088         * graphite-sese-to-poly.c (build_poly_scop): Call to
3089         graphite_legal_transform is disabled for the moment.
3090
3091 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3092
3093         * graphite-poly.h (pbb_nb_scattering_dims): New.
3094         (pbb_nb_scattering): Use it.
3095
3096 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3097
3098         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
3099         Pointset_Powerset version of ppl_insert_dimensions.
3100         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
3101
3102 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3103
3104         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
3105
3106 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3107
3108         * graphite-poly.h: Fix comment.
3109
3110 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
3111
3112         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
3113
3114 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3115
3116         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
3117         statements.
3118
3119 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3120
3121         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
3122         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
3123         conditions.
3124
3125 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
3126
3127         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
3128         handle EQ_EXPR and NE_EXPR.
3129
3130 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
3131
3132         * graphite-poly.h (poly_dr): Fix comment.
3133
3134 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
3135             Tobias Grosser  <grosser@fim.uni-passau.de>
3136
3137         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
3138         with a zero dimension polyhedron.
3139         (find_scop_parameters): Move the call to scop_set_nb_params here.
3140         (build_loop_iteration_domains): Store in loop->aux the iteration
3141         domain polyhedron.
3142         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
3143         by any loop in scop.
3144         (build_poly_scop): Do not call scop_set_nb_params.
3145
3146 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
3147             Tobias Grosser  <grosser@fim.uni-passau.de>
3148
3149         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
3150         add_condition_to_domain not GT_EXPR.
3151
3152 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3153
3154         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
3155         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
3156         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
3157         upper_bound_assign to calculate unions.
3158         * gcc.dg/graphite/id-6.c: New.
3159
3160 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3161
3162         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
3163         handle abnormal edges.
3164
3165 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3166
3167         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
3168         (free_poly_bb): Also free poly_drs.
3169         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
3170         (poly_dr): Polyhedron to Pointset_Powerset.
3171         (pdr_accessp_nb_subscripts): Same.
3172         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
3173         poly_drs.
3174
3175 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3176
3177         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
3178         names into more meaningful names.
3179
3180 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3181
3182         * gfortran.dg/graphite/interchange-1.c: New.
3183         * gfortran.dg/graphite/interchange-2.c: New.
3184
3185 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3186
3187         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
3188         the reduction_list.
3189         * tree-parloops.c (rewrite_phi_with_iv): New.
3190         (rewrite_all_phi_nodes_with_iv): New.
3191         (canonicalize_loop_ivs): Call them.
3192
3193 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3194
3195         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
3196         graphite_find_data_references_in_stmt.
3197         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
3198         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
3199
3200 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3201
3202         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
3203
3204 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3205
3206         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
3207         instead of bb_in_region.
3208         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
3209         (build_sese_conditions): Use flag_bb_in_sese.
3210         * sese.c (register_bb_in_sese): Removed.
3211         (new_sese): Remove initialization of SESE_REGION_BBS.
3212         (free_sese): Do not free SESE_REGION_BBS.
3213         * sese.h (struct sese): Remove field region_basic_blocks.
3214         (SESE_REGION_BBS): Removed.
3215         (bb_in_sese_p): Implement in function of bb_in_region.
3216
3217 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
3218
3219         * graphite-scop-detection.c (limit_scops): Deal only with single exit
3220         loops.
3221
3222 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3223
3224         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
3225         and EQ_EXPR.
3226         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
3227         (add_condition_to_domain): New.
3228         (add_condition_to_pbb): New.
3229         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
3230         * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
3231
3232 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3233
3234         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
3235         ppl_Pointset_Powerset.
3236         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
3237         * graphite-poly.h (poly_bb): poly_bb.domain Same.
3238         (pbb_nb_loops): Same.
3239         * graphite-sese-to-poly.c (build_loop_iteration_domains,
3240         add_conditions_to_domain): Same.
3241         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
3242         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
3243         ppl_const_Polyhedron_t.
3244         (ppl_print_powerset_matrix): New.
3245         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
3246         ppl_print_powerset_matrix): New.
3247         (ppl_print_polyhedron_matrix): Updated.
3248
3249 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
3250
3251         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
3252
3253 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
3254
3255         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
3256         (print_iteration_domains, debug_iteration_domain,
3257         debug_iteration_domains): New.
3258         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
3259         debug_iteration_domains): Declared.
3260         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
3261         indenting.
3262
3263 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
3264             Sebastian Pop  <sebastian.pop@amd.com>
3265
3266         * graphite-poly.h (print_iteration_domain): New.
3267         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
3268         (build_sese_conditions_1, build_sese_conditions_after,
3269         build_sese_conditions_before): New.
3270         (build_sese_conditions): Rewritten.
3271
3272 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
3273             Tobias Grosser  <grosser@fim.uni-passau.de>
3274
3275         Cleanup of code generation liveouts.
3276         * graphite-clast-to-gimple.c (translate_clast): Use a single
3277         rename_map instead of one per translated statement.
3278         Do not use SESE_LIVEOUT_RENAMES.
3279         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
3280         (gloog): Do not use SESE_LIVEOUT_RENAMES.
3281         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
3282         phi node of a reduction: when a loop contains a reduction used outside
3283         the loop, there should be a scalar close phi node on the exit block.
3284         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
3285         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
3286         (free_sese): Do not free them.
3287         (sese_build_liveouts_use): Do not use them.
3288         (sese_build_liveouts_bb): Same.
3289         (sese_build_liveouts): Same.
3290         (sese_insert_phis_for_liveouts): Same.
3291         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
3292         (defined_in_loop_p): New.
3293         (alive_after_loop): New.
3294         (close_phi_not_yet_inserted_p): New.
3295         (struct alep, alep_p): New.
3296         (add_loop_exit_phis): Remove from the rename_map all the names defined
3297         in the code generated loop.
3298         (insert_loop_close_phis): Traverse the rename_map passed to it.
3299         Don't use SESE_LIVEOUT_RENAMES.
3300         (default_liveout_before_guard): Renamed default_before_guard.
3301         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
3302         (graphite_copy_stmts_from_block): Do not directly call set_rename.
3303         (register_sese_liveout_renames): Removed.
3304         (copy_bb_and_scalar_dependences): Do not call it.
3305         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
3306         reduction_list.
3307         (SESE_LIVEOUT): Removed.
3308         (SESE_LIVEOUT_RENAMES): Removed.
3309         (SESE_REDUCTION_LIST): Removed.
3310         (sese_build_liveouts): Removed.
3311         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
3312         (insert_loop_close_phis): Pass a htab_t instead of a sese.
3313         (insert_guard_phis): Same.
3314         (rename_map_elt): Declare a VEC of them.
3315         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3316         trees not pointers to trees.
3317
3318         Rewrite in canonical close SSA form:
3319         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
3320         (limit_scops): Close the scop after the block containing the close phi
3321         nodes.
3322         (canonicalize_loop_closed_ssa): New.
3323         (canonicalize_loop_closed_ssa_form): New.
3324         (build_scops): Call canonicalize_loop_closed_ssa_form.
3325
3326         * graphite-sese-to-poly.c: Fix typos.
3327
3328 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
3329
3330         * graphite-poly.c (print_scattering_function, print_pbb_domain):
3331         Extended.
3332         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
3333         (print_pbb): Add conditions.
3334
3335 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
3336             Sebastian Pop  <sebastian.pop@amd.com>
3337
3338         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
3339         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
3340         (build_scop_bbs_1): New.
3341         (build_scop_bbs): Rewrite.
3342         * sese.h (bb_in_region): New.
3343
3344 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3345
3346         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3347         poly_drs vector.
3348         (print_scop): Style.
3349         * graphite-poly.h (poly_bb): Add drs vector.
3350         (PBB_DRS): Add accessor.
3351         * graphite-sese-to-poly.c (build_poly_dr): New.
3352         (build_pbb_drs, build_scop_drs): New.
3353         (build_poly_scop): call build_scop_drs (Disabled at the moment).
3354
3355 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3356
3357         * tree-ssa-loop.c: Include forgotten toplev.h
3358
3359 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3360
3361         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
3362         * gcc.dg/graphite/pr37883.c: Remove -floop-*
3363         * gcc.dg/graphite/pr37928.c: Same
3364         * gcc.dg/graphite/pr38409.c: Same
3365         * gcc.dg/graphite/pr38498.c: Same
3366         * gcc.dg/graphite/pr38559.c: Same
3367         * gcc.dg/graphite/pr39335.c: Same
3368         * gcc.dg/graphite/pr39335_1.c: Same
3369         * gfortran.dg/graphite/block-2.f: Same
3370         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
3371         with -floop-*.
3372
3373 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
3374
3375         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
3376         build_access_matrix, build_scop_data_accesses): Remove access function
3377         building. (We get a new version soon).
3378         (build_bb_loops, scan_tree_for_params_right_scev): Update.
3379         * sese.h (nb_loops_around_loop_in_sese): Remove.
3380         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
3381
3382 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
3383             Sebastian Pop  <sebastian.pop@amd.com>
3384
3385         * graphite-scop-detection.c (struct scopdet_info): Rename last
3386         field to exit.
3387         (scopdet_basic_block_info, build_scops_1): Don't use
3388         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
3389
3390 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
3391             Sebastian Pop  <sebastian.pop@amd.com>
3392
3393         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
3394         * sese.c (sese_build_liveouts_use): Renamed from
3395         sese_build_livein_liveouts_use. Remove liveins.
3396         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
3397         Call sese_build_liveouts_use.
3398         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
3399         Call sese_build_liveouts_bb.
3400         (new_sese, free_sese): Remove liveins.
3401         (sese_add_exit_phis_var): Deleted.
3402         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
3403         directly.
3404         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
3405
3406         * sese.h (sese): Remove