OSDN Git Service

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