OSDN Git Service

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