OSDN Git Service

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