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