OSDN Git Service

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