OSDN Git Service

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