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