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