OSDN Git Service

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