OSDN Git Service

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