OSDN Git Service

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