OSDN Git Service

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