OSDN Git Service

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