OSDN Git Service

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