OSDN Git Service

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