OSDN Git Service

2011-01-14 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2010-12-21  Sebastian Pop  <sebastian.pop@amd.com>
2
3         PR tree-optimization/47021
4         * graphite-sese-to-poly.c (scan_tree_for_params): Handle ADDR_EXPR.
5
6 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
7
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.
11
12 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
13
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.
25
26 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
27
28         * sese.c (rename_uses): Do not handle ADDR_EXPR in LHS of assignments.
29
30 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
31
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.
82
83         * gcc.dg/graphite/pr45297.c: New.
84
85 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
86
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.
93
94 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
95
96         * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
97         when replacing a constant in an ADDR_EXPR.
98
99 2010-10-20  Sebastian Pop  <sebastian.pop@amd.com>
100
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.
108
109 2010-09-24  Sebastian Pop  <sebastian.pop@amd.com>
110
111         PR middle-end/45758
112         * graphite.c (graphite_initialize): Call scev_reset.
113
114 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
115
116         * sese.h (scev_analyzable_p): Return false for real or floating
117         point.  Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
118
119 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
120
121         PR middle-end/45758
122         * gfortran.dg/graphite/pr45758.f90: New.
123
124 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
125
126         * graphite-scop-detection.c (is_scop_p): Free bblist.
127
128 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
129
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.
136
137 2010-09-21  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
138
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.
145
146 2010-09-20  Sebastian Pop  <sebastian.pop@amd.com>
147
148         Revert previous patch "New flag: -fgraphite-dump-cloog."
149
150 2010-09-20  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
151
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.
157
158 2010-09-20  Sebastian Pop  <sebastian.pop@amd.com>
159
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.
166
167 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
168
169         * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
170         over pbb_dim_iter_domain.
171
172 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
173
174         * graphite-flattening.c: Fix comments.
175
176 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
177
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.
188
189 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
190
191         * graphite-poly.c (cloog_checksum): New.
192         * graphite-poly.h (cloog_checksum): Declared.
193
194 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
195
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.
200
201 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
202
203         * graphite-poly.h (lst_update_scattering_seq): Removed.
204         (lst_update_scattering): Correctly handle outermost loop dewey
205         renumbering.
206
207 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
208
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.
212
213 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
214
215         * graphite-poly.c (apply_poly_transforms): Do not abort when the
216         transform read from disk is not legal.  Call fatal_error instead.
217
218 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
219
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.
223
224 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
225
226         * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
227
228 2010-09-02  Vladimir Kargov  <kargov@gmail.com>
229
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.
239
240 2010-08-24  Sebastian Pop  <sebastian.pop@amd.com>
241
242         * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
243
244 2010-08-24  Sebastian Pop  <sebastian.pop@amd.com>
245
246         * graphite-dependences.c (dot_deps): Avoid set but not used warning.
247         (dot_deps_stmt): Same.
248         * graphite-poly.c (dot_lst): Same.
249
250 2010-08-23  Sebastian Pop  <sebastian.pop@amd.com>
251
252         * graphite-blocking.c (scop_do_strip_mine): Do not call
253         graphite_legal_transform.
254         (scop_do_block): Same.
255
256 2010-08-20  Vladimir Kargov  <kargov@gmail.com>
257
258         * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
259         description.
260
261 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
262
263         PR middle-end/45230
264         * gcc.dg/graphite/id-pr45230.c: New.
265
266 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
267
268         * tree-scalar-evolution.c (instantiate_array_ref): New.
269         (instantiate_scev_r): Also handle ARRAY_REFs.
270
271 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
272
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.
279
280 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
281
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.
285
286 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
287
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.
292
293 2010-08-18  Vladimir Kargov  <kargov@gmail.com>
294
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.
298
299 2010-08-17  Sebastian Pop  <sebastian.pop@amd.com>
300
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.
304
305 2010-08-17  Riyadh Baghdadi  <baghdadi.mr@gmail.com>
306             Sebastian Pop  <sebastian.pop@amd.com>
307
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.
310
311 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
312
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.
319
320 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
321
322         * toplev.c (process_options): Disable graphite loop optimization
323         options when -fgraphite-read flag is used.
324
325 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
326
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.
332
333 2010-08-17  Tobias Grosser  <grosser@fim.uni-passau.de>
334
335         * graphite-scop-detection.c (graphite_can_represent_scev): Remove
336         redundant checks.
337
338 2010-08-12  Sebastian Pop  <sebastian.pop@amd.com>
339
340         * graphite-clast-to-gimple.c (precision_for_value): Adjust
341         computation of precision by 1.
342
343 2010-08-12  Riyadh Baghdadi <baghdadi.mr@gmail.com>
344
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.
358
359 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
360
361         * graphite-poly.c: Change include order.
362
363 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
364
365         * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
366         (cloog_matrix_nrows): New.
367
368 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
369
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.
377
378 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
379
380         * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
381         (openscop_print_pdr_polyhedron): Print pph.
382
383 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
384
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.
388
389 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
390
391         * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
392         priority signed types.
393
394 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
395
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.
398
399 2010-07-29  Riyadh Baghdadi <baghdadi.mr@gmail.com>
400
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.
422
423 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
424
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.
430
431 2010-07-28  Sebastian Pop  <sebastian.pop@amd.com>
432
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.
436
437         * gfortran.dg/graphite/id-22.f: New.
438
439 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
440
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.
449
450 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
451
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.
470
471 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
472
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.
498
499 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
500
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.
513
514 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
515
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.
524
525 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
526
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.
560
561 2010-07-27  Sebastian Pop  <sebastian.pop@amd.com>
562
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.
570
571         * gcc.dg/graphite/id-26.c: New.
572
573 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
574
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.
583
584 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
585
586         * graphite-sese-to-poly.c
587         (rewrite_commutative_reductions_out_of_ssa_loop): Call
588         scev_analyzable_p only on is_gimple_reg
589
590         * gcc.dg/graphite/id-25.c: New.
591
592 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
593
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.
599
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.
603
604 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
605
606         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
607         SSA_NAME_DEF_STMT only on SSA_NAMEs.
608
609         * gcc.dg/graphite/id-24.c: New.
610
611 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
612
613         * tree-scalar-evolution.c (instantiate_scev_name): Do not
614         instantiate default definitions.
615
616 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
617
618         * graphite-scop-detection.c (is_valid_stmt_p): New.
619         (is_valid_bb_p): New.
620
621 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
622             Sebastian Pop  <sebastian.pop@amd.com>
623
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.
630
631 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
632
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.
639
640 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
641
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.
651
652 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
653
654         * gcc.dg/tree-ssa/pr20742.c: New.
655
656 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
657
658         * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
659
660         * gcc.dg/graphite/id-23.c: New.
661
662 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
663
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.
666
667         * gfortran.dg/graphite/id-20.f: Adjust testcase.
668
669 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
670
671         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
672         handle SSA_NAME_IS_DEFAULT_DEF.
673
674 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
675
676         * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
677
678         * gcc.dg/graphite/pr42729.c: New.
679
680 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
681
682         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
683         case non close-phi nodes with one argument.
684
685 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
686
687         * sese.h (scev_analyzable_p): Scevs could be expressions without
688         chrecs and still be scev_analyzable_p.
689
690 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
691
692         * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
693
694 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
695
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.
703
704 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
705
706         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
707         handle GIMPLE_CALL.
708
709 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
710
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.
714
715 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
716
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.
761
762 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
763
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.
773
774 2010-07-15  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
775
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.
779
780 2010-07-07  Sebastian Pop  <sebastian.pop@amd.com>
781
782         * gfortran.dg/graphite/id-20.f: New.
783
784 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
785
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).
799
800 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
801
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.
845
846 2010-07-04  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
847
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.
860
861 2010-06-25  Vladimir Kargov  <kargov@gmail.com>
862
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.
873
874 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
875
876         * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
877         (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
878
879 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
880
881         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
882         rewrite_close_phi_out_of_ssa.
883
884         * gcc.dg/graphite/id-22.c: New.
885
886 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
887
888         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
889
890 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
891
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.
906
907 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
908
909         * graphite-clast-to-gimple.c (copy_renames): Removed.
910         (translate_clast_for): Do not call copy_renames.
911         (translate_clast_guard): Same.
912
913 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
914
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.
919
920 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
921
922         * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
923         Early return in when flag_associative_math is not set.
924
925 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
926
927         * gcc.dg/graphite/run-id-2.c: Call abort.
928
929 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
930
931         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
932         of SSA copies on edges except for loop->latch.
933
934 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
935
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.
941
942 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
943
944         * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
945
946 2010-06-15  Sebastian Pop  <sebastian.pop@amd.com>
947
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.
953
954         * gcc.dg/graphite/id-20.c: New.
955
956 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
957
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.
967
968 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
969
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.
980
981 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
982
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.
993
994 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
995
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.
1006
1007 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1008
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.
1013
1014 2010-06-11  Sebastian Pop  <sebastian.pop@amd.com>
1015
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.
1021
1022 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1023
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.
1027
1028 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1029
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.
1034
1035 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1036
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.
1042
1043 2010-06-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1044
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.
1051
1052 2010-06-02  Tobias Grosser  <grosser@fim.uni-passau.de>
1053
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.
1059
1060 2010-05-27  Tobias Grosser  <grosser@fim.uni-passau.de>
1061             Antoniu Pop  <antoniu.pop@gmail.com>
1062
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.
1107
1108 2010-05-26  Sebastian Pop  <sebastian.pop@amd.com>
1109
1110         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1111         size_one_node.
1112
1113 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
1114
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.
1117
1118 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
1119
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.
1124
1125 2010-04-12  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1126
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.
1173
1174 2010-04-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1175
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.
1217
1218 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1219
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.
1227
1228 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1229
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.
1234
1235 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1236
1237         PR middle-end/43519
1238         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1239         POINTER_PLUS_EXPR for pointer types.
1240
1241         * gcc.dg/graphite/id-19.c: New.
1242
1243 2010-04-04  Sebastian Pop  <sebastian.pop@amd.com>
1244
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.
1276
1277         * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1278
1279 2010-04-02  Sebastian Pop  <sebastian.pop@amd.com>
1280
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.
1285
1286 2010-04-01  Sebastian Pop  <sebastian.pop@amd.com>
1287
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.
1291
1292 2010-03-31  Sebastian Pop  <sebastian.pop@amd.com>
1293
1294         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1295         close phi nodes may have more than one argument.
1296
1297 2010-03-30  Richard Guenther  <rguenther@suse.de>
1298             Zdenek Dvorak  <ook@ucw.cz>
1299             Sebastian Pop  <sebastian.pop@amd.com>
1300
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.
1305
1306 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1307
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.
1359
1360 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1361
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.
1369
1370 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1371
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.
1377
1378 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1379             Richard Guenther  <rguenther@suse.de>
1380
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.
1386
1387         * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1388         * gcc.dg/graphite/id-pr43464-1.c: New.
1389
1390 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1391
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.
1395
1396         * gcc.dg/graphite/id-pr43464.c: New.
1397
1398 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1399
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.
1406
1407 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1408
1409         * passes.c (init_optimization_passes): Add pass_copy_prop
1410         after Graphite.
1411
1412 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1413
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 #.
1433
1434 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1435
1436         PR middle-end/43351
1437         * gcc.dg/graphite/id-pr43351.c
1438
1439 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1440
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.
1445
1446 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1447
1448         PR middle-end/43349
1449         * gfortran.dg/graphite/pr43349.f: New.
1450
1451 2010-03-11  Sebastian Pop  <sebastian.pop@amd.com>
1452
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.
1457
1458 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1459
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.
1465
1466 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1467
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.
1473
1474 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1475
1476         * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1477
1478 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1479
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.
1484
1485 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1486
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.
1491
1492 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1493
1494         * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1495         * graphite-sese-to-poly.h (build_poly_scop): Same.
1496
1497 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1498
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.
1504
1505 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1506
1507         * graphite-sese-to-poly.c (add_param_constraints): Use
1508         lower_bound_in_type and upper_bound_in_type.
1509
1510 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1511
1512         * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1513         instead of unsigned_type_node.
1514
1515 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1516             Reza Yazdani  <reza.yazdani@amd.com>
1517
1518         PR middle-end/43065
1519         * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1520         on pointer type parameters.
1521
1522         * gcc.dg/graphite/run-id-4.c: New.
1523
1524 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1525
1526         PR middle-end/43065
1527         * gcc.dg/graphite/run-id-3.c: New.
1528
1529 2010-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
1530             Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1531
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.
1538
1539 2010-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
1540
1541         * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1542         code generation with gloog_error.
1543
1544 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1545
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.
1550
1551 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1552
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.
1556
1557 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1558
1559         * graphite-dependences.c (map_into_dep_poly): Removed.
1560         (dependence_polyhedron_1): Use combine_context_id_scat.
1561
1562 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1563
1564         * graphite-poly.h (struct poly_scattering): Add layout documentation.
1565         (struct poly_bb): Same.
1566         (combine_context_id_scat): New.
1567
1568 2010-03-02  Sebastian Pop  <sebastian.pop@amd.com>
1569
1570         PR middle-end/42326
1571         * sese.c (name_defined_in_loop_p): Return false for default
1572         definitions.
1573
1574         * gcc.dg/graphite/pr42326.c: New.
1575
1576 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
1577
1578         * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1579         and clean up the logic.
1580
1581 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
1582
1583         * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1584         early return.
1585
1586 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1587
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.
1595
1596         * gcc.dg/graphite/pr43083.c: New.
1597
1598 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1599
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.
1603
1604         * gfortran.dg/graphite/pr43097.f: New.
1605
1606 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1607             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1608
1609         PR middle-end/43140
1610         * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1611
1612 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1613
1614         PR middle-end/43026
1615         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1616
1617         * g++.dg/graphite/pr43026.C: New.
1618
1619 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1620
1621         * Merge from mainline (154736:156693).
1622
1623 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
1624
1625         PR middle-end/43012
1626         * gcc.dg/graphite/pr43012.c: New.
1627
1628 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1629
1630         * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1631 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1632
1633         * g++.dg/graphite/pr42930.C: New.
1634
1635 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1636
1637         PR middle-end/42930
1638         * graphite-scop-detection.c (graphite_can_represent_scev): Call
1639         graphite_can_represent_init for MULT_EXPR.
1640
1641 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1642
1643         PR middle-end/42914
1644         PR middle-end/42530
1645         * graphite-sese-to-poly.c (remove_phi): New.
1646         (translate_scalar_reduction_to_array): Call remove_phi.
1647
1648         * gcc.dg/graphite/pr42530.c: New.
1649         * gcc.dg/graphite/pr42914.c: New.
1650
1651 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1652
1653         PR middle-end/42771
1654         * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1655         * graphite-clast-to-gimple.h (gloog): Update declaration.
1656         * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1657         * graphite-poly.h (struct poly_bb): Add missing comments.
1658         (struct scop): Add poly_scop_p field.
1659         (POLY_SCOP_P): New.
1660         * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1661         * graphite.c (graphite_transform_loops): Build the polyhedral
1662         representation for each scop before code generation.
1663         * sese.c (rename_variables_in_operand): Removed.
1664         (rename_variables_in_expr): Return the renamed expression.
1665         (rename_sese_parameters): New.
1666         * sese.h (rename_sese_parameters): Declared.
1667
1668         * gcc.dg/graphite/pr42771.c: New.
1669
1670 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1671
1672         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
1673         return 0 from main.
1674         * gcc.dg/graphite/block-1.c: Same.
1675         * gcc.dg/graphite/block-3.c: Same.
1676         * gcc.dg/graphite/block-4.c: Same.
1677         * gcc.dg/graphite/block-5.c: Same.
1678         * gcc.dg/graphite/block-6.c: Same.
1679         * gcc.dg/graphite/block-7.c: Same.
1680         * gcc.dg/graphite/interchange-0.c: Same.
1681         * gcc.dg/graphite/interchange-1.c: Same.
1682         * gcc.dg/graphite/interchange-10.c: Same.
1683         * gcc.dg/graphite/interchange-11.c: Same.
1684         * gcc.dg/graphite/interchange-12.c: Same.
1685         * gcc.dg/graphite/interchange-2.c: Same.
1686         * gcc.dg/graphite/interchange-3.c: Same.
1687         * gcc.dg/graphite/interchange-4.c: Same.
1688         * gcc.dg/graphite/interchange-5.c: Same.
1689         * gcc.dg/graphite/interchange-6.c: Same.
1690         * gcc.dg/graphite/interchange-7.c: Same.
1691         * gcc.dg/graphite/interchange-8.c: Same.
1692         * gcc.dg/graphite/interchange-9.c: Same.
1693         * gcc.dg/graphite/interchange-mvt.c: Same.
1694
1695 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1696
1697         * gfortran.dg/graphite/id-19.f: New.
1698         * gfortran.dg/graphite/pr14741.f90: New.
1699         * gfortran.dg/graphite/pr41924.f90: New.
1700         * gfortran.dg/graphite/run-id-2.f90: New.
1701
1702 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1703
1704         PR middle-end/42988
1705         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1706         to unknown_dependence.
1707         (graphite_legal_transform_dr): Handle the unknown_dependence.
1708         (graphite_carried_dependence_level_k): Same.
1709
1710 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1711
1712         * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1713
1714 2010-02-05  Sebastian Pop  <sebastian.pop@amd.com>
1715             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
1716
1717         PR middle-end/42637
1718         * graphite-dependences.c (build_lexicographical_constraint): Return
1719         a union of dependence polyhedra.
1720         (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1721
1722         * gcc.dg/graphite/block-0.c: Enable runtime check.  XFAILed.
1723         * gcc.dg/graphite/block-4.c: Same.
1724         * gcc.dg/graphite/block-7.c: Same.
1725         * gcc.dg/graphite/interchange-12.c: Same.
1726         * gcc.dg/graphite/interchange-mvt.c: Same.
1727         * gfortran.dg/graphite/interchange-1.f: XFAILed.
1728         * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1729         * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1730
1731 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1732
1733         * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1734         the execution check to FAIL.  This testcase is miscompiled by Graphite
1735         and the check should be re-enabled.
1736         * gcc.dg/graphite/interchange-mvt.c: Same.
1737         * gcc.dg/graphite/block-0.c: Same.
1738         * gcc.dg/graphite/block-4.c: Same.
1739         * gcc.dg/graphite/block-7.c: Same.
1740
1741 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1742
1743         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1744         * gcc.dg/graphite/scop-0.c: Fix spaces.
1745         * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1746         * gfortran.dg/graphite/block-2.f: Same.
1747         * gfortran.dg/graphite/block-3.f90: Same.
1748         * gfortran.dg/graphite/block-4.f90: Same.
1749         * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1750         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1751
1752 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1753
1754         * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1755         PDDR_ORIGINAL_SCATTERING_P.
1756         (pddr_is_empty): Rewritten.
1757         (print_dependence_polyhedron_layout): New.
1758         (print_pddr): New.
1759         (debug_pddr): New.
1760         (build_alias_set_powerset): Moved up.
1761         (poly_drs_may_alias_p): Moved up.
1762         (lexicographically_gt_p): Removed.
1763         (build_lexicographically_gt_constraint): Renamed
1764         build_lexicographical_constraint, reimplemented.
1765         (dependence_polyhedron_1): Simplified parameters.
1766         (dependence_polyhedron): Same.  Keep along empty PDDRs
1767         to make efficient use of the cache.
1768         (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1769         (graphite_legal_transform_dr): Rewritten.
1770         (graphite_legal_transform_bb): Pass fewer arguments to
1771         graphite_legal_transform_dr.
1772         (graphite_carried_dependence_level_k): Simplified implementation.
1773         (dot_original_deps_stmt_1): Call dependence_polyhedron.
1774         (dot_transformed_deps_stmt_1): Same.
1775         (dot_original_deps): Same.
1776         (dot_transformed_deps): Same.
1777         * graphite-dependences.h (struct poly_ddr): Added a new field
1778         original_scattering_p.
1779         (PDDR_ORIGINAL_SCATTERING_P): New.
1780         (print_pddr): Declared.
1781         (debug_pddr): Declared.
1782         * graphite-ppl.c: Clarify comment.
1783         * sese.h (print_gimple_bb): Removed unused declaration.
1784         (debug_gbb): Same.
1785
1786 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1787
1788         * g++.dg/graphite/graphite.exp: Rewritten.
1789         * gcc.dg/graphite/graphite.exp: Rewritten.
1790         * gfortran.dg/graphite/graphite.exp: Rewritten.
1791         * gcc.dg/graphite/block-0.c: Added runtime test.
1792         * gcc.dg/graphite/block-1.c: Same.
1793         * gcc.dg/graphite/block-3.c: Same.
1794         * gcc.dg/graphite/block-4.c: Same.
1795         * gcc.dg/graphite/block-5.c: Same.
1796         * gcc.dg/graphite/block-6.c: Same.
1797         * gcc.dg/graphite/block-7.c: Same.
1798         * gcc.dg/graphite/interchange-0.c: Same.
1799         * gcc.dg/graphite/interchange-1.c: Same.
1800         * gcc.dg/graphite/interchange-10.c: Same.
1801         * gcc.dg/graphite/interchange-11.c: Same.
1802         * gcc.dg/graphite/interchange-12.c: Same.
1803         * gcc.dg/graphite/interchange-2.c: Same.
1804         * gcc.dg/graphite/interchange-3.c: Same.
1805         * gcc.dg/graphite/interchange-4.c: Same.
1806         * gcc.dg/graphite/interchange-5.c: Same.
1807         * gcc.dg/graphite/interchange-6.c: Same.
1808         * gcc.dg/graphite/interchange-7.c: Same.
1809         * gcc.dg/graphite/interchange-8.c: Same.
1810         * gcc.dg/graphite/interchange-9.c: Same.
1811         * gcc.dg/graphite/interchange-mvt.c: Same.
1812         * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1813
1814 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1815
1816         * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1817           background.
1818
1819 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1820
1821         * common.opt: Add -fgraphite-cloog-opts.
1822         * graphite-clast-to-gimple.c (set_cloog_options): Same.
1823         * opts.c (decode_options): Same.
1824
1825 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1826
1827         * gcc.dg/graphite/id-17.c: New.
1828         * gcc.dg/graphite/pr41888.c: New.
1829         * gcc.dg/graphite/scop-22.c: New.
1830         * gfortran.dg/graphite/pr40982.f90: New.
1831
1832 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1833
1834         * graphite-dependences.c: Clarify comments.
1835         (build_pddr): Add an extra parameter direction.
1836         (graphite_legal_transform_dr): Use build_pddr.
1837         (dot_original_deps_stmt_1): Update use of build_pddr.
1838         (dot_transformed_deps_stmt_1): Same.
1839         (dot_original_deps): Same.
1840         (dot_transformed_deps): Same.
1841
1842         * gcc.dg/graphite/interchange-12.c: New.
1843         * gcc.dg/graphite/block-7.c: New.
1844
1845 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1846
1847         * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1848         (pddr_transformed_scattering): Removed.
1849         (graphite_legal_transform_dr): Use build_pddr.
1850         (dot_original_deps_stmt_1): Same.
1851         (dot_transformed_deps_stmt_1): Same.
1852         (dot_original_deps): Same.
1853         (dot_transformed_deps): Same.
1854
1855 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1856
1857         * graphite-dependences.c (lexicographically_gt_p): Add comments.
1858         (build_lexicographically_gt_constraint): Same.
1859         (dependence_polyhedron_1): Same.
1860         (dependence_polyhedron): Same.
1861
1862 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1863
1864         * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1865         (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1866         (lexicographically_gt_p): Change type of direction to int.
1867         (build_lexicographically_gt_constraint): Same.
1868         (dependence_polyhedron_1): Same.
1869         (dependence_polyhedron): Same.
1870         (pddr_original_scattering): Use integers for direction.
1871         (pddr_transformed_scattering): Same.
1872         (graphite_legal_transform_dr): Same.
1873         (graphite_carried_dependence_level_k): Same.
1874
1875 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1876
1877         * graphite-dependences.c (build_pairwise_constraint): Renamed
1878         ppl_build_relation.  Moved...
1879         (dr_equality_constraints): Use ppl_build_relation.
1880         (build_pairwise_scheduling_equality): Same.
1881         (build_pairwise_scheduling_inequality): Same.
1882         * graphite-ppl.c (ppl_build_relation): ...here.
1883         * graphite-ppl.h (ppl_build_relation): Declared.
1884
1885 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1886
1887         PR middle-end/42681
1888         * graphite-clast-to-gimple.c (gloog_error): New static variable.
1889         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1890         Set gloog_error when such an expression failed to be built.
1891         (translate_clast): Early return when gloog_error is set.
1892         (gloog): Clear gloog_error.  When gloog_error is set, call
1893         set_ifsese_condition to enable the original code.  Return the status
1894         of the code generation based on gloog_error.
1895         * sese.c (set_ifsese_condition): New.
1896         * sese.h (set_ifsese_condition): Declared.
1897
1898         * g++.dg/graphite/pr42681.C: New.
1899
1900 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1901
1902         PR middle-end/42732
1903         * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1904         rename_nb_iterations.
1905         * sese.c (rename_variables_in_operand): New.
1906         (rename_variables_in_expr): New.
1907         (rename_nb_iterations): New.
1908         (sese_adjust_liveout_phis): Update the rename_map.
1909         * sese.h (rename_nb_iterations): Declared.
1910         * tree-scalar-evolution.c (scev_reset_htab): New.
1911         (scev_reset): Call scev_reset_htab.
1912         * tree-scalar-evolution.h (scev_reset_htab): Declared.
1913
1914         * gfortran.dg/graphite/pr42732.f: New.
1915
1916 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
1917
1918         PR middle-end/42393
1919         * graphite-clast-to-gimple.c: Fix formatting.
1920         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1921         (expr_defined_in_loop_p): New.
1922         (add_loop_exit_phis): Also handle full expressions: remove from
1923         the rename_map the expressions defined in the loop that we're closing.
1924
1925         * gfortran.dg/graphite/pr42393-1.f90: New.
1926         * gfortran.dg/graphite/pr42393.f90: Add new flags
1927         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1928         make this testcase useful in the Graphite branch.
1929
1930 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
1931
1932         * graphite-scop-detection.c (exclude_component_ref): Removed.
1933         (is_simple_operand): Removed.
1934         (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1935
1936 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1937
1938         PR middle-end/42221
1939         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1940         the array indexing of ADDR_EXPRs.
1941
1942         * gcc.dg/graphite/pr42221.c: New.
1943
1944 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1945
1946         PR middle-end/42521
1947         * graphite.c (graphite_finalize): Call scev_reset.
1948         (graphite_transform_loops): Do not call scev_reset between the code
1949         generation of scops.
1950
1951         * gcc.dg/graphite/pr42521.c: New.
1952
1953 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1954
1955         * graphite-interchange.c (memory_stride_in_loop): Renamed
1956         pdr_stride_in_loop.
1957         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1958         (memory_strides_in_loop): Memoize the memory strides per loop.
1959         (lst_interchange_profitable_p): Do not initialize to zero the memory
1960         strides.
1961         * graphite-poly.h (struct lst): Add a field memory_strides.
1962         (LST_LOOP_MEMORY_STRIDES): New.
1963         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1964         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1965
1966 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1967
1968         * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1969         memory_strides_in_loop.  Gather memory strides on a whole loop.
1970         (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1971         (lst_interchange_profitable_p): Removed.
1972         (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1973
1974 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1975
1976         Revert patch 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1977         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1978         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1979         Remove context_loop and level.
1980
1981 2010-01-07  Richard Guenther  <rguenther@suse.de>
1982
1983         PR tree-optimization/42641
1984         * sese.c (rename_map_elt_info): Use the SSA name version, do
1985         not hash pointers.
1986
1987 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
1988
1989         * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1990         blocked" only when both the strip mine and the interchange have
1991         been applied.
1992
1993         * gcc.dg/graphite/block-2.c: Removed.
1994         * gcc.dg/graphite/block-3.c: Add scan pattern.
1995         * gcc.dg/graphite/block-4.c: Same.
1996         * gcc.dg/graphite/block-5.c: Same.
1997         * gcc.dg/graphite/block-6.c: Same.
1998
1999 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
2000
2001         * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
2002         before allocating a new one.
2003         (copy_renames): Check that slot is not NULL.
2004         (mark_bb_with_pbb): Same.
2005         (compute_cloog_iv_types_1): Same.
2006         * graphite-interchange.c (lst_perfect_nestify): Free the before,
2007         nest, and after LSTs.
2008         (lst_try_interchange_loops): Same.
2009
2010 2010-01-05  Sebastian Pop  <sebastian.pop@amd.com>
2011
2012         PR middle-end/42178
2013         * graphite-interchange.c (lst_try_interchange_loops): Do not return
2014         the before, nest, and after LSTs.
2015         (lst_try_interchange): Removed.
2016         (lst_interchange_select_inner): Do not iterate over the LSTs if they
2017         were modified.
2018         (lst_interchange_select_outer): Apply interchange on the outer loop
2019         until there are no more changes in the inner loops.
2020
2021 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2022
2023         Revert patch fixing PR middle-end/42221.
2024
2025 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2026
2027         PR middle-end/42180
2028         * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
2029         GIMPLE_CALL.
2030
2031         * gfortran.dg/graphite/pr42180.f90: Add compile flags.
2032
2033 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2034
2035         PR middle-end/42180
2036         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
2037         that contain only one statement.
2038
2039         * gfortran.dg/graphite/pr42180.f90: New.
2040
2041 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2042
2043         PR middle-end/42393
2044         * gfortran.dg/graphite/pr42393.f90: New.
2045
2046 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2047
2048         PR middle-end/42186
2049         * gfortran.dg/graphite/pr42186.f90: New.
2050
2051 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2052
2053         PR middle-end/42205
2054         * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
2055         Insert the reduction copy in the same block as the phi node.
2056         (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
2057
2058         * gcc.dg/graphite/pr42205-1.c: New.
2059         * gcc.dg/graphite/pr42205-2.c: New.
2060
2061 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2062
2063         PR middle-end/42221
2064         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2065         the array indexing of ADDR_EXPRs.
2066
2067         * gcc.dg/graphite/pr42221.c: New.
2068
2069 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2070
2071         PR middle-end/42178
2072         PR middle-end/42334
2073         * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
2074         index.  Call lst_interchange_select_inner only once.
2075         (lst_interchange_select_inner): Update use of lst_try_interchange.
2076         (lst_interchange_select_outer): Update.
2077
2078 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
2079
2080         PR middle-end/42178
2081         PR middle-end/42334
2082         * graphite-interchange.c (lst_try_interchange): Do not increment the
2083         the OUTER index when there is no AFTER kernel.  Do not increment the
2084         OUTER index for after processing the AFTER kernel.
2085         (lst_interchange_select_inner): Call lst_try_interchange only on loops.
2086         (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
2087         index.  Do not pass to lst_interchange_select_inner the OUTER index.
2088         (scop_do_interchange): Update use of lst_interchange_select_outer.
2089
2090         * gfortran.dg/graphite/graphite.exp
2091         (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
2092         * gfortran.dg/graphite/interchange-1.f: Add comment.  Clean
2093         the graphite dump file.
2094         * gfortran.dg/graphite/interchange-2.f: Same.
2095         * gfortran.dg/graphite/pr42334-1.f: New.
2096
2097 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
2098
2099         PR middle-end/42178
2100         PR middle-end/42334
2101         * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2102         that are empty.
2103         (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2104         (lst_try_interchange): Reimplemented.
2105         (lst_interchange_select_inner): Same.
2106         (lst_do_interchange): Renamed lst_interchange_select_outer.
2107         Reimplemented.
2108         (scop_do_interchange): Update use of lst_interchange_select_outer.
2109
2110         * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2111         * gcc.dg/graphite/block-0.c: Un-XFAILed.
2112         * gcc.dg/graphite/pr42211.c: New.
2113         * gfortran.dg/graphite/pr42334.f90: New.
2114
2115 2009-12-14  Sebastian Pop  <sebastian.pop@amd.com>
2116
2117         PR middle-end/42181
2118         * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2119         carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2120
2121         * gfortran.dg/graphite/pr42181.f90: New.
2122
2123 2009-12-12  Sebastian Pop  <sebpop@gmail.com>
2124
2125         PR middle-end/42284
2126         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2127         insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2128         (detect_commutative_reduction_arg): Simplified.
2129         (detect_commutative_reduction): Early return when the argument of
2130         the close phi is not of an SSA_NAME.
2131
2132         * gcc.dg/graphite/pr42284.c: New.
2133
2134 2009-12-11  Alexander Monakov  <amonakov@ispras.ru>
2135
2136         * dbgcnt.def (graphite_scop): New counter.
2137         * graphite.c: Include dbgcnt.h
2138         (graphite_transform_loops): Use new counter to limit transformations.
2139
2140 2009-12-08  Sebastian Pop  <sebpop@gmail.com>
2141
2142         PR middle-end/42285
2143         * graphite-scop-detection.c (graphite_can_represent_init): Also
2144         handle more complex MULT_EXPRs containing parameters by recursion
2145         on the structure.
2146
2147         * gfortran.dg/graphite/pr42285.f90: New.
2148
2149 2009-12-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2150
2151         * g++.dg/graphite/pr42130.C: Fix type.
2152
2153 2009-11-29  Alexander Monakov <amonakov@gcc.gnu.org>
2154
2155         * g++.dg/graphite/pr42130.C: Correct testcase.
2156
2157 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2158
2159         * Merge from mainline (154493:154734).
2160
2161 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2162
2163         * Merge from mainline (151362:154491).
2164
2165 2009-11-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2166
2167         * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2168         graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2169
2170 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2171
2172         PR middle-end/42130
2173         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2174         translate_clast_for_loop): New.
2175         (translate_clast_for): Add a condition around the loop, to do not
2176         execute loops with zero iterations.
2177         * g++.dg/graphite/pr42130.C: New.
2178         * gcc.dg/graphite/pr35356-2.c: Adapt.
2179
2180 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2181
2182         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2183         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2184         Remove context_loop and level.
2185
2186 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2187
2188         * graphite-clast-to-gimple.c (translate_clast_user,
2189         translate_clast_for, translate_clast_guard): Simplify and move common
2190         elements to translate_clast().
2191         (translate_clast): Simplify and get common elements.
2192
2193 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2194
2195         * graphite-clast-to-gimple.c (translate_clast_user,
2196         translate_clast_for, translate_clast_guard): Split out of
2197         translate_clast.
2198
2199 2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>
2200
2201         * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2202         clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2203         debug_clast_name_indexes_1, debug_clast_name_indexes,
2204         clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2205         (clast_name_to_gcc, clast_to_gcc_expression,
2206         clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2207         gcc_type_for_clast_eq, graphite_translate_clast_equation,
2208         graphite_create_guard_cond_expr, graphite_create_new_loop,
2209         translate_clast): Add params_index.
2210         (initialize_cloog_names): Create parameter strings from scratch, do
2211         not reference other strings.
2212         (create_params_index): New.
2213         (gloog): Initialize params_index.
2214         * graphite-scop-detection (free_scops_1): Removed.
2215         (limit_scops): Use normal free_scops.
2216         * graphite-sese-to-poly.c (save_var_names): Removed.
2217         (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2218         and SESE_PARAMS_INDEX.
2219         * sese.c (new_sese, free_sese): Dito.
2220         * sese.h (struct sese): Remove params_index, params_names.
2221         (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2222
2223 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2224
2225         Revert the following patch from 2009-09-14:
2226         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2227         tree-scalar-evolution.h, and then tree-data-ref.h.
2228         * graphite-clast-to-gimple.c: Same.
2229         * graphite-dependences.c: Same.
2230         * graphite-interchange.c: Same.
2231         * graphite-poly.c: Same.
2232         * graphite-scop-detection.c: Same.
2233         * graphite-sese-to-poly.c: Same.
2234         * graphite.c: Same.
2235         * lambda-code.c: Same.
2236         * matrix-reorg.c: Same.
2237         * tree-data-ref.c: Same.
2238         * tree-if-conv.c: Same.
2239         * tree-loop-distribu: Same.: Same.
2240         * tree-loop-linear.c: Same.
2241         * tree-parloops.c: Same.
2242         * tree-predcom.c: Same.
2243         * tree-vect-patterns.c: Same.
2244
2245 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2246
2247         Revert patch from 2009-09-14.
2248         * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2249         passes at -O1 and below.
2250
2251 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2252
2253         PR middle-end/40281
2254         * gcc.dg/graphite/pr40281.c: New.
2255
2256         * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2257         evolutions should not variate in inner loops.
2258
2259 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2260
2261         PR middle-end/42050
2262         * gfortran.dg/graphite/pr42050.f90: New.
2263
2264 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2265
2266         * graphite-interchange.c (memory_strides_in_loop_depth): New.
2267         (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2268
2269 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2270
2271         * graphite-blocking.c (scop_do_block): New.
2272         * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2273         * graphite-poly.h (scop_do_block): Declared.
2274
2275 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2276
2277         * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2278         depth is the loop nesting depth in the LST.  Call psct_dynamic_dim
2279         to transform depth into the time_depth before calling
2280         pbb_number_of_iterations_at_time.
2281         (lst_do_strip_mine): Use a scalar variable instead of recomputing
2282         lst_depth.
2283
2284 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2285
2286         Reverted the patch for "scattering permutations" from 2009-10-28.
2287
2288         * graphite-poly.c (print_permutation): New.
2289         (debug_permutation): New.
2290         (new_poly_bb): Initialize PBB_PERMUTATION.
2291         (free_poly_bb): Free PBB_PERMUTATION.
2292         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2293         (struct pbb_permutation_elt): New.
2294         (PBB_PERMUTATION_ELT_STRIDE): New.
2295         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2296         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2297         (new_pbb_permutation_elt): New.
2298         (pbb_permutation_elt_free): New.
2299         (struct poly_bb): Add field permutation.
2300         (PBB_PERMUTATION): New.
2301         (print_permutation): Declared.
2302         (debug_permutation): Declared.
2303
2304 2009-11-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
2305
2306         * graphite-interchange.c (build_partial_difference): New.
2307         (memory_stride_in_loop): Refactored the computation of
2308         equality constraints into build_partial_difference function.
2309         Added support for debugging stride computations.
2310
2311 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2312
2313         * graphite-clast-to-gimple.c (gloog): Free if_region,
2314         if_region->true_region, and if_region->region.
2315         * sese.c (if_region_set_false_region): Free if_region->false_region.
2316         (create_if_region_on_edge): Do not use GGC_NEW.
2317         (move_sese_in_condition): Remove useless initialization.
2318
2319 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2320
2321         * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2322         for the loops created by the loop distribution.  Do not modify the
2323         input LSTs.
2324         (lst_try_interchange_loops): Same.  Use a temporary LST for the
2325         transformed schedule.  Call lst_update_scattering before data
2326         dependence analysis.
2327         (lst_try_interchange): Pass an extra parameter INDEX.
2328         (lst_do_interchange_1): New.
2329         (lst_do_interchange): Call lst_do_interchange_1.
2330         (scop_do_interchange): Call lst_update_scattering.
2331         * graphite-poly.c (apply_poly_transforms): Do not call
2332         lst_update_scattering.
2333         * graphite-poly.h (lst_pred): New.
2334         (lst_succ): New.
2335         (lst_find_first_pbb): Return NULL when not found.
2336         (lst_empty_p): New.
2337         (lst_insert_in_sequence): Allow LST1 to be NULL.
2338         (lst_replace): New.
2339         (lst_substitute_3): New.
2340         * gcc.dg/graphite/interchange-1.c: XFail.
2341         * gcc.dg/graphite/interchange-8.c: XFail.
2342         * gcc.dg/graphite/interchange-11.c: XFail.
2343
2344 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2345
2346         * graphite-interchange.c (lst_perfectly_nested_p): New.
2347         (lst_perfect_nestify): New.
2348         (lst_try_interchange_loops): Call store_lst_schedule,
2349         lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2350         (scop_do_interchange): Avoid redundant legality test.
2351         Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2352         * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2353         * graphite-poly.h (psct_static_dim): New.
2354         (lst_dewey_number_at_depth): New.
2355         (lst_find_pbb): Restructured.
2356         (lst_find_first_pbb): Restructured.
2357         (lst_find_last_pbb): New.
2358         (lst_contains_p): New.
2359         (lst_contains_pbb): New.
2360         (lst_create_nest): New.
2361         (lst_remove_from_sequence): New.
2362         (pbb_update_scattering): New.
2363         (lst_update_scattering_under): New.
2364         (lst_update_scattering_seq): New.
2365         (lst_update_scattering): New.
2366         (lst_insert_in_sequence): New.
2367         (lst_distribute_lst): New.
2368         (lst_remove_all_before_including_pbb): New.
2369         (lst_remove_all_before_excluding_pbb): New.
2370
2371 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2372
2373         * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2374         get_loop_exit_edges.
2375
2376 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2377
2378         * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2379
2380 2009-10-28  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2381
2382         * graphite-poly.c (print_permutation): New.
2383         (debug_permutation): New.
2384         (new_poly_bb): Initialize PBB_PERMUTATION.
2385         (free_poly_bb): Free PBB_PERMUTATION.
2386         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2387         (struct pbb_permutation_elt): New.
2388         (PBB_PERMUTATION_ELT_STRIDE): New.
2389         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2390         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2391         (new_pbb_permutation_elt): New.
2392         (pbb_permutation_elt_free): New.
2393         (struct poly_bb): Add field permutation.
2394         (PBB_PERMUTATION): New.
2395         (print_permutation): Declared.
2396         (debug_permutation): Declared.
2397
2398 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2399
2400         * graphite-clast-to-gimple.c (gloog): Do not call
2401         sese_reset_aux_in_loops.
2402         * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2403         extra argument for domains.  Do not use loop->aux.
2404         (build_scop_iteration_domain): Initialize and free domains, pass it
2405         to build_loop_iteration_domains and extract the information from
2406         domains.  Do not use loop->aux.
2407         * sese.c (sese_reset_aux_in_loops): Removed.
2408         * sese.h (sese_reset_aux_in_loops): Removed.
2409
2410 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2411
2412         * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2413         (dependency_in_loop_p): Same.
2414         (translate_clast): Do not use loop->aux.  Initialize
2415         loop->can_be_parallel.
2416         (mark_loops_parallel): Removed.
2417         * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2418         * graphite.c (free_aux_in_new_loops): Removed.
2419         (graphite_finalize): Do not call free_aux_in_new_loops.
2420         (graphite_transform_loops): Do not call mark_loops_parallel.
2421
2422 2009-10-26  Li Feng  <nemokingdom@gmail.com>
2423
2424         * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2425         (translate_clast): Pass an extra parameter LEVEL.
2426         Call get_scattering_level.
2427         * graphite-clast-to-gimple.h (get_scattering_level): New.
2428
2429 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2430
2431         * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2432         * cfgloop.h (struct loop): New field single_iv.
2433
2434         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2435         loop->aux anymore: use loop->single_iv.
2436         (graphite_loop_normal_form): Moved...
2437         (build_graphite_loop_normal_form): Removed.
2438         (gloog): Do not call build_graphite_loop_normal_form.
2439         (free_aux_in_new_loops): Moved...
2440         (mark_loops_parallel): Restructure.
2441         * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2442         * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2443         (scop_canonicalize_loops): New.
2444         (build_poly_scop): Call scop_canonicalize_loops.
2445         * graphite.c (free_aux_in_new_loops): ...here.
2446
2447 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2448
2449         * g++.dg/graphite/graphite.exp: Add the same rules as in
2450         gcc.dg/graphite/graphite.exp.
2451
2452 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2453
2454         * g++.dg/graphite/id-1.C: New.
2455
2456 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2457
2458         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2459         argument base_name.
2460         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2461         (rewrite_phi_out_of_ssa): Same.
2462         (rewrite_cross_bb_scalar_deps): Same.
2463         (translate_scalar_reduction_to_array): Same.
2464
2465 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2466
2467         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2468         dump_alias_graphs.
2469
2470 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2471
2472         * graphite-sese-to-poly.c (dump_alias_graphs): New.
2473         (build_scop_drs): Call dump_alias_graphs.
2474
2475 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2476
2477         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2478         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2479         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2480         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2481         * graphite-poly.h (free_lst): New.
2482         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2483         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2484
2485 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2486
2487         * graphite-poly.h (struct scop): Add a field saved_schedule.
2488         (SCOP_SAVED_SCHEDULE): New.
2489         (store_lst_schedule): New.
2490         (restore_lst_schedule): New.
2491         (store_scattering): Call store_lst_schedule.
2492         (restore_scattering): Call restore_lst_schedule.
2493
2494 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2495
2496         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2497         (pdr_add_alias_set): Same.
2498         (build_poly_dr): Same.
2499         (build_alias_set_optimal_p): Same.
2500         (build_base_obj_set_for_drs): Same.  Do not store the result of
2501         graphds_dfs.
2502
2503 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2504
2505         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2506         all_components_are_cliques to 1.
2507
2508 2009-10-20  Li Feng  <nemokingdom@gmail.com>
2509
2510         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2511         the new structure.
2512         (pdr_add_alias_set): Update retrieving alias_set_num.
2513         (build_poly_dr): Update retrieving dr_base_object_set.
2514         (partition_drs_to_sets): Remove.
2515         (build_alias_set_optimal_p): New.
2516         (build_alias_set_for_drs): Rename.
2517         (build_scop_drs): Update.
2518         * graphite-sese-to-poly.h (struct base_alias_pair): New.
2519         (ALIAS_SET_INDEX): Remove.
2520         (BASE_OBJECT_SET_INDEX): Remove.
2521
2522 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2523
2524         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2525
2526 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2527
2528         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2529         loop upper bounds for 1-element arrays at end of structures.
2530         * tree-flow.h (array_at_struct_end_p): Declared.
2531         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2532
2533 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2534
2535         * g++.dg/graphite/pr41305.C: New.
2536
2537 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
2538
2539         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2540         construction of parameter constraints from loop iteration analysis.
2541         * gcc.dg/graphite/run-id-2.c: New test.
2542
2543 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2544
2545         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2546         and new_cstr.
2547
2548 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2549
2550         * graphite-dependences.c (dependence_polyhedron_1): Remove
2551         unused gdim dimensions from the DDR polyhedron.
2552
2553 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2554
2555         * graphite-dependences.c (pddr_transformed_scattering): New.
2556         (dot_original_deps_stmt_1): New.
2557         (dot_transformed_deps_stmt_1): New.
2558         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2559         dot_transformed_deps_stmt_1.
2560         (dot_original_deps): New.
2561         (dot_transformed_deps): New.
2562         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2563
2564 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2565
2566         * graphite-dependences.c (reduction_dr_1): Remove wrong
2567         assert: reduction BBs can have multiple reduction writes
2568         to memory.  interchange-3.f90 is an example.
2569
2570 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2571
2572         * gfortran.dg/graphite/interchange-3.f90: New.
2573
2574 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2575
2576         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2577
2578 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2579
2580         * graphite-dependences.c (dependence_polyhedron_1): Add the
2581         context to the dependence polyhedron.
2582
2583 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2584
2585         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2586         PBB_PDR_DUPLICATES_REMOVED.
2587         (new_poly_bb): Same.
2588
2589 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2590
2591         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2592         SCOP_CONTEXT.
2593         (build_loop_iteration_domains): Extract bounds on parameters
2594         based on the data size.
2595         (build_scop_context): Do not initialize SCOP_CONTEXT;
2596         add new constraints.
2597
2598 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2599
2600         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2601         * graphite-ppl.h (graphite-ppl.h): Declared.
2602
2603 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2604
2605         * graphite-ppl.c (ppl_print_linear_expr): New.
2606         (debug_ppl_linear_expr): New.
2607         * graphite-ppl.h (ppl_print_linear_expr): Declared.
2608         (debug_ppl_linear_expr): Declared.
2609
2610 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2611
2612         * graphite-interchange.c: Fix comments.
2613         * gcc.dg/graphite/block-1.c: Fix comments.
2614
2615 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2616
2617         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2618         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2619
2620 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2621
2622         Reapply the patch from Alexander Monakov that disappeared during
2623         the last merges from trunk.
2624
2625         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
2626
2627         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2628         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
2629
2630 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2631
2632         * graphite-interchange.c (memory_stride_in_loop): The depth
2633         argument corresponds to a dynamic time dimension, so use
2634         psct_dynamic_dim to refer to the transformed scattering dimension.
2635
2636 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2637
2638         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2639
2640 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2641
2642         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2643         root of the LST.
2644         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2645         the root of the LST.
2646         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2647         fake loop.
2648         (print_lst): Print the root of LST in a different format.
2649         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2650
2651 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2652
2653         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2654
2655 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2656
2657         * doc/passes.texi: Document the Graphite infrastructure.
2658
2659 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2660
2661         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2662         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2663         and check the SSA representation.
2664
2665         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2666
2667 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2668
2669         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2670
2671 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2672
2673         * gcc.dg/graphite/interchange-11.c: New.
2674
2675 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2676
2677         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2678
2679 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2680
2681         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2682         Add -fno-loop-strip-mine and -fno-loop-interchange.
2683         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2684         -fno-loop-strip-mine.
2685         * gfortran.dg/graphite/graphite.exp: Same.
2686
2687 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2688
2689         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2690         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2691         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2692         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2693         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2694         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2695         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2696         DEFAULT_FLAGS_GRAPHITE_SCOP.
2697         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2698         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2699
2700 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2701
2702         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2703
2704 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2705             Sebastian Pop  <sebastian.pop@amd.com>
2706
2707         * graphite-interchange.c (build_linearized_memory_access): Pass an
2708         offset as parameter.
2709         (memory_stride_in_loop): Include transform scattering in the
2710         access functions to be able to querry the strides in the
2711         transformed loops.
2712         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2713         not the psct_iterator_dim.
2714
2715 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2716
2717         * graphite-blocking.c (pbb_do_strip_mine): Removed.
2718         (lst_do_strip_mine_loop): New.
2719         (lst_do_strip_mine): New.
2720         (scop_do_strip_mine): Call lst_do_strip_mine.
2721         * graphite-poly.h (lst_add_loop_under_loop): New.
2722         (lst_find_first_pbb): New.
2723
2724 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2725
2726         * graphite-poly.c (loop_to_lst): Fix LST creation.
2727
2728 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
2729
2730         * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2731         sizeof(unsigned long) to make it run on 32bit systems.
2732
2733 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
2734
2735         * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2736         SEGFAULT on 32bit.
2737
2738 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2739
2740         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2741         Comment.
2742         (write_alias_graph_to_ascii_dot): New.
2743         (write_alias_graph_to_ascii_ecc): Ditto.
2744         (partition_drs_to_sets): Add testing of optimality of current method
2745         which assigns alias numbers according to DFS Comopnent number.  used
2746         as heuristic for the upcoming ECC algorithm.
2747         (build_scop_drs): Write to file also with the ecc and dot format.
2748
2749 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2750
2751         * gfortran.dg/graphite/interchange-1.f: XFail.
2752
2753 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2754
2755         * graphite.c (graphite_initialize): Do not handle functions with
2756         more than 100 basic blocks.
2757
2758 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2759
2760         * graphite-blocking.c (pbb_do_strip_mine): Use
2761         PARAM_LOOP_BLOCK_TILE_SIZE.
2762
2763 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2764
2765         * graphite-poly.c (dot_lst_1): New.
2766         (dot_lst): New.
2767         * graphite-poly.h (dot_lst): Declared.
2768
2769 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2770
2771         * graphite-dependences.c (dot_deps_stmt_1): New.
2772         (dot_deps_stmt): New.
2773         * graphite-dependences.h (dot_deps_stmt): Declared.
2774
2775 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2776
2777         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2778         not replace cross BB scalar dependences ending on PHI nodes.
2779         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2780
2781 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2782
2783         * graphite-poly.c (apply_poly_transforms): Implement the high
2784         level driver for flag_loop_block.
2785         * opts.c (decode_options): Enable flag_loop_block at -O2.
2786         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2787         flag_loop_block.
2788
2789         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2790         -floop-block.
2791         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2792         Add -floop-block.
2793
2794 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2795
2796         * graphite-poly.h (lst_find_pbb): New.
2797         (find_lst_loop): New.
2798
2799 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2800
2801         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2802         * graphite-poly.h (struct scop): Remove dep_graph field.
2803         (SCOP_DEP_GRAPH): Removed.
2804
2805 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2806
2807         * graphite-poly.h (copy_lst): Do full copy of LST.
2808
2809 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
2810
2811         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2812         when the loop stride is zero.
2813
2814         * gcc.dg/graphite/id-16.c: New.
2815
2816 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2817
2818         * graphite-dependences.c (reduction_dr_1): New.
2819         (reduction_dr_p): New.
2820         (graphite_legal_transform_dr): Call reduction_dr_p.
2821         (reduction_ddr): Renamed reduction_ddr_p.
2822         * graphite-poly.h (same_pdr_p): New.
2823         (number_of_write_pdrs): New.
2824         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2825         (split_reduction_stmt): Do not split reduction statements
2826         when there are no writes to memory.
2827         (translate_scalar_reduction_to_array_for_stmt): Insert the
2828         memory reduction statement just after the scalar reduction statement.
2829
2830         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2831         Un-XFAIL-ed.
2832         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2833         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2834
2835 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2836
2837         * graphite-interchange.c (lst_apply_interchange): New.
2838         (lst_interchange_profitable_p): New.
2839         (lst_try_interchange_loops): New.
2840         (lst_try_interchange): New.
2841         (lst_do_interchange): New.
2842         (pbb_do_interchange): Removed.
2843         (scop_do_interchange): Call lst_do_interchange.
2844
2845 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2846
2847         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2848         SCOP_TRANSFORMED_SCHEDULE.
2849         (loop_to_lst): New.
2850         (scop_to_lst): New.
2851         (print_lst): New.
2852         (debug_lst): New.
2853         * graphite-poly.h (lst_p): New.
2854         (struct lst): New.
2855         (LST_LOOP_P): New.
2856         (LST_LOOP_FATHER): New.
2857         (LST_PBB): New.
2858         (LST_SEQ): New.
2859         (scop_to_lst): Declared.
2860         (print_lst): Declared.
2861         (debug_lst): Declared.
2862         (new_lst_loop): New.
2863         (new_lst_stmt): New.
2864         (copy_lst): New.
2865         (lst_depth): New.
2866         (lst_dewey_number): New.
2867         (struct scop): Add original_schedule and transformed_schedule fields.
2868         (SCOP_ORIGINAL_SCHEDULE): New.
2869         (SCOP_TRANSFORMED_SCHEDULE): New.
2870         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2871
2872 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2873
2874         * graphite-dependences.c (reduction_ddr): New.
2875         (graphite_legal_transform_bb): Call reduction_ddr.
2876         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2877         Initialize PBB_IS_REDUCTION.
2878         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2879         (PBB_IS_REDUCTION): New.
2880         (new_poly_bb): Update declaration.
2881         * graphite-scop-detection.h (build_scop_bbs): Removed.
2882         (nb_reductions_in_loop): Removed.
2883         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2884         parameter for reductions.
2885         (try_generate_gimple_bb): Update call to new_poly_bb.
2886         (build_scop_bbs_1): Same.
2887         (build_scop_bbs): Same.
2888         (gsi_for_phi_node): New.
2889         (scalar_close_phi_node_p): Remove gcc_assert.
2890         (split_reduction_stmt): New.
2891         (is_reduction_operation_p): New.
2892         (phi_contains_arg): New.
2893         (follow_ssa_with_commutative_ops): New.
2894         (detect_commutative_reduction_arg): New.
2895         (detect_commutative_reduction_assign): New.
2896         (follow_inital_value_to_phi): New.
2897         (edge_initial_value_for_loop_phi): New.
2898         (initial_value_for_loop_phi): New.
2899         (detect_commutative_reduction): New.
2900         (translate_scalar_reduction_to_array_for_stmt): New.
2901         (insert_copyout): New.
2902         (insert_copyin): New.
2903         (translate_scalar_reduction_to_array): New.
2904         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2905         (rewrite_commutative_reductions_out_of_ssa_loop): New.
2906         (rewrite_commutative_reductions_out_of_ssa): New.
2907         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2908         * sese.h (split_region_for_bb): New.
2909
2910         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2911         * gcc.dg/graphite/interchange-1.c: Fix format.
2912         * gcc.dg/graphite/interchange-10.c: New.
2913
2914 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2915
2916         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2917         buggy assert.
2918
2919 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2920
2921         * graphite-sese-to-poly.c (scev_analyzable_p): New.
2922         (rewrite_cross_bb_scalar_dependence): New.
2923         (rewrite_cross_bb_scalar_deps): New.
2924         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2925         Call rewrite_cross_bb_scalar_deps.
2926
2927 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2928
2929         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2930         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2931         gsi_for_stmt.
2932
2933 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2934
2935         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2936         * graphite-interchange.c (pbb_do_interchange): Same.
2937         * graphite-poly.c (print_scattering_function): Same.
2938         (debug_pdrs): Same.
2939         * graphite-poly.h (pbb_loop): New.
2940         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2941
2942 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
2943
2944         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2945
2946 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
2947
2948         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2949         so don't pass a pointer to it.
2950         (build_alias_set_for_drs): Same.
2951         (build_base_obj_set_for_drs): Same.
2952         (build_scop_drs): Same.
2953
2954 2009-09-26  Li Feng  <nemokingdom@gmail.com>
2955
2956         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2957         the alias graph of data references.
2958
2959 2009-09-25  Li Feng  <nemokingdom@gmail.com>
2960
2961         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2962         (build_scop_drs): When debugging, write the alias graph to file,
2963         otherwise, should be disabled.
2964
2965 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2966
2967         * Merge from mainline (151310:151361).
2968
2969 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2970
2971         * Merge from mainline (151171:151310).
2972
2973 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2974
2975         * Merge from mainline (151171:151806).
2976
2977 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2978
2979         * Revert the last commit.
2980
2981 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2982
2983         * Merge from mainline (151171:151819).
2984
2985 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2986
2987         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2988         (is_simple_operand): Remove call to stmt_simple_memref_p.
2989         (stmt_simple_for_scop_p): Update call to is_simple_operand.
2990
2991 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
2992
2993         * gcc.dg/graphite/interchange-mvt.c: New File.
2994         * gcc.dg/graphite/scop-dsyrk.c: New File.
2995         * gcc.dg/graphite/scop-dsyr2k.c: New File.
2996         * gcc.dg/graphite/scop-mvt.c: New File.
2997         * gcc.dg/graphite/scop-sor.c: New File.
2998
2999 2009-09-17 Li Feng  <nemokingdom@gmail.com>
3000
3001         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
3002         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
3003         (graphite_carried_dependence_level_k): Ditto.
3004         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
3005         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
3006         (new_poly_dr): Adjust declaration.
3007         * graphite-sese-to-poly.c (free_data_refs_aux): New.
3008         (free_gimple_bb): Added free_data_refs_aux.
3009         (build_poly_dr): Add dr_base_object_set.
3010         (partition_drs_to_sets): New.
3011         (dr_same_base_object_p): New.
3012         (build_alias_set_for_drs): New.
3013         (build_base_object_set_for_drs): New.
3014         (build_scop_drs): Add build_base_obj_set_for_drs.
3015         * graphite-sese-to-poly.h: Added #define for alias set number index and
3016         base object set index.
3017         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
3018         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
3019
3020 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
3021
3022         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3023         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
3024
3025 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3026
3027         * graphite-sese-to-poly.c (struct irp_data): Removed.
3028         (idx_record_params): Removed.
3029         (find_params_in_bb): Scan for parameters the access functions; don't
3030         parse the tree representation.
3031
3032 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3033
3034         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
3035         passes at -O1 and below.
3036
3037 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3038
3039         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
3040         tree-scalar-evolution.h, and then tree-data-ref.h.
3041         * graphite-clast-to-gimple.c: Same.
3042         * graphite-dependences.c: Same.
3043         * graphite-interchange.c: Same.
3044         * graphite-poly.c: Same.
3045         * graphite-scop-detection.c: Same.
3046         * graphite-sese-to-poly.c: Same.
3047         * graphite.c: Same.
3048         * lambda-code.c: Same.
3049         * matrix-reorg.c: Same.
3050         * tree-data-ref.c: Same.
3051         * tree-if-conv.c: Same.
3052         * tree-loop-distribu: Same.: Same.
3053         * tree-loop-linear.c: Same.
3054         * tree-parloops.c: Same.
3055         * tree-predcom.c: Same.
3056         * tree-vect-patterns.c: Same.
3057
3058 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
3059
3060         Partially revert the previous patch, except the following.
3061         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
3062         as parameters the operands of the not expression.
3063
3064 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3065
3066         * tree-scalar-evolution.c (instantiate_scev_assign): New.
3067         Do not call analyze_scalar_evolution on assignments.
3068         (instantiate_scev_phi): Call analyze_scalar_evolution.
3069         (instantiate_scev_name): Call instantiate_scev_assign and
3070         instantiate_scev_phi.
3071         (instantiate_scev_not): Adapted to pass as parameters the operands
3072         of the not expression.
3073
3074 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3075
3076         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
3077         to pass as parameters the operands of the binary expression.
3078
3079 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3080
3081         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
3082         instantiate_scev_not.  Handle NEGATE_EXPR.
3083         (instantiate_scev_r): Handle NEGATE_EXPR.
3084
3085 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3086
3087         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
3088         instantiate_scev_r.
3089         (instantiate_scev_r): Move code in instantiate_scev_2
3090         and instantiate_scev_1.
3091
3092 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3093
3094         * tree-scalar-evolution.c (instantiate_scev_3): New.
3095         (instantiate_scev_1): Move code in instantiate_scev_3.
3096
3097 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3098
3099         * tree-scalar-evolution.c (instantiate_scev_poly): New.
3100         (instantiate_scev_1): Move code in instantiate_scev_poly.
3101
3102 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3103
3104         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3105         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3106
3107 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3108
3109         * tree-scalar-evolution.c (instantiate_scev_convert): New.
3110         (instantiate_scev_1): Move code in instantiate_scev_convert.
3111
3112 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3113
3114         * tree-scalar-evolution.c (instantiate_scev_binary): New.
3115         (instantiate_scev_1): Move code in instantiate_scev_binary.
3116
3117 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3118
3119         * tree-scalar-evolution.c (instantiate_scev_name): New.
3120         (instantiate_scev_1): Move code in instantiate_scev_name.
3121
3122 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
3123
3124         * Merge from mainline (150992:151171).
3125
3126 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3127
3128         * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3129
3130 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3131
3132         * graphite-dependences.c (graphite_legal_transform_bb): Call
3133         pbb_remove_duplicate_pdrs.
3134         * graphite-poly.c (can_collapse_pdr): Removed.
3135         (pdr_find_duplicate): Removed.
3136         (can_collapse_pdrs): New.
3137         (pbb_remove_duplicate_pdrs): New.
3138         (new_poly_dr): Do not look for duplicates.
3139         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3140         (PBB_PDR_DUPLICATES_REMOVED): New.
3141         (pbb_remove_duplicate_pdrs): Declared.
3142
3143 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3144
3145         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3146         the strides by multiplying by PDR_NB_REFS.
3147         * graphite-poly.c (can_collapse_pdr): New.
3148         (pdr_find_duplicate): New.
3149         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
3150         Initialize PDR_NB_REFS.
3151         * graphite-poly.h (struct poly_dr): Add field nb_refs.
3152         (PDR_NB_REFS): New.
3153         (new_poly_dr): Number of subscripts is a graphite_dim_t.
3154
3155 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3156
3157         Revert one of the previous commits:
3158         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3159         the computation of symmetric data dependence relations.
3160         (dependency_between_pbbs_p): Same.
3161
3162 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3163
3164         PR middle-end/40965
3165         * graphite-poly.c (apply_poly_transforms): Remove legality test before
3166         any transform.
3167
3168 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3169
3170         * graphite-dependences.c (pddr_original_scattering): Return NULL
3171         for read-read dependence relations.
3172         * graphite-poly.h (enum poly_dr_type): Fix comment.
3173         (pdr_read_p): New.
3174         (pdr_write_p): New.
3175         (pdr_may_write_p): New.
3176
3177 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3178
3179         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3180         (struct poly_dr): Same.
3181         (new_poly_dr): Same.
3182         * graphite-poly.c (new_poly_dr): Same.
3183
3184 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3185             Sebastian Pop  <sebastian.pop@amd.com>
3186
3187         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3188         pbb_strip_mine_time_depth.  Changed the implementation so that
3189         transformation is expressed as a transformation on
3190         time (scatttering) dimensions.  Also, ensures that the 2d+1
3191         scheduling format is preserved.
3192         (pbb_strip_mine_profitable_p): Profitability is based on the
3193         iteration number of a given time (scattering) dimension,
3194         and not on a original loop depth dimension.
3195         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3196         (pbb_do_strip_mine): Call psct_dynamic_dim.
3197         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3198         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3199         (pbb_nb_dynamic_scattering_transform): New.
3200         (psct_dynamic_dim): New.
3201
3202 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3203
3204         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3205         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3206         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3207         * graphite-interchange.c (build_linearized_memory_access): Same.
3208         (memory_stride_in_loop): Same.
3209
3210 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3211
3212         * graphite-dependences.c (pddr_original_scattering): New.
3213         (graphite_legal_transform_dr): Call pddr_original_scattering.
3214         (dot_deps_1): New.
3215         (dot_deps): New.
3216         * graphite-dependences.h (dot_deps): Declared.
3217         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3218         (print_pdr): Print PDR_ID.
3219         * graphite-poly.h (struct poly_dr): Add field id.
3220         (PDR_ID): New.
3221         (pbb_index): New.
3222         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3223
3224 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
3225
3226         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3227         not delete the original dependence relation.
3228
3229 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3230
3231         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3232         the computation of symmetric data dependence relations.
3233         (dependency_between_pbbs_p): Same.
3234
3235 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3236
3237         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3238         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3239         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3240         (free_poly_ddr): New.
3241         (pddr_is_empty): New.
3242         (dependence_polyhedron_1): Now returns a poly_ddr_p.
3243         (dependence_polyhedron): Same.  Remove useless gcc_assert.
3244         Remove fprintfs.
3245         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3246         (graphite_carried_dependence_level_k): Call pddr_is_empty.
3247         * graphite-dependences.h (enum poly_dependence_kind): New.
3248         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
3249         (PDRP_SOURCE): Renamed PDDR_SOURCE.
3250         (PDRP_SINK): Renamed PDDR_SINK.
3251         (PDRP_DDP): Renamed PDDR_DDP.
3252         (PDDR_KIND): New.
3253         (free_poly_ddr): Declared.
3254         * graphite-poly.c (new_scop): Use the new hash function names.
3255         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3256         into original_pddrs.
3257         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3258
3259 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3260
3261         * Merge from mainline (150764:150992).
3262
3263 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3264
3265         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3266         bounds with LT_EXPR to make niter analysis more precise on code
3267         generated by Graphite.
3268
3269 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3270
3271         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3272         (graphite_legal_transform_bb): Same.
3273         (poly_drs_may_alias_p): Same.
3274
3275 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
3276
3277         PR middle-end/40981
3278         * graphite-ppl.c (ppl_max_for_le): Correct the use of
3279         ppl_Pointset_Powerset_C_Polyhedron_maximize.
3280
3281 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3282
3283         * graphite-poly.c (print_pbb): Print PBB index.
3284
3285 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3286
3287         * Merge from mainline (r150672:150764).
3288
3289 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3290
3291         * graphite-interchange.c (ppl_max_for_le): Moved...
3292         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3293         * graphite-ppl.c (ppl_max_for_le): ... here.
3294         * graphite-ppl.h (ppl_max_for_le): Declared.
3295
3296 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
3297
3298         * Merge from mainline (r150372:150672).
3299
3300 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3301
3302         PR middle-end/40980
3303         * sese.c (convert_for_phi_arg): New.
3304         (add_guard_exit_phis): Use convert_for_phi_arg.
3305
3306         * gfortran.dg/graphite/id-17.f: New.
3307
3308 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3309
3310         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3311         unknown subscript upper bounds.
3312
3313         * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3314
3315 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3316             Pranav Garg  <pranav.garg2107@gmail.com>
3317
3318         * graphite-interchange.c (gather_access_strides): Removed.
3319         (ppl_max_for_le): New.
3320         (build_linearized_memory_access): New.
3321         (memory_stride_in_loop): New.
3322         (pbb_interchange_profitable_p): Reimplemented.
3323         * graphite-ppl.h (ppl_new_id_map): New.
3324         (ppl_interchange): New.
3325
3326         * gcc.dg/graphite/interchange-6.c: XFAILed.
3327
3328 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3329
3330         * graphite-interchange.c (compute_subscript): Removed.
3331         (compute_array_size_cstr): Removed.
3332         (compute_array_size_poly): Removed.
3333         (compute_array_size): Removed.
3334         (gather_access_strides_poly): Removed.
3335         (gather_access_strides): Empty.
3336
3337 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3338
3339         * graphite-dependences.c (dependence_polyhedron_1): Replace
3340         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3341         (graphite_legal_transform_dr): Same.
3342         (graphite_carried_dependence_level_k): Same.
3343         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3344         Initialize PDR_NB_SUBSCRIPTS.
3345         (print_pdr_access_layout): Replace pdr_nb_subscripts with
3346         PDR_NB_SUBSCRIPTS.
3347         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3348         (PDR_NB_SUBSCRIPTS): New.
3349         (pdr_nb_subscripts): Removed.
3350         (pdr_dim): Simplified.
3351         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3352         with PDR_NB_SUBSCRIPTS.
3353
3354 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3355
3356         * graphite-interchange.c (compute_array_size): Remove use of
3357         PDR_DATA_CONTAINER.
3358         * graphite-poly.c (new_poly_dr): Remove argument data_container.
3359         Do not initialize PDR_DATA_CONTAINER.
3360         (print_pdr): Do not print PDR_DATA_CONTAINER.
3361         * graphite-poly.h (struct poly_dr): Remove data_container field.
3362         (PDR_DATA_CONTAINER): Removed.
3363         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3364         PDR_DATA_CONTAINER.
3365         (build_poly_dr): Same.
3366
3367 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3368
3369         * gcc.dg/graphite/interchange-9.c: New.
3370
3371 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3372             Sebastian Pop  <sebastian.pop@amd.com>
3373
3374         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3375         copy of the dependence polyhedron.  Free the temporary objects.
3376         (graphite_carried_dependence_level_k): Free unused objects before
3377         returning.
3378
3379         * gcc.dg/graphite/interchange-1.c: XFAILed.
3380         * gcc.dg/graphite/interchange-2.c: XFAILed.
3381         * gcc.dg/graphite/interchange-3.c: XFAILed.
3382         * gcc.dg/graphite/interchange-4.c: XFAILed.
3383         * gcc.dg/graphite/interchange-7.c: XFAILed.
3384
3385 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3386
3387         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3388         Early return without analyzing the data dependences if no
3389         transform has been done.  Call restore_scattering if the transform
3390         is not legal.
3391         (graphite-interchange.c): Same.
3392         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3393         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3394         (apply_poly_transforms): Do not gcc_assert that
3395         the transform is legal.
3396         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3397         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3398         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3399         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3400         * graphite-poly.h (struct poly_scattering): New.
3401         (struct poly_bb): Add original, transformed, and saved fields.
3402         Remove transformed_scattering, original_scattering, nb_local_variables,
3403         and nb_scattering_transform fields.
3404         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3405         (poly_scattering_new): New.
3406         (poly_scattering_free): New.
3407         (poly_scattering_copy): New.
3408         (store_scattering_pbb): New.
3409         (store_scattering): New.
3410         (restore_scattering_pbb): New.
3411         (restore_scattering): New.
3412         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3413         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3414
3415 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3416
3417         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3418         (print_scop): Same.
3419
3420 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3421
3422         * Makefile.in (graphite.o): Depends on PREDICT_H.
3423         * graphite.c: Include predict.h.
3424         (graphite_finalize): Call tree_estimate_probability.
3425         * predict.c (predict_loops): Do not call scev_initialize and
3426         scev_finalize.
3427         (tree_estimate_probability_bb): New.
3428         (tree_estimate_probability): Do not initialize loops: move that
3429         code to the driver.  Call tree_estimate_probability_bb.
3430         (tree_estimate_probability_driver): New.
3431         (pass_profile): Use tree_estimate_probability_driver.
3432         * predict.h (tree_estimate_probability): Declared.
3433
3434 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3435
3436         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3437         * graphite-dependences.c (graphite_legal_transform): Add time to
3438         TV_GRAPHITE_DATA_DEPS.
3439         (dependency_between_pbbs_p): Same.
3440         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3441
3442 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3443
3444         * Merge from mainline (r149952:150372).
3445
3446 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3447
3448         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3449         * graphite-blocking.c: Same.
3450         * graphite-clast-to-gimple.c: Same.
3451         * graphite-dependences.c: Same.
3452         * graphite-poly.c: Same.
3453         * graphite-poly.h: Same.
3454         * graphite-ppl.c: Same.
3455         * graphite-scop-detection.c: Same.
3456         * graphite-sese-to-poly.c: Same.
3457         * graphite.c: Same.
3458
3459 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3460
3461         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3462         (remove_simple_copy_phi): New.
3463         (remove_invariant_phi): New.
3464         (simple_copy_phi_p): New.
3465         (reduction_phi_p): New.
3466         (gsi_for_ssa_name_def): New.
3467         (insert_out_of_ssa_copy): New.
3468         (insert_out_of_ssa_copy_on_edge): New.
3469         (create_zero_dim_array): New.
3470         (scalar_close_phi_node_p): New.
3471         (rewrite_close_phi_out_of_ssa): New.
3472         (rewrite_phi_out_of_ssa): New.
3473         (rewrite_reductions_out_of_ssa): New.
3474         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3475
3476         * gcc.dg/graphite/id-11.c: New.
3477         * gcc.dg/graphite/id-15.c: New.
3478         * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3479         * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3480         * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3481         * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3482         * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3483         * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3484         * gfortran.dg/graphite/id-13.f: New.
3485         * gfortran.dg/graphite/id-5.f: New.
3486
3487 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3488
3489         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3490         check that nb_reductions_in_loop is zero.
3491         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3492         reduction phi nodes.
3493         (nb_reductions_in_loop): Removed.
3494         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3495         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3496         (bb_contains_non_iv_scalar_phi_nodes): Removed.
3497         (scop_contains_non_iv_scalar_phi_nodes): Removed.
3498         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3499
3500 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3501
3502         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3503         statements that have an empty iteration domain.
3504         * gfortran.dg/graphite/id-16.f: New.
3505
3506 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3507
3508         * tree-scalar-evolution.c (instantiate_scev_1): Return
3509         chrec_dont_know when the result is not above instantiate_below.
3510         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3511         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3512         the tree has a known scalar evolution.
3513         * gfortran.dg/graphite/id-14.f: New.
3514         * gfortran.dg/graphite/id-15.f: New.
3515
3516 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3517
3518         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3519         insert_gsi.
3520         (rename_variables): Keep inserting renames after the ones already
3521         inserted.
3522
3523 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3524
3525         * graphite-sese-to-poly.c (compare_bb_depths): New.
3526         (graphite_sort_dominated_info): New.
3527         (build_scop_bbs_1): Call graphite_sort_dominated_info.
3528         (build_scop_scattering): Fix comment.
3529
3530 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3531
3532         * graphite.c (graphite_finalize): Call print_loops instead of
3533         dump_function_to_file.
3534         * gcc.dg/graphite/graphite.exp: Fix formatting.
3535         * gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
3536         loops generated in the graphite output file.
3537         * gcc.dg/graphite/pr35356-2.c: New.
3538         * gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
3539         * gfortran.dg/graphite/id-12.f: New.
3540
3541 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3542
3543         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3544         Remove 2 XFAIL.
3545
3546 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3547             Tobias Grosser  <grosser@fim.uni-passau.de>
3548
3549         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3550         alias set number build alias in ACCESSES polyhedron.
3551         (build_alias_set_for_drs): New.
3552         (build_pbb_drs): Added build_alias_set_for_drs.
3553         * graphite-dependences.c (poly_drs_may_alias_p): New.
3554         (graphite_carried_dependence_level_k): Check alias information
3555         before building polyhedron.
3556
3557 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3558
3559         * Makefile.in (lambda-code.o): Fix formatting.
3560
3561 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3562
3563         * Merge from mainline (r149350-149952)
3564
3565 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3566
3567         * graphite-poly.c (apply_poly_transforms): Move strip_mine
3568         before interchange to prepare for loop blocking.
3569
3570 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3571
3572         * graphite-poly.c (apply_poly_transforms): Add checks after every
3573         transformation.
3574         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3575         done in apply_poly_transforms.
3576
3577 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3578
3579         * graphite-dependences.c (build_lexicographically_gt_constraint):
3580         Replace RES parameter with *RES.
3581         (dependence_polyhedron_1): Pass an address of the parameter RES
3582         instead of value of RES.
3583
3584 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3585
3586         * graphite.c (graphite_finalize): Fix comment.
3587         (graphite_transform_loops): Reset scev info after code generation
3588         of each scop.
3589
3590 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3591
3592         * graphite.c (graphite_finalize): Call scev_reset.
3593
3594 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3595
3596         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3597         GBB_CLOOG_IV_TYPES hash table twice.
3598         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3599         (add_condition_to_domain): Clear GMP values.
3600
3601 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3602
3603         * graphite-dependences.c: Fix formatting.
3604         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3605         (pbb_number_of_iterations): Free ppl_Linear_Expression.
3606         * graphite-sese-to-poly.c: Fix formatting.
3607         * graphite.c (graphite_transform_loops): Create the hash table
3608         after the early return.
3609
3610 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3611
3612         * gcc.dg/graphite/id-14.c: New.
3613         * gcc.dg/graphite/pr40157.c: New.
3614         * gfortran.dg/graphite/id-11.f: New.
3615
3616 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3617
3618         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3619         (build_poly_scop): Return false when there are no pbbs within
3620         loops to avoid to pass to cloog scops with no loops.
3621
3622 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3623
3624         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3625         useless test "i % 2".
3626         (build_pbb_scattering_polyhedrons): Fix formatting.
3627         (build_poly_dr): Same.
3628         * graphite.c (graphite_transform_loops): Restructure.
3629
3630 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
3631
3632         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3633         reduction_list parameter.
3634         (rewrite_all_phi_nodes_with_iv): Same.
3635         (canonicalize_loop_ivs): Same.
3636         * tree-parloops.c (struct brli): Removed.
3637         (build_reduction_list_info): Removed.
3638         (build_new_reduction): New.
3639         (analyze_reduction_list): Removed.
3640         (gather_scalar_reductions): Find reductions instead of phi
3641         nodes that can't be canonicalized.
3642         (try_create_reduction_list): Remove reduction_list parameter.
3643         (gen_parallel_loop): Same.
3644         (parallelize_loops): Remove analyze_reductions variable,
3645         initialization and free.
3646         Change reduction_list htab initialization to reduction_info
3647         elements instead of ssa names.
3648         Call try_create_reduction_list and gen_parallel_loop without
3649         analyzed_reduction argument.
3650         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3651         canonicalize_loop_ivs with one less argument.
3652         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3653
3654 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
3655
3656         * graphite-dependences.c (new_poly_dr_pair): New.
3657         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3658         (new_poly_dr_pair): New.
3659         (eq_poly_dr_pair_p): New.
3660         (hash_poly_dr_pair_p): New.
3661         * graphite-dependences.h (struct poly_dr_pair): New.
3662         (eq_poly_dr_pair_p): Declared.
3663         (hash_poly_dr_pair_p): Declared.
3664         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3665         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3666         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3667         * Makefile.in (graphite-poly.o): Add dependence on
3668         graphite-dependences.h.
3669
3670 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3671
3672         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3673         polynomials of degree > 1 pass to Graphite.
3674         * tree-chrec.c (scev_is_linear_expression): Call
3675         evolution_function_is_affine_multivariate_p.
3676         * gfortran.dg/graphite/id-10.f90: New.
3677
3678 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3679
3680         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3681         Instantiate scevs varying in outer loops.
3682         * gfortran.dg/graphite/id-9.f: Correct testcase.
3683
3684 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3685
3686         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3687         redundant constraint.
3688
3689 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3690
3691         * gcc.dg/graphite/graphite.exp: Fix comments.
3692         * gfortran.dg/graphite/graphite.exp: Trigger actions
3693         based on the file names as in the C testsuite.
3694         * gfortran.dg/graphite/block-1.f90: Fix patterns.
3695         * gfortran.dg/graphite/block-2.f: Same.
3696         * gfortran.dg/graphite/block-3.f90: Same.
3697         * gfortran.dg/graphite/block-4.f90: Same.
3698         * gfortran.dg/graphite/id-1.f90: Same.
3699         * gfortran.dg/graphite/id-2.f90: Same.
3700         * gfortran.dg/graphite/id-3.f90: Same.
3701         * gfortran.dg/graphite/id-4.f90: Same.
3702         * gfortran.dg/graphite/id-6.f: Same.
3703         * gfortran.dg/graphite/id-9.f: Same.
3704         * gfortran.dg/graphite/interchange-1.f: Same.
3705         * gfortran.dg/graphite/interchange-2.f: Same.
3706         * gfortran.dg/graphite/scop-1.f: Same.
3707
3708 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3709
3710         * sese.c (expand_scalar_variables_call): New.
3711         (expand_scalar_variables_ssa_name): Handle calls in expander.
3712
3713 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3714
3715         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3716         Expect to see the pattern twice.
3717         * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3718         * gcc.dg/graphite/interchange-5.c: Same.
3719         * gcc.dg/graphite/interchange-6.c: Same.
3720
3721 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3722
3723         * gcc.dg/graphite/id-10.c: New.
3724         * gcc.dg/graphite/id-12.c: New.
3725         * gfortran.dg/graphite/id-7.f: New.
3726         * gfortran.dg/graphite/id-8.f: New.
3727
3728 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3729
3730         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3731         zero.
3732
3733 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3734
3735         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3736
3737 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3738
3739         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3740
3741 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3742
3743         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3744         building PDR subscripts.
3745
3746 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3747
3748         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3749         computation of array sizes.
3750
3751 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3752
3753         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3754
3755 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3756
3757         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3758         build_pairwise_constraint, dr_equality_constraints,
3759         build_pairwise_scheduling_equality,
3760         build_pairwise_scheduling_inequality, lexicographically_gt_p,
3761         build_lexicographically_gt_constraint, dependence_polyhedron,
3762         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3763         Move from NNC_Polyhedron to C_Polyhedron.
3764         * graphite-interchange.c (compute_array_size_poly,
3765         gather_access_strides): Dito.
3766         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3767         free_scop, pbb_number_of_iterations): Dito.
3768         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3769         pbb_dim_iter_domain, struct scop): Dito.
3770         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3771         new_Cloog_Domain_from_ppl_Polyhedron,
3772         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3773         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3774         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3775         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3776         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3777         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3778         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3779         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3780         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3781         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3782         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3783         build_scop_iteration_domain, build_poly_dr): Dito
3784
3785 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3786
3787         * gcc.dg/graphite/graphite.exp: Added a rule to execute
3788         run-id-*.c files.
3789         * gcc.dg/graphite/run-id-1.c: New.
3790
3791 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3792
3793         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3794         positivity constraint on the symbolic number of iterations.
3795
3796 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3797
3798         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3799
3800 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3801             Tobias Grosser  <grosser@fim.uni-passau.de>
3802
3803         * graphite-clast-to-gimple.c (build_scop_context): Removed.
3804         (build_cloog_prog): Directly use SCOP_CONTEXT.
3805         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3806         (free_scop): Free SCOP_CONTEXT.
3807         (print_scop_context): New.
3808         (print_scop): Call print_scop_context.
3809         (debug_scop_context): New.
3810         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3811         (struct scop): Added field context.
3812         (SCOP_CONTEXT): New.
3813         * graphite-sese-to-poly.c (add_param_constraints): New.
3814         (build_scop_context): New.
3815         (build_poly_scop): Call build_scop_context.
3816
3817 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3818
3819         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3820         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3821         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3822         * graphite-ppl.h: Include double-int.h and tree.h.
3823         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3824         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3825         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
3826         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3827
3828 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3829
3830         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3831         POINTER_PLUS_EXPR for pointer types.
3832         (clast_to_gcc_expression): Same.
3833
3834 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3835
3836         * graphite-poly.c (print_scattering_function): Early return when
3837         PBB_TRANSFORMED_SCATTERING is not initialized.
3838         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3839
3840 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
3841
3842         * tree-parloops.c (analyze_reduction_list): Remove unused variable
3843         to fix bootstrap.
3844
3845 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
3846
3847         * tree-parloops.c (analyze_reduction_list): Change return
3848         value to void.
3849         (try_create_reduction_list): Move the call to
3850         analyze_reduction_list to the beginining.
3851         Call reduction_phi with analyzed_reductions as argument
3852         instead of reduction_list.
3853
3854 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3855
3856         *  Merge from mainline (r148296:149346)
3857
3858 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3859
3860         * graphite-scop-detection.c (graphite_can_represent_init): New.
3861         (graphite_can_represent_scev): Call graphite_can_represent_init:
3862         check that the initial value does not contain multiplications of
3863         parameters.
3864         (stmt_has_simple_data_refs_p): New.
3865         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3866         (is_simple_operand): Fix formatting.
3867         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3868
3869 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3870
3871         * gcc.dg/graphite/id-13.c: New.
3872         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3873         analyze_scalar_evolution, use scalar_evolution_in_region.
3874         (scan_tree_for_params_right_scev): Add extra assert.
3875         (parameter_index_in_region_1): Split from parameter_index_in_region.
3876         (idx_record_params): Use scalar_evolution_in_region.
3877         (find_params_in_bb): Same.
3878         (find_scop_parameters): Same.
3879         (build_loop_iteration_domains): Same.
3880         (create_linear_expr_from_tree): Same.
3881         * sese.c (scalar_evolution_in_region): New.
3882         * sese.h (scalar_evolution_in_region): Declared.
3883         (defined_in_sese_p): New.
3884         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3885         static anymore.
3886         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3887         Declared.
3888
3889 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3890
3891         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3892         TREE_DATA_REF_H also implies SCEV_H.
3893
3894 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3895
3896         * graphite-poly.c (print_scop_params): New.
3897         (print_scop): Call print_scop_params.
3898         (debug_scop_params): New.
3899         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3900
3901 2009-07-07  Li Feng  <nemokingdom@gmail.com>
3902
3903         * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3904         * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3905         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3906         * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3907         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3908         * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3909
3910 2009-07-07  Li Feng  <nemokingdom@gmail.com>
3911
3912         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3913         for dependency checking part.
3914         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3915         tests for dependency checking.
3916         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3917         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3918         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3919         flag -fdump-tree-graphite-all for autopar testsuites.
3920
3921 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
3922
3923         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3924         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3925         canonicalize_loop_ivs): Moved...
3926         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
3927
3928 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
3929
3930         * tree-parloops.c (try_create_reduction_list): Pass an extra
3931         argument analyzed_reductions.  Call analyze_reduction_list.
3932         (gen_parallel_loop): Do not call analyze_reduction_list.
3933         (parallelize_loops): Init and finalize analyzed_reductions.
3934
3935 2009-07-06  Li Feng  <nemokingdom@gmail.com>
3936
3937         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3938         Added flag -fno-loop-strip-mine for autopar testcase.
3939
3940 2009-07-04  Li Feng  <nemokingdom@gmail.com>
3941
3942         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3943         transformed scattering dimension instead of unmatch orignal when
3944         calling dependence_polyhedron.
3945
3946 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3947
3948         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3949
3950 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3951
3952         * graphite-poly.c (pbb_number_of_iterations): Check for returned
3953         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3954
3955 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3956
3957         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3958         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3959         * graphite-poly.c (pbb_number_of_iterations): New.
3960         * graphite-poly.h (pbb_number_of_iterations): Declared.
3961         (pbb_iterator_dim, pbb_parameter_dim): New.
3962
3963 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
3964
3965         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3966         last commit on type of lower and upper bound of loops.
3967
3968 2009-06-29  Li Feng  <nemokingdom@gmail.com>
3969
3970         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3971         graphite-dependences.h.
3972         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3973         (mark_bb_with_pbb): New.
3974         (get_stmtfor_depth): New.
3975         (find_pbb_via_hash): New.
3976         (dependency_in_loop_p): New.
3977         (mark_loops_parallel): New.
3978         (free_aux_in_new_loops): New.
3979         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
3980         bb with it's relevant pbb. Mark newly created loops.  Remove mark
3981         innermost loop parallel without checking.
3982         (gloog): Add parameter BB_PBB_MAPPING.
3983         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3984         (gloog): Change declaration.
3985         (mark_loop_parallel): Make extern.
3986         (free_aux_in_new_loops): Declare.
3987         (bb_pbb_map_hash): New.
3988         (eq_bb_pbb_map): New.
3989         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3990         auto parallelization when flag_graphite_force_parallel is set.
3991         (graphite_finalize): Added free_aux_in_new_loops.
3992         * tree-parloops.c (parallelize_loops): Only generate parallel code for
3993         the innermost loop that marked parallel.  Use
3994         flag_graphite_force_parallel instead of loop->can_be_parallel.
3995         (loop_parallel_p): Move inner most checking out of function.
3996
3997 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3998
3999         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
4000         type of lower and upper bound of loops signed long int.
4001
4002 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4003
4004         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
4005         expression outside the loop.
4006
4007 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4008
4009         * gcc.dg/graphite/interchange-8.c: New.
4010
4011 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4012
4013         * gcc.dg/graphite/interchange-0.c: XFailed.
4014         * gcc.dg/graphite/interchange-5.c: XFailed.
4015         * gcc.dg/graphite/interchange-6.c: XFailed.
4016
4017 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4018
4019         * graphite-interchange.c (compute_array_size_poly): The end of the
4020         recursion should return 1.
4021
4022 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4023
4024         * graphite-interchange.c (compute_array_size_cstr): Allow the
4025         subscript multiplier to be -1.
4026         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
4027         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
4028         data_container.  Initializes PDR_DATA_CONTAINER.
4029         (print_pdr_access_layout): New.
4030         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
4031         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
4032         data_container.
4033         (PDR_DATA_CONTAINER): New.
4034         (new_poly_dr): Update declaration.
4035         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
4036         (build_poly_dr): Call pdr_add_data_dimensions.
4037
4038 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4039
4040         * graphite-poly.h (struct poly_dr): Fix comment.
4041         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
4042         (pdr_add_memory_accesses): New.
4043         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
4044
4045 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4046
4047         * graphite-poly.c (print_pdrs, debug_pdrs): New.
4048         (print_pbb): Add call to print_pdrs.
4049         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
4050
4051 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
4052             Li Feng <nemokingdom@gmail.com>
4053
4054         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
4055         (dependency_between_pbbs_p): New.
4056         (lexicographically_gt_p): Assure !empty_p before polyhedron
4057         intersection assign.
4058         (build_lexicographically_gt_constraint): Correct lexicographically
4059         judging.
4060         * graphite-dependences.h: New.
4061         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
4062
4063 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4064
4065         * graphite-clast-to-gimple.c (print_clast_stmt): New.
4066         (gloog): Print to dump_file the generated clast.
4067         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
4068         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
4069
4070 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4071
4072         * graphite-poly.c (extend_scattering): Increment
4073         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
4074
4075 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4076
4077         * graphite-interchange.c (compute_array_size_poly): Added exit of
4078         recursion condition.  Continue iterating even after the first equality.
4079         (compute_array_size): Same.
4080
4081 2009-06-24  Li Feng  <nemokingdom@gmail.com>
4082
4083         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
4084         -fdump-tree-final_cleanup to -fdump-tree-optimized.
4085         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4086         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4087         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
4088
4089 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4090
4091         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
4092         only when the use verifies is_gimple_reg.
4093
4094 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4095
4096         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
4097         Allocate scaldims after call to unify_scattering_dimensions.
4098
4099 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4100
4101         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4102
4103 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4104             Albert Cohen  <albert.cohen@inria.fr>
4105
4106         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4107         variables for the strip mining.
4108
4109 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4110             Pranav Garg  <pranav.garg2107@gmail.com>
4111
4112         * Makefile.in (OBJS-common): Added graphite-blocking.o.
4113         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4114         (graphite-blocking.o): New rule.
4115         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4116         * graphite-blocking.c: New.
4117         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4118         flag_loop_strip_mine.
4119         (psct_scattering_dim_for_loop_depth): New.
4120         * graphite-poly.h (scop_do_strip_mine): Declared.
4121         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4122         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4123         flag_loop_strip_mine.
4124
4125 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4126
4127         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4128         a GMP value and a PPL coefficient at each iteration of a loop.
4129
4130 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4131
4132         * graphite-dependences.c (dependence_polyhedron): Do not use
4133         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
4134         pbb_nb_scattering_transform.
4135         (graphite_legal_transform_dr): Same.
4136         * graphite-poly.c (extend_scattering): Same.
4137         (unify_scattering_dimensions): Same.
4138         (print_scattering_function): Same.
4139         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4140         PBB_NB_LOCAL_VARIABLES.
4141         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4142         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4143         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4144         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4145         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4146         (pbb_nb_scattering_transform): New.
4147         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4148         (psco_scattering_dim): Add assert on parameters.
4149         (psct_scattering_dim): Same.
4150         (psct_scattering_dim_for_loop_depth): Declared.
4151         (psct_local_var_dim): New.
4152         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4153         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
4154         correct layout, call pbb_nb_local_vars.
4155         (psct_add_local_variable, psct_add_scattering_dimension): New.
4156         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4157         Initialize PBB_NB_SCATTERING_TRANSFORM.
4158
4159 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4160
4161         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4162         (set_coef): Renamed ppl_set_coef.
4163         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4164
4165 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4166
4167         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4168         test a boolean against 1.
4169         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4170         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4171         (pbb_do_interchange): Returns true when a transform has been performed.
4172         (scop_do_interchange): Same.
4173         * graphite-poly.c (apply_poly_transforms): Use the return value of
4174         scop_do_interchange.
4175         * graphite-poly.h (scop_do_interchange): Update declaration.
4176
4177 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
4178
4179         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4180         after last use.
4181         * sese.c (sese_reset_aux_in_loops): New.
4182         * sese.h (sese_reset_aux_in_loops): New.
4183
4184 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4185
4186         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4187         multiplier and multiply the constant by the multiplier.
4188         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4189         (build_poly_dr): Do not use the multiplier to define the subscript.
4190
4191 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4192
4193         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4194         compiler's data reference.  Initialize PDR_CDR.
4195         (print_pdr): Call dump_data_reference.
4196         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4197         Add compiler_dr field.
4198         (PDR_BB): Renamed PDR_PBB.
4199         (PDR_CDR): New.
4200         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4201         GCC's data reference representation.
4202         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4203         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4204
4205 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4206
4207         * graphite-poly.c (print_scattering_function): Also print the layout.
4208         * graphite-poly.h (pbb_nb_local_vars): New.
4209
4210 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4211
4212         * graphite-poly.c (print_pbb_domain): Also print the layout names.
4213
4214 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4215
4216         * graphite-poly.c (print_pdr, debug_pdr): New.
4217         * graphite-poly.h (print_pdr, debug_pdr): Declared.
4218         (PDR_BASE): Removed.
4219
4220 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4221
4222         * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4223         ltrans-{1..6,8}.c.
4224
4225 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4226
4227         * graphite-interchange.c (compute_subscript): Allow also -1 in the
4228         subscript identification column.
4229         (pbb_do_interchange): Print to dump_file that some loops "will be
4230         interchanged".  Rely on that chain of characters in the testcases.
4231         * gcc.dg/graphite/interchange-0.c: New.
4232         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4233         interchange-*.c files and compile them with -floop-interchange.
4234
4235 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
4236
4237         * graphite-interchange.c (interchange_profitable_p): Renamed
4238         pbb_interchange_profitable_p.
4239
4240 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4241             Harsha Jagasia  <harsha.jagasia@amd.com>
4242             Pranav Garg  <pranav.garg2107@gmail.com>
4243
4244         * graphite-interchange.c (interchange_profitable_p): Make static.
4245         (pbb_interchange_loop_depths, pbb_do_interchange,
4246         scop_do_interchange): New.
4247         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4248         for flag_loop_interchange.
4249         * graphite-poly.h (scop_do_interchange): Declared.
4250         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4251         flag_loop_interchange is used.
4252
4253 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4254
4255         * graphite-dependences.c (dependence_polyhedron): Update use of
4256         pbb_nb_scattering_dims.
4257         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4258         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4259         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4260         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4261
4262 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4263
4264         * graphite.c: Cleanup foo.
4265
4266 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4267
4268         * Merge from mainline (r143684:148293).
4269         * Disabled libpcp until it gets fixed.
4270
4271 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4272             Harsha Jagasia  <harsha.jagasia@amd.com>
4273
4274         * graphite-interchange.c: New.
4275         * Makefile.in (graphite-interchange.o): New.
4276         * graphite-poly.h (interchange_profitable_p): Declared.
4277         * graphite-ppl.h (value_max): New.
4278
4279 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4280
4281         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4282         * graphite-poly.h: Fix some comments.
4283         (pdr_dim): New.
4284         (pdr_scop): New.
4285
4286 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4287
4288         * graphite-poly.h
4289         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4290         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4291         (pdr_accessp_nb_params): Renamed pdr_nb_params.
4292         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4293         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4294         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4295         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4296         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4297         * graphite-clast-to-gimple.c: Same.
4298         * graphite-dependences.c: Same.
4299         * graphite-poly.c: Same.
4300         * graphite-sese-to-poly.c: Same.
4301
4302 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4303
4304         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4305         expressions for an IV rename, as returned by clast_to_gcc_expression.
4306         (copy_renames): Rename new_name to expr.
4307         * sese.c (debug_rename_elt): Same.
4308         (get_rename): Same.
4309         (set_rename): Same.
4310         (sese_adjust_liveout_phis): Call force_gimple_operand before using
4311         the information from the rename map.
4312         (rename_variables_in_stmt): Same.
4313         (add_loop_exit_phis): Rename new_name to expr.
4314         (insert_loop_close_phis): Same.
4315         (add_guard_exit_phis): Same.  Call force_gimple_operand.
4316         * sese.h (struct rename_map_elt): Rename new_name to expr.
4317         (new_rename_map_elt): Same.
4318
4319 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4320
4321         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4322         * sese.c (set_rename): Make it extern.
4323         * sese.h (set_rename): Declared.
4324
4325 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4326
4327         * graphite-poly.c (extend_scattering): Free values.
4328         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4329         Free iterators.
4330         (ppl_print_powerset_matrix): Same.
4331         * graphite-scop-detection.c (free_scops_1): New.
4332         (limit_scops): Call free_scops_1.
4333         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4334         (build_poly_dr): Free PPL coefficients.
4335         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4336
4337 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
4338
4339         * graphite-dependences.c: New.
4340         * graphite-data-ref.c: Removed.
4341         * graphite-data-ref.h: Removed.
4342         * Makefile.in (graphite-data-ref.o): Removed.
4343         (graphite-dependences.o): Added.
4344         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4345         * graphite-poly.c: Same.
4346         Move the data dependence testing to graphite-dependences.c.
4347
4348 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
4349
4350         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4351         from graphite_cannot_represent_loop. Code refactored.
4352         (scopdet_basic_block_info): Call graphite_can_represent_loop.
4353
4354 2009-05-17  Li Feng  <nemokingdom@gmail.com>
4355
4356         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4357         Cover all the testcases (not only the filtered ones).
4358
4359 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4360
4361         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4362         unnecessary check. Update comments. Move check for REAL_TYPE here.
4363         (harmful_stmt_in_bb): Remove checks for conditions. This is already
4364         done in (stmt_simple_for_scop_p).
4365
4366 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
4367
4368         * graphite.c (print_global_statistics): New.
4369         (print_graphite_scop_statistic): New.
4370         (print_graphite_statistics): New.
4371         (graphite_initialize, graphite_transform_loops): Print statistics.
4372         * graphite-scop-detection (build_scops): Print statistics.
4373         (print_graphite_scop_statistics): New.
4374         (print_graphite_statistics): New.
4375
4376 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4377
4378         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4379         (debug_clast_name_index): Removed.
4380         (debug_clast_name_indexes_1): Removed.
4381         (debug_clast_name_indexes): Removed.
4382         (clast_name_index_elt_info): Removed.
4383         (eq_clast_name_indexes): Removed.
4384         (clast_name_to_index): Removed.
4385         (new_clast_name_index): Removed.
4386         (save_clast_name_index): Removed.
4387         (save_var_name): Moved...
4388         (init_sese_params_index): Removed.
4389         (clast_name_to_gcc): Remove use of name_tree.
4390         (initialize_cloog_names): Same.
4391         (gloog): Do not call init_sese_params_index.
4392         * graphite-sese-to-poly.c (save_var_name): ...here.
4393         (parameter_index_in_region): New.
4394         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4395         (parameter_index_in_region): Removed.
4396         (is_parameter): Remove use of name_tree.
4397         * sese.h (struct name_tree): Removed.
4398         (struct sese): Remove use of name_tree.  New field params_names.
4399         (SESE_PARAMS_NAMES): New.
4400         (SESE_PARAMS): Remove duplicate.
4401         (parameter_index_in_region): Removed.
4402         (sese_nb_params): Remove use of name_tree.
4403         (struct clast_name_index): New.
4404         (new_clast_name_index): New.
4405         (clast_name_to_index): New.
4406         (save_clast_name_index): New.
4407         (debug_clast_name_index): New.
4408         (debug_clast_name_indexes_1): New.
4409         (debug_clast_name_indexes): New.
4410         (clast_name_index_elt_info): New.
4411         (eq_clast_name_indexes): New.
4412
4413 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4414
4415         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4416         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
4417         (graphite_loop_normal_form): Do not pass region.  Do not
4418         initialize SESE_OLDIVS.
4419         (build_graphite_loop_normal_form): Update call to
4420         graphite_loop_normal_form.
4421         * sese.c (debug_oldivs): Removed.
4422         (new_sese): Do not initialize SESE_OLDIVS.
4423         (free_sese): Do not free SESE_OLDIVS.
4424         (oldiv_for_loop): Removed.
4425         * sese.h (struct sese): Remove old_ivs.
4426         (SESE_OLDIVS): Removed.
4427         (oldiv_for_loop): Removed.
4428
4429 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4430
4431         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4432         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
4433         replaced by a call to newivs_to_depth_to_newiv.
4434         (clast_to_gcc_expression): Pass newivs, remove ivstack.
4435         (clast_to_gcc_expression_red): Same.
4436         (gcc_type_for_clast_expr): Same.
4437         (gcc_type_for_clast_eq): Same.
4438         (graphite_translate_clast_equation): Same.
4439         (graphite_create_guard_cond_expr): Same.
4440         (graphite_create_new_guard): Same.
4441         (graphite_create_new_loop): Same.
4442         (build_iv_mapping): Same.
4443         (translate_clast): Same.
4444         (gloog): Same.
4445         (loop_iv_stack_patch_for_consts): Removed.  *
4446         sese.c (iv_stack_entry_is_constant): Removed.
4447         (iv_stack_entry_is_iv): Removed.
4448         (loop_iv_stack_push_iv): Removed.
4449         (loop_iv_stack_insert_constant): Removed.
4450         (loop_iv_stack_pop): Removed.
4451         (loop_iv_stack_get_iv): Removed.
4452         (loop_iv_stack_get_iv_from_name): Removed.
4453         (debug_loop_iv_stack): Removed.
4454         (free_loop_iv_stack): Removed.
4455         (loop_iv_stack_remove_constants): Removed.  *
4456         sese.h (iv_stack_entry_kind): Removed.
4457         (iv_stack_entry_data_union): Removed.
4458         (iv_stack_entry_struct): Removed.
4459         (iv_stack_entry_p): Removed.
4460         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4461         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4462         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4463         loop_iv_stack_pop, free_loop_iv_stack): Removed.
4464         (gbb_loop_at_index): Fix indenting.
4465         (gbb_loop_index): Removed.
4466
4467 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4468
4469         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4470         Call clast_name_to_index.
4471
4472 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4473
4474         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4475         do not pass params.  Get params from SESE_PARAMS.
4476         (clast_to_gcc_expression): Same.
4477         (clast_to_gcc_expression_red): Same.
4478         (gcc_type_for_clast_eq): Same.
4479         (graphite_translate_clast_equation): Same.
4480         (graphite_create_new_loop): Same.
4481         * sese.c (rename_variables_in_stmt): Fix comment.
4482
4483 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4484
4485         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4486         newivs_index.
4487         Call save_clast_name_index.
4488         (translate_clast): Pass newivs_index.
4489         (gloog): Create and free newivs_index.
4490
4491 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4492
4493         * graphite-clast-to-gimple.c (clast_name_index): New structure.
4494         (clast_name_index_p): New type.
4495         (debug_clast_name_index): New.
4496         (debug_clast_name_indexes_1): New.
4497         (debug_clast_name_indexes): New.
4498         (clast_name_index_elt_info): New.
4499         (eq_clast_name_indexes): New.
4500         (clast_name_to_index): New.
4501         (new_clast_name_index): New.
4502         (save_clast_name_index): New.
4503         (init_sese_params_index): New.
4504         (gloog): Call init_sese_params_index.
4505         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4506         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4507         (free_sese): Free SESE_PARAMS_INDEX.
4508         * sese.h (struct sese): Add params_index.
4509         (SESE_PARAMS_INDEX): New.
4510
4511 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4512
4513         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4514         (graphite_create_new_loop): Pass the newivs vector.  Push the
4515         newly created IV to newivs.
4516         (translate_clast): Pass the newivs vector.
4517         (gloog): Create and destroy the newivs vector.
4518
4519 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4520
4521         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4522         (graphite_loop_normal_form): Initialize loop->aux with the unique
4523         IV that has been created.
4524
4525 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
4526
4527         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4528         scev with parameters in the base part. They where forbidden
4529         exidently.
4530
4531 2009-05-11  Li Feng  <nemokingdom@gmail.com>
4532
4533         * gcc.dg/graphite/graphite.exp: Set different default
4534         compile options by file names.
4535         * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4536         * gcc.dg/graphite/id-{1-9}.c: Ditto.
4537         * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4538         * gcc.dg/graphite/scop-matmult.c: Ditto.
4539
4540 2009-05-08  Li Feng <nemokingdom@gmail.com>
4541
4542         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4543         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4544         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4545         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4546
4547 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4548
4549         * graphite-scop-detection (build_scops_1): Fix little bug introduced
4550         by final cleanup.
4551
4552 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4553
4554         * graphite-scop-detection.c (graphite_can_represent_scev): Only
4555         allow integer constant strides.
4556         (graphite_can_represent_expr): Depend on outermost_loop.
4557         (stmt_simple_memref_p, graphite_cannot_represent_loop,
4558         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4559         build_scops_1): Same.
4560         (scopdet_basic_block_info): Same and insert layered SCoP
4561         detection.
4562         (try_generate_gimple_bb): Cleanup.
4563         (build_scops): Enable data references.
4564
4565         * gcc.dg/graphite/id-5.c: New.
4566         * gcc.dg/graphite/id-9.c: New.
4567         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4568         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4569
4570 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4571
4572         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4573         that we have not yet built for this SCoP.
4574
4575 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4576
4577         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4578         for complex numbers.
4579
4580 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4581
4582         * graphite-ppl.c: Fix build if cloog is not available.
4583
4584 2009-05-04  Li Feng  <nemokingdom@gmail.com>
4585
4586         * tree-parloops.c (loop_parallel_p): Remove construction of
4587         NITER and REDUCTION_LIST.
4588         (try_get_loop_niter): New.
4589         (try_create_reduction_list): New.
4590         (parallelize_loops): Bypass the failed checkings in autopar
4591         when can_be_parallel in loop structure is set to true.
4592
4593 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4594
4595         * gcc.dg/graphite/id-6.c: Update testcase.
4596         * gcc.dg/graphite/scop-3.c: Dito.
4597
4598 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4599
4600         * graphite-scop-detection.c (stmt_simple_for_scop_p):
4601         Enable EQ_EXPR and NE_EXPR again.
4602
4603 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4604
4605         * graphite-scop-detection.c (graphite_can_represent_scev):
4606         Add check if scev is affine multivariate.
4607         (harmful_stmt_in_bb): Check if we can represent the conditions.
4608         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4609         harmful_stmt_in_bb.
4610         * gcc.dg/graphite/id-7.c: New.
4611
4612 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4613
4614         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4615         Check all bbs in region, not only the bbs that are represented in
4616         GRAPHITE.
4617         (build_poly_scop): Add newline.
4618         * gcc.dg/graphite/id-8.c: New.
4619
4620 2009-04-30  Li Feng  <nemokingdom@gmail.com>
4621
4622         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4623         when loop initialize.
4624         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4625         * common.opt: Declare flag_graphite_force_parallel.
4626         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4627         loop parallel.
4628         * graphite-poly.c (apply_poly_transforms): Introduce
4629         flag_graphite_force_parallel.
4630         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4631         * toplev.c (process_options): ditto and replace a not correctly
4632         encoded space.
4633
4634 2009-04-30  Li Feng  <nemokingdom@gmail.com>
4635
4636         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4637         Change the call of gbb_loop_at_index and/or gbb_loop_index due
4638         to the redefinition.
4639         (compute_cloog_iv_types_1): ditto.
4640         (build_iv_mapping): ditto.
4641         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4642         initialization.
4643         (free_gimple_bb): Removed GBB_LOOPS related free part.
4644         (build_bb_loops): Removed.
4645         * sese.h (struct gimple_bb): Removed loops.
4646         (GBB_LOOPS): Removed.
4647         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4648         (gbb_loop_index): ditto.
4649
4650 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4651
4652         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4653         allow non constant strides.
4654         * gcc.dg/graphite/scop-20.c: New.
4655
4656 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4657
4658         * graphite-scop-detection.c (dot_all_scops): Fix system call
4659         return value warning.
4660         (dot_scop): Same.
4661
4662 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4663
4664         * gcc.dg/graphite/id-6.c: Fix pattern.
4665         * gcc.dg/graphite/scop-3.c: Same.
4666
4667 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4668
4669         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4670         build_pairwise_constraint, dr_equality_constraints,
4671         build_pairwise_scheduling_equality,
4672         build_pairwise_scheduling_inequality, lexicographically_gt_p,
4673         build_lexicographically_gt_constraint, dependence_polyhedron,
4674         graphite_legal_transform_dr, graphite_legal_transform_bb,
4675         graphite_legal_transform): New.
4676         * graphite-poly.h (graphite_legal_transform): Declared.
4677         * graphite-sese-to-poly.c (build_poly_scop): Call to
4678         graphite_legal_transform is disabled for the moment.
4679
4680 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4681
4682         * graphite-poly.h (pbb_nb_scattering_dims): New.
4683         (pbb_nb_scattering): Use it.
4684
4685 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4686
4687         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4688         Pointset_Powerset version of ppl_insert_dimensions.
4689         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4690
4691 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4692
4693         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4694
4695 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4696
4697         * graphite-poly.h: Fix comment.
4698
4699 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4700
4701         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4702
4703 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4704
4705         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4706         statements.
4707
4708 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4709
4710         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4711         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4712         conditions.
4713
4714 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
4715
4716         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4717         handle EQ_EXPR and NE_EXPR.
4718
4719 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4720
4721         * graphite-poly.h (poly_dr): Fix comment.
4722
4723 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
4724             Tobias Grosser  <grosser@fim.uni-passau.de>
4725
4726         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4727         with a zero dimension polyhedron.
4728         (find_scop_parameters): Move the call to scop_set_nb_params here.
4729         (build_loop_iteration_domains): Store in loop->aux the iteration
4730         domain polyhedron.
4731         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4732         by any loop in scop.
4733         (build_poly_scop): Do not call scop_set_nb_params.
4734
4735 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
4736             Tobias Grosser  <grosser@fim.uni-passau.de>
4737
4738         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4739         add_condition_to_domain not GT_EXPR.
4740
4741 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4742
4743         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4744         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4745         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4746         upper_bound_assign to calculate unions.
4747         * gcc.dg/graphite/id-6.c: New.
4748
4749 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4750
4751         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4752         handle abnormal edges.
4753
4754 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4755
4756         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4757         (free_poly_bb): Also free poly_drs.
4758         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4759         (poly_dr): Polyhedron to Pointset_Powerset.
4760         (pdr_accessp_nb_subscripts): Same.
4761         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4762         poly_drs.
4763
4764 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4765
4766         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4767         names into more meaningful names.
4768
4769 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4770
4771         * gfortran.dg/graphite/interchange-1.c: New.
4772         * gfortran.dg/graphite/interchange-2.c: New.
4773
4774 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4775
4776         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4777         the reduction_list.
4778         * tree-parloops.c (rewrite_phi_with_iv): New.
4779         (rewrite_all_phi_nodes_with_iv): New.
4780         (canonicalize_loop_ivs): Call them.
4781
4782 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4783
4784         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4785         graphite_find_data_references_in_stmt.
4786         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4787         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4788
4789 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4790
4791         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4792
4793 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4794
4795         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4796         instead of bb_in_region.
4797         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
4798         (build_sese_conditions): Use flag_bb_in_sese.
4799         * sese.c (register_bb_in_sese): Removed.
4800         (new_sese): Remove initialization of SESE_REGION_BBS.
4801         (free_sese): Do not free SESE_REGION_BBS.
4802         * sese.h (struct sese): Remove field region_basic_blocks.
4803         (SESE_REGION_BBS): Removed.
4804         (bb_in_sese_p): Implement in function of bb_in_region.
4805
4806 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4807
4808         * graphite-scop-detection.c (limit_scops): Deal only with single exit
4809         loops.
4810
4811 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4812
4813         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4814         and EQ_EXPR.
4815         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4816         (add_condition_to_domain): New.
4817         (add_condition_to_pbb): New.
4818         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4819         * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4820
4821 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4822
4823         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4824         ppl_Pointset_Powerset.
4825         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4826         * graphite-poly.h (poly_bb): poly_bb.domain Same.
4827         (pbb_nb_loops): Same.
4828         * graphite-sese-to-poly.c (build_loop_iteration_domains,
4829         add_conditions_to_domain): Same.
4830         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4831         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4832         ppl_const_Polyhedron_t.
4833         (ppl_print_powerset_matrix): New.
4834         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4835         ppl_print_powerset_matrix): New.
4836         (ppl_print_polyhedron_matrix): Updated.
4837
4838 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4839
4840         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4841
4842 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4843
4844         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
4845         (print_iteration_domains, debug_iteration_domain,
4846         debug_iteration_domains): New.
4847         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4848         debug_iteration_domains): Declared.
4849         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4850         indenting.
4851
4852 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
4853             Sebastian Pop  <sebastian.pop@amd.com>
4854
4855         * graphite-poly.h (print_iteration_domain): New.
4856         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4857         (build_sese_conditions_1, build_sese_conditions_after,
4858         build_sese_conditions_before): New.
4859         (build_sese_conditions): Rewritten.
4860
4861 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
4862             Tobias Grosser  <grosser@fim.uni-passau.de>
4863
4864         Cleanup of code generation liveouts.
4865         * graphite-clast-to-gimple.c (translate_clast): Use a single
4866         rename_map instead of one per translated statement.
4867         Do not use SESE_LIVEOUT_RENAMES.
4868         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4869         (gloog): Do not use SESE_LIVEOUT_RENAMES.
4870         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4871         phi node of a reduction: when a loop contains a reduction used outside
4872         the loop, there should be a scalar close phi node on the exit block.
4873         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4874         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4875         (free_sese): Do not free them.
4876         (sese_build_liveouts_use): Do not use them.
4877         (sese_build_liveouts_bb): Same.
4878         (sese_build_liveouts): Same.
4879         (sese_insert_phis_for_liveouts): Same.
4880         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
4881         (defined_in_loop_p): New.
4882         (alive_after_loop): New.
4883         (close_phi_not_yet_inserted_p): New.
4884         (struct alep, alep_p): New.
4885         (add_loop_exit_phis): Remove from the rename_map all the names defined
4886         in the code generated loop.
4887         (insert_loop_close_phis): Traverse the rename_map passed to it.
4888         Don't use SESE_LIVEOUT_RENAMES.
4889         (default_liveout_before_guard): Renamed default_before_guard.
4890         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4891         (graphite_copy_stmts_from_block): Do not directly call set_rename.
4892         (register_sese_liveout_renames): Removed.
4893         (copy_bb_and_scalar_dependences): Do not call it.
4894         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4895         reduction_list.
4896         (SESE_LIVEOUT): Removed.
4897         (SESE_LIVEOUT_RENAMES): Removed.
4898         (SESE_REDUCTION_LIST): Removed.
4899         (sese_build_liveouts): Removed.
4900         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4901         (insert_loop_close_phis): Pass a htab_t instead of a sese.
4902         (insert_guard_phis): Same.
4903         (rename_map_elt): Declare a VEC of them.
4904         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4905         trees not pointers to trees.
4906
4907         Rewrite in canonical close SSA form:
4908         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4909         (limit_scops): Close the scop after the block containing the close phi
4910         nodes.
4911         (canonicalize_loop_closed_ssa): New.
4912         (canonicalize_loop_closed_ssa_form): New.
4913         (build_scops): Call canonicalize_loop_closed_ssa_form.
4914
4915         * graphite-sese-to-poly.c: Fix typos.
4916
4917 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
4918
4919         * graphite-poly.c (print_scattering_function, print_pbb_domain):
4920         Extended.
4921         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4922         (print_pbb): Add conditions.
4923
4924 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4925             Sebastian Pop  <sebastian.pop@amd.com>
4926
4927         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4928         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4929         (build_scop_bbs_1): New.
4930         (build_scop_bbs): Rewrite.
4931         * sese.h (bb_in_region): New.
4932
4933 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4934
4935         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4936         poly_drs vector.
4937         (print_scop): Style.
4938         * graphite-poly.h (poly_bb): Add drs vector.
4939         (PBB_DRS): Add accessor.
4940         * graphite-sese-to-poly.c (build_poly_dr): New.
4941         (build_pbb_drs, build_scop_drs): New.
4942         (build_poly_scop): call build_scop_drs (Disabled at the moment).
4943
4944 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4945
4946         * tree-ssa-loop.c: Include forgotten toplev.h
4947
4948 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4949
4950         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4951         * gcc.dg/graphite/pr37883.c: Remove -floop-*
4952         * gcc.dg/graphite/pr37928.c: Same
4953         * gcc.dg/graphite/pr38409.c: Same
4954         * gcc.dg/graphite/pr38498.c: Same
4955         * gcc.dg/graphite/pr38559.c: Same
4956         * gcc.dg/graphite/pr39335.c: Same
4957         * gcc.dg/graphite/pr39335_1.c: Same
4958         * gfortran.dg/graphite/block-2.f: Same
4959         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4960         with -floop-*.
4961
4962 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
4963
4964         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4965         build_access_matrix, build_scop_data_accesses): Remove access function
4966         building. (We get a new version soon).
4967         (build_bb_loops, scan_tree_for_params_right_scev): Update.
4968         * sese.h (nb_loops_around_loop_in_sese): Remove.
4969         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4970
4971 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
4972             Sebastian Pop  <sebastian.pop@amd.com>
4973
4974         * graphite-scop-detection.c (struct scopdet_info): Rename last
4975         field to exit.
4976         (scopdet_basic_block_info, build_scops_1): Don't use
4977         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
4978
4979 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
4980             Sebastian Pop  <sebastian.pop@amd.com>
4981
4982         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4983         * sese.c (sese_build_liveouts_use): Renamed from
4984         sese_build_livein_liveouts_use. Remove liveins.
4985         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4986         Call sese_build_liveouts_use.
4987         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4988         Call sese_build_liveouts_bb.
4989         (new_sese, free_sese): Remove liveins.
4990         (sese_add_exit_phis_var): Deleted.
4991         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4992         directly.
4993         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4994
4995         * sese.h (sese): Remove num_ver and livein.
4996         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4997
4998 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4999
5000         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
5001
5002 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
5003
5004         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
5005         (build_scop_scattering): Do not use compare_prefix_loops any more.
5006         (nb_common_loops): New.
5007
5008 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5009
5010         * sese.c (get_new_name_from_old_name): Renamed get_rename.
5011         (register_old_and_new_names): Renamed set_rename.
5012
5013 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5014
5015         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
5016         of the decl from the previous commit.
5017
5018 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5019
5020         * graphite-scop-detection.c (dot_scop): New.
5021         * graphite-scop-detection.h (dot_scop): Declared.
5022
5023 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5024
5025         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
5026
5027 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5028
5029         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
5030         condition at the end of the loop.
5031         * graphite.c (graphite_initialize, graphite_finalize): Print to
5032         dump_file the compiled function.
5033         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
5034         of create_empty_loop_on_edge.
5035         (translate_clast): Update the code generation of loops for the new
5036         shape of loops.
5037         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
5038
5039 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5040
5041         Reverted the patch from 2009-03-19.
5042
5043 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
5044
5045         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5046         poly_drs vector.
5047         (print_scop): Style.
5048         * graphite-poly.h (poly_bb): Add drs vector.
5049         (PBB_DRS): Add accessor.
5050         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
5051         (build_access_matrix_with_af, build_access_matrix,
5052         build_scop_data_accesses): Delete.
5053         (build_poly_dr): New.
5054         (build_pbb_drs, build_scop_drs): New.
5055         (build_poly_scop): call build_scop_drs.
5056
5057 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
5058
5059         * graphite-scop-detection.c (dot_all_scops_1): Close the table
5060         once per basic block.
5061
5062 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
5063
5064         * graphite-scop-detection.c (graphite_can_represent_scev): New.
5065         (graphite_can_represent_expr): Renamed from loop_affine_expr
5066         and enhanced.
5067         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
5068         (graphite_cannot_represent_loop): Add scop_entry to parameters.
5069         (scopdet_basic_block_info): Actually define entry_block.
5070         (stmt_simple_memref_p): Moved here from ...
5071
5072         * tree-data-ref.c (stmt_simple_memref_p): here.
5073         * tree-data-ref.h (stmt_simple_memref_p): Removed.
5074
5075 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
5076
5077         * gcc.dg/graphite/id-4.c: New.
5078
5079 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
5080
5081         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5082         (register_old_and_new_names): Update the content of the map.
5083         When there was already a rename_map_elt in the map at that
5084         location, free it.
5085         (copy_bb_and_scalar_dependences): Do rename_variables after
5086         expand_scalar_variables.
5087         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5088         of the map.  When there was already a rename_map_elt in the
5089         map at that location, free it.
5090         (translate_clast): Pass the rename_map.  Do not initialize and free
5091         a rename_map per stmt_user.
5092         (gloog): Initialize and free one rename_map and pass it to
5093         translate_clast.
5094
5095 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
5096
5097         * sese.c (expand_scalar_variables_stmt,
5098         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5099         parameter.
5100         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5101         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5102         the gimple_stmt_iterator of the statement to be expanded.
5103         * graphite-scop-detection.c (is_simple_operand): Do handle
5104         REALPART_EXPR.
5105
5106 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5107
5108         * graphite-scop-detection.c (is_simple_operand): Do not handle
5109         REALPART_EXPR.
5110         * gcc.dg/graphite/id-2.c: New.
5111
5112         * graphite-sese-to-poly.c (build_bb_loops,
5113         add_value_to_dim, scan_tree_for_params_right_scev,
5114         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5115         find_params_in_bb, build_loop_iteration_domains,
5116         add_conditions_to_domain): Remove subtract.
5117
5118 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5119
5120         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5121         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5122         pbb_loop_at_index -> gbb_loop_at_index.
5123         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5124         (debug_loop_vec): Delete.
5125         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5126         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
5127         (PBB_LOOPS): Removed.
5128         (PBB_BLACK_BOX): Insert cast.
5129         (pbb_set_black_box): New setter.
5130         (pbb_loop_at_index, pbb_loop_index): Removed.
5131         (scop_set_region, scop_set_nb_params): New.
5132         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5133         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5134         (build_poly_scop): Use scop_set_nb_params.
5135         * sese.h (gimple_bb): Add LOOPS.
5136         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5137
5138 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5139
5140         Revert previous commit.
5141
5142 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5143
5144         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5145         (register_old_and_new_names): Update the content of the map.
5146         When there was already a rename_map_elt in the map at that
5147         location, free it.
5148         (copy_bb_and_scalar_dependences): Do rename_variables after
5149         expand_scalar_variables.
5150         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5151         of the map.  When there was already a rename_map_elt in the
5152         map at that location, free it.
5153         (translate_clast): Pass the rename_map.  Do not initialize and free
5154         a rename_map per stmt_user.
5155         (gloog): Initialize and free one rename_map and pass it to
5156         translate_clast.
5157
5158 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5159
5160         Remove forgotten line in revert.
5161
5162 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5163
5164         Revert previous commit.
5165
5166 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5167
5168         * sese.c (register_old_and_new_names): Update the content
5169         of the map.  When there was already a rename_map_elt in the
5170         map at that location, free it.
5171         (copy_bb_and_scalar_dependences): Do rename_variables after
5172         expand_scalar_variables.
5173         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5174         of the map.  When there was already a rename_map_elt in the
5175         map at that location, free it.
5176         (translate_clast): Pass the rename_map.  Do not initialize and free
5177         a rename_map per stmt_user.
5178         (gloog): Initialize and free one rename_map and pass it to
5179         translate_clast.
5180
5181 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5182
5183         * graphite-clast-to-gimple.c (translate_clast): context_loop
5184         is never NULL.
5185
5186 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5187             Sebastian Pop  <sebastian.pop@amd.com>
5188
5189         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5190         of the use of ppl_Polyhedron_map_space_dimensions.
5191
5192 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5193             Sebastian Pop  <sebastian.pop@amd.com>
5194
5195         * graphite-poly.c (unify_scattering_dimensions): Fix types.
5196         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5197         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5198         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5199         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5200         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5201         pbb_nb_params): New.
5202         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5203         nb_loops_around_pbb): Adapt return types.
5204
5205 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5206
5207         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5208         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5209         graphite-scop-detection.o, graphite-poly.o): Add
5210         more headers.
5211
5212 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5213
5214         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5215         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5216         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5217
5218 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5219
5220         * gcc.dg/graphite/pr37485.c: Remove -floop-block
5221         * gcc.dg/graphite/pr37828.c: Same.
5222         * gcc.dg/graphite/pr37684.c: Same.
5223         * gcc.dg/graphite/block-0.c: Same.
5224         * gcc.dg/graphite/block-1.c: Same.
5225         * gcc.dg/graphite/block-2.c: Same.
5226         * gcc.dg/graphite/block-3.c: Same.
5227         * gcc.dg/graphite/block-4.c: Same.
5228         * gcc.dg/graphite/block-5.c: Same.
5229         * gcc.dg/graphite/block-6.c: Same.
5230         * gfortran.dg/graphite/pr38083.f90: Same.
5231         * gfortran.dg/graphite/block-1.f90: Same.
5232         * gfortran.dg/graphite/block-3.f90: Same.
5233         * gfortran.dg/graphite/pr37852.f90: Same.
5234         * gfortran.dg/graphite/block-4.f90: Same.
5235         * gfortran.dg/graphite/pr37980.f90: Same.
5236         * gfortran.dg/graphite/pr38953.f90: Same.
5237         * gfortran.dg/graphite/pr37857.f90: Same.
5238         * opts.c: Remove -floop-block from -O2.
5239         * graphite-poly.c: Fail if -floop-block -floop-interchange or
5240         -floop-strip-mine are used.
5241
5242 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5243             Sebastian Pop  <sebastian.pop@amd.com>
5244
5245         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5246         dimensions.
5247         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5248         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5249         strip_mine_profitable_p, is_interchange_valid,
5250         graphite_trans_bb_block, graphite_trans_loop_block,
5251         graphite_trans_scop_block): Temporary removed.
5252         (extend_scattering, unify_scattering_dimensions): New.
5253         (print_scattering_function, graphite_read_transforms):
5254         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5255         (graphite_generate_scattering_fns): Removed.
5256         (apply_poly_transforms): Cleanup.
5257         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5258         (schedule_to_scattering): Moved.
5259         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5260         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5261         (pbb_nb_scattering): New.
5262         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5263         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5264         Removed.
5265         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5266         shift_poly.
5267         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5268         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
5269         -> PBB_TRANSFORMED_SCATTERING.
5270         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5271         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5272         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5273         (check_poly_representation): Do not return bool.
5274         (graphite_transform_loops): Reformat.
5275         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5276
5277 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
5278
5279         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5280         debug_pbb_domain, debug_pbb, debug_scop): New.
5281         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5282         debug_pbb_domain, debug_pbb, debug_scop): Declared.
5283
5284 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5285
5286         PR middle-end/39335
5287         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5288         when the type precision of the induction variable should be
5289         larger than the type precision of nit.
5290         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5291         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5292         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5293
5294         * gcc.dg/graphite/pr39335_1.c: New.
5295         * gcc.dg/graphite/pr39335.c: New.
5296
5297 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5298
5299         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5300         SSA_NAMES not struct reduction_info.
5301
5302 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5303
5304         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5305
5306 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5307             Tobias Grosser  <grosser@fim.uni-passau.de>
5308
5309         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5310         (free_sese): Free SESE_REDUCTION_LIST.
5311         * sese.h (struct sese): Add field reduction_list.
5312         (SESE_REDUCTION_LIST): New.
5313         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5314         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5315
5316 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5317             Tobias Grosser  <grosser@fim.uni-passau.de>
5318
5319         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5320         of loop_p.
5321
5322 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5323             Tobias Grosser  <grosser@fim.uni-passau.de>
5324
5325         * tree-parloops.c (struct brli, build_reduction_list_info,
5326         analyze_reduction_list, gather_scalar_reductions): New.
5327         (loop_parallel_p): Build a reduction list containing only
5328         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5329         (gen_parallel_loop): Call the analysis analyze_reduction_list.
5330         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5331         * tree-flow.h (gather_scalar_reductions): Declared.
5332
5333 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
5334
5335         PR middle-end/39308
5336         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5337         number_of_iterations_exit from a gcc_assert.
5338
5339 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
5340             Jan Sjodin  <jan.sjodin@amd.com>
5341
5342         * output.h (graphite_out_file, graphite_in_file): Declared.
5343         * toplev.c (graphite_out_file, graphite_in_file): New.
5344         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5345         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5346         Don't call schedule_to_scattering.
5347         * common.opt (fgraphite-write, fgraphite-read): New.
5348         * graphite-poly.c: Include output.h.
5349         (print_scattering_function, print_scattering_functions,
5350         debug_scattering_function, debug_scattering_functions,
5351         graphite_write_transforms, graphite_read_transforms,
5352         graphite_generate_scattering_fns): New.
5353         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5354         Call graphite_generate_scattering_fns, graphite_write_transforms,
5355         graphite_read_transforms.
5356         (new_poly_bb): Initialize PBB_SCATTERING.
5357         (free_poly_bb): Free PBB_SCATTERING.
5358         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5359         * graphite-poly.h (struct poly_bb): Add field scattering.
5360         (PBB_SCATTERING): New.
5361         (print_scattering_function, print_scattering_functions,
5362         debug_scattering_function, debug_scattering_functions): Declared.
5363         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5364         GMP values, not integers!
5365         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5366         ppl_read_polyhedron_matrix): New.
5367         * graphite-ppl.h (ppl_print_polyhedron_matrix,
5368         debug_ppl_polyhedron_matrix,
5369         ppl_read_polyhedron_matrix): Declared.
5370         * Makefile.in (graphite-poly.o): Depends on output.h.
5371
5372 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5373             Tobias Grosser  <grosser@fim.uni-passau.de>
5374
5375         Revert this change:
5376         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5377         scalar evolutions in the scop_entry->loop_father.
5378
5379 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5380             Tobias Grosser  <grosser@fim.uni-passau.de>
5381
5382         * graphite.h (ref_nb_loops): Remove declaration.
5383         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5384         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5385         debug_gbb): Moved to sese.h.
5386         * sese.h: As said.
5387
5388 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5389             Tobias Grosser  <grosser@fim.uni-passau.de>
5390
5391         * graphite-data-ref.[ch]: Disable.
5392
5393 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5394             Tobias Grosser  <grosser@fim.uni-passau.de>
5395
5396         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5397         scalar evolutions in the scop_entry->loop_father.
5398
5399 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5400
5401         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5402         (graphite_cannot_represent_loop_niter): Renamed
5403         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
5404         (limit_scops): build_sese_loop_nests does not return a bool.
5405         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5406         * sese.c (nb_reductions_in_loop): ... from here.
5407         (graphite_loop_normal_form): ... from here.
5408         (sese_record_loop): Does not fail, so does not return a bool.
5409         (build_sese_loop_nests): Same.
5410         * sese.h (build_sese_loop_nests): Update declaration.
5411         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5412         (build_graphite_loop_normal_form): New.
5413         (gloog): Call build_graphite_loop_normal_form.
5414         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5415         build_sese_loop_nests.
5416
5417         * gcc.dg/graphite/id-1.c: New.
5418
5419 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5420             Tobias Grosser  <grosser@fim.uni-passau.de>
5421
5422         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5423         The SCoP detection fix is sufficient.
5424
5425 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5426
5427         PR tree-optimization/39260
5428         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5429         the basic block contains a condition with a real type.
5430         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5431
5432         * gcc.dg/graphite/pr39260.c: New.
5433
5434 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5435
5436         * graphite-poly.c: Inlcude params.h.
5437         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5438         the size of a tile.
5439         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5440         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5441
5442 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5443             Tobias Grosser  <grosser@fim.uni-passau.de>
5444
5445         * graphite-scop-detection.c (dot_all_scops_1,
5446         dot_all_scops): Moved here.
5447         * graphite-scop-detection.h (dot_all_scops): Declared here.
5448         * graphite.c (graphite_initialize, graphite_finalize): New.
5449         (graphite_transform_loops): Cleaned up.
5450         * sese.c (debug_oldivs): Moved here.
5451         * graphite-poly.c (graphite_apply_transformations): Renamed
5452         apply_poly_transforms.
5453         (debug_loop_vec): Moved here.
5454         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5455         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5456         find_scop_parameters, build_scop_iteration_domain,
5457         add_conditions_to_constraints, build_scop_canonical_schedules,
5458         build_scop_data_accesses): Now static.
5459         (build_poly_scop, check_poly_representation): New.
5460
5461 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5462
5463         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5464         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5465         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5466         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5467         scan_tree_for_params_right_scev, scan_tree_for_params_int,
5468         scan_tree_for_params, struct irp_data, dx_record_params,
5469         find_params_in_bb, find_scop_parameters, gbb_from_bb,
5470         build_loop_iteration_domains, add_conditions_to_domain,
5471         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5472         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5473         build_sese_conditions, add_conditions_to_constraints,
5474         build_scop_iteration_domain, build_access_matrix_with_af,
5475         build_access_matrix,
5476         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5477
5478         * graphite-sese-to-poly.c: New.
5479         * graphite-sese-to-poly.h: New.
5480
5481         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5482
5483 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5484
5485         * graphite.c: Split graphite code generation to a new file.
5486         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5487         max_precision_type, clast_to_gcc_expression_red,
5488         clast_to_gcc_expression, gcc_type_for_clast_expr,
5489         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5490         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5491         graphite_create_new_guard, clast_get_body_of_loop,
5492         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5493         graphite_create_new_loop, build_iv_mapping, copy_renames,
5494         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5495         compute_cloog_iv_types, free_scattering, save_var_name,
5496         initialize_cloog_names, build_scop_context, build_cloog_prog,
5497         set_cloog_options, debug_clast_stmt, scop_to_clast,
5498         print_generated_program, debug_generated_program,
5499         gloog): Moved to graphite-clast-to-gimple.c.
5500
5501         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5502
5503         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5504         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5505         loop_iv_stack_pop, loop_iv_stack_get_iv,
5506         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5507         free_loop_iv_stack, loop_iv_stack_remove_constants,
5508         debug_rename_elt, debug_rename_map_1, debug_rename_map,
5509         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5510         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5511         eq_ivtype_map_elts, sese_add_exit_phis_edge,
5512         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5513         get_vdef_before_sese, sese_adjust_vphi,
5514         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5515         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5516         is_iv, expand_scalar_variables_ssa_name,
5517         expand_scalar_variables_expr, expand_scalar_variables_stmt,
5518         expand_scalar_variables, rename_variables, remove_condition,
5519         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5520         add_loop_exit_phis, insert_loop_close_phis, struct igp,
5521         default_liveout_before_guard, add_guard_exit_phis,
5522         insert_guard_phis, register_old_and_new_names,
5523         graphite_copy_stmts_from_block, register_sese_liveout_renames,
5524         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5525         if_region_set_false_region, create_if_region_on_edge,
5526         move_sese_in_condition): Moved to sese.c.
5527
5528         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5529         if_region_exit, if_region_get_condition_block,
5530         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5531         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5532         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5533         ivtype_map_elt, new_ivtype_map_elt,
5534         recompute_all_dominators): Moved to sese.h.
5535
5536         * graphite-clast-to-gimple.c: New.
5537         * graphite-clast-to-gimple.h: New.
5538         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5539         * sese.c: Modified as said above.
5540         * sese.h: Same.
5541
5542 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5543
5544         * graphite.c: Split scop detection to a new file.
5545         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5546         move_sd_regions, loop_affine_expr, exclude_component_ref,
5547         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5548         graphite_cannot_represent_loop_niter, struct scopdet_info,
5549         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5550         find_single_entry_edge, find_single_exit_edge,
5551         create_single_entry_edge, sd_region_without_exit,
5552         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5553         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5554         Moved to graphite-scop-detection.c.
5555
5556         * graphite-scop-detection.c: New.
5557         * graphite-scop-detection.h: New.
5558         * Makefile.in: Add new rule for graphite-scop-detection.o.
5559
5560         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5561         tree-scalar-evolution.h.
5562         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5563         build_sese_loop_nests): Moved here from graphite.c.
5564         (param_index): Renamed parameter_index_in_region.
5565
5566 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
5567             Sebastian Pop  <sebastian.pop@amd.com>
5568
5569         * gcc.dg/graphite/block-0.c: Expected to fail now.
5570         * gcc.dg/graphite/block-1.c: Same.
5571         * gcc.dg/graphite/block-5.c: Same.
5572         * gcc.dg/graphite/block-6.c: Same.
5573
5574 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
5575             Sebastian Pop  <sebastian.pop@amd.com>
5576
5577         * graphite.h: Separate from graphite_bb_p the polyhedral
5578         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5579         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5580         graphite-data-ref.h.
5581         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5582         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5583         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5584         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5585         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5586         scop_nb_params): Moved to graphite-poly.h.
5587         * graphite-data-ref.c: Same.
5588         * graphite-data-ref.h: New.
5589         * graphite.c: Same.
5590         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5591         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5592         is_interchange_valid, graphite_trans_bb_block,
5593         graphite_trans_loop_block, scop_max_loop_depth,
5594         graphite_trans_scop_block, graphite_apply_transformations,
5595         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5596         graphite-poly.c.
5597         * graphite-poly.h: New.
5598         * graphite-poly.c: New.
5599         * Makefile.in (OBJS-common): Add graphite-poly.o.
5600         (graphite-poly.o): New rule.
5601         * tree-data-ref.h (struct data_reference): Remove unused scop field.
5602         (DR_SCOP): Removed.
5603
5604 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
5605             Tobias Grosser  <grosser@fim.uni-passau.de>
5606
5607         * graphite.c: Replace gb -> gbb.
5608         * graphite.h: Same.
5609         * graphite-data-ref.c: Same.
5610
5611 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
5612             Tobias Grosser  <grosser@fim.uni-passau.de>
5613
5614         * Makefile.in (OBJS-commmon): Add sese.o.
5615         (sese.o): New.
5616         (graphite.o): Add sese.h.
5617         * graphite.c (bb_in_ss_p, loop_in_sese_p,
5618         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5619         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5620         Move to sese.
5621         (block_before_scop): Add missing return.
5622         (new_scop, free_scop): Remove SESE data structures.
5623         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5624         find_scop_parameters, build_loop_iteration_domains,
5625         add_conditions_to_domain, register_scop_liveout_renames,
5626         copy_bb_and_scalar_dependences): Scop -> SESE.
5627
5628         (add_conditions_to_domain): SCoP -> SESE and remove check
5629         (scop_contains_non_iv_scalar_phi_nodes): New.
5630         (build_scop_conditions_1, build_scop_conditions): Remove check for
5631         non iv scalar phi nodes.
5632         (print_scop_statistics): New.
5633         (graphite_transform_loops): Cleanup.
5634
5635         * graphite.h: Move to sese & cleanup.
5636         * sese.c: New.
5637         * sese.h: New.
5638
5639 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5640             Tobias Grosser  <grosser@fim.uni-passau.de>
5641
5642         * graphite.c (build_scop_conditions_1): Conditions are only
5643         at the end of a basic block.
5644
5645 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5646             Tobias Grosser  <grosser@fim.uni-passau>
5647
5648         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5649         field.
5650         (GBB_ALPHA): Removed.
5651
5652 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5653             Tobias Grosser  <grosser@fim.uni-passau.de>
5654
5655         * graphite-data-ref.c (graphite_test_dependence): Don't use
5656         GBB_DYNAMIC_SCHEDULE.
5657         * graphite.c (new_graphite_bb): Same.
5658         (free_graphite_bb): Same.
5659         (build_scop_dynamic_schedules): Removed.
5660         (graphite_transform_loops): Don't call it.
5661         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5662         (GBB_DYNAMIC_SCHEDULE): Removed.
5663
5664 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5665             Tobias Grosser  <grosser@fim.uni-passau.de>
5666
5667         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5668         (print_graphite_bb): Same.
5669         (build_cloog_prog): Same.
5670
5671 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5672             Tobias Grosser  <grosser@fim.uni-passau.de>
5673
5674         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5675
5676 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5677             Tobias Grosser  <grosser@fim.uni-passau.de>
5678
5679         * graphite.c (build_scop_context): Don't use CloogMatrix.
5680         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5681         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5682
5683 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5684             Tobias Grosser  <grosser@fim.uni-passau.de>
5685
5686         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5687         liveout_renames, add_params fields...
5688         (struct sese): ... here.
5689         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5690         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5691
5692 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5693             Tobias Grosser  <grosser@fim.uni-passau.de>
5694
5695         * graphite.c (print_scop): Do not print the CLooG program.
5696         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5697         build_cloog_prog, gloog): Don't use SCOP_PROG.
5698         (find_transform): Renamed scop_to_clast.
5699         (print_generated_program, debug_generated_program): New.
5700         (graphite_transform_loops): Adapt to new interface.
5701         * graphite.h (struct scop): Remove program field.
5702         (SCOP_PROG): Removed.
5703         (print_generated_program, debug_generated_program): Declared.
5704
5705 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5706
5707         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5708         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5709         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5710         free_graphite_bb, build_scop_canonical_schedules,
5711         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5712         schedules are now represented using a ppl_Linear_Expression_t.
5713         * graphite.h (struct graphite_bb): Same.
5714         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5715         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5716
5717 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
5718
5719         * graphite.c: Free local memory.
5720         * graphite-ppl.c: Same.
5721
5722 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
5723
5724         * graphite.c (const_column_index, get_first_matching_sign_row_index,
5725         get_lower_bound_row, get_upper_bound_row, copy_constraint,
5726         swap_constraint_variables, scale_constraint_variable): Removed.
5727         (graphite_trans_bb_strip_mine): Remove pong.
5728         * graphite-ppl.c: Include missing header files.
5729         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5730         * graphite-ppl.h (ppl_strip_loop): Declared.
5731         * Makefile.in (graphite-ppl.o): Adjust dependences.
5732
5733 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
5734
5735         * graphite.c (build_loop_iteration_domains): Remove ping pong.
5736         (build_scop_iteration_domain): Same.
5737
5738 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
5739
5740         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5741         ping pong.
5742         (add_value_to_dim, scan_tree_for_params_right_scev,
5743         scan_tree_for_params_int): New.
5744         * graphite-ppl.c (oppose_constraint): New.
5745         (insert_constraint_into_matrix): Implement missing cases.
5746         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5747
5748 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
5749
5750         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5751         use ppl_move_dimension.
5752
5753 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
5754
5755         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5756         * graphite.c: Same.
5757         * graphite.h: Same.
5758         * graphite-ppl.c: Same.
5759         * graphite-ppl.h: Same.
5760
5761 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
5762
5763         Revert last 3 commits.
5764
5765 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5766
5767         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5768         ping pong.
5769         (add_value_to_dim, scan_tree_for_params_right_scev,
5770         scan_tree_for_params_int): New.
5771         * graphite-ppl.c (oppose_constraint): New.
5772         (insert_constraint_into_matrix): Implement missing cases.
5773         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5774
5775 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5776
5777         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5778
5779 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5780             Tobias Grosser  <grosser@fim.uni-passau.de>
5781
5782         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5783         use ppl_move_dimension.
5784         * graphite-ppl.c (ppl_move_dimension): New.
5785         * graphite-ppl.h (ppl_move_dimension): Declared.
5786
5787 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5788
5789         * graphite.c: Do not include cloog/cloog.h.
5790         (print_graphite_bb): Remove ping pong, call PPL print function.
5791
5792 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5793
5794         * Makefile.in (OBJS-common): Add graphite-ppl.o.
5795         (graphite.o): Add dependence on graphite-ppl.h.
5796         (graphite-ppl.o): New.
5797         (graphite-data-ref.c): Ping pong between PPL data structures
5798         and matrices.
5799         * graphite-ppl.c: New.
5800         * graphite-ppl.h: New.
5801         * graphite.c: Include graphite-ppl.h.
5802         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5803         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5804         Ping pong between PPL data structures and matrices.
5805         (new_graphite_bb): Create a PPL constraint system.
5806         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5807         (build_loop_iteration_domains): Use PPL functions.
5808         * graphite.h: Include graphite-ppl.h.  Fix comments.
5809         (graphite_bb): Use a ppl_Constraint_System_t instead of
5810         CloogMatrix for representing the domain.
5811         (scop): Remove static_schedule.
5812         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5813
5814 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
5815
5816         * graphite.c: Fix some comments.
5817
5818 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
5819
5820         PR middle-end/38953
5821         * graphite.c (if_region_set_false_region): After moving a region
5822         in the false branch of a condition, remove the empty dummy
5823         basic block.
5824         (gloog): Remove wrong fix for PR38953.
5825
5826 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5827
5828         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5829         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5830         register_bb_in_sese, new_sese, free_sese): Moved.
5831         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5832         outermost_loop_in_scop, build_scop_iteration_domain,
5833         expand_scalar_variables_ssa_name, get_vdef_before_scop,
5834         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5835         Use loop_in_sese_p instead of loop_in_scop_p.
5836         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5837         (free_scop): Do not free SCOP_BBS_B.
5838         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5839         ref_nb_loops): Moved here...
5840         * graphite.h (ref_nb_loops): ... from here.
5841         (struct scop): Remove bbs_b bitmap.
5842         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5843         * gcc.dg/graphite/scop-19.c: New
5844
5845 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5846
5847         * graphite.c (scopdet_basic_block_info): Fix bug in scop
5848         detection.
5849
5850 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5851
5852         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5853         eq_loop_to_cloog_loop): Remove.
5854         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5855         * graphite.h (struct scop): Remove loop2cloog_loop.
5856         (loop_domain_dim, loop_iteration_vector_dim): Remove.
5857
5858 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5859
5860         * opts.c (decode_options): Only add graphite options to O2
5861         if we compile with graphite enabled.
5862
5863 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
5864
5865         * Merge from mainline (r143163:143684).
5866
5867 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
5868
5869         * graphite.c (debug_value): Removed.
5870         * graphite.h (debug_value): Removed.
5871
5872 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5873
5874         * passes.c (init_optimization_passes): Do not call pass_copy_prop
5875         after graphite: pass_copy_prop does not maintain a proper loop closed
5876         SSA form.  pass_copy_prop should be fixed.
5877
5878 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5879
5880         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5881
5882 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5883
5884         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5885         (gloog): Split the exit of the scop when the scop exit is a loop exit.
5886         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5887         changed the CFG.
5888
5889 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
5890
5891         * graphite.c (gloog): Return true when code gen succeeded.
5892         (graphite_transform_loops): Do not call cleanup_tree_cfg if
5893         the code of the function did not changed.  After cleanup_tree_cfg
5894         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5895         form.
5896
5897 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
5898
5899         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5900         gimple_call_lhs is NULL.
5901
5902 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
5903             Tobias Grosser  <tobi.grosser@amd.com>
5904
5905         * graphite.c (graphite_trans_scop_block): Do not block single
5906         nested loops.
5907
5908 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
5909             Tobias Grosser  <tobi.grosser@amd.com>
5910
5911         * graphite.c (build_scop_canonical_schedules): Start schedules at
5912         zero.
5913
5914 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
5915             Tobias Grosser  <tobi.grosser@amd.com>
5916
5917         * graphite.c (compare_prefix_loops): New.
5918         (build_scop_canonical_schedules): Rewritten.
5919         (graphite_transform_loops): Move build_scop_canonical_schedules
5920         after build_scop_iteration_domain.
5921
5922 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5923             Tobias Grosser  <tobi.grosser@amd.com>
5924
5925         * graphite.c (add_conditions_to_domain): Add the loops to
5926         the dimension of the iteration domain.  Do copy the domain
5927         only when it exists.
5928         (build_scop_conditions_1): Do not call add_conditions_to_domain.
5929         (add_conditions_to_constraints): New.
5930         (can_generate_code_stmt, can_generate_code): Removed.
5931         (gloog): Do not call can_generate_code.
5932         (graphite_transform_loops): Call add_conditions_to_constraints
5933         after building the iteration domain.
5934
5935 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5936             Tobias Grosser  <tobi.grosser@amd.com>
5937             Jan Sjodin  <jan.sjodin@amd.com>
5938
5939         * graphite.c (scan_tree_for_params): On substractions negate
5940         all the coefficients of the term.
5941         (clast_to_gcc_expression_red): New.  Handle reduction expressions
5942         of more than two operands.
5943         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5944         (get_vdef_before_scop): Handle also the case of default definitions.
5945
5946 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5947
5948         PR middle-end/38431
5949         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5950         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5951         (gloog): Do not call cleanup_tree_cfg.
5952         (graphite_transform_loops): Call cleanup_tree_cfg after all
5953         scops have been code generated.
5954
5955 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
5956
5957         * passes.c (init_optimization_passes): Schedule after
5958         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5959
5960 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
5961
5962         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5963         Fix comment.
5964         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
5965         Set the type of an expression to the type of its assign statement.
5966         (expand_scalar_variables_expr):  Do not pass loop_p.
5967         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
5968         (copy_bb_and_scalar_dependences): Do not pass loop_p.
5969         (translate_clast): Update call to copy_bb_and_scalar_dependences.
5970
5971 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
5972
5973         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5974         an expression to the gimple_expr_type of its assign statement.
5975         (expand_scalar_variables_expr): Stop recursion on tcc_constant
5976         or tcc_declaration.
5977
5978 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
5979
5980         PR tree-optimization/38786
5981         * gcc.dg/graphite/pr38786.c: New.
5982         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5983         the SSA_NAME case of expand_scalar_variables_expr.
5984         (expand_scalar_variables_expr): Also gather the scalar computation
5985         used to index the memory access.
5986         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5987         the gimple_stmt_iterator where it inserts new code.
5988
5989 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
5990
5991         * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5992
5993 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
5994
5995         * opts.c (decode_options): Enable flag_graphite_identity and
5996         flag_loop_block in -O2 and above.
5997
5998 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
5999
6000         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
6001         Fix merge problem: replace with the file from trunk.
6002
6003 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
6004
6005         * Merge from mainline (r141727:143163).
6006
6007 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
6008             Jan Sjodin  <jan.sjodin@amd.com>
6009
6010         PR tree-optimization/38559
6011         * gcc.dg/graphite/pr38559.c: New.
6012
6013         * graphite.c (debug_value, copy_constraint,
6014         swap_constraint_variables, scale_constraint_variable, ): New.
6015         (get_lower_bound, get_upper_bound): Removed.
6016         (graphite_trans_bb_strip_mine): Clean up this code that works
6017         only for constant number of iterations.  Fully copy upper and
6018         lower bound constraints, not only the constant part of them.
6019         * graphite.h (debug_value): Declared.
6020
6021 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
6022
6023         PR tree-optimization/38492
6024         PR tree-optimization/38498
6025         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
6026         * tree-chrec.h (scev_is_linear_expression): Declared.
6027         * graphite.c (graphite_cannot_represent_loop_niter): New.
6028         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
6029         (graphite_loop_normal_form): Use gcc_assert.
6030         (scan_tree_for_params): Use CASE_CONVERT.
6031         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
6032         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
6033         Use gcc_assert.  Discard scops that contain unhandled cases.
6034         (build_scop_conditions): Return a boolean status for unhandled cases.
6035         (strip_mine_profitable_p): Print the loop number, not its depth.
6036         (is_interchange_valid): Pass the depth of the loop nest, don't
6037         recompute it wrongly.
6038         (graphite_trans_bb_block): Same.
6039         (graphite_trans_bb_block): Print tentative of loop blocking.
6040         (graphite_trans_scop_block): Do not print that the loop has been
6041         blocked.
6042         (graphite_transform_loops): Do not handle scops that contain condition
6043         scalar phi nodes.
6044
6045         * gcc.dg/graphite/pr38500.c: Fixed warning as committed
6046         in trunk.
6047         * gcc.dg/graphite/block-0.c: Update test.
6048         * gcc.dg/graphite/block-1.c: Same.
6049         * gcc.dg/graphite/block-2.c: Remove xfail and test for
6050         blocking.
6051         * gcc.dg/graphite/block-4.c: Remove test for strip mine.
6052         * gcc.dg/graphite/block-3.c: New.
6053         * gcc.dg/graphite/pr38498.c: New.
6054
6055 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
6056
6057         PR tree-optimization/38510
6058         * gcc.dg/graphite/pr38510.c: New.
6059         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
6060           (translate_clast): Call recompute_all_dominators before
6061           graphite_verify.
6062           (gloog): Call recompute_all_dominators before graphite_verify.
6063
6064 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
6065
6066         PR tree-optimization/38492
6067         * graphite.c (rename_map_elt, debug_rename_elt,
6068         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
6069         rename_map_elt_info, eq_rename_map_elts,
6070         get_new_name_from_old_name, bb_in_sese_p): Moved around.
6071         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
6072         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
6073         (sese_build_livein_liveouts): New.
6074         (new_sese, free_sese): New.
6075         (new_scop): Call new_sese.
6076         (free_scop): Call free_sese.
6077         (rename_variables_from_edge, rename_phis_end_scop): Removed.
6078         (register_old_new_names): Renamed register_old_and_new_names.
6079         (register_scop_liveout_renames, add_loop_exit_phis,
6080         insert_loop_close_phis, struct igp,
6081         default_liveout_before_guard, add_guard_exit_phis,
6082         insert_guard_phis, copy_renames): New.
6083         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
6084         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
6085         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
6086         (scop_adjust_phis_for_liveouts): New.
6087         (gloog): Call scop_adjust_phis_for_liveouts.
6088
6089         * graphite.h (struct sese): Documented.  Added fields liveout,
6090         num_ver and livein.
6091         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
6092         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
6093         (struct scop): Added field liveout_renames.
6094         (SCOP_LIVEOUT_RENAMES): New.
6095
6096 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6097
6098         PR tree-optimization/38409
6099         * gcc.dg/graphite/pr38409.c: New.
6100         * graphite.c (nb_reductions_in_loop): Use simple_iv.
6101
6102 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6103
6104         * graphite.c (gcc_type_for_cloog_iv): By default return
6105         integer_type_node.
6106         (graphite_create_new_loop): Don't fold_convert the already
6107         fold_convert-ed expression.
6108
6109 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
6110
6111         PR tree-optimization/38446
6112         * gcc.dg/graphite/pr38446.c: New.
6113         * graphite.c (register_bb_in_sese): New.
6114         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6115         looking at the bbs in the region.
6116         * graphite.h (sese): Add region_basic_blocks pointer set to
6117         structure and initialize at the time of defining new scop.
6118
6119 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6120
6121         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6122         (find_params_in_bb): Do not free data refs.
6123         (free_graphite_bb): Add FIXME on disabled free_data_refs.
6124
6125 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6126
6127         * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6128         * gcc.dg/graphite/scop-17.c: Same.
6129         * gcc.dg/graphite/block-5.c: New.
6130         * gcc.dg/graphite/block-6.c: New.
6131         * gcc.dg/graphite/pr37485.c: Clean dump file after.
6132         * gcc.dg/graphite/pr37684.c: Same.
6133         * gcc.dg/graphite/block-2.c: Same.
6134
6135         * graphite.c (struct ivtype_map_elt): New.
6136         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6137         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6138         gcc_type_for_cloog_iv): New.
6139         (loop_iv_stack_patch_for_consts): Use the type of the induction
6140         variable from the original loop, except for the automatically
6141         generated loops, i.e., in the case of a strip-mined loop, in
6142         which case there is no original loop: in that case just use
6143         integer_type_node.
6144         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6145         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6146         (clast_name_to_gcc): Accept params to be NULL.
6147         (clast_to_gcc_expression): Take an extra parameter for the type.
6148         Convert to that type all the expressions built by this function.
6149         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6150         (graphite_translate_clast_equation): Compute the type of the
6151         clast_equation before translating its LHS and RHS.
6152         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6153         (graphite_create_new_loop): Compute the type of the induction
6154         variable before translating the lower and upper bounds and before
6155         creating the induction variable.
6156         (rename_variables_from_edge, rename_phis_end_scop): New.
6157         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6158         (sese_add_exit_phis_edge): Do not use integer_zero_node.
6159         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6160         compute_cloog_iv_types): New.
6161         (gloog): Call compute_cloog_iv_types before starting the
6162         translation of the clast.
6163
6164         * graphite.h (struct graphite_bb): New field cloog_iv_types.
6165         (GBB_CLOOG_IV_TYPES): New.
6166         (debug_ivtype_map): Declared.
6167         (oldiv_for_loop): New.
6168
6169 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
6170
6171         PR middle-end/38459
6172         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6173         (param_index): Assert if parameter is not know after parameter
6174         detection.
6175         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6176         (find_scop_parameters): Mark, that we have finished parameter
6177         detection.
6178         (graphite_transform_loops): Move condition detection before parameter
6179         detection.
6180         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6181         * gfortran.dg/graphite/pr38459.f90: New.
6182
6183 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6184
6185         * graphite.c (graphite_transform_loops): Always call find_transform ()
6186         in ENABLE_CHECKING.  So we test these code paths, even if we do not
6187         generate code.
6188
6189 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6190
6191         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6192         (print_scop): Ditto.
6193
6194 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6195
6196         PR middle-end/38084
6197         Fix gfortran.dg/graphite/id-3.f90.
6198         * graphite.c (scopdet_basic_block_info): Fix bug that found some
6199         regions more than once.
6200
6201 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6202
6203         Fix gfortran.dg/graphite/id-4.f90.
6204         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6205         when not needed.
6206
6207 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6208
6209         Fix gfortran.dg/graphite/id-1.f90.
6210         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6211         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6212         (max_precision_type): New.
6213         (value_clast): Removed.
6214         (clast_to_gcc_expression): Be more careful to types of expressions.
6215         Use max_precision_type and update use of gmp_cst_to_tree.
6216         (graphite_translate_clast_equation): Use max_precision_type.
6217         (graphite_create_guard_cond_expr): Do not use integer_type_node,
6218         use the type of the condition.
6219         (graphite_create_new_loop): Do not use integer_type_node, use the
6220         max_precision_type of lb and ub.
6221
6222 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6223
6224         * graphite.c (build_scops_1): Initialize open_scop.exit
6225         and sinfo.last.
6226
6227 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6228
6229         * gcc.dg/graphite/pr38084.c: New.
6230         * gfortran.dg/graphite/id-1.f90: New.
6231         * gfortran.dg/graphite/id-2.f90: New.
6232         * gfortran.dg/graphite/id-3.f90: New.
6233         * gfortran.dg/graphite/id-4.f90: New.
6234         * gfortran.dg/graphite/pr37857.f90: New.
6235
6236 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6237             Jan Sjodin  <jan.sjodin@amd.com>
6238             Harsha Jagasia  <harsha.jagasia@amd.com>
6239
6240         PR middle-end/37852
6241         PR middle-end/37883
6242         PR middle-end/37928
6243         PR middle-end/37980
6244         PR middle-end/38038
6245         PR middle-end/38039
6246         PR middle-end/38073
6247         PR middle-end/38083
6248         PR middle-end/38125
6249
6250         * gcc.dg/graphite/pr38073.c: New.
6251         * gcc.dg/graphite/pr37928.c: New.
6252         * gcc.dg/graphite/pr37883.c: New.
6253         * gcc.dg/graphite/pr38125.c: New.
6254         * gfortran.dg/graphite/pr38083.f90: New.
6255         * gfortran.dg/graphite/pr37852.f90: New.
6256         * gfortran.dg/graphite/pr37980.f90: New.
6257
6258         * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6259         the number of detected scops.  Copy exact same test for loop
6260         blocking...
6261         * gcc.dg/graphite/block-1.c: Fix the number of expected
6262         loops to be blocked as reductions are not handled.
6263         * gcc.dg/graphite/block-4.c: ...here.  New.
6264
6265         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6266         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6267         ...here.
6268         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6269         * Makefile.in (graphite.o): Depend on value-prof.h.
6270         (graphite.o-warn): Removed -Wno-error.
6271         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6272         to be a NULL pointer.  Call update_stmt.  Return the newly created
6273         cannonical induction variable.
6274
6275         * graphite.h (debug_rename_map): Declared.  Fix some comments.
6276
6277         * graphite.c: Reimplement the code generation from graphite to gimple.
6278         Include value-prof.h.
6279         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6280         (get_old_iv_from_ssa_name): Removed.
6281         (graphite_stmt_p): New.
6282         (new_graphite_bb): Test for useful statements before building a
6283         graphite statement for the basic block.
6284         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6285         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6286         reason.
6287         (recompute_all_dominators, graphite_verify,
6288         nb_reductions_in_loop, graphite_loop_normal_form): New.
6289         (scop_record_loop): Call graphite_loop_normal_form.
6290         (build_scop_loop_nests): Iterate over all the blocks of the
6291         function instead of relying on the incomplete information from
6292         SCOP_BBS.  Return the success of the operation.
6293         (find_params_in_bb): Use the data from GBB_DATA_REFS.
6294         (add_bb_domains): Removed.
6295         (build_loop_iteration_domains): Don't call add_bb_domains.
6296         Add the iteration domain only to the basic blocks that have been
6297         translated to graphite.
6298         (build_scop_conditions_1): Add constraints only if the basic
6299         block have been translated to graphite.
6300         (build_scop_data_accesses): Completely disabled until data
6301         dependence is correctly implemented.
6302         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6303         (remove_all_edges_1, remove_all_edges): Removed.
6304         (get_new_name_from_old_name): New.
6305         (graphite_rename_variables_in_stmt): Renamed
6306         rename_variables_in_stmt.  Call get_new_name_from_old_name.
6307         Use replace_exp and update_stmt.
6308         (is_old_iv): Renamed is_iv.
6309         (expand_scalar_variables_stmt): Extra parameter for renaming map.
6310         Use replace_exp and update_stmt.
6311         (expand_scalar_variables_expr): Same.  Use the map to get the
6312         new names for the renaming of induction variables and for the
6313         renaming of variables after a basic block has been copied.
6314         (expand_scalar_variables): Same.
6315         (graphite_rename_variables): Renamed rename_variables.
6316         (move_phi_nodes): Removed.
6317         (get_false_edge_from_guard_bb): New.
6318         (build_iv_mapping): Do not insert the induction variable of a
6319         loop in the renaming iv map if the basic block does not belong
6320         to that loop.
6321         (register_old_new_names, graphite_copy_stmts_from_block,
6322         copy_bb_and_scalar_dependences): New.
6323         (translate_clast): Heavily reimplemented: copy basic blocks,
6324         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
6325         At each translation step call graphite_verify ensuring the
6326         consistency of the SSA, loops and dominators information.
6327         (collect_virtual_phis, find_vdef_for_var_in_bb,
6328         find_vdef_for_var_1, find_vdef_for_var,
6329         patch_phis_for_virtual_defs): Removed huge hack.
6330         (mark_old_loops, remove_dead_loops, skip_phi_defs,
6331         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6332         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6333         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6334         if_region_get_condition_block, if_region_set_false_region,
6335         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6336         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6337         sese_add_exit_phis_edge, sese_add_exit_phis_var,
6338         rewrite_into_sese_closed_ssa): New.
6339         (gloog): Remove dead code.  Early return if code cannot be
6340         generated.  Call cleanup_tree_cfg once the scop has been code
6341         generated.
6342         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6343         block loops with less than two loops.
6344         (graphite_apply_transformations): Remove the call to
6345         scop_remove_ignoreable_gbbs.
6346         (limit_scops): When build_scop_loop_nests fails, continue on
6347         the next scop.  Fix open_scop.entry.
6348         (graphite_transform_loops): Call recompute_all_dominators: force the
6349         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6350         Call initialize_original_copy_tables and free_original_copy_tables
6351         to be able to copy basic blocks during code generation.
6352         When build_scop_loop_nests fails, continue on next scop.
6353         (value_clast): New union.
6354         (clast_to_gcc_expression): Fix type cast warning.
6355
6356 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
6357
6358         * Merge from mainline (r140838:141727).
6359
6360 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6361
6362         PR middle-end/37833
6363
6364         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6365
6366 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6367
6368         PR middle-end/37943
6369
6370         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6371         exits and conditions.
6372         * gcc.dg/graphite/pr37943.c: New.
6373
6374 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6375
6376         PR middle-end/37886
6377         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6378
6379 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6380
6381         * doc/invoke.texi: Fix spaces.
6382
6383 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
6384
6385         PR tree-optimization/37891
6386         Reverted last commit.
6387         * graphite.c (create_single_entry_edge): Set
6388         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6389
6390 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
6391             Mitul Thakkar  <mitul.thakkar@amd.com>
6392
6393         * graphite.c (create_single_entry_edge): Set
6394         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6395
6396 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
6397
6398         * doc/invoke.texi: Add -fgraphite-identity.
6399         * graphite.c (graphite_apply_transformations): Check for
6400         -fgraphite-identity.
6401         * toplev.c (process_options): Add flag_graphite_identity.
6402         * tree-ssa-loop.c: Add flag_graphite_identity.
6403
6404 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6405
6406         Undo changes from 2008-10-02:
6407         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6408         operand type when copying the operand to a variable of different type.
6409         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6410         with the IV name after increment.
6411
6412 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6413             Harsha Jagasia  <harsha.jagasia@amd.com>
6414
6415         PR tree-optimization/37828
6416         * gcc.dg/graphite/pr37828.c: New.
6417         * graphite.c (graphite_trans_loop_block): Do not loop block
6418         single nested loops.
6419
6420 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
6421             Sebastian Pop  <sebastian.pop@amd.com>
6422
6423         * graphite.c (struct rename_map_elt, new_rename_map_elt,
6424         rename_map_elt_info, eq_rename_map_elts): New.
6425         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6426         (expand_scalar_variables_expr): Change parameters.
6427         (expand_scalar_variables_stmt): Same.
6428         (expand_scalar_variables): Same.
6429         (graphite_rename_ivs): Rename graphite_rename_variables.
6430         (build_iv_mapping): New.
6431         (translate_clast): Call build_iv_mapping.
6432         * graphite.h (gbb_p): New name.
6433
6434 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
6435
6436         PR tree-optimization/37684
6437         * gcc.dg/graphite/pr37684.c: New.
6438         * graphite.c (exclude_component_ref): New.
6439         (is_simple_operand): Call exclude_component_ref.
6440
6441 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
6442             Harsha Jagasia  <harsha.jagasia@amd.com>
6443
6444         PR tree-optimization/37485
6445         * gcc.dg/graphite/block-2.c: New
6446         * graphite.c (gmp_cst_to_tree): Moved.
6447         (iv_stack_entry_is_constant): New.
6448         (iv_stack_entry_is_iv): New.
6449         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6450         (loop_iv_stack_insert_constant): New.
6451         (loop_iv_stack_pop): Use new datatpype.
6452         (loop_iv_stack_get_iv): Same.
6453         (loop_iv_stack_get_iv_from_name): Same.
6454         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6455         (loop_iv_stack_patch_for_consts): New.
6456         (loop_iv_stack_remove_constants): New.
6457         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6458         (translate_clast): Call loop_iv_stack_patch_for_consts and
6459         loop_iv_stack_remove_constants.
6460         (gloog): Use new datatype.  Redirect construction edge to end
6461         block to avoid accidental deletion.
6462         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
6463         iv stack entry.
6464         (union iv_stack_entry_data): New.  Data in iv stack entry.
6465         (struct iv_stack_entry): New.  Datatype for iv stack entries.
6466
6467 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6468
6469         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6470         operand type when copying the operand to a variable of different type.
6471
6472 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6473
6474         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6475         with the IV name after increment.
6476
6477 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6478
6479         * Merge from mainline (r140164:140838).
6480
6481 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6482
6483         * graphite-data-ref.c: New.
6484         * graphite.c (print_scop): Also dump the dependence graph.
6485         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6486         (new_scop): Initialize SCOP_DEP_GRAPH.
6487         (build_scop_dynamic_schedules): New.
6488         (build_access_matrix_with_af): Fixed column numbering.
6489         (graphite_transform_loops): Call build_scop_dynamic_schedules.
6490         * graphite.h: Add ifndef/define guards against multiple inclusion.
6491         (struct scop): Add dep_graph field.
6492         (SCOP_DEP_GRAPH): Defined.
6493         (ref_nb_loops): Fixed and moved to other position.
6494         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6495         (nb_loops_around_loop_in_scop): New.
6496         (graphite_dump_dependence_graph): Declared.
6497         (graphite_build_rdg_all_levels): Declared.
6498         (graphite_test_dependence): Declared.
6499         * Makefile.in (graphite-data-ref.o): New target.
6500
6501 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
6502
6503         * Merge from mainline (139870:140164).
6504
6505 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6506
6507         * Merge from mainline (138275:139870).
6508         * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6509         the commits from trunk broke the niter detection.
6510
6511 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6512
6513         * graphite.c: Add more documentation.  Fix formatting.
6514         (debug_loop_vec, debug_oldivs, loop_iv_stack,
6515         loop_iv_stack_debug): Moved...
6516         (schedule_to_scattering): Move before use.
6517         (dot_all_scops): Include in "#if 0" the code for system
6518         call dotty.
6519
6520         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6521         loop_iv_stack_debug): ...here.
6522
6523 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
6524
6525         * tree-phinodes.c (make_phi_node): Extern.
6526         (add_phi_node_to_bb): New.
6527         (create_phi_node): Call add_phi_node_to_bb.
6528         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6529         (remove_statement): Handle case where stored phi was updated
6530         and is no longer the same.
6531         * graphite.c (is_parameter): New.
6532         (is_old_iv): New.
6533         (expand_scalar_variables_expr): New.
6534         (expand_scalar_variables_stmt): New.
6535         (expand_scalar_variables): New.
6536         (move_phi_nodes): Create new phi instead of moving old one.
6537         (translate_clast): Call expand_scalar_variables.
6538         (find_vdef_for_var_in_bb): Also scan regular definitions.
6539         (skip_phi_defs): New.
6540         (collect_scop_exit_phi_args): New.
6541         (patch_scop_exit_phi_args): New.
6542         (gloog): Patch phis after scop.
6543         * tree-flow.h: (add_phi_node_to_bb): Declared.
6544         (make_phi_node): Declared.
6545
6546 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6547
6548         * graphite.c (end_scop): Split the entry of the scop when it
6549         is the header of the loop in which the scop is ending.
6550         (build_scops_1, limit_scops): Update uses of end_scop.
6551
6552 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6553
6554         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6555         SCOP_ENTRY or SCOP_EXIT.
6556
6557 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6558
6559         * graphite.c (get_construction_edge): Removed.
6560         (gloog): Construction edge is the scop entry edge.
6561
6562 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6563
6564         * graphite.c (can_generate_for_scop): Removed.
6565         (gloog): Do not call it.
6566
6567 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6568
6569         * graphite.c (new_scop): Entry of a scop is an edge.
6570         Initialize SESE region.
6571         (free_scop): Free SESE region.
6572         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6573         (split_difficult_bb): New, split from end_scop.
6574         (end_scop): Exit of a scop is an edge.
6575         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6576         not automatically updated and thus is always wrong.
6577         * graphite.h (struct sese): New.
6578         (SESE_ENTRY): New.
6579         (SESE_EXIT): New.
6580         (struct scop): New field for a SESE region.  Remove entry, exit.
6581         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6582         semantics as before.  Moved comment around.
6583
6584 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6585             Sebastian Pop  <sebastian.pop@amd.com>
6586
6587         * graphite.c (graphite_transform_loops): Always enable gloog
6588         and find_transform when ENABLE_CHECKING.
6589
6590 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6591
6592         * graphite.c (graphite_transform_loops): Move pretty printer
6593         of SCOPs before doing any transform.  Remove call to print_scops
6594         and dot_all_scops_1.
6595
6596 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6597
6598         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6599         (print_graphite_bb): Same.
6600
6601 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6602
6603         * graphite.c (dot_all_scops_1): Cleanup.
6604         (move_scops): Fix comment.
6605
6606 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6607
6608         * graphite.c (build_scop_bbs): Revert commit 139355:
6609
6610         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6611                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6612
6613                 * graphite.c (build_scop_bbs): Factor up code.
6614
6615 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6616
6617         * graphite.c (gloog): Update dominator info.
6618
6619 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6620
6621         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6622
6623 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6624
6625         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6626         initialization.
6627         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6628         (translate_clast): Correct formatting.
6629         * graphite.h (struct num_map): Removed.
6630         (struct graphite_bb): Remove num_map field.
6631         (GBB_INDEX_TO_NUM_MAP): Removed.
6632
6633 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6634
6635         * graphite.c (build_access_matrix_with_af): Fix comments.
6636         (build_scop_data_accesses): Same.
6637
6638 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6639
6640         * graphite.c (build_scop_data_accesses): Don't construct
6641         access matrices.  Add a FIXME and an assert condition that
6642         should pass when the access matrices will be needed.
6643
6644 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6645
6646         * tree-data-ref.c (stmt_simple_memref_p): Don't call
6647         really_constant_p.
6648         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6649         Moved close by free_graphite_bb.
6650         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
6651         (new_scop): Move close by free_scop.
6652         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6653
6654 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
6655
6656         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6657         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6658         instead of recursive call.
6659         (graphite_translate_clast_equation): New.
6660         (graphite_create_guard_cond_expr): New.
6661         (graphite_create_new_guard): New.
6662         (get_stack_index_from_iv): Removed.
6663         (graphite_rename_ivs_stmt): Use gbb_loop_index.
6664         (get_true_edge_from_guard_bb): New.
6665         (translate_clast): Handle stmt_guard in clast.
6666         (get_construction_edge): Allow construction edge detection for
6667         a scope entry with multiple predecessors if one predecessor is
6668         the immediate dominator of scope entry.
6669         (can_generate_code_stmt): Enable code generation for clast_guard.
6670         (gloog): Use correct context loop.  Removed check for post dominators.
6671         * cfgloop.h (create_empty_if_region_on_edge): Declared.
6672
6673 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6674
6675         * graphite.c (remove_dead_loops): Document better which
6676         loops are removed.
6677
6678 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6679
6680         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6681         and PPLINC.
6682         (graphite.o): Also depends on pointer-set.h.
6683
6684 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6685
6686         * graphite.c (scop_record_loop): Fix compile warning.
6687
6688 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
6689             Sebastian Pop  <sebastian.pop@amd.com>
6690
6691         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6692
6693 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6694
6695         * graphite.c (build_graphite_bb): Initialize bb->aux to
6696         point to the graphite_bb_p.
6697         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6698         content of bb->aux.
6699         (add_bb_domains): Does not use the scop parameter.
6700         (graphite_transform_loops): Clean bb->aux at the end.
6701
6702 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6703             Sebastian Pop  <sebastian.pop@amd.com>
6704
6705         * lib/target-supports.exp
6706         (check_effective_target_fgraphite): New.
6707
6708         * gcc.dg/graphite/graphite.exp: Early exit when
6709         check_effective_target_fgraphite returns false.
6710         Set dg-do-what-default to compile.
6711         (scan-graphite-dump-times): Removed.
6712         * gfortran.dg/graphite/graphite.exp: Same.
6713
6714         * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6715         Use scan-tree-dump-times instead of scan-graphite-dump-times.
6716         * gcc.dg/graphite/scop-1.c: Same.
6717         * gcc.dg/graphite/scop-2.c: Same.
6718         * gcc.dg/graphite/scop-3.c: Same.
6719         * gcc.dg/graphite/scop-4.c: Same.
6720         * gcc.dg/graphite/scop-5.c: Same.
6721         * gcc.dg/graphite/scop-6.c: Same.
6722         * gcc.dg/graphite/scop-7.c: Same.
6723         * gcc.dg/graphite/scop-8.c: Same.
6724         * gcc.dg/graphite/scop-9.c: Same.
6725         * gcc.dg/graphite/scop-10.c: Same.
6726         * gcc.dg/graphite/scop-11.c: Same.
6727         * gcc.dg/graphite/scop-12.c: Same.
6728         * gcc.dg/graphite/scop-13.c: Same.
6729         * gcc.dg/graphite/scop-matmult.c: Same.
6730         * gcc.dg/graphite/scop-14.c: Same.
6731         * gcc.dg/graphite/scop-15.c: Same.
6732         * gcc.dg/graphite/block-0.c: Same.
6733         * gcc.dg/graphite/scop-16.c: Same.
6734         * gcc.dg/graphite/block-1.c: Same.
6735         * gcc.dg/graphite/scop-17.c: Same.
6736         * gcc.dg/graphite/scop-18.c: Same.
6737         * gfortran.dg/graphite/block-1.f90: Same.
6738         * gfortran.dg/graphite/scop-1.f: Same.
6739         * gfortran.dg/graphite/block-2.f: Same.
6740
6741 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6742
6743         * graphite.c: Fix some XXX comments.
6744         (build_scop_dynamic_schedules): Removed.
6745
6746 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6747
6748         * graphite.h (scop_max_loop_depth): Moved...
6749         * graphite.c (scop_max_loop_depth): ...here.
6750         (remove_all_edges_1): New.
6751         (remove_all_edges): Factored code.
6752         (remove_cond_exprs): Check only the last statement for
6753         a GIMPLE_COND expression.
6754
6755 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6756
6757         * graphite.c (scan_tree_for_params): Early return when the
6758         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
6759         (find_scop_parameters): Factor out code.
6760         (graphite_trans_bb_strip_mine): Remove dead code.
6761
6762 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6763
6764         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6765         graphite_trans_bb_move_loop): Factor asserts.
6766         (gloog): Perform sanity checks only for ENABLE_CHECKING.
6767         Do not call calculate_dominance_info and estimate_bb_frequencies.
6768
6769 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
6770
6771         * graphite.c (create_loops_mapping, free_loops_mapping,
6772         create_loops_mapping_num, debug_loop_mapping_1,
6773         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6774         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6775         graphite_loops_mapping_add_child_num,
6776         graphite_loops_mapping_insert_child,
6777         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6778         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6779         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6780         create_num_from_index, get_num_from_index,
6781         swap_loop_mapped_depth): Removed.
6782         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6783         (free_scop): Do not call free_loops_mapping.
6784         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6785         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
6786         get_loop_mapped_depth.
6787         (graphite_trans_bb_move_loop): Do not update the loop mapping.
6788         (graphite_trans_bb_strip_mine): Same.
6789         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6790         (struct scop): Remove field loops_mapping.
6791
6792 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6793             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6794
6795         * graphite.c (scop_record_loop): Factor out one level of the
6796         condition by early return.
6797         (build_scop_loop_nests): Format following FSF coding style.
6798         (build_scop_dynamic_schedules): Factor out code.
6799         (scopdet_bb_info): Reindent.  Default case should not be reachable.
6800
6801 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6802             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6803
6804         * graphite.c (loop_affine_expr): Check for DECL_P or struct
6805         assignments that are not handled as simple operands for now.
6806
6807 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6808             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6809
6810         * graphite.c (build_scop_bbs): Factor up code.
6811
6812 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6813             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6814
6815         * graphite.c (stmt_simple_for_scop_p): Factor code out
6816         of the loop.
6817         (enum gbb_type): New.  Group all the GBB_* types under it.
6818         (is_loop_exit): Moved...
6819         (end_scop): Enable BB spliting.
6820         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
6821         * cfgloop.h (is_loop_exit): Declared.
6822
6823 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6824
6825         * doc/invoke.texi: Remove strides from examples containing
6826         DO loops when the strides are equal to 1.
6827
6828 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
6829             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6830
6831         * graphite.c (graphite_trans_scop_block): Or the result with
6832         the result from graphite_trans_loop_block.
6833         * gcc.dg/graphite/block-1.c: New.
6834         * gfortran.dg/graphite/block-1.f90: New.
6835         * gfortran.dg/graphite/block-2.f: New.
6836
6837 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6838
6839         * graphite.c (graphite_transform_loops): Call cloog_initialize
6840         and cloog_finalize.
6841
6842 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6843
6844         * tree-data-ref.c) (stmt_simple_memref_p): New.
6845         * tree-data-ref.h (stmt_simple_memref_p): Declared.
6846         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6847         (is_simple_operand): Call stmt_simple_memref_p.
6848
6849         * gcc.dg/graphite/scop-matmult.c: Updated for not
6850         using pointer arithmetic, as this is optimized by PRE and
6851         makes the code too difficult to analyze.
6852
6853         * gcc.dg/graphite/scop-18.c: Same.
6854
6855 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6856
6857         * gdbinit.in (pgg): New.
6858
6859 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6860
6861         * graphite.c (graphite_trans_loop_block): Fix warning.
6862
6863 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6864
6865         * graphite.c (graphite_trans_loop_block): Fix my merge error.
6866
6867 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6868
6869         * graphite.c (graphite_trans_bb_block): Remove check for
6870         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6871         Check if loop blocking is profitable for every loop, before applying
6872         the changes.
6873         (graphite_apply_transformations): Call graphite_trans_bb_block only,
6874         if flag_loop_block is set.
6875
6876 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6877
6878         * graphite.c: Add some more documentation for the loop
6879         mapping.
6880
6881 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6882
6883         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6884         * graphite.c: Format on less than 80 columns.
6885         * graphite.h: Same.
6886
6887 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6888
6889         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6890
6891 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6892
6893         * doc/invoke.texi (floop-block, floop-strip-mine,
6894         floop-interchange): Update documentation with examples.
6895
6896 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
6897
6898         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6899         add_referenced_var.
6900         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6901
6902 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
6903
6904         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6905         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
6906         * tree-scalar-evolution.c: Revert useless changes.
6907         * tree-phinodes.c: Same.
6908         * cfghooks.c: Same.
6909         * vec.h: Same.
6910         * tree-vectorizer.h: Same.
6911         * tree-flow.h: Same.
6912         * tree-cfg.c: Same.
6913         * common.opt (fgraphite): Update documentation.
6914
6915 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
6916
6917         * doc/invoke.texi (-floop-block, -floop-strip-mine,
6918         -floop-interchange): Add more text for explaining what each of these
6919         flags is doing.
6920         * tree-into-ssa.c (gimple_vec): Moved to...
6921         * graphite.c: Include gimple.h.
6922         (gimple_vec): Moved to...
6923         (del_loop_to_cloog_loop): Removed.
6924         (loop_affine_expr): Do not call create_data_ref when the
6925         operand is a constant.
6926         (new_scop): Use free instead of del_loop_to_cloog_loop.
6927         * Makefile.in (graphite.o): Depend on GIMPLE_H.
6928         * gimple.h (gimple_vec): ... here.
6929
6930 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6931
6932         * graphite.c (scopdet_bb_info): Only allow loops with known number of
6933         latch executions.
6934         (build_loop_iteration_domains): Fail, if latch executions unknown.
6935
6936 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6937
6938         * graphite.c (add_conditions_to_domain): New.
6939         (build_scop_conditions_1): Call add_conditions_to_domain.
6940         (set_cloog_options): Allow to disable optimizations.
6941
6942 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6943
6944         * graphite.c (find_params_in_bb): Look for parameters in conditions.
6945         Do not use walk_dominator_tree.
6946         (find_scop_parameters): Do not use walk_dominator_tree.
6947
6948 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6949
6950         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6951         (idx_record_params): Adapt.
6952         * graphite.h (scop_gimple_loop_depth): New.
6953
6954 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6955
6956         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6957         (scan_tree_for_params): Remove value_init.
6958         (build_scop_context): Remove value_init.
6959         (build_loop_iteration_domains): Remove value_init.
6960         (schedule_to_scattering): Remove value_init.
6961         (graphite_trans_bb_strip_mine): Remove value_init.
6962
6963 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6964
6965         * gcc/graphite.c (limit_scops): New.
6966         (graphite_transform_loops): Add limit SCoPs.
6967         * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6968         * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6969         * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6970         * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6971         * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6972         * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6973         * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6974         * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6975         * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6976         Change loop numbers.
6977         * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6978         Change loop numbers.
6979         * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6980         * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6981         * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6982         * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6983         * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6984         * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6985         * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6986         * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6987         * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6988         * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6989
6990 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6991
6992         * graphite.c (graphite_transform_loops): Call always find_transform.
6993
6994 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6995
6996         * graphite.c (free_loops_mapping): New.
6997         (stmt_simple_for_scop_p): Fix typo.
6998         (stmt_simple_for_scop_p): Fix tuples functions, that
6999         broke polyhedron.
7000         (free_graphite_bb): Fix some memleaks.
7001         (free_scop): Fix some memleaks.
7002         (scopdet_bb_info): Do not forget some tmp SCoPs.
7003         (find_params_in_bb): Fix some memleaks.
7004         (clast_to_gcc_expression): Fix warning.
7005
7006 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
7007
7008         * gcc.dg/graphite/scop-16.c: Fix for 32bit.
7009         * gcc.dg/graphite/scop-17.c: Fix for 32bit.
7010
7011 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
7012
7013         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
7014         Move code ifdef-ed HAVE_cloog...
7015         * graphite.c: Include toplev.h.
7016         ... here.
7017         * Makefile.in (OBJS-common): Always build graphite.o.
7018         (BACKEND): Remove @GRAPHITE@.
7019         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
7020         (graphite.o): Depend on TOPLEV_H.
7021
7022 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
7023
7024         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
7025         Remove typo left from polylib to ppl conversion.
7026         * graphite.c (graphite_transforms): Use sorry instead of fatal.
7027
7028 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
7029
7030         * toplev.c (process_options): Move the graphite loop optimization
7031         flags...
7032         * tree-ssa-loop.c (graphite_transforms): ... here.
7033         When not configured with CLooG, print to dump_file that
7034         Graphite transforms were not performed.
7035         * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
7036         New.
7037         * gcc.dg/graphite/*.c: Updated all testcases to use
7038         scan-graphite-dump-times.
7039
7040 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
7041
7042         * graphite.c (dot_scop, dot_all_scops): Do not call system.
7043         Do not open /tmp/scop.dot and /tmp/allscops.dot.
7044
7045 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
7046             Jan Sjodin  <jan.sjodin@amd.com>
7047
7048         * configure: Regenerated.
7049         * omp-low.c (expand_omp_sections): Remove now unused code.
7050         * config.in (HAVE_polylib): Removed.
7051         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
7052         (PPLLIBS, PPLINC): Added.
7053         * graphite.c: Replace unsigned with int wherever possible.
7054         Don't access Cloog's data structures, but use accessor functions.
7055         Clast's stmt->type is now implemented as a vtable: change the
7056         switches of stmt->type into ifs.
7057         (polylib/polylibgmp.h): Don't include.
7058         (initialize_dependence_polyhedron,
7059         initialize_data_dependence_polyhedron, is_empty_polyhedron,
7060         statement_precedes_p, test_dependence, build_rdg_all_levels,
7061         dump_dependence_graph): Removed until this code is cleaned up
7062         or ported to Cloog.
7063         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
7064         (POLYLIBINC): Renamed PPLINC.
7065
7066 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
7067             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7068             Jan Sjodin  <jan.sjodin@amd.com>
7069
7070         Finish the merge and tuplification of graphite.
7071
7072 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
7073             Jan Sjodin  <jan.sjodin@amd.com>
7074
7075         Partial merge from mainline (138072:138275).
7076         * graphite.c still has to be tuplified.
7077
7078 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
7079
7080         * graphite.c (graphite_loops_mapping_max_loop_num): New.
7081         (create_num_from_index): New.
7082         (get_num_from_index): Also pass in the graphite BB.
7083         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
7084         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
7085         (graphite_trans_bb_strip_mine): Call create_num_from_index.
7086         (is_interchange_valid): Return false when failing.
7087         * graphite.h (struct num_map): New.
7088         (struct graphite_bb): New field num_map.
7089         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
7090
7091 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7092
7093         * graphite.c (dump_gbb_conditions): Print also conditions like
7094         "if (a)".  Remove dublicated code and use print_generic_expr ().
7095         (stmt_simple_for_scop_p): Only allow conditions we can handle
7096         {<, <=, >, >=}.
7097
7098 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
7099
7100         * graphite.h (struct scop): Removed new_ivs field.
7101         (SCOP_NEWIVS): Deleted.
7102         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7103         clast_to_gcc_expression, graphite_create_new_loop):
7104         Removed use of new_ivs.
7105
7106 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
7107
7108         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7109         create_loops_mapping_num, debug_loop_mapping_1): New.
7110         (debug_loop_mapping): Call debug_loop_mapping_1.
7111         (get_loop_mapping_for_num,
7112         graphite_loops_mapping_add_child,
7113         graphite_loops_mapping_add_child_num,
7114         graphite_loops_mapping_insert_child,
7115         graphite_loops_mapping_parent,
7116         split_loop_mapped_depth_for_num,
7117         loop_mapped_depth_split_loop): New.
7118         (increment_loop_mapped_depths): Removed.
7119         (swap_loop_mapped_depth_for_num): Reimplemented.
7120         (new_scop): Call create_loops_mapping.
7121         (scop_record_loop): Call graphite_loops_mapping_insert_child.
7122         (translate_clast): Pass the old loop father in parameter, and pass
7123         it to get_old_iv_from_ssa_name.
7124         (remove_edges_around_useless_blocks, can_generate_code_stmt,
7125         can_generate_code, can_generate_for_scop): New.
7126         (graphite_trans_bb_block): Returns false when it fails to transform.
7127         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7128
7129 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7130
7131         Reverted all the changes related to the streamization and
7132         loop fusion.
7133         These changes are now tracked in the streamization branch.
7134
7135 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7136             Jan Sjodin  <jan.sjodin@amd.com>
7137
7138         * graphite.c (gbb_compare): Correctly constify.
7139         (gbb_can_be_ignored): Indent.
7140         (graphite_trans_scop_swap_1and2): Add legality check.
7141         Remove dead FIXMEs.
7142
7143 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7144
7145         Remove fallouts from "Reverted the Condate changes".
7146         * tree.h: Remove unused decl.
7147         * gcc.dg/tree-checker: Same.
7148         * timevar.def: Remove counter.
7149
7150 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
7151
7152         * Merge from mainline (135673:138072).
7153
7154         Reverted the MIRO changes (from 2008-04-05) that are now
7155         tracked in the miro branch.
7156         * tree-bounds.c: Removed.
7157         * tree-bounds.h: Removed.
7158
7159         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7160         are now tracked in the condate branch.
7161         * tree-check.c: Removed.
7162         * tree-match.c: Removed.
7163         * condate.y: Removed.
7164
7165 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7166
7167         * common.opt: New user flag -floop-block, -floop-strip-mine
7168         and -floop-interchange.
7169         * toplev.c (process_options): Enable -fgraphite pass if any one of the
7170         graphite loop optimization flags is turned on.
7171         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7172         flag_loop_strip_mine and flag_loop_interchange checks before
7173         optimizations.
7174         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7175         -floop-strip-mine and -floop-interchange.
7176         * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7177         -fgraphite.
7178         * gcc.dg/graphite/scop-16.c: Ditto.
7179         * gcc.dg/graphite/scop-17.c: Ditto.
7180         * gcc.dg/graphite/scop-18.c: Ditto.
7181
7182 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
7183             Sebastian Pop  <sebastian.pop@amd.com>
7184
7185         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7186         (create_empty_loop_on_edge): More fixes.
7187         * tree-phinodes.c (resize_phi_node): Extern.
7188         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7189         * cfghooks.c (update_dominator_information): New split from
7190         split_edge.
7191         * tree-vectorizer.c (rename_variables_in_bb): Extern.
7192         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7193         successor of the function entry block.
7194
7195         * graphite.c: Include pointer-set.h.
7196         (debug_loop_mapping, increment_loop_mapped_depths,
7197         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7198         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7199         swap_loop_mapped_depth_for_num, get_num_from_index,
7200         swap_loop_mapped_depth, loop_iv_stack_debug,
7201         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7202         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7203         get_old_iv_from_ssa_name): New.
7204         (new_scop): Initialize SCOP_LOOPS_MAPPING.
7205         (free_scop): Free SCOP_LOOPS_MAPPING.
7206         (scop_record_loop): Record old ivs.
7207         (create_var_name): Removed.
7208         (initialize_cloog_names): Allocate double space in case strip mine
7209         applies to all loops once.
7210         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7211         (clast_to_gcc_expression): Same.  Implement more clast to gimple
7212         translation.
7213         (graphite_create_new_loop): Pass in ivstack.
7214         (remove_all_edges): Pass in the construction_edge.
7215         (graphite_remove_iv): Removed.
7216         (graphite_rename_ivs, graphite_rename_ivs_stmt,
7217         remove_cond_exprs): Rewritten.
7218         (move_phi_nodes): New.
7219         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7220         (translate_clast): Pass in ivstack.  Rewrite some cases.
7221         (set_cloog_options, debug_clast_stmt): New.
7222         (find_transform): Use set_cloog_options.
7223         (outermost_loop_layer): Removed.
7224         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7225         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7226         mark_old_loops, remove_dead_loops): New.
7227         (gloog): Rewritten.
7228         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7229         (const_column_index, get_first_matching_sign_row_index,
7230         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7231         get_upper_bound): New.
7232         (graphite_trans_bb_strip_mine): Also update the iv map.
7233
7234         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7235         (struct name_tree): Add a loop field.
7236         (struct scop): Add a graphite_loops_mapping field.
7237         (SCOP_LOOPS_MAPPING): New.
7238         (debug_clast_stmt): Declare.
7239         * lambda.h (find_induction_var_from_exit_cond): Declare.
7240         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7241         * cfgloop.h (update_dominators_in_loop): Removed declaration.
7242         (create_empty_loop_on_edge): Updated.
7243         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7244         rename_variables_in_bb): Declare.
7245         * tree-cfg.c (remove_bb): Extern.
7246
7247         * gcc.dg/graphite/block-0.c: New.
7248
7249 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7250             Sebastian Pop  <sebastian.pop@amd.com>
7251
7252         * graphite.c (strip_mine_profitable_p): New.
7253         (graphite_trans_bb_block): Disable strip mining if not profitable.
7254
7255         * gcc.dg/graphite/scop-18.c: New.
7256         * gcc.dg/graphite/scop-17.c: Fixed.
7257         * gcc.dg/graphite/scop-16.c: Fixed.
7258
7259 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
7260             Jan Sjodin  <jan.sjodin@amd.com>
7261             Sebastian Pop  <sebastian.pop@amd.com>
7262
7263         * graphite.c (is_interchange_valid): New.
7264         (graphite_trans_bb_block): Check loop nest of basic block for legality
7265         of interchange.
7266
7267         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7268         outer_most_loop, gbb_outer_most_loop_index): New.
7269
7270         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7271         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7272         * gcc.dg/graphite/scop-16.c: New.
7273         * gcc.dg/graphite/scop-17.c: New.
7274
7275 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7276
7277         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7278         (graphite_trans_scop_block): Ignore SCoPs without bbs.
7279
7280 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7281
7282         * graphite.c (new_scop): Initialize SCOP_EXIT.
7283         (scopdet_info): Add.
7284         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7285         (build_scops_1): Cleanup, bugfixes.
7286         (build_scops): Cleanup.
7287
7288         * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7289         * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7290
7291 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7292
7293         * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7294
7295         * gfortran.dg/graphite/graphite.exp: Use
7296         DEFAULT_GRAPHITE_FLAGS.
7297
7298         * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7299
7300 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7301
7302         * graphite.c (scan_tree_for_params): Do not assert any more if
7303         MULT_EXPR parameter is negative.
7304
7305         * gfortran.dg/graphite/scop-1.f: New.
7306
7307         * gfortran.dg/graphite/graphite.exp: New.
7308
7309         * gcc.dg/graphite/scop-15.c: New.
7310
7311 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7312
7313         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7314
7315 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7316
7317         * graphite.c (graphite_trans_bb_swap_loops): Rename from
7318         graphite_swap_loops.
7319         (graphite_trans_bb_move_loop): New.
7320         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7321         (graphite_trans_bb_block): New.
7322         (graphite_trans_loop_block): New.
7323         (graphite_trans_scop_swap_1and2): Rename from
7324         graphite_trans_swap_1and2.
7325         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7326         (graphite_trans_scop_block): New.
7327         (graphite_apply_transformations): Rename from
7328         graphite_transformations.
7329
7330         * gcc.dg/graphite/scop-matmult.c: New.
7331
7332 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7333
7334         * graphite.c (gbb_compare): New.
7335         (graphite_sort_gbbs): New.
7336         (gbb_can_be_ignored): New.
7337         (scop_remove_ignoreable_gbbs): New.
7338         (graphite_transformations): Cleanup and add
7339         scop_remove_ignoreable_gbbs.
7340         * lambda.h (lambda_vector_compare): New.
7341
7342 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
7343
7344         * graphite.c (print_graphite_bb): Correct printing of static schedule.
7345         (graphite_swap_loops): int -> unsigned
7346         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7347         (graphite_transformations): New.
7348         (graphite_transform_loops): Move to graphite_transformations.
7349         * graphite.h (gbb_nb_loops): Return unsigned.
7350
7351 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7352
7353         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7354         the domain matrix.  This makes scop-0.c work again.
7355
7356 2008-06-20  Richard Guenther  <rguenther@suse.de>
7357
7358         * graphite.h: Adjust copyright to GPLv3.
7359         * graphite.c: Likewise.
7360         (stmt_simple_memref_for_scop_p): Split out from ...
7361         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
7362         and simplify.
7363         (get_bb_type): Optimize.
7364         (is_pred): Remove.
7365         (is_bb_addable): Fix memleak, replace is_pred call with
7366         single_pred.
7367         (build_scops): Use current_loops.
7368         (param_index): Fix memleak.
7369
7370 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7371
7372         * graphite.c: Fix formatting.
7373
7374 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7375
7376         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7377         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7378         (create_var_name, save_var_name): Newly defined functions.
7379         (initialize_cloog_names): Part of the code factored out to
7380         save_var_name.
7381         (clast_to_gcc_expression): Now handles the case of clast_red_sum
7382         in clast_reduction statement.
7383         (graphite_create_new_loop): Now takes a new parameter
7384         for outer_loop.
7385         (translate_clast): Now also takes the context_loop and bb_exit
7386         parameters. Rewritten the code so that it creates a gimple code
7387         inside the given context.
7388         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7389         remove_cond_expr, disconnect_cond_expr,
7390         disconnect_virtual_phi_nodes): Newly defined functions.
7391         * graphite.h (struct scop): added old_ivs vector.
7392         SCOP_OLDIVS: New macro.
7393
7394 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
7395
7396         * cfgloopmanip.c: Add missing function comments, fix formatting.
7397
7398 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7399
7400         * cfgloopmanip.c (update_dominators_in_loop): Defined.
7401         (create_empty_loop_on_edge): Defined.
7402         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7403         instead of void.
7404         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7405         (update_dominators_in_loop): Declared as extern
7406         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7407
7408 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
7409
7410         * graphite.c (print_graphite_bb): Allow changing number of loops
7411         in SCoP domain.
7412         (initialize_cloog_names): Allow changing number of loops.
7413         (build_cloog_prog): Simplify.
7414         (find_transform): Enable cloog option --strides.
7415         (graphite_swap_loops): New.
7416         (graphite_strip_mine_loop): New.
7417         (graphite_trans_swap_1and2): New.
7418         (graphite_trans_strip): New.
7419         (graphite_transform_loops): Add graphite_trans_strip.
7420         * graphite.h (scop_max_loop_depth): New.
7421
7422 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7423
7424         * graphite.c (build_scop_iteration_domain): Remove forgotten
7425         line. (Fixes compile)
7426
7427 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7428
7429         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7430         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7431         (build_bb_loops): New.
7432         (graphite_transform_loops): Add build_bb_loops.
7433         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7434         numbers.
7435         * graphite.h (graphite_bb): Add loops.
7436         (gbb_nb_loops): New.
7437         (gbb_loop_at_index): New.
7438         (gbb_loop_index): New.
7439         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7440         using nb_params_in_scop.
7441
7442 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7443
7444         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7445         (build_scop_canonical_schedules): Build minimized schedule.
7446         (schedule_to_scattering): Adapt to minimized schedule.
7447         * graphite.h (graphite_bb): Add/Update descriptions.
7448
7449 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
7450             Tobias Grosser  <grosser@fim.uni-passau.de>
7451
7452         * graphite.c (print_graphite_bb): Add condition printing.
7453         (dump_value): New.
7454         (dump_gbb_conditions): New.
7455         (build_scop_conditions_1): New.
7456         (build_scop_conditions): New.
7457         * graphite.h (graphite_bb): Add conditions.
7458
7459 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7460
7461         * graphite.c (print_graphite_bb):
7462         (free_graphite_bb): New.
7463         (free_scop): Free bbs.
7464         (get_bb_type): Free doms.
7465         (build_scop_context): Free context matrix.
7466         (build_loop_iteration_domains): Remove unused code.
7467         (build_cloog_prog): Free scattering function and blocklist.
7468         (find_transform): Free options.
7469
7470 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
7471
7472         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7473         Remove unnecessery cloog data structures. Make a copy of the domain
7474         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7475         unnecessary cloog data structures. Fix memory leaks. Remove insert
7476         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7477         used.
7478         (build_scop_iteration_domain): Remove unnecessary cloog
7479         data structures.  Fix memory leaks.
7480         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7481         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7482
7483 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7484
7485         * graphite.c (find_scop_params): Remove initialize_cloog_names.
7486
7487 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7488
7489         * graphite.c (end_scop): Style fix.
7490         (schedule_to_scattering): Style and comment fix.
7491
7492 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7493         * graphite.c (print_graphite_bb): Fix definiton of
7494         schedule_to_scattering.
7495         (initialize_cloog_names): Change nb_scattdims to max loop
7496         depth in SCoP.
7497         (schedule_to_scattering): Take parameter for number of scattering
7498         dimensions.
7499         (build_cloog_prog): Only build as much scattering dimensions as
7500         necessary.
7501
7502 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7503
7504         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7505         in polyhedron/aermod.f90.
7506
7507 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7508             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
7509             Harsha Jagasia  <harsha.jagasia@amd.com>
7510
7511         * graphite.c (is_bb_addable): Fix segfault.
7512
7513 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7514
7515         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7516         with multiple exits and conditional handling in edge cases.
7517         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7518
7519         * gcc.dg/graphite/scop-14.c: New.
7520
7521 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7522             Adrien Eliche  <aeliche@isty.uvsq.fr>
7523
7524         * graphite.c (is_bb_addable): Add more comments and enhance
7525         readablity of the source code. Fix memory leak.
7526         (is_loop_exit): Fix memory leak.
7527
7528 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7529
7530         * graphite.c (first_loop_in_scop): Deleted.
7531         (setup_cloog_loop): Only walk the loop chain for inner loops.
7532         (build_scop_iteration_domain): Execute setup_cloog_loop for
7533         all loops in the first layer.
7534
7535 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7536
7537         * graphite.c (scan_tree_for_params): Change the way params are
7538         added to be indepenent of the number of loops.
7539         (setup_cloog_loop): Revert to short matrix format. Fix parameter
7540         handling.
7541         (build_cloog_prog): Revert to short matrix format.
7542
7543 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7544             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7545
7546         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7547         warning.
7548
7549 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7550
7551         * graphite.c (nb_data_refs_in_scop): New.
7552         (graphite_transform_loops): Print more stats: number of
7553         loops, basic blocks and data references per scop.
7554
7555 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7556             Jan Sjodin  <jan.sjodin@amd.com>
7557
7558         * graphite.c (loop_affine_expr, idx_record_params,
7559         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7560         instead of instantiate_parameters.
7561
7562 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7563
7564         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7565         add support for parameters, add STATIC_SCHEDULE at the right places,
7566         cleanup.
7567
7568 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7569
7570         * graphite.c (build_scop_loop_nests): Only add the loops, that
7571         are contained completely in the SCoP.
7572         (build_cloog_prog): Disable scattering, until schedule_to_scattering
7573         and the domains are fixed.
7574         (build_scop_canonical_schedules): Add support for bbs not contained
7575         in any SCoP.
7576
7577 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7578
7579         * graphite.h (scop_contains_loop): Update comments to match
7580         the actual behavior.
7581         (scop_contains_loop): New.
7582         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7583
7584 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7585
7586         * graphite.c (get_bb_type): On function body, i.e. loop_0,
7587         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7588         as GBB_COND_HEADER.
7589
7590 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7591             Tobias Grosser  <grosser@fim.uni-passau.de>
7592
7593         * graphite.c (graphite_transform_loops): Early return when
7594         there are no loops in the function.
7595
7596 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7597             Jan Sjodin  <jan.sjodin@amd.com>
7598
7599         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7600         offset of the last loop.
7601         (setup_cloog_loop): Copy the entire outer constraint matrix.
7602
7603 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7604             Jan Sjodin  <jan.sjodin@amd.com>
7605
7606         * graphite.c (stmt_in_scop_p, function_parameter_p,
7607         invariant_in_scop_p): Removed.
7608         (scan_tree_for_params): Can be used with no constraint
7609         matrix for gathering parameters.
7610         (idx_record_params): Don't use idx_record_param, instead use
7611         scan_tree_for_params.
7612         (find_scop_parameters): Same.
7613         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7614         Fix the size of loop domains.
7615         (schedule_to_scattering): Exit when the outer loop is not in scop.
7616         (find_transform): Enable build_cloog_prog.
7617
7618 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7619             Jan Sjodin  <jan.sjodin@amd.com>
7620
7621         * graphite.c (schedule_to_scattering): Make scattering domains
7622         uniformly of the same size, as required by CLooG 0.14.0 and before.
7623
7624 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7625             Jan Sjodin  <jan.sjodin@amd.com>
7626
7627         * graphite.c (schedule_to_scattering): Rewrite, correct the
7628         translation of the scheduling function to scattering.
7629         (build_cloog_prog): Call schedule_to_scattering only once.
7630         * graphite.h (scop_loop_index): Do not fail for loops not
7631         in the scop: return -1.
7632
7633 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
7634
7635         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7636         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7637         (setup_cloog_loop): Export GBB_DOMAIN.
7638         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
7639         able to rebuild the original control flow.
7640         * graphite.h (graphite_bb): Add domain field and access macro.
7641         (GBB_DOMAIN): New.
7642
7643 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
7644
7645         * graphite.c (debug_gbb): New.
7646         (print_scop, build_graphite_bb): Use SCOP_BBS.
7647         (build_scop_bbs): Reimplemented.
7648         (dfs_bb_in_scop_p): Removed.
7649         (build_scop_loop_nests): Reorder loops inserted in
7650         SCOP_LOOP_NEST: outer loops should come first.
7651         (build_scop_canonical_schedules): Reinitialize at zero
7652         the components of the SCOP_STATIC_SCHEDULE for the loops
7653         that have already been parsed.
7654
7655         * graphite.h (debug_gbb): Declared.
7656
7657 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
7658             Jan Sjodin  <jan.sjodin@amd.com>
7659
7660         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7661         (graphite_loop_to_gcc_loop): Removed.
7662         (remove_all_edges): New.
7663         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7664         (gloog): Remove useless code.
7665
7666 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7667
7668         * graphite.c (get_bb_type): Reworked. We distinguish between
7669         loops with one or multiple exits.
7670         (is_loop_exit): New.
7671         (is_pred): New.
7672         (is_bb_addable): Rework condition handling, now support for case
7673         case statements and loops with multiple exits.
7674
7675         * gcc.dg/graphite/scop-11.c: New.
7676         * gcc.dg/graphite/scop-12.c: New.
7677         * gcc.dg/graphite/scop-13.c: New.
7678
7679 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7680
7681         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7682         we have too many colors.
7683
7684 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
7685
7686         * doc/invoke.texi (-ftree-loop-fusion): Document.
7687         * tree-pass.h (pass_loop_fusion): Declared.
7688         * tree-loop-fusion.c: New.
7689         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7690         * tree-data-ref.c (find_data_references_in_loop): Make extern.
7691         * tree-data-ref.h (find_data_references_in_loop): Declared.
7692         * common.opt (ftree-loop-fusion): Declared.
7693         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7694
7695 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
7696
7697         * graphite.c (build_access_matrix): Fix typo from the merge.
7698
7699 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
7700
7701         * Merge from mainline (130800:135673).
7702
7703 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7704
7705         * graphite.c (end_scop): The exit of the scop is not part of the scop.
7706         Update dominators after splitting.
7707
7708 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7709
7710         * graphite.c (is_bb_addable): Return the harmful statement.
7711         Factor up some code.
7712         (end_scop): New.  Splits end of scope bbs on a harmful statement.
7713         (build_scops_1): Call end_scop.
7714
7715 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7716
7717         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7718         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7719         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7720         build_scops_1): Removed.
7721         (build_scops_2): Renamed build_scops_1.
7722
7723 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
7724
7725         * graphite.c: Fix formatting.
7726
7727 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7728
7729         * graphite.c (get_bb_type): New.
7730         (move_scops): New.
7731         (build_scops_2): New.
7732         (is_bb_addable): New.
7733         (build_scops): Switch the scop detection.
7734         (build_scop_bbs): Add entry bb to scop.
7735         * graphite.h (struct scop): Update comment.
7736
7737 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7738
7739         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7740         more colors.
7741
7742 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7743
7744         * gcc.dg/graphite/scop-1.c: Update.
7745         * gcc.dg/graphite/scop-2.c: Update.
7746         * gcc.dg/graphite/scop-4.c: Update.
7747         * gcc.dg/graphite/scop-5.c: Add.
7748         * gcc.dg/graphite/scop-6.c: Add.
7749
7750 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
7751
7752         * gcc.dg/graphite/scop-0.c: Add.
7753         * gcc.dg/graphite/scop-7.c: Add.
7754         * gcc.dg/graphite/scop-8.c: Add.
7755         * gcc.dg/graphite/scop-9.c: Add.
7756         * gcc.dg/graphite/scop-10.c: Add.
7757
7758 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7759
7760         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7761         Check affine expressions depending on the outermost loop
7762         instead of a scop.
7763         (stmt_simple_for_scop_p): Same.
7764         (harmfule_stmt_in_scop): Same.
7765
7766 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
7767
7768         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7769         mark entry and exit, that are not part of the SCoP and update HTML
7770         formatting.
7771
7772 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
7773
7774         * graphite.c (basic_block_simple_for_scop_p): Renamed
7775         harmful_stmt_in_bb.
7776         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7777         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7778         (all_preds_visited_p, all_succs_visited_p,
7779         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7780         scop_end_loop): New.
7781         (build_scops): Do not use dfs_enumerate_from.
7782
7783         * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7784
7785 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
7786
7787         * graphite.c: Add comments to functions that are missing a
7788         description.
7789         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
7790
7791 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
7792
7793         * graphite.c (nb_params_in_scop): Moved...
7794         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7795         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7796         (clast_to_gcc_expression): Reduce column size to less than 80.
7797         (graphite_create_iv): Return the new name of the IV.
7798         (find_transform): Set options->esp and options->cpp.
7799         (gloog): Comment out the invalidation of the old loop code.
7800         (initialize_dependence_polyhedron): Replace scop_nb_params with
7801         nb_params_in_scop.
7802
7803         * graphite.h (nb_params_in_scop): ... here.
7804         (scop_nb_params): Removed.
7805         (loop_domain_dim): Return something even when the loop was not
7806         found in the hash table: avoid ICEing on all the graphite.exp
7807         testcases.
7808
7809 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7810
7811         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7812
7813         * graphite.c (build_scop_dynamic_schedules): Schedule is built
7814         according to nesting level.
7815         (find_scop_parameters): Call instantiate_parameters.
7816         (scan_tree_for_params): Extend it to handle general affine bounds.
7817         Inner loop bound can depend on outer loop induction variable.
7818         (setup_cloog_loop): tmp variable is allocated on stack. Call
7819         instantiate_parameters with respect to outermost_loop_in_scop.
7820         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7821         graphite.h.
7822         (create_empty_loop): Function loopify should be given edge
7823         probability, instead of edge frequency. Dominance relation from
7824         switch_bb to loop_header.
7825         (clast_to_gcc_expression): Added handling of clast_reduction node.
7826         (gloog): New functionality for removing old loop.
7827         (test_dependence): Factored out from build_rdg_all_levels.
7828         (build_rdg_all_levels): Dependence testing factored out to
7829         test_dependence function.
7830
7831         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7832         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7833         from graphite.c
7834
7835 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
7836
7837         * graphite.c (free_scop, param_index, initialize_cloog_names,
7838         nb_params_in_scop): Use name_tree map instead of just a tree
7839         for keeping track of the variable name associated to that tree.
7840         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7841         clast_to_gcc_expression, graphite_create_iv,
7842         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7843         graphite_stmt_to_gcc_stmt): New.
7844         (gloog): Call these.
7845         * graphite.h (struct name_tree): New.
7846         (struct scop): Use name_tree instead of tree for params.
7847         Store a vector of name_tree for new_ivs.
7848         (SCOP_NEWIVS): New.
7849         (scop_nb_params): Use name_tree instead of tree.
7850
7851 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
7852             Sebastian Pop  <sebastian.pop@amd.com>
7853
7854         * tree-bounds.c: New.
7855         * tree-bounds.h: New.
7856         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7857         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7858         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7859         flag_mudflap.
7860         * gcc.c: Same.
7861         * toplev.c: Same.
7862         * c-cppbuiltin.c: Same.
7863         * c-pragma.c: Same.
7864         * common.opt: Same.
7865         * varasm.c: Same.
7866         * tree-outof-ssa.c: Same.
7867         * c-common.c: Same.
7868         * Makefile.in: Same.
7869
7870 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
7871             Sebastian Pop  <sebastian.pop@amd.com>
7872
7873         * tree-loop-distribution.c (remaining_stmts,
7874         upstream_mem_writes): Removed static variables.
7875         (copy_loop_before, create_bb_after_loop,
7876         mark_nodes_having_upstream_mem_writes, free_rdg_components,
7877         rdg_build_components, rdg_build_partitions,
7878         dump_rdg_partitions): Extern.
7879         (generate_loops_for_partition, generate_code_for_partition): Do not
7880         return a bool.
7881         (already_processed_vertex_p, predecessor_has_mem_write,
7882         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7883         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7884         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7885         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7886         Pass remaining_stmts and upstream_mem_writes as parameters.
7887         (rdg_component): Moved...
7888         (build_rdg_partition_for_component): Do not aggregate components when
7889         flag_streamize_loops is set.
7890         (gen_sequential_loops): New.
7891         (ldist_gen): Call gen_sequential_loops.
7892
7893         * tree-pass.h (pass_loop_streamization): Declared.
7894
7895         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7896         basic blocks when loops structures exist.
7897
7898         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7899
7900         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7901
7902         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7903         eliminate_local_variables_stmt, eliminate_local_variables,
7904         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7905         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7906         of code delimited by two edges in the CFG.
7907         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7908         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7909         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
7910         the case of parallelisation of reductions.
7911         (create_loop_fn): Extern.
7912         (create_omp_parallel_region): New.
7913
7914         * tree-data-ref.c (dump_data_dependence_relation): Don't call
7915         dump_data_reference for printing dra and drb.
7916         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7917         RDGE_RELATION.
7918         (build_rdg): Don't call free_dependence_relations for the moment, as
7919         we attach dependence relations on each edge of the RDG.
7920         To be fixed later.
7921
7922         * tree-data-ref.h (rdg_component): ...here.
7923         (struct rdg_edge): New field ddr_p relation.
7924         (RDGE_RELATION): New.
7925         (create_bb_after_loop, copy_loop_before,
7926         mark_nodes_having_upstream_mem_writes, rdg_build_components,
7927         rdg_build_partitions, dump_rdg_partitions,
7928         free_rdg_components): Declared.
7929
7930         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7931         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7932
7933         * tree-loop-streamization.c: New.
7934
7935         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7936         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7937
7938         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7939
7940         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7941
7942         * passes.c: Schedule pass_loop_streamization.
7943
7944 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
7945
7946         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7947         update comment.
7948
7949 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
7950
7951         * graphite.c (dot_all_scops): Update formatting.
7952         Bbs can now be part of more than one SCoP.
7953
7954 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
7955
7956         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7957         malloc problems.
7958         (loop_domain_dim): Check for unregistered toplev SCOP loop.
7959         * graphite.h (loop_to_cloog_loop): New.
7960
7961 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7962
7963         * graphite.c (loop_domain_dim, ref_nb_loops,
7964         loop_iteration_vector_dim): New.
7965         (build_access_matrix_with_af, build_access_matrix,
7966         initialize_dependence_polyhedron): Fixed for new matrix layout.
7967         No longer assume that all iteration domains are of the same
7968         dimensionality.
7969
7970 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
7971
7972         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7973         defined in a loop at depth 0 is invariant.
7974         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7975         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7976         be called at loop depth 0.
7977
7978         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7979         a parameter.
7980         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7981         (down_open_scop): Removed.
7982         (loop_in_scop_p): Redefined.
7983         (scop_affine_expr): New argument: scop.
7984         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
7985         a harmful statement ending a scop.
7986         (basic_block_simple_for_scop_p): New argument: scop.
7987         (get_loop_start): Removed.
7988         (new_scop): Initialize SCOP_LOOPS.
7989         (free_scop): Free SCOP_LOOPS.
7990         (succs_at_same_depth, preds_at_same_depth): New.
7991         (end_scop): Test the validity of a scop.
7992         (add_dominators_to_open_scops): New.
7993         (test_for_scop_bound): Call add_dominators_to_open_scops.
7994         Add cases for opening and closing multiple scops.
7995         (build_scops, build_scop_bbs): Iterate over basic blocks in
7996         depth first order.
7997         (build_graphite_bb): Pass scop directly.
7998         (dfs_bb_in_scop_p): New.
7999         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
8000         several times.
8001         (nb_loops_around_gb): Use loop_in_scop_p.
8002         (schedule_to_scattering): Disabled for the moment the code computing
8003         the "textual order for outer loop".
8004
8005         * graphite.h (struct scop): New field loops.
8006         (SCOP_LOOPS): New.
8007         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
8008
8009         * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
8010
8011 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
8012             Sebastian Pop  <sebastian.pop@amd.com>
8013
8014         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
8015         * common.opt (fstreamize-loops): New.
8016         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
8017         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
8018         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
8019         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
8020
8021 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8022
8023         * tree-data-ref.c (build_empty_rdg): New.
8024         (build_rdg): Use it.
8025         * tree-data-ref.h (build_empty_rdg): Declared.
8026         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
8027         (find_vertex_for_stmt): Removed.
8028         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
8029
8030 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
8031
8032         * tree-loop-distribution.c (generate_builtin): After cancelling the
8033         loop tree, also delete basic blocks.
8034         (rdg_flag_uses): Stop recursion when a vertex has already been
8035         processed.
8036
8037 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8038
8039         * graphite.c (build_scop_alpha): Removed.
8040         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
8041         and dump_dependence_graph to avoid compiler warnings.
8042
8043 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8044
8045         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
8046         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
8047         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
8048         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
8049         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
8050         (initialize_dependence_polyhedron, find_vertex_for_stmt,
8051         initialize_data_dependence_polyhedron, is_empty_polyhedron,
8052         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
8053         dump_dependence_graph): New.
8054         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
8055         (GBB_ALPHA): New.
8056         (struct scop): New field loop2cloog_loop.
8057         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
8058         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
8059
8060 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8061
8062         * graphite.c (build_graphite_bb): Fix initialization
8063         of the graphite basic block.
8064
8065 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
8066
8067         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
8068         loop domain matrix.  Pass in the number of loops contained in the
8069         constraint matrix.
8070         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
8071         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
8072         loops that are not surrounding the current loop are not represented
8073         in the domain constraint matrix.
8074         (build_scop_iteration_domain): Initial domain constraint matrix
8075         contains only the eq/ineq, cst, and scop parameters columns.
8076
8077 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8078
8079         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
8080         (print_graphite_bb): Print scattering.
8081
8082 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8083
8084         * graphite.c (initialize_cloog_names): Initialize names of
8085         scattering variables.
8086
8087 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8088
8089         * graphite.c (dot_all_scops_1): Disable debug output while
8090         printing graph.
8091
8092 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8093
8094         * graphite.c (find_transform): Change cloog output language to C.
8095
8096 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
8097
8098         * tree-loop-distribution.c (generate_memset_zero,
8099         generate_builtin, generate_code_for_partition,
8100         rdg_flag_all_uses): New.
8101         (rdg_flag_uses): Gather in the same partition the statements defining
8102         the VUSES of the current statement.
8103         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8104         Gather in the same partition not only the stores to the same memory
8105         access, but also the reads.
8106         (ldist_generate_loops): Renamed ldist_gen.
8107
8108 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
8109             Tobias Grosser  <grosser@fmi.uni-passau.de>
8110
8111         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8112         next pointer, don't use the inner pointer.
8113
8114 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
8115
8116         * graphite.c (dot_all_scops, dot_all_scops_1): New.
8117         (find_transform): Call dot_all_1.
8118         * graphite.h (dot_all_scops): Declared.
8119
8120 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
8121
8122         * tree-loop-distribution.c: Fix apsi.f ICE.
8123         (create_bb_after_loop): New.
8124         (generate_loops_for_partition): Use it.
8125         * gfortran.dg/ldist-1.f90: New.
8126
8127         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8128         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8129
8130 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8131
8132         * graphite.c (find_transform): Dump cloog program sent to cloog.
8133
8134 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8135
8136         * graphite.c (initialize_cloog_names): Initialize cloog
8137         iterator names.
8138
8139 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8140
8141         * graphite.c (build_scop_context): Fix typo, for the matrix
8142         format: insert '0 >= 0' instead of '-1 >= 0'.
8143
8144 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8145
8146         * Fix merge problems.
8147
8148 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8149
8150         * graphite.c (setup_cloog_loop): Fix typo.
8151
8152 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8153
8154         * doc/invoke.texi (-ftree-loop-distribution): Documented.
8155         * tree-loop-distribution.c: Reimplemented.
8156         * tree-pass.h (pass_loop_distribution): New.
8157         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8158         print_loops.
8159         * graphds.h (struct graph): New field indexes.
8160         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8161
8162         * tree-vect-analyze.c: Remove declaration of static functions when not
8163         needed.
8164         * tree-vectorizer.c: Same.
8165         (rename_variables_in_loop): Now extern.
8166         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8167         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
8168         calling redirect_edge_and_branch_force.
8169
8170         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8171
8172         * tree-data-ref.c: Don't include tree-chrec.h.
8173         (debug_data_dependence_relations): New.
8174         (dump_data_dependence_relation): Call dump_data_reference on data refs
8175         in the relation.
8176         (same_access_functions): Moved...
8177         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8178         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8179         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8180         struct rdg_vertex_info, ): New.
8181         (create_rdg_edge_for_ddr): Compute the dependence level before looking
8182         at DDR_REVERSED_P.
8183         (create_rdg_vertices): Initialize the htab of graph->indexes.
8184         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8185         (stmts_from_loop): Don't save LABEL_EXPR.
8186         (hash_stmt_vertex_info, eq_stmt_vertex_info,
8187         hash_stmt_vertex_del): New.
8188         (build_rdg): Initialize rdg->indexes.
8189         (free_rdg, stores_from_loop, ref_base_address,
8190         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8191         have_similar_memory_accesses_1, ref_base_address_1,
8192         remove_similar_memory_refs): New.
8193
8194         * tree-data-ref.h: Include tree-chrec.h.
8195         (debug_data_dependence_relations): Declared.
8196         (same_access_functions): ...here.  Now static inline.
8197         (ddr_is_anti_dependent, ddrs_have_anti_deps,
8198         ddr_dependence_level): New.
8199         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8200         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8201         RDG_MEM_READS_STMT): New.
8202         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8203         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8204         rdg_vertex_for_stmt): Declared.
8205         (struct rdg_edge): New field level.
8206         (RDGE_LEVEL, free_rdg): New.
8207         (stores_from_loop, remove_similar_memory_refs,
8208         rdg_defs_used_in_other_loops_p,
8209         have_similar_memory_accesses): Declared.
8210         (rdg_has_similar_memory_accesses): New.
8211
8212         * lambda.h (dependence_level): New.
8213         * common.opt (ftree-loop-distribution): New.
8214         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8215         (print_loop_ir): Renamed print_loops.
8216         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8217         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8218         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8219         (tree-loop-distribution.o): Added.
8220         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8221         (mark_virtual_ops_in_bb): New.
8222         (print_loops_bb, debug_loop_num, debug_loop): New.
8223         * passes.c: Scheduled pass_loop_distribution.
8224
8225 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8226
8227         * graphite.c (scan_tree_for_params): Correct the number of columns
8228         for polylib format.
8229         (nb_flat_iterator): New.
8230         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8231         (build_scop_iteration_domain): Correct the number of columns for
8232         polylib format.
8233
8234 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8235
8236         * Merge from mainline (129697:130800).
8237
8238 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
8239
8240         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8241         dominated by SCoP's exit.
8242         (graphite_transform_loops): Compute post dominators.
8243
8244 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8245
8246         * Merge from mainline (127169:129697).
8247
8248 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8249
8250         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
8251         parameter for the basic block that contains the expression.  Use
8252         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8253         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8254         the expression.
8255         * graphite.h (gbb_loop): New.
8256         (GBB_LOOP): Removed.
8257
8258 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8259
8260         * Makefile.in: Fix merge problem.
8261
8262 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8263
8264         * Merge from mainline (125309:127169).
8265         * tree-loop-distribution.c: Disabled.
8266
8267 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
8268
8269         * Merge from mainline (r123693:125309).
8270
8271 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
8272
8273         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8274         correct_modify_p
8275         (correct_modify_p, check_statements, number_of_lvalue_uses,
8276         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8277         instead of MODIFY_EXPR.
8278         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
8279         and push new edges.
8280
8281 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
8282
8283         * tree-loop-distribution.c (struct rdg): Replace arrays by
8284         VECs for edges and vertices.
8285         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8286         (RDGV_NB_PARTITIONS): New.
8287         (PRDG_NBV, PRDG_NBE): Removed.
8288         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8289         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8290         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8291
8292 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
8293             Sebastian Pop  <sebpop@gmail.com>
8294
8295         * doc/invoke.texi (-ftree-loop-distribution): Document.
8296         * tree-loop-distribution.c: New file.
8297         * tree-pass.h (pass_loop_distribution): Declared.
8298         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8299         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8300         and set reversed_p.
8301         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8302         (DDR_REVERSED_P): New.
8303         * common.opt (-ftree-loop-distribution): New.
8304         * tree-flow.h (distribute_loops): Declared.
8305         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8306         * passes.c (init_optimization_passes): Schedule loop distribution.
8307
8308 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
8309
8310         * graphite.c (print_graphite_bb): Don't call dump_data_references.
8311         (print_scop): Don't print when scop is NULL.
8312         (build_scop_context, find_transform): Don't output to stderr.
8313
8314 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
8315
8316         * tree-data-ref.c: Don't include graphite.h.
8317         Comment out the code for printing data reference's scop.
8318         (build_access_matrix_with_af): Moved...
8319         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8320         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
8321         (print_graphite_bb): Print basic block's schedule.
8322         (print_scop): Don't print the schedule, call cloog's pretty printer.
8323         (bb_in_scop_p): A basic block is in a scop only if it is both
8324         dominated and postdominated by the scop's entry and exit basic blocks.
8325         (function_parameter_p): New.
8326         (invariant_in_scop_p): Use function_parameter_p.
8327         (new_scop, save_scop): New.
8328         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8329         save_scop.
8330         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8331         (loop_in_scop_p): New.
8332         (scop_record_loop): Use loop_in_scop_p.
8333         (build_scop_domain): Renamed build_scop_iteration_domain.
8334         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8335         nb_params_in_scop, build_scop_context, first_loop_in_scop,
8336         setup_cloog_loop, dot_scop_1, dot_scop): New.
8337         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8338         (struct scop): Add a pointer to cloog's representation of a program.
8339
8340 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8341
8342         * doc/invoke.texi (-ftree-check-verbose): Renamed
8343         -ftree-checks-verbose.
8344         * common.opt (flag_tree_check_verbose): Renamed
8345         flag_tree_checks_verbose.
8346         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8347
8348 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8349
8350         * configure: Regenerated.
8351         * config.in: Regenerated.
8352         * tree-ssa-loop.c (graphite_transforms): Execute
8353         graphite_transform_loops only when HAVE_cloog.
8354         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8355         * graphite.c: Include polylibgmp.h and cloog.h.
8356         (graphite_transform_loops): Removed loops parameter.
8357         * tree-flow.h (graphite_transform_loops): Update declaration.
8358         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8359         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8360         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8361         (OBJS-common): Remove dependence on graphite.o.
8362         (BACKEND): Depend on @GRAPHITE@.
8363
8364 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
8365
8366         * doc/invoke.texi (-ftree-check-verbose): Documented.
8367         * gcc.dg/tree-checker/tree-checks-1.c: New.
8368         * gcc.dg/tree-checker/tree-checks-2.c: New.
8369         * gcc.dg/tree-checker/tree-checks-3.c: New.
8370         * gcc.dg/tree-checker/tree-checks-4.c: New.
8371         * gcc.dg/tree-checker/tree-checks.exp: New.
8372         * gcc.dg/tree-checker/condates.crp: New.
8373         * common.opt (ftree-checks-verbose): New.
8374         * tree-check.c (tree_check_warning): Move extra stderr output
8375         under control of flag_tree_check_verbose.
8376
8377 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
8378
8379         * tree-match.c: Fix comments formatting.
8380         * tree-match.h: Fix comments formatting.
8381         * tree-check.c: Fix comments formatting.
8382         (tree_check_init): Restructure.
8383
8384 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
8385
8386         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8387
8388 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
8389
8390         * Merge from mainline (r120733:123693).
8391
8392 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
8393
8394         * condate.y: New file.
8395         * tree-match.h (struct patt_info_s): New field sign.
8396         (struct condate_s): New field msg.
8397         (normalize_condate, name_condate, add_condate): New.
8398         (conds[], condate_parse): Made extern.
8399         * tree-check.c (tree_check_warning): First arg changed to cond;
8400         warning reformatted.
8401         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8402         (tree_scan): New.
8403         (tree_check): Process trivial condates.
8404         (read_delimited_string): Removed.
8405         (print_cond): Print name and msg.
8406         (conds[]): Made extern.
8407         (parse_tree_check_file_once): Rewritten to use the parser in
8408         condate.y.
8409         Processing of option --tree_check_string moved to tree_scan().
8410         * Makefile.in: Added condate.y
8411
8412 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
8413
8414         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8415         Use VECs instead of varrays.
8416         * diagnostic.h (lazy_dump_generic_node): Update declaration.
8417         * Makefile.in (pretty-print.o): Depend on vec.h.
8418         * pretty-print.c: Include tree.h and vec.h.
8419         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8420         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8421         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8422         pp_free_list): Use VECs instead of varrays.
8423         * pretty-print.h: Do not include varray.h.
8424         (struct tree_chunk_s): Declaration moved before its use.
8425         (output_buffer): Rename varray field to chunks.
8426         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8427         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8428         save_global_holes): Use VECs instead of varrays.
8429         * tree-match.h: Declare VECs of cfg_node, and hole_p.
8430         * tree-check.c (scan_cfg_stmts, push_node,
8431         print_matching_stmt): Removed.
8432         (tree_check_instance, push_global_holes_if_new, tree_check,
8433         execute_tree_check): Use VECs instead of varrays.
8434         (gate_tree_check): Don't execute the CFG check when basic_block_info
8435         is not available.
8436
8437 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8438
8439         * Merge from mainline (r115016:120733).
8440
8441 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8442
8443         * Merge from mainline (r117632:117661).
8444
8445 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8446
8447         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8448         * tree-pass.h (TDF_DEBUG, debug_p): New.
8449         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8450         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8451         get_loop_exit_condition, analyze_evolution_in_loop,
8452         analyze_initial_condition, analyze_scalar_evolution,
8453         instantiate_parameters, number_of_latch_executions): Use debug_p.
8454         * tree-chrec.c (chrec_apply): Use debug_p.
8455         * tree-data-ref.c: Include graphite.h.
8456         (dump_data_reference): Print also the access matrix.
8457         (analyze_array, analyze_indirect_ref, init_data_ref,
8458         analyze_offset_expr, address_analysis, object_analysis,
8459         create_data_ref, finalize_ddr_dependent,
8460         non_affine_dependence_relation, analyze_ziv_subscript,
8461         analyze_siv_subscript_cst_affine,
8462         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8463         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8464         analyze_miv_subscript, analyze_overlapping_iterations,
8465         build_classic_dist_vector, subscript_dependence_tester,
8466         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8467         (build_access_matrix_with_af): No longer static.
8468         * tree-data-ref.h (scop_p): ... declaration here.
8469         (data_reference.scop): New field.
8470         (DR_SCOP, DR_ACCESS_MATRIX): New.
8471         (build_access_matrix_with_af, dr_num_subscripts): Declared.
8472         * graphite.c (print_graphite_bb): Call dump_data_references.
8473         (print_scop): Use scop_nb_loops and scop_dim_domain.
8474         (test_for_scop_bound): Use debug_p.
8475         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8476         scop_nb_params.
8477         (scop_loop_index): Moved...
8478         (scop_record_loop): New.
8479         (build_scop_loop_nests): Use scop_record_loop.
8480         (build_scop_domain): Use scop_dim_domain.
8481         (build_access_matrix): Implemented.
8482         (build_scop_canonical_schedules): Use scop_nb_loops.
8483         (build_graphite_bb): Initialize GBB_SCOP.
8484         * graphite.h (scop_p): Moved...
8485         (graphite_bb.scop): New field.
8486         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8487         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8488         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8489         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8490         scop_loop_index): New.
8491         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8492
8493 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
8494
8495         * Merge from mainline (r117661:120450).
8496
8497 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
8498
8499         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8500         at the first declaration outside the varying loop, instantiate as
8501         far as possible.
8502         * tree-chrec.c (for_each_scev_op): New.
8503         * tree-chrec.h (for_each_scev_op): Declared.
8504         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8505         * tree-data-ref.c (get_references_in_stmt,
8506         find_data_references_in_stmt): New, from trunk.
8507         (find_data_references_in_loop): Use get_references_in_stmt
8508         and find_data_references_in_loop, modified as in trunk.
8509         (build_access_matrix_with_af): New.
8510         * tree-data-ref.h (data_reference): Add a field access_matrix.
8511         (data_ref_loc): New, as in trunk.
8512         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8513         invariant_in_scop_p, param_index, scan_tree_for_params,
8514         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8515         idx_record_param, idx_record_params, build_access_matrix,
8516         build_scop_data_accesses, build_scop_canonical_schedules,
8517         build_graphite_bb, build_scop_bbs, find_params_in_bb,
8518         build_scop_params): New.
8519         * graphite.h (graphite_bb): New.
8520         (scop): Add fields static_schedule, params, loop_nest,
8521         iteration_domain.
8522         * lambda.h: Declare vecs of lambda_matrix.
8523         * tree-flow.h (print_loop_ir_bb): Declared.
8524         * tree-cfg.c (print_loop_ir_bb): New.
8525         (print_loop): Use print_loop_ir_bb.
8526
8527 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
8528
8529         * Merge from mainline (r115016:117632).
8530
8531 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
8532
8533         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8534         break due to a warning.
8535
8536 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
8537
8538         * graphite.c (print_scops, debug_scops): New.
8539         (graphite_transform): Renamed graphite_find_transform.
8540         * graphite.h (debug_scops): Declared.
8541
8542 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
8543
8544         * tree-match.c: Reformat following the GNU style.
8545         * tree-match.h: Reformat following the GNU style.
8546         * tree-pattern.h: Removed empty file.
8547         * Makefile.in: Remove references to tree-pattern.h.
8548         * tree-check.c: Reformat following the GNU style.
8549         (execute_tree_check): Move gate condition code to...
8550         (gate_tree_check): ...here.  New function.
8551         (pass_check): Use the gate function.
8552
8553 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
8554
8555         * tree-pattern.h: New. Tree pattern matching and checking using
8556         concrete syntax.
8557         * tree-check.c: New. Tree/CFG checking pass.
8558         * tree-match.c: New. Library for tree pattern matching.
8559         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8560         * toplev.c, flags.h: Add globals for tree-check pass.
8561         * Makefile.in: Integrate the files in tree-check pass.
8562         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8563         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8564         Introduce a "lazy" pretty-print mode.
8565         * tree.c, tree.h: Add tree_name.
8566
8567 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
8568
8569         * doc/invoke.texi (-fgraphite): Correct typo.
8570         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8571         use of print_loop_ir.
8572         * gcc.dg/graphite/scop-1.c: New.
8573         * gcc.dg/graphite/scop-2.c: New.
8574         * gcc.dg/graphite/graphite.exp: New.
8575         * graphite.c: Include domwalk.h.
8576         (print_scop): Print only the entry and exit blocks.
8577         (debug_scop): No longer static.
8578         (affine_expr): Fix formating.  Return also true when the expression is
8579         constant.
8580         (stmt_simple_for_scop_p): Fix formating.
8581         (build_scops): Use domwalk.
8582         (get_loop_start, end_scop, test_for_scop_bound): New.
8583         (graphite_transform_loops): Avoid printing on stderr.
8584         * graphite.h (debug_scop): Declared.
8585         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8586         * Makefile.in (graphite.o): Depend on domwalk.h.
8587         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8588         declarations for static functions.
8589         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8590         controlling output verbosity.
8591
8592 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
8593             Plesco Alexandru  <shurikx@gmail.com>
8594
8595         * doc/invoke.texi (-fgraphite): Document.
8596         * tree-pass.h (pass_graphite_transforms): Declared.
8597         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8598         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8599         (pass_graphite_transforms): Defined.
8600         * tree-data-ref.c (free_data_ref, data_reference): Extern.
8601         * tree-data-ref.h (free_data_ref, data_reference): Declared.
8602         * graphite.c, graphite.h: New.
8603         * common.opt (fgraphite): Declared.
8604         * tree-flow.h (graphite_transform_loops): Declared.
8605         * Makefile.in (OBJS-common): Add graphite.o.
8606         (graphite.o): New rule.
8607         * passes.c (pass_graphite_transforms): Scheduled.
8608