OSDN Git Service

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