OSDN Git Service

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