OSDN Git Service

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