OSDN Git Service

03009a9ec99fb296b3fcdc6bcddcacd785981e61
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2
3         * graphite-dependences.c: Clarify comments.
4         (build_pddr): Add an extra parameter direction.
5         (graphite_legal_transform_dr): Use build_pddr.
6         (dot_original_deps_stmt_1): Update use of build_pddr.
7         (dot_transformed_deps_stmt_1): Same.
8         (dot_original_deps): Same.
9         (dot_transformed_deps): Same.
10
11         * testsuite/gcc.dg/graphite/interchange-12.c: New.
12         * testsuite/gcc.dg/graphite/block-7.c: New.
13
14 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
15
16         * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
17         (pddr_transformed_scattering): Removed.
18         (graphite_legal_transform_dr): Use build_pddr.
19         (dot_original_deps_stmt_1): Same.
20         (dot_transformed_deps_stmt_1): Same.
21         (dot_original_deps): Same.
22         (dot_transformed_deps): Same.
23
24 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
25
26         * graphite-dependences.c (lexicographically_gt_p): Add comments.
27         (build_lexicographically_gt_constraint): Same.
28         (dependence_polyhedron_1): Same.
29         (dependence_polyhedron): Same.
30
31 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
32
33         * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
34         (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
35         (lexicographically_gt_p): Change type of direction to int.
36         (build_lexicographically_gt_constraint): Same.
37         (dependence_polyhedron_1): Same.
38         (dependence_polyhedron): Same.
39         (pddr_original_scattering): Use integers for direction.
40         (pddr_transformed_scattering): Same.
41         (graphite_legal_transform_dr): Same.
42         (graphite_carried_dependence_level_k): Same.
43
44 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
45
46         * graphite-dependences.c (build_pairwise_constraint): Renamed
47         ppl_build_relation.  Moved...
48         (dr_equality_constraints): Use ppl_build_relation.
49         (build_pairwise_scheduling_equality): Same.
50         (build_pairwise_scheduling_inequality): Same.
51         * graphite-ppl.c (ppl_build_relation): ...here.
52         * graphite-ppl.h (ppl_build_relation): Declared.
53
54 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
55
56         PR middle-end/42681
57         * graphite-clast-to-gimple.c (gloog_error): New static variable.
58         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
59         Set gloog_error when such an expression failed to be built.
60         (translate_clast): Early return when gloog_error is set.
61         (gloog): Clear gloog_error.  When gloog_error is set, call
62         set_ifsese_condition to enable the original code.  Return the status
63         of the code generation based on gloog_error.
64         * sese.c (set_ifsese_condition): New.
65         * sese.h (set_ifsese_condition): Declared.
66
67         * testsuite/g++.dg/graphite/pr42681.C: New.
68
69 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
70
71         PR middle-end/42732
72         * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
73         rename_nb_iterations.
74         * sese.c (rename_variables_in_operand): New.
75         (rename_variables_in_expr): New.
76         (rename_nb_iterations): New.
77         (sese_adjust_liveout_phis): Update the rename_map.
78         * sese.h (rename_nb_iterations): Declared.
79         * tree-scalar-evolution.c (scev_reset_htab): New.
80         (scev_reset): Call scev_reset_htab.
81         * tree-scalar-evolution.h (scev_reset_htab): Declared.
82
83         * testsuite/gfortran.dg/graphite/pr42732.f: New.
84
85 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
86
87         PR middle-end/42393
88         * graphite-clast-to-gimple.c: Fix formatting.
89         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
90         (expr_defined_in_loop_p): New.
91         (add_loop_exit_phis): Also handle full expressions: remove from
92         the rename_map the expressions defined in the loop that we're closing.
93
94         * testsuite/gfortran.dg/graphite/pr42393-1.f90: New.
95         * testsuite/gfortran.dg/graphite/pr42393.f90: Add new flags
96         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
97         make this testcase useful in the Graphite branch.
98
99 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
100
101         * graphite-scop-detection.c (exclude_component_ref): Removed.
102         (is_simple_operand): Removed.
103         (stmt_simple_for_scop_p): Remove use of is_simple_operand.
104
105 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
106
107         PR middle-end/42221
108         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
109         the array indexing of ADDR_EXPRs.
110
111         * testsuite/gcc.dg/graphite/pr42221.c: New.
112
113 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
114
115         PR middle-end/42521
116         * graphite.c (graphite_finalize): Call scev_reset.
117         (graphite_transform_loops): Do not call scev_reset between the code
118         generation of scops.
119
120         * testsuite/gcc.dg/graphite/pr42521.c: New.
121
122 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
123
124         * graphite-interchange.c (memory_stride_in_loop): Renamed
125         pdr_stride_in_loop.
126         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
127         (memory_strides_in_loop): Memoize the memory strides per loop.
128         (lst_interchange_profitable_p): Do not initialize to zero the memory
129         strides.
130         * graphite-poly.h (struct lst): Add a field memory_strides.
131         (LST_LOOP_MEMORY_STRIDES): New.
132         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
133         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
134
135 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
136
137         * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
138         memory_strides_in_loop.  Gather memory strides on a whole loop.
139         (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
140         (lst_interchange_profitable_p): Removed.
141         (lst_try_interchange_loops): Call lst_interchange_profitable_p.
142
143 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
144
145         Revert patch 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
146         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
147         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
148         Remove context_loop and level.
149
150 2010-01-07  Richard Guenther  <rguenther@suse.de>
151
152         PR tree-optimization/42641
153         * sese.c (rename_map_elt_info): Use the SSA name version, do
154         not hash pointers.
155
156 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
157
158         * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
159         blocked" only when both the strip mine and the interchange have
160         been applied.
161
162         * testsuite/gcc.dg/graphite/block-2.c: Removed.
163         * testsuite/gcc.dg/graphite/block-3.c: Add scan pattern.
164         * testsuite/gcc.dg/graphite/block-4.c: Same.
165         * testsuite/gcc.dg/graphite/block-5.c: Same.
166         * testsuite/gcc.dg/graphite/block-6.c: Same.
167
168 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
169
170         * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
171         before allocating a new one.
172         (copy_renames): Check that slot is not NULL.
173         (mark_bb_with_pbb): Same.
174         (compute_cloog_iv_types_1): Same.
175         * graphite-interchange.c (lst_perfect_nestify): Free the before,
176         nest, and after LSTs.
177         (lst_try_interchange_loops): Same.
178
179 2010-01-05  Sebastian Pop  <sebastian.pop@amd.com>
180
181         PR middle-end/42178
182         * graphite-interchange.c (lst_try_interchange_loops): Do not return
183         the before, nest, and after LSTs.
184         (lst_try_interchange): Removed.
185         (lst_interchange_select_inner): Do not iterate over the LSTs if they
186         were modified.
187         (lst_interchange_select_outer): Apply interchange on the outer loop
188         until there are no more changes in the inner loops.
189
190 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
191
192         Revert patch fixing PR middle-end/42221.
193
194 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
195
196         PR middle-end/42180
197         * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
198         GIMPLE_CALL.
199
200         * testsuite/gfortran.dg/graphite/pr42180.f90: Add compile flags.
201
202 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
203
204         PR middle-end/42180
205         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
206         that contain only one statement.
207
208         * testsuite/gfortran.dg/graphite/pr42180.f90: New.
209
210 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
211
212         PR middle-end/42393
213         * testsuite/gfortran.dg/graphite/pr42393.f90: New.
214
215 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
216
217         PR middle-end/42186
218         * testsuite/gfortran.dg/graphite/pr42186.f90: New.
219
220 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
221
222         PR middle-end/42205
223         * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
224         Insert the reduction copy in the same block as the phi node.
225         (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
226
227         * testsuite/gcc.dg/graphite/pr42205-1.c: New.
228         * testsuite/gcc.dg/graphite/pr42205-2.c: New.
229
230 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
231
232         PR middle-end/42221
233         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
234         the array indexing of ADDR_EXPRs.
235
236         * testsuite/gcc.dg/graphite/pr42221.c: New.
237
238 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
239
240         PR middle-end/42178
241         PR middle-end/42334
242         * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
243         index.  Call lst_interchange_select_inner only once.
244         (lst_interchange_select_inner): Update use of lst_try_interchange.
245         (lst_interchange_select_outer): Update.
246
247 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
248
249         PR middle-end/42178
250         PR middle-end/42334
251         * graphite-interchange.c (lst_try_interchange): Do not increment the
252         the OUTER index when there is no AFTER kernel.  Do not increment the
253         OUTER index for after processing the AFTER kernel.
254         (lst_interchange_select_inner): Call lst_try_interchange only on loops.
255         (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
256         index.  Do not pass to lst_interchange_select_inner the OUTER index.
257         (scop_do_interchange): Update use of lst_interchange_select_outer.
258
259         * testsuite/gfortran.dg/graphite/graphite.exp
260         (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
261         * testsuite/gfortran.dg/graphite/interchange-1.f: Add comment.  Clean
262         the graphite dump file.
263         * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
264         * testsuite/gfortran.dg/graphite/pr42334-1.f: New.
265
266 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
267
268         PR middle-end/42178
269         PR middle-end/42334
270         * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
271         that are empty.
272         (lst_do_interchange_1): Renamed lst_interchange_select_inner.
273         (lst_try_interchange): Reimplemented.
274         (lst_interchange_select_inner): Same.
275         (lst_do_interchange): Renamed lst_interchange_select_outer.
276         Reimplemented.
277         (scop_do_interchange): Update use of lst_interchange_select_outer.
278
279         * testsuite/g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
280         * testsuite/gcc.dg/graphite/block-0.c: Un-XFAILed.
281         * testsuite/gcc.dg/graphite/pr42211.c: New.
282         * testsuite/gfortran.dg/graphite/pr42334.f90: New.
283
284 2009-12-14  Sebastian Pop  <sebastian.pop@amd.com>
285
286         PR middle-end/42181
287         * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
288         carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
289
290         * testsuite/gfortran.dg/graphite/pr42181.f90: New.
291
292 2009-12-12  Sebastian Pop  <sebpop@gmail.com>
293
294         PR middle-end/42284
295         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
296         insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
297         (detect_commutative_reduction_arg): Simplified.
298         (detect_commutative_reduction): Early return when the argument of
299         the close phi is not of an SSA_NAME.
300
301         * testsuite/gcc.dg/graphite/pr42284.c: New.
302
303 2009-12-11  Alexander Monakov  <amonakov@ispras.ru>
304
305         * dbgcnt.def (graphite_scop): New counter.
306         * graphite.c: Include dbgcnt.h
307         (graphite_transform_loops): Use new counter to limit transformations.
308
309 2009-12-08  Sebastian Pop  <sebpop@gmail.com>
310
311         PR middle-end/42285
312         * graphite-scop-detection.c (graphite_can_represent_init): Also
313         handle more complex MULT_EXPRs containing parameters by recursion
314         on the structure.
315
316         * testsuite/gfortran.dg/graphite/pr42285.f90: New.
317
318 2009-12-01  Tobias Grosser  <grosser@fim.uni-passau.de>
319
320         * testsuite/g++.dg/graphite/pr42130.C: Fix type.
321
322 2009-11-29  Alexander Monakov <amonakov@gcc.gnu.org>
323
324         * testsuite/g++.dg/graphite/pr42130.C: Correct testcase.
325
326 2009-11-24  Tobias Grosser  <grosser@fim.uni-passau.de>
327
328         * graphite-clast-to-gimple.c (try_mark_loop_parallel,
329         graphite_create_new_loop_guard, translate_clast_for): Fix comments.
330
331 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
332
333         PR middle-end/42130
334         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
335         translate_clast_for_loop): New.
336         (translate_clast_for): Add a condition around the loop, to do not
337         execute loops with zero iterations.
338         * testsuite/g++.dg/graphite/pr42130.C: New.
339         * testsuite/gcc.dg/graphite/pr35356-2.c: Adapt.
340
341 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
342
343         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
344         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
345         Remove context_loop and level.
346
347 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
348
349         * graphite-clast-to-gimple.c (translate_clast_user,
350         translate_clast_for, translate_clast_guard): Simplify and move common
351         elements to translate_clast().
352         (translate_clast): Simplify and get common elements.
353
354 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
355
356         * graphite-clast-to-gimple.c (translate_clast_user,
357         translate_clast_for, translate_clast_guard): Split out of
358         translate_clast.
359
360 2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>
361
362         * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
363         clast_name_to_index, save_clast_name_index, debug_clast_name_index,
364         debug_clast_name_indexes_1, debug_clast_name_indexes,
365         clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
366         (clast_name_to_gcc, clast_to_gcc_expression,
367         clast_to_gcc_expression_red, gcc_type_for_clast_expr,
368         gcc_type_for_clast_eq, graphite_translate_clast_equation,
369         graphite_create_guard_cond_expr, graphite_create_new_loop,
370         translate_clast): Add params_index.
371         (initialize_cloog_names): Create parameter strings from scratch, do
372         not reference other strings.
373         (create_params_index): New.
374         (gloog): Initialize params_index.
375         * graphite-scop-detection (free_scops_1): Removed.
376         (limit_scops): Use normal free_scops.
377         * graphite-sese-to-poly.c (save_var_names): Removed.
378         (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
379         and SESE_PARAMS_INDEX.
380         * sese.c (new_sese, free_sese): Dito.
381         * sese.h (struct sese): Remove params_index, params_names.
382         (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
383
384 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
385
386         Revert the following patch from 2009-09-14:
387         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
388         tree-scalar-evolution.h, and then tree-data-ref.h.
389         * graphite-clast-to-gimple.c: Same.
390         * graphite-dependences.c: Same.
391         * graphite-interchange.c: Same.
392         * graphite-poly.c: Same.
393         * graphite-scop-detection.c: Same.
394         * graphite-sese-to-poly.c: Same.
395         * graphite.c: Same.
396         * lambda-code.c: Same.
397         * matrix-reorg.c: Same.
398         * tree-data-ref.c: Same.
399         * tree-if-conv.c: Same.
400         * tree-loop-distribu: Same.: Same.
401         * tree-loop-linear.c: Same.
402         * tree-parloops.c: Same.
403         * tree-predcom.c: Same.
404         * tree-vect-patterns.c: Same.
405
406 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
407
408         Revert patch from 2009-09-14.
409         * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
410         passes at -O1 and below.
411
412 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
413
414         PR middle-end/40281
415         * testsuite/gcc.dg/graphite/pr40281.c: New.
416
417         * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
418         evolutions should not variate in inner loops.
419
420 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
421
422         PR middle-end/42050
423         * testsuite/gfortran.dg/graphite/pr42050.f90: New.
424
425 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
426
427         * graphite-interchange.c (memory_strides_in_loop_depth): New.
428         (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
429
430 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
431
432         * graphite-blocking.c (scop_do_block): New.
433         * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
434         * graphite-poly.h (scop_do_block): Declared.
435
436 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
437
438         * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
439         depth is the loop nesting depth in the LST.  Call psct_dynamic_dim
440         to transform depth into the time_depth before calling
441         pbb_number_of_iterations_at_time.
442         (lst_do_strip_mine): Use a scalar variable instead of recomputing
443         lst_depth.
444
445 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
446
447         Reverted the patch for "scattering permutations" from 2009-10-28.
448
449         * graphite-poly.c (print_permutation): New.
450         (debug_permutation): New.
451         (new_poly_bb): Initialize PBB_PERMUTATION.
452         (free_poly_bb): Free PBB_PERMUTATION.
453         * graphite-poly.h (pbb_permutation_elt_p): Declared.
454         (struct pbb_permutation_elt): New.
455         (PBB_PERMUTATION_ELT_STRIDE): New.
456         (PBB_PERMUTATION_ELT_STRIDED_P): New.
457         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
458         (new_pbb_permutation_elt): New.
459         (pbb_permutation_elt_free): New.
460         (struct poly_bb): Add field permutation.
461         (PBB_PERMUTATION): New.
462         (print_permutation): Declared.
463         (debug_permutation): Declared.
464
465 2009-11-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
466
467         * graphite-interchange.c (build_partial_difference): New.
468         (memory_stride_in_loop): Refactored the computation of
469         equality constraints into build_partial_difference function.
470         Added support for debugging stride computations.
471
472 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
473
474         * graphite-clast-to-gimple.c (gloog): Free if_region,
475         if_region->true_region, and if_region->region.
476         * sese.c (if_region_set_false_region): Free if_region->false_region.
477         (create_if_region_on_edge): Do not use GGC_NEW.
478         (move_sese_in_condition): Remove useless initialization.
479
480 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
481
482         * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
483         for the loops created by the loop distribution.  Do not modify the
484         input LSTs.
485         (lst_try_interchange_loops): Same.  Use a temporary LST for the
486         transformed schedule.  Call lst_update_scattering before data
487         dependence analysis.
488         (lst_try_interchange): Pass an extra parameter INDEX.
489         (lst_do_interchange_1): New.
490         (lst_do_interchange): Call lst_do_interchange_1.
491         (scop_do_interchange): Call lst_update_scattering.
492         * graphite-poly.c (apply_poly_transforms): Do not call
493         lst_update_scattering.
494         * graphite-poly.h (lst_pred): New.
495         (lst_succ): New.
496         (lst_find_first_pbb): Return NULL when not found.
497         (lst_empty_p): New.
498         (lst_insert_in_sequence): Allow LST1 to be NULL.
499         (lst_replace): New.
500         (lst_substitute_3): New.
501         * gcc.dg/graphite/interchange-1.c: XFail.
502         * gcc.dg/graphite/interchange-8.c: XFail.
503         * gcc.dg/graphite/interchange-11.c: XFail.
504
505 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
506
507         * graphite-interchange.c (lst_perfectly_nested_p): New.
508         (lst_perfect_nestify): New.
509         (lst_try_interchange_loops): Call store_lst_schedule,
510         lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
511         (scop_do_interchange): Avoid redundant legality test.
512         Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
513         * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
514         * graphite-poly.h (psct_static_dim): New.
515         (lst_dewey_number_at_depth): New.
516         (lst_find_pbb): Restructured.
517         (lst_find_first_pbb): Restructured.
518         (lst_find_last_pbb): New.
519         (lst_contains_p): New.
520         (lst_contains_pbb): New.
521         (lst_create_nest): New.
522         (lst_remove_from_sequence): New.
523         (pbb_update_scattering): New.
524         (lst_update_scattering_under): New.
525         (lst_update_scattering_seq): New.
526         (lst_update_scattering): New.
527         (lst_insert_in_sequence): New.
528         (lst_distribute_lst): New.
529         (lst_remove_all_before_including_pbb): New.
530         (lst_remove_all_before_excluding_pbb): New.
531
532 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
533
534         * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
535         get_loop_exit_edges.
536
537 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
538
539         * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
540
541 2009-10-28  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
542
543         * graphite-poly.c (print_permutation): New.
544         (debug_permutation): New.
545         (new_poly_bb): Initialize PBB_PERMUTATION.
546         (free_poly_bb): Free PBB_PERMUTATION.
547         * graphite-poly.h (pbb_permutation_elt_p): Declared.
548         (struct pbb_permutation_elt): New.
549         (PBB_PERMUTATION_ELT_STRIDE): New.
550         (PBB_PERMUTATION_ELT_STRIDED_P): New.
551         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
552         (new_pbb_permutation_elt): New.
553         (pbb_permutation_elt_free): New.
554         (struct poly_bb): Add field permutation.
555         (PBB_PERMUTATION): New.
556         (print_permutation): Declared.
557         (debug_permutation): Declared.
558
559 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
560
561         * graphite-clast-to-gimple.c (gloog): Do not call
562         sese_reset_aux_in_loops.
563         * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
564         extra argument for domains.  Do not use loop->aux.
565         (build_scop_iteration_domain): Initialize and free domains, pass it
566         to build_loop_iteration_domains and extract the information from
567         domains.  Do not use loop->aux.
568         * sese.c (sese_reset_aux_in_loops): Removed.
569         * sese.h (sese_reset_aux_in_loops): Removed.
570
571 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
572
573         * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
574         (dependency_in_loop_p): Same.
575         (translate_clast): Do not use loop->aux.  Initialize
576         loop->can_be_parallel.
577         (mark_loops_parallel): Removed.
578         * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
579         * graphite.c (free_aux_in_new_loops): Removed.
580         (graphite_finalize): Do not call free_aux_in_new_loops.
581         (graphite_transform_loops): Do not call mark_loops_parallel.
582
583 2009-10-26  Li Feng  <nemokingdom@gmail.com>
584
585         * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
586         (translate_clast): Pass an extra parameter LEVEL.
587         Call get_scattering_level.
588         * graphite-clast-to-gimple.h (get_scattering_level): New.
589
590 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
591
592         * cfgloop.c (alloc_loop): Initialize loop->single_iv.
593         * cfgloop.h (struct loop): New field single_iv.
594
595         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
596         loop->aux anymore: use loop->single_iv.
597         (graphite_loop_normal_form): Moved...
598         (build_graphite_loop_normal_form): Removed.
599         (gloog): Do not call build_graphite_loop_normal_form.
600         (free_aux_in_new_loops): Moved...
601         (mark_loops_parallel): Restructure.
602         * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
603         * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
604         (scop_canonicalize_loops): New.
605         (build_poly_scop): Call scop_canonicalize_loops.
606         * graphite.c (free_aux_in_new_loops): ...here.
607
608 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
609
610         * g++.dg/graphite/graphite.exp: Add the same rules as in
611         gcc.dg/graphite/graphite.exp.
612
613 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
614
615         * g++.dg/graphite/id-1.C: New.
616
617 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
618
619         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
620         argument base_name.
621         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
622         (rewrite_phi_out_of_ssa): Same.
623         (rewrite_cross_bb_scalar_deps): Same.
624         (translate_scalar_reduction_to_array): Same.
625
626 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
627
628         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
629         dump_alias_graphs.
630
631 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
632
633         * graphite-sese-to-poly.c (dump_alias_graphs): New.
634         (build_scop_drs): Call dump_alias_graphs.
635
636 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
637
638         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
639         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
640         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
641         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
642         * graphite-poly.h (free_lst): New.
643         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
644         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
645
646 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
647
648         * graphite-poly.h (struct scop): Add a field saved_schedule.
649         (SCOP_SAVED_SCHEDULE): New.
650         (store_lst_schedule): New.
651         (restore_lst_schedule): New.
652         (store_scattering): Call store_lst_schedule.
653         (restore_scattering): Call restore_lst_schedule.
654
655 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
656
657         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
658         (pdr_add_alias_set): Same.
659         (build_poly_dr): Same.
660         (build_alias_set_optimal_p): Same.
661         (build_base_obj_set_for_drs): Same.  Do not store the result of
662         graphds_dfs.
663
664 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
665
666         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
667         all_components_are_cliques to 1.
668
669 2009-10-20  Li Feng  <nemokingdom@gmail.com>
670
671         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
672         the new structure.
673         (pdr_add_alias_set): Update retrieving alias_set_num.
674         (build_poly_dr): Update retrieving dr_base_object_set.
675         (partition_drs_to_sets): Remove.
676         (build_alias_set_optimal_p): New.
677         (build_alias_set_for_drs): Rename.
678         (build_scop_drs): Update.
679         * graphite-sese-to-poly.h (struct base_alias_pair): New.
680         (ALIAS_SET_INDEX): Remove.
681         (BASE_OBJECT_SET_INDEX): Remove.
682
683 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
684
685         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
686
687 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
688
689         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
690         loop upper bounds for 1-element arrays at end of structures.
691         * tree-flow.h (array_at_struct_end_p): Declared.
692         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
693
694 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
695
696         * g++.dg/graphite/pr41305.C: New.
697
698 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
699
700         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
701         construction of parameter constraints from loop iteration analysis.
702         * gcc.dg/graphite/run-id-2.c: New test.
703
704 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
705
706         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
707         and new_cstr.
708
709 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
710
711         * graphite-dependences.c (dependence_polyhedron_1): Remove
712         unused gdim dimensions from the DDR polyhedron.
713
714 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
715
716         * graphite-dependences.c (pddr_transformed_scattering): New.
717         (dot_original_deps_stmt_1): New.
718         (dot_transformed_deps_stmt_1): New.
719         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
720         dot_transformed_deps_stmt_1.
721         (dot_original_deps): New.
722         (dot_transformed_deps): New.
723         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
724
725 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
726
727         * graphite-dependences.c (reduction_dr_1): Remove wrong
728         assert: reduction BBs can have multiple reduction writes
729         to memory.  interchange-3.f90 is an example.
730
731 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
732
733         * gfortran.dg/graphite/interchange-3.f90: New.
734
735 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
736
737         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
738
739 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
740
741         * graphite-dependences.c (dependence_polyhedron_1): Add the
742         context to the dependence polyhedron.
743
744 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
745
746         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
747         PBB_PDR_DUPLICATES_REMOVED.
748         (new_poly_bb): Same.
749
750 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
751
752         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
753         SCOP_CONTEXT.
754         (build_loop_iteration_domains): Extract bounds on parameters
755         based on the data size.
756         (build_scop_context): Do not initialize SCOP_CONTEXT;
757         add new constraints.
758
759 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
760
761         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
762         * graphite-ppl.h (graphite-ppl.h): Declared.
763
764 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
765
766         * graphite-ppl.c (ppl_print_linear_expr): New.
767         (debug_ppl_linear_expr): New.
768         * graphite-ppl.h (ppl_print_linear_expr): Declared.
769         (debug_ppl_linear_expr): Declared.
770
771 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
772
773         * graphite-interchange.c: Fix comments.
774         * gcc.dg/graphite/block-1.c: Fix comments.
775
776 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
777
778         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
779         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
780
781 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
782
783         Reapply the patch from Alexander Monakov that disappeared during
784         the last merges from trunk.
785
786         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
787
788         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
789         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
790
791 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
792
793         * graphite-interchange.c (memory_stride_in_loop): The depth
794         argument corresponds to a dynamic time dimension, so use
795         psct_dynamic_dim to refer to the transformed scattering dimension.
796
797 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
798
799         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
800
801 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
802
803         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
804         root of the LST.
805         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
806         the root of the LST.
807         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
808         fake loop.
809         (print_lst): Print the root of LST in a different format.
810         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
811
812 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
813
814         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
815
816 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
817
818         * doc/passes.texi: Document the Graphite infrastructure.
819
820 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
821
822         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
823         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
824         and check the SSA representation.
825
826         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
827
828 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
829
830         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
831
832 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
833
834         * gcc.dg/graphite/interchange-11.c: New.
835
836 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
837
838         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
839
840 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
841
842         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
843         Add -fno-loop-strip-mine and -fno-loop-interchange.
844         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
845         -fno-loop-strip-mine.
846         * gfortran.dg/graphite/graphite.exp: Same.
847
848 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
849
850         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
851         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
852         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
853         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
854         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
855         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
856         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
857         DEFAULT_FLAGS_GRAPHITE_SCOP.
858         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
859         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
860
861 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
862
863         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
864
865 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
866             Sebastian Pop  <sebastian.pop@amd.com>
867
868         * graphite-interchange.c (build_linearized_memory_access): Pass an
869         offset as parameter.
870         (memory_stride_in_loop): Include transform scattering in the
871         access functions to be able to querry the strides in the
872         transformed loops.
873         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
874         not the psct_iterator_dim.
875
876 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
877
878         * graphite-blocking.c (pbb_do_strip_mine): Removed.
879         (lst_do_strip_mine_loop): New.
880         (lst_do_strip_mine): New.
881         (scop_do_strip_mine): Call lst_do_strip_mine.
882         * graphite-poly.h (lst_add_loop_under_loop): New.
883         (lst_find_first_pbb): New.
884
885 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
886
887         * graphite-poly.c (loop_to_lst): Fix LST creation.
888
889 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
890
891         * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
892         sizeof(unsigned long) to make it run on 32bit systems.
893
894 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
895
896         * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
897         SEGFAULT on 32bit.
898
899 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
900
901         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
902         Comment.
903         (write_alias_graph_to_ascii_dot): New.
904         (write_alias_graph_to_ascii_ecc): Ditto.
905         (partition_drs_to_sets): Add testing of optimality of current method
906         which assigns alias numbers according to DFS Comopnent number.  used
907         as heuristic for the upcoming ECC algorithm.
908         (build_scop_drs): Write to file also with the ecc and dot format.
909
910 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
911
912         * gfortran.dg/graphite/interchange-1.f: XFail.
913
914 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
915
916         * graphite.c (graphite_initialize): Do not handle functions with
917         more than 100 basic blocks.
918
919 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
920
921         * graphite-blocking.c (pbb_do_strip_mine): Use
922         PARAM_LOOP_BLOCK_TILE_SIZE.
923
924 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
925
926         * graphite-poly.c (dot_lst_1): New.
927         (dot_lst): New.
928         * graphite-poly.h (dot_lst): Declared.
929
930 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
931
932         * graphite-dependences.c (dot_deps_stmt_1): New.
933         (dot_deps_stmt): New.
934         * graphite-dependences.h (dot_deps_stmt): Declared.
935
936 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
937
938         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
939         not replace cross BB scalar dependences ending on PHI nodes.
940         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
941
942 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
943
944         * graphite-poly.c (apply_poly_transforms): Implement the high
945         level driver for flag_loop_block.
946         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
947         flag_loop_block.
948
949         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
950         -floop-block.
951         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
952         Add -floop-block.
953
954 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
955
956         * graphite-poly.h (lst_find_pbb): New.
957         (find_lst_loop): New.
958
959 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
960
961         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
962         * graphite-poly.h (struct scop): Remove dep_graph field.
963         (SCOP_DEP_GRAPH): Removed.
964
965 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
966
967         * graphite-poly.h (copy_lst): Do full copy of LST.
968
969 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
970
971         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
972         when the loop stride is zero.
973
974         * gcc.dg/graphite/id-16.c: New.
975
976 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
977
978         * graphite-dependences.c (reduction_dr_1): New.
979         (reduction_dr_p): New.
980         (graphite_legal_transform_dr): Call reduction_dr_p.
981         (reduction_ddr): Renamed reduction_ddr_p.
982         * graphite-poly.h (same_pdr_p): New.
983         (number_of_write_pdrs): New.
984         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
985         (split_reduction_stmt): Do not split reduction statements
986         when there are no writes to memory.
987         (translate_scalar_reduction_to_array_for_stmt): Insert the
988         memory reduction statement just after the scalar reduction statement.
989
990         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
991         Un-XFAIL-ed.
992         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
993         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
994
995 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
996
997         * graphite-interchange.c (lst_apply_interchange): New.
998         (lst_interchange_profitable_p): New.
999         (lst_try_interchange_loops): New.
1000         (lst_try_interchange): New.
1001         (lst_do_interchange): New.
1002         (pbb_do_interchange): Removed.
1003         (scop_do_interchange): Call lst_do_interchange.
1004
1005 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
1006
1007         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
1008         SCOP_TRANSFORMED_SCHEDULE.
1009         (loop_to_lst): New.
1010         (scop_to_lst): New.
1011         (print_lst): New.
1012         (debug_lst): New.
1013         * graphite-poly.h (lst_p): New.
1014         (struct lst): New.
1015         (LST_LOOP_P): New.
1016         (LST_LOOP_FATHER): New.
1017         (LST_PBB): New.
1018         (LST_SEQ): New.
1019         (scop_to_lst): Declared.
1020         (print_lst): Declared.
1021         (debug_lst): Declared.
1022         (new_lst_loop): New.
1023         (new_lst_stmt): New.
1024         (copy_lst): New.
1025         (lst_depth): New.
1026         (lst_dewey_number): New.
1027         (struct scop): Add original_schedule and transformed_schedule fields.
1028         (SCOP_ORIGINAL_SCHEDULE): New.
1029         (SCOP_TRANSFORMED_SCHEDULE): New.
1030         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
1031
1032 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1033
1034         * graphite-dependences.c (reduction_ddr): New.
1035         (graphite_legal_transform_bb): Call reduction_ddr.
1036         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
1037         Initialize PBB_IS_REDUCTION.
1038         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
1039         (PBB_IS_REDUCTION): New.
1040         (new_poly_bb): Update declaration.
1041         * graphite-scop-detection.h (build_scop_bbs): Removed.
1042         (nb_reductions_in_loop): Removed.
1043         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
1044         parameter for reductions.
1045         (try_generate_gimple_bb): Update call to new_poly_bb.
1046         (build_scop_bbs_1): Same.
1047         (build_scop_bbs): Same.
1048         (gsi_for_phi_node): New.
1049         (scalar_close_phi_node_p): Remove gcc_assert.
1050         (split_reduction_stmt): New.
1051         (is_reduction_operation_p): New.
1052         (phi_contains_arg): New.
1053         (follow_ssa_with_commutative_ops): New.
1054         (detect_commutative_reduction_arg): New.
1055         (detect_commutative_reduction_assign): New.
1056         (follow_inital_value_to_phi): New.
1057         (edge_initial_value_for_loop_phi): New.
1058         (initial_value_for_loop_phi): New.
1059         (detect_commutative_reduction): New.
1060         (translate_scalar_reduction_to_array_for_stmt): New.
1061         (insert_copyout): New.
1062         (insert_copyin): New.
1063         (translate_scalar_reduction_to_array): New.
1064         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
1065         (rewrite_commutative_reductions_out_of_ssa_loop): New.
1066         (rewrite_commutative_reductions_out_of_ssa): New.
1067         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
1068         * sese.h (split_region_for_bb): New.
1069
1070         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
1071         * gcc.dg/graphite/interchange-1.c: Fix format.
1072         * gcc.dg/graphite/interchange-10.c: New.
1073
1074 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1075
1076         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
1077         buggy assert.
1078
1079 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1080
1081         * graphite-sese-to-poly.c (scev_analyzable_p): New.
1082         (rewrite_cross_bb_scalar_dependence): New.
1083         (rewrite_cross_bb_scalar_deps): New.
1084         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
1085         Call rewrite_cross_bb_scalar_deps.
1086
1087 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1088
1089         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
1090         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
1091         gsi_for_stmt.
1092
1093 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
1094
1095         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
1096         * graphite-interchange.c (pbb_do_interchange): Same.
1097         * graphite-poly.c (print_scattering_function): Same.
1098         (debug_pdrs): Same.
1099         * graphite-poly.h (pbb_loop): New.
1100         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
1101
1102 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
1103
1104         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
1105
1106 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
1107
1108         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
1109         so don't pass a pointer to it.
1110         (build_alias_set_for_drs): Same.
1111         (build_base_obj_set_for_drs): Same.
1112         (build_scop_drs): Same.
1113
1114 2009-09-26  Li Feng  <nemokingdom@gmail.com>
1115
1116         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
1117         the alias graph of data references.
1118
1119 2009-09-25  Li Feng  <nemokingdom@gmail.com>
1120
1121         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
1122         (build_scop_drs): When debugging, write the alias graph to file,
1123         otherwise, should be disabled.
1124
1125 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
1126
1127         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
1128         (is_simple_operand): Remove call to stmt_simple_memref_p.
1129         (stmt_simple_for_scop_p): Update call to is_simple_operand.
1130
1131 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
1132
1133         * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
1134         * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
1135         * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
1136         * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
1137         * testsuite/gcc.dg/graphite/scop-sor.c: New File.
1138
1139 2009-09-17 Li Feng  <nemokingdom@gmail.com>
1140
1141         PR middle-end/41118
1142         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
1143         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
1144         (graphite_carried_dependence_level_k): Ditto.
1145         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
1146         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
1147         (new_poly_dr): Adjust declaration.
1148         * graphite-sese-to-poly.c (free_data_refs_aux): New.
1149         (free_gimple_bb): Added free_data_refs_aux.
1150         (build_poly_dr): Add dr_base_object_set.
1151         (partition_drs_to_sets): New.
1152         (dr_same_base_object_p): New.
1153         (build_alias_set_for_drs): New.
1154         (build_base_object_set_for_drs): New.
1155         (build_scop_drs): Add build_base_obj_set_for_drs.
1156         * graphite-sese-to-poly.h: Added #define for alias set number index and
1157         base object set index.
1158         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
1159         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
1160
1161 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
1162
1163         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1164         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
1165
1166 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
1167
1168         * graphite-sese-to-poly.c (struct irp_data): Removed.
1169         (idx_record_params): Removed.
1170         (find_params_in_bb): Scan for parameters the access functions; don't
1171         parse the tree representation.
1172
1173 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
1174
1175         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
1176         passes at -O1 and below.
1177
1178 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
1179
1180         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1181         tree-scalar-evolution.h, and then tree-data-ref.h.
1182         * graphite-clast-to-gimple.c: Same.
1183         * graphite-dependences.c: Same.
1184         * graphite-interchange.c: Same.
1185         * graphite-poly.c: Same.
1186         * graphite-scop-detection.c: Same.
1187         * graphite-sese-to-poly.c: Same.
1188         * graphite.c: Same.
1189         * lambda-code.c: Same.
1190         * matrix-reorg.c: Same.
1191         * tree-data-ref.c: Same.
1192         * tree-if-conv.c: Same.
1193         * tree-loop-distribu: Same.: Same.
1194         * tree-loop-linear.c: Same.
1195         * tree-parloops.c: Same.
1196         * tree-predcom.c: Same.
1197         * tree-vect-patterns.c: Same.
1198
1199 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
1200
1201         Partially revert the previous patch, except the following.
1202         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
1203         as parameters the operands of the not expression.
1204
1205 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1206
1207         * tree-scalar-evolution.c (instantiate_scev_assign): New.
1208         Do not call analyze_scalar_evolution on assignments.
1209         (instantiate_scev_phi): Call analyze_scalar_evolution.
1210         (instantiate_scev_name): Call instantiate_scev_assign and
1211         instantiate_scev_phi.
1212         (instantiate_scev_not): Adapted to pass as parameters the operands
1213         of the not expression.
1214
1215 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1216
1217         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
1218         to pass as parameters the operands of the binary expression.
1219
1220 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1221
1222         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
1223         instantiate_scev_not.  Handle NEGATE_EXPR.
1224         (instantiate_scev_r): Handle NEGATE_EXPR.
1225
1226 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1227
1228         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
1229         instantiate_scev_r.
1230         (instantiate_scev_r): Move code in instantiate_scev_2
1231         and instantiate_scev_1.
1232
1233 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1234
1235         * tree-scalar-evolution.c (instantiate_scev_3): New.
1236         (instantiate_scev_1): Move code in instantiate_scev_3.
1237
1238 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1239
1240         * tree-scalar-evolution.c (instantiate_scev_poly): New.
1241         (instantiate_scev_1): Move code in instantiate_scev_poly.
1242
1243 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1244
1245         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
1246         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
1247
1248 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1249
1250         * tree-scalar-evolution.c (instantiate_scev_convert): New.
1251         (instantiate_scev_1): Move code in instantiate_scev_convert.
1252
1253 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1254
1255         * tree-scalar-evolution.c (instantiate_scev_binary): New.
1256         (instantiate_scev_1): Move code in instantiate_scev_binary.
1257
1258 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
1259
1260         * tree-scalar-evolution.c (instantiate_scev_name): New.
1261         (instantiate_scev_1): Move code in instantiate_scev_name.
1262
1263 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
1264
1265         * Merge from mainline (150992:151171).
1266
1267 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1268
1269         * graphite-dependences.c (graphite_legal_transform_bb): Call
1270         pbb_remove_duplicate_pdrs.
1271         * graphite-poly.c (can_collapse_pdr): Removed.
1272         (pdr_find_duplicate): Removed.
1273         (can_collapse_pdrs): New.
1274         (pbb_remove_duplicate_pdrs): New.
1275         (new_poly_dr): Do not look for duplicates.
1276         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
1277         (PBB_PDR_DUPLICATES_REMOVED): New.
1278         (pbb_remove_duplicate_pdrs): Declared.
1279
1280 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1281
1282         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
1283         the strides by multiplying by PDR_NB_REFS.
1284         * graphite-poly.c (can_collapse_pdr): New.
1285         (pdr_find_duplicate): New.
1286         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
1287         Initialize PDR_NB_REFS.
1288         * graphite-poly.h (struct poly_dr): Add field nb_refs.
1289         (PDR_NB_REFS): New.
1290         (new_poly_dr): Number of subscripts is a graphite_dim_t.
1291
1292 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1293
1294         Revert one of the previous commits:
1295         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1296         the computation of symmetric data dependence relations.
1297         (dependency_between_pbbs_p): Same.
1298
1299 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1300
1301         PR middle-end/40965
1302         * graphite-poly.c (apply_poly_transforms): Remove legality test before
1303         any transform.
1304
1305 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1306
1307         * graphite-dependences.c (pddr_original_scattering): Return NULL
1308         for read-read dependence relations.
1309         * graphite-poly.h (enum poly_dr_type): Fix comment.
1310         (pdr_read_p): New.
1311         (pdr_write_p): New.
1312         (pdr_may_write_p): New.
1313
1314 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1315
1316         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
1317         (struct poly_dr): Same.
1318         (new_poly_dr): Same.
1319         * graphite-poly.c (new_poly_dr): Same.
1320
1321 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1322             Sebastian Pop  <sebastian.pop@amd.com>
1323
1324         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
1325         pbb_strip_mine_time_depth.  Changed the implementation so that
1326         transformation is expressed as a transformation on
1327         time (scatttering) dimensions.  Also, ensures that the 2d+1
1328         scheduling format is preserved.
1329         (pbb_strip_mine_profitable_p): Profitability is based on the
1330         iteration number of a given time (scattering) dimension,
1331         and not on a original loop depth dimension.
1332         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
1333         (pbb_do_strip_mine): Call psct_dynamic_dim.
1334         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
1335         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
1336         (pbb_nb_dynamic_scattering_transform): New.
1337         (psct_dynamic_dim): New.
1338
1339 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1340
1341         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1342         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1343         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
1344         * graphite-interchange.c (build_linearized_memory_access): Same.
1345         (memory_stride_in_loop): Same.
1346
1347 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
1348
1349         * graphite-dependences.c (pddr_original_scattering): New.
1350         (graphite_legal_transform_dr): Call pddr_original_scattering.
1351         (dot_deps_1): New.
1352         (dot_deps): New.
1353         * graphite-dependences.h (dot_deps): Declared.
1354         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
1355         (print_pdr): Print PDR_ID.
1356         * graphite-poly.h (struct poly_dr): Add field id.
1357         (PDR_ID): New.
1358         (pbb_index): New.
1359         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
1360
1361 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
1362
1363         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
1364         not delete the original dependence relation.
1365
1366 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
1367
1368         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1369         the computation of symmetric data dependence relations.
1370         (dependency_between_pbbs_p): Same.
1371
1372 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
1373
1374         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
1375         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
1376         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
1377         (free_poly_ddr): New.
1378         (pddr_is_empty): New.
1379         (dependence_polyhedron_1): Now returns a poly_ddr_p.
1380         (dependence_polyhedron): Same.  Remove useless gcc_assert.
1381         Remove fprintfs.
1382         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
1383         (graphite_carried_dependence_level_k): Call pddr_is_empty.
1384         * graphite-dependences.h (enum poly_dependence_kind): New.
1385         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
1386         (PDRP_SOURCE): Renamed PDDR_SOURCE.
1387         (PDRP_SINK): Renamed PDDR_SINK.
1388         (PDRP_DDP): Renamed PDDR_DDP.
1389         (PDDR_KIND): New.
1390         (free_poly_ddr): Declared.
1391         * graphite-poly.c (new_scop): Use the new hash function names.
1392         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
1393         into original_pddrs.
1394         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
1395
1396 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
1397
1398         * Merge from mainline (150764:150992).
1399
1400 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
1401
1402         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
1403         bounds with LT_EXPR to make niter analysis more precise on code
1404         generated by Graphite.
1405
1406 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
1407
1408         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
1409         (graphite_legal_transform_bb): Same.
1410         (poly_drs_may_alias_p): Same.
1411
1412 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
1413
1414         PR middle-end/40981
1415         * graphite-ppl.c (ppl_max_for_le): Correct the use of
1416         ppl_Pointset_Powerset_C_Polyhedron_maximize.
1417
1418 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
1419
1420         * graphite-poly.c (print_pbb): Print PBB index.
1421
1422 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
1423
1424         * Merge from mainline (r150672:150764).
1425
1426 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
1427
1428         * graphite-interchange.c (ppl_max_for_le): Moved...
1429         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
1430         * graphite-ppl.c (ppl_max_for_le): ... here.
1431         * graphite-ppl.h (ppl_max_for_le): Declared.
1432
1433 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
1434
1435         * Merge from mainline (r150372:150672).
1436
1437 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1438
1439         PR middle-end/40980
1440         * sese.c (convert_for_phi_arg): New.
1441         (add_guard_exit_phis): Use convert_for_phi_arg.
1442
1443         * testsuite/gfortran.dg/graphite/id-17.f: New.
1444
1445 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1446
1447         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
1448         unknown subscript upper bounds.
1449
1450         * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
1451
1452 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1453             Pranav Garg  <pranav.garg2107@gmail.com>
1454
1455         * graphite-interchange.c (gather_access_strides): Removed.
1456         (ppl_max_for_le): New.
1457         (build_linearized_memory_access): New.
1458         (memory_stride_in_loop): New.
1459         (pbb_interchange_profitable_p): Reimplemented.
1460         * graphite-ppl.h (ppl_new_id_map): New.
1461         (ppl_interchange): New.
1462
1463         * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
1464
1465 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1466
1467         * graphite-interchange.c (compute_subscript): Removed.
1468         (compute_array_size_cstr): Removed.
1469         (compute_array_size_poly): Removed.
1470         (compute_array_size): Removed.
1471         (gather_access_strides_poly): Removed.
1472         (gather_access_strides): Empty.
1473
1474 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1475
1476         * graphite-dependences.c (dependence_polyhedron_1): Replace
1477         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
1478         (graphite_legal_transform_dr): Same.
1479         (graphite_carried_dependence_level_k): Same.
1480         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
1481         Initialize PDR_NB_SUBSCRIPTS.
1482         (print_pdr_access_layout): Replace pdr_nb_subscripts with
1483         PDR_NB_SUBSCRIPTS.
1484         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
1485         (PDR_NB_SUBSCRIPTS): New.
1486         (pdr_nb_subscripts): Removed.
1487         (pdr_dim): Simplified.
1488         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
1489         with PDR_NB_SUBSCRIPTS.
1490
1491 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1492
1493         * graphite-interchange.c (compute_array_size): Remove use of
1494         PDR_DATA_CONTAINER.
1495         * graphite-poly.c (new_poly_dr): Remove argument data_container.
1496         Do not initialize PDR_DATA_CONTAINER.
1497         (print_pdr): Do not print PDR_DATA_CONTAINER.
1498         * graphite-poly.h (struct poly_dr): Remove data_container field.
1499         (PDR_DATA_CONTAINER): Removed.
1500         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
1501         PDR_DATA_CONTAINER.
1502         (build_poly_dr): Same.
1503
1504 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
1505
1506         * testsuite/gcc.dg/graphite/interchange-9.c: New.
1507
1508 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1509             Sebastian Pop  <sebastian.pop@amd.com>
1510
1511         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
1512         copy of the dependence polyhedron.  Free the temporary objects.
1513         (graphite_carried_dependence_level_k): Free unused objects before
1514         returning.
1515
1516         * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
1517         * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
1518         * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
1519         * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
1520         * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
1521
1522 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1523
1524         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
1525         Early return without analyzing the data dependences if no
1526         transform has been done.  Call restore_scattering if the transform
1527         is not legal.
1528         (graphite-interchange.c): Same.
1529         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
1530         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
1531         (apply_poly_transforms): Do not gcc_assert that
1532         the transform is legal.
1533         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1534         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
1535         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
1536         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1537         * graphite-poly.h (struct poly_scattering): New.
1538         (struct poly_bb): Add original, transformed, and saved fields.
1539         Remove transformed_scattering, original_scattering, nb_local_variables,
1540         and nb_scattering_transform fields.
1541         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
1542         (poly_scattering_new): New.
1543         (poly_scattering_free): New.
1544         (poly_scattering_copy): New.
1545         (store_scattering_pbb): New.
1546         (store_scattering): New.
1547         (restore_scattering_pbb): New.
1548         (restore_scattering): New.
1549         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1550         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
1551
1552 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1553
1554         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
1555         (print_scop): Same.
1556
1557 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1558
1559         * Makefile.in (graphite.o): Depends on PREDICT_H.
1560         * graphite.c: Include predict.h.
1561         (graphite_finalize): Call tree_estimate_probability.
1562         * predict.c (predict_loops): Do not call scev_initialize and
1563         scev_finalize.
1564         (tree_estimate_probability_bb): New.
1565         (tree_estimate_probability): Do not initialize loops: move that
1566         code to the driver.  Call tree_estimate_probability_bb.
1567         (tree_estimate_probability_driver): New.
1568         (pass_profile): Use tree_estimate_probability_driver.
1569         * predict.h (tree_estimate_probability): Declared.
1570
1571 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
1572
1573         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1574         * graphite-dependences.c (graphite_legal_transform): Add time to
1575         TV_GRAPHITE_DATA_DEPS.
1576         (dependency_between_pbbs_p): Same.
1577         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1578
1579 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
1580
1581         * Merge from mainline (r149952:150372).
1582
1583 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1584
1585         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1586         * graphite-blocking.c: Same.
1587         * graphite-clast-to-gimple.c: Same.
1588         * graphite-dependences.c: Same.
1589         * graphite-poly.c: Same.
1590         * graphite-poly.h: Same.
1591         * graphite-ppl.c: Same.
1592         * graphite-scop-detection.c: Same.
1593         * graphite-sese-to-poly.c: Same.
1594         * graphite.c: Same.
1595
1596 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1597
1598         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1599         (remove_simple_copy_phi): New.
1600         (remove_invariant_phi): New.
1601         (simple_copy_phi_p): New.
1602         (reduction_phi_p): New.
1603         (gsi_for_ssa_name_def): New.
1604         (insert_out_of_ssa_copy): New.
1605         (insert_out_of_ssa_copy_on_edge): New.
1606         (create_zero_dim_array): New.
1607         (scalar_close_phi_node_p): New.
1608         (rewrite_close_phi_out_of_ssa): New.
1609         (rewrite_phi_out_of_ssa): New.
1610         (rewrite_reductions_out_of_ssa): New.
1611         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1612
1613         * testsuite/gcc.dg/graphite/id-11.c: New.
1614         * testsuite/gcc.dg/graphite/id-15.c: New.
1615         * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1616         * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1617         * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1618         * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1619         * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1620         * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1621         * testsuite/gfortran.dg/graphite/id-13.f: New.
1622         * testsuite/gfortran.dg/graphite/id-5.f: New.
1623
1624 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1625
1626         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1627         check that nb_reductions_in_loop is zero.
1628         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1629         reduction phi nodes.
1630         (nb_reductions_in_loop): Removed.
1631         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1632         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1633         (bb_contains_non_iv_scalar_phi_nodes): Removed.
1634         (scop_contains_non_iv_scalar_phi_nodes): Removed.
1635         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1636
1637 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1638
1639         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1640         statements that have an empty iteration domain.
1641         * testsuite/gfortran.dg/graphite/id-16.f: New.
1642
1643 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1644
1645         * tree-scalar-evolution.c (instantiate_scev_1): Return
1646         chrec_dont_know when the result is not above instantiate_below.
1647         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1648         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1649         the tree has a known scalar evolution.
1650         * testsuite/gfortran.dg/graphite/id-14.f: New.
1651         * testsuite/gfortran.dg/graphite/id-15.f: New.
1652
1653 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1654
1655         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1656         insert_gsi.
1657         (rename_variables): Keep inserting renames after the ones already
1658         inserted.
1659
1660 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1661
1662         * graphite-sese-to-poly.c (compare_bb_depths): New.
1663         (graphite_sort_dominated_info): New.
1664         (build_scop_bbs_1): Call graphite_sort_dominated_info.
1665         (build_scop_scattering): Fix comment.
1666
1667 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1668
1669         * graphite.c (graphite_finalize): Call print_loops instead of
1670         dump_function_to_file.
1671         * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1672         * testsuite/gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
1673         loops generated in the graphite output file.
1674         * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1675         * testsuite/gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
1676         * testsuite/gfortran.dg/graphite/id-12.f: New.
1677
1678 2009-07-24  Li Feng  <nemokingdom@gmail.com>
1679
1680         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1681         Remove 2 XFAIL.
1682
1683 2009-07-24  Li Feng  <nemokingdom@gmail.com>
1684             Tobias Grosser  <grosser@fim.uni-passau.de>
1685
1686         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1687         alias set number build alias in ACCESSES polyhedron.
1688         (build_alias_set_for_drs): New.
1689         (build_pbb_drs): Added build_alias_set_for_drs.
1690         * graphite-dependences.c (poly_drs_may_alias_p): New.
1691         (graphite_carried_dependence_level_k): Check alias information
1692         before building polyhedron.
1693
1694 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1695
1696         * Makefile.in (lambda-code.o): Fix formatting.
1697
1698 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1699
1700         * Merge from mainline (r149350-149952)
1701
1702 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
1703
1704         * graphite-poly.c (apply_poly_transforms): Move strip_mine
1705         before interchange to prepare for loop blocking.
1706
1707 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
1708
1709         * graphite-poly.c (apply_poly_transforms): Add checks after every
1710         transformation.
1711         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1712         done in apply_poly_transforms.
1713
1714 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1715
1716         * graphite-dependences.c (build_lexicographically_gt_constraint):
1717         Replace RES parameter with *RES.
1718         (dependence_polyhedron_1): Pass an address of the parameter RES
1719         instead of value of RES.
1720
1721 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1722
1723         * graphite.c (graphite_finalize): Fix comment.
1724         (graphite_transform_loops): Reset scev info after code generation
1725         of each scop.
1726
1727 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1728
1729         * graphite.c (graphite_finalize): Call scev_reset.
1730
1731 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1732
1733         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1734         GBB_CLOOG_IV_TYPES hash table twice.
1735         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1736         (add_condition_to_domain): Clear GMP values.
1737
1738 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1739
1740         * graphite-dependences.c: Fix formatting.
1741         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1742         (pbb_number_of_iterations): Free ppl_Linear_Expression.
1743         * graphite-sese-to-poly.c: Fix formatting.
1744         * graphite.c (graphite_transform_loops): Create the hash table
1745         after the early return.
1746
1747 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1748
1749         * testsuite/gcc.dg/graphite/id-14.c: New.
1750         * testsuite/gcc.dg/graphite/pr40157.c: New.
1751         * testsuite/gfortran.dg/graphite/id-11.f: New.
1752
1753 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1754
1755         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1756         (build_poly_scop): Return false when there are no pbbs within
1757         loops to avoid to pass to cloog scops with no loops.
1758
1759 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1760
1761         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1762         useless test "i % 2".
1763         (build_pbb_scattering_polyhedrons): Fix formatting.
1764         (build_poly_dr): Same.
1765         * graphite.c (graphite_transform_loops): Restructure.
1766
1767 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
1768
1769         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1770         reduction_list parameter.
1771         (rewrite_all_phi_nodes_with_iv): Same.
1772         (canonicalize_loop_ivs): Same.
1773         * tree-parloops.c (struct brli): Removed.
1774         (build_reduction_list_info): Removed.
1775         (build_new_reduction): New.
1776         (analyze_reduction_list): Removed.
1777         (gather_scalar_reductions): Find reductions instead of phi
1778         nodes that can't be canonicalized.
1779         (try_create_reduction_list): Remove reduction_list parameter.
1780         (gen_parallel_loop): Same.
1781         (parallelize_loops): Remove analyze_reductions variable,
1782         initialization and free.
1783         Change reduction_list htab initialization to reduction_info
1784         elements instead of ssa names.
1785         Call try_create_reduction_list and gen_parallel_loop without
1786         analyzed_reduction argument.
1787         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1788         canonicalize_loop_ivs with one less argument.
1789         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1790
1791 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
1792
1793         * graphite-dependences.c (new_poly_dr_pair): New.
1794         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1795         (new_poly_dr_pair): New.
1796         (eq_poly_dr_pair_p): New.
1797         (hash_poly_dr_pair_p): New.
1798         * graphite-dependences.h (struct poly_dr_pair): New.
1799         (eq_poly_dr_pair_p): Declared.
1800         (hash_poly_dr_pair_p): Declared.
1801         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1802         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1803         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1804         * Makefile.in (graphite-poly.o): Add dependence on
1805         graphite-dependences.h.
1806
1807 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1808
1809         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1810         polynomials of degree > 1 pass to Graphite.
1811         * tree-chrec.c (scev_is_linear_expression): Call
1812         evolution_function_is_affine_multivariate_p.
1813         * testsuite/gfortran.dg/graphite/id-10.f90: New.
1814
1815 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1816
1817         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1818         Instantiate scevs varying in outer loops.
1819         * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1820
1821 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1822
1823         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1824         redundant constraint.
1825
1826 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1827
1828         * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1829         * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1830         based on the file names as in the C testsuite.
1831         * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1832         * testsuite/gfortran.dg/graphite/block-2.f: Same.
1833         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1834         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1835         * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1836         * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1837         * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1838         * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1839         * testsuite/gfortran.dg/graphite/id-6.f: Same.
1840         * testsuite/gfortran.dg/graphite/id-9.f: Same.
1841         * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1842         * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1843         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1844
1845 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1846
1847         * sese.c (expand_scalar_variables_call): New.
1848         (expand_scalar_variables_ssa_name): Handle calls in expander.
1849
1850 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1851
1852         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1853         Expect to see the pattern twice.
1854         * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1855         * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1856         * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1857
1858 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1859
1860         * testsuite/gcc.dg/graphite/id-10.c: New.
1861         * testsuite/gcc.dg/graphite/id-12.c: New.
1862         * testsuite/gfortran.dg/graphite/id-7.f: New.
1863         * testsuite/gfortran.dg/graphite/id-8.f: New.
1864
1865 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1866
1867         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1868         zero.
1869
1870 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1871
1872         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1873
1874 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1875
1876         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1877
1878 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
1879
1880         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1881         building PDR subscripts.
1882
1883 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
1884
1885         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1886         computation of array sizes.
1887
1888 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
1889
1890         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1891
1892 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
1893
1894         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1895         build_pairwise_constraint, dr_equality_constraints,
1896         build_pairwise_scheduling_equality,
1897         build_pairwise_scheduling_inequality, lexicographically_gt_p,
1898         build_lexicographically_gt_constraint, dependence_polyhedron,
1899         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1900         Move from NNC_Polyhedron to C_Polyhedron.
1901         * graphite-interchange.c (compute_array_size_poly,
1902         gather_access_strides): Dito.
1903         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1904         free_scop, pbb_number_of_iterations): Dito.
1905         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1906         pbb_dim_iter_domain, struct scop): Dito.
1907         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1908         new_Cloog_Domain_from_ppl_Polyhedron,
1909         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1910         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1911         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1912         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1913         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1914         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1915         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1916         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1917         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1918         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1919         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1920         build_scop_iteration_domain, build_poly_dr): Dito
1921
1922 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1923
1924         * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1925         run-id-*.c files.
1926         * testsuite/gcc.dg/graphite/run-id-1.c: New.
1927
1928 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1929
1930         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1931         positivity constraint on the symbolic number of iterations.
1932
1933 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1934
1935         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1936
1937 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1938             Tobias Grosser  <grosser@fim.uni-passau.de>
1939
1940         * graphite-clast-to-gimple.c (build_scop_context): Removed.
1941         (build_cloog_prog): Directly use SCOP_CONTEXT.
1942         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1943         (free_scop): Free SCOP_CONTEXT.
1944         (print_scop_context): New.
1945         (print_scop): Call print_scop_context.
1946         (debug_scop_context): New.
1947         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1948         (struct scop): Added field context.
1949         (SCOP_CONTEXT): New.
1950         * graphite-sese-to-poly.c (add_param_constraints): New.
1951         (build_scop_context): New.
1952         (build_poly_scop): Call build_scop_context.
1953
1954 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1955
1956         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1957         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1958         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1959         * graphite-ppl.h: Include double-int.h and tree.h.
1960         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1961         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1962         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
1963         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1964
1965 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1966
1967         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1968         POINTER_PLUS_EXPR for pointer types.
1969         (clast_to_gcc_expression): Same.
1970
1971 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1972
1973         * graphite-poly.c (print_scattering_function): Early return when
1974         PBB_TRANSFORMED_SCATTERING is not initialized.
1975         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1976
1977 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
1978
1979         * tree-parloops.c (analyze_reduction_list): Remove unused variable
1980         to fix bootstrap.
1981
1982 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
1983
1984         * tree-parloops.c (analyze_reduction_list): Change return
1985         value to void.
1986         (try_create_reduction_list): Move the call to
1987         analyze_reduction_list to the beginining.
1988         Call reduction_phi with analyzed_reductions as argument
1989         instead of reduction_list.
1990
1991 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1992
1993         *  Merge from mainline (r148296:149346)
1994
1995 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1996
1997         * graphite-scop-detection.c (graphite_can_represent_init): New.
1998         (graphite_can_represent_scev): Call graphite_can_represent_init:
1999         check that the initial value does not contain multiplications of
2000         parameters.
2001         (stmt_has_simple_data_refs_p): New.
2002         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
2003         (is_simple_operand): Fix formatting.
2004         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
2005
2006 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2007
2008         * testsuite/gcc.dg/graphite/id-13.c: New.
2009         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
2010         analyze_scalar_evolution, use scalar_evolution_in_region.
2011         (scan_tree_for_params_right_scev): Add extra assert.
2012         (parameter_index_in_region_1): Split from parameter_index_in_region.
2013         (idx_record_params): Use scalar_evolution_in_region.
2014         (find_params_in_bb): Same.
2015         (find_scop_parameters): Same.
2016         (build_loop_iteration_domains): Same.
2017         (create_linear_expr_from_tree): Same.
2018         * sese.c (scalar_evolution_in_region): New.
2019         * sese.h (scalar_evolution_in_region): Declared.
2020         (defined_in_sese_p): New.
2021         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
2022         static anymore.
2023         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
2024         Declared.
2025
2026 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2027
2028         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
2029         TREE_DATA_REF_H also implies SCEV_H.
2030
2031 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
2032
2033         * graphite-poly.c (print_scop_params): New.
2034         (print_scop): Call print_scop_params.
2035         (debug_scop_params): New.
2036         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
2037
2038 2009-07-07  Li Feng  <nemokingdom@gmail.com>
2039
2040         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
2041         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
2042         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
2043         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
2044         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
2045         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
2046
2047 2009-07-07  Li Feng  <nemokingdom@gmail.com>
2048
2049         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
2050         for dependency checking part.
2051         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
2052         tests for dependency checking.
2053         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2054         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2055         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
2056         flag -fdump-tree-graphite-all for autopar testsuites.
2057
2058 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
2059
2060         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
2061         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
2062         canonicalize_loop_ivs): Moved...
2063         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
2064
2065 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
2066
2067         * tree-parloops.c (try_create_reduction_list): Pass an extra
2068         argument analyzed_reductions.  Call analyze_reduction_list.
2069         (gen_parallel_loop): Do not call analyze_reduction_list.
2070         (parallelize_loops): Init and finalize analyzed_reductions.
2071
2072 2009-07-06  Li Feng  <nemokingdom@gmail.com>
2073
2074         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2075         Added flag -fno-loop-strip-mine for autopar testcase.
2076
2077 2009-07-04  Li Feng  <nemokingdom@gmail.com>
2078
2079         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
2080         transformed scattering dimension instead of unmatch orignal when
2081         calling dependence_polyhedron.
2082
2083 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
2084
2085         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
2086
2087 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
2088
2089         * graphite-poly.c (pbb_number_of_iterations): Check for returned
2090         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
2091
2092 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
2093
2094         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
2095         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
2096         * graphite-poly.c (pbb_number_of_iterations): New.
2097         * graphite-poly.h (pbb_number_of_iterations): Declared.
2098         (pbb_iterator_dim, pbb_parameter_dim): New.
2099
2100 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
2101
2102         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
2103         last commit on type of lower and upper bound of loops.
2104
2105 2009-06-29  Li Feng  <nemokingdom@gmail.com>
2106
2107         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
2108         graphite-dependences.h.
2109         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
2110         (mark_bb_with_pbb): New.
2111         (get_stmtfor_depth): New.
2112         (find_pbb_via_hash): New.
2113         (dependency_in_loop_p): New.
2114         (mark_loops_parallel): New.
2115         (free_aux_in_new_loops): New.
2116         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
2117         bb with it's relevant pbb. Mark newly created loops.  Remove mark
2118         innermost loop parallel without checking.
2119         (gloog): Add parameter BB_PBB_MAPPING.
2120         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
2121         (gloog): Change declaration.
2122         (mark_loop_parallel): Make extern.
2123         (free_aux_in_new_loops): Declare.
2124         (bb_pbb_map_hash): New.
2125         (eq_bb_pbb_map): New.
2126         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
2127         auto parallelization when flag_graphite_force_parallel is set.
2128         (graphite_finalize): Added free_aux_in_new_loops.
2129         * tree-parloops.c (parallelize_loops): Only generate parallel code for
2130         the innermost loop that marked parallel.  Use
2131         flag_graphite_force_parallel instead of loop->can_be_parallel.
2132         (loop_parallel_p): Move inner most checking out of function.
2133
2134 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2135
2136         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
2137         type of lower and upper bound of loops signed long int.
2138
2139 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2140
2141         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
2142         expression outside the loop.
2143
2144 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2145
2146         * gcc.dg/graphite/interchange-8.c: New.
2147
2148 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2149
2150         * gcc.dg/graphite/interchange-0.c: XFailed.
2151         * gcc.dg/graphite/interchange-5.c: XFailed.
2152         * gcc.dg/graphite/interchange-6.c: XFailed.
2153
2154 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2155
2156         * graphite-interchange.c (compute_array_size_poly): The end of the
2157         recursion should return 1.
2158
2159 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2160
2161         * graphite-interchange.c (compute_array_size_cstr): Allow the
2162         subscript multiplier to be -1.
2163         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
2164         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
2165         data_container.  Initializes PDR_DATA_CONTAINER.
2166         (print_pdr_access_layout): New.
2167         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
2168         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
2169         data_container.
2170         (PDR_DATA_CONTAINER): New.
2171         (new_poly_dr): Update declaration.
2172         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
2173         (build_poly_dr): Call pdr_add_data_dimensions.
2174
2175 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2176
2177         * graphite-poly.h (struct poly_dr): Fix comment.
2178         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
2179         (pdr_add_memory_accesses): New.
2180         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
2181
2182 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
2183
2184         * graphite-poly.c (print_pdrs, debug_pdrs): New.
2185         (print_pbb): Add call to print_pdrs.
2186         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
2187
2188 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
2189             Li Feng <nemokingdom@gmail.com>
2190
2191         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
2192         (dependency_between_pbbs_p): New.
2193         (lexicographically_gt_p): Assure !empty_p before polyhedron
2194         intersection assign.
2195         (build_lexicographically_gt_constraint): Correct lexicographically
2196         judging.
2197         * graphite-dependences.h: New.
2198         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
2199
2200 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
2201
2202         * graphite-clast-to-gimple.c (print_clast_stmt): New.
2203         (gloog): Print to dump_file the generated clast.
2204         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
2205         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
2206
2207 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
2208
2209         * graphite-poly.c (extend_scattering): Increment
2210         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
2211
2212 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
2213
2214         * graphite-interchange.c (compute_array_size_poly): Added exit of
2215         recursion condition.  Continue iterating even after the first equality.
2216         (compute_array_size): Same.
2217
2218 2009-06-24  Li Feng  <nemokingdom@gmail.com>
2219
2220         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
2221         -fdump-tree-final_cleanup to -fdump-tree-optimized.
2222         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2223         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2224         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
2225
2226 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2227
2228         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
2229         only when the use verifies is_gimple_reg.
2230
2231 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2232
2233         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
2234         Allocate scaldims after call to unify_scattering_dimensions.
2235
2236 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2237
2238         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
2239
2240 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2241             Albert Cohen  <albert.cohen@inria.fr>
2242
2243         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
2244         variables for the strip mining.
2245
2246 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2247             Pranav Garg  <pranav.garg2107@gmail.com>
2248
2249         * Makefile.in (OBJS-common): Added graphite-blocking.o.
2250         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
2251         (graphite-blocking.o): New rule.
2252         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
2253         * graphite-blocking.c: New.
2254         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
2255         flag_loop_strip_mine.
2256         (psct_scattering_dim_for_loop_depth): New.
2257         * graphite-poly.h (scop_do_strip_mine): Declared.
2258         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
2259         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
2260         flag_loop_strip_mine.
2261
2262 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2263
2264         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
2265         a GMP value and a PPL coefficient at each iteration of a loop.
2266
2267 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2268
2269         * graphite-dependences.c (dependence_polyhedron): Do not use
2270         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
2271         pbb_nb_scattering_transform.
2272         (graphite_legal_transform_dr): Same.
2273         * graphite-poly.c (extend_scattering): Same.
2274         (unify_scattering_dimensions): Same.
2275         (print_scattering_function): Same.
2276         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
2277         PBB_NB_LOCAL_VARIABLES.
2278         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
2279         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
2280         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
2281         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
2282         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
2283         (pbb_nb_scattering_transform): New.
2284         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
2285         (psco_scattering_dim): Add assert on parameters.
2286         (psct_scattering_dim): Same.
2287         (psct_scattering_dim_for_loop_depth): Declared.
2288         (psct_local_var_dim): New.
2289         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
2290         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
2291         correct layout, call pbb_nb_local_vars.
2292         (psct_add_local_variable, psct_add_scattering_dimension): New.
2293         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2294         Initialize PBB_NB_SCATTERING_TRANSFORM.
2295
2296 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2297
2298         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
2299         (set_coef): Renamed ppl_set_coef.
2300         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
2301
2302 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
2303
2304         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
2305         test a boolean against 1.
2306         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
2307         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
2308         (pbb_do_interchange): Returns true when a transform has been performed.
2309         (scop_do_interchange): Same.
2310         * graphite-poly.c (apply_poly_transforms): Use the return value of
2311         scop_do_interchange.
2312         * graphite-poly.h (scop_do_interchange): Update declaration.
2313
2314 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2315
2316         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
2317         after last use.
2318         * sese.c (sese_reset_aux_in_loops): New.
2319         * sese.h (sese_reset_aux_in_loops): New.
2320
2321 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2322
2323         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
2324         multiplier and multiply the constant by the multiplier.
2325         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
2326         (build_poly_dr): Do not use the multiplier to define the subscript.
2327
2328 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2329
2330         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
2331         compiler's data reference.  Initialize PDR_CDR.
2332         (print_pdr): Call dump_data_reference.
2333         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
2334         Add compiler_dr field.
2335         (PDR_BB): Renamed PDR_PBB.
2336         (PDR_CDR): New.
2337         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
2338         GCC's data reference representation.
2339         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
2340         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
2341
2342 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2343
2344         * graphite-poly.c (print_scattering_function): Also print the layout.
2345         * graphite-poly.h (pbb_nb_local_vars): New.
2346
2347 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2348
2349         * graphite-poly.c (print_pbb_domain): Also print the layout names.
2350
2351 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
2352
2353         * graphite-poly.c (print_pdr, debug_pdr): New.
2354         * graphite-poly.h (print_pdr, debug_pdr): Declared.
2355         (PDR_BASE): Removed.
2356
2357 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2358
2359         * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
2360         ltrans-{1..6,8}.c.
2361
2362 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2363
2364         * graphite-interchange.c (compute_subscript): Allow also -1 in the
2365         subscript identification column.
2366         (pbb_do_interchange): Print to dump_file that some loops "will be
2367         interchanged".  Rely on that chain of characters in the testcases.
2368         * gcc.dg/graphite/interchange-0.c: New.
2369         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
2370         interchange-*.c files and compile them with -floop-interchange.
2371
2372 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
2373
2374         * graphite-interchange.c (interchange_profitable_p): Renamed
2375         pbb_interchange_profitable_p.
2376
2377 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2378             Harsha Jagasia  <harsha.jagasia@amd.com>
2379             Pranav Garg  <pranav.garg2107@gmail.com>
2380
2381         * graphite-interchange.c (interchange_profitable_p): Make static.
2382         (pbb_interchange_loop_depths, pbb_do_interchange,
2383         scop_do_interchange): New.
2384         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
2385         for flag_loop_interchange.
2386         * graphite-poly.h (scop_do_interchange): Declared.
2387         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
2388         flag_loop_interchange is used.
2389
2390 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
2391
2392         * graphite-dependences.c (dependence_polyhedron): Update use of
2393         pbb_nb_scattering_dims.
2394         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
2395         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
2396         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
2397         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
2398
2399 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
2400
2401         * graphite.c: Cleanup foo.
2402
2403 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
2404
2405         * Merge from mainline (r143684:148293).
2406         * Disabled libpcp until it gets fixed.
2407
2408 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
2409             Harsha Jagasia  <harsha.jagasia@amd.com>
2410
2411         * graphite-interchange.c: New.
2412         * Makefile.in (graphite-interchange.o): New.
2413         * graphite-poly.h (interchange_profitable_p): Declared.
2414         * graphite-ppl.h (value_max): New.
2415
2416 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
2417
2418         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
2419         * graphite-poly.h: Fix some comments.
2420         (pdr_dim): New.
2421         (pdr_scop): New.
2422
2423 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
2424
2425         * graphite-poly.h
2426         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
2427         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
2428         (pdr_accessp_nb_params): Renamed pdr_nb_params.
2429         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
2430         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
2431         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
2432         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
2433         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
2434         * graphite-clast-to-gimple.c: Same.
2435         * graphite-dependences.c: Same.
2436         * graphite-poly.c: Same.
2437         * graphite-sese-to-poly.c: Same.
2438
2439 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
2440
2441         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
2442         expressions for an IV rename, as returned by clast_to_gcc_expression.
2443         (copy_renames): Rename new_name to expr.
2444         * sese.c (debug_rename_elt): Same.
2445         (get_rename): Same.
2446         (set_rename): Same.
2447         (sese_adjust_liveout_phis): Call force_gimple_operand before using
2448         the information from the rename map.
2449         (rename_variables_in_stmt): Same.
2450         (add_loop_exit_phis): Rename new_name to expr.
2451         (insert_loop_close_phis): Same.
2452         (add_guard_exit_phis): Same.  Call force_gimple_operand.
2453         * sese.h (struct rename_map_elt): Rename new_name to expr.
2454         (new_rename_map_elt): Same.
2455
2456 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
2457
2458         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
2459         * sese.c (set_rename): Make it extern.
2460         * sese.h (set_rename): Declared.
2461
2462 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
2463
2464         * graphite-poly.c (extend_scattering): Free values.
2465         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
2466         Free iterators.
2467         (ppl_print_powerset_matrix): Same.
2468         * graphite-scop-detection.c (free_scops_1): New.
2469         (limit_scops): Call free_scops_1.
2470         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
2471         (build_poly_dr): Free PPL coefficients.
2472         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
2473
2474 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
2475
2476         * graphite-dependences.c: New.
2477         * graphite-data-ref.c: Removed.
2478         * graphite-data-ref.h: Removed.
2479         * Makefile.in (graphite-data-ref.o): Removed.
2480         (graphite-dependences.o): Added.
2481         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
2482         * graphite-poly.c: Same.
2483         Move the data dependence testing to graphite-dependences.c.
2484
2485 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
2486
2487         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
2488         from graphite_cannot_represent_loop. Code refactored.
2489         (scopdet_basic_block_info): Call graphite_can_represent_loop.
2490
2491 2009-05-17  Li Feng  <nemokingdom@gmail.com>
2492
2493         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2494         Cover all the testcases (not only the filtered ones).
2495
2496 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
2497
2498         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
2499         unnecessary check. Update comments. Move check for REAL_TYPE here.
2500         (harmful_stmt_in_bb): Remove checks for conditions. This is already
2501         done in (stmt_simple_for_scop_p).
2502
2503 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
2504
2505         * graphite.c (print_global_statistics): New.
2506         (print_graphite_scop_statistic): New.
2507         (print_graphite_statistics): New.
2508         (graphite_initialize, graphite_transform_loops): Print statistics.
2509         * graphite-scop-detection (build_scops): Print statistics.
2510         (print_graphite_scop_statistics): New.
2511         (print_graphite_statistics): New.
2512
2513 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2514
2515         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
2516         (debug_clast_name_index): Removed.
2517         (debug_clast_name_indexes_1): Removed.
2518         (debug_clast_name_indexes): Removed.
2519         (clast_name_index_elt_info): Removed.
2520         (eq_clast_name_indexes): Removed.
2521         (clast_name_to_index): Removed.
2522         (new_clast_name_index): Removed.
2523         (save_clast_name_index): Removed.
2524         (save_var_name): Moved...
2525         (init_sese_params_index): Removed.
2526         (clast_name_to_gcc): Remove use of name_tree.
2527         (initialize_cloog_names): Same.
2528         (gloog): Do not call init_sese_params_index.
2529         * graphite-sese-to-poly.c (save_var_name): ...here.
2530         (parameter_index_in_region): New.
2531         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
2532         (parameter_index_in_region): Removed.
2533         (is_parameter): Remove use of name_tree.
2534         * sese.h (struct name_tree): Removed.
2535         (struct sese): Remove use of name_tree.  New field params_names.
2536         (SESE_PARAMS_NAMES): New.
2537         (SESE_PARAMS): Remove duplicate.
2538         (parameter_index_in_region): Removed.
2539         (sese_nb_params): Remove use of name_tree.
2540         (struct clast_name_index): New.
2541         (new_clast_name_index): New.
2542         (clast_name_to_index): New.
2543         (save_clast_name_index): New.
2544         (debug_clast_name_index): New.
2545         (debug_clast_name_indexes_1): New.
2546         (debug_clast_name_indexes): New.
2547         (clast_name_index_elt_info): New.
2548         (eq_clast_name_indexes): New.
2549
2550 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2551
2552         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
2553         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
2554         (graphite_loop_normal_form): Do not pass region.  Do not
2555         initialize SESE_OLDIVS.
2556         (build_graphite_loop_normal_form): Update call to
2557         graphite_loop_normal_form.
2558         * sese.c (debug_oldivs): Removed.
2559         (new_sese): Do not initialize SESE_OLDIVS.
2560         (free_sese): Do not free SESE_OLDIVS.
2561         (oldiv_for_loop): Removed.
2562         * sese.h (struct sese): Remove old_ivs.
2563         (SESE_OLDIVS): Removed.
2564         (oldiv_for_loop): Removed.
2565
2566 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2567
2568         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2569         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
2570         replaced by a call to newivs_to_depth_to_newiv.
2571         (clast_to_gcc_expression): Pass newivs, remove ivstack.
2572         (clast_to_gcc_expression_red): Same.
2573         (gcc_type_for_clast_expr): Same.
2574         (gcc_type_for_clast_eq): Same.
2575         (graphite_translate_clast_equation): Same.
2576         (graphite_create_guard_cond_expr): Same.
2577         (graphite_create_new_guard): Same.
2578         (graphite_create_new_loop): Same.
2579         (build_iv_mapping): Same.
2580         (translate_clast): Same.
2581         (gloog): Same.
2582         (loop_iv_stack_patch_for_consts): Removed.  *
2583         sese.c (iv_stack_entry_is_constant): Removed.
2584         (iv_stack_entry_is_iv): Removed.
2585         (loop_iv_stack_push_iv): Removed.
2586         (loop_iv_stack_insert_constant): Removed.
2587         (loop_iv_stack_pop): Removed.
2588         (loop_iv_stack_get_iv): Removed.
2589         (loop_iv_stack_get_iv_from_name): Removed.
2590         (debug_loop_iv_stack): Removed.
2591         (free_loop_iv_stack): Removed.
2592         (loop_iv_stack_remove_constants): Removed.  *
2593         sese.h (iv_stack_entry_kind): Removed.
2594         (iv_stack_entry_data_union): Removed.
2595         (iv_stack_entry_struct): Removed.
2596         (iv_stack_entry_p): Removed.
2597         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2598         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2599         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2600         loop_iv_stack_pop, free_loop_iv_stack): Removed.
2601         (gbb_loop_at_index): Fix indenting.
2602         (gbb_loop_index): Removed.
2603
2604 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2605
2606         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2607         Call clast_name_to_index.
2608
2609 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2610
2611         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2612         do not pass params.  Get params from SESE_PARAMS.
2613         (clast_to_gcc_expression): Same.
2614         (clast_to_gcc_expression_red): Same.
2615         (gcc_type_for_clast_eq): Same.
2616         (graphite_translate_clast_equation): Same.
2617         (graphite_create_new_loop): Same.
2618         * sese.c (rename_variables_in_stmt): Fix comment.
2619
2620 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2621
2622         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2623         newivs_index.
2624         Call save_clast_name_index.
2625         (translate_clast): Pass newivs_index.
2626         (gloog): Create and free newivs_index.
2627
2628 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2629
2630         * graphite-clast-to-gimple.c (clast_name_index): New structure.
2631         (clast_name_index_p): New type.
2632         (debug_clast_name_index): New.
2633         (debug_clast_name_indexes_1): New.
2634         (debug_clast_name_indexes): New.
2635         (clast_name_index_elt_info): New.
2636         (eq_clast_name_indexes): New.
2637         (clast_name_to_index): New.
2638         (new_clast_name_index): New.
2639         (save_clast_name_index): New.
2640         (init_sese_params_index): New.
2641         (gloog): Call init_sese_params_index.
2642         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2643         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2644         (free_sese): Free SESE_PARAMS_INDEX.
2645         * sese.h (struct sese): Add params_index.
2646         (SESE_PARAMS_INDEX): New.
2647
2648 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2649
2650         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2651         (graphite_create_new_loop): Pass the newivs vector.  Push the
2652         newly created IV to newivs.
2653         (translate_clast): Pass the newivs vector.
2654         (gloog): Create and destroy the newivs vector.
2655
2656 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2657
2658         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2659         (graphite_loop_normal_form): Initialize loop->aux with the unique
2660         IV that has been created.
2661
2662 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
2663
2664         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2665         scev with parameters in the base part. They where forbidden
2666         exidently.
2667
2668 2009-05-11  Li Feng  <nemokingdom@gmail.com>
2669
2670         * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2671         compile options by file names.
2672         * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2673         * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2674         * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2675         * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2676
2677 2009-05-08  Li Feng <nemokingdom@gmail.com>
2678
2679         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2680         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2681         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2682         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2683
2684 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
2685
2686         * graphite-scop-detection (build_scops_1): Fix little bug introduced
2687         by final cleanup.
2688
2689 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
2690
2691         * graphite-scop-detection.c (graphite_can_represent_scev): Only
2692         allow integer constant strides.
2693         (graphite_can_represent_expr): Depend on outermost_loop.
2694         (stmt_simple_memref_p, graphite_cannot_represent_loop,
2695         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2696         build_scops_1): Same.
2697         (scopdet_basic_block_info): Same and insert layered SCoP
2698         detection.
2699         (try_generate_gimple_bb): Cleanup.
2700         (build_scops): Enable data references.
2701
2702         * testsuite/gcc.dg/graphite/id-5.c: New.
2703         * testsuite/gcc.dg/graphite/id-9.c: New.
2704         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2705         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2706
2707 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2708
2709         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2710         that we have not yet built for this SCoP.
2711
2712 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2713
2714         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2715         for complex numbers.
2716
2717 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2718
2719         * graphite-ppl.c: Fix build if cloog is not available.
2720
2721 2009-05-04  Li Feng  <nemokingdom@gmail.com>
2722
2723         * tree-parloops.c (loop_parallel_p): Remove construction of
2724         NITER and REDUCTION_LIST.
2725         (try_get_loop_niter): New.
2726         (try_create_reduction_list): New.
2727         (parallelize_loops): Bypass the failed checkings in autopar
2728         when can_be_parallel in loop structure is set to true.
2729
2730 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2731
2732         * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2733         * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2734
2735 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2736
2737         * graphite-scop-detection.c (stmt_simple_for_scop_p):
2738         Enable EQ_EXPR and NE_EXPR again.
2739
2740 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2741
2742         * graphite-scop-detection.c (graphite_can_represent_scev):
2743         Add check if scev is affine multivariate.
2744         (harmful_stmt_in_bb): Check if we can represent the conditions.
2745         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2746         harmful_stmt_in_bb.
2747         * testsuite/gcc.dg/graphite/id-7.c: New.
2748
2749 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2750
2751         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2752         Check all bbs in region, not only the bbs that are represented in
2753         GRAPHITE.
2754         (build_poly_scop): Add newline.
2755         * testsuite/gcc.dg/graphite/id-8.c: New.
2756
2757 2009-04-30  Li Feng  <nemokingdom@gmail.com>
2758
2759         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2760         when loop initialize.
2761         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2762         * common.opt: Declare flag_graphite_force_parallel.
2763         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2764         loop parallel.
2765         * graphite-poly.c (apply_poly_transforms): Introduce
2766         flag_graphite_force_parallel.
2767         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2768         * toplev.c (process_options): ditto and replace a not correctly
2769         encoded space.
2770
2771 2009-04-30  Li Feng  <nemokingdom@gmail.com>
2772
2773         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2774         Change the call of gbb_loop_at_index and/or gbb_loop_index due
2775         to the redefinition.
2776         (compute_cloog_iv_types_1): ditto.
2777         (build_iv_mapping): ditto.
2778         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2779         initialization.
2780         (free_gimple_bb): Removed GBB_LOOPS related free part.
2781         (build_bb_loops): Removed.
2782         * sese.h (struct gimple_bb): Removed loops.
2783         (GBB_LOOPS): Removed.
2784         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2785         (gbb_loop_index): ditto.
2786
2787 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2788
2789         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2790         allow non constant strides.
2791         * testsuite/gcc.dg/graphite/scop-20.c: New.
2792
2793 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2794
2795         * graphite-scop-detection.c (dot_all_scops): Fix system call
2796         return value warning.
2797         (dot_scop): Same.
2798
2799 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2800
2801         * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2802         * testsuite/gcc.dg/graphite/scop-3.c: Same.
2803
2804 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2805
2806         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2807         build_pairwise_constraint, dr_equality_constraints,
2808         build_pairwise_scheduling_equality,
2809         build_pairwise_scheduling_inequality, lexicographically_gt_p,
2810         build_lexicographically_gt_constraint, dependence_polyhedron,
2811         graphite_legal_transform_dr, graphite_legal_transform_bb,
2812         graphite_legal_transform): New.
2813         * graphite-poly.h (graphite_legal_transform): Declared.
2814         * graphite-sese-to-poly.c (build_poly_scop): Call to
2815         graphite_legal_transform is disabled for the moment.
2816
2817 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2818
2819         * graphite-poly.h (pbb_nb_scattering_dims): New.
2820         (pbb_nb_scattering): Use it.
2821
2822 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2823
2824         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2825         Pointset_Powerset version of ppl_insert_dimensions.
2826         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2827
2828 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2829
2830         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2831
2832 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2833
2834         * graphite-poly.h: Fix comment.
2835
2836 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2837
2838         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2839
2840 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2841
2842         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2843         statements.
2844
2845 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2846
2847         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2848         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2849         conditions.
2850
2851 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
2852
2853         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2854         handle EQ_EXPR and NE_EXPR.
2855
2856 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
2857
2858         * graphite-poly.h (poly_dr): Fix comment.
2859
2860 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
2861             Tobias Grosser  <grosser@fim.uni-passau.de>
2862
2863         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2864         with a zero dimension polyhedron.
2865         (find_scop_parameters): Move the call to scop_set_nb_params here.
2866         (build_loop_iteration_domains): Store in loop->aux the iteration
2867         domain polyhedron.
2868         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2869         by any loop in scop.
2870         (build_poly_scop): Do not call scop_set_nb_params.
2871
2872 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
2873             Tobias Grosser  <grosser@fim.uni-passau.de>
2874
2875         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2876         add_condition_to_domain not GT_EXPR.
2877
2878 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2879
2880         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2881         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2882         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2883         upper_bound_assign to calculate unions.
2884         * testsuite/gcc.dg/graphite/id-6.c: New.
2885
2886 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2887
2888         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2889         handle abnormal edges.
2890
2891 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2892
2893         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2894         (free_poly_bb): Also free poly_drs.
2895         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2896         (poly_dr): Polyhedron to Pointset_Powerset.
2897         (pdr_accessp_nb_subscripts): Same.
2898         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2899         poly_drs.
2900
2901 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2902
2903         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2904         names into more meaningful names.
2905
2906 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2907
2908         * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2909         * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2910
2911 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2912
2913         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2914         the reduction_list.
2915         * tree-parloops.c (rewrite_phi_with_iv): New.
2916         (rewrite_all_phi_nodes_with_iv): New.
2917         (canonicalize_loop_ivs): Call them.
2918
2919 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2920
2921         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2922         graphite_find_data_references_in_stmt.
2923         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2924         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2925
2926 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2927
2928         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2929
2930 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2931
2932         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2933         instead of bb_in_region.
2934         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
2935         (build_sese_conditions): Use flag_bb_in_sese.
2936         * sese.c (register_bb_in_sese): Removed.
2937         (new_sese): Remove initialization of SESE_REGION_BBS.
2938         (free_sese): Do not free SESE_REGION_BBS.
2939         * sese.h (struct sese): Remove field region_basic_blocks.
2940         (SESE_REGION_BBS): Removed.
2941         (bb_in_sese_p): Implement in function of bb_in_region.
2942
2943 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2944
2945         * graphite-scop-detection.c (limit_scops): Deal only with single exit
2946         loops.
2947
2948 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2949
2950         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2951         and EQ_EXPR.
2952         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2953         (add_condition_to_domain): New.
2954         (add_condition_to_pbb): New.
2955         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2956         * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2957
2958 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2959
2960         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2961         ppl_Pointset_Powerset.
2962         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2963         * graphite-poly.h (poly_bb): poly_bb.domain Same.
2964         (pbb_nb_loops): Same.
2965         * graphite-sese-to-poly.c (build_loop_iteration_domains,
2966         add_conditions_to_domain): Same.
2967         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2968         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2969         ppl_const_Polyhedron_t.
2970         (ppl_print_powerset_matrix): New.
2971         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2972         ppl_print_powerset_matrix): New.
2973         (ppl_print_polyhedron_matrix): Updated.
2974
2975 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
2976
2977         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2978
2979 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
2980
2981         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
2982         (print_iteration_domains, debug_iteration_domain,
2983         debug_iteration_domains): New.
2984         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2985         debug_iteration_domains): Declared.
2986         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2987         indenting.
2988
2989 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2990             Sebastian Pop  <sebastian.pop@amd.com>
2991
2992         * graphite-poly.h (print_iteration_domain): New.
2993         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2994         (build_sese_conditions_1, build_sese_conditions_after,
2995         build_sese_conditions_before): New.
2996         (build_sese_conditions): Rewritten.
2997
2998 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
2999             Tobias Grosser  <grosser@fim.uni-passau.de>
3000
3001         Cleanup of code generation liveouts.
3002         * graphite-clast-to-gimple.c (translate_clast): Use a single
3003         rename_map instead of one per translated statement.
3004         Do not use SESE_LIVEOUT_RENAMES.
3005         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
3006         (gloog): Do not use SESE_LIVEOUT_RENAMES.
3007         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
3008         phi node of a reduction: when a loop contains a reduction used outside
3009         the loop, there should be a scalar close phi node on the exit block.
3010         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
3011         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
3012         (free_sese): Do not free them.
3013         (sese_build_liveouts_use): Do not use them.
3014         (sese_build_liveouts_bb): Same.
3015         (sese_build_liveouts): Same.
3016         (sese_insert_phis_for_liveouts): Same.
3017         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
3018         (defined_in_loop_p): New.
3019         (alive_after_loop): New.
3020         (close_phi_not_yet_inserted_p): New.
3021         (struct alep, alep_p): New.
3022         (add_loop_exit_phis): Remove from the rename_map all the names defined
3023         in the code generated loop.
3024         (insert_loop_close_phis): Traverse the rename_map passed to it.
3025         Don't use SESE_LIVEOUT_RENAMES.
3026         (default_liveout_before_guard): Renamed default_before_guard.
3027         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
3028         (graphite_copy_stmts_from_block): Do not directly call set_rename.
3029         (register_sese_liveout_renames): Removed.
3030         (copy_bb_and_scalar_dependences): Do not call it.
3031         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
3032         reduction_list.
3033         (SESE_LIVEOUT): Removed.
3034         (SESE_LIVEOUT_RENAMES): Removed.
3035         (SESE_REDUCTION_LIST): Removed.
3036         (sese_build_liveouts): Removed.
3037         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
3038         (insert_loop_close_phis): Pass a htab_t instead of a sese.
3039         (insert_guard_phis): Same.
3040         (rename_map_elt): Declare a VEC of them.
3041         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3042         trees not pointers to trees.
3043
3044         Rewrite in canonical close SSA form:
3045         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
3046         (limit_scops): Close the scop after the block containing the close phi
3047         nodes.
3048         (canonicalize_loop_closed_ssa): New.
3049         (canonicalize_loop_closed_ssa_form): New.
3050         (build_scops): Call canonicalize_loop_closed_ssa_form.
3051
3052         * graphite-sese-to-poly.c: Fix typos.
3053
3054 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
3055
3056         * graphite-poly.c (print_scattering_function, print_pbb_domain):
3057         Extended.
3058         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
3059         (print_pbb): Add conditions.
3060
3061 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
3062             Sebastian Pop  <sebastian.pop@amd.com>
3063
3064         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
3065         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
3066         (build_scop_bbs_1): New.
3067         (build_scop_bbs): Rewrite.
3068         * sese.h (bb_in_region): New.
3069
3070 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3071
3072         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3073         poly_drs vector.
3074         (print_scop): Style.
3075         * graphite-poly.h (poly_bb): Add drs vector.
3076         (PBB_DRS): Add accessor.
3077         * graphite-sese-to-poly.c (build_poly_dr): New.
3078         (build_pbb_drs, build_scop_drs): New.
3079         (build_poly_scop): call build_scop_drs (Disabled at the moment).
3080
3081 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3082
3083         * tree-ssa-loop.c: Include forgotten toplev.h
3084
3085 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3086
3087         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
3088         * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
3089         * testsuite/gcc.dg/graphite/pr37928.c: Same
3090         * testsuite/gcc.dg/graphite/pr38409.c: Same
3091         * testsuite/gcc.dg/graphite/pr38498.c: Same
3092         * testsuite/gcc.dg/graphite/pr38559.c: Same
3093         * testsuite/gcc.dg/graphite/pr39335.c: Same
3094         * testsuite/gcc.dg/graphite/pr39335_1.c: Same
3095         * testsuite/gfortran.dg/graphite/block-2.f: Same
3096         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
3097         with -floop-*.
3098
3099 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
3100
3101         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
3102         build_access_matrix, build_scop_data_accesses): Remove access function
3103         building. (We get a new version soon).
3104         (build_bb_loops, scan_tree_for_params_right_scev): Update.
3105         * sese.h (nb_loops_around_loop_in_sese): Remove.
3106         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
3107
3108 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
3109             Sebastian Pop  <sebastian.pop@amd.com>
3110
3111         * graphite-scop-detection.c (struct scopdet_info): Rename last
3112         field to exit.
3113         (scopdet_basic_block_info, build_scops_1): Don't use
3114         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
3115
3116 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
3117             Sebastian Pop  <sebastian.pop@amd.com>
3118
3119         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
3120         * sese.c (sese_build_liveouts_use): Renamed from
3121         sese_build_livein_liveouts_use. Remove liveins.
3122         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
3123         Call sese_build_liveouts_use.
3124         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
3125         Call sese_build_liveouts_bb.
3126         (new_sese, free_sese): Remove liveins.
3127         (sese_add_exit_phis_var): Deleted.
3128         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
3129         directly.
3130         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
3131
3132         * sese.h (sese): Remove num_ver and livein.
3133         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
3134
3135 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3136
3137         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
3138
3139 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3140
3141         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
3142         (build_scop_scattering): Do not use compare_prefix_loops any more.
3143         (nb_common_loops): New.
3144
3145 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3146
3147         * sese.c (get_new_name_from_old_name): Renamed get_rename.
3148         (register_old_and_new_names): Renamed set_rename.
3149
3150 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3151
3152         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
3153         of the decl from the previous commit.
3154
3155 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3156
3157         * graphite-scop-detection.c (dot_scop): New.
3158         * graphite-scop-detection.h (dot_scop): Declared.
3159
3160 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3161
3162         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
3163
3164 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3165
3166         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
3167         condition at the end of the loop.
3168         * graphite.c (graphite_initialize, graphite_finalize): Print to
3169         dump_file the compiled function.
3170         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
3171         of create_empty_loop_on_edge.
3172         (translate_clast): Update the code generation of loops for the new
3173         shape of loops.
3174         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
3175
3176 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
3177
3178         Reverted the patch from 2009-03-19.
3179
3180 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
3181
3182         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3183         poly_drs vector.
3184         (print_scop): Style.
3185         * graphite-poly.h (poly_bb): Add drs vector.
3186         (PBB_DRS): Add accessor.
3187         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
3188         (build_access_matrix_with_af, build_access_matrix,
3189         build_scop_data_accesses): Delete.
3190         (build_poly_dr): New.
3191         (build_pbb_drs, build_scop_drs): New.
3192         (build_poly_scop): call build_scop_drs.
3193
3194 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
3195
3196         * graphite-scop-detection.c (dot_all_scops_1): Close the table
3197         once per basic block.
3198
3199 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
3200
3201         * graphite-scop-detection.c (graphite_can_represent_scev): New.
3202         (graphite_can_represent_expr): Renamed from loop_affine_expr
3203         and enhanced.
3204         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
3205         (graphite_cannot_represent_loop): Add scop_entry to parameters.
3206         (scopdet_basic_block_info): Actually define entry_block.
3207         (stmt_simple_memref_p): Moved here from ...
3208
3209         * tree-data-ref.c (stmt_simple_memref_p): here.
3210         * tree-data-ref.h (stmt_simple_memref_p): Removed.
3211
3212 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
3213
3214         * testsuite/gcc.dg/graphite/id-4.c: New.
3215
3216 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
3217
3218         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3219         (register_old_and_new_names): Update the content of the map.
3220         When there was already a rename_map_elt in the map at that
3221         location, free it.
3222         (copy_bb_and_scalar_dependences): Do rename_variables after
3223         expand_scalar_variables.
3224         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3225         of the map.  When there was already a rename_map_elt in the
3226         map at that location, free it.
3227         (translate_clast): Pass the rename_map.  Do not initialize and free
3228         a rename_map per stmt_user.
3229         (gloog): Initialize and free one rename_map and pass it to
3230         translate_clast.
3231
3232 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
3233
3234         * sese.c (expand_scalar_variables_stmt,
3235         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
3236         parameter.
3237         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
3238         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
3239         the gimple_stmt_iterator of the statement to be expanded.
3240         * graphite-scop-detection.c (is_simple_operand): Do handle
3241         REALPART_EXPR.
3242
3243 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3244
3245         * graphite-scop-detection.c (is_simple_operand): Do not handle
3246         REALPART_EXPR.
3247         * testsuite/gcc.dg/graphite/id-2.c: New.
3248
3249         * graphite-sese-to-poly.c (build_bb_loops,
3250         add_value_to_dim, scan_tree_for_params_right_scev,
3251         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
3252         find_params_in_bb, build_loop_iteration_domains,
3253         add_conditions_to_domain): Remove subtract.
3254
3255 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3256
3257         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
3258         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
3259         pbb_loop_at_index -> gbb_loop_at_index.
3260         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
3261         (debug_loop_vec): Delete.
3262         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
3263         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
3264         (PBB_LOOPS): Removed.
3265         (PBB_BLACK_BOX): Insert cast.
3266         (pbb_set_black_box): New setter.
3267         (pbb_loop_at_index, pbb_loop_index): Removed.
3268         (scop_set_region, scop_set_nb_params): New.
3269         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
3270         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
3271         (build_poly_scop): Use scop_set_nb_params.
3272         * sese.h (gimple_bb): Add LOOPS.
3273         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
3274
3275 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3276
3277         Revert previous commit.
3278
3279 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
3280
3281         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3282         (register_old_and_new_names): Update the content of the map.
3283         When there was already a rename_map_elt in the map at that
3284         location, free it.
3285         (copy_bb_and_scalar_dependences): Do rename_variables after
3286         expand_scalar_variables.
3287         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3288         of the map.  When there was already a rename_map_elt in the
3289         map at that location, free it.
3290         (translate_clast): Pass the rename_map.  Do not initialize and free
3291         a rename_map per stmt_user.
3292         (gloog): Initialize and free one rename_map and pass it to
3293         translate_clast.
3294
3295 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3296
3297         Remove forgotten line in revert.
3298
3299 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
3300
3301         Revert previous commit.
3302
3303 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
3304
3305         * sese.c (register_old_and_new_names): Update the content
3306         of the map.  When there was already a rename_map_elt in the
3307         map at that location, free it.
3308         (copy_bb_and_scalar_dependences): Do rename_variables after
3309         expand_scalar_variables.
3310         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3311         of the map.  When there was already a rename_map_elt in the
3312         map at that location, free it.
3313         (translate_clast): Pass the rename_map.  Do not initialize and free
3314         a rename_map per stmt_user.
3315         (gloog): Initialize and free one rename_map and pass it to
3316         translate_clast.
3317
3318 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
3319
3320         * graphite-clast-to-gimple.c (translate_clast): context_loop
3321         is never NULL.
3322
3323 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3324             Sebastian Pop  <sebastian.pop@amd.com>
3325
3326         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
3327         of the use of ppl_Polyhedron_map_space_dimensions.
3328
3329 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3330             Sebastian Pop  <sebastian.pop@amd.com>
3331
3332         * graphite-poly.c (unify_scattering_dimensions): Fix types.
3333         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
3334         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
3335         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
3336         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
3337         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
3338         pbb_nb_params): New.
3339         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
3340         nb_loops_around_pbb): Adapt return types.
3341
3342 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3343
3344         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3345         graphite-clast-to-gimple.o,  graphite-data-ref.o,
3346         graphite-scop-detection.o, graphite-poly.o): Add
3347         more headers.
3348
3349 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3350
3351         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3352         graphite-clast-to-gimple.o,  graphite-data-ref.o,
3353         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
3354
3355 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
3356
3357         * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
3358         * testsuite/gcc.dg/graphite/pr37828.c: Same.
3359         * testsuite/gcc.dg/graphite/pr37684.c: Same.
3360         * testsuite/gcc.dg/graphite/block-0.c: Same.
3361         * testsuite/gcc.dg/graphite/block-1.c: Same.
3362         * testsuite/gcc.dg/graphite/block-2.c: Same.
3363         * testsuite/gcc.dg/graphite/block-3.c: Same.
3364         * testsuite/gcc.dg/graphite/block-4.c: Same.
3365         * testsuite/gcc.dg/graphite/block-5.c: Same.
3366         * testsuite/gcc.dg/graphite/block-6.c: Same.
3367         * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
3368         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3369         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
3370         * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
3371         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
3372         * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
3373         * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
3374         * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
3375         * opts.c: Remove -floop-block from -O2.
3376         * graphite-poly.c: Fail if -floop-block -floop-interchange or
3377         -floop-strip-mine are used.
3378
3379 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
3380             Sebastian Pop  <sebastian.pop@amd.com>
3381
3382         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
3383         dimensions.
3384         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
3385         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
3386         strip_mine_profitable_p, is_interchange_valid,
3387         graphite_trans_bb_block, graphite_trans_loop_block,
3388         graphite_trans_scop_block): Temporary removed.
3389         (extend_scattering, unify_scattering_dimensions): New.
3390         (print_scattering_function, graphite_read_transforms):
3391         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3392         (graphite_generate_scattering_fns): Removed.
3393         (apply_poly_transforms): Cleanup.
3394         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3395         (schedule_to_scattering): Moved.
3396         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
3397         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
3398         (pbb_nb_scattering): New.
3399         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3400         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
3401         Removed.
3402         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
3403         shift_poly.
3404         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3405         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
3406         -> PBB_TRANSFORMED_SCATTERING.
3407         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
3408         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
3409         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
3410         (check_poly_representation): Do not return bool.
3411         (graphite_transform_loops): Reformat.
3412         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
3413
3414 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
3415
3416         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
3417         debug_pbb_domain, debug_pbb, debug_scop): New.
3418         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
3419         debug_pbb_domain, debug_pbb, debug_scop): Declared.
3420
3421 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
3422
3423         PR middle-end/39335
3424         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
3425         when the type precision of the induction variable should be
3426         larger than the type precision of nit.
3427         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
3428         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
3429         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
3430
3431         * testsuite/gcc.dg/graphite/pr39335_1.c: New.
3432         * testsuite/gcc.dg/graphite/pr39335.c: New.
3433
3434 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
3435
3436         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3437         SSA_NAMES not struct reduction_info.
3438
3439 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
3440
3441         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
3442
3443 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
3444             Tobias Grosser  <grosser@fim.uni-passau.de>
3445
3446         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
3447         (free_sese): Free SESE_REDUCTION_LIST.
3448         * sese.h (struct sese): Add field reduction_list.
3449         (SESE_REDUCTION_LIST): New.
3450         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
3451         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
3452
3453 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
3454             Tobias Grosser  <grosser@fim.uni-passau.de>
3455
3456         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
3457         of loop_p.
3458
3459 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
3460             Tobias Grosser  <grosser@fim.uni-passau.de>
3461
3462         * tree-parloops.c (struct brli, build_reduction_list_info,
3463         analyze_reduction_list, gather_scalar_reductions): New.
3464         (loop_parallel_p): Build a reduction list containing only
3465         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
3466         (gen_parallel_loop): Call the analysis analyze_reduction_list.
3467         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
3468         * tree-flow.h (gather_scalar_reductions): Declared.
3469
3470 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
3471
3472         PR middle-end/39308
3473         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
3474         number_of_iterations_exit from a gcc_assert.
3475
3476 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
3477             Jan Sjodin  <jan.sjodin@amd.com>
3478
3479         * output.h (graphite_out_file, graphite_in_file): Declared.
3480         * toplev.c (graphite_out_file, graphite_in_file): New.
3481         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
3482         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
3483         Don't call schedule_to_scattering.
3484         * common.opt (fgraphite-write, fgraphite-read): New.
3485         * graphite-poly.c: Include output.h.
3486         (print_scattering_function, print_scattering_functions,
3487         debug_scattering_function, debug_scattering_functions,
3488         graphite_write_transforms, graphite_read_transforms,
3489         graphite_generate_scattering_fns): New.
3490         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
3491         Call graphite_generate_scattering_fns, graphite_write_transforms,
3492         graphite_read_transforms.
3493         (new_poly_bb): Initialize PBB_SCATTERING.
3494         (free_poly_bb): Free PBB_SCATTERING.
3495         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
3496         * graphite-poly.h (struct poly_bb): Add field scattering.
3497         (PBB_SCATTERING): New.
3498         (print_scattering_function, print_scattering_functions,
3499         debug_scattering_function, debug_scattering_functions): Declared.
3500         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
3501         GMP values, not integers!
3502         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
3503         ppl_read_polyhedron_matrix): New.
3504         * graphite-ppl.h (ppl_print_polyhedron_matrix,
3505         debug_ppl_polyhedron_matrix,
3506         ppl_read_polyhedron_matrix): Declared.
3507         * Makefile.in (graphite-poly.o): Depends on output.h.
3508
3509 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3510             Tobias Grosser  <grosser@fim.uni-passau.de>
3511
3512         Revert this change:
3513         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3514         scalar evolutions in the scop_entry->loop_father.
3515
3516 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3517             Tobias Grosser  <grosser@fim.uni-passau.de>
3518
3519         * graphite.h (ref_nb_loops): Remove declaration.
3520         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
3521         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
3522         debug_gbb): Moved to sese.h.
3523         * sese.h: As said.
3524
3525 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3526             Tobias Grosser  <grosser@fim.uni-passau.de>
3527
3528         * graphite-data-ref.[ch]: Disable.
3529
3530 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3531             Tobias Grosser  <grosser@fim.uni-passau.de>
3532
3533         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3534         scalar evolutions in the scop_entry->loop_father.
3535
3536 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3537
3538         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
3539         (graphite_cannot_represent_loop_niter): Renamed
3540         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
3541         (limit_scops): build_sese_loop_nests does not return a bool.
3542         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
3543         * sese.c (nb_reductions_in_loop): ... from here.
3544         (graphite_loop_normal_form): ... from here.
3545         (sese_record_loop): Does not fail, so does not return a bool.
3546         (build_sese_loop_nests): Same.
3547         * sese.h (build_sese_loop_nests): Update declaration.
3548         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
3549         (build_graphite_loop_normal_form): New.
3550         (gloog): Call build_graphite_loop_normal_form.
3551         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
3552         build_sese_loop_nests.
3553
3554         * testsuite/gcc.dg/graphite/id-1.c: New.
3555
3556 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
3557             Tobias Grosser  <grosser@fim.uni-passau.de>
3558
3559         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
3560         The SCoP detection fix is sufficient.
3561
3562 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
3563
3564         PR tree-optimization/39260
3565         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
3566         the basic block contains a condition with a real type.
3567         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
3568
3569         * gcc.dg/graphite/pr39260.c: New.
3570
3571 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
3572
3573         * graphite-poly.c: Inlcude params.h.
3574         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
3575         the size of a tile.
3576         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
3577         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
3578
3579 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
3580             Tobias Grosser  <grosser@fim.uni-passau.de>
3581
3582         * graphite-scop-detection.c (dot_all_scops_1,
3583         dot_all_scops): Moved here.
3584         * graphite-scop-detection.h (dot_all_scops): Declared here.
3585         * graphite.c (graphite_initialize, graphite_finalize): New.
3586         (graphite_transform_loops): Cleaned up.
3587         * sese.c (debug_oldivs): Moved here.
3588         * graphite-poly.c (graphite_apply_transformations): Renamed
3589         apply_poly_transforms.
3590         (debug_loop_vec): Moved here.
3591         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
3592         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
3593         find_scop_parameters, build_scop_iteration_domain,
3594         add_conditions_to_constraints, build_scop_canonical_schedules,
3595         build_scop_data_accesses): Now static.
3596         (build_poly_scop, check_poly_representation): New.
3597
3598 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
3599
3600         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
3601         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
3602         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
3603         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
3604         scan_tree_for_params_right_scev, scan_tree_for_params_int,
3605         scan_tree_for_params, struct irp_data, dx_record_params,
3606         find_params_in_bb, find_scop_parameters, gbb_from_bb,
3607         build_loop_iteration_domains, add_conditions_to_domain,
3608         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
3609         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
3610         build_sese_conditions, add_conditions_to_constraints,
3611         build_scop_iteration_domain, build_access_matrix_with_af,
3612         build_access_matrix,
3613         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
3614
3615         * graphite-sese-to-poly.c: New.
3616         * graphite-sese-to-poly.h: New.
3617
3618         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3619
3620 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
3621
3622         * graphite.c: Split graphite code generation to a new file.
3623         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3624         max_precision_type, clast_to_gcc_expression_red,
3625         clast_to_gcc_expression, gcc_type_for_clast_expr,
3626         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3627         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3628         graphite_create_new_guard, clast_get_body_of_loop,
3629         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3630         graphite_create_new_loop, build_iv_mapping, copy_renames,
3631         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3632         compute_cloog_iv_types, free_scattering, save_var_name,
3633         initialize_cloog_names, build_scop_context, build_cloog_prog,
3634         set_cloog_options, debug_clast_stmt, scop_to_clast,
3635         print_generated_program, debug_generated_program,
3636         gloog): Moved to graphite-clast-to-gimple.c.
3637
3638         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3639
3640         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3641         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3642         loop_iv_stack_pop, loop_iv_stack_get_iv,
3643         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3644         free_loop_iv_stack, loop_iv_stack_remove_constants,
3645         debug_rename_elt, debug_rename_map_1, debug_rename_map,
3646         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3647         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3648         eq_ivtype_map_elts, sese_add_exit_phis_edge,
3649         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3650         get_vdef_before_sese, sese_adjust_vphi,
3651         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3652         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3653         is_iv, expand_scalar_variables_ssa_name,
3654         expand_scalar_variables_expr, expand_scalar_variables_stmt,
3655         expand_scalar_variables, rename_variables, remove_condition,
3656         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3657         add_loop_exit_phis, insert_loop_close_phis, struct igp,
3658         default_liveout_before_guard, add_guard_exit_phis,
3659         insert_guard_phis, register_old_and_new_names,
3660         graphite_copy_stmts_from_block, register_sese_liveout_renames,
3661         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3662         if_region_set_false_region, create_if_region_on_edge,
3663         move_sese_in_condition): Moved to sese.c.
3664
3665         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3666         if_region_exit, if_region_get_condition_block,
3667         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3668         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3669         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3670         ivtype_map_elt, new_ivtype_map_elt,
3671         recompute_all_dominators): Moved to sese.h.
3672
3673         * graphite-clast-to-gimple.c: New.
3674         * graphite-clast-to-gimple.h: New.
3675         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3676         * sese.c: Modified as said above.
3677         * sese.h: Same.
3678
3679 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
3680
3681         * graphite.c: Split scop detection to a new file.
3682         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3683         move_sd_regions, loop_affine_expr, exclude_component_ref,
3684         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3685         graphite_cannot_represent_loop_niter, struct scopdet_info,
3686         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3687         find_single_entry_edge, find_single_exit_edge,
3688         create_single_entry_edge, sd_region_without_exit,
3689         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3690         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3691         Moved to graphite-scop-detection.c.
3692
3693         * graphite-scop-detection.c: New.
3694         * graphite-scop-detection.h: New.
3695         * Makefile.in: Add new rule for graphite-scop-detection.o.
3696
3697         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3698         tree-scalar-evolution.h.
3699         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3700         build_sese_loop_nests): Moved here from graphite.c.
3701         (param_index): Renamed parameter_index_in_region.
3702
3703 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3704             Sebastian Pop  <sebastian.pop@amd.com>
3705
3706         * gcc.dg/graphite/block-0.c: Expected to fail now.
3707         * gcc.dg/graphite/block-1.c: Same.
3708         * gcc.dg/graphite/block-5.c: Same.
3709         * gcc.dg/graphite/block-6.c: Same.
3710
3711 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3712             Sebastian Pop  <sebastian.pop@amd.com>
3713
3714         * graphite.h: Separate from graphite_bb_p the polyhedral
3715         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3716         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3717         graphite-data-ref.h.
3718         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3719         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3720         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3721         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3722         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3723         scop_nb_params): Moved to graphite-poly.h.
3724         * graphite-data-ref.c: Same.
3725         * graphite-data-ref.h: New.
3726         * graphite.c: Same.
3727         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3728         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3729         is_interchange_valid, graphite_trans_bb_block,
3730         graphite_trans_loop_block, scop_max_loop_depth,
3731         graphite_trans_scop_block, graphite_apply_transformations,
3732         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3733         graphite-poly.c.
3734         * graphite-poly.h: New.
3735         * graphite-poly.c: New.
3736         * Makefile.in (OBJS-common): Add graphite-poly.o.
3737         (graphite-poly.o): New rule.
3738         * tree-data-ref.h (struct data_reference): Remove unused scop field.
3739         (DR_SCOP): Removed.
3740
3741 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
3742             Tobias Grosser  <grosser@fim.uni-passau.de>
3743
3744         * graphite.c: Replace gb -> gbb.
3745         * graphite.h: Same.
3746         * graphite-data-ref.c: Same.
3747
3748 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
3749             Tobias Grosser  <grosser@fim.uni-passau.de>
3750
3751         * Makefile.in (OBJS-commmon): Add sese.o.
3752         (sese.o): New.
3753         (graphite.o): Add sese.h.
3754         * graphite.c (bb_in_ss_p, loop_in_sese_p,
3755         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3756         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3757         Move to sese.
3758         (block_before_scop): Add missing return.
3759         (new_scop, free_scop): Remove SESE data structures.
3760         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3761         find_scop_parameters, build_loop_iteration_domains,
3762         add_conditions_to_domain, register_scop_liveout_renames,
3763         copy_bb_and_scalar_dependences): Scop -> SESE.
3764
3765         (add_conditions_to_domain): SCoP -> SESE and remove check
3766         (scop_contains_non_iv_scalar_phi_nodes): New.
3767         (build_scop_conditions_1, build_scop_conditions): Remove check for
3768         non iv scalar phi nodes.
3769         (print_scop_statistics): New.
3770         (graphite_transform_loops): Cleanup.
3771
3772         * graphite.h: Move to sese & cleanup.
3773         * sese.c: New.
3774         * sese.h: New.
3775
3776 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3777             Tobias Grosser  <grosser@fim.uni-passau.de>
3778
3779         * graphite.c (build_scop_conditions_1): Conditions are only
3780         at the end of a basic block.
3781
3782 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3783             Tobias Grosser  <grosser@fim.uni-passau>
3784
3785         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3786         field.
3787         (GBB_ALPHA): Removed.
3788
3789 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3790             Tobias Grosser  <grosser@fim.uni-passau.de>
3791
3792         * graphite-data-ref.c (graphite_test_dependence): Don't use
3793         GBB_DYNAMIC_SCHEDULE.
3794         * graphite.c (new_graphite_bb): Same.
3795         (free_graphite_bb): Same.
3796         (build_scop_dynamic_schedules): Removed.
3797         (graphite_transform_loops): Don't call it.
3798         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3799         (GBB_DYNAMIC_SCHEDULE): Removed.
3800
3801 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3802             Tobias Grosser  <grosser@fim.uni-passau.de>
3803
3804         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3805         (print_graphite_bb): Same.
3806         (build_cloog_prog): Same.
3807
3808 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3809             Tobias Grosser  <grosser@fim.uni-passau.de>
3810
3811         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3812
3813 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3814             Tobias Grosser  <grosser@fim.uni-passau.de>
3815
3816         * graphite.c (build_scop_context): Don't use CloogMatrix.
3817         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3818         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3819
3820 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3821             Tobias Grosser  <grosser@fim.uni-passau.de>
3822
3823         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3824         liveout_renames, add_params fields...
3825         (struct sese): ... here.
3826         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3827         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3828
3829 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3830             Tobias Grosser  <grosser@fim.uni-passau.de>
3831
3832         * graphite.c (print_scop): Do not print the CLooG program.
3833         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3834         build_cloog_prog, gloog): Don't use SCOP_PROG.
3835         (find_transform): Renamed scop_to_clast.
3836         (print_generated_program, debug_generated_program): New.
3837         (graphite_transform_loops): Adapt to new interface.
3838         * graphite.h (struct scop): Remove program field.
3839         (SCOP_PROG): Removed.
3840         (print_generated_program, debug_generated_program): Declared.
3841
3842 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3843
3844         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3845         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3846         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3847         free_graphite_bb, build_scop_canonical_schedules,
3848         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3849         schedules are now represented using a ppl_Linear_Expression_t.
3850         * graphite.h (struct graphite_bb): Same.
3851         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3852         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3853
3854 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
3855
3856         * graphite.c: Free local memory.
3857         * graphite-ppl.c: Same.
3858
3859 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
3860
3861         * graphite.c (const_column_index, get_first_matching_sign_row_index,
3862         get_lower_bound_row, get_upper_bound_row, copy_constraint,
3863         swap_constraint_variables, scale_constraint_variable): Removed.
3864         (graphite_trans_bb_strip_mine): Remove pong.
3865         * graphite-ppl.c: Include missing header files.
3866         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3867         * graphite-ppl.h (ppl_strip_loop): Declared.
3868         * Makefile.in (graphite-ppl.o): Adjust dependences.
3869
3870 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
3871
3872         * graphite.c (build_loop_iteration_domains): Remove ping pong.
3873         (build_scop_iteration_domain): Same.
3874
3875 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
3876
3877         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3878         ping pong.
3879         (add_value_to_dim, scan_tree_for_params_right_scev,
3880         scan_tree_for_params_int): New.
3881         * graphite-ppl.c (oppose_constraint): New.
3882         (insert_constraint_into_matrix): Implement missing cases.
3883         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3884
3885 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
3886
3887         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3888         use ppl_move_dimension.
3889
3890 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
3891
3892         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3893         * graphite.c: Same.
3894         * graphite.h: Same.
3895         * graphite-ppl.c: Same.
3896         * graphite-ppl.h: Same.
3897
3898 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
3899
3900         Revert last 3 commits.
3901
3902 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3903
3904         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3905         ping pong.
3906         (add_value_to_dim, scan_tree_for_params_right_scev,
3907         scan_tree_for_params_int): New.
3908         * graphite-ppl.c (oppose_constraint): New.
3909         (insert_constraint_into_matrix): Implement missing cases.
3910         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3911
3912 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3913
3914         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3915
3916 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3917             Tobias Grosser  <grosser@fim.uni-passau.de>
3918
3919         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3920         use ppl_move_dimension.
3921         * graphite-ppl.c (ppl_move_dimension): New.
3922         * graphite-ppl.h (ppl_move_dimension): Declared.
3923
3924 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3925
3926         * graphite.c: Do not include cloog/cloog.h.
3927         (print_graphite_bb): Remove ping pong, call PPL print function.
3928
3929 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3930
3931         * Makefile.in (OBJS-common): Add graphite-ppl.o.
3932         (graphite.o): Add dependence on graphite-ppl.h.
3933         (graphite-ppl.o): New.
3934         (graphite-data-ref.c): Ping pong between PPL data structures
3935         and matrices.
3936         * graphite-ppl.c: New.
3937         * graphite-ppl.h: New.
3938         * graphite.c: Include graphite-ppl.h.
3939         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3940         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3941         Ping pong between PPL data structures and matrices.
3942         (new_graphite_bb): Create a PPL constraint system.
3943         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3944         (build_loop_iteration_domains): Use PPL functions.
3945         * graphite.h: Include graphite-ppl.h.  Fix comments.
3946         (graphite_bb): Use a ppl_Constraint_System_t instead of
3947         CloogMatrix for representing the domain.
3948         (scop): Remove static_schedule.
3949         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3950
3951 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
3952
3953         * graphite.c: Fix some comments.
3954
3955 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
3956
3957         PR middle-end/38953
3958         * graphite.c (if_region_set_false_region): After moving a region
3959         in the false branch of a condition, remove the empty dummy
3960         basic block.
3961         (gloog): Remove wrong fix for PR38953.
3962
3963 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
3964
3965         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3966         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3967         register_bb_in_sese, new_sese, free_sese): Moved.
3968         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3969         outermost_loop_in_scop, build_scop_iteration_domain,
3970         expand_scalar_variables_ssa_name, get_vdef_before_scop,
3971         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3972         Use loop_in_sese_p instead of loop_in_scop_p.
3973         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3974         (free_scop): Do not free SCOP_BBS_B.
3975         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3976         ref_nb_loops): Moved here...
3977         * graphite.h (ref_nb_loops): ... from here.
3978         (struct scop): Remove bbs_b bitmap.
3979         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3980         * testsuite/gcc.dg/graphite/scop-19.c: New
3981
3982 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
3983
3984         * graphite.c (scopdet_basic_block_info): Fix bug in scop
3985         detection.
3986
3987 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3988
3989         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3990         eq_loop_to_cloog_loop): Remove.
3991         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3992         * graphite.h (struct scop): Remove loop2cloog_loop.
3993         (loop_domain_dim, loop_iteration_vector_dim): Remove.
3994
3995 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3996
3997         * opts.c (decode_options): Only add graphite options to O2
3998         if we compile with graphite enabled.
3999
4000 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
4001
4002         * Merge from mainline (r143163:143684).
4003
4004 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
4005
4006         * graphite.c (debug_value): Removed.
4007         * graphite.h (debug_value): Removed.
4008
4009 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
4010
4011         * passes.c (init_optimization_passes): Do not call pass_copy_prop
4012         after graphite: pass_copy_prop does not maintain a proper loop closed
4013         SSA form.  pass_copy_prop should be fixed.
4014
4015 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
4016
4017         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
4018
4019 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
4020
4021         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
4022         (gloog): Split the exit of the scop when the scop exit is a loop exit.
4023         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
4024         changed the CFG.
4025
4026 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
4027
4028         * graphite.c (gloog): Return true when code gen succeeded.
4029         (graphite_transform_loops): Do not call cleanup_tree_cfg if
4030         the code of the function did not changed.  After cleanup_tree_cfg
4031         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
4032         form.
4033
4034 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
4035
4036         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
4037         gimple_call_lhs is NULL.
4038
4039 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
4040             Tobias Grosser  <tobi.grosser@amd.com>
4041
4042         * graphite.c (graphite_trans_scop_block): Do not block single
4043         nested loops.
4044
4045 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
4046             Tobias Grosser  <tobi.grosser@amd.com>
4047
4048         * graphite.c (build_scop_canonical_schedules): Start schedules at
4049         zero.
4050
4051 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
4052             Tobias Grosser  <tobi.grosser@amd.com>
4053
4054         * graphite.c (compare_prefix_loops): New.
4055         (build_scop_canonical_schedules): Rewritten.
4056         (graphite_transform_loops): Move build_scop_canonical_schedules
4057         after build_scop_iteration_domain.
4058
4059 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
4060             Tobias Grosser  <tobi.grosser@amd.com>
4061
4062         * graphite.c (add_conditions_to_domain): Add the loops to
4063         the dimension of the iteration domain.  Do copy the domain
4064         only when it exists.
4065         (build_scop_conditions_1): Do not call add_conditions_to_domain.
4066         (add_conditions_to_constraints): New.
4067         (can_generate_code_stmt, can_generate_code): Removed.
4068         (gloog): Do not call can_generate_code.
4069         (graphite_transform_loops): Call add_conditions_to_constraints
4070         after building the iteration domain.
4071
4072 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
4073             Tobias Grosser  <tobi.grosser@amd.com>
4074             Jan Sjodin  <jan.sjodin@amd.com>
4075
4076         * graphite.c (scan_tree_for_params): On substractions negate
4077         all the coefficients of the term.
4078         (clast_to_gcc_expression_red): New.  Handle reduction expressions
4079         of more than two operands.
4080         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
4081         (get_vdef_before_scop): Handle also the case of default definitions.
4082
4083 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
4084
4085         PR middle-end/38431
4086         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
4087         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
4088         (gloog): Do not call cleanup_tree_cfg.
4089         (graphite_transform_loops): Call cleanup_tree_cfg after all
4090         scops have been code generated.
4091
4092 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
4093
4094         * passes.c (init_optimization_passes): Schedule after
4095         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
4096
4097 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
4098
4099         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
4100         Fix comment.
4101         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
4102         Set the type of an expression to the type of its assign statement.
4103         (expand_scalar_variables_expr):  Do not pass loop_p.
4104         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
4105         (copy_bb_and_scalar_dependences): Do not pass loop_p.
4106         (translate_clast): Update call to copy_bb_and_scalar_dependences.
4107
4108 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
4109
4110         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
4111         an expression to the gimple_expr_type of its assign statement.
4112         (expand_scalar_variables_expr): Stop recursion on tcc_constant
4113         or tcc_declaration.
4114
4115 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
4116
4117         PR tree-optimization/38786
4118         * testsuite/gcc.dg/graphite/pr38786.c: New.
4119         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
4120         the SSA_NAME case of expand_scalar_variables_expr.
4121         (expand_scalar_variables_expr): Also gather the scalar computation
4122         used to index the memory access.
4123         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
4124         the gimple_stmt_iterator where it inserts new code.
4125
4126 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
4127
4128         * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
4129
4130 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
4131
4132         * opts.c (decode_options): Enable flag_graphite_identity and
4133         flag_loop_block in -O2 and above.
4134
4135 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
4136
4137         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
4138         Fix merge problem: replace with the file from trunk.
4139
4140 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
4141
4142         * Merge from mainline (r141727:143163).
4143
4144 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
4145             Jan Sjodin  <jan.sjodin@amd.com>
4146
4147         PR tree-optimization/38559
4148         * testsuite/gcc.dg/graphite/pr38559.c: New.
4149
4150         * graphite.c (debug_value, copy_constraint,
4151         swap_constraint_variables, scale_constraint_variable, ): New.
4152         (get_lower_bound, get_upper_bound): Removed.
4153         (graphite_trans_bb_strip_mine): Clean up this code that works
4154         only for constant number of iterations.  Fully copy upper and
4155         lower bound constraints, not only the constant part of them.
4156         * graphite.h (debug_value): Declared.
4157
4158 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
4159
4160         PR tree-optimization/38492
4161         PR tree-optimization/38498
4162         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
4163         * tree-chrec.h (scev_is_linear_expression): Declared.
4164         * graphite.c (graphite_cannot_represent_loop_niter): New.
4165         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
4166         (graphite_loop_normal_form): Use gcc_assert.
4167         (scan_tree_for_params): Use CASE_CONVERT.
4168         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
4169         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
4170         Use gcc_assert.  Discard scops that contain unhandled cases.
4171         (build_scop_conditions): Return a boolean status for unhandled cases.
4172         (strip_mine_profitable_p): Print the loop number, not its depth.
4173         (is_interchange_valid): Pass the depth of the loop nest, don't
4174         recompute it wrongly.
4175         (graphite_trans_bb_block): Same.
4176         (graphite_trans_bb_block): Print tentative of loop blocking.
4177         (graphite_trans_scop_block): Do not print that the loop has been
4178         blocked.
4179         (graphite_transform_loops): Do not handle scops that contain condition
4180         scalar phi nodes.
4181
4182         * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
4183         in trunk.
4184         * testsuite/gcc.dg/graphite/block-0.c: Update test.
4185         * testsuite/gcc.dg/graphite/block-1.c: Same.
4186         * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
4187         blocking.
4188         * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
4189         * testsuite/gcc.dg/graphite/block-3.c: New.
4190         * testsuite/gcc.dg/graphite/pr38498.c: New.
4191
4192 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
4193
4194         PR tree-optimization/38510
4195         * gcc.dg/graphite/pr38510.c: New.
4196         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
4197           (translate_clast): Call recompute_all_dominators before
4198           graphite_verify.
4199           (gloog): Call recompute_all_dominators before graphite_verify.
4200
4201 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
4202
4203         PR tree-optimization/38492
4204         * graphite.c (rename_map_elt, debug_rename_elt,
4205         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
4206         rename_map_elt_info, eq_rename_map_elts,
4207         get_new_name_from_old_name, bb_in_sese_p): Moved around.
4208         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
4209         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
4210         (sese_build_livein_liveouts): New.
4211         (new_sese, free_sese): New.
4212         (new_scop): Call new_sese.
4213         (free_scop): Call free_sese.
4214         (rename_variables_from_edge, rename_phis_end_scop): Removed.
4215         (register_old_new_names): Renamed register_old_and_new_names.
4216         (register_scop_liveout_renames, add_loop_exit_phis,
4217         insert_loop_close_phis, struct igp,
4218         default_liveout_before_guard, add_guard_exit_phis,
4219         insert_guard_phis, copy_renames): New.
4220         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
4221         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
4222         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
4223         (scop_adjust_phis_for_liveouts): New.
4224         (gloog): Call scop_adjust_phis_for_liveouts.
4225
4226         * graphite.h (struct sese): Documented.  Added fields liveout,
4227         num_ver and livein.
4228         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
4229         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
4230         (struct scop): Added field liveout_renames.
4231         (SCOP_LIVEOUT_RENAMES): New.
4232
4233 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
4234
4235         PR tree-optimization/38409
4236         * gcc.dg/graphite/pr38409.c: New.
4237         * graphite.c (nb_reductions_in_loop): Use simple_iv.
4238
4239 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
4240
4241         * graphite.c (gcc_type_for_cloog_iv): By default return
4242         integer_type_node.
4243         (graphite_create_new_loop): Don't fold_convert the already
4244         fold_convert-ed expression.
4245
4246 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
4247
4248         PR tree-optimization/38446
4249         * gcc.dg/graphite/pr38446.c: New.
4250         * graphite.c (register_bb_in_sese): New.
4251         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
4252         looking at the bbs in the region.
4253         * graphite.h (sese): Add region_basic_blocks pointer set to
4254         structure and initialize at the time of defining new scop.
4255
4256 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4257
4258         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
4259         (find_params_in_bb): Do not free data refs.
4260         (free_graphite_bb): Add FIXME on disabled free_data_refs.
4261
4262 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
4263
4264         * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
4265         * testsuite/gcc.dg/graphite/scop-17.c: Same.
4266         * testsuite/gcc.dg/graphite/block-5.c: New.
4267         * testsuite/gcc.dg/graphite/block-6.c: New.
4268         * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
4269         * testsuite/gcc.dg/graphite/pr37684.c: Same.
4270         * testsuite/gcc.dg/graphite/block-2.c: Same.
4271
4272         * graphite.c (struct ivtype_map_elt): New.
4273         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
4274         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
4275         gcc_type_for_cloog_iv): New.
4276         (loop_iv_stack_patch_for_consts): Use the type of the induction
4277         variable from the original loop, except for the automatically
4278         generated loops, i.e., in the case of a strip-mined loop, in
4279         which case there is no original loop: in that case just use
4280         integer_type_node.
4281         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
4282         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
4283         (clast_name_to_gcc): Accept params to be NULL.
4284         (clast_to_gcc_expression): Take an extra parameter for the type.
4285         Convert to that type all the expressions built by this function.
4286         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
4287         (graphite_translate_clast_equation): Compute the type of the
4288         clast_equation before translating its LHS and RHS.
4289         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
4290         (graphite_create_new_loop): Compute the type of the induction
4291         variable before translating the lower and upper bounds and before
4292         creating the induction variable.
4293         (rename_variables_from_edge, rename_phis_end_scop): New.
4294         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
4295         (sese_add_exit_phis_edge): Do not use integer_zero_node.
4296         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4297         compute_cloog_iv_types): New.
4298         (gloog): Call compute_cloog_iv_types before starting the
4299         translation of the clast.
4300
4301         * graphite.h (struct graphite_bb): New field cloog_iv_types.
4302         (GBB_CLOOG_IV_TYPES): New.
4303         (debug_ivtype_map): Declared.
4304         (oldiv_for_loop): New.
4305
4306 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4307
4308         PR middle-end/38459
4309         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
4310         (param_index): Assert if parameter is not know after parameter
4311         detection.
4312         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
4313         (find_scop_parameters): Mark, that we have finished parameter
4314         detection.
4315         (graphite_transform_loops): Move condition detection before parameter
4316         detection.
4317         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
4318         * testsuite/gfortran.dg/graphite/pr38459.f90: New.
4319
4320 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4321
4322         * graphite.c (graphite_transform_loops): Always call find_transform ()
4323         in ENABLE_CHECKING.  So we test these code paths, even if we do not
4324         generate code.
4325
4326 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4327
4328         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
4329         (print_scop): Ditto.
4330
4331 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4332
4333         PR middle-end/38084
4334         Fix testsuite/gfortran.dg/graphite/id-3.f90.
4335         * graphite.c (scopdet_basic_block_info): Fix bug that found some
4336         regions more than once.
4337
4338 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
4339
4340         Fix testsuite/gfortran.dg/graphite/id-4.f90.
4341         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
4342         when not needed.
4343
4344 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
4345
4346         Fix testsuite/gfortran.dg/graphite/id-1.f90.
4347         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
4348         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
4349         (max_precision_type): New.
4350         (value_clast): Removed.
4351         (clast_to_gcc_expression): Be more careful to types of expressions.
4352         Use max_precision_type and update use of gmp_cst_to_tree.
4353         (graphite_translate_clast_equation): Use max_precision_type.
4354         (graphite_create_guard_cond_expr): Do not use integer_type_node,
4355         use the type of the condition.
4356         (graphite_create_new_loop): Do not use integer_type_node, use the
4357         max_precision_type of lb and ub.
4358
4359 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
4360
4361         * graphite.c (build_scops_1): Initialize open_scop.exit
4362         and sinfo.last.
4363
4364 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
4365
4366         * testsuite/gcc.dg/graphite/pr38084.c: New.
4367         * testsuite/gfortran.dg/graphite/id-1.f90: New.
4368         * testsuite/gfortran.dg/graphite/id-2.f90: New.
4369         * testsuite/gfortran.dg/graphite/id-3.f90: New.
4370         * testsuite/gfortran.dg/graphite/id-4.f90: New.
4371         * testsuite/gfortran.dg/graphite/pr37857.f90: New.
4372
4373 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
4374             Jan Sjodin  <jan.sjodin@amd.com>
4375             Harsha Jagasia  <harsha.jagasia@amd.com>
4376
4377         PR middle-end/37852
4378         PR middle-end/37883
4379         PR middle-end/37928
4380         PR middle-end/37980
4381         PR middle-end/38038
4382         PR middle-end/38039
4383         PR middle-end/38073
4384         PR middle-end/38083
4385         PR middle-end/38125
4386
4387         * testsuite/gcc.dg/graphite/pr38073.c: New.
4388         * testsuite/gcc.dg/graphite/pr37928.c: New.
4389         * testsuite/gcc.dg/graphite/pr37883.c: New.
4390         * testsuite/gcc.dg/graphite/pr38125.c: New.
4391         * testsuite/gfortran.dg/graphite/pr38083.f90: New.
4392         * testsuite/gfortran.dg/graphite/pr37852.f90: New.
4393         * testsuite/gfortran.dg/graphite/pr37980.f90: New.
4394
4395         * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
4396         the number of detected scops.  Copy exact same test for loop
4397         blocking...
4398         * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
4399         loops to be blocked as reductions are not handled.
4400         * testsuite/gcc.dg/graphite/block-4.c: ...here.  New.
4401
4402         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
4403         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
4404         ...here.
4405         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
4406         * Makefile.in (graphite.o): Depend on value-prof.h.
4407         (graphite.o-warn): Removed -Wno-error.
4408         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
4409         to be a NULL pointer.  Call update_stmt.  Return the newly created
4410         cannonical induction variable.
4411
4412         * graphite.h (debug_rename_map): Declared.  Fix some comments.
4413
4414         * graphite.c: Reimplement the code generation from graphite to gimple.
4415         Include value-prof.h.
4416         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
4417         (get_old_iv_from_ssa_name): Removed.
4418         (graphite_stmt_p): New.
4419         (new_graphite_bb): Test for useful statements before building a
4420         graphite statement for the basic block.
4421         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
4422         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
4423         reason.
4424         (recompute_all_dominators, graphite_verify,
4425         nb_reductions_in_loop, graphite_loop_normal_form): New.
4426         (scop_record_loop): Call graphite_loop_normal_form.
4427         (build_scop_loop_nests): Iterate over all the blocks of the
4428         function instead of relying on the incomplete information from
4429         SCOP_BBS.  Return the success of the operation.
4430         (find_params_in_bb): Use the data from GBB_DATA_REFS.
4431         (add_bb_domains): Removed.
4432         (build_loop_iteration_domains): Don't call add_bb_domains.
4433         Add the iteration domain only to the basic blocks that have been
4434         translated to graphite.
4435         (build_scop_conditions_1): Add constraints only if the basic
4436         block have been translated to graphite.
4437         (build_scop_data_accesses): Completely disabled until data
4438         dependence is correctly implemented.
4439         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
4440         (remove_all_edges_1, remove_all_edges): Removed.
4441         (get_new_name_from_old_name): New.
4442         (graphite_rename_variables_in_stmt): Renamed
4443         rename_variables_in_stmt.  Call get_new_name_from_old_name.
4444         Use replace_exp and update_stmt.
4445         (is_old_iv): Renamed is_iv.
4446         (expand_scalar_variables_stmt): Extra parameter for renaming map.
4447         Use replace_exp and update_stmt.
4448         (expand_scalar_variables_expr): Same.  Use the map to get the
4449         new names for the renaming of induction variables and for the
4450         renaming of variables after a basic block has been copied.
4451         (expand_scalar_variables): Same.
4452         (graphite_rename_variables): Renamed rename_variables.
4453         (move_phi_nodes): Removed.
4454         (get_false_edge_from_guard_bb): New.
4455         (build_iv_mapping): Do not insert the induction variable of a
4456         loop in the renaming iv map if the basic block does not belong
4457         to that loop.
4458         (register_old_new_names, graphite_copy_stmts_from_block,
4459         copy_bb_and_scalar_dependences): New.
4460         (translate_clast): Heavily reimplemented: copy basic blocks,
4461         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
4462         At each translation step call graphite_verify ensuring the
4463         consistency of the SSA, loops and dominators information.
4464         (collect_virtual_phis, find_vdef_for_var_in_bb,
4465         find_vdef_for_var_1, find_vdef_for_var,
4466         patch_phis_for_virtual_defs): Removed huge hack.
4467         (mark_old_loops, remove_dead_loops, skip_phi_defs,
4468         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
4469         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
4470         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
4471         if_region_get_condition_block, if_region_set_false_region,
4472         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
4473         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
4474         sese_add_exit_phis_edge, sese_add_exit_phis_var,
4475         rewrite_into_sese_closed_ssa): New.
4476         (gloog): Remove dead code.  Early return if code cannot be
4477         generated.  Call cleanup_tree_cfg once the scop has been code
4478         generated.
4479         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
4480         block loops with less than two loops.
4481         (graphite_apply_transformations): Remove the call to
4482         scop_remove_ignoreable_gbbs.
4483         (limit_scops): When build_scop_loop_nests fails, continue on
4484         the next scop.  Fix open_scop.entry.
4485         (graphite_transform_loops): Call recompute_all_dominators: force the
4486         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
4487         Call initialize_original_copy_tables and free_original_copy_tables
4488         to be able to copy basic blocks during code generation.
4489         When build_scop_loop_nests fails, continue on next scop.
4490         (value_clast): New union.
4491         (clast_to_gcc_expression): Fix type cast warning.
4492
4493 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
4494
4495         * Merge from mainline (r140838:141727).
4496
4497 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
4498
4499         PR middle-end/37833
4500
4501         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
4502
4503 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
4504
4505         PR middle-end/37943
4506
4507         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
4508         exits and conditions.
4509         * testsuite/gcc.dg/graphite/pr37943.c: New.
4510
4511 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
4512
4513         PR middle-end/37886
4514         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
4515
4516 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
4517
4518         * doc/invoke.texi: Fix spaces.
4519
4520 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
4521
4522         PR tree-optimization/37891
4523         Reverted last commit.
4524         * graphite.c (create_single_entry_edge): Set
4525         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4526
4527 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
4528             Mitul Thakkar  <mitul.thakkar@amd.com>
4529
4530         * graphite.c (create_single_entry_edge): Set
4531         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4532
4533 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
4534
4535         * doc/invoke.texi: Add -fgraphite-identity.
4536         * graphite.c (graphite_apply_transformations): Check for
4537         -fgraphite-identity.
4538         * toplev.c (process_options): Add flag_graphite_identity.
4539         * tree-ssa-loop.c: Add flag_graphite_identity.
4540
4541 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
4542
4543         Undo changes from 2008-10-02:
4544         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4545         operand type when copying the operand to a variable of different type.
4546         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4547         with the IV name after increment.
4548
4549 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
4550             Harsha Jagasia  <harsha.jagasia@amd.com>
4551
4552         PR tree-optimization/37828
4553         * testsuite/gcc.dg/graphite/pr37828.c: New.
4554         * graphite.c (graphite_trans_loop_block): Do not loop block
4555         single nested loops.
4556
4557 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
4558             Sebastian Pop  <sebastian.pop@amd.com>
4559
4560         * graphite.c (struct rename_map_elt, new_rename_map_elt,
4561         rename_map_elt_info, eq_rename_map_elts): New.
4562         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
4563         (expand_scalar_variables_expr): Change parameters.
4564         (expand_scalar_variables_stmt): Same.
4565         (expand_scalar_variables): Same.
4566         (graphite_rename_ivs): Rename graphite_rename_variables.
4567         (build_iv_mapping): New.
4568         (translate_clast): Call build_iv_mapping.
4569         * graphite.h (gbb_p): New name.
4570
4571 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
4572
4573         PR tree-optimization/37684
4574         * gcc.dg/graphite/pr37684.c: New.
4575         * graphite.c (exclude_component_ref): New.
4576         (is_simple_operand): Call exclude_component_ref.
4577
4578 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
4579             Harsha Jagasia  <harsha.jagasia@amd.com>
4580
4581         PR tree-optimization/37485
4582         * gcc.dg/graphite/block-2.c: New
4583         * graphite.c (gmp_cst_to_tree): Moved.
4584         (iv_stack_entry_is_constant): New.
4585         (iv_stack_entry_is_iv): New.
4586         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
4587         (loop_iv_stack_insert_constant): New.
4588         (loop_iv_stack_pop): Use new datatpype.
4589         (loop_iv_stack_get_iv): Same.
4590         (loop_iv_stack_get_iv_from_name): Same.
4591         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
4592         (loop_iv_stack_patch_for_consts): New.
4593         (loop_iv_stack_remove_constants): New.
4594         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
4595         (translate_clast): Call loop_iv_stack_patch_for_consts and
4596         loop_iv_stack_remove_constants.
4597         (gloog): Use new datatype.  Redirect construction edge to end
4598         block to avoid accidental deletion.
4599         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
4600         iv stack entry.
4601         (union iv_stack_entry_data): New.  Data in iv stack entry.
4602         (struct iv_stack_entry): New.  Datatype for iv stack entries.
4603
4604 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
4605
4606         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4607         operand type when copying the operand to a variable of different type.
4608
4609 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
4610
4611         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4612         with the IV name after increment.
4613
4614 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
4615
4616         * Merge from mainline (r140164:140838).
4617
4618 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4619
4620         * graphite-data-ref.c: New.
4621         * graphite.c (print_scop): Also dump the dependence graph.
4622         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
4623         (new_scop): Initialize SCOP_DEP_GRAPH.
4624         (build_scop_dynamic_schedules): New.
4625         (build_access_matrix_with_af): Fixed column numbering.
4626         (graphite_transform_loops): Call build_scop_dynamic_schedules.
4627         * graphite.h: Add ifndef/define guards against multiple inclusion.
4628         (struct scop): Add dep_graph field.
4629         (SCOP_DEP_GRAPH): Defined.
4630         (ref_nb_loops): Fixed and moved to other position.
4631         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
4632         (nb_loops_around_loop_in_scop): New.
4633         (graphite_dump_dependence_graph): Declared.
4634         (graphite_build_rdg_all_levels): Declared.
4635         (graphite_test_dependence): Declared.
4636         * Makefile.in (graphite-data-ref.o): New target.
4637
4638 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
4639
4640         * Merge from mainline (139870:140164).
4641
4642 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
4643
4644         * Merge from mainline (138275:139870).
4645         * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
4646         the commits from trunk broke the niter detection.
4647
4648 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
4649
4650         * graphite.c: Add more documentation.  Fix formatting.
4651         (debug_loop_vec, debug_oldivs, loop_iv_stack,
4652         loop_iv_stack_debug): Moved...
4653         (schedule_to_scattering): Move before use.
4654         (dot_all_scops): Include in "#if 0" the code for system
4655         call dotty.
4656
4657         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
4658         loop_iv_stack_debug): ...here.
4659
4660 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
4661
4662         * tree-phinodes.c (make_phi_node): Extern.
4663         (add_phi_node_to_bb): New.
4664         (create_phi_node): Call add_phi_node_to_bb.
4665         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
4666         (remove_statement): Handle case where stored phi was updated
4667         and is no longer the same.
4668         * graphite.c (is_parameter): New.
4669         (is_old_iv): New.
4670         (expand_scalar_variables_expr): New.
4671         (expand_scalar_variables_stmt): New.
4672         (expand_scalar_variables): New.
4673         (move_phi_nodes): Create new phi instead of moving old one.
4674         (translate_clast): Call expand_scalar_variables.
4675         (find_vdef_for_var_in_bb): Also scan regular definitions.
4676         (skip_phi_defs): New.
4677         (collect_scop_exit_phi_args): New.
4678         (patch_scop_exit_phi_args): New.
4679         (gloog): Patch phis after scop.
4680         * tree-flow.h: (add_phi_node_to_bb): Declared.
4681         (make_phi_node): Declared.
4682
4683 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
4684
4685         * graphite.c (end_scop): Split the entry of the scop when it
4686         is the header of the loop in which the scop is ending.
4687         (build_scops_1, limit_scops): Update uses of end_scop.
4688
4689 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
4690
4691         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
4692         SCOP_ENTRY or SCOP_EXIT.
4693
4694 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4695
4696         * graphite.c (get_construction_edge): Removed.
4697         (gloog): Construction edge is the scop entry edge.
4698
4699 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4700
4701         * graphite.c (can_generate_for_scop): Removed.
4702         (gloog): Do not call it.
4703
4704 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4705
4706         * graphite.c (new_scop): Entry of a scop is an edge.
4707         Initialize SESE region.
4708         (free_scop): Free SESE region.
4709         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
4710         (split_difficult_bb): New, split from end_scop.
4711         (end_scop): Exit of a scop is an edge.
4712         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
4713         not automatically updated and thus is always wrong.
4714         * graphite.h (struct sese): New.
4715         (SESE_ENTRY): New.
4716         (SESE_EXIT): New.
4717         (struct scop): New field for a SESE region.  Remove entry, exit.
4718         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
4719         semantics as before.  Moved comment around.
4720
4721 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4722             Sebastian Pop  <sebastian.pop@amd.com>
4723
4724         * graphite.c (graphite_transform_loops): Always enable gloog
4725         and find_transform when ENABLE_CHECKING.
4726
4727 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4728
4729         * graphite.c (graphite_transform_loops): Move pretty printer
4730         of SCOPs before doing any transform.  Remove call to print_scops
4731         and dot_all_scops_1.
4732
4733 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4734
4735         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
4736         (print_graphite_bb): Same.
4737
4738 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4739
4740         * graphite.c (dot_all_scops_1): Cleanup.
4741         (move_scops): Fix comment.
4742
4743 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4744
4745         * graphite.c (build_scop_bbs): Revert commit 139355:
4746
4747         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4748                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4749
4750                 * graphite.c (build_scop_bbs): Factor up code.
4751
4752 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4753
4754         * graphite.c (gloog): Update dominator info.
4755
4756 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4757
4758         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
4759
4760 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
4761
4762         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
4763         initialization.
4764         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
4765         (translate_clast): Correct formatting.
4766         * graphite.h (struct num_map): Removed.
4767         (struct graphite_bb): Remove num_map field.
4768         (GBB_INDEX_TO_NUM_MAP): Removed.
4769
4770 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
4771
4772         * graphite.c (build_access_matrix_with_af): Fix comments.
4773         (build_scop_data_accesses): Same.
4774
4775 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
4776
4777         * graphite.c (build_scop_data_accesses): Don't construct
4778         access matrices.  Add a FIXME and an assert condition that
4779         should pass when the access matrices will be needed.
4780
4781 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
4782
4783         * tree-data-ref.c (stmt_simple_memref_p): Don't call
4784         really_constant_p.
4785         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
4786         Moved close by free_graphite_bb.
4787         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
4788         (new_scop): Move close by free_scop.
4789         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
4790
4791 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
4792
4793         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
4794         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
4795         instead of recursive call.
4796         (graphite_translate_clast_equation): New.
4797         (graphite_create_guard_cond_expr): New.
4798         (graphite_create_new_guard): New.
4799         (get_stack_index_from_iv): Removed.
4800         (graphite_rename_ivs_stmt): Use gbb_loop_index.
4801         (get_true_edge_from_guard_bb): New.
4802         (translate_clast): Handle stmt_guard in clast.
4803         (get_construction_edge): Allow construction edge detection for
4804         a scope entry with multiple predecessors if one predecessor is
4805         the immediate dominator of scope entry.
4806         (can_generate_code_stmt): Enable code generation for clast_guard.
4807         (gloog): Use correct context loop.  Removed check for post dominators.
4808         * cfgloop.h (create_empty_if_region_on_edge): Declared.
4809
4810 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
4811
4812         * graphite.c (remove_dead_loops): Document better which
4813         loops are removed.
4814
4815 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
4816
4817         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4818         and PPLINC.
4819         (graphite.o): Also depends on pointer-set.h.
4820
4821 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
4822
4823         * graphite.c (scop_record_loop): Fix compile warning.
4824
4825 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
4826             Sebastian Pop  <sebastian.pop@amd.com>
4827
4828         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4829
4830 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
4831
4832         * graphite.c (build_graphite_bb): Initialize bb->aux to
4833         point to the graphite_bb_p.
4834         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4835         content of bb->aux.
4836         (add_bb_domains): Does not use the scop parameter.
4837         (graphite_transform_loops): Clean bb->aux at the end.
4838
4839 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4840             Sebastian Pop  <sebastian.pop@amd.com>
4841
4842         * testsuite/lib/target-supports.exp
4843         (check_effective_target_fgraphite): New.
4844
4845         * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4846         check_effective_target_fgraphite returns false.
4847         Set dg-do-what-default to compile.
4848         (scan-graphite-dump-times): Removed.
4849         * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4850
4851         * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4852         Use scan-tree-dump-times instead of scan-graphite-dump-times.
4853         * testsuite/gcc.dg/graphite/scop-1.c: Same.
4854         * testsuite/gcc.dg/graphite/scop-2.c: Same.
4855         * testsuite/gcc.dg/graphite/scop-3.c: Same.
4856         * testsuite/gcc.dg/graphite/scop-4.c: Same.
4857         * testsuite/gcc.dg/graphite/scop-5.c: Same.
4858         * testsuite/gcc.dg/graphite/scop-6.c: Same.
4859         * testsuite/gcc.dg/graphite/scop-7.c: Same.
4860         * testsuite/gcc.dg/graphite/scop-8.c: Same.
4861         * testsuite/gcc.dg/graphite/scop-9.c: Same.
4862         * testsuite/gcc.dg/graphite/scop-10.c: Same.
4863         * testsuite/gcc.dg/graphite/scop-11.c: Same.
4864         * testsuite/gcc.dg/graphite/scop-12.c: Same.
4865         * testsuite/gcc.dg/graphite/scop-13.c: Same.
4866         * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4867         * testsuite/gcc.dg/graphite/scop-14.c: Same.
4868         * testsuite/gcc.dg/graphite/scop-15.c: Same.
4869         * testsuite/gcc.dg/graphite/block-0.c: Same.
4870         * testsuite/gcc.dg/graphite/scop-16.c: Same.
4871         * testsuite/gcc.dg/graphite/block-1.c: Same.
4872         * testsuite/gcc.dg/graphite/scop-17.c: Same.
4873         * testsuite/gcc.dg/graphite/scop-18.c: Same.
4874         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4875         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4876         * testsuite/gfortran.dg/graphite/block-2.f: Same.
4877
4878 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4879
4880         * graphite.c: Fix some XXX comments.
4881         (build_scop_dynamic_schedules): Removed.
4882
4883 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4884
4885         * graphite.h (scop_max_loop_depth): Moved...
4886         * graphite.c (scop_max_loop_depth): ...here.
4887         (remove_all_edges_1): New.
4888         (remove_all_edges): Factored code.
4889         (remove_cond_exprs): Check only the last statement for
4890         a GIMPLE_COND expression.
4891
4892 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4893
4894         * graphite.c (scan_tree_for_params): Early return when the
4895         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
4896         (find_scop_parameters): Factor out code.
4897         (graphite_trans_bb_strip_mine): Remove dead code.
4898
4899 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4900
4901         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4902         graphite_trans_bb_move_loop): Factor asserts.
4903         (gloog): Perform sanity checks only for ENABLE_CHECKING.
4904         Do not call calculate_dominance_info and estimate_bb_frequencies.
4905
4906 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
4907
4908         * graphite.c (create_loops_mapping, free_loops_mapping,
4909         create_loops_mapping_num, debug_loop_mapping_1,
4910         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4911         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4912         graphite_loops_mapping_add_child_num,
4913         graphite_loops_mapping_insert_child,
4914         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4915         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4916         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4917         create_num_from_index, get_num_from_index,
4918         swap_loop_mapped_depth): Removed.
4919         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4920         (free_scop): Do not call free_loops_mapping.
4921         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4922         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
4923         get_loop_mapped_depth.
4924         (graphite_trans_bb_move_loop): Do not update the loop mapping.
4925         (graphite_trans_bb_strip_mine): Same.
4926         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4927         (struct scop): Remove field loops_mapping.
4928
4929 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4930             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4931
4932         * graphite.c (scop_record_loop): Factor out one level of the
4933         condition by early return.
4934         (build_scop_loop_nests): Format following FSF coding style.
4935         (build_scop_dynamic_schedules): Factor out code.
4936         (scopdet_bb_info): Reindent.  Default case should not be reachable.
4937
4938 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4939             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4940
4941         * graphite.c (loop_affine_expr): Check for DECL_P or struct
4942         assignments that are not handled as simple operands for now.
4943
4944 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4945             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4946
4947         * graphite.c (build_scop_bbs): Factor up code.
4948
4949 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4950             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4951
4952         * graphite.c (stmt_simple_for_scop_p): Factor code out
4953         of the loop.
4954         (enum gbb_type): New.  Group all the GBB_* types under it.
4955         (is_loop_exit): Moved...
4956         (end_scop): Enable BB spliting.
4957         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
4958         * cfgloop.h (is_loop_exit): Declared.
4959
4960 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4961
4962         * doc/invoke.texi: Remove strides from examples containing
4963         DO loops when the strides are equal to 1.
4964
4965 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
4966             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4967
4968         * graphite.c (graphite_trans_scop_block): Or the result with
4969         the result from graphite_trans_loop_block.
4970         * testsuite/gcc.dg/graphite/block-1.c: New.
4971         * testsuite/gfortran.dg/graphite/block-1.f90: New.
4972         * testsuite/gfortran.dg/graphite/block-2.f: New.
4973
4974 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4975
4976         * graphite.c (graphite_transform_loops): Call cloog_initialize
4977         and cloog_finalize.
4978
4979 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4980
4981         * tree-data-ref.c) (stmt_simple_memref_p): New.
4982         * tree-data-ref.h (stmt_simple_memref_p): Declared.
4983         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4984         (is_simple_operand): Call stmt_simple_memref_p.
4985
4986         * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4987         using pointer arithmetic, as this is optimized by PRE and
4988         makes the code too difficult to analyze.
4989
4990         * testsuite/gcc.dg/graphite/scop-18.c: Same.
4991
4992 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4993
4994         * gdbinit.in (pgg): New.
4995
4996 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4997
4998         * graphite.c (graphite_trans_loop_block): Fix warning.
4999
5000 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
5001
5002         * graphite.c (graphite_trans_loop_block): Fix my merge error.
5003
5004 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
5005
5006         * graphite.c (graphite_trans_bb_block): Remove check for
5007         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
5008         Check if loop blocking is profitable for every loop, before applying
5009         the changes.
5010         (graphite_apply_transformations): Call graphite_trans_bb_block only,
5011         if flag_loop_block is set.
5012
5013 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
5014
5015         * graphite.c: Add some more documentation for the loop
5016         mapping.
5017
5018 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
5019
5020         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
5021         * graphite.c: Format on less than 80 columns.
5022         * graphite.h: Same.
5023
5024 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
5025
5026         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
5027
5028 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
5029
5030         * doc/invoke.texi (floop-block, floop-strip-mine,
5031         floop-interchange): Update documentation with examples.
5032
5033 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
5034
5035         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
5036         add_referenced_var.
5037         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
5038
5039 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
5040
5041         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
5042         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
5043         * tree-scalar-evolution.c: Revert useless changes.
5044         * tree-phinodes.c: Same.
5045         * cfghooks.c: Same.
5046         * vec.h: Same.
5047         * tree-vectorizer.h: Same.
5048         * tree-flow.h: Same.
5049         * tree-cfg.c: Same.
5050         * common.opt (fgraphite): Update documentation.
5051
5052 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
5053
5054         * doc/invoke.texi (-floop-block, -floop-strip-mine,
5055         -floop-interchange): Add more text for explaining what each of these
5056         flags is doing.
5057         * tree-into-ssa.c (gimple_vec): Moved to...
5058         * graphite.c: Include gimple.h.
5059         (gimple_vec): Moved to...
5060         (del_loop_to_cloog_loop): Removed.
5061         (loop_affine_expr): Do not call create_data_ref when the
5062         operand is a constant.
5063         (new_scop): Use free instead of del_loop_to_cloog_loop.
5064         * Makefile.in (graphite.o): Depend on GIMPLE_H.
5065         * gimple.h (gimple_vec): ... here.
5066
5067 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5068
5069         * graphite.c (scopdet_bb_info): Only allow loops with known number of
5070         latch executions.
5071         (build_loop_iteration_domains): Fail, if latch executions unknown.
5072
5073 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5074
5075         * graphite.c (add_conditions_to_domain): New.
5076         (build_scop_conditions_1): Call add_conditions_to_domain.
5077         (set_cloog_options): Allow to disable optimizations.
5078
5079 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5080
5081         * graphite.c (find_params_in_bb): Look for parameters in conditions.
5082         Do not use walk_dominator_tree.
5083         (find_scop_parameters): Do not use walk_dominator_tree.
5084
5085 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5086
5087         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
5088         (idx_record_params): Adapt.
5089         * graphite.h (scop_gimple_loop_depth): New.
5090
5091 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5092
5093         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
5094         (scan_tree_for_params): Remove value_init.
5095         (build_scop_context): Remove value_init.
5096         (build_loop_iteration_domains): Remove value_init.
5097         (schedule_to_scattering): Remove value_init.
5098         (graphite_trans_bb_strip_mine): Remove value_init.
5099
5100 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5101
5102         * gcc/graphite.c (limit_scops): New.
5103         (graphite_transform_loops): Add limit SCoPs.
5104         * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
5105         * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
5106         * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
5107         * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
5108         * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
5109         * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
5110         * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
5111         * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
5112         * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
5113         Change loop numbers.
5114         * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
5115         Change loop numbers.
5116         * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
5117         * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
5118         * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
5119         * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
5120         * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
5121         * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
5122         * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
5123         * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
5124         * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
5125         * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
5126
5127 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5128
5129         * graphite.c (graphite_transform_loops): Call always find_transform.
5130
5131 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
5132
5133         * graphite.c (free_loops_mapping): New.
5134         (stmt_simple_for_scop_p): Fix typo.
5135         (stmt_simple_for_scop_p): Fix tuples functions, that
5136         broke polyhedron.
5137         (free_graphite_bb): Fix some memleaks.
5138         (free_scop): Fix some memleaks.
5139         (scopdet_bb_info): Do not forget some tmp SCoPs.
5140         (find_params_in_bb): Fix some memleaks.
5141         (clast_to_gcc_expression): Fix warning.
5142
5143 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
5144
5145         * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
5146         * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
5147
5148 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
5149
5150         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
5151         Move code ifdef-ed HAVE_cloog...
5152         * graphite.c: Include toplev.h.
5153         ... here.
5154         * Makefile.in (OBJS-common): Always build graphite.o.
5155         (BACKEND): Remove @GRAPHITE@.
5156         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
5157         (graphite.o): Depend on TOPLEV_H.
5158
5159 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
5160
5161         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
5162         Remove typo left from polylib to ppl conversion.
5163         * graphite.c (graphite_transforms): Use sorry instead of fatal.
5164
5165 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
5166
5167         * toplev.c (process_options): Move the graphite loop optimization
5168         flags...
5169         * tree-ssa-loop.c (graphite_transforms): ... here.
5170         When not configured with CLooG, print to dump_file that
5171         Graphite transforms were not performed.
5172         * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
5173         New.
5174         * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
5175         scan-graphite-dump-times.
5176
5177 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
5178
5179         * graphite.c (dot_scop, dot_all_scops): Do not call system.
5180         Do not open /tmp/scop.dot and /tmp/allscops.dot.
5181
5182 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
5183             Jan Sjodin  <jan.sjodin@amd.com>
5184
5185         * configure: Regenerated.
5186         * omp-low.c (expand_omp_sections): Remove now unused code.
5187         * config.in (HAVE_polylib): Removed.
5188         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
5189         (PPLLIBS, PPLINC): Added.
5190         * graphite.c: Replace unsigned with int wherever possible.
5191         Don't access Cloog's data structures, but use accessor functions.
5192         Clast's stmt->type is now implemented as a vtable: change the
5193         switches of stmt->type into ifs.
5194         (polylib/polylibgmp.h): Don't include.
5195         (initialize_dependence_polyhedron,
5196         initialize_data_dependence_polyhedron, is_empty_polyhedron,
5197         statement_precedes_p, test_dependence, build_rdg_all_levels,
5198         dump_dependence_graph): Removed until this code is cleaned up
5199         or ported to Cloog.
5200         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
5201         (POLYLIBINC): Renamed PPLINC.
5202
5203 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
5204             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5205             Jan Sjodin  <jan.sjodin@amd.com>
5206
5207         Finish the merge and tuplification of graphite.
5208
5209 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
5210             Jan Sjodin  <jan.sjodin@amd.com>
5211
5212         Partial merge from mainline (138072:138275).
5213         * graphite.c still has to be tuplified.
5214
5215 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
5216
5217         * graphite.c (graphite_loops_mapping_max_loop_num): New.
5218         (create_num_from_index): New.
5219         (get_num_from_index): Also pass in the graphite BB.
5220         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
5221         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
5222         (graphite_trans_bb_strip_mine): Call create_num_from_index.
5223         (is_interchange_valid): Return false when failing.
5224         * graphite.h (struct num_map): New.
5225         (struct graphite_bb): New field num_map.
5226         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
5227
5228 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5229
5230         * graphite.c (dump_gbb_conditions): Print also conditions like
5231         "if (a)".  Remove dublicated code and use print_generic_expr ().
5232         (stmt_simple_for_scop_p): Only allow conditions we can handle
5233         {<, <=, >, >=}.
5234
5235 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
5236
5237         * graphite.h (struct scop): Removed new_ivs field.
5238         (SCOP_NEWIVS): Deleted.
5239         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
5240         clast_to_gcc_expression, graphite_create_new_loop):
5241         Removed use of new_ivs.
5242
5243 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
5244
5245         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
5246         create_loops_mapping_num, debug_loop_mapping_1): New.
5247         (debug_loop_mapping): Call debug_loop_mapping_1.
5248         (get_loop_mapping_for_num,
5249         graphite_loops_mapping_add_child,
5250         graphite_loops_mapping_add_child_num,
5251         graphite_loops_mapping_insert_child,
5252         graphite_loops_mapping_parent,
5253         split_loop_mapped_depth_for_num,
5254         loop_mapped_depth_split_loop): New.
5255         (increment_loop_mapped_depths): Removed.
5256         (swap_loop_mapped_depth_for_num): Reimplemented.
5257         (new_scop): Call create_loops_mapping.
5258         (scop_record_loop): Call graphite_loops_mapping_insert_child.
5259         (translate_clast): Pass the old loop father in parameter, and pass
5260         it to get_old_iv_from_ssa_name.
5261         (remove_edges_around_useless_blocks, can_generate_code_stmt,
5262         can_generate_code, can_generate_for_scop): New.
5263         (graphite_trans_bb_block): Returns false when it fails to transform.
5264         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
5265
5266 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
5267
5268         Reverted all the changes related to the streamization and
5269         loop fusion.
5270         These changes are now tracked in the streamization branch.
5271
5272 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
5273             Jan Sjodin  <jan.sjodin@amd.com>
5274
5275         * graphite.c (gbb_compare): Correctly constify.
5276         (gbb_can_be_ignored): Indent.
5277         (graphite_trans_scop_swap_1and2): Add legality check.
5278         Remove dead FIXMEs.
5279
5280 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
5281
5282         Remove fallouts from "Reverted the Condate changes".
5283         * tree.h: Remove unused decl.
5284         * testsuite/gcc.dg/tree-checker: Same.
5285         * timevar.def: Remove counter.
5286
5287 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
5288
5289         * Merge from mainline (135673:138072).
5290
5291         Reverted the MIRO changes (from 2008-04-05) that are now
5292         tracked in the miro branch.
5293         * tree-bounds.c: Removed.
5294         * tree-bounds.h: Removed.
5295
5296         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
5297         are now tracked in the condate branch.
5298         * tree-check.c: Removed.
5299         * tree-match.c: Removed.
5300         * condate.y: Removed.
5301
5302 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5303
5304         * common.opt: New user flag -floop-block, -floop-strip-mine
5305         and -floop-interchange.
5306         * toplev.c (process_options): Enable -fgraphite pass if any one of the
5307         graphite loop optimization flags is turned on.
5308         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
5309         flag_loop_strip_mine and flag_loop_interchange checks before
5310         optimizations.
5311         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
5312         -floop-strip-mine and -floop-interchange.
5313         * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
5314         -fgraphite.
5315         * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
5316         * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
5317         * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
5318
5319 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
5320             Sebastian Pop  <sebastian.pop@amd.com>
5321
5322         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
5323         (create_empty_loop_on_edge): More fixes.
5324         * tree-phinodes.c (resize_phi_node): Extern.
5325         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
5326         * cfghooks.c (update_dominator_information): New split from
5327         split_edge.
5328         * tree-vectorizer.c (rename_variables_in_bb): Extern.
5329         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
5330         successor of the function entry block.
5331
5332         * graphite.c: Include pointer-set.h.
5333         (debug_loop_mapping, increment_loop_mapped_depths,
5334         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
5335         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
5336         swap_loop_mapped_depth_for_num, get_num_from_index,
5337         swap_loop_mapped_depth, loop_iv_stack_debug,
5338         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
5339         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
5340         get_old_iv_from_ssa_name): New.
5341         (new_scop): Initialize SCOP_LOOPS_MAPPING.
5342         (free_scop): Free SCOP_LOOPS_MAPPING.
5343         (scop_record_loop): Record old ivs.
5344         (create_var_name): Removed.
5345         (initialize_cloog_names): Allocate double space in case strip mine
5346         applies to all loops once.
5347         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
5348         (clast_to_gcc_expression): Same.  Implement more clast to gimple
5349         translation.
5350         (graphite_create_new_loop): Pass in ivstack.
5351         (remove_all_edges): Pass in the construction_edge.
5352         (graphite_remove_iv): Removed.
5353         (graphite_rename_ivs, graphite_rename_ivs_stmt,
5354         remove_cond_exprs): Rewritten.
5355         (move_phi_nodes): New.
5356         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
5357         (translate_clast): Pass in ivstack.  Rewrite some cases.
5358         (set_cloog_options, debug_clast_stmt): New.
5359         (find_transform): Use set_cloog_options.
5360         (outermost_loop_layer): Removed.
5361         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
5362         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
5363         mark_old_loops, remove_dead_loops): New.
5364         (gloog): Rewritten.
5365         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
5366         (const_column_index, get_first_matching_sign_row_index,
5367         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
5368         get_upper_bound): New.
5369         (graphite_trans_bb_strip_mine): Also update the iv map.
5370
5371         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
5372         (struct name_tree): Add a loop field.
5373         (struct scop): Add a graphite_loops_mapping field.
5374         (SCOP_LOOPS_MAPPING): New.
5375         (debug_clast_stmt): Declare.
5376         * lambda.h (find_induction_var_from_exit_cond): Declare.
5377         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
5378         * cfgloop.h (update_dominators_in_loop): Removed declaration.
5379         (create_empty_loop_on_edge): Updated.
5380         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
5381         rename_variables_in_bb): Declare.
5382         * tree-cfg.c (remove_bb): Extern.
5383
5384         * testsuite/gcc.dg/graphite/block-0.c: New.
5385
5386 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
5387             Sebastian Pop  <sebastian.pop@amd.com>
5388
5389         * graphite.c (strip_mine_profitable_p): New.
5390         (graphite_trans_bb_block): Disable strip mining if not profitable.
5391
5392         * testsuite/gcc.dg/graphite/scop-18.c: New.
5393         * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
5394         * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
5395
5396 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
5397             Jan Sjodin  <jan.sjodin@amd.com>
5398             Sebastian Pop  <sebastian.pop@amd.com>
5399
5400         * graphite.c (is_interchange_valid): New.
5401         (graphite_trans_bb_block): Check loop nest of basic block for legality
5402         of interchange.
5403
5404         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
5405         outer_most_loop, gbb_outer_most_loop_index): New.
5406
5407         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
5408         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
5409         * testsuite/gcc.dg/graphite/scop-16.c: New.
5410         * testsuite/gcc.dg/graphite/scop-17.c: New.
5411
5412 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5413
5414         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
5415         (graphite_trans_scop_block): Ignore SCoPs without bbs.
5416
5417 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5418
5419         * graphite.c (new_scop): Initialize SCOP_EXIT.
5420         (scopdet_info): Add.
5421         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
5422         (build_scops_1): Cleanup, bugfixes.
5423         (build_scops): Cleanup.
5424
5425         * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
5426         * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
5427
5428 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
5429
5430         * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
5431
5432         * testsuite/gfortran.dg/graphite/graphite.exp: Use
5433         DEFAULT_GRAPHITE_FLAGS.
5434
5435         * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
5436
5437 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
5438
5439         * graphite.c (scan_tree_for_params): Do not assert any more if
5440         MULT_EXPR parameter is negative.
5441
5442         * testsuite/gfortran.dg/graphite/scop-1.f: New.
5443
5444         * testsuite/gfortran.dg/graphite/graphite.exp: New.
5445
5446         * testsuite/gcc.dg/graphite/scop-15.c: New.
5447
5448 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
5449
5450         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
5451
5452 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5453
5454         * graphite.c (graphite_trans_bb_swap_loops): Rename from
5455         graphite_swap_loops.
5456         (graphite_trans_bb_move_loop): New.
5457         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
5458         (graphite_trans_bb_block): New.
5459         (graphite_trans_loop_block): New.
5460         (graphite_trans_scop_swap_1and2): Rename from
5461         graphite_trans_swap_1and2.
5462         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
5463         (graphite_trans_scop_block): New.
5464         (graphite_apply_transformations): Rename from
5465         graphite_transformations.
5466
5467         * testsuite/gcc.dg/graphite/scop-matmult.c: New.
5468
5469 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5470
5471         * graphite.c (gbb_compare): New.
5472         (graphite_sort_gbbs): New.
5473         (gbb_can_be_ignored): New.
5474         (scop_remove_ignoreable_gbbs): New.
5475         (graphite_transformations): Cleanup and add
5476         scop_remove_ignoreable_gbbs.
5477         * lambda.h (lambda_vector_compare): New.
5478
5479 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5480
5481         * graphite.c (print_graphite_bb): Correct printing of static schedule.
5482         (graphite_swap_loops): int -> unsigned
5483         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
5484         (graphite_transformations): New.
5485         (graphite_transform_loops): Move to graphite_transformations.
5486         * graphite.h (gbb_nb_loops): Return unsigned.
5487
5488 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5489
5490         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
5491         the domain matrix.  This makes scop-0.c work again.
5492
5493 2008-06-20  Richard Guenther  <rguenther@suse.de>
5494
5495         * graphite.h: Adjust copyright to GPLv3.
5496         * graphite.c: Likewise.
5497         (stmt_simple_memref_for_scop_p): Split out from ...
5498         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
5499         and simplify.
5500         (get_bb_type): Optimize.
5501         (is_pred): Remove.
5502         (is_bb_addable): Fix memleak, replace is_pred call with
5503         single_pred.
5504         (build_scops): Use current_loops.
5505         (param_index): Fix memleak.
5506
5507 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5508
5509         * graphite.c: Fix formatting.
5510
5511 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5512
5513         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
5514         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
5515         (create_var_name, save_var_name): Newly defined functions.
5516         (initialize_cloog_names): Part of the code factored out to
5517         save_var_name.
5518         (clast_to_gcc_expression): Now handles the case of clast_red_sum
5519         in clast_reduction statement.
5520         (graphite_create_new_loop): Now takes a new parameter
5521         for outer_loop.
5522         (translate_clast): Now also takes the context_loop and bb_exit
5523         parameters. Rewritten the code so that it creates a gimple code
5524         inside the given context.
5525         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
5526         remove_cond_expr, disconnect_cond_expr,
5527         disconnect_virtual_phi_nodes): Newly defined functions.
5528         * graphite.h (struct scop): added old_ivs vector.
5529         SCOP_OLDIVS: New macro.
5530
5531 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
5532
5533         * cfgloopmanip.c: Add missing function comments, fix formatting.
5534
5535 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5536
5537         * cfgloopmanip.c (update_dominators_in_loop): Defined.
5538         (create_empty_loop_on_edge): Defined.
5539         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
5540         instead of void.
5541         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
5542         (update_dominators_in_loop): Declared as extern
5543         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
5544
5545 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
5546
5547         * graphite.c (print_graphite_bb): Allow changing number of loops
5548         in SCoP domain.
5549         (initialize_cloog_names): Allow changing number of loops.
5550         (build_cloog_prog): Simplify.
5551         (find_transform): Enable cloog option --strides.
5552         (graphite_swap_loops): New.
5553         (graphite_strip_mine_loop): New.
5554         (graphite_trans_swap_1and2): New.
5555         (graphite_trans_strip): New.
5556         (graphite_transform_loops): Add graphite_trans_strip.
5557         * graphite.h (scop_max_loop_depth): New.
5558
5559 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
5560
5561         * graphite.c (build_scop_iteration_domain): Remove forgotten
5562         line. (Fixes compile)
5563
5564 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
5565
5566         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
5567         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
5568         (build_bb_loops): New.
5569         (graphite_transform_loops): Add build_bb_loops.
5570         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
5571         numbers.
5572         * graphite.h (graphite_bb): Add loops.
5573         (gbb_nb_loops): New.
5574         (gbb_loop_at_index): New.
5575         (gbb_loop_index): New.
5576         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
5577         using nb_params_in_scop.
5578
5579 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
5580
5581         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
5582         (build_scop_canonical_schedules): Build minimized schedule.
5583         (schedule_to_scattering): Adapt to minimized schedule.
5584         * graphite.h (graphite_bb): Add/Update descriptions.
5585
5586 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
5587             Tobias Grosser  <grosser@fim.uni-passau.de>
5588
5589         * graphite.c (print_graphite_bb): Add condition printing.
5590         (dump_value): New.
5591         (dump_gbb_conditions): New.
5592         (build_scop_conditions_1): New.
5593         (build_scop_conditions): New.
5594         * graphite.h (graphite_bb): Add conditions.
5595
5596 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
5597
5598         * graphite.c (print_graphite_bb):
5599         (free_graphite_bb): New.
5600         (free_scop): Free bbs.
5601         (get_bb_type): Free doms.
5602         (build_scop_context): Free context matrix.
5603         (build_loop_iteration_domains): Remove unused code.
5604         (build_cloog_prog): Free scattering function and blocklist.
5605         (find_transform): Free options.
5606
5607 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
5608
5609         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
5610         Remove unnecessery cloog data structures. Make a copy of the domain
5611         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
5612         unnecessary cloog data structures. Fix memory leaks. Remove insert
5613         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
5614         used.
5615         (build_scop_iteration_domain): Remove unnecessary cloog
5616         data structures.  Fix memory leaks.
5617         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
5618         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
5619
5620 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5621
5622         * graphite.c (find_scop_params): Remove initialize_cloog_names.
5623
5624 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5625
5626         * graphite.c (end_scop): Style fix.
5627         (schedule_to_scattering): Style and comment fix.
5628
5629 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5630         * graphite.c (print_graphite_bb): Fix definiton of
5631         schedule_to_scattering.
5632         (initialize_cloog_names): Change nb_scattdims to max loop
5633         depth in SCoP.
5634         (schedule_to_scattering): Take parameter for number of scattering
5635         dimensions.
5636         (build_cloog_prog): Only build as much scattering dimensions as
5637         necessary.
5638
5639 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5640
5641         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
5642         in polyhedron/aermod.f90.
5643
5644 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5645             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
5646             Harsha Jagasia  <harsha.jagasia@amd.com>
5647
5648         * graphite.c (is_bb_addable): Fix segfault.
5649
5650 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5651
5652         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
5653         with multiple exits and conditional handling in edge cases.
5654         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
5655
5656         * testsuite/gcc.dg/graphite/scop-14.c: New.
5657
5658 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5659             Adrien Eliche  <aeliche@isty.uvsq.fr>
5660
5661         * graphite.c (is_bb_addable): Add more comments and enhance
5662         readablity of the source code. Fix memory leak.
5663         (is_loop_exit): Fix memory leak.
5664
5665 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5666
5667         * graphite.c (first_loop_in_scop): Deleted.
5668         (setup_cloog_loop): Only walk the loop chain for inner loops.
5669         (build_scop_iteration_domain): Execute setup_cloog_loop for
5670         all loops in the first layer.
5671
5672 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5673
5674         * graphite.c (scan_tree_for_params): Change the way params are
5675         added to be indepenent of the number of loops.
5676         (setup_cloog_loop): Revert to short matrix format. Fix parameter
5677         handling.
5678         (build_cloog_prog): Revert to short matrix format.
5679
5680 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
5681             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5682
5683         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
5684         warning.
5685
5686 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
5687
5688         * graphite.c (nb_data_refs_in_scop): New.
5689         (graphite_transform_loops): Print more stats: number of
5690         loops, basic blocks and data references per scop.
5691
5692 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
5693             Jan Sjodin  <jan.sjodin@amd.com>
5694
5695         * graphite.c (loop_affine_expr, idx_record_params,
5696         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
5697         instead of instantiate_parameters.
5698
5699 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5700
5701         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
5702         add support for parameters, add STATIC_SCHEDULE at the right places,
5703         cleanup.
5704
5705 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5706
5707         * graphite.c (build_scop_loop_nests): Only add the loops, that
5708         are contained completely in the SCoP.
5709         (build_cloog_prog): Disable scattering, until schedule_to_scattering
5710         and the domains are fixed.
5711         (build_scop_canonical_schedules): Add support for bbs not contained
5712         in any SCoP.
5713
5714 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5715
5716         * graphite.h (scop_contains_loop): Update comments to match
5717         the actual behavior.
5718         (scop_contains_loop): New.
5719         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
5720
5721 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
5722
5723         * graphite.c (get_bb_type): On function body, i.e. loop_0,
5724         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
5725         as GBB_COND_HEADER.
5726
5727 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
5728             Tobias Grosser  <grosser@fim.uni-passau.de>
5729
5730         * graphite.c (graphite_transform_loops): Early return when
5731         there are no loops in the function.
5732
5733 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
5734             Jan Sjodin  <jan.sjodin@amd.com>
5735
5736         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
5737         offset of the last loop.
5738         (setup_cloog_loop): Copy the entire outer constraint matrix.
5739
5740 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
5741             Jan Sjodin  <jan.sjodin@amd.com>
5742
5743         * graphite.c (stmt_in_scop_p, function_parameter_p,
5744         invariant_in_scop_p): Removed.
5745         (scan_tree_for_params): Can be used with no constraint
5746         matrix for gathering parameters.
5747         (idx_record_params): Don't use idx_record_param, instead use
5748         scan_tree_for_params.
5749         (find_scop_parameters): Same.
5750         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
5751         Fix the size of loop domains.
5752         (schedule_to_scattering): Exit when the outer loop is not in scop.
5753         (find_transform): Enable build_cloog_prog.
5754
5755 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
5756             Jan Sjodin  <jan.sjodin@amd.com>
5757
5758         * graphite.c (schedule_to_scattering): Make scattering domains
5759         uniformly of the same size, as required by CLooG 0.14.0 and before.
5760
5761 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
5762             Jan Sjodin  <jan.sjodin@amd.com>
5763
5764         * graphite.c (schedule_to_scattering): Rewrite, correct the
5765         translation of the scheduling function to scattering.
5766         (build_cloog_prog): Call schedule_to_scattering only once.
5767         * graphite.h (scop_loop_index): Do not fail for loops not
5768         in the scop: return -1.
5769
5770 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
5771
5772         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
5773         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
5774         (setup_cloog_loop): Export GBB_DOMAIN.
5775         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
5776         able to rebuild the original control flow.
5777         * graphite.h (graphite_bb): Add domain field and access macro.
5778         (GBB_DOMAIN): New.
5779
5780 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
5781
5782         * graphite.c (debug_gbb): New.
5783         (print_scop, build_graphite_bb): Use SCOP_BBS.
5784         (build_scop_bbs): Reimplemented.
5785         (dfs_bb_in_scop_p): Removed.
5786         (build_scop_loop_nests): Reorder loops inserted in
5787         SCOP_LOOP_NEST: outer loops should come first.
5788         (build_scop_canonical_schedules): Reinitialize at zero
5789         the components of the SCOP_STATIC_SCHEDULE for the loops
5790         that have already been parsed.
5791
5792         * graphite.h (debug_gbb): Declared.
5793
5794 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
5795             Jan Sjodin  <jan.sjodin@amd.com>
5796
5797         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
5798         (graphite_loop_to_gcc_loop): Removed.
5799         (remove_all_edges): New.
5800         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5801         (gloog): Remove useless code.
5802
5803 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5804
5805         * graphite.c (get_bb_type): Reworked. We distinguish between
5806         loops with one or multiple exits.
5807         (is_loop_exit): New.
5808         (is_pred): New.
5809         (is_bb_addable): Rework condition handling, now support for case
5810         case statements and loops with multiple exits.
5811
5812         * testsuite/gcc.dg/graphite/scop-11.c: New.
5813         * testsuite/gcc.dg/graphite/scop-12.c: New.
5814         * testsuite/gcc.dg/graphite/scop-13.c: New.
5815
5816 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5817
5818         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5819         we have too many colors.
5820
5821 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
5822
5823         * doc/invoke.texi (-ftree-loop-fusion): Document.
5824         * tree-pass.h (pass_loop_fusion): Declared.
5825         * tree-loop-fusion.c: New.
5826         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5827         * tree-data-ref.c (find_data_references_in_loop): Make extern.
5828         * tree-data-ref.h (find_data_references_in_loop): Declared.
5829         * common.opt (ftree-loop-fusion): Declared.
5830         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5831
5832 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
5833
5834         * graphite.c (build_access_matrix): Fix typo from the merge.
5835
5836 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
5837
5838         * Merge from mainline (130800:135673).
5839
5840 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
5841
5842         * graphite.c (end_scop): The exit of the scop is not part of the scop.
5843         Update dominators after splitting.
5844
5845 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
5846
5847         * graphite.c (is_bb_addable): Return the harmful statement.
5848         Factor up some code.
5849         (end_scop): New.  Splits end of scope bbs on a harmful statement.
5850         (build_scops_1): Call end_scop.
5851
5852 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
5853
5854         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5855         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5856         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5857         build_scops_1): Removed.
5858         (build_scops_2): Renamed build_scops_1.
5859
5860 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
5861
5862         * graphite.c: Fix formatting.
5863
5864 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5865
5866         * graphite.c (get_bb_type): New.
5867         (move_scops): New.
5868         (build_scops_2): New.
5869         (is_bb_addable): New.
5870         (build_scops): Switch the scop detection.
5871         (build_scop_bbs): Add entry bb to scop.
5872         * graphite.h (struct scop): Update comment.
5873
5874 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5875
5876         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5877         more colors.
5878
5879 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5880
5881         * testsuite/gcc.dg/graphite/scop-1.c: Update.
5882         * testsuite/gcc.dg/graphite/scop-2.c: Update.
5883         * testsuite/gcc.dg/graphite/scop-4.c: Update.
5884         * testsuite/gcc.dg/graphite/scop-5.c: Add.
5885         * testsuite/gcc.dg/graphite/scop-6.c: Add.
5886
5887 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
5888
5889         * testsuite/gcc.dg/graphite/scop-0.c: Add.
5890         * testsuite/gcc.dg/graphite/scop-7.c: Add.
5891         * testsuite/gcc.dg/graphite/scop-8.c: Add.
5892         * testsuite/gcc.dg/graphite/scop-9.c: Add.
5893         * testsuite/gcc.dg/graphite/scop-10.c: Add.
5894
5895 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5896
5897         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5898         Check affine expressions depending on the outermost loop
5899         instead of a scop.
5900         (stmt_simple_for_scop_p): Same.
5901         (harmfule_stmt_in_scop): Same.
5902
5903 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
5904
5905         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5906         mark entry and exit, that are not part of the SCoP and update HTML
5907         formatting.
5908
5909 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
5910
5911         * graphite.c (basic_block_simple_for_scop_p): Renamed
5912         harmful_stmt_in_bb.
5913         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5914         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5915         (all_preds_visited_p, all_succs_visited_p,
5916         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5917         scop_end_loop): New.
5918         (build_scops): Do not use dfs_enumerate_from.
5919
5920         * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5921
5922 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
5923
5924         * graphite.c: Add comments to functions that are missing a
5925         description.
5926         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
5927
5928 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
5929
5930         * graphite.c (nb_params_in_scop): Moved...
5931         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5932         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5933         (clast_to_gcc_expression): Reduce column size to less than 80.
5934         (graphite_create_iv): Return the new name of the IV.
5935         (find_transform): Set options->esp and options->cpp.
5936         (gloog): Comment out the invalidation of the old loop code.
5937         (initialize_dependence_polyhedron): Replace scop_nb_params with
5938         nb_params_in_scop.
5939
5940         * graphite.h (nb_params_in_scop): ... here.
5941         (scop_nb_params): Removed.
5942         (loop_domain_dim): Return something even when the loop was not
5943         found in the hash table: avoid ICEing on all the graphite.exp
5944         testcases.
5945
5946 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5947
5948         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5949
5950         * graphite.c (build_scop_dynamic_schedules): Schedule is built
5951         according to nesting level.
5952         (find_scop_parameters): Call instantiate_parameters.
5953         (scan_tree_for_params): Extend it to handle general affine bounds.
5954         Inner loop bound can depend on outer loop induction variable.
5955         (setup_cloog_loop): tmp variable is allocated on stack. Call
5956         instantiate_parameters with respect to outermost_loop_in_scop.
5957         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5958         graphite.h.
5959         (create_empty_loop): Function loopify should be given edge
5960         probability, instead of edge frequency. Dominance relation from
5961         switch_bb to loop_header.
5962         (clast_to_gcc_expression): Added handling of clast_reduction node.
5963         (gloog): New functionality for removing old loop.
5964         (test_dependence): Factored out from build_rdg_all_levels.
5965         (build_rdg_all_levels): Dependence testing factored out to
5966         test_dependence function.
5967
5968         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5969         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5970         from graphite.c
5971
5972 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
5973
5974         * graphite.c (free_scop, param_index, initialize_cloog_names,
5975         nb_params_in_scop): Use name_tree map instead of just a tree
5976         for keeping track of the variable name associated to that tree.
5977         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5978         clast_to_gcc_expression, graphite_create_iv,
5979         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5980         graphite_stmt_to_gcc_stmt): New.
5981         (gloog): Call these.
5982         * graphite.h (struct name_tree): New.
5983         (struct scop): Use name_tree instead of tree for params.
5984         Store a vector of name_tree for new_ivs.
5985         (SCOP_NEWIVS): New.
5986         (scop_nb_params): Use name_tree instead of tree.
5987
5988 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
5989             Sebastian Pop  <sebastian.pop@amd.com>
5990
5991         * tree-bounds.c: New.
5992         * tree-bounds.h: New.
5993         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5994         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5995         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5996         flag_mudflap.
5997         * gcc.c: Same.
5998         * toplev.c: Same.
5999         * c-cppbuiltin.c: Same.
6000         * c-pragma.c: Same.
6001         * common.opt: Same.
6002         * varasm.c: Same.
6003         * tree-outof-ssa.c: Same.
6004         * c-common.c: Same.
6005         * Makefile.in: Same.
6006
6007 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
6008             Sebastian Pop  <sebastian.pop@amd.com>
6009
6010         * tree-loop-distribution.c (remaining_stmts,
6011         upstream_mem_writes): Removed static variables.
6012         (copy_loop_before, create_bb_after_loop,
6013         mark_nodes_having_upstream_mem_writes, free_rdg_components,
6014         rdg_build_components, rdg_build_partitions,
6015         dump_rdg_partitions): Extern.
6016         (generate_loops_for_partition, generate_code_for_partition): Do not
6017         return a bool.
6018         (already_processed_vertex_p, predecessor_has_mem_write,
6019         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
6020         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
6021         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
6022         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
6023         Pass remaining_stmts and upstream_mem_writes as parameters.
6024         (rdg_component): Moved...
6025         (build_rdg_partition_for_component): Do not aggregate components when
6026         flag_streamize_loops is set.
6027         (gen_sequential_loops): New.
6028         (ldist_gen): Call gen_sequential_loops.
6029
6030         * tree-pass.h (pass_loop_streamization): Declared.
6031
6032         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
6033         basic blocks when loops structures exist.
6034
6035         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
6036
6037         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
6038
6039         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
6040         eliminate_local_variables_stmt, eliminate_local_variables,
6041         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
6042         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
6043         of code delimited by two edges in the CFG.
6044         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
6045         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
6046         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
6047         the case of parallelisation of reductions.
6048         (create_loop_fn): Extern.
6049         (create_omp_parallel_region): New.
6050
6051         * tree-data-ref.c (dump_data_dependence_relation): Don't call
6052         dump_data_reference for printing dra and drb.
6053         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
6054         RDGE_RELATION.
6055         (build_rdg): Don't call free_dependence_relations for the moment, as
6056         we attach dependence relations on each edge of the RDG.
6057         To be fixed later.
6058
6059         * tree-data-ref.h (rdg_component): ...here.
6060         (struct rdg_edge): New field ddr_p relation.
6061         (RDGE_RELATION): New.
6062         (create_bb_after_loop, copy_loop_before,
6063         mark_nodes_having_upstream_mem_writes, rdg_build_components,
6064         rdg_build_partitions, dump_rdg_partitions,
6065         free_rdg_components): Declared.
6066
6067         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
6068         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
6069
6070         * tree-loop-streamization.c: New.
6071
6072         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
6073         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
6074
6075         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
6076
6077         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
6078
6079         * passes.c: Schedule pass_loop_streamization.
6080
6081 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
6082
6083         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
6084         update comment.
6085
6086 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
6087
6088         * graphite.c (dot_all_scops): Update formatting.
6089         Bbs can now be part of more than one SCoP.
6090
6091 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
6092
6093         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
6094         malloc problems.
6095         (loop_domain_dim): Check for unregistered toplev SCOP loop.
6096         * graphite.h (loop_to_cloog_loop): New.
6097
6098 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6099
6100         * graphite.c (loop_domain_dim, ref_nb_loops,
6101         loop_iteration_vector_dim): New.
6102         (build_access_matrix_with_af, build_access_matrix,
6103         initialize_dependence_polyhedron): Fixed for new matrix layout.
6104         No longer assume that all iteration domains are of the same
6105         dimensionality.
6106
6107 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
6108
6109         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
6110         defined in a loop at depth 0 is invariant.
6111         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
6112         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
6113         be called at loop depth 0.
6114
6115         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
6116         a parameter.
6117         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
6118         (down_open_scop): Removed.
6119         (loop_in_scop_p): Redefined.
6120         (scop_affine_expr): New argument: scop.
6121         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
6122         a harmful statement ending a scop.
6123         (basic_block_simple_for_scop_p): New argument: scop.
6124         (get_loop_start): Removed.
6125         (new_scop): Initialize SCOP_LOOPS.
6126         (free_scop): Free SCOP_LOOPS.
6127         (succs_at_same_depth, preds_at_same_depth): New.
6128         (end_scop): Test the validity of a scop.
6129         (add_dominators_to_open_scops): New.
6130         (test_for_scop_bound): Call add_dominators_to_open_scops.
6131         Add cases for opening and closing multiple scops.
6132         (build_scops, build_scop_bbs): Iterate over basic blocks in
6133         depth first order.
6134         (build_graphite_bb): Pass scop directly.
6135         (dfs_bb_in_scop_p): New.
6136         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
6137         several times.
6138         (nb_loops_around_gb): Use loop_in_scop_p.
6139         (schedule_to_scattering): Disabled for the moment the code computing
6140         the "textual order for outer loop".
6141
6142         * graphite.h (struct scop): New field loops.
6143         (SCOP_LOOPS): New.
6144         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
6145
6146         * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
6147
6148 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
6149             Sebastian Pop  <sebastian.pop@amd.com>
6150
6151         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
6152         * common.opt (fstreamize-loops): New.
6153         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
6154         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
6155         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
6156         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
6157
6158 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6159
6160         * tree-data-ref.c (build_empty_rdg): New.
6161         (build_rdg): Use it.
6162         * tree-data-ref.h (build_empty_rdg): Declared.
6163         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
6164         (find_vertex_for_stmt): Removed.
6165         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
6166
6167 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
6168
6169         * tree-loop-distribution.c (generate_builtin): After cancelling the
6170         loop tree, also delete basic blocks.
6171         (rdg_flag_uses): Stop recursion when a vertex has already been
6172         processed.
6173
6174 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6175
6176         * graphite.c (build_scop_alpha): Removed.
6177         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
6178         and dump_dependence_graph to avoid compiler warnings.
6179
6180 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6181
6182         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
6183         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
6184         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6185         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
6186         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
6187         (initialize_dependence_polyhedron, find_vertex_for_stmt,
6188         initialize_data_dependence_polyhedron, is_empty_polyhedron,
6189         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
6190         dump_dependence_graph): New.
6191         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
6192         (GBB_ALPHA): New.
6193         (struct scop): New field loop2cloog_loop.
6194         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
6195         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
6196
6197 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6198
6199         * graphite.c (build_graphite_bb): Fix initialization
6200         of the graphite basic block.
6201
6202 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
6203
6204         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
6205         loop domain matrix.  Pass in the number of loops contained in the
6206         constraint matrix.
6207         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
6208         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
6209         loops that are not surrounding the current loop are not represented
6210         in the domain constraint matrix.
6211         (build_scop_iteration_domain): Initial domain constraint matrix
6212         contains only the eq/ineq, cst, and scop parameters columns.
6213
6214 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6215
6216         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
6217         (print_graphite_bb): Print scattering.
6218
6219 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6220
6221         * graphite.c (initialize_cloog_names): Initialize names of
6222         scattering variables.
6223
6224 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6225
6226         * graphite.c (dot_all_scops_1): Disable debug output while
6227         printing graph.
6228
6229 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6230
6231         * graphite.c (find_transform): Change cloog output language to C.
6232
6233 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
6234
6235         * tree-loop-distribution.c (generate_memset_zero,
6236         generate_builtin, generate_code_for_partition,
6237         rdg_flag_all_uses): New.
6238         (rdg_flag_uses): Gather in the same partition the statements defining
6239         the VUSES of the current statement.
6240         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
6241         Gather in the same partition not only the stores to the same memory
6242         access, but also the reads.
6243         (ldist_generate_loops): Renamed ldist_gen.
6244
6245 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
6246             Tobias Grosser  <grosser@fmi.uni-passau.de>
6247
6248         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
6249         next pointer, don't use the inner pointer.
6250
6251 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
6252
6253         * graphite.c (dot_all_scops, dot_all_scops_1): New.
6254         (find_transform): Call dot_all_1.
6255         * graphite.h (dot_all_scops): Declared.
6256
6257 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
6258
6259         * tree-loop-distribution.c: Fix apsi.f ICE.
6260         (create_bb_after_loop): New.
6261         (generate_loops_for_partition): Use it.
6262         * testsuite/gfortran.dg/ldist-1.f90: New.
6263
6264         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
6265         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
6266
6267 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
6268
6269         * graphite.c (find_transform): Dump cloog program sent to cloog.
6270
6271 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
6272
6273         * graphite.c (initialize_cloog_names): Initialize cloog
6274         iterator names.
6275
6276 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
6277
6278         * graphite.c (build_scop_context): Fix typo, for the matrix
6279         format: insert '0 >= 0' instead of '-1 >= 0'.
6280
6281 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
6282
6283         * Fix merge problems.
6284
6285 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
6286
6287         * graphite.c (setup_cloog_loop): Fix typo.
6288
6289 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
6290
6291         * doc/invoke.texi (-ftree-loop-distribution): Documented.
6292         * tree-loop-distribution.c: Reimplemented.
6293         * tree-pass.h (pass_loop_distribution): New.
6294         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
6295         print_loops.
6296         * graphds.h (struct graph): New field indexes.
6297         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6298
6299         * tree-vect-analyze.c: Remove declaration of static functions when not
6300         needed.
6301         * tree-vectorizer.c: Same.
6302         (rename_variables_in_loop): Now extern.
6303         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
6304         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
6305         calling redirect_edge_and_branch_force.
6306
6307         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
6308
6309         * tree-data-ref.c: Don't include tree-chrec.h.
6310         (debug_data_dependence_relations): New.
6311         (dump_data_dependence_relation): Call dump_data_reference on data refs
6312         in the relation.
6313         (same_access_functions): Moved...
6314         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
6315         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6316         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
6317         struct rdg_vertex_info, ): New.
6318         (create_rdg_edge_for_ddr): Compute the dependence level before looking
6319         at DDR_REVERSED_P.
6320         (create_rdg_vertices): Initialize the htab of graph->indexes.
6321         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
6322         (stmts_from_loop): Don't save LABEL_EXPR.
6323         (hash_stmt_vertex_info, eq_stmt_vertex_info,
6324         hash_stmt_vertex_del): New.
6325         (build_rdg): Initialize rdg->indexes.
6326         (free_rdg, stores_from_loop, ref_base_address,
6327         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
6328         have_similar_memory_accesses_1, ref_base_address_1,
6329         remove_similar_memory_refs): New.
6330
6331         * tree-data-ref.h: Include tree-chrec.h.
6332         (debug_data_dependence_relations): Declared.
6333         (same_access_functions): ...here.  Now static inline.
6334         (ddr_is_anti_dependent, ddrs_have_anti_deps,
6335         ddr_dependence_level): New.
6336         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
6337         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
6338         RDG_MEM_READS_STMT): New.
6339         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6340         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
6341         rdg_vertex_for_stmt): Declared.
6342         (struct rdg_edge): New field level.
6343         (RDGE_LEVEL, free_rdg): New.
6344         (stores_from_loop, remove_similar_memory_refs,
6345         rdg_defs_used_in_other_loops_p,
6346         have_similar_memory_accesses): Declared.
6347         (rdg_has_similar_memory_accesses): New.
6348
6349         * lambda.h (dependence_level): New.
6350         * common.opt (ftree-loop-distribution): New.
6351         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
6352         (print_loop_ir): Renamed print_loops.
6353         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
6354         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
6355         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
6356         (tree-loop-distribution.o): Added.
6357         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
6358         (mark_virtual_ops_in_bb): New.
6359         (print_loops_bb, debug_loop_num, debug_loop): New.
6360         * passes.c: Scheduled pass_loop_distribution.
6361
6362 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6363
6364         * graphite.c (scan_tree_for_params): Correct the number of columns
6365         for polylib format.
6366         (nb_flat_iterator): New.
6367         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
6368         (build_scop_iteration_domain): Correct the number of columns for
6369         polylib format.
6370
6371 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
6372
6373         * Merge from mainline (129697:130800).
6374
6375 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
6376
6377         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
6378         dominated by SCoP's exit.
6379         (graphite_transform_loops): Compute post dominators.
6380
6381 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
6382
6383         * Merge from mainline (127169:129697).
6384
6385 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
6386
6387         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
6388         parameter for the basic block that contains the expression.  Use
6389         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
6390         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
6391         the expression.
6392         * graphite.h (gbb_loop): New.
6393         (GBB_LOOP): Removed.
6394
6395 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
6396
6397         * Makefile.in: Fix merge problem.
6398
6399 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
6400
6401         * Merge from mainline (125309:127169).
6402         * tree-loop-distribution.c: Disabled.
6403
6404 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
6405
6406         * Merge from mainline (r123693:125309).
6407
6408 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
6409
6410         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
6411         correct_modify_p
6412         (correct_modify_p, check_statements, number_of_lvalue_uses,
6413         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
6414         instead of MODIFY_EXPR.
6415         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
6416         and push new edges.
6417
6418 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
6419
6420         * tree-loop-distribution.c (struct rdg): Replace arrays by
6421         VECs for edges and vertices.
6422         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
6423         (RDGV_NB_PARTITIONS): New.
6424         (PRDG_NBV, PRDG_NBE): Removed.
6425         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
6426         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
6427         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
6428
6429 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
6430             Sebastian Pop  <sebpop@gmail.com>
6431
6432         * doc/invoke.texi (-ftree-loop-distribution): Document.
6433         * tree-loop-distribution.c: New file.
6434         * tree-pass.h (pass_loop_distribution): Declared.
6435         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6436         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
6437         and set reversed_p.
6438         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
6439         (DDR_REVERSED_P): New.
6440         * common.opt (-ftree-loop-distribution): New.
6441         * tree-flow.h (distribute_loops): Declared.
6442         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
6443         * passes.c (init_optimization_passes): Schedule loop distribution.
6444
6445 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
6446
6447         * graphite.c (print_graphite_bb): Don't call dump_data_references.
6448         (print_scop): Don't print when scop is NULL.
6449         (build_scop_context, find_transform): Don't output to stderr.
6450
6451 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
6452
6453         * tree-data-ref.c: Don't include graphite.h.
6454         Comment out the code for printing data reference's scop.
6455         (build_access_matrix_with_af): Moved...
6456         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
6457         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
6458         (print_graphite_bb): Print basic block's schedule.
6459         (print_scop): Don't print the schedule, call cloog's pretty printer.
6460         (bb_in_scop_p): A basic block is in a scop only if it is both
6461         dominated and postdominated by the scop's entry and exit basic blocks.
6462         (function_parameter_p): New.
6463         (invariant_in_scop_p): Use function_parameter_p.
6464         (new_scop, save_scop): New.
6465         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
6466         save_scop.
6467         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
6468         (loop_in_scop_p): New.
6469         (scop_record_loop): Use loop_in_scop_p.
6470         (build_scop_domain): Renamed build_scop_iteration_domain.
6471         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
6472         nb_params_in_scop, build_scop_context, first_loop_in_scop,
6473         setup_cloog_loop, dot_scop_1, dot_scop): New.
6474         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
6475         (struct scop): Add a pointer to cloog's representation of a program.
6476
6477 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
6478
6479         * doc/invoke.texi (-ftree-check-verbose): Renamed
6480         -ftree-checks-verbose.
6481         * common.opt (flag_tree_check_verbose): Renamed
6482         flag_tree_checks_verbose.
6483         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
6484
6485 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
6486
6487         * configure: Regenerated.
6488         * config.in: Regenerated.
6489         * tree-ssa-loop.c (graphite_transforms): Execute
6490         graphite_transform_loops only when HAVE_cloog.
6491         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
6492         * graphite.c: Include polylibgmp.h and cloog.h.
6493         (graphite_transform_loops): Removed loops parameter.
6494         * tree-flow.h (graphite_transform_loops): Update declaration.
6495         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
6496         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
6497         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
6498         (OBJS-common): Remove dependence on graphite.o.
6499         (BACKEND): Depend on @GRAPHITE@.
6500
6501 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
6502
6503         * doc/invoke.texi (-ftree-check-verbose): Documented.
6504         * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
6505         * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
6506         * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
6507         * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
6508         * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
6509         * testsuite/gcc.dg/tree-checker/condates.crp: New.
6510         * common.opt (ftree-checks-verbose): New.
6511         * tree-check.c (tree_check_warning): Move extra stderr output
6512         under control of flag_tree_check_verbose.
6513
6514 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
6515
6516         * tree-match.c: Fix comments formatting.
6517         * tree-match.h: Fix comments formatting.
6518         * tree-check.c: Fix comments formatting.
6519         (tree_check_init): Restructure.
6520
6521 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
6522
6523         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
6524
6525 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
6526
6527         * Merge from mainline (r120733:123693).
6528
6529 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
6530
6531         * condate.y: New file.
6532         * tree-match.h (struct patt_info_s): New field sign.
6533         (struct condate_s): New field msg.
6534         (normalize_condate, name_condate, add_condate): New.
6535         (conds[], condate_parse): Made extern.
6536         * tree-check.c (tree_check_warning): First arg changed to cond;
6537         warning reformatted.
6538         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
6539         (tree_scan): New.
6540         (tree_check): Process trivial condates.
6541         (read_delimited_string): Removed.
6542         (print_cond): Print name and msg.
6543         (conds[]): Made extern.
6544         (parse_tree_check_file_once): Rewritten to use the parser in
6545         condate.y.
6546         Processing of option --tree_check_string moved to tree_scan().
6547         * Makefile.in: Added condate.y
6548
6549 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
6550
6551         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
6552         Use VECs instead of varrays.
6553         * diagnostic.h (lazy_dump_generic_node): Update declaration.
6554         * Makefile.in (pretty-print.o): Depend on vec.h.
6555         * pretty-print.c: Include tree.h and vec.h.
6556         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
6557         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
6558         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
6559         pp_free_list): Use VECs instead of varrays.
6560         * pretty-print.h: Do not include varray.h.
6561         (struct tree_chunk_s): Declaration moved before its use.
6562         (output_buffer): Rename varray field to chunks.
6563         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
6564         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
6565         save_global_holes): Use VECs instead of varrays.
6566         * tree-match.h: Declare VECs of cfg_node, and hole_p.
6567         * tree-check.c (scan_cfg_stmts, push_node,
6568         print_matching_stmt): Removed.
6569         (tree_check_instance, push_global_holes_if_new, tree_check,
6570         execute_tree_check): Use VECs instead of varrays.
6571         (gate_tree_check): Don't execute the CFG check when basic_block_info
6572         is not available.
6573
6574 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
6575
6576         * Merge from mainline (r115016:120733).
6577
6578 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
6579
6580         * Merge from mainline (r117632:117661).
6581
6582 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
6583
6584         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
6585         * tree-pass.h (TDF_DEBUG, debug_p): New.
6586         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
6587         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
6588         get_loop_exit_condition, analyze_evolution_in_loop,
6589         analyze_initial_condition, analyze_scalar_evolution,
6590         instantiate_parameters, number_of_latch_executions): Use debug_p.
6591         * tree-chrec.c (chrec_apply): Use debug_p.
6592         * tree-data-ref.c: Include graphite.h.
6593         (dump_data_reference): Print also the access matrix.
6594         (analyze_array, analyze_indirect_ref, init_data_ref,
6595         analyze_offset_expr, address_analysis, object_analysis,
6596         create_data_ref, finalize_ddr_dependent,
6597         non_affine_dependence_relation, analyze_ziv_subscript,
6598         analyze_siv_subscript_cst_affine,
6599         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
6600         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
6601         analyze_miv_subscript, analyze_overlapping_iterations,
6602         build_classic_dist_vector, subscript_dependence_tester,
6603         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
6604         (build_access_matrix_with_af): No longer static.
6605         * tree-data-ref.h (scop_p): ... declaration here.
6606         (data_reference.scop): New field.
6607         (DR_SCOP, DR_ACCESS_MATRIX): New.
6608         (build_access_matrix_with_af, dr_num_subscripts): Declared.
6609         * graphite.c (print_graphite_bb): Call dump_data_references.
6610         (print_scop): Use scop_nb_loops and scop_dim_domain.
6611         (test_for_scop_bound): Use debug_p.
6612         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
6613         scop_nb_params.
6614         (scop_loop_index): Moved...
6615         (scop_record_loop): New.
6616         (build_scop_loop_nests): Use scop_record_loop.
6617         (build_scop_domain): Use scop_dim_domain.
6618         (build_access_matrix): Implemented.
6619         (build_scop_canonical_schedules): Use scop_nb_loops.
6620         (build_graphite_bb): Initialize GBB_SCOP.
6621         * graphite.h (scop_p): Moved...
6622         (graphite_bb.scop): New field.
6623         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
6624         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
6625         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
6626         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
6627         scop_loop_index): New.
6628         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
6629
6630 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
6631
6632         * Merge from mainline (r117661:120450).
6633
6634 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
6635
6636         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
6637         at the first declaration outside the varying loop, instantiate as
6638         far as possible.
6639         * tree-chrec.c (for_each_scev_op): New.
6640         * tree-chrec.h (for_each_scev_op): Declared.
6641         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
6642         * tree-data-ref.c (get_references_in_stmt,
6643         find_data_references_in_stmt): New, from trunk.
6644         (find_data_references_in_loop): Use get_references_in_stmt
6645         and find_data_references_in_loop, modified as in trunk.
6646         (build_access_matrix_with_af): New.
6647         * tree-data-ref.h (data_reference): Add a field access_matrix.
6648         (data_ref_loc): New, as in trunk.
6649         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
6650         invariant_in_scop_p, param_index, scan_tree_for_params,
6651         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
6652         idx_record_param, idx_record_params, build_access_matrix,
6653         build_scop_data_accesses, build_scop_canonical_schedules,
6654         build_graphite_bb, build_scop_bbs, find_params_in_bb,
6655         build_scop_params): New.
6656         * graphite.h (graphite_bb): New.
6657         (scop): Add fields static_schedule, params, loop_nest,
6658         iteration_domain.
6659         * lambda.h: Declare vecs of lambda_matrix.
6660         * tree-flow.h (print_loop_ir_bb): Declared.
6661         * tree-cfg.c (print_loop_ir_bb): New.
6662         (print_loop): Use print_loop_ir_bb.
6663
6664 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
6665
6666         * Merge from mainline (r115016:117632).
6667
6668 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
6669
6670         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
6671         break due to a warning.
6672
6673 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
6674
6675         * graphite.c (print_scops, debug_scops): New.
6676         (graphite_transform): Renamed graphite_find_transform.
6677         * graphite.h (debug_scops): Declared.
6678
6679 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
6680
6681         * tree-match.c: Reformat following the GNU style.
6682         * tree-match.h: Reformat following the GNU style.
6683         * tree-pattern.h: Removed empty file.
6684         * Makefile.in: Remove references to tree-pattern.h.
6685         * tree-check.c: Reformat following the GNU style.
6686         (execute_tree_check): Move gate condition code to...
6687         (gate_tree_check): ...here.  New function.
6688         (pass_check): Use the gate function.
6689
6690 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
6691
6692         * tree-pattern.h: New. Tree pattern matching and checking using
6693         concrete syntax.
6694         * tree-check.c: New. Tree/CFG checking pass.
6695         * tree-match.c: New. Library for tree pattern matching.
6696         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
6697         * toplev.c, flags.h: Add globals for tree-check pass.
6698         * Makefile.in: Integrate the files in tree-check pass.
6699         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
6700         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
6701         Introduce a "lazy" pretty-print mode.
6702         * tree.c, tree.h: Add tree_name.
6703
6704 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
6705
6706         * doc/invoke.texi (-fgraphite): Correct typo.
6707         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
6708         use of print_loop_ir.
6709         * testsuite/gcc.dg/graphite/scop-1.c: New.
6710         * testsuite/gcc.dg/graphite/scop-2.c: New.
6711         * testsuite/gcc.dg/graphite/graphite.exp: New.
6712         * graphite.c: Include domwalk.h.
6713         (print_scop): Print only the entry and exit blocks.
6714         (debug_scop): No longer static.
6715         (affine_expr): Fix formating.  Return also true when the expression is
6716         constant.
6717         (stmt_simple_for_scop_p): Fix formating.
6718         (build_scops): Use domwalk.
6719         (get_loop_start, end_scop, test_for_scop_bound): New.
6720         (graphite_transform_loops): Avoid printing on stderr.
6721         * graphite.h (debug_scop): Declared.
6722         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
6723         * Makefile.in (graphite.o): Depend on domwalk.h.
6724         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
6725         declarations for static functions.
6726         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
6727         controlling output verbosity.
6728
6729 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
6730             Plesco Alexandru  <shurikx@gmail.com>
6731
6732         * doc/invoke.texi (-fgraphite): Document.
6733         * tree-pass.h (pass_graphite_transforms): Declared.
6734         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
6735         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
6736         (pass_graphite_transforms): Defined.
6737         * tree-data-ref.c (free_data_ref, data_reference): Extern.
6738         * tree-data-ref.h (free_data_ref, data_reference): Declared.
6739         * graphite.c, graphite.h: New.
6740         * common.opt (fgraphite): Declared.
6741         * tree-flow.h (graphite_transform_loops): Declared.
6742         * Makefile.in (OBJS-common): Add graphite.o.
6743         (graphite.o): New rule.
6744         * passes.c (pass_graphite_transforms): Scheduled.
6745