OSDN Git Service

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