OSDN Git Service

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