OSDN Git Service

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