OSDN Git Service

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