Fix PR47021: ADDR_EXPRs don't contain SCoP parameters.
[official-gcc/graphite-test-results.git] / gcc / ChangeLog.graphite
blobcf73e3088b04e3c1d0743eeba3755c9d9341ea5a
1 2010-12-21  Sebastian Pop  <sebastian.pop@amd.com>
3         PR tree-optimization/47021
4         * graphite-sese-to-poly.c (scan_tree_for_params): Handle ADDR_EXPR.
6 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
8         * graphite-sese-to-poly.c (analyze_drs_in_stmts): Fix set but
9         unused warning.
10         (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
12 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
14         * graphite-sese-to-poly.c (analyze_drs): Removed.
15         (build_scop_drs): Do not call analyze_drs.
16         (analyze_drs_in_stmts): New.
17         (insert_stmts): New.
18         (insert_out_of_ssa_copy): Call analyze_drs_in_stmts.
19         (insert_out_of_ssa_copy_on_edge): Same.
20         (rewrite_close_phi_out_of_ssa): Call insert_stmts.
21         (rewrite_phi_out_of_ssa): Same.
22         (rewrite_cross_bb_scalar_dependence): Same.
23         (split_reduction_stmt): Move data references in the new basic blocks.
24         (translate_scalar_reduction_to_array_for_stmt): Call insert_stmts.
26 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
28         * sese.c (rename_uses): Do not handle ADDR_EXPR in LHS of assignments.
30 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
32         PR middle-end/45297
33         * graphite-poly.c (new_poly_bb): Returns a poly_bb_p.  Do not take
34         the reduction bool in parameter.  Clear PBB_IS_REDUCTION.  Set GBB_PBB.
35         * graphite-poly.h (new_poly_bb): Update declaration.
36         (gbb_from_bb): Moved here...
37         (pbb_from_bb): New.
38         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
39         Removed.
40         (graphite_stmt_p): Removed.
41         (try_generate_gimple_bb): Returns a gimple_bb_p.  Do not pass in
42         sbitmap reductions.  Always build a gimple_bb_p.  Do not call
43         new_poly_bb.
44         (build_scop_bbs_1): Do not pass in sbitmap reductions.
45         (build_scop_bbs): Same.
46         (gbb_from_bb): ... from here.
47         (add_conditions_to_constraints): Moved up.
48         (analyze_drs): New.
49         (build_scop_drs): Call analyze_drs.  Remove all the PBBs that do
50         not contain data references.
51         (new_pbb_from_pbb): New.
52         (insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
53         block is split.
54         (rewrite_close_phi_out_of_ssa): Update call to
55         insert_out_of_ssa_copy_on_edge.
56         (rewrite_reductions_out_of_ssa): Now static.
57         (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
58         (split_pbb): New.
59         (split_reduction_stmt): Call split_pbb.
60         (translate_scalar_reduction_to_array): Pass in the scop, do not
61         pass in the sbitmap reductions.
62         (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
63         (rewrite_commutative_reductions_out_of_ssa_loop): Same.
64         (rewrite_commutative_reductions_out_of_ssa): Same.
65         (build_poly_scop): Call build_scop_bbs,
66         rewrite_commutative_reductions_out_of_ssa,
67         rewrite_reductions_out_of_ssa, and
68         rewrite_cross_bb_scalar_deps_out_of_ssa.  Move build_scop_drs
69         before scop_to_lst.
70         * graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
71         Removed declaration.
72         (rewrite_reductions_out_of_ssa): Same.
73         (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
74         (build_scop_bbs): Same.
75         * graphite.c (graphite_transform_loops): Do not initialize reductions.
76         Do not call build_scop_bbs,
77         rewrite_commutative_reductions_out_of_ssa,
78         rewrite_reductions_out_of_ssa, and
79         rewrite_cross_bb_scalar_deps_out_of_ssa.
80         * sese.h (struct gimple_bb): Add field pbb.
81         (GBB_PBB): New.
83         * gcc.dg/graphite/pr45297.c: New.
85 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
87         * graphite-sese-to-poly.c (handle_scalar_deps_crossing_scop_limits):
88         New.
89         (rewrite_cross_bb_scalar_deps): Pass in the scop.  Call
90         handle_scalar_deps_crossing_scop_limits.
91         (rewrite_cross_bb_scalar_deps_out_of_ssa): Create an empty BB
92         after the scop.  Update call to rewrite_cross_bb_scalar_deps.
94 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
96         * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
97         when replacing a constant in an ADDR_EXPR.
99 2010-10-20  Sebastian Pop  <sebastian.pop@amd.com>
101         * graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
102         for the stride.
103         (lst_do_strip_mine): Same.
104         (scop_do_strip_mine): Same.
105         * graphite-poly.c (apply_poly_transforms): Update call to
106         scop_do_strip_mine.
107         * graphite-poly.h (scop_do_strip_mine): Update declaration.
109 2010-09-24  Sebastian Pop  <sebastian.pop@amd.com>
111         PR middle-end/45758
112         * graphite.c (graphite_initialize): Call scev_reset.
114 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
116         * sese.h (scev_analyzable_p): Return false for real or floating
117         point.  Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
119 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
121         PR middle-end/45758
122         * gfortran.dg/graphite/pr45758.f90: New.
124 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
126         * graphite-scop-detection.c (is_scop_p): Free bblist.
128 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
130         * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
131         and ps.
132         * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
133         domain.
134         * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
135         Do not allocate ub_expr, it is passed in initialized.
137 2010-09-21  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
139         * common.opt (fgraphite-dump-cloog): New flag.
140         * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
141         * graphite-clast-to-gimple.c (init_cloog_input_file): New.
142         (build_cloog_prog): Dump CLooG input file when
143         flag_graphite_dump_cloog is set.
144         * graphite-cloog-compat.h (cloog_program_dump_cloog): New.
146 2010-09-20  Sebastian Pop  <sebastian.pop@amd.com>
148         Revert previous patch "New flag: -fgraphite-dump-cloog."
150 2010-09-20  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
152         * common.opt (fgraphite-dump-cloog): New flag.
153         * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
154         * graphite-clast-to-gimple.c (init_cloog_input_file): New.
155         (build_cloog_prog): Dump CLooG input file when
156         flag_graphite_dump_cloog is set.
158 2010-09-20  Sebastian Pop  <sebastian.pop@amd.com>
160         * graphite-clast-to-gimple.c (graphite_verify): Remove call to
161         verify_dominators for CDI_POST_DOMINATORS.
162         * sese.h: Remove comment about CDI_POST_DOMINATORS.
163         (recompute_all_dominators): Remove call to free_dominance_info
164         for CDI_POST_DOMINATORS.  Remove call to calculate_dominance_info
165         for CDI_POST_DOMINATORS.
167 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
169         * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
170         over pbb_dim_iter_domain.
172 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
174         * graphite-flattening.c: Fix comments.
176 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
178         * Makefile.in (OBJS-common): Add graphite-flattening.o.
179         (graphite-flattening.o): New rule.
180         * common.opt (floop-flatten): New flag.
181         * doc/invoke.texi (-floop-flatten): Documented.
182         * graphite-flattening.c: New.
183         * graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
184         * graphite-poly.h (flatten_all_loops): Declared.
185         (lst_remove_loop_and_inline_stmts_in_loop_father): New.
186         * tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
187         is set, also set flag_graphite.
189 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
191         * graphite-poly.c (cloog_checksum): New.
192         * graphite-poly.h (cloog_checksum): Declared.
194 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
196         * graphite-poly.c (pbb_number_of_iterations): Removed.
197         (pbb_number_of_iterations_at_time): Correctly compute the number
198         of iterations in the transformed loop.
199         * graphite-poly.h (pbb_number_of_iterations): Removed.
201 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
203         * graphite-poly.h (lst_update_scattering_seq): Removed.
204         (lst_update_scattering): Correctly handle outermost loop dewey
205         renumbering.
207 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
209         * graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
210         lst_strip_mine_profitable_p.  Call lst_niter_for_loop.
211         * graphite-poly.h (lst_niter_for_loop): New.
213 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
215         * graphite-poly.c (apply_poly_transforms): Do not abort when the
216         transform read from disk is not legal.  Call fatal_error instead.
218 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
220         * graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
221         (print_scop_header): Removed.  Inlined in the only call place...
222         (print_scop): ... here.
224 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
226         * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
228 2010-09-02  Vladimir Kargov  <kargov@gmail.com>
230         * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
231         (is_valid_stmt_p): Add data reference and operation-specific checks.
232         (is_valid_bb_p): Change structure, add loop validity check.
233         (is_scop_p): Move the TODO list
234         (find_scops_new): New.
235         (build_scops_new): Move part of functionality to find_scops_new and
236         build_scops.  Add necessary steps for successful SCoP construction.
237         (build_scops): Compute SCoP sets for both detection algorithms, choose
238         the resulting one depending on static condition.
240 2010-08-24  Sebastian Pop  <sebastian.pop@amd.com>
242         * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
244 2010-08-24  Sebastian Pop  <sebastian.pop@amd.com>
246         * graphite-dependences.c (dot_deps): Avoid set but not used warning.
247         (dot_deps_stmt): Same.
248         * graphite-poly.c (dot_lst): Same.
250 2010-08-23  Sebastian Pop  <sebastian.pop@amd.com>
252         * graphite-blocking.c (scop_do_strip_mine): Do not call
253         graphite_legal_transform.
254         (scop_do_block): Same.
256 2010-08-20  Vladimir Kargov  <kargov@gmail.com>
258         * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
259         description.
261 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
263         PR middle-end/45230
264         * gcc.dg/graphite/id-pr45230.c: New.
266 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
268         * tree-scalar-evolution.c (instantiate_array_ref): New.
269         (instantiate_scev_r): Also handle ARRAY_REFs.
271 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
273         * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
274         Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
275         RESULT_DECL, and FIELD_DECL.  Return false for an
276         SSA_NAME_IS_DEFAULT_DEF.
277         (compute_scalar_evolution_in_loop): Do not further analyze the
278         scalar evolution when no_evolution_in_loop_p returns true.
280 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
282         * tree-chrec.h (evolution_function_is_affine_p): Do not check
283         whether CHREC_LEFT is invariant.  A function is affine when
284         CHREC_RIGHT is invariant.
286 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
288         * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
289         is_gimple_reg.
290         (rewrite_degenerate_phi): Same.
291         (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
293 2010-08-18  Vladimir Kargov  <kargov@gmail.com>
295         * graphite-scop-detection.c (graphite_can_represent_scev,
296         graphite_can_represent_expr, stmt_has_simple_data_refs_p,
297         graphite_can_represent_loop): Remove outermost_loop.
299 2010-08-17  Sebastian Pop  <sebastian.pop@amd.com>
301         PR middle-end/45229
302         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
303         handle GIMPLE_CALLs with no LHS.
305 2010-08-17  Riyadh Baghdadi  <baghdadi.mr@gmail.com>
306             Sebastian Pop  <sebastian.pop@amd.com>
308         * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
309         Call remove-build-file to clean up the generated *.graphite files.
311 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
313         * doc/invoke.texi (debugging options): Update documentation.
314         (-floop-interchange): Same.
315         (-flopp-strip-mine): Same.
316         (-floop-block): Same.
317         (-fgraphite-read): Add documentation.
318         (-fgraphite-write): Same.
320 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
322         * toplev.c (process_options): Disable graphite loop optimization
323         options when -fgraphite-read flag is used.
325 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
327         * graphite-poly.c (init_graphite_out_file): New.
328         (init_graphite_in_file): New.
329         (apply_poly_transforms): Updated to enable reading and writing of
330         multiple scop files.
331         * toplev.c (init_asm_output): Remove graphite in/out file initialization.
333 2010-08-17  Tobias Grosser  <grosser@fim.uni-passau.de>
335         * graphite-scop-detection.c (graphite_can_represent_scev): Remove
336         redundant checks.
338 2010-08-12  Sebastian Pop  <sebastian.pop@amd.com>
340         * graphite-clast-to-gimple.c (precision_for_value): Adjust
341         computation of precision by 1.
343 2010-08-12  Riyadh Baghdadi <baghdadi.mr@gmail.com>
345         * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
346         (openscop_read_polyhedron_matrix): New.
347         * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
348         (openscop_read_N_int): Same.
349         * graphite-poly.c (openscop_read_N_int): New.
350         (openscop_read_one_int): New.
351         (openscop_read_N_string): New.
352         (openscop_read_one_string): New.
353         (openscop_read_powerset_matrix): New.
354         (graphite_read_transforms): Remove.
355         (graphite_read_scatt): New.
356         (graphite_read_scop_file): New.
357         (apply_poly_transforms): Updated to call graphite_read_scop_file.
359 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
361         * graphite-poly.c: Change include order.
363 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
365         * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
366         (cloog_matrix_nrows): New.
368 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
370         * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
371         from matrix lines.
372         * graphite-poly.c (openscop_print_scattering_function_1): Same.
373         (print_scattering_function_1): Same.
374         (openscop_print_pbb_domain): Same.
375         (openscop_print_scop_context): Same.
376         (print_scop_context): Same.
378 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
380         * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
381         (openscop_print_pdr_polyhedron): Print pph.
383 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
385         * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
386         * gfortran.dg/graphite/graphite.exp: Same.
387         * gcc.dg/graphite/vect-pr43423.c: New.
389 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
391         * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
392         priority signed types.
394 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
396         * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
397         to lang_hooks.types.type_for_size.  Call build_nonstandard_integer_type.
399 2010-07-29  Riyadh Baghdadi <baghdadi.mr@gmail.com>
401         * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
402         (openscop_print_polyhedron_matrix): New.
403         * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
404         * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
405         (openscop_print_pdr_powerset): New.
406         (openscop_print_powerset_matrix): New.
407         (openscop_print_scattering_function_1): New.
408         (print_scattering_function): Add support for scattering names and
409         OpenScop format.
410         (graphite_write_transforms): Remove.
411         (apply_poly_transforms): Updated to call print_scop.
412         (print_pdr_access_layout): Updated to support OpenScop format.
413         (print_pdr): Same.
414         (openscop_print_pbb_domain): New.
415         (print_pbb_body): Added a parameter to allow indicating that pbb_body is
416         not provided.
417         (print_pbb): Updated to call the new print_pbb_body.
418         (openscop_print_scop_context): New.
419         (print_scop_header): New.
420         (print_scop): Updated to call print_scop_header.
421         * graphite-poly.h: Document OpenScop format.
423 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
425         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
426         the case removed in the previous patch, when the only phi argument
427         is defined in the same loop as the phi node itself.  Handle it
428         separately from the invariant case by both propagating it outside
429         the region and replacing the phi node with an assign.
431 2010-07-28  Sebastian Pop  <sebastian.pop@amd.com>
433         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
434         constant phi nodes with one argument are is_gimple_min_invariant
435         and SSA_NAME_IS_DEFAULT_DEF.
437         * gfortran.dg/graphite/id-22.f: New.
439 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
441         * graphite.c (graphite_initialize): Do not initialize
442         CLooG and initialize the Parma Polyhedra Library
443         manually when using CLOOG_ORG.
444         (graphite_finalize): Do not finalize CLooG and finalize
445         the Parma Polyhedra Library manually when using CLOOG_ORG.
446         * graphite-cloog-compat.h (cloog_initialize): Hide function
447         when using CLOOG_ORG.
448         (cloog_finalize): Same.
450 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
452         * graphite-clast-to-gimple.c (free_scattering): Change
453         CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
454         (CLOOG_ORG).
455         (build_cloog_prog): Same.
456         * graphite-cloog-compat.h (cloog_domain): Removed.
457         (cloog_scattering): New.
458         (cloog_set_domain): Removed.
459         (cloog_set_scattering): New.
460         (cloog_next_domain): Removed.
461         (cloog_next_scattering): New.
462         (cloog_set_next_domain): Removed.
463         (cloog_set_next_scattering): New.
464         (CloogScatteringList): New.
465         (CloogScattering): New.
466         (cloog_scattering_free): New.
467         (new_Cloog_Scattering_from_ppl_Polyhedron): New.
468         * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
469         New.
471 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
473         * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
474         CloogState.
475         (set_cloog_options): Same.
476         (print_clast_stmt): Same.
477         (scop_to_clast): Same.
478         (print_generated_program): Same.
479         (gloog): Same.
480         * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
481         (scop_to_clast): Extend with CloogState.
482         * graphite-cloog-util.c: Include graphite-cloog-compat.h
483         (new_Cloog_Domain_from_ppl_Polyhedron):
484         Extend with CloogState.  Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
485         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
486         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
487         * graphite-cloog-util.h (build_cloog_prog): Same.
488         * graphite-cloog-copat.h (build_cloog_prog): New.
489         (CloogState): New.
490         (cloog_state_malloc): New.
491         (cloog_state_free): New.
492         (cloog_loop_malloc): New.
493         (cloog_options_malloc): New.
494         (cloog_statement_alloc): New.
495         (cloog_domain_from_cloog_matrix): New.
496         (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
497         (new_Cloog_Domain_from_ppl_Polyhedron): New.
499 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
501         * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
502         type of NAME now depends on used CLooG version.
503         (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
504         (gcc_type_for_clast_expr): Same.
505         (print_clast_stmt): Replace pprint with clast_pprint.
506         * graphite-cloog-compat.h: Provide compatibility macros for
507         CLooG Legacy.
508         (clast_name_p): New.
509         (clast_expr_term): New.
510         (clast_expr_red): New.
511         (clast_expr_bin): New.
512         (clast_pprint): New.
514 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
516         * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
517         compatible to newer CLooG releases (CLOOG_ORG).
518         (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
519         (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
520         * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
521         (build_cloog_prog) : New.
522         (cloog_program_extract_scalars): New.
523         (cloog_program_scatter): New.
525 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
527         * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
528         conditionally (CLOOG_ORG).
529         * graphite-cloog-compat.h: New.  Include graphite-cloog-compat.h.
530         (cloog_statement_usr): New.
531         (cloog_domain): Same.
532         (cloog_set_domain): Same.
533         (cloog_next_domain): Same.
534         (cloog_set_next_domain): Same.
535         (cloog_program_nb_scattdims): Same.
536         (cloog_program_set_nb_scattdims): Same.
537         (cloog_program_names): Same.
538         (cloog_program_set_names): Same.
539         (cloog_program_set_context): Same.
540         (cloog_program_set_loop): Same.
541         (cloog_program_blocklist): Same.
542         (cloog_program_set_blocklist): Same.
543         (cloog_program_scaldims): Same.
544         (cloog_program_set_scaldims): Same.
545         (cloog_names_nb_parameters): Same.
546         (cloog_names_set_nb_parameters): Same.
547         (cloog_names_parameters): Same.
548         (cloog_names_set_parameters): Same.
549         (cloog_names_set_nb_iterators): Same.
550         (cloog_names_set_iterators): Same.
551         (cloog_names_set_nb_scattering): Same.
552         (cloog_names_set_scattering): Same.
553         (cloog_statement_set_usr): Same.
554         (cloog_loop_set_next): Same.
555         (cloog_loop_set_domain): Same.
556         (cloog_loop_set_block): Same.
557         (cloog_block_list_next): Same.
558         (cloog_block_list_set_next):
559         (cloog_block_list_set_block): Same.
561 2010-07-27  Sebastian Pop  <sebastian.pop@amd.com>
563         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
564         a bool.
565         (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
566         (rewrite_commutative_reductions_out_of_ssa_loop): Same.
567         (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
568         when something has been changed.
569         (rewrite_commutative_reductions_out_of_ssa): Same.
571         * gcc.dg/graphite/id-26.c: New.
573 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
575         * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
576         handle the case when def is in the sese region.
577         (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
578         for invariant expressions.
579         (rewrite_cross_bb_phi_deps): Removed.
580         (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
581         (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
582         rewrite_cross_bb_phi_deps.
584 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
586         * graphite-sese-to-poly.c
587         (rewrite_commutative_reductions_out_of_ssa_loop): Call
588         scev_analyzable_p only on is_gimple_reg
590         * gcc.dg/graphite/id-25.c: New.
592 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
594         * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
595         (rewrite_close_phi_out_of_ssa): Propagate constant values or
596         parametric expressions outside the scop region.
597         (rewrite_cross_bb_scalar_deps): Same.
598         * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
600         * gcc.dg/graphite/run-id-5.c: New.
601         * gcc.dg/graphite/run-id-6.c: New.
602         * gfortran.dg/graphite/id-21.f: New.
604 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
606         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
607         SSA_NAME_DEF_STMT only on SSA_NAMEs.
609         * gcc.dg/graphite/id-24.c: New.
611 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
613         * tree-scalar-evolution.c (instantiate_scev_name): Do not
614         instantiate default definitions.
616 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
618         * graphite-scop-detection.c (is_valid_stmt_p): New.
619         (is_valid_bb_p): New.
621 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
622             Sebastian Pop  <sebastian.pop@amd.com>
624         * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
625         (loop_exits_from_bb_p): New.
626         * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
627         (loop_exits_from_bb_p): Declared.
628         * graphite-scop-detection.c (scopdet_basic_block_info): Call
629         loop_exits_to_bb_p.
631 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
633         * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
634         tree-data-ref.h.
635         (dot_regions_1): New.
636         (dot_regions): New.
637         * refined-regions.h (dot_regions): Declared.
638         * Makefile.in (refined-regions.o): Update dependences.
640 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
642         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
643         extra parameter for the region.  Call scev_analyzable_p.
644         (rewrite_reductions_out_of_ssa): Update call to
645         rewrite_close_phi_out_of_ssa.
646         (rewrite_cross_bb_phi_deps): Same.
647         (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
648         parameter for the region.  Call scev_analyzable_p.
649         (rewrite_commutative_reductions_out_of_ssa): Update call to
650         rewrite_commutative_reductions_out_of_ssa_loop.
652 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
654         * gcc.dg/tree-ssa/pr20742.c: New.
656 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
658         * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
660         * gcc.dg/graphite/id-23.c: New.
662 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
664         * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
665         SSA scalar phi nodes that can be scev_analyzable_p.
667         * gfortran.dg/graphite/id-20.f: Adjust testcase.
669 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
671         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
672         handle SSA_NAME_IS_DEFAULT_DEF.
674 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
676         * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
678         * gcc.dg/graphite/pr42729.c: New.
680 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
682         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
683         case non close-phi nodes with one argument.
685 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
687         * sese.h (scev_analyzable_p): Scevs could be expressions without
688         chrecs and still be scev_analyzable_p.
690 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
692         * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
694 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
696         * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
697         * cfgloop.h (struct loop): Remove single_iv field.
698         * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
699         (scop_canonicalize_loops): Removed.
700         (scop_ivs_can_be_represented): Do not use loop->single_iv.  Iterate
701         over all the loop phi nodes in loop->header.
702         (build_poly_scop): Remove use of scop_canonicalize_loops.
704 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
706         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
707         handle GIMPLE_CALL.
709 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
711         * tree-chrec.c (chrec_apply): Should only apply to the specified
712         variable.  Also handle multivariate chains of recurrences that
713         satisfy evolution_function_is_affine_p.  Also handle CASE_CONVERT.
715 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
717         * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
718         (debug_clast_name_indexes_1): Removed.
719         (debug_clast_name_indexes): Removed.
720         (pbb_to_depth_to_oldiv): Removed.
721         (build_iv_mapping): Replace the use of rename_map with iv_map.
722         (translate_clast_user): Remove uses of rename_map.  Allocate and
723         free iv_map.
724         (translate_clast_for_loop): Remove uses of rename_map.
725         (translate_clast_for): Same.
726         (translate_clast_guard): Same.
727         (translate_clast): Same.
728         (gloog): Same.
729         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
730         * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
731         * sese.c (set_rename): Now static.
732         (rename_variables_in_stmt): Removed.
733         (rename_uses): New.
734         (is_parameter): Removed.
735         (is_iv): Removed.
736         (expand_scalar_variables_call): Removed.
737         (expand_scalar_variables_ssa_name): Removed.
738         (expand_scalar_variables_expr): Removed.
739         (expand_scalar_variables_stmt): Removed.
740         (expand_scalar_variables): Removed.
741         (rename_variables): Removed.
742         (remove_condition): Removed.
743         (get_true_edge_from_guard_bb): Removed.
744         (get_false_edge_from_guard_bb): Removed.
745         (struct igp): Removed.
746         (default_before_guard): Removed.
747         (convert_for_phi_arg): Removed.
748         (add_guard_exit_phis): Removed.
749         (insert_guard_phis): Removed.
750         (graphite_copy_stmts_from_block): Now also uses iv_map and a
751         region.  Do not copy conditions.  Do not copy induction variables.
752         Call rename_uses.
753         (copy_bb_and_scalar_dependences): Allocate a local rename_map for
754         the translated statement.  Use the iv_map for the induction
755         variable renaming.
756         * sese.h (copy_bb_and_scalar_dependences): Update declaration.
757         (set_rename): Removed declaration.
758         (scev_analyzable_p): ...here.
759         * tree-chrec.c (chrec_apply_map): New.
760         * tree-chrec.h (chrec_apply_map): Declared.
762 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
764         * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
765         insert_loop_close_phis.
766         * sese.c (name_defined_in_loop_p): Removed.
767         (expr_defined_in_loop_p): Removed.
768         (alive_after_loop): Removed.
769         (close_phi_not_yet_inserted_p): Removed.
770         (struct alep): Removed.
771         (add_loop_exit_phis): Removed.
772         (insert_loop_close_phis): Removed.
774 2010-07-15  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
776         * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
777         condition.
778         * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
780 2010-07-07  Sebastian Pop  <sebastian.pop@amd.com>
782         * gfortran.dg/graphite/id-20.f: New.
784 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
786         * graphite-cloog-util.h: Added cloog.h.
787         * graphite-blocking.c: Removed cloog.h.
788         * graphite-dependences.c: Same.
789         * graphite-interchange.c: Same.
790         * graphite-poly.c: Same.
791         * graphite-ppl.c: Same.
792         * graphite-scop-detection.c: Same.
793         * graphite-sese-to-poly.c:
794         Removed cloog.h.
795         Removed graphite-clast-to-gimple.h.
796         (check_poly_representation): Removed (unused).
797         * graphite-sese-to-poly.h
798         (check_poly_representation): Removed (unused).
800 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
802         * Makefile.in
803         (OBJS-common): Added graphite-cloog-util.o.
804         (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
805         (graphite-cloog-util.o): New.
806         (graphite-ppl.o): Added graphite-cloog-util.h.
807         * graphite-clast-to-gimple.c:
808         Added graphite-cloog-util.h to include statements.
809         * graphite-cloog-util.c: New.
810         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
811         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
812         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
813         (new_C_Polyhedron_from_Cloog_Matrix): Same.
814         (ppl_Constrain_System_number_of_constraints): Same.
815         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
816         (oppose_constraint): Same.
817         (cloog_matrix_to_ppl_constraint): Same.
818         (new_Constraint_System_from_Cloog_Matrix): Same.
819         (insert_constraint_into_matrix): Same. Declared static.
820         * graphite-cloog-util.h: New.
821         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
822         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
823         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
824         (new_C_Polyhedron_from_Cloog_Matrix): Same.
825         (insert_constraint_into_matrix): Same.
826         * graphite-ppl.c:
827         Added graphite-cloog-util.h to include statements.
828         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
829         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
830         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
831         (new_C_Polyhedron_from_Cloog_Matrix): Same.
832         (insert_constraint_into_matrix): Same.
833         (ppl_Constrain_System_number_of_constraints): Same.
834         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
835         (oppose_constraint): Same.
836         (cloog_matrix_to_ppl_constraint): Same.
837         (new_Constraint_System_from_Cloog_Matrix): Same.
838         * graphite-ppl.h:
839         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
840         graphite-cloog-util.h.
841         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
842         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
843         (new_C_Polyhedron_from_Cloog_Matrix): Same.
844         (insert_constraint_into_matrix): Removed.
846 2010-07-04  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
848         * graphite-clast-to-gimple.c
849         (precision_for_value): Resolve value_* calls to matching mpz_* calls.
850         (precision_for_interval): Same.
851         (gcc_type_for_interval): Same.
852         (compute_type_for_level): Same.
853         * graphite-interchange.c
854         (lst_interchange_profitable_p): Same.
855         * graphite-poly.c
856         (psct_scattering_dim_for_loop_depth): Same.
857         * graphite-ppl.c
858         (ppl_max_for_le_pointset): Same.
859         (ppl_min_for_le_pointset): Same.
861 2010-06-25  Vladimir Kargov  <kargov@gmail.com>
863         * refined-regions.c (bb_index_compare): New.
864         (get_bbs_in_region): New.
865         (print_bbs_in_region): New.
866         (print_refined_region): Add an argument that allows to print
867         all basic blocks contained in regions.
868         (debug_refined_region): Update call to print_refined_region.
869         * refined-regions.h (print_refined_region): Update declaration.
870         (get_bbs_in_region): Declared.
871         * graphite-scop-detection.c (build_scops_new): Print the refined
872         region tree into the Grahite dump file.
874 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
876         * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
877         (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
879 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
881         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
882         rewrite_close_phi_out_of_ssa.
884         * gcc.dg/graphite/id-22.c: New.
886 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
888         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
890 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
892         * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
893         rename_map.
894         * sese.c (debug_rename_map): Same.
895         (get_rename): Same.
896         (set_rename): Same.
897         (rename_variables_in_stmt): Same.
898         (expand_scalar_variables_call): Same.
899         (expand_scalar_variables_ssa_name): Same.
900         (expand_scalar_variables_expr): Same.
901         (expand_scalar_variables_stmt): Same.
902         (expand_scalar_variables): Same.
903         (rename_variables): Same.
904         (graphite_copy_stmts_from_block): Same.
905         (copy_bb_and_scalar_dependences): Same.
907 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
909         * graphite-clast-to-gimple.c (copy_renames): Removed.
910         (translate_clast_for): Do not call copy_renames.
911         (translate_clast_guard): Same.
913 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
915         * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
916         (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
917         (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
918         before rewrite_cross_bb_scalar_deps.
920 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
922         * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
923         Early return in when flag_associative_math is not set.
925 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
927         * gcc.dg/graphite/run-id-2.c: Call abort.
929 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
931         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
932         of SSA copies on edges except for loop->latch.
934 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
936         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
937         Split out of rewrite_reductions_out_of_ssa.
938         * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
939         Declared.
940         * graphite.c (graphite_transform_loops): Call it.
942 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
944         * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
946 2010-06-15  Sebastian Pop  <sebastian.pop@amd.com>
948         * passes.c (init_optimization_passes): Add pass_graphite.
949         Schedule a pass_copy_prop before pass_graphite_transforms.
950         * timevar.def (TV_GRAPHITE): Declared.
951         * tree-pass.h (pass_graphite): Declared.
952         * tree-ssa-loop.c (pass_graphite): New.
954         * gcc.dg/graphite/id-20.c: New.
956 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
958         * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
959         Remove calls to rename_nb_iterations and rename_sese_parameters.
960         * graphite-clast-to-gimple.h (gloog): Update declaration.
961         * graphite.c (graphite_transform_loops): Update call to gloog.
962         * sese.c (rename_variables_in_expr): Removed.
963         (rename_nb_iterations): Removed.
964         (rename_sese_parameters): Removed.
965         * sese.h (rename_nb_iterations): Removed.
966         (rename_sese_parameters): Removed.
968 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
970         * graphite-clast-to-gimple.c (gloog): Remove call to
971         sese_adjust_liveout_phis.
972         * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
973         SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
974         (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
975         rewrite_phi_out_of_ssa.
976         * sese.c (get_vdef_before_sese): Removed.
977         (sese_adjust_vphi): Removed.
978         (sese_adjust_liveout_phis): Removed.
979         * sese.h (sese_adjust_liveout_phis): Removed.
981 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
983         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
984         argument for the place after which to insert the out of SSA copy.
985         (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
986         (rewrite_phi_out_of_ssa): Same.
987         (rewrite_cross_bb_scalar_deps): Same.
988         (insert_copyout): Removed.
989         (insert_copyin): Removed.
990         (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
991         insert_out_of_ssa_copy_on_edge instead of insert_copyout and
992         insert_copyin.
994 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
996         * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
997         (rewrite_reductions_out_of_ssa): Same.
998         (rewrite_commutative_reductions_out_of_ssa): Same.
999         (build_poly_scop): Do not call these functions.
1000         * graphite-sese-to-poly.h (build_poly_scop): Declared.
1001         (rewrite_reductions_out_of_ssa): Declared.
1002         (rewrite_commutative_reductions_out_of_ssa): Declared.
1003         * graphite.c (graphite_transform_loops): Call on every scop
1004         rewrite_commutative_reductions_out_of_ssa before calling
1005         rewrite_reductions_out_of_ssa and build_scop_bbs.
1007 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1009         * graphite-dependences.c (dot_deps): Make system call to dotty run
1010         in background.
1011         (dot_deps_stmt): Same.
1012         * graphite-poly.c (dot_lst): Same.
1014 2010-06-11  Sebastian Pop  <sebastian.pop@amd.com>
1016         * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
1017         old_type in parameter.
1018         (gcc_type_for_value): Update call to gcc_type_for_interval.
1019         (compute_type_for_level_1): Renamed compute_type_for_level.
1020         Update call to gcc_type_for_interval.
1022 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1024         * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
1025         the scev analysis when the variable is not used outside the loop
1026         in a close phi node: call compute_overall_effect_of_inner_loop.
1028 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1030         * graphite-sese-to-poly.c (single_pred_cond): Renamed
1031         single_pred_cond_non_loop_exit.  Return NULL for loop exit edges.
1032         (build_sese_conditions_before): Renamed call to single_pred_cond.
1033         (build_sese_conditions_after): Same.
1035 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1037         * graphite-poly.h: Fix comments and indentation.
1038         * graphite-sese-to-poly.c: Same.
1039         (build_sese_conditions_before): Compute stmt and gbb only when needed.
1040         * tree-chrec.c: Fix comments and indentation.
1041         (tree-ssa-loop-niter.c): Same.
1043 2010-06-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1045         * refined-regions.c (create_region): Only initialize the region.
1046         (find_regions_with_entry): Initialize parent relation and bbmap
1047         correctly.
1048         (build_regions_tree): Set outermost_region to region instead of
1049         topmost_region.
1050         (calculate_region_tree): Remove unneeded parameters.
1052 2010-06-02  Tobias Grosser  <grosser@fim.uni-passau.de>
1054         * graphite-scop-detection.c (is_scop_p): New.
1055         (build_scops_new): New. A skeleton for the new scop detection.
1056         (build_scops_old): Renamed from build_scops.
1057         (build_scops): New version. Call the new and the old scop
1058         detection.
1060 2010-05-27  Tobias Grosser  <grosser@fim.uni-passau.de>
1061             Antoniu Pop  <antoniu.pop@gmail.com>
1063         * Makefile.in (OBJS-common): Add refined-regions.o.
1064         (refined-regions.o): New.
1065         (graphite-scop-detection.o): Use refined-regions.h.
1066         * graphite-scop-detection.c: Include refined-regions.h
1067         (build_scops): Also build the refined region tree.
1068         * refined-regions.c: New. Adds an algorithm to detect refined
1069         regions.
1070         (print_refined_region): New.
1071         (debug_refined_region): New.
1072         (refined_region_contains_bb_p): New.
1073         (refined_region_contains_region_p): New.
1074         (is_common_df): New.
1075         (struct find_regions_global_data): New.
1076         (is_region): New.
1077         (typedef struct bb_bb_def): New.
1078         (new_bb_bb_def): New.
1079         (bb_bb_map_hash): New.
1080         (eq_bb_bb_map): New.
1081         (find_new_bb): New.
1082         (bb_reg_def): New.
1083         (new_bb_reg_def): New.
1084         (bb_reg_map_hash): New.
1085         (eq_bb_reg_map): New.
1086         (find_new_region): New.
1087         (insert_new_reg): New.
1088         (insert_new_bb): New.
1089         (insert_shortcut): New.
1090         (get_next_postdom): New.
1091         (create_region): New.
1092         (find_regions_with_entry): New.
1093         (find_regions_adc): New.
1094         (find_regions): New.
1095         (get_topmost_parent): New.
1096         (build_regions_tree): New.
1097         (calculate_region_tree): New.
1098         (free_region_tree): New.
1099         * refined-regions.h: New.
1100         (struct refined_region): New.
1101         (calculate_region_tree): New.
1102         (free_region_tree): New.
1103         (refined_region_contains_bb_p): New.
1104         (refined_region_contains_region_p): New.
1105         (print_refined_region): New.
1106         (debug_refined_region): New.
1108 2010-05-26  Sebastian Pop  <sebastian.pop@amd.com>
1110         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1111         size_one_node.
1113 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
1115         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
1116         type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
1118 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
1120         * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
1121         phi_arg_in_outermost_loop.
1122         (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
1123         (remove_invariant_phi): Same.
1125 2010-04-12  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1127         * graphite-blocking.c
1128         (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
1129         * graphite-clast-to-gimple.c
1130         (clast_to_gcc_expression): Same.
1131         (precision_for_value): Same.
1132         (precision_for_interval): Same.
1133         (gcc_type_for_interval): Same.
1134         (graphite_create_new_guard): Same.
1135         (compute_bounds_for_level): Same.
1136         (graphite_create_new_loop_guard): Same.
1137         * graphite-interchange.c
1138         (build_linearized_memory_access): Same.
1139         (pdr_stride_in_loop): Same.
1140         (memory_strides_in_loop_1): Same.
1141         (memory_strides_in_loop): Same.
1142         (extend_scattering): Same.
1143         (psct_scattering_dim_for_loop_depth): Same.
1144         (pbb_number_of_iterations): Same.
1145         * graphite-poly.h
1146         (debug_iteration_domains): Same.
1147         * graphite-ppl.c
1148         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1149         (ppl_set_inhomogeneous_gmp): Same.
1150         (ppl_strip_loop): Same.
1151         (ppl_lexico_compare_linear_expressions): Same.
1152         (ppl_read_polyhedron_matrix): Same.
1153         (ppl_max_for_le_pointset): Same.
1154         * graphite-ppl.h
1155         (ppl_read_polyhedron_matrix): Same.
1156         (tree_int_to_gmp): Same.
1157         (gmp_cst_to_tree): Same.
1158         (ppl_set_inhomogeneous): Same.
1159         (ppl_set_inhomogeneous_tree): Same.
1160         (ppl_set_coef): Same.
1161         (ppl_set_coef_tree): Same.
1162         * graphite-sese-to-poly.c
1163         (build_pbb_scattering_polyhedrons): Same.
1164         (build_scop_scattering): Same.
1165         (scan_tree_for_params_right_scev): Same.
1166         (scan_tree_for_params): Same.
1167         (find_params_in_bb): Same.
1168         (find_scop_parameters): Same.
1169         (add_upper_bounds_from_estimated_nit): Same.
1170         (build_loop_iteration_domains): Same.
1171         (add_condition_to_domain): Same.
1172         (pdr_add_memory_accesses): Same.
1174 2010-04-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1176         * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
1177         CLooG's value_* macros to their respective mpz_* counterparts.
1178         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
1179         (graphite_create_new_loop_guard): Same.
1180         * graphite-interchange.c (build_linearized_memory_access): Same.
1181         (pdr_stride_in_loop): Same.
1182         (memory_strides_in_loop_1): Same.
1183         (1st_interchange_profitable_p): Same.
1184         * graphite-poly.c (extend_scattering): Same.
1185         (psct_scattering_dim_for_loop_depth): Same.
1186         (pbb_number_of_iterations): Same.
1187         (pbb_number_of_iterations_at_time): Same.
1188         * graphite-poly.h (new_1st_loop): Same.
1189         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
1190         (oppose_constraint): Same.
1191         (insert_constraint_into_matrix): Same.
1192         (ppl_set_inhomogeneous_gmp): Same.
1193         (ppl_set_coef_gmp): Same.
1194         (ppl_strip_loop): Same.
1195         (ppl_lexico_compare_linear_expressions): Same.
1196         (ppl_max_for_le_pointset): Same.
1197         (ppl_min_for_le_pointset): Same.
1198         (ppl_build_realtion): Same.
1199         * graphite-ppl.h (gmp_cst_to_tree): Same.
1200         (ppl_set_inhomogeneous): Same.
1201         (ppl_set_inhomogeneous_tree): Same.
1202         (ppl_set_coef): Same.
1203         (ppl_set_coef_tree): Same.
1204         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
1205         (build_scop_scattering): Same.
1206         (add_value_to_dim): Same.
1207         (scan_tree_for_params_right_scev): Same.
1208         (scan_tree_for_params_int): Same.
1209         (scan_tree_for_params): Same.
1210         (find_params_in_bb): Same.
1211         (find_scop_parameters): Same.
1212         (add_upper_bounds_from_estimated_nit): Same.
1213         (build_loop_iteration_domains): Same.
1214         (create_linear_expr_from_tree): Same.
1215         (add_condition_to_domain): Same.
1216         (pdr_add_memory_accesses): Same.
1218 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1220         PR middle-end/43519
1221         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1222         lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1223         When converting an unsigned type to signed, double its precision.
1224         (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1225         (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1226         (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1228 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1230         PR middle-end/43519
1231         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1232         build_nonstandard_integer_type.
1233         (gcc_type_for_interval): Same.
1235 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1237         PR middle-end/43519
1238         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1239         POINTER_PLUS_EXPR for pointer types.
1241         * gcc.dg/graphite/id-19.c: New.
1243 2010-04-04  Sebastian Pop  <sebastian.pop@amd.com>
1245         PR middle-end/43519
1246         * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1247         * graphite-clast-to-gimple.c: Include langhooks.h.
1248         (max_signed_precision_type): New.
1249         (max_precision_type): Takes two types as arguments.
1250         (precision_for_value): New.
1251         (precision_for_interval): New.
1252         (gcc_type_for_interval): New.
1253         (gcc_type_for_value): New.
1254         (gcc_type_for_clast_term): New.
1255         (gcc_type_for_clast_red): New.
1256         (gcc_type_for_clast_bin): New.
1257         (gcc_type_for_clast_expr): Split up into several functions.
1258         (gcc_type_for_clast_eq): Rewritten.
1259         (compute_bounds_for_level): New.
1260         (compute_type_for_level_1): New.
1261         (compute_type_for_level): New.
1262         (gcc_type_for_cloog_iv): Removed.
1263         (gcc_type_for_iv_of_clast_loop): Rewritten.
1264         (graphite_create_new_loop): Compute the lower and upper bound types
1265         with gcc_type_for_clast_expr.
1266         (graphite_create_new_loop_guard): Same.
1267         (find_cloog_iv_in_expr): Removed.
1268         (compute_cloog_iv_types_1): Removed.
1269         (compute_cloog_iv_types): Removed.
1270         (gloog): Do not call compute_cloog_iv_types.
1271         * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1272         GBB_CLOOG_IV_TYPES.
1273         (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1274         * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1275         (GBB_CLOOG_IV_TYPES): Removed.
1277         * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1279 2010-04-02  Sebastian Pop  <sebastian.pop@amd.com>
1281         Reverted this commit: as at this point the loop closed SSA form
1282         is under a canonical form respecting the single argument condition.
1283         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1284         close phi nodes may have more than one argument.
1286 2010-04-01  Sebastian Pop  <sebastian.pop@amd.com>
1288         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1289         gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1290         (detect_commutative_reduction): Same.
1292 2010-03-31  Sebastian Pop  <sebastian.pop@amd.com>
1294         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1295         close phi nodes may have more than one argument.
1297 2010-03-30  Richard Guenther  <rguenther@suse.de>
1298             Zdenek Dvorak  <ook@ucw.cz>
1299             Sebastian Pop  <sebastian.pop@amd.com>
1301         PR middle-end/43464
1302         * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1303         with multiple arguments.
1304         (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1306 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1308         * graphite-dependences.c (print_pddr): Call print_pdr with an
1309         extra argument.
1310         * graphite-poly.c (debug_pdr): Add an extra argument for the
1311         verbosity level.
1312         (print_pdr): Same.
1313         (print_pbb_domain): Same.
1314         (print_pbb): Same.
1315         (print_scop_context): Same.
1316         (print_scop): Same.
1317         (print_cloog): Same.
1318         (debug_pbb_domain): Same.
1319         (debug_pbb): Same.
1320         (print_pdrs): Same.
1321         (debug_pdrs): Same.
1322         (debug_scop_context): Same.
1323         (debug_scop): Same.
1324         (debug_cloog): Same.
1325         (print_scop_params): Same.
1326         (debug_scop_params): Same.
1327         (print_iteration_domain): Same.
1328         (print_iteration_domains): Same.
1329         (debug_iteration_domain): Same.
1330         (debug_iteration_domains): Same.
1331         (print_scattering_function): Same.
1332         (print_scattering_functions): Same.
1333         (debug_scattering_function): Same.
1334         (debug_scattering_functions): Same.
1335         * graphite-poly.h (debug_pdr): Update declaration.
1336         (print_pdr): Same.
1337         (print_pbb_domain): Same.
1338         (print_pbb): Same.
1339         (print_scop_context): Same.
1340         (print_scop): Same.
1341         (print_cloog): Same.
1342         (debug_pbb_domain): Same.
1343         (debug_pbb): Same.
1344         (print_pdrs): Same.
1345         (debug_pdrs): Same.
1346         (debug_scop_context): Same.
1347         (debug_scop): Same.
1348         (debug_cloog): Same.
1349         (print_scop_params): Same.
1350         (debug_scop_params): Same.
1351         (print_iteration_domain): Same.
1352         (print_iteration_domains): Same.
1353         (debug_iteration_domain): Same.
1354         (debug_iteration_domains): Same.
1355         (print_scattering_function): Same.
1356         (print_scattering_functions): Same.
1357         (debug_scattering_function): Same.
1358         (debug_scattering_functions): Same.
1360 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1362         * graphite-poly.c (print_scattering_function_1): New.
1363         (print_scattering_function): Call it.
1364         (print_scop_params): Remove spaces at the end of lines.
1365         (print_cloog): New.
1366         (debug_cloog): New.
1367         * graphite-poly.h (print_cloog): Declared.
1368         (debug_cloog): Declared.
1370 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1372         * tree-ssa-copy.c: Revert this previous change:
1373         (init_copy_prop): Loop closed phi nodes cancontain more than one
1374         argument.
1375         (execute_copy_prop): Revert the previous change: do not call
1376         rewrite_into_loop_closed_ssa.
1378 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1379             Richard Guenther  <rguenther@suse.de>
1381         PR middle-end/43464
1382         * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1383         contain more than one argument.
1384         (execute_copy_prop): Revert the previous change: do not call
1385         rewrite_into_loop_closed_ssa.
1387         * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1388         * gcc.dg/graphite/id-pr43464-1.c: New.
1390 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1392         PR middle-end/43464
1393         * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1394         and verify_loop_closed_ssa when copy prop is executed in the LNO.
1396         * gcc.dg/graphite/id-pr43464.c: New.
1398 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1400         * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1401         in loop->header.
1402         * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1403         * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1404         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1405         to switch between adding the IV bump in loop->latch or in loop->header.
1407 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1409         * passes.c (init_optimization_passes): Add pass_copy_prop
1410         after Graphite.
1412 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1414         * graphite-poly.c (print_scattering_function): Pretty print following
1415         the scoplib format.
1416         (print_pdr): Same.
1417         (print_pbb_domain): Same.
1418         (dump_gbb_cases): Same.
1419         (dump_gbb_conditions): Same.
1420         (print_pdrs): Same.
1421         (print_pbb): Same.
1422         (print_scop_params): Same.
1423         (print_scop_context): Same.
1424         (print_scop): Same.
1425         (print_pbb_body): New.
1426         (lst_indent_to): New.
1427         (print_lst): Start new lines with a #.
1428         * graphite-poly.h (pbb_bb): New.
1429         (pbb_index): Use pbb_bb.
1430         * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1431         disjuncts.
1432         * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1434 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1436         PR middle-end/43351
1437         * gcc.dg/graphite/id-pr43351.c
1439 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1441         PR middle-end/43354
1442         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1443         call insert_out_of_ssa_copy for default definitions.
1444         * gfortran.dg/graphite/id-pr43354.f: New.
1446 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1448         PR middle-end/43349
1449         * gfortran.dg/graphite/pr43349.f: New.
1451 2010-03-11  Sebastian Pop  <sebastian.pop@amd.com>
1453         * graphite-clast-to-gimple.c (my_long_long): Defined.
1454         (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1455         * graphite-sese-to-poly.c (my_long_long): Defined.
1456         (scop_ivs_can_be_represented): Use it.
1458 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1460         * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1461         graphite-max-bbs-per-function, and loop-block-tile-size.
1462         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1463         with "maximum".
1464         (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1466 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1468         * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1469         forward declaration.
1470         * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1471         (add_upper_bounds_from_estimated_nit): New.
1472         (build_loop_iteration_domains): Use it.
1474 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1476         * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1478 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1480         PR middle-end/43306
1481         * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1482         should be an INTEGER_CST.  Also handle CASE_CONVERT.
1483         * gcc.dg/graphite/pr43306.c: New.
1485 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1487         * graphite.c (graphite_initialize): To bound the number of bbs per
1488         function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1489         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1490         * doc/invoke.texi: Document it.
1492 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1494         * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1495         * graphite-sese-to-poly.h (build_poly_scop): Same.
1497 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1499         * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1500         the number of parameters in the scop.  Use as an upper bound
1501         PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1502         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1503         * doc/invoke.texi: Document it.
1505 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1507         * graphite-sese-to-poly.c (add_param_constraints): Use
1508         lower_bound_in_type and upper_bound_in_type.
1510 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1512         * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1513         instead of unsigned_type_node.
1515 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1516             Reza Yazdani  <reza.yazdani@amd.com>
1518         PR middle-end/43065
1519         * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1520         on pointer type parameters.
1522         * gcc.dg/graphite/run-id-4.c: New.
1524 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1526         PR middle-end/43065
1527         * gcc.dg/graphite/run-id-3.c: New.
1529 2010-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
1530             Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1532         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1533         handle conversions from pointer to integers.
1534         (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1535         induction variable, to be able to work with code generated by CLooG.
1536         * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1537         (build_poly_scop): Bail out if we cannot codegen a loop.
1539 2010-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
1541         * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1542         code generation with gloog_error.
1544 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1546         * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1547         Call fold_convert on all the returned values.
1548         (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1549         the type of the resulting expression.
1551 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1553         * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1554         ppl_min_for_le_pointset.  Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1555         * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1557 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1559         * graphite-dependences.c (map_into_dep_poly): Removed.
1560         (dependence_polyhedron_1): Use combine_context_id_scat.
1562 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1564         * graphite-poly.h (struct poly_scattering): Add layout documentation.
1565         (struct poly_bb): Same.
1566         (combine_context_id_scat): New.
1568 2010-03-02  Sebastian Pop  <sebastian.pop@amd.com>
1570         PR middle-end/42326
1571         * sese.c (name_defined_in_loop_p): Return false for default
1572         definitions.
1574         * gcc.dg/graphite/pr42326.c: New.
1576 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
1578         * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1579         and clean up the logic.
1581 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
1583         * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1584         early return.
1586 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1588         PR middle-end/43083
1589         * graphite-scop-detection.c (create_single_exit_edge): Move
1590         the call to find_single_exit_edge to....
1591         (create_sese_edges): ...here.  Don't handle multiple edges
1592         exiting the function.
1593         (build_graphite_scops): Don't handle multiple edges
1594         exiting the function.
1596         * gcc.dg/graphite/pr43083.c: New.
1598 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1600         PR middle-end/43097
1601         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1602         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1604         * gfortran.dg/graphite/pr43097.f: New.
1606 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1608         PR middle-end/43083
1609         * graphite-scop-detection.c (create_single_exit_edge): Move
1610         the call to find_single_exit_edge to....
1611         (create_sese_edges): ...here.  Don't handle multiple edges
1612         exiting the function.
1613         (build_graphite_scops): Don't handle multiple edges
1614         exiting the function.
1616         * gcc.dg/graphite/pr43083.c: New.
1618 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1620         PR middle-end/43097
1621         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1622         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1624         * gfortran.dg/graphite/pr43097.f: New.
1626 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1627             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1629         PR middle-end/43140
1630         * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1632 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1634         PR middle-end/43026
1635         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1637         * g++.dg/graphite/pr43026.C: New.
1639 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1641         * Merge from mainline (154736:156693).
1643 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
1645         PR middle-end/43026
1646         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1648         * g++.dg/graphite/pr43026.C: New.
1650 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1652         * Merge from mainline (154736:156693).
1654 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
1656         PR middle-end/43012
1657         * gcc.dg/graphite/pr43012.c: New.
1659 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1661         * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1663 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1665         * g++.dg/graphite/pr42930.C: New.
1667 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1669        * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1671 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1673         * g++.dg/graphite/pr42930.C: New.
1675 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1677         PR middle-end/42930
1678         * graphite-scop-detection.c (graphite_can_represent_scev): Call
1679         graphite_can_represent_init for MULT_EXPR.
1681 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1683         PR middle-end/42914
1684         PR middle-end/42530
1685         * graphite-sese-to-poly.c (remove_phi): New.
1686         (translate_scalar_reduction_to_array): Call remove_phi.
1688         * gcc.dg/graphite/pr42530.c: New.
1689         * gcc.dg/graphite/pr42914.c: New.
1691 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1693         PR middle-end/42930
1694         * graphite-scop-detection.c (graphite_can_represent_scev): Call
1695         graphite_can_represent_init for MULT_EXPR.
1697 2010-02-10  Sebastian Pop  <seb@napoca>
1699         PR middle-end/42914
1700         PR middle-end/42530
1701         * graphite-sese-to-poly.c (remove_phi): New.
1702         (translate_scalar_reduction_to_array): Call remove_phi.
1704         * gcc.dg/graphite/pr42530.c: New.
1705         * gcc.dg/graphite/pr42914.c: New.
1707 2010-02-10  Sebastian Pop  <seb@napoca>
1709         PR middle-end/42771
1710         * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1711         * graphite-clast-to-gimple.h (gloog): Update declaration.
1712         * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1713         * graphite-poly.h (struct poly_bb): Add missing comments.
1714         (struct scop): Add poly_scop_p field.
1715         (POLY_SCOP_P): New.
1716         * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1717         * graphite.c (graphite_transform_loops): Build the polyhedral
1718         representation for each scop before code generation.
1719         * sese.c (rename_variables_in_operand): Removed.
1720         (rename_variables_in_expr): Return the renamed expression.
1721         (rename_sese_parameters): New.
1722         * sese.h (rename_sese_parameters): Declared.
1724         * gcc.dg/graphite/pr42771.c: New.
1726 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1728         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
1729         return 0 from main.
1730         * gcc.dg/graphite/block-1.c: Same.
1731         * gcc.dg/graphite/block-3.c: Same.
1732         * gcc.dg/graphite/block-4.c: Same.
1733         * gcc.dg/graphite/block-5.c: Same.
1734         * gcc.dg/graphite/block-6.c: Same.
1735         * gcc.dg/graphite/block-7.c: Same.
1736         * gcc.dg/graphite/interchange-0.c: Same.
1737         * gcc.dg/graphite/interchange-1.c: Same.
1738         * gcc.dg/graphite/interchange-10.c: Same.
1739         * gcc.dg/graphite/interchange-11.c: Same.
1740         * gcc.dg/graphite/interchange-12.c: Same.
1741         * gcc.dg/graphite/interchange-2.c: Same.
1742         * gcc.dg/graphite/interchange-3.c: Same.
1743         * gcc.dg/graphite/interchange-4.c: Same.
1744         * gcc.dg/graphite/interchange-5.c: Same.
1745         * gcc.dg/graphite/interchange-6.c: Same.
1746         * gcc.dg/graphite/interchange-7.c: Same.
1747         * gcc.dg/graphite/interchange-8.c: Same.
1748         * gcc.dg/graphite/interchange-9.c: Same.
1749         * gcc.dg/graphite/interchange-mvt.c: Same.
1751 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1753         * gfortran.dg/graphite/id-19.f: New.
1754         * gfortran.dg/graphite/pr14741.f90: New.
1755         * gfortran.dg/graphite/pr41924.f90: New.
1756         * gfortran.dg/graphite/run-id-2.f90: New.
1758 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1760         PR middle-end/42988
1761         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1762         to unknown_dependence.
1763         (graphite_legal_transform_dr): Handle the unknown_dependence.
1764         (graphite_carried_dependence_level_k): Same.
1766 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1768         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
1769         return 0 from main.
1770         * gcc.dg/graphite/block-1.c: Same.
1771         * gcc.dg/graphite/block-3.c: Same.
1772         * gcc.dg/graphite/block-4.c: Same.
1773         * gcc.dg/graphite/block-5.c: Same.
1774         * gcc.dg/graphite/block-6.c: Same.
1775         * gcc.dg/graphite/block-7.c: Same.
1776         * gcc.dg/graphite/interchange-0.c: Same.
1777         * gcc.dg/graphite/interchange-1.c: Same.
1778         * gcc.dg/graphite/interchange-10.c: Same.
1779         * gcc.dg/graphite/interchange-11.c: Same.
1780         * gcc.dg/graphite/interchange-12.c: Same.
1781         * gcc.dg/graphite/interchange-2.c: Same.
1782         * gcc.dg/graphite/interchange-3.c: Same.
1783         * gcc.dg/graphite/interchange-4.c: Same.
1784         * gcc.dg/graphite/interchange-5.c: Same.
1785         * gcc.dg/graphite/interchange-6.c: Same.
1786         * gcc.dg/graphite/interchange-7.c: Same.
1787         * gcc.dg/graphite/interchange-8.c: Same.
1788         * gcc.dg/graphite/interchange-9.c: Same.
1789         * gcc.dg/graphite/interchange-mvt.c: Same.
1791 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1793         * gfortran.dg/graphite/id-19.f: New.
1794         * gfortran.dg/graphite/pr14741.f90: New.
1795         * gfortran.dg/graphite/pr41924.f90: New.
1796         * gfortran.dg/graphite/run-id-2.f90: New.
1798 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1800         PR middle-end/42988
1801         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1802         to unknown_dependence.
1803         (graphite_legal_transform_dr): Handle the unknown_dependence.
1804         (graphite_carried_dependence_level_k): Same.
1806 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1808         * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1810 2010-02-05  Sebastian Pop  <sebastian.pop@amd.com>
1811             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
1813         PR middle-end/42637
1814         * graphite-dependences.c (build_lexicographical_constraint): Return
1815         a union of dependence polyhedra.
1816         (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1818         * gcc.dg/graphite/block-0.c: Enable runtime check.  XFAILed.
1819         * gcc.dg/graphite/block-4.c: Same.
1820         * gcc.dg/graphite/block-7.c: Same.
1821         * gcc.dg/graphite/interchange-12.c: Same.
1822         * gcc.dg/graphite/interchange-mvt.c: Same.
1823         * gfortran.dg/graphite/interchange-1.f: XFAILed.
1824         * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1825         * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1827 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1829         * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1830         the execution check to FAIL.  This testcase is miscompiled by Graphite
1831         and the check should be re-enabled.
1832         * gcc.dg/graphite/interchange-mvt.c: Same.
1833         * gcc.dg/graphite/block-0.c: Same.
1834         * gcc.dg/graphite/block-4.c: Same.
1835         * gcc.dg/graphite/block-7.c: Same.
1837 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1839         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1840         * gcc.dg/graphite/scop-0.c: Fix spaces.
1841         * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1842         * gfortran.dg/graphite/block-2.f: Same.
1843         * gfortran.dg/graphite/block-3.f90: Same.
1844         * gfortran.dg/graphite/block-4.f90: Same.
1845         * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1846         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1848 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1850         * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1851         PDDR_ORIGINAL_SCATTERING_P.
1852         (pddr_is_empty): Rewritten.
1853         (print_dependence_polyhedron_layout): New.
1854         (print_pddr): New.
1855         (debug_pddr): New.
1856         (build_alias_set_powerset): Moved up.
1857         (poly_drs_may_alias_p): Moved up.
1858         (lexicographically_gt_p): Removed.
1859         (build_lexicographically_gt_constraint): Renamed
1860         build_lexicographical_constraint, reimplemented.
1861         (dependence_polyhedron_1): Simplified parameters.
1862         (dependence_polyhedron): Same.  Keep along empty PDDRs
1863         to make efficient use of the cache.
1864         (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1865         (graphite_legal_transform_dr): Rewritten.
1866         (graphite_legal_transform_bb): Pass fewer arguments to
1867         graphite_legal_transform_dr.
1868         (graphite_carried_dependence_level_k): Simplified implementation.
1869         (dot_original_deps_stmt_1): Call dependence_polyhedron.
1870         (dot_transformed_deps_stmt_1): Same.
1871         (dot_original_deps): Same.
1872         (dot_transformed_deps): Same.
1873         * graphite-dependences.h (struct poly_ddr): Added a new field
1874         original_scattering_p.
1875         (PDDR_ORIGINAL_SCATTERING_P): New.
1876         (print_pddr): Declared.
1877         (debug_pddr): Declared.
1878         * graphite-ppl.c: Clarify comment.
1879         * sese.h (print_gimple_bb): Removed unused declaration.
1880         (debug_gbb): Same.
1882 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1884         * g++.dg/graphite/graphite.exp: Rewritten.
1885         * gcc.dg/graphite/graphite.exp: Rewritten.
1886         * gfortran.dg/graphite/graphite.exp: Rewritten.
1887         * gcc.dg/graphite/block-0.c: Added runtime test.
1888         * gcc.dg/graphite/block-1.c: Same.
1889         * gcc.dg/graphite/block-3.c: Same.
1890         * gcc.dg/graphite/block-4.c: Same.
1891         * gcc.dg/graphite/block-5.c: Same.
1892         * gcc.dg/graphite/block-6.c: Same.
1893         * gcc.dg/graphite/block-7.c: Same.
1894         * gcc.dg/graphite/interchange-0.c: Same.
1895         * gcc.dg/graphite/interchange-1.c: Same.
1896         * gcc.dg/graphite/interchange-10.c: Same.
1897         * gcc.dg/graphite/interchange-11.c: Same.
1898         * gcc.dg/graphite/interchange-12.c: Same.
1899         * gcc.dg/graphite/interchange-2.c: Same.
1900         * gcc.dg/graphite/interchange-3.c: Same.
1901         * gcc.dg/graphite/interchange-4.c: Same.
1902         * gcc.dg/graphite/interchange-5.c: Same.
1903         * gcc.dg/graphite/interchange-6.c: Same.
1904         * gcc.dg/graphite/interchange-7.c: Same.
1905         * gcc.dg/graphite/interchange-8.c: Same.
1906         * gcc.dg/graphite/interchange-9.c: Same.
1907         * gcc.dg/graphite/interchange-mvt.c: Same.
1908         * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1910 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1912         * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1913           background.
1915 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1917         * common.opt: Add -fgraphite-cloog-opts.
1918         * graphite-clast-to-gimple.c (set_cloog_options): Same.
1919         * opts.c (decode_options): Same.
1921 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1923         * gcc.dg/graphite/id-17.c: New.
1924         * gcc.dg/graphite/pr41888.c: New.
1925         * gcc.dg/graphite/scop-22.c: New.
1926         * gfortran.dg/graphite/pr40982.f90: New.
1928 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1930         * testsuite/gcc.dg/graphite/id-17.c: New.
1931         * testsuite/gcc.dg/graphite/pr41888.c: New.
1932         * testsuite/gcc.dg/graphite/scop-22.c: New.
1933         * testsuite/gfortran.dg/graphite/pr40982.f90: New.
1935 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1937         * graphite-dependences.c: Clarify comments.
1938         (build_pddr): Add an extra parameter direction.
1939         (graphite_legal_transform_dr): Use build_pddr.
1940         (dot_original_deps_stmt_1): Update use of build_pddr.
1941         (dot_transformed_deps_stmt_1): Same.
1942         (dot_original_deps): Same.
1943         (dot_transformed_deps): Same.
1945         * gcc.dg/graphite/interchange-12.c: New.
1946         * gcc.dg/graphite/block-7.c: New.
1948 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1950         * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1951         (pddr_transformed_scattering): Removed.
1952         (graphite_legal_transform_dr): Use build_pddr.
1953         (dot_original_deps_stmt_1): Same.
1954         (dot_transformed_deps_stmt_1): Same.
1955         (dot_original_deps): Same.
1956         (dot_transformed_deps): Same.
1958 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1960         * graphite-dependences.c (lexicographically_gt_p): Add comments.
1961         (build_lexicographically_gt_constraint): Same.
1962         (dependence_polyhedron_1): Same.
1963         (dependence_polyhedron): Same.
1965 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1967         * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1968         (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1969         (lexicographically_gt_p): Change type of direction to int.
1970         (build_lexicographically_gt_constraint): Same.
1971         (dependence_polyhedron_1): Same.
1972         (dependence_polyhedron): Same.
1973         (pddr_original_scattering): Use integers for direction.
1974         (pddr_transformed_scattering): Same.
1975         (graphite_legal_transform_dr): Same.
1976         (graphite_carried_dependence_level_k): Same.
1978 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1980         * graphite-dependences.c (build_pairwise_constraint): Renamed
1981         ppl_build_relation.  Moved...
1982         (dr_equality_constraints): Use ppl_build_relation.
1983         (build_pairwise_scheduling_equality): Same.
1984         (build_pairwise_scheduling_inequality): Same.
1985         * graphite-ppl.c (ppl_build_relation): ...here.
1986         * graphite-ppl.h (ppl_build_relation): Declared.
1988 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1990         PR middle-end/42681
1991         * graphite-clast-to-gimple.c (gloog_error): New static variable.
1992         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1993         Set gloog_error when such an expression failed to be built.
1994         (translate_clast): Early return when gloog_error is set.
1995         (gloog): Clear gloog_error.  When gloog_error is set, call
1996         set_ifsese_condition to enable the original code.  Return the status
1997         of the code generation based on gloog_error.
1998         * sese.c (set_ifsese_condition): New.
1999         * sese.h (set_ifsese_condition): Declared.
2001         * g++.dg/graphite/pr42681.C: New.
2003 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2005         PR middle-end/42681
2006         * graphite-clast-to-gimple.c (gloog_error): New static variable.
2007         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
2008         Set gloog_error when such an expression failed to be built.
2009         (translate_clast): Early return when gloog_error is set.
2010         (gloog): Clear gloog_error.  When gloog_error is set, call
2011         set_ifsese_condition to enable the original code.  Return the status
2012         of the code generation based on gloog_error.
2013         * sese.c (set_ifsese_condition): New.
2014         * sese.h (set_ifsese_condition): Declared.
2016         * testsuite/g++.dg/graphite/pr42681.C: New.
2018 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2020         PR middle-end/42732
2021         * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
2022         rename_nb_iterations.
2023         * sese.c (rename_variables_in_operand): New.
2024         (rename_variables_in_expr): New.
2025         (rename_nb_iterations): New.
2026         (sese_adjust_liveout_phis): Update the rename_map.
2027         * sese.h (rename_nb_iterations): Declared.
2028         * tree-scalar-evolution.c (scev_reset_htab): New.
2029         (scev_reset): Call scev_reset_htab.
2030         * tree-scalar-evolution.h (scev_reset_htab): Declared.
2032         * gfortran.dg/graphite/pr42732.f: New.
2034 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2036         PR middle-end/42393
2037         * graphite-clast-to-gimple.c: Fix formatting.
2038         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
2039         (expr_defined_in_loop_p): New.
2040         (add_loop_exit_phis): Also handle full expressions: remove from
2041         the rename_map the expressions defined in the loop that we're closing.
2043         * gfortran.dg/graphite/pr42393-1.f90: New.
2044         * gfortran.dg/graphite/pr42393.f90: Add new flags
2045         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
2046         make this testcase useful in the Graphite branch.
2048 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2050         PR middle-end/42393
2051         * graphite-clast-to-gimple.c: Fix formatting.
2052         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
2053         (expr_defined_in_loop_p): New.
2054         (add_loop_exit_phis): Also handle full expressions: remove from
2055         the rename_map the expressions defined in the loop that we're closing.
2057         * testsuite/gfortran.dg/graphite/pr42393-1.f90: New.
2058         * testsuite/gfortran.dg/graphite/pr42393.f90: Add new flags
2059         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
2060         make this testcase useful in the Graphite branch.
2062 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2064         * graphite-scop-detection.c (exclude_component_ref): Removed.
2065         (is_simple_operand): Removed.
2066         (stmt_simple_for_scop_p): Remove use of is_simple_operand.
2068 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2070         PR middle-end/42221
2071         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2072         the array indexing of ADDR_EXPRs.
2074         * gcc.dg/graphite/pr42221.c: New.
2076 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2078         PR middle-end/42221
2079         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2080         the array indexing of ADDR_EXPRs.
2082         * testsuite/gcc.dg/graphite/pr42221.c: New.
2084 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2086         PR middle-end/42521
2087         * graphite.c (graphite_finalize): Call scev_reset.
2088         (graphite_transform_loops): Do not call scev_reset between the code
2089         generation of scops.
2091         * gcc.dg/graphite/pr42521.c: New.
2093 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2095         * graphite-interchange.c (memory_stride_in_loop): Renamed
2096         pdr_stride_in_loop.
2097         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
2098         (memory_strides_in_loop): Memoize the memory strides per loop.
2099         (lst_interchange_profitable_p): Do not initialize to zero the memory
2100         strides.
2101         * graphite-poly.h (struct lst): Add a field memory_strides.
2102         (LST_LOOP_MEMORY_STRIDES): New.
2103         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
2104         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
2106 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2108         * graphite-interchange.c (memory_stride_in_loop): Renamed
2109         pdr_stride_in_loop.
2110         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
2111         (memory_strides_in_loop): Memoize the memory strides per loop.
2112         (lst_interchange_profitable_p): Do not initialize to zero the memory
2113         strides.
2114         * graphite-poly.h (struct lst): Add a field memory_strides.
2115         (LST_LOOP_MEMORY_STRIDES): New.
2116         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
2117         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
2119 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2121         * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
2122         memory_strides_in_loop.  Gather memory strides on a whole loop.
2123         (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
2124         (lst_interchange_profitable_p): Removed.
2125         (lst_try_interchange_loops): Call lst_interchange_profitable_p.
2127 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2129         Revert patch 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2130         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2131         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2132         Remove context_loop and level.
2134 2010-01-07  Richard Guenther  <rguenther@suse.de>
2136         PR tree-optimization/42641
2137         * sese.c (rename_map_elt_info): Use the SSA name version, do
2138         not hash pointers.
2140 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
2142         * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
2143         blocked" only when both the strip mine and the interchange have
2144         been applied.
2146         * gcc.dg/graphite/block-2.c: Removed.
2147         * gcc.dg/graphite/block-3.c: Add scan pattern.
2148         * gcc.dg/graphite/block-4.c: Same.
2149         * gcc.dg/graphite/block-5.c: Same.
2150         * gcc.dg/graphite/block-6.c: Same.
2152 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
2154         * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
2155         before allocating a new one.
2156         (copy_renames): Check that slot is not NULL.
2157         (mark_bb_with_pbb): Same.
2158         (compute_cloog_iv_types_1): Same.
2159         * graphite-interchange.c (lst_perfect_nestify): Free the before,
2160         nest, and after LSTs.
2161         (lst_try_interchange_loops): Same.
2163 2010-01-05  Sebastian Pop  <sebastian.pop@amd.com>
2165         PR middle-end/42178
2166         * graphite-interchange.c (lst_try_interchange_loops): Do not return
2167         the before, nest, and after LSTs.
2168         (lst_try_interchange): Removed.
2169         (lst_interchange_select_inner): Do not iterate over the LSTs if they
2170         were modified.
2171         (lst_interchange_select_outer): Apply interchange on the outer loop
2172         until there are no more changes in the inner loops.
2174 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2176         Revert patch fixing PR middle-end/42221.
2178 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2180         PR middle-end/42180
2181         * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
2182         GIMPLE_CALL.
2184         * gfortran.dg/graphite/pr42180.f90: Add compile flags.
2186 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2188         PR middle-end/42180
2189         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
2190         that contain only one statement.
2192         * gfortran.dg/graphite/pr42180.f90: New.
2194 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2196         PR middle-end/42393
2197         * gfortran.dg/graphite/pr42393.f90: New.
2199 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2201         PR middle-end/42186
2202         * gfortran.dg/graphite/pr42186.f90: New.
2204 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2206         PR middle-end/42186
2207         * testsuite/gfortran.dg/graphite/pr42186.f90: New.
2209 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2211         PR middle-end/42205
2212         * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
2213         Insert the reduction copy in the same block as the phi node.
2214         (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
2216         * gcc.dg/graphite/pr42205-1.c: New.
2217         * gcc.dg/graphite/pr42205-2.c: New.
2219 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2221         PR middle-end/42221
2222         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2223         the array indexing of ADDR_EXPRs.
2225         * gcc.dg/graphite/pr42221.c: New.
2227 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2229         PR middle-end/42178
2230         PR middle-end/42334
2231         * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
2232         index.  Call lst_interchange_select_inner only once.
2233         (lst_interchange_select_inner): Update use of lst_try_interchange.
2234         (lst_interchange_select_outer): Update.
2236 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
2238         PR middle-end/42178
2239         PR middle-end/42334
2240         * graphite-interchange.c (lst_try_interchange): Do not increment the
2241         the OUTER index when there is no AFTER kernel.  Do not increment the
2242         OUTER index for after processing the AFTER kernel.
2243         (lst_interchange_select_inner): Call lst_try_interchange only on loops.
2244         (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
2245         index.  Do not pass to lst_interchange_select_inner the OUTER index.
2246         (scop_do_interchange): Update use of lst_interchange_select_outer.
2248         * gfortran.dg/graphite/graphite.exp
2249         (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
2250         * gfortran.dg/graphite/interchange-1.f: Add comment.  Clean
2251         the graphite dump file.
2252         * gfortran.dg/graphite/interchange-2.f: Same.
2253         * gfortran.dg/graphite/pr42334-1.f: New.
2255 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
2257         PR middle-end/42178
2258         PR middle-end/42334
2259         * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2260         that are empty.
2261         (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2262         (lst_try_interchange): Reimplemented.
2263         (lst_interchange_select_inner): Same.
2264         (lst_do_interchange): Renamed lst_interchange_select_outer.
2265         Reimplemented.
2266         (scop_do_interchange): Update use of lst_interchange_select_outer.
2268         * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2269         * gcc.dg/graphite/block-0.c: Un-XFAILed.
2270         * gcc.dg/graphite/pr42211.c: New.
2271         * gfortran.dg/graphite/pr42334.f90: New.
2273 2009-12-14  Sebastian Pop  <sebastian.pop@amd.com>
2275         PR middle-end/42181
2276         * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2277         carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2279         * gfortran.dg/graphite/pr42181.f90: New.
2281 2009-12-12  Sebastian Pop  <sebpop@gmail.com>
2283         PR middle-end/42284
2284         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2285         insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2286         (detect_commutative_reduction_arg): Simplified.
2287         (detect_commutative_reduction): Early return when the argument of
2288         the close phi is not of an SSA_NAME.
2290         * gcc.dg/graphite/pr42284.c: New.
2292 2009-12-11  Alexander Monakov  <amonakov@ispras.ru>
2294         * dbgcnt.def (graphite_scop): New counter.
2295         * graphite.c: Include dbgcnt.h
2296         (graphite_transform_loops): Use new counter to limit transformations.
2298 2009-12-08  Sebastian Pop  <sebpop@gmail.com>
2300         PR middle-end/42285
2301         * graphite-scop-detection.c (graphite_can_represent_init): Also
2302         handle more complex MULT_EXPRs containing parameters by recursion
2303         on the structure.
2305         * gfortran.dg/graphite/pr42285.f90: New.
2307 2009-12-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2309         * g++.dg/graphite/pr42130.C: Fix type.
2311 2009-11-29  Alexander Monakov <amonakov@gcc.gnu.org>
2313         * g++.dg/graphite/pr42130.C: Correct testcase.
2315 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2317         * Merge from mainline (154493:154734).
2319 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2321         * Merge from mainline (151362:154491).
2323 2009-11-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2325         * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2326         graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2328 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2330         PR middle-end/42130
2331         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2332         translate_clast_for_loop): New.
2333         (translate_clast_for): Add a condition around the loop, to do not
2334         execute loops with zero iterations.
2335         * g++.dg/graphite/pr42130.C: New.
2336         * gcc.dg/graphite/pr35356-2.c: Adapt.
2338 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2340         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2341         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2342         Remove context_loop and level.
2344 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2346         * graphite-clast-to-gimple.c (translate_clast_user,
2347         translate_clast_for, translate_clast_guard): Simplify and move common
2348         elements to translate_clast().
2349         (translate_clast): Simplify and get common elements.
2351 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2353         * graphite-clast-to-gimple.c (translate_clast_user,
2354         translate_clast_for, translate_clast_guard): Split out of
2355         translate_clast.
2357 2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>
2359         * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2360         clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2361         debug_clast_name_indexes_1, debug_clast_name_indexes,
2362         clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2363         (clast_name_to_gcc, clast_to_gcc_expression,
2364         clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2365         gcc_type_for_clast_eq, graphite_translate_clast_equation,
2366         graphite_create_guard_cond_expr, graphite_create_new_loop,
2367         translate_clast): Add params_index.
2368         (initialize_cloog_names): Create parameter strings from scratch, do
2369         not reference other strings.
2370         (create_params_index): New.
2371         (gloog): Initialize params_index.
2372         * graphite-scop-detection (free_scops_1): Removed.
2373         (limit_scops): Use normal free_scops.
2374         * graphite-sese-to-poly.c (save_var_names): Removed.
2375         (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2376         and SESE_PARAMS_INDEX.
2377         * sese.c (new_sese, free_sese): Dito.
2378         * sese.h (struct sese): Remove params_index, params_names.
2379         (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2381 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2383         Revert the following patch from 2009-09-14:
2384         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2385         tree-scalar-evolution.h, and then tree-data-ref.h.
2386         * graphite-clast-to-gimple.c: Same.
2387         * graphite-dependences.c: Same.
2388         * graphite-interchange.c: Same.
2389         * graphite-poly.c: Same.
2390         * graphite-scop-detection.c: Same.
2391         * graphite-sese-to-poly.c: Same.
2392         * graphite.c: Same.
2393         * lambda-code.c: Same.
2394         * matrix-reorg.c: Same.
2395         * tree-data-ref.c: Same.
2396         * tree-if-conv.c: Same.
2397         * tree-loop-distribu: Same.: Same.
2398         * tree-loop-linear.c: Same.
2399         * tree-parloops.c: Same.
2400         * tree-predcom.c: Same.
2401         * tree-vect-patterns.c: Same.
2403 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2405         Revert patch from 2009-09-14.
2406         * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2407         passes at -O1 and below.
2409 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2411         PR middle-end/40281
2412         * gcc.dg/graphite/pr40281.c: New.
2414         * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2415         evolutions should not variate in inner loops.
2417 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2419         PR middle-end/42050
2420         * gfortran.dg/graphite/pr42050.f90: New.
2422 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2424         * graphite-interchange.c (memory_strides_in_loop_depth): New.
2425         (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2427 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2429         * graphite-blocking.c (scop_do_block): New.
2430         * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2431         * graphite-poly.h (scop_do_block): Declared.
2433 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2435         * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2436         depth is the loop nesting depth in the LST.  Call psct_dynamic_dim
2437         to transform depth into the time_depth before calling
2438         pbb_number_of_iterations_at_time.
2439         (lst_do_strip_mine): Use a scalar variable instead of recomputing
2440         lst_depth.
2442 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2444         Reverted the patch for "scattering permutations" from 2009-10-28.
2446         * graphite-poly.c (print_permutation): New.
2447         (debug_permutation): New.
2448         (new_poly_bb): Initialize PBB_PERMUTATION.
2449         (free_poly_bb): Free PBB_PERMUTATION.
2450         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2451         (struct pbb_permutation_elt): New.
2452         (PBB_PERMUTATION_ELT_STRIDE): New.
2453         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2454         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2455         (new_pbb_permutation_elt): New.
2456         (pbb_permutation_elt_free): New.
2457         (struct poly_bb): Add field permutation.
2458         (PBB_PERMUTATION): New.
2459         (print_permutation): Declared.
2460         (debug_permutation): Declared.
2462 2009-11-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
2464         * graphite-interchange.c (build_partial_difference): New.
2465         (memory_stride_in_loop): Refactored the computation of
2466         equality constraints into build_partial_difference function.
2467         Added support for debugging stride computations.
2469 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2471         * graphite-clast-to-gimple.c (gloog): Free if_region,
2472         if_region->true_region, and if_region->region.
2473         * sese.c (if_region_set_false_region): Free if_region->false_region.
2474         (create_if_region_on_edge): Do not use GGC_NEW.
2475         (move_sese_in_condition): Remove useless initialization.
2477 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2479         * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2480         for the loops created by the loop distribution.  Do not modify the
2481         input LSTs.
2482         (lst_try_interchange_loops): Same.  Use a temporary LST for the
2483         transformed schedule.  Call lst_update_scattering before data
2484         dependence analysis.
2485         (lst_try_interchange): Pass an extra parameter INDEX.
2486         (lst_do_interchange_1): New.
2487         (lst_do_interchange): Call lst_do_interchange_1.
2488         (scop_do_interchange): Call lst_update_scattering.
2489         * graphite-poly.c (apply_poly_transforms): Do not call
2490         lst_update_scattering.
2491         * graphite-poly.h (lst_pred): New.
2492         (lst_succ): New.
2493         (lst_find_first_pbb): Return NULL when not found.
2494         (lst_empty_p): New.
2495         (lst_insert_in_sequence): Allow LST1 to be NULL.
2496         (lst_replace): New.
2497         (lst_substitute_3): New.
2498         * gcc.dg/graphite/interchange-1.c: XFail.
2499         * gcc.dg/graphite/interchange-8.c: XFail.
2500         * gcc.dg/graphite/interchange-11.c: XFail.
2502 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2504         * graphite-interchange.c (lst_perfectly_nested_p): New.
2505         (lst_perfect_nestify): New.
2506         (lst_try_interchange_loops): Call store_lst_schedule,
2507         lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2508         (scop_do_interchange): Avoid redundant legality test.
2509         Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2510         * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2511         * graphite-poly.h (psct_static_dim): New.
2512         (lst_dewey_number_at_depth): New.
2513         (lst_find_pbb): Restructured.
2514         (lst_find_first_pbb): Restructured.
2515         (lst_find_last_pbb): New.
2516         (lst_contains_p): New.
2517         (lst_contains_pbb): New.
2518         (lst_create_nest): New.
2519         (lst_remove_from_sequence): New.
2520         (pbb_update_scattering): New.
2521         (lst_update_scattering_under): New.
2522         (lst_update_scattering_seq): New.
2523         (lst_update_scattering): New.
2524         (lst_insert_in_sequence): New.
2525         (lst_distribute_lst): New.
2526         (lst_remove_all_before_including_pbb): New.
2527         (lst_remove_all_before_excluding_pbb): New.
2529 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2531         * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2532         get_loop_exit_edges.
2534 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2536         * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2538 2009-10-28  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2540         * graphite-poly.c (print_permutation): New.
2541         (debug_permutation): New.
2542         (new_poly_bb): Initialize PBB_PERMUTATION.
2543         (free_poly_bb): Free PBB_PERMUTATION.
2544         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2545         (struct pbb_permutation_elt): New.
2546         (PBB_PERMUTATION_ELT_STRIDE): New.
2547         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2548         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2549         (new_pbb_permutation_elt): New.
2550         (pbb_permutation_elt_free): New.
2551         (struct poly_bb): Add field permutation.
2552         (PBB_PERMUTATION): New.
2553         (print_permutation): Declared.
2554         (debug_permutation): Declared.
2556 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2558         * graphite-clast-to-gimple.c (gloog): Do not call
2559         sese_reset_aux_in_loops.
2560         * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2561         extra argument for domains.  Do not use loop->aux.
2562         (build_scop_iteration_domain): Initialize and free domains, pass it
2563         to build_loop_iteration_domains and extract the information from
2564         domains.  Do not use loop->aux.
2565         * sese.c (sese_reset_aux_in_loops): Removed.
2566         * sese.h (sese_reset_aux_in_loops): Removed.
2568 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2570         * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2571         (dependency_in_loop_p): Same.
2572         (translate_clast): Do not use loop->aux.  Initialize
2573         loop->can_be_parallel.
2574         (mark_loops_parallel): Removed.
2575         * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2576         * graphite.c (free_aux_in_new_loops): Removed.
2577         (graphite_finalize): Do not call free_aux_in_new_loops.
2578         (graphite_transform_loops): Do not call mark_loops_parallel.
2580 2009-10-26  Li Feng  <nemokingdom@gmail.com>
2582         * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2583         (translate_clast): Pass an extra parameter LEVEL.
2584         Call get_scattering_level.
2585         * graphite-clast-to-gimple.h (get_scattering_level): New.
2587 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2589         * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2590         * cfgloop.h (struct loop): New field single_iv.
2592         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2593         loop->aux anymore: use loop->single_iv.
2594         (graphite_loop_normal_form): Moved...
2595         (build_graphite_loop_normal_form): Removed.
2596         (gloog): Do not call build_graphite_loop_normal_form.
2597         (free_aux_in_new_loops): Moved...
2598         (mark_loops_parallel): Restructure.
2599         * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2600         * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2601         (scop_canonicalize_loops): New.
2602         (build_poly_scop): Call scop_canonicalize_loops.
2603         * graphite.c (free_aux_in_new_loops): ...here.
2605 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2607         * g++.dg/graphite/graphite.exp: Add the same rules as in
2608         gcc.dg/graphite/graphite.exp.
2610 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2612         * g++.dg/graphite/id-1.C: New.
2614 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2616         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2617         argument base_name.
2618         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2619         (rewrite_phi_out_of_ssa): Same.
2620         (rewrite_cross_bb_scalar_deps): Same.
2621         (translate_scalar_reduction_to_array): Same.
2623 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2625         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2626         dump_alias_graphs.
2628 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2630         * graphite-sese-to-poly.c (dump_alias_graphs): New.
2631         (build_scop_drs): Call dump_alias_graphs.
2633 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2635         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2636         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2637         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2638         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2639         * graphite-poly.h (free_lst): New.
2640         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2641         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2643 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2645         * graphite-poly.h (struct scop): Add a field saved_schedule.
2646         (SCOP_SAVED_SCHEDULE): New.
2647         (store_lst_schedule): New.
2648         (restore_lst_schedule): New.
2649         (store_scattering): Call store_lst_schedule.
2650         (restore_scattering): Call restore_lst_schedule.
2652 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2654         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2655         (pdr_add_alias_set): Same.
2656         (build_poly_dr): Same.
2657         (build_alias_set_optimal_p): Same.
2658         (build_base_obj_set_for_drs): Same.  Do not store the result of
2659         graphds_dfs.
2661 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2663         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2664         all_components_are_cliques to 1.
2666 2009-10-20  Li Feng  <nemokingdom@gmail.com>
2668         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2669         the new structure.
2670         (pdr_add_alias_set): Update retrieving alias_set_num.
2671         (build_poly_dr): Update retrieving dr_base_object_set.
2672         (partition_drs_to_sets): Remove.
2673         (build_alias_set_optimal_p): New.
2674         (build_alias_set_for_drs): Rename.
2675         (build_scop_drs): Update.
2676         * graphite-sese-to-poly.h (struct base_alias_pair): New.
2677         (ALIAS_SET_INDEX): Remove.
2678         (BASE_OBJECT_SET_INDEX): Remove.
2680 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2682         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2684 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2686         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2687         loop upper bounds for 1-element arrays at end of structures.
2688         * tree-flow.h (array_at_struct_end_p): Declared.
2689         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2691 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2693         * g++.dg/graphite/pr41305.C: New.
2695 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
2697         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2698         construction of parameter constraints from loop iteration analysis.
2699         * gcc.dg/graphite/run-id-2.c: New test.
2701 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2703         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2704         and new_cstr.
2706 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2708         * graphite-dependences.c (dependence_polyhedron_1): Remove
2709         unused gdim dimensions from the DDR polyhedron.
2711 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2713         * graphite-dependences.c (pddr_transformed_scattering): New.
2714         (dot_original_deps_stmt_1): New.
2715         (dot_transformed_deps_stmt_1): New.
2716         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2717         dot_transformed_deps_stmt_1.
2718         (dot_original_deps): New.
2719         (dot_transformed_deps): New.
2720         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2722 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2724         * graphite-dependences.c (reduction_dr_1): Remove wrong
2725         assert: reduction BBs can have multiple reduction writes
2726         to memory.  interchange-3.f90 is an example.
2728 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2730         * gfortran.dg/graphite/interchange-3.f90: New.
2732 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2734         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2736 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2738         * graphite-dependences.c (dependence_polyhedron_1): Add the
2739         context to the dependence polyhedron.
2741 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2743         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2744         PBB_PDR_DUPLICATES_REMOVED.
2745         (new_poly_bb): Same.
2747 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2749         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2750         SCOP_CONTEXT.
2751         (build_loop_iteration_domains): Extract bounds on parameters
2752         based on the data size.
2753         (build_scop_context): Do not initialize SCOP_CONTEXT;
2754         add new constraints.
2756 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2758         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2759         * graphite-ppl.h (graphite-ppl.h): Declared.
2761 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2763         * graphite-ppl.c (ppl_print_linear_expr): New.
2764         (debug_ppl_linear_expr): New.
2765         * graphite-ppl.h (ppl_print_linear_expr): Declared.
2766         (debug_ppl_linear_expr): Declared.
2768 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2770         * graphite-interchange.c: Fix comments.
2771         * gcc.dg/graphite/block-1.c: Fix comments.
2773 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2775         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2776         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2778 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2780         Reapply the patch from Alexander Monakov that disappeared during
2781         the last merges from trunk.
2783         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
2785         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2786         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
2788 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2790         * graphite-interchange.c (memory_stride_in_loop): The depth
2791         argument corresponds to a dynamic time dimension, so use
2792         psct_dynamic_dim to refer to the transformed scattering dimension.
2794 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2796         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2798 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2800         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2801         root of the LST.
2802         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2803         the root of the LST.
2804         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2805         fake loop.
2806         (print_lst): Print the root of LST in a different format.
2807         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2809 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2811         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2813 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2815         * doc/passes.texi: Document the Graphite infrastructure.
2817 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2819         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2820         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2821         and check the SSA representation.
2823         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2825 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2827         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2829 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2831         * gcc.dg/graphite/interchange-11.c: New.
2833 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2835         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2837 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2839         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2840         Add -fno-loop-strip-mine and -fno-loop-interchange.
2841         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2842         -fno-loop-strip-mine.
2843         * gfortran.dg/graphite/graphite.exp: Same.
2845 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2847         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2848         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2849         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2850         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2851         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2852         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2853         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2854         DEFAULT_FLAGS_GRAPHITE_SCOP.
2855         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2856         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2858 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2860         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2862 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2863             Sebastian Pop  <sebastian.pop@amd.com>
2865         * graphite-interchange.c (build_linearized_memory_access): Pass an
2866         offset as parameter.
2867         (memory_stride_in_loop): Include transform scattering in the
2868         access functions to be able to querry the strides in the
2869         transformed loops.
2870         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2871         not the psct_iterator_dim.
2873 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2875         * graphite-blocking.c (pbb_do_strip_mine): Removed.
2876         (lst_do_strip_mine_loop): New.
2877         (lst_do_strip_mine): New.
2878         (scop_do_strip_mine): Call lst_do_strip_mine.
2879         * graphite-poly.h (lst_add_loop_under_loop): New.
2880         (lst_find_first_pbb): New.
2882 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2884         * graphite-poly.c (loop_to_lst): Fix LST creation.
2886 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
2888         * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2889         sizeof(unsigned long) to make it run on 32bit systems.
2891 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
2893         * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2894         SEGFAULT on 32bit.
2896 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2898         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2899         Comment.
2900         (write_alias_graph_to_ascii_dot): New.
2901         (write_alias_graph_to_ascii_ecc): Ditto.
2902         (partition_drs_to_sets): Add testing of optimality of current method
2903         which assigns alias numbers according to DFS Comopnent number.  used
2904         as heuristic for the upcoming ECC algorithm.
2905         (build_scop_drs): Write to file also with the ecc and dot format.
2907 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2909         * gfortran.dg/graphite/interchange-1.f: XFail.
2911 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2913         * graphite.c (graphite_initialize): Do not handle functions with
2914         more than 100 basic blocks.
2916 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2918         * graphite-blocking.c (pbb_do_strip_mine): Use
2919         PARAM_LOOP_BLOCK_TILE_SIZE.
2921 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2923         * graphite-poly.c (dot_lst_1): New.
2924         (dot_lst): New.
2925         * graphite-poly.h (dot_lst): Declared.
2927 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2929         * graphite-dependences.c (dot_deps_stmt_1): New.
2930         (dot_deps_stmt): New.
2931         * graphite-dependences.h (dot_deps_stmt): Declared.
2933 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2935         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2936         not replace cross BB scalar dependences ending on PHI nodes.
2937         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2939 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2941         * graphite-poly.c (apply_poly_transforms): Implement the high
2942         level driver for flag_loop_block.
2943         * opts.c (decode_options): Enable flag_loop_block at -O2.
2944         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2945         flag_loop_block.
2947         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2948         -floop-block.
2949         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2950         Add -floop-block.
2952 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2954         * graphite-poly.h (lst_find_pbb): New.
2955         (find_lst_loop): New.
2957 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2959         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2960         * graphite-poly.h (struct scop): Remove dep_graph field.
2961         (SCOP_DEP_GRAPH): Removed.
2963 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2965         * graphite-poly.h (copy_lst): Do full copy of LST.
2967 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
2969         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2970         when the loop stride is zero.
2972         * gcc.dg/graphite/id-16.c: New.
2974 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2976         * graphite-dependences.c (reduction_dr_1): New.
2977         (reduction_dr_p): New.
2978         (graphite_legal_transform_dr): Call reduction_dr_p.
2979         (reduction_ddr): Renamed reduction_ddr_p.
2980         * graphite-poly.h (same_pdr_p): New.
2981         (number_of_write_pdrs): New.
2982         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2983         (split_reduction_stmt): Do not split reduction statements
2984         when there are no writes to memory.
2985         (translate_scalar_reduction_to_array_for_stmt): Insert the
2986         memory reduction statement just after the scalar reduction statement.
2988         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2989         Un-XFAIL-ed.
2990         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2991         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2993 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2995         * graphite-interchange.c (lst_apply_interchange): New.
2996         (lst_interchange_profitable_p): New.
2997         (lst_try_interchange_loops): New.
2998         (lst_try_interchange): New.
2999         (lst_do_interchange): New.
3000         (pbb_do_interchange): Removed.
3001         (scop_do_interchange): Call lst_do_interchange.
3003 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
3005         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
3006         SCOP_TRANSFORMED_SCHEDULE.
3007         (loop_to_lst): New.
3008         (scop_to_lst): New.
3009         (print_lst): New.
3010         (debug_lst): New.
3011         * graphite-poly.h (lst_p): New.
3012         (struct lst): New.
3013         (LST_LOOP_P): New.
3014         (LST_LOOP_FATHER): New.
3015         (LST_PBB): New.
3016         (LST_SEQ): New.
3017         (scop_to_lst): Declared.
3018         (print_lst): Declared.
3019         (debug_lst): Declared.
3020         (new_lst_loop): New.
3021         (new_lst_stmt): New.
3022         (copy_lst): New.
3023         (lst_depth): New.
3024         (lst_dewey_number): New.
3025         (struct scop): Add original_schedule and transformed_schedule fields.
3026         (SCOP_ORIGINAL_SCHEDULE): New.
3027         (SCOP_TRANSFORMED_SCHEDULE): New.
3028         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
3030 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3032         * graphite-dependences.c (reduction_ddr): New.
3033         (graphite_legal_transform_bb): Call reduction_ddr.
3034         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
3035         Initialize PBB_IS_REDUCTION.
3036         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
3037         (PBB_IS_REDUCTION): New.
3038         (new_poly_bb): Update declaration.
3039         * graphite-scop-detection.h (build_scop_bbs): Removed.
3040         (nb_reductions_in_loop): Removed.
3041         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
3042         parameter for reductions.
3043         (try_generate_gimple_bb): Update call to new_poly_bb.
3044         (build_scop_bbs_1): Same.
3045         (build_scop_bbs): Same.
3046         (gsi_for_phi_node): New.
3047         (scalar_close_phi_node_p): Remove gcc_assert.
3048         (split_reduction_stmt): New.
3049         (is_reduction_operation_p): New.
3050         (phi_contains_arg): New.
3051         (follow_ssa_with_commutative_ops): New.
3052         (detect_commutative_reduction_arg): New.
3053         (detect_commutative_reduction_assign): New.
3054         (follow_inital_value_to_phi): New.
3055         (edge_initial_value_for_loop_phi): New.
3056         (initial_value_for_loop_phi): New.
3057         (detect_commutative_reduction): New.
3058         (translate_scalar_reduction_to_array_for_stmt): New.
3059         (insert_copyout): New.
3060         (insert_copyin): New.
3061         (translate_scalar_reduction_to_array): New.
3062         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
3063         (rewrite_commutative_reductions_out_of_ssa_loop): New.
3064         (rewrite_commutative_reductions_out_of_ssa): New.
3065         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
3066         * sese.h (split_region_for_bb): New.
3068         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
3069         * gcc.dg/graphite/interchange-1.c: Fix format.
3070         * gcc.dg/graphite/interchange-10.c: New.
3072 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3074         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
3075         buggy assert.
3077 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3079         * graphite-sese-to-poly.c (scev_analyzable_p): New.
3080         (rewrite_cross_bb_scalar_dependence): New.
3081         (rewrite_cross_bb_scalar_deps): New.
3082         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
3083         Call rewrite_cross_bb_scalar_deps.
3085 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3087         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
3088         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
3089         gsi_for_stmt.
3091 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3093         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
3094         * graphite-interchange.c (pbb_do_interchange): Same.
3095         * graphite-poly.c (print_scattering_function): Same.
3096         (debug_pdrs): Same.
3097         * graphite-poly.h (pbb_loop): New.
3098         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
3100 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
3102         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
3104 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
3106         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
3107         so don't pass a pointer to it.
3108         (build_alias_set_for_drs): Same.
3109         (build_base_obj_set_for_drs): Same.
3110         (build_scop_drs): Same.
3112 2009-09-26  Li Feng  <nemokingdom@gmail.com>
3114         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
3115         the alias graph of data references.
3117 2009-09-25  Li Feng  <nemokingdom@gmail.com>
3119         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
3120         (build_scop_drs): When debugging, write the alias graph to file,
3121         otherwise, should be disabled.
3123 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3125         * Merge from mainline (151310:151361).
3127 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3129         * Merge from mainline (151171:151310).
3131 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3133         * Merge from mainline (151171:151806).
3135 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3137         * Revert the last commit.
3139 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3141         * Merge from mainline (151171:151819).
3143 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3145         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
3146         (is_simple_operand): Remove call to stmt_simple_memref_p.
3147         (stmt_simple_for_scop_p): Update call to is_simple_operand.
3149 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
3151         * gcc.dg/graphite/interchange-mvt.c: New File.
3152         * gcc.dg/graphite/scop-dsyrk.c: New File.
3153         * gcc.dg/graphite/scop-dsyr2k.c: New File.
3154         * gcc.dg/graphite/scop-mvt.c: New File.
3155         * gcc.dg/graphite/scop-sor.c: New File.
3157 2009-09-17 Li Feng  <nemokingdom@gmail.com>
3159         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
3160         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
3161         (graphite_carried_dependence_level_k): Ditto.
3162         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
3163         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
3164         (new_poly_dr): Adjust declaration.
3165         * graphite-sese-to-poly.c (free_data_refs_aux): New.
3166         (free_gimple_bb): Added free_data_refs_aux.
3167         (build_poly_dr): Add dr_base_object_set.
3168         (partition_drs_to_sets): New.
3169         (dr_same_base_object_p): New.
3170         (build_alias_set_for_drs): New.
3171         (build_base_object_set_for_drs): New.
3172         (build_scop_drs): Add build_base_obj_set_for_drs.
3173         * graphite-sese-to-poly.h: Added #define for alias set number index and
3174         base object set index.
3175         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
3176         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
3178 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
3180         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3181         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
3183 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3185         * graphite-sese-to-poly.c (struct irp_data): Removed.
3186         (idx_record_params): Removed.
3187         (find_params_in_bb): Scan for parameters the access functions; don't
3188         parse the tree representation.
3190 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3192         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
3193         passes at -O1 and below.
3195 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3197         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
3198         tree-scalar-evolution.h, and then tree-data-ref.h.
3199         * graphite-clast-to-gimple.c: Same.
3200         * graphite-dependences.c: Same.
3201         * graphite-interchange.c: Same.
3202         * graphite-poly.c: Same.
3203         * graphite-scop-detection.c: Same.
3204         * graphite-sese-to-poly.c: Same.
3205         * graphite.c: Same.
3206         * lambda-code.c: Same.
3207         * matrix-reorg.c: Same.
3208         * tree-data-ref.c: Same.
3209         * tree-if-conv.c: Same.
3210         * tree-loop-distribu: Same.: Same.
3211         * tree-loop-linear.c: Same.
3212         * tree-parloops.c: Same.
3213         * tree-predcom.c: Same.
3214         * tree-vect-patterns.c: Same.
3216 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
3218         Partially revert the previous patch, except the following.
3219         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
3220         as parameters the operands of the not expression.
3222 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3224         * tree-scalar-evolution.c (instantiate_scev_assign): New.
3225         Do not call analyze_scalar_evolution on assignments.
3226         (instantiate_scev_phi): Call analyze_scalar_evolution.
3227         (instantiate_scev_name): Call instantiate_scev_assign and
3228         instantiate_scev_phi.
3229         (instantiate_scev_not): Adapted to pass as parameters the operands
3230         of the not expression.
3232 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3234         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
3235         to pass as parameters the operands of the binary expression.
3237 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3239         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
3240         instantiate_scev_not.  Handle NEGATE_EXPR.
3241         (instantiate_scev_r): Handle NEGATE_EXPR.
3243 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3245         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
3246         instantiate_scev_r.
3247         (instantiate_scev_r): Move code in instantiate_scev_2
3248         and instantiate_scev_1.
3250 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3252         * tree-scalar-evolution.c (instantiate_scev_3): New.
3253         (instantiate_scev_1): Move code in instantiate_scev_3.
3255 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3257         * tree-scalar-evolution.c (instantiate_scev_poly): New.
3258         (instantiate_scev_1): Move code in instantiate_scev_poly.
3260 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3262         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3263         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3265 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3267         * tree-scalar-evolution.c (instantiate_scev_convert): New.
3268         (instantiate_scev_1): Move code in instantiate_scev_convert.
3270 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3272         * tree-scalar-evolution.c (instantiate_scev_binary): New.
3273         (instantiate_scev_1): Move code in instantiate_scev_binary.
3275 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3277         * tree-scalar-evolution.c (instantiate_scev_name): New.
3278         (instantiate_scev_1): Move code in instantiate_scev_name.
3280 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
3282         * Merge from mainline (150992:151171).
3284 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3286         * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3288 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3290         * graphite-dependences.c (graphite_legal_transform_bb): Call
3291         pbb_remove_duplicate_pdrs.
3292         * graphite-poly.c (can_collapse_pdr): Removed.
3293         (pdr_find_duplicate): Removed.
3294         (can_collapse_pdrs): New.
3295         (pbb_remove_duplicate_pdrs): New.
3296         (new_poly_dr): Do not look for duplicates.
3297         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3298         (PBB_PDR_DUPLICATES_REMOVED): New.
3299         (pbb_remove_duplicate_pdrs): Declared.
3301 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3303         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3304         the strides by multiplying by PDR_NB_REFS.
3305         * graphite-poly.c (can_collapse_pdr): New.
3306         (pdr_find_duplicate): New.
3307         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
3308         Initialize PDR_NB_REFS.
3309         * graphite-poly.h (struct poly_dr): Add field nb_refs.
3310         (PDR_NB_REFS): New.
3311         (new_poly_dr): Number of subscripts is a graphite_dim_t.
3313 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3315         Revert one of the previous commits:
3316         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3317         the computation of symmetric data dependence relations.
3318         (dependency_between_pbbs_p): Same.
3320 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3322         PR middle-end/40965
3323         * graphite-poly.c (apply_poly_transforms): Remove legality test before
3324         any transform.
3326 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3328         * graphite-dependences.c (pddr_original_scattering): Return NULL
3329         for read-read dependence relations.
3330         * graphite-poly.h (enum poly_dr_type): Fix comment.
3331         (pdr_read_p): New.
3332         (pdr_write_p): New.
3333         (pdr_may_write_p): New.
3335 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3337         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3338         (struct poly_dr): Same.
3339         (new_poly_dr): Same.
3340         * graphite-poly.c (new_poly_dr): Same.
3342 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3343             Sebastian Pop  <sebastian.pop@amd.com>
3345         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3346         pbb_strip_mine_time_depth.  Changed the implementation so that
3347         transformation is expressed as a transformation on
3348         time (scatttering) dimensions.  Also, ensures that the 2d+1
3349         scheduling format is preserved.
3350         (pbb_strip_mine_profitable_p): Profitability is based on the
3351         iteration number of a given time (scattering) dimension,
3352         and not on a original loop depth dimension.
3353         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3354         (pbb_do_strip_mine): Call psct_dynamic_dim.
3355         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3356         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3357         (pbb_nb_dynamic_scattering_transform): New.
3358         (psct_dynamic_dim): New.
3360 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3362         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3363         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3364         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3365         * graphite-interchange.c (build_linearized_memory_access): Same.
3366         (memory_stride_in_loop): Same.
3368 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3370         * graphite-dependences.c (pddr_original_scattering): New.
3371         (graphite_legal_transform_dr): Call pddr_original_scattering.
3372         (dot_deps_1): New.
3373         (dot_deps): New.
3374         * graphite-dependences.h (dot_deps): Declared.
3375         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3376         (print_pdr): Print PDR_ID.
3377         * graphite-poly.h (struct poly_dr): Add field id.
3378         (PDR_ID): New.
3379         (pbb_index): New.
3380         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3382 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
3384         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3385         not delete the original dependence relation.
3387 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3389         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3390         the computation of symmetric data dependence relations.
3391         (dependency_between_pbbs_p): Same.
3393 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3395         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3396         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3397         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3398         (free_poly_ddr): New.
3399         (pddr_is_empty): New.
3400         (dependence_polyhedron_1): Now returns a poly_ddr_p.
3401         (dependence_polyhedron): Same.  Remove useless gcc_assert.
3402         Remove fprintfs.
3403         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3404         (graphite_carried_dependence_level_k): Call pddr_is_empty.
3405         * graphite-dependences.h (enum poly_dependence_kind): New.
3406         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
3407         (PDRP_SOURCE): Renamed PDDR_SOURCE.
3408         (PDRP_SINK): Renamed PDDR_SINK.
3409         (PDRP_DDP): Renamed PDDR_DDP.
3410         (PDDR_KIND): New.
3411         (free_poly_ddr): Declared.
3412         * graphite-poly.c (new_scop): Use the new hash function names.
3413         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3414         into original_pddrs.
3415         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3417 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3419         * Merge from mainline (150764:150992).
3421 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3423         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3424         bounds with LT_EXPR to make niter analysis more precise on code
3425         generated by Graphite.
3427 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3429         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3430         (graphite_legal_transform_bb): Same.
3431         (poly_drs_may_alias_p): Same.
3433 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
3435         PR middle-end/40981
3436         * graphite-ppl.c (ppl_max_for_le): Correct the use of
3437         ppl_Pointset_Powerset_C_Polyhedron_maximize.
3439 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3441         * graphite-poly.c (print_pbb): Print PBB index.
3443 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3445         * Merge from mainline (r150672:150764).
3447 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3449         * graphite-interchange.c (ppl_max_for_le): Moved...
3450         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3451         * graphite-ppl.c (ppl_max_for_le): ... here.
3452         * graphite-ppl.h (ppl_max_for_le): Declared.
3454 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
3456         * Merge from mainline (r150372:150672).
3458 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3460         PR middle-end/40980
3461         * sese.c (convert_for_phi_arg): New.
3462         (add_guard_exit_phis): Use convert_for_phi_arg.
3464         * gfortran.dg/graphite/id-17.f: New.
3466 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3468         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3469         unknown subscript upper bounds.
3471         * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3473 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3474             Pranav Garg  <pranav.garg2107@gmail.com>
3476         * graphite-interchange.c (gather_access_strides): Removed.
3477         (ppl_max_for_le): New.
3478         (build_linearized_memory_access): New.
3479         (memory_stride_in_loop): New.
3480         (pbb_interchange_profitable_p): Reimplemented.
3481         * graphite-ppl.h (ppl_new_id_map): New.
3482         (ppl_interchange): New.
3484         * gcc.dg/graphite/interchange-6.c: XFAILed.
3486 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3488         * graphite-interchange.c (compute_subscript): Removed.
3489         (compute_array_size_cstr): Removed.
3490         (compute_array_size_poly): Removed.
3491         (compute_array_size): Removed.
3492         (gather_access_strides_poly): Removed.
3493         (gather_access_strides): Empty.
3495 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3497         * graphite-dependences.c (dependence_polyhedron_1): Replace
3498         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3499         (graphite_legal_transform_dr): Same.
3500         (graphite_carried_dependence_level_k): Same.
3501         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3502         Initialize PDR_NB_SUBSCRIPTS.
3503         (print_pdr_access_layout): Replace pdr_nb_subscripts with
3504         PDR_NB_SUBSCRIPTS.
3505         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3506         (PDR_NB_SUBSCRIPTS): New.
3507         (pdr_nb_subscripts): Removed.
3508         (pdr_dim): Simplified.
3509         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3510         with PDR_NB_SUBSCRIPTS.
3512 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3514         * graphite-interchange.c (compute_array_size): Remove use of
3515         PDR_DATA_CONTAINER.
3516         * graphite-poly.c (new_poly_dr): Remove argument data_container.
3517         Do not initialize PDR_DATA_CONTAINER.
3518         (print_pdr): Do not print PDR_DATA_CONTAINER.
3519         * graphite-poly.h (struct poly_dr): Remove data_container field.
3520         (PDR_DATA_CONTAINER): Removed.
3521         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3522         PDR_DATA_CONTAINER.
3523         (build_poly_dr): Same.
3525 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3527         * gcc.dg/graphite/interchange-9.c: New.
3529 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3530             Sebastian Pop  <sebastian.pop@amd.com>
3532         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3533         copy of the dependence polyhedron.  Free the temporary objects.
3534         (graphite_carried_dependence_level_k): Free unused objects before
3535         returning.
3537         * gcc.dg/graphite/interchange-1.c: XFAILed.
3538         * gcc.dg/graphite/interchange-2.c: XFAILed.
3539         * gcc.dg/graphite/interchange-3.c: XFAILed.
3540         * gcc.dg/graphite/interchange-4.c: XFAILed.
3541         * gcc.dg/graphite/interchange-7.c: XFAILed.
3543 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3545         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3546         Early return without analyzing the data dependences if no
3547         transform has been done.  Call restore_scattering if the transform
3548         is not legal.
3549         (graphite-interchange.c): Same.
3550         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3551         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3552         (apply_poly_transforms): Do not gcc_assert that
3553         the transform is legal.
3554         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3555         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3556         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3557         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3558         * graphite-poly.h (struct poly_scattering): New.
3559         (struct poly_bb): Add original, transformed, and saved fields.
3560         Remove transformed_scattering, original_scattering, nb_local_variables,
3561         and nb_scattering_transform fields.
3562         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3563         (poly_scattering_new): New.
3564         (poly_scattering_free): New.
3565         (poly_scattering_copy): New.
3566         (store_scattering_pbb): New.
3567         (store_scattering): New.
3568         (restore_scattering_pbb): New.
3569         (restore_scattering): New.
3570         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3571         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3573 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3575         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3576         (print_scop): Same.
3578 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3580         * Makefile.in (graphite.o): Depends on PREDICT_H.
3581         * graphite.c: Include predict.h.
3582         (graphite_finalize): Call tree_estimate_probability.
3583         * predict.c (predict_loops): Do not call scev_initialize and
3584         scev_finalize.
3585         (tree_estimate_probability_bb): New.
3586         (tree_estimate_probability): Do not initialize loops: move that
3587         code to the driver.  Call tree_estimate_probability_bb.
3588         (tree_estimate_probability_driver): New.
3589         (pass_profile): Use tree_estimate_probability_driver.
3590         * predict.h (tree_estimate_probability): Declared.
3592 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3594         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3595         * graphite-dependences.c (graphite_legal_transform): Add time to
3596         TV_GRAPHITE_DATA_DEPS.
3597         (dependency_between_pbbs_p): Same.
3598         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3600 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3602         * Merge from mainline (r149952:150372).
3604 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3606         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3607         * graphite-blocking.c: Same.
3608         * graphite-clast-to-gimple.c: Same.
3609         * graphite-dependences.c: Same.
3610         * graphite-poly.c: Same.
3611         * graphite-poly.h: Same.
3612         * graphite-ppl.c: Same.
3613         * graphite-scop-detection.c: Same.
3614         * graphite-sese-to-poly.c: Same.
3615         * graphite.c: Same.
3617 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3619         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3620         (remove_simple_copy_phi): New.
3621         (remove_invariant_phi): New.
3622         (simple_copy_phi_p): New.
3623         (reduction_phi_p): New.
3624         (gsi_for_ssa_name_def): New.
3625         (insert_out_of_ssa_copy): New.
3626         (insert_out_of_ssa_copy_on_edge): New.
3627         (create_zero_dim_array): New.
3628         (scalar_close_phi_node_p): New.
3629         (rewrite_close_phi_out_of_ssa): New.
3630         (rewrite_phi_out_of_ssa): New.
3631         (rewrite_reductions_out_of_ssa): New.
3632         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3634         * gcc.dg/graphite/id-11.c: New.
3635         * gcc.dg/graphite/id-15.c: New.
3636         * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3637         * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3638         * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3639         * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3640         * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3641         * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3642         * gfortran.dg/graphite/id-13.f: New.
3643         * gfortran.dg/graphite/id-5.f: New.
3645 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3647         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3648         check that nb_reductions_in_loop is zero.
3649         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3650         reduction phi nodes.
3651         (nb_reductions_in_loop): Removed.
3652         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3653         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3654         (bb_contains_non_iv_scalar_phi_nodes): Removed.
3655         (scop_contains_non_iv_scalar_phi_nodes): Removed.
3656         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3658 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3660         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3661         statements that have an empty iteration domain.
3662         * gfortran.dg/graphite/id-16.f: New.
3664 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3666         * tree-scalar-evolution.c (instantiate_scev_1): Return
3667         chrec_dont_know when the result is not above instantiate_below.
3668         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3669         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3670         the tree has a known scalar evolution.
3671         * gfortran.dg/graphite/id-14.f: New.
3672         * gfortran.dg/graphite/id-15.f: New.
3674 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3676         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3677         insert_gsi.
3678         (rename_variables): Keep inserting renames after the ones already
3679         inserted.
3681 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3683         * graphite-sese-to-poly.c (compare_bb_depths): New.
3684         (graphite_sort_dominated_info): New.
3685         (build_scop_bbs_1): Call graphite_sort_dominated_info.
3686         (build_scop_scattering): Fix comment.
3688 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3690         * graphite.c (graphite_finalize): Call print_loops instead of
3691         dump_function_to_file.
3692         * gcc.dg/graphite/graphite.exp: Fix formatting.
3693         * gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
3694         loops generated in the graphite output file.
3695         * gcc.dg/graphite/pr35356-2.c: New.
3696         * gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
3697         * gfortran.dg/graphite/id-12.f: New.
3699 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3701         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3702         Remove 2 XFAIL.
3704 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3705             Tobias Grosser  <grosser@fim.uni-passau.de>
3707         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3708         alias set number build alias in ACCESSES polyhedron.
3709         (build_alias_set_for_drs): New.
3710         (build_pbb_drs): Added build_alias_set_for_drs.
3711         * graphite-dependences.c (poly_drs_may_alias_p): New.
3712         (graphite_carried_dependence_level_k): Check alias information
3713         before building polyhedron.
3715 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3717         * Makefile.in (lambda-code.o): Fix formatting.
3719 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3721         * Merge from mainline (r149350-149952)
3723 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3725         * graphite-poly.c (apply_poly_transforms): Move strip_mine
3726         before interchange to prepare for loop blocking.
3728 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3730         * graphite-poly.c (apply_poly_transforms): Add checks after every
3731         transformation.
3732         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3733         done in apply_poly_transforms.
3735 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3737         * graphite-dependences.c (build_lexicographically_gt_constraint):
3738         Replace RES parameter with *RES.
3739         (dependence_polyhedron_1): Pass an address of the parameter RES
3740         instead of value of RES.
3742 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3744         * graphite.c (graphite_finalize): Fix comment.
3745         (graphite_transform_loops): Reset scev info after code generation
3746         of each scop.
3748 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3750         * graphite.c (graphite_finalize): Call scev_reset.
3752 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3754         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3755         GBB_CLOOG_IV_TYPES hash table twice.
3756         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3757         (add_condition_to_domain): Clear GMP values.
3759 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3761         * graphite-dependences.c: Fix formatting.
3762         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3763         (pbb_number_of_iterations): Free ppl_Linear_Expression.
3764         * graphite-sese-to-poly.c: Fix formatting.
3765         * graphite.c (graphite_transform_loops): Create the hash table
3766         after the early return.
3768 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3770         * gcc.dg/graphite/id-14.c: New.
3771         * gcc.dg/graphite/pr40157.c: New.
3772         * gfortran.dg/graphite/id-11.f: New.
3774 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3776         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3777         (build_poly_scop): Return false when there are no pbbs within
3778         loops to avoid to pass to cloog scops with no loops.
3780 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3782         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3783         useless test "i % 2".
3784         (build_pbb_scattering_polyhedrons): Fix formatting.
3785         (build_poly_dr): Same.
3786         * graphite.c (graphite_transform_loops): Restructure.
3788 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
3790         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3791         reduction_list parameter.
3792         (rewrite_all_phi_nodes_with_iv): Same.
3793         (canonicalize_loop_ivs): Same.
3794         * tree-parloops.c (struct brli): Removed.
3795         (build_reduction_list_info): Removed.
3796         (build_new_reduction): New.
3797         (analyze_reduction_list): Removed.
3798         (gather_scalar_reductions): Find reductions instead of phi
3799         nodes that can't be canonicalized.
3800         (try_create_reduction_list): Remove reduction_list parameter.
3801         (gen_parallel_loop): Same.
3802         (parallelize_loops): Remove analyze_reductions variable,
3803         initialization and free.
3804         Change reduction_list htab initialization to reduction_info
3805         elements instead of ssa names.
3806         Call try_create_reduction_list and gen_parallel_loop without
3807         analyzed_reduction argument.
3808         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3809         canonicalize_loop_ivs with one less argument.
3810         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3812 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
3814         * graphite-dependences.c (new_poly_dr_pair): New.
3815         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3816         (new_poly_dr_pair): New.
3817         (eq_poly_dr_pair_p): New.
3818         (hash_poly_dr_pair_p): New.
3819         * graphite-dependences.h (struct poly_dr_pair): New.
3820         (eq_poly_dr_pair_p): Declared.
3821         (hash_poly_dr_pair_p): Declared.
3822         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3823         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3824         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3825         * Makefile.in (graphite-poly.o): Add dependence on
3826         graphite-dependences.h.
3828 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3830         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3831         polynomials of degree > 1 pass to Graphite.
3832         * tree-chrec.c (scev_is_linear_expression): Call
3833         evolution_function_is_affine_multivariate_p.
3834         * gfortran.dg/graphite/id-10.f90: New.
3836 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3838         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3839         Instantiate scevs varying in outer loops.
3840         * gfortran.dg/graphite/id-9.f: Correct testcase.
3842 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3844         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3845         redundant constraint.
3847 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3849         * gcc.dg/graphite/graphite.exp: Fix comments.
3850         * gfortran.dg/graphite/graphite.exp: Trigger actions
3851         based on the file names as in the C testsuite.
3852         * gfortran.dg/graphite/block-1.f90: Fix patterns.
3853         * gfortran.dg/graphite/block-2.f: Same.
3854         * gfortran.dg/graphite/block-3.f90: Same.
3855         * gfortran.dg/graphite/block-4.f90: Same.
3856         * gfortran.dg/graphite/id-1.f90: Same.
3857         * gfortran.dg/graphite/id-2.f90: Same.
3858         * gfortran.dg/graphite/id-3.f90: Same.
3859         * gfortran.dg/graphite/id-4.f90: Same.
3860         * gfortran.dg/graphite/id-6.f: Same.
3861         * gfortran.dg/graphite/id-9.f: Same.
3862         * gfortran.dg/graphite/interchange-1.f: Same.
3863         * gfortran.dg/graphite/interchange-2.f: Same.
3864         * gfortran.dg/graphite/scop-1.f: Same.
3866 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3868         * sese.c (expand_scalar_variables_call): New.
3869         (expand_scalar_variables_ssa_name): Handle calls in expander.
3871 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3873         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3874         Expect to see the pattern twice.
3875         * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3876         * gcc.dg/graphite/interchange-5.c: Same.
3877         * gcc.dg/graphite/interchange-6.c: Same.
3879 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3881         * gcc.dg/graphite/id-10.c: New.
3882         * gcc.dg/graphite/id-12.c: New.
3883         * gfortran.dg/graphite/id-7.f: New.
3884         * gfortran.dg/graphite/id-8.f: New.
3886 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3888         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3889         zero.
3891 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3893         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3895 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3897         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3899 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3901         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3902         building PDR subscripts.
3904 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3906         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3907         computation of array sizes.
3909 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3911         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3913 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3915         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3916         build_pairwise_constraint, dr_equality_constraints,
3917         build_pairwise_scheduling_equality,
3918         build_pairwise_scheduling_inequality, lexicographically_gt_p,
3919         build_lexicographically_gt_constraint, dependence_polyhedron,
3920         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3921         Move from NNC_Polyhedron to C_Polyhedron.
3922         * graphite-interchange.c (compute_array_size_poly,
3923         gather_access_strides): Dito.
3924         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3925         free_scop, pbb_number_of_iterations): Dito.
3926         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3927         pbb_dim_iter_domain, struct scop): Dito.
3928         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3929         new_Cloog_Domain_from_ppl_Polyhedron,
3930         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3931         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3932         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3933         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3934         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3935         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3936         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3937         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3938         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3939         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3940         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3941         build_scop_iteration_domain, build_poly_dr): Dito
3943 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3945         * gcc.dg/graphite/graphite.exp: Added a rule to execute
3946         run-id-*.c files.
3947         * gcc.dg/graphite/run-id-1.c: New.
3949 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3951         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3952         positivity constraint on the symbolic number of iterations.
3954 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3956         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3958 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3959             Tobias Grosser  <grosser@fim.uni-passau.de>
3961         * graphite-clast-to-gimple.c (build_scop_context): Removed.
3962         (build_cloog_prog): Directly use SCOP_CONTEXT.
3963         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3964         (free_scop): Free SCOP_CONTEXT.
3965         (print_scop_context): New.
3966         (print_scop): Call print_scop_context.
3967         (debug_scop_context): New.
3968         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3969         (struct scop): Added field context.
3970         (SCOP_CONTEXT): New.
3971         * graphite-sese-to-poly.c (add_param_constraints): New.
3972         (build_scop_context): New.
3973         (build_poly_scop): Call build_scop_context.
3975 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3977         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3978         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3979         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3980         * graphite-ppl.h: Include double-int.h and tree.h.
3981         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3982         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3983         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
3984         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3986 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3988         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3989         POINTER_PLUS_EXPR for pointer types.
3990         (clast_to_gcc_expression): Same.
3992 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3994         * graphite-poly.c (print_scattering_function): Early return when
3995         PBB_TRANSFORMED_SCATTERING is not initialized.
3996         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3998 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
4000         * tree-parloops.c (analyze_reduction_list): Remove unused variable
4001         to fix bootstrap.
4003 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
4005         * tree-parloops.c (analyze_reduction_list): Change return
4006         value to void.
4007         (try_create_reduction_list): Move the call to
4008         analyze_reduction_list to the beginining.
4009         Call reduction_phi with analyzed_reductions as argument
4010         instead of reduction_list.
4012 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4014         *  Merge from mainline (r148296:149346)
4016 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4018         * graphite-scop-detection.c (graphite_can_represent_init): New.
4019         (graphite_can_represent_scev): Call graphite_can_represent_init:
4020         check that the initial value does not contain multiplications of
4021         parameters.
4022         (stmt_has_simple_data_refs_p): New.
4023         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
4024         (is_simple_operand): Fix formatting.
4025         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
4027 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4029         * gcc.dg/graphite/id-13.c: New.
4030         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
4031         analyze_scalar_evolution, use scalar_evolution_in_region.
4032         (scan_tree_for_params_right_scev): Add extra assert.
4033         (parameter_index_in_region_1): Split from parameter_index_in_region.
4034         (idx_record_params): Use scalar_evolution_in_region.
4035         (find_params_in_bb): Same.
4036         (find_scop_parameters): Same.
4037         (build_loop_iteration_domains): Same.
4038         (create_linear_expr_from_tree): Same.
4039         * sese.c (scalar_evolution_in_region): New.
4040         * sese.h (scalar_evolution_in_region): Declared.
4041         (defined_in_sese_p): New.
4042         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
4043         static anymore.
4044         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
4045         Declared.
4047 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4049         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
4050         TREE_DATA_REF_H also implies SCEV_H.
4052 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4054         * graphite-poly.c (print_scop_params): New.
4055         (print_scop): Call print_scop_params.
4056         (debug_scop_params): New.
4057         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
4059 2009-07-07  Li Feng  <nemokingdom@gmail.com>
4061         * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
4062         * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
4063         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
4064         * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
4065         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
4066         * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
4068 2009-07-07  Li Feng  <nemokingdom@gmail.com>
4070         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
4071         for dependency checking part.
4072         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
4073         tests for dependency checking.
4074         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4075         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4076         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
4077         flag -fdump-tree-graphite-all for autopar testsuites.
4079 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
4081         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
4082         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
4083         canonicalize_loop_ivs): Moved...
4084         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
4086 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
4088         * tree-parloops.c (try_create_reduction_list): Pass an extra
4089         argument analyzed_reductions.  Call analyze_reduction_list.
4090         (gen_parallel_loop): Do not call analyze_reduction_list.
4091         (parallelize_loops): Init and finalize analyzed_reductions.
4093 2009-07-06  Li Feng  <nemokingdom@gmail.com>
4095         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4096         Added flag -fno-loop-strip-mine for autopar testcase.
4098 2009-07-04  Li Feng  <nemokingdom@gmail.com>
4100         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
4101         transformed scattering dimension instead of unmatch orignal when
4102         calling dependence_polyhedron.
4104 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
4106         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
4108 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
4110         * graphite-poly.c (pbb_number_of_iterations): Check for returned
4111         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
4113 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
4115         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
4116         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
4117         * graphite-poly.c (pbb_number_of_iterations): New.
4118         * graphite-poly.h (pbb_number_of_iterations): Declared.
4119         (pbb_iterator_dim, pbb_parameter_dim): New.
4121 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
4123         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
4124         last commit on type of lower and upper bound of loops.
4126 2009-06-29  Li Feng  <nemokingdom@gmail.com>
4128         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
4129         graphite-dependences.h.
4130         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
4131         (mark_bb_with_pbb): New.
4132         (get_stmtfor_depth): New.
4133         (find_pbb_via_hash): New.
4134         (dependency_in_loop_p): New.
4135         (mark_loops_parallel): New.
4136         (free_aux_in_new_loops): New.
4137         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
4138         bb with it's relevant pbb. Mark newly created loops.  Remove mark
4139         innermost loop parallel without checking.
4140         (gloog): Add parameter BB_PBB_MAPPING.
4141         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
4142         (gloog): Change declaration.
4143         (mark_loop_parallel): Make extern.
4144         (free_aux_in_new_loops): Declare.
4145         (bb_pbb_map_hash): New.
4146         (eq_bb_pbb_map): New.
4147         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
4148         auto parallelization when flag_graphite_force_parallel is set.
4149         (graphite_finalize): Added free_aux_in_new_loops.
4150         * tree-parloops.c (parallelize_loops): Only generate parallel code for
4151         the innermost loop that marked parallel.  Use
4152         flag_graphite_force_parallel instead of loop->can_be_parallel.
4153         (loop_parallel_p): Move inner most checking out of function.
4155 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4157         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
4158         type of lower and upper bound of loops signed long int.
4160 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4162         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
4163         expression outside the loop.
4165 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4167         * gcc.dg/graphite/interchange-8.c: New.
4169 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4171         * gcc.dg/graphite/interchange-0.c: XFailed.
4172         * gcc.dg/graphite/interchange-5.c: XFailed.
4173         * gcc.dg/graphite/interchange-6.c: XFailed.
4175 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4177         * graphite-interchange.c (compute_array_size_poly): The end of the
4178         recursion should return 1.
4180 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4182         * graphite-interchange.c (compute_array_size_cstr): Allow the
4183         subscript multiplier to be -1.
4184         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
4185         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
4186         data_container.  Initializes PDR_DATA_CONTAINER.
4187         (print_pdr_access_layout): New.
4188         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
4189         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
4190         data_container.
4191         (PDR_DATA_CONTAINER): New.
4192         (new_poly_dr): Update declaration.
4193         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
4194         (build_poly_dr): Call pdr_add_data_dimensions.
4196 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4198         * graphite-poly.h (struct poly_dr): Fix comment.
4199         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
4200         (pdr_add_memory_accesses): New.
4201         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
4203 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4205         * graphite-poly.c (print_pdrs, debug_pdrs): New.
4206         (print_pbb): Add call to print_pdrs.
4207         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
4209 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
4210             Li Feng <nemokingdom@gmail.com>
4212         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
4213         (dependency_between_pbbs_p): New.
4214         (lexicographically_gt_p): Assure !empty_p before polyhedron
4215         intersection assign.
4216         (build_lexicographically_gt_constraint): Correct lexicographically
4217         judging.
4218         * graphite-dependences.h: New.
4219         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
4221 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4223         * graphite-clast-to-gimple.c (print_clast_stmt): New.
4224         (gloog): Print to dump_file the generated clast.
4225         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
4226         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
4228 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4230         * graphite-poly.c (extend_scattering): Increment
4231         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
4233 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4235         * graphite-interchange.c (compute_array_size_poly): Added exit of
4236         recursion condition.  Continue iterating even after the first equality.
4237         (compute_array_size): Same.
4239 2009-06-24  Li Feng  <nemokingdom@gmail.com>
4241         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
4242         -fdump-tree-final_cleanup to -fdump-tree-optimized.
4243         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4244         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4245         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
4247 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4249         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
4250         only when the use verifies is_gimple_reg.
4252 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4254         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
4255         Allocate scaldims after call to unify_scattering_dimensions.
4257 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4259         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4261 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4262             Albert Cohen  <albert.cohen@inria.fr>
4264         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4265         variables for the strip mining.
4267 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4268             Pranav Garg  <pranav.garg2107@gmail.com>
4270         * Makefile.in (OBJS-common): Added graphite-blocking.o.
4271         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4272         (graphite-blocking.o): New rule.
4273         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4274         * graphite-blocking.c: New.
4275         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4276         flag_loop_strip_mine.
4277         (psct_scattering_dim_for_loop_depth): New.
4278         * graphite-poly.h (scop_do_strip_mine): Declared.
4279         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4280         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4281         flag_loop_strip_mine.
4283 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4285         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4286         a GMP value and a PPL coefficient at each iteration of a loop.
4288 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4290         * graphite-dependences.c (dependence_polyhedron): Do not use
4291         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
4292         pbb_nb_scattering_transform.
4293         (graphite_legal_transform_dr): Same.
4294         * graphite-poly.c (extend_scattering): Same.
4295         (unify_scattering_dimensions): Same.
4296         (print_scattering_function): Same.
4297         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4298         PBB_NB_LOCAL_VARIABLES.
4299         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4300         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4301         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4302         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4303         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4304         (pbb_nb_scattering_transform): New.
4305         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4306         (psco_scattering_dim): Add assert on parameters.
4307         (psct_scattering_dim): Same.
4308         (psct_scattering_dim_for_loop_depth): Declared.
4309         (psct_local_var_dim): New.
4310         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4311         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
4312         correct layout, call pbb_nb_local_vars.
4313         (psct_add_local_variable, psct_add_scattering_dimension): New.
4314         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4315         Initialize PBB_NB_SCATTERING_TRANSFORM.
4317 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4319         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4320         (set_coef): Renamed ppl_set_coef.
4321         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4323 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4325         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4326         test a boolean against 1.
4327         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4328         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4329         (pbb_do_interchange): Returns true when a transform has been performed.
4330         (scop_do_interchange): Same.
4331         * graphite-poly.c (apply_poly_transforms): Use the return value of
4332         scop_do_interchange.
4333         * graphite-poly.h (scop_do_interchange): Update declaration.
4335 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
4337         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4338         after last use.
4339         * sese.c (sese_reset_aux_in_loops): New.
4340         * sese.h (sese_reset_aux_in_loops): New.
4342 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4344         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4345         multiplier and multiply the constant by the multiplier.
4346         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4347         (build_poly_dr): Do not use the multiplier to define the subscript.
4349 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4351         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4352         compiler's data reference.  Initialize PDR_CDR.
4353         (print_pdr): Call dump_data_reference.
4354         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4355         Add compiler_dr field.
4356         (PDR_BB): Renamed PDR_PBB.
4357         (PDR_CDR): New.
4358         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4359         GCC's data reference representation.
4360         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4361         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4363 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4365         * graphite-poly.c (print_scattering_function): Also print the layout.
4366         * graphite-poly.h (pbb_nb_local_vars): New.
4368 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4370         * graphite-poly.c (print_pbb_domain): Also print the layout names.
4372 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4374         * graphite-poly.c (print_pdr, debug_pdr): New.
4375         * graphite-poly.h (print_pdr, debug_pdr): Declared.
4376         (PDR_BASE): Removed.
4378 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4380         * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4381         ltrans-{1..6,8}.c.
4383 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4385         * graphite-interchange.c (compute_subscript): Allow also -1 in the
4386         subscript identification column.
4387         (pbb_do_interchange): Print to dump_file that some loops "will be
4388         interchanged".  Rely on that chain of characters in the testcases.
4389         * gcc.dg/graphite/interchange-0.c: New.
4390         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4391         interchange-*.c files and compile them with -floop-interchange.
4393 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
4395         * graphite-interchange.c (interchange_profitable_p): Renamed
4396         pbb_interchange_profitable_p.
4398 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4399             Harsha Jagasia  <harsha.jagasia@amd.com>
4400             Pranav Garg  <pranav.garg2107@gmail.com>
4402         * graphite-interchange.c (interchange_profitable_p): Make static.
4403         (pbb_interchange_loop_depths, pbb_do_interchange,
4404         scop_do_interchange): New.
4405         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4406         for flag_loop_interchange.
4407         * graphite-poly.h (scop_do_interchange): Declared.
4408         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4409         flag_loop_interchange is used.
4411 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4413         * graphite-dependences.c (dependence_polyhedron): Update use of
4414         pbb_nb_scattering_dims.
4415         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4416         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4417         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4418         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4420 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4422         * graphite.c: Cleanup foo.
4424 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4426         * Merge from mainline (r143684:148293).
4427         * Disabled libpcp until it gets fixed.
4429 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4430             Harsha Jagasia  <harsha.jagasia@amd.com>
4432         * graphite-interchange.c: New.
4433         * Makefile.in (graphite-interchange.o): New.
4434         * graphite-poly.h (interchange_profitable_p): Declared.
4435         * graphite-ppl.h (value_max): New.
4437 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4439         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4440         * graphite-poly.h: Fix some comments.
4441         (pdr_dim): New.
4442         (pdr_scop): New.
4444 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4446         * graphite-poly.h
4447         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4448         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4449         (pdr_accessp_nb_params): Renamed pdr_nb_params.
4450         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4451         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4452         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4453         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4454         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4455         * graphite-clast-to-gimple.c: Same.
4456         * graphite-dependences.c: Same.
4457         * graphite-poly.c: Same.
4458         * graphite-sese-to-poly.c: Same.
4460 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4462         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4463         expressions for an IV rename, as returned by clast_to_gcc_expression.
4464         (copy_renames): Rename new_name to expr.
4465         * sese.c (debug_rename_elt): Same.
4466         (get_rename): Same.
4467         (set_rename): Same.
4468         (sese_adjust_liveout_phis): Call force_gimple_operand before using
4469         the information from the rename map.
4470         (rename_variables_in_stmt): Same.
4471         (add_loop_exit_phis): Rename new_name to expr.
4472         (insert_loop_close_phis): Same.
4473         (add_guard_exit_phis): Same.  Call force_gimple_operand.
4474         * sese.h (struct rename_map_elt): Rename new_name to expr.
4475         (new_rename_map_elt): Same.
4477 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4479         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4480         * sese.c (set_rename): Make it extern.
4481         * sese.h (set_rename): Declared.
4483 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4485         * graphite-poly.c (extend_scattering): Free values.
4486         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4487         Free iterators.
4488         (ppl_print_powerset_matrix): Same.
4489         * graphite-scop-detection.c (free_scops_1): New.
4490         (limit_scops): Call free_scops_1.
4491         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4492         (build_poly_dr): Free PPL coefficients.
4493         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4495 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
4497         * graphite-dependences.c: New.
4498         * graphite-data-ref.c: Removed.
4499         * graphite-data-ref.h: Removed.
4500         * Makefile.in (graphite-data-ref.o): Removed.
4501         (graphite-dependences.o): Added.
4502         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4503         * graphite-poly.c: Same.
4504         Move the data dependence testing to graphite-dependences.c.
4506 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
4508         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4509         from graphite_cannot_represent_loop. Code refactored.
4510         (scopdet_basic_block_info): Call graphite_can_represent_loop.
4512 2009-05-17  Li Feng  <nemokingdom@gmail.com>
4514         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4515         Cover all the testcases (not only the filtered ones).
4517 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4519         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4520         unnecessary check. Update comments. Move check for REAL_TYPE here.
4521         (harmful_stmt_in_bb): Remove checks for conditions. This is already
4522         done in (stmt_simple_for_scop_p).
4524 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
4526         * graphite.c (print_global_statistics): New.
4527         (print_graphite_scop_statistic): New.
4528         (print_graphite_statistics): New.
4529         (graphite_initialize, graphite_transform_loops): Print statistics.
4530         * graphite-scop-detection (build_scops): Print statistics.
4531         (print_graphite_scop_statistics): New.
4532         (print_graphite_statistics): New.
4534 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4536         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4537         (debug_clast_name_index): Removed.
4538         (debug_clast_name_indexes_1): Removed.
4539         (debug_clast_name_indexes): Removed.
4540         (clast_name_index_elt_info): Removed.
4541         (eq_clast_name_indexes): Removed.
4542         (clast_name_to_index): Removed.
4543         (new_clast_name_index): Removed.
4544         (save_clast_name_index): Removed.
4545         (save_var_name): Moved...
4546         (init_sese_params_index): Removed.
4547         (clast_name_to_gcc): Remove use of name_tree.
4548         (initialize_cloog_names): Same.
4549         (gloog): Do not call init_sese_params_index.
4550         * graphite-sese-to-poly.c (save_var_name): ...here.
4551         (parameter_index_in_region): New.
4552         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4553         (parameter_index_in_region): Removed.
4554         (is_parameter): Remove use of name_tree.
4555         * sese.h (struct name_tree): Removed.
4556         (struct sese): Remove use of name_tree.  New field params_names.
4557         (SESE_PARAMS_NAMES): New.
4558         (SESE_PARAMS): Remove duplicate.
4559         (parameter_index_in_region): Removed.
4560         (sese_nb_params): Remove use of name_tree.
4561         (struct clast_name_index): New.
4562         (new_clast_name_index): New.
4563         (clast_name_to_index): New.
4564         (save_clast_name_index): New.
4565         (debug_clast_name_index): New.
4566         (debug_clast_name_indexes_1): New.
4567         (debug_clast_name_indexes): New.
4568         (clast_name_index_elt_info): New.
4569         (eq_clast_name_indexes): New.
4571 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4573         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4574         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
4575         (graphite_loop_normal_form): Do not pass region.  Do not
4576         initialize SESE_OLDIVS.
4577         (build_graphite_loop_normal_form): Update call to
4578         graphite_loop_normal_form.
4579         * sese.c (debug_oldivs): Removed.
4580         (new_sese): Do not initialize SESE_OLDIVS.
4581         (free_sese): Do not free SESE_OLDIVS.
4582         (oldiv_for_loop): Removed.
4583         * sese.h (struct sese): Remove old_ivs.
4584         (SESE_OLDIVS): Removed.
4585         (oldiv_for_loop): Removed.
4587 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4589         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4590         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
4591         replaced by a call to newivs_to_depth_to_newiv.
4592         (clast_to_gcc_expression): Pass newivs, remove ivstack.
4593         (clast_to_gcc_expression_red): Same.
4594         (gcc_type_for_clast_expr): Same.
4595         (gcc_type_for_clast_eq): Same.
4596         (graphite_translate_clast_equation): Same.
4597         (graphite_create_guard_cond_expr): Same.
4598         (graphite_create_new_guard): Same.
4599         (graphite_create_new_loop): Same.
4600         (build_iv_mapping): Same.
4601         (translate_clast): Same.
4602         (gloog): Same.
4603         (loop_iv_stack_patch_for_consts): Removed.  *
4604         sese.c (iv_stack_entry_is_constant): Removed.
4605         (iv_stack_entry_is_iv): Removed.
4606         (loop_iv_stack_push_iv): Removed.
4607         (loop_iv_stack_insert_constant): Removed.
4608         (loop_iv_stack_pop): Removed.
4609         (loop_iv_stack_get_iv): Removed.
4610         (loop_iv_stack_get_iv_from_name): Removed.
4611         (debug_loop_iv_stack): Removed.
4612         (free_loop_iv_stack): Removed.
4613         (loop_iv_stack_remove_constants): Removed.  *
4614         sese.h (iv_stack_entry_kind): Removed.
4615         (iv_stack_entry_data_union): Removed.
4616         (iv_stack_entry_struct): Removed.
4617         (iv_stack_entry_p): Removed.
4618         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4619         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4620         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4621         loop_iv_stack_pop, free_loop_iv_stack): Removed.
4622         (gbb_loop_at_index): Fix indenting.
4623         (gbb_loop_index): Removed.
4625 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4627         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4628         Call clast_name_to_index.
4630 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4632         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4633         do not pass params.  Get params from SESE_PARAMS.
4634         (clast_to_gcc_expression): Same.
4635         (clast_to_gcc_expression_red): Same.
4636         (gcc_type_for_clast_eq): Same.
4637         (graphite_translate_clast_equation): Same.
4638         (graphite_create_new_loop): Same.
4639         * sese.c (rename_variables_in_stmt): Fix comment.
4641 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4643         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4644         newivs_index.
4645         Call save_clast_name_index.
4646         (translate_clast): Pass newivs_index.
4647         (gloog): Create and free newivs_index.
4649 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4651         * graphite-clast-to-gimple.c (clast_name_index): New structure.
4652         (clast_name_index_p): New type.
4653         (debug_clast_name_index): New.
4654         (debug_clast_name_indexes_1): New.
4655         (debug_clast_name_indexes): New.
4656         (clast_name_index_elt_info): New.
4657         (eq_clast_name_indexes): New.
4658         (clast_name_to_index): New.
4659         (new_clast_name_index): New.
4660         (save_clast_name_index): New.
4661         (init_sese_params_index): New.
4662         (gloog): Call init_sese_params_index.
4663         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4664         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4665         (free_sese): Free SESE_PARAMS_INDEX.
4666         * sese.h (struct sese): Add params_index.
4667         (SESE_PARAMS_INDEX): New.
4669 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4671         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4672         (graphite_create_new_loop): Pass the newivs vector.  Push the
4673         newly created IV to newivs.
4674         (translate_clast): Pass the newivs vector.
4675         (gloog): Create and destroy the newivs vector.
4677 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4679         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4680         (graphite_loop_normal_form): Initialize loop->aux with the unique
4681         IV that has been created.
4683 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
4685         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4686         scev with parameters in the base part. They where forbidden
4687         exidently.
4689 2009-05-11  Li Feng  <nemokingdom@gmail.com>
4691         * gcc.dg/graphite/graphite.exp: Set different default
4692         compile options by file names.
4693         * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4694         * gcc.dg/graphite/id-{1-9}.c: Ditto.
4695         * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4696         * gcc.dg/graphite/scop-matmult.c: Ditto.
4698 2009-05-08  Li Feng <nemokingdom@gmail.com>
4700         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4701         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4702         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4703         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4705 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4707         * graphite-scop-detection (build_scops_1): Fix little bug introduced
4708         by final cleanup.
4710 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4712         * graphite-scop-detection.c (graphite_can_represent_scev): Only
4713         allow integer constant strides.
4714         (graphite_can_represent_expr): Depend on outermost_loop.
4715         (stmt_simple_memref_p, graphite_cannot_represent_loop,
4716         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4717         build_scops_1): Same.
4718         (scopdet_basic_block_info): Same and insert layered SCoP
4719         detection.
4720         (try_generate_gimple_bb): Cleanup.
4721         (build_scops): Enable data references.
4723         * gcc.dg/graphite/id-5.c: New.
4724         * gcc.dg/graphite/id-9.c: New.
4725         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4726         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4728 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4730         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4731         that we have not yet built for this SCoP.
4733 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4735         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4736         for complex numbers.
4738 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4740         * graphite-ppl.c: Fix build if cloog is not available.
4742 2009-05-04  Li Feng  <nemokingdom@gmail.com>
4744         * tree-parloops.c (loop_parallel_p): Remove construction of
4745         NITER and REDUCTION_LIST.
4746         (try_get_loop_niter): New.
4747         (try_create_reduction_list): New.
4748         (parallelize_loops): Bypass the failed checkings in autopar
4749         when can_be_parallel in loop structure is set to true.
4751 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4753         * gcc.dg/graphite/id-6.c: Update testcase.
4754         * gcc.dg/graphite/scop-3.c: Dito.
4756 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4758         * graphite-scop-detection.c (stmt_simple_for_scop_p):
4759         Enable EQ_EXPR and NE_EXPR again.
4761 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4763         * graphite-scop-detection.c (graphite_can_represent_scev):
4764         Add check if scev is affine multivariate.
4765         (harmful_stmt_in_bb): Check if we can represent the conditions.
4766         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4767         harmful_stmt_in_bb.
4768         * gcc.dg/graphite/id-7.c: New.
4770 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4772         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4773         Check all bbs in region, not only the bbs that are represented in
4774         GRAPHITE.
4775         (build_poly_scop): Add newline.
4776         * gcc.dg/graphite/id-8.c: New.
4778 2009-04-30  Li Feng  <nemokingdom@gmail.com>
4780         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4781         when loop initialize.
4782         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4783         * common.opt: Declare flag_graphite_force_parallel.
4784         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4785         loop parallel.
4786         * graphite-poly.c (apply_poly_transforms): Introduce
4787         flag_graphite_force_parallel.
4788         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4789         * toplev.c (process_options): ditto and replace a not correctly
4790         encoded space.
4792 2009-04-30  Li Feng  <nemokingdom@gmail.com>
4794         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4795         Change the call of gbb_loop_at_index and/or gbb_loop_index due
4796         to the redefinition.
4797         (compute_cloog_iv_types_1): ditto.
4798         (build_iv_mapping): ditto.
4799         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4800         initialization.
4801         (free_gimple_bb): Removed GBB_LOOPS related free part.
4802         (build_bb_loops): Removed.
4803         * sese.h (struct gimple_bb): Removed loops.
4804         (GBB_LOOPS): Removed.
4805         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4806         (gbb_loop_index): ditto.
4808 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4810         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4811         allow non constant strides.
4812         * gcc.dg/graphite/scop-20.c: New.
4814 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4816         * graphite-scop-detection.c (dot_all_scops): Fix system call
4817         return value warning.
4818         (dot_scop): Same.
4820 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4822         * gcc.dg/graphite/id-6.c: Fix pattern.
4823         * gcc.dg/graphite/scop-3.c: Same.
4825 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4827         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4828         build_pairwise_constraint, dr_equality_constraints,
4829         build_pairwise_scheduling_equality,
4830         build_pairwise_scheduling_inequality, lexicographically_gt_p,
4831         build_lexicographically_gt_constraint, dependence_polyhedron,
4832         graphite_legal_transform_dr, graphite_legal_transform_bb,
4833         graphite_legal_transform): New.
4834         * graphite-poly.h (graphite_legal_transform): Declared.
4835         * graphite-sese-to-poly.c (build_poly_scop): Call to
4836         graphite_legal_transform is disabled for the moment.
4838 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4840         * graphite-poly.h (pbb_nb_scattering_dims): New.
4841         (pbb_nb_scattering): Use it.
4843 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4845         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4846         Pointset_Powerset version of ppl_insert_dimensions.
4847         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4849 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4851         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4853 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4855         * graphite-poly.h: Fix comment.
4857 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4859         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4861 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4863         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4864         statements.
4866 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4868         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4869         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4870         conditions.
4872 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
4874         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4875         handle EQ_EXPR and NE_EXPR.
4877 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4879         * graphite-poly.h (poly_dr): Fix comment.
4881 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
4882             Tobias Grosser  <grosser@fim.uni-passau.de>
4884         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4885         with a zero dimension polyhedron.
4886         (find_scop_parameters): Move the call to scop_set_nb_params here.
4887         (build_loop_iteration_domains): Store in loop->aux the iteration
4888         domain polyhedron.
4889         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4890         by any loop in scop.
4891         (build_poly_scop): Do not call scop_set_nb_params.
4893 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
4894             Tobias Grosser  <grosser@fim.uni-passau.de>
4896         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4897         add_condition_to_domain not GT_EXPR.
4899 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4901         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4902         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4903         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4904         upper_bound_assign to calculate unions.
4905         * gcc.dg/graphite/id-6.c: New.
4907 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4909         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4910         handle abnormal edges.
4912 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4914         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4915         (free_poly_bb): Also free poly_drs.
4916         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4917         (poly_dr): Polyhedron to Pointset_Powerset.
4918         (pdr_accessp_nb_subscripts): Same.
4919         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4920         poly_drs.
4922 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4924         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4925         names into more meaningful names.
4927 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4929         * gfortran.dg/graphite/interchange-1.c: New.
4930         * gfortran.dg/graphite/interchange-2.c: New.
4932 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4934         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4935         the reduction_list.
4936         * tree-parloops.c (rewrite_phi_with_iv): New.
4937         (rewrite_all_phi_nodes_with_iv): New.
4938         (canonicalize_loop_ivs): Call them.
4940 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4942         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4943         graphite_find_data_references_in_stmt.
4944         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4945         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4947 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4949         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4951 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4953         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4954         instead of bb_in_region.
4955         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
4956         (build_sese_conditions): Use flag_bb_in_sese.
4957         * sese.c (register_bb_in_sese): Removed.
4958         (new_sese): Remove initialization of SESE_REGION_BBS.
4959         (free_sese): Do not free SESE_REGION_BBS.
4960         * sese.h (struct sese): Remove field region_basic_blocks.
4961         (SESE_REGION_BBS): Removed.
4962         (bb_in_sese_p): Implement in function of bb_in_region.
4964 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4966         * graphite-scop-detection.c (limit_scops): Deal only with single exit
4967         loops.
4969 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4971         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4972         and EQ_EXPR.
4973         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4974         (add_condition_to_domain): New.
4975         (add_condition_to_pbb): New.
4976         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4977         * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4979 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4981         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4982         ppl_Pointset_Powerset.
4983         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4984         * graphite-poly.h (poly_bb): poly_bb.domain Same.
4985         (pbb_nb_loops): Same.
4986         * graphite-sese-to-poly.c (build_loop_iteration_domains,
4987         add_conditions_to_domain): Same.
4988         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4989         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4990         ppl_const_Polyhedron_t.
4991         (ppl_print_powerset_matrix): New.
4992         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4993         ppl_print_powerset_matrix): New.
4994         (ppl_print_polyhedron_matrix): Updated.
4996 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4998         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
5000 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
5002         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
5003         (print_iteration_domains, debug_iteration_domain,
5004         debug_iteration_domains): New.
5005         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
5006         debug_iteration_domains): Declared.
5007         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
5008         indenting.
5010 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5011             Sebastian Pop  <sebastian.pop@amd.com>
5013         * graphite-poly.h (print_iteration_domain): New.
5014         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
5015         (build_sese_conditions_1, build_sese_conditions_after,
5016         build_sese_conditions_before): New.
5017         (build_sese_conditions): Rewritten.
5019 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
5020             Tobias Grosser  <grosser@fim.uni-passau.de>
5022         Cleanup of code generation liveouts.
5023         * graphite-clast-to-gimple.c (translate_clast): Use a single
5024         rename_map instead of one per translated statement.
5025         Do not use SESE_LIVEOUT_RENAMES.
5026         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
5027         (gloog): Do not use SESE_LIVEOUT_RENAMES.
5028         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
5029         phi node of a reduction: when a loop contains a reduction used outside
5030         the loop, there should be a scalar close phi node on the exit block.
5031         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
5032         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
5033         (free_sese): Do not free them.
5034         (sese_build_liveouts_use): Do not use them.
5035         (sese_build_liveouts_bb): Same.
5036         (sese_build_liveouts): Same.
5037         (sese_insert_phis_for_liveouts): Same.
5038         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
5039         (defined_in_loop_p): New.
5040         (alive_after_loop): New.
5041         (close_phi_not_yet_inserted_p): New.
5042         (struct alep, alep_p): New.
5043         (add_loop_exit_phis): Remove from the rename_map all the names defined
5044         in the code generated loop.
5045         (insert_loop_close_phis): Traverse the rename_map passed to it.
5046         Don't use SESE_LIVEOUT_RENAMES.
5047         (default_liveout_before_guard): Renamed default_before_guard.
5048         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
5049         (graphite_copy_stmts_from_block): Do not directly call set_rename.
5050         (register_sese_liveout_renames): Removed.
5051         (copy_bb_and_scalar_dependences): Do not call it.
5052         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
5053         reduction_list.
5054         (SESE_LIVEOUT): Removed.
5055         (SESE_LIVEOUT_RENAMES): Removed.
5056         (SESE_REDUCTION_LIST): Removed.
5057         (sese_build_liveouts): Removed.
5058         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
5059         (insert_loop_close_phis): Pass a htab_t instead of a sese.
5060         (insert_guard_phis): Same.
5061         (rename_map_elt): Declare a VEC of them.
5062         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5063         trees not pointers to trees.
5065         Rewrite in canonical close SSA form:
5066         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
5067         (limit_scops): Close the scop after the block containing the close phi
5068         nodes.
5069         (canonicalize_loop_closed_ssa): New.
5070         (canonicalize_loop_closed_ssa_form): New.
5071         (build_scops): Call canonicalize_loop_closed_ssa_form.
5073         * graphite-sese-to-poly.c: Fix typos.
5075 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
5077         * graphite-poly.c (print_scattering_function, print_pbb_domain):
5078         Extended.
5079         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
5080         (print_pbb): Add conditions.
5082 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
5083             Sebastian Pop  <sebastian.pop@amd.com>
5085         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
5086         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
5087         (build_scop_bbs_1): New.
5088         (build_scop_bbs): Rewrite.
5089         * sese.h (bb_in_region): New.
5091 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5093         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5094         poly_drs vector.
5095         (print_scop): Style.
5096         * graphite-poly.h (poly_bb): Add drs vector.
5097         (PBB_DRS): Add accessor.
5098         * graphite-sese-to-poly.c (build_poly_dr): New.
5099         (build_pbb_drs, build_scop_drs): New.
5100         (build_poly_scop): call build_scop_drs (Disabled at the moment).
5102 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5104         * tree-ssa-loop.c: Include forgotten toplev.h
5106 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5108         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
5109         * gcc.dg/graphite/pr37883.c: Remove -floop-*
5110         * gcc.dg/graphite/pr37928.c: Same
5111         * gcc.dg/graphite/pr38409.c: Same
5112         * gcc.dg/graphite/pr38498.c: Same
5113         * gcc.dg/graphite/pr38559.c: Same
5114         * gcc.dg/graphite/pr39335.c: Same
5115         * gcc.dg/graphite/pr39335_1.c: Same
5116         * gfortran.dg/graphite/block-2.f: Same
5117         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
5118         with -floop-*.
5120 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
5122         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
5123         build_access_matrix, build_scop_data_accesses): Remove access function
5124         building. (We get a new version soon).
5125         (build_bb_loops, scan_tree_for_params_right_scev): Update.
5126         * sese.h (nb_loops_around_loop_in_sese): Remove.
5127         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
5129 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
5130             Sebastian Pop  <sebastian.pop@amd.com>
5132         * graphite-scop-detection.c (struct scopdet_info): Rename last
5133         field to exit.
5134         (scopdet_basic_block_info, build_scops_1): Don't use
5135         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
5137 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
5138             Sebastian Pop  <sebastian.pop@amd.com>
5140         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
5141         * sese.c (sese_build_liveouts_use): Renamed from
5142         sese_build_livein_liveouts_use. Remove liveins.
5143         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
5144         Call sese_build_liveouts_use.
5145         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
5146         Call sese_build_liveouts_bb.
5147         (new_sese, free_sese): Remove liveins.
5148         (sese_add_exit_phis_var): Deleted.
5149         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
5150         directly.
5151         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
5153         * sese.h (sese): Remove num_ver and livein.
5154         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
5156 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
5158         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
5160 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
5162         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
5163         (build_scop_scattering): Do not use compare_prefix_loops any more.
5164         (nb_common_loops): New.
5166 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5168         * sese.c (get_new_name_from_old_name): Renamed get_rename.
5169         (register_old_and_new_names): Renamed set_rename.
5171 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5173         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
5174         of the decl from the previous commit.
5176 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5178         * graphite-scop-detection.c (dot_scop): New.
5179         * graphite-scop-detection.h (dot_scop): Declared.
5181 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5183         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
5185 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5187         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
5188         condition at the end of the loop.
5189         * graphite.c (graphite_initialize, graphite_finalize): Print to
5190         dump_file the compiled function.
5191         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
5192         of create_empty_loop_on_edge.
5193         (translate_clast): Update the code generation of loops for the new
5194         shape of loops.
5195         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
5197 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5199         Reverted the patch from 2009-03-19.
5201 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
5203         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5204         poly_drs vector.
5205         (print_scop): Style.
5206         * graphite-poly.h (poly_bb): Add drs vector.
5207         (PBB_DRS): Add accessor.
5208         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
5209         (build_access_matrix_with_af, build_access_matrix,
5210         build_scop_data_accesses): Delete.
5211         (build_poly_dr): New.
5212         (build_pbb_drs, build_scop_drs): New.
5213         (build_poly_scop): call build_scop_drs.
5215 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
5217         * graphite-scop-detection.c (dot_all_scops_1): Close the table
5218         once per basic block.
5220 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
5222         * graphite-scop-detection.c (graphite_can_represent_scev): New.
5223         (graphite_can_represent_expr): Renamed from loop_affine_expr
5224         and enhanced.
5225         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
5226         (graphite_cannot_represent_loop): Add scop_entry to parameters.
5227         (scopdet_basic_block_info): Actually define entry_block.
5228         (stmt_simple_memref_p): Moved here from ...
5230         * tree-data-ref.c (stmt_simple_memref_p): here.
5231         * tree-data-ref.h (stmt_simple_memref_p): Removed.
5233 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
5235         * gcc.dg/graphite/id-4.c: New.
5237 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
5239         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5240         (register_old_and_new_names): Update the content of the map.
5241         When there was already a rename_map_elt in the map at that
5242         location, free it.
5243         (copy_bb_and_scalar_dependences): Do rename_variables after
5244         expand_scalar_variables.
5245         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5246         of the map.  When there was already a rename_map_elt in the
5247         map at that location, free it.
5248         (translate_clast): Pass the rename_map.  Do not initialize and free
5249         a rename_map per stmt_user.
5250         (gloog): Initialize and free one rename_map and pass it to
5251         translate_clast.
5253 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
5255         * sese.c (expand_scalar_variables_stmt,
5256         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5257         parameter.
5258         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5259         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5260         the gimple_stmt_iterator of the statement to be expanded.
5261         * graphite-scop-detection.c (is_simple_operand): Do handle
5262         REALPART_EXPR.
5264 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5266         * graphite-scop-detection.c (is_simple_operand): Do not handle
5267         REALPART_EXPR.
5268         * gcc.dg/graphite/id-2.c: New.
5270         * graphite-sese-to-poly.c (build_bb_loops,
5271         add_value_to_dim, scan_tree_for_params_right_scev,
5272         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5273         find_params_in_bb, build_loop_iteration_domains,
5274         add_conditions_to_domain): Remove subtract.
5276 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5278         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5279         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5280         pbb_loop_at_index -> gbb_loop_at_index.
5281         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5282         (debug_loop_vec): Delete.
5283         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5284         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
5285         (PBB_LOOPS): Removed.
5286         (PBB_BLACK_BOX): Insert cast.
5287         (pbb_set_black_box): New setter.
5288         (pbb_loop_at_index, pbb_loop_index): Removed.
5289         (scop_set_region, scop_set_nb_params): New.
5290         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5291         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5292         (build_poly_scop): Use scop_set_nb_params.
5293         * sese.h (gimple_bb): Add LOOPS.
5294         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5296 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5298         Revert previous commit.
5300 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5302         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5303         (register_old_and_new_names): Update the content of the map.
5304         When there was already a rename_map_elt in the map at that
5305         location, free it.
5306         (copy_bb_and_scalar_dependences): Do rename_variables after
5307         expand_scalar_variables.
5308         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5309         of the map.  When there was already a rename_map_elt in the
5310         map at that location, free it.
5311         (translate_clast): Pass the rename_map.  Do not initialize and free
5312         a rename_map per stmt_user.
5313         (gloog): Initialize and free one rename_map and pass it to
5314         translate_clast.
5316 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5318         Remove forgotten line in revert.
5320 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5322         Revert previous commit.
5324 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5326         * sese.c (register_old_and_new_names): Update the content
5327         of the map.  When there was already a rename_map_elt in the
5328         map at that location, free it.
5329         (copy_bb_and_scalar_dependences): Do rename_variables after
5330         expand_scalar_variables.
5331         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5332         of the map.  When there was already a rename_map_elt in the
5333         map at that location, free it.
5334         (translate_clast): Pass the rename_map.  Do not initialize and free
5335         a rename_map per stmt_user.
5336         (gloog): Initialize and free one rename_map and pass it to
5337         translate_clast.
5339 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5341         * graphite-clast-to-gimple.c (translate_clast): context_loop
5342         is never NULL.
5344 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5345             Sebastian Pop  <sebastian.pop@amd.com>
5347         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5348         of the use of ppl_Polyhedron_map_space_dimensions.
5350 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5351             Sebastian Pop  <sebastian.pop@amd.com>
5353         * graphite-poly.c (unify_scattering_dimensions): Fix types.
5354         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5355         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5356         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5357         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5358         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5359         pbb_nb_params): New.
5360         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5361         nb_loops_around_pbb): Adapt return types.
5363 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5365         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5366         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5367         graphite-scop-detection.o, graphite-poly.o): Add
5368         more headers.
5370 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5372         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5373         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5374         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5376 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5378         * gcc.dg/graphite/pr37485.c: Remove -floop-block
5379         * gcc.dg/graphite/pr37828.c: Same.
5380         * gcc.dg/graphite/pr37684.c: Same.
5381         * gcc.dg/graphite/block-0.c: Same.
5382         * gcc.dg/graphite/block-1.c: Same.
5383         * gcc.dg/graphite/block-2.c: Same.
5384         * gcc.dg/graphite/block-3.c: Same.
5385         * gcc.dg/graphite/block-4.c: Same.
5386         * gcc.dg/graphite/block-5.c: Same.
5387         * gcc.dg/graphite/block-6.c: Same.
5388         * gfortran.dg/graphite/pr38083.f90: Same.
5389         * gfortran.dg/graphite/block-1.f90: Same.
5390         * gfortran.dg/graphite/block-3.f90: Same.
5391         * gfortran.dg/graphite/pr37852.f90: Same.
5392         * gfortran.dg/graphite/block-4.f90: Same.
5393         * gfortran.dg/graphite/pr37980.f90: Same.
5394         * gfortran.dg/graphite/pr38953.f90: Same.
5395         * gfortran.dg/graphite/pr37857.f90: Same.
5396         * opts.c: Remove -floop-block from -O2.
5397         * graphite-poly.c: Fail if -floop-block -floop-interchange or
5398         -floop-strip-mine are used.
5400 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5401             Sebastian Pop  <sebastian.pop@amd.com>
5403         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5404         dimensions.
5405         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5406         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5407         strip_mine_profitable_p, is_interchange_valid,
5408         graphite_trans_bb_block, graphite_trans_loop_block,
5409         graphite_trans_scop_block): Temporary removed.
5410         (extend_scattering, unify_scattering_dimensions): New.
5411         (print_scattering_function, graphite_read_transforms):
5412         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5413         (graphite_generate_scattering_fns): Removed.
5414         (apply_poly_transforms): Cleanup.
5415         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5416         (schedule_to_scattering): Moved.
5417         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5418         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5419         (pbb_nb_scattering): New.
5420         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5421         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5422         Removed.
5423         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5424         shift_poly.
5425         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5426         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
5427         -> PBB_TRANSFORMED_SCATTERING.
5428         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5429         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5430         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5431         (check_poly_representation): Do not return bool.
5432         (graphite_transform_loops): Reformat.
5433         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5435 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
5437         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5438         debug_pbb_domain, debug_pbb, debug_scop): New.
5439         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5440         debug_pbb_domain, debug_pbb, debug_scop): Declared.
5442 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5444         PR middle-end/39335
5445         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5446         when the type precision of the induction variable should be
5447         larger than the type precision of nit.
5448         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5449         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5450         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5452         * gcc.dg/graphite/pr39335_1.c: New.
5453         * gcc.dg/graphite/pr39335.c: New.
5455 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5457         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5458         SSA_NAMES not struct reduction_info.
5460 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5462         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5464 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5465             Tobias Grosser  <grosser@fim.uni-passau.de>
5467         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5468         (free_sese): Free SESE_REDUCTION_LIST.
5469         * sese.h (struct sese): Add field reduction_list.
5470         (SESE_REDUCTION_LIST): New.
5471         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5472         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5474 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5475             Tobias Grosser  <grosser@fim.uni-passau.de>
5477         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5478         of loop_p.
5480 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5481             Tobias Grosser  <grosser@fim.uni-passau.de>
5483         * tree-parloops.c (struct brli, build_reduction_list_info,
5484         analyze_reduction_list, gather_scalar_reductions): New.
5485         (loop_parallel_p): Build a reduction list containing only
5486         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5487         (gen_parallel_loop): Call the analysis analyze_reduction_list.
5488         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5489         * tree-flow.h (gather_scalar_reductions): Declared.
5491 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
5493         PR middle-end/39308
5494         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5495         number_of_iterations_exit from a gcc_assert.
5497 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
5498             Jan Sjodin  <jan.sjodin@amd.com>
5500         * output.h (graphite_out_file, graphite_in_file): Declared.
5501         * toplev.c (graphite_out_file, graphite_in_file): New.
5502         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5503         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5504         Don't call schedule_to_scattering.
5505         * common.opt (fgraphite-write, fgraphite-read): New.
5506         * graphite-poly.c: Include output.h.
5507         (print_scattering_function, print_scattering_functions,
5508         debug_scattering_function, debug_scattering_functions,
5509         graphite_write_transforms, graphite_read_transforms,
5510         graphite_generate_scattering_fns): New.
5511         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5512         Call graphite_generate_scattering_fns, graphite_write_transforms,
5513         graphite_read_transforms.
5514         (new_poly_bb): Initialize PBB_SCATTERING.
5515         (free_poly_bb): Free PBB_SCATTERING.
5516         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5517         * graphite-poly.h (struct poly_bb): Add field scattering.
5518         (PBB_SCATTERING): New.
5519         (print_scattering_function, print_scattering_functions,
5520         debug_scattering_function, debug_scattering_functions): Declared.
5521         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5522         GMP values, not integers!
5523         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5524         ppl_read_polyhedron_matrix): New.
5525         * graphite-ppl.h (ppl_print_polyhedron_matrix,
5526         debug_ppl_polyhedron_matrix,
5527         ppl_read_polyhedron_matrix): Declared.
5528         * Makefile.in (graphite-poly.o): Depends on output.h.
5530 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5531             Tobias Grosser  <grosser@fim.uni-passau.de>
5533         Revert this change:
5534         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5535         scalar evolutions in the scop_entry->loop_father.
5537 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5538             Tobias Grosser  <grosser@fim.uni-passau.de>
5540         * graphite.h (ref_nb_loops): Remove declaration.
5541         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5542         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5543         debug_gbb): Moved to sese.h.
5544         * sese.h: As said.
5546 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5547             Tobias Grosser  <grosser@fim.uni-passau.de>
5549         * graphite-data-ref.[ch]: Disable.
5551 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5552             Tobias Grosser  <grosser@fim.uni-passau.de>
5554         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5555         scalar evolutions in the scop_entry->loop_father.
5557 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5559         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5560         (graphite_cannot_represent_loop_niter): Renamed
5561         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
5562         (limit_scops): build_sese_loop_nests does not return a bool.
5563         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5564         * sese.c (nb_reductions_in_loop): ... from here.
5565         (graphite_loop_normal_form): ... from here.
5566         (sese_record_loop): Does not fail, so does not return a bool.
5567         (build_sese_loop_nests): Same.
5568         * sese.h (build_sese_loop_nests): Update declaration.
5569         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5570         (build_graphite_loop_normal_form): New.
5571         (gloog): Call build_graphite_loop_normal_form.
5572         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5573         build_sese_loop_nests.
5575         * gcc.dg/graphite/id-1.c: New.
5577 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5578             Tobias Grosser  <grosser@fim.uni-passau.de>
5580         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5581         The SCoP detection fix is sufficient.
5583 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5585         PR tree-optimization/39260
5586         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5587         the basic block contains a condition with a real type.
5588         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5590         * gcc.dg/graphite/pr39260.c: New.
5592 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5594         * graphite-poly.c: Inlcude params.h.
5595         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5596         the size of a tile.
5597         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5598         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5600 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5601             Tobias Grosser  <grosser@fim.uni-passau.de>
5603         * graphite-scop-detection.c (dot_all_scops_1,
5604         dot_all_scops): Moved here.
5605         * graphite-scop-detection.h (dot_all_scops): Declared here.
5606         * graphite.c (graphite_initialize, graphite_finalize): New.
5607         (graphite_transform_loops): Cleaned up.
5608         * sese.c (debug_oldivs): Moved here.
5609         * graphite-poly.c (graphite_apply_transformations): Renamed
5610         apply_poly_transforms.
5611         (debug_loop_vec): Moved here.
5612         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5613         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5614         find_scop_parameters, build_scop_iteration_domain,
5615         add_conditions_to_constraints, build_scop_canonical_schedules,
5616         build_scop_data_accesses): Now static.
5617         (build_poly_scop, check_poly_representation): New.
5619 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5621         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5622         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5623         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5624         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5625         scan_tree_for_params_right_scev, scan_tree_for_params_int,
5626         scan_tree_for_params, struct irp_data, dx_record_params,
5627         find_params_in_bb, find_scop_parameters, gbb_from_bb,
5628         build_loop_iteration_domains, add_conditions_to_domain,
5629         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5630         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5631         build_sese_conditions, add_conditions_to_constraints,
5632         build_scop_iteration_domain, build_access_matrix_with_af,
5633         build_access_matrix,
5634         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5636         * graphite-sese-to-poly.c: New.
5637         * graphite-sese-to-poly.h: New.
5639         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5641 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5643         * graphite.c: Split graphite code generation to a new file.
5644         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5645         max_precision_type, clast_to_gcc_expression_red,
5646         clast_to_gcc_expression, gcc_type_for_clast_expr,
5647         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5648         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5649         graphite_create_new_guard, clast_get_body_of_loop,
5650         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5651         graphite_create_new_loop, build_iv_mapping, copy_renames,
5652         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5653         compute_cloog_iv_types, free_scattering, save_var_name,
5654         initialize_cloog_names, build_scop_context, build_cloog_prog,
5655         set_cloog_options, debug_clast_stmt, scop_to_clast,
5656         print_generated_program, debug_generated_program,
5657         gloog): Moved to graphite-clast-to-gimple.c.
5659         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5661         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5662         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5663         loop_iv_stack_pop, loop_iv_stack_get_iv,
5664         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5665         free_loop_iv_stack, loop_iv_stack_remove_constants,
5666         debug_rename_elt, debug_rename_map_1, debug_rename_map,
5667         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5668         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5669         eq_ivtype_map_elts, sese_add_exit_phis_edge,
5670         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5671         get_vdef_before_sese, sese_adjust_vphi,
5672         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5673         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5674         is_iv, expand_scalar_variables_ssa_name,
5675         expand_scalar_variables_expr, expand_scalar_variables_stmt,
5676         expand_scalar_variables, rename_variables, remove_condition,
5677         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5678         add_loop_exit_phis, insert_loop_close_phis, struct igp,
5679         default_liveout_before_guard, add_guard_exit_phis,
5680         insert_guard_phis, register_old_and_new_names,
5681         graphite_copy_stmts_from_block, register_sese_liveout_renames,
5682         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5683         if_region_set_false_region, create_if_region_on_edge,
5684         move_sese_in_condition): Moved to sese.c.
5686         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5687         if_region_exit, if_region_get_condition_block,
5688         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5689         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5690         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5691         ivtype_map_elt, new_ivtype_map_elt,
5692         recompute_all_dominators): Moved to sese.h.
5694         * graphite-clast-to-gimple.c: New.
5695         * graphite-clast-to-gimple.h: New.
5696         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5697         * sese.c: Modified as said above.
5698         * sese.h: Same.
5700 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5702         * graphite.c: Split scop detection to a new file.
5703         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5704         move_sd_regions, loop_affine_expr, exclude_component_ref,
5705         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5706         graphite_cannot_represent_loop_niter, struct scopdet_info,
5707         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5708         find_single_entry_edge, find_single_exit_edge,
5709         create_single_entry_edge, sd_region_without_exit,
5710         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5711         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5712         Moved to graphite-scop-detection.c.
5714         * graphite-scop-detection.c: New.
5715         * graphite-scop-detection.h: New.
5716         * Makefile.in: Add new rule for graphite-scop-detection.o.
5718         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5719         tree-scalar-evolution.h.
5720         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5721         build_sese_loop_nests): Moved here from graphite.c.
5722         (param_index): Renamed parameter_index_in_region.
5724 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
5725             Sebastian Pop  <sebastian.pop@amd.com>
5727         * gcc.dg/graphite/block-0.c: Expected to fail now.
5728         * gcc.dg/graphite/block-1.c: Same.
5729         * gcc.dg/graphite/block-5.c: Same.
5730         * gcc.dg/graphite/block-6.c: Same.
5732 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
5733             Sebastian Pop  <sebastian.pop@amd.com>
5735         * graphite.h: Separate from graphite_bb_p the polyhedral
5736         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5737         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5738         graphite-data-ref.h.
5739         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5740         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5741         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5742         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5743         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5744         scop_nb_params): Moved to graphite-poly.h.
5745         * graphite-data-ref.c: Same.
5746         * graphite-data-ref.h: New.
5747         * graphite.c: Same.
5748         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5749         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5750         is_interchange_valid, graphite_trans_bb_block,
5751         graphite_trans_loop_block, scop_max_loop_depth,
5752         graphite_trans_scop_block, graphite_apply_transformations,
5753         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5754         graphite-poly.c.
5755         * graphite-poly.h: New.
5756         * graphite-poly.c: New.
5757         * Makefile.in (OBJS-common): Add graphite-poly.o.
5758         (graphite-poly.o): New rule.
5759         * tree-data-ref.h (struct data_reference): Remove unused scop field.
5760         (DR_SCOP): Removed.
5762 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
5763             Tobias Grosser  <grosser@fim.uni-passau.de>
5765         * graphite.c: Replace gb -> gbb.
5766         * graphite.h: Same.
5767         * graphite-data-ref.c: Same.
5769 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
5770             Tobias Grosser  <grosser@fim.uni-passau.de>
5772         * Makefile.in (OBJS-commmon): Add sese.o.
5773         (sese.o): New.
5774         (graphite.o): Add sese.h.
5775         * graphite.c (bb_in_ss_p, loop_in_sese_p,
5776         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5777         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5778         Move to sese.
5779         (block_before_scop): Add missing return.
5780         (new_scop, free_scop): Remove SESE data structures.
5781         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5782         find_scop_parameters, build_loop_iteration_domains,
5783         add_conditions_to_domain, register_scop_liveout_renames,
5784         copy_bb_and_scalar_dependences): Scop -> SESE.
5786         (add_conditions_to_domain): SCoP -> SESE and remove check
5787         (scop_contains_non_iv_scalar_phi_nodes): New.
5788         (build_scop_conditions_1, build_scop_conditions): Remove check for
5789         non iv scalar phi nodes.
5790         (print_scop_statistics): New.
5791         (graphite_transform_loops): Cleanup.
5793         * graphite.h: Move to sese & cleanup.
5794         * sese.c: New.
5795         * sese.h: New.
5797 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5798             Tobias Grosser  <grosser@fim.uni-passau.de>
5800         * graphite.c (build_scop_conditions_1): Conditions are only
5801         at the end of a basic block.
5803 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5804             Tobias Grosser  <grosser@fim.uni-passau>
5806         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5807         field.
5808         (GBB_ALPHA): Removed.
5810 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5811             Tobias Grosser  <grosser@fim.uni-passau.de>
5813         * graphite-data-ref.c (graphite_test_dependence): Don't use
5814         GBB_DYNAMIC_SCHEDULE.
5815         * graphite.c (new_graphite_bb): Same.
5816         (free_graphite_bb): Same.
5817         (build_scop_dynamic_schedules): Removed.
5818         (graphite_transform_loops): Don't call it.
5819         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5820         (GBB_DYNAMIC_SCHEDULE): Removed.
5822 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5823             Tobias Grosser  <grosser@fim.uni-passau.de>
5825         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5826         (print_graphite_bb): Same.
5827         (build_cloog_prog): Same.
5829 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5830             Tobias Grosser  <grosser@fim.uni-passau.de>
5832         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5834 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5835             Tobias Grosser  <grosser@fim.uni-passau.de>
5837         * graphite.c (build_scop_context): Don't use CloogMatrix.
5838         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5839         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5841 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5842             Tobias Grosser  <grosser@fim.uni-passau.de>
5844         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5845         liveout_renames, add_params fields...
5846         (struct sese): ... here.
5847         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5848         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5850 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5851             Tobias Grosser  <grosser@fim.uni-passau.de>
5853         * graphite.c (print_scop): Do not print the CLooG program.
5854         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5855         build_cloog_prog, gloog): Don't use SCOP_PROG.
5856         (find_transform): Renamed scop_to_clast.
5857         (print_generated_program, debug_generated_program): New.
5858         (graphite_transform_loops): Adapt to new interface.
5859         * graphite.h (struct scop): Remove program field.
5860         (SCOP_PROG): Removed.
5861         (print_generated_program, debug_generated_program): Declared.
5863 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5865         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5866         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5867         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5868         free_graphite_bb, build_scop_canonical_schedules,
5869         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5870         schedules are now represented using a ppl_Linear_Expression_t.
5871         * graphite.h (struct graphite_bb): Same.
5872         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5873         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5875 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
5877         * graphite.c: Free local memory.
5878         * graphite-ppl.c: Same.
5880 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
5882         * graphite.c (const_column_index, get_first_matching_sign_row_index,
5883         get_lower_bound_row, get_upper_bound_row, copy_constraint,
5884         swap_constraint_variables, scale_constraint_variable): Removed.
5885         (graphite_trans_bb_strip_mine): Remove pong.
5886         * graphite-ppl.c: Include missing header files.
5887         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5888         * graphite-ppl.h (ppl_strip_loop): Declared.
5889         * Makefile.in (graphite-ppl.o): Adjust dependences.
5891 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
5893         * graphite.c (build_loop_iteration_domains): Remove ping pong.
5894         (build_scop_iteration_domain): Same.
5896 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
5898         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5899         ping pong.
5900         (add_value_to_dim, scan_tree_for_params_right_scev,
5901         scan_tree_for_params_int): New.
5902         * graphite-ppl.c (oppose_constraint): New.
5903         (insert_constraint_into_matrix): Implement missing cases.
5904         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5906 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
5908         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5909         use ppl_move_dimension.
5911 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
5913         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5914         * graphite.c: Same.
5915         * graphite.h: Same.
5916         * graphite-ppl.c: Same.
5917         * graphite-ppl.h: Same.
5919 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
5921         Revert last 3 commits.
5923 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5925         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5926         ping pong.
5927         (add_value_to_dim, scan_tree_for_params_right_scev,
5928         scan_tree_for_params_int): New.
5929         * graphite-ppl.c (oppose_constraint): New.
5930         (insert_constraint_into_matrix): Implement missing cases.
5931         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5933 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5935         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5937 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5938             Tobias Grosser  <grosser@fim.uni-passau.de>
5940         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5941         use ppl_move_dimension.
5942         * graphite-ppl.c (ppl_move_dimension): New.
5943         * graphite-ppl.h (ppl_move_dimension): Declared.
5945 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5947         * graphite.c: Do not include cloog/cloog.h.
5948         (print_graphite_bb): Remove ping pong, call PPL print function.
5950 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5952         * Makefile.in (OBJS-common): Add graphite-ppl.o.
5953         (graphite.o): Add dependence on graphite-ppl.h.
5954         (graphite-ppl.o): New.
5955         (graphite-data-ref.c): Ping pong between PPL data structures
5956         and matrices.
5957         * graphite-ppl.c: New.
5958         * graphite-ppl.h: New.
5959         * graphite.c: Include graphite-ppl.h.
5960         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5961         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5962         Ping pong between PPL data structures and matrices.
5963         (new_graphite_bb): Create a PPL constraint system.
5964         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5965         (build_loop_iteration_domains): Use PPL functions.
5966         * graphite.h: Include graphite-ppl.h.  Fix comments.
5967         (graphite_bb): Use a ppl_Constraint_System_t instead of
5968         CloogMatrix for representing the domain.
5969         (scop): Remove static_schedule.
5970         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5972 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
5974         * graphite.c: Fix some comments.
5976 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
5978         PR middle-end/38953
5979         * graphite.c (if_region_set_false_region): After moving a region
5980         in the false branch of a condition, remove the empty dummy
5981         basic block.
5982         (gloog): Remove wrong fix for PR38953.
5984 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5986         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5987         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5988         register_bb_in_sese, new_sese, free_sese): Moved.
5989         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5990         outermost_loop_in_scop, build_scop_iteration_domain,
5991         expand_scalar_variables_ssa_name, get_vdef_before_scop,
5992         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5993         Use loop_in_sese_p instead of loop_in_scop_p.
5994         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5995         (free_scop): Do not free SCOP_BBS_B.
5996         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5997         ref_nb_loops): Moved here...
5998         * graphite.h (ref_nb_loops): ... from here.
5999         (struct scop): Remove bbs_b bitmap.
6000         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
6001         * gcc.dg/graphite/scop-19.c: New
6003 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
6005         * graphite.c (scopdet_basic_block_info): Fix bug in scop
6006         detection.
6008 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
6010         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6011         eq_loop_to_cloog_loop): Remove.
6012         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
6013         * graphite.h (struct scop): Remove loop2cloog_loop.
6014         (loop_domain_dim, loop_iteration_vector_dim): Remove.
6016 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
6018         * opts.c (decode_options): Only add graphite options to O2
6019         if we compile with graphite enabled.
6021 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
6023         * Merge from mainline (r143163:143684).
6025 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
6027         * graphite.c (debug_value): Removed.
6028         * graphite.h (debug_value): Removed.
6030 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
6032         * passes.c (init_optimization_passes): Do not call pass_copy_prop
6033         after graphite: pass_copy_prop does not maintain a proper loop closed
6034         SSA form.  pass_copy_prop should be fixed.
6036 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
6038         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
6040 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
6042         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
6043         (gloog): Split the exit of the scop when the scop exit is a loop exit.
6044         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
6045         changed the CFG.
6047 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
6049         * graphite.c (gloog): Return true when code gen succeeded.
6050         (graphite_transform_loops): Do not call cleanup_tree_cfg if
6051         the code of the function did not changed.  After cleanup_tree_cfg
6052         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
6053         form.
6055 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
6057         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
6058         gimple_call_lhs is NULL.
6060 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
6061             Tobias Grosser  <tobi.grosser@amd.com>
6063         * graphite.c (graphite_trans_scop_block): Do not block single
6064         nested loops.
6066 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
6067             Tobias Grosser  <tobi.grosser@amd.com>
6069         * graphite.c (build_scop_canonical_schedules): Start schedules at
6070         zero.
6072 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
6073             Tobias Grosser  <tobi.grosser@amd.com>
6075         * graphite.c (compare_prefix_loops): New.
6076         (build_scop_canonical_schedules): Rewritten.
6077         (graphite_transform_loops): Move build_scop_canonical_schedules
6078         after build_scop_iteration_domain.
6080 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
6081             Tobias Grosser  <tobi.grosser@amd.com>
6083         * graphite.c (add_conditions_to_domain): Add the loops to
6084         the dimension of the iteration domain.  Do copy the domain
6085         only when it exists.
6086         (build_scop_conditions_1): Do not call add_conditions_to_domain.
6087         (add_conditions_to_constraints): New.
6088         (can_generate_code_stmt, can_generate_code): Removed.
6089         (gloog): Do not call can_generate_code.
6090         (graphite_transform_loops): Call add_conditions_to_constraints
6091         after building the iteration domain.
6093 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
6094             Tobias Grosser  <tobi.grosser@amd.com>
6095             Jan Sjodin  <jan.sjodin@amd.com>
6097         * graphite.c (scan_tree_for_params): On substractions negate
6098         all the coefficients of the term.
6099         (clast_to_gcc_expression_red): New.  Handle reduction expressions
6100         of more than two operands.
6101         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
6102         (get_vdef_before_scop): Handle also the case of default definitions.
6104 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
6106         PR middle-end/38431
6107         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
6108         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
6109         (gloog): Do not call cleanup_tree_cfg.
6110         (graphite_transform_loops): Call cleanup_tree_cfg after all
6111         scops have been code generated.
6113 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
6115         * passes.c (init_optimization_passes): Schedule after
6116         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
6118 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
6120         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
6121         Fix comment.
6122         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
6123         Set the type of an expression to the type of its assign statement.
6124         (expand_scalar_variables_expr):  Do not pass loop_p.
6125         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
6126         (copy_bb_and_scalar_dependences): Do not pass loop_p.
6127         (translate_clast): Update call to copy_bb_and_scalar_dependences.
6129 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
6131         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
6132         an expression to the gimple_expr_type of its assign statement.
6133         (expand_scalar_variables_expr): Stop recursion on tcc_constant
6134         or tcc_declaration.
6136 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
6138         PR tree-optimization/38786
6139         * gcc.dg/graphite/pr38786.c: New.
6140         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
6141         the SSA_NAME case of expand_scalar_variables_expr.
6142         (expand_scalar_variables_expr): Also gather the scalar computation
6143         used to index the memory access.
6144         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
6145         the gimple_stmt_iterator where it inserts new code.
6147 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
6149         * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
6151 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
6153         * opts.c (decode_options): Enable flag_graphite_identity and
6154         flag_loop_block in -O2 and above.
6156 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
6158         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
6159         Fix merge problem: replace with the file from trunk.
6161 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
6163         * Merge from mainline (r141727:143163).
6165 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
6166             Jan Sjodin  <jan.sjodin@amd.com>
6168         PR tree-optimization/38559
6169         * gcc.dg/graphite/pr38559.c: New.
6171         * graphite.c (debug_value, copy_constraint,
6172         swap_constraint_variables, scale_constraint_variable, ): New.
6173         (get_lower_bound, get_upper_bound): Removed.
6174         (graphite_trans_bb_strip_mine): Clean up this code that works
6175         only for constant number of iterations.  Fully copy upper and
6176         lower bound constraints, not only the constant part of them.
6177         * graphite.h (debug_value): Declared.
6179 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
6181         PR tree-optimization/38492
6182         PR tree-optimization/38498
6183         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
6184         * tree-chrec.h (scev_is_linear_expression): Declared.
6185         * graphite.c (graphite_cannot_represent_loop_niter): New.
6186         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
6187         (graphite_loop_normal_form): Use gcc_assert.
6188         (scan_tree_for_params): Use CASE_CONVERT.
6189         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
6190         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
6191         Use gcc_assert.  Discard scops that contain unhandled cases.
6192         (build_scop_conditions): Return a boolean status for unhandled cases.
6193         (strip_mine_profitable_p): Print the loop number, not its depth.
6194         (is_interchange_valid): Pass the depth of the loop nest, don't
6195         recompute it wrongly.
6196         (graphite_trans_bb_block): Same.
6197         (graphite_trans_bb_block): Print tentative of loop blocking.
6198         (graphite_trans_scop_block): Do not print that the loop has been
6199         blocked.
6200         (graphite_transform_loops): Do not handle scops that contain condition
6201         scalar phi nodes.
6203         * gcc.dg/graphite/pr38500.c: Fixed warning as committed
6204         in trunk.
6205         * gcc.dg/graphite/block-0.c: Update test.
6206         * gcc.dg/graphite/block-1.c: Same.
6207         * gcc.dg/graphite/block-2.c: Remove xfail and test for
6208         blocking.
6209         * gcc.dg/graphite/block-4.c: Remove test for strip mine.
6210         * gcc.dg/graphite/block-3.c: New.
6211         * gcc.dg/graphite/pr38498.c: New.
6213 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
6215         PR tree-optimization/38510
6216         * gcc.dg/graphite/pr38510.c: New.
6217         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
6218           (translate_clast): Call recompute_all_dominators before
6219           graphite_verify.
6220           (gloog): Call recompute_all_dominators before graphite_verify.
6222 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
6224         PR tree-optimization/38492
6225         * graphite.c (rename_map_elt, debug_rename_elt,
6226         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
6227         rename_map_elt_info, eq_rename_map_elts,
6228         get_new_name_from_old_name, bb_in_sese_p): Moved around.
6229         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
6230         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
6231         (sese_build_livein_liveouts): New.
6232         (new_sese, free_sese): New.
6233         (new_scop): Call new_sese.
6234         (free_scop): Call free_sese.
6235         (rename_variables_from_edge, rename_phis_end_scop): Removed.
6236         (register_old_new_names): Renamed register_old_and_new_names.
6237         (register_scop_liveout_renames, add_loop_exit_phis,
6238         insert_loop_close_phis, struct igp,
6239         default_liveout_before_guard, add_guard_exit_phis,
6240         insert_guard_phis, copy_renames): New.
6241         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
6242         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
6243         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
6244         (scop_adjust_phis_for_liveouts): New.
6245         (gloog): Call scop_adjust_phis_for_liveouts.
6247         * graphite.h (struct sese): Documented.  Added fields liveout,
6248         num_ver and livein.
6249         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
6250         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
6251         (struct scop): Added field liveout_renames.
6252         (SCOP_LIVEOUT_RENAMES): New.
6254 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6256         PR tree-optimization/38409
6257         * gcc.dg/graphite/pr38409.c: New.
6258         * graphite.c (nb_reductions_in_loop): Use simple_iv.
6260 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6262         * graphite.c (gcc_type_for_cloog_iv): By default return
6263         integer_type_node.
6264         (graphite_create_new_loop): Don't fold_convert the already
6265         fold_convert-ed expression.
6267 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
6269         PR tree-optimization/38446
6270         * gcc.dg/graphite/pr38446.c: New.
6271         * graphite.c (register_bb_in_sese): New.
6272         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6273         looking at the bbs in the region.
6274         * graphite.h (sese): Add region_basic_blocks pointer set to
6275         structure and initialize at the time of defining new scop.
6277 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6279         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6280         (find_params_in_bb): Do not free data refs.
6281         (free_graphite_bb): Add FIXME on disabled free_data_refs.
6283 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6285         * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6286         * gcc.dg/graphite/scop-17.c: Same.
6287         * gcc.dg/graphite/block-5.c: New.
6288         * gcc.dg/graphite/block-6.c: New.
6289         * gcc.dg/graphite/pr37485.c: Clean dump file after.
6290         * gcc.dg/graphite/pr37684.c: Same.
6291         * gcc.dg/graphite/block-2.c: Same.
6293         * graphite.c (struct ivtype_map_elt): New.
6294         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6295         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6296         gcc_type_for_cloog_iv): New.
6297         (loop_iv_stack_patch_for_consts): Use the type of the induction
6298         variable from the original loop, except for the automatically
6299         generated loops, i.e., in the case of a strip-mined loop, in
6300         which case there is no original loop: in that case just use
6301         integer_type_node.
6302         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6303         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6304         (clast_name_to_gcc): Accept params to be NULL.
6305         (clast_to_gcc_expression): Take an extra parameter for the type.
6306         Convert to that type all the expressions built by this function.
6307         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6308         (graphite_translate_clast_equation): Compute the type of the
6309         clast_equation before translating its LHS and RHS.
6310         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6311         (graphite_create_new_loop): Compute the type of the induction
6312         variable before translating the lower and upper bounds and before
6313         creating the induction variable.
6314         (rename_variables_from_edge, rename_phis_end_scop): New.
6315         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6316         (sese_add_exit_phis_edge): Do not use integer_zero_node.
6317         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6318         compute_cloog_iv_types): New.
6319         (gloog): Call compute_cloog_iv_types before starting the
6320         translation of the clast.
6322         * graphite.h (struct graphite_bb): New field cloog_iv_types.
6323         (GBB_CLOOG_IV_TYPES): New.
6324         (debug_ivtype_map): Declared.
6325         (oldiv_for_loop): New.
6327 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
6329         PR middle-end/38459
6330         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6331         (param_index): Assert if parameter is not know after parameter
6332         detection.
6333         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6334         (find_scop_parameters): Mark, that we have finished parameter
6335         detection.
6336         (graphite_transform_loops): Move condition detection before parameter
6337         detection.
6338         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6339         * gfortran.dg/graphite/pr38459.f90: New.
6341 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6343         * graphite.c (graphite_transform_loops): Always call find_transform ()
6344         in ENABLE_CHECKING.  So we test these code paths, even if we do not
6345         generate code.
6347 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6349         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6350         (print_scop): Ditto.
6352 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6354         PR middle-end/38084
6355         Fix gfortran.dg/graphite/id-3.f90.
6356         * graphite.c (scopdet_basic_block_info): Fix bug that found some
6357         regions more than once.
6359 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6361         Fix gfortran.dg/graphite/id-4.f90.
6362         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6363         when not needed.
6365 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6367         Fix gfortran.dg/graphite/id-1.f90.
6368         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6369         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6370         (max_precision_type): New.
6371         (value_clast): Removed.
6372         (clast_to_gcc_expression): Be more careful to types of expressions.
6373         Use max_precision_type and update use of gmp_cst_to_tree.
6374         (graphite_translate_clast_equation): Use max_precision_type.
6375         (graphite_create_guard_cond_expr): Do not use integer_type_node,
6376         use the type of the condition.
6377         (graphite_create_new_loop): Do not use integer_type_node, use the
6378         max_precision_type of lb and ub.
6380 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6382         * graphite.c (build_scops_1): Initialize open_scop.exit
6383         and sinfo.last.
6385 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6387         * gcc.dg/graphite/pr38084.c: New.
6388         * gfortran.dg/graphite/id-1.f90: New.
6389         * gfortran.dg/graphite/id-2.f90: New.
6390         * gfortran.dg/graphite/id-3.f90: New.
6391         * gfortran.dg/graphite/id-4.f90: New.
6392         * gfortran.dg/graphite/pr37857.f90: New.
6394 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6395             Jan Sjodin  <jan.sjodin@amd.com>
6396             Harsha Jagasia  <harsha.jagasia@amd.com>
6398         PR middle-end/37852
6399         PR middle-end/37883
6400         PR middle-end/37928
6401         PR middle-end/37980
6402         PR middle-end/38038
6403         PR middle-end/38039
6404         PR middle-end/38073
6405         PR middle-end/38083
6406         PR middle-end/38125
6408         * gcc.dg/graphite/pr38073.c: New.
6409         * gcc.dg/graphite/pr37928.c: New.
6410         * gcc.dg/graphite/pr37883.c: New.
6411         * gcc.dg/graphite/pr38125.c: New.
6412         * gfortran.dg/graphite/pr38083.f90: New.
6413         * gfortran.dg/graphite/pr37852.f90: New.
6414         * gfortran.dg/graphite/pr37980.f90: New.
6416         * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6417         the number of detected scops.  Copy exact same test for loop
6418         blocking...
6419         * gcc.dg/graphite/block-1.c: Fix the number of expected
6420         loops to be blocked as reductions are not handled.
6421         * gcc.dg/graphite/block-4.c: ...here.  New.
6423         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6424         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6425         ...here.
6426         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6427         * Makefile.in (graphite.o): Depend on value-prof.h.
6428         (graphite.o-warn): Removed -Wno-error.
6429         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6430         to be a NULL pointer.  Call update_stmt.  Return the newly created
6431         cannonical induction variable.
6433         * graphite.h (debug_rename_map): Declared.  Fix some comments.
6435         * graphite.c: Reimplement the code generation from graphite to gimple.
6436         Include value-prof.h.
6437         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6438         (get_old_iv_from_ssa_name): Removed.
6439         (graphite_stmt_p): New.
6440         (new_graphite_bb): Test for useful statements before building a
6441         graphite statement for the basic block.
6442         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6443         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6444         reason.
6445         (recompute_all_dominators, graphite_verify,
6446         nb_reductions_in_loop, graphite_loop_normal_form): New.
6447         (scop_record_loop): Call graphite_loop_normal_form.
6448         (build_scop_loop_nests): Iterate over all the blocks of the
6449         function instead of relying on the incomplete information from
6450         SCOP_BBS.  Return the success of the operation.
6451         (find_params_in_bb): Use the data from GBB_DATA_REFS.
6452         (add_bb_domains): Removed.
6453         (build_loop_iteration_domains): Don't call add_bb_domains.
6454         Add the iteration domain only to the basic blocks that have been
6455         translated to graphite.
6456         (build_scop_conditions_1): Add constraints only if the basic
6457         block have been translated to graphite.
6458         (build_scop_data_accesses): Completely disabled until data
6459         dependence is correctly implemented.
6460         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6461         (remove_all_edges_1, remove_all_edges): Removed.
6462         (get_new_name_from_old_name): New.
6463         (graphite_rename_variables_in_stmt): Renamed
6464         rename_variables_in_stmt.  Call get_new_name_from_old_name.
6465         Use replace_exp and update_stmt.
6466         (is_old_iv): Renamed is_iv.
6467         (expand_scalar_variables_stmt): Extra parameter for renaming map.
6468         Use replace_exp and update_stmt.
6469         (expand_scalar_variables_expr): Same.  Use the map to get the
6470         new names for the renaming of induction variables and for the
6471         renaming of variables after a basic block has been copied.
6472         (expand_scalar_variables): Same.
6473         (graphite_rename_variables): Renamed rename_variables.
6474         (move_phi_nodes): Removed.
6475         (get_false_edge_from_guard_bb): New.
6476         (build_iv_mapping): Do not insert the induction variable of a
6477         loop in the renaming iv map if the basic block does not belong
6478         to that loop.
6479         (register_old_new_names, graphite_copy_stmts_from_block,
6480         copy_bb_and_scalar_dependences): New.
6481         (translate_clast): Heavily reimplemented: copy basic blocks,
6482         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
6483         At each translation step call graphite_verify ensuring the
6484         consistency of the SSA, loops and dominators information.
6485         (collect_virtual_phis, find_vdef_for_var_in_bb,
6486         find_vdef_for_var_1, find_vdef_for_var,
6487         patch_phis_for_virtual_defs): Removed huge hack.
6488         (mark_old_loops, remove_dead_loops, skip_phi_defs,
6489         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6490         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6491         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6492         if_region_get_condition_block, if_region_set_false_region,
6493         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6494         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6495         sese_add_exit_phis_edge, sese_add_exit_phis_var,
6496         rewrite_into_sese_closed_ssa): New.
6497         (gloog): Remove dead code.  Early return if code cannot be
6498         generated.  Call cleanup_tree_cfg once the scop has been code
6499         generated.
6500         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6501         block loops with less than two loops.
6502         (graphite_apply_transformations): Remove the call to
6503         scop_remove_ignoreable_gbbs.
6504         (limit_scops): When build_scop_loop_nests fails, continue on
6505         the next scop.  Fix open_scop.entry.
6506         (graphite_transform_loops): Call recompute_all_dominators: force the
6507         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6508         Call initialize_original_copy_tables and free_original_copy_tables
6509         to be able to copy basic blocks during code generation.
6510         When build_scop_loop_nests fails, continue on next scop.
6511         (value_clast): New union.
6512         (clast_to_gcc_expression): Fix type cast warning.
6514 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
6516         * Merge from mainline (r140838:141727).
6518 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6520         PR middle-end/37833
6522         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6524 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6526         PR middle-end/37943
6528         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6529         exits and conditions.
6530         * gcc.dg/graphite/pr37943.c: New.
6532 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6534         PR middle-end/37886
6535         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6537 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6539         * doc/invoke.texi: Fix spaces.
6541 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
6543         PR tree-optimization/37891
6544         Reverted last commit.
6545         * graphite.c (create_single_entry_edge): Set
6546         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6548 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
6549             Mitul Thakkar  <mitul.thakkar@amd.com>
6551         * graphite.c (create_single_entry_edge): Set
6552         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6554 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
6556         * doc/invoke.texi: Add -fgraphite-identity.
6557         * graphite.c (graphite_apply_transformations): Check for
6558         -fgraphite-identity.
6559         * toplev.c (process_options): Add flag_graphite_identity.
6560         * tree-ssa-loop.c: Add flag_graphite_identity.
6562 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6564         Undo changes from 2008-10-02:
6565         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6566         operand type when copying the operand to a variable of different type.
6567         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6568         with the IV name after increment.
6570 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6571             Harsha Jagasia  <harsha.jagasia@amd.com>
6573         PR tree-optimization/37828
6574         * gcc.dg/graphite/pr37828.c: New.
6575         * graphite.c (graphite_trans_loop_block): Do not loop block
6576         single nested loops.
6578 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
6579             Sebastian Pop  <sebastian.pop@amd.com>
6581         * graphite.c (struct rename_map_elt, new_rename_map_elt,
6582         rename_map_elt_info, eq_rename_map_elts): New.
6583         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6584         (expand_scalar_variables_expr): Change parameters.
6585         (expand_scalar_variables_stmt): Same.
6586         (expand_scalar_variables): Same.
6587         (graphite_rename_ivs): Rename graphite_rename_variables.
6588         (build_iv_mapping): New.
6589         (translate_clast): Call build_iv_mapping.
6590         * graphite.h (gbb_p): New name.
6592 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
6594         PR tree-optimization/37684
6595         * gcc.dg/graphite/pr37684.c: New.
6596         * graphite.c (exclude_component_ref): New.
6597         (is_simple_operand): Call exclude_component_ref.
6599 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
6600             Harsha Jagasia  <harsha.jagasia@amd.com>
6602         PR tree-optimization/37485
6603         * gcc.dg/graphite/block-2.c: New
6604         * graphite.c (gmp_cst_to_tree): Moved.
6605         (iv_stack_entry_is_constant): New.
6606         (iv_stack_entry_is_iv): New.
6607         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6608         (loop_iv_stack_insert_constant): New.
6609         (loop_iv_stack_pop): Use new datatpype.
6610         (loop_iv_stack_get_iv): Same.
6611         (loop_iv_stack_get_iv_from_name): Same.
6612         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6613         (loop_iv_stack_patch_for_consts): New.
6614         (loop_iv_stack_remove_constants): New.
6615         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6616         (translate_clast): Call loop_iv_stack_patch_for_consts and
6617         loop_iv_stack_remove_constants.
6618         (gloog): Use new datatype.  Redirect construction edge to end
6619         block to avoid accidental deletion.
6620         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
6621         iv stack entry.
6622         (union iv_stack_entry_data): New.  Data in iv stack entry.
6623         (struct iv_stack_entry): New.  Datatype for iv stack entries.
6625 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6627         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6628         operand type when copying the operand to a variable of different type.
6630 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6632         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6633         with the IV name after increment.
6635 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6637         * Merge from mainline (r140164:140838).
6639 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6641         * graphite-data-ref.c: New.
6642         * graphite.c (print_scop): Also dump the dependence graph.
6643         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6644         (new_scop): Initialize SCOP_DEP_GRAPH.
6645         (build_scop_dynamic_schedules): New.
6646         (build_access_matrix_with_af): Fixed column numbering.
6647         (graphite_transform_loops): Call build_scop_dynamic_schedules.
6648         * graphite.h: Add ifndef/define guards against multiple inclusion.
6649         (struct scop): Add dep_graph field.
6650         (SCOP_DEP_GRAPH): Defined.
6651         (ref_nb_loops): Fixed and moved to other position.
6652         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6653         (nb_loops_around_loop_in_scop): New.
6654         (graphite_dump_dependence_graph): Declared.
6655         (graphite_build_rdg_all_levels): Declared.
6656         (graphite_test_dependence): Declared.
6657         * Makefile.in (graphite-data-ref.o): New target.
6659 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
6661         * Merge from mainline (139870:140164).
6663 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6665         * Merge from mainline (138275:139870).
6666         * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6667         the commits from trunk broke the niter detection.
6669 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6671         * graphite.c: Add more documentation.  Fix formatting.
6672         (debug_loop_vec, debug_oldivs, loop_iv_stack,
6673         loop_iv_stack_debug): Moved...
6674         (schedule_to_scattering): Move before use.
6675         (dot_all_scops): Include in "#if 0" the code for system
6676         call dotty.
6678         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6679         loop_iv_stack_debug): ...here.
6681 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
6683         * tree-phinodes.c (make_phi_node): Extern.
6684         (add_phi_node_to_bb): New.
6685         (create_phi_node): Call add_phi_node_to_bb.
6686         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6687         (remove_statement): Handle case where stored phi was updated
6688         and is no longer the same.
6689         * graphite.c (is_parameter): New.
6690         (is_old_iv): New.
6691         (expand_scalar_variables_expr): New.
6692         (expand_scalar_variables_stmt): New.
6693         (expand_scalar_variables): New.
6694         (move_phi_nodes): Create new phi instead of moving old one.
6695         (translate_clast): Call expand_scalar_variables.
6696         (find_vdef_for_var_in_bb): Also scan regular definitions.
6697         (skip_phi_defs): New.
6698         (collect_scop_exit_phi_args): New.
6699         (patch_scop_exit_phi_args): New.
6700         (gloog): Patch phis after scop.
6701         * tree-flow.h: (add_phi_node_to_bb): Declared.
6702         (make_phi_node): Declared.
6704 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6706         * graphite.c (end_scop): Split the entry of the scop when it
6707         is the header of the loop in which the scop is ending.
6708         (build_scops_1, limit_scops): Update uses of end_scop.
6710 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6712         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6713         SCOP_ENTRY or SCOP_EXIT.
6715 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6717         * graphite.c (get_construction_edge): Removed.
6718         (gloog): Construction edge is the scop entry edge.
6720 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6722         * graphite.c (can_generate_for_scop): Removed.
6723         (gloog): Do not call it.
6725 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6727         * graphite.c (new_scop): Entry of a scop is an edge.
6728         Initialize SESE region.
6729         (free_scop): Free SESE region.
6730         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6731         (split_difficult_bb): New, split from end_scop.
6732         (end_scop): Exit of a scop is an edge.
6733         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6734         not automatically updated and thus is always wrong.
6735         * graphite.h (struct sese): New.
6736         (SESE_ENTRY): New.
6737         (SESE_EXIT): New.
6738         (struct scop): New field for a SESE region.  Remove entry, exit.
6739         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6740         semantics as before.  Moved comment around.
6742 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6743             Sebastian Pop  <sebastian.pop@amd.com>
6745         * graphite.c (graphite_transform_loops): Always enable gloog
6746         and find_transform when ENABLE_CHECKING.
6748 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6750         * graphite.c (graphite_transform_loops): Move pretty printer
6751         of SCOPs before doing any transform.  Remove call to print_scops
6752         and dot_all_scops_1.
6754 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6756         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6757         (print_graphite_bb): Same.
6759 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6761         * graphite.c (dot_all_scops_1): Cleanup.
6762         (move_scops): Fix comment.
6764 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6766         * graphite.c (build_scop_bbs): Revert commit 139355:
6768         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6769                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6771                 * graphite.c (build_scop_bbs): Factor up code.
6773 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6775         * graphite.c (gloog): Update dominator info.
6777 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6779         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6781 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6783         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6784         initialization.
6785         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6786         (translate_clast): Correct formatting.
6787         * graphite.h (struct num_map): Removed.
6788         (struct graphite_bb): Remove num_map field.
6789         (GBB_INDEX_TO_NUM_MAP): Removed.
6791 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6793         * graphite.c (build_access_matrix_with_af): Fix comments.
6794         (build_scop_data_accesses): Same.
6796 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6798         * graphite.c (build_scop_data_accesses): Don't construct
6799         access matrices.  Add a FIXME and an assert condition that
6800         should pass when the access matrices will be needed.
6802 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6804         * tree-data-ref.c (stmt_simple_memref_p): Don't call
6805         really_constant_p.
6806         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6807         Moved close by free_graphite_bb.
6808         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
6809         (new_scop): Move close by free_scop.
6810         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6812 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
6814         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6815         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6816         instead of recursive call.
6817         (graphite_translate_clast_equation): New.
6818         (graphite_create_guard_cond_expr): New.
6819         (graphite_create_new_guard): New.
6820         (get_stack_index_from_iv): Removed.
6821         (graphite_rename_ivs_stmt): Use gbb_loop_index.
6822         (get_true_edge_from_guard_bb): New.
6823         (translate_clast): Handle stmt_guard in clast.
6824         (get_construction_edge): Allow construction edge detection for
6825         a scope entry with multiple predecessors if one predecessor is
6826         the immediate dominator of scope entry.
6827         (can_generate_code_stmt): Enable code generation for clast_guard.
6828         (gloog): Use correct context loop.  Removed check for post dominators.
6829         * cfgloop.h (create_empty_if_region_on_edge): Declared.
6831 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6833         * graphite.c (remove_dead_loops): Document better which
6834         loops are removed.
6836 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6838         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6839         and PPLINC.
6840         (graphite.o): Also depends on pointer-set.h.
6842 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6844         * graphite.c (scop_record_loop): Fix compile warning.
6846 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
6847             Sebastian Pop  <sebastian.pop@amd.com>
6849         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6851 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6853         * graphite.c (build_graphite_bb): Initialize bb->aux to
6854         point to the graphite_bb_p.
6855         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6856         content of bb->aux.
6857         (add_bb_domains): Does not use the scop parameter.
6858         (graphite_transform_loops): Clean bb->aux at the end.
6860 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6861             Sebastian Pop  <sebastian.pop@amd.com>
6863         * lib/target-supports.exp
6864         (check_effective_target_fgraphite): New.
6866         * gcc.dg/graphite/graphite.exp: Early exit when
6867         check_effective_target_fgraphite returns false.
6868         Set dg-do-what-default to compile.
6869         (scan-graphite-dump-times): Removed.
6870         * gfortran.dg/graphite/graphite.exp: Same.
6872         * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6873         Use scan-tree-dump-times instead of scan-graphite-dump-times.
6874         * gcc.dg/graphite/scop-1.c: Same.
6875         * gcc.dg/graphite/scop-2.c: Same.
6876         * gcc.dg/graphite/scop-3.c: Same.
6877         * gcc.dg/graphite/scop-4.c: Same.
6878         * gcc.dg/graphite/scop-5.c: Same.
6879         * gcc.dg/graphite/scop-6.c: Same.
6880         * gcc.dg/graphite/scop-7.c: Same.
6881         * gcc.dg/graphite/scop-8.c: Same.
6882         * gcc.dg/graphite/scop-9.c: Same.
6883         * gcc.dg/graphite/scop-10.c: Same.
6884         * gcc.dg/graphite/scop-11.c: Same.
6885         * gcc.dg/graphite/scop-12.c: Same.
6886         * gcc.dg/graphite/scop-13.c: Same.
6887         * gcc.dg/graphite/scop-matmult.c: Same.
6888         * gcc.dg/graphite/scop-14.c: Same.
6889         * gcc.dg/graphite/scop-15.c: Same.
6890         * gcc.dg/graphite/block-0.c: Same.
6891         * gcc.dg/graphite/scop-16.c: Same.
6892         * gcc.dg/graphite/block-1.c: Same.
6893         * gcc.dg/graphite/scop-17.c: Same.
6894         * gcc.dg/graphite/scop-18.c: Same.
6895         * gfortran.dg/graphite/block-1.f90: Same.
6896         * gfortran.dg/graphite/scop-1.f: Same.
6897         * gfortran.dg/graphite/block-2.f: Same.
6899 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6901         * graphite.c: Fix some XXX comments.
6902         (build_scop_dynamic_schedules): Removed.
6904 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6906         * graphite.h (scop_max_loop_depth): Moved...
6907         * graphite.c (scop_max_loop_depth): ...here.
6908         (remove_all_edges_1): New.
6909         (remove_all_edges): Factored code.
6910         (remove_cond_exprs): Check only the last statement for
6911         a GIMPLE_COND expression.
6913 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6915         * graphite.c (scan_tree_for_params): Early return when the
6916         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
6917         (find_scop_parameters): Factor out code.
6918         (graphite_trans_bb_strip_mine): Remove dead code.
6920 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6922         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6923         graphite_trans_bb_move_loop): Factor asserts.
6924         (gloog): Perform sanity checks only for ENABLE_CHECKING.
6925         Do not call calculate_dominance_info and estimate_bb_frequencies.
6927 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
6929         * graphite.c (create_loops_mapping, free_loops_mapping,
6930         create_loops_mapping_num, debug_loop_mapping_1,
6931         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6932         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6933         graphite_loops_mapping_add_child_num,
6934         graphite_loops_mapping_insert_child,
6935         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6936         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6937         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6938         create_num_from_index, get_num_from_index,
6939         swap_loop_mapped_depth): Removed.
6940         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6941         (free_scop): Do not call free_loops_mapping.
6942         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6943         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
6944         get_loop_mapped_depth.
6945         (graphite_trans_bb_move_loop): Do not update the loop mapping.
6946         (graphite_trans_bb_strip_mine): Same.
6947         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6948         (struct scop): Remove field loops_mapping.
6950 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6951             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6953         * graphite.c (scop_record_loop): Factor out one level of the
6954         condition by early return.
6955         (build_scop_loop_nests): Format following FSF coding style.
6956         (build_scop_dynamic_schedules): Factor out code.
6957         (scopdet_bb_info): Reindent.  Default case should not be reachable.
6959 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6960             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6962         * graphite.c (loop_affine_expr): Check for DECL_P or struct
6963         assignments that are not handled as simple operands for now.
6965 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6966             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6968         * graphite.c (build_scop_bbs): Factor up code.
6970 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6971             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6973         * graphite.c (stmt_simple_for_scop_p): Factor code out
6974         of the loop.
6975         (enum gbb_type): New.  Group all the GBB_* types under it.
6976         (is_loop_exit): Moved...
6977         (end_scop): Enable BB spliting.
6978         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
6979         * cfgloop.h (is_loop_exit): Declared.
6981 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6983         * doc/invoke.texi: Remove strides from examples containing
6984         DO loops when the strides are equal to 1.
6986 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
6987             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6989         * graphite.c (graphite_trans_scop_block): Or the result with
6990         the result from graphite_trans_loop_block.
6991         * gcc.dg/graphite/block-1.c: New.
6992         * gfortran.dg/graphite/block-1.f90: New.
6993         * gfortran.dg/graphite/block-2.f: New.
6995 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6997         * graphite.c (graphite_transform_loops): Call cloog_initialize
6998         and cloog_finalize.
7000 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7002         * tree-data-ref.c) (stmt_simple_memref_p): New.
7003         * tree-data-ref.h (stmt_simple_memref_p): Declared.
7004         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
7005         (is_simple_operand): Call stmt_simple_memref_p.
7007         * gcc.dg/graphite/scop-matmult.c: Updated for not
7008         using pointer arithmetic, as this is optimized by PRE and
7009         makes the code too difficult to analyze.
7011         * gcc.dg/graphite/scop-18.c: Same.
7013 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7015         * gdbinit.in (pgg): New.
7017 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7019         * graphite.c (graphite_trans_loop_block): Fix warning.
7021 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7023         * graphite.c (graphite_trans_loop_block): Fix my merge error.
7025 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7027         * graphite.c (graphite_trans_bb_block): Remove check for
7028         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
7029         Check if loop blocking is profitable for every loop, before applying
7030         the changes.
7031         (graphite_apply_transformations): Call graphite_trans_bb_block only,
7032         if flag_loop_block is set.
7034 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7036         * graphite.c: Add some more documentation for the loop
7037         mapping.
7039 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7041         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
7042         * graphite.c: Format on less than 80 columns.
7043         * graphite.h: Same.
7045 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7047         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
7049 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7051         * doc/invoke.texi (floop-block, floop-strip-mine,
7052         floop-interchange): Update documentation with examples.
7054 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
7056         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
7057         add_referenced_var.
7058         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
7060 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
7062         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
7063         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
7064         * tree-scalar-evolution.c: Revert useless changes.
7065         * tree-phinodes.c: Same.
7066         * cfghooks.c: Same.
7067         * vec.h: Same.
7068         * tree-vectorizer.h: Same.
7069         * tree-flow.h: Same.
7070         * tree-cfg.c: Same.
7071         * common.opt (fgraphite): Update documentation.
7073 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
7075         * doc/invoke.texi (-floop-block, -floop-strip-mine,
7076         -floop-interchange): Add more text for explaining what each of these
7077         flags is doing.
7078         * tree-into-ssa.c (gimple_vec): Moved to...
7079         * graphite.c: Include gimple.h.
7080         (gimple_vec): Moved to...
7081         (del_loop_to_cloog_loop): Removed.
7082         (loop_affine_expr): Do not call create_data_ref when the
7083         operand is a constant.
7084         (new_scop): Use free instead of del_loop_to_cloog_loop.
7085         * Makefile.in (graphite.o): Depend on GIMPLE_H.
7086         * gimple.h (gimple_vec): ... here.
7088 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7090         * graphite.c (scopdet_bb_info): Only allow loops with known number of
7091         latch executions.
7092         (build_loop_iteration_domains): Fail, if latch executions unknown.
7094 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7096         * graphite.c (add_conditions_to_domain): New.
7097         (build_scop_conditions_1): Call add_conditions_to_domain.
7098         (set_cloog_options): Allow to disable optimizations.
7100 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7102         * graphite.c (find_params_in_bb): Look for parameters in conditions.
7103         Do not use walk_dominator_tree.
7104         (find_scop_parameters): Do not use walk_dominator_tree.
7106 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7108         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
7109         (idx_record_params): Adapt.
7110         * graphite.h (scop_gimple_loop_depth): New.
7112 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7114         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
7115         (scan_tree_for_params): Remove value_init.
7116         (build_scop_context): Remove value_init.
7117         (build_loop_iteration_domains): Remove value_init.
7118         (schedule_to_scattering): Remove value_init.
7119         (graphite_trans_bb_strip_mine): Remove value_init.
7121 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7123         * gcc/graphite.c (limit_scops): New.
7124         (graphite_transform_loops): Add limit SCoPs.
7125         * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
7126         * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
7127         * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
7128         * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
7129         * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
7130         * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
7131         * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
7132         * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
7133         * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
7134         Change loop numbers.
7135         * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
7136         Change loop numbers.
7137         * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
7138         * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
7139         * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
7140         * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
7141         * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
7142         * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
7143         * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
7144         * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
7145         * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
7146         * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
7148 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7150         * graphite.c (graphite_transform_loops): Call always find_transform.
7152 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
7154         * graphite.c (free_loops_mapping): New.
7155         (stmt_simple_for_scop_p): Fix typo.
7156         (stmt_simple_for_scop_p): Fix tuples functions, that
7157         broke polyhedron.
7158         (free_graphite_bb): Fix some memleaks.
7159         (free_scop): Fix some memleaks.
7160         (scopdet_bb_info): Do not forget some tmp SCoPs.
7161         (find_params_in_bb): Fix some memleaks.
7162         (clast_to_gcc_expression): Fix warning.
7164 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
7166         * gcc.dg/graphite/scop-16.c: Fix for 32bit.
7167         * gcc.dg/graphite/scop-17.c: Fix for 32bit.
7169 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
7171         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
7172         Move code ifdef-ed HAVE_cloog...
7173         * graphite.c: Include toplev.h.
7174         ... here.
7175         * Makefile.in (OBJS-common): Always build graphite.o.
7176         (BACKEND): Remove @GRAPHITE@.
7177         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
7178         (graphite.o): Depend on TOPLEV_H.
7180 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
7182         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
7183         Remove typo left from polylib to ppl conversion.
7184         * graphite.c (graphite_transforms): Use sorry instead of fatal.
7186 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
7188         * toplev.c (process_options): Move the graphite loop optimization
7189         flags...
7190         * tree-ssa-loop.c (graphite_transforms): ... here.
7191         When not configured with CLooG, print to dump_file that
7192         Graphite transforms were not performed.
7193         * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
7194         New.
7195         * gcc.dg/graphite/*.c: Updated all testcases to use
7196         scan-graphite-dump-times.
7198 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
7200         * graphite.c (dot_scop, dot_all_scops): Do not call system.
7201         Do not open /tmp/scop.dot and /tmp/allscops.dot.
7203 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
7204             Jan Sjodin  <jan.sjodin@amd.com>
7206         * configure: Regenerated.
7207         * omp-low.c (expand_omp_sections): Remove now unused code.
7208         * config.in (HAVE_polylib): Removed.
7209         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
7210         (PPLLIBS, PPLINC): Added.
7211         * graphite.c: Replace unsigned with int wherever possible.
7212         Don't access Cloog's data structures, but use accessor functions.
7213         Clast's stmt->type is now implemented as a vtable: change the
7214         switches of stmt->type into ifs.
7215         (polylib/polylibgmp.h): Don't include.
7216         (initialize_dependence_polyhedron,
7217         initialize_data_dependence_polyhedron, is_empty_polyhedron,
7218         statement_precedes_p, test_dependence, build_rdg_all_levels,
7219         dump_dependence_graph): Removed until this code is cleaned up
7220         or ported to Cloog.
7221         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
7222         (POLYLIBINC): Renamed PPLINC.
7224 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
7225             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7226             Jan Sjodin  <jan.sjodin@amd.com>
7228         Finish the merge and tuplification of graphite.
7230 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
7231             Jan Sjodin  <jan.sjodin@amd.com>
7233         Partial merge from mainline (138072:138275).
7234         * graphite.c still has to be tuplified.
7236 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
7238         * graphite.c (graphite_loops_mapping_max_loop_num): New.
7239         (create_num_from_index): New.
7240         (get_num_from_index): Also pass in the graphite BB.
7241         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
7242         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
7243         (graphite_trans_bb_strip_mine): Call create_num_from_index.
7244         (is_interchange_valid): Return false when failing.
7245         * graphite.h (struct num_map): New.
7246         (struct graphite_bb): New field num_map.
7247         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
7249 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7251         * graphite.c (dump_gbb_conditions): Print also conditions like
7252         "if (a)".  Remove dublicated code and use print_generic_expr ().
7253         (stmt_simple_for_scop_p): Only allow conditions we can handle
7254         {<, <=, >, >=}.
7256 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
7258         * graphite.h (struct scop): Removed new_ivs field.
7259         (SCOP_NEWIVS): Deleted.
7260         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7261         clast_to_gcc_expression, graphite_create_new_loop):
7262         Removed use of new_ivs.
7264 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
7266         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7267         create_loops_mapping_num, debug_loop_mapping_1): New.
7268         (debug_loop_mapping): Call debug_loop_mapping_1.
7269         (get_loop_mapping_for_num,
7270         graphite_loops_mapping_add_child,
7271         graphite_loops_mapping_add_child_num,
7272         graphite_loops_mapping_insert_child,
7273         graphite_loops_mapping_parent,
7274         split_loop_mapped_depth_for_num,
7275         loop_mapped_depth_split_loop): New.
7276         (increment_loop_mapped_depths): Removed.
7277         (swap_loop_mapped_depth_for_num): Reimplemented.
7278         (new_scop): Call create_loops_mapping.
7279         (scop_record_loop): Call graphite_loops_mapping_insert_child.
7280         (translate_clast): Pass the old loop father in parameter, and pass
7281         it to get_old_iv_from_ssa_name.
7282         (remove_edges_around_useless_blocks, can_generate_code_stmt,
7283         can_generate_code, can_generate_for_scop): New.
7284         (graphite_trans_bb_block): Returns false when it fails to transform.
7285         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7287 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7289         Reverted all the changes related to the streamization and
7290         loop fusion.
7291         These changes are now tracked in the streamization branch.
7293 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7294             Jan Sjodin  <jan.sjodin@amd.com>
7296         * graphite.c (gbb_compare): Correctly constify.
7297         (gbb_can_be_ignored): Indent.
7298         (graphite_trans_scop_swap_1and2): Add legality check.
7299         Remove dead FIXMEs.
7301 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7303         Remove fallouts from "Reverted the Condate changes".
7304         * tree.h: Remove unused decl.
7305         * gcc.dg/tree-checker: Same.
7306         * timevar.def: Remove counter.
7308 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
7310         * Merge from mainline (135673:138072).
7312         Reverted the MIRO changes (from 2008-04-05) that are now
7313         tracked in the miro branch.
7314         * tree-bounds.c: Removed.
7315         * tree-bounds.h: Removed.
7317         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7318         are now tracked in the condate branch.
7319         * tree-check.c: Removed.
7320         * tree-match.c: Removed.
7321         * condate.y: Removed.
7323 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7325         * common.opt: New user flag -floop-block, -floop-strip-mine
7326         and -floop-interchange.
7327         * toplev.c (process_options): Enable -fgraphite pass if any one of the
7328         graphite loop optimization flags is turned on.
7329         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7330         flag_loop_strip_mine and flag_loop_interchange checks before
7331         optimizations.
7332         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7333         -floop-strip-mine and -floop-interchange.
7334         * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7335         -fgraphite.
7336         * gcc.dg/graphite/scop-16.c: Ditto.
7337         * gcc.dg/graphite/scop-17.c: Ditto.
7338         * gcc.dg/graphite/scop-18.c: Ditto.
7340 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
7341             Sebastian Pop  <sebastian.pop@amd.com>
7343         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7344         (create_empty_loop_on_edge): More fixes.
7345         * tree-phinodes.c (resize_phi_node): Extern.
7346         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7347         * cfghooks.c (update_dominator_information): New split from
7348         split_edge.
7349         * tree-vectorizer.c (rename_variables_in_bb): Extern.
7350         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7351         successor of the function entry block.
7353         * graphite.c: Include pointer-set.h.
7354         (debug_loop_mapping, increment_loop_mapped_depths,
7355         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7356         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7357         swap_loop_mapped_depth_for_num, get_num_from_index,
7358         swap_loop_mapped_depth, loop_iv_stack_debug,
7359         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7360         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7361         get_old_iv_from_ssa_name): New.
7362         (new_scop): Initialize SCOP_LOOPS_MAPPING.
7363         (free_scop): Free SCOP_LOOPS_MAPPING.
7364         (scop_record_loop): Record old ivs.
7365         (create_var_name): Removed.
7366         (initialize_cloog_names): Allocate double space in case strip mine
7367         applies to all loops once.
7368         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7369         (clast_to_gcc_expression): Same.  Implement more clast to gimple
7370         translation.
7371         (graphite_create_new_loop): Pass in ivstack.
7372         (remove_all_edges): Pass in the construction_edge.
7373         (graphite_remove_iv): Removed.
7374         (graphite_rename_ivs, graphite_rename_ivs_stmt,
7375         remove_cond_exprs): Rewritten.
7376         (move_phi_nodes): New.
7377         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7378         (translate_clast): Pass in ivstack.  Rewrite some cases.
7379         (set_cloog_options, debug_clast_stmt): New.
7380         (find_transform): Use set_cloog_options.
7381         (outermost_loop_layer): Removed.
7382         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7383         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7384         mark_old_loops, remove_dead_loops): New.
7385         (gloog): Rewritten.
7386         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7387         (const_column_index, get_first_matching_sign_row_index,
7388         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7389         get_upper_bound): New.
7390         (graphite_trans_bb_strip_mine): Also update the iv map.
7392         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7393         (struct name_tree): Add a loop field.
7394         (struct scop): Add a graphite_loops_mapping field.
7395         (SCOP_LOOPS_MAPPING): New.
7396         (debug_clast_stmt): Declare.
7397         * lambda.h (find_induction_var_from_exit_cond): Declare.
7398         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7399         * cfgloop.h (update_dominators_in_loop): Removed declaration.
7400         (create_empty_loop_on_edge): Updated.
7401         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7402         rename_variables_in_bb): Declare.
7403         * tree-cfg.c (remove_bb): Extern.
7405         * gcc.dg/graphite/block-0.c: New.
7407 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7408             Sebastian Pop  <sebastian.pop@amd.com>
7410         * graphite.c (strip_mine_profitable_p): New.
7411         (graphite_trans_bb_block): Disable strip mining if not profitable.
7413         * gcc.dg/graphite/scop-18.c: New.
7414         * gcc.dg/graphite/scop-17.c: Fixed.
7415         * gcc.dg/graphite/scop-16.c: Fixed.
7417 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
7418             Jan Sjodin  <jan.sjodin@amd.com>
7419             Sebastian Pop  <sebastian.pop@amd.com>
7421         * graphite.c (is_interchange_valid): New.
7422         (graphite_trans_bb_block): Check loop nest of basic block for legality
7423         of interchange.
7425         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7426         outer_most_loop, gbb_outer_most_loop_index): New.
7428         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7429         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7430         * gcc.dg/graphite/scop-16.c: New.
7431         * gcc.dg/graphite/scop-17.c: New.
7433 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7435         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7436         (graphite_trans_scop_block): Ignore SCoPs without bbs.
7438 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7440         * graphite.c (new_scop): Initialize SCOP_EXIT.
7441         (scopdet_info): Add.
7442         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7443         (build_scops_1): Cleanup, bugfixes.
7444         (build_scops): Cleanup.
7446         * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7447         * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7449 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7451         * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7453         * gfortran.dg/graphite/graphite.exp: Use
7454         DEFAULT_GRAPHITE_FLAGS.
7456         * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7458 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7460         * graphite.c (scan_tree_for_params): Do not assert any more if
7461         MULT_EXPR parameter is negative.
7463         * gfortran.dg/graphite/scop-1.f: New.
7465         * gfortran.dg/graphite/graphite.exp: New.
7467         * gcc.dg/graphite/scop-15.c: New.
7469 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7471         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7473 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7475         * graphite.c (graphite_trans_bb_swap_loops): Rename from
7476         graphite_swap_loops.
7477         (graphite_trans_bb_move_loop): New.
7478         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7479         (graphite_trans_bb_block): New.
7480         (graphite_trans_loop_block): New.
7481         (graphite_trans_scop_swap_1and2): Rename from
7482         graphite_trans_swap_1and2.
7483         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7484         (graphite_trans_scop_block): New.
7485         (graphite_apply_transformations): Rename from
7486         graphite_transformations.
7488         * gcc.dg/graphite/scop-matmult.c: New.
7490 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7492         * graphite.c (gbb_compare): New.
7493         (graphite_sort_gbbs): New.
7494         (gbb_can_be_ignored): New.
7495         (scop_remove_ignoreable_gbbs): New.
7496         (graphite_transformations): Cleanup and add
7497         scop_remove_ignoreable_gbbs.
7498         * lambda.h (lambda_vector_compare): New.
7500 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
7502         * graphite.c (print_graphite_bb): Correct printing of static schedule.
7503         (graphite_swap_loops): int -> unsigned
7504         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7505         (graphite_transformations): New.
7506         (graphite_transform_loops): Move to graphite_transformations.
7507         * graphite.h (gbb_nb_loops): Return unsigned.
7509 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7511         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7512         the domain matrix.  This makes scop-0.c work again.
7514 2008-06-20  Richard Guenther  <rguenther@suse.de>
7516         * graphite.h: Adjust copyright to GPLv3.
7517         * graphite.c: Likewise.
7518         (stmt_simple_memref_for_scop_p): Split out from ...
7519         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
7520         and simplify.
7521         (get_bb_type): Optimize.
7522         (is_pred): Remove.
7523         (is_bb_addable): Fix memleak, replace is_pred call with
7524         single_pred.
7525         (build_scops): Use current_loops.
7526         (param_index): Fix memleak.
7528 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7530         * graphite.c: Fix formatting.
7532 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7534         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7535         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7536         (create_var_name, save_var_name): Newly defined functions.
7537         (initialize_cloog_names): Part of the code factored out to
7538         save_var_name.
7539         (clast_to_gcc_expression): Now handles the case of clast_red_sum
7540         in clast_reduction statement.
7541         (graphite_create_new_loop): Now takes a new parameter
7542         for outer_loop.
7543         (translate_clast): Now also takes the context_loop and bb_exit
7544         parameters. Rewritten the code so that it creates a gimple code
7545         inside the given context.
7546         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7547         remove_cond_expr, disconnect_cond_expr,
7548         disconnect_virtual_phi_nodes): Newly defined functions.
7549         * graphite.h (struct scop): added old_ivs vector.
7550         SCOP_OLDIVS: New macro.
7552 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
7554         * cfgloopmanip.c: Add missing function comments, fix formatting.
7556 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7558         * cfgloopmanip.c (update_dominators_in_loop): Defined.
7559         (create_empty_loop_on_edge): Defined.
7560         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7561         instead of void.
7562         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7563         (update_dominators_in_loop): Declared as extern
7564         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7566 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
7568         * graphite.c (print_graphite_bb): Allow changing number of loops
7569         in SCoP domain.
7570         (initialize_cloog_names): Allow changing number of loops.
7571         (build_cloog_prog): Simplify.
7572         (find_transform): Enable cloog option --strides.
7573         (graphite_swap_loops): New.
7574         (graphite_strip_mine_loop): New.
7575         (graphite_trans_swap_1and2): New.
7576         (graphite_trans_strip): New.
7577         (graphite_transform_loops): Add graphite_trans_strip.
7578         * graphite.h (scop_max_loop_depth): New.
7580 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7582         * graphite.c (build_scop_iteration_domain): Remove forgotten
7583         line. (Fixes compile)
7585 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7587         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7588         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7589         (build_bb_loops): New.
7590         (graphite_transform_loops): Add build_bb_loops.
7591         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7592         numbers.
7593         * graphite.h (graphite_bb): Add loops.
7594         (gbb_nb_loops): New.
7595         (gbb_loop_at_index): New.
7596         (gbb_loop_index): New.
7597         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7598         using nb_params_in_scop.
7600 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7602         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7603         (build_scop_canonical_schedules): Build minimized schedule.
7604         (schedule_to_scattering): Adapt to minimized schedule.
7605         * graphite.h (graphite_bb): Add/Update descriptions.
7607 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
7608             Tobias Grosser  <grosser@fim.uni-passau.de>
7610         * graphite.c (print_graphite_bb): Add condition printing.
7611         (dump_value): New.
7612         (dump_gbb_conditions): New.
7613         (build_scop_conditions_1): New.
7614         (build_scop_conditions): New.
7615         * graphite.h (graphite_bb): Add conditions.
7617 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7619         * graphite.c (print_graphite_bb):
7620         (free_graphite_bb): New.
7621         (free_scop): Free bbs.
7622         (get_bb_type): Free doms.
7623         (build_scop_context): Free context matrix.
7624         (build_loop_iteration_domains): Remove unused code.
7625         (build_cloog_prog): Free scattering function and blocklist.
7626         (find_transform): Free options.
7628 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
7630         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7631         Remove unnecessery cloog data structures. Make a copy of the domain
7632         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7633         unnecessary cloog data structures. Fix memory leaks. Remove insert
7634         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7635         used.
7636         (build_scop_iteration_domain): Remove unnecessary cloog
7637         data structures.  Fix memory leaks.
7638         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7639         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7641 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7643         * graphite.c (find_scop_params): Remove initialize_cloog_names.
7645 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7647         * graphite.c (end_scop): Style fix.
7648         (schedule_to_scattering): Style and comment fix.
7650 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7651         * graphite.c (print_graphite_bb): Fix definiton of
7652         schedule_to_scattering.
7653         (initialize_cloog_names): Change nb_scattdims to max loop
7654         depth in SCoP.
7655         (schedule_to_scattering): Take parameter for number of scattering
7656         dimensions.
7657         (build_cloog_prog): Only build as much scattering dimensions as
7658         necessary.
7660 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7662         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7663         in polyhedron/aermod.f90.
7665 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7666             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
7667             Harsha Jagasia  <harsha.jagasia@amd.com>
7669         * graphite.c (is_bb_addable): Fix segfault.
7671 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7673         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7674         with multiple exits and conditional handling in edge cases.
7675         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7677         * gcc.dg/graphite/scop-14.c: New.
7679 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7680             Adrien Eliche  <aeliche@isty.uvsq.fr>
7682         * graphite.c (is_bb_addable): Add more comments and enhance
7683         readablity of the source code. Fix memory leak.
7684         (is_loop_exit): Fix memory leak.
7686 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7688         * graphite.c (first_loop_in_scop): Deleted.
7689         (setup_cloog_loop): Only walk the loop chain for inner loops.
7690         (build_scop_iteration_domain): Execute setup_cloog_loop for
7691         all loops in the first layer.
7693 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7695         * graphite.c (scan_tree_for_params): Change the way params are
7696         added to be indepenent of the number of loops.
7697         (setup_cloog_loop): Revert to short matrix format. Fix parameter
7698         handling.
7699         (build_cloog_prog): Revert to short matrix format.
7701 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7702             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7704         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7705         warning.
7707 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7709         * graphite.c (nb_data_refs_in_scop): New.
7710         (graphite_transform_loops): Print more stats: number of
7711         loops, basic blocks and data references per scop.
7713 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7714             Jan Sjodin  <jan.sjodin@amd.com>
7716         * graphite.c (loop_affine_expr, idx_record_params,
7717         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7718         instead of instantiate_parameters.
7720 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7722         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7723         add support for parameters, add STATIC_SCHEDULE at the right places,
7724         cleanup.
7726 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7728         * graphite.c (build_scop_loop_nests): Only add the loops, that
7729         are contained completely in the SCoP.
7730         (build_cloog_prog): Disable scattering, until schedule_to_scattering
7731         and the domains are fixed.
7732         (build_scop_canonical_schedules): Add support for bbs not contained
7733         in any SCoP.
7735 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7737         * graphite.h (scop_contains_loop): Update comments to match
7738         the actual behavior.
7739         (scop_contains_loop): New.
7740         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7742 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7744         * graphite.c (get_bb_type): On function body, i.e. loop_0,
7745         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7746         as GBB_COND_HEADER.
7748 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7749             Tobias Grosser  <grosser@fim.uni-passau.de>
7751         * graphite.c (graphite_transform_loops): Early return when
7752         there are no loops in the function.
7754 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7755             Jan Sjodin  <jan.sjodin@amd.com>
7757         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7758         offset of the last loop.
7759         (setup_cloog_loop): Copy the entire outer constraint matrix.
7761 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7762             Jan Sjodin  <jan.sjodin@amd.com>
7764         * graphite.c (stmt_in_scop_p, function_parameter_p,
7765         invariant_in_scop_p): Removed.
7766         (scan_tree_for_params): Can be used with no constraint
7767         matrix for gathering parameters.
7768         (idx_record_params): Don't use idx_record_param, instead use
7769         scan_tree_for_params.
7770         (find_scop_parameters): Same.
7771         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7772         Fix the size of loop domains.
7773         (schedule_to_scattering): Exit when the outer loop is not in scop.
7774         (find_transform): Enable build_cloog_prog.
7776 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7777             Jan Sjodin  <jan.sjodin@amd.com>
7779         * graphite.c (schedule_to_scattering): Make scattering domains
7780         uniformly of the same size, as required by CLooG 0.14.0 and before.
7782 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7783             Jan Sjodin  <jan.sjodin@amd.com>
7785         * graphite.c (schedule_to_scattering): Rewrite, correct the
7786         translation of the scheduling function to scattering.
7787         (build_cloog_prog): Call schedule_to_scattering only once.
7788         * graphite.h (scop_loop_index): Do not fail for loops not
7789         in the scop: return -1.
7791 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
7793         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7794         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7795         (setup_cloog_loop): Export GBB_DOMAIN.
7796         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
7797         able to rebuild the original control flow.
7798         * graphite.h (graphite_bb): Add domain field and access macro.
7799         (GBB_DOMAIN): New.
7801 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
7803         * graphite.c (debug_gbb): New.
7804         (print_scop, build_graphite_bb): Use SCOP_BBS.
7805         (build_scop_bbs): Reimplemented.
7806         (dfs_bb_in_scop_p): Removed.
7807         (build_scop_loop_nests): Reorder loops inserted in
7808         SCOP_LOOP_NEST: outer loops should come first.
7809         (build_scop_canonical_schedules): Reinitialize at zero
7810         the components of the SCOP_STATIC_SCHEDULE for the loops
7811         that have already been parsed.
7813         * graphite.h (debug_gbb): Declared.
7815 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
7816             Jan Sjodin  <jan.sjodin@amd.com>
7818         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7819         (graphite_loop_to_gcc_loop): Removed.
7820         (remove_all_edges): New.
7821         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7822         (gloog): Remove useless code.
7824 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7826         * graphite.c (get_bb_type): Reworked. We distinguish between
7827         loops with one or multiple exits.
7828         (is_loop_exit): New.
7829         (is_pred): New.
7830         (is_bb_addable): Rework condition handling, now support for case
7831         case statements and loops with multiple exits.
7833         * gcc.dg/graphite/scop-11.c: New.
7834         * gcc.dg/graphite/scop-12.c: New.
7835         * gcc.dg/graphite/scop-13.c: New.
7837 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7839         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7840         we have too many colors.
7842 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
7844         * doc/invoke.texi (-ftree-loop-fusion): Document.
7845         * tree-pass.h (pass_loop_fusion): Declared.
7846         * tree-loop-fusion.c: New.
7847         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7848         * tree-data-ref.c (find_data_references_in_loop): Make extern.
7849         * tree-data-ref.h (find_data_references_in_loop): Declared.
7850         * common.opt (ftree-loop-fusion): Declared.
7851         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7853 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
7855         * graphite.c (build_access_matrix): Fix typo from the merge.
7857 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
7859         * Merge from mainline (130800:135673).
7861 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7863         * graphite.c (end_scop): The exit of the scop is not part of the scop.
7864         Update dominators after splitting.
7866 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7868         * graphite.c (is_bb_addable): Return the harmful statement.
7869         Factor up some code.
7870         (end_scop): New.  Splits end of scope bbs on a harmful statement.
7871         (build_scops_1): Call end_scop.
7873 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7875         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7876         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7877         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7878         build_scops_1): Removed.
7879         (build_scops_2): Renamed build_scops_1.
7881 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
7883         * graphite.c: Fix formatting.
7885 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7887         * graphite.c (get_bb_type): New.
7888         (move_scops): New.
7889         (build_scops_2): New.
7890         (is_bb_addable): New.
7891         (build_scops): Switch the scop detection.
7892         (build_scop_bbs): Add entry bb to scop.
7893         * graphite.h (struct scop): Update comment.
7895 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7897         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7898         more colors.
7900 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7902         * gcc.dg/graphite/scop-1.c: Update.
7903         * gcc.dg/graphite/scop-2.c: Update.
7904         * gcc.dg/graphite/scop-4.c: Update.
7905         * gcc.dg/graphite/scop-5.c: Add.
7906         * gcc.dg/graphite/scop-6.c: Add.
7908 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
7910         * gcc.dg/graphite/scop-0.c: Add.
7911         * gcc.dg/graphite/scop-7.c: Add.
7912         * gcc.dg/graphite/scop-8.c: Add.
7913         * gcc.dg/graphite/scop-9.c: Add.
7914         * gcc.dg/graphite/scop-10.c: Add.
7916 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7918         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7919         Check affine expressions depending on the outermost loop
7920         instead of a scop.
7921         (stmt_simple_for_scop_p): Same.
7922         (harmfule_stmt_in_scop): Same.
7924 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
7926         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7927         mark entry and exit, that are not part of the SCoP and update HTML
7928         formatting.
7930 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
7932         * graphite.c (basic_block_simple_for_scop_p): Renamed
7933         harmful_stmt_in_bb.
7934         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7935         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7936         (all_preds_visited_p, all_succs_visited_p,
7937         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7938         scop_end_loop): New.
7939         (build_scops): Do not use dfs_enumerate_from.
7941         * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7943 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
7945         * graphite.c: Add comments to functions that are missing a
7946         description.
7947         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
7949 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
7951         * graphite.c (nb_params_in_scop): Moved...
7952         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7953         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7954         (clast_to_gcc_expression): Reduce column size to less than 80.
7955         (graphite_create_iv): Return the new name of the IV.
7956         (find_transform): Set options->esp and options->cpp.
7957         (gloog): Comment out the invalidation of the old loop code.
7958         (initialize_dependence_polyhedron): Replace scop_nb_params with
7959         nb_params_in_scop.
7961         * graphite.h (nb_params_in_scop): ... here.
7962         (scop_nb_params): Removed.
7963         (loop_domain_dim): Return something even when the loop was not
7964         found in the hash table: avoid ICEing on all the graphite.exp
7965         testcases.
7967 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7969         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7971         * graphite.c (build_scop_dynamic_schedules): Schedule is built
7972         according to nesting level.
7973         (find_scop_parameters): Call instantiate_parameters.
7974         (scan_tree_for_params): Extend it to handle general affine bounds.
7975         Inner loop bound can depend on outer loop induction variable.
7976         (setup_cloog_loop): tmp variable is allocated on stack. Call
7977         instantiate_parameters with respect to outermost_loop_in_scop.
7978         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7979         graphite.h.
7980         (create_empty_loop): Function loopify should be given edge
7981         probability, instead of edge frequency. Dominance relation from
7982         switch_bb to loop_header.
7983         (clast_to_gcc_expression): Added handling of clast_reduction node.
7984         (gloog): New functionality for removing old loop.
7985         (test_dependence): Factored out from build_rdg_all_levels.
7986         (build_rdg_all_levels): Dependence testing factored out to
7987         test_dependence function.
7989         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7990         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7991         from graphite.c
7993 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
7995         * graphite.c (free_scop, param_index, initialize_cloog_names,
7996         nb_params_in_scop): Use name_tree map instead of just a tree
7997         for keeping track of the variable name associated to that tree.
7998         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7999         clast_to_gcc_expression, graphite_create_iv,
8000         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
8001         graphite_stmt_to_gcc_stmt): New.
8002         (gloog): Call these.
8003         * graphite.h (struct name_tree): New.
8004         (struct scop): Use name_tree instead of tree for params.
8005         Store a vector of name_tree for new_ivs.
8006         (SCOP_NEWIVS): New.
8007         (scop_nb_params): Use name_tree instead of tree.
8009 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
8010             Sebastian Pop  <sebastian.pop@amd.com>
8012         * tree-bounds.c: New.
8013         * tree-bounds.h: New.
8014         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
8015         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
8016         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
8017         flag_mudflap.
8018         * gcc.c: Same.
8019         * toplev.c: Same.
8020         * c-cppbuiltin.c: Same.
8021         * c-pragma.c: Same.
8022         * common.opt: Same.
8023         * varasm.c: Same.
8024         * tree-outof-ssa.c: Same.
8025         * c-common.c: Same.
8026         * Makefile.in: Same.
8028 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
8029             Sebastian Pop  <sebastian.pop@amd.com>
8031         * tree-loop-distribution.c (remaining_stmts,
8032         upstream_mem_writes): Removed static variables.
8033         (copy_loop_before, create_bb_after_loop,
8034         mark_nodes_having_upstream_mem_writes, free_rdg_components,
8035         rdg_build_components, rdg_build_partitions,
8036         dump_rdg_partitions): Extern.
8037         (generate_loops_for_partition, generate_code_for_partition): Do not
8038         return a bool.
8039         (already_processed_vertex_p, predecessor_has_mem_write,
8040         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
8041         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
8042         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
8043         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
8044         Pass remaining_stmts and upstream_mem_writes as parameters.
8045         (rdg_component): Moved...
8046         (build_rdg_partition_for_component): Do not aggregate components when
8047         flag_streamize_loops is set.
8048         (gen_sequential_loops): New.
8049         (ldist_gen): Call gen_sequential_loops.
8051         * tree-pass.h (pass_loop_streamization): Declared.
8053         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
8054         basic blocks when loops structures exist.
8056         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
8058         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
8060         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
8061         eliminate_local_variables_stmt, eliminate_local_variables,
8062         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
8063         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
8064         of code delimited by two edges in the CFG.
8065         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
8066         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
8067         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
8068         the case of parallelisation of reductions.
8069         (create_loop_fn): Extern.
8070         (create_omp_parallel_region): New.
8072         * tree-data-ref.c (dump_data_dependence_relation): Don't call
8073         dump_data_reference for printing dra and drb.
8074         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
8075         RDGE_RELATION.
8076         (build_rdg): Don't call free_dependence_relations for the moment, as
8077         we attach dependence relations on each edge of the RDG.
8078         To be fixed later.
8080         * tree-data-ref.h (rdg_component): ...here.
8081         (struct rdg_edge): New field ddr_p relation.
8082         (RDGE_RELATION): New.
8083         (create_bb_after_loop, copy_loop_before,
8084         mark_nodes_having_upstream_mem_writes, rdg_build_components,
8085         rdg_build_partitions, dump_rdg_partitions,
8086         free_rdg_components): Declared.
8088         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
8089         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
8091         * tree-loop-streamization.c: New.
8093         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
8094         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
8096         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
8098         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
8100         * passes.c: Schedule pass_loop_streamization.
8102 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
8104         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
8105         update comment.
8107 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
8109         * graphite.c (dot_all_scops): Update formatting.
8110         Bbs can now be part of more than one SCoP.
8112 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
8114         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
8115         malloc problems.
8116         (loop_domain_dim): Check for unregistered toplev SCOP loop.
8117         * graphite.h (loop_to_cloog_loop): New.
8119 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8121         * graphite.c (loop_domain_dim, ref_nb_loops,
8122         loop_iteration_vector_dim): New.
8123         (build_access_matrix_with_af, build_access_matrix,
8124         initialize_dependence_polyhedron): Fixed for new matrix layout.
8125         No longer assume that all iteration domains are of the same
8126         dimensionality.
8128 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
8130         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
8131         defined in a loop at depth 0 is invariant.
8132         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
8133         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
8134         be called at loop depth 0.
8136         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
8137         a parameter.
8138         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
8139         (down_open_scop): Removed.
8140         (loop_in_scop_p): Redefined.
8141         (scop_affine_expr): New argument: scop.
8142         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
8143         a harmful statement ending a scop.
8144         (basic_block_simple_for_scop_p): New argument: scop.
8145         (get_loop_start): Removed.
8146         (new_scop): Initialize SCOP_LOOPS.
8147         (free_scop): Free SCOP_LOOPS.
8148         (succs_at_same_depth, preds_at_same_depth): New.
8149         (end_scop): Test the validity of a scop.
8150         (add_dominators_to_open_scops): New.
8151         (test_for_scop_bound): Call add_dominators_to_open_scops.
8152         Add cases for opening and closing multiple scops.
8153         (build_scops, build_scop_bbs): Iterate over basic blocks in
8154         depth first order.
8155         (build_graphite_bb): Pass scop directly.
8156         (dfs_bb_in_scop_p): New.
8157         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
8158         several times.
8159         (nb_loops_around_gb): Use loop_in_scop_p.
8160         (schedule_to_scattering): Disabled for the moment the code computing
8161         the "textual order for outer loop".
8163         * graphite.h (struct scop): New field loops.
8164         (SCOP_LOOPS): New.
8165         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
8167         * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
8169 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
8170             Sebastian Pop  <sebastian.pop@amd.com>
8172         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
8173         * common.opt (fstreamize-loops): New.
8174         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
8175         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
8176         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
8177         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
8179 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8181         * tree-data-ref.c (build_empty_rdg): New.
8182         (build_rdg): Use it.
8183         * tree-data-ref.h (build_empty_rdg): Declared.
8184         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
8185         (find_vertex_for_stmt): Removed.
8186         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
8188 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
8190         * tree-loop-distribution.c (generate_builtin): After cancelling the
8191         loop tree, also delete basic blocks.
8192         (rdg_flag_uses): Stop recursion when a vertex has already been
8193         processed.
8195 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8197         * graphite.c (build_scop_alpha): Removed.
8198         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
8199         and dump_dependence_graph to avoid compiler warnings.
8201 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8203         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
8204         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
8205         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
8206         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
8207         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
8208         (initialize_dependence_polyhedron, find_vertex_for_stmt,
8209         initialize_data_dependence_polyhedron, is_empty_polyhedron,
8210         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
8211         dump_dependence_graph): New.
8212         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
8213         (GBB_ALPHA): New.
8214         (struct scop): New field loop2cloog_loop.
8215         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
8216         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
8218 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8220         * graphite.c (build_graphite_bb): Fix initialization
8221         of the graphite basic block.
8223 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
8225         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
8226         loop domain matrix.  Pass in the number of loops contained in the
8227         constraint matrix.
8228         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
8229         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
8230         loops that are not surrounding the current loop are not represented
8231         in the domain constraint matrix.
8232         (build_scop_iteration_domain): Initial domain constraint matrix
8233         contains only the eq/ineq, cst, and scop parameters columns.
8235 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8237         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
8238         (print_graphite_bb): Print scattering.
8240 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8242         * graphite.c (initialize_cloog_names): Initialize names of
8243         scattering variables.
8245 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8247         * graphite.c (dot_all_scops_1): Disable debug output while
8248         printing graph.
8250 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8252         * graphite.c (find_transform): Change cloog output language to C.
8254 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
8256         * tree-loop-distribution.c (generate_memset_zero,
8257         generate_builtin, generate_code_for_partition,
8258         rdg_flag_all_uses): New.
8259         (rdg_flag_uses): Gather in the same partition the statements defining
8260         the VUSES of the current statement.
8261         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8262         Gather in the same partition not only the stores to the same memory
8263         access, but also the reads.
8264         (ldist_generate_loops): Renamed ldist_gen.
8266 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
8267             Tobias Grosser  <grosser@fmi.uni-passau.de>
8269         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8270         next pointer, don't use the inner pointer.
8272 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
8274         * graphite.c (dot_all_scops, dot_all_scops_1): New.
8275         (find_transform): Call dot_all_1.
8276         * graphite.h (dot_all_scops): Declared.
8278 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
8280         * tree-loop-distribution.c: Fix apsi.f ICE.
8281         (create_bb_after_loop): New.
8282         (generate_loops_for_partition): Use it.
8283         * gfortran.dg/ldist-1.f90: New.
8285         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8286         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8288 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8290         * graphite.c (find_transform): Dump cloog program sent to cloog.
8292 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8294         * graphite.c (initialize_cloog_names): Initialize cloog
8295         iterator names.
8297 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8299         * graphite.c (build_scop_context): Fix typo, for the matrix
8300         format: insert '0 >= 0' instead of '-1 >= 0'.
8302 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8304         * Fix merge problems.
8306 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8308         * graphite.c (setup_cloog_loop): Fix typo.
8310 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8312         * doc/invoke.texi (-ftree-loop-distribution): Documented.
8313         * tree-loop-distribution.c: Reimplemented.
8314         * tree-pass.h (pass_loop_distribution): New.
8315         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8316         print_loops.
8317         * graphds.h (struct graph): New field indexes.
8318         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8320         * tree-vect-analyze.c: Remove declaration of static functions when not
8321         needed.
8322         * tree-vectorizer.c: Same.
8323         (rename_variables_in_loop): Now extern.
8324         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8325         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
8326         calling redirect_edge_and_branch_force.
8328         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8330         * tree-data-ref.c: Don't include tree-chrec.h.
8331         (debug_data_dependence_relations): New.
8332         (dump_data_dependence_relation): Call dump_data_reference on data refs
8333         in the relation.
8334         (same_access_functions): Moved...
8335         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8336         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8337         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8338         struct rdg_vertex_info, ): New.
8339         (create_rdg_edge_for_ddr): Compute the dependence level before looking
8340         at DDR_REVERSED_P.
8341         (create_rdg_vertices): Initialize the htab of graph->indexes.
8342         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8343         (stmts_from_loop): Don't save LABEL_EXPR.
8344         (hash_stmt_vertex_info, eq_stmt_vertex_info,
8345         hash_stmt_vertex_del): New.
8346         (build_rdg): Initialize rdg->indexes.
8347         (free_rdg, stores_from_loop, ref_base_address,
8348         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8349         have_similar_memory_accesses_1, ref_base_address_1,
8350         remove_similar_memory_refs): New.
8352         * tree-data-ref.h: Include tree-chrec.h.
8353         (debug_data_dependence_relations): Declared.
8354         (same_access_functions): ...here.  Now static inline.
8355         (ddr_is_anti_dependent, ddrs_have_anti_deps,
8356         ddr_dependence_level): New.
8357         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8358         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8359         RDG_MEM_READS_STMT): New.
8360         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8361         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8362         rdg_vertex_for_stmt): Declared.
8363         (struct rdg_edge): New field level.
8364         (RDGE_LEVEL, free_rdg): New.
8365         (stores_from_loop, remove_similar_memory_refs,
8366         rdg_defs_used_in_other_loops_p,
8367         have_similar_memory_accesses): Declared.
8368         (rdg_has_similar_memory_accesses): New.
8370         * lambda.h (dependence_level): New.
8371         * common.opt (ftree-loop-distribution): New.
8372         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8373         (print_loop_ir): Renamed print_loops.
8374         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8375         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8376         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8377         (tree-loop-distribution.o): Added.
8378         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8379         (mark_virtual_ops_in_bb): New.
8380         (print_loops_bb, debug_loop_num, debug_loop): New.
8381         * passes.c: Scheduled pass_loop_distribution.
8383 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8385         * graphite.c (scan_tree_for_params): Correct the number of columns
8386         for polylib format.
8387         (nb_flat_iterator): New.
8388         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8389         (build_scop_iteration_domain): Correct the number of columns for
8390         polylib format.
8392 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8394         * Merge from mainline (129697:130800).
8396 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
8398         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8399         dominated by SCoP's exit.
8400         (graphite_transform_loops): Compute post dominators.
8402 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8404         * Merge from mainline (127169:129697).
8406 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8408         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
8409         parameter for the basic block that contains the expression.  Use
8410         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8411         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8412         the expression.
8413         * graphite.h (gbb_loop): New.
8414         (GBB_LOOP): Removed.
8416 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8418         * Makefile.in: Fix merge problem.
8420 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8422         * Merge from mainline (125309:127169).
8423         * tree-loop-distribution.c: Disabled.
8425 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
8427         * Merge from mainline (r123693:125309).
8429 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
8431         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8432         correct_modify_p
8433         (correct_modify_p, check_statements, number_of_lvalue_uses,
8434         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8435         instead of MODIFY_EXPR.
8436         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
8437         and push new edges.
8439 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
8441         * tree-loop-distribution.c (struct rdg): Replace arrays by
8442         VECs for edges and vertices.
8443         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8444         (RDGV_NB_PARTITIONS): New.
8445         (PRDG_NBV, PRDG_NBE): Removed.
8446         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8447         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8448         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8450 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
8451             Sebastian Pop  <sebpop@gmail.com>
8453         * doc/invoke.texi (-ftree-loop-distribution): Document.
8454         * tree-loop-distribution.c: New file.
8455         * tree-pass.h (pass_loop_distribution): Declared.
8456         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8457         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8458         and set reversed_p.
8459         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8460         (DDR_REVERSED_P): New.
8461         * common.opt (-ftree-loop-distribution): New.
8462         * tree-flow.h (distribute_loops): Declared.
8463         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8464         * passes.c (init_optimization_passes): Schedule loop distribution.
8466 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
8468         * graphite.c (print_graphite_bb): Don't call dump_data_references.
8469         (print_scop): Don't print when scop is NULL.
8470         (build_scop_context, find_transform): Don't output to stderr.
8472 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
8474         * tree-data-ref.c: Don't include graphite.h.
8475         Comment out the code for printing data reference's scop.
8476         (build_access_matrix_with_af): Moved...
8477         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8478         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
8479         (print_graphite_bb): Print basic block's schedule.
8480         (print_scop): Don't print the schedule, call cloog's pretty printer.
8481         (bb_in_scop_p): A basic block is in a scop only if it is both
8482         dominated and postdominated by the scop's entry and exit basic blocks.
8483         (function_parameter_p): New.
8484         (invariant_in_scop_p): Use function_parameter_p.
8485         (new_scop, save_scop): New.
8486         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8487         save_scop.
8488         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8489         (loop_in_scop_p): New.
8490         (scop_record_loop): Use loop_in_scop_p.
8491         (build_scop_domain): Renamed build_scop_iteration_domain.
8492         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8493         nb_params_in_scop, build_scop_context, first_loop_in_scop,
8494         setup_cloog_loop, dot_scop_1, dot_scop): New.
8495         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8496         (struct scop): Add a pointer to cloog's representation of a program.
8498 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8500         * doc/invoke.texi (-ftree-check-verbose): Renamed
8501         -ftree-checks-verbose.
8502         * common.opt (flag_tree_check_verbose): Renamed
8503         flag_tree_checks_verbose.
8504         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8506 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8508         * configure: Regenerated.
8509         * config.in: Regenerated.
8510         * tree-ssa-loop.c (graphite_transforms): Execute
8511         graphite_transform_loops only when HAVE_cloog.
8512         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8513         * graphite.c: Include polylibgmp.h and cloog.h.
8514         (graphite_transform_loops): Removed loops parameter.
8515         * tree-flow.h (graphite_transform_loops): Update declaration.
8516         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8517         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8518         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8519         (OBJS-common): Remove dependence on graphite.o.
8520         (BACKEND): Depend on @GRAPHITE@.
8522 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
8524         * doc/invoke.texi (-ftree-check-verbose): Documented.
8525         * gcc.dg/tree-checker/tree-checks-1.c: New.
8526         * gcc.dg/tree-checker/tree-checks-2.c: New.
8527         * gcc.dg/tree-checker/tree-checks-3.c: New.
8528         * gcc.dg/tree-checker/tree-checks-4.c: New.
8529         * gcc.dg/tree-checker/tree-checks.exp: New.
8530         * gcc.dg/tree-checker/condates.crp: New.
8531         * common.opt (ftree-checks-verbose): New.
8532         * tree-check.c (tree_check_warning): Move extra stderr output
8533         under control of flag_tree_check_verbose.
8535 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
8537         * tree-match.c: Fix comments formatting.
8538         * tree-match.h: Fix comments formatting.
8539         * tree-check.c: Fix comments formatting.
8540         (tree_check_init): Restructure.
8542 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
8544         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8546 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
8548         * Merge from mainline (r120733:123693).
8550 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
8552         * condate.y: New file.
8553         * tree-match.h (struct patt_info_s): New field sign.
8554         (struct condate_s): New field msg.
8555         (normalize_condate, name_condate, add_condate): New.
8556         (conds[], condate_parse): Made extern.
8557         * tree-check.c (tree_check_warning): First arg changed to cond;
8558         warning reformatted.
8559         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8560         (tree_scan): New.
8561         (tree_check): Process trivial condates.
8562         (read_delimited_string): Removed.
8563         (print_cond): Print name and msg.
8564         (conds[]): Made extern.
8565         (parse_tree_check_file_once): Rewritten to use the parser in
8566         condate.y.
8567         Processing of option --tree_check_string moved to tree_scan().
8568         * Makefile.in: Added condate.y
8570 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
8572         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8573         Use VECs instead of varrays.
8574         * diagnostic.h (lazy_dump_generic_node): Update declaration.
8575         * Makefile.in (pretty-print.o): Depend on vec.h.
8576         * pretty-print.c: Include tree.h and vec.h.
8577         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8578         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8579         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8580         pp_free_list): Use VECs instead of varrays.
8581         * pretty-print.h: Do not include varray.h.
8582         (struct tree_chunk_s): Declaration moved before its use.
8583         (output_buffer): Rename varray field to chunks.
8584         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8585         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8586         save_global_holes): Use VECs instead of varrays.
8587         * tree-match.h: Declare VECs of cfg_node, and hole_p.
8588         * tree-check.c (scan_cfg_stmts, push_node,
8589         print_matching_stmt): Removed.
8590         (tree_check_instance, push_global_holes_if_new, tree_check,
8591         execute_tree_check): Use VECs instead of varrays.
8592         (gate_tree_check): Don't execute the CFG check when basic_block_info
8593         is not available.
8595 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8597         * Merge from mainline (r115016:120733).
8599 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8601         * Merge from mainline (r117632:117661).
8603 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8605         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8606         * tree-pass.h (TDF_DEBUG, debug_p): New.
8607         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8608         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8609         get_loop_exit_condition, analyze_evolution_in_loop,
8610         analyze_initial_condition, analyze_scalar_evolution,
8611         instantiate_parameters, number_of_latch_executions): Use debug_p.
8612         * tree-chrec.c (chrec_apply): Use debug_p.
8613         * tree-data-ref.c: Include graphite.h.
8614         (dump_data_reference): Print also the access matrix.
8615         (analyze_array, analyze_indirect_ref, init_data_ref,
8616         analyze_offset_expr, address_analysis, object_analysis,
8617         create_data_ref, finalize_ddr_dependent,
8618         non_affine_dependence_relation, analyze_ziv_subscript,
8619         analyze_siv_subscript_cst_affine,
8620         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8621         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8622         analyze_miv_subscript, analyze_overlapping_iterations,
8623         build_classic_dist_vector, subscript_dependence_tester,
8624         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8625         (build_access_matrix_with_af): No longer static.
8626         * tree-data-ref.h (scop_p): ... declaration here.
8627         (data_reference.scop): New field.
8628         (DR_SCOP, DR_ACCESS_MATRIX): New.
8629         (build_access_matrix_with_af, dr_num_subscripts): Declared.
8630         * graphite.c (print_graphite_bb): Call dump_data_references.
8631         (print_scop): Use scop_nb_loops and scop_dim_domain.
8632         (test_for_scop_bound): Use debug_p.
8633         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8634         scop_nb_params.
8635         (scop_loop_index): Moved...
8636         (scop_record_loop): New.
8637         (build_scop_loop_nests): Use scop_record_loop.
8638         (build_scop_domain): Use scop_dim_domain.
8639         (build_access_matrix): Implemented.
8640         (build_scop_canonical_schedules): Use scop_nb_loops.
8641         (build_graphite_bb): Initialize GBB_SCOP.
8642         * graphite.h (scop_p): Moved...
8643         (graphite_bb.scop): New field.
8644         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8645         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8646         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8647         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8648         scop_loop_index): New.
8649         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8651 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
8653         * Merge from mainline (r117661:120450).
8655 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
8657         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8658         at the first declaration outside the varying loop, instantiate as
8659         far as possible.
8660         * tree-chrec.c (for_each_scev_op): New.
8661         * tree-chrec.h (for_each_scev_op): Declared.
8662         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8663         * tree-data-ref.c (get_references_in_stmt,
8664         find_data_references_in_stmt): New, from trunk.
8665         (find_data_references_in_loop): Use get_references_in_stmt
8666         and find_data_references_in_loop, modified as in trunk.
8667         (build_access_matrix_with_af): New.
8668         * tree-data-ref.h (data_reference): Add a field access_matrix.
8669         (data_ref_loc): New, as in trunk.
8670         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8671         invariant_in_scop_p, param_index, scan_tree_for_params,
8672         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8673         idx_record_param, idx_record_params, build_access_matrix,
8674         build_scop_data_accesses, build_scop_canonical_schedules,
8675         build_graphite_bb, build_scop_bbs, find_params_in_bb,
8676         build_scop_params): New.
8677         * graphite.h (graphite_bb): New.
8678         (scop): Add fields static_schedule, params, loop_nest,
8679         iteration_domain.
8680         * lambda.h: Declare vecs of lambda_matrix.
8681         * tree-flow.h (print_loop_ir_bb): Declared.
8682         * tree-cfg.c (print_loop_ir_bb): New.
8683         (print_loop): Use print_loop_ir_bb.
8685 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
8687         * Merge from mainline (r115016:117632).
8689 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
8691         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8692         break due to a warning.
8694 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
8696         * graphite.c (print_scops, debug_scops): New.
8697         (graphite_transform): Renamed graphite_find_transform.
8698         * graphite.h (debug_scops): Declared.
8700 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
8702         * tree-match.c: Reformat following the GNU style.
8703         * tree-match.h: Reformat following the GNU style.
8704         * tree-pattern.h: Removed empty file.
8705         * Makefile.in: Remove references to tree-pattern.h.
8706         * tree-check.c: Reformat following the GNU style.
8707         (execute_tree_check): Move gate condition code to...
8708         (gate_tree_check): ...here.  New function.
8709         (pass_check): Use the gate function.
8711 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
8713         * tree-pattern.h: New. Tree pattern matching and checking using
8714         concrete syntax.
8715         * tree-check.c: New. Tree/CFG checking pass.
8716         * tree-match.c: New. Library for tree pattern matching.
8717         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8718         * toplev.c, flags.h: Add globals for tree-check pass.
8719         * Makefile.in: Integrate the files in tree-check pass.
8720         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8721         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8722         Introduce a "lazy" pretty-print mode.
8723         * tree.c, tree.h: Add tree_name.
8725 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
8727         * doc/invoke.texi (-fgraphite): Correct typo.
8728         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8729         use of print_loop_ir.
8730         * gcc.dg/graphite/scop-1.c: New.
8731         * gcc.dg/graphite/scop-2.c: New.
8732         * gcc.dg/graphite/graphite.exp: New.
8733         * graphite.c: Include domwalk.h.
8734         (print_scop): Print only the entry and exit blocks.
8735         (debug_scop): No longer static.
8736         (affine_expr): Fix formating.  Return also true when the expression is
8737         constant.
8738         (stmt_simple_for_scop_p): Fix formating.
8739         (build_scops): Use domwalk.
8740         (get_loop_start, end_scop, test_for_scop_bound): New.
8741         (graphite_transform_loops): Avoid printing on stderr.
8742         * graphite.h (debug_scop): Declared.
8743         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8744         * Makefile.in (graphite.o): Depend on domwalk.h.
8745         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8746         declarations for static functions.
8747         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8748         controlling output verbosity.
8750 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
8751             Plesco Alexandru  <shurikx@gmail.com>
8753         * doc/invoke.texi (-fgraphite): Document.
8754         * tree-pass.h (pass_graphite_transforms): Declared.
8755         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8756         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8757         (pass_graphite_transforms): Defined.
8758         * tree-data-ref.c (free_data_ref, data_reference): Extern.
8759         * tree-data-ref.h (free_data_ref, data_reference): Declared.
8760         * graphite.c, graphite.h: New.
8761         * common.opt (fgraphite): Declared.
8762         * tree-flow.h (graphite_transform_loops): Declared.
8763         * Makefile.in (OBJS-common): Add graphite.o.
8764         (graphite.o): New rule.
8765         * passes.c (pass_graphite_transforms): Scheduled.