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