OSDN Git Service

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