OSDN Git Service

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