OSDN Git Service

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