PR tree-optimization/48377
[official-gcc.git] / gcc / ChangeLog.graphite
blobc3fd0094f582d3f2e2f99a953bcf05295c79d2dc
1 2011-01-20  Sebastian Pop  <sebastian.pop@amd.com>
3         * graphite-sese-to-poly.c (dr_indices_valid_in_loop): New.
4         (close_phi_written_to_memory): Call for_each_index with
5         dr_indices_valid_in_loop.
7         * gfortran.dg/graphite/id-24.f: New.
8         * gfortran.dg/graphite/id-25.f: New.
10 2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>
12         * graphite-sese-to-poly.c (new_pbb_from_pbb): Only copy PBB_DOMAIN
13         when it is initialized.
15         * gfortran.dg/graphite/id-23.f: New.
17 2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>
19         * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Update
20         call to graphite_find_data_references_in_stmt.
21         * graphite-sese-to-poly.c (outermost_loop_in_sese_1): New.
22         (try_generate_gimple_bb): Call outermost_loop_in_sese_1.  Update
23         call to graphite_find_data_references_in_stmt.
24         (analyze_drs_in_stmts): Same.
25         * tree-data-ref.c (dr_analyze_indices): Pass in parameter the loop
26         in which the scalar analysis of indices is performed.
27         (create_data_ref): Same.  Update call to dr_analyze_indices.
28         (find_data_references_in_stmt): Update call to create_data_ref.
29         (graphite_find_data_references_in_stmt): Same.
30         * tree-data-ref.h (graphite_find_data_references_in_stmt): Update
31         declaration.
32         (create_data_ref): Same.
33         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Update
34         call to create_data_ref.
36 2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>
38         * graphite-sese-to-poly.c (build_poly_scop): Move
39         rewrite_commutative_reductions_out_of_ssa before
40         find_scop_parameters.
42 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
44         PR tree-optimization/46970
45         * gcc.dg/graphite/pr46970.c: New.
47 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
49         PR tree-optimization/46215
50         * gcc.dg/graphite/pr46215.c: New.
52 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
54         PR tree-optimization/46168
55         * gcc.dg/graphite/pr46168.c: New.
57 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
59         PR tree-optimization/43657
60         * gcc.dg/graphite/pr43657.c: New.
62 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
64         PR tree-optimization/29832
65         * gfortran.dg/graphite/pr29832.f90: New.
67 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
69         PR tree-optimization/43567
70         * gcc.dg/graphite/pr43567.c: New.
72 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
74         PR tree-optimization/43567
75         * gcc.dg/graphite/pr43567.c: New.
77 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
79         * Makefile.in (LAMBDA_H): Removed.
80         (TREE_DATA_REF_H): Remove dependence on LAMBDA_H.
81         (OBJS-common): Remove dependence on lambda-code.o, lambda-mat.o,
82         lambda-trans.o, and tree-loop-linear.o.
83         (lto-symtab.o): Remove dependence on LAMBDA_H.
84         (tree-loop-linear.o): Remove rule.
85         (lambda-mat.o): Same.
86         (lambda-trans.o): Same.
87         (lambda-code.o): Same.
88         (tree-vect-loop.o): Add missing dependence on TREE_DATA_REF_H.
89         (tree-vect-slp.o): Same.
90         * hwint.h (gcd): Moved here.
91         (least_common_multiple): Same.
92         * lambda-code.c: Removed.
93         * lambda-mat.c: Removed.
94         * lambda-trans.c: Removed.
95         * lambda.h: Removed.
96         * tree-loop-linear.c: Removed.
97         * lto-symtab.c: Do not include lambda.h.
98         * omega.c (gcd): Removed.
99         * passes.c (init_optimization_passes): Remove pass_linear_transform.
100         * tree-data-ref.c (print_lambda_vector): Moved here.
101         (lambda_vector_copy): Same.
102         (lambda_matrix_copy): Same.
103         (lambda_matrix_id): Same.
104         (lambda_vector_first_nz): Same.
105         (lambda_matrix_row_add): Same.
106         (lambda_matrix_row_exchange): Same.
107         (lambda_vector_mult_const): Same.
108         (lambda_vector_negate): Same.
109         (lambda_matrix_row_negate): Same.
110         (lambda_vector_equal): Same.
111         (lambda_matrix_right_hermite): Same.
112         * tree-data-ref.h: Do not include lambda.h.
113         (lambda_vector): Moved here.
114         (lambda_matrix): Same.
115         (dependence_level): Same.
116         (lambda_transform_legal_p): Removed declaration.
117         (lambda_collect_parameters): Same.
118         (lambda_compute_access_matrices): Same.
119         (lambda_vector_gcd): Same.
120         (lambda_vector_new): Same.
121         (lambda_vector_clear): Same.
122         (lambda_vector_lexico_pos): Same.
123         (lambda_vector_zerop): Same.
124         (lambda_matrix_new): Same.
125         * tree-flow.h (least_common_multiple): Removed declaration.
126         * tree-parloops.c (lambda_trans_matrix): Moved here.
127         (LTM_MATRIX): Same.
128         (LTM_ROWSIZE): Same.
129         (LTM_COLSIZE): Same.
130         (LTM_DENOMINATOR): Same.
131         (lambda_trans_matrix_new): Same.
132         (lambda_matrix_vector_mult): Same.
133         (lambda_transform_legal_p): Same.
134         * tree-pass.h (pass_linear_transform): Removed declaration.
135         * tree-ssa-loop.c (tree_linear_transform): Removed.
136         (gate_tree_linear_transform): Removed.
137         (pass_linear_transform): Removed.
138         (gate_graphite_transforms): Make flag_tree_loop_linear an alias of
139         flag_loop_interchange.
141         * gfortran.dg/graphite/interchange-4.f: New.
142         * gfortran.dg/graphite/interchange-5.f: New.
144         * gcc.dg/tree-ssa/ltrans-1.c: Removed.
145         * gcc.dg/tree-ssa/ltrans-2.c: Removed.
146         * gcc.dg/tree-ssa/ltrans-3.c: Removed.
147         * gcc.dg/tree-ssa/ltrans-4.c: Removed.
148         * gcc.dg/tree-ssa/ltrans-5.c: Removed.
149         * gcc.dg/tree-ssa/ltrans-6.c: Removed.
150         * gcc.dg/tree-ssa/ltrans-8.c: Removed.
151         * gfortran.dg/ltrans-7.f90: Removed.
152         * gcc.dg/tree-ssa/data-dep-1.c: Removed.
154         * gcc.dg/pr18792.c: -> gcc.dg/graphite/pr18792.c
155         * gcc.dg/pr19910.c: -> gcc.dg/graphite/pr19910.c
156         * gcc.dg/tree-ssa/20041110-1.c: -> gcc.dg/graphite/pr20041110-1.c
157         * gcc.dg/tree-ssa/pr20256.c: -> gcc.dg/graphite/pr20256.c
158         * gcc.dg/pr23625.c: -> gcc.dg/graphite/pr23625.c
159         * gcc.dg/tree-ssa/pr23820.c: -> gcc.dg/graphite/pr23820.c
160         * gcc.dg/tree-ssa/pr24309.c: -> gcc.dg/graphite/pr24309.c
161         * gcc.dg/tree-ssa/pr26435.c: -> gcc.dg/graphite/pr26435.c
162         * gcc.dg/pr29330.c: -> gcc.dg/graphite/pr29330.c
163         * gcc.dg/pr29581-1.c: -> gcc.dg/graphite/pr29581-1.c
164         * gcc.dg/pr29581-2.c: -> gcc.dg/graphite/pr29581-2.c
165         * gcc.dg/pr29581-3.c: -> gcc.dg/graphite/pr29581-3.c
166         * gcc.dg/pr29581-4.c: -> gcc.dg/graphite/pr29581-4.c
167         * gcc.dg/tree-ssa/loop-27.c: -> gcc.dg/graphite/pr30565.c
168         * gcc.dg/tree-ssa/pr31183.c: -> gcc.dg/graphite/pr31183.c
169         * gcc.dg/tree-ssa/pr33576.c: -> gcc.dg/graphite/pr33576.c
170         * gcc.dg/tree-ssa/pr33766.c: -> gcc.dg/graphite/pr33766.c
171         * gcc.dg/pr34016.c: -> gcc.dg/graphite/pr34016.c
172         * gcc.dg/tree-ssa/pr34017.c: -> gcc.dg/graphite/pr34017.c
173         * gcc.dg/tree-ssa/pr34123.c: -> gcc.dg/graphite/pr34123.c
174         * gcc.dg/tree-ssa/pr36287.c: -> gcc.dg/graphite/pr36287.c
175         * gcc.dg/tree-ssa/pr37686.c: -> gcc.dg/graphite/pr37686.c
176         * gcc.dg/pr42917.c: -> gcc.dg/graphite/pr42917.c
177         * gcc.dg/tree-ssa/data-dep-1.c
178         * gfortran.dg/loop_nest_1.f90: -> gfortran.dg/graphite/pr29290.f90
179         * gfortran.dg/pr29581.f90: -> gfortran.dg/graphite/pr29581.f90
180         * gfortran.dg/pr36286.f90: -> gfortran.dg/graphite/pr36286.f90
181         * gfortran.dg/pr36922.f: -> gfortran.dg/graphite/pr36922.f
182         * gfortran.dg/pr39516.f: -> gfortran.dg/graphite/pr39516.f
184 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
186         * graphite-sese-to-poly.c (close_phi_written_to_memory): Also allow
187         VAR_DECL, PARM_DECL, and RESULT_DECL.
189         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
191 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
193         * graphite-dependences.c (reduction_dr_1): Allow several reductions
194         in a reduction PBB.
195         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split PBBs
196         that have already been marked as PBB_IS_REDUCTION.
198 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
200         * graphite-scop-detection.c (same_close_phi_node): New.
201         (remove_duplicate_close_phi): New.
202         (make_close_phi_nodes_unique): New.
203         (canonicalize_loop_closed_ssa): Call make_close_phi_nodes_unique.
205 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
207         * graphite-dependences.c (new_poly_ddr): Call same_pdr_p.
208         * graphite-poly.h (same_pdr_p): Do not expect that the PDR_TYPE
209         of both data references to be the same.
211 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
213         * graphite-dependences.c (build_lexicographical_constraint): Remove the
214         gdim parameter.
215         (build_lexicographical_constraint): Adjust call to ppl_powerset_is_empty.
216         (dependence_polyhedron): Same.
217         (graphite_legal_transform_dr): Same.
218         (graphite_carried_dependence_level_k): Same.
219         * graphite-ppl.c (ppl_powerset_is_empty): Remove the nb_params parameter.
220         * graphite-ppl.h (ppl_powerset_is_empty): Adjust declaration.
222 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
224         * graphite-sese-to-poly.c
225         (translate_scalar_reduction_to_array_for_stmt): Call unshare_expr.
226         (close_phi_written_to_memory): New.
227         (translate_scalar_reduction_to_array): Call close_phi_written_to_memory
228         and unshare_expr.
230         * gcc.dg/graphite/block-0.c: Un-XFAILed.
231         * gcc.dg/graphite/block-1.c: Un-XFAILed.
232         * gcc.dg/graphite/block-7.c: Un-XFAILed.
233         * gcc.dg/graphite/block-8.c: Un-XFAILed.
234         * gcc.dg/graphite/interchange-12.c: Un-XFAILed.
235         * gcc.dg/graphite/interchange-14.c: Un-XFAILed.
236         * gcc.dg/graphite/interchange-15.c: Un-XFAILed.
237         * gcc.dg/graphite/interchange-8.c: Un-XFAILed.
238         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
240 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
242         * doc/install.texi: Update the expected version number of PPL to 0.11.
243         * graphite-ppl.c (ppl_powerset_is_empty): Remove now dead code under
244         #if PPL_VERSION_MINOR < 11.
246 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
248         * graphite-dependences.c (new_poly_ddr): Inlined into
249         dependence_polyhedron.
250         (free_poly_ddr): Moved close by new_poly_ddr.
251         (dependence_polyhedron_1): Renamed dependence_polyhedron.
252         Early return NULL when ppl_powerset_is_empty returns true.
253         (dependence_polyhedron): Renamed new_poly_ddr.  Call only once
254         poly_drs_may_alias_p.  Avoid one call to ppl_powerset_is_empty.
255         (graphite_legal_transform_dr): Call new_poly_ddr.
256         (graphite_carried_dependence_level_k): Same.
257         (dot_original_deps_stmt_1): Renamed dot_deps_stmt_2.  Use new_poly_ddr.
258         (dot_transformed_deps_stmt_1): Removed.
259         (dot_deps_stmt_1): Call dot_deps_stmt_2.
260         (dot_original_deps): Renamed dot_deps_2.  Call new_poly_ddr.
261         (dot_deps_1): Call dot_deps_2.
263 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
265         * graphite-dependences.c (new_poly_dr): Call ppl_powerset_is_empty.
266         (build_lexicographical_constraint): Same.
267         (dependence_polyhedron_1): Same.
268         (graphite_legal_transform_dr): Same.
269         (graphite_carried_dependence_level_k): Same.
270         * graphite-ppl.c (ppl_powerset_is_empty): New.
271         * graphite-ppl.h (ppl_powerset_is_empty): Declared.
272         * tree-data-ref.c (dump_data_reference): Print the basic block index.
274         * gcc.dg/graphite/block-0.c: Add documentation.
275         * gcc.dg/graphite/block-4.c: Same.
276         * gcc.dg/graphite/block-7.c: Same.
277         * gcc.dg/graphite/block-8.c: New.
278         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
279         * gcc.dg/graphite/interchange-11.c: Un-XFAILed.
280         * gcc.dg/graphite/interchange-12.c: Add documentation.
281         * gcc.dg/graphite/interchange-13.c: New.
282         * gcc.dg/graphite/interchange-14.c: New.
283         * gcc.dg/graphite/interchange-15.c: New.
284         * gcc.dg/graphite/interchange-8.c: Add documentation.
285         * gcc.dg/graphite/interchange-mvt.c: Same.
287 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
289         * graphite-dependences.c (build_pairwise_scheduling): Correctly compute
290         the "a followed by b" relation and document it.
292 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
294         * graphite-dependences.c (build_lexicographical_constraint): Stop the
295         iteration when the bag of constraints is empty.
297 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
299         * graphite-poly.c (pbb_remove_duplicate_pdrs): Make it work.
301 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
303         * graphite-interchange.c (lst_interchange_profitable_p): Takes a loop
304         nest and two loop depths as parameters.
305         (lst_try_interchange_loops): Call lst_interchange_profitable_p after
306         lst_perfect_nestify.
308 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
310         * graphite-dependences.c (print_pddr): Call
311         ppl_io_fprint_Pointset_Powerset_C_Polyhedron.
313 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
315         * graphite-ppl.c (debug_gmp_value): New.
316         * graphite-ppl.h (debug_gmp_value): Declared.
318 2011-01-13  Tobias Grosser  <grosser@fim.uni-passau.de>
320         * doc/install.texi: Document availability of cloog-0.16
322 2011-01-05  Vladimir Kargov  <kargov@gmail.com>
324         * graphite-scop-detection.c (is_valid_stmt_p): Pass the entry basic
325         block instead of region start to the instantiation.
326         (is_valid_bb_p): Add support for basic blocks with conditional
327         statements.
328         (find_scops_new): Recalculate dominance info before SCOP
329         detection.
331 2011-01-05  Vladimir Kargov  <kargov@gmail.com>
333         * graphite-scop-detection.c (get_outermost_loop_in_region): New.
334         (is_valid_loop_p): Correct loop passed to stmt_has_simple_data_refs_p
336 2011-01-05  Vladimir Kargov  <kargov@gmail.com>
338         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Free
339         invalid postdominance info
341 2010-12-29  Sebastian Pop  <sebastian.pop@amd.com>
343         * Makefile.in (graphite-opencl-codegen.o): Update dependences.
344         (graphite-opencl-meta-clast.o): Same.
345         (graphite-opencl.o): Same.
346         (refined-regions.o): Same.
347         * graphite-opencl-codegen.c: Do not include unnecessary .h files.
348         * graphite-opencl-meta-clast.c: Same.
349         * graphite-opencl.c: Same.
350         * refined-regions.c: Same.
352 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
354         * graphite-opencl-codegen.c: Use FOR_EACH_VEC_ELT.
355         * graphite-opencl-meta-clast.c: Same.
356         * graphite-opencl.c: Same.
358 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
360         * graphite-opencl-codegen.c: Do not include sys/time.h.
361         * graphite-opencl.c: Same.
363 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
365         * graphite-opencl.c (h_context, h_cmd_queue, h_program): Moved
366         out of ifdef HAVE_cloog section.
368 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
370         * Makefile.in (graphite-opencl.o): Depends on
371         graphite-opencl-functions.def.
372         * graphite-opencl-functions.def: New.
373         * graphite-opencl.c (enum OPENCL_FUNCTIONS): Read data from
374         graphite-opencl-functions.def.
375         (opencl_function_names): Same.
376         (opencl_create_function_decl): Use the enum OPENCL_FUNCTIONS
377         as indices of opencl_function_names.
379 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
381         * graphite-opencl-codegen.c: Fix formatting.
382         * graphite-opencl-meta-clast.c: Same.
383         * graphite-opencl.c: Same.
385 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
387         * graphite-opencl-codegen.c: Fix formating problems.
388         * graphite-opencl-meta-clast.c: Same.
389         * graphite-opencl.c: Same.
390         * graphite-opencl.h: Same.
392 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
394         * graphite-opencl-codegen.c: Sort topologically static functions.
395         * graphite-opencl.c: Same.
397 2010-12-25  Sebastian Pop  <sebastian.pop@amd.com>
399         * graphite-cloog-compat.h (cloog_names_nb_scattering): New.
400         (cloog_names_scattering): New.
401         * graphite-opencl-codegen.c (opencl_constant_expression_p): Use
402         clast_expr_* instead of expr_*.  Call clast_name_to_str.
403         (opencl_clast_name_to_tree): Now takes a clast_name_p in parameter.
404         (opencl_get_scat_real_name): Same.  Call clast_name_to_str.
405         (opencl_add_scat_as_arg): Same.
406         (opencl_print_local_vars): Call cloog_names_scattering and
407         cloog_names_nb_scattering.
408         (opencl_print_for): Do not call value_*.
409         (opencl_print_term): Same.
410         (opencl_print_expr): Use clast_expr_* instead of expr_*.
411         (opencl_print_sum): Same.
412         (opencl_print_binary): Same.
414 2010-12-25  Alexey Kravets  <kayrick@ispras.ru>
416         * Makefile.in (OBJS-common): Add graphite-opencl-codegen.o,
417         graphite-opencl-meta-clast.o and graphite-opencl.o.
418         (graphite-opencl-codegen.o): New.
419         (graphite-opencl-meta-clast.o): New.
420         (graphite-opencl.o): New.
421         (GTFILES): Add graphite-opencl.c.
422         * common.opt (fgraphite-opencl): New.
423         (fgraphite-opencl-cpu): New.
424         (fgraphite-opencl-ignore-depth-heuristic): New.
425         (fgraphite-opencl-ignore-mem-heuristic): New.
426         (fgraphite-opencl-ignore-dep): New.
427         (fgraphite-opencl-ignore-types): New.
428         (fgraphite-opencl-depth-base): New.
429         (fgraphite-opencl-debug): New.
430         * graphite-opencl-codegen.c: New file.
431         * graphite-opencl-meta-clast.c: New file.
432         * graphite-opencl.c: New file.
433         * graphite-opencl.h: New file.
434         * graphite.c (graphite_transform_loops): Call graphite_opencl_init and
435         graphite_opencl_finalize.
436         * tree-ssa-loop.c (gate_graphite_transforms): Handle
437         flag_graphite_opencl.
438         * graphite-clast-to-gimple.c (gloog): Call opencl_transform_clast.
439         * dbgcnt.def (opencl_scop_cnt): New counter.
441 2010-12-25  Alexander Monakov  <amonakov@ispras.ru>
443         * graphite-dependences.c (graphite_outer_subscript_bound): New.
444         (graphite_carried_dependence_level_k): Export.
445         * graphite-dependences.h (graphite_outer_subscript_bound): Declare.
446         (graphite_carried_dependence_level_k): Ditto.
448 2010-12-25  Alexey Kravets  <kayrick@ispras.ru>
450         * graphite-clast-to-gimple.c (struct clast_name_index): Move
451         definition to graphite-clast-to-gimple.h.
452         (clast_name_to_index): Ditto.
453         (clast_name_index_elt_info): Ditto.
454         (eq_clast_name_indexes): Ditto.
455         (save_clast_name_index): Export.
456         (clast_name_to_gcc): Ditto.
457         (clast_to_gcc_expression): Ditto.
458         (gcc_type_for_clast_expr): Ditto.
459         (graphite_create_new_guard): Ditto.
460         (gcc_type_for_iv_of_clast_loop): Ditto.
461         (graphite_create_new_loop): Ditto.
462         (build_iv_mapping): Ditto.
463         (graphite_create_new_loop_guard): Ditto.
464         (debug_clast_name_index): New.
465         (debug_clast_name_indices): New debug function.
467 2010-12-21  Sebastian Pop  <sebastian.pop@amd.com>
469         PR tree-optimization/47021
470         * graphite-sese-to-poly.c (scan_tree_for_params): Handle ADDR_EXPR.
472 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
474         * graphite-sese-to-poly.c (analyze_drs_in_stmts): Fix set but
475         unused warning.
476         (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
478 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
480         * graphite-sese-to-poly.c (analyze_drs): Removed.
481         (build_scop_drs): Do not call analyze_drs.
482         (analyze_drs_in_stmts): New.
483         (insert_stmts): New.
484         (insert_out_of_ssa_copy): Call analyze_drs_in_stmts.
485         (insert_out_of_ssa_copy_on_edge): Same.
486         (rewrite_close_phi_out_of_ssa): Call insert_stmts.
487         (rewrite_phi_out_of_ssa): Same.
488         (rewrite_cross_bb_scalar_dependence): Same.
489         (split_reduction_stmt): Move data references in the new basic blocks.
490         (translate_scalar_reduction_to_array_for_stmt): Call insert_stmts.
492 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
494         * sese.c (rename_uses): Do not handle ADDR_EXPR in LHS of assignments.
496 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
498         PR middle-end/45297
499         * graphite-poly.c (new_poly_bb): Returns a poly_bb_p.  Do not take
500         the reduction bool in parameter.  Clear PBB_IS_REDUCTION.  Set GBB_PBB.
501         * graphite-poly.h (new_poly_bb): Update declaration.
502         (gbb_from_bb): Moved here...
503         (pbb_from_bb): New.
504         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
505         Removed.
506         (graphite_stmt_p): Removed.
507         (try_generate_gimple_bb): Returns a gimple_bb_p.  Do not pass in
508         sbitmap reductions.  Always build a gimple_bb_p.  Do not call
509         new_poly_bb.
510         (build_scop_bbs_1): Do not pass in sbitmap reductions.
511         (build_scop_bbs): Same.
512         (gbb_from_bb): ... from here.
513         (add_conditions_to_constraints): Moved up.
514         (analyze_drs): New.
515         (build_scop_drs): Call analyze_drs.  Remove all the PBBs that do
516         not contain data references.
517         (new_pbb_from_pbb): New.
518         (insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
519         block is split.
520         (rewrite_close_phi_out_of_ssa): Update call to
521         insert_out_of_ssa_copy_on_edge.
522         (rewrite_reductions_out_of_ssa): Now static.
523         (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
524         (split_pbb): New.
525         (split_reduction_stmt): Call split_pbb.
526         (translate_scalar_reduction_to_array): Pass in the scop, do not
527         pass in the sbitmap reductions.
528         (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
529         (rewrite_commutative_reductions_out_of_ssa_loop): Same.
530         (rewrite_commutative_reductions_out_of_ssa): Same.
531         (build_poly_scop): Call build_scop_bbs,
532         rewrite_commutative_reductions_out_of_ssa,
533         rewrite_reductions_out_of_ssa, and
534         rewrite_cross_bb_scalar_deps_out_of_ssa.  Move build_scop_drs
535         before scop_to_lst.
536         * graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
537         Removed declaration.
538         (rewrite_reductions_out_of_ssa): Same.
539         (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
540         (build_scop_bbs): Same.
541         * graphite.c (graphite_transform_loops): Do not initialize reductions.
542         Do not call build_scop_bbs,
543         rewrite_commutative_reductions_out_of_ssa,
544         rewrite_reductions_out_of_ssa, and
545         rewrite_cross_bb_scalar_deps_out_of_ssa.
546         * sese.h (struct gimple_bb): Add field pbb.
547         (GBB_PBB): New.
549         * gcc.dg/graphite/pr45297.c: New.
551 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
553         * graphite-sese-to-poly.c (handle_scalar_deps_crossing_scop_limits):
554         New.
555         (rewrite_cross_bb_scalar_deps): Pass in the scop.  Call
556         handle_scalar_deps_crossing_scop_limits.
557         (rewrite_cross_bb_scalar_deps_out_of_ssa): Create an empty BB
558         after the scop.  Update call to rewrite_cross_bb_scalar_deps.
560 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
562         * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
563         when replacing a constant in an ADDR_EXPR.
565 2010-10-20  Sebastian Pop  <sebastian.pop@amd.com>
567         * graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
568         for the stride.
569         (lst_do_strip_mine): Same.
570         (scop_do_strip_mine): Same.
571         * graphite-poly.c (apply_poly_transforms): Update call to
572         scop_do_strip_mine.
573         * graphite-poly.h (scop_do_strip_mine): Update declaration.
575 2010-09-24  Sebastian Pop  <sebastian.pop@amd.com>
577         PR middle-end/45758
578         * graphite.c (graphite_initialize): Call scev_reset.
580 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
582         * sese.h (scev_analyzable_p): Return false for real or floating
583         point.  Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
585 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
587         PR middle-end/45758
588         * gfortran.dg/graphite/pr45758.f90: New.
590 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
592         * graphite-scop-detection.c (is_scop_p): Free bblist.
594 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
596         * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
597         and ps.
598         * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
599         domain.
600         * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
601         Do not allocate ub_expr, it is passed in initialized.
603 2010-09-21  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
605         * common.opt (fgraphite-dump-cloog): New flag.
606         * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
607         * graphite-clast-to-gimple.c (init_cloog_input_file): New.
608         (build_cloog_prog): Dump CLooG input file when
609         flag_graphite_dump_cloog is set.
610         * graphite-cloog-compat.h (cloog_program_dump_cloog): New.
612 2010-09-20  Sebastian Pop  <sebastian.pop@amd.com>
614         Revert previous patch "New flag: -fgraphite-dump-cloog."
616 2010-09-20  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
618         * common.opt (fgraphite-dump-cloog): New flag.
619         * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
620         * graphite-clast-to-gimple.c (init_cloog_input_file): New.
621         (build_cloog_prog): Dump CLooG input file when
622         flag_graphite_dump_cloog is set.
624 2010-09-20  Sebastian Pop  <sebastian.pop@amd.com>
626         * graphite-clast-to-gimple.c (graphite_verify): Remove call to
627         verify_dominators for CDI_POST_DOMINATORS.
628         * sese.h: Remove comment about CDI_POST_DOMINATORS.
629         (recompute_all_dominators): Remove call to free_dominance_info
630         for CDI_POST_DOMINATORS.  Remove call to calculate_dominance_info
631         for CDI_POST_DOMINATORS.
633 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
635         * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
636         over pbb_dim_iter_domain.
638 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
640         * graphite-flattening.c: Fix comments.
642 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
644         * Makefile.in (OBJS-common): Add graphite-flattening.o.
645         (graphite-flattening.o): New rule.
646         * common.opt (floop-flatten): New flag.
647         * doc/invoke.texi (-floop-flatten): Documented.
648         * graphite-flattening.c: New.
649         * graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
650         * graphite-poly.h (flatten_all_loops): Declared.
651         (lst_remove_loop_and_inline_stmts_in_loop_father): New.
652         * tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
653         is set, also set flag_graphite.
655 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
657         * graphite-poly.c (cloog_checksum): New.
658         * graphite-poly.h (cloog_checksum): Declared.
660 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
662         * graphite-poly.c (pbb_number_of_iterations): Removed.
663         (pbb_number_of_iterations_at_time): Correctly compute the number
664         of iterations in the transformed loop.
665         * graphite-poly.h (pbb_number_of_iterations): Removed.
667 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
669         * graphite-poly.h (lst_update_scattering_seq): Removed.
670         (lst_update_scattering): Correctly handle outermost loop dewey
671         renumbering.
673 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
675         * graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
676         lst_strip_mine_profitable_p.  Call lst_niter_for_loop.
677         * graphite-poly.h (lst_niter_for_loop): New.
679 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
681         * graphite-poly.c (apply_poly_transforms): Do not abort when the
682         transform read from disk is not legal.  Call fatal_error instead.
684 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
686         * graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
687         (print_scop_header): Removed.  Inlined in the only call place...
688         (print_scop): ... here.
690 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
692         * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
694 2010-09-02  Vladimir Kargov  <kargov@gmail.com>
696         * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
697         (is_valid_stmt_p): Add data reference and operation-specific checks.
698         (is_valid_bb_p): Change structure, add loop validity check.
699         (is_scop_p): Move the TODO list
700         (find_scops_new): New.
701         (build_scops_new): Move part of functionality to find_scops_new and
702         build_scops.  Add necessary steps for successful SCoP construction.
703         (build_scops): Compute SCoP sets for both detection algorithms, choose
704         the resulting one depending on static condition.
706 2010-08-24  Sebastian Pop  <sebastian.pop@amd.com>
708         * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
710 2010-08-24  Sebastian Pop  <sebastian.pop@amd.com>
712         * graphite-dependences.c (dot_deps): Avoid set but not used warning.
713         (dot_deps_stmt): Same.
714         * graphite-poly.c (dot_lst): Same.
716 2010-08-23  Sebastian Pop  <sebastian.pop@amd.com>
718         * graphite-blocking.c (scop_do_strip_mine): Do not call
719         graphite_legal_transform.
720         (scop_do_block): Same.
722 2010-08-20  Vladimir Kargov  <kargov@gmail.com>
724         * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
725         description.
727 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
729         PR middle-end/45230
730         * gcc.dg/graphite/id-pr45230.c: New.
732 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
734         * tree-scalar-evolution.c (instantiate_array_ref): New.
735         (instantiate_scev_r): Also handle ARRAY_REFs.
737 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
739         * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
740         Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
741         RESULT_DECL, and FIELD_DECL.  Return false for an
742         SSA_NAME_IS_DEFAULT_DEF.
743         (compute_scalar_evolution_in_loop): Do not further analyze the
744         scalar evolution when no_evolution_in_loop_p returns true.
746 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
748         * tree-chrec.h (evolution_function_is_affine_p): Do not check
749         whether CHREC_LEFT is invariant.  A function is affine when
750         CHREC_RIGHT is invariant.
752 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
754         * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
755         is_gimple_reg.
756         (rewrite_degenerate_phi): Same.
757         (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
759 2010-08-18  Vladimir Kargov  <kargov@gmail.com>
761         * graphite-scop-detection.c (graphite_can_represent_scev,
762         graphite_can_represent_expr, stmt_has_simple_data_refs_p,
763         graphite_can_represent_loop): Remove outermost_loop.
765 2010-08-17  Sebastian Pop  <sebastian.pop@amd.com>
767         PR middle-end/45229
768         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
769         handle GIMPLE_CALLs with no LHS.
771 2010-08-17  Riyadh Baghdadi  <baghdadi.mr@gmail.com>
772             Sebastian Pop  <sebastian.pop@amd.com>
774         * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
775         Call remove-build-file to clean up the generated *.graphite files.
777 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
779         * doc/invoke.texi (debugging options): Update documentation.
780         (-floop-interchange): Same.
781         (-flopp-strip-mine): Same.
782         (-floop-block): Same.
783         (-fgraphite-read): Add documentation.
784         (-fgraphite-write): Same.
786 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
788         * toplev.c (process_options): Disable graphite loop optimization
789         options when -fgraphite-read flag is used.
791 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
793         * graphite-poly.c (init_graphite_out_file): New.
794         (init_graphite_in_file): New.
795         (apply_poly_transforms): Updated to enable reading and writing of
796         multiple scop files.
797         * toplev.c (init_asm_output): Remove graphite in/out file initialization.
799 2010-08-17  Tobias Grosser  <grosser@fim.uni-passau.de>
801         * graphite-scop-detection.c (graphite_can_represent_scev): Remove
802         redundant checks.
804 2010-08-12  Sebastian Pop  <sebastian.pop@amd.com>
806         * graphite-clast-to-gimple.c (precision_for_value): Adjust
807         computation of precision by 1.
809 2010-08-12  Riyadh Baghdadi <baghdadi.mr@gmail.com>
811         * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
812         (openscop_read_polyhedron_matrix): New.
813         * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
814         (openscop_read_N_int): Same.
815         * graphite-poly.c (openscop_read_N_int): New.
816         (openscop_read_one_int): New.
817         (openscop_read_N_string): New.
818         (openscop_read_one_string): New.
819         (openscop_read_powerset_matrix): New.
820         (graphite_read_transforms): Remove.
821         (graphite_read_scatt): New.
822         (graphite_read_scop_file): New.
823         (apply_poly_transforms): Updated to call graphite_read_scop_file.
825 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
827         * graphite-poly.c: Change include order.
829 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
831         * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
832         (cloog_matrix_nrows): New.
834 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
836         * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
837         from matrix lines.
838         * graphite-poly.c (openscop_print_scattering_function_1): Same.
839         (print_scattering_function_1): Same.
840         (openscop_print_pbb_domain): Same.
841         (openscop_print_scop_context): Same.
842         (print_scop_context): Same.
844 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
846         * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
847         (openscop_print_pdr_polyhedron): Print pph.
849 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
851         * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
852         * gfortran.dg/graphite/graphite.exp: Same.
853         * gcc.dg/graphite/vect-pr43423.c: New.
855 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
857         * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
858         priority signed types.
860 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
862         * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
863         to lang_hooks.types.type_for_size.  Call build_nonstandard_integer_type.
865 2010-07-29  Riyadh Baghdadi <baghdadi.mr@gmail.com>
867         * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
868         (openscop_print_polyhedron_matrix): New.
869         * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
870         * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
871         (openscop_print_pdr_powerset): New.
872         (openscop_print_powerset_matrix): New.
873         (openscop_print_scattering_function_1): New.
874         (print_scattering_function): Add support for scattering names and
875         OpenScop format.
876         (graphite_write_transforms): Remove.
877         (apply_poly_transforms): Updated to call print_scop.
878         (print_pdr_access_layout): Updated to support OpenScop format.
879         (print_pdr): Same.
880         (openscop_print_pbb_domain): New.
881         (print_pbb_body): Added a parameter to allow indicating that pbb_body is
882         not provided.
883         (print_pbb): Updated to call the new print_pbb_body.
884         (openscop_print_scop_context): New.
885         (print_scop_header): New.
886         (print_scop): Updated to call print_scop_header.
887         * graphite-poly.h: Document OpenScop format.
889 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
891         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
892         the case removed in the previous patch, when the only phi argument
893         is defined in the same loop as the phi node itself.  Handle it
894         separately from the invariant case by both propagating it outside
895         the region and replacing the phi node with an assign.
897 2010-07-28  Sebastian Pop  <sebastian.pop@amd.com>
899         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
900         constant phi nodes with one argument are is_gimple_min_invariant
901         and SSA_NAME_IS_DEFAULT_DEF.
903         * gfortran.dg/graphite/id-22.f: New.
905 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
907         * graphite.c (graphite_initialize): Do not initialize
908         CLooG and initialize the Parma Polyhedra Library
909         manually when using CLOOG_ORG.
910         (graphite_finalize): Do not finalize CLooG and finalize
911         the Parma Polyhedra Library manually when using CLOOG_ORG.
912         * graphite-cloog-compat.h (cloog_initialize): Hide function
913         when using CLOOG_ORG.
914         (cloog_finalize): Same.
916 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
918         * graphite-clast-to-gimple.c (free_scattering): Change
919         CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
920         (CLOOG_ORG).
921         (build_cloog_prog): Same.
922         * graphite-cloog-compat.h (cloog_domain): Removed.
923         (cloog_scattering): New.
924         (cloog_set_domain): Removed.
925         (cloog_set_scattering): New.
926         (cloog_next_domain): Removed.
927         (cloog_next_scattering): New.
928         (cloog_set_next_domain): Removed.
929         (cloog_set_next_scattering): New.
930         (CloogScatteringList): New.
931         (CloogScattering): New.
932         (cloog_scattering_free): New.
933         (new_Cloog_Scattering_from_ppl_Polyhedron): New.
934         * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
935         New.
937 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
939         * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
940         CloogState.
941         (set_cloog_options): Same.
942         (print_clast_stmt): Same.
943         (scop_to_clast): Same.
944         (print_generated_program): Same.
945         (gloog): Same.
946         * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
947         (scop_to_clast): Extend with CloogState.
948         * graphite-cloog-util.c: Include graphite-cloog-compat.h
949         (new_Cloog_Domain_from_ppl_Polyhedron):
950         Extend with CloogState.  Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
951         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
952         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
953         * graphite-cloog-util.h (build_cloog_prog): Same.
954         * graphite-cloog-copat.h (build_cloog_prog): New.
955         (CloogState): New.
956         (cloog_state_malloc): New.
957         (cloog_state_free): New.
958         (cloog_loop_malloc): New.
959         (cloog_options_malloc): New.
960         (cloog_statement_alloc): New.
961         (cloog_domain_from_cloog_matrix): New.
962         (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
963         (new_Cloog_Domain_from_ppl_Polyhedron): New.
965 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
967         * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
968         type of NAME now depends on used CLooG version.
969         (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
970         (gcc_type_for_clast_expr): Same.
971         (print_clast_stmt): Replace pprint with clast_pprint.
972         * graphite-cloog-compat.h: Provide compatibility macros for
973         CLooG Legacy.
974         (clast_name_p): New.
975         (clast_expr_term): New.
976         (clast_expr_red): New.
977         (clast_expr_bin): New.
978         (clast_pprint): New.
980 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
982         * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
983         compatible to newer CLooG releases (CLOOG_ORG).
984         (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
985         (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
986         * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
987         (build_cloog_prog) : New.
988         (cloog_program_extract_scalars): New.
989         (cloog_program_scatter): New.
991 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
993         * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
994         conditionally (CLOOG_ORG).
995         * graphite-cloog-compat.h: New.  Include graphite-cloog-compat.h.
996         (cloog_statement_usr): New.
997         (cloog_domain): Same.
998         (cloog_set_domain): Same.
999         (cloog_next_domain): Same.
1000         (cloog_set_next_domain): Same.
1001         (cloog_program_nb_scattdims): Same.
1002         (cloog_program_set_nb_scattdims): Same.
1003         (cloog_program_names): Same.
1004         (cloog_program_set_names): Same.
1005         (cloog_program_set_context): Same.
1006         (cloog_program_set_loop): Same.
1007         (cloog_program_blocklist): Same.
1008         (cloog_program_set_blocklist): Same.
1009         (cloog_program_scaldims): Same.
1010         (cloog_program_set_scaldims): Same.
1011         (cloog_names_nb_parameters): Same.
1012         (cloog_names_set_nb_parameters): Same.
1013         (cloog_names_parameters): Same.
1014         (cloog_names_set_parameters): Same.
1015         (cloog_names_set_nb_iterators): Same.
1016         (cloog_names_set_iterators): Same.
1017         (cloog_names_set_nb_scattering): Same.
1018         (cloog_names_set_scattering): Same.
1019         (cloog_statement_set_usr): Same.
1020         (cloog_loop_set_next): Same.
1021         (cloog_loop_set_domain): Same.
1022         (cloog_loop_set_block): Same.
1023         (cloog_block_list_next): Same.
1024         (cloog_block_list_set_next):
1025         (cloog_block_list_set_block): Same.
1027 2010-07-27  Sebastian Pop  <sebastian.pop@amd.com>
1029         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
1030         a bool.
1031         (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
1032         (rewrite_commutative_reductions_out_of_ssa_loop): Same.
1033         (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
1034         when something has been changed.
1035         (rewrite_commutative_reductions_out_of_ssa): Same.
1037         * gcc.dg/graphite/id-26.c: New.
1039 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
1041         * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
1042         handle the case when def is in the sese region.
1043         (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
1044         for invariant expressions.
1045         (rewrite_cross_bb_phi_deps): Removed.
1046         (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
1047         (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
1048         rewrite_cross_bb_phi_deps.
1050 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
1052         * graphite-sese-to-poly.c
1053         (rewrite_commutative_reductions_out_of_ssa_loop): Call
1054         scev_analyzable_p only on is_gimple_reg
1056         * gcc.dg/graphite/id-25.c: New.
1058 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
1060         * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
1061         (rewrite_close_phi_out_of_ssa): Propagate constant values or
1062         parametric expressions outside the scop region.
1063         (rewrite_cross_bb_scalar_deps): Same.
1064         * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
1066         * gcc.dg/graphite/run-id-5.c: New.
1067         * gcc.dg/graphite/run-id-6.c: New.
1068         * gfortran.dg/graphite/id-21.f: New.
1070 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
1072         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
1073         SSA_NAME_DEF_STMT only on SSA_NAMEs.
1075         * gcc.dg/graphite/id-24.c: New.
1077 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
1079         * tree-scalar-evolution.c (instantiate_scev_name): Do not
1080         instantiate default definitions.
1082 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
1084         * graphite-scop-detection.c (is_valid_stmt_p): New.
1085         (is_valid_bb_p): New.
1087 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
1088             Sebastian Pop  <sebastian.pop@amd.com>
1090         * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
1091         (loop_exits_from_bb_p): New.
1092         * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
1093         (loop_exits_from_bb_p): Declared.
1094         * graphite-scop-detection.c (scopdet_basic_block_info): Call
1095         loop_exits_to_bb_p.
1097 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
1099         * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
1100         tree-data-ref.h.
1101         (dot_regions_1): New.
1102         (dot_regions): New.
1103         * refined-regions.h (dot_regions): Declared.
1104         * Makefile.in (refined-regions.o): Update dependences.
1106 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
1108         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
1109         extra parameter for the region.  Call scev_analyzable_p.
1110         (rewrite_reductions_out_of_ssa): Update call to
1111         rewrite_close_phi_out_of_ssa.
1112         (rewrite_cross_bb_phi_deps): Same.
1113         (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
1114         parameter for the region.  Call scev_analyzable_p.
1115         (rewrite_commutative_reductions_out_of_ssa): Update call to
1116         rewrite_commutative_reductions_out_of_ssa_loop.
1118 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
1120         * gcc.dg/tree-ssa/pr20742.c: New.
1122 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1124         * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
1126         * gcc.dg/graphite/id-23.c: New.
1128 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1130         * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
1131         SSA scalar phi nodes that can be scev_analyzable_p.
1133         * gfortran.dg/graphite/id-20.f: Adjust testcase.
1135 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1137         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
1138         handle SSA_NAME_IS_DEFAULT_DEF.
1140 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1142         * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
1144         * gcc.dg/graphite/pr42729.c: New.
1146 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1148         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
1149         case non close-phi nodes with one argument.
1151 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1153         * sese.h (scev_analyzable_p): Scevs could be expressions without
1154         chrecs and still be scev_analyzable_p.
1156 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1158         * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
1160 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1162         * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
1163         * cfgloop.h (struct loop): Remove single_iv field.
1164         * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
1165         (scop_canonicalize_loops): Removed.
1166         (scop_ivs_can_be_represented): Do not use loop->single_iv.  Iterate
1167         over all the loop phi nodes in loop->header.
1168         (build_poly_scop): Remove use of scop_canonicalize_loops.
1170 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1172         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
1173         handle GIMPLE_CALL.
1175 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1177         * tree-chrec.c (chrec_apply): Should only apply to the specified
1178         variable.  Also handle multivariate chains of recurrences that
1179         satisfy evolution_function_is_affine_p.  Also handle CASE_CONVERT.
1181 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1183         * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
1184         (debug_clast_name_indexes_1): Removed.
1185         (debug_clast_name_indexes): Removed.
1186         (pbb_to_depth_to_oldiv): Removed.
1187         (build_iv_mapping): Replace the use of rename_map with iv_map.
1188         (translate_clast_user): Remove uses of rename_map.  Allocate and
1189         free iv_map.
1190         (translate_clast_for_loop): Remove uses of rename_map.
1191         (translate_clast_for): Same.
1192         (translate_clast_guard): Same.
1193         (translate_clast): Same.
1194         (gloog): Same.
1195         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
1196         * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
1197         * sese.c (set_rename): Now static.
1198         (rename_variables_in_stmt): Removed.
1199         (rename_uses): New.
1200         (is_parameter): Removed.
1201         (is_iv): Removed.
1202         (expand_scalar_variables_call): Removed.
1203         (expand_scalar_variables_ssa_name): Removed.
1204         (expand_scalar_variables_expr): Removed.
1205         (expand_scalar_variables_stmt): Removed.
1206         (expand_scalar_variables): Removed.
1207         (rename_variables): Removed.
1208         (remove_condition): Removed.
1209         (get_true_edge_from_guard_bb): Removed.
1210         (get_false_edge_from_guard_bb): Removed.
1211         (struct igp): Removed.
1212         (default_before_guard): Removed.
1213         (convert_for_phi_arg): Removed.
1214         (add_guard_exit_phis): Removed.
1215         (insert_guard_phis): Removed.
1216         (graphite_copy_stmts_from_block): Now also uses iv_map and a
1217         region.  Do not copy conditions.  Do not copy induction variables.
1218         Call rename_uses.
1219         (copy_bb_and_scalar_dependences): Allocate a local rename_map for
1220         the translated statement.  Use the iv_map for the induction
1221         variable renaming.
1222         * sese.h (copy_bb_and_scalar_dependences): Update declaration.
1223         (set_rename): Removed declaration.
1224         (scev_analyzable_p): ...here.
1225         * tree-chrec.c (chrec_apply_map): New.
1226         * tree-chrec.h (chrec_apply_map): Declared.
1228 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1230         * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
1231         insert_loop_close_phis.
1232         * sese.c (name_defined_in_loop_p): Removed.
1233         (expr_defined_in_loop_p): Removed.
1234         (alive_after_loop): Removed.
1235         (close_phi_not_yet_inserted_p): Removed.
1236         (struct alep): Removed.
1237         (add_loop_exit_phis): Removed.
1238         (insert_loop_close_phis): Removed.
1240 2010-07-15  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1242         * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
1243         condition.
1244         * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
1246 2010-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1248         * gfortran.dg/graphite/id-20.f: New.
1250 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1252         * graphite-cloog-util.h: Added cloog.h.
1253         * graphite-blocking.c: Removed cloog.h.
1254         * graphite-dependences.c: Same.
1255         * graphite-interchange.c: Same.
1256         * graphite-poly.c: Same.
1257         * graphite-ppl.c: Same.
1258         * graphite-scop-detection.c: Same.
1259         * graphite-sese-to-poly.c:
1260         Removed cloog.h.
1261         Removed graphite-clast-to-gimple.h.
1262         (check_poly_representation): Removed (unused).
1263         * graphite-sese-to-poly.h
1264         (check_poly_representation): Removed (unused).
1266 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1268         * Makefile.in
1269         (OBJS-common): Added graphite-cloog-util.o.
1270         (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
1271         (graphite-cloog-util.o): New.
1272         (graphite-ppl.o): Added graphite-cloog-util.h.
1273         * graphite-clast-to-gimple.c:
1274         Added graphite-cloog-util.h to include statements.
1275         * graphite-cloog-util.c: New.
1276         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
1277         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1278         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1279         (new_C_Polyhedron_from_Cloog_Matrix): Same.
1280         (ppl_Constrain_System_number_of_constraints): Same.
1281         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
1282         (oppose_constraint): Same.
1283         (cloog_matrix_to_ppl_constraint): Same.
1284         (new_Constraint_System_from_Cloog_Matrix): Same.
1285         (insert_constraint_into_matrix): Same. Declared static.
1286         * graphite-cloog-util.h: New.
1287         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
1288         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1289         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1290         (new_C_Polyhedron_from_Cloog_Matrix): Same.
1291         (insert_constraint_into_matrix): Same.
1292         * graphite-ppl.c:
1293         Added graphite-cloog-util.h to include statements.
1294         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
1295         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1296         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1297         (new_C_Polyhedron_from_Cloog_Matrix): Same.
1298         (insert_constraint_into_matrix): Same.
1299         (ppl_Constrain_System_number_of_constraints): Same.
1300         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
1301         (oppose_constraint): Same.
1302         (cloog_matrix_to_ppl_constraint): Same.
1303         (new_Constraint_System_from_Cloog_Matrix): Same.
1304         * graphite-ppl.h:
1305         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
1306         graphite-cloog-util.h.
1307         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1308         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1309         (new_C_Polyhedron_from_Cloog_Matrix): Same.
1310         (insert_constraint_into_matrix): Removed.
1312 2010-07-04  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1314         * graphite-clast-to-gimple.c
1315         (precision_for_value): Resolve value_* calls to matching mpz_* calls.
1316         (precision_for_interval): Same.
1317         (gcc_type_for_interval): Same.
1318         (compute_type_for_level): Same.
1319         * graphite-interchange.c
1320         (lst_interchange_profitable_p): Same.
1321         * graphite-poly.c
1322         (psct_scattering_dim_for_loop_depth): Same.
1323         * graphite-ppl.c
1324         (ppl_max_for_le_pointset): Same.
1325         (ppl_min_for_le_pointset): Same.
1327 2010-06-25  Vladimir Kargov  <kargov@gmail.com>
1329         * refined-regions.c (bb_index_compare): New.
1330         (get_bbs_in_region): New.
1331         (print_bbs_in_region): New.
1332         (print_refined_region): Add an argument that allows to print
1333         all basic blocks contained in regions.
1334         (debug_refined_region): Update call to print_refined_region.
1335         * refined-regions.h (print_refined_region): Update declaration.
1336         (get_bbs_in_region): Declared.
1337         * graphite-scop-detection.c (build_scops_new): Print the refined
1338         region tree into the Grahite dump file.
1340 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1342         * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
1343         (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
1345 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1347         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
1348         rewrite_close_phi_out_of_ssa.
1350         * gcc.dg/graphite/id-22.c: New.
1352 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1354         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
1356 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1358         * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
1359         rename_map.
1360         * sese.c (debug_rename_map): Same.
1361         (get_rename): Same.
1362         (set_rename): Same.
1363         (rename_variables_in_stmt): Same.
1364         (expand_scalar_variables_call): Same.
1365         (expand_scalar_variables_ssa_name): Same.
1366         (expand_scalar_variables_expr): Same.
1367         (expand_scalar_variables_stmt): Same.
1368         (expand_scalar_variables): Same.
1369         (rename_variables): Same.
1370         (graphite_copy_stmts_from_block): Same.
1371         (copy_bb_and_scalar_dependences): Same.
1373 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1375         * graphite-clast-to-gimple.c (copy_renames): Removed.
1376         (translate_clast_for): Do not call copy_renames.
1377         (translate_clast_guard): Same.
1379 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1381         * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
1382         (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
1383         (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
1384         before rewrite_cross_bb_scalar_deps.
1386 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1388         * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
1389         Early return in when flag_associative_math is not set.
1391 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1393         * gcc.dg/graphite/run-id-2.c: Call abort.
1395 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1397         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
1398         of SSA copies on edges except for loop->latch.
1400 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1402         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
1403         Split out of rewrite_reductions_out_of_ssa.
1404         * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
1405         Declared.
1406         * graphite.c (graphite_transform_loops): Call it.
1408 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1410         * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
1412 2010-06-15  Sebastian Pop  <sebastian.pop@amd.com>
1414         * passes.c (init_optimization_passes): Add pass_graphite.
1415         Schedule a pass_copy_prop before pass_graphite_transforms.
1416         * timevar.def (TV_GRAPHITE): Declared.
1417         * tree-pass.h (pass_graphite): Declared.
1418         * tree-ssa-loop.c (pass_graphite): New.
1420         * gcc.dg/graphite/id-20.c: New.
1422 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1424         * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
1425         Remove calls to rename_nb_iterations and rename_sese_parameters.
1426         * graphite-clast-to-gimple.h (gloog): Update declaration.
1427         * graphite.c (graphite_transform_loops): Update call to gloog.
1428         * sese.c (rename_variables_in_expr): Removed.
1429         (rename_nb_iterations): Removed.
1430         (rename_sese_parameters): Removed.
1431         * sese.h (rename_nb_iterations): Removed.
1432         (rename_sese_parameters): Removed.
1434 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1436         * graphite-clast-to-gimple.c (gloog): Remove call to
1437         sese_adjust_liveout_phis.
1438         * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
1439         SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
1440         (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
1441         rewrite_phi_out_of_ssa.
1442         * sese.c (get_vdef_before_sese): Removed.
1443         (sese_adjust_vphi): Removed.
1444         (sese_adjust_liveout_phis): Removed.
1445         * sese.h (sese_adjust_liveout_phis): Removed.
1447 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1449         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
1450         argument for the place after which to insert the out of SSA copy.
1451         (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
1452         (rewrite_phi_out_of_ssa): Same.
1453         (rewrite_cross_bb_scalar_deps): Same.
1454         (insert_copyout): Removed.
1455         (insert_copyin): Removed.
1456         (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
1457         insert_out_of_ssa_copy_on_edge instead of insert_copyout and
1458         insert_copyin.
1460 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1462         * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
1463         (rewrite_reductions_out_of_ssa): Same.
1464         (rewrite_commutative_reductions_out_of_ssa): Same.
1465         (build_poly_scop): Do not call these functions.
1466         * graphite-sese-to-poly.h (build_poly_scop): Declared.
1467         (rewrite_reductions_out_of_ssa): Declared.
1468         (rewrite_commutative_reductions_out_of_ssa): Declared.
1469         * graphite.c (graphite_transform_loops): Call on every scop
1470         rewrite_commutative_reductions_out_of_ssa before calling
1471         rewrite_reductions_out_of_ssa and build_scop_bbs.
1473 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1475         * graphite-dependences.c (dot_deps): Make system call to dotty run
1476         in background.
1477         (dot_deps_stmt): Same.
1478         * graphite-poly.c (dot_lst): Same.
1480 2010-06-11  Sebastian Pop  <sebastian.pop@amd.com>
1482         * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
1483         old_type in parameter.
1484         (gcc_type_for_value): Update call to gcc_type_for_interval.
1485         (compute_type_for_level_1): Renamed compute_type_for_level.
1486         Update call to gcc_type_for_interval.
1488 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1490         * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
1491         the scev analysis when the variable is not used outside the loop
1492         in a close phi node: call compute_overall_effect_of_inner_loop.
1494 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1496         * graphite-sese-to-poly.c (single_pred_cond): Renamed
1497         single_pred_cond_non_loop_exit.  Return NULL for loop exit edges.
1498         (build_sese_conditions_before): Renamed call to single_pred_cond.
1499         (build_sese_conditions_after): Same.
1501 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1503         * graphite-poly.h: Fix comments and indentation.
1504         * graphite-sese-to-poly.c: Same.
1505         (build_sese_conditions_before): Compute stmt and gbb only when needed.
1506         * tree-chrec.c: Fix comments and indentation.
1507         (tree-ssa-loop-niter.c): Same.
1509 2010-06-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1511         * refined-regions.c (create_region): Only initialize the region.
1512         (find_regions_with_entry): Initialize parent relation and bbmap
1513         correctly.
1514         (build_regions_tree): Set outermost_region to region instead of
1515         topmost_region.
1516         (calculate_region_tree): Remove unneeded parameters.
1518 2010-06-02  Tobias Grosser  <grosser@fim.uni-passau.de>
1520         * graphite-scop-detection.c (is_scop_p): New.
1521         (build_scops_new): New. A skeleton for the new scop detection.
1522         (build_scops_old): Renamed from build_scops.
1523         (build_scops): New version. Call the new and the old scop
1524         detection.
1526 2010-05-27  Tobias Grosser  <grosser@fim.uni-passau.de>
1527             Antoniu Pop  <antoniu.pop@gmail.com>
1529         * Makefile.in (OBJS-common): Add refined-regions.o.
1530         (refined-regions.o): New.
1531         (graphite-scop-detection.o): Use refined-regions.h.
1532         * graphite-scop-detection.c: Include refined-regions.h
1533         (build_scops): Also build the refined region tree.
1534         * refined-regions.c: New. Adds an algorithm to detect refined
1535         regions.
1536         (print_refined_region): New.
1537         (debug_refined_region): New.
1538         (refined_region_contains_bb_p): New.
1539         (refined_region_contains_region_p): New.
1540         (is_common_df): New.
1541         (struct find_regions_global_data): New.
1542         (is_region): New.
1543         (typedef struct bb_bb_def): New.
1544         (new_bb_bb_def): New.
1545         (bb_bb_map_hash): New.
1546         (eq_bb_bb_map): New.
1547         (find_new_bb): New.
1548         (bb_reg_def): New.
1549         (new_bb_reg_def): New.
1550         (bb_reg_map_hash): New.
1551         (eq_bb_reg_map): New.
1552         (find_new_region): New.
1553         (insert_new_reg): New.
1554         (insert_new_bb): New.
1555         (insert_shortcut): New.
1556         (get_next_postdom): New.
1557         (create_region): New.
1558         (find_regions_with_entry): New.
1559         (find_regions_adc): New.
1560         (find_regions): New.
1561         (get_topmost_parent): New.
1562         (build_regions_tree): New.
1563         (calculate_region_tree): New.
1564         (free_region_tree): New.
1565         * refined-regions.h: New.
1566         (struct refined_region): New.
1567         (calculate_region_tree): New.
1568         (free_region_tree): New.
1569         (refined_region_contains_bb_p): New.
1570         (refined_region_contains_region_p): New.
1571         (print_refined_region): New.
1572         (debug_refined_region): New.
1574 2010-05-26  Sebastian Pop  <sebastian.pop@amd.com>
1576         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1577         size_one_node.
1579 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
1581         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
1582         type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
1584 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
1586         * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
1587         phi_arg_in_outermost_loop.
1588         (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
1589         (remove_invariant_phi): Same.
1591 2010-04-12  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1593         * graphite-blocking.c
1594         (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
1595         * graphite-clast-to-gimple.c
1596         (clast_to_gcc_expression): Same.
1597         (precision_for_value): Same.
1598         (precision_for_interval): Same.
1599         (gcc_type_for_interval): Same.
1600         (graphite_create_new_guard): Same.
1601         (compute_bounds_for_level): Same.
1602         (graphite_create_new_loop_guard): Same.
1603         * graphite-interchange.c
1604         (build_linearized_memory_access): Same.
1605         (pdr_stride_in_loop): Same.
1606         (memory_strides_in_loop_1): Same.
1607         (memory_strides_in_loop): Same.
1608         (extend_scattering): Same.
1609         (psct_scattering_dim_for_loop_depth): Same.
1610         (pbb_number_of_iterations): Same.
1611         * graphite-poly.h
1612         (debug_iteration_domains): Same.
1613         * graphite-ppl.c
1614         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1615         (ppl_set_inhomogeneous_gmp): Same.
1616         (ppl_strip_loop): Same.
1617         (ppl_lexico_compare_linear_expressions): Same.
1618         (ppl_read_polyhedron_matrix): Same.
1619         (ppl_max_for_le_pointset): Same.
1620         * graphite-ppl.h
1621         (ppl_read_polyhedron_matrix): Same.
1622         (tree_int_to_gmp): Same.
1623         (gmp_cst_to_tree): Same.
1624         (ppl_set_inhomogeneous): Same.
1625         (ppl_set_inhomogeneous_tree): Same.
1626         (ppl_set_coef): Same.
1627         (ppl_set_coef_tree): Same.
1628         * graphite-sese-to-poly.c
1629         (build_pbb_scattering_polyhedrons): Same.
1630         (build_scop_scattering): Same.
1631         (scan_tree_for_params_right_scev): Same.
1632         (scan_tree_for_params): Same.
1633         (find_params_in_bb): Same.
1634         (find_scop_parameters): Same.
1635         (add_upper_bounds_from_estimated_nit): Same.
1636         (build_loop_iteration_domains): Same.
1637         (add_condition_to_domain): Same.
1638         (pdr_add_memory_accesses): Same.
1640 2010-04-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1642         * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
1643         CLooG's value_* macros to their respective mpz_* counterparts.
1644         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
1645         (graphite_create_new_loop_guard): Same.
1646         * graphite-interchange.c (build_linearized_memory_access): Same.
1647         (pdr_stride_in_loop): Same.
1648         (memory_strides_in_loop_1): Same.
1649         (1st_interchange_profitable_p): Same.
1650         * graphite-poly.c (extend_scattering): Same.
1651         (psct_scattering_dim_for_loop_depth): Same.
1652         (pbb_number_of_iterations): Same.
1653         (pbb_number_of_iterations_at_time): Same.
1654         * graphite-poly.h (new_1st_loop): Same.
1655         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
1656         (oppose_constraint): Same.
1657         (insert_constraint_into_matrix): Same.
1658         (ppl_set_inhomogeneous_gmp): Same.
1659         (ppl_set_coef_gmp): Same.
1660         (ppl_strip_loop): Same.
1661         (ppl_lexico_compare_linear_expressions): Same.
1662         (ppl_max_for_le_pointset): Same.
1663         (ppl_min_for_le_pointset): Same.
1664         (ppl_build_realtion): Same.
1665         * graphite-ppl.h (gmp_cst_to_tree): Same.
1666         (ppl_set_inhomogeneous): Same.
1667         (ppl_set_inhomogeneous_tree): Same.
1668         (ppl_set_coef): Same.
1669         (ppl_set_coef_tree): Same.
1670         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
1671         (build_scop_scattering): Same.
1672         (add_value_to_dim): Same.
1673         (scan_tree_for_params_right_scev): Same.
1674         (scan_tree_for_params_int): Same.
1675         (scan_tree_for_params): Same.
1676         (find_params_in_bb): Same.
1677         (find_scop_parameters): Same.
1678         (add_upper_bounds_from_estimated_nit): Same.
1679         (build_loop_iteration_domains): Same.
1680         (create_linear_expr_from_tree): Same.
1681         (add_condition_to_domain): Same.
1682         (pdr_add_memory_accesses): Same.
1684 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1686         PR middle-end/43519
1687         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1688         lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1689         When converting an unsigned type to signed, double its precision.
1690         (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1691         (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1692         (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1694 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1696         PR middle-end/43519
1697         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1698         build_nonstandard_integer_type.
1699         (gcc_type_for_interval): Same.
1701 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1703         PR middle-end/43519
1704         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1705         POINTER_PLUS_EXPR for pointer types.
1707         * gcc.dg/graphite/id-19.c: New.
1709 2010-04-04  Sebastian Pop  <sebastian.pop@amd.com>
1711         PR middle-end/43519
1712         * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1713         * graphite-clast-to-gimple.c: Include langhooks.h.
1714         (max_signed_precision_type): New.
1715         (max_precision_type): Takes two types as arguments.
1716         (precision_for_value): New.
1717         (precision_for_interval): New.
1718         (gcc_type_for_interval): New.
1719         (gcc_type_for_value): New.
1720         (gcc_type_for_clast_term): New.
1721         (gcc_type_for_clast_red): New.
1722         (gcc_type_for_clast_bin): New.
1723         (gcc_type_for_clast_expr): Split up into several functions.
1724         (gcc_type_for_clast_eq): Rewritten.
1725         (compute_bounds_for_level): New.
1726         (compute_type_for_level_1): New.
1727         (compute_type_for_level): New.
1728         (gcc_type_for_cloog_iv): Removed.
1729         (gcc_type_for_iv_of_clast_loop): Rewritten.
1730         (graphite_create_new_loop): Compute the lower and upper bound types
1731         with gcc_type_for_clast_expr.
1732         (graphite_create_new_loop_guard): Same.
1733         (find_cloog_iv_in_expr): Removed.
1734         (compute_cloog_iv_types_1): Removed.
1735         (compute_cloog_iv_types): Removed.
1736         (gloog): Do not call compute_cloog_iv_types.
1737         * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1738         GBB_CLOOG_IV_TYPES.
1739         (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1740         * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1741         (GBB_CLOOG_IV_TYPES): Removed.
1743         * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1745 2010-04-02  Sebastian Pop  <sebastian.pop@amd.com>
1747         Reverted this commit: as at this point the loop closed SSA form
1748         is under a canonical form respecting the single argument condition.
1749         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1750         close phi nodes may have more than one argument.
1752 2010-04-01  Sebastian Pop  <sebastian.pop@amd.com>
1754         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1755         gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1756         (detect_commutative_reduction): Same.
1758 2010-03-31  Sebastian Pop  <sebastian.pop@amd.com>
1760         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1761         close phi nodes may have more than one argument.
1763 2010-03-30  Richard Guenther  <rguenther@suse.de>
1764             Zdenek Dvorak  <ook@ucw.cz>
1765             Sebastian Pop  <sebastian.pop@amd.com>
1767         PR middle-end/43464
1768         * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1769         with multiple arguments.
1770         (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1772 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1774         * graphite-dependences.c (print_pddr): Call print_pdr with an
1775         extra argument.
1776         * graphite-poly.c (debug_pdr): Add an extra argument for the
1777         verbosity level.
1778         (print_pdr): Same.
1779         (print_pbb_domain): Same.
1780         (print_pbb): Same.
1781         (print_scop_context): Same.
1782         (print_scop): Same.
1783         (print_cloog): Same.
1784         (debug_pbb_domain): Same.
1785         (debug_pbb): Same.
1786         (print_pdrs): Same.
1787         (debug_pdrs): Same.
1788         (debug_scop_context): Same.
1789         (debug_scop): Same.
1790         (debug_cloog): Same.
1791         (print_scop_params): Same.
1792         (debug_scop_params): Same.
1793         (print_iteration_domain): Same.
1794         (print_iteration_domains): Same.
1795         (debug_iteration_domain): Same.
1796         (debug_iteration_domains): Same.
1797         (print_scattering_function): Same.
1798         (print_scattering_functions): Same.
1799         (debug_scattering_function): Same.
1800         (debug_scattering_functions): Same.
1801         * graphite-poly.h (debug_pdr): Update declaration.
1802         (print_pdr): Same.
1803         (print_pbb_domain): Same.
1804         (print_pbb): Same.
1805         (print_scop_context): Same.
1806         (print_scop): Same.
1807         (print_cloog): Same.
1808         (debug_pbb_domain): Same.
1809         (debug_pbb): Same.
1810         (print_pdrs): Same.
1811         (debug_pdrs): Same.
1812         (debug_scop_context): Same.
1813         (debug_scop): Same.
1814         (debug_cloog): Same.
1815         (print_scop_params): Same.
1816         (debug_scop_params): Same.
1817         (print_iteration_domain): Same.
1818         (print_iteration_domains): Same.
1819         (debug_iteration_domain): Same.
1820         (debug_iteration_domains): Same.
1821         (print_scattering_function): Same.
1822         (print_scattering_functions): Same.
1823         (debug_scattering_function): Same.
1824         (debug_scattering_functions): Same.
1826 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1828         * graphite-poly.c (print_scattering_function_1): New.
1829         (print_scattering_function): Call it.
1830         (print_scop_params): Remove spaces at the end of lines.
1831         (print_cloog): New.
1832         (debug_cloog): New.
1833         * graphite-poly.h (print_cloog): Declared.
1834         (debug_cloog): Declared.
1836 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1838         * tree-ssa-copy.c: Revert this previous change:
1839         (init_copy_prop): Loop closed phi nodes cancontain more than one
1840         argument.
1841         (execute_copy_prop): Revert the previous change: do not call
1842         rewrite_into_loop_closed_ssa.
1844 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1845             Richard Guenther  <rguenther@suse.de>
1847         PR middle-end/43464
1848         * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1849         contain more than one argument.
1850         (execute_copy_prop): Revert the previous change: do not call
1851         rewrite_into_loop_closed_ssa.
1853         * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1854         * gcc.dg/graphite/id-pr43464-1.c: New.
1856 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1858         PR middle-end/43464
1859         * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1860         and verify_loop_closed_ssa when copy prop is executed in the LNO.
1862         * gcc.dg/graphite/id-pr43464.c: New.
1864 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1866         * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1867         in loop->header.
1868         * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1869         * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1870         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1871         to switch between adding the IV bump in loop->latch or in loop->header.
1873 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1875         * passes.c (init_optimization_passes): Add pass_copy_prop
1876         after Graphite.
1878 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1880         * graphite-poly.c (print_scattering_function): Pretty print following
1881         the scoplib format.
1882         (print_pdr): Same.
1883         (print_pbb_domain): Same.
1884         (dump_gbb_cases): Same.
1885         (dump_gbb_conditions): Same.
1886         (print_pdrs): Same.
1887         (print_pbb): Same.
1888         (print_scop_params): Same.
1889         (print_scop_context): Same.
1890         (print_scop): Same.
1891         (print_pbb_body): New.
1892         (lst_indent_to): New.
1893         (print_lst): Start new lines with a #.
1894         * graphite-poly.h (pbb_bb): New.
1895         (pbb_index): Use pbb_bb.
1896         * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1897         disjuncts.
1898         * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1900 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1902         PR middle-end/43351
1903         * gcc.dg/graphite/id-pr43351.c
1905 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1907         PR middle-end/43354
1908         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1909         call insert_out_of_ssa_copy for default definitions.
1910         * gfortran.dg/graphite/id-pr43354.f: New.
1912 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1914         PR middle-end/43349
1915         * gfortran.dg/graphite/pr43349.f: New.
1917 2010-03-11  Sebastian Pop  <sebastian.pop@amd.com>
1919         * graphite-clast-to-gimple.c (my_long_long): Defined.
1920         (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1921         * graphite-sese-to-poly.c (my_long_long): Defined.
1922         (scop_ivs_can_be_represented): Use it.
1924 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1926         * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1927         graphite-max-bbs-per-function, and loop-block-tile-size.
1928         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1929         with "maximum".
1930         (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1932 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1934         * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1935         forward declaration.
1936         * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1937         (add_upper_bounds_from_estimated_nit): New.
1938         (build_loop_iteration_domains): Use it.
1940 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1942         * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1944 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1946         PR middle-end/43306
1947         * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1948         should be an INTEGER_CST.  Also handle CASE_CONVERT.
1949         * gcc.dg/graphite/pr43306.c: New.
1951 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1953         * graphite.c (graphite_initialize): To bound the number of bbs per
1954         function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1955         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1956         * doc/invoke.texi: Document it.
1958 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1960         * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1961         * graphite-sese-to-poly.h (build_poly_scop): Same.
1963 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1965         * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1966         the number of parameters in the scop.  Use as an upper bound
1967         PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1968         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1969         * doc/invoke.texi: Document it.
1971 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1973         * graphite-sese-to-poly.c (add_param_constraints): Use
1974         lower_bound_in_type and upper_bound_in_type.
1976 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1978         * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1979         instead of unsigned_type_node.
1981 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1982             Reza Yazdani  <reza.yazdani@amd.com>
1984         PR middle-end/43065
1985         * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1986         on pointer type parameters.
1988         * gcc.dg/graphite/run-id-4.c: New.
1990 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1992         PR middle-end/43065
1993         * gcc.dg/graphite/run-id-3.c: New.
1995 2010-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
1996             Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1998         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1999         handle conversions from pointer to integers.
2000         (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
2001         induction variable, to be able to work with code generated by CLooG.
2002         * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
2003         (build_poly_scop): Bail out if we cannot codegen a loop.
2005 2010-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2007         * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
2008         code generation with gloog_error.
2010 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2012         * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
2013         Call fold_convert on all the returned values.
2014         (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
2015         the type of the resulting expression.
2017 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2019         * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
2020         ppl_min_for_le_pointset.  Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
2021         * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
2023 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2025         * graphite-dependences.c (map_into_dep_poly): Removed.
2026         (dependence_polyhedron_1): Use combine_context_id_scat.
2028 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2030         * graphite-poly.h (struct poly_scattering): Add layout documentation.
2031         (struct poly_bb): Same.
2032         (combine_context_id_scat): New.
2034 2010-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2036         PR middle-end/42326
2037         * sese.c (name_defined_in_loop_p): Return false for default
2038         definitions.
2040         * gcc.dg/graphite/pr42326.c: New.
2042 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2044         * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
2045         and clean up the logic.
2047 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2049         * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
2050         early return.
2052 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
2054         PR middle-end/43083
2055         * graphite-scop-detection.c (create_single_exit_edge): Move
2056         the call to find_single_exit_edge to....
2057         (create_sese_edges): ...here.  Don't handle multiple edges
2058         exiting the function.
2059         (build_graphite_scops): Don't handle multiple edges
2060         exiting the function.
2062         * gcc.dg/graphite/pr43083.c: New.
2064 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
2066         PR middle-end/43097
2067         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
2068         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
2070         * gfortran.dg/graphite/pr43097.f: New.
2072 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
2073             Manuel López-Ibáñez  <manu@gcc.gnu.org>
2075         PR middle-end/43140
2076         * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
2078 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
2080         PR middle-end/43026
2081         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
2083         * g++.dg/graphite/pr43026.C: New.
2085 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2087         * Merge from mainline (154736:156693).
2089 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
2091         PR middle-end/43012
2092         * gcc.dg/graphite/pr43012.c: New.
2094 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2096         * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
2097 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2099         * g++.dg/graphite/pr42930.C: New.
2101 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2103         PR middle-end/42930
2104         * graphite-scop-detection.c (graphite_can_represent_scev): Call
2105         graphite_can_represent_init for MULT_EXPR.
2107 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2109         PR middle-end/42914
2110         PR middle-end/42530
2111         * graphite-sese-to-poly.c (remove_phi): New.
2112         (translate_scalar_reduction_to_array): Call remove_phi.
2114         * gcc.dg/graphite/pr42530.c: New.
2115         * gcc.dg/graphite/pr42914.c: New.
2117 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2119         PR middle-end/42771
2120         * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
2121         * graphite-clast-to-gimple.h (gloog): Update declaration.
2122         * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
2123         * graphite-poly.h (struct poly_bb): Add missing comments.
2124         (struct scop): Add poly_scop_p field.
2125         (POLY_SCOP_P): New.
2126         * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
2127         * graphite.c (graphite_transform_loops): Build the polyhedral
2128         representation for each scop before code generation.
2129         * sese.c (rename_variables_in_operand): Removed.
2130         (rename_variables_in_expr): Return the renamed expression.
2131         (rename_sese_parameters): New.
2132         * sese.h (rename_sese_parameters): Declared.
2134         * gcc.dg/graphite/pr42771.c: New.
2136 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
2138         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
2139         return 0 from main.
2140         * gcc.dg/graphite/block-1.c: Same.
2141         * gcc.dg/graphite/block-3.c: Same.
2142         * gcc.dg/graphite/block-4.c: Same.
2143         * gcc.dg/graphite/block-5.c: Same.
2144         * gcc.dg/graphite/block-6.c: Same.
2145         * gcc.dg/graphite/block-7.c: Same.
2146         * gcc.dg/graphite/interchange-0.c: Same.
2147         * gcc.dg/graphite/interchange-1.c: Same.
2148         * gcc.dg/graphite/interchange-10.c: Same.
2149         * gcc.dg/graphite/interchange-11.c: Same.
2150         * gcc.dg/graphite/interchange-12.c: Same.
2151         * gcc.dg/graphite/interchange-2.c: Same.
2152         * gcc.dg/graphite/interchange-3.c: Same.
2153         * gcc.dg/graphite/interchange-4.c: Same.
2154         * gcc.dg/graphite/interchange-5.c: Same.
2155         * gcc.dg/graphite/interchange-6.c: Same.
2156         * gcc.dg/graphite/interchange-7.c: Same.
2157         * gcc.dg/graphite/interchange-8.c: Same.
2158         * gcc.dg/graphite/interchange-9.c: Same.
2159         * gcc.dg/graphite/interchange-mvt.c: Same.
2161 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
2163         * gfortran.dg/graphite/id-19.f: New.
2164         * gfortran.dg/graphite/pr14741.f90: New.
2165         * gfortran.dg/graphite/pr41924.f90: New.
2166         * gfortran.dg/graphite/run-id-2.f90: New.
2168 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
2170         PR middle-end/42988
2171         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
2172         to unknown_dependence.
2173         (graphite_legal_transform_dr): Handle the unknown_dependence.
2174         (graphite_carried_dependence_level_k): Same.
2176 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
2178         * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
2180 2010-02-05  Sebastian Pop  <sebastian.pop@amd.com>
2181             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
2183         PR middle-end/42637
2184         * graphite-dependences.c (build_lexicographical_constraint): Return
2185         a union of dependence polyhedra.
2186         (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
2188         * gcc.dg/graphite/block-0.c: Enable runtime check.  XFAILed.
2189         * gcc.dg/graphite/block-4.c: Same.
2190         * gcc.dg/graphite/block-7.c: Same.
2191         * gcc.dg/graphite/interchange-12.c: Same.
2192         * gcc.dg/graphite/interchange-mvt.c: Same.
2193         * gfortran.dg/graphite/interchange-1.f: XFAILed.
2194         * gfortran.dg/graphite/interchange-3.f90: XFAILed.
2195         * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
2197 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
2199         * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
2200         the execution check to FAIL.  This testcase is miscompiled by Graphite
2201         and the check should be re-enabled.
2202         * gcc.dg/graphite/interchange-mvt.c: Same.
2203         * gcc.dg/graphite/block-0.c: Same.
2204         * gcc.dg/graphite/block-4.c: Same.
2205         * gcc.dg/graphite/block-7.c: Same.
2207 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
2209         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
2210         * gcc.dg/graphite/scop-0.c: Fix spaces.
2211         * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
2212         * gfortran.dg/graphite/block-2.f: Same.
2213         * gfortran.dg/graphite/block-3.f90: Same.
2214         * gfortran.dg/graphite/block-4.f90: Same.
2215         * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
2216         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
2218 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
2220         * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
2221         PDDR_ORIGINAL_SCATTERING_P.
2222         (pddr_is_empty): Rewritten.
2223         (print_dependence_polyhedron_layout): New.
2224         (print_pddr): New.
2225         (debug_pddr): New.
2226         (build_alias_set_powerset): Moved up.
2227         (poly_drs_may_alias_p): Moved up.
2228         (lexicographically_gt_p): Removed.
2229         (build_lexicographically_gt_constraint): Renamed
2230         build_lexicographical_constraint, reimplemented.
2231         (dependence_polyhedron_1): Simplified parameters.
2232         (dependence_polyhedron): Same.  Keep along empty PDDRs
2233         to make efficient use of the cache.
2234         (reduction_dr_p): Compute the PBBs don't pass them as parameters.
2235         (graphite_legal_transform_dr): Rewritten.
2236         (graphite_legal_transform_bb): Pass fewer arguments to
2237         graphite_legal_transform_dr.
2238         (graphite_carried_dependence_level_k): Simplified implementation.
2239         (dot_original_deps_stmt_1): Call dependence_polyhedron.
2240         (dot_transformed_deps_stmt_1): Same.
2241         (dot_original_deps): Same.
2242         (dot_transformed_deps): Same.
2243         * graphite-dependences.h (struct poly_ddr): Added a new field
2244         original_scattering_p.
2245         (PDDR_ORIGINAL_SCATTERING_P): New.
2246         (print_pddr): Declared.
2247         (debug_pddr): Declared.
2248         * graphite-ppl.c: Clarify comment.
2249         * sese.h (print_gimple_bb): Removed unused declaration.
2250         (debug_gbb): Same.
2252 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
2254         * g++.dg/graphite/graphite.exp: Rewritten.
2255         * gcc.dg/graphite/graphite.exp: Rewritten.
2256         * gfortran.dg/graphite/graphite.exp: Rewritten.
2257         * gcc.dg/graphite/block-0.c: Added runtime test.
2258         * gcc.dg/graphite/block-1.c: Same.
2259         * gcc.dg/graphite/block-3.c: Same.
2260         * gcc.dg/graphite/block-4.c: Same.
2261         * gcc.dg/graphite/block-5.c: Same.
2262         * gcc.dg/graphite/block-6.c: Same.
2263         * gcc.dg/graphite/block-7.c: Same.
2264         * gcc.dg/graphite/interchange-0.c: Same.
2265         * gcc.dg/graphite/interchange-1.c: Same.
2266         * gcc.dg/graphite/interchange-10.c: Same.
2267         * gcc.dg/graphite/interchange-11.c: Same.
2268         * gcc.dg/graphite/interchange-12.c: Same.
2269         * gcc.dg/graphite/interchange-2.c: Same.
2270         * gcc.dg/graphite/interchange-3.c: Same.
2271         * gcc.dg/graphite/interchange-4.c: Same.
2272         * gcc.dg/graphite/interchange-5.c: Same.
2273         * gcc.dg/graphite/interchange-6.c: Same.
2274         * gcc.dg/graphite/interchange-7.c: Same.
2275         * gcc.dg/graphite/interchange-8.c: Same.
2276         * gcc.dg/graphite/interchange-9.c: Same.
2277         * gcc.dg/graphite/interchange-mvt.c: Same.
2278         * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
2280 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2282         * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
2283           background.
2285 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2287         * common.opt: Add -fgraphite-cloog-opts.
2288         * graphite-clast-to-gimple.c (set_cloog_options): Same.
2289         * opts.c (decode_options): Same.
2291 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2293         * gcc.dg/graphite/id-17.c: New.
2294         * gcc.dg/graphite/pr41888.c: New.
2295         * gcc.dg/graphite/scop-22.c: New.
2296         * gfortran.dg/graphite/pr40982.f90: New.
2298 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2300         * graphite-dependences.c: Clarify comments.
2301         (build_pddr): Add an extra parameter direction.
2302         (graphite_legal_transform_dr): Use build_pddr.
2303         (dot_original_deps_stmt_1): Update use of build_pddr.
2304         (dot_transformed_deps_stmt_1): Same.
2305         (dot_original_deps): Same.
2306         (dot_transformed_deps): Same.
2308         * gcc.dg/graphite/interchange-12.c: New.
2309         * gcc.dg/graphite/block-7.c: New.
2311 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2313         * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
2314         (pddr_transformed_scattering): Removed.
2315         (graphite_legal_transform_dr): Use build_pddr.
2316         (dot_original_deps_stmt_1): Same.
2317         (dot_transformed_deps_stmt_1): Same.
2318         (dot_original_deps): Same.
2319         (dot_transformed_deps): Same.
2321 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2323         * graphite-dependences.c (lexicographically_gt_p): Add comments.
2324         (build_lexicographically_gt_constraint): Same.
2325         (dependence_polyhedron_1): Same.
2326         (dependence_polyhedron): Same.
2328 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2330         * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
2331         (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
2332         (lexicographically_gt_p): Change type of direction to int.
2333         (build_lexicographically_gt_constraint): Same.
2334         (dependence_polyhedron_1): Same.
2335         (dependence_polyhedron): Same.
2336         (pddr_original_scattering): Use integers for direction.
2337         (pddr_transformed_scattering): Same.
2338         (graphite_legal_transform_dr): Same.
2339         (graphite_carried_dependence_level_k): Same.
2341 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2343         * graphite-dependences.c (build_pairwise_constraint): Renamed
2344         ppl_build_relation.  Moved...
2345         (dr_equality_constraints): Use ppl_build_relation.
2346         (build_pairwise_scheduling_equality): Same.
2347         (build_pairwise_scheduling_inequality): Same.
2348         * graphite-ppl.c (ppl_build_relation): ...here.
2349         * graphite-ppl.h (ppl_build_relation): Declared.
2351 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2353         PR middle-end/42681
2354         * graphite-clast-to-gimple.c (gloog_error): New static variable.
2355         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
2356         Set gloog_error when such an expression failed to be built.
2357         (translate_clast): Early return when gloog_error is set.
2358         (gloog): Clear gloog_error.  When gloog_error is set, call
2359         set_ifsese_condition to enable the original code.  Return the status
2360         of the code generation based on gloog_error.
2361         * sese.c (set_ifsese_condition): New.
2362         * sese.h (set_ifsese_condition): Declared.
2364         * g++.dg/graphite/pr42681.C: New.
2366 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2368         PR middle-end/42732
2369         * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
2370         rename_nb_iterations.
2371         * sese.c (rename_variables_in_operand): New.
2372         (rename_variables_in_expr): New.
2373         (rename_nb_iterations): New.
2374         (sese_adjust_liveout_phis): Update the rename_map.
2375         * sese.h (rename_nb_iterations): Declared.
2376         * tree-scalar-evolution.c (scev_reset_htab): New.
2377         (scev_reset): Call scev_reset_htab.
2378         * tree-scalar-evolution.h (scev_reset_htab): Declared.
2380         * gfortran.dg/graphite/pr42732.f: New.
2382 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2384         PR middle-end/42393
2385         * graphite-clast-to-gimple.c: Fix formatting.
2386         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
2387         (expr_defined_in_loop_p): New.
2388         (add_loop_exit_phis): Also handle full expressions: remove from
2389         the rename_map the expressions defined in the loop that we're closing.
2391         * gfortran.dg/graphite/pr42393-1.f90: New.
2392         * gfortran.dg/graphite/pr42393.f90: Add new flags
2393         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
2394         make this testcase useful in the Graphite branch.
2396 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2398         * graphite-scop-detection.c (exclude_component_ref): Removed.
2399         (is_simple_operand): Removed.
2400         (stmt_simple_for_scop_p): Remove use of is_simple_operand.
2402 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2404         PR middle-end/42221
2405         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2406         the array indexing of ADDR_EXPRs.
2408         * gcc.dg/graphite/pr42221.c: New.
2410 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2412         PR middle-end/42521
2413         * graphite.c (graphite_finalize): Call scev_reset.
2414         (graphite_transform_loops): Do not call scev_reset between the code
2415         generation of scops.
2417         * gcc.dg/graphite/pr42521.c: New.
2419 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2421         * graphite-interchange.c (memory_stride_in_loop): Renamed
2422         pdr_stride_in_loop.
2423         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
2424         (memory_strides_in_loop): Memoize the memory strides per loop.
2425         (lst_interchange_profitable_p): Do not initialize to zero the memory
2426         strides.
2427         * graphite-poly.h (struct lst): Add a field memory_strides.
2428         (LST_LOOP_MEMORY_STRIDES): New.
2429         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
2430         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
2432 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2434         * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
2435         memory_strides_in_loop.  Gather memory strides on a whole loop.
2436         (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
2437         (lst_interchange_profitable_p): Removed.
2438         (lst_try_interchange_loops): Call lst_interchange_profitable_p.
2440 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2442         Revert patch 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2443         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2444         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2445         Remove context_loop and level.
2447 2010-01-07  Richard Guenther  <rguenther@suse.de>
2449         PR tree-optimization/42641
2450         * sese.c (rename_map_elt_info): Use the SSA name version, do
2451         not hash pointers.
2453 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
2455         * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
2456         blocked" only when both the strip mine and the interchange have
2457         been applied.
2459         * gcc.dg/graphite/block-2.c: Removed.
2460         * gcc.dg/graphite/block-3.c: Add scan pattern.
2461         * gcc.dg/graphite/block-4.c: Same.
2462         * gcc.dg/graphite/block-5.c: Same.
2463         * gcc.dg/graphite/block-6.c: Same.
2465 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
2467         * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
2468         before allocating a new one.
2469         (copy_renames): Check that slot is not NULL.
2470         (mark_bb_with_pbb): Same.
2471         (compute_cloog_iv_types_1): Same.
2472         * graphite-interchange.c (lst_perfect_nestify): Free the before,
2473         nest, and after LSTs.
2474         (lst_try_interchange_loops): Same.
2476 2010-01-05  Sebastian Pop  <sebastian.pop@amd.com>
2478         PR middle-end/42178
2479         * graphite-interchange.c (lst_try_interchange_loops): Do not return
2480         the before, nest, and after LSTs.
2481         (lst_try_interchange): Removed.
2482         (lst_interchange_select_inner): Do not iterate over the LSTs if they
2483         were modified.
2484         (lst_interchange_select_outer): Apply interchange on the outer loop
2485         until there are no more changes in the inner loops.
2487 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2489         Revert patch fixing PR middle-end/42221.
2491 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2493         PR middle-end/42180
2494         * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
2495         GIMPLE_CALL.
2497         * gfortran.dg/graphite/pr42180.f90: Add compile flags.
2499 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2501         PR middle-end/42180
2502         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
2503         that contain only one statement.
2505         * gfortran.dg/graphite/pr42180.f90: New.
2507 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2509         PR middle-end/42393
2510         * gfortran.dg/graphite/pr42393.f90: New.
2512 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2514         PR middle-end/42186
2515         * gfortran.dg/graphite/pr42186.f90: New.
2517 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2519         PR middle-end/42205
2520         * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
2521         Insert the reduction copy in the same block as the phi node.
2522         (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
2524         * gcc.dg/graphite/pr42205-1.c: New.
2525         * gcc.dg/graphite/pr42205-2.c: New.
2527 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2529         PR middle-end/42221
2530         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2531         the array indexing of ADDR_EXPRs.
2533         * gcc.dg/graphite/pr42221.c: New.
2535 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2537         PR middle-end/42178
2538         PR middle-end/42334
2539         * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
2540         index.  Call lst_interchange_select_inner only once.
2541         (lst_interchange_select_inner): Update use of lst_try_interchange.
2542         (lst_interchange_select_outer): Update.
2544 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
2546         PR middle-end/42178
2547         PR middle-end/42334
2548         * graphite-interchange.c (lst_try_interchange): Do not increment the
2549         the OUTER index when there is no AFTER kernel.  Do not increment the
2550         OUTER index for after processing the AFTER kernel.
2551         (lst_interchange_select_inner): Call lst_try_interchange only on loops.
2552         (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
2553         index.  Do not pass to lst_interchange_select_inner the OUTER index.
2554         (scop_do_interchange): Update use of lst_interchange_select_outer.
2556         * gfortran.dg/graphite/graphite.exp
2557         (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
2558         * gfortran.dg/graphite/interchange-1.f: Add comment.  Clean
2559         the graphite dump file.
2560         * gfortran.dg/graphite/interchange-2.f: Same.
2561         * gfortran.dg/graphite/pr42334-1.f: New.
2563 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
2565         PR middle-end/42178
2566         PR middle-end/42334
2567         * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2568         that are empty.
2569         (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2570         (lst_try_interchange): Reimplemented.
2571         (lst_interchange_select_inner): Same.
2572         (lst_do_interchange): Renamed lst_interchange_select_outer.
2573         Reimplemented.
2574         (scop_do_interchange): Update use of lst_interchange_select_outer.
2576         * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2577         * gcc.dg/graphite/block-0.c: Un-XFAILed.
2578         * gcc.dg/graphite/pr42211.c: New.
2579         * gfortran.dg/graphite/pr42334.f90: New.
2581 2009-12-14  Sebastian Pop  <sebastian.pop@amd.com>
2583         PR middle-end/42181
2584         * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2585         carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2587         * gfortran.dg/graphite/pr42181.f90: New.
2589 2009-12-12  Sebastian Pop  <sebpop@gmail.com>
2591         PR middle-end/42284
2592         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2593         insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2594         (detect_commutative_reduction_arg): Simplified.
2595         (detect_commutative_reduction): Early return when the argument of
2596         the close phi is not of an SSA_NAME.
2598         * gcc.dg/graphite/pr42284.c: New.
2600 2009-12-11  Alexander Monakov  <amonakov@ispras.ru>
2602         * dbgcnt.def (graphite_scop): New counter.
2603         * graphite.c: Include dbgcnt.h
2604         (graphite_transform_loops): Use new counter to limit transformations.
2606 2009-12-08  Sebastian Pop  <sebpop@gmail.com>
2608         PR middle-end/42285
2609         * graphite-scop-detection.c (graphite_can_represent_init): Also
2610         handle more complex MULT_EXPRs containing parameters by recursion
2611         on the structure.
2613         * gfortran.dg/graphite/pr42285.f90: New.
2615 2009-12-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2617         * g++.dg/graphite/pr42130.C: Fix type.
2619 2009-11-29  Alexander Monakov <amonakov@gcc.gnu.org>
2621         * g++.dg/graphite/pr42130.C: Correct testcase.
2623 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2625         * Merge from mainline (154493:154734).
2627 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2629         * Merge from mainline (151362:154491).
2631 2009-11-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2633         * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2634         graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2636 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2638         PR middle-end/42130
2639         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2640         translate_clast_for_loop): New.
2641         (translate_clast_for): Add a condition around the loop, to do not
2642         execute loops with zero iterations.
2643         * g++.dg/graphite/pr42130.C: New.
2644         * gcc.dg/graphite/pr35356-2.c: Adapt.
2646 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2648         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2649         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2650         Remove context_loop and level.
2652 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2654         * graphite-clast-to-gimple.c (translate_clast_user,
2655         translate_clast_for, translate_clast_guard): Simplify and move common
2656         elements to translate_clast().
2657         (translate_clast): Simplify and get common elements.
2659 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2661         * graphite-clast-to-gimple.c (translate_clast_user,
2662         translate_clast_for, translate_clast_guard): Split out of
2663         translate_clast.
2665 2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>
2667         * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2668         clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2669         debug_clast_name_indexes_1, debug_clast_name_indexes,
2670         clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2671         (clast_name_to_gcc, clast_to_gcc_expression,
2672         clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2673         gcc_type_for_clast_eq, graphite_translate_clast_equation,
2674         graphite_create_guard_cond_expr, graphite_create_new_loop,
2675         translate_clast): Add params_index.
2676         (initialize_cloog_names): Create parameter strings from scratch, do
2677         not reference other strings.
2678         (create_params_index): New.
2679         (gloog): Initialize params_index.
2680         * graphite-scop-detection (free_scops_1): Removed.
2681         (limit_scops): Use normal free_scops.
2682         * graphite-sese-to-poly.c (save_var_names): Removed.
2683         (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2684         and SESE_PARAMS_INDEX.
2685         * sese.c (new_sese, free_sese): Dito.
2686         * sese.h (struct sese): Remove params_index, params_names.
2687         (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2689 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2691         Revert the following patch from 2009-09-14:
2692         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2693         tree-scalar-evolution.h, and then tree-data-ref.h.
2694         * graphite-clast-to-gimple.c: Same.
2695         * graphite-dependences.c: Same.
2696         * graphite-interchange.c: Same.
2697         * graphite-poly.c: Same.
2698         * graphite-scop-detection.c: Same.
2699         * graphite-sese-to-poly.c: Same.
2700         * graphite.c: Same.
2701         * lambda-code.c: Same.
2702         * matrix-reorg.c: Same.
2703         * tree-data-ref.c: Same.
2704         * tree-if-conv.c: Same.
2705         * tree-loop-distribu: Same.: Same.
2706         * tree-loop-linear.c: Same.
2707         * tree-parloops.c: Same.
2708         * tree-predcom.c: Same.
2709         * tree-vect-patterns.c: Same.
2711 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2713         Revert patch from 2009-09-14.
2714         * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2715         passes at -O1 and below.
2717 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2719         PR middle-end/40281
2720         * gcc.dg/graphite/pr40281.c: New.
2722         * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2723         evolutions should not variate in inner loops.
2725 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2727         PR middle-end/42050
2728         * gfortran.dg/graphite/pr42050.f90: New.
2730 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2732         * graphite-interchange.c (memory_strides_in_loop_depth): New.
2733         (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2735 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2737         * graphite-blocking.c (scop_do_block): New.
2738         * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2739         * graphite-poly.h (scop_do_block): Declared.
2741 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2743         * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2744         depth is the loop nesting depth in the LST.  Call psct_dynamic_dim
2745         to transform depth into the time_depth before calling
2746         pbb_number_of_iterations_at_time.
2747         (lst_do_strip_mine): Use a scalar variable instead of recomputing
2748         lst_depth.
2750 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2752         Reverted the patch for "scattering permutations" from 2009-10-28.
2754         * graphite-poly.c (print_permutation): New.
2755         (debug_permutation): New.
2756         (new_poly_bb): Initialize PBB_PERMUTATION.
2757         (free_poly_bb): Free PBB_PERMUTATION.
2758         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2759         (struct pbb_permutation_elt): New.
2760         (PBB_PERMUTATION_ELT_STRIDE): New.
2761         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2762         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2763         (new_pbb_permutation_elt): New.
2764         (pbb_permutation_elt_free): New.
2765         (struct poly_bb): Add field permutation.
2766         (PBB_PERMUTATION): New.
2767         (print_permutation): Declared.
2768         (debug_permutation): Declared.
2770 2009-11-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
2772         * graphite-interchange.c (build_partial_difference): New.
2773         (memory_stride_in_loop): Refactored the computation of
2774         equality constraints into build_partial_difference function.
2775         Added support for debugging stride computations.
2777 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2779         * graphite-clast-to-gimple.c (gloog): Free if_region,
2780         if_region->true_region, and if_region->region.
2781         * sese.c (if_region_set_false_region): Free if_region->false_region.
2782         (create_if_region_on_edge): Do not use GGC_NEW.
2783         (move_sese_in_condition): Remove useless initialization.
2785 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2787         * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2788         for the loops created by the loop distribution.  Do not modify the
2789         input LSTs.
2790         (lst_try_interchange_loops): Same.  Use a temporary LST for the
2791         transformed schedule.  Call lst_update_scattering before data
2792         dependence analysis.
2793         (lst_try_interchange): Pass an extra parameter INDEX.
2794         (lst_do_interchange_1): New.
2795         (lst_do_interchange): Call lst_do_interchange_1.
2796         (scop_do_interchange): Call lst_update_scattering.
2797         * graphite-poly.c (apply_poly_transforms): Do not call
2798         lst_update_scattering.
2799         * graphite-poly.h (lst_pred): New.
2800         (lst_succ): New.
2801         (lst_find_first_pbb): Return NULL when not found.
2802         (lst_empty_p): New.
2803         (lst_insert_in_sequence): Allow LST1 to be NULL.
2804         (lst_replace): New.
2805         (lst_substitute_3): New.
2806         * gcc.dg/graphite/interchange-1.c: XFail.
2807         * gcc.dg/graphite/interchange-8.c: XFail.
2808         * gcc.dg/graphite/interchange-11.c: XFail.
2810 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2812         * graphite-interchange.c (lst_perfectly_nested_p): New.
2813         (lst_perfect_nestify): New.
2814         (lst_try_interchange_loops): Call store_lst_schedule,
2815         lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2816         (scop_do_interchange): Avoid redundant legality test.
2817         Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2818         * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2819         * graphite-poly.h (psct_static_dim): New.
2820         (lst_dewey_number_at_depth): New.
2821         (lst_find_pbb): Restructured.
2822         (lst_find_first_pbb): Restructured.
2823         (lst_find_last_pbb): New.
2824         (lst_contains_p): New.
2825         (lst_contains_pbb): New.
2826         (lst_create_nest): New.
2827         (lst_remove_from_sequence): New.
2828         (pbb_update_scattering): New.
2829         (lst_update_scattering_under): New.
2830         (lst_update_scattering_seq): New.
2831         (lst_update_scattering): New.
2832         (lst_insert_in_sequence): New.
2833         (lst_distribute_lst): New.
2834         (lst_remove_all_before_including_pbb): New.
2835         (lst_remove_all_before_excluding_pbb): New.
2837 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2839         * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2840         get_loop_exit_edges.
2842 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2844         * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2846 2009-10-28  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2848         * graphite-poly.c (print_permutation): New.
2849         (debug_permutation): New.
2850         (new_poly_bb): Initialize PBB_PERMUTATION.
2851         (free_poly_bb): Free PBB_PERMUTATION.
2852         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2853         (struct pbb_permutation_elt): New.
2854         (PBB_PERMUTATION_ELT_STRIDE): New.
2855         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2856         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2857         (new_pbb_permutation_elt): New.
2858         (pbb_permutation_elt_free): New.
2859         (struct poly_bb): Add field permutation.
2860         (PBB_PERMUTATION): New.
2861         (print_permutation): Declared.
2862         (debug_permutation): Declared.
2864 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2866         * graphite-clast-to-gimple.c (gloog): Do not call
2867         sese_reset_aux_in_loops.
2868         * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2869         extra argument for domains.  Do not use loop->aux.
2870         (build_scop_iteration_domain): Initialize and free domains, pass it
2871         to build_loop_iteration_domains and extract the information from
2872         domains.  Do not use loop->aux.
2873         * sese.c (sese_reset_aux_in_loops): Removed.
2874         * sese.h (sese_reset_aux_in_loops): Removed.
2876 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2878         * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2879         (dependency_in_loop_p): Same.
2880         (translate_clast): Do not use loop->aux.  Initialize
2881         loop->can_be_parallel.
2882         (mark_loops_parallel): Removed.
2883         * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2884         * graphite.c (free_aux_in_new_loops): Removed.
2885         (graphite_finalize): Do not call free_aux_in_new_loops.
2886         (graphite_transform_loops): Do not call mark_loops_parallel.
2888 2009-10-26  Li Feng  <nemokingdom@gmail.com>
2890         * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2891         (translate_clast): Pass an extra parameter LEVEL.
2892         Call get_scattering_level.
2893         * graphite-clast-to-gimple.h (get_scattering_level): New.
2895 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2897         * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2898         * cfgloop.h (struct loop): New field single_iv.
2900         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2901         loop->aux anymore: use loop->single_iv.
2902         (graphite_loop_normal_form): Moved...
2903         (build_graphite_loop_normal_form): Removed.
2904         (gloog): Do not call build_graphite_loop_normal_form.
2905         (free_aux_in_new_loops): Moved...
2906         (mark_loops_parallel): Restructure.
2907         * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2908         * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2909         (scop_canonicalize_loops): New.
2910         (build_poly_scop): Call scop_canonicalize_loops.
2911         * graphite.c (free_aux_in_new_loops): ...here.
2913 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2915         * g++.dg/graphite/graphite.exp: Add the same rules as in
2916         gcc.dg/graphite/graphite.exp.
2918 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2920         * g++.dg/graphite/id-1.C: New.
2922 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2924         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2925         argument base_name.
2926         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2927         (rewrite_phi_out_of_ssa): Same.
2928         (rewrite_cross_bb_scalar_deps): Same.
2929         (translate_scalar_reduction_to_array): Same.
2931 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2933         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2934         dump_alias_graphs.
2936 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2938         * graphite-sese-to-poly.c (dump_alias_graphs): New.
2939         (build_scop_drs): Call dump_alias_graphs.
2941 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2943         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2944         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2945         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2946         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2947         * graphite-poly.h (free_lst): New.
2948         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2949         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2951 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2953         * graphite-poly.h (struct scop): Add a field saved_schedule.
2954         (SCOP_SAVED_SCHEDULE): New.
2955         (store_lst_schedule): New.
2956         (restore_lst_schedule): New.
2957         (store_scattering): Call store_lst_schedule.
2958         (restore_scattering): Call restore_lst_schedule.
2960 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2962         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2963         (pdr_add_alias_set): Same.
2964         (build_poly_dr): Same.
2965         (build_alias_set_optimal_p): Same.
2966         (build_base_obj_set_for_drs): Same.  Do not store the result of
2967         graphds_dfs.
2969 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2971         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2972         all_components_are_cliques to 1.
2974 2009-10-20  Li Feng  <nemokingdom@gmail.com>
2976         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2977         the new structure.
2978         (pdr_add_alias_set): Update retrieving alias_set_num.
2979         (build_poly_dr): Update retrieving dr_base_object_set.
2980         (partition_drs_to_sets): Remove.
2981         (build_alias_set_optimal_p): New.
2982         (build_alias_set_for_drs): Rename.
2983         (build_scop_drs): Update.
2984         * graphite-sese-to-poly.h (struct base_alias_pair): New.
2985         (ALIAS_SET_INDEX): Remove.
2986         (BASE_OBJECT_SET_INDEX): Remove.
2988 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2990         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2992 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2994         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2995         loop upper bounds for 1-element arrays at end of structures.
2996         * tree-flow.h (array_at_struct_end_p): Declared.
2997         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2999 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
3001         * g++.dg/graphite/pr41305.C: New.
3003 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
3005         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
3006         construction of parameter constraints from loop iteration analysis.
3007         * gcc.dg/graphite/run-id-2.c: New test.
3009 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3011         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
3012         and new_cstr.
3014 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3016         * graphite-dependences.c (dependence_polyhedron_1): Remove
3017         unused gdim dimensions from the DDR polyhedron.
3019 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3021         * graphite-dependences.c (pddr_transformed_scattering): New.
3022         (dot_original_deps_stmt_1): New.
3023         (dot_transformed_deps_stmt_1): New.
3024         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
3025         dot_transformed_deps_stmt_1.
3026         (dot_original_deps): New.
3027         (dot_transformed_deps): New.
3028         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
3030 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3032         * graphite-dependences.c (reduction_dr_1): Remove wrong
3033         assert: reduction BBs can have multiple reduction writes
3034         to memory.  interchange-3.f90 is an example.
3036 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3038         * gfortran.dg/graphite/interchange-3.f90: New.
3040 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3042         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
3044 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3046         * graphite-dependences.c (dependence_polyhedron_1): Add the
3047         context to the dependence polyhedron.
3049 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3051         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
3052         PBB_PDR_DUPLICATES_REMOVED.
3053         (new_poly_bb): Same.
3055 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3057         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
3058         SCOP_CONTEXT.
3059         (build_loop_iteration_domains): Extract bounds on parameters
3060         based on the data size.
3061         (build_scop_context): Do not initialize SCOP_CONTEXT;
3062         add new constraints.
3064 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3066         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
3067         * graphite-ppl.h (graphite-ppl.h): Declared.
3069 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3071         * graphite-ppl.c (ppl_print_linear_expr): New.
3072         (debug_ppl_linear_expr): New.
3073         * graphite-ppl.h (ppl_print_linear_expr): Declared.
3074         (debug_ppl_linear_expr): Declared.
3076 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
3078         * graphite-interchange.c: Fix comments.
3079         * gcc.dg/graphite/block-1.c: Fix comments.
3081 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
3083         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
3084         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
3086 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
3088         Reapply the patch from Alexander Monakov that disappeared during
3089         the last merges from trunk.
3091         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
3093         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3094         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
3096 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3098         * graphite-interchange.c (memory_stride_in_loop): The depth
3099         argument corresponds to a dynamic time dimension, so use
3100         psct_dynamic_dim to refer to the transformed scattering dimension.
3102 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3104         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
3106 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3108         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
3109         root of the LST.
3110         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
3111         the root of the LST.
3112         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
3113         fake loop.
3114         (print_lst): Print the root of LST in a different format.
3115         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
3117 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3119         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
3121 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3123         * doc/passes.texi: Document the Graphite infrastructure.
3125 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3127         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
3128         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
3129         and check the SSA representation.
3131         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
3133 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3135         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
3137 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3139         * gcc.dg/graphite/interchange-11.c: New.
3141 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3143         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
3145 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3147         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3148         Add -fno-loop-strip-mine and -fno-loop-interchange.
3149         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
3150         -fno-loop-strip-mine.
3151         * gfortran.dg/graphite/graphite.exp: Same.
3153 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3155         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3156         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
3157         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
3158         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
3159         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
3160         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
3161         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
3162         DEFAULT_FLAGS_GRAPHITE_SCOP.
3163         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
3164         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
3166 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3168         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
3170 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3171             Sebastian Pop  <sebastian.pop@amd.com>
3173         * graphite-interchange.c (build_linearized_memory_access): Pass an
3174         offset as parameter.
3175         (memory_stride_in_loop): Include transform scattering in the
3176         access functions to be able to querry the strides in the
3177         transformed loops.
3178         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
3179         not the psct_iterator_dim.
3181 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3183         * graphite-blocking.c (pbb_do_strip_mine): Removed.
3184         (lst_do_strip_mine_loop): New.
3185         (lst_do_strip_mine): New.
3186         (scop_do_strip_mine): Call lst_do_strip_mine.
3187         * graphite-poly.h (lst_add_loop_under_loop): New.
3188         (lst_find_first_pbb): New.
3190 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3192         * graphite-poly.c (loop_to_lst): Fix LST creation.
3194 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
3196         * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
3197         sizeof(unsigned long) to make it run on 32bit systems.
3199 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
3201         * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
3202         SEGFAULT on 32bit.
3204 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
3206         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
3207         Comment.
3208         (write_alias_graph_to_ascii_dot): New.
3209         (write_alias_graph_to_ascii_ecc): Ditto.
3210         (partition_drs_to_sets): Add testing of optimality of current method
3211         which assigns alias numbers according to DFS Comopnent number.  used
3212         as heuristic for the upcoming ECC algorithm.
3213         (build_scop_drs): Write to file also with the ecc and dot format.
3215 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
3217         * gfortran.dg/graphite/interchange-1.f: XFail.
3219 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
3221         * graphite.c (graphite_initialize): Do not handle functions with
3222         more than 100 basic blocks.
3224 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
3226         * graphite-blocking.c (pbb_do_strip_mine): Use
3227         PARAM_LOOP_BLOCK_TILE_SIZE.
3229 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
3231         * graphite-poly.c (dot_lst_1): New.
3232         (dot_lst): New.
3233         * graphite-poly.h (dot_lst): Declared.
3235 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
3237         * graphite-dependences.c (dot_deps_stmt_1): New.
3238         (dot_deps_stmt): New.
3239         * graphite-dependences.h (dot_deps_stmt): Declared.
3241 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
3243         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
3244         not replace cross BB scalar dependences ending on PHI nodes.
3245         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
3247 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
3249         * graphite-poly.c (apply_poly_transforms): Implement the high
3250         level driver for flag_loop_block.
3251         * opts.c (decode_options): Enable flag_loop_block at -O2.
3252         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
3253         flag_loop_block.
3255         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
3256         -floop-block.
3257         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3258         Add -floop-block.
3260 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
3262         * graphite-poly.h (lst_find_pbb): New.
3263         (find_lst_loop): New.
3265 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
3267         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
3268         * graphite-poly.h (struct scop): Remove dep_graph field.
3269         (SCOP_DEP_GRAPH): Removed.
3271 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
3273         * graphite-poly.h (copy_lst): Do full copy of LST.
3275 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
3277         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
3278         when the loop stride is zero.
3280         * gcc.dg/graphite/id-16.c: New.
3282 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
3284         * graphite-dependences.c (reduction_dr_1): New.
3285         (reduction_dr_p): New.
3286         (graphite_legal_transform_dr): Call reduction_dr_p.
3287         (reduction_ddr): Renamed reduction_ddr_p.
3288         * graphite-poly.h (same_pdr_p): New.
3289         (number_of_write_pdrs): New.
3290         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
3291         (split_reduction_stmt): Do not split reduction statements
3292         when there are no writes to memory.
3293         (translate_scalar_reduction_to_array_for_stmt): Insert the
3294         memory reduction statement just after the scalar reduction statement.
3296         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
3297         Un-XFAIL-ed.
3298         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
3299         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
3301 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
3303         * graphite-interchange.c (lst_apply_interchange): New.
3304         (lst_interchange_profitable_p): New.
3305         (lst_try_interchange_loops): New.
3306         (lst_try_interchange): New.
3307         (lst_do_interchange): New.
3308         (pbb_do_interchange): Removed.
3309         (scop_do_interchange): Call lst_do_interchange.
3311 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
3313         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
3314         SCOP_TRANSFORMED_SCHEDULE.
3315         (loop_to_lst): New.
3316         (scop_to_lst): New.
3317         (print_lst): New.
3318         (debug_lst): New.
3319         * graphite-poly.h (lst_p): New.
3320         (struct lst): New.
3321         (LST_LOOP_P): New.
3322         (LST_LOOP_FATHER): New.
3323         (LST_PBB): New.
3324         (LST_SEQ): New.
3325         (scop_to_lst): Declared.
3326         (print_lst): Declared.
3327         (debug_lst): Declared.
3328         (new_lst_loop): New.
3329         (new_lst_stmt): New.
3330         (copy_lst): New.
3331         (lst_depth): New.
3332         (lst_dewey_number): New.
3333         (struct scop): Add original_schedule and transformed_schedule fields.
3334         (SCOP_ORIGINAL_SCHEDULE): New.
3335         (SCOP_TRANSFORMED_SCHEDULE): New.
3336         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
3338 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3340         * graphite-dependences.c (reduction_ddr): New.
3341         (graphite_legal_transform_bb): Call reduction_ddr.
3342         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
3343         Initialize PBB_IS_REDUCTION.
3344         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
3345         (PBB_IS_REDUCTION): New.
3346         (new_poly_bb): Update declaration.
3347         * graphite-scop-detection.h (build_scop_bbs): Removed.
3348         (nb_reductions_in_loop): Removed.
3349         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
3350         parameter for reductions.
3351         (try_generate_gimple_bb): Update call to new_poly_bb.
3352         (build_scop_bbs_1): Same.
3353         (build_scop_bbs): Same.
3354         (gsi_for_phi_node): New.
3355         (scalar_close_phi_node_p): Remove gcc_assert.
3356         (split_reduction_stmt): New.
3357         (is_reduction_operation_p): New.
3358         (phi_contains_arg): New.
3359         (follow_ssa_with_commutative_ops): New.
3360         (detect_commutative_reduction_arg): New.
3361         (detect_commutative_reduction_assign): New.
3362         (follow_inital_value_to_phi): New.
3363         (edge_initial_value_for_loop_phi): New.
3364         (initial_value_for_loop_phi): New.
3365         (detect_commutative_reduction): New.
3366         (translate_scalar_reduction_to_array_for_stmt): New.
3367         (insert_copyout): New.
3368         (insert_copyin): New.
3369         (translate_scalar_reduction_to_array): New.
3370         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
3371         (rewrite_commutative_reductions_out_of_ssa_loop): New.
3372         (rewrite_commutative_reductions_out_of_ssa): New.
3373         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
3374         * sese.h (split_region_for_bb): New.
3376         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
3377         * gcc.dg/graphite/interchange-1.c: Fix format.
3378         * gcc.dg/graphite/interchange-10.c: New.
3380 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3382         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
3383         buggy assert.
3385 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3387         * graphite-sese-to-poly.c (scev_analyzable_p): New.
3388         (rewrite_cross_bb_scalar_dependence): New.
3389         (rewrite_cross_bb_scalar_deps): New.
3390         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
3391         Call rewrite_cross_bb_scalar_deps.
3393 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3395         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
3396         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
3397         gsi_for_stmt.
3399 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3401         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
3402         * graphite-interchange.c (pbb_do_interchange): Same.
3403         * graphite-poly.c (print_scattering_function): Same.
3404         (debug_pdrs): Same.
3405         * graphite-poly.h (pbb_loop): New.
3406         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
3408 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
3410         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
3412 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
3414         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
3415         so don't pass a pointer to it.
3416         (build_alias_set_for_drs): Same.
3417         (build_base_obj_set_for_drs): Same.
3418         (build_scop_drs): Same.
3420 2009-09-26  Li Feng  <nemokingdom@gmail.com>
3422         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
3423         the alias graph of data references.
3425 2009-09-25  Li Feng  <nemokingdom@gmail.com>
3427         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
3428         (build_scop_drs): When debugging, write the alias graph to file,
3429         otherwise, should be disabled.
3431 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3433         * Merge from mainline (151310:151361).
3435 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3437         * Merge from mainline (151171:151310).
3439 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3441         * Merge from mainline (151171:151806).
3443 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3445         * Revert the last commit.
3447 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3449         * Merge from mainline (151171:151819).
3451 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3453         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
3454         (is_simple_operand): Remove call to stmt_simple_memref_p.
3455         (stmt_simple_for_scop_p): Update call to is_simple_operand.
3457 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
3459         * gcc.dg/graphite/interchange-mvt.c: New File.
3460         * gcc.dg/graphite/scop-dsyrk.c: New File.
3461         * gcc.dg/graphite/scop-dsyr2k.c: New File.
3462         * gcc.dg/graphite/scop-mvt.c: New File.
3463         * gcc.dg/graphite/scop-sor.c: New File.
3465 2009-09-17 Li Feng  <nemokingdom@gmail.com>
3467         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
3468         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
3469         (graphite_carried_dependence_level_k): Ditto.
3470         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
3471         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
3472         (new_poly_dr): Adjust declaration.
3473         * graphite-sese-to-poly.c (free_data_refs_aux): New.
3474         (free_gimple_bb): Added free_data_refs_aux.
3475         (build_poly_dr): Add dr_base_object_set.
3476         (partition_drs_to_sets): New.
3477         (dr_same_base_object_p): New.
3478         (build_alias_set_for_drs): New.
3479         (build_base_object_set_for_drs): New.
3480         (build_scop_drs): Add build_base_obj_set_for_drs.
3481         * graphite-sese-to-poly.h: Added #define for alias set number index and
3482         base object set index.
3483         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
3484         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
3486 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
3488         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3489         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
3491 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3493         * graphite-sese-to-poly.c (struct irp_data): Removed.
3494         (idx_record_params): Removed.
3495         (find_params_in_bb): Scan for parameters the access functions; don't
3496         parse the tree representation.
3498 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3500         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
3501         passes at -O1 and below.
3503 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3505         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
3506         tree-scalar-evolution.h, and then tree-data-ref.h.
3507         * graphite-clast-to-gimple.c: Same.
3508         * graphite-dependences.c: Same.
3509         * graphite-interchange.c: Same.
3510         * graphite-poly.c: Same.
3511         * graphite-scop-detection.c: Same.
3512         * graphite-sese-to-poly.c: Same.
3513         * graphite.c: Same.
3514         * lambda-code.c: Same.
3515         * matrix-reorg.c: Same.
3516         * tree-data-ref.c: Same.
3517         * tree-if-conv.c: Same.
3518         * tree-loop-distribu: Same.: Same.
3519         * tree-loop-linear.c: Same.
3520         * tree-parloops.c: Same.
3521         * tree-predcom.c: Same.
3522         * tree-vect-patterns.c: Same.
3524 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
3526         Partially revert the previous patch, except the following.
3527         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
3528         as parameters the operands of the not expression.
3530 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3532         * tree-scalar-evolution.c (instantiate_scev_assign): New.
3533         Do not call analyze_scalar_evolution on assignments.
3534         (instantiate_scev_phi): Call analyze_scalar_evolution.
3535         (instantiate_scev_name): Call instantiate_scev_assign and
3536         instantiate_scev_phi.
3537         (instantiate_scev_not): Adapted to pass as parameters the operands
3538         of the not expression.
3540 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3542         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
3543         to pass as parameters the operands of the binary expression.
3545 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3547         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
3548         instantiate_scev_not.  Handle NEGATE_EXPR.
3549         (instantiate_scev_r): Handle NEGATE_EXPR.
3551 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3553         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
3554         instantiate_scev_r.
3555         (instantiate_scev_r): Move code in instantiate_scev_2
3556         and instantiate_scev_1.
3558 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3560         * tree-scalar-evolution.c (instantiate_scev_3): New.
3561         (instantiate_scev_1): Move code in instantiate_scev_3.
3563 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3565         * tree-scalar-evolution.c (instantiate_scev_poly): New.
3566         (instantiate_scev_1): Move code in instantiate_scev_poly.
3568 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3570         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3571         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3573 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3575         * tree-scalar-evolution.c (instantiate_scev_convert): New.
3576         (instantiate_scev_1): Move code in instantiate_scev_convert.
3578 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3580         * tree-scalar-evolution.c (instantiate_scev_binary): New.
3581         (instantiate_scev_1): Move code in instantiate_scev_binary.
3583 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3585         * tree-scalar-evolution.c (instantiate_scev_name): New.
3586         (instantiate_scev_1): Move code in instantiate_scev_name.
3588 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
3590         * Merge from mainline (150992:151171).
3592 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3594         * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3596 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3598         * graphite-dependences.c (graphite_legal_transform_bb): Call
3599         pbb_remove_duplicate_pdrs.
3600         * graphite-poly.c (can_collapse_pdr): Removed.
3601         (pdr_find_duplicate): Removed.
3602         (can_collapse_pdrs): New.
3603         (pbb_remove_duplicate_pdrs): New.
3604         (new_poly_dr): Do not look for duplicates.
3605         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3606         (PBB_PDR_DUPLICATES_REMOVED): New.
3607         (pbb_remove_duplicate_pdrs): Declared.
3609 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3611         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3612         the strides by multiplying by PDR_NB_REFS.
3613         * graphite-poly.c (can_collapse_pdr): New.
3614         (pdr_find_duplicate): New.
3615         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
3616         Initialize PDR_NB_REFS.
3617         * graphite-poly.h (struct poly_dr): Add field nb_refs.
3618         (PDR_NB_REFS): New.
3619         (new_poly_dr): Number of subscripts is a graphite_dim_t.
3621 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3623         Revert one of the previous commits:
3624         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3625         the computation of symmetric data dependence relations.
3626         (dependency_between_pbbs_p): Same.
3628 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3630         PR middle-end/40965
3631         * graphite-poly.c (apply_poly_transforms): Remove legality test before
3632         any transform.
3634 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3636         * graphite-dependences.c (pddr_original_scattering): Return NULL
3637         for read-read dependence relations.
3638         * graphite-poly.h (enum poly_dr_type): Fix comment.
3639         (pdr_read_p): New.
3640         (pdr_write_p): New.
3641         (pdr_may_write_p): New.
3643 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3645         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3646         (struct poly_dr): Same.
3647         (new_poly_dr): Same.
3648         * graphite-poly.c (new_poly_dr): Same.
3650 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3651             Sebastian Pop  <sebastian.pop@amd.com>
3653         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3654         pbb_strip_mine_time_depth.  Changed the implementation so that
3655         transformation is expressed as a transformation on
3656         time (scatttering) dimensions.  Also, ensures that the 2d+1
3657         scheduling format is preserved.
3658         (pbb_strip_mine_profitable_p): Profitability is based on the
3659         iteration number of a given time (scattering) dimension,
3660         and not on a original loop depth dimension.
3661         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3662         (pbb_do_strip_mine): Call psct_dynamic_dim.
3663         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3664         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3665         (pbb_nb_dynamic_scattering_transform): New.
3666         (psct_dynamic_dim): New.
3668 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3670         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3671         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3672         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3673         * graphite-interchange.c (build_linearized_memory_access): Same.
3674         (memory_stride_in_loop): Same.
3676 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3678         * graphite-dependences.c (pddr_original_scattering): New.
3679         (graphite_legal_transform_dr): Call pddr_original_scattering.
3680         (dot_deps_1): New.
3681         (dot_deps): New.
3682         * graphite-dependences.h (dot_deps): Declared.
3683         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3684         (print_pdr): Print PDR_ID.
3685         * graphite-poly.h (struct poly_dr): Add field id.
3686         (PDR_ID): New.
3687         (pbb_index): New.
3688         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3690 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
3692         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3693         not delete the original dependence relation.
3695 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3697         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3698         the computation of symmetric data dependence relations.
3699         (dependency_between_pbbs_p): Same.
3701 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3703         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3704         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3705         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3706         (free_poly_ddr): New.
3707         (pddr_is_empty): New.
3708         (dependence_polyhedron_1): Now returns a poly_ddr_p.
3709         (dependence_polyhedron): Same.  Remove useless gcc_assert.
3710         Remove fprintfs.
3711         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3712         (graphite_carried_dependence_level_k): Call pddr_is_empty.
3713         * graphite-dependences.h (enum poly_dependence_kind): New.
3714         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
3715         (PDRP_SOURCE): Renamed PDDR_SOURCE.
3716         (PDRP_SINK): Renamed PDDR_SINK.
3717         (PDRP_DDP): Renamed PDDR_DDP.
3718         (PDDR_KIND): New.
3719         (free_poly_ddr): Declared.
3720         * graphite-poly.c (new_scop): Use the new hash function names.
3721         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3722         into original_pddrs.
3723         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3725 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3727         * Merge from mainline (150764:150992).
3729 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3731         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3732         bounds with LT_EXPR to make niter analysis more precise on code
3733         generated by Graphite.
3735 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3737         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3738         (graphite_legal_transform_bb): Same.
3739         (poly_drs_may_alias_p): Same.
3741 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
3743         PR middle-end/40981
3744         * graphite-ppl.c (ppl_max_for_le): Correct the use of
3745         ppl_Pointset_Powerset_C_Polyhedron_maximize.
3747 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3749         * graphite-poly.c (print_pbb): Print PBB index.
3751 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3753         * Merge from mainline (r150672:150764).
3755 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3757         * graphite-interchange.c (ppl_max_for_le): Moved...
3758         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3759         * graphite-ppl.c (ppl_max_for_le): ... here.
3760         * graphite-ppl.h (ppl_max_for_le): Declared.
3762 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
3764         * Merge from mainline (r150372:150672).
3766 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3768         PR middle-end/40980
3769         * sese.c (convert_for_phi_arg): New.
3770         (add_guard_exit_phis): Use convert_for_phi_arg.
3772         * gfortran.dg/graphite/id-17.f: New.
3774 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3776         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3777         unknown subscript upper bounds.
3779         * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3781 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3782             Pranav Garg  <pranav.garg2107@gmail.com>
3784         * graphite-interchange.c (gather_access_strides): Removed.
3785         (ppl_max_for_le): New.
3786         (build_linearized_memory_access): New.
3787         (memory_stride_in_loop): New.
3788         (pbb_interchange_profitable_p): Reimplemented.
3789         * graphite-ppl.h (ppl_new_id_map): New.
3790         (ppl_interchange): New.
3792         * gcc.dg/graphite/interchange-6.c: XFAILed.
3794 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3796         * graphite-interchange.c (compute_subscript): Removed.
3797         (compute_array_size_cstr): Removed.
3798         (compute_array_size_poly): Removed.
3799         (compute_array_size): Removed.
3800         (gather_access_strides_poly): Removed.
3801         (gather_access_strides): Empty.
3803 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3805         * graphite-dependences.c (dependence_polyhedron_1): Replace
3806         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3807         (graphite_legal_transform_dr): Same.
3808         (graphite_carried_dependence_level_k): Same.
3809         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3810         Initialize PDR_NB_SUBSCRIPTS.
3811         (print_pdr_access_layout): Replace pdr_nb_subscripts with
3812         PDR_NB_SUBSCRIPTS.
3813         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3814         (PDR_NB_SUBSCRIPTS): New.
3815         (pdr_nb_subscripts): Removed.
3816         (pdr_dim): Simplified.
3817         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3818         with PDR_NB_SUBSCRIPTS.
3820 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3822         * graphite-interchange.c (compute_array_size): Remove use of
3823         PDR_DATA_CONTAINER.
3824         * graphite-poly.c (new_poly_dr): Remove argument data_container.
3825         Do not initialize PDR_DATA_CONTAINER.
3826         (print_pdr): Do not print PDR_DATA_CONTAINER.
3827         * graphite-poly.h (struct poly_dr): Remove data_container field.
3828         (PDR_DATA_CONTAINER): Removed.
3829         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3830         PDR_DATA_CONTAINER.
3831         (build_poly_dr): Same.
3833 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3835         * gcc.dg/graphite/interchange-9.c: New.
3837 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3838             Sebastian Pop  <sebastian.pop@amd.com>
3840         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3841         copy of the dependence polyhedron.  Free the temporary objects.
3842         (graphite_carried_dependence_level_k): Free unused objects before
3843         returning.
3845         * gcc.dg/graphite/interchange-1.c: XFAILed.
3846         * gcc.dg/graphite/interchange-2.c: XFAILed.
3847         * gcc.dg/graphite/interchange-3.c: XFAILed.
3848         * gcc.dg/graphite/interchange-4.c: XFAILed.
3849         * gcc.dg/graphite/interchange-7.c: XFAILed.
3851 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3853         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3854         Early return without analyzing the data dependences if no
3855         transform has been done.  Call restore_scattering if the transform
3856         is not legal.
3857         (graphite-interchange.c): Same.
3858         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3859         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3860         (apply_poly_transforms): Do not gcc_assert that
3861         the transform is legal.
3862         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3863         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3864         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3865         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3866         * graphite-poly.h (struct poly_scattering): New.
3867         (struct poly_bb): Add original, transformed, and saved fields.
3868         Remove transformed_scattering, original_scattering, nb_local_variables,
3869         and nb_scattering_transform fields.
3870         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3871         (poly_scattering_new): New.
3872         (poly_scattering_free): New.
3873         (poly_scattering_copy): New.
3874         (store_scattering_pbb): New.
3875         (store_scattering): New.
3876         (restore_scattering_pbb): New.
3877         (restore_scattering): New.
3878         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3879         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3881 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3883         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3884         (print_scop): Same.
3886 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3888         * Makefile.in (graphite.o): Depends on PREDICT_H.
3889         * graphite.c: Include predict.h.
3890         (graphite_finalize): Call tree_estimate_probability.
3891         * predict.c (predict_loops): Do not call scev_initialize and
3892         scev_finalize.
3893         (tree_estimate_probability_bb): New.
3894         (tree_estimate_probability): Do not initialize loops: move that
3895         code to the driver.  Call tree_estimate_probability_bb.
3896         (tree_estimate_probability_driver): New.
3897         (pass_profile): Use tree_estimate_probability_driver.
3898         * predict.h (tree_estimate_probability): Declared.
3900 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3902         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3903         * graphite-dependences.c (graphite_legal_transform): Add time to
3904         TV_GRAPHITE_DATA_DEPS.
3905         (dependency_between_pbbs_p): Same.
3906         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3908 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3910         * Merge from mainline (r149952:150372).
3912 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3914         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3915         * graphite-blocking.c: Same.
3916         * graphite-clast-to-gimple.c: Same.
3917         * graphite-dependences.c: Same.
3918         * graphite-poly.c: Same.
3919         * graphite-poly.h: Same.
3920         * graphite-ppl.c: Same.
3921         * graphite-scop-detection.c: Same.
3922         * graphite-sese-to-poly.c: Same.
3923         * graphite.c: Same.
3925 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3927         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3928         (remove_simple_copy_phi): New.
3929         (remove_invariant_phi): New.
3930         (simple_copy_phi_p): New.
3931         (reduction_phi_p): New.
3932         (gsi_for_ssa_name_def): New.
3933         (insert_out_of_ssa_copy): New.
3934         (insert_out_of_ssa_copy_on_edge): New.
3935         (create_zero_dim_array): New.
3936         (scalar_close_phi_node_p): New.
3937         (rewrite_close_phi_out_of_ssa): New.
3938         (rewrite_phi_out_of_ssa): New.
3939         (rewrite_reductions_out_of_ssa): New.
3940         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3942         * gcc.dg/graphite/id-11.c: New.
3943         * gcc.dg/graphite/id-15.c: New.
3944         * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3945         * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3946         * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3947         * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3948         * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3949         * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3950         * gfortran.dg/graphite/id-13.f: New.
3951         * gfortran.dg/graphite/id-5.f: New.
3953 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3955         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3956         check that nb_reductions_in_loop is zero.
3957         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3958         reduction phi nodes.
3959         (nb_reductions_in_loop): Removed.
3960         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3961         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3962         (bb_contains_non_iv_scalar_phi_nodes): Removed.
3963         (scop_contains_non_iv_scalar_phi_nodes): Removed.
3964         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3966 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3968         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3969         statements that have an empty iteration domain.
3970         * gfortran.dg/graphite/id-16.f: New.
3972 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3974         * tree-scalar-evolution.c (instantiate_scev_1): Return
3975         chrec_dont_know when the result is not above instantiate_below.
3976         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3977         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3978         the tree has a known scalar evolution.
3979         * gfortran.dg/graphite/id-14.f: New.
3980         * gfortran.dg/graphite/id-15.f: New.
3982 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3984         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3985         insert_gsi.
3986         (rename_variables): Keep inserting renames after the ones already
3987         inserted.
3989 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3991         * graphite-sese-to-poly.c (compare_bb_depths): New.
3992         (graphite_sort_dominated_info): New.
3993         (build_scop_bbs_1): Call graphite_sort_dominated_info.
3994         (build_scop_scattering): Fix comment.
3996 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3998         * graphite.c (graphite_finalize): Call print_loops instead of
3999         dump_function_to_file.
4000         * gcc.dg/graphite/graphite.exp: Fix formatting.
4001         * gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
4002         loops generated in the graphite output file.
4003         * gcc.dg/graphite/pr35356-2.c: New.
4004         * gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
4005         * gfortran.dg/graphite/id-12.f: New.
4007 2009-07-24  Li Feng  <nemokingdom@gmail.com>
4009         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
4010         Remove 2 XFAIL.
4012 2009-07-24  Li Feng  <nemokingdom@gmail.com>
4013             Tobias Grosser  <grosser@fim.uni-passau.de>
4015         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
4016         alias set number build alias in ACCESSES polyhedron.
4017         (build_alias_set_for_drs): New.
4018         (build_pbb_drs): Added build_alias_set_for_drs.
4019         * graphite-dependences.c (poly_drs_may_alias_p): New.
4020         (graphite_carried_dependence_level_k): Check alias information
4021         before building polyhedron.
4023 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4025         * Makefile.in (lambda-code.o): Fix formatting.
4027 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4029         * Merge from mainline (r149350-149952)
4031 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
4033         * graphite-poly.c (apply_poly_transforms): Move strip_mine
4034         before interchange to prepare for loop blocking.
4036 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
4038         * graphite-poly.c (apply_poly_transforms): Add checks after every
4039         transformation.
4040         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
4041         done in apply_poly_transforms.
4043 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
4045         * graphite-dependences.c (build_lexicographically_gt_constraint):
4046         Replace RES parameter with *RES.
4047         (dependence_polyhedron_1): Pass an address of the parameter RES
4048         instead of value of RES.
4050 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4052         * graphite.c (graphite_finalize): Fix comment.
4053         (graphite_transform_loops): Reset scev info after code generation
4054         of each scop.
4056 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4058         * graphite.c (graphite_finalize): Call scev_reset.
4060 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4062         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
4063         GBB_CLOOG_IV_TYPES hash table twice.
4064         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
4065         (add_condition_to_domain): Clear GMP values.
4067 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4069         * graphite-dependences.c: Fix formatting.
4070         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
4071         (pbb_number_of_iterations): Free ppl_Linear_Expression.
4072         * graphite-sese-to-poly.c: Fix formatting.
4073         * graphite.c (graphite_transform_loops): Create the hash table
4074         after the early return.
4076 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4078         * gcc.dg/graphite/id-14.c: New.
4079         * gcc.dg/graphite/pr40157.c: New.
4080         * gfortran.dg/graphite/id-11.f: New.
4082 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4084         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
4085         (build_poly_scop): Return false when there are no pbbs within
4086         loops to avoid to pass to cloog scops with no loops.
4088 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4090         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
4091         useless test "i % 2".
4092         (build_pbb_scattering_polyhedrons): Fix formatting.
4093         (build_poly_dr): Same.
4094         * graphite.c (graphite_transform_loops): Restructure.
4096 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
4098         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
4099         reduction_list parameter.
4100         (rewrite_all_phi_nodes_with_iv): Same.
4101         (canonicalize_loop_ivs): Same.
4102         * tree-parloops.c (struct brli): Removed.
4103         (build_reduction_list_info): Removed.
4104         (build_new_reduction): New.
4105         (analyze_reduction_list): Removed.
4106         (gather_scalar_reductions): Find reductions instead of phi
4107         nodes that can't be canonicalized.
4108         (try_create_reduction_list): Remove reduction_list parameter.
4109         (gen_parallel_loop): Same.
4110         (parallelize_loops): Remove analyze_reductions variable,
4111         initialization and free.
4112         Change reduction_list htab initialization to reduction_info
4113         elements instead of ssa names.
4114         Call try_create_reduction_list and gen_parallel_loop without
4115         analyzed_reduction argument.
4116         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
4117         canonicalize_loop_ivs with one less argument.
4118         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
4120 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
4122         * graphite-dependences.c (new_poly_dr_pair): New.
4123         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
4124         (new_poly_dr_pair): New.
4125         (eq_poly_dr_pair_p): New.
4126         (hash_poly_dr_pair_p): New.
4127         * graphite-dependences.h (struct poly_dr_pair): New.
4128         (eq_poly_dr_pair_p): Declared.
4129         (hash_poly_dr_pair_p): Declared.
4130         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
4131         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
4132         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
4133         * Makefile.in (graphite-poly.o): Add dependence on
4134         graphite-dependences.h.
4136 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
4138         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
4139         polynomials of degree > 1 pass to Graphite.
4140         * tree-chrec.c (scev_is_linear_expression): Call
4141         evolution_function_is_affine_multivariate_p.
4142         * gfortran.dg/graphite/id-10.f90: New.
4144 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
4146         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
4147         Instantiate scevs varying in outer loops.
4148         * gfortran.dg/graphite/id-9.f: Correct testcase.
4150 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
4152         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
4153         redundant constraint.
4155 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
4157         * gcc.dg/graphite/graphite.exp: Fix comments.
4158         * gfortran.dg/graphite/graphite.exp: Trigger actions
4159         based on the file names as in the C testsuite.
4160         * gfortran.dg/graphite/block-1.f90: Fix patterns.
4161         * gfortran.dg/graphite/block-2.f: Same.
4162         * gfortran.dg/graphite/block-3.f90: Same.
4163         * gfortran.dg/graphite/block-4.f90: Same.
4164         * gfortran.dg/graphite/id-1.f90: Same.
4165         * gfortran.dg/graphite/id-2.f90: Same.
4166         * gfortran.dg/graphite/id-3.f90: Same.
4167         * gfortran.dg/graphite/id-4.f90: Same.
4168         * gfortran.dg/graphite/id-6.f: Same.
4169         * gfortran.dg/graphite/id-9.f: Same.
4170         * gfortran.dg/graphite/interchange-1.f: Same.
4171         * gfortran.dg/graphite/interchange-2.f: Same.
4172         * gfortran.dg/graphite/scop-1.f: Same.
4174 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
4176         * sese.c (expand_scalar_variables_call): New.
4177         (expand_scalar_variables_ssa_name): Handle calls in expander.
4179 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
4181         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
4182         Expect to see the pattern twice.
4183         * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
4184         * gcc.dg/graphite/interchange-5.c: Same.
4185         * gcc.dg/graphite/interchange-6.c: Same.
4187 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
4189         * gcc.dg/graphite/id-10.c: New.
4190         * gcc.dg/graphite/id-12.c: New.
4191         * gfortran.dg/graphite/id-7.f: New.
4192         * gfortran.dg/graphite/id-8.f: New.
4194 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
4196         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
4197         zero.
4199 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
4201         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
4203 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
4205         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
4207 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
4209         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
4210         building PDR subscripts.
4212 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
4214         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
4215         computation of array sizes.
4217 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
4219         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
4221 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4223         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
4224         build_pairwise_constraint, dr_equality_constraints,
4225         build_pairwise_scheduling_equality,
4226         build_pairwise_scheduling_inequality, lexicographically_gt_p,
4227         build_lexicographically_gt_constraint, dependence_polyhedron,
4228         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
4229         Move from NNC_Polyhedron to C_Polyhedron.
4230         * graphite-interchange.c (compute_array_size_poly,
4231         gather_access_strides): Dito.
4232         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
4233         free_scop, pbb_number_of_iterations): Dito.
4234         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
4235         pbb_dim_iter_domain, struct scop): Dito.
4236         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
4237         new_Cloog_Domain_from_ppl_Polyhedron,
4238         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
4239         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
4240         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
4241         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
4242         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
4243         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
4244         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
4245         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
4246         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
4247         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
4248         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
4249         build_scop_iteration_domain, build_poly_dr): Dito
4251 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4253         * gcc.dg/graphite/graphite.exp: Added a rule to execute
4254         run-id-*.c files.
4255         * gcc.dg/graphite/run-id-1.c: New.
4257 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4259         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
4260         positivity constraint on the symbolic number of iterations.
4262 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4264         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
4266 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4267             Tobias Grosser  <grosser@fim.uni-passau.de>
4269         * graphite-clast-to-gimple.c (build_scop_context): Removed.
4270         (build_cloog_prog): Directly use SCOP_CONTEXT.
4271         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
4272         (free_scop): Free SCOP_CONTEXT.
4273         (print_scop_context): New.
4274         (print_scop): Call print_scop_context.
4275         (debug_scop_context): New.
4276         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
4277         (struct scop): Added field context.
4278         (SCOP_CONTEXT): New.
4279         * graphite-sese-to-poly.c (add_param_constraints): New.
4280         (build_scop_context): New.
4281         (build_poly_scop): Call build_scop_context.
4283 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4285         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
4286         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
4287         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
4288         * graphite-ppl.h: Include double-int.h and tree.h.
4289         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
4290         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
4291         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
4292         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
4294 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4296         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
4297         POINTER_PLUS_EXPR for pointer types.
4298         (clast_to_gcc_expression): Same.
4300 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4302         * graphite-poly.c (print_scattering_function): Early return when
4303         PBB_TRANSFORMED_SCATTERING is not initialized.
4304         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
4306 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
4308         * tree-parloops.c (analyze_reduction_list): Remove unused variable
4309         to fix bootstrap.
4311 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
4313         * tree-parloops.c (analyze_reduction_list): Change return
4314         value to void.
4315         (try_create_reduction_list): Move the call to
4316         analyze_reduction_list to the beginining.
4317         Call reduction_phi with analyzed_reductions as argument
4318         instead of reduction_list.
4320 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4322         *  Merge from mainline (r148296:149346)
4324 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4326         * graphite-scop-detection.c (graphite_can_represent_init): New.
4327         (graphite_can_represent_scev): Call graphite_can_represent_init:
4328         check that the initial value does not contain multiplications of
4329         parameters.
4330         (stmt_has_simple_data_refs_p): New.
4331         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
4332         (is_simple_operand): Fix formatting.
4333         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
4335 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4337         * gcc.dg/graphite/id-13.c: New.
4338         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
4339         analyze_scalar_evolution, use scalar_evolution_in_region.
4340         (scan_tree_for_params_right_scev): Add extra assert.
4341         (parameter_index_in_region_1): Split from parameter_index_in_region.
4342         (idx_record_params): Use scalar_evolution_in_region.
4343         (find_params_in_bb): Same.
4344         (find_scop_parameters): Same.
4345         (build_loop_iteration_domains): Same.
4346         (create_linear_expr_from_tree): Same.
4347         * sese.c (scalar_evolution_in_region): New.
4348         * sese.h (scalar_evolution_in_region): Declared.
4349         (defined_in_sese_p): New.
4350         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
4351         static anymore.
4352         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
4353         Declared.
4355 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4357         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
4358         TREE_DATA_REF_H also implies SCEV_H.
4360 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4362         * graphite-poly.c (print_scop_params): New.
4363         (print_scop): Call print_scop_params.
4364         (debug_scop_params): New.
4365         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
4367 2009-07-07  Li Feng  <nemokingdom@gmail.com>
4369         * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
4370         * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
4371         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
4372         * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
4373         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
4374         * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
4376 2009-07-07  Li Feng  <nemokingdom@gmail.com>
4378         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
4379         for dependency checking part.
4380         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
4381         tests for dependency checking.
4382         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4383         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4384         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
4385         flag -fdump-tree-graphite-all for autopar testsuites.
4387 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
4389         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
4390         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
4391         canonicalize_loop_ivs): Moved...
4392         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
4394 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
4396         * tree-parloops.c (try_create_reduction_list): Pass an extra
4397         argument analyzed_reductions.  Call analyze_reduction_list.
4398         (gen_parallel_loop): Do not call analyze_reduction_list.
4399         (parallelize_loops): Init and finalize analyzed_reductions.
4401 2009-07-06  Li Feng  <nemokingdom@gmail.com>
4403         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4404         Added flag -fno-loop-strip-mine for autopar testcase.
4406 2009-07-04  Li Feng  <nemokingdom@gmail.com>
4408         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
4409         transformed scattering dimension instead of unmatch orignal when
4410         calling dependence_polyhedron.
4412 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
4414         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
4416 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
4418         * graphite-poly.c (pbb_number_of_iterations): Check for returned
4419         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
4421 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
4423         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
4424         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
4425         * graphite-poly.c (pbb_number_of_iterations): New.
4426         * graphite-poly.h (pbb_number_of_iterations): Declared.
4427         (pbb_iterator_dim, pbb_parameter_dim): New.
4429 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
4431         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
4432         last commit on type of lower and upper bound of loops.
4434 2009-06-29  Li Feng  <nemokingdom@gmail.com>
4436         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
4437         graphite-dependences.h.
4438         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
4439         (mark_bb_with_pbb): New.
4440         (get_stmtfor_depth): New.
4441         (find_pbb_via_hash): New.
4442         (dependency_in_loop_p): New.
4443         (mark_loops_parallel): New.
4444         (free_aux_in_new_loops): New.
4445         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
4446         bb with it's relevant pbb. Mark newly created loops.  Remove mark
4447         innermost loop parallel without checking.
4448         (gloog): Add parameter BB_PBB_MAPPING.
4449         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
4450         (gloog): Change declaration.
4451         (mark_loop_parallel): Make extern.
4452         (free_aux_in_new_loops): Declare.
4453         (bb_pbb_map_hash): New.
4454         (eq_bb_pbb_map): New.
4455         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
4456         auto parallelization when flag_graphite_force_parallel is set.
4457         (graphite_finalize): Added free_aux_in_new_loops.
4458         * tree-parloops.c (parallelize_loops): Only generate parallel code for
4459         the innermost loop that marked parallel.  Use
4460         flag_graphite_force_parallel instead of loop->can_be_parallel.
4461         (loop_parallel_p): Move inner most checking out of function.
4463 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4465         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
4466         type of lower and upper bound of loops signed long int.
4468 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4470         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
4471         expression outside the loop.
4473 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4475         * gcc.dg/graphite/interchange-8.c: New.
4477 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4479         * gcc.dg/graphite/interchange-0.c: XFailed.
4480         * gcc.dg/graphite/interchange-5.c: XFailed.
4481         * gcc.dg/graphite/interchange-6.c: XFailed.
4483 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4485         * graphite-interchange.c (compute_array_size_poly): The end of the
4486         recursion should return 1.
4488 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4490         * graphite-interchange.c (compute_array_size_cstr): Allow the
4491         subscript multiplier to be -1.
4492         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
4493         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
4494         data_container.  Initializes PDR_DATA_CONTAINER.
4495         (print_pdr_access_layout): New.
4496         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
4497         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
4498         data_container.
4499         (PDR_DATA_CONTAINER): New.
4500         (new_poly_dr): Update declaration.
4501         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
4502         (build_poly_dr): Call pdr_add_data_dimensions.
4504 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4506         * graphite-poly.h (struct poly_dr): Fix comment.
4507         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
4508         (pdr_add_memory_accesses): New.
4509         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
4511 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4513         * graphite-poly.c (print_pdrs, debug_pdrs): New.
4514         (print_pbb): Add call to print_pdrs.
4515         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
4517 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
4518             Li Feng <nemokingdom@gmail.com>
4520         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
4521         (dependency_between_pbbs_p): New.
4522         (lexicographically_gt_p): Assure !empty_p before polyhedron
4523         intersection assign.
4524         (build_lexicographically_gt_constraint): Correct lexicographically
4525         judging.
4526         * graphite-dependences.h: New.
4527         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
4529 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4531         * graphite-clast-to-gimple.c (print_clast_stmt): New.
4532         (gloog): Print to dump_file the generated clast.
4533         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
4534         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
4536 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4538         * graphite-poly.c (extend_scattering): Increment
4539         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
4541 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4543         * graphite-interchange.c (compute_array_size_poly): Added exit of
4544         recursion condition.  Continue iterating even after the first equality.
4545         (compute_array_size): Same.
4547 2009-06-24  Li Feng  <nemokingdom@gmail.com>
4549         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
4550         -fdump-tree-final_cleanup to -fdump-tree-optimized.
4551         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4552         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4553         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
4555 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4557         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
4558         only when the use verifies is_gimple_reg.
4560 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4562         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
4563         Allocate scaldims after call to unify_scattering_dimensions.
4565 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4567         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4569 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4570             Albert Cohen  <albert.cohen@inria.fr>
4572         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4573         variables for the strip mining.
4575 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4576             Pranav Garg  <pranav.garg2107@gmail.com>
4578         * Makefile.in (OBJS-common): Added graphite-blocking.o.
4579         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4580         (graphite-blocking.o): New rule.
4581         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4582         * graphite-blocking.c: New.
4583         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4584         flag_loop_strip_mine.
4585         (psct_scattering_dim_for_loop_depth): New.
4586         * graphite-poly.h (scop_do_strip_mine): Declared.
4587         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4588         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4589         flag_loop_strip_mine.
4591 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4593         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4594         a GMP value and a PPL coefficient at each iteration of a loop.
4596 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4598         * graphite-dependences.c (dependence_polyhedron): Do not use
4599         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
4600         pbb_nb_scattering_transform.
4601         (graphite_legal_transform_dr): Same.
4602         * graphite-poly.c (extend_scattering): Same.
4603         (unify_scattering_dimensions): Same.
4604         (print_scattering_function): Same.
4605         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4606         PBB_NB_LOCAL_VARIABLES.
4607         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4608         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4609         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4610         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4611         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4612         (pbb_nb_scattering_transform): New.
4613         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4614         (psco_scattering_dim): Add assert on parameters.
4615         (psct_scattering_dim): Same.
4616         (psct_scattering_dim_for_loop_depth): Declared.
4617         (psct_local_var_dim): New.
4618         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4619         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
4620         correct layout, call pbb_nb_local_vars.
4621         (psct_add_local_variable, psct_add_scattering_dimension): New.
4622         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4623         Initialize PBB_NB_SCATTERING_TRANSFORM.
4625 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4627         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4628         (set_coef): Renamed ppl_set_coef.
4629         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4631 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4633         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4634         test a boolean against 1.
4635         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4636         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4637         (pbb_do_interchange): Returns true when a transform has been performed.
4638         (scop_do_interchange): Same.
4639         * graphite-poly.c (apply_poly_transforms): Use the return value of
4640         scop_do_interchange.
4641         * graphite-poly.h (scop_do_interchange): Update declaration.
4643 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
4645         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4646         after last use.
4647         * sese.c (sese_reset_aux_in_loops): New.
4648         * sese.h (sese_reset_aux_in_loops): New.
4650 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4652         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4653         multiplier and multiply the constant by the multiplier.
4654         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4655         (build_poly_dr): Do not use the multiplier to define the subscript.
4657 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4659         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4660         compiler's data reference.  Initialize PDR_CDR.
4661         (print_pdr): Call dump_data_reference.
4662         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4663         Add compiler_dr field.
4664         (PDR_BB): Renamed PDR_PBB.
4665         (PDR_CDR): New.
4666         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4667         GCC's data reference representation.
4668         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4669         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4671 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4673         * graphite-poly.c (print_scattering_function): Also print the layout.
4674         * graphite-poly.h (pbb_nb_local_vars): New.
4676 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4678         * graphite-poly.c (print_pbb_domain): Also print the layout names.
4680 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4682         * graphite-poly.c (print_pdr, debug_pdr): New.
4683         * graphite-poly.h (print_pdr, debug_pdr): Declared.
4684         (PDR_BASE): Removed.
4686 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4688         * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4689         ltrans-{1..6,8}.c.
4691 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4693         * graphite-interchange.c (compute_subscript): Allow also -1 in the
4694         subscript identification column.
4695         (pbb_do_interchange): Print to dump_file that some loops "will be
4696         interchanged".  Rely on that chain of characters in the testcases.
4697         * gcc.dg/graphite/interchange-0.c: New.
4698         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4699         interchange-*.c files and compile them with -floop-interchange.
4701 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
4703         * graphite-interchange.c (interchange_profitable_p): Renamed
4704         pbb_interchange_profitable_p.
4706 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4707             Harsha Jagasia  <harsha.jagasia@amd.com>
4708             Pranav Garg  <pranav.garg2107@gmail.com>
4710         * graphite-interchange.c (interchange_profitable_p): Make static.
4711         (pbb_interchange_loop_depths, pbb_do_interchange,
4712         scop_do_interchange): New.
4713         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4714         for flag_loop_interchange.
4715         * graphite-poly.h (scop_do_interchange): Declared.
4716         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4717         flag_loop_interchange is used.
4719 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4721         * graphite-dependences.c (dependence_polyhedron): Update use of
4722         pbb_nb_scattering_dims.
4723         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4724         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4725         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4726         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4728 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4730         * graphite.c: Cleanup foo.
4732 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4734         * Merge from mainline (r143684:148293).
4735         * Disabled libpcp until it gets fixed.
4737 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4738             Harsha Jagasia  <harsha.jagasia@amd.com>
4740         * graphite-interchange.c: New.
4741         * Makefile.in (graphite-interchange.o): New.
4742         * graphite-poly.h (interchange_profitable_p): Declared.
4743         * graphite-ppl.h (value_max): New.
4745 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4747         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4748         * graphite-poly.h: Fix some comments.
4749         (pdr_dim): New.
4750         (pdr_scop): New.
4752 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4754         * graphite-poly.h
4755         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4756         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4757         (pdr_accessp_nb_params): Renamed pdr_nb_params.
4758         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4759         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4760         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4761         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4762         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4763         * graphite-clast-to-gimple.c: Same.
4764         * graphite-dependences.c: Same.
4765         * graphite-poly.c: Same.
4766         * graphite-sese-to-poly.c: Same.
4768 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4770         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4771         expressions for an IV rename, as returned by clast_to_gcc_expression.
4772         (copy_renames): Rename new_name to expr.
4773         * sese.c (debug_rename_elt): Same.
4774         (get_rename): Same.
4775         (set_rename): Same.
4776         (sese_adjust_liveout_phis): Call force_gimple_operand before using
4777         the information from the rename map.
4778         (rename_variables_in_stmt): Same.
4779         (add_loop_exit_phis): Rename new_name to expr.
4780         (insert_loop_close_phis): Same.
4781         (add_guard_exit_phis): Same.  Call force_gimple_operand.
4782         * sese.h (struct rename_map_elt): Rename new_name to expr.
4783         (new_rename_map_elt): Same.
4785 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4787         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4788         * sese.c (set_rename): Make it extern.
4789         * sese.h (set_rename): Declared.
4791 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4793         * graphite-poly.c (extend_scattering): Free values.
4794         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4795         Free iterators.
4796         (ppl_print_powerset_matrix): Same.
4797         * graphite-scop-detection.c (free_scops_1): New.
4798         (limit_scops): Call free_scops_1.
4799         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4800         (build_poly_dr): Free PPL coefficients.
4801         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4803 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
4805         * graphite-dependences.c: New.
4806         * graphite-data-ref.c: Removed.
4807         * graphite-data-ref.h: Removed.
4808         * Makefile.in (graphite-data-ref.o): Removed.
4809         (graphite-dependences.o): Added.
4810         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4811         * graphite-poly.c: Same.
4812         Move the data dependence testing to graphite-dependences.c.
4814 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
4816         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4817         from graphite_cannot_represent_loop. Code refactored.
4818         (scopdet_basic_block_info): Call graphite_can_represent_loop.
4820 2009-05-17  Li Feng  <nemokingdom@gmail.com>
4822         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4823         Cover all the testcases (not only the filtered ones).
4825 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4827         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4828         unnecessary check. Update comments. Move check for REAL_TYPE here.
4829         (harmful_stmt_in_bb): Remove checks for conditions. This is already
4830         done in (stmt_simple_for_scop_p).
4832 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
4834         * graphite.c (print_global_statistics): New.
4835         (print_graphite_scop_statistic): New.
4836         (print_graphite_statistics): New.
4837         (graphite_initialize, graphite_transform_loops): Print statistics.
4838         * graphite-scop-detection (build_scops): Print statistics.
4839         (print_graphite_scop_statistics): New.
4840         (print_graphite_statistics): New.
4842 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4844         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4845         (debug_clast_name_index): Removed.
4846         (debug_clast_name_indexes_1): Removed.
4847         (debug_clast_name_indexes): Removed.
4848         (clast_name_index_elt_info): Removed.
4849         (eq_clast_name_indexes): Removed.
4850         (clast_name_to_index): Removed.
4851         (new_clast_name_index): Removed.
4852         (save_clast_name_index): Removed.
4853         (save_var_name): Moved...
4854         (init_sese_params_index): Removed.
4855         (clast_name_to_gcc): Remove use of name_tree.
4856         (initialize_cloog_names): Same.
4857         (gloog): Do not call init_sese_params_index.
4858         * graphite-sese-to-poly.c (save_var_name): ...here.
4859         (parameter_index_in_region): New.
4860         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4861         (parameter_index_in_region): Removed.
4862         (is_parameter): Remove use of name_tree.
4863         * sese.h (struct name_tree): Removed.
4864         (struct sese): Remove use of name_tree.  New field params_names.
4865         (SESE_PARAMS_NAMES): New.
4866         (SESE_PARAMS): Remove duplicate.
4867         (parameter_index_in_region): Removed.
4868         (sese_nb_params): Remove use of name_tree.
4869         (struct clast_name_index): New.
4870         (new_clast_name_index): New.
4871         (clast_name_to_index): New.
4872         (save_clast_name_index): New.
4873         (debug_clast_name_index): New.
4874         (debug_clast_name_indexes_1): New.
4875         (debug_clast_name_indexes): New.
4876         (clast_name_index_elt_info): New.
4877         (eq_clast_name_indexes): New.
4879 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4881         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4882         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
4883         (graphite_loop_normal_form): Do not pass region.  Do not
4884         initialize SESE_OLDIVS.
4885         (build_graphite_loop_normal_form): Update call to
4886         graphite_loop_normal_form.
4887         * sese.c (debug_oldivs): Removed.
4888         (new_sese): Do not initialize SESE_OLDIVS.
4889         (free_sese): Do not free SESE_OLDIVS.
4890         (oldiv_for_loop): Removed.
4891         * sese.h (struct sese): Remove old_ivs.
4892         (SESE_OLDIVS): Removed.
4893         (oldiv_for_loop): Removed.
4895 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4897         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4898         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
4899         replaced by a call to newivs_to_depth_to_newiv.
4900         (clast_to_gcc_expression): Pass newivs, remove ivstack.
4901         (clast_to_gcc_expression_red): Same.
4902         (gcc_type_for_clast_expr): Same.
4903         (gcc_type_for_clast_eq): Same.
4904         (graphite_translate_clast_equation): Same.
4905         (graphite_create_guard_cond_expr): Same.
4906         (graphite_create_new_guard): Same.
4907         (graphite_create_new_loop): Same.
4908         (build_iv_mapping): Same.
4909         (translate_clast): Same.
4910         (gloog): Same.
4911         (loop_iv_stack_patch_for_consts): Removed.  *
4912         sese.c (iv_stack_entry_is_constant): Removed.
4913         (iv_stack_entry_is_iv): Removed.
4914         (loop_iv_stack_push_iv): Removed.
4915         (loop_iv_stack_insert_constant): Removed.
4916         (loop_iv_stack_pop): Removed.
4917         (loop_iv_stack_get_iv): Removed.
4918         (loop_iv_stack_get_iv_from_name): Removed.
4919         (debug_loop_iv_stack): Removed.
4920         (free_loop_iv_stack): Removed.
4921         (loop_iv_stack_remove_constants): Removed.  *
4922         sese.h (iv_stack_entry_kind): Removed.
4923         (iv_stack_entry_data_union): Removed.
4924         (iv_stack_entry_struct): Removed.
4925         (iv_stack_entry_p): Removed.
4926         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4927         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4928         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4929         loop_iv_stack_pop, free_loop_iv_stack): Removed.
4930         (gbb_loop_at_index): Fix indenting.
4931         (gbb_loop_index): Removed.
4933 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4935         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4936         Call clast_name_to_index.
4938 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4940         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4941         do not pass params.  Get params from SESE_PARAMS.
4942         (clast_to_gcc_expression): Same.
4943         (clast_to_gcc_expression_red): Same.
4944         (gcc_type_for_clast_eq): Same.
4945         (graphite_translate_clast_equation): Same.
4946         (graphite_create_new_loop): Same.
4947         * sese.c (rename_variables_in_stmt): Fix comment.
4949 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4951         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4952         newivs_index.
4953         Call save_clast_name_index.
4954         (translate_clast): Pass newivs_index.
4955         (gloog): Create and free newivs_index.
4957 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4959         * graphite-clast-to-gimple.c (clast_name_index): New structure.
4960         (clast_name_index_p): New type.
4961         (debug_clast_name_index): New.
4962         (debug_clast_name_indexes_1): New.
4963         (debug_clast_name_indexes): New.
4964         (clast_name_index_elt_info): New.
4965         (eq_clast_name_indexes): New.
4966         (clast_name_to_index): New.
4967         (new_clast_name_index): New.
4968         (save_clast_name_index): New.
4969         (init_sese_params_index): New.
4970         (gloog): Call init_sese_params_index.
4971         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4972         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4973         (free_sese): Free SESE_PARAMS_INDEX.
4974         * sese.h (struct sese): Add params_index.
4975         (SESE_PARAMS_INDEX): New.
4977 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4979         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4980         (graphite_create_new_loop): Pass the newivs vector.  Push the
4981         newly created IV to newivs.
4982         (translate_clast): Pass the newivs vector.
4983         (gloog): Create and destroy the newivs vector.
4985 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4987         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4988         (graphite_loop_normal_form): Initialize loop->aux with the unique
4989         IV that has been created.
4991 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
4993         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4994         scev with parameters in the base part. They where forbidden
4995         exidently.
4997 2009-05-11  Li Feng  <nemokingdom@gmail.com>
4999         * gcc.dg/graphite/graphite.exp: Set different default
5000         compile options by file names.
5001         * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
5002         * gcc.dg/graphite/id-{1-9}.c: Ditto.
5003         * gcc.dg/graphite/scop-{0-20}.c: Ditto.
5004         * gcc.dg/graphite/scop-matmult.c: Ditto.
5006 2009-05-08  Li Feng <nemokingdom@gmail.com>
5008         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
5009         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
5010         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
5011         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
5013 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
5015         * graphite-scop-detection (build_scops_1): Fix little bug introduced
5016         by final cleanup.
5018 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
5020         * graphite-scop-detection.c (graphite_can_represent_scev): Only
5021         allow integer constant strides.
5022         (graphite_can_represent_expr): Depend on outermost_loop.
5023         (stmt_simple_memref_p, graphite_cannot_represent_loop,
5024         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
5025         build_scops_1): Same.
5026         (scopdet_basic_block_info): Same and insert layered SCoP
5027         detection.
5028         (try_generate_gimple_bb): Cleanup.
5029         (build_scops): Enable data references.
5031         * gcc.dg/graphite/id-5.c: New.
5032         * gcc.dg/graphite/id-9.c: New.
5033         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
5034         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
5036 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5038         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
5039         that we have not yet built for this SCoP.
5041 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5043         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
5044         for complex numbers.
5046 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5048         * graphite-ppl.c: Fix build if cloog is not available.
5050 2009-05-04  Li Feng  <nemokingdom@gmail.com>
5052         * tree-parloops.c (loop_parallel_p): Remove construction of
5053         NITER and REDUCTION_LIST.
5054         (try_get_loop_niter): New.
5055         (try_create_reduction_list): New.
5056         (parallelize_loops): Bypass the failed checkings in autopar
5057         when can_be_parallel in loop structure is set to true.
5059 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
5061         * gcc.dg/graphite/id-6.c: Update testcase.
5062         * gcc.dg/graphite/scop-3.c: Dito.
5064 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
5066         * graphite-scop-detection.c (stmt_simple_for_scop_p):
5067         Enable EQ_EXPR and NE_EXPR again.
5069 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5071         * graphite-scop-detection.c (graphite_can_represent_scev):
5072         Add check if scev is affine multivariate.
5073         (harmful_stmt_in_bb): Check if we can represent the conditions.
5074         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
5075         harmful_stmt_in_bb.
5076         * gcc.dg/graphite/id-7.c: New.
5078 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5080         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
5081         Check all bbs in region, not only the bbs that are represented in
5082         GRAPHITE.
5083         (build_poly_scop): Add newline.
5084         * gcc.dg/graphite/id-8.c: New.
5086 2009-04-30  Li Feng  <nemokingdom@gmail.com>
5088         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
5089         when loop initialize.
5090         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
5091         * common.opt: Declare flag_graphite_force_parallel.
5092         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
5093         loop parallel.
5094         * graphite-poly.c (apply_poly_transforms): Introduce
5095         flag_graphite_force_parallel.
5096         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
5097         * toplev.c (process_options): ditto and replace a not correctly
5098         encoded space.
5100 2009-04-30  Li Feng  <nemokingdom@gmail.com>
5102         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
5103         Change the call of gbb_loop_at_index and/or gbb_loop_index due
5104         to the redefinition.
5105         (compute_cloog_iv_types_1): ditto.
5106         (build_iv_mapping): ditto.
5107         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
5108         initialization.
5109         (free_gimple_bb): Removed GBB_LOOPS related free part.
5110         (build_bb_loops): Removed.
5111         * sese.h (struct gimple_bb): Removed loops.
5112         (GBB_LOOPS): Removed.
5113         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
5114         (gbb_loop_index): ditto.
5116 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
5118         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
5119         allow non constant strides.
5120         * gcc.dg/graphite/scop-20.c: New.
5122 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5124         * graphite-scop-detection.c (dot_all_scops): Fix system call
5125         return value warning.
5126         (dot_scop): Same.
5128 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5130         * gcc.dg/graphite/id-6.c: Fix pattern.
5131         * gcc.dg/graphite/scop-3.c: Same.
5133 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5135         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
5136         build_pairwise_constraint, dr_equality_constraints,
5137         build_pairwise_scheduling_equality,
5138         build_pairwise_scheduling_inequality, lexicographically_gt_p,
5139         build_lexicographically_gt_constraint, dependence_polyhedron,
5140         graphite_legal_transform_dr, graphite_legal_transform_bb,
5141         graphite_legal_transform): New.
5142         * graphite-poly.h (graphite_legal_transform): Declared.
5143         * graphite-sese-to-poly.c (build_poly_scop): Call to
5144         graphite_legal_transform is disabled for the moment.
5146 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5148         * graphite-poly.h (pbb_nb_scattering_dims): New.
5149         (pbb_nb_scattering): Use it.
5151 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5153         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
5154         Pointset_Powerset version of ppl_insert_dimensions.
5155         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
5157 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5159         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
5161 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5163         * graphite-poly.h: Fix comment.
5165 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5167         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
5169 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
5171         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
5172         statements.
5174 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
5176         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
5177         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
5178         conditions.
5180 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
5182         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
5183         handle EQ_EXPR and NE_EXPR.
5185 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
5187         * graphite-poly.h (poly_dr): Fix comment.
5189 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
5190             Tobias Grosser  <grosser@fim.uni-passau.de>
5192         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
5193         with a zero dimension polyhedron.
5194         (find_scop_parameters): Move the call to scop_set_nb_params here.
5195         (build_loop_iteration_domains): Store in loop->aux the iteration
5196         domain polyhedron.
5197         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
5198         by any loop in scop.
5199         (build_poly_scop): Do not call scop_set_nb_params.
5201 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
5202             Tobias Grosser  <grosser@fim.uni-passau.de>
5204         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
5205         add_condition_to_domain not GT_EXPR.
5207 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5209         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
5210         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
5211         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
5212         upper_bound_assign to calculate unions.
5213         * gcc.dg/graphite/id-6.c: New.
5215 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5217         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
5218         handle abnormal edges.
5220 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5222         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
5223         (free_poly_bb): Also free poly_drs.
5224         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
5225         (poly_dr): Polyhedron to Pointset_Powerset.
5226         (pdr_accessp_nb_subscripts): Same.
5227         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
5228         poly_drs.
5230 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5232         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
5233         names into more meaningful names.
5235 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5237         * gfortran.dg/graphite/interchange-1.c: New.
5238         * gfortran.dg/graphite/interchange-2.c: New.
5240 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5242         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
5243         the reduction_list.
5244         * tree-parloops.c (rewrite_phi_with_iv): New.
5245         (rewrite_all_phi_nodes_with_iv): New.
5246         (canonicalize_loop_ivs): Call them.
5248 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5250         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
5251         graphite_find_data_references_in_stmt.
5252         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
5253         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
5255 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5257         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
5259 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5261         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
5262         instead of bb_in_region.
5263         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
5264         (build_sese_conditions): Use flag_bb_in_sese.
5265         * sese.c (register_bb_in_sese): Removed.
5266         (new_sese): Remove initialization of SESE_REGION_BBS.
5267         (free_sese): Do not free SESE_REGION_BBS.
5268         * sese.h (struct sese): Remove field region_basic_blocks.
5269         (SESE_REGION_BBS): Removed.
5270         (bb_in_sese_p): Implement in function of bb_in_region.
5272 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5274         * graphite-scop-detection.c (limit_scops): Deal only with single exit
5275         loops.
5277 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
5279         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
5280         and EQ_EXPR.
5281         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
5282         (add_condition_to_domain): New.
5283         (add_condition_to_pbb): New.
5284         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
5285         * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
5287 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
5289         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
5290         ppl_Pointset_Powerset.
5291         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
5292         * graphite-poly.h (poly_bb): poly_bb.domain Same.
5293         (pbb_nb_loops): Same.
5294         * graphite-sese-to-poly.c (build_loop_iteration_domains,
5295         add_conditions_to_domain): Same.
5296         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
5297         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
5298         ppl_const_Polyhedron_t.
5299         (ppl_print_powerset_matrix): New.
5300         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
5301         ppl_print_powerset_matrix): New.
5302         (ppl_print_polyhedron_matrix): Updated.
5304 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
5306         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
5308 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
5310         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
5311         (print_iteration_domains, debug_iteration_domain,
5312         debug_iteration_domains): New.
5313         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
5314         debug_iteration_domains): Declared.
5315         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
5316         indenting.
5318 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5319             Sebastian Pop  <sebastian.pop@amd.com>
5321         * graphite-poly.h (print_iteration_domain): New.
5322         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
5323         (build_sese_conditions_1, build_sese_conditions_after,
5324         build_sese_conditions_before): New.
5325         (build_sese_conditions): Rewritten.
5327 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
5328             Tobias Grosser  <grosser@fim.uni-passau.de>
5330         Cleanup of code generation liveouts.
5331         * graphite-clast-to-gimple.c (translate_clast): Use a single
5332         rename_map instead of one per translated statement.
5333         Do not use SESE_LIVEOUT_RENAMES.
5334         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
5335         (gloog): Do not use SESE_LIVEOUT_RENAMES.
5336         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
5337         phi node of a reduction: when a loop contains a reduction used outside
5338         the loop, there should be a scalar close phi node on the exit block.
5339         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
5340         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
5341         (free_sese): Do not free them.
5342         (sese_build_liveouts_use): Do not use them.
5343         (sese_build_liveouts_bb): Same.
5344         (sese_build_liveouts): Same.
5345         (sese_insert_phis_for_liveouts): Same.
5346         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
5347         (defined_in_loop_p): New.
5348         (alive_after_loop): New.
5349         (close_phi_not_yet_inserted_p): New.
5350         (struct alep, alep_p): New.
5351         (add_loop_exit_phis): Remove from the rename_map all the names defined
5352         in the code generated loop.
5353         (insert_loop_close_phis): Traverse the rename_map passed to it.
5354         Don't use SESE_LIVEOUT_RENAMES.
5355         (default_liveout_before_guard): Renamed default_before_guard.
5356         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
5357         (graphite_copy_stmts_from_block): Do not directly call set_rename.
5358         (register_sese_liveout_renames): Removed.
5359         (copy_bb_and_scalar_dependences): Do not call it.
5360         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
5361         reduction_list.
5362         (SESE_LIVEOUT): Removed.
5363         (SESE_LIVEOUT_RENAMES): Removed.
5364         (SESE_REDUCTION_LIST): Removed.
5365         (sese_build_liveouts): Removed.
5366         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
5367         (insert_loop_close_phis): Pass a htab_t instead of a sese.
5368         (insert_guard_phis): Same.
5369         (rename_map_elt): Declare a VEC of them.
5370         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5371         trees not pointers to trees.
5373         Rewrite in canonical close SSA form:
5374         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
5375         (limit_scops): Close the scop after the block containing the close phi
5376         nodes.
5377         (canonicalize_loop_closed_ssa): New.
5378         (canonicalize_loop_closed_ssa_form): New.
5379         (build_scops): Call canonicalize_loop_closed_ssa_form.
5381         * graphite-sese-to-poly.c: Fix typos.
5383 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
5385         * graphite-poly.c (print_scattering_function, print_pbb_domain):
5386         Extended.
5387         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
5388         (print_pbb): Add conditions.
5390 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
5391             Sebastian Pop  <sebastian.pop@amd.com>
5393         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
5394         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
5395         (build_scop_bbs_1): New.
5396         (build_scop_bbs): Rewrite.
5397         * sese.h (bb_in_region): New.
5399 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5401         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5402         poly_drs vector.
5403         (print_scop): Style.
5404         * graphite-poly.h (poly_bb): Add drs vector.
5405         (PBB_DRS): Add accessor.
5406         * graphite-sese-to-poly.c (build_poly_dr): New.
5407         (build_pbb_drs, build_scop_drs): New.
5408         (build_poly_scop): call build_scop_drs (Disabled at the moment).
5410 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5412         * tree-ssa-loop.c: Include forgotten toplev.h
5414 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5416         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
5417         * gcc.dg/graphite/pr37883.c: Remove -floop-*
5418         * gcc.dg/graphite/pr37928.c: Same
5419         * gcc.dg/graphite/pr38409.c: Same
5420         * gcc.dg/graphite/pr38498.c: Same
5421         * gcc.dg/graphite/pr38559.c: Same
5422         * gcc.dg/graphite/pr39335.c: Same
5423         * gcc.dg/graphite/pr39335_1.c: Same
5424         * gfortran.dg/graphite/block-2.f: Same
5425         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
5426         with -floop-*.
5428 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
5430         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
5431         build_access_matrix, build_scop_data_accesses): Remove access function
5432         building. (We get a new version soon).
5433         (build_bb_loops, scan_tree_for_params_right_scev): Update.
5434         * sese.h (nb_loops_around_loop_in_sese): Remove.
5435         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
5437 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
5438             Sebastian Pop  <sebastian.pop@amd.com>
5440         * graphite-scop-detection.c (struct scopdet_info): Rename last
5441         field to exit.
5442         (scopdet_basic_block_info, build_scops_1): Don't use
5443         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
5445 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
5446             Sebastian Pop  <sebastian.pop@amd.com>
5448         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
5449         * sese.c (sese_build_liveouts_use): Renamed from
5450         sese_build_livein_liveouts_use. Remove liveins.
5451         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
5452         Call sese_build_liveouts_use.
5453         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
5454         Call sese_build_liveouts_bb.
5455         (new_sese, free_sese): Remove liveins.
5456         (sese_add_exit_phis_var): Deleted.
5457         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
5458         directly.
5459         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
5461         * sese.h (sese): Remove num_ver and livein.
5462         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
5464 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
5466         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
5468 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
5470         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
5471         (build_scop_scattering): Do not use compare_prefix_loops any more.
5472         (nb_common_loops): New.
5474 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5476         * sese.c (get_new_name_from_old_name): Renamed get_rename.
5477         (register_old_and_new_names): Renamed set_rename.
5479 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5481         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
5482         of the decl from the previous commit.
5484 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5486         * graphite-scop-detection.c (dot_scop): New.
5487         * graphite-scop-detection.h (dot_scop): Declared.
5489 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5491         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
5493 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5495         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
5496         condition at the end of the loop.
5497         * graphite.c (graphite_initialize, graphite_finalize): Print to
5498         dump_file the compiled function.
5499         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
5500         of create_empty_loop_on_edge.
5501         (translate_clast): Update the code generation of loops for the new
5502         shape of loops.
5503         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
5505 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5507         Reverted the patch from 2009-03-19.
5509 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
5511         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5512         poly_drs vector.
5513         (print_scop): Style.
5514         * graphite-poly.h (poly_bb): Add drs vector.
5515         (PBB_DRS): Add accessor.
5516         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
5517         (build_access_matrix_with_af, build_access_matrix,
5518         build_scop_data_accesses): Delete.
5519         (build_poly_dr): New.
5520         (build_pbb_drs, build_scop_drs): New.
5521         (build_poly_scop): call build_scop_drs.
5523 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
5525         * graphite-scop-detection.c (dot_all_scops_1): Close the table
5526         once per basic block.
5528 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
5530         * graphite-scop-detection.c (graphite_can_represent_scev): New.
5531         (graphite_can_represent_expr): Renamed from loop_affine_expr
5532         and enhanced.
5533         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
5534         (graphite_cannot_represent_loop): Add scop_entry to parameters.
5535         (scopdet_basic_block_info): Actually define entry_block.
5536         (stmt_simple_memref_p): Moved here from ...
5538         * tree-data-ref.c (stmt_simple_memref_p): here.
5539         * tree-data-ref.h (stmt_simple_memref_p): Removed.
5541 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
5543         * gcc.dg/graphite/id-4.c: New.
5545 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
5547         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5548         (register_old_and_new_names): Update the content of the map.
5549         When there was already a rename_map_elt in the map at that
5550         location, free it.
5551         (copy_bb_and_scalar_dependences): Do rename_variables after
5552         expand_scalar_variables.
5553         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5554         of the map.  When there was already a rename_map_elt in the
5555         map at that location, free it.
5556         (translate_clast): Pass the rename_map.  Do not initialize and free
5557         a rename_map per stmt_user.
5558         (gloog): Initialize and free one rename_map and pass it to
5559         translate_clast.
5561 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
5563         * sese.c (expand_scalar_variables_stmt,
5564         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5565         parameter.
5566         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5567         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5568         the gimple_stmt_iterator of the statement to be expanded.
5569         * graphite-scop-detection.c (is_simple_operand): Do handle
5570         REALPART_EXPR.
5572 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5574         * graphite-scop-detection.c (is_simple_operand): Do not handle
5575         REALPART_EXPR.
5576         * gcc.dg/graphite/id-2.c: New.
5578         * graphite-sese-to-poly.c (build_bb_loops,
5579         add_value_to_dim, scan_tree_for_params_right_scev,
5580         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5581         find_params_in_bb, build_loop_iteration_domains,
5582         add_conditions_to_domain): Remove subtract.
5584 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5586         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5587         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5588         pbb_loop_at_index -> gbb_loop_at_index.
5589         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5590         (debug_loop_vec): Delete.
5591         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5592         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
5593         (PBB_LOOPS): Removed.
5594         (PBB_BLACK_BOX): Insert cast.
5595         (pbb_set_black_box): New setter.
5596         (pbb_loop_at_index, pbb_loop_index): Removed.
5597         (scop_set_region, scop_set_nb_params): New.
5598         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5599         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5600         (build_poly_scop): Use scop_set_nb_params.
5601         * sese.h (gimple_bb): Add LOOPS.
5602         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5604 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5606         Revert previous commit.
5608 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5610         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5611         (register_old_and_new_names): Update the content of the map.
5612         When there was already a rename_map_elt in the map at that
5613         location, free it.
5614         (copy_bb_and_scalar_dependences): Do rename_variables after
5615         expand_scalar_variables.
5616         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5617         of the map.  When there was already a rename_map_elt in the
5618         map at that location, free it.
5619         (translate_clast): Pass the rename_map.  Do not initialize and free
5620         a rename_map per stmt_user.
5621         (gloog): Initialize and free one rename_map and pass it to
5622         translate_clast.
5624 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5626         Remove forgotten line in revert.
5628 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5630         Revert previous commit.
5632 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5634         * sese.c (register_old_and_new_names): Update the content
5635         of the map.  When there was already a rename_map_elt in the
5636         map at that location, free it.
5637         (copy_bb_and_scalar_dependences): Do rename_variables after
5638         expand_scalar_variables.
5639         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5640         of the map.  When there was already a rename_map_elt in the
5641         map at that location, free it.
5642         (translate_clast): Pass the rename_map.  Do not initialize and free
5643         a rename_map per stmt_user.
5644         (gloog): Initialize and free one rename_map and pass it to
5645         translate_clast.
5647 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5649         * graphite-clast-to-gimple.c (translate_clast): context_loop
5650         is never NULL.
5652 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5653             Sebastian Pop  <sebastian.pop@amd.com>
5655         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5656         of the use of ppl_Polyhedron_map_space_dimensions.
5658 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5659             Sebastian Pop  <sebastian.pop@amd.com>
5661         * graphite-poly.c (unify_scattering_dimensions): Fix types.
5662         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5663         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5664         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5665         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5666         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5667         pbb_nb_params): New.
5668         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5669         nb_loops_around_pbb): Adapt return types.
5671 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5673         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5674         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5675         graphite-scop-detection.o, graphite-poly.o): Add
5676         more headers.
5678 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5680         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5681         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5682         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5684 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5686         * gcc.dg/graphite/pr37485.c: Remove -floop-block
5687         * gcc.dg/graphite/pr37828.c: Same.
5688         * gcc.dg/graphite/pr37684.c: Same.
5689         * gcc.dg/graphite/block-0.c: Same.
5690         * gcc.dg/graphite/block-1.c: Same.
5691         * gcc.dg/graphite/block-2.c: Same.
5692         * gcc.dg/graphite/block-3.c: Same.
5693         * gcc.dg/graphite/block-4.c: Same.
5694         * gcc.dg/graphite/block-5.c: Same.
5695         * gcc.dg/graphite/block-6.c: Same.
5696         * gfortran.dg/graphite/pr38083.f90: Same.
5697         * gfortran.dg/graphite/block-1.f90: Same.
5698         * gfortran.dg/graphite/block-3.f90: Same.
5699         * gfortran.dg/graphite/pr37852.f90: Same.
5700         * gfortran.dg/graphite/block-4.f90: Same.
5701         * gfortran.dg/graphite/pr37980.f90: Same.
5702         * gfortran.dg/graphite/pr38953.f90: Same.
5703         * gfortran.dg/graphite/pr37857.f90: Same.
5704         * opts.c: Remove -floop-block from -O2.
5705         * graphite-poly.c: Fail if -floop-block -floop-interchange or
5706         -floop-strip-mine are used.
5708 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5709             Sebastian Pop  <sebastian.pop@amd.com>
5711         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5712         dimensions.
5713         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5714         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5715         strip_mine_profitable_p, is_interchange_valid,
5716         graphite_trans_bb_block, graphite_trans_loop_block,
5717         graphite_trans_scop_block): Temporary removed.
5718         (extend_scattering, unify_scattering_dimensions): New.
5719         (print_scattering_function, graphite_read_transforms):
5720         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5721         (graphite_generate_scattering_fns): Removed.
5722         (apply_poly_transforms): Cleanup.
5723         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5724         (schedule_to_scattering): Moved.
5725         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5726         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5727         (pbb_nb_scattering): New.
5728         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5729         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5730         Removed.
5731         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5732         shift_poly.
5733         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5734         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
5735         -> PBB_TRANSFORMED_SCATTERING.
5736         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5737         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5738         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5739         (check_poly_representation): Do not return bool.
5740         (graphite_transform_loops): Reformat.
5741         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5743 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
5745         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5746         debug_pbb_domain, debug_pbb, debug_scop): New.
5747         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5748         debug_pbb_domain, debug_pbb, debug_scop): Declared.
5750 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5752         PR middle-end/39335
5753         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5754         when the type precision of the induction variable should be
5755         larger than the type precision of nit.
5756         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5757         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5758         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5760         * gcc.dg/graphite/pr39335_1.c: New.
5761         * gcc.dg/graphite/pr39335.c: New.
5763 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5765         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5766         SSA_NAMES not struct reduction_info.
5768 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5770         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5772 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5773             Tobias Grosser  <grosser@fim.uni-passau.de>
5775         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5776         (free_sese): Free SESE_REDUCTION_LIST.
5777         * sese.h (struct sese): Add field reduction_list.
5778         (SESE_REDUCTION_LIST): New.
5779         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5780         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5782 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5783             Tobias Grosser  <grosser@fim.uni-passau.de>
5785         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5786         of loop_p.
5788 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5789             Tobias Grosser  <grosser@fim.uni-passau.de>
5791         * tree-parloops.c (struct brli, build_reduction_list_info,
5792         analyze_reduction_list, gather_scalar_reductions): New.
5793         (loop_parallel_p): Build a reduction list containing only
5794         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5795         (gen_parallel_loop): Call the analysis analyze_reduction_list.
5796         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5797         * tree-flow.h (gather_scalar_reductions): Declared.
5799 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
5801         PR middle-end/39308
5802         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5803         number_of_iterations_exit from a gcc_assert.
5805 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
5806             Jan Sjodin  <jan.sjodin@amd.com>
5808         * output.h (graphite_out_file, graphite_in_file): Declared.
5809         * toplev.c (graphite_out_file, graphite_in_file): New.
5810         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5811         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5812         Don't call schedule_to_scattering.
5813         * common.opt (fgraphite-write, fgraphite-read): New.
5814         * graphite-poly.c: Include output.h.
5815         (print_scattering_function, print_scattering_functions,
5816         debug_scattering_function, debug_scattering_functions,
5817         graphite_write_transforms, graphite_read_transforms,
5818         graphite_generate_scattering_fns): New.
5819         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5820         Call graphite_generate_scattering_fns, graphite_write_transforms,
5821         graphite_read_transforms.
5822         (new_poly_bb): Initialize PBB_SCATTERING.
5823         (free_poly_bb): Free PBB_SCATTERING.
5824         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5825         * graphite-poly.h (struct poly_bb): Add field scattering.
5826         (PBB_SCATTERING): New.
5827         (print_scattering_function, print_scattering_functions,
5828         debug_scattering_function, debug_scattering_functions): Declared.
5829         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5830         GMP values, not integers!
5831         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5832         ppl_read_polyhedron_matrix): New.
5833         * graphite-ppl.h (ppl_print_polyhedron_matrix,
5834         debug_ppl_polyhedron_matrix,
5835         ppl_read_polyhedron_matrix): Declared.
5836         * Makefile.in (graphite-poly.o): Depends on output.h.
5838 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5839             Tobias Grosser  <grosser@fim.uni-passau.de>
5841         Revert this change:
5842         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5843         scalar evolutions in the scop_entry->loop_father.
5845 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5846             Tobias Grosser  <grosser@fim.uni-passau.de>
5848         * graphite.h (ref_nb_loops): Remove declaration.
5849         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5850         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5851         debug_gbb): Moved to sese.h.
5852         * sese.h: As said.
5854 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5855             Tobias Grosser  <grosser@fim.uni-passau.de>
5857         * graphite-data-ref.[ch]: Disable.
5859 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5860             Tobias Grosser  <grosser@fim.uni-passau.de>
5862         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5863         scalar evolutions in the scop_entry->loop_father.
5865 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5867         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5868         (graphite_cannot_represent_loop_niter): Renamed
5869         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
5870         (limit_scops): build_sese_loop_nests does not return a bool.
5871         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5872         * sese.c (nb_reductions_in_loop): ... from here.
5873         (graphite_loop_normal_form): ... from here.
5874         (sese_record_loop): Does not fail, so does not return a bool.
5875         (build_sese_loop_nests): Same.
5876         * sese.h (build_sese_loop_nests): Update declaration.
5877         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5878         (build_graphite_loop_normal_form): New.
5879         (gloog): Call build_graphite_loop_normal_form.
5880         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5881         build_sese_loop_nests.
5883         * gcc.dg/graphite/id-1.c: New.
5885 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5886             Tobias Grosser  <grosser@fim.uni-passau.de>
5888         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5889         The SCoP detection fix is sufficient.
5891 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5893         PR tree-optimization/39260
5894         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5895         the basic block contains a condition with a real type.
5896         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5898         * gcc.dg/graphite/pr39260.c: New.
5900 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5902         * graphite-poly.c: Inlcude params.h.
5903         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5904         the size of a tile.
5905         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5906         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5908 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5909             Tobias Grosser  <grosser@fim.uni-passau.de>
5911         * graphite-scop-detection.c (dot_all_scops_1,
5912         dot_all_scops): Moved here.
5913         * graphite-scop-detection.h (dot_all_scops): Declared here.
5914         * graphite.c (graphite_initialize, graphite_finalize): New.
5915         (graphite_transform_loops): Cleaned up.
5916         * sese.c (debug_oldivs): Moved here.
5917         * graphite-poly.c (graphite_apply_transformations): Renamed
5918         apply_poly_transforms.
5919         (debug_loop_vec): Moved here.
5920         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5921         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5922         find_scop_parameters, build_scop_iteration_domain,
5923         add_conditions_to_constraints, build_scop_canonical_schedules,
5924         build_scop_data_accesses): Now static.
5925         (build_poly_scop, check_poly_representation): New.
5927 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5929         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5930         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5931         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5932         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5933         scan_tree_for_params_right_scev, scan_tree_for_params_int,
5934         scan_tree_for_params, struct irp_data, dx_record_params,
5935         find_params_in_bb, find_scop_parameters, gbb_from_bb,
5936         build_loop_iteration_domains, add_conditions_to_domain,
5937         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5938         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5939         build_sese_conditions, add_conditions_to_constraints,
5940         build_scop_iteration_domain, build_access_matrix_with_af,
5941         build_access_matrix,
5942         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5944         * graphite-sese-to-poly.c: New.
5945         * graphite-sese-to-poly.h: New.
5947         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5949 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5951         * graphite.c: Split graphite code generation to a new file.
5952         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5953         max_precision_type, clast_to_gcc_expression_red,
5954         clast_to_gcc_expression, gcc_type_for_clast_expr,
5955         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5956         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5957         graphite_create_new_guard, clast_get_body_of_loop,
5958         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5959         graphite_create_new_loop, build_iv_mapping, copy_renames,
5960         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5961         compute_cloog_iv_types, free_scattering, save_var_name,
5962         initialize_cloog_names, build_scop_context, build_cloog_prog,
5963         set_cloog_options, debug_clast_stmt, scop_to_clast,
5964         print_generated_program, debug_generated_program,
5965         gloog): Moved to graphite-clast-to-gimple.c.
5967         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5969         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5970         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5971         loop_iv_stack_pop, loop_iv_stack_get_iv,
5972         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5973         free_loop_iv_stack, loop_iv_stack_remove_constants,
5974         debug_rename_elt, debug_rename_map_1, debug_rename_map,
5975         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5976         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5977         eq_ivtype_map_elts, sese_add_exit_phis_edge,
5978         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5979         get_vdef_before_sese, sese_adjust_vphi,
5980         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5981         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5982         is_iv, expand_scalar_variables_ssa_name,
5983         expand_scalar_variables_expr, expand_scalar_variables_stmt,
5984         expand_scalar_variables, rename_variables, remove_condition,
5985         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5986         add_loop_exit_phis, insert_loop_close_phis, struct igp,
5987         default_liveout_before_guard, add_guard_exit_phis,
5988         insert_guard_phis, register_old_and_new_names,
5989         graphite_copy_stmts_from_block, register_sese_liveout_renames,
5990         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5991         if_region_set_false_region, create_if_region_on_edge,
5992         move_sese_in_condition): Moved to sese.c.
5994         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5995         if_region_exit, if_region_get_condition_block,
5996         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5997         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5998         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5999         ivtype_map_elt, new_ivtype_map_elt,
6000         recompute_all_dominators): Moved to sese.h.
6002         * graphite-clast-to-gimple.c: New.
6003         * graphite-clast-to-gimple.h: New.
6004         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
6005         * sese.c: Modified as said above.
6006         * sese.h: Same.
6008 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
6010         * graphite.c: Split scop detection to a new file.
6011         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
6012         move_sd_regions, loop_affine_expr, exclude_component_ref,
6013         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
6014         graphite_cannot_represent_loop_niter, struct scopdet_info,
6015         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
6016         find_single_entry_edge, find_single_exit_edge,
6017         create_single_entry_edge, sd_region_without_exit,
6018         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
6019         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
6020         Moved to graphite-scop-detection.c.
6022         * graphite-scop-detection.c: New.
6023         * graphite-scop-detection.h: New.
6024         * Makefile.in: Add new rule for graphite-scop-detection.o.
6026         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
6027         tree-scalar-evolution.h.
6028         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
6029         build_sese_loop_nests): Moved here from graphite.c.
6030         (param_index): Renamed parameter_index_in_region.
6032 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
6033             Sebastian Pop  <sebastian.pop@amd.com>
6035         * gcc.dg/graphite/block-0.c: Expected to fail now.
6036         * gcc.dg/graphite/block-1.c: Same.
6037         * gcc.dg/graphite/block-5.c: Same.
6038         * gcc.dg/graphite/block-6.c: Same.
6040 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
6041             Sebastian Pop  <sebastian.pop@amd.com>
6043         * graphite.h: Separate from graphite_bb_p the polyhedral
6044         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
6045         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
6046         graphite-data-ref.h.
6047         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
6048         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
6049         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
6050         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
6051         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
6052         scop_nb_params): Moved to graphite-poly.h.
6053         * graphite-data-ref.c: Same.
6054         * graphite-data-ref.h: New.
6055         * graphite.c: Same.
6056         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
6057         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
6058         is_interchange_valid, graphite_trans_bb_block,
6059         graphite_trans_loop_block, scop_max_loop_depth,
6060         graphite_trans_scop_block, graphite_apply_transformations,
6061         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
6062         graphite-poly.c.
6063         * graphite-poly.h: New.
6064         * graphite-poly.c: New.
6065         * Makefile.in (OBJS-common): Add graphite-poly.o.
6066         (graphite-poly.o): New rule.
6067         * tree-data-ref.h (struct data_reference): Remove unused scop field.
6068         (DR_SCOP): Removed.
6070 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
6071             Tobias Grosser  <grosser@fim.uni-passau.de>
6073         * graphite.c: Replace gb -> gbb.
6074         * graphite.h: Same.
6075         * graphite-data-ref.c: Same.
6077 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
6078             Tobias Grosser  <grosser@fim.uni-passau.de>
6080         * Makefile.in (OBJS-commmon): Add sese.o.
6081         (sese.o): New.
6082         (graphite.o): Add sese.h.
6083         * graphite.c (bb_in_ss_p, loop_in_sese_p,
6084         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
6085         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
6086         Move to sese.
6087         (block_before_scop): Add missing return.
6088         (new_scop, free_scop): Remove SESE data structures.
6089         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
6090         find_scop_parameters, build_loop_iteration_domains,
6091         add_conditions_to_domain, register_scop_liveout_renames,
6092         copy_bb_and_scalar_dependences): Scop -> SESE.
6094         (add_conditions_to_domain): SCoP -> SESE and remove check
6095         (scop_contains_non_iv_scalar_phi_nodes): New.
6096         (build_scop_conditions_1, build_scop_conditions): Remove check for
6097         non iv scalar phi nodes.
6098         (print_scop_statistics): New.
6099         (graphite_transform_loops): Cleanup.
6101         * graphite.h: Move to sese & cleanup.
6102         * sese.c: New.
6103         * sese.h: New.
6105 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6106             Tobias Grosser  <grosser@fim.uni-passau.de>
6108         * graphite.c (build_scop_conditions_1): Conditions are only
6109         at the end of a basic block.
6111 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6112             Tobias Grosser  <grosser@fim.uni-passau>
6114         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
6115         field.
6116         (GBB_ALPHA): Removed.
6118 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6119             Tobias Grosser  <grosser@fim.uni-passau.de>
6121         * graphite-data-ref.c (graphite_test_dependence): Don't use
6122         GBB_DYNAMIC_SCHEDULE.
6123         * graphite.c (new_graphite_bb): Same.
6124         (free_graphite_bb): Same.
6125         (build_scop_dynamic_schedules): Removed.
6126         (graphite_transform_loops): Don't call it.
6127         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
6128         (GBB_DYNAMIC_SCHEDULE): Removed.
6130 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6131             Tobias Grosser  <grosser@fim.uni-passau.de>
6133         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
6134         (print_graphite_bb): Same.
6135         (build_cloog_prog): Same.
6137 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6138             Tobias Grosser  <grosser@fim.uni-passau.de>
6140         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
6142 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6143             Tobias Grosser  <grosser@fim.uni-passau.de>
6145         * graphite.c (build_scop_context): Don't use CloogMatrix.
6146         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
6147         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
6149 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6150             Tobias Grosser  <grosser@fim.uni-passau.de>
6152         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
6153         liveout_renames, add_params fields...
6154         (struct sese): ... here.
6155         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
6156         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
6158 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6159             Tobias Grosser  <grosser@fim.uni-passau.de>
6161         * graphite.c (print_scop): Do not print the CLooG program.
6162         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
6163         build_cloog_prog, gloog): Don't use SCOP_PROG.
6164         (find_transform): Renamed scop_to_clast.
6165         (print_generated_program, debug_generated_program): New.
6166         (graphite_transform_loops): Adapt to new interface.
6167         * graphite.h (struct scop): Remove program field.
6168         (SCOP_PROG): Removed.
6169         (print_generated_program, debug_generated_program): Declared.
6171 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6173         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
6174         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
6175         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
6176         free_graphite_bb, build_scop_canonical_schedules,
6177         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
6178         schedules are now represented using a ppl_Linear_Expression_t.
6179         * graphite.h (struct graphite_bb): Same.
6180         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
6181         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
6183 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
6185         * graphite.c: Free local memory.
6186         * graphite-ppl.c: Same.
6188 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
6190         * graphite.c (const_column_index, get_first_matching_sign_row_index,
6191         get_lower_bound_row, get_upper_bound_row, copy_constraint,
6192         swap_constraint_variables, scale_constraint_variable): Removed.
6193         (graphite_trans_bb_strip_mine): Remove pong.
6194         * graphite-ppl.c: Include missing header files.
6195         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
6196         * graphite-ppl.h (ppl_strip_loop): Declared.
6197         * Makefile.in (graphite-ppl.o): Adjust dependences.
6199 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
6201         * graphite.c (build_loop_iteration_domains): Remove ping pong.
6202         (build_scop_iteration_domain): Same.
6204 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
6206         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
6207         ping pong.
6208         (add_value_to_dim, scan_tree_for_params_right_scev,
6209         scan_tree_for_params_int): New.
6210         * graphite-ppl.c (oppose_constraint): New.
6211         (insert_constraint_into_matrix): Implement missing cases.
6212         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
6214 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
6216         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
6217         use ppl_move_dimension.
6219 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
6221         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
6222         * graphite.c: Same.
6223         * graphite.h: Same.
6224         * graphite-ppl.c: Same.
6225         * graphite-ppl.h: Same.
6227 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
6229         Revert last 3 commits.
6231 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
6233         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
6234         ping pong.
6235         (add_value_to_dim, scan_tree_for_params_right_scev,
6236         scan_tree_for_params_int): New.
6237         * graphite-ppl.c (oppose_constraint): New.
6238         (insert_constraint_into_matrix): Implement missing cases.
6239         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
6241 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
6243         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
6245 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
6246             Tobias Grosser  <grosser@fim.uni-passau.de>
6248         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
6249         use ppl_move_dimension.
6250         * graphite-ppl.c (ppl_move_dimension): New.
6251         * graphite-ppl.h (ppl_move_dimension): Declared.
6253 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
6255         * graphite.c: Do not include cloog/cloog.h.
6256         (print_graphite_bb): Remove ping pong, call PPL print function.
6258 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
6260         * Makefile.in (OBJS-common): Add graphite-ppl.o.
6261         (graphite.o): Add dependence on graphite-ppl.h.
6262         (graphite-ppl.o): New.
6263         (graphite-data-ref.c): Ping pong between PPL data structures
6264         and matrices.
6265         * graphite-ppl.c: New.
6266         * graphite-ppl.h: New.
6267         * graphite.c: Include graphite-ppl.h.
6268         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
6269         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
6270         Ping pong between PPL data structures and matrices.
6271         (new_graphite_bb): Create a PPL constraint system.
6272         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
6273         (build_loop_iteration_domains): Use PPL functions.
6274         * graphite.h: Include graphite-ppl.h.  Fix comments.
6275         (graphite_bb): Use a ppl_Constraint_System_t instead of
6276         CloogMatrix for representing the domain.
6277         (scop): Remove static_schedule.
6278         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
6280 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
6282         * graphite.c: Fix some comments.
6284 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
6286         PR middle-end/38953
6287         * graphite.c (if_region_set_false_region): After moving a region
6288         in the false branch of a condition, remove the empty dummy
6289         basic block.
6290         (gloog): Remove wrong fix for PR38953.
6292 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
6294         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
6295         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
6296         register_bb_in_sese, new_sese, free_sese): Moved.
6297         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
6298         outermost_loop_in_scop, build_scop_iteration_domain,
6299         expand_scalar_variables_ssa_name, get_vdef_before_scop,
6300         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
6301         Use loop_in_sese_p instead of loop_in_scop_p.
6302         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
6303         (free_scop): Do not free SCOP_BBS_B.
6304         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
6305         ref_nb_loops): Moved here...
6306         * graphite.h (ref_nb_loops): ... from here.
6307         (struct scop): Remove bbs_b bitmap.
6308         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
6309         * gcc.dg/graphite/scop-19.c: New
6311 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
6313         * graphite.c (scopdet_basic_block_info): Fix bug in scop
6314         detection.
6316 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
6318         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6319         eq_loop_to_cloog_loop): Remove.
6320         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
6321         * graphite.h (struct scop): Remove loop2cloog_loop.
6322         (loop_domain_dim, loop_iteration_vector_dim): Remove.
6324 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
6326         * opts.c (decode_options): Only add graphite options to O2
6327         if we compile with graphite enabled.
6329 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
6331         * Merge from mainline (r143163:143684).
6333 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
6335         * graphite.c (debug_value): Removed.
6336         * graphite.h (debug_value): Removed.
6338 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
6340         * passes.c (init_optimization_passes): Do not call pass_copy_prop
6341         after graphite: pass_copy_prop does not maintain a proper loop closed
6342         SSA form.  pass_copy_prop should be fixed.
6344 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
6346         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
6348 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
6350         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
6351         (gloog): Split the exit of the scop when the scop exit is a loop exit.
6352         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
6353         changed the CFG.
6355 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
6357         * graphite.c (gloog): Return true when code gen succeeded.
6358         (graphite_transform_loops): Do not call cleanup_tree_cfg if
6359         the code of the function did not changed.  After cleanup_tree_cfg
6360         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
6361         form.
6363 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
6365         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
6366         gimple_call_lhs is NULL.
6368 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
6369             Tobias Grosser  <tobi.grosser@amd.com>
6371         * graphite.c (graphite_trans_scop_block): Do not block single
6372         nested loops.
6374 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
6375             Tobias Grosser  <tobi.grosser@amd.com>
6377         * graphite.c (build_scop_canonical_schedules): Start schedules at
6378         zero.
6380 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
6381             Tobias Grosser  <tobi.grosser@amd.com>
6383         * graphite.c (compare_prefix_loops): New.
6384         (build_scop_canonical_schedules): Rewritten.
6385         (graphite_transform_loops): Move build_scop_canonical_schedules
6386         after build_scop_iteration_domain.
6388 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
6389             Tobias Grosser  <tobi.grosser@amd.com>
6391         * graphite.c (add_conditions_to_domain): Add the loops to
6392         the dimension of the iteration domain.  Do copy the domain
6393         only when it exists.
6394         (build_scop_conditions_1): Do not call add_conditions_to_domain.
6395         (add_conditions_to_constraints): New.
6396         (can_generate_code_stmt, can_generate_code): Removed.
6397         (gloog): Do not call can_generate_code.
6398         (graphite_transform_loops): Call add_conditions_to_constraints
6399         after building the iteration domain.
6401 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
6402             Tobias Grosser  <tobi.grosser@amd.com>
6403             Jan Sjodin  <jan.sjodin@amd.com>
6405         * graphite.c (scan_tree_for_params): On substractions negate
6406         all the coefficients of the term.
6407         (clast_to_gcc_expression_red): New.  Handle reduction expressions
6408         of more than two operands.
6409         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
6410         (get_vdef_before_scop): Handle also the case of default definitions.
6412 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
6414         PR middle-end/38431
6415         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
6416         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
6417         (gloog): Do not call cleanup_tree_cfg.
6418         (graphite_transform_loops): Call cleanup_tree_cfg after all
6419         scops have been code generated.
6421 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
6423         * passes.c (init_optimization_passes): Schedule after
6424         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
6426 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
6428         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
6429         Fix comment.
6430         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
6431         Set the type of an expression to the type of its assign statement.
6432         (expand_scalar_variables_expr):  Do not pass loop_p.
6433         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
6434         (copy_bb_and_scalar_dependences): Do not pass loop_p.
6435         (translate_clast): Update call to copy_bb_and_scalar_dependences.
6437 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
6439         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
6440         an expression to the gimple_expr_type of its assign statement.
6441         (expand_scalar_variables_expr): Stop recursion on tcc_constant
6442         or tcc_declaration.
6444 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
6446         PR tree-optimization/38786
6447         * gcc.dg/graphite/pr38786.c: New.
6448         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
6449         the SSA_NAME case of expand_scalar_variables_expr.
6450         (expand_scalar_variables_expr): Also gather the scalar computation
6451         used to index the memory access.
6452         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
6453         the gimple_stmt_iterator where it inserts new code.
6455 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
6457         * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
6459 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
6461         * opts.c (decode_options): Enable flag_graphite_identity and
6462         flag_loop_block in -O2 and above.
6464 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
6466         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
6467         Fix merge problem: replace with the file from trunk.
6469 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
6471         * Merge from mainline (r141727:143163).
6473 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
6474             Jan Sjodin  <jan.sjodin@amd.com>
6476         PR tree-optimization/38559
6477         * gcc.dg/graphite/pr38559.c: New.
6479         * graphite.c (debug_value, copy_constraint,
6480         swap_constraint_variables, scale_constraint_variable, ): New.
6481         (get_lower_bound, get_upper_bound): Removed.
6482         (graphite_trans_bb_strip_mine): Clean up this code that works
6483         only for constant number of iterations.  Fully copy upper and
6484         lower bound constraints, not only the constant part of them.
6485         * graphite.h (debug_value): Declared.
6487 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
6489         PR tree-optimization/38492
6490         PR tree-optimization/38498
6491         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
6492         * tree-chrec.h (scev_is_linear_expression): Declared.
6493         * graphite.c (graphite_cannot_represent_loop_niter): New.
6494         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
6495         (graphite_loop_normal_form): Use gcc_assert.
6496         (scan_tree_for_params): Use CASE_CONVERT.
6497         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
6498         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
6499         Use gcc_assert.  Discard scops that contain unhandled cases.
6500         (build_scop_conditions): Return a boolean status for unhandled cases.
6501         (strip_mine_profitable_p): Print the loop number, not its depth.
6502         (is_interchange_valid): Pass the depth of the loop nest, don't
6503         recompute it wrongly.
6504         (graphite_trans_bb_block): Same.
6505         (graphite_trans_bb_block): Print tentative of loop blocking.
6506         (graphite_trans_scop_block): Do not print that the loop has been
6507         blocked.
6508         (graphite_transform_loops): Do not handle scops that contain condition
6509         scalar phi nodes.
6511         * gcc.dg/graphite/pr38500.c: Fixed warning as committed
6512         in trunk.
6513         * gcc.dg/graphite/block-0.c: Update test.
6514         * gcc.dg/graphite/block-1.c: Same.
6515         * gcc.dg/graphite/block-2.c: Remove xfail and test for
6516         blocking.
6517         * gcc.dg/graphite/block-4.c: Remove test for strip mine.
6518         * gcc.dg/graphite/block-3.c: New.
6519         * gcc.dg/graphite/pr38498.c: New.
6521 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
6523         PR tree-optimization/38510
6524         * gcc.dg/graphite/pr38510.c: New.
6525         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
6526           (translate_clast): Call recompute_all_dominators before
6527           graphite_verify.
6528           (gloog): Call recompute_all_dominators before graphite_verify.
6530 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
6532         PR tree-optimization/38492
6533         * graphite.c (rename_map_elt, debug_rename_elt,
6534         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
6535         rename_map_elt_info, eq_rename_map_elts,
6536         get_new_name_from_old_name, bb_in_sese_p): Moved around.
6537         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
6538         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
6539         (sese_build_livein_liveouts): New.
6540         (new_sese, free_sese): New.
6541         (new_scop): Call new_sese.
6542         (free_scop): Call free_sese.
6543         (rename_variables_from_edge, rename_phis_end_scop): Removed.
6544         (register_old_new_names): Renamed register_old_and_new_names.
6545         (register_scop_liveout_renames, add_loop_exit_phis,
6546         insert_loop_close_phis, struct igp,
6547         default_liveout_before_guard, add_guard_exit_phis,
6548         insert_guard_phis, copy_renames): New.
6549         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
6550         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
6551         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
6552         (scop_adjust_phis_for_liveouts): New.
6553         (gloog): Call scop_adjust_phis_for_liveouts.
6555         * graphite.h (struct sese): Documented.  Added fields liveout,
6556         num_ver and livein.
6557         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
6558         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
6559         (struct scop): Added field liveout_renames.
6560         (SCOP_LIVEOUT_RENAMES): New.
6562 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6564         PR tree-optimization/38409
6565         * gcc.dg/graphite/pr38409.c: New.
6566         * graphite.c (nb_reductions_in_loop): Use simple_iv.
6568 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6570         * graphite.c (gcc_type_for_cloog_iv): By default return
6571         integer_type_node.
6572         (graphite_create_new_loop): Don't fold_convert the already
6573         fold_convert-ed expression.
6575 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
6577         PR tree-optimization/38446
6578         * gcc.dg/graphite/pr38446.c: New.
6579         * graphite.c (register_bb_in_sese): New.
6580         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6581         looking at the bbs in the region.
6582         * graphite.h (sese): Add region_basic_blocks pointer set to
6583         structure and initialize at the time of defining new scop.
6585 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6587         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6588         (find_params_in_bb): Do not free data refs.
6589         (free_graphite_bb): Add FIXME on disabled free_data_refs.
6591 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6593         * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6594         * gcc.dg/graphite/scop-17.c: Same.
6595         * gcc.dg/graphite/block-5.c: New.
6596         * gcc.dg/graphite/block-6.c: New.
6597         * gcc.dg/graphite/pr37485.c: Clean dump file after.
6598         * gcc.dg/graphite/pr37684.c: Same.
6599         * gcc.dg/graphite/block-2.c: Same.
6601         * graphite.c (struct ivtype_map_elt): New.
6602         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6603         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6604         gcc_type_for_cloog_iv): New.
6605         (loop_iv_stack_patch_for_consts): Use the type of the induction
6606         variable from the original loop, except for the automatically
6607         generated loops, i.e., in the case of a strip-mined loop, in
6608         which case there is no original loop: in that case just use
6609         integer_type_node.
6610         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6611         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6612         (clast_name_to_gcc): Accept params to be NULL.
6613         (clast_to_gcc_expression): Take an extra parameter for the type.
6614         Convert to that type all the expressions built by this function.
6615         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6616         (graphite_translate_clast_equation): Compute the type of the
6617         clast_equation before translating its LHS and RHS.
6618         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6619         (graphite_create_new_loop): Compute the type of the induction
6620         variable before translating the lower and upper bounds and before
6621         creating the induction variable.
6622         (rename_variables_from_edge, rename_phis_end_scop): New.
6623         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6624         (sese_add_exit_phis_edge): Do not use integer_zero_node.
6625         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6626         compute_cloog_iv_types): New.
6627         (gloog): Call compute_cloog_iv_types before starting the
6628         translation of the clast.
6630         * graphite.h (struct graphite_bb): New field cloog_iv_types.
6631         (GBB_CLOOG_IV_TYPES): New.
6632         (debug_ivtype_map): Declared.
6633         (oldiv_for_loop): New.
6635 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
6637         PR middle-end/38459
6638         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6639         (param_index): Assert if parameter is not know after parameter
6640         detection.
6641         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6642         (find_scop_parameters): Mark, that we have finished parameter
6643         detection.
6644         (graphite_transform_loops): Move condition detection before parameter
6645         detection.
6646         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6647         * gfortran.dg/graphite/pr38459.f90: New.
6649 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6651         * graphite.c (graphite_transform_loops): Always call find_transform ()
6652         in ENABLE_CHECKING.  So we test these code paths, even if we do not
6653         generate code.
6655 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6657         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6658         (print_scop): Ditto.
6660 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6662         PR middle-end/38084
6663         Fix gfortran.dg/graphite/id-3.f90.
6664         * graphite.c (scopdet_basic_block_info): Fix bug that found some
6665         regions more than once.
6667 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6669         Fix gfortran.dg/graphite/id-4.f90.
6670         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6671         when not needed.
6673 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6675         Fix gfortran.dg/graphite/id-1.f90.
6676         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6677         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6678         (max_precision_type): New.
6679         (value_clast): Removed.
6680         (clast_to_gcc_expression): Be more careful to types of expressions.
6681         Use max_precision_type and update use of gmp_cst_to_tree.
6682         (graphite_translate_clast_equation): Use max_precision_type.
6683         (graphite_create_guard_cond_expr): Do not use integer_type_node,
6684         use the type of the condition.
6685         (graphite_create_new_loop): Do not use integer_type_node, use the
6686         max_precision_type of lb and ub.
6688 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6690         * graphite.c (build_scops_1): Initialize open_scop.exit
6691         and sinfo.last.
6693 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6695         * gcc.dg/graphite/pr38084.c: New.
6696         * gfortran.dg/graphite/id-1.f90: New.
6697         * gfortran.dg/graphite/id-2.f90: New.
6698         * gfortran.dg/graphite/id-3.f90: New.
6699         * gfortran.dg/graphite/id-4.f90: New.
6700         * gfortran.dg/graphite/pr37857.f90: New.
6702 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6703             Jan Sjodin  <jan.sjodin@amd.com>
6704             Harsha Jagasia  <harsha.jagasia@amd.com>
6706         PR middle-end/37852
6707         PR middle-end/37883
6708         PR middle-end/37928
6709         PR middle-end/37980
6710         PR middle-end/38038
6711         PR middle-end/38039
6712         PR middle-end/38073
6713         PR middle-end/38083
6714         PR middle-end/38125
6716         * gcc.dg/graphite/pr38073.c: New.
6717         * gcc.dg/graphite/pr37928.c: New.
6718         * gcc.dg/graphite/pr37883.c: New.
6719         * gcc.dg/graphite/pr38125.c: New.
6720         * gfortran.dg/graphite/pr38083.f90: New.
6721         * gfortran.dg/graphite/pr37852.f90: New.
6722         * gfortran.dg/graphite/pr37980.f90: New.
6724         * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6725         the number of detected scops.  Copy exact same test for loop
6726         blocking...
6727         * gcc.dg/graphite/block-1.c: Fix the number of expected
6728         loops to be blocked as reductions are not handled.
6729         * gcc.dg/graphite/block-4.c: ...here.  New.
6731         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6732         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6733         ...here.
6734         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6735         * Makefile.in (graphite.o): Depend on value-prof.h.
6736         (graphite.o-warn): Removed -Wno-error.
6737         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6738         to be a NULL pointer.  Call update_stmt.  Return the newly created
6739         cannonical induction variable.
6741         * graphite.h (debug_rename_map): Declared.  Fix some comments.
6743         * graphite.c: Reimplement the code generation from graphite to gimple.
6744         Include value-prof.h.
6745         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6746         (get_old_iv_from_ssa_name): Removed.
6747         (graphite_stmt_p): New.
6748         (new_graphite_bb): Test for useful statements before building a
6749         graphite statement for the basic block.
6750         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6751         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6752         reason.
6753         (recompute_all_dominators, graphite_verify,
6754         nb_reductions_in_loop, graphite_loop_normal_form): New.
6755         (scop_record_loop): Call graphite_loop_normal_form.
6756         (build_scop_loop_nests): Iterate over all the blocks of the
6757         function instead of relying on the incomplete information from
6758         SCOP_BBS.  Return the success of the operation.
6759         (find_params_in_bb): Use the data from GBB_DATA_REFS.
6760         (add_bb_domains): Removed.
6761         (build_loop_iteration_domains): Don't call add_bb_domains.
6762         Add the iteration domain only to the basic blocks that have been
6763         translated to graphite.
6764         (build_scop_conditions_1): Add constraints only if the basic
6765         block have been translated to graphite.
6766         (build_scop_data_accesses): Completely disabled until data
6767         dependence is correctly implemented.
6768         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6769         (remove_all_edges_1, remove_all_edges): Removed.
6770         (get_new_name_from_old_name): New.
6771         (graphite_rename_variables_in_stmt): Renamed
6772         rename_variables_in_stmt.  Call get_new_name_from_old_name.
6773         Use replace_exp and update_stmt.
6774         (is_old_iv): Renamed is_iv.
6775         (expand_scalar_variables_stmt): Extra parameter for renaming map.
6776         Use replace_exp and update_stmt.
6777         (expand_scalar_variables_expr): Same.  Use the map to get the
6778         new names for the renaming of induction variables and for the
6779         renaming of variables after a basic block has been copied.
6780         (expand_scalar_variables): Same.
6781         (graphite_rename_variables): Renamed rename_variables.
6782         (move_phi_nodes): Removed.
6783         (get_false_edge_from_guard_bb): New.
6784         (build_iv_mapping): Do not insert the induction variable of a
6785         loop in the renaming iv map if the basic block does not belong
6786         to that loop.
6787         (register_old_new_names, graphite_copy_stmts_from_block,
6788         copy_bb_and_scalar_dependences): New.
6789         (translate_clast): Heavily reimplemented: copy basic blocks,
6790         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
6791         At each translation step call graphite_verify ensuring the
6792         consistency of the SSA, loops and dominators information.
6793         (collect_virtual_phis, find_vdef_for_var_in_bb,
6794         find_vdef_for_var_1, find_vdef_for_var,
6795         patch_phis_for_virtual_defs): Removed huge hack.
6796         (mark_old_loops, remove_dead_loops, skip_phi_defs,
6797         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6798         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6799         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6800         if_region_get_condition_block, if_region_set_false_region,
6801         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6802         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6803         sese_add_exit_phis_edge, sese_add_exit_phis_var,
6804         rewrite_into_sese_closed_ssa): New.
6805         (gloog): Remove dead code.  Early return if code cannot be
6806         generated.  Call cleanup_tree_cfg once the scop has been code
6807         generated.
6808         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6809         block loops with less than two loops.
6810         (graphite_apply_transformations): Remove the call to
6811         scop_remove_ignoreable_gbbs.
6812         (limit_scops): When build_scop_loop_nests fails, continue on
6813         the next scop.  Fix open_scop.entry.
6814         (graphite_transform_loops): Call recompute_all_dominators: force the
6815         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6816         Call initialize_original_copy_tables and free_original_copy_tables
6817         to be able to copy basic blocks during code generation.
6818         When build_scop_loop_nests fails, continue on next scop.
6819         (value_clast): New union.
6820         (clast_to_gcc_expression): Fix type cast warning.
6822 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
6824         * Merge from mainline (r140838:141727).
6826 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6828         PR middle-end/37833
6830         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6832 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6834         PR middle-end/37943
6836         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6837         exits and conditions.
6838         * gcc.dg/graphite/pr37943.c: New.
6840 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6842         PR middle-end/37886
6843         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6845 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6847         * doc/invoke.texi: Fix spaces.
6849 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
6851         PR tree-optimization/37891
6852         Reverted last commit.
6853         * graphite.c (create_single_entry_edge): Set
6854         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6856 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
6857             Mitul Thakkar  <mitul.thakkar@amd.com>
6859         * graphite.c (create_single_entry_edge): Set
6860         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6862 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
6864         * doc/invoke.texi: Add -fgraphite-identity.
6865         * graphite.c (graphite_apply_transformations): Check for
6866         -fgraphite-identity.
6867         * toplev.c (process_options): Add flag_graphite_identity.
6868         * tree-ssa-loop.c: Add flag_graphite_identity.
6870 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6872         Undo changes from 2008-10-02:
6873         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6874         operand type when copying the operand to a variable of different type.
6875         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6876         with the IV name after increment.
6878 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6879             Harsha Jagasia  <harsha.jagasia@amd.com>
6881         PR tree-optimization/37828
6882         * gcc.dg/graphite/pr37828.c: New.
6883         * graphite.c (graphite_trans_loop_block): Do not loop block
6884         single nested loops.
6886 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
6887             Sebastian Pop  <sebastian.pop@amd.com>
6889         * graphite.c (struct rename_map_elt, new_rename_map_elt,
6890         rename_map_elt_info, eq_rename_map_elts): New.
6891         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6892         (expand_scalar_variables_expr): Change parameters.
6893         (expand_scalar_variables_stmt): Same.
6894         (expand_scalar_variables): Same.
6895         (graphite_rename_ivs): Rename graphite_rename_variables.
6896         (build_iv_mapping): New.
6897         (translate_clast): Call build_iv_mapping.
6898         * graphite.h (gbb_p): New name.
6900 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
6902         PR tree-optimization/37684
6903         * gcc.dg/graphite/pr37684.c: New.
6904         * graphite.c (exclude_component_ref): New.
6905         (is_simple_operand): Call exclude_component_ref.
6907 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
6908             Harsha Jagasia  <harsha.jagasia@amd.com>
6910         PR tree-optimization/37485
6911         * gcc.dg/graphite/block-2.c: New
6912         * graphite.c (gmp_cst_to_tree): Moved.
6913         (iv_stack_entry_is_constant): New.
6914         (iv_stack_entry_is_iv): New.
6915         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6916         (loop_iv_stack_insert_constant): New.
6917         (loop_iv_stack_pop): Use new datatpype.
6918         (loop_iv_stack_get_iv): Same.
6919         (loop_iv_stack_get_iv_from_name): Same.
6920         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6921         (loop_iv_stack_patch_for_consts): New.
6922         (loop_iv_stack_remove_constants): New.
6923         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6924         (translate_clast): Call loop_iv_stack_patch_for_consts and
6925         loop_iv_stack_remove_constants.
6926         (gloog): Use new datatype.  Redirect construction edge to end
6927         block to avoid accidental deletion.
6928         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
6929         iv stack entry.
6930         (union iv_stack_entry_data): New.  Data in iv stack entry.
6931         (struct iv_stack_entry): New.  Datatype for iv stack entries.
6933 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6935         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6936         operand type when copying the operand to a variable of different type.
6938 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6940         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6941         with the IV name after increment.
6943 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6945         * Merge from mainline (r140164:140838).
6947 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6949         * graphite-data-ref.c: New.
6950         * graphite.c (print_scop): Also dump the dependence graph.
6951         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6952         (new_scop): Initialize SCOP_DEP_GRAPH.
6953         (build_scop_dynamic_schedules): New.
6954         (build_access_matrix_with_af): Fixed column numbering.
6955         (graphite_transform_loops): Call build_scop_dynamic_schedules.
6956         * graphite.h: Add ifndef/define guards against multiple inclusion.
6957         (struct scop): Add dep_graph field.
6958         (SCOP_DEP_GRAPH): Defined.
6959         (ref_nb_loops): Fixed and moved to other position.
6960         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6961         (nb_loops_around_loop_in_scop): New.
6962         (graphite_dump_dependence_graph): Declared.
6963         (graphite_build_rdg_all_levels): Declared.
6964         (graphite_test_dependence): Declared.
6965         * Makefile.in (graphite-data-ref.o): New target.
6967 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
6969         * Merge from mainline (139870:140164).
6971 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6973         * Merge from mainline (138275:139870).
6974         * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6975         the commits from trunk broke the niter detection.
6977 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6979         * graphite.c: Add more documentation.  Fix formatting.
6980         (debug_loop_vec, debug_oldivs, loop_iv_stack,
6981         loop_iv_stack_debug): Moved...
6982         (schedule_to_scattering): Move before use.
6983         (dot_all_scops): Include in "#if 0" the code for system
6984         call dotty.
6986         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6987         loop_iv_stack_debug): ...here.
6989 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
6991         * tree-phinodes.c (make_phi_node): Extern.
6992         (add_phi_node_to_bb): New.
6993         (create_phi_node): Call add_phi_node_to_bb.
6994         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6995         (remove_statement): Handle case where stored phi was updated
6996         and is no longer the same.
6997         * graphite.c (is_parameter): New.
6998         (is_old_iv): New.
6999         (expand_scalar_variables_expr): New.
7000         (expand_scalar_variables_stmt): New.
7001         (expand_scalar_variables): New.
7002         (move_phi_nodes): Create new phi instead of moving old one.
7003         (translate_clast): Call expand_scalar_variables.
7004         (find_vdef_for_var_in_bb): Also scan regular definitions.
7005         (skip_phi_defs): New.
7006         (collect_scop_exit_phi_args): New.
7007         (patch_scop_exit_phi_args): New.
7008         (gloog): Patch phis after scop.
7009         * tree-flow.h: (add_phi_node_to_bb): Declared.
7010         (make_phi_node): Declared.
7012 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
7014         * graphite.c (end_scop): Split the entry of the scop when it
7015         is the header of the loop in which the scop is ending.
7016         (build_scops_1, limit_scops): Update uses of end_scop.
7018 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
7020         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
7021         SCOP_ENTRY or SCOP_EXIT.
7023 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7025         * graphite.c (get_construction_edge): Removed.
7026         (gloog): Construction edge is the scop entry edge.
7028 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7030         * graphite.c (can_generate_for_scop): Removed.
7031         (gloog): Do not call it.
7033 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7035         * graphite.c (new_scop): Entry of a scop is an edge.
7036         Initialize SESE region.
7037         (free_scop): Free SESE region.
7038         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
7039         (split_difficult_bb): New, split from end_scop.
7040         (end_scop): Exit of a scop is an edge.
7041         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
7042         not automatically updated and thus is always wrong.
7043         * graphite.h (struct sese): New.
7044         (SESE_ENTRY): New.
7045         (SESE_EXIT): New.
7046         (struct scop): New field for a SESE region.  Remove entry, exit.
7047         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
7048         semantics as before.  Moved comment around.
7050 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
7051             Sebastian Pop  <sebastian.pop@amd.com>
7053         * graphite.c (graphite_transform_loops): Always enable gloog
7054         and find_transform when ENABLE_CHECKING.
7056 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7058         * graphite.c (graphite_transform_loops): Move pretty printer
7059         of SCOPs before doing any transform.  Remove call to print_scops
7060         and dot_all_scops_1.
7062 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7064         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
7065         (print_graphite_bb): Same.
7067 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7069         * graphite.c (dot_all_scops_1): Cleanup.
7070         (move_scops): Fix comment.
7072 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7074         * graphite.c (build_scop_bbs): Revert commit 139355:
7076         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7077                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7079                 * graphite.c (build_scop_bbs): Factor up code.
7081 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
7083         * graphite.c (gloog): Update dominator info.
7085 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
7087         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
7089 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
7091         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
7092         initialization.
7093         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
7094         (translate_clast): Correct formatting.
7095         * graphite.h (struct num_map): Removed.
7096         (struct graphite_bb): Remove num_map field.
7097         (GBB_INDEX_TO_NUM_MAP): Removed.
7099 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
7101         * graphite.c (build_access_matrix_with_af): Fix comments.
7102         (build_scop_data_accesses): Same.
7104 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
7106         * graphite.c (build_scop_data_accesses): Don't construct
7107         access matrices.  Add a FIXME and an assert condition that
7108         should pass when the access matrices will be needed.
7110 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
7112         * tree-data-ref.c (stmt_simple_memref_p): Don't call
7113         really_constant_p.
7114         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
7115         Moved close by free_graphite_bb.
7116         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
7117         (new_scop): Move close by free_scop.
7118         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
7120 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
7122         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
7123         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
7124         instead of recursive call.
7125         (graphite_translate_clast_equation): New.
7126         (graphite_create_guard_cond_expr): New.
7127         (graphite_create_new_guard): New.
7128         (get_stack_index_from_iv): Removed.
7129         (graphite_rename_ivs_stmt): Use gbb_loop_index.
7130         (get_true_edge_from_guard_bb): New.
7131         (translate_clast): Handle stmt_guard in clast.
7132         (get_construction_edge): Allow construction edge detection for
7133         a scope entry with multiple predecessors if one predecessor is
7134         the immediate dominator of scope entry.
7135         (can_generate_code_stmt): Enable code generation for clast_guard.
7136         (gloog): Use correct context loop.  Removed check for post dominators.
7137         * cfgloop.h (create_empty_if_region_on_edge): Declared.
7139 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
7141         * graphite.c (remove_dead_loops): Document better which
7142         loops are removed.
7144 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
7146         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
7147         and PPLINC.
7148         (graphite.o): Also depends on pointer-set.h.
7150 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
7152         * graphite.c (scop_record_loop): Fix compile warning.
7154 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
7155             Sebastian Pop  <sebastian.pop@amd.com>
7157         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
7159 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
7161         * graphite.c (build_graphite_bb): Initialize bb->aux to
7162         point to the graphite_bb_p.
7163         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
7164         content of bb->aux.
7165         (add_bb_domains): Does not use the scop parameter.
7166         (graphite_transform_loops): Clean bb->aux at the end.
7168 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7169             Sebastian Pop  <sebastian.pop@amd.com>
7171         * lib/target-supports.exp
7172         (check_effective_target_fgraphite): New.
7174         * gcc.dg/graphite/graphite.exp: Early exit when
7175         check_effective_target_fgraphite returns false.
7176         Set dg-do-what-default to compile.
7177         (scan-graphite-dump-times): Removed.
7178         * gfortran.dg/graphite/graphite.exp: Same.
7180         * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
7181         Use scan-tree-dump-times instead of scan-graphite-dump-times.
7182         * gcc.dg/graphite/scop-1.c: Same.
7183         * gcc.dg/graphite/scop-2.c: Same.
7184         * gcc.dg/graphite/scop-3.c: Same.
7185         * gcc.dg/graphite/scop-4.c: Same.
7186         * gcc.dg/graphite/scop-5.c: Same.
7187         * gcc.dg/graphite/scop-6.c: Same.
7188         * gcc.dg/graphite/scop-7.c: Same.
7189         * gcc.dg/graphite/scop-8.c: Same.
7190         * gcc.dg/graphite/scop-9.c: Same.
7191         * gcc.dg/graphite/scop-10.c: Same.
7192         * gcc.dg/graphite/scop-11.c: Same.
7193         * gcc.dg/graphite/scop-12.c: Same.
7194         * gcc.dg/graphite/scop-13.c: Same.
7195         * gcc.dg/graphite/scop-matmult.c: Same.
7196         * gcc.dg/graphite/scop-14.c: Same.
7197         * gcc.dg/graphite/scop-15.c: Same.
7198         * gcc.dg/graphite/block-0.c: Same.
7199         * gcc.dg/graphite/scop-16.c: Same.
7200         * gcc.dg/graphite/block-1.c: Same.
7201         * gcc.dg/graphite/scop-17.c: Same.
7202         * gcc.dg/graphite/scop-18.c: Same.
7203         * gfortran.dg/graphite/block-1.f90: Same.
7204         * gfortran.dg/graphite/scop-1.f: Same.
7205         * gfortran.dg/graphite/block-2.f: Same.
7207 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7209         * graphite.c: Fix some XXX comments.
7210         (build_scop_dynamic_schedules): Removed.
7212 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7214         * graphite.h (scop_max_loop_depth): Moved...
7215         * graphite.c (scop_max_loop_depth): ...here.
7216         (remove_all_edges_1): New.
7217         (remove_all_edges): Factored code.
7218         (remove_cond_exprs): Check only the last statement for
7219         a GIMPLE_COND expression.
7221 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7223         * graphite.c (scan_tree_for_params): Early return when the
7224         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
7225         (find_scop_parameters): Factor out code.
7226         (graphite_trans_bb_strip_mine): Remove dead code.
7228 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7230         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
7231         graphite_trans_bb_move_loop): Factor asserts.
7232         (gloog): Perform sanity checks only for ENABLE_CHECKING.
7233         Do not call calculate_dominance_info and estimate_bb_frequencies.
7235 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
7237         * graphite.c (create_loops_mapping, free_loops_mapping,
7238         create_loops_mapping_num, debug_loop_mapping_1,
7239         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
7240         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
7241         graphite_loops_mapping_add_child_num,
7242         graphite_loops_mapping_insert_child,
7243         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
7244         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
7245         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
7246         create_num_from_index, get_num_from_index,
7247         swap_loop_mapped_depth): Removed.
7248         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
7249         (free_scop): Do not call free_loops_mapping.
7250         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
7251         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
7252         get_loop_mapped_depth.
7253         (graphite_trans_bb_move_loop): Do not update the loop mapping.
7254         (graphite_trans_bb_strip_mine): Same.
7255         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
7256         (struct scop): Remove field loops_mapping.
7258 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7259             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7261         * graphite.c (scop_record_loop): Factor out one level of the
7262         condition by early return.
7263         (build_scop_loop_nests): Format following FSF coding style.
7264         (build_scop_dynamic_schedules): Factor out code.
7265         (scopdet_bb_info): Reindent.  Default case should not be reachable.
7267 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7268             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7270         * graphite.c (loop_affine_expr): Check for DECL_P or struct
7271         assignments that are not handled as simple operands for now.
7273 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7274             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7276         * graphite.c (build_scop_bbs): Factor up code.
7278 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7279             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7281         * graphite.c (stmt_simple_for_scop_p): Factor code out
7282         of the loop.
7283         (enum gbb_type): New.  Group all the GBB_* types under it.
7284         (is_loop_exit): Moved...
7285         (end_scop): Enable BB spliting.
7286         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
7287         * cfgloop.h (is_loop_exit): Declared.
7289 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7291         * doc/invoke.texi: Remove strides from examples containing
7292         DO loops when the strides are equal to 1.
7294 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
7295             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7297         * graphite.c (graphite_trans_scop_block): Or the result with
7298         the result from graphite_trans_loop_block.
7299         * gcc.dg/graphite/block-1.c: New.
7300         * gfortran.dg/graphite/block-1.f90: New.
7301         * gfortran.dg/graphite/block-2.f: New.
7303 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7305         * graphite.c (graphite_transform_loops): Call cloog_initialize
7306         and cloog_finalize.
7308 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7310         * tree-data-ref.c) (stmt_simple_memref_p): New.
7311         * tree-data-ref.h (stmt_simple_memref_p): Declared.
7312         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
7313         (is_simple_operand): Call stmt_simple_memref_p.
7315         * gcc.dg/graphite/scop-matmult.c: Updated for not
7316         using pointer arithmetic, as this is optimized by PRE and
7317         makes the code too difficult to analyze.
7319         * gcc.dg/graphite/scop-18.c: Same.
7321 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7323         * gdbinit.in (pgg): New.
7325 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7327         * graphite.c (graphite_trans_loop_block): Fix warning.
7329 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7331         * graphite.c (graphite_trans_loop_block): Fix my merge error.
7333 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7335         * graphite.c (graphite_trans_bb_block): Remove check for
7336         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
7337         Check if loop blocking is profitable for every loop, before applying
7338         the changes.
7339         (graphite_apply_transformations): Call graphite_trans_bb_block only,
7340         if flag_loop_block is set.
7342 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7344         * graphite.c: Add some more documentation for the loop
7345         mapping.
7347 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7349         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
7350         * graphite.c: Format on less than 80 columns.
7351         * graphite.h: Same.
7353 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7355         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
7357 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7359         * doc/invoke.texi (floop-block, floop-strip-mine,
7360         floop-interchange): Update documentation with examples.
7362 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
7364         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
7365         add_referenced_var.
7366         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
7368 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
7370         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
7371         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
7372         * tree-scalar-evolution.c: Revert useless changes.
7373         * tree-phinodes.c: Same.
7374         * cfghooks.c: Same.
7375         * vec.h: Same.
7376         * tree-vectorizer.h: Same.
7377         * tree-flow.h: Same.
7378         * tree-cfg.c: Same.
7379         * common.opt (fgraphite): Update documentation.
7381 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
7383         * doc/invoke.texi (-floop-block, -floop-strip-mine,
7384         -floop-interchange): Add more text for explaining what each of these
7385         flags is doing.
7386         * tree-into-ssa.c (gimple_vec): Moved to...
7387         * graphite.c: Include gimple.h.
7388         (gimple_vec): Moved to...
7389         (del_loop_to_cloog_loop): Removed.
7390         (loop_affine_expr): Do not call create_data_ref when the
7391         operand is a constant.
7392         (new_scop): Use free instead of del_loop_to_cloog_loop.
7393         * Makefile.in (graphite.o): Depend on GIMPLE_H.
7394         * gimple.h (gimple_vec): ... here.
7396 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7398         * graphite.c (scopdet_bb_info): Only allow loops with known number of
7399         latch executions.
7400         (build_loop_iteration_domains): Fail, if latch executions unknown.
7402 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7404         * graphite.c (add_conditions_to_domain): New.
7405         (build_scop_conditions_1): Call add_conditions_to_domain.
7406         (set_cloog_options): Allow to disable optimizations.
7408 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7410         * graphite.c (find_params_in_bb): Look for parameters in conditions.
7411         Do not use walk_dominator_tree.
7412         (find_scop_parameters): Do not use walk_dominator_tree.
7414 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7416         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
7417         (idx_record_params): Adapt.
7418         * graphite.h (scop_gimple_loop_depth): New.
7420 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7422         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
7423         (scan_tree_for_params): Remove value_init.
7424         (build_scop_context): Remove value_init.
7425         (build_loop_iteration_domains): Remove value_init.
7426         (schedule_to_scattering): Remove value_init.
7427         (graphite_trans_bb_strip_mine): Remove value_init.
7429 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7431         * gcc/graphite.c (limit_scops): New.
7432         (graphite_transform_loops): Add limit SCoPs.
7433         * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
7434         * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
7435         * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
7436         * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
7437         * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
7438         * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
7439         * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
7440         * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
7441         * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
7442         Change loop numbers.
7443         * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
7444         Change loop numbers.
7445         * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
7446         * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
7447         * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
7448         * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
7449         * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
7450         * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
7451         * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
7452         * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
7453         * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
7454         * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
7456 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7458         * graphite.c (graphite_transform_loops): Call always find_transform.
7460 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
7462         * graphite.c (free_loops_mapping): New.
7463         (stmt_simple_for_scop_p): Fix typo.
7464         (stmt_simple_for_scop_p): Fix tuples functions, that
7465         broke polyhedron.
7466         (free_graphite_bb): Fix some memleaks.
7467         (free_scop): Fix some memleaks.
7468         (scopdet_bb_info): Do not forget some tmp SCoPs.
7469         (find_params_in_bb): Fix some memleaks.
7470         (clast_to_gcc_expression): Fix warning.
7472 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
7474         * gcc.dg/graphite/scop-16.c: Fix for 32bit.
7475         * gcc.dg/graphite/scop-17.c: Fix for 32bit.
7477 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
7479         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
7480         Move code ifdef-ed HAVE_cloog...
7481         * graphite.c: Include toplev.h.
7482         ... here.
7483         * Makefile.in (OBJS-common): Always build graphite.o.
7484         (BACKEND): Remove @GRAPHITE@.
7485         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
7486         (graphite.o): Depend on TOPLEV_H.
7488 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
7490         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
7491         Remove typo left from polylib to ppl conversion.
7492         * graphite.c (graphite_transforms): Use sorry instead of fatal.
7494 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
7496         * toplev.c (process_options): Move the graphite loop optimization
7497         flags...
7498         * tree-ssa-loop.c (graphite_transforms): ... here.
7499         When not configured with CLooG, print to dump_file that
7500         Graphite transforms were not performed.
7501         * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
7502         New.
7503         * gcc.dg/graphite/*.c: Updated all testcases to use
7504         scan-graphite-dump-times.
7506 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
7508         * graphite.c (dot_scop, dot_all_scops): Do not call system.
7509         Do not open /tmp/scop.dot and /tmp/allscops.dot.
7511 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
7512             Jan Sjodin  <jan.sjodin@amd.com>
7514         * configure: Regenerated.
7515         * omp-low.c (expand_omp_sections): Remove now unused code.
7516         * config.in (HAVE_polylib): Removed.
7517         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
7518         (PPLLIBS, PPLINC): Added.
7519         * graphite.c: Replace unsigned with int wherever possible.
7520         Don't access Cloog's data structures, but use accessor functions.
7521         Clast's stmt->type is now implemented as a vtable: change the
7522         switches of stmt->type into ifs.
7523         (polylib/polylibgmp.h): Don't include.
7524         (initialize_dependence_polyhedron,
7525         initialize_data_dependence_polyhedron, is_empty_polyhedron,
7526         statement_precedes_p, test_dependence, build_rdg_all_levels,
7527         dump_dependence_graph): Removed until this code is cleaned up
7528         or ported to Cloog.
7529         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
7530         (POLYLIBINC): Renamed PPLINC.
7532 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
7533             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7534             Jan Sjodin  <jan.sjodin@amd.com>
7536         Finish the merge and tuplification of graphite.
7538 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
7539             Jan Sjodin  <jan.sjodin@amd.com>
7541         Partial merge from mainline (138072:138275).
7542         * graphite.c still has to be tuplified.
7544 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
7546         * graphite.c (graphite_loops_mapping_max_loop_num): New.
7547         (create_num_from_index): New.
7548         (get_num_from_index): Also pass in the graphite BB.
7549         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
7550         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
7551         (graphite_trans_bb_strip_mine): Call create_num_from_index.
7552         (is_interchange_valid): Return false when failing.
7553         * graphite.h (struct num_map): New.
7554         (struct graphite_bb): New field num_map.
7555         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
7557 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7559         * graphite.c (dump_gbb_conditions): Print also conditions like
7560         "if (a)".  Remove dublicated code and use print_generic_expr ().
7561         (stmt_simple_for_scop_p): Only allow conditions we can handle
7562         {<, <=, >, >=}.
7564 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
7566         * graphite.h (struct scop): Removed new_ivs field.
7567         (SCOP_NEWIVS): Deleted.
7568         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7569         clast_to_gcc_expression, graphite_create_new_loop):
7570         Removed use of new_ivs.
7572 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
7574         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7575         create_loops_mapping_num, debug_loop_mapping_1): New.
7576         (debug_loop_mapping): Call debug_loop_mapping_1.
7577         (get_loop_mapping_for_num,
7578         graphite_loops_mapping_add_child,
7579         graphite_loops_mapping_add_child_num,
7580         graphite_loops_mapping_insert_child,
7581         graphite_loops_mapping_parent,
7582         split_loop_mapped_depth_for_num,
7583         loop_mapped_depth_split_loop): New.
7584         (increment_loop_mapped_depths): Removed.
7585         (swap_loop_mapped_depth_for_num): Reimplemented.
7586         (new_scop): Call create_loops_mapping.
7587         (scop_record_loop): Call graphite_loops_mapping_insert_child.
7588         (translate_clast): Pass the old loop father in parameter, and pass
7589         it to get_old_iv_from_ssa_name.
7590         (remove_edges_around_useless_blocks, can_generate_code_stmt,
7591         can_generate_code, can_generate_for_scop): New.
7592         (graphite_trans_bb_block): Returns false when it fails to transform.
7593         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7595 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7597         Reverted all the changes related to the streamization and
7598         loop fusion.
7599         These changes are now tracked in the streamization branch.
7601 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7602             Jan Sjodin  <jan.sjodin@amd.com>
7604         * graphite.c (gbb_compare): Correctly constify.
7605         (gbb_can_be_ignored): Indent.
7606         (graphite_trans_scop_swap_1and2): Add legality check.
7607         Remove dead FIXMEs.
7609 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7611         Remove fallouts from "Reverted the Condate changes".
7612         * tree.h: Remove unused decl.
7613         * gcc.dg/tree-checker: Same.
7614         * timevar.def: Remove counter.
7616 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
7618         * Merge from mainline (135673:138072).
7620         Reverted the MIRO changes (from 2008-04-05) that are now
7621         tracked in the miro branch.
7622         * tree-bounds.c: Removed.
7623         * tree-bounds.h: Removed.
7625         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7626         are now tracked in the condate branch.
7627         * tree-check.c: Removed.
7628         * tree-match.c: Removed.
7629         * condate.y: Removed.
7631 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7633         * common.opt: New user flag -floop-block, -floop-strip-mine
7634         and -floop-interchange.
7635         * toplev.c (process_options): Enable -fgraphite pass if any one of the
7636         graphite loop optimization flags is turned on.
7637         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7638         flag_loop_strip_mine and flag_loop_interchange checks before
7639         optimizations.
7640         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7641         -floop-strip-mine and -floop-interchange.
7642         * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7643         -fgraphite.
7644         * gcc.dg/graphite/scop-16.c: Ditto.
7645         * gcc.dg/graphite/scop-17.c: Ditto.
7646         * gcc.dg/graphite/scop-18.c: Ditto.
7648 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
7649             Sebastian Pop  <sebastian.pop@amd.com>
7651         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7652         (create_empty_loop_on_edge): More fixes.
7653         * tree-phinodes.c (resize_phi_node): Extern.
7654         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7655         * cfghooks.c (update_dominator_information): New split from
7656         split_edge.
7657         * tree-vectorizer.c (rename_variables_in_bb): Extern.
7658         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7659         successor of the function entry block.
7661         * graphite.c: Include pointer-set.h.
7662         (debug_loop_mapping, increment_loop_mapped_depths,
7663         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7664         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7665         swap_loop_mapped_depth_for_num, get_num_from_index,
7666         swap_loop_mapped_depth, loop_iv_stack_debug,
7667         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7668         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7669         get_old_iv_from_ssa_name): New.
7670         (new_scop): Initialize SCOP_LOOPS_MAPPING.
7671         (free_scop): Free SCOP_LOOPS_MAPPING.
7672         (scop_record_loop): Record old ivs.
7673         (create_var_name): Removed.
7674         (initialize_cloog_names): Allocate double space in case strip mine
7675         applies to all loops once.
7676         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7677         (clast_to_gcc_expression): Same.  Implement more clast to gimple
7678         translation.
7679         (graphite_create_new_loop): Pass in ivstack.
7680         (remove_all_edges): Pass in the construction_edge.
7681         (graphite_remove_iv): Removed.
7682         (graphite_rename_ivs, graphite_rename_ivs_stmt,
7683         remove_cond_exprs): Rewritten.
7684         (move_phi_nodes): New.
7685         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7686         (translate_clast): Pass in ivstack.  Rewrite some cases.
7687         (set_cloog_options, debug_clast_stmt): New.
7688         (find_transform): Use set_cloog_options.
7689         (outermost_loop_layer): Removed.
7690         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7691         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7692         mark_old_loops, remove_dead_loops): New.
7693         (gloog): Rewritten.
7694         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7695         (const_column_index, get_first_matching_sign_row_index,
7696         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7697         get_upper_bound): New.
7698         (graphite_trans_bb_strip_mine): Also update the iv map.
7700         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7701         (struct name_tree): Add a loop field.
7702         (struct scop): Add a graphite_loops_mapping field.
7703         (SCOP_LOOPS_MAPPING): New.
7704         (debug_clast_stmt): Declare.
7705         * lambda.h (find_induction_var_from_exit_cond): Declare.
7706         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7707         * cfgloop.h (update_dominators_in_loop): Removed declaration.
7708         (create_empty_loop_on_edge): Updated.
7709         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7710         rename_variables_in_bb): Declare.
7711         * tree-cfg.c (remove_bb): Extern.
7713         * gcc.dg/graphite/block-0.c: New.
7715 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7716             Sebastian Pop  <sebastian.pop@amd.com>
7718         * graphite.c (strip_mine_profitable_p): New.
7719         (graphite_trans_bb_block): Disable strip mining if not profitable.
7721         * gcc.dg/graphite/scop-18.c: New.
7722         * gcc.dg/graphite/scop-17.c: Fixed.
7723         * gcc.dg/graphite/scop-16.c: Fixed.
7725 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
7726             Jan Sjodin  <jan.sjodin@amd.com>
7727             Sebastian Pop  <sebastian.pop@amd.com>
7729         * graphite.c (is_interchange_valid): New.
7730         (graphite_trans_bb_block): Check loop nest of basic block for legality
7731         of interchange.
7733         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7734         outer_most_loop, gbb_outer_most_loop_index): New.
7736         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7737         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7738         * gcc.dg/graphite/scop-16.c: New.
7739         * gcc.dg/graphite/scop-17.c: New.
7741 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7743         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7744         (graphite_trans_scop_block): Ignore SCoPs without bbs.
7746 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7748         * graphite.c (new_scop): Initialize SCOP_EXIT.
7749         (scopdet_info): Add.
7750         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7751         (build_scops_1): Cleanup, bugfixes.
7752         (build_scops): Cleanup.
7754         * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7755         * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7757 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7759         * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7761         * gfortran.dg/graphite/graphite.exp: Use
7762         DEFAULT_GRAPHITE_FLAGS.
7764         * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7766 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7768         * graphite.c (scan_tree_for_params): Do not assert any more if
7769         MULT_EXPR parameter is negative.
7771         * gfortran.dg/graphite/scop-1.f: New.
7773         * gfortran.dg/graphite/graphite.exp: New.
7775         * gcc.dg/graphite/scop-15.c: New.
7777 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7779         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7781 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7783         * graphite.c (graphite_trans_bb_swap_loops): Rename from
7784         graphite_swap_loops.
7785         (graphite_trans_bb_move_loop): New.
7786         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7787         (graphite_trans_bb_block): New.
7788         (graphite_trans_loop_block): New.
7789         (graphite_trans_scop_swap_1and2): Rename from
7790         graphite_trans_swap_1and2.
7791         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7792         (graphite_trans_scop_block): New.
7793         (graphite_apply_transformations): Rename from
7794         graphite_transformations.
7796         * gcc.dg/graphite/scop-matmult.c: New.
7798 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7800         * graphite.c (gbb_compare): New.
7801         (graphite_sort_gbbs): New.
7802         (gbb_can_be_ignored): New.
7803         (scop_remove_ignoreable_gbbs): New.
7804         (graphite_transformations): Cleanup and add
7805         scop_remove_ignoreable_gbbs.
7806         * lambda.h (lambda_vector_compare): New.
7808 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
7810         * graphite.c (print_graphite_bb): Correct printing of static schedule.
7811         (graphite_swap_loops): int -> unsigned
7812         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7813         (graphite_transformations): New.
7814         (graphite_transform_loops): Move to graphite_transformations.
7815         * graphite.h (gbb_nb_loops): Return unsigned.
7817 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7819         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7820         the domain matrix.  This makes scop-0.c work again.
7822 2008-06-20  Richard Guenther  <rguenther@suse.de>
7824         * graphite.h: Adjust copyright to GPLv3.
7825         * graphite.c: Likewise.
7826         (stmt_simple_memref_for_scop_p): Split out from ...
7827         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
7828         and simplify.
7829         (get_bb_type): Optimize.
7830         (is_pred): Remove.
7831         (is_bb_addable): Fix memleak, replace is_pred call with
7832         single_pred.
7833         (build_scops): Use current_loops.
7834         (param_index): Fix memleak.
7836 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7838         * graphite.c: Fix formatting.
7840 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7842         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7843         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7844         (create_var_name, save_var_name): Newly defined functions.
7845         (initialize_cloog_names): Part of the code factored out to
7846         save_var_name.
7847         (clast_to_gcc_expression): Now handles the case of clast_red_sum
7848         in clast_reduction statement.
7849         (graphite_create_new_loop): Now takes a new parameter
7850         for outer_loop.
7851         (translate_clast): Now also takes the context_loop and bb_exit
7852         parameters. Rewritten the code so that it creates a gimple code
7853         inside the given context.
7854         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7855         remove_cond_expr, disconnect_cond_expr,
7856         disconnect_virtual_phi_nodes): Newly defined functions.
7857         * graphite.h (struct scop): added old_ivs vector.
7858         SCOP_OLDIVS: New macro.
7860 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
7862         * cfgloopmanip.c: Add missing function comments, fix formatting.
7864 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7866         * cfgloopmanip.c (update_dominators_in_loop): Defined.
7867         (create_empty_loop_on_edge): Defined.
7868         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7869         instead of void.
7870         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7871         (update_dominators_in_loop): Declared as extern
7872         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7874 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
7876         * graphite.c (print_graphite_bb): Allow changing number of loops
7877         in SCoP domain.
7878         (initialize_cloog_names): Allow changing number of loops.
7879         (build_cloog_prog): Simplify.
7880         (find_transform): Enable cloog option --strides.
7881         (graphite_swap_loops): New.
7882         (graphite_strip_mine_loop): New.
7883         (graphite_trans_swap_1and2): New.
7884         (graphite_trans_strip): New.
7885         (graphite_transform_loops): Add graphite_trans_strip.
7886         * graphite.h (scop_max_loop_depth): New.
7888 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7890         * graphite.c (build_scop_iteration_domain): Remove forgotten
7891         line. (Fixes compile)
7893 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7895         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7896         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7897         (build_bb_loops): New.
7898         (graphite_transform_loops): Add build_bb_loops.
7899         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7900         numbers.
7901         * graphite.h (graphite_bb): Add loops.
7902         (gbb_nb_loops): New.
7903         (gbb_loop_at_index): New.
7904         (gbb_loop_index): New.
7905         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7906         using nb_params_in_scop.
7908 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7910         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7911         (build_scop_canonical_schedules): Build minimized schedule.
7912         (schedule_to_scattering): Adapt to minimized schedule.
7913         * graphite.h (graphite_bb): Add/Update descriptions.
7915 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
7916             Tobias Grosser  <grosser@fim.uni-passau.de>
7918         * graphite.c (print_graphite_bb): Add condition printing.
7919         (dump_value): New.
7920         (dump_gbb_conditions): New.
7921         (build_scop_conditions_1): New.
7922         (build_scop_conditions): New.
7923         * graphite.h (graphite_bb): Add conditions.
7925 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7927         * graphite.c (print_graphite_bb):
7928         (free_graphite_bb): New.
7929         (free_scop): Free bbs.
7930         (get_bb_type): Free doms.
7931         (build_scop_context): Free context matrix.
7932         (build_loop_iteration_domains): Remove unused code.
7933         (build_cloog_prog): Free scattering function and blocklist.
7934         (find_transform): Free options.
7936 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
7938         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7939         Remove unnecessery cloog data structures. Make a copy of the domain
7940         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7941         unnecessary cloog data structures. Fix memory leaks. Remove insert
7942         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7943         used.
7944         (build_scop_iteration_domain): Remove unnecessary cloog
7945         data structures.  Fix memory leaks.
7946         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7947         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7949 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7951         * graphite.c (find_scop_params): Remove initialize_cloog_names.
7953 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7955         * graphite.c (end_scop): Style fix.
7956         (schedule_to_scattering): Style and comment fix.
7958 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7959         * graphite.c (print_graphite_bb): Fix definiton of
7960         schedule_to_scattering.
7961         (initialize_cloog_names): Change nb_scattdims to max loop
7962         depth in SCoP.
7963         (schedule_to_scattering): Take parameter for number of scattering
7964         dimensions.
7965         (build_cloog_prog): Only build as much scattering dimensions as
7966         necessary.
7968 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7970         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7971         in polyhedron/aermod.f90.
7973 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7974             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
7975             Harsha Jagasia  <harsha.jagasia@amd.com>
7977         * graphite.c (is_bb_addable): Fix segfault.
7979 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7981         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7982         with multiple exits and conditional handling in edge cases.
7983         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7985         * gcc.dg/graphite/scop-14.c: New.
7987 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7988             Adrien Eliche  <aeliche@isty.uvsq.fr>
7990         * graphite.c (is_bb_addable): Add more comments and enhance
7991         readablity of the source code. Fix memory leak.
7992         (is_loop_exit): Fix memory leak.
7994 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7996         * graphite.c (first_loop_in_scop): Deleted.
7997         (setup_cloog_loop): Only walk the loop chain for inner loops.
7998         (build_scop_iteration_domain): Execute setup_cloog_loop for
7999         all loops in the first layer.
8001 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
8003         * graphite.c (scan_tree_for_params): Change the way params are
8004         added to be indepenent of the number of loops.
8005         (setup_cloog_loop): Revert to short matrix format. Fix parameter
8006         handling.
8007         (build_cloog_prog): Revert to short matrix format.
8009 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
8010             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
8012         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
8013         warning.
8015 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
8017         * graphite.c (nb_data_refs_in_scop): New.
8018         (graphite_transform_loops): Print more stats: number of
8019         loops, basic blocks and data references per scop.
8021 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
8022             Jan Sjodin  <jan.sjodin@amd.com>
8024         * graphite.c (loop_affine_expr, idx_record_params,
8025         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
8026         instead of instantiate_parameters.
8028 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
8030         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
8031         add support for parameters, add STATIC_SCHEDULE at the right places,
8032         cleanup.
8034 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
8036         * graphite.c (build_scop_loop_nests): Only add the loops, that
8037         are contained completely in the SCoP.
8038         (build_cloog_prog): Disable scattering, until schedule_to_scattering
8039         and the domains are fixed.
8040         (build_scop_canonical_schedules): Add support for bbs not contained
8041         in any SCoP.
8043 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
8045         * graphite.h (scop_contains_loop): Update comments to match
8046         the actual behavior.
8047         (scop_contains_loop): New.
8048         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
8050 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
8052         * graphite.c (get_bb_type): On function body, i.e. loop_0,
8053         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
8054         as GBB_COND_HEADER.
8056 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
8057             Tobias Grosser  <grosser@fim.uni-passau.de>
8059         * graphite.c (graphite_transform_loops): Early return when
8060         there are no loops in the function.
8062 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
8063             Jan Sjodin  <jan.sjodin@amd.com>
8065         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
8066         offset of the last loop.
8067         (setup_cloog_loop): Copy the entire outer constraint matrix.
8069 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
8070             Jan Sjodin  <jan.sjodin@amd.com>
8072         * graphite.c (stmt_in_scop_p, function_parameter_p,
8073         invariant_in_scop_p): Removed.
8074         (scan_tree_for_params): Can be used with no constraint
8075         matrix for gathering parameters.
8076         (idx_record_params): Don't use idx_record_param, instead use
8077         scan_tree_for_params.
8078         (find_scop_parameters): Same.
8079         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
8080         Fix the size of loop domains.
8081         (schedule_to_scattering): Exit when the outer loop is not in scop.
8082         (find_transform): Enable build_cloog_prog.
8084 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
8085             Jan Sjodin  <jan.sjodin@amd.com>
8087         * graphite.c (schedule_to_scattering): Make scattering domains
8088         uniformly of the same size, as required by CLooG 0.14.0 and before.
8090 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
8091             Jan Sjodin  <jan.sjodin@amd.com>
8093         * graphite.c (schedule_to_scattering): Rewrite, correct the
8094         translation of the scheduling function to scattering.
8095         (build_cloog_prog): Call schedule_to_scattering only once.
8096         * graphite.h (scop_loop_index): Do not fail for loops not
8097         in the scop: return -1.
8099 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
8101         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
8102         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
8103         (setup_cloog_loop): Export GBB_DOMAIN.
8104         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
8105         able to rebuild the original control flow.
8106         * graphite.h (graphite_bb): Add domain field and access macro.
8107         (GBB_DOMAIN): New.
8109 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
8111         * graphite.c (debug_gbb): New.
8112         (print_scop, build_graphite_bb): Use SCOP_BBS.
8113         (build_scop_bbs): Reimplemented.
8114         (dfs_bb_in_scop_p): Removed.
8115         (build_scop_loop_nests): Reorder loops inserted in
8116         SCOP_LOOP_NEST: outer loops should come first.
8117         (build_scop_canonical_schedules): Reinitialize at zero
8118         the components of the SCOP_STATIC_SCHEDULE for the loops
8119         that have already been parsed.
8121         * graphite.h (debug_gbb): Declared.
8123 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
8124             Jan Sjodin  <jan.sjodin@amd.com>
8126         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
8127         (graphite_loop_to_gcc_loop): Removed.
8128         (remove_all_edges): New.
8129         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
8130         (gloog): Remove useless code.
8132 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8134         * graphite.c (get_bb_type): Reworked. We distinguish between
8135         loops with one or multiple exits.
8136         (is_loop_exit): New.
8137         (is_pred): New.
8138         (is_bb_addable): Rework condition handling, now support for case
8139         case statements and loops with multiple exits.
8141         * gcc.dg/graphite/scop-11.c: New.
8142         * gcc.dg/graphite/scop-12.c: New.
8143         * gcc.dg/graphite/scop-13.c: New.
8145 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8147         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
8148         we have too many colors.
8150 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
8152         * doc/invoke.texi (-ftree-loop-fusion): Document.
8153         * tree-pass.h (pass_loop_fusion): Declared.
8154         * tree-loop-fusion.c: New.
8155         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
8156         * tree-data-ref.c (find_data_references_in_loop): Make extern.
8157         * tree-data-ref.h (find_data_references_in_loop): Declared.
8158         * common.opt (ftree-loop-fusion): Declared.
8159         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
8161 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
8163         * graphite.c (build_access_matrix): Fix typo from the merge.
8165 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
8167         * Merge from mainline (130800:135673).
8169 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
8171         * graphite.c (end_scop): The exit of the scop is not part of the scop.
8172         Update dominators after splitting.
8174 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
8176         * graphite.c (is_bb_addable): Return the harmful statement.
8177         Factor up some code.
8178         (end_scop): New.  Splits end of scope bbs on a harmful statement.
8179         (build_scops_1): Call end_scop.
8181 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
8183         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
8184         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
8185         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
8186         build_scops_1): Removed.
8187         (build_scops_2): Renamed build_scops_1.
8189 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
8191         * graphite.c: Fix formatting.
8193 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
8195         * graphite.c (get_bb_type): New.
8196         (move_scops): New.
8197         (build_scops_2): New.
8198         (is_bb_addable): New.
8199         (build_scops): Switch the scop detection.
8200         (build_scop_bbs): Add entry bb to scop.
8201         * graphite.h (struct scop): Update comment.
8203 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
8205         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
8206         more colors.
8208 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
8210         * gcc.dg/graphite/scop-1.c: Update.
8211         * gcc.dg/graphite/scop-2.c: Update.
8212         * gcc.dg/graphite/scop-4.c: Update.
8213         * gcc.dg/graphite/scop-5.c: Add.
8214         * gcc.dg/graphite/scop-6.c: Add.
8216 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
8218         * gcc.dg/graphite/scop-0.c: Add.
8219         * gcc.dg/graphite/scop-7.c: Add.
8220         * gcc.dg/graphite/scop-8.c: Add.
8221         * gcc.dg/graphite/scop-9.c: Add.
8222         * gcc.dg/graphite/scop-10.c: Add.
8224 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
8226         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
8227         Check affine expressions depending on the outermost loop
8228         instead of a scop.
8229         (stmt_simple_for_scop_p): Same.
8230         (harmfule_stmt_in_scop): Same.
8232 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
8234         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
8235         mark entry and exit, that are not part of the SCoP and update HTML
8236         formatting.
8238 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
8240         * graphite.c (basic_block_simple_for_scop_p): Renamed
8241         harmful_stmt_in_bb.
8242         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
8243         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
8244         (all_preds_visited_p, all_succs_visited_p,
8245         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
8246         scop_end_loop): New.
8247         (build_scops): Do not use dfs_enumerate_from.
8249         * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
8251 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
8253         * graphite.c: Add comments to functions that are missing a
8254         description.
8255         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
8257 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
8259         * graphite.c (nb_params_in_scop): Moved...
8260         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
8261         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
8262         (clast_to_gcc_expression): Reduce column size to less than 80.
8263         (graphite_create_iv): Return the new name of the IV.
8264         (find_transform): Set options->esp and options->cpp.
8265         (gloog): Comment out the invalidation of the old loop code.
8266         (initialize_dependence_polyhedron): Replace scop_nb_params with
8267         nb_params_in_scop.
8269         * graphite.h (nb_params_in_scop): ... here.
8270         (scop_nb_params): Removed.
8271         (loop_domain_dim): Return something even when the loop was not
8272         found in the hash table: avoid ICEing on all the graphite.exp
8273         testcases.
8275 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8277         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
8279         * graphite.c (build_scop_dynamic_schedules): Schedule is built
8280         according to nesting level.
8281         (find_scop_parameters): Call instantiate_parameters.
8282         (scan_tree_for_params): Extend it to handle general affine bounds.
8283         Inner loop bound can depend on outer loop induction variable.
8284         (setup_cloog_loop): tmp variable is allocated on stack. Call
8285         instantiate_parameters with respect to outermost_loop_in_scop.
8286         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
8287         graphite.h.
8288         (create_empty_loop): Function loopify should be given edge
8289         probability, instead of edge frequency. Dominance relation from
8290         switch_bb to loop_header.
8291         (clast_to_gcc_expression): Added handling of clast_reduction node.
8292         (gloog): New functionality for removing old loop.
8293         (test_dependence): Factored out from build_rdg_all_levels.
8294         (build_rdg_all_levels): Dependence testing factored out to
8295         test_dependence function.
8297         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
8298         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
8299         from graphite.c
8301 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
8303         * graphite.c (free_scop, param_index, initialize_cloog_names,
8304         nb_params_in_scop): Use name_tree map instead of just a tree
8305         for keeping track of the variable name associated to that tree.
8306         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
8307         clast_to_gcc_expression, graphite_create_iv,
8308         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
8309         graphite_stmt_to_gcc_stmt): New.
8310         (gloog): Call these.
8311         * graphite.h (struct name_tree): New.
8312         (struct scop): Use name_tree instead of tree for params.
8313         Store a vector of name_tree for new_ivs.
8314         (SCOP_NEWIVS): New.
8315         (scop_nb_params): Use name_tree instead of tree.
8317 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
8318             Sebastian Pop  <sebastian.pop@amd.com>
8320         * tree-bounds.c: New.
8321         * tree-bounds.h: New.
8322         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
8323         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
8324         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
8325         flag_mudflap.
8326         * gcc.c: Same.
8327         * toplev.c: Same.
8328         * c-cppbuiltin.c: Same.
8329         * c-pragma.c: Same.
8330         * common.opt: Same.
8331         * varasm.c: Same.
8332         * tree-outof-ssa.c: Same.
8333         * c-common.c: Same.
8334         * Makefile.in: Same.
8336 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
8337             Sebastian Pop  <sebastian.pop@amd.com>
8339         * tree-loop-distribution.c (remaining_stmts,
8340         upstream_mem_writes): Removed static variables.
8341         (copy_loop_before, create_bb_after_loop,
8342         mark_nodes_having_upstream_mem_writes, free_rdg_components,
8343         rdg_build_components, rdg_build_partitions,
8344         dump_rdg_partitions): Extern.
8345         (generate_loops_for_partition, generate_code_for_partition): Do not
8346         return a bool.
8347         (already_processed_vertex_p, predecessor_has_mem_write,
8348         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
8349         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
8350         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
8351         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
8352         Pass remaining_stmts and upstream_mem_writes as parameters.
8353         (rdg_component): Moved...
8354         (build_rdg_partition_for_component): Do not aggregate components when
8355         flag_streamize_loops is set.
8356         (gen_sequential_loops): New.
8357         (ldist_gen): Call gen_sequential_loops.
8359         * tree-pass.h (pass_loop_streamization): Declared.
8361         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
8362         basic blocks when loops structures exist.
8364         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
8366         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
8368         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
8369         eliminate_local_variables_stmt, eliminate_local_variables,
8370         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
8371         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
8372         of code delimited by two edges in the CFG.
8373         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
8374         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
8375         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
8376         the case of parallelisation of reductions.
8377         (create_loop_fn): Extern.
8378         (create_omp_parallel_region): New.
8380         * tree-data-ref.c (dump_data_dependence_relation): Don't call
8381         dump_data_reference for printing dra and drb.
8382         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
8383         RDGE_RELATION.
8384         (build_rdg): Don't call free_dependence_relations for the moment, as
8385         we attach dependence relations on each edge of the RDG.
8386         To be fixed later.
8388         * tree-data-ref.h (rdg_component): ...here.
8389         (struct rdg_edge): New field ddr_p relation.
8390         (RDGE_RELATION): New.
8391         (create_bb_after_loop, copy_loop_before,
8392         mark_nodes_having_upstream_mem_writes, rdg_build_components,
8393         rdg_build_partitions, dump_rdg_partitions,
8394         free_rdg_components): Declared.
8396         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
8397         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
8399         * tree-loop-streamization.c: New.
8401         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
8402         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
8404         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
8406         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
8408         * passes.c: Schedule pass_loop_streamization.
8410 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
8412         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
8413         update comment.
8415 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
8417         * graphite.c (dot_all_scops): Update formatting.
8418         Bbs can now be part of more than one SCoP.
8420 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
8422         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
8423         malloc problems.
8424         (loop_domain_dim): Check for unregistered toplev SCOP loop.
8425         * graphite.h (loop_to_cloog_loop): New.
8427 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8429         * graphite.c (loop_domain_dim, ref_nb_loops,
8430         loop_iteration_vector_dim): New.
8431         (build_access_matrix_with_af, build_access_matrix,
8432         initialize_dependence_polyhedron): Fixed for new matrix layout.
8433         No longer assume that all iteration domains are of the same
8434         dimensionality.
8436 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
8438         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
8439         defined in a loop at depth 0 is invariant.
8440         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
8441         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
8442         be called at loop depth 0.
8444         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
8445         a parameter.
8446         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
8447         (down_open_scop): Removed.
8448         (loop_in_scop_p): Redefined.
8449         (scop_affine_expr): New argument: scop.
8450         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
8451         a harmful statement ending a scop.
8452         (basic_block_simple_for_scop_p): New argument: scop.
8453         (get_loop_start): Removed.
8454         (new_scop): Initialize SCOP_LOOPS.
8455         (free_scop): Free SCOP_LOOPS.
8456         (succs_at_same_depth, preds_at_same_depth): New.
8457         (end_scop): Test the validity of a scop.
8458         (add_dominators_to_open_scops): New.
8459         (test_for_scop_bound): Call add_dominators_to_open_scops.
8460         Add cases for opening and closing multiple scops.
8461         (build_scops, build_scop_bbs): Iterate over basic blocks in
8462         depth first order.
8463         (build_graphite_bb): Pass scop directly.
8464         (dfs_bb_in_scop_p): New.
8465         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
8466         several times.
8467         (nb_loops_around_gb): Use loop_in_scop_p.
8468         (schedule_to_scattering): Disabled for the moment the code computing
8469         the "textual order for outer loop".
8471         * graphite.h (struct scop): New field loops.
8472         (SCOP_LOOPS): New.
8473         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
8475         * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
8477 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
8478             Sebastian Pop  <sebastian.pop@amd.com>
8480         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
8481         * common.opt (fstreamize-loops): New.
8482         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
8483         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
8484         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
8485         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
8487 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8489         * tree-data-ref.c (build_empty_rdg): New.
8490         (build_rdg): Use it.
8491         * tree-data-ref.h (build_empty_rdg): Declared.
8492         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
8493         (find_vertex_for_stmt): Removed.
8494         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
8496 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
8498         * tree-loop-distribution.c (generate_builtin): After cancelling the
8499         loop tree, also delete basic blocks.
8500         (rdg_flag_uses): Stop recursion when a vertex has already been
8501         processed.
8503 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8505         * graphite.c (build_scop_alpha): Removed.
8506         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
8507         and dump_dependence_graph to avoid compiler warnings.
8509 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8511         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
8512         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
8513         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
8514         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
8515         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
8516         (initialize_dependence_polyhedron, find_vertex_for_stmt,
8517         initialize_data_dependence_polyhedron, is_empty_polyhedron,
8518         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
8519         dump_dependence_graph): New.
8520         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
8521         (GBB_ALPHA): New.
8522         (struct scop): New field loop2cloog_loop.
8523         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
8524         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
8526 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8528         * graphite.c (build_graphite_bb): Fix initialization
8529         of the graphite basic block.
8531 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
8533         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
8534         loop domain matrix.  Pass in the number of loops contained in the
8535         constraint matrix.
8536         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
8537         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
8538         loops that are not surrounding the current loop are not represented
8539         in the domain constraint matrix.
8540         (build_scop_iteration_domain): Initial domain constraint matrix
8541         contains only the eq/ineq, cst, and scop parameters columns.
8543 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8545         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
8546         (print_graphite_bb): Print scattering.
8548 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8550         * graphite.c (initialize_cloog_names): Initialize names of
8551         scattering variables.
8553 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8555         * graphite.c (dot_all_scops_1): Disable debug output while
8556         printing graph.
8558 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8560         * graphite.c (find_transform): Change cloog output language to C.
8562 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
8564         * tree-loop-distribution.c (generate_memset_zero,
8565         generate_builtin, generate_code_for_partition,
8566         rdg_flag_all_uses): New.
8567         (rdg_flag_uses): Gather in the same partition the statements defining
8568         the VUSES of the current statement.
8569         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8570         Gather in the same partition not only the stores to the same memory
8571         access, but also the reads.
8572         (ldist_generate_loops): Renamed ldist_gen.
8574 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
8575             Tobias Grosser  <grosser@fmi.uni-passau.de>
8577         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8578         next pointer, don't use the inner pointer.
8580 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
8582         * graphite.c (dot_all_scops, dot_all_scops_1): New.
8583         (find_transform): Call dot_all_1.
8584         * graphite.h (dot_all_scops): Declared.
8586 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
8588         * tree-loop-distribution.c: Fix apsi.f ICE.
8589         (create_bb_after_loop): New.
8590         (generate_loops_for_partition): Use it.
8591         * gfortran.dg/ldist-1.f90: New.
8593         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8594         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8596 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8598         * graphite.c (find_transform): Dump cloog program sent to cloog.
8600 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8602         * graphite.c (initialize_cloog_names): Initialize cloog
8603         iterator names.
8605 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8607         * graphite.c (build_scop_context): Fix typo, for the matrix
8608         format: insert '0 >= 0' instead of '-1 >= 0'.
8610 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8612         * Fix merge problems.
8614 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8616         * graphite.c (setup_cloog_loop): Fix typo.
8618 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8620         * doc/invoke.texi (-ftree-loop-distribution): Documented.
8621         * tree-loop-distribution.c: Reimplemented.
8622         * tree-pass.h (pass_loop_distribution): New.
8623         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8624         print_loops.
8625         * graphds.h (struct graph): New field indexes.
8626         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8628         * tree-vect-analyze.c: Remove declaration of static functions when not
8629         needed.
8630         * tree-vectorizer.c: Same.
8631         (rename_variables_in_loop): Now extern.
8632         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8633         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
8634         calling redirect_edge_and_branch_force.
8636         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8638         * tree-data-ref.c: Don't include tree-chrec.h.
8639         (debug_data_dependence_relations): New.
8640         (dump_data_dependence_relation): Call dump_data_reference on data refs
8641         in the relation.
8642         (same_access_functions): Moved...
8643         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8644         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8645         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8646         struct rdg_vertex_info, ): New.
8647         (create_rdg_edge_for_ddr): Compute the dependence level before looking
8648         at DDR_REVERSED_P.
8649         (create_rdg_vertices): Initialize the htab of graph->indexes.
8650         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8651         (stmts_from_loop): Don't save LABEL_EXPR.
8652         (hash_stmt_vertex_info, eq_stmt_vertex_info,
8653         hash_stmt_vertex_del): New.
8654         (build_rdg): Initialize rdg->indexes.
8655         (free_rdg, stores_from_loop, ref_base_address,
8656         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8657         have_similar_memory_accesses_1, ref_base_address_1,
8658         remove_similar_memory_refs): New.
8660         * tree-data-ref.h: Include tree-chrec.h.
8661         (debug_data_dependence_relations): Declared.
8662         (same_access_functions): ...here.  Now static inline.
8663         (ddr_is_anti_dependent, ddrs_have_anti_deps,
8664         ddr_dependence_level): New.
8665         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8666         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8667         RDG_MEM_READS_STMT): New.
8668         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8669         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8670         rdg_vertex_for_stmt): Declared.
8671         (struct rdg_edge): New field level.
8672         (RDGE_LEVEL, free_rdg): New.
8673         (stores_from_loop, remove_similar_memory_refs,
8674         rdg_defs_used_in_other_loops_p,
8675         have_similar_memory_accesses): Declared.
8676         (rdg_has_similar_memory_accesses): New.
8678         * lambda.h (dependence_level): New.
8679         * common.opt (ftree-loop-distribution): New.
8680         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8681         (print_loop_ir): Renamed print_loops.
8682         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8683         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8684         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8685         (tree-loop-distribution.o): Added.
8686         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8687         (mark_virtual_ops_in_bb): New.
8688         (print_loops_bb, debug_loop_num, debug_loop): New.
8689         * passes.c: Scheduled pass_loop_distribution.
8691 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8693         * graphite.c (scan_tree_for_params): Correct the number of columns
8694         for polylib format.
8695         (nb_flat_iterator): New.
8696         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8697         (build_scop_iteration_domain): Correct the number of columns for
8698         polylib format.
8700 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8702         * Merge from mainline (129697:130800).
8704 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
8706         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8707         dominated by SCoP's exit.
8708         (graphite_transform_loops): Compute post dominators.
8710 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8712         * Merge from mainline (127169:129697).
8714 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8716         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
8717         parameter for the basic block that contains the expression.  Use
8718         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8719         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8720         the expression.
8721         * graphite.h (gbb_loop): New.
8722         (GBB_LOOP): Removed.
8724 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8726         * Makefile.in: Fix merge problem.
8728 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8730         * Merge from mainline (125309:127169).
8731         * tree-loop-distribution.c: Disabled.
8733 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
8735         * Merge from mainline (r123693:125309).
8737 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
8739         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8740         correct_modify_p
8741         (correct_modify_p, check_statements, number_of_lvalue_uses,
8742         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8743         instead of MODIFY_EXPR.
8744         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
8745         and push new edges.
8747 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
8749         * tree-loop-distribution.c (struct rdg): Replace arrays by
8750         VECs for edges and vertices.
8751         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8752         (RDGV_NB_PARTITIONS): New.
8753         (PRDG_NBV, PRDG_NBE): Removed.
8754         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8755         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8756         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8758 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
8759             Sebastian Pop  <sebpop@gmail.com>
8761         * doc/invoke.texi (-ftree-loop-distribution): Document.
8762         * tree-loop-distribution.c: New file.
8763         * tree-pass.h (pass_loop_distribution): Declared.
8764         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8765         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8766         and set reversed_p.
8767         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8768         (DDR_REVERSED_P): New.
8769         * common.opt (-ftree-loop-distribution): New.
8770         * tree-flow.h (distribute_loops): Declared.
8771         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8772         * passes.c (init_optimization_passes): Schedule loop distribution.
8774 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
8776         * graphite.c (print_graphite_bb): Don't call dump_data_references.
8777         (print_scop): Don't print when scop is NULL.
8778         (build_scop_context, find_transform): Don't output to stderr.
8780 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
8782         * tree-data-ref.c: Don't include graphite.h.
8783         Comment out the code for printing data reference's scop.
8784         (build_access_matrix_with_af): Moved...
8785         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8786         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
8787         (print_graphite_bb): Print basic block's schedule.
8788         (print_scop): Don't print the schedule, call cloog's pretty printer.
8789         (bb_in_scop_p): A basic block is in a scop only if it is both
8790         dominated and postdominated by the scop's entry and exit basic blocks.
8791         (function_parameter_p): New.
8792         (invariant_in_scop_p): Use function_parameter_p.
8793         (new_scop, save_scop): New.
8794         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8795         save_scop.
8796         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8797         (loop_in_scop_p): New.
8798         (scop_record_loop): Use loop_in_scop_p.
8799         (build_scop_domain): Renamed build_scop_iteration_domain.
8800         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8801         nb_params_in_scop, build_scop_context, first_loop_in_scop,
8802         setup_cloog_loop, dot_scop_1, dot_scop): New.
8803         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8804         (struct scop): Add a pointer to cloog's representation of a program.
8806 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8808         * doc/invoke.texi (-ftree-check-verbose): Renamed
8809         -ftree-checks-verbose.
8810         * common.opt (flag_tree_check_verbose): Renamed
8811         flag_tree_checks_verbose.
8812         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8814 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8816         * configure: Regenerated.
8817         * config.in: Regenerated.
8818         * tree-ssa-loop.c (graphite_transforms): Execute
8819         graphite_transform_loops only when HAVE_cloog.
8820         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8821         * graphite.c: Include polylibgmp.h and cloog.h.
8822         (graphite_transform_loops): Removed loops parameter.
8823         * tree-flow.h (graphite_transform_loops): Update declaration.
8824         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8825         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8826         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8827         (OBJS-common): Remove dependence on graphite.o.
8828         (BACKEND): Depend on @GRAPHITE@.
8830 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
8832         * doc/invoke.texi (-ftree-check-verbose): Documented.
8833         * gcc.dg/tree-checker/tree-checks-1.c: New.
8834         * gcc.dg/tree-checker/tree-checks-2.c: New.
8835         * gcc.dg/tree-checker/tree-checks-3.c: New.
8836         * gcc.dg/tree-checker/tree-checks-4.c: New.
8837         * gcc.dg/tree-checker/tree-checks.exp: New.
8838         * gcc.dg/tree-checker/condates.crp: New.
8839         * common.opt (ftree-checks-verbose): New.
8840         * tree-check.c (tree_check_warning): Move extra stderr output
8841         under control of flag_tree_check_verbose.
8843 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
8845         * tree-match.c: Fix comments formatting.
8846         * tree-match.h: Fix comments formatting.
8847         * tree-check.c: Fix comments formatting.
8848         (tree_check_init): Restructure.
8850 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
8852         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8854 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
8856         * Merge from mainline (r120733:123693).
8858 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
8860         * condate.y: New file.
8861         * tree-match.h (struct patt_info_s): New field sign.
8862         (struct condate_s): New field msg.
8863         (normalize_condate, name_condate, add_condate): New.
8864         (conds[], condate_parse): Made extern.
8865         * tree-check.c (tree_check_warning): First arg changed to cond;
8866         warning reformatted.
8867         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8868         (tree_scan): New.
8869         (tree_check): Process trivial condates.
8870         (read_delimited_string): Removed.
8871         (print_cond): Print name and msg.
8872         (conds[]): Made extern.
8873         (parse_tree_check_file_once): Rewritten to use the parser in
8874         condate.y.
8875         Processing of option --tree_check_string moved to tree_scan().
8876         * Makefile.in: Added condate.y
8878 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
8880         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8881         Use VECs instead of varrays.
8882         * diagnostic.h (lazy_dump_generic_node): Update declaration.
8883         * Makefile.in (pretty-print.o): Depend on vec.h.
8884         * pretty-print.c: Include tree.h and vec.h.
8885         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8886         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8887         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8888         pp_free_list): Use VECs instead of varrays.
8889         * pretty-print.h: Do not include varray.h.
8890         (struct tree_chunk_s): Declaration moved before its use.
8891         (output_buffer): Rename varray field to chunks.
8892         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8893         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8894         save_global_holes): Use VECs instead of varrays.
8895         * tree-match.h: Declare VECs of cfg_node, and hole_p.
8896         * tree-check.c (scan_cfg_stmts, push_node,
8897         print_matching_stmt): Removed.
8898         (tree_check_instance, push_global_holes_if_new, tree_check,
8899         execute_tree_check): Use VECs instead of varrays.
8900         (gate_tree_check): Don't execute the CFG check when basic_block_info
8901         is not available.
8903 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8905         * Merge from mainline (r115016:120733).
8907 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8909         * Merge from mainline (r117632:117661).
8911 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8913         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8914         * tree-pass.h (TDF_DEBUG, debug_p): New.
8915         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8916         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8917         get_loop_exit_condition, analyze_evolution_in_loop,
8918         analyze_initial_condition, analyze_scalar_evolution,
8919         instantiate_parameters, number_of_latch_executions): Use debug_p.
8920         * tree-chrec.c (chrec_apply): Use debug_p.
8921         * tree-data-ref.c: Include graphite.h.
8922         (dump_data_reference): Print also the access matrix.
8923         (analyze_array, analyze_indirect_ref, init_data_ref,
8924         analyze_offset_expr, address_analysis, object_analysis,
8925         create_data_ref, finalize_ddr_dependent,
8926         non_affine_dependence_relation, analyze_ziv_subscript,
8927         analyze_siv_subscript_cst_affine,
8928         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8929         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8930         analyze_miv_subscript, analyze_overlapping_iterations,
8931         build_classic_dist_vector, subscript_dependence_tester,
8932         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8933         (build_access_matrix_with_af): No longer static.
8934         * tree-data-ref.h (scop_p): ... declaration here.
8935         (data_reference.scop): New field.
8936         (DR_SCOP, DR_ACCESS_MATRIX): New.
8937         (build_access_matrix_with_af, dr_num_subscripts): Declared.
8938         * graphite.c (print_graphite_bb): Call dump_data_references.
8939         (print_scop): Use scop_nb_loops and scop_dim_domain.
8940         (test_for_scop_bound): Use debug_p.
8941         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8942         scop_nb_params.
8943         (scop_loop_index): Moved...
8944         (scop_record_loop): New.
8945         (build_scop_loop_nests): Use scop_record_loop.
8946         (build_scop_domain): Use scop_dim_domain.
8947         (build_access_matrix): Implemented.
8948         (build_scop_canonical_schedules): Use scop_nb_loops.
8949         (build_graphite_bb): Initialize GBB_SCOP.
8950         * graphite.h (scop_p): Moved...
8951         (graphite_bb.scop): New field.
8952         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8953         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8954         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8955         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8956         scop_loop_index): New.
8957         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8959 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
8961         * Merge from mainline (r117661:120450).
8963 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
8965         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8966         at the first declaration outside the varying loop, instantiate as
8967         far as possible.
8968         * tree-chrec.c (for_each_scev_op): New.
8969         * tree-chrec.h (for_each_scev_op): Declared.
8970         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8971         * tree-data-ref.c (get_references_in_stmt,
8972         find_data_references_in_stmt): New, from trunk.
8973         (find_data_references_in_loop): Use get_references_in_stmt
8974         and find_data_references_in_loop, modified as in trunk.
8975         (build_access_matrix_with_af): New.
8976         * tree-data-ref.h (data_reference): Add a field access_matrix.
8977         (data_ref_loc): New, as in trunk.
8978         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8979         invariant_in_scop_p, param_index, scan_tree_for_params,
8980         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8981         idx_record_param, idx_record_params, build_access_matrix,
8982         build_scop_data_accesses, build_scop_canonical_schedules,
8983         build_graphite_bb, build_scop_bbs, find_params_in_bb,
8984         build_scop_params): New.
8985         * graphite.h (graphite_bb): New.
8986         (scop): Add fields static_schedule, params, loop_nest,
8987         iteration_domain.
8988         * lambda.h: Declare vecs of lambda_matrix.
8989         * tree-flow.h (print_loop_ir_bb): Declared.
8990         * tree-cfg.c (print_loop_ir_bb): New.
8991         (print_loop): Use print_loop_ir_bb.
8993 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
8995         * Merge from mainline (r115016:117632).
8997 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
8999         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
9000         break due to a warning.
9002 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
9004         * graphite.c (print_scops, debug_scops): New.
9005         (graphite_transform): Renamed graphite_find_transform.
9006         * graphite.h (debug_scops): Declared.
9008 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
9010         * tree-match.c: Reformat following the GNU style.
9011         * tree-match.h: Reformat following the GNU style.
9012         * tree-pattern.h: Removed empty file.
9013         * Makefile.in: Remove references to tree-pattern.h.
9014         * tree-check.c: Reformat following the GNU style.
9015         (execute_tree_check): Move gate condition code to...
9016         (gate_tree_check): ...here.  New function.
9017         (pass_check): Use the gate function.
9019 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
9021         * tree-pattern.h: New. Tree pattern matching and checking using
9022         concrete syntax.
9023         * tree-check.c: New. Tree/CFG checking pass.
9024         * tree-match.c: New. Library for tree pattern matching.
9025         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
9026         * toplev.c, flags.h: Add globals for tree-check pass.
9027         * Makefile.in: Integrate the files in tree-check pass.
9028         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
9029         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
9030         Introduce a "lazy" pretty-print mode.
9031         * tree.c, tree.h: Add tree_name.
9033 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
9035         * doc/invoke.texi (-fgraphite): Correct typo.
9036         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
9037         use of print_loop_ir.
9038         * gcc.dg/graphite/scop-1.c: New.
9039         * gcc.dg/graphite/scop-2.c: New.
9040         * gcc.dg/graphite/graphite.exp: New.
9041         * graphite.c: Include domwalk.h.
9042         (print_scop): Print only the entry and exit blocks.
9043         (debug_scop): No longer static.
9044         (affine_expr): Fix formating.  Return also true when the expression is
9045         constant.
9046         (stmt_simple_for_scop_p): Fix formating.
9047         (build_scops): Use domwalk.
9048         (get_loop_start, end_scop, test_for_scop_bound): New.
9049         (graphite_transform_loops): Avoid printing on stderr.
9050         * graphite.h (debug_scop): Declared.
9051         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
9052         * Makefile.in (graphite.o): Depend on domwalk.h.
9053         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
9054         declarations for static functions.
9055         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
9056         controlling output verbosity.
9058 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
9059             Plesco Alexandru  <shurikx@gmail.com>
9061         * doc/invoke.texi (-fgraphite): Document.
9062         * tree-pass.h (pass_graphite_transforms): Declared.
9063         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
9064         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
9065         (pass_graphite_transforms): Defined.
9066         * tree-data-ref.c (free_data_ref, data_reference): Extern.
9067         * tree-data-ref.h (free_data_ref, data_reference): Declared.
9068         * graphite.c, graphite.h: New.
9069         * common.opt (fgraphite): Declared.
9070         * tree-flow.h (graphite_transform_loops): Declared.
9071         * Makefile.in (OBJS-common): Add graphite.o.
9072         (graphite.o): New rule.
9073         * passes.c (pass_graphite_transforms): Scheduled.