OSDN Git Service

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