OSDN Git Service

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