1 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
3 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
4 conditionally (CLOOG_ORG).
5 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
6 (cloog_statement_usr): New.
8 (cloog_set_domain): Same.
9 (cloog_next_domain): Same.
10 (cloog_set_next_domain): Same.
11 (cloog_program_nb_scattdims): Same.
12 (cloog_program_set_nb_scattdims): Same.
13 (cloog_program_names): Same.
14 (cloog_program_set_names): Same.
15 (cloog_program_set_context): Same.
16 (cloog_program_set_loop): Same.
17 (cloog_program_blocklist): Same.
18 (cloog_program_set_blocklist): Same.
19 (cloog_program_scaldims): Same.
20 (cloog_program_set_scaldims): Same.
21 (cloog_names_nb_parameters): Same.
22 (cloog_names_set_nb_parameters): Same.
23 (cloog_names_parameters): Same.
24 (cloog_names_set_parameters): Same.
25 (cloog_names_set_nb_iterators): Same.
26 (cloog_names_set_iterators): Same.
27 (cloog_names_set_nb_scattering): Same.
28 (cloog_names_set_scattering): Same.
29 (cloog_statement_set_usr): Same.
30 (cloog_loop_set_next): Same.
31 (cloog_loop_set_domain): Same.
32 (cloog_loop_set_block): Same.
33 (cloog_block_list_next): Same.
34 (cloog_block_list_set_next):
35 (cloog_block_list_set_block): Same.
37 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
39 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
41 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
42 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
43 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
44 when something has been changed.
45 (rewrite_commutative_reductions_out_of_ssa): Same.
47 * gcc.dg/graphite/id-26.c: New.
49 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
51 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
52 handle the case when def is in the sese region.
53 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
54 for invariant expressions.
55 (rewrite_cross_bb_phi_deps): Removed.
56 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
57 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
58 rewrite_cross_bb_phi_deps.
60 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
62 * graphite-sese-to-poly.c
63 (rewrite_commutative_reductions_out_of_ssa_loop): Call
64 scev_analyzable_p only on is_gimple_reg
66 * gcc.dg/graphite/id-25.c: New.
68 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
70 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
71 (rewrite_close_phi_out_of_ssa): Propagate constant values or
72 parametric expressions outside the scop region.
73 (rewrite_cross_bb_scalar_deps): Same.
74 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
76 * gcc.dg/graphite/run-id-5.c: New.
77 * gcc.dg/graphite/run-id-6.c: New.
78 * gfortran.dg/graphite/id-21.f: New.
80 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
82 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
83 SSA_NAME_DEF_STMT only on SSA_NAMEs.
85 * gcc.dg/graphite/id-24.c: New.
87 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
89 * tree-scalar-evolution.c (instantiate_scev_name): Do not
90 instantiate default definitions.
92 2010-07-20 Vladimir Kargov <kargov@gmail.com>
94 * graphite-scop-detection.c (is_valid_stmt_p): New.
97 2010-07-20 Vladimir Kargov <kargov@gmail.com>
98 Sebastian Pop <sebastian.pop@amd.com>
100 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
101 (loop_exits_from_bb_p): New.
102 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
103 (loop_exits_from_bb_p): Declared.
104 * graphite-scop-detection.c (scopdet_basic_block_info): Call
107 2010-07-20 Vladimir Kargov <kargov@gmail.com>
109 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
111 (dot_regions_1): New.
113 * refined-regions.h (dot_regions): Declared.
114 * Makefile.in (refined-regions.o): Update dependences.
116 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
118 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
119 extra parameter for the region. Call scev_analyzable_p.
120 (rewrite_reductions_out_of_ssa): Update call to
121 rewrite_close_phi_out_of_ssa.
122 (rewrite_cross_bb_phi_deps): Same.
123 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
124 parameter for the region. Call scev_analyzable_p.
125 (rewrite_commutative_reductions_out_of_ssa): Update call to
126 rewrite_commutative_reductions_out_of_ssa_loop.
128 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
130 * gcc.dg/tree-ssa/pr20742.c: New.
132 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
134 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
136 * gcc.dg/graphite/id-23.c: New.
138 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
140 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
141 SSA scalar phi nodes that can be scev_analyzable_p.
143 * gfortran.dg/graphite/id-20.f: Adjust testcase.
145 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
147 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
148 handle SSA_NAME_IS_DEFAULT_DEF.
150 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
152 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
154 * gcc.dg/graphite/pr42729.c: New.
156 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
158 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
159 case non close-phi nodes with one argument.
161 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
163 * sese.h (scev_analyzable_p): Scevs could be expressions without
164 chrecs and still be scev_analyzable_p.
166 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
168 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
170 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
172 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
173 * cfgloop.h (struct loop): Remove single_iv field.
174 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
175 (scop_canonicalize_loops): Removed.
176 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
177 over all the loop phi nodes in loop->header.
178 (build_poly_scop): Remove use of scop_canonicalize_loops.
180 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
182 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
185 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
187 * tree-chrec.c (chrec_apply): Should only apply to the specified
188 variable. Also handle multivariate chains of recurrences that
189 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
191 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
193 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
194 (debug_clast_name_indexes_1): Removed.
195 (debug_clast_name_indexes): Removed.
196 (pbb_to_depth_to_oldiv): Removed.
197 (build_iv_mapping): Replace the use of rename_map with iv_map.
198 (translate_clast_user): Remove uses of rename_map. Allocate and
200 (translate_clast_for_loop): Remove uses of rename_map.
201 (translate_clast_for): Same.
202 (translate_clast_guard): Same.
203 (translate_clast): Same.
205 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
206 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
207 * sese.c (set_rename): Now static.
208 (rename_variables_in_stmt): Removed.
210 (is_parameter): Removed.
212 (expand_scalar_variables_call): Removed.
213 (expand_scalar_variables_ssa_name): Removed.
214 (expand_scalar_variables_expr): Removed.
215 (expand_scalar_variables_stmt): Removed.
216 (expand_scalar_variables): Removed.
217 (rename_variables): Removed.
218 (remove_condition): Removed.
219 (get_true_edge_from_guard_bb): Removed.
220 (get_false_edge_from_guard_bb): Removed.
221 (struct igp): Removed.
222 (default_before_guard): Removed.
223 (convert_for_phi_arg): Removed.
224 (add_guard_exit_phis): Removed.
225 (insert_guard_phis): Removed.
226 (graphite_copy_stmts_from_block): Now also uses iv_map and a
227 region. Do not copy conditions. Do not copy induction variables.
229 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
230 the translated statement. Use the iv_map for the induction
232 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
233 (set_rename): Removed declaration.
234 (scev_analyzable_p): ...here.
235 * tree-chrec.c (chrec_apply_map): New.
236 * tree-chrec.h (chrec_apply_map): Declared.
238 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
240 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
241 insert_loop_close_phis.
242 * sese.c (name_defined_in_loop_p): Removed.
243 (expr_defined_in_loop_p): Removed.
244 (alive_after_loop): Removed.
245 (close_phi_not_yet_inserted_p): Removed.
246 (struct alep): Removed.
247 (add_loop_exit_phis): Removed.
248 (insert_loop_close_phis): Removed.
250 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
252 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
254 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
256 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
258 * gfortran.dg/graphite/id-20.f: New.
260 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
262 * graphite-cloog-util.h: Added cloog.h.
263 * graphite-blocking.c: Removed cloog.h.
264 * graphite-dependences.c: Same.
265 * graphite-interchange.c: Same.
266 * graphite-poly.c: Same.
267 * graphite-ppl.c: Same.
268 * graphite-scop-detection.c: Same.
269 * graphite-sese-to-poly.c:
271 Removed graphite-clast-to-gimple.h.
272 (check_poly_representation): Removed (unused).
273 * graphite-sese-to-poly.h
274 (check_poly_representation): Removed (unused).
276 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
279 (OBJS-common): Added graphite-cloog-util.o.
280 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
281 (graphite-cloog-util.o): New.
282 (graphite-ppl.o): Added graphite-cloog-util.h.
283 * graphite-clast-to-gimple.c:
284 Added graphite-cloog-util.h to include statements.
285 * graphite-cloog-util.c: New.
286 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
287 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
288 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
289 (new_C_Polyhedron_from_Cloog_Matrix): Same.
290 (ppl_Constrain_System_number_of_constraints): Same.
291 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
292 (oppose_constraint): Same.
293 (cloog_matrix_to_ppl_constraint): Same.
294 (new_Constraint_System_from_Cloog_Matrix): Same.
295 (insert_constraint_into_matrix): Same. Declared static.
296 * graphite-cloog-util.h: New.
297 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
298 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
299 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
300 (new_C_Polyhedron_from_Cloog_Matrix): Same.
301 (insert_constraint_into_matrix): Same.
303 Added graphite-cloog-util.h to include statements.
304 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
305 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
306 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
307 (new_C_Polyhedron_from_Cloog_Matrix): Same.
308 (insert_constraint_into_matrix): Same.
309 (ppl_Constrain_System_number_of_constraints): Same.
310 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
311 (oppose_constraint): Same.
312 (cloog_matrix_to_ppl_constraint): Same.
313 (new_Constraint_System_from_Cloog_Matrix): Same.
315 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
316 graphite-cloog-util.h.
317 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
318 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
319 (new_C_Polyhedron_from_Cloog_Matrix): Same.
320 (insert_constraint_into_matrix): Removed.
322 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
324 * graphite-clast-to-gimple.c
325 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
326 (precision_for_interval): Same.
327 (gcc_type_for_interval): Same.
328 (compute_type_for_level): Same.
329 * graphite-interchange.c
330 (lst_interchange_profitable_p): Same.
332 (psct_scattering_dim_for_loop_depth): Same.
334 (ppl_max_for_le_pointset): Same.
335 (ppl_min_for_le_pointset): Same.
337 2010-06-25 Vladimir Kargov <kargov@gmail.com>
339 * refined-regions.c (bb_index_compare): New.
340 (get_bbs_in_region): New.
341 (print_bbs_in_region): New.
342 (print_refined_region): Add an argument that allows to print
343 all basic blocks contained in regions.
344 (debug_refined_region): Update call to print_refined_region.
345 * refined-regions.h (print_refined_region): Update declaration.
346 (get_bbs_in_region): Declared.
347 * graphite-scop-detection.c (build_scops_new): Print the refined
348 region tree into the Grahite dump file.
350 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
352 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
353 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
355 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
357 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
358 rewrite_close_phi_out_of_ssa.
360 * gcc.dg/graphite/id-22.c: New.
362 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
364 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
366 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
368 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
370 * sese.c (debug_rename_map): Same.
373 (rename_variables_in_stmt): Same.
374 (expand_scalar_variables_call): Same.
375 (expand_scalar_variables_ssa_name): Same.
376 (expand_scalar_variables_expr): Same.
377 (expand_scalar_variables_stmt): Same.
378 (expand_scalar_variables): Same.
379 (rename_variables): Same.
380 (graphite_copy_stmts_from_block): Same.
381 (copy_bb_and_scalar_dependences): Same.
383 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
385 * graphite-clast-to-gimple.c (copy_renames): Removed.
386 (translate_clast_for): Do not call copy_renames.
387 (translate_clast_guard): Same.
389 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
391 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
392 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
393 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
394 before rewrite_cross_bb_scalar_deps.
396 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
398 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
399 Early return in when flag_associative_math is not set.
401 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
403 * gcc.dg/graphite/run-id-2.c: Call abort.
405 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
407 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
408 of SSA copies on edges except for loop->latch.
410 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
412 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
413 Split out of rewrite_reductions_out_of_ssa.
414 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
416 * graphite.c (graphite_transform_loops): Call it.
418 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
420 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
422 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
424 * passes.c (init_optimization_passes): Add pass_graphite.
425 Schedule a pass_copy_prop before pass_graphite_transforms.
426 * timevar.def (TV_GRAPHITE): Declared.
427 * tree-pass.h (pass_graphite): Declared.
428 * tree-ssa-loop.c (pass_graphite): New.
430 * gcc.dg/graphite/id-20.c: New.
432 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
434 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
435 Remove calls to rename_nb_iterations and rename_sese_parameters.
436 * graphite-clast-to-gimple.h (gloog): Update declaration.
437 * graphite.c (graphite_transform_loops): Update call to gloog.
438 * sese.c (rename_variables_in_expr): Removed.
439 (rename_nb_iterations): Removed.
440 (rename_sese_parameters): Removed.
441 * sese.h (rename_nb_iterations): Removed.
442 (rename_sese_parameters): Removed.
444 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
446 * graphite-clast-to-gimple.c (gloog): Remove call to
447 sese_adjust_liveout_phis.
448 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
449 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
450 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
451 rewrite_phi_out_of_ssa.
452 * sese.c (get_vdef_before_sese): Removed.
453 (sese_adjust_vphi): Removed.
454 (sese_adjust_liveout_phis): Removed.
455 * sese.h (sese_adjust_liveout_phis): Removed.
457 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
459 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
460 argument for the place after which to insert the out of SSA copy.
461 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
462 (rewrite_phi_out_of_ssa): Same.
463 (rewrite_cross_bb_scalar_deps): Same.
464 (insert_copyout): Removed.
465 (insert_copyin): Removed.
466 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
467 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
470 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
472 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
473 (rewrite_reductions_out_of_ssa): Same.
474 (rewrite_commutative_reductions_out_of_ssa): Same.
475 (build_poly_scop): Do not call these functions.
476 * graphite-sese-to-poly.h (build_poly_scop): Declared.
477 (rewrite_reductions_out_of_ssa): Declared.
478 (rewrite_commutative_reductions_out_of_ssa): Declared.
479 * graphite.c (graphite_transform_loops): Call on every scop
480 rewrite_commutative_reductions_out_of_ssa before calling
481 rewrite_reductions_out_of_ssa and build_scop_bbs.
483 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
485 * graphite-dependences.c (dot_deps): Make system call to dotty run
487 (dot_deps_stmt): Same.
488 * graphite-poly.c (dot_lst): Same.
490 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
492 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
493 old_type in parameter.
494 (gcc_type_for_value): Update call to gcc_type_for_interval.
495 (compute_type_for_level_1): Renamed compute_type_for_level.
496 Update call to gcc_type_for_interval.
498 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
500 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
501 the scev analysis when the variable is not used outside the loop
502 in a close phi node: call compute_overall_effect_of_inner_loop.
504 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
506 * graphite-sese-to-poly.c (single_pred_cond): Renamed
507 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
508 (build_sese_conditions_before): Renamed call to single_pred_cond.
509 (build_sese_conditions_after): Same.
511 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
513 * graphite-poly.h: Fix comments and indentation.
514 * graphite-sese-to-poly.c: Same.
515 (build_sese_conditions_before): Compute stmt and gbb only when needed.
516 * tree-chrec.c: Fix comments and indentation.
517 (tree-ssa-loop-niter.c): Same.
519 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
521 * refined-regions.c (create_region): Only initialize the region.
522 (find_regions_with_entry): Initialize parent relation and bbmap
524 (build_regions_tree): Set outermost_region to region instead of
526 (calculate_region_tree): Remove unneeded parameters.
528 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
530 * graphite-scop-detection.c (is_scop_p): New.
531 (build_scops_new): New. A skeleton for the new scop detection.
532 (build_scops_old): Renamed from build_scops.
533 (build_scops): New version. Call the new and the old scop
536 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
537 Antoniu Pop <antoniu.pop@gmail.com>
539 * Makefile.in (OBJS-common): Add refined-regions.o.
540 (refined-regions.o): New.
541 (graphite-scop-detection.o): Use refined-regions.h.
542 * graphite-scop-detection.c: Include refined-regions.h
543 (build_scops): Also build the refined region tree.
544 * refined-regions.c: New. Adds an algorithm to detect refined
546 (print_refined_region): New.
547 (debug_refined_region): New.
548 (refined_region_contains_bb_p): New.
549 (refined_region_contains_region_p): New.
551 (struct find_regions_global_data): New.
553 (typedef struct bb_bb_def): New.
554 (new_bb_bb_def): New.
555 (bb_bb_map_hash): New.
559 (new_bb_reg_def): New.
560 (bb_reg_map_hash): New.
561 (eq_bb_reg_map): New.
562 (find_new_region): New.
563 (insert_new_reg): New.
564 (insert_new_bb): New.
565 (insert_shortcut): New.
566 (get_next_postdom): New.
567 (create_region): New.
568 (find_regions_with_entry): New.
569 (find_regions_adc): New.
571 (get_topmost_parent): New.
572 (build_regions_tree): New.
573 (calculate_region_tree): New.
574 (free_region_tree): New.
575 * refined-regions.h: New.
576 (struct refined_region): New.
577 (calculate_region_tree): New.
578 (free_region_tree): New.
579 (refined_region_contains_bb_p): New.
580 (refined_region_contains_region_p): New.
581 (print_refined_region): New.
582 (debug_refined_region): New.
584 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
586 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
589 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
591 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
592 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
594 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
596 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
597 phi_arg_in_outermost_loop.
598 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
599 (remove_invariant_phi): Same.
601 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
603 * graphite-blocking.c
604 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
605 * graphite-clast-to-gimple.c
606 (clast_to_gcc_expression): Same.
607 (precision_for_value): Same.
608 (precision_for_interval): Same.
609 (gcc_type_for_interval): Same.
610 (graphite_create_new_guard): Same.
611 (compute_bounds_for_level): Same.
612 (graphite_create_new_loop_guard): Same.
613 * graphite-interchange.c
614 (build_linearized_memory_access): Same.
615 (pdr_stride_in_loop): Same.
616 (memory_strides_in_loop_1): Same.
617 (memory_strides_in_loop): Same.
618 (extend_scattering): Same.
619 (psct_scattering_dim_for_loop_depth): Same.
620 (pbb_number_of_iterations): Same.
622 (debug_iteration_domains): Same.
624 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
625 (ppl_set_inhomogeneous_gmp): Same.
626 (ppl_strip_loop): Same.
627 (ppl_lexico_compare_linear_expressions): Same.
628 (ppl_read_polyhedron_matrix): Same.
629 (ppl_max_for_le_pointset): Same.
631 (ppl_read_polyhedron_matrix): Same.
632 (tree_int_to_gmp): Same.
633 (gmp_cst_to_tree): Same.
634 (ppl_set_inhomogeneous): Same.
635 (ppl_set_inhomogeneous_tree): Same.
636 (ppl_set_coef): Same.
637 (ppl_set_coef_tree): Same.
638 * graphite-sese-to-poly.c
639 (build_pbb_scattering_polyhedrons): Same.
640 (build_scop_scattering): Same.
641 (scan_tree_for_params_right_scev): Same.
642 (scan_tree_for_params): Same.
643 (find_params_in_bb): Same.
644 (find_scop_parameters): Same.
645 (add_upper_bounds_from_estimated_nit): Same.
646 (build_loop_iteration_domains): Same.
647 (add_condition_to_domain): Same.
648 (pdr_add_memory_accesses): Same.
650 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
652 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
653 CLooG's value_* macros to their respective mpz_* counterparts.
654 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
655 (graphite_create_new_loop_guard): Same.
656 * graphite-interchange.c (build_linearized_memory_access): Same.
657 (pdr_stride_in_loop): Same.
658 (memory_strides_in_loop_1): Same.
659 (1st_interchange_profitable_p): Same.
660 * graphite-poly.c (extend_scattering): Same.
661 (psct_scattering_dim_for_loop_depth): Same.
662 (pbb_number_of_iterations): Same.
663 (pbb_number_of_iterations_at_time): Same.
664 * graphite-poly.h (new_1st_loop): Same.
665 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
666 (oppose_constraint): Same.
667 (insert_constraint_into_matrix): Same.
668 (ppl_set_inhomogeneous_gmp): Same.
669 (ppl_set_coef_gmp): Same.
670 (ppl_strip_loop): Same.
671 (ppl_lexico_compare_linear_expressions): Same.
672 (ppl_max_for_le_pointset): Same.
673 (ppl_min_for_le_pointset): Same.
674 (ppl_build_realtion): Same.
675 * graphite-ppl.h (gmp_cst_to_tree): Same.
676 (ppl_set_inhomogeneous): Same.
677 (ppl_set_inhomogeneous_tree): Same.
678 (ppl_set_coef): Same.
679 (ppl_set_coef_tree): Same.
680 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
681 (build_scop_scattering): Same.
682 (add_value_to_dim): Same.
683 (scan_tree_for_params_right_scev): Same.
684 (scan_tree_for_params_int): Same.
685 (scan_tree_for_params): Same.
686 (find_params_in_bb): Same.
687 (find_scop_parameters): Same.
688 (add_upper_bounds_from_estimated_nit): Same.
689 (build_loop_iteration_domains): Same.
690 (create_linear_expr_from_tree): Same.
691 (add_condition_to_domain): Same.
692 (pdr_add_memory_accesses): Same.
694 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
697 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
698 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
699 When converting an unsigned type to signed, double its precision.
700 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
701 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
702 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
704 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
707 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
708 build_nonstandard_integer_type.
709 (gcc_type_for_interval): Same.
711 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
714 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
715 POINTER_PLUS_EXPR for pointer types.
717 * gcc.dg/graphite/id-19.c: New.
719 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
722 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
723 * graphite-clast-to-gimple.c: Include langhooks.h.
724 (max_signed_precision_type): New.
725 (max_precision_type): Takes two types as arguments.
726 (precision_for_value): New.
727 (precision_for_interval): New.
728 (gcc_type_for_interval): New.
729 (gcc_type_for_value): New.
730 (gcc_type_for_clast_term): New.
731 (gcc_type_for_clast_red): New.
732 (gcc_type_for_clast_bin): New.
733 (gcc_type_for_clast_expr): Split up into several functions.
734 (gcc_type_for_clast_eq): Rewritten.
735 (compute_bounds_for_level): New.
736 (compute_type_for_level_1): New.
737 (compute_type_for_level): New.
738 (gcc_type_for_cloog_iv): Removed.
739 (gcc_type_for_iv_of_clast_loop): Rewritten.
740 (graphite_create_new_loop): Compute the lower and upper bound types
741 with gcc_type_for_clast_expr.
742 (graphite_create_new_loop_guard): Same.
743 (find_cloog_iv_in_expr): Removed.
744 (compute_cloog_iv_types_1): Removed.
745 (compute_cloog_iv_types): Removed.
746 (gloog): Do not call compute_cloog_iv_types.
747 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
749 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
750 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
751 (GBB_CLOOG_IV_TYPES): Removed.
753 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
755 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
757 Reverted this commit: as at this point the loop closed SSA form
758 is under a canonical form respecting the single argument condition.
759 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
760 close phi nodes may have more than one argument.
762 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
764 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
765 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
766 (detect_commutative_reduction): Same.
768 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
770 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
771 close phi nodes may have more than one argument.
773 2010-03-30 Richard Guenther <rguenther@suse.de>
774 Zdenek Dvorak <ook@ucw.cz>
775 Sebastian Pop <sebastian.pop@amd.com>
778 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
779 with multiple arguments.
780 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
782 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
784 * graphite-dependences.c (print_pddr): Call print_pdr with an
786 * graphite-poly.c (debug_pdr): Add an extra argument for the
789 (print_pbb_domain): Same.
791 (print_scop_context): Same.
794 (debug_pbb_domain): Same.
798 (debug_scop_context): Same.
801 (print_scop_params): Same.
802 (debug_scop_params): Same.
803 (print_iteration_domain): Same.
804 (print_iteration_domains): Same.
805 (debug_iteration_domain): Same.
806 (debug_iteration_domains): Same.
807 (print_scattering_function): Same.
808 (print_scattering_functions): Same.
809 (debug_scattering_function): Same.
810 (debug_scattering_functions): Same.
811 * graphite-poly.h (debug_pdr): Update declaration.
813 (print_pbb_domain): Same.
815 (print_scop_context): Same.
818 (debug_pbb_domain): Same.
822 (debug_scop_context): Same.
825 (print_scop_params): Same.
826 (debug_scop_params): Same.
827 (print_iteration_domain): Same.
828 (print_iteration_domains): Same.
829 (debug_iteration_domain): Same.
830 (debug_iteration_domains): Same.
831 (print_scattering_function): Same.
832 (print_scattering_functions): Same.
833 (debug_scattering_function): Same.
834 (debug_scattering_functions): Same.
836 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
838 * graphite-poly.c (print_scattering_function_1): New.
839 (print_scattering_function): Call it.
840 (print_scop_params): Remove spaces at the end of lines.
843 * graphite-poly.h (print_cloog): Declared.
844 (debug_cloog): Declared.
846 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
848 * tree-ssa-copy.c: Revert this previous change:
849 (init_copy_prop): Loop closed phi nodes cancontain more than one
851 (execute_copy_prop): Revert the previous change: do not call
852 rewrite_into_loop_closed_ssa.
854 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
855 Richard Guenther <rguenther@suse.de>
858 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
859 contain more than one argument.
860 (execute_copy_prop): Revert the previous change: do not call
861 rewrite_into_loop_closed_ssa.
863 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
864 * gcc.dg/graphite/id-pr43464-1.c: New.
866 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
869 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
870 and verify_loop_closed_ssa when copy prop is executed in the LNO.
872 * gcc.dg/graphite/id-pr43464.c: New.
874 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
876 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
878 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
879 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
880 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
881 to switch between adding the IV bump in loop->latch or in loop->header.
883 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
885 * passes.c (init_optimization_passes): Add pass_copy_prop
888 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
890 * graphite-poly.c (print_scattering_function): Pretty print following
893 (print_pbb_domain): Same.
894 (dump_gbb_cases): Same.
895 (dump_gbb_conditions): Same.
898 (print_scop_params): Same.
899 (print_scop_context): Same.
901 (print_pbb_body): New.
902 (lst_indent_to): New.
903 (print_lst): Start new lines with a #.
904 * graphite-poly.h (pbb_bb): New.
905 (pbb_index): Use pbb_bb.
906 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
908 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
910 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
913 * gcc.dg/graphite/id-pr43351.c
915 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
918 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
919 call insert_out_of_ssa_copy for default definitions.
920 * gfortran.dg/graphite/id-pr43354.f: New.
922 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
925 * gfortran.dg/graphite/pr43349.f: New.
927 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
929 * graphite-clast-to-gimple.c (my_long_long): Defined.
930 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
931 * graphite-sese-to-poly.c (my_long_long): Defined.
932 (scop_ivs_can_be_represented): Use it.
934 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
936 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
937 graphite-max-bbs-per-function, and loop-block-tile-size.
938 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
940 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
942 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
944 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
946 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
947 (add_upper_bounds_from_estimated_nit): New.
948 (build_loop_iteration_domains): Use it.
950 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
952 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
954 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
957 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
958 should be an INTEGER_CST. Also handle CASE_CONVERT.
959 * gcc.dg/graphite/pr43306.c: New.
961 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
963 * graphite.c (graphite_initialize): To bound the number of bbs per
964 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
965 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
966 * doc/invoke.texi: Document it.
968 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
970 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
971 * graphite-sese-to-poly.h (build_poly_scop): Same.
973 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
975 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
976 the number of parameters in the scop. Use as an upper bound
977 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
978 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
979 * doc/invoke.texi: Document it.
981 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
983 * graphite-sese-to-poly.c (add_param_constraints): Use
984 lower_bound_in_type and upper_bound_in_type.
986 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
988 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
989 instead of unsigned_type_node.
991 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
992 Reza Yazdani <reza.yazdani@amd.com>
995 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
996 on pointer type parameters.
998 * gcc.dg/graphite/run-id-4.c: New.
1000 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1003 * gcc.dg/graphite/run-id-3.c: New.
1005 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1006 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1008 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1009 handle conversions from pointer to integers.
1010 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1011 induction variable, to be able to work with code generated by CLooG.
1012 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1013 (build_poly_scop): Bail out if we cannot codegen a loop.
1015 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1017 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1018 code generation with gloog_error.
1020 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1022 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1023 Call fold_convert on all the returned values.
1024 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1025 the type of the resulting expression.
1027 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1029 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1030 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1031 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1033 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1035 * graphite-dependences.c (map_into_dep_poly): Removed.
1036 (dependence_polyhedron_1): Use combine_context_id_scat.
1038 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1040 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1041 (struct poly_bb): Same.
1042 (combine_context_id_scat): New.
1044 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1047 * sese.c (name_defined_in_loop_p): Return false for default
1050 * gcc.dg/graphite/pr42326.c: New.
1052 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1054 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1055 and clean up the logic.
1057 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1059 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1062 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1065 * graphite-scop-detection.c (create_single_exit_edge): Move
1066 the call to find_single_exit_edge to....
1067 (create_sese_edges): ...here. Don't handle multiple edges
1068 exiting the function.
1069 (build_graphite_scops): Don't handle multiple edges
1070 exiting the function.
1072 * gcc.dg/graphite/pr43083.c: New.
1074 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1077 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1078 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1080 * gfortran.dg/graphite/pr43097.f: New.
1082 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1083 Manuel López-Ibáñez <manu@gcc.gnu.org>
1086 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1088 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1091 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1093 * g++.dg/graphite/pr43026.C: New.
1095 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1097 * Merge from mainline (154736:156693).
1099 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1102 * gcc.dg/graphite/pr43012.c: New.
1104 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1106 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1107 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1109 * g++.dg/graphite/pr42930.C: New.
1111 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1114 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1115 graphite_can_represent_init for MULT_EXPR.
1117 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1121 * graphite-sese-to-poly.c (remove_phi): New.
1122 (translate_scalar_reduction_to_array): Call remove_phi.
1124 * gcc.dg/graphite/pr42530.c: New.
1125 * gcc.dg/graphite/pr42914.c: New.
1127 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1130 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1131 * graphite-clast-to-gimple.h (gloog): Update declaration.
1132 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1133 * graphite-poly.h (struct poly_bb): Add missing comments.
1134 (struct scop): Add poly_scop_p field.
1136 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1137 * graphite.c (graphite_transform_loops): Build the polyhedral
1138 representation for each scop before code generation.
1139 * sese.c (rename_variables_in_operand): Removed.
1140 (rename_variables_in_expr): Return the renamed expression.
1141 (rename_sese_parameters): New.
1142 * sese.h (rename_sese_parameters): Declared.
1144 * gcc.dg/graphite/pr42771.c: New.
1146 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1148 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1150 * gcc.dg/graphite/block-1.c: Same.
1151 * gcc.dg/graphite/block-3.c: Same.
1152 * gcc.dg/graphite/block-4.c: Same.
1153 * gcc.dg/graphite/block-5.c: Same.
1154 * gcc.dg/graphite/block-6.c: Same.
1155 * gcc.dg/graphite/block-7.c: Same.
1156 * gcc.dg/graphite/interchange-0.c: Same.
1157 * gcc.dg/graphite/interchange-1.c: Same.
1158 * gcc.dg/graphite/interchange-10.c: Same.
1159 * gcc.dg/graphite/interchange-11.c: Same.
1160 * gcc.dg/graphite/interchange-12.c: Same.
1161 * gcc.dg/graphite/interchange-2.c: Same.
1162 * gcc.dg/graphite/interchange-3.c: Same.
1163 * gcc.dg/graphite/interchange-4.c: Same.
1164 * gcc.dg/graphite/interchange-5.c: Same.
1165 * gcc.dg/graphite/interchange-6.c: Same.
1166 * gcc.dg/graphite/interchange-7.c: Same.
1167 * gcc.dg/graphite/interchange-8.c: Same.
1168 * gcc.dg/graphite/interchange-9.c: Same.
1169 * gcc.dg/graphite/interchange-mvt.c: Same.
1171 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1173 * gfortran.dg/graphite/id-19.f: New.
1174 * gfortran.dg/graphite/pr14741.f90: New.
1175 * gfortran.dg/graphite/pr41924.f90: New.
1176 * gfortran.dg/graphite/run-id-2.f90: New.
1178 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1181 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1182 to unknown_dependence.
1183 (graphite_legal_transform_dr): Handle the unknown_dependence.
1184 (graphite_carried_dependence_level_k): Same.
1186 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1188 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1190 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1191 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1194 * graphite-dependences.c (build_lexicographical_constraint): Return
1195 a union of dependence polyhedra.
1196 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1198 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1199 * gcc.dg/graphite/block-4.c: Same.
1200 * gcc.dg/graphite/block-7.c: Same.
1201 * gcc.dg/graphite/interchange-12.c: Same.
1202 * gcc.dg/graphite/interchange-mvt.c: Same.
1203 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1204 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1205 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1207 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1209 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1210 the execution check to FAIL. This testcase is miscompiled by Graphite
1211 and the check should be re-enabled.
1212 * gcc.dg/graphite/interchange-mvt.c: Same.
1213 * gcc.dg/graphite/block-0.c: Same.
1214 * gcc.dg/graphite/block-4.c: Same.
1215 * gcc.dg/graphite/block-7.c: Same.
1217 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1219 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1220 * gcc.dg/graphite/scop-0.c: Fix spaces.
1221 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1222 * gfortran.dg/graphite/block-2.f: Same.
1223 * gfortran.dg/graphite/block-3.f90: Same.
1224 * gfortran.dg/graphite/block-4.f90: Same.
1225 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1226 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1228 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1230 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1231 PDDR_ORIGINAL_SCATTERING_P.
1232 (pddr_is_empty): Rewritten.
1233 (print_dependence_polyhedron_layout): New.
1236 (build_alias_set_powerset): Moved up.
1237 (poly_drs_may_alias_p): Moved up.
1238 (lexicographically_gt_p): Removed.
1239 (build_lexicographically_gt_constraint): Renamed
1240 build_lexicographical_constraint, reimplemented.
1241 (dependence_polyhedron_1): Simplified parameters.
1242 (dependence_polyhedron): Same. Keep along empty PDDRs
1243 to make efficient use of the cache.
1244 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1245 (graphite_legal_transform_dr): Rewritten.
1246 (graphite_legal_transform_bb): Pass fewer arguments to
1247 graphite_legal_transform_dr.
1248 (graphite_carried_dependence_level_k): Simplified implementation.
1249 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1250 (dot_transformed_deps_stmt_1): Same.
1251 (dot_original_deps): Same.
1252 (dot_transformed_deps): Same.
1253 * graphite-dependences.h (struct poly_ddr): Added a new field
1254 original_scattering_p.
1255 (PDDR_ORIGINAL_SCATTERING_P): New.
1256 (print_pddr): Declared.
1257 (debug_pddr): Declared.
1258 * graphite-ppl.c: Clarify comment.
1259 * sese.h (print_gimple_bb): Removed unused declaration.
1262 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1264 * g++.dg/graphite/graphite.exp: Rewritten.
1265 * gcc.dg/graphite/graphite.exp: Rewritten.
1266 * gfortran.dg/graphite/graphite.exp: Rewritten.
1267 * gcc.dg/graphite/block-0.c: Added runtime test.
1268 * gcc.dg/graphite/block-1.c: Same.
1269 * gcc.dg/graphite/block-3.c: Same.
1270 * gcc.dg/graphite/block-4.c: Same.
1271 * gcc.dg/graphite/block-5.c: Same.
1272 * gcc.dg/graphite/block-6.c: Same.
1273 * gcc.dg/graphite/block-7.c: Same.
1274 * gcc.dg/graphite/interchange-0.c: Same.
1275 * gcc.dg/graphite/interchange-1.c: Same.
1276 * gcc.dg/graphite/interchange-10.c: Same.
1277 * gcc.dg/graphite/interchange-11.c: Same.
1278 * gcc.dg/graphite/interchange-12.c: Same.
1279 * gcc.dg/graphite/interchange-2.c: Same.
1280 * gcc.dg/graphite/interchange-3.c: Same.
1281 * gcc.dg/graphite/interchange-4.c: Same.
1282 * gcc.dg/graphite/interchange-5.c: Same.
1283 * gcc.dg/graphite/interchange-6.c: Same.
1284 * gcc.dg/graphite/interchange-7.c: Same.
1285 * gcc.dg/graphite/interchange-8.c: Same.
1286 * gcc.dg/graphite/interchange-9.c: Same.
1287 * gcc.dg/graphite/interchange-mvt.c: Same.
1288 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1290 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1292 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1295 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1297 * common.opt: Add -fgraphite-cloog-opts.
1298 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1299 * opts.c (decode_options): Same.
1301 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1303 * gcc.dg/graphite/id-17.c: New.
1304 * gcc.dg/graphite/pr41888.c: New.
1305 * gcc.dg/graphite/scop-22.c: New.
1306 * gfortran.dg/graphite/pr40982.f90: New.
1308 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1310 * graphite-dependences.c: Clarify comments.
1311 (build_pddr): Add an extra parameter direction.
1312 (graphite_legal_transform_dr): Use build_pddr.
1313 (dot_original_deps_stmt_1): Update use of build_pddr.
1314 (dot_transformed_deps_stmt_1): Same.
1315 (dot_original_deps): Same.
1316 (dot_transformed_deps): Same.
1318 * gcc.dg/graphite/interchange-12.c: New.
1319 * gcc.dg/graphite/block-7.c: New.
1321 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1323 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1324 (pddr_transformed_scattering): Removed.
1325 (graphite_legal_transform_dr): Use build_pddr.
1326 (dot_original_deps_stmt_1): Same.
1327 (dot_transformed_deps_stmt_1): Same.
1328 (dot_original_deps): Same.
1329 (dot_transformed_deps): Same.
1331 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1333 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1334 (build_lexicographically_gt_constraint): Same.
1335 (dependence_polyhedron_1): Same.
1336 (dependence_polyhedron): Same.
1338 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1340 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1341 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1342 (lexicographically_gt_p): Change type of direction to int.
1343 (build_lexicographically_gt_constraint): Same.
1344 (dependence_polyhedron_1): Same.
1345 (dependence_polyhedron): Same.
1346 (pddr_original_scattering): Use integers for direction.
1347 (pddr_transformed_scattering): Same.
1348 (graphite_legal_transform_dr): Same.
1349 (graphite_carried_dependence_level_k): Same.
1351 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1353 * graphite-dependences.c (build_pairwise_constraint): Renamed
1354 ppl_build_relation. Moved...
1355 (dr_equality_constraints): Use ppl_build_relation.
1356 (build_pairwise_scheduling_equality): Same.
1357 (build_pairwise_scheduling_inequality): Same.
1358 * graphite-ppl.c (ppl_build_relation): ...here.
1359 * graphite-ppl.h (ppl_build_relation): Declared.
1361 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1364 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1365 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1366 Set gloog_error when such an expression failed to be built.
1367 (translate_clast): Early return when gloog_error is set.
1368 (gloog): Clear gloog_error. When gloog_error is set, call
1369 set_ifsese_condition to enable the original code. Return the status
1370 of the code generation based on gloog_error.
1371 * sese.c (set_ifsese_condition): New.
1372 * sese.h (set_ifsese_condition): Declared.
1374 * g++.dg/graphite/pr42681.C: New.
1376 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1379 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1380 rename_nb_iterations.
1381 * sese.c (rename_variables_in_operand): New.
1382 (rename_variables_in_expr): New.
1383 (rename_nb_iterations): New.
1384 (sese_adjust_liveout_phis): Update the rename_map.
1385 * sese.h (rename_nb_iterations): Declared.
1386 * tree-scalar-evolution.c (scev_reset_htab): New.
1387 (scev_reset): Call scev_reset_htab.
1388 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1390 * gfortran.dg/graphite/pr42732.f: New.
1392 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1395 * graphite-clast-to-gimple.c: Fix formatting.
1396 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1397 (expr_defined_in_loop_p): New.
1398 (add_loop_exit_phis): Also handle full expressions: remove from
1399 the rename_map the expressions defined in the loop that we're closing.
1401 * gfortran.dg/graphite/pr42393-1.f90: New.
1402 * gfortran.dg/graphite/pr42393.f90: Add new flags
1403 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1404 make this testcase useful in the Graphite branch.
1406 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1408 * graphite-scop-detection.c (exclude_component_ref): Removed.
1409 (is_simple_operand): Removed.
1410 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1412 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1415 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1416 the array indexing of ADDR_EXPRs.
1418 * gcc.dg/graphite/pr42221.c: New.
1420 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1423 * graphite.c (graphite_finalize): Call scev_reset.
1424 (graphite_transform_loops): Do not call scev_reset between the code
1425 generation of scops.
1427 * gcc.dg/graphite/pr42521.c: New.
1429 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1431 * graphite-interchange.c (memory_stride_in_loop): Renamed
1433 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1434 (memory_strides_in_loop): Memoize the memory strides per loop.
1435 (lst_interchange_profitable_p): Do not initialize to zero the memory
1437 * graphite-poly.h (struct lst): Add a field memory_strides.
1438 (LST_LOOP_MEMORY_STRIDES): New.
1439 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1440 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1442 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1444 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1445 memory_strides_in_loop. Gather memory strides on a whole loop.
1446 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1447 (lst_interchange_profitable_p): Removed.
1448 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1450 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1452 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1453 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1454 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1455 Remove context_loop and level.
1457 2010-01-07 Richard Guenther <rguenther@suse.de>
1459 PR tree-optimization/42641
1460 * sese.c (rename_map_elt_info): Use the SSA name version, do
1463 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1465 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1466 blocked" only when both the strip mine and the interchange have
1469 * gcc.dg/graphite/block-2.c: Removed.
1470 * gcc.dg/graphite/block-3.c: Add scan pattern.
1471 * gcc.dg/graphite/block-4.c: Same.
1472 * gcc.dg/graphite/block-5.c: Same.
1473 * gcc.dg/graphite/block-6.c: Same.
1475 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1477 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1478 before allocating a new one.
1479 (copy_renames): Check that slot is not NULL.
1480 (mark_bb_with_pbb): Same.
1481 (compute_cloog_iv_types_1): Same.
1482 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1483 nest, and after LSTs.
1484 (lst_try_interchange_loops): Same.
1486 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1489 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1490 the before, nest, and after LSTs.
1491 (lst_try_interchange): Removed.
1492 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1494 (lst_interchange_select_outer): Apply interchange on the outer loop
1495 until there are no more changes in the inner loops.
1497 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1499 Revert patch fixing PR middle-end/42221.
1501 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1504 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1507 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1509 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1512 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1513 that contain only one statement.
1515 * gfortran.dg/graphite/pr42180.f90: New.
1517 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1520 * gfortran.dg/graphite/pr42393.f90: New.
1522 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1525 * gfortran.dg/graphite/pr42186.f90: New.
1527 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1530 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1531 Insert the reduction copy in the same block as the phi node.
1532 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1534 * gcc.dg/graphite/pr42205-1.c: New.
1535 * gcc.dg/graphite/pr42205-2.c: New.
1537 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1540 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1541 the array indexing of ADDR_EXPRs.
1543 * gcc.dg/graphite/pr42221.c: New.
1545 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1549 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1550 index. Call lst_interchange_select_inner only once.
1551 (lst_interchange_select_inner): Update use of lst_try_interchange.
1552 (lst_interchange_select_outer): Update.
1554 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1558 * graphite-interchange.c (lst_try_interchange): Do not increment the
1559 the OUTER index when there is no AFTER kernel. Do not increment the
1560 OUTER index for after processing the AFTER kernel.
1561 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1562 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1563 index. Do not pass to lst_interchange_select_inner the OUTER index.
1564 (scop_do_interchange): Update use of lst_interchange_select_outer.
1566 * gfortran.dg/graphite/graphite.exp
1567 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1568 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1569 the graphite dump file.
1570 * gfortran.dg/graphite/interchange-2.f: Same.
1571 * gfortran.dg/graphite/pr42334-1.f: New.
1573 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1577 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1579 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1580 (lst_try_interchange): Reimplemented.
1581 (lst_interchange_select_inner): Same.
1582 (lst_do_interchange): Renamed lst_interchange_select_outer.
1584 (scop_do_interchange): Update use of lst_interchange_select_outer.
1586 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1587 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1588 * gcc.dg/graphite/pr42211.c: New.
1589 * gfortran.dg/graphite/pr42334.f90: New.
1591 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1594 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1595 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1597 * gfortran.dg/graphite/pr42181.f90: New.
1599 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1602 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1603 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1604 (detect_commutative_reduction_arg): Simplified.
1605 (detect_commutative_reduction): Early return when the argument of
1606 the close phi is not of an SSA_NAME.
1608 * gcc.dg/graphite/pr42284.c: New.
1610 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1612 * dbgcnt.def (graphite_scop): New counter.
1613 * graphite.c: Include dbgcnt.h
1614 (graphite_transform_loops): Use new counter to limit transformations.
1616 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1619 * graphite-scop-detection.c (graphite_can_represent_init): Also
1620 handle more complex MULT_EXPRs containing parameters by recursion
1623 * gfortran.dg/graphite/pr42285.f90: New.
1625 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1627 * g++.dg/graphite/pr42130.C: Fix type.
1629 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1631 * g++.dg/graphite/pr42130.C: Correct testcase.
1633 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1635 * Merge from mainline (154493:154734).
1637 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1639 * Merge from mainline (151362:154491).
1641 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1643 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1644 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1646 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1649 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1650 translate_clast_for_loop): New.
1651 (translate_clast_for): Add a condition around the loop, to do not
1652 execute loops with zero iterations.
1653 * g++.dg/graphite/pr42130.C: New.
1654 * gcc.dg/graphite/pr35356-2.c: Adapt.
1656 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1658 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1659 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1660 Remove context_loop and level.
1662 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1664 * graphite-clast-to-gimple.c (translate_clast_user,
1665 translate_clast_for, translate_clast_guard): Simplify and move common
1666 elements to translate_clast().
1667 (translate_clast): Simplify and get common elements.
1669 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1671 * graphite-clast-to-gimple.c (translate_clast_user,
1672 translate_clast_for, translate_clast_guard): Split out of
1675 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1677 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1678 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1679 debug_clast_name_indexes_1, debug_clast_name_indexes,
1680 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1681 (clast_name_to_gcc, clast_to_gcc_expression,
1682 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1683 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1684 graphite_create_guard_cond_expr, graphite_create_new_loop,
1685 translate_clast): Add params_index.
1686 (initialize_cloog_names): Create parameter strings from scratch, do
1687 not reference other strings.
1688 (create_params_index): New.
1689 (gloog): Initialize params_index.
1690 * graphite-scop-detection (free_scops_1): Removed.
1691 (limit_scops): Use normal free_scops.
1692 * graphite-sese-to-poly.c (save_var_names): Removed.
1693 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1694 and SESE_PARAMS_INDEX.
1695 * sese.c (new_sese, free_sese): Dito.
1696 * sese.h (struct sese): Remove params_index, params_names.
1697 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1699 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1701 Revert the following patch from 2009-09-14:
1702 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1703 tree-scalar-evolution.h, and then tree-data-ref.h.
1704 * graphite-clast-to-gimple.c: Same.
1705 * graphite-dependences.c: Same.
1706 * graphite-interchange.c: Same.
1707 * graphite-poly.c: Same.
1708 * graphite-scop-detection.c: Same.
1709 * graphite-sese-to-poly.c: Same.
1711 * lambda-code.c: Same.
1712 * matrix-reorg.c: Same.
1713 * tree-data-ref.c: Same.
1714 * tree-if-conv.c: Same.
1715 * tree-loop-distribu: Same.: Same.
1716 * tree-loop-linear.c: Same.
1717 * tree-parloops.c: Same.
1718 * tree-predcom.c: Same.
1719 * tree-vect-patterns.c: Same.
1721 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1723 Revert patch from 2009-09-14.
1724 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1725 passes at -O1 and below.
1727 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1730 * gcc.dg/graphite/pr40281.c: New.
1732 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1733 evolutions should not variate in inner loops.
1735 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1738 * gfortran.dg/graphite/pr42050.f90: New.
1740 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1742 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1743 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1745 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1747 * graphite-blocking.c (scop_do_block): New.
1748 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1749 * graphite-poly.h (scop_do_block): Declared.
1751 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1753 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1754 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1755 to transform depth into the time_depth before calling
1756 pbb_number_of_iterations_at_time.
1757 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1760 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1762 Reverted the patch for "scattering permutations" from 2009-10-28.
1764 * graphite-poly.c (print_permutation): New.
1765 (debug_permutation): New.
1766 (new_poly_bb): Initialize PBB_PERMUTATION.
1767 (free_poly_bb): Free PBB_PERMUTATION.
1768 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1769 (struct pbb_permutation_elt): New.
1770 (PBB_PERMUTATION_ELT_STRIDE): New.
1771 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1772 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1773 (new_pbb_permutation_elt): New.
1774 (pbb_permutation_elt_free): New.
1775 (struct poly_bb): Add field permutation.
1776 (PBB_PERMUTATION): New.
1777 (print_permutation): Declared.
1778 (debug_permutation): Declared.
1780 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1782 * graphite-interchange.c (build_partial_difference): New.
1783 (memory_stride_in_loop): Refactored the computation of
1784 equality constraints into build_partial_difference function.
1785 Added support for debugging stride computations.
1787 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1789 * graphite-clast-to-gimple.c (gloog): Free if_region,
1790 if_region->true_region, and if_region->region.
1791 * sese.c (if_region_set_false_region): Free if_region->false_region.
1792 (create_if_region_on_edge): Do not use GGC_NEW.
1793 (move_sese_in_condition): Remove useless initialization.
1795 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1797 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1798 for the loops created by the loop distribution. Do not modify the
1800 (lst_try_interchange_loops): Same. Use a temporary LST for the
1801 transformed schedule. Call lst_update_scattering before data
1802 dependence analysis.
1803 (lst_try_interchange): Pass an extra parameter INDEX.
1804 (lst_do_interchange_1): New.
1805 (lst_do_interchange): Call lst_do_interchange_1.
1806 (scop_do_interchange): Call lst_update_scattering.
1807 * graphite-poly.c (apply_poly_transforms): Do not call
1808 lst_update_scattering.
1809 * graphite-poly.h (lst_pred): New.
1811 (lst_find_first_pbb): Return NULL when not found.
1813 (lst_insert_in_sequence): Allow LST1 to be NULL.
1815 (lst_substitute_3): New.
1816 * gcc.dg/graphite/interchange-1.c: XFail.
1817 * gcc.dg/graphite/interchange-8.c: XFail.
1818 * gcc.dg/graphite/interchange-11.c: XFail.
1820 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1822 * graphite-interchange.c (lst_perfectly_nested_p): New.
1823 (lst_perfect_nestify): New.
1824 (lst_try_interchange_loops): Call store_lst_schedule,
1825 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1826 (scop_do_interchange): Avoid redundant legality test.
1827 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1828 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1829 * graphite-poly.h (psct_static_dim): New.
1830 (lst_dewey_number_at_depth): New.
1831 (lst_find_pbb): Restructured.
1832 (lst_find_first_pbb): Restructured.
1833 (lst_find_last_pbb): New.
1834 (lst_contains_p): New.
1835 (lst_contains_pbb): New.
1836 (lst_create_nest): New.
1837 (lst_remove_from_sequence): New.
1838 (pbb_update_scattering): New.
1839 (lst_update_scattering_under): New.
1840 (lst_update_scattering_seq): New.
1841 (lst_update_scattering): New.
1842 (lst_insert_in_sequence): New.
1843 (lst_distribute_lst): New.
1844 (lst_remove_all_before_including_pbb): New.
1845 (lst_remove_all_before_excluding_pbb): New.
1847 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1849 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1850 get_loop_exit_edges.
1852 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1854 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1856 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1858 * graphite-poly.c (print_permutation): New.
1859 (debug_permutation): New.
1860 (new_poly_bb): Initialize PBB_PERMUTATION.
1861 (free_poly_bb): Free PBB_PERMUTATION.
1862 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1863 (struct pbb_permutation_elt): New.
1864 (PBB_PERMUTATION_ELT_STRIDE): New.
1865 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1866 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1867 (new_pbb_permutation_elt): New.
1868 (pbb_permutation_elt_free): New.
1869 (struct poly_bb): Add field permutation.
1870 (PBB_PERMUTATION): New.
1871 (print_permutation): Declared.
1872 (debug_permutation): Declared.
1874 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1876 * graphite-clast-to-gimple.c (gloog): Do not call
1877 sese_reset_aux_in_loops.
1878 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
1879 extra argument for domains. Do not use loop->aux.
1880 (build_scop_iteration_domain): Initialize and free domains, pass it
1881 to build_loop_iteration_domains and extract the information from
1882 domains. Do not use loop->aux.
1883 * sese.c (sese_reset_aux_in_loops): Removed.
1884 * sese.h (sese_reset_aux_in_loops): Removed.
1886 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1888 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
1889 (dependency_in_loop_p): Same.
1890 (translate_clast): Do not use loop->aux. Initialize
1891 loop->can_be_parallel.
1892 (mark_loops_parallel): Removed.
1893 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
1894 * graphite.c (free_aux_in_new_loops): Removed.
1895 (graphite_finalize): Do not call free_aux_in_new_loops.
1896 (graphite_transform_loops): Do not call mark_loops_parallel.
1898 2009-10-26 Li Feng <nemokingdom@gmail.com>
1900 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
1901 (translate_clast): Pass an extra parameter LEVEL.
1902 Call get_scattering_level.
1903 * graphite-clast-to-gimple.h (get_scattering_level): New.
1905 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1907 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
1908 * cfgloop.h (struct loop): New field single_iv.
1910 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
1911 loop->aux anymore: use loop->single_iv.
1912 (graphite_loop_normal_form): Moved...
1913 (build_graphite_loop_normal_form): Removed.
1914 (gloog): Do not call build_graphite_loop_normal_form.
1915 (free_aux_in_new_loops): Moved...
1916 (mark_loops_parallel): Restructure.
1917 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
1918 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
1919 (scop_canonicalize_loops): New.
1920 (build_poly_scop): Call scop_canonicalize_loops.
1921 * graphite.c (free_aux_in_new_loops): ...here.
1923 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1925 * g++.dg/graphite/graphite.exp: Add the same rules as in
1926 gcc.dg/graphite/graphite.exp.
1928 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1930 * g++.dg/graphite/id-1.C: New.
1932 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1934 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
1936 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
1937 (rewrite_phi_out_of_ssa): Same.
1938 (rewrite_cross_bb_scalar_deps): Same.
1939 (translate_scalar_reduction_to_array): Same.
1941 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1943 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
1946 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1948 * graphite-sese-to-poly.c (dump_alias_graphs): New.
1949 (build_scop_drs): Call dump_alias_graphs.
1951 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1953 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
1954 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1955 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
1956 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1957 * graphite-poly.h (free_lst): New.
1958 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
1959 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
1961 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1963 * graphite-poly.h (struct scop): Add a field saved_schedule.
1964 (SCOP_SAVED_SCHEDULE): New.
1965 (store_lst_schedule): New.
1966 (restore_lst_schedule): New.
1967 (store_scattering): Call store_lst_schedule.
1968 (restore_scattering): Call restore_lst_schedule.
1970 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1972 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
1973 (pdr_add_alias_set): Same.
1974 (build_poly_dr): Same.
1975 (build_alias_set_optimal_p): Same.
1976 (build_base_obj_set_for_drs): Same. Do not store the result of
1979 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1981 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
1982 all_components_are_cliques to 1.
1984 2009-10-20 Li Feng <nemokingdom@gmail.com>
1986 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
1988 (pdr_add_alias_set): Update retrieving alias_set_num.
1989 (build_poly_dr): Update retrieving dr_base_object_set.
1990 (partition_drs_to_sets): Remove.
1991 (build_alias_set_optimal_p): New.
1992 (build_alias_set_for_drs): Rename.
1993 (build_scop_drs): Update.
1994 * graphite-sese-to-poly.h (struct base_alias_pair): New.
1995 (ALIAS_SET_INDEX): Remove.
1996 (BASE_OBJECT_SET_INDEX): Remove.
1998 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2000 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2002 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2004 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2005 loop upper bounds for 1-element arrays at end of structures.
2006 * tree-flow.h (array_at_struct_end_p): Declared.
2007 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2009 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2011 * g++.dg/graphite/pr41305.C: New.
2013 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2015 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2016 construction of parameter constraints from loop iteration analysis.
2017 * gcc.dg/graphite/run-id-2.c: New test.
2019 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2021 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2024 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2026 * graphite-dependences.c (dependence_polyhedron_1): Remove
2027 unused gdim dimensions from the DDR polyhedron.
2029 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2031 * graphite-dependences.c (pddr_transformed_scattering): New.
2032 (dot_original_deps_stmt_1): New.
2033 (dot_transformed_deps_stmt_1): New.
2034 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2035 dot_transformed_deps_stmt_1.
2036 (dot_original_deps): New.
2037 (dot_transformed_deps): New.
2038 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2040 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2042 * graphite-dependences.c (reduction_dr_1): Remove wrong
2043 assert: reduction BBs can have multiple reduction writes
2044 to memory. interchange-3.f90 is an example.
2046 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2048 * gfortran.dg/graphite/interchange-3.f90: New.
2050 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2052 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2054 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2056 * graphite-dependences.c (dependence_polyhedron_1): Add the
2057 context to the dependence polyhedron.
2059 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2061 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2062 PBB_PDR_DUPLICATES_REMOVED.
2063 (new_poly_bb): Same.
2065 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2067 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2069 (build_loop_iteration_domains): Extract bounds on parameters
2070 based on the data size.
2071 (build_scop_context): Do not initialize SCOP_CONTEXT;
2072 add new constraints.
2074 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2076 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2077 * graphite-ppl.h (graphite-ppl.h): Declared.
2079 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2081 * graphite-ppl.c (ppl_print_linear_expr): New.
2082 (debug_ppl_linear_expr): New.
2083 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2084 (debug_ppl_linear_expr): Declared.
2086 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2088 * graphite-interchange.c: Fix comments.
2089 * gcc.dg/graphite/block-1.c: Fix comments.
2091 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2093 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2094 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2096 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2098 Reapply the patch from Alexander Monakov that disappeared during
2099 the last merges from trunk.
2101 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2103 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2104 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2106 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2108 * graphite-interchange.c (memory_stride_in_loop): The depth
2109 argument corresponds to a dynamic time dimension, so use
2110 psct_dynamic_dim to refer to the transformed scattering dimension.
2112 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2114 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2116 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2118 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2120 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2121 the root of the LST.
2122 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2124 (print_lst): Print the root of LST in a different format.
2125 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2127 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2129 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2131 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2133 * doc/passes.texi: Document the Graphite infrastructure.
2135 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2137 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2138 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2139 and check the SSA representation.
2141 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2143 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2145 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2147 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2149 * gcc.dg/graphite/interchange-11.c: New.
2151 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2153 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2155 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2157 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2158 Add -fno-loop-strip-mine and -fno-loop-interchange.
2159 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2160 -fno-loop-strip-mine.
2161 * gfortran.dg/graphite/graphite.exp: Same.
2163 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2165 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2166 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2167 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2168 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2169 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2170 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2171 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2172 DEFAULT_FLAGS_GRAPHITE_SCOP.
2173 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2174 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2176 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2178 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2180 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2181 Sebastian Pop <sebastian.pop@amd.com>
2183 * graphite-interchange.c (build_linearized_memory_access): Pass an
2184 offset as parameter.
2185 (memory_stride_in_loop): Include transform scattering in the
2186 access functions to be able to querry the strides in the
2188 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2189 not the psct_iterator_dim.
2191 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2193 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2194 (lst_do_strip_mine_loop): New.
2195 (lst_do_strip_mine): New.
2196 (scop_do_strip_mine): Call lst_do_strip_mine.
2197 * graphite-poly.h (lst_add_loop_under_loop): New.
2198 (lst_find_first_pbb): New.
2200 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2202 * graphite-poly.c (loop_to_lst): Fix LST creation.
2204 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2206 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2207 sizeof(unsigned long) to make it run on 32bit systems.
2209 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2211 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2214 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2216 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2218 (write_alias_graph_to_ascii_dot): New.
2219 (write_alias_graph_to_ascii_ecc): Ditto.
2220 (partition_drs_to_sets): Add testing of optimality of current method
2221 which assigns alias numbers according to DFS Comopnent number. used
2222 as heuristic for the upcoming ECC algorithm.
2223 (build_scop_drs): Write to file also with the ecc and dot format.
2225 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2227 * gfortran.dg/graphite/interchange-1.f: XFail.
2229 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2231 * graphite.c (graphite_initialize): Do not handle functions with
2232 more than 100 basic blocks.
2234 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2236 * graphite-blocking.c (pbb_do_strip_mine): Use
2237 PARAM_LOOP_BLOCK_TILE_SIZE.
2239 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2241 * graphite-poly.c (dot_lst_1): New.
2243 * graphite-poly.h (dot_lst): Declared.
2245 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2247 * graphite-dependences.c (dot_deps_stmt_1): New.
2248 (dot_deps_stmt): New.
2249 * graphite-dependences.h (dot_deps_stmt): Declared.
2251 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2253 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2254 not replace cross BB scalar dependences ending on PHI nodes.
2255 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2257 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2259 * graphite-poly.c (apply_poly_transforms): Implement the high
2260 level driver for flag_loop_block.
2261 * opts.c (decode_options): Enable flag_loop_block at -O2.
2262 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2265 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2267 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2270 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2272 * graphite-poly.h (lst_find_pbb): New.
2273 (find_lst_loop): New.
2275 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2277 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2278 * graphite-poly.h (struct scop): Remove dep_graph field.
2279 (SCOP_DEP_GRAPH): Removed.
2281 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2283 * graphite-poly.h (copy_lst): Do full copy of LST.
2285 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2287 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2288 when the loop stride is zero.
2290 * gcc.dg/graphite/id-16.c: New.
2292 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2294 * graphite-dependences.c (reduction_dr_1): New.
2295 (reduction_dr_p): New.
2296 (graphite_legal_transform_dr): Call reduction_dr_p.
2297 (reduction_ddr): Renamed reduction_ddr_p.
2298 * graphite-poly.h (same_pdr_p): New.
2299 (number_of_write_pdrs): New.
2300 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2301 (split_reduction_stmt): Do not split reduction statements
2302 when there are no writes to memory.
2303 (translate_scalar_reduction_to_array_for_stmt): Insert the
2304 memory reduction statement just after the scalar reduction statement.
2306 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2308 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2309 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2311 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2313 * graphite-interchange.c (lst_apply_interchange): New.
2314 (lst_interchange_profitable_p): New.
2315 (lst_try_interchange_loops): New.
2316 (lst_try_interchange): New.
2317 (lst_do_interchange): New.
2318 (pbb_do_interchange): Removed.
2319 (scop_do_interchange): Call lst_do_interchange.
2321 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2323 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2324 SCOP_TRANSFORMED_SCHEDULE.
2329 * graphite-poly.h (lst_p): New.
2332 (LST_LOOP_FATHER): New.
2335 (scop_to_lst): Declared.
2336 (print_lst): Declared.
2337 (debug_lst): Declared.
2338 (new_lst_loop): New.
2339 (new_lst_stmt): New.
2342 (lst_dewey_number): New.
2343 (struct scop): Add original_schedule and transformed_schedule fields.
2344 (SCOP_ORIGINAL_SCHEDULE): New.
2345 (SCOP_TRANSFORMED_SCHEDULE): New.
2346 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2348 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2350 * graphite-dependences.c (reduction_ddr): New.
2351 (graphite_legal_transform_bb): Call reduction_ddr.
2352 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2353 Initialize PBB_IS_REDUCTION.
2354 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2355 (PBB_IS_REDUCTION): New.
2356 (new_poly_bb): Update declaration.
2357 * graphite-scop-detection.h (build_scop_bbs): Removed.
2358 (nb_reductions_in_loop): Removed.
2359 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2360 parameter for reductions.
2361 (try_generate_gimple_bb): Update call to new_poly_bb.
2362 (build_scop_bbs_1): Same.
2363 (build_scop_bbs): Same.
2364 (gsi_for_phi_node): New.
2365 (scalar_close_phi_node_p): Remove gcc_assert.
2366 (split_reduction_stmt): New.
2367 (is_reduction_operation_p): New.
2368 (phi_contains_arg): New.
2369 (follow_ssa_with_commutative_ops): New.
2370 (detect_commutative_reduction_arg): New.
2371 (detect_commutative_reduction_assign): New.
2372 (follow_inital_value_to_phi): New.
2373 (edge_initial_value_for_loop_phi): New.
2374 (initial_value_for_loop_phi): New.
2375 (detect_commutative_reduction): New.
2376 (translate_scalar_reduction_to_array_for_stmt): New.
2377 (insert_copyout): New.
2378 (insert_copyin): New.
2379 (translate_scalar_reduction_to_array): New.
2380 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2381 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2382 (rewrite_commutative_reductions_out_of_ssa): New.
2383 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2384 * sese.h (split_region_for_bb): New.
2386 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2387 * gcc.dg/graphite/interchange-1.c: Fix format.
2388 * gcc.dg/graphite/interchange-10.c: New.
2390 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2392 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2395 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2397 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2398 (rewrite_cross_bb_scalar_dependence): New.
2399 (rewrite_cross_bb_scalar_deps): New.
2400 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2401 Call rewrite_cross_bb_scalar_deps.
2403 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2405 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2406 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2409 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2411 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2412 * graphite-interchange.c (pbb_do_interchange): Same.
2413 * graphite-poly.c (print_scattering_function): Same.
2415 * graphite-poly.h (pbb_loop): New.
2416 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2418 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2420 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2422 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2424 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2425 so don't pass a pointer to it.
2426 (build_alias_set_for_drs): Same.
2427 (build_base_obj_set_for_drs): Same.
2428 (build_scop_drs): Same.
2430 2009-09-26 Li Feng <nemokingdom@gmail.com>
2432 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2433 the alias graph of data references.
2435 2009-09-25 Li Feng <nemokingdom@gmail.com>
2437 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2438 (build_scop_drs): When debugging, write the alias graph to file,
2439 otherwise, should be disabled.
2441 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2443 * Merge from mainline (151310:151361).
2445 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2447 * Merge from mainline (151171:151310).
2449 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2451 * Merge from mainline (151171:151806).
2453 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2455 * Revert the last commit.
2457 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2459 * Merge from mainline (151171:151819).
2461 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2463 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2464 (is_simple_operand): Remove call to stmt_simple_memref_p.
2465 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2467 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2469 * gcc.dg/graphite/interchange-mvt.c: New File.
2470 * gcc.dg/graphite/scop-dsyrk.c: New File.
2471 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2472 * gcc.dg/graphite/scop-mvt.c: New File.
2473 * gcc.dg/graphite/scop-sor.c: New File.
2475 2009-09-17 Li Feng <nemokingdom@gmail.com>
2477 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2478 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2479 (graphite_carried_dependence_level_k): Ditto.
2480 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2481 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2482 (new_poly_dr): Adjust declaration.
2483 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2484 (free_gimple_bb): Added free_data_refs_aux.
2485 (build_poly_dr): Add dr_base_object_set.
2486 (partition_drs_to_sets): New.
2487 (dr_same_base_object_p): New.
2488 (build_alias_set_for_drs): New.
2489 (build_base_object_set_for_drs): New.
2490 (build_scop_drs): Add build_base_obj_set_for_drs.
2491 * graphite-sese-to-poly.h: Added #define for alias set number index and
2492 base object set index.
2493 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2494 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2496 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2498 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2499 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2501 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2503 * graphite-sese-to-poly.c (struct irp_data): Removed.
2504 (idx_record_params): Removed.
2505 (find_params_in_bb): Scan for parameters the access functions; don't
2506 parse the tree representation.
2508 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2510 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2511 passes at -O1 and below.
2513 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2515 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2516 tree-scalar-evolution.h, and then tree-data-ref.h.
2517 * graphite-clast-to-gimple.c: Same.
2518 * graphite-dependences.c: Same.
2519 * graphite-interchange.c: Same.
2520 * graphite-poly.c: Same.
2521 * graphite-scop-detection.c: Same.
2522 * graphite-sese-to-poly.c: Same.
2524 * lambda-code.c: Same.
2525 * matrix-reorg.c: Same.
2526 * tree-data-ref.c: Same.
2527 * tree-if-conv.c: Same.
2528 * tree-loop-distribu: Same.: Same.
2529 * tree-loop-linear.c: Same.
2530 * tree-parloops.c: Same.
2531 * tree-predcom.c: Same.
2532 * tree-vect-patterns.c: Same.
2534 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2536 Partially revert the previous patch, except the following.
2537 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2538 as parameters the operands of the not expression.
2540 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2542 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2543 Do not call analyze_scalar_evolution on assignments.
2544 (instantiate_scev_phi): Call analyze_scalar_evolution.
2545 (instantiate_scev_name): Call instantiate_scev_assign and
2546 instantiate_scev_phi.
2547 (instantiate_scev_not): Adapted to pass as parameters the operands
2548 of the not expression.
2550 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2552 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2553 to pass as parameters the operands of the binary expression.
2555 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2557 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2558 instantiate_scev_not. Handle NEGATE_EXPR.
2559 (instantiate_scev_r): Handle NEGATE_EXPR.
2561 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2563 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2565 (instantiate_scev_r): Move code in instantiate_scev_2
2566 and instantiate_scev_1.
2568 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2570 * tree-scalar-evolution.c (instantiate_scev_3): New.
2571 (instantiate_scev_1): Move code in instantiate_scev_3.
2573 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2575 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2576 (instantiate_scev_1): Move code in instantiate_scev_poly.
2578 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2580 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2581 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2583 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2585 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2586 (instantiate_scev_1): Move code in instantiate_scev_convert.
2588 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2590 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2591 (instantiate_scev_1): Move code in instantiate_scev_binary.
2593 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2595 * tree-scalar-evolution.c (instantiate_scev_name): New.
2596 (instantiate_scev_1): Move code in instantiate_scev_name.
2598 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2600 * Merge from mainline (150992:151171).
2602 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2604 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2606 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2608 * graphite-dependences.c (graphite_legal_transform_bb): Call
2609 pbb_remove_duplicate_pdrs.
2610 * graphite-poly.c (can_collapse_pdr): Removed.
2611 (pdr_find_duplicate): Removed.
2612 (can_collapse_pdrs): New.
2613 (pbb_remove_duplicate_pdrs): New.
2614 (new_poly_dr): Do not look for duplicates.
2615 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2616 (PBB_PDR_DUPLICATES_REMOVED): New.
2617 (pbb_remove_duplicate_pdrs): Declared.
2619 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2621 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2622 the strides by multiplying by PDR_NB_REFS.
2623 * graphite-poly.c (can_collapse_pdr): New.
2624 (pdr_find_duplicate): New.
2625 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2626 Initialize PDR_NB_REFS.
2627 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2629 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2631 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2633 Revert one of the previous commits:
2634 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2635 the computation of symmetric data dependence relations.
2636 (dependency_between_pbbs_p): Same.
2638 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2641 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2644 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2646 * graphite-dependences.c (pddr_original_scattering): Return NULL
2647 for read-read dependence relations.
2648 * graphite-poly.h (enum poly_dr_type): Fix comment.
2651 (pdr_may_write_p): New.
2653 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2655 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2656 (struct poly_dr): Same.
2657 (new_poly_dr): Same.
2658 * graphite-poly.c (new_poly_dr): Same.
2660 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2661 Sebastian Pop <sebastian.pop@amd.com>
2663 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2664 pbb_strip_mine_time_depth. Changed the implementation so that
2665 transformation is expressed as a transformation on
2666 time (scatttering) dimensions. Also, ensures that the 2d+1
2667 scheduling format is preserved.
2668 (pbb_strip_mine_profitable_p): Profitability is based on the
2669 iteration number of a given time (scattering) dimension,
2670 and not on a original loop depth dimension.
2671 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2672 (pbb_do_strip_mine): Call psct_dynamic_dim.
2673 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2674 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2675 (pbb_nb_dynamic_scattering_transform): New.
2676 (psct_dynamic_dim): New.
2678 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2680 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2681 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2682 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2683 * graphite-interchange.c (build_linearized_memory_access): Same.
2684 (memory_stride_in_loop): Same.
2686 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2688 * graphite-dependences.c (pddr_original_scattering): New.
2689 (graphite_legal_transform_dr): Call pddr_original_scattering.
2692 * graphite-dependences.h (dot_deps): Declared.
2693 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2694 (print_pdr): Print PDR_ID.
2695 * graphite-poly.h (struct poly_dr): Add field id.
2698 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2700 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2702 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2703 not delete the original dependence relation.
2705 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2707 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2708 the computation of symmetric data dependence relations.
2709 (dependency_between_pbbs_p): Same.
2711 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2713 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2714 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2715 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2716 (free_poly_ddr): New.
2717 (pddr_is_empty): New.
2718 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2719 (dependence_polyhedron): Same. Remove useless gcc_assert.
2721 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2722 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2723 * graphite-dependences.h (enum poly_dependence_kind): New.
2724 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2725 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2726 (PDRP_SINK): Renamed PDDR_SINK.
2727 (PDRP_DDP): Renamed PDDR_DDP.
2729 (free_poly_ddr): Declared.
2730 * graphite-poly.c (new_scop): Use the new hash function names.
2731 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2732 into original_pddrs.
2733 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2735 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2737 * Merge from mainline (150764:150992).
2739 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2741 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2742 bounds with LT_EXPR to make niter analysis more precise on code
2743 generated by Graphite.
2745 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2747 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2748 (graphite_legal_transform_bb): Same.
2749 (poly_drs_may_alias_p): Same.
2751 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2754 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2755 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2757 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2759 * graphite-poly.c (print_pbb): Print PBB index.
2761 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2763 * Merge from mainline (r150672:150764).
2765 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2767 * graphite-interchange.c (ppl_max_for_le): Moved...
2768 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2769 * graphite-ppl.c (ppl_max_for_le): ... here.
2770 * graphite-ppl.h (ppl_max_for_le): Declared.
2772 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2774 * Merge from mainline (r150372:150672).
2776 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2779 * sese.c (convert_for_phi_arg): New.
2780 (add_guard_exit_phis): Use convert_for_phi_arg.
2782 * gfortran.dg/graphite/id-17.f: New.
2784 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2786 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2787 unknown subscript upper bounds.
2789 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2791 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2792 Pranav Garg <pranav.garg2107@gmail.com>
2794 * graphite-interchange.c (gather_access_strides): Removed.
2795 (ppl_max_for_le): New.
2796 (build_linearized_memory_access): New.
2797 (memory_stride_in_loop): New.
2798 (pbb_interchange_profitable_p): Reimplemented.
2799 * graphite-ppl.h (ppl_new_id_map): New.
2800 (ppl_interchange): New.
2802 * gcc.dg/graphite/interchange-6.c: XFAILed.
2804 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2806 * graphite-interchange.c (compute_subscript): Removed.
2807 (compute_array_size_cstr): Removed.
2808 (compute_array_size_poly): Removed.
2809 (compute_array_size): Removed.
2810 (gather_access_strides_poly): Removed.
2811 (gather_access_strides): Empty.
2813 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2815 * graphite-dependences.c (dependence_polyhedron_1): Replace
2816 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2817 (graphite_legal_transform_dr): Same.
2818 (graphite_carried_dependence_level_k): Same.
2819 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2820 Initialize PDR_NB_SUBSCRIPTS.
2821 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2823 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2824 (PDR_NB_SUBSCRIPTS): New.
2825 (pdr_nb_subscripts): Removed.
2826 (pdr_dim): Simplified.
2827 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2828 with PDR_NB_SUBSCRIPTS.
2830 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2832 * graphite-interchange.c (compute_array_size): Remove use of
2834 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2835 Do not initialize PDR_DATA_CONTAINER.
2836 (print_pdr): Do not print PDR_DATA_CONTAINER.
2837 * graphite-poly.h (struct poly_dr): Remove data_container field.
2838 (PDR_DATA_CONTAINER): Removed.
2839 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2841 (build_poly_dr): Same.
2843 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2845 * gcc.dg/graphite/interchange-9.c: New.
2847 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2848 Sebastian Pop <sebastian.pop@amd.com>
2850 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2851 copy of the dependence polyhedron. Free the temporary objects.
2852 (graphite_carried_dependence_level_k): Free unused objects before
2855 * gcc.dg/graphite/interchange-1.c: XFAILed.
2856 * gcc.dg/graphite/interchange-2.c: XFAILed.
2857 * gcc.dg/graphite/interchange-3.c: XFAILed.
2858 * gcc.dg/graphite/interchange-4.c: XFAILed.
2859 * gcc.dg/graphite/interchange-7.c: XFAILed.
2861 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2863 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2864 Early return without analyzing the data dependences if no
2865 transform has been done. Call restore_scattering if the transform
2867 (graphite-interchange.c): Same.
2868 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2869 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2870 (apply_poly_transforms): Do not gcc_assert that
2871 the transform is legal.
2872 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2873 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
2874 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
2875 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2876 * graphite-poly.h (struct poly_scattering): New.
2877 (struct poly_bb): Add original, transformed, and saved fields.
2878 Remove transformed_scattering, original_scattering, nb_local_variables,
2879 and nb_scattering_transform fields.
2880 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
2881 (poly_scattering_new): New.
2882 (poly_scattering_free): New.
2883 (poly_scattering_copy): New.
2884 (store_scattering_pbb): New.
2885 (store_scattering): New.
2886 (restore_scattering_pbb): New.
2887 (restore_scattering): New.
2888 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2889 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
2891 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2893 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
2896 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2898 * Makefile.in (graphite.o): Depends on PREDICT_H.
2899 * graphite.c: Include predict.h.
2900 (graphite_finalize): Call tree_estimate_probability.
2901 * predict.c (predict_loops): Do not call scev_initialize and
2903 (tree_estimate_probability_bb): New.
2904 (tree_estimate_probability): Do not initialize loops: move that
2905 code to the driver. Call tree_estimate_probability_bb.
2906 (tree_estimate_probability_driver): New.
2907 (pass_profile): Use tree_estimate_probability_driver.
2908 * predict.h (tree_estimate_probability): Declared.
2910 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2912 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
2913 * graphite-dependences.c (graphite_legal_transform): Add time to
2914 TV_GRAPHITE_DATA_DEPS.
2915 (dependency_between_pbbs_p): Same.
2916 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2918 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
2920 * Merge from mainline (r149952:150372).
2922 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2924 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
2925 * graphite-blocking.c: Same.
2926 * graphite-clast-to-gimple.c: Same.
2927 * graphite-dependences.c: Same.
2928 * graphite-poly.c: Same.
2929 * graphite-poly.h: Same.
2930 * graphite-ppl.c: Same.
2931 * graphite-scop-detection.c: Same.
2932 * graphite-sese-to-poly.c: Same.
2935 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2937 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
2938 (remove_simple_copy_phi): New.
2939 (remove_invariant_phi): New.
2940 (simple_copy_phi_p): New.
2941 (reduction_phi_p): New.
2942 (gsi_for_ssa_name_def): New.
2943 (insert_out_of_ssa_copy): New.
2944 (insert_out_of_ssa_copy_on_edge): New.
2945 (create_zero_dim_array): New.
2946 (scalar_close_phi_node_p): New.
2947 (rewrite_close_phi_out_of_ssa): New.
2948 (rewrite_phi_out_of_ssa): New.
2949 (rewrite_reductions_out_of_ssa): New.
2950 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
2952 * gcc.dg/graphite/id-11.c: New.
2953 * gcc.dg/graphite/id-15.c: New.
2954 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
2955 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
2956 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
2957 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
2958 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
2959 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
2960 * gfortran.dg/graphite/id-13.f: New.
2961 * gfortran.dg/graphite/id-5.f: New.
2963 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2965 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
2966 check that nb_reductions_in_loop is zero.
2967 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
2968 reduction phi nodes.
2969 (nb_reductions_in_loop): Removed.
2970 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
2971 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
2972 (bb_contains_non_iv_scalar_phi_nodes): Removed.
2973 (scop_contains_non_iv_scalar_phi_nodes): Removed.
2974 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
2976 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2978 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
2979 statements that have an empty iteration domain.
2980 * gfortran.dg/graphite/id-16.f: New.
2982 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2984 * tree-scalar-evolution.c (instantiate_scev_1): Return
2985 chrec_dont_know when the result is not above instantiate_below.
2986 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
2987 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
2988 the tree has a known scalar evolution.
2989 * gfortran.dg/graphite/id-14.f: New.
2990 * gfortran.dg/graphite/id-15.f: New.
2992 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2994 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
2996 (rename_variables): Keep inserting renames after the ones already
2999 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3001 * graphite-sese-to-poly.c (compare_bb_depths): New.
3002 (graphite_sort_dominated_info): New.
3003 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3004 (build_scop_scattering): Fix comment.
3006 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3008 * graphite.c (graphite_finalize): Call print_loops instead of
3009 dump_function_to_file.
3010 * gcc.dg/graphite/graphite.exp: Fix formatting.
3011 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3012 loops generated in the graphite output file.
3013 * gcc.dg/graphite/pr35356-2.c: New.
3014 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3015 * gfortran.dg/graphite/id-12.f: New.
3017 2009-07-24 Li Feng <nemokingdom@gmail.com>
3019 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3022 2009-07-24 Li Feng <nemokingdom@gmail.com>
3023 Tobias Grosser <grosser@fim.uni-passau.de>
3025 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3026 alias set number build alias in ACCESSES polyhedron.
3027 (build_alias_set_for_drs): New.
3028 (build_pbb_drs): Added build_alias_set_for_drs.
3029 * graphite-dependences.c (poly_drs_may_alias_p): New.
3030 (graphite_carried_dependence_level_k): Check alias information
3031 before building polyhedron.
3033 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3035 * Makefile.in (lambda-code.o): Fix formatting.
3037 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3039 * Merge from mainline (r149350-149952)
3041 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3043 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3044 before interchange to prepare for loop blocking.
3046 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3048 * graphite-poly.c (apply_poly_transforms): Add checks after every
3050 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3051 done in apply_poly_transforms.
3053 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3055 * graphite-dependences.c (build_lexicographically_gt_constraint):
3056 Replace RES parameter with *RES.
3057 (dependence_polyhedron_1): Pass an address of the parameter RES
3058 instead of value of RES.
3060 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3062 * graphite.c (graphite_finalize): Fix comment.
3063 (graphite_transform_loops): Reset scev info after code generation
3066 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3068 * graphite.c (graphite_finalize): Call scev_reset.
3070 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3072 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3073 GBB_CLOOG_IV_TYPES hash table twice.
3074 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3075 (add_condition_to_domain): Clear GMP values.
3077 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3079 * graphite-dependences.c: Fix formatting.
3080 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3081 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3082 * graphite-sese-to-poly.c: Fix formatting.
3083 * graphite.c (graphite_transform_loops): Create the hash table
3084 after the early return.
3086 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3088 * gcc.dg/graphite/id-14.c: New.
3089 * gcc.dg/graphite/pr40157.c: New.
3090 * gfortran.dg/graphite/id-11.f: New.
3092 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3094 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3095 (build_poly_scop): Return false when there are no pbbs within
3096 loops to avoid to pass to cloog scops with no loops.
3098 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3100 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3101 useless test "i % 2".
3102 (build_pbb_scattering_polyhedrons): Fix formatting.
3103 (build_poly_dr): Same.
3104 * graphite.c (graphite_transform_loops): Restructure.
3106 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
3108 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3109 reduction_list parameter.
3110 (rewrite_all_phi_nodes_with_iv): Same.
3111 (canonicalize_loop_ivs): Same.
3112 * tree-parloops.c (struct brli): Removed.
3113 (build_reduction_list_info): Removed.
3114 (build_new_reduction): New.
3115 (analyze_reduction_list): Removed.
3116 (gather_scalar_reductions): Find reductions instead of phi
3117 nodes that can't be canonicalized.
3118 (try_create_reduction_list): Remove reduction_list parameter.
3119 (gen_parallel_loop): Same.
3120 (parallelize_loops): Remove analyze_reductions variable,
3121 initialization and free.
3122 Change reduction_list htab initialization to reduction_info
3123 elements instead of ssa names.
3124 Call try_create_reduction_list and gen_parallel_loop without
3125 analyzed_reduction argument.
3126 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3127 canonicalize_loop_ivs with one less argument.
3128 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3130 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3132 * graphite-dependences.c (new_poly_dr_pair): New.
3133 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3134 (new_poly_dr_pair): New.
3135 (eq_poly_dr_pair_p): New.
3136 (hash_poly_dr_pair_p): New.
3137 * graphite-dependences.h (struct poly_dr_pair): New.
3138 (eq_poly_dr_pair_p): Declared.
3139 (hash_poly_dr_pair_p): Declared.
3140 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3141 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3142 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3143 * Makefile.in (graphite-poly.o): Add dependence on
3144 graphite-dependences.h.
3146 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3148 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3149 polynomials of degree > 1 pass to Graphite.
3150 * tree-chrec.c (scev_is_linear_expression): Call
3151 evolution_function_is_affine_multivariate_p.
3152 * gfortran.dg/graphite/id-10.f90: New.
3154 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3156 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3157 Instantiate scevs varying in outer loops.
3158 * gfortran.dg/graphite/id-9.f: Correct testcase.
3160 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3162 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3163 redundant constraint.
3165 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3167 * gcc.dg/graphite/graphite.exp: Fix comments.
3168 * gfortran.dg/graphite/graphite.exp: Trigger actions
3169 based on the file names as in the C testsuite.
3170 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3171 * gfortran.dg/graphite/block-2.f: Same.
3172 * gfortran.dg/graphite/block-3.f90: Same.
3173 * gfortran.dg/graphite/block-4.f90: Same.
3174 * gfortran.dg/graphite/id-1.f90: Same.
3175 * gfortran.dg/graphite/id-2.f90: Same.
3176 * gfortran.dg/graphite/id-3.f90: Same.
3177 * gfortran.dg/graphite/id-4.f90: Same.
3178 * gfortran.dg/graphite/id-6.f: Same.
3179 * gfortran.dg/graphite/id-9.f: Same.
3180 * gfortran.dg/graphite/interchange-1.f: Same.
3181 * gfortran.dg/graphite/interchange-2.f: Same.
3182 * gfortran.dg/graphite/scop-1.f: Same.
3184 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3186 * sese.c (expand_scalar_variables_call): New.
3187 (expand_scalar_variables_ssa_name): Handle calls in expander.
3189 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3191 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3192 Expect to see the pattern twice.
3193 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3194 * gcc.dg/graphite/interchange-5.c: Same.
3195 * gcc.dg/graphite/interchange-6.c: Same.
3197 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3199 * gcc.dg/graphite/id-10.c: New.
3200 * gcc.dg/graphite/id-12.c: New.
3201 * gfortran.dg/graphite/id-7.f: New.
3202 * gfortran.dg/graphite/id-8.f: New.
3204 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3206 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3209 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3211 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3213 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3215 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3217 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3219 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3220 building PDR subscripts.
3222 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3224 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3225 computation of array sizes.
3227 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3229 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3231 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3233 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3234 build_pairwise_constraint, dr_equality_constraints,
3235 build_pairwise_scheduling_equality,
3236 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3237 build_lexicographically_gt_constraint, dependence_polyhedron,
3238 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3239 Move from NNC_Polyhedron to C_Polyhedron.
3240 * graphite-interchange.c (compute_array_size_poly,
3241 gather_access_strides): Dito.
3242 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3243 free_scop, pbb_number_of_iterations): Dito.
3244 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3245 pbb_dim_iter_domain, struct scop): Dito.
3246 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3247 new_Cloog_Domain_from_ppl_Polyhedron,
3248 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3249 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3250 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3251 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3252 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3253 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3254 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3255 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3256 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3257 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3258 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3259 build_scop_iteration_domain, build_poly_dr): Dito
3261 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3263 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3265 * gcc.dg/graphite/run-id-1.c: New.
3267 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3269 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3270 positivity constraint on the symbolic number of iterations.
3272 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3274 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3276 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3277 Tobias Grosser <grosser@fim.uni-passau.de>
3279 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3280 (build_cloog_prog): Directly use SCOP_CONTEXT.
3281 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3282 (free_scop): Free SCOP_CONTEXT.
3283 (print_scop_context): New.
3284 (print_scop): Call print_scop_context.
3285 (debug_scop_context): New.
3286 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3287 (struct scop): Added field context.
3288 (SCOP_CONTEXT): New.
3289 * graphite-sese-to-poly.c (add_param_constraints): New.
3290 (build_scop_context): New.
3291 (build_poly_scop): Call build_scop_context.
3293 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3295 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3296 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3297 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3298 * graphite-ppl.h: Include double-int.h and tree.h.
3299 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3300 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3301 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3302 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3304 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3306 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3307 POINTER_PLUS_EXPR for pointer types.
3308 (clast_to_gcc_expression): Same.
3310 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3312 * graphite-poly.c (print_scattering_function): Early return when
3313 PBB_TRANSFORMED_SCATTERING is not initialized.
3314 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3316 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3318 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3321 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3323 * tree-parloops.c (analyze_reduction_list): Change return
3325 (try_create_reduction_list): Move the call to
3326 analyze_reduction_list to the beginining.
3327 Call reduction_phi with analyzed_reductions as argument
3328 instead of reduction_list.
3330 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3332 * Merge from mainline (r148296:149346)
3334 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3336 * graphite-scop-detection.c (graphite_can_represent_init): New.
3337 (graphite_can_represent_scev): Call graphite_can_represent_init:
3338 check that the initial value does not contain multiplications of
3340 (stmt_has_simple_data_refs_p): New.
3341 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3342 (is_simple_operand): Fix formatting.
3343 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3345 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3347 * gcc.dg/graphite/id-13.c: New.
3348 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3349 analyze_scalar_evolution, use scalar_evolution_in_region.
3350 (scan_tree_for_params_right_scev): Add extra assert.
3351 (parameter_index_in_region_1): Split from parameter_index_in_region.
3352 (idx_record_params): Use scalar_evolution_in_region.
3353 (find_params_in_bb): Same.
3354 (find_scop_parameters): Same.
3355 (build_loop_iteration_domains): Same.
3356 (create_linear_expr_from_tree): Same.
3357 * sese.c (scalar_evolution_in_region): New.
3358 * sese.h (scalar_evolution_in_region): Declared.
3359 (defined_in_sese_p): New.
3360 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3362 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3365 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3367 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3368 TREE_DATA_REF_H also implies SCEV_H.
3370 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3372 * graphite-poly.c (print_scop_params): New.
3373 (print_scop): Call print_scop_params.
3374 (debug_scop_params): New.
3375 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3377 2009-07-07 Li Feng <nemokingdom@gmail.com>
3379 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3380 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3381 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3382 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3383 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3384 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3386 2009-07-07 Li Feng <nemokingdom@gmail.com>
3388 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3389 for dependency checking part.
3390 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3391 tests for dependency checking.
3392 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3393 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3394 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3395 flag -fdump-tree-graphite-all for autopar testsuites.
3397 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3399 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3400 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3401 canonicalize_loop_ivs): Moved...
3402 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3404 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3406 * tree-parloops.c (try_create_reduction_list): Pass an extra
3407 argument analyzed_reductions. Call analyze_reduction_list.
3408 (gen_parallel_loop): Do not call analyze_reduction_list.
3409 (parallelize_loops): Init and finalize analyzed_reductions.
3411 2009-07-06 Li Feng <nemokingdom@gmail.com>
3413 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3414 Added flag -fno-loop-strip-mine for autopar testcase.
3416 2009-07-04 Li Feng <nemokingdom@gmail.com>
3418 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3419 transformed scattering dimension instead of unmatch orignal when
3420 calling dependence_polyhedron.
3422 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3424 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3426 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3428 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3429 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3431 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3433 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3434 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3435 * graphite-poly.c (pbb_number_of_iterations): New.
3436 * graphite-poly.h (pbb_number_of_iterations): Declared.
3437 (pbb_iterator_dim, pbb_parameter_dim): New.
3439 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3441 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3442 last commit on type of lower and upper bound of loops.
3444 2009-06-29 Li Feng <nemokingdom@gmail.com>
3446 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3447 graphite-dependences.h.
3448 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3449 (mark_bb_with_pbb): New.
3450 (get_stmtfor_depth): New.
3451 (find_pbb_via_hash): New.
3452 (dependency_in_loop_p): New.
3453 (mark_loops_parallel): New.
3454 (free_aux_in_new_loops): New.
3455 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3456 bb with it's relevant pbb. Mark newly created loops. Remove mark
3457 innermost loop parallel without checking.
3458 (gloog): Add parameter BB_PBB_MAPPING.
3459 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3460 (gloog): Change declaration.
3461 (mark_loop_parallel): Make extern.
3462 (free_aux_in_new_loops): Declare.
3463 (bb_pbb_map_hash): New.
3464 (eq_bb_pbb_map): New.
3465 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3466 auto parallelization when flag_graphite_force_parallel is set.
3467 (graphite_finalize): Added free_aux_in_new_loops.
3468 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3469 the innermost loop that marked parallel. Use
3470 flag_graphite_force_parallel instead of loop->can_be_parallel.
3471 (loop_parallel_p): Move inner most checking out of function.
3473 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3475 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3476 type of lower and upper bound of loops signed long int.
3478 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3480 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3481 expression outside the loop.
3483 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3485 * gcc.dg/graphite/interchange-8.c: New.
3487 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3489 * gcc.dg/graphite/interchange-0.c: XFailed.
3490 * gcc.dg/graphite/interchange-5.c: XFailed.
3491 * gcc.dg/graphite/interchange-6.c: XFailed.
3493 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3495 * graphite-interchange.c (compute_array_size_poly): The end of the
3496 recursion should return 1.
3498 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3500 * graphite-interchange.c (compute_array_size_cstr): Allow the
3501 subscript multiplier to be -1.
3502 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3503 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3504 data_container. Initializes PDR_DATA_CONTAINER.
3505 (print_pdr_access_layout): New.
3506 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3507 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3509 (PDR_DATA_CONTAINER): New.
3510 (new_poly_dr): Update declaration.
3511 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3512 (build_poly_dr): Call pdr_add_data_dimensions.
3514 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3516 * graphite-poly.h (struct poly_dr): Fix comment.
3517 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3518 (pdr_add_memory_accesses): New.
3519 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3521 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3523 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3524 (print_pbb): Add call to print_pdrs.
3525 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3527 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3528 Li Feng <nemokingdom@gmail.com>
3530 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3531 (dependency_between_pbbs_p): New.
3532 (lexicographically_gt_p): Assure !empty_p before polyhedron
3533 intersection assign.
3534 (build_lexicographically_gt_constraint): Correct lexicographically
3536 * graphite-dependences.h: New.
3537 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3539 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3541 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3542 (gloog): Print to dump_file the generated clast.
3543 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3544 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3546 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3548 * graphite-poly.c (extend_scattering): Increment
3549 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3551 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3553 * graphite-interchange.c (compute_array_size_poly): Added exit of
3554 recursion condition. Continue iterating even after the first equality.
3555 (compute_array_size): Same.
3557 2009-06-24 Li Feng <nemokingdom@gmail.com>
3559 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3560 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3561 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3562 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3563 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3565 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3567 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3568 only when the use verifies is_gimple_reg.
3570 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3572 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3573 Allocate scaldims after call to unify_scattering_dimensions.
3575 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3577 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3579 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3580 Albert Cohen <albert.cohen@inria.fr>
3582 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3583 variables for the strip mining.
3585 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3586 Pranav Garg <pranav.garg2107@gmail.com>
3588 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3589 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3590 (graphite-blocking.o): New rule.
3591 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3592 * graphite-blocking.c: New.
3593 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3594 flag_loop_strip_mine.
3595 (psct_scattering_dim_for_loop_depth): New.
3596 * graphite-poly.h (scop_do_strip_mine): Declared.
3597 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3598 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3599 flag_loop_strip_mine.
3601 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3603 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3604 a GMP value and a PPL coefficient at each iteration of a loop.
3606 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3608 * graphite-dependences.c (dependence_polyhedron): Do not use
3609 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3610 pbb_nb_scattering_transform.
3611 (graphite_legal_transform_dr): Same.
3612 * graphite-poly.c (extend_scattering): Same.
3613 (unify_scattering_dimensions): Same.
3614 (print_scattering_function): Same.
3615 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3616 PBB_NB_LOCAL_VARIABLES.
3617 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3618 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3619 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3620 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3621 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3622 (pbb_nb_scattering_transform): New.
3623 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3624 (psco_scattering_dim): Add assert on parameters.
3625 (psct_scattering_dim): Same.
3626 (psct_scattering_dim_for_loop_depth): Declared.
3627 (psct_local_var_dim): New.
3628 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3629 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3630 correct layout, call pbb_nb_local_vars.
3631 (psct_add_local_variable, psct_add_scattering_dimension): New.
3632 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3633 Initialize PBB_NB_SCATTERING_TRANSFORM.
3635 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3637 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3638 (set_coef): Renamed ppl_set_coef.
3639 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3641 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3643 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3644 test a boolean against 1.
3645 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3646 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3647 (pbb_do_interchange): Returns true when a transform has been performed.
3648 (scop_do_interchange): Same.
3649 * graphite-poly.c (apply_poly_transforms): Use the return value of
3650 scop_do_interchange.
3651 * graphite-poly.h (scop_do_interchange): Update declaration.
3653 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3655 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3657 * sese.c (sese_reset_aux_in_loops): New.
3658 * sese.h (sese_reset_aux_in_loops): New.
3660 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3662 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3663 multiplier and multiply the constant by the multiplier.
3664 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3665 (build_poly_dr): Do not use the multiplier to define the subscript.
3667 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3669 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3670 compiler's data reference. Initialize PDR_CDR.
3671 (print_pdr): Call dump_data_reference.
3672 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3673 Add compiler_dr field.
3674 (PDR_BB): Renamed PDR_PBB.
3676 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3677 GCC's data reference representation.
3678 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3679 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3681 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3683 * graphite-poly.c (print_scattering_function): Also print the layout.
3684 * graphite-poly.h (pbb_nb_local_vars): New.
3686 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3688 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3690 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3692 * graphite-poly.c (print_pdr, debug_pdr): New.
3693 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3694 (PDR_BASE): Removed.
3696 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3698 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3701 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3703 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3704 subscript identification column.
3705 (pbb_do_interchange): Print to dump_file that some loops "will be
3706 interchanged". Rely on that chain of characters in the testcases.
3707 * gcc.dg/graphite/interchange-0.c: New.
3708 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3709 interchange-*.c files and compile them with -floop-interchange.
3711 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3713 * graphite-interchange.c (interchange_profitable_p): Renamed
3714 pbb_interchange_profitable_p.
3716 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3717 Harsha Jagasia <harsha.jagasia@amd.com>
3718 Pranav Garg <pranav.garg2107@gmail.com>
3720 * graphite-interchange.c (interchange_profitable_p): Make static.
3721 (pbb_interchange_loop_depths, pbb_do_interchange,
3722 scop_do_interchange): New.
3723 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3724 for flag_loop_interchange.
3725 * graphite-poly.h (scop_do_interchange): Declared.
3726 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3727 flag_loop_interchange is used.
3729 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3731 * graphite-dependences.c (dependence_polyhedron): Update use of
3732 pbb_nb_scattering_dims.
3733 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3734 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3735 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3736 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3738 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3740 * graphite.c: Cleanup foo.
3742 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3744 * Merge from mainline (r143684:148293).
3745 * Disabled libpcp until it gets fixed.
3747 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3748 Harsha Jagasia <harsha.jagasia@amd.com>
3750 * graphite-interchange.c: New.
3751 * Makefile.in (graphite-interchange.o): New.
3752 * graphite-poly.h (interchange_profitable_p): Declared.
3753 * graphite-ppl.h (value_max): New.
3755 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3757 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3758 * graphite-poly.h: Fix some comments.
3762 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3765 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3766 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3767 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3768 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3769 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3770 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3771 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3772 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3773 * graphite-clast-to-gimple.c: Same.
3774 * graphite-dependences.c: Same.
3775 * graphite-poly.c: Same.
3776 * graphite-sese-to-poly.c: Same.
3778 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3780 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3781 expressions for an IV rename, as returned by clast_to_gcc_expression.
3782 (copy_renames): Rename new_name to expr.
3783 * sese.c (debug_rename_elt): Same.
3786 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3787 the information from the rename map.
3788 (rename_variables_in_stmt): Same.
3789 (add_loop_exit_phis): Rename new_name to expr.
3790 (insert_loop_close_phis): Same.
3791 (add_guard_exit_phis): Same. Call force_gimple_operand.
3792 * sese.h (struct rename_map_elt): Rename new_name to expr.
3793 (new_rename_map_elt): Same.
3795 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3797 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3798 * sese.c (set_rename): Make it extern.
3799 * sese.h (set_rename): Declared.
3801 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3803 * graphite-poly.c (extend_scattering): Free values.
3804 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3806 (ppl_print_powerset_matrix): Same.
3807 * graphite-scop-detection.c (free_scops_1): New.
3808 (limit_scops): Call free_scops_1.
3809 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3810 (build_poly_dr): Free PPL coefficients.
3811 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3813 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3815 * graphite-dependences.c: New.
3816 * graphite-data-ref.c: Removed.
3817 * graphite-data-ref.h: Removed.
3818 * Makefile.in (graphite-data-ref.o): Removed.
3819 (graphite-dependences.o): Added.
3820 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3821 * graphite-poly.c: Same.
3822 Move the data dependence testing to graphite-dependences.c.
3824 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3826 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3827 from graphite_cannot_represent_loop. Code refactored.
3828 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3830 2009-05-17 Li Feng <nemokingdom@gmail.com>
3832 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3833 Cover all the testcases (not only the filtered ones).
3835 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3837 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3838 unnecessary check. Update comments. Move check for REAL_TYPE here.
3839 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3840 done in (stmt_simple_for_scop_p).
3842 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3844 * graphite.c (print_global_statistics): New.
3845 (print_graphite_scop_statistic): New.
3846 (print_graphite_statistics): New.
3847 (graphite_initialize, graphite_transform_loops): Print statistics.
3848 * graphite-scop-detection (build_scops): Print statistics.
3849 (print_graphite_scop_statistics): New.
3850 (print_graphite_statistics): New.
3852 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3854 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3855 (debug_clast_name_index): Removed.
3856 (debug_clast_name_indexes_1): Removed.
3857 (debug_clast_name_indexes): Removed.
3858 (clast_name_index_elt_info): Removed.
3859 (eq_clast_name_indexes): Removed.
3860 (clast_name_to_index): Removed.
3861 (new_clast_name_index): Removed.
3862 (save_clast_name_index): Removed.
3863 (save_var_name): Moved...
3864 (init_sese_params_index): Removed.
3865 (clast_name_to_gcc): Remove use of name_tree.
3866 (initialize_cloog_names): Same.
3867 (gloog): Do not call init_sese_params_index.
3868 * graphite-sese-to-poly.c (save_var_name): ...here.
3869 (parameter_index_in_region): New.
3870 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3871 (parameter_index_in_region): Removed.
3872 (is_parameter): Remove use of name_tree.
3873 * sese.h (struct name_tree): Removed.
3874 (struct sese): Remove use of name_tree. New field params_names.
3875 (SESE_PARAMS_NAMES): New.
3876 (SESE_PARAMS): Remove duplicate.
3877 (parameter_index_in_region): Removed.
3878 (sese_nb_params): Remove use of name_tree.
3879 (struct clast_name_index): New.
3880 (new_clast_name_index): New.
3881 (clast_name_to_index): New.
3882 (save_clast_name_index): New.
3883 (debug_clast_name_index): New.
3884 (debug_clast_name_indexes_1): New.
3885 (debug_clast_name_indexes): New.
3886 (clast_name_index_elt_info): New.
3887 (eq_clast_name_indexes): New.
3889 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3891 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
3892 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
3893 (graphite_loop_normal_form): Do not pass region. Do not
3894 initialize SESE_OLDIVS.
3895 (build_graphite_loop_normal_form): Update call to
3896 graphite_loop_normal_form.
3897 * sese.c (debug_oldivs): Removed.
3898 (new_sese): Do not initialize SESE_OLDIVS.
3899 (free_sese): Do not free SESE_OLDIVS.
3900 (oldiv_for_loop): Removed.
3901 * sese.h (struct sese): Remove old_ivs.
3902 (SESE_OLDIVS): Removed.
3903 (oldiv_for_loop): Removed.
3905 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3907 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
3908 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
3909 replaced by a call to newivs_to_depth_to_newiv.
3910 (clast_to_gcc_expression): Pass newivs, remove ivstack.
3911 (clast_to_gcc_expression_red): Same.
3912 (gcc_type_for_clast_expr): Same.
3913 (gcc_type_for_clast_eq): Same.
3914 (graphite_translate_clast_equation): Same.
3915 (graphite_create_guard_cond_expr): Same.
3916 (graphite_create_new_guard): Same.
3917 (graphite_create_new_loop): Same.
3918 (build_iv_mapping): Same.
3919 (translate_clast): Same.
3921 (loop_iv_stack_patch_for_consts): Removed. *
3922 sese.c (iv_stack_entry_is_constant): Removed.
3923 (iv_stack_entry_is_iv): Removed.
3924 (loop_iv_stack_push_iv): Removed.
3925 (loop_iv_stack_insert_constant): Removed.
3926 (loop_iv_stack_pop): Removed.
3927 (loop_iv_stack_get_iv): Removed.
3928 (loop_iv_stack_get_iv_from_name): Removed.
3929 (debug_loop_iv_stack): Removed.
3930 (free_loop_iv_stack): Removed.
3931 (loop_iv_stack_remove_constants): Removed. *
3932 sese.h (iv_stack_entry_kind): Removed.
3933 (iv_stack_entry_data_union): Removed.
3934 (iv_stack_entry_struct): Removed.
3935 (iv_stack_entry_p): Removed.
3936 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
3937 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
3938 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
3939 loop_iv_stack_pop, free_loop_iv_stack): Removed.
3940 (gbb_loop_at_index): Fix indenting.
3941 (gbb_loop_index): Removed.
3943 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3945 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
3946 Call clast_name_to_index.
3948 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3950 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
3951 do not pass params. Get params from SESE_PARAMS.
3952 (clast_to_gcc_expression): Same.
3953 (clast_to_gcc_expression_red): Same.
3954 (gcc_type_for_clast_eq): Same.
3955 (graphite_translate_clast_equation): Same.
3956 (graphite_create_new_loop): Same.
3957 * sese.c (rename_variables_in_stmt): Fix comment.
3959 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3961 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
3963 Call save_clast_name_index.
3964 (translate_clast): Pass newivs_index.
3965 (gloog): Create and free newivs_index.
3967 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3969 * graphite-clast-to-gimple.c (clast_name_index): New structure.
3970 (clast_name_index_p): New type.
3971 (debug_clast_name_index): New.
3972 (debug_clast_name_indexes_1): New.
3973 (debug_clast_name_indexes): New.
3974 (clast_name_index_elt_info): New.
3975 (eq_clast_name_indexes): New.
3976 (clast_name_to_index): New.
3977 (new_clast_name_index): New.
3978 (save_clast_name_index): New.
3979 (init_sese_params_index): New.
3980 (gloog): Call init_sese_params_index.
3981 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
3982 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
3983 (free_sese): Free SESE_PARAMS_INDEX.
3984 * sese.h (struct sese): Add params_index.
3985 (SESE_PARAMS_INDEX): New.
3987 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3989 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
3990 (graphite_create_new_loop): Pass the newivs vector. Push the
3991 newly created IV to newivs.
3992 (translate_clast): Pass the newivs vector.
3993 (gloog): Create and destroy the newivs vector.
3995 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3997 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
3998 (graphite_loop_normal_form): Initialize loop->aux with the unique
3999 IV that has been created.
4001 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4003 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4004 scev with parameters in the base part. They where forbidden
4007 2009-05-11 Li Feng <nemokingdom@gmail.com>
4009 * gcc.dg/graphite/graphite.exp: Set different default
4010 compile options by file names.
4011 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4012 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4013 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4014 * gcc.dg/graphite/scop-matmult.c: Ditto.
4016 2009-05-08 Li Feng <nemokingdom@gmail.com>
4018 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4019 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4020 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4021 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4023 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4025 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4028 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4030 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4031 allow integer constant strides.
4032 (graphite_can_represent_expr): Depend on outermost_loop.
4033 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4034 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4035 build_scops_1): Same.
4036 (scopdet_basic_block_info): Same and insert layered SCoP
4038 (try_generate_gimple_bb): Cleanup.
4039 (build_scops): Enable data references.
4041 * gcc.dg/graphite/id-5.c: New.
4042 * gcc.dg/graphite/id-9.c: New.
4043 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4044 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4046 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4048 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4049 that we have not yet built for this SCoP.
4051 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4053 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4054 for complex numbers.
4056 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4058 * graphite-ppl.c: Fix build if cloog is not available.
4060 2009-05-04 Li Feng <nemokingdom@gmail.com>
4062 * tree-parloops.c (loop_parallel_p): Remove construction of
4063 NITER and REDUCTION_LIST.
4064 (try_get_loop_niter): New.
4065 (try_create_reduction_list): New.
4066 (parallelize_loops): Bypass the failed checkings in autopar
4067 when can_be_parallel in loop structure is set to true.
4069 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4071 * gcc.dg/graphite/id-6.c: Update testcase.
4072 * gcc.dg/graphite/scop-3.c: Dito.
4074 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4076 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4077 Enable EQ_EXPR and NE_EXPR again.
4079 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4081 * graphite-scop-detection.c (graphite_can_represent_scev):
4082 Add check if scev is affine multivariate.
4083 (harmful_stmt_in_bb): Check if we can represent the conditions.
4084 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4086 * gcc.dg/graphite/id-7.c: New.
4088 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4090 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4091 Check all bbs in region, not only the bbs that are represented in
4093 (build_poly_scop): Add newline.
4094 * gcc.dg/graphite/id-8.c: New.
4096 2009-04-30 Li Feng <nemokingdom@gmail.com>
4098 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4099 when loop initialize.
4100 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4101 * common.opt: Declare flag_graphite_force_parallel.
4102 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4104 * graphite-poly.c (apply_poly_transforms): Introduce
4105 flag_graphite_force_parallel.
4106 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4107 * toplev.c (process_options): ditto and replace a not correctly
4110 2009-04-30 Li Feng <nemokingdom@gmail.com>
4112 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4113 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4114 to the redefinition.
4115 (compute_cloog_iv_types_1): ditto.
4116 (build_iv_mapping): ditto.
4117 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4119 (free_gimple_bb): Removed GBB_LOOPS related free part.
4120 (build_bb_loops): Removed.
4121 * sese.h (struct gimple_bb): Removed loops.
4122 (GBB_LOOPS): Removed.
4123 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4124 (gbb_loop_index): ditto.
4126 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4128 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4129 allow non constant strides.
4130 * gcc.dg/graphite/scop-20.c: New.
4132 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4134 * graphite-scop-detection.c (dot_all_scops): Fix system call
4135 return value warning.
4138 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4140 * gcc.dg/graphite/id-6.c: Fix pattern.
4141 * gcc.dg/graphite/scop-3.c: Same.
4143 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4145 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4146 build_pairwise_constraint, dr_equality_constraints,
4147 build_pairwise_scheduling_equality,
4148 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4149 build_lexicographically_gt_constraint, dependence_polyhedron,
4150 graphite_legal_transform_dr, graphite_legal_transform_bb,
4151 graphite_legal_transform): New.
4152 * graphite-poly.h (graphite_legal_transform): Declared.
4153 * graphite-sese-to-poly.c (build_poly_scop): Call to
4154 graphite_legal_transform is disabled for the moment.
4156 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4158 * graphite-poly.h (pbb_nb_scattering_dims): New.
4159 (pbb_nb_scattering): Use it.
4161 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4163 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4164 Pointset_Powerset version of ppl_insert_dimensions.
4165 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4167 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4169 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4171 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4173 * graphite-poly.h: Fix comment.
4175 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4177 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4179 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4181 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4184 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4186 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4187 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4190 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4192 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4193 handle EQ_EXPR and NE_EXPR.
4195 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4197 * graphite-poly.h (poly_dr): Fix comment.
4199 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4200 Tobias Grosser <grosser@fim.uni-passau.de>
4202 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4203 with a zero dimension polyhedron.
4204 (find_scop_parameters): Move the call to scop_set_nb_params here.
4205 (build_loop_iteration_domains): Store in loop->aux the iteration
4207 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4208 by any loop in scop.
4209 (build_poly_scop): Do not call scop_set_nb_params.
4211 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4212 Tobias Grosser <grosser@fim.uni-passau.de>
4214 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4215 add_condition_to_domain not GT_EXPR.
4217 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4219 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4220 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4221 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4222 upper_bound_assign to calculate unions.
4223 * gcc.dg/graphite/id-6.c: New.
4225 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4227 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4228 handle abnormal edges.
4230 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4232 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4233 (free_poly_bb): Also free poly_drs.
4234 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4235 (poly_dr): Polyhedron to Pointset_Powerset.
4236 (pdr_accessp_nb_subscripts): Same.
4237 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4240 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4242 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4243 names into more meaningful names.
4245 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4247 * gfortran.dg/graphite/interchange-1.c: New.
4248 * gfortran.dg/graphite/interchange-2.c: New.
4250 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4252 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4254 * tree-parloops.c (rewrite_phi_with_iv): New.
4255 (rewrite_all_phi_nodes_with_iv): New.
4256 (canonicalize_loop_ivs): Call them.
4258 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4260 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4261 graphite_find_data_references_in_stmt.
4262 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4263 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4265 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4267 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4269 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4271 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4272 instead of bb_in_region.
4273 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4274 (build_sese_conditions): Use flag_bb_in_sese.
4275 * sese.c (register_bb_in_sese): Removed.
4276 (new_sese): Remove initialization of SESE_REGION_BBS.
4277 (free_sese): Do not free SESE_REGION_BBS.
4278 * sese.h (struct sese): Remove field region_basic_blocks.
4279 (SESE_REGION_BBS): Removed.
4280 (bb_in_sese_p): Implement in function of bb_in_region.
4282 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4284 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4287 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4289 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4291 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4292 (add_condition_to_domain): New.
4293 (add_condition_to_pbb): New.
4294 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4295 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4297 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4299 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4300 ppl_Pointset_Powerset.
4301 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4302 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4303 (pbb_nb_loops): Same.
4304 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4305 add_conditions_to_domain): Same.
4306 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4307 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4308 ppl_const_Polyhedron_t.
4309 (ppl_print_powerset_matrix): New.
4310 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4311 ppl_print_powerset_matrix): New.
4312 (ppl_print_polyhedron_matrix): Updated.
4314 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4316 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4318 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4320 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4321 (print_iteration_domains, debug_iteration_domain,
4322 debug_iteration_domains): New.
4323 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4324 debug_iteration_domains): Declared.
4325 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4328 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4329 Sebastian Pop <sebastian.pop@amd.com>
4331 * graphite-poly.h (print_iteration_domain): New.
4332 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4333 (build_sese_conditions_1, build_sese_conditions_after,
4334 build_sese_conditions_before): New.
4335 (build_sese_conditions): Rewritten.
4337 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4338 Tobias Grosser <grosser@fim.uni-passau.de>
4340 Cleanup of code generation liveouts.
4341 * graphite-clast-to-gimple.c (translate_clast): Use a single
4342 rename_map instead of one per translated statement.
4343 Do not use SESE_LIVEOUT_RENAMES.
4344 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4345 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4346 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4347 phi node of a reduction: when a loop contains a reduction used outside
4348 the loop, there should be a scalar close phi node on the exit block.
4349 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4350 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4351 (free_sese): Do not free them.
4352 (sese_build_liveouts_use): Do not use them.
4353 (sese_build_liveouts_bb): Same.
4354 (sese_build_liveouts): Same.
4355 (sese_insert_phis_for_liveouts): Same.
4356 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4357 (defined_in_loop_p): New.
4358 (alive_after_loop): New.
4359 (close_phi_not_yet_inserted_p): New.
4360 (struct alep, alep_p): New.
4361 (add_loop_exit_phis): Remove from the rename_map all the names defined
4362 in the code generated loop.
4363 (insert_loop_close_phis): Traverse the rename_map passed to it.
4364 Don't use SESE_LIVEOUT_RENAMES.
4365 (default_liveout_before_guard): Renamed default_before_guard.
4366 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4367 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4368 (register_sese_liveout_renames): Removed.
4369 (copy_bb_and_scalar_dependences): Do not call it.
4370 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4372 (SESE_LIVEOUT): Removed.
4373 (SESE_LIVEOUT_RENAMES): Removed.
4374 (SESE_REDUCTION_LIST): Removed.
4375 (sese_build_liveouts): Removed.
4376 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4377 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4378 (insert_guard_phis): Same.
4379 (rename_map_elt): Declare a VEC of them.
4380 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4381 trees not pointers to trees.
4383 Rewrite in canonical close SSA form:
4384 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4385 (limit_scops): Close the scop after the block containing the close phi
4387 (canonicalize_loop_closed_ssa): New.
4388 (canonicalize_loop_closed_ssa_form): New.
4389 (build_scops): Call canonicalize_loop_closed_ssa_form.
4391 * graphite-sese-to-poly.c: Fix typos.
4393 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4395 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4397 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4398 (print_pbb): Add conditions.
4400 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4401 Sebastian Pop <sebastian.pop@amd.com>
4403 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4404 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4405 (build_scop_bbs_1): New.
4406 (build_scop_bbs): Rewrite.
4407 * sese.h (bb_in_region): New.
4409 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4411 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4413 (print_scop): Style.
4414 * graphite-poly.h (poly_bb): Add drs vector.
4415 (PBB_DRS): Add accessor.
4416 * graphite-sese-to-poly.c (build_poly_dr): New.
4417 (build_pbb_drs, build_scop_drs): New.
4418 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4420 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4422 * tree-ssa-loop.c: Include forgotten toplev.h
4424 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4426 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4427 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4428 * gcc.dg/graphite/pr37928.c: Same
4429 * gcc.dg/graphite/pr38409.c: Same
4430 * gcc.dg/graphite/pr38498.c: Same
4431 * gcc.dg/graphite/pr38559.c: Same
4432 * gcc.dg/graphite/pr39335.c: Same
4433 * gcc.dg/graphite/pr39335_1.c: Same
4434 * gfortran.dg/graphite/block-2.f: Same
4435 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4438 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4440 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4441 build_access_matrix, build_scop_data_accesses): Remove access function
4442 building. (We get a new version soon).
4443 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4444 * sese.h (nb_loops_around_loop_in_sese): Remove.
4445 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4447 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4448 Sebastian Pop <sebastian.pop@amd.com>
4450 * graphite-scop-detection.c (struct scopdet_info): Rename last
4452 (scopdet_basic_block_info, build_scops_1): Don't use
4453 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4455 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4456 Sebastian Pop <sebastian.pop@amd.com>
4458 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4459 * sese.c (sese_build_liveouts_use): Renamed from
4460 sese_build_livein_liveouts_use. Remove liveins.
4461 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4462 Call sese_build_liveouts_use.
4463 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4464 Call sese_build_liveouts_bb.
4465 (new_sese, free_sese): Remove liveins.
4466 (sese_add_exit_phis_var): Deleted.
4467 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4469 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4471 * sese.h (sese): Remove num_ver and livein.
4472 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4474 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4476 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4478 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4480 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4481 (build_scop_scattering): Do not use compare_prefix_loops any more.
4482 (nb_common_loops): New.
4484 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4486 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4487 (register_old_and_new_names): Renamed set_rename.
4489 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4491 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4492 of the decl from the previous commit.
4494 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4496 * graphite-scop-detection.c (dot_scop): New.
4497 * graphite-scop-detection.h (dot_scop): Declared.
4499 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4501 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4503 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4505 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4506 condition at the end of the loop.
4507 * graphite.c (graphite_initialize, graphite_finalize): Print to
4508 dump_file the compiled function.
4509 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4510 of create_empty_loop_on_edge.
4511 (translate_clast): Update the code generation of loops for the new
4513 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4515 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4517 Reverted the patch from 2009-03-19.
4519 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4521 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4523 (print_scop): Style.
4524 * graphite-poly.h (poly_bb): Add drs vector.
4525 (PBB_DRS): Add accessor.
4526 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4527 (build_access_matrix_with_af, build_access_matrix,
4528 build_scop_data_accesses): Delete.
4529 (build_poly_dr): New.
4530 (build_pbb_drs, build_scop_drs): New.
4531 (build_poly_scop): call build_scop_drs.
4533 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4535 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4536 once per basic block.
4538 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4540 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4541 (graphite_can_represent_expr): Renamed from loop_affine_expr
4543 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4544 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4545 (scopdet_basic_block_info): Actually define entry_block.
4546 (stmt_simple_memref_p): Moved here from ...
4548 * tree-data-ref.c (stmt_simple_memref_p): here.
4549 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4551 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4553 * gcc.dg/graphite/id-4.c: New.
4555 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4557 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4558 (register_old_and_new_names): Update the content of the map.
4559 When there was already a rename_map_elt in the map at that
4561 (copy_bb_and_scalar_dependences): Do rename_variables after
4562 expand_scalar_variables.
4563 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4564 of the map. When there was already a rename_map_elt in the
4565 map at that location, free it.
4566 (translate_clast): Pass the rename_map. Do not initialize and free
4567 a rename_map per stmt_user.
4568 (gloog): Initialize and free one rename_map and pass it to
4571 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4573 * sese.c (expand_scalar_variables_stmt,
4574 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4576 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4577 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4578 the gimple_stmt_iterator of the statement to be expanded.
4579 * graphite-scop-detection.c (is_simple_operand): Do handle
4582 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4584 * graphite-scop-detection.c (is_simple_operand): Do not handle
4586 * gcc.dg/graphite/id-2.c: New.
4588 * graphite-sese-to-poly.c (build_bb_loops,
4589 add_value_to_dim, scan_tree_for_params_right_scev,
4590 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4591 find_params_in_bb, build_loop_iteration_domains,
4592 add_conditions_to_domain): Remove subtract.
4594 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4596 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4597 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4598 pbb_loop_at_index -> gbb_loop_at_index.
4599 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4600 (debug_loop_vec): Delete.
4601 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4602 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4603 (PBB_LOOPS): Removed.
4604 (PBB_BLACK_BOX): Insert cast.
4605 (pbb_set_black_box): New setter.
4606 (pbb_loop_at_index, pbb_loop_index): Removed.
4607 (scop_set_region, scop_set_nb_params): New.
4608 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4609 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4610 (build_poly_scop): Use scop_set_nb_params.
4611 * sese.h (gimple_bb): Add LOOPS.
4612 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4614 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4616 Revert previous commit.
4618 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4620 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4621 (register_old_and_new_names): Update the content of the map.
4622 When there was already a rename_map_elt in the map at that
4624 (copy_bb_and_scalar_dependences): Do rename_variables after
4625 expand_scalar_variables.
4626 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4627 of the map. When there was already a rename_map_elt in the
4628 map at that location, free it.
4629 (translate_clast): Pass the rename_map. Do not initialize and free
4630 a rename_map per stmt_user.
4631 (gloog): Initialize and free one rename_map and pass it to
4634 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4636 Remove forgotten line in revert.
4638 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4640 Revert previous commit.
4642 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4644 * sese.c (register_old_and_new_names): Update the content
4645 of the map. When there was already a rename_map_elt in the
4646 map at that location, free it.
4647 (copy_bb_and_scalar_dependences): Do rename_variables after
4648 expand_scalar_variables.
4649 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4650 of the map. When there was already a rename_map_elt in the
4651 map at that location, free it.
4652 (translate_clast): Pass the rename_map. Do not initialize and free
4653 a rename_map per stmt_user.
4654 (gloog): Initialize and free one rename_map and pass it to
4657 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4659 * graphite-clast-to-gimple.c (translate_clast): context_loop
4662 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4663 Sebastian Pop <sebastian.pop@amd.com>
4665 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4666 of the use of ppl_Polyhedron_map_space_dimensions.
4668 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4669 Sebastian Pop <sebastian.pop@amd.com>
4671 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4672 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4673 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4674 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4675 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4676 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4677 pbb_nb_params): New.
4678 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4679 nb_loops_around_pbb): Adapt return types.
4681 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4683 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4684 graphite-clast-to-gimple.o, graphite-data-ref.o,
4685 graphite-scop-detection.o, graphite-poly.o): Add
4688 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4690 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4691 graphite-clast-to-gimple.o, graphite-data-ref.o,
4692 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4694 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4696 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4697 * gcc.dg/graphite/pr37828.c: Same.
4698 * gcc.dg/graphite/pr37684.c: Same.
4699 * gcc.dg/graphite/block-0.c: Same.
4700 * gcc.dg/graphite/block-1.c: Same.
4701 * gcc.dg/graphite/block-2.c: Same.
4702 * gcc.dg/graphite/block-3.c: Same.
4703 * gcc.dg/graphite/block-4.c: Same.
4704 * gcc.dg/graphite/block-5.c: Same.
4705 * gcc.dg/graphite/block-6.c: Same.
4706 * gfortran.dg/graphite/pr38083.f90: Same.
4707 * gfortran.dg/graphite/block-1.f90: Same.
4708 * gfortran.dg/graphite/block-3.f90: Same.
4709 * gfortran.dg/graphite/pr37852.f90: Same.
4710 * gfortran.dg/graphite/block-4.f90: Same.
4711 * gfortran.dg/graphite/pr37980.f90: Same.
4712 * gfortran.dg/graphite/pr38953.f90: Same.
4713 * gfortran.dg/graphite/pr37857.f90: Same.
4714 * opts.c: Remove -floop-block from -O2.
4715 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4716 -floop-strip-mine are used.
4718 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4719 Sebastian Pop <sebastian.pop@amd.com>
4721 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4723 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4724 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4725 strip_mine_profitable_p, is_interchange_valid,
4726 graphite_trans_bb_block, graphite_trans_loop_block,
4727 graphite_trans_scop_block): Temporary removed.
4728 (extend_scattering, unify_scattering_dimensions): New.
4729 (print_scattering_function, graphite_read_transforms):
4730 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4731 (graphite_generate_scattering_fns): Removed.
4732 (apply_poly_transforms): Cleanup.
4733 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4734 (schedule_to_scattering): Moved.
4735 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4736 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4737 (pbb_nb_scattering): New.
4738 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4739 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4741 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4743 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4744 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4745 -> PBB_TRANSFORMED_SCATTERING.
4746 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4747 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4748 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4749 (check_poly_representation): Do not return bool.
4750 (graphite_transform_loops): Reformat.
4751 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4753 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4755 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4756 debug_pbb_domain, debug_pbb, debug_scop): New.
4757 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4758 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4760 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4763 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4764 when the type precision of the induction variable should be
4765 larger than the type precision of nit.
4766 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4767 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4768 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4770 * gcc.dg/graphite/pr39335_1.c: New.
4771 * gcc.dg/graphite/pr39335.c: New.
4773 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4775 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4776 SSA_NAMES not struct reduction_info.
4778 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4780 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4782 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4783 Tobias Grosser <grosser@fim.uni-passau.de>
4785 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4786 (free_sese): Free SESE_REDUCTION_LIST.
4787 * sese.h (struct sese): Add field reduction_list.
4788 (SESE_REDUCTION_LIST): New.
4789 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4790 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4792 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4793 Tobias Grosser <grosser@fim.uni-passau.de>
4795 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4798 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4799 Tobias Grosser <grosser@fim.uni-passau.de>
4801 * tree-parloops.c (struct brli, build_reduction_list_info,
4802 analyze_reduction_list, gather_scalar_reductions): New.
4803 (loop_parallel_p): Build a reduction list containing only
4804 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4805 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4806 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4807 * tree-flow.h (gather_scalar_reductions): Declared.
4809 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4812 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4813 number_of_iterations_exit from a gcc_assert.
4815 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4816 Jan Sjodin <jan.sjodin@amd.com>
4818 * output.h (graphite_out_file, graphite_in_file): Declared.
4819 * toplev.c (graphite_out_file, graphite_in_file): New.
4820 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4821 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4822 Don't call schedule_to_scattering.
4823 * common.opt (fgraphite-write, fgraphite-read): New.
4824 * graphite-poly.c: Include output.h.
4825 (print_scattering_function, print_scattering_functions,
4826 debug_scattering_function, debug_scattering_functions,
4827 graphite_write_transforms, graphite_read_transforms,
4828 graphite_generate_scattering_fns): New.
4829 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4830 Call graphite_generate_scattering_fns, graphite_write_transforms,
4831 graphite_read_transforms.
4832 (new_poly_bb): Initialize PBB_SCATTERING.
4833 (free_poly_bb): Free PBB_SCATTERING.
4834 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4835 * graphite-poly.h (struct poly_bb): Add field scattering.
4836 (PBB_SCATTERING): New.
4837 (print_scattering_function, print_scattering_functions,
4838 debug_scattering_function, debug_scattering_functions): Declared.
4839 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4840 GMP values, not integers!
4841 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4842 ppl_read_polyhedron_matrix): New.
4843 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4844 debug_ppl_polyhedron_matrix,
4845 ppl_read_polyhedron_matrix): Declared.
4846 * Makefile.in (graphite-poly.o): Depends on output.h.
4848 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4849 Tobias Grosser <grosser@fim.uni-passau.de>
4852 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4853 scalar evolutions in the scop_entry->loop_father.
4855 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4856 Tobias Grosser <grosser@fim.uni-passau.de>
4858 * graphite.h (ref_nb_loops): Remove declaration.
4859 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4860 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4861 debug_gbb): Moved to sese.h.
4864 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4865 Tobias Grosser <grosser@fim.uni-passau.de>
4867 * graphite-data-ref.[ch]: Disable.
4869 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4870 Tobias Grosser <grosser@fim.uni-passau.de>
4872 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4873 scalar evolutions in the scop_entry->loop_father.
4875 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4877 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
4878 (graphite_cannot_represent_loop_niter): Renamed
4879 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
4880 (limit_scops): build_sese_loop_nests does not return a bool.
4881 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
4882 * sese.c (nb_reductions_in_loop): ... from here.
4883 (graphite_loop_normal_form): ... from here.
4884 (sese_record_loop): Does not fail, so does not return a bool.
4885 (build_sese_loop_nests): Same.
4886 * sese.h (build_sese_loop_nests): Update declaration.
4887 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
4888 (build_graphite_loop_normal_form): New.
4889 (gloog): Call build_graphite_loop_normal_form.
4890 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
4891 build_sese_loop_nests.
4893 * gcc.dg/graphite/id-1.c: New.
4895 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4896 Tobias Grosser <grosser@fim.uni-passau.de>
4898 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
4899 The SCoP detection fix is sufficient.
4901 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4903 PR tree-optimization/39260
4904 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
4905 the basic block contains a condition with a real type.
4906 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
4908 * gcc.dg/graphite/pr39260.c: New.
4910 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4912 * graphite-poly.c: Inlcude params.h.
4913 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
4915 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
4916 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
4918 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4919 Tobias Grosser <grosser@fim.uni-passau.de>
4921 * graphite-scop-detection.c (dot_all_scops_1,
4922 dot_all_scops): Moved here.
4923 * graphite-scop-detection.h (dot_all_scops): Declared here.
4924 * graphite.c (graphite_initialize, graphite_finalize): New.
4925 (graphite_transform_loops): Cleaned up.
4926 * sese.c (debug_oldivs): Moved here.
4927 * graphite-poly.c (graphite_apply_transformations): Renamed
4928 apply_poly_transforms.
4929 (debug_loop_vec): Moved here.
4930 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
4931 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
4932 find_scop_parameters, build_scop_iteration_domain,
4933 add_conditions_to_constraints, build_scop_canonical_schedules,
4934 build_scop_data_accesses): Now static.
4935 (build_poly_scop, check_poly_representation): New.
4937 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4939 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
4940 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
4941 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
4942 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
4943 scan_tree_for_params_right_scev, scan_tree_for_params_int,
4944 scan_tree_for_params, struct irp_data, dx_record_params,
4945 find_params_in_bb, find_scop_parameters, gbb_from_bb,
4946 build_loop_iteration_domains, add_conditions_to_domain,
4947 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
4948 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
4949 build_sese_conditions, add_conditions_to_constraints,
4950 build_scop_iteration_domain, build_access_matrix_with_af,
4951 build_access_matrix,
4952 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
4954 * graphite-sese-to-poly.c: New.
4955 * graphite-sese-to-poly.h: New.
4957 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
4959 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4961 * graphite.c: Split graphite code generation to a new file.
4962 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
4963 max_precision_type, clast_to_gcc_expression_red,
4964 clast_to_gcc_expression, gcc_type_for_clast_expr,
4965 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
4966 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
4967 graphite_create_new_guard, clast_get_body_of_loop,
4968 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
4969 graphite_create_new_loop, build_iv_mapping, copy_renames,
4970 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4971 compute_cloog_iv_types, free_scattering, save_var_name,
4972 initialize_cloog_names, build_scop_context, build_cloog_prog,
4973 set_cloog_options, debug_clast_stmt, scop_to_clast,
4974 print_generated_program, debug_generated_program,
4975 gloog): Moved to graphite-clast-to-gimple.c.
4977 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
4979 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
4980 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
4981 loop_iv_stack_pop, loop_iv_stack_get_iv,
4982 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
4983 free_loop_iv_stack, loop_iv_stack_remove_constants,
4984 debug_rename_elt, debug_rename_map_1, debug_rename_map,
4985 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
4986 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
4987 eq_ivtype_map_elts, sese_add_exit_phis_edge,
4988 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
4989 get_vdef_before_sese, sese_adjust_vphi,
4990 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
4991 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
4992 is_iv, expand_scalar_variables_ssa_name,
4993 expand_scalar_variables_expr, expand_scalar_variables_stmt,
4994 expand_scalar_variables, rename_variables, remove_condition,
4995 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
4996 add_loop_exit_phis, insert_loop_close_phis, struct igp,
4997 default_liveout_before_guard, add_guard_exit_phis,
4998 insert_guard_phis, register_old_and_new_names,
4999 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5000 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5001 if_region_set_false_region, create_if_region_on_edge,
5002 move_sese_in_condition): Moved to sese.c.
5004 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5005 if_region_exit, if_region_get_condition_block,
5006 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5007 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5008 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5009 ivtype_map_elt, new_ivtype_map_elt,
5010 recompute_all_dominators): Moved to sese.h.
5012 * graphite-clast-to-gimple.c: New.
5013 * graphite-clast-to-gimple.h: New.
5014 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5015 * sese.c: Modified as said above.
5018 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5020 * graphite.c: Split scop detection to a new file.
5021 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5022 move_sd_regions, loop_affine_expr, exclude_component_ref,
5023 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5024 graphite_cannot_represent_loop_niter, struct scopdet_info,
5025 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5026 find_single_entry_edge, find_single_exit_edge,
5027 create_single_entry_edge, sd_region_without_exit,
5028 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5029 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5030 Moved to graphite-scop-detection.c.
5032 * graphite-scop-detection.c: New.
5033 * graphite-scop-detection.h: New.
5034 * Makefile.in: Add new rule for graphite-scop-detection.o.
5036 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5037 tree-scalar-evolution.h.
5038 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5039 build_sese_loop_nests): Moved here from graphite.c.
5040 (param_index): Renamed parameter_index_in_region.
5042 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5043 Sebastian Pop <sebastian.pop@amd.com>
5045 * gcc.dg/graphite/block-0.c: Expected to fail now.
5046 * gcc.dg/graphite/block-1.c: Same.
5047 * gcc.dg/graphite/block-5.c: Same.
5048 * gcc.dg/graphite/block-6.c: Same.
5050 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5051 Sebastian Pop <sebastian.pop@amd.com>
5053 * graphite.h: Separate from graphite_bb_p the polyhedral
5054 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5055 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5056 graphite-data-ref.h.
5057 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5058 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5059 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5060 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5061 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5062 scop_nb_params): Moved to graphite-poly.h.
5063 * graphite-data-ref.c: Same.
5064 * graphite-data-ref.h: New.
5066 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5067 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5068 is_interchange_valid, graphite_trans_bb_block,
5069 graphite_trans_loop_block, scop_max_loop_depth,
5070 graphite_trans_scop_block, graphite_apply_transformations,
5071 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5073 * graphite-poly.h: New.
5074 * graphite-poly.c: New.
5075 * Makefile.in (OBJS-common): Add graphite-poly.o.
5076 (graphite-poly.o): New rule.
5077 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5080 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5081 Tobias Grosser <grosser@fim.uni-passau.de>
5083 * graphite.c: Replace gb -> gbb.
5085 * graphite-data-ref.c: Same.
5087 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5088 Tobias Grosser <grosser@fim.uni-passau.de>
5090 * Makefile.in (OBJS-commmon): Add sese.o.
5092 (graphite.o): Add sese.h.
5093 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5094 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5095 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5097 (block_before_scop): Add missing return.
5098 (new_scop, free_scop): Remove SESE data structures.
5099 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5100 find_scop_parameters, build_loop_iteration_domains,
5101 add_conditions_to_domain, register_scop_liveout_renames,
5102 copy_bb_and_scalar_dependences): Scop -> SESE.
5104 (add_conditions_to_domain): SCoP -> SESE and remove check
5105 (scop_contains_non_iv_scalar_phi_nodes): New.
5106 (build_scop_conditions_1, build_scop_conditions): Remove check for
5107 non iv scalar phi nodes.
5108 (print_scop_statistics): New.
5109 (graphite_transform_loops): Cleanup.
5111 * graphite.h: Move to sese & cleanup.
5115 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5116 Tobias Grosser <grosser@fim.uni-passau.de>
5118 * graphite.c (build_scop_conditions_1): Conditions are only
5119 at the end of a basic block.
5121 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5122 Tobias Grosser <grosser@fim.uni-passau>
5124 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5126 (GBB_ALPHA): Removed.
5128 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5129 Tobias Grosser <grosser@fim.uni-passau.de>
5131 * graphite-data-ref.c (graphite_test_dependence): Don't use
5132 GBB_DYNAMIC_SCHEDULE.
5133 * graphite.c (new_graphite_bb): Same.
5134 (free_graphite_bb): Same.
5135 (build_scop_dynamic_schedules): Removed.
5136 (graphite_transform_loops): Don't call it.
5137 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5138 (GBB_DYNAMIC_SCHEDULE): Removed.
5140 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5141 Tobias Grosser <grosser@fim.uni-passau.de>
5143 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5144 (print_graphite_bb): Same.
5145 (build_cloog_prog): Same.
5147 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5148 Tobias Grosser <grosser@fim.uni-passau.de>
5150 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5152 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5153 Tobias Grosser <grosser@fim.uni-passau.de>
5155 * graphite.c (build_scop_context): Don't use CloogMatrix.
5156 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5157 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5159 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5160 Tobias Grosser <grosser@fim.uni-passau.de>
5162 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5163 liveout_renames, add_params fields...
5164 (struct sese): ... here.
5165 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5166 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5168 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5169 Tobias Grosser <grosser@fim.uni-passau.de>
5171 * graphite.c (print_scop): Do not print the CLooG program.
5172 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5173 build_cloog_prog, gloog): Don't use SCOP_PROG.
5174 (find_transform): Renamed scop_to_clast.
5175 (print_generated_program, debug_generated_program): New.
5176 (graphite_transform_loops): Adapt to new interface.
5177 * graphite.h (struct scop): Remove program field.
5178 (SCOP_PROG): Removed.
5179 (print_generated_program, debug_generated_program): Declared.
5181 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5183 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5184 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5185 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5186 free_graphite_bb, build_scop_canonical_schedules,
5187 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5188 schedules are now represented using a ppl_Linear_Expression_t.
5189 * graphite.h (struct graphite_bb): Same.
5190 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5191 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5193 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5195 * graphite.c: Free local memory.
5196 * graphite-ppl.c: Same.
5198 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5200 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5201 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5202 swap_constraint_variables, scale_constraint_variable): Removed.
5203 (graphite_trans_bb_strip_mine): Remove pong.
5204 * graphite-ppl.c: Include missing header files.
5205 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5206 * graphite-ppl.h (ppl_strip_loop): Declared.
5207 * Makefile.in (graphite-ppl.o): Adjust dependences.
5209 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5211 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5212 (build_scop_iteration_domain): Same.
5214 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5216 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5218 (add_value_to_dim, scan_tree_for_params_right_scev,
5219 scan_tree_for_params_int): New.
5220 * graphite-ppl.c (oppose_constraint): New.
5221 (insert_constraint_into_matrix): Implement missing cases.
5222 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5224 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5226 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5227 use ppl_move_dimension.
5229 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5231 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5234 * graphite-ppl.c: Same.
5235 * graphite-ppl.h: Same.
5237 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5239 Revert last 3 commits.
5241 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5243 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5245 (add_value_to_dim, scan_tree_for_params_right_scev,
5246 scan_tree_for_params_int): New.
5247 * graphite-ppl.c (oppose_constraint): New.
5248 (insert_constraint_into_matrix): Implement missing cases.
5249 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5251 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5253 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5255 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5256 Tobias Grosser <grosser@fim.uni-passau.de>
5258 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5259 use ppl_move_dimension.
5260 * graphite-ppl.c (ppl_move_dimension): New.
5261 * graphite-ppl.h (ppl_move_dimension): Declared.
5263 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5265 * graphite.c: Do not include cloog/cloog.h.
5266 (print_graphite_bb): Remove ping pong, call PPL print function.
5268 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5270 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5271 (graphite.o): Add dependence on graphite-ppl.h.
5272 (graphite-ppl.o): New.
5273 (graphite-data-ref.c): Ping pong between PPL data structures
5275 * graphite-ppl.c: New.
5276 * graphite-ppl.h: New.
5277 * graphite.c: Include graphite-ppl.h.
5278 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5279 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5280 Ping pong between PPL data structures and matrices.
5281 (new_graphite_bb): Create a PPL constraint system.
5282 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5283 (build_loop_iteration_domains): Use PPL functions.
5284 * graphite.h: Include graphite-ppl.h. Fix comments.
5285 (graphite_bb): Use a ppl_Constraint_System_t instead of
5286 CloogMatrix for representing the domain.
5287 (scop): Remove static_schedule.
5288 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5290 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5292 * graphite.c: Fix some comments.
5294 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5297 * graphite.c (if_region_set_false_region): After moving a region
5298 in the false branch of a condition, remove the empty dummy
5300 (gloog): Remove wrong fix for PR38953.
5302 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5304 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5305 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5306 register_bb_in_sese, new_sese, free_sese): Moved.
5307 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5308 outermost_loop_in_scop, build_scop_iteration_domain,
5309 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5310 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5311 Use loop_in_sese_p instead of loop_in_scop_p.
5312 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5313 (free_scop): Do not free SCOP_BBS_B.
5314 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5315 ref_nb_loops): Moved here...
5316 * graphite.h (ref_nb_loops): ... from here.
5317 (struct scop): Remove bbs_b bitmap.
5318 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5319 * gcc.dg/graphite/scop-19.c: New
5321 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5323 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5326 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5328 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5329 eq_loop_to_cloog_loop): Remove.
5330 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5331 * graphite.h (struct scop): Remove loop2cloog_loop.
5332 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5334 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5336 * opts.c (decode_options): Only add graphite options to O2
5337 if we compile with graphite enabled.
5339 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5341 * Merge from mainline (r143163:143684).
5343 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5345 * graphite.c (debug_value): Removed.
5346 * graphite.h (debug_value): Removed.
5348 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5350 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5351 after graphite: pass_copy_prop does not maintain a proper loop closed
5352 SSA form. pass_copy_prop should be fixed.
5354 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5356 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5358 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5360 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5361 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5362 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5365 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5367 * graphite.c (gloog): Return true when code gen succeeded.
5368 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5369 the code of the function did not changed. After cleanup_tree_cfg
5370 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5373 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5375 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5376 gimple_call_lhs is NULL.
5378 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5379 Tobias Grosser <tobi.grosser@amd.com>
5381 * graphite.c (graphite_trans_scop_block): Do not block single
5384 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5385 Tobias Grosser <tobi.grosser@amd.com>
5387 * graphite.c (build_scop_canonical_schedules): Start schedules at
5390 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5391 Tobias Grosser <tobi.grosser@amd.com>
5393 * graphite.c (compare_prefix_loops): New.
5394 (build_scop_canonical_schedules): Rewritten.
5395 (graphite_transform_loops): Move build_scop_canonical_schedules
5396 after build_scop_iteration_domain.
5398 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5399 Tobias Grosser <tobi.grosser@amd.com>
5401 * graphite.c (add_conditions_to_domain): Add the loops to
5402 the dimension of the iteration domain. Do copy the domain
5403 only when it exists.
5404 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5405 (add_conditions_to_constraints): New.
5406 (can_generate_code_stmt, can_generate_code): Removed.
5407 (gloog): Do not call can_generate_code.
5408 (graphite_transform_loops): Call add_conditions_to_constraints
5409 after building the iteration domain.
5411 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5412 Tobias Grosser <tobi.grosser@amd.com>
5413 Jan Sjodin <jan.sjodin@amd.com>
5415 * graphite.c (scan_tree_for_params): On substractions negate
5416 all the coefficients of the term.
5417 (clast_to_gcc_expression_red): New. Handle reduction expressions
5418 of more than two operands.
5419 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5420 (get_vdef_before_scop): Handle also the case of default definitions.
5422 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5425 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5426 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5427 (gloog): Do not call cleanup_tree_cfg.
5428 (graphite_transform_loops): Call cleanup_tree_cfg after all
5429 scops have been code generated.
5431 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5433 * passes.c (init_optimization_passes): Schedule after
5434 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5436 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5438 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5440 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5441 Set the type of an expression to the type of its assign statement.
5442 (expand_scalar_variables_expr): Do not pass loop_p.
5443 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5444 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5445 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5447 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5449 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5450 an expression to the gimple_expr_type of its assign statement.
5451 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5454 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5456 PR tree-optimization/38786
5457 * gcc.dg/graphite/pr38786.c: New.
5458 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5459 the SSA_NAME case of expand_scalar_variables_expr.
5460 (expand_scalar_variables_expr): Also gather the scalar computation
5461 used to index the memory access.
5462 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5463 the gimple_stmt_iterator where it inserts new code.
5465 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5467 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5469 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5471 * opts.c (decode_options): Enable flag_graphite_identity and
5472 flag_loop_block in -O2 and above.
5474 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5476 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5477 Fix merge problem: replace with the file from trunk.
5479 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5481 * Merge from mainline (r141727:143163).
5483 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5484 Jan Sjodin <jan.sjodin@amd.com>
5486 PR tree-optimization/38559
5487 * gcc.dg/graphite/pr38559.c: New.
5489 * graphite.c (debug_value, copy_constraint,
5490 swap_constraint_variables, scale_constraint_variable, ): New.
5491 (get_lower_bound, get_upper_bound): Removed.
5492 (graphite_trans_bb_strip_mine): Clean up this code that works
5493 only for constant number of iterations. Fully copy upper and
5494 lower bound constraints, not only the constant part of them.
5495 * graphite.h (debug_value): Declared.
5497 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5499 PR tree-optimization/38492
5500 PR tree-optimization/38498
5501 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5502 * tree-chrec.h (scev_is_linear_expression): Declared.
5503 * graphite.c (graphite_cannot_represent_loop_niter): New.
5504 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5505 (graphite_loop_normal_form): Use gcc_assert.
5506 (scan_tree_for_params): Use CASE_CONVERT.
5507 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5508 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5509 Use gcc_assert. Discard scops that contain unhandled cases.
5510 (build_scop_conditions): Return a boolean status for unhandled cases.
5511 (strip_mine_profitable_p): Print the loop number, not its depth.
5512 (is_interchange_valid): Pass the depth of the loop nest, don't
5513 recompute it wrongly.
5514 (graphite_trans_bb_block): Same.
5515 (graphite_trans_bb_block): Print tentative of loop blocking.
5516 (graphite_trans_scop_block): Do not print that the loop has been
5518 (graphite_transform_loops): Do not handle scops that contain condition
5521 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5523 * gcc.dg/graphite/block-0.c: Update test.
5524 * gcc.dg/graphite/block-1.c: Same.
5525 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5527 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5528 * gcc.dg/graphite/block-3.c: New.
5529 * gcc.dg/graphite/pr38498.c: New.
5531 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5533 PR tree-optimization/38510
5534 * gcc.dg/graphite/pr38510.c: New.
5535 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5536 (translate_clast): Call recompute_all_dominators before
5538 (gloog): Call recompute_all_dominators before graphite_verify.
5540 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5542 PR tree-optimization/38492
5543 * graphite.c (rename_map_elt, debug_rename_elt,
5544 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5545 rename_map_elt_info, eq_rename_map_elts,
5546 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5547 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5548 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5549 (sese_build_livein_liveouts): New.
5550 (new_sese, free_sese): New.
5551 (new_scop): Call new_sese.
5552 (free_scop): Call free_sese.
5553 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5554 (register_old_new_names): Renamed register_old_and_new_names.
5555 (register_scop_liveout_renames, add_loop_exit_phis,
5556 insert_loop_close_phis, struct igp,
5557 default_liveout_before_guard, add_guard_exit_phis,
5558 insert_guard_phis, copy_renames): New.
5559 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5560 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5561 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5562 (scop_adjust_phis_for_liveouts): New.
5563 (gloog): Call scop_adjust_phis_for_liveouts.
5565 * graphite.h (struct sese): Documented. Added fields liveout,
5567 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5568 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5569 (struct scop): Added field liveout_renames.
5570 (SCOP_LIVEOUT_RENAMES): New.
5572 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5574 PR tree-optimization/38409
5575 * gcc.dg/graphite/pr38409.c: New.
5576 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5578 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5580 * graphite.c (gcc_type_for_cloog_iv): By default return
5582 (graphite_create_new_loop): Don't fold_convert the already
5583 fold_convert-ed expression.
5585 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5587 PR tree-optimization/38446
5588 * gcc.dg/graphite/pr38446.c: New.
5589 * graphite.c (register_bb_in_sese): New.
5590 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5591 looking at the bbs in the region.
5592 * graphite.h (sese): Add region_basic_blocks pointer set to
5593 structure and initialize at the time of defining new scop.
5595 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5597 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5598 (find_params_in_bb): Do not free data refs.
5599 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5601 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5603 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5604 * gcc.dg/graphite/scop-17.c: Same.
5605 * gcc.dg/graphite/block-5.c: New.
5606 * gcc.dg/graphite/block-6.c: New.
5607 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5608 * gcc.dg/graphite/pr37684.c: Same.
5609 * gcc.dg/graphite/block-2.c: Same.
5611 * graphite.c (struct ivtype_map_elt): New.
5612 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5613 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5614 gcc_type_for_cloog_iv): New.
5615 (loop_iv_stack_patch_for_consts): Use the type of the induction
5616 variable from the original loop, except for the automatically
5617 generated loops, i.e., in the case of a strip-mined loop, in
5618 which case there is no original loop: in that case just use
5620 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5621 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5622 (clast_name_to_gcc): Accept params to be NULL.
5623 (clast_to_gcc_expression): Take an extra parameter for the type.
5624 Convert to that type all the expressions built by this function.
5625 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5626 (graphite_translate_clast_equation): Compute the type of the
5627 clast_equation before translating its LHS and RHS.
5628 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5629 (graphite_create_new_loop): Compute the type of the induction
5630 variable before translating the lower and upper bounds and before
5631 creating the induction variable.
5632 (rename_variables_from_edge, rename_phis_end_scop): New.
5633 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5634 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5635 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5636 compute_cloog_iv_types): New.
5637 (gloog): Call compute_cloog_iv_types before starting the
5638 translation of the clast.
5640 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5641 (GBB_CLOOG_IV_TYPES): New.
5642 (debug_ivtype_map): Declared.
5643 (oldiv_for_loop): New.
5645 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5648 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5649 (param_index): Assert if parameter is not know after parameter
5651 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5652 (find_scop_parameters): Mark, that we have finished parameter
5654 (graphite_transform_loops): Move condition detection before parameter
5656 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5657 * gfortran.dg/graphite/pr38459.f90: New.
5659 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5661 * graphite.c (graphite_transform_loops): Always call find_transform ()
5662 in ENABLE_CHECKING. So we test these code paths, even if we do not
5665 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5667 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5668 (print_scop): Ditto.
5670 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5673 Fix gfortran.dg/graphite/id-3.f90.
5674 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5675 regions more than once.
5677 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5679 Fix gfortran.dg/graphite/id-4.f90.
5680 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5683 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5685 Fix gfortran.dg/graphite/id-1.f90.
5686 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5687 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5688 (max_precision_type): New.
5689 (value_clast): Removed.
5690 (clast_to_gcc_expression): Be more careful to types of expressions.
5691 Use max_precision_type and update use of gmp_cst_to_tree.
5692 (graphite_translate_clast_equation): Use max_precision_type.
5693 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5694 use the type of the condition.
5695 (graphite_create_new_loop): Do not use integer_type_node, use the
5696 max_precision_type of lb and ub.
5698 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5700 * graphite.c (build_scops_1): Initialize open_scop.exit
5703 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5705 * gcc.dg/graphite/pr38084.c: New.
5706 * gfortran.dg/graphite/id-1.f90: New.
5707 * gfortran.dg/graphite/id-2.f90: New.
5708 * gfortran.dg/graphite/id-3.f90: New.
5709 * gfortran.dg/graphite/id-4.f90: New.
5710 * gfortran.dg/graphite/pr37857.f90: New.
5712 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5713 Jan Sjodin <jan.sjodin@amd.com>
5714 Harsha Jagasia <harsha.jagasia@amd.com>
5726 * gcc.dg/graphite/pr38073.c: New.
5727 * gcc.dg/graphite/pr37928.c: New.
5728 * gcc.dg/graphite/pr37883.c: New.
5729 * gcc.dg/graphite/pr38125.c: New.
5730 * gfortran.dg/graphite/pr38083.f90: New.
5731 * gfortran.dg/graphite/pr37852.f90: New.
5732 * gfortran.dg/graphite/pr37980.f90: New.
5734 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5735 the number of detected scops. Copy exact same test for loop
5737 * gcc.dg/graphite/block-1.c: Fix the number of expected
5738 loops to be blocked as reductions are not handled.
5739 * gcc.dg/graphite/block-4.c: ...here. New.
5741 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5742 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5744 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5745 * Makefile.in (graphite.o): Depend on value-prof.h.
5746 (graphite.o-warn): Removed -Wno-error.
5747 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5748 to be a NULL pointer. Call update_stmt. Return the newly created
5749 cannonical induction variable.
5751 * graphite.h (debug_rename_map): Declared. Fix some comments.
5753 * graphite.c: Reimplement the code generation from graphite to gimple.
5754 Include value-prof.h.
5755 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5756 (get_old_iv_from_ssa_name): Removed.
5757 (graphite_stmt_p): New.
5758 (new_graphite_bb): Test for useful statements before building a
5759 graphite statement for the basic block.
5760 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5761 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5763 (recompute_all_dominators, graphite_verify,
5764 nb_reductions_in_loop, graphite_loop_normal_form): New.
5765 (scop_record_loop): Call graphite_loop_normal_form.
5766 (build_scop_loop_nests): Iterate over all the blocks of the
5767 function instead of relying on the incomplete information from
5768 SCOP_BBS. Return the success of the operation.
5769 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5770 (add_bb_domains): Removed.
5771 (build_loop_iteration_domains): Don't call add_bb_domains.
5772 Add the iteration domain only to the basic blocks that have been
5773 translated to graphite.
5774 (build_scop_conditions_1): Add constraints only if the basic
5775 block have been translated to graphite.
5776 (build_scop_data_accesses): Completely disabled until data
5777 dependence is correctly implemented.
5778 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5779 (remove_all_edges_1, remove_all_edges): Removed.
5780 (get_new_name_from_old_name): New.
5781 (graphite_rename_variables_in_stmt): Renamed
5782 rename_variables_in_stmt. Call get_new_name_from_old_name.
5783 Use replace_exp and update_stmt.
5784 (is_old_iv): Renamed is_iv.
5785 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5786 Use replace_exp and update_stmt.
5787 (expand_scalar_variables_expr): Same. Use the map to get the
5788 new names for the renaming of induction variables and for the
5789 renaming of variables after a basic block has been copied.
5790 (expand_scalar_variables): Same.
5791 (graphite_rename_variables): Renamed rename_variables.
5792 (move_phi_nodes): Removed.
5793 (get_false_edge_from_guard_bb): New.
5794 (build_iv_mapping): Do not insert the induction variable of a
5795 loop in the renaming iv map if the basic block does not belong
5797 (register_old_new_names, graphite_copy_stmts_from_block,
5798 copy_bb_and_scalar_dependences): New.
5799 (translate_clast): Heavily reimplemented: copy basic blocks,
5800 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5801 At each translation step call graphite_verify ensuring the
5802 consistency of the SSA, loops and dominators information.
5803 (collect_virtual_phis, find_vdef_for_var_in_bb,
5804 find_vdef_for_var_1, find_vdef_for_var,
5805 patch_phis_for_virtual_defs): Removed huge hack.
5806 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5807 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5808 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5809 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5810 if_region_get_condition_block, if_region_set_false_region,
5811 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5812 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5813 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5814 rewrite_into_sese_closed_ssa): New.
5815 (gloog): Remove dead code. Early return if code cannot be
5816 generated. Call cleanup_tree_cfg once the scop has been code
5818 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5819 block loops with less than two loops.
5820 (graphite_apply_transformations): Remove the call to
5821 scop_remove_ignoreable_gbbs.
5822 (limit_scops): When build_scop_loop_nests fails, continue on
5823 the next scop. Fix open_scop.entry.
5824 (graphite_transform_loops): Call recompute_all_dominators: force the
5825 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5826 Call initialize_original_copy_tables and free_original_copy_tables
5827 to be able to copy basic blocks during code generation.
5828 When build_scop_loop_nests fails, continue on next scop.
5829 (value_clast): New union.
5830 (clast_to_gcc_expression): Fix type cast warning.
5832 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5834 * Merge from mainline (r140838:141727).
5836 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5840 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5842 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5846 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5847 exits and conditions.
5848 * gcc.dg/graphite/pr37943.c: New.
5850 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5853 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5855 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5857 * doc/invoke.texi: Fix spaces.
5859 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5861 PR tree-optimization/37891
5862 Reverted last commit.
5863 * graphite.c (create_single_entry_edge): Set
5864 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5866 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5867 Mitul Thakkar <mitul.thakkar@amd.com>
5869 * graphite.c (create_single_entry_edge): Set
5870 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5872 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
5874 * doc/invoke.texi: Add -fgraphite-identity.
5875 * graphite.c (graphite_apply_transformations): Check for
5876 -fgraphite-identity.
5877 * toplev.c (process_options): Add flag_graphite_identity.
5878 * tree-ssa-loop.c: Add flag_graphite_identity.
5880 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5882 Undo changes from 2008-10-02:
5883 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5884 operand type when copying the operand to a variable of different type.
5885 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5886 with the IV name after increment.
5888 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5889 Harsha Jagasia <harsha.jagasia@amd.com>
5891 PR tree-optimization/37828
5892 * gcc.dg/graphite/pr37828.c: New.
5893 * graphite.c (graphite_trans_loop_block): Do not loop block
5894 single nested loops.
5896 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
5897 Sebastian Pop <sebastian.pop@amd.com>
5899 * graphite.c (struct rename_map_elt, new_rename_map_elt,
5900 rename_map_elt_info, eq_rename_map_elts): New.
5901 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
5902 (expand_scalar_variables_expr): Change parameters.
5903 (expand_scalar_variables_stmt): Same.
5904 (expand_scalar_variables): Same.
5905 (graphite_rename_ivs): Rename graphite_rename_variables.
5906 (build_iv_mapping): New.
5907 (translate_clast): Call build_iv_mapping.
5908 * graphite.h (gbb_p): New name.
5910 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
5912 PR tree-optimization/37684
5913 * gcc.dg/graphite/pr37684.c: New.
5914 * graphite.c (exclude_component_ref): New.
5915 (is_simple_operand): Call exclude_component_ref.
5917 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
5918 Harsha Jagasia <harsha.jagasia@amd.com>
5920 PR tree-optimization/37485
5921 * gcc.dg/graphite/block-2.c: New
5922 * graphite.c (gmp_cst_to_tree): Moved.
5923 (iv_stack_entry_is_constant): New.
5924 (iv_stack_entry_is_iv): New.
5925 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
5926 (loop_iv_stack_insert_constant): New.
5927 (loop_iv_stack_pop): Use new datatpype.
5928 (loop_iv_stack_get_iv): Same.
5929 (loop_iv_stack_get_iv_from_name): Same.
5930 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
5931 (loop_iv_stack_patch_for_consts): New.
5932 (loop_iv_stack_remove_constants): New.
5933 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
5934 (translate_clast): Call loop_iv_stack_patch_for_consts and
5935 loop_iv_stack_remove_constants.
5936 (gloog): Use new datatype. Redirect construction edge to end
5937 block to avoid accidental deletion.
5938 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
5940 (union iv_stack_entry_data): New. Data in iv stack entry.
5941 (struct iv_stack_entry): New. Datatype for iv stack entries.
5943 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5945 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5946 operand type when copying the operand to a variable of different type.
5948 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5950 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5951 with the IV name after increment.
5953 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5955 * Merge from mainline (r140164:140838).
5957 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5959 * graphite-data-ref.c: New.
5960 * graphite.c (print_scop): Also dump the dependence graph.
5961 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
5962 (new_scop): Initialize SCOP_DEP_GRAPH.
5963 (build_scop_dynamic_schedules): New.
5964 (build_access_matrix_with_af): Fixed column numbering.
5965 (graphite_transform_loops): Call build_scop_dynamic_schedules.
5966 * graphite.h: Add ifndef/define guards against multiple inclusion.
5967 (struct scop): Add dep_graph field.
5968 (SCOP_DEP_GRAPH): Defined.
5969 (ref_nb_loops): Fixed and moved to other position.
5970 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
5971 (nb_loops_around_loop_in_scop): New.
5972 (graphite_dump_dependence_graph): Declared.
5973 (graphite_build_rdg_all_levels): Declared.
5974 (graphite_test_dependence): Declared.
5975 * Makefile.in (graphite-data-ref.o): New target.
5977 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
5979 * Merge from mainline (139870:140164).
5981 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5983 * Merge from mainline (138275:139870).
5984 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
5985 the commits from trunk broke the niter detection.
5987 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5989 * graphite.c: Add more documentation. Fix formatting.
5990 (debug_loop_vec, debug_oldivs, loop_iv_stack,
5991 loop_iv_stack_debug): Moved...
5992 (schedule_to_scattering): Move before use.
5993 (dot_all_scops): Include in "#if 0" the code for system
5996 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
5997 loop_iv_stack_debug): ...here.
5999 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6001 * tree-phinodes.c (make_phi_node): Extern.
6002 (add_phi_node_to_bb): New.
6003 (create_phi_node): Call add_phi_node_to_bb.
6004 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6005 (remove_statement): Handle case where stored phi was updated
6006 and is no longer the same.
6007 * graphite.c (is_parameter): New.
6009 (expand_scalar_variables_expr): New.
6010 (expand_scalar_variables_stmt): New.
6011 (expand_scalar_variables): New.
6012 (move_phi_nodes): Create new phi instead of moving old one.
6013 (translate_clast): Call expand_scalar_variables.
6014 (find_vdef_for_var_in_bb): Also scan regular definitions.
6015 (skip_phi_defs): New.
6016 (collect_scop_exit_phi_args): New.
6017 (patch_scop_exit_phi_args): New.
6018 (gloog): Patch phis after scop.
6019 * tree-flow.h: (add_phi_node_to_bb): Declared.
6020 (make_phi_node): Declared.
6022 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6024 * graphite.c (end_scop): Split the entry of the scop when it
6025 is the header of the loop in which the scop is ending.
6026 (build_scops_1, limit_scops): Update uses of end_scop.
6028 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6030 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6031 SCOP_ENTRY or SCOP_EXIT.
6033 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6035 * graphite.c (get_construction_edge): Removed.
6036 (gloog): Construction edge is the scop entry edge.
6038 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6040 * graphite.c (can_generate_for_scop): Removed.
6041 (gloog): Do not call it.
6043 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6045 * graphite.c (new_scop): Entry of a scop is an edge.
6046 Initialize SESE region.
6047 (free_scop): Free SESE region.
6048 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6049 (split_difficult_bb): New, split from end_scop.
6050 (end_scop): Exit of a scop is an edge.
6051 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6052 not automatically updated and thus is always wrong.
6053 * graphite.h (struct sese): New.
6056 (struct scop): New field for a SESE region. Remove entry, exit.
6057 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6058 semantics as before. Moved comment around.
6060 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6061 Sebastian Pop <sebastian.pop@amd.com>
6063 * graphite.c (graphite_transform_loops): Always enable gloog
6064 and find_transform when ENABLE_CHECKING.
6066 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6068 * graphite.c (graphite_transform_loops): Move pretty printer
6069 of SCOPs before doing any transform. Remove call to print_scops
6070 and dot_all_scops_1.
6072 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6074 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6075 (print_graphite_bb): Same.
6077 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6079 * graphite.c (dot_all_scops_1): Cleanup.
6080 (move_scops): Fix comment.
6082 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6084 * graphite.c (build_scop_bbs): Revert commit 139355:
6086 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6087 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6089 * graphite.c (build_scop_bbs): Factor up code.
6091 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6093 * graphite.c (gloog): Update dominator info.
6095 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6097 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6099 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6101 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6103 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6104 (translate_clast): Correct formatting.
6105 * graphite.h (struct num_map): Removed.
6106 (struct graphite_bb): Remove num_map field.
6107 (GBB_INDEX_TO_NUM_MAP): Removed.
6109 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6111 * graphite.c (build_access_matrix_with_af): Fix comments.
6112 (build_scop_data_accesses): Same.
6114 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6116 * graphite.c (build_scop_data_accesses): Don't construct
6117 access matrices. Add a FIXME and an assert condition that
6118 should pass when the access matrices will be needed.
6120 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6122 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6124 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6125 Moved close by free_graphite_bb.
6126 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6127 (new_scop): Move close by free_scop.
6128 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6130 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6132 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6133 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6134 instead of recursive call.
6135 (graphite_translate_clast_equation): New.
6136 (graphite_create_guard_cond_expr): New.
6137 (graphite_create_new_guard): New.
6138 (get_stack_index_from_iv): Removed.
6139 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6140 (get_true_edge_from_guard_bb): New.
6141 (translate_clast): Handle stmt_guard in clast.
6142 (get_construction_edge): Allow construction edge detection for
6143 a scope entry with multiple predecessors if one predecessor is
6144 the immediate dominator of scope entry.
6145 (can_generate_code_stmt): Enable code generation for clast_guard.
6146 (gloog): Use correct context loop. Removed check for post dominators.
6147 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6149 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6151 * graphite.c (remove_dead_loops): Document better which
6154 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6156 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6158 (graphite.o): Also depends on pointer-set.h.
6160 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6162 * graphite.c (scop_record_loop): Fix compile warning.
6164 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6165 Sebastian Pop <sebastian.pop@amd.com>
6167 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6169 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6171 * graphite.c (build_graphite_bb): Initialize bb->aux to
6172 point to the graphite_bb_p.
6173 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6175 (add_bb_domains): Does not use the scop parameter.
6176 (graphite_transform_loops): Clean bb->aux at the end.
6178 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6179 Sebastian Pop <sebastian.pop@amd.com>
6181 * lib/target-supports.exp
6182 (check_effective_target_fgraphite): New.
6184 * gcc.dg/graphite/graphite.exp: Early exit when
6185 check_effective_target_fgraphite returns false.
6186 Set dg-do-what-default to compile.
6187 (scan-graphite-dump-times): Removed.
6188 * gfortran.dg/graphite/graphite.exp: Same.
6190 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6191 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6192 * gcc.dg/graphite/scop-1.c: Same.
6193 * gcc.dg/graphite/scop-2.c: Same.
6194 * gcc.dg/graphite/scop-3.c: Same.
6195 * gcc.dg/graphite/scop-4.c: Same.
6196 * gcc.dg/graphite/scop-5.c: Same.
6197 * gcc.dg/graphite/scop-6.c: Same.
6198 * gcc.dg/graphite/scop-7.c: Same.
6199 * gcc.dg/graphite/scop-8.c: Same.
6200 * gcc.dg/graphite/scop-9.c: Same.
6201 * gcc.dg/graphite/scop-10.c: Same.
6202 * gcc.dg/graphite/scop-11.c: Same.
6203 * gcc.dg/graphite/scop-12.c: Same.
6204 * gcc.dg/graphite/scop-13.c: Same.
6205 * gcc.dg/graphite/scop-matmult.c: Same.
6206 * gcc.dg/graphite/scop-14.c: Same.
6207 * gcc.dg/graphite/scop-15.c: Same.
6208 * gcc.dg/graphite/block-0.c: Same.
6209 * gcc.dg/graphite/scop-16.c: Same.
6210 * gcc.dg/graphite/block-1.c: Same.
6211 * gcc.dg/graphite/scop-17.c: Same.
6212 * gcc.dg/graphite/scop-18.c: Same.
6213 * gfortran.dg/graphite/block-1.f90: Same.
6214 * gfortran.dg/graphite/scop-1.f: Same.
6215 * gfortran.dg/graphite/block-2.f: Same.
6217 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6219 * graphite.c: Fix some XXX comments.
6220 (build_scop_dynamic_schedules): Removed.
6222 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6224 * graphite.h (scop_max_loop_depth): Moved...
6225 * graphite.c (scop_max_loop_depth): ...here.
6226 (remove_all_edges_1): New.
6227 (remove_all_edges): Factored code.
6228 (remove_cond_exprs): Check only the last statement for
6229 a GIMPLE_COND expression.
6231 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6233 * graphite.c (scan_tree_for_params): Early return when the
6234 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6235 (find_scop_parameters): Factor out code.
6236 (graphite_trans_bb_strip_mine): Remove dead code.
6238 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6240 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6241 graphite_trans_bb_move_loop): Factor asserts.
6242 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6243 Do not call calculate_dominance_info and estimate_bb_frequencies.
6245 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6247 * graphite.c (create_loops_mapping, free_loops_mapping,
6248 create_loops_mapping_num, debug_loop_mapping_1,
6249 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6250 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6251 graphite_loops_mapping_add_child_num,
6252 graphite_loops_mapping_insert_child,
6253 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6254 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6255 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6256 create_num_from_index, get_num_from_index,
6257 swap_loop_mapped_depth): Removed.
6258 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6259 (free_scop): Do not call free_loops_mapping.
6260 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6261 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6262 get_loop_mapped_depth.
6263 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6264 (graphite_trans_bb_strip_mine): Same.
6265 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6266 (struct scop): Remove field loops_mapping.
6268 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6269 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6271 * graphite.c (scop_record_loop): Factor out one level of the
6272 condition by early return.
6273 (build_scop_loop_nests): Format following FSF coding style.
6274 (build_scop_dynamic_schedules): Factor out code.
6275 (scopdet_bb_info): Reindent. Default case should not be reachable.
6277 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6278 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6280 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6281 assignments that are not handled as simple operands for now.
6283 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6284 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6286 * graphite.c (build_scop_bbs): Factor up code.
6288 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6289 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6291 * graphite.c (stmt_simple_for_scop_p): Factor code out
6293 (enum gbb_type): New. Group all the GBB_* types under it.
6294 (is_loop_exit): Moved...
6295 (end_scop): Enable BB spliting.
6296 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6297 * cfgloop.h (is_loop_exit): Declared.
6299 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6301 * doc/invoke.texi: Remove strides from examples containing
6302 DO loops when the strides are equal to 1.
6304 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6305 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6307 * graphite.c (graphite_trans_scop_block): Or the result with
6308 the result from graphite_trans_loop_block.
6309 * gcc.dg/graphite/block-1.c: New.
6310 * gfortran.dg/graphite/block-1.f90: New.
6311 * gfortran.dg/graphite/block-2.f: New.
6313 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6315 * graphite.c (graphite_transform_loops): Call cloog_initialize
6318 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6320 * tree-data-ref.c) (stmt_simple_memref_p): New.
6321 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6322 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6323 (is_simple_operand): Call stmt_simple_memref_p.
6325 * gcc.dg/graphite/scop-matmult.c: Updated for not
6326 using pointer arithmetic, as this is optimized by PRE and
6327 makes the code too difficult to analyze.
6329 * gcc.dg/graphite/scop-18.c: Same.
6331 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6333 * gdbinit.in (pgg): New.
6335 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6337 * graphite.c (graphite_trans_loop_block): Fix warning.
6339 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6341 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6343 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6345 * graphite.c (graphite_trans_bb_block): Remove check for
6346 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6347 Check if loop blocking is profitable for every loop, before applying
6349 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6350 if flag_loop_block is set.
6352 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6354 * graphite.c: Add some more documentation for the loop
6357 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6359 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6360 * graphite.c: Format on less than 80 columns.
6363 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6365 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6367 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6369 * doc/invoke.texi (floop-block, floop-strip-mine,
6370 floop-interchange): Update documentation with examples.
6372 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6374 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6376 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6378 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6380 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6381 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6382 * tree-scalar-evolution.c: Revert useless changes.
6383 * tree-phinodes.c: Same.
6386 * tree-vectorizer.h: Same.
6387 * tree-flow.h: Same.
6389 * common.opt (fgraphite): Update documentation.
6391 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6393 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6394 -floop-interchange): Add more text for explaining what each of these
6396 * tree-into-ssa.c (gimple_vec): Moved to...
6397 * graphite.c: Include gimple.h.
6398 (gimple_vec): Moved to...
6399 (del_loop_to_cloog_loop): Removed.
6400 (loop_affine_expr): Do not call create_data_ref when the
6401 operand is a constant.
6402 (new_scop): Use free instead of del_loop_to_cloog_loop.
6403 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6404 * gimple.h (gimple_vec): ... here.
6406 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6408 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6410 (build_loop_iteration_domains): Fail, if latch executions unknown.
6412 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6414 * graphite.c (add_conditions_to_domain): New.
6415 (build_scop_conditions_1): Call add_conditions_to_domain.
6416 (set_cloog_options): Allow to disable optimizations.
6418 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6420 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6421 Do not use walk_dominator_tree.
6422 (find_scop_parameters): Do not use walk_dominator_tree.
6424 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6426 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6427 (idx_record_params): Adapt.
6428 * graphite.h (scop_gimple_loop_depth): New.
6430 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6432 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6433 (scan_tree_for_params): Remove value_init.
6434 (build_scop_context): Remove value_init.
6435 (build_loop_iteration_domains): Remove value_init.
6436 (schedule_to_scattering): Remove value_init.
6437 (graphite_trans_bb_strip_mine): Remove value_init.
6439 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6441 * gcc/graphite.c (limit_scops): New.
6442 (graphite_transform_loops): Add limit SCoPs.
6443 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6444 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6445 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6446 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6447 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6448 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6449 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6450 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6451 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6452 Change loop numbers.
6453 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6454 Change loop numbers.
6455 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6456 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6457 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6458 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6459 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6460 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6461 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6462 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6463 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6464 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6466 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6468 * graphite.c (graphite_transform_loops): Call always find_transform.
6470 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6472 * graphite.c (free_loops_mapping): New.
6473 (stmt_simple_for_scop_p): Fix typo.
6474 (stmt_simple_for_scop_p): Fix tuples functions, that
6476 (free_graphite_bb): Fix some memleaks.
6477 (free_scop): Fix some memleaks.
6478 (scopdet_bb_info): Do not forget some tmp SCoPs.
6479 (find_params_in_bb): Fix some memleaks.
6480 (clast_to_gcc_expression): Fix warning.
6482 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6484 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6485 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6487 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6489 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6490 Move code ifdef-ed HAVE_cloog...
6491 * graphite.c: Include toplev.h.
6493 * Makefile.in (OBJS-common): Always build graphite.o.
6494 (BACKEND): Remove @GRAPHITE@.
6495 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6496 (graphite.o): Depend on TOPLEV_H.
6498 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6500 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6501 Remove typo left from polylib to ppl conversion.
6502 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6504 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6506 * toplev.c (process_options): Move the graphite loop optimization
6508 * tree-ssa-loop.c (graphite_transforms): ... here.
6509 When not configured with CLooG, print to dump_file that
6510 Graphite transforms were not performed.
6511 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6513 * gcc.dg/graphite/*.c: Updated all testcases to use
6514 scan-graphite-dump-times.
6516 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6518 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6519 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6521 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6522 Jan Sjodin <jan.sjodin@amd.com>
6524 * configure: Regenerated.
6525 * omp-low.c (expand_omp_sections): Remove now unused code.
6526 * config.in (HAVE_polylib): Removed.
6527 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6528 (PPLLIBS, PPLINC): Added.
6529 * graphite.c: Replace unsigned with int wherever possible.
6530 Don't access Cloog's data structures, but use accessor functions.
6531 Clast's stmt->type is now implemented as a vtable: change the
6532 switches of stmt->type into ifs.
6533 (polylib/polylibgmp.h): Don't include.
6534 (initialize_dependence_polyhedron,
6535 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6536 statement_precedes_p, test_dependence, build_rdg_all_levels,
6537 dump_dependence_graph): Removed until this code is cleaned up
6539 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6540 (POLYLIBINC): Renamed PPLINC.
6542 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6543 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6544 Jan Sjodin <jan.sjodin@amd.com>
6546 Finish the merge and tuplification of graphite.
6548 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6549 Jan Sjodin <jan.sjodin@amd.com>
6551 Partial merge from mainline (138072:138275).
6552 * graphite.c still has to be tuplified.
6554 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6556 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6557 (create_num_from_index): New.
6558 (get_num_from_index): Also pass in the graphite BB.
6559 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6560 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6561 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6562 (is_interchange_valid): Return false when failing.
6563 * graphite.h (struct num_map): New.
6564 (struct graphite_bb): New field num_map.
6565 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6567 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6569 * graphite.c (dump_gbb_conditions): Print also conditions like
6570 "if (a)". Remove dublicated code and use print_generic_expr ().
6571 (stmt_simple_for_scop_p): Only allow conditions we can handle
6574 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6576 * graphite.h (struct scop): Removed new_ivs field.
6577 (SCOP_NEWIVS): Deleted.
6578 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6579 clast_to_gcc_expression, graphite_create_new_loop):
6580 Removed use of new_ivs.
6582 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6584 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6585 create_loops_mapping_num, debug_loop_mapping_1): New.
6586 (debug_loop_mapping): Call debug_loop_mapping_1.
6587 (get_loop_mapping_for_num,
6588 graphite_loops_mapping_add_child,
6589 graphite_loops_mapping_add_child_num,
6590 graphite_loops_mapping_insert_child,
6591 graphite_loops_mapping_parent,
6592 split_loop_mapped_depth_for_num,
6593 loop_mapped_depth_split_loop): New.
6594 (increment_loop_mapped_depths): Removed.
6595 (swap_loop_mapped_depth_for_num): Reimplemented.
6596 (new_scop): Call create_loops_mapping.
6597 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6598 (translate_clast): Pass the old loop father in parameter, and pass
6599 it to get_old_iv_from_ssa_name.
6600 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6601 can_generate_code, can_generate_for_scop): New.
6602 (graphite_trans_bb_block): Returns false when it fails to transform.
6603 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6605 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6607 Reverted all the changes related to the streamization and
6609 These changes are now tracked in the streamization branch.
6611 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6612 Jan Sjodin <jan.sjodin@amd.com>
6614 * graphite.c (gbb_compare): Correctly constify.
6615 (gbb_can_be_ignored): Indent.
6616 (graphite_trans_scop_swap_1and2): Add legality check.
6619 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6621 Remove fallouts from "Reverted the Condate changes".
6622 * tree.h: Remove unused decl.
6623 * gcc.dg/tree-checker: Same.
6624 * timevar.def: Remove counter.
6626 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6628 * Merge from mainline (135673:138072).
6630 Reverted the MIRO changes (from 2008-04-05) that are now
6631 tracked in the miro branch.
6632 * tree-bounds.c: Removed.
6633 * tree-bounds.h: Removed.
6635 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6636 are now tracked in the condate branch.
6637 * tree-check.c: Removed.
6638 * tree-match.c: Removed.
6639 * condate.y: Removed.
6641 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6643 * common.opt: New user flag -floop-block, -floop-strip-mine
6644 and -floop-interchange.
6645 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6646 graphite loop optimization flags is turned on.
6647 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6648 flag_loop_strip_mine and flag_loop_interchange checks before
6650 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6651 -floop-strip-mine and -floop-interchange.
6652 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6654 * gcc.dg/graphite/scop-16.c: Ditto.
6655 * gcc.dg/graphite/scop-17.c: Ditto.
6656 * gcc.dg/graphite/scop-18.c: Ditto.
6658 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6659 Sebastian Pop <sebastian.pop@amd.com>
6661 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6662 (create_empty_loop_on_edge): More fixes.
6663 * tree-phinodes.c (resize_phi_node): Extern.
6664 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6665 * cfghooks.c (update_dominator_information): New split from
6667 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6668 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6669 successor of the function entry block.
6671 * graphite.c: Include pointer-set.h.
6672 (debug_loop_mapping, increment_loop_mapped_depths,
6673 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6674 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6675 swap_loop_mapped_depth_for_num, get_num_from_index,
6676 swap_loop_mapped_depth, loop_iv_stack_debug,
6677 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6678 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6679 get_old_iv_from_ssa_name): New.
6680 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6681 (free_scop): Free SCOP_LOOPS_MAPPING.
6682 (scop_record_loop): Record old ivs.
6683 (create_var_name): Removed.
6684 (initialize_cloog_names): Allocate double space in case strip mine
6685 applies to all loops once.
6686 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6687 (clast_to_gcc_expression): Same. Implement more clast to gimple
6689 (graphite_create_new_loop): Pass in ivstack.
6690 (remove_all_edges): Pass in the construction_edge.
6691 (graphite_remove_iv): Removed.
6692 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6693 remove_cond_exprs): Rewritten.
6694 (move_phi_nodes): New.
6695 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6696 (translate_clast): Pass in ivstack. Rewrite some cases.
6697 (set_cloog_options, debug_clast_stmt): New.
6698 (find_transform): Use set_cloog_options.
6699 (outermost_loop_layer): Removed.
6700 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6701 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6702 mark_old_loops, remove_dead_loops): New.
6704 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6705 (const_column_index, get_first_matching_sign_row_index,
6706 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6707 get_upper_bound): New.
6708 (graphite_trans_bb_strip_mine): Also update the iv map.
6710 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6711 (struct name_tree): Add a loop field.
6712 (struct scop): Add a graphite_loops_mapping field.
6713 (SCOP_LOOPS_MAPPING): New.
6714 (debug_clast_stmt): Declare.
6715 * lambda.h (find_induction_var_from_exit_cond): Declare.
6716 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6717 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6718 (create_empty_loop_on_edge): Updated.
6719 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6720 rename_variables_in_bb): Declare.
6721 * tree-cfg.c (remove_bb): Extern.
6723 * gcc.dg/graphite/block-0.c: New.
6725 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6726 Sebastian Pop <sebastian.pop@amd.com>
6728 * graphite.c (strip_mine_profitable_p): New.
6729 (graphite_trans_bb_block): Disable strip mining if not profitable.
6731 * gcc.dg/graphite/scop-18.c: New.
6732 * gcc.dg/graphite/scop-17.c: Fixed.
6733 * gcc.dg/graphite/scop-16.c: Fixed.
6735 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6736 Jan Sjodin <jan.sjodin@amd.com>
6737 Sebastian Pop <sebastian.pop@amd.com>
6739 * graphite.c (is_interchange_valid): New.
6740 (graphite_trans_bb_block): Check loop nest of basic block for legality
6743 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6744 outer_most_loop, gbb_outer_most_loop_index): New.
6746 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6747 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6748 * gcc.dg/graphite/scop-16.c: New.
6749 * gcc.dg/graphite/scop-17.c: New.
6751 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6753 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6754 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6756 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6758 * graphite.c (new_scop): Initialize SCOP_EXIT.
6759 (scopdet_info): Add.
6760 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6761 (build_scops_1): Cleanup, bugfixes.
6762 (build_scops): Cleanup.
6764 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6765 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6767 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6769 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6771 * gfortran.dg/graphite/graphite.exp: Use
6772 DEFAULT_GRAPHITE_FLAGS.
6774 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6776 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6778 * graphite.c (scan_tree_for_params): Do not assert any more if
6779 MULT_EXPR parameter is negative.
6781 * gfortran.dg/graphite/scop-1.f: New.
6783 * gfortran.dg/graphite/graphite.exp: New.
6785 * gcc.dg/graphite/scop-15.c: New.
6787 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6789 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6791 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6793 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6794 graphite_swap_loops.
6795 (graphite_trans_bb_move_loop): New.
6796 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6797 (graphite_trans_bb_block): New.
6798 (graphite_trans_loop_block): New.
6799 (graphite_trans_scop_swap_1and2): Rename from
6800 graphite_trans_swap_1and2.
6801 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6802 (graphite_trans_scop_block): New.
6803 (graphite_apply_transformations): Rename from
6804 graphite_transformations.
6806 * gcc.dg/graphite/scop-matmult.c: New.
6808 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6810 * graphite.c (gbb_compare): New.
6811 (graphite_sort_gbbs): New.
6812 (gbb_can_be_ignored): New.
6813 (scop_remove_ignoreable_gbbs): New.
6814 (graphite_transformations): Cleanup and add
6815 scop_remove_ignoreable_gbbs.
6816 * lambda.h (lambda_vector_compare): New.
6818 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6820 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6821 (graphite_swap_loops): int -> unsigned
6822 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6823 (graphite_transformations): New.
6824 (graphite_transform_loops): Move to graphite_transformations.
6825 * graphite.h (gbb_nb_loops): Return unsigned.
6827 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6829 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6830 the domain matrix. This makes scop-0.c work again.
6832 2008-06-20 Richard Guenther <rguenther@suse.de>
6834 * graphite.h: Adjust copyright to GPLv3.
6835 * graphite.c: Likewise.
6836 (stmt_simple_memref_for_scop_p): Split out from ...
6837 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6839 (get_bb_type): Optimize.
6841 (is_bb_addable): Fix memleak, replace is_pred call with
6843 (build_scops): Use current_loops.
6844 (param_index): Fix memleak.
6846 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6848 * graphite.c: Fix formatting.
6850 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6852 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6853 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6854 (create_var_name, save_var_name): Newly defined functions.
6855 (initialize_cloog_names): Part of the code factored out to
6857 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6858 in clast_reduction statement.
6859 (graphite_create_new_loop): Now takes a new parameter
6861 (translate_clast): Now also takes the context_loop and bb_exit
6862 parameters. Rewritten the code so that it creates a gimple code
6863 inside the given context.
6864 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6865 remove_cond_expr, disconnect_cond_expr,
6866 disconnect_virtual_phi_nodes): Newly defined functions.
6867 * graphite.h (struct scop): added old_ivs vector.
6868 SCOP_OLDIVS: New macro.
6870 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6872 * cfgloopmanip.c: Add missing function comments, fix formatting.
6874 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6876 * cfgloopmanip.c (update_dominators_in_loop): Defined.
6877 (create_empty_loop_on_edge): Defined.
6878 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
6880 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
6881 (update_dominators_in_loop): Declared as extern
6882 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
6884 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
6886 * graphite.c (print_graphite_bb): Allow changing number of loops
6888 (initialize_cloog_names): Allow changing number of loops.
6889 (build_cloog_prog): Simplify.
6890 (find_transform): Enable cloog option --strides.
6891 (graphite_swap_loops): New.
6892 (graphite_strip_mine_loop): New.
6893 (graphite_trans_swap_1and2): New.
6894 (graphite_trans_strip): New.
6895 (graphite_transform_loops): Add graphite_trans_strip.
6896 * graphite.h (scop_max_loop_depth): New.
6898 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6900 * graphite.c (build_scop_iteration_domain): Remove forgotten
6901 line. (Fixes compile)
6903 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6905 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
6906 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
6907 (build_bb_loops): New.
6908 (graphite_transform_loops): Add build_bb_loops.
6909 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
6911 * graphite.h (graphite_bb): Add loops.
6912 (gbb_nb_loops): New.
6913 (gbb_loop_at_index): New.
6914 (gbb_loop_index): New.
6915 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
6916 using nb_params_in_scop.
6918 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6920 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
6921 (build_scop_canonical_schedules): Build minimized schedule.
6922 (schedule_to_scattering): Adapt to minimized schedule.
6923 * graphite.h (graphite_bb): Add/Update descriptions.
6925 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
6926 Tobias Grosser <grosser@fim.uni-passau.de>
6928 * graphite.c (print_graphite_bb): Add condition printing.
6930 (dump_gbb_conditions): New.
6931 (build_scop_conditions_1): New.
6932 (build_scop_conditions): New.
6933 * graphite.h (graphite_bb): Add conditions.
6935 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6937 * graphite.c (print_graphite_bb):
6938 (free_graphite_bb): New.
6939 (free_scop): Free bbs.
6940 (get_bb_type): Free doms.
6941 (build_scop_context): Free context matrix.
6942 (build_loop_iteration_domains): Remove unused code.
6943 (build_cloog_prog): Free scattering function and blocklist.
6944 (find_transform): Free options.
6946 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
6948 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
6949 Remove unnecessery cloog data structures. Make a copy of the domain
6950 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
6951 unnecessary cloog data structures. Fix memory leaks. Remove insert
6952 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
6954 (build_scop_iteration_domain): Remove unnecessary cloog
6955 data structures. Fix memory leaks.
6956 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
6957 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
6959 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6961 * graphite.c (find_scop_params): Remove initialize_cloog_names.
6963 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6965 * graphite.c (end_scop): Style fix.
6966 (schedule_to_scattering): Style and comment fix.
6968 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6969 * graphite.c (print_graphite_bb): Fix definiton of
6970 schedule_to_scattering.
6971 (initialize_cloog_names): Change nb_scattdims to max loop
6973 (schedule_to_scattering): Take parameter for number of scattering
6975 (build_cloog_prog): Only build as much scattering dimensions as
6978 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6980 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
6981 in polyhedron/aermod.f90.
6983 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
6984 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6985 Harsha Jagasia <harsha.jagasia@amd.com>
6987 * graphite.c (is_bb_addable): Fix segfault.
6989 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
6991 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
6992 with multiple exits and conditional handling in edge cases.
6993 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
6995 * gcc.dg/graphite/scop-14.c: New.
6997 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
6998 Adrien Eliche <aeliche@isty.uvsq.fr>
7000 * graphite.c (is_bb_addable): Add more comments and enhance
7001 readablity of the source code. Fix memory leak.
7002 (is_loop_exit): Fix memory leak.
7004 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7006 * graphite.c (first_loop_in_scop): Deleted.
7007 (setup_cloog_loop): Only walk the loop chain for inner loops.
7008 (build_scop_iteration_domain): Execute setup_cloog_loop for
7009 all loops in the first layer.
7011 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7013 * graphite.c (scan_tree_for_params): Change the way params are
7014 added to be indepenent of the number of loops.
7015 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7017 (build_cloog_prog): Revert to short matrix format.
7019 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7020 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7022 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7025 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7027 * graphite.c (nb_data_refs_in_scop): New.
7028 (graphite_transform_loops): Print more stats: number of
7029 loops, basic blocks and data references per scop.
7031 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7032 Jan Sjodin <jan.sjodin@amd.com>
7034 * graphite.c (loop_affine_expr, idx_record_params,
7035 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7036 instead of instantiate_parameters.
7038 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7040 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7041 add support for parameters, add STATIC_SCHEDULE at the right places,
7044 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7046 * graphite.c (build_scop_loop_nests): Only add the loops, that
7047 are contained completely in the SCoP.
7048 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7049 and the domains are fixed.
7050 (build_scop_canonical_schedules): Add support for bbs not contained
7053 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7055 * graphite.h (scop_contains_loop): Update comments to match
7056 the actual behavior.
7057 (scop_contains_loop): New.
7058 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7060 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7062 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7063 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7066 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7067 Tobias Grosser <grosser@fim.uni-passau.de>
7069 * graphite.c (graphite_transform_loops): Early return when
7070 there are no loops in the function.
7072 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7073 Jan Sjodin <jan.sjodin@amd.com>
7075 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7076 offset of the last loop.
7077 (setup_cloog_loop): Copy the entire outer constraint matrix.
7079 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7080 Jan Sjodin <jan.sjodin@amd.com>
7082 * graphite.c (stmt_in_scop_p, function_parameter_p,
7083 invariant_in_scop_p): Removed.
7084 (scan_tree_for_params): Can be used with no constraint
7085 matrix for gathering parameters.
7086 (idx_record_params): Don't use idx_record_param, instead use
7087 scan_tree_for_params.
7088 (find_scop_parameters): Same.
7089 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7090 Fix the size of loop domains.
7091 (schedule_to_scattering): Exit when the outer loop is not in scop.
7092 (find_transform): Enable build_cloog_prog.
7094 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7095 Jan Sjodin <jan.sjodin@amd.com>
7097 * graphite.c (schedule_to_scattering): Make scattering domains
7098 uniformly of the same size, as required by CLooG 0.14.0 and before.
7100 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7101 Jan Sjodin <jan.sjodin@amd.com>
7103 * graphite.c (schedule_to_scattering): Rewrite, correct the
7104 translation of the scheduling function to scattering.
7105 (build_cloog_prog): Call schedule_to_scattering only once.
7106 * graphite.h (scop_loop_index): Do not fail for loops not
7107 in the scop: return -1.
7109 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7111 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7112 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7113 (setup_cloog_loop): Export GBB_DOMAIN.
7114 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7115 able to rebuild the original control flow.
7116 * graphite.h (graphite_bb): Add domain field and access macro.
7119 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7121 * graphite.c (debug_gbb): New.
7122 (print_scop, build_graphite_bb): Use SCOP_BBS.
7123 (build_scop_bbs): Reimplemented.
7124 (dfs_bb_in_scop_p): Removed.
7125 (build_scop_loop_nests): Reorder loops inserted in
7126 SCOP_LOOP_NEST: outer loops should come first.
7127 (build_scop_canonical_schedules): Reinitialize at zero
7128 the components of the SCOP_STATIC_SCHEDULE for the loops
7129 that have already been parsed.
7131 * graphite.h (debug_gbb): Declared.
7133 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7134 Jan Sjodin <jan.sjodin@amd.com>
7136 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7137 (graphite_loop_to_gcc_loop): Removed.
7138 (remove_all_edges): New.
7139 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7140 (gloog): Remove useless code.
7142 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7144 * graphite.c (get_bb_type): Reworked. We distinguish between
7145 loops with one or multiple exits.
7146 (is_loop_exit): New.
7148 (is_bb_addable): Rework condition handling, now support for case
7149 case statements and loops with multiple exits.
7151 * gcc.dg/graphite/scop-11.c: New.
7152 * gcc.dg/graphite/scop-12.c: New.
7153 * gcc.dg/graphite/scop-13.c: New.
7155 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7157 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7158 we have too many colors.
7160 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7162 * doc/invoke.texi (-ftree-loop-fusion): Document.
7163 * tree-pass.h (pass_loop_fusion): Declared.
7164 * tree-loop-fusion.c: New.
7165 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7166 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7167 * tree-data-ref.h (find_data_references_in_loop): Declared.
7168 * common.opt (ftree-loop-fusion): Declared.
7169 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7171 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7173 * graphite.c (build_access_matrix): Fix typo from the merge.
7175 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7177 * Merge from mainline (130800:135673).
7179 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7181 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7182 Update dominators after splitting.
7184 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7186 * graphite.c (is_bb_addable): Return the harmful statement.
7187 Factor up some code.
7188 (end_scop): New. Splits end of scope bbs on a harmful statement.
7189 (build_scops_1): Call end_scop.
7191 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7193 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7194 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7195 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7196 build_scops_1): Removed.
7197 (build_scops_2): Renamed build_scops_1.
7199 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7201 * graphite.c: Fix formatting.
7203 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7205 * graphite.c (get_bb_type): New.
7207 (build_scops_2): New.
7208 (is_bb_addable): New.
7209 (build_scops): Switch the scop detection.
7210 (build_scop_bbs): Add entry bb to scop.
7211 * graphite.h (struct scop): Update comment.
7213 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7215 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7218 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7220 * gcc.dg/graphite/scop-1.c: Update.
7221 * gcc.dg/graphite/scop-2.c: Update.
7222 * gcc.dg/graphite/scop-4.c: Update.
7223 * gcc.dg/graphite/scop-5.c: Add.
7224 * gcc.dg/graphite/scop-6.c: Add.
7226 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7228 * gcc.dg/graphite/scop-0.c: Add.
7229 * gcc.dg/graphite/scop-7.c: Add.
7230 * gcc.dg/graphite/scop-8.c: Add.
7231 * gcc.dg/graphite/scop-9.c: Add.
7232 * gcc.dg/graphite/scop-10.c: Add.
7234 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7236 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7237 Check affine expressions depending on the outermost loop
7239 (stmt_simple_for_scop_p): Same.
7240 (harmfule_stmt_in_scop): Same.
7242 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7244 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7245 mark entry and exit, that are not part of the SCoP and update HTML
7248 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7250 * graphite.c (basic_block_simple_for_scop_p): Renamed
7252 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7253 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7254 (all_preds_visited_p, all_succs_visited_p,
7255 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7256 scop_end_loop): New.
7257 (build_scops): Do not use dfs_enumerate_from.
7259 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7261 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7263 * graphite.c: Add comments to functions that are missing a
7265 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7267 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7269 * graphite.c (nb_params_in_scop): Moved...
7270 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7271 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7272 (clast_to_gcc_expression): Reduce column size to less than 80.
7273 (graphite_create_iv): Return the new name of the IV.
7274 (find_transform): Set options->esp and options->cpp.
7275 (gloog): Comment out the invalidation of the old loop code.
7276 (initialize_dependence_polyhedron): Replace scop_nb_params with
7279 * graphite.h (nb_params_in_scop): ... here.
7280 (scop_nb_params): Removed.
7281 (loop_domain_dim): Return something even when the loop was not
7282 found in the hash table: avoid ICEing on all the graphite.exp
7285 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7287 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7289 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7290 according to nesting level.
7291 (find_scop_parameters): Call instantiate_parameters.
7292 (scan_tree_for_params): Extend it to handle general affine bounds.
7293 Inner loop bound can depend on outer loop induction variable.
7294 (setup_cloog_loop): tmp variable is allocated on stack. Call
7295 instantiate_parameters with respect to outermost_loop_in_scop.
7296 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7298 (create_empty_loop): Function loopify should be given edge
7299 probability, instead of edge frequency. Dominance relation from
7300 switch_bb to loop_header.
7301 (clast_to_gcc_expression): Added handling of clast_reduction node.
7302 (gloog): New functionality for removing old loop.
7303 (test_dependence): Factored out from build_rdg_all_levels.
7304 (build_rdg_all_levels): Dependence testing factored out to
7305 test_dependence function.
7307 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7308 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7311 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7313 * graphite.c (free_scop, param_index, initialize_cloog_names,
7314 nb_params_in_scop): Use name_tree map instead of just a tree
7315 for keeping track of the variable name associated to that tree.
7316 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7317 clast_to_gcc_expression, graphite_create_iv,
7318 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7319 graphite_stmt_to_gcc_stmt): New.
7320 (gloog): Call these.
7321 * graphite.h (struct name_tree): New.
7322 (struct scop): Use name_tree instead of tree for params.
7323 Store a vector of name_tree for new_ivs.
7325 (scop_nb_params): Use name_tree instead of tree.
7327 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7328 Sebastian Pop <sebastian.pop@amd.com>
7330 * tree-bounds.c: New.
7331 * tree-bounds.h: New.
7332 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7333 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7334 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7338 * c-cppbuiltin.c: Same.
7342 * tree-outof-ssa.c: Same.
7344 * Makefile.in: Same.
7346 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7347 Sebastian Pop <sebastian.pop@amd.com>
7349 * tree-loop-distribution.c (remaining_stmts,
7350 upstream_mem_writes): Removed static variables.
7351 (copy_loop_before, create_bb_after_loop,
7352 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7353 rdg_build_components, rdg_build_partitions,
7354 dump_rdg_partitions): Extern.
7355 (generate_loops_for_partition, generate_code_for_partition): Do not
7357 (already_processed_vertex_p, predecessor_has_mem_write,
7358 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7359 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7360 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7361 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7362 Pass remaining_stmts and upstream_mem_writes as parameters.
7363 (rdg_component): Moved...
7364 (build_rdg_partition_for_component): Do not aggregate components when
7365 flag_streamize_loops is set.
7366 (gen_sequential_loops): New.
7367 (ldist_gen): Call gen_sequential_loops.
7369 * tree-pass.h (pass_loop_streamization): Declared.
7371 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7372 basic blocks when loops structures exist.
7374 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7376 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7378 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7379 eliminate_local_variables_stmt, eliminate_local_variables,
7380 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7381 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7382 of code delimited by two edges in the CFG.
7383 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7384 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7385 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7386 the case of parallelisation of reductions.
7387 (create_loop_fn): Extern.
7388 (create_omp_parallel_region): New.
7390 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7391 dump_data_reference for printing dra and drb.
7392 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7394 (build_rdg): Don't call free_dependence_relations for the moment, as
7395 we attach dependence relations on each edge of the RDG.
7398 * tree-data-ref.h (rdg_component): ...here.
7399 (struct rdg_edge): New field ddr_p relation.
7400 (RDGE_RELATION): New.
7401 (create_bb_after_loop, copy_loop_before,
7402 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7403 rdg_build_partitions, dump_rdg_partitions,
7404 free_rdg_components): Declared.
7406 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7407 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7409 * tree-loop-streamization.c: New.
7411 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7412 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7414 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7416 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7418 * passes.c: Schedule pass_loop_streamization.
7420 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7422 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7425 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7427 * graphite.c (dot_all_scops): Update formatting.
7428 Bbs can now be part of more than one SCoP.
7430 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7432 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7434 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7435 * graphite.h (loop_to_cloog_loop): New.
7437 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7439 * graphite.c (loop_domain_dim, ref_nb_loops,
7440 loop_iteration_vector_dim): New.
7441 (build_access_matrix_with_af, build_access_matrix,
7442 initialize_dependence_polyhedron): Fixed for new matrix layout.
7443 No longer assume that all iteration domains are of the same
7446 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7448 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7449 defined in a loop at depth 0 is invariant.
7450 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7451 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7452 be called at loop depth 0.
7454 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7456 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7457 (down_open_scop): Removed.
7458 (loop_in_scop_p): Redefined.
7459 (scop_affine_expr): New argument: scop.
7460 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7461 a harmful statement ending a scop.
7462 (basic_block_simple_for_scop_p): New argument: scop.
7463 (get_loop_start): Removed.
7464 (new_scop): Initialize SCOP_LOOPS.
7465 (free_scop): Free SCOP_LOOPS.
7466 (succs_at_same_depth, preds_at_same_depth): New.
7467 (end_scop): Test the validity of a scop.
7468 (add_dominators_to_open_scops): New.
7469 (test_for_scop_bound): Call add_dominators_to_open_scops.
7470 Add cases for opening and closing multiple scops.
7471 (build_scops, build_scop_bbs): Iterate over basic blocks in
7473 (build_graphite_bb): Pass scop directly.
7474 (dfs_bb_in_scop_p): New.
7475 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7477 (nb_loops_around_gb): Use loop_in_scop_p.
7478 (schedule_to_scattering): Disabled for the moment the code computing
7479 the "textual order for outer loop".
7481 * graphite.h (struct scop): New field loops.
7483 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7485 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7487 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7488 Sebastian Pop <sebastian.pop@amd.com>
7490 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7491 * common.opt (fstreamize-loops): New.
7492 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7493 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7494 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7495 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7497 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7499 * tree-data-ref.c (build_empty_rdg): New.
7500 (build_rdg): Use it.
7501 * tree-data-ref.h (build_empty_rdg): Declared.
7502 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7503 (find_vertex_for_stmt): Removed.
7504 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7506 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7508 * tree-loop-distribution.c (generate_builtin): After cancelling the
7509 loop tree, also delete basic blocks.
7510 (rdg_flag_uses): Stop recursion when a vertex has already been
7513 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7515 * graphite.c (build_scop_alpha): Removed.
7516 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7517 and dump_dependence_graph to avoid compiler warnings.
7519 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7521 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7522 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7523 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7524 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7525 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7526 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7527 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7528 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7529 dump_dependence_graph): New.
7530 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7532 (struct scop): New field loop2cloog_loop.
7533 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7534 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7536 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7538 * graphite.c (build_graphite_bb): Fix initialization
7539 of the graphite basic block.
7541 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7543 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7544 loop domain matrix. Pass in the number of loops contained in the
7546 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7547 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7548 loops that are not surrounding the current loop are not represented
7549 in the domain constraint matrix.
7550 (build_scop_iteration_domain): Initial domain constraint matrix
7551 contains only the eq/ineq, cst, and scop parameters columns.
7553 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7555 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7556 (print_graphite_bb): Print scattering.
7558 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7560 * graphite.c (initialize_cloog_names): Initialize names of
7561 scattering variables.
7563 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7565 * graphite.c (dot_all_scops_1): Disable debug output while
7568 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7570 * graphite.c (find_transform): Change cloog output language to C.
7572 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7574 * tree-loop-distribution.c (generate_memset_zero,
7575 generate_builtin, generate_code_for_partition,
7576 rdg_flag_all_uses): New.
7577 (rdg_flag_uses): Gather in the same partition the statements defining
7578 the VUSES of the current statement.
7579 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7580 Gather in the same partition not only the stores to the same memory
7581 access, but also the reads.
7582 (ldist_generate_loops): Renamed ldist_gen.
7584 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7585 Tobias Grosser <grosser@fmi.uni-passau.de>
7587 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7588 next pointer, don't use the inner pointer.
7590 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7592 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7593 (find_transform): Call dot_all_1.
7594 * graphite.h (dot_all_scops): Declared.
7596 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7598 * tree-loop-distribution.c: Fix apsi.f ICE.
7599 (create_bb_after_loop): New.
7600 (generate_loops_for_partition): Use it.
7601 * gfortran.dg/ldist-1.f90: New.
7603 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7604 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7606 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7608 * graphite.c (find_transform): Dump cloog program sent to cloog.
7610 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7612 * graphite.c (initialize_cloog_names): Initialize cloog
7615 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7617 * graphite.c (build_scop_context): Fix typo, for the matrix
7618 format: insert '0 >= 0' instead of '-1 >= 0'.
7620 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7622 * Fix merge problems.
7624 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7626 * graphite.c (setup_cloog_loop): Fix typo.
7628 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7630 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7631 * tree-loop-distribution.c: Reimplemented.
7632 * tree-pass.h (pass_loop_distribution): New.
7633 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7635 * graphds.h (struct graph): New field indexes.
7636 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7638 * tree-vect-analyze.c: Remove declaration of static functions when not
7640 * tree-vectorizer.c: Same.
7641 (rename_variables_in_loop): Now extern.
7642 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7643 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7644 calling redirect_edge_and_branch_force.
7646 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7648 * tree-data-ref.c: Don't include tree-chrec.h.
7649 (debug_data_dependence_relations): New.
7650 (dump_data_dependence_relation): Call dump_data_reference on data refs
7652 (same_access_functions): Moved...
7653 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7654 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7655 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7656 struct rdg_vertex_info, ): New.
7657 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7659 (create_rdg_vertices): Initialize the htab of graph->indexes.
7660 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7661 (stmts_from_loop): Don't save LABEL_EXPR.
7662 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7663 hash_stmt_vertex_del): New.
7664 (build_rdg): Initialize rdg->indexes.
7665 (free_rdg, stores_from_loop, ref_base_address,
7666 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7667 have_similar_memory_accesses_1, ref_base_address_1,
7668 remove_similar_memory_refs): New.
7670 * tree-data-ref.h: Include tree-chrec.h.
7671 (debug_data_dependence_relations): Declared.
7672 (same_access_functions): ...here. Now static inline.
7673 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7674 ddr_dependence_level): New.
7675 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7676 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7677 RDG_MEM_READS_STMT): New.
7678 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7679 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7680 rdg_vertex_for_stmt): Declared.
7681 (struct rdg_edge): New field level.
7682 (RDGE_LEVEL, free_rdg): New.
7683 (stores_from_loop, remove_similar_memory_refs,
7684 rdg_defs_used_in_other_loops_p,
7685 have_similar_memory_accesses): Declared.
7686 (rdg_has_similar_memory_accesses): New.
7688 * lambda.h (dependence_level): New.
7689 * common.opt (ftree-loop-distribution): New.
7690 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7691 (print_loop_ir): Renamed print_loops.
7692 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7693 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7694 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7695 (tree-loop-distribution.o): Added.
7696 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7697 (mark_virtual_ops_in_bb): New.
7698 (print_loops_bb, debug_loop_num, debug_loop): New.
7699 * passes.c: Scheduled pass_loop_distribution.
7701 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7703 * graphite.c (scan_tree_for_params): Correct the number of columns
7705 (nb_flat_iterator): New.
7706 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7707 (build_scop_iteration_domain): Correct the number of columns for
7710 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7712 * Merge from mainline (129697:130800).
7714 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7716 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7717 dominated by SCoP's exit.
7718 (graphite_transform_loops): Compute post dominators.
7720 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7722 * Merge from mainline (127169:129697).
7724 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7726 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7727 parameter for the basic block that contains the expression. Use
7728 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7729 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7731 * graphite.h (gbb_loop): New.
7732 (GBB_LOOP): Removed.
7734 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7736 * Makefile.in: Fix merge problem.
7738 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7740 * Merge from mainline (125309:127169).
7741 * tree-loop-distribution.c: Disabled.
7743 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7745 * Merge from mainline (r123693:125309).
7747 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7749 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7751 (correct_modify_p, check_statements, number_of_lvalue_uses,
7752 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7753 instead of MODIFY_EXPR.
7754 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7757 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7759 * tree-loop-distribution.c (struct rdg): Replace arrays by
7760 VECs for edges and vertices.
7761 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7762 (RDGV_NB_PARTITIONS): New.
7763 (PRDG_NBV, PRDG_NBE): Removed.
7764 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7765 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7766 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7768 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7769 Sebastian Pop <sebpop@gmail.com>
7771 * doc/invoke.texi (-ftree-loop-distribution): Document.
7772 * tree-loop-distribution.c: New file.
7773 * tree-pass.h (pass_loop_distribution): Declared.
7774 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7775 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7777 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7778 (DDR_REVERSED_P): New.
7779 * common.opt (-ftree-loop-distribution): New.
7780 * tree-flow.h (distribute_loops): Declared.
7781 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7782 * passes.c (init_optimization_passes): Schedule loop distribution.
7784 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7786 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7787 (print_scop): Don't print when scop is NULL.
7788 (build_scop_context, find_transform): Don't output to stderr.
7790 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7792 * tree-data-ref.c: Don't include graphite.h.
7793 Comment out the code for printing data reference's scop.
7794 (build_access_matrix_with_af): Moved...
7795 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7796 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7797 (print_graphite_bb): Print basic block's schedule.
7798 (print_scop): Don't print the schedule, call cloog's pretty printer.
7799 (bb_in_scop_p): A basic block is in a scop only if it is both
7800 dominated and postdominated by the scop's entry and exit basic blocks.
7801 (function_parameter_p): New.
7802 (invariant_in_scop_p): Use function_parameter_p.
7803 (new_scop, save_scop): New.
7804 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7806 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7807 (loop_in_scop_p): New.
7808 (scop_record_loop): Use loop_in_scop_p.
7809 (build_scop_domain): Renamed build_scop_iteration_domain.
7810 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7811 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7812 setup_cloog_loop, dot_scop_1, dot_scop): New.
7813 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7814 (struct scop): Add a pointer to cloog's representation of a program.
7816 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7818 * doc/invoke.texi (-ftree-check-verbose): Renamed
7819 -ftree-checks-verbose.
7820 * common.opt (flag_tree_check_verbose): Renamed
7821 flag_tree_checks_verbose.
7822 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7824 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7826 * configure: Regenerated.
7827 * config.in: Regenerated.
7828 * tree-ssa-loop.c (graphite_transforms): Execute
7829 graphite_transform_loops only when HAVE_cloog.
7830 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7831 * graphite.c: Include polylibgmp.h and cloog.h.
7832 (graphite_transform_loops): Removed loops parameter.
7833 * tree-flow.h (graphite_transform_loops): Update declaration.
7834 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7835 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7836 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7837 (OBJS-common): Remove dependence on graphite.o.
7838 (BACKEND): Depend on @GRAPHITE@.
7840 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7842 * doc/invoke.texi (-ftree-check-verbose): Documented.
7843 * gcc.dg/tree-checker/tree-checks-1.c: New.
7844 * gcc.dg/tree-checker/tree-checks-2.c: New.
7845 * gcc.dg/tree-checker/tree-checks-3.c: New.
7846 * gcc.dg/tree-checker/tree-checks-4.c: New.
7847 * gcc.dg/tree-checker/tree-checks.exp: New.
7848 * gcc.dg/tree-checker/condates.crp: New.
7849 * common.opt (ftree-checks-verbose): New.
7850 * tree-check.c (tree_check_warning): Move extra stderr output
7851 under control of flag_tree_check_verbose.
7853 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7855 * tree-match.c: Fix comments formatting.
7856 * tree-match.h: Fix comments formatting.
7857 * tree-check.c: Fix comments formatting.
7858 (tree_check_init): Restructure.
7860 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7862 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7864 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7866 * Merge from mainline (r120733:123693).
7868 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7870 * condate.y: New file.
7871 * tree-match.h (struct patt_info_s): New field sign.
7872 (struct condate_s): New field msg.
7873 (normalize_condate, name_condate, add_condate): New.
7874 (conds[], condate_parse): Made extern.
7875 * tree-check.c (tree_check_warning): First arg changed to cond;
7876 warning reformatted.
7877 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
7879 (tree_check): Process trivial condates.
7880 (read_delimited_string): Removed.
7881 (print_cond): Print name and msg.
7882 (conds[]): Made extern.
7883 (parse_tree_check_file_once): Rewritten to use the parser in
7885 Processing of option --tree_check_string moved to tree_scan().
7886 * Makefile.in: Added condate.y
7888 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
7890 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
7891 Use VECs instead of varrays.
7892 * diagnostic.h (lazy_dump_generic_node): Update declaration.
7893 * Makefile.in (pretty-print.o): Depend on vec.h.
7894 * pretty-print.c: Include tree.h and vec.h.
7895 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
7896 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
7897 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
7898 pp_free_list): Use VECs instead of varrays.
7899 * pretty-print.h: Do not include varray.h.
7900 (struct tree_chunk_s): Declaration moved before its use.
7901 (output_buffer): Rename varray field to chunks.
7902 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
7903 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
7904 save_global_holes): Use VECs instead of varrays.
7905 * tree-match.h: Declare VECs of cfg_node, and hole_p.
7906 * tree-check.c (scan_cfg_stmts, push_node,
7907 print_matching_stmt): Removed.
7908 (tree_check_instance, push_global_holes_if_new, tree_check,
7909 execute_tree_check): Use VECs instead of varrays.
7910 (gate_tree_check): Don't execute the CFG check when basic_block_info
7913 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7915 * Merge from mainline (r115016:120733).
7917 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7919 * Merge from mainline (r117632:117661).
7921 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7923 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
7924 * tree-pass.h (TDF_DEBUG, debug_p): New.
7925 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
7926 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
7927 get_loop_exit_condition, analyze_evolution_in_loop,
7928 analyze_initial_condition, analyze_scalar_evolution,
7929 instantiate_parameters, number_of_latch_executions): Use debug_p.
7930 * tree-chrec.c (chrec_apply): Use debug_p.
7931 * tree-data-ref.c: Include graphite.h.
7932 (dump_data_reference): Print also the access matrix.
7933 (analyze_array, analyze_indirect_ref, init_data_ref,
7934 analyze_offset_expr, address_analysis, object_analysis,
7935 create_data_ref, finalize_ddr_dependent,
7936 non_affine_dependence_relation, analyze_ziv_subscript,
7937 analyze_siv_subscript_cst_affine,
7938 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
7939 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
7940 analyze_miv_subscript, analyze_overlapping_iterations,
7941 build_classic_dist_vector, subscript_dependence_tester,
7942 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
7943 (build_access_matrix_with_af): No longer static.
7944 * tree-data-ref.h (scop_p): ... declaration here.
7945 (data_reference.scop): New field.
7946 (DR_SCOP, DR_ACCESS_MATRIX): New.
7947 (build_access_matrix_with_af, dr_num_subscripts): Declared.
7948 * graphite.c (print_graphite_bb): Call dump_data_references.
7949 (print_scop): Use scop_nb_loops and scop_dim_domain.
7950 (test_for_scop_bound): Use debug_p.
7951 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
7953 (scop_loop_index): Moved...
7954 (scop_record_loop): New.
7955 (build_scop_loop_nests): Use scop_record_loop.
7956 (build_scop_domain): Use scop_dim_domain.
7957 (build_access_matrix): Implemented.
7958 (build_scop_canonical_schedules): Use scop_nb_loops.
7959 (build_graphite_bb): Initialize GBB_SCOP.
7960 * graphite.h (scop_p): Moved...
7961 (graphite_bb.scop): New field.
7962 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
7963 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
7964 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
7965 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
7966 scop_loop_index): New.
7967 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
7969 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
7971 * Merge from mainline (r117661:120450).
7973 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
7975 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
7976 at the first declaration outside the varying loop, instantiate as
7978 * tree-chrec.c (for_each_scev_op): New.
7979 * tree-chrec.h (for_each_scev_op): Declared.
7980 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
7981 * tree-data-ref.c (get_references_in_stmt,
7982 find_data_references_in_stmt): New, from trunk.
7983 (find_data_references_in_loop): Use get_references_in_stmt
7984 and find_data_references_in_loop, modified as in trunk.
7985 (build_access_matrix_with_af): New.
7986 * tree-data-ref.h (data_reference): Add a field access_matrix.
7987 (data_ref_loc): New, as in trunk.
7988 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
7989 invariant_in_scop_p, param_index, scan_tree_for_params,
7990 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
7991 idx_record_param, idx_record_params, build_access_matrix,
7992 build_scop_data_accesses, build_scop_canonical_schedules,
7993 build_graphite_bb, build_scop_bbs, find_params_in_bb,
7994 build_scop_params): New.
7995 * graphite.h (graphite_bb): New.
7996 (scop): Add fields static_schedule, params, loop_nest,
7998 * lambda.h: Declare vecs of lambda_matrix.
7999 * tree-flow.h (print_loop_ir_bb): Declared.
8000 * tree-cfg.c (print_loop_ir_bb): New.
8001 (print_loop): Use print_loop_ir_bb.
8003 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8005 * Merge from mainline (r115016:117632).
8007 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8009 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8010 break due to a warning.
8012 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8014 * graphite.c (print_scops, debug_scops): New.
8015 (graphite_transform): Renamed graphite_find_transform.
8016 * graphite.h (debug_scops): Declared.
8018 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8020 * tree-match.c: Reformat following the GNU style.
8021 * tree-match.h: Reformat following the GNU style.
8022 * tree-pattern.h: Removed empty file.
8023 * Makefile.in: Remove references to tree-pattern.h.
8024 * tree-check.c: Reformat following the GNU style.
8025 (execute_tree_check): Move gate condition code to...
8026 (gate_tree_check): ...here. New function.
8027 (pass_check): Use the gate function.
8029 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8031 * tree-pattern.h: New. Tree pattern matching and checking using
8033 * tree-check.c: New. Tree/CFG checking pass.
8034 * tree-match.c: New. Library for tree pattern matching.
8035 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8036 * toplev.c, flags.h: Add globals for tree-check pass.
8037 * Makefile.in: Integrate the files in tree-check pass.
8038 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8039 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8040 Introduce a "lazy" pretty-print mode.
8041 * tree.c, tree.h: Add tree_name.
8043 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8045 * doc/invoke.texi (-fgraphite): Correct typo.
8046 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8047 use of print_loop_ir.
8048 * gcc.dg/graphite/scop-1.c: New.
8049 * gcc.dg/graphite/scop-2.c: New.
8050 * gcc.dg/graphite/graphite.exp: New.
8051 * graphite.c: Include domwalk.h.
8052 (print_scop): Print only the entry and exit blocks.
8053 (debug_scop): No longer static.
8054 (affine_expr): Fix formating. Return also true when the expression is
8056 (stmt_simple_for_scop_p): Fix formating.
8057 (build_scops): Use domwalk.
8058 (get_loop_start, end_scop, test_for_scop_bound): New.
8059 (graphite_transform_loops): Avoid printing on stderr.
8060 * graphite.h (debug_scop): Declared.
8061 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8062 * Makefile.in (graphite.o): Depend on domwalk.h.
8063 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8064 declarations for static functions.
8065 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8066 controlling output verbosity.
8068 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8069 Plesco Alexandru <shurikx@gmail.com>
8071 * doc/invoke.texi (-fgraphite): Document.
8072 * tree-pass.h (pass_graphite_transforms): Declared.
8073 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8074 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8075 (pass_graphite_transforms): Defined.
8076 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8077 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8078 * graphite.c, graphite.h: New.
8079 * common.opt (fgraphite): Declared.
8080 * tree-flow.h (graphite_transform_loops): Declared.
8081 * Makefile.in (OBJS-common): Add graphite.o.
8082 (graphite.o): New rule.
8083 * passes.c (pass_graphite_transforms): Scheduled.