OSDN Git Service

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