1 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
3 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
4 compatible to newer CLooG releases (CLOOG_ORG).
5 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
6 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
7 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
8 (build_cloog_prog) : New.
9 (cloog_program_extract_scalars): New.
10 (cloog_program_scatter): New.
12 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
14 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
15 conditionally (CLOOG_ORG).
16 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
17 (cloog_statement_usr): New.
19 (cloog_set_domain): Same.
20 (cloog_next_domain): Same.
21 (cloog_set_next_domain): Same.
22 (cloog_program_nb_scattdims): Same.
23 (cloog_program_set_nb_scattdims): Same.
24 (cloog_program_names): Same.
25 (cloog_program_set_names): Same.
26 (cloog_program_set_context): Same.
27 (cloog_program_set_loop): Same.
28 (cloog_program_blocklist): Same.
29 (cloog_program_set_blocklist): Same.
30 (cloog_program_scaldims): Same.
31 (cloog_program_set_scaldims): Same.
32 (cloog_names_nb_parameters): Same.
33 (cloog_names_set_nb_parameters): Same.
34 (cloog_names_parameters): Same.
35 (cloog_names_set_parameters): Same.
36 (cloog_names_set_nb_iterators): Same.
37 (cloog_names_set_iterators): Same.
38 (cloog_names_set_nb_scattering): Same.
39 (cloog_names_set_scattering): Same.
40 (cloog_statement_set_usr): Same.
41 (cloog_loop_set_next): Same.
42 (cloog_loop_set_domain): Same.
43 (cloog_loop_set_block): Same.
44 (cloog_block_list_next): Same.
45 (cloog_block_list_set_next):
46 (cloog_block_list_set_block): Same.
48 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
50 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
52 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
53 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
54 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
55 when something has been changed.
56 (rewrite_commutative_reductions_out_of_ssa): Same.
58 * gcc.dg/graphite/id-26.c: New.
60 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
62 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
63 handle the case when def is in the sese region.
64 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
65 for invariant expressions.
66 (rewrite_cross_bb_phi_deps): Removed.
67 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
68 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
69 rewrite_cross_bb_phi_deps.
71 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
73 * graphite-sese-to-poly.c
74 (rewrite_commutative_reductions_out_of_ssa_loop): Call
75 scev_analyzable_p only on is_gimple_reg
77 * gcc.dg/graphite/id-25.c: New.
79 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
81 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
82 (rewrite_close_phi_out_of_ssa): Propagate constant values or
83 parametric expressions outside the scop region.
84 (rewrite_cross_bb_scalar_deps): Same.
85 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
87 * gcc.dg/graphite/run-id-5.c: New.
88 * gcc.dg/graphite/run-id-6.c: New.
89 * gfortran.dg/graphite/id-21.f: New.
91 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
93 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
94 SSA_NAME_DEF_STMT only on SSA_NAMEs.
96 * gcc.dg/graphite/id-24.c: New.
98 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
100 * tree-scalar-evolution.c (instantiate_scev_name): Do not
101 instantiate default definitions.
103 2010-07-20 Vladimir Kargov <kargov@gmail.com>
105 * graphite-scop-detection.c (is_valid_stmt_p): New.
106 (is_valid_bb_p): New.
108 2010-07-20 Vladimir Kargov <kargov@gmail.com>
109 Sebastian Pop <sebastian.pop@amd.com>
111 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
112 (loop_exits_from_bb_p): New.
113 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
114 (loop_exits_from_bb_p): Declared.
115 * graphite-scop-detection.c (scopdet_basic_block_info): Call
118 2010-07-20 Vladimir Kargov <kargov@gmail.com>
120 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
122 (dot_regions_1): New.
124 * refined-regions.h (dot_regions): Declared.
125 * Makefile.in (refined-regions.o): Update dependences.
127 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
129 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
130 extra parameter for the region. Call scev_analyzable_p.
131 (rewrite_reductions_out_of_ssa): Update call to
132 rewrite_close_phi_out_of_ssa.
133 (rewrite_cross_bb_phi_deps): Same.
134 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
135 parameter for the region. Call scev_analyzable_p.
136 (rewrite_commutative_reductions_out_of_ssa): Update call to
137 rewrite_commutative_reductions_out_of_ssa_loop.
139 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
141 * gcc.dg/tree-ssa/pr20742.c: New.
143 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
145 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
147 * gcc.dg/graphite/id-23.c: New.
149 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
151 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
152 SSA scalar phi nodes that can be scev_analyzable_p.
154 * gfortran.dg/graphite/id-20.f: Adjust testcase.
156 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
158 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
159 handle SSA_NAME_IS_DEFAULT_DEF.
161 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
163 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
165 * gcc.dg/graphite/pr42729.c: New.
167 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
169 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
170 case non close-phi nodes with one argument.
172 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
174 * sese.h (scev_analyzable_p): Scevs could be expressions without
175 chrecs and still be scev_analyzable_p.
177 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
179 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
181 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
183 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
184 * cfgloop.h (struct loop): Remove single_iv field.
185 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
186 (scop_canonicalize_loops): Removed.
187 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
188 over all the loop phi nodes in loop->header.
189 (build_poly_scop): Remove use of scop_canonicalize_loops.
191 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
193 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
196 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
198 * tree-chrec.c (chrec_apply): Should only apply to the specified
199 variable. Also handle multivariate chains of recurrences that
200 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
202 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
204 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
205 (debug_clast_name_indexes_1): Removed.
206 (debug_clast_name_indexes): Removed.
207 (pbb_to_depth_to_oldiv): Removed.
208 (build_iv_mapping): Replace the use of rename_map with iv_map.
209 (translate_clast_user): Remove uses of rename_map. Allocate and
211 (translate_clast_for_loop): Remove uses of rename_map.
212 (translate_clast_for): Same.
213 (translate_clast_guard): Same.
214 (translate_clast): Same.
216 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
217 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
218 * sese.c (set_rename): Now static.
219 (rename_variables_in_stmt): Removed.
221 (is_parameter): Removed.
223 (expand_scalar_variables_call): Removed.
224 (expand_scalar_variables_ssa_name): Removed.
225 (expand_scalar_variables_expr): Removed.
226 (expand_scalar_variables_stmt): Removed.
227 (expand_scalar_variables): Removed.
228 (rename_variables): Removed.
229 (remove_condition): Removed.
230 (get_true_edge_from_guard_bb): Removed.
231 (get_false_edge_from_guard_bb): Removed.
232 (struct igp): Removed.
233 (default_before_guard): Removed.
234 (convert_for_phi_arg): Removed.
235 (add_guard_exit_phis): Removed.
236 (insert_guard_phis): Removed.
237 (graphite_copy_stmts_from_block): Now also uses iv_map and a
238 region. Do not copy conditions. Do not copy induction variables.
240 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
241 the translated statement. Use the iv_map for the induction
243 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
244 (set_rename): Removed declaration.
245 (scev_analyzable_p): ...here.
246 * tree-chrec.c (chrec_apply_map): New.
247 * tree-chrec.h (chrec_apply_map): Declared.
249 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
251 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
252 insert_loop_close_phis.
253 * sese.c (name_defined_in_loop_p): Removed.
254 (expr_defined_in_loop_p): Removed.
255 (alive_after_loop): Removed.
256 (close_phi_not_yet_inserted_p): Removed.
257 (struct alep): Removed.
258 (add_loop_exit_phis): Removed.
259 (insert_loop_close_phis): Removed.
261 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
263 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
265 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
267 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
269 * gfortran.dg/graphite/id-20.f: New.
271 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
273 * graphite-cloog-util.h: Added cloog.h.
274 * graphite-blocking.c: Removed cloog.h.
275 * graphite-dependences.c: Same.
276 * graphite-interchange.c: Same.
277 * graphite-poly.c: Same.
278 * graphite-ppl.c: Same.
279 * graphite-scop-detection.c: Same.
280 * graphite-sese-to-poly.c:
282 Removed graphite-clast-to-gimple.h.
283 (check_poly_representation): Removed (unused).
284 * graphite-sese-to-poly.h
285 (check_poly_representation): Removed (unused).
287 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
290 (OBJS-common): Added graphite-cloog-util.o.
291 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
292 (graphite-cloog-util.o): New.
293 (graphite-ppl.o): Added graphite-cloog-util.h.
294 * graphite-clast-to-gimple.c:
295 Added graphite-cloog-util.h to include statements.
296 * graphite-cloog-util.c: New.
297 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
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 (ppl_Constrain_System_number_of_constraints): Same.
302 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
303 (oppose_constraint): Same.
304 (cloog_matrix_to_ppl_constraint): Same.
305 (new_Constraint_System_from_Cloog_Matrix): Same.
306 (insert_constraint_into_matrix): Same. Declared static.
307 * graphite-cloog-util.h: New.
308 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
309 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
310 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
311 (new_C_Polyhedron_from_Cloog_Matrix): Same.
312 (insert_constraint_into_matrix): Same.
314 Added graphite-cloog-util.h to include statements.
315 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
316 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
317 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
318 (new_C_Polyhedron_from_Cloog_Matrix): Same.
319 (insert_constraint_into_matrix): Same.
320 (ppl_Constrain_System_number_of_constraints): Same.
321 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
322 (oppose_constraint): Same.
323 (cloog_matrix_to_ppl_constraint): Same.
324 (new_Constraint_System_from_Cloog_Matrix): Same.
326 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
327 graphite-cloog-util.h.
328 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
329 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
330 (new_C_Polyhedron_from_Cloog_Matrix): Same.
331 (insert_constraint_into_matrix): Removed.
333 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
335 * graphite-clast-to-gimple.c
336 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
337 (precision_for_interval): Same.
338 (gcc_type_for_interval): Same.
339 (compute_type_for_level): Same.
340 * graphite-interchange.c
341 (lst_interchange_profitable_p): Same.
343 (psct_scattering_dim_for_loop_depth): Same.
345 (ppl_max_for_le_pointset): Same.
346 (ppl_min_for_le_pointset): Same.
348 2010-06-25 Vladimir Kargov <kargov@gmail.com>
350 * refined-regions.c (bb_index_compare): New.
351 (get_bbs_in_region): New.
352 (print_bbs_in_region): New.
353 (print_refined_region): Add an argument that allows to print
354 all basic blocks contained in regions.
355 (debug_refined_region): Update call to print_refined_region.
356 * refined-regions.h (print_refined_region): Update declaration.
357 (get_bbs_in_region): Declared.
358 * graphite-scop-detection.c (build_scops_new): Print the refined
359 region tree into the Grahite dump file.
361 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
363 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
364 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
366 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
368 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
369 rewrite_close_phi_out_of_ssa.
371 * gcc.dg/graphite/id-22.c: New.
373 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
375 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
377 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
379 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
381 * sese.c (debug_rename_map): Same.
384 (rename_variables_in_stmt): Same.
385 (expand_scalar_variables_call): Same.
386 (expand_scalar_variables_ssa_name): Same.
387 (expand_scalar_variables_expr): Same.
388 (expand_scalar_variables_stmt): Same.
389 (expand_scalar_variables): Same.
390 (rename_variables): Same.
391 (graphite_copy_stmts_from_block): Same.
392 (copy_bb_and_scalar_dependences): Same.
394 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
396 * graphite-clast-to-gimple.c (copy_renames): Removed.
397 (translate_clast_for): Do not call copy_renames.
398 (translate_clast_guard): Same.
400 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
402 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
403 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
404 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
405 before rewrite_cross_bb_scalar_deps.
407 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
409 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
410 Early return in when flag_associative_math is not set.
412 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
414 * gcc.dg/graphite/run-id-2.c: Call abort.
416 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
418 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
419 of SSA copies on edges except for loop->latch.
421 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
423 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
424 Split out of rewrite_reductions_out_of_ssa.
425 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
427 * graphite.c (graphite_transform_loops): Call it.
429 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
431 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
433 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
435 * passes.c (init_optimization_passes): Add pass_graphite.
436 Schedule a pass_copy_prop before pass_graphite_transforms.
437 * timevar.def (TV_GRAPHITE): Declared.
438 * tree-pass.h (pass_graphite): Declared.
439 * tree-ssa-loop.c (pass_graphite): New.
441 * gcc.dg/graphite/id-20.c: New.
443 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
445 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
446 Remove calls to rename_nb_iterations and rename_sese_parameters.
447 * graphite-clast-to-gimple.h (gloog): Update declaration.
448 * graphite.c (graphite_transform_loops): Update call to gloog.
449 * sese.c (rename_variables_in_expr): Removed.
450 (rename_nb_iterations): Removed.
451 (rename_sese_parameters): Removed.
452 * sese.h (rename_nb_iterations): Removed.
453 (rename_sese_parameters): Removed.
455 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
457 * graphite-clast-to-gimple.c (gloog): Remove call to
458 sese_adjust_liveout_phis.
459 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
460 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
461 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
462 rewrite_phi_out_of_ssa.
463 * sese.c (get_vdef_before_sese): Removed.
464 (sese_adjust_vphi): Removed.
465 (sese_adjust_liveout_phis): Removed.
466 * sese.h (sese_adjust_liveout_phis): Removed.
468 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
470 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
471 argument for the place after which to insert the out of SSA copy.
472 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
473 (rewrite_phi_out_of_ssa): Same.
474 (rewrite_cross_bb_scalar_deps): Same.
475 (insert_copyout): Removed.
476 (insert_copyin): Removed.
477 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
478 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
481 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
483 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
484 (rewrite_reductions_out_of_ssa): Same.
485 (rewrite_commutative_reductions_out_of_ssa): Same.
486 (build_poly_scop): Do not call these functions.
487 * graphite-sese-to-poly.h (build_poly_scop): Declared.
488 (rewrite_reductions_out_of_ssa): Declared.
489 (rewrite_commutative_reductions_out_of_ssa): Declared.
490 * graphite.c (graphite_transform_loops): Call on every scop
491 rewrite_commutative_reductions_out_of_ssa before calling
492 rewrite_reductions_out_of_ssa and build_scop_bbs.
494 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
496 * graphite-dependences.c (dot_deps): Make system call to dotty run
498 (dot_deps_stmt): Same.
499 * graphite-poly.c (dot_lst): Same.
501 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
503 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
504 old_type in parameter.
505 (gcc_type_for_value): Update call to gcc_type_for_interval.
506 (compute_type_for_level_1): Renamed compute_type_for_level.
507 Update call to gcc_type_for_interval.
509 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
511 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
512 the scev analysis when the variable is not used outside the loop
513 in a close phi node: call compute_overall_effect_of_inner_loop.
515 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
517 * graphite-sese-to-poly.c (single_pred_cond): Renamed
518 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
519 (build_sese_conditions_before): Renamed call to single_pred_cond.
520 (build_sese_conditions_after): Same.
522 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
524 * graphite-poly.h: Fix comments and indentation.
525 * graphite-sese-to-poly.c: Same.
526 (build_sese_conditions_before): Compute stmt and gbb only when needed.
527 * tree-chrec.c: Fix comments and indentation.
528 (tree-ssa-loop-niter.c): Same.
530 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
532 * refined-regions.c (create_region): Only initialize the region.
533 (find_regions_with_entry): Initialize parent relation and bbmap
535 (build_regions_tree): Set outermost_region to region instead of
537 (calculate_region_tree): Remove unneeded parameters.
539 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
541 * graphite-scop-detection.c (is_scop_p): New.
542 (build_scops_new): New. A skeleton for the new scop detection.
543 (build_scops_old): Renamed from build_scops.
544 (build_scops): New version. Call the new and the old scop
547 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
548 Antoniu Pop <antoniu.pop@gmail.com>
550 * Makefile.in (OBJS-common): Add refined-regions.o.
551 (refined-regions.o): New.
552 (graphite-scop-detection.o): Use refined-regions.h.
553 * graphite-scop-detection.c: Include refined-regions.h
554 (build_scops): Also build the refined region tree.
555 * refined-regions.c: New. Adds an algorithm to detect refined
557 (print_refined_region): New.
558 (debug_refined_region): New.
559 (refined_region_contains_bb_p): New.
560 (refined_region_contains_region_p): New.
562 (struct find_regions_global_data): New.
564 (typedef struct bb_bb_def): New.
565 (new_bb_bb_def): New.
566 (bb_bb_map_hash): New.
570 (new_bb_reg_def): New.
571 (bb_reg_map_hash): New.
572 (eq_bb_reg_map): New.
573 (find_new_region): New.
574 (insert_new_reg): New.
575 (insert_new_bb): New.
576 (insert_shortcut): New.
577 (get_next_postdom): New.
578 (create_region): New.
579 (find_regions_with_entry): New.
580 (find_regions_adc): New.
582 (get_topmost_parent): New.
583 (build_regions_tree): New.
584 (calculate_region_tree): New.
585 (free_region_tree): New.
586 * refined-regions.h: New.
587 (struct refined_region): New.
588 (calculate_region_tree): New.
589 (free_region_tree): New.
590 (refined_region_contains_bb_p): New.
591 (refined_region_contains_region_p): New.
592 (print_refined_region): New.
593 (debug_refined_region): New.
595 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
597 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
600 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
602 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
603 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
605 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
607 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
608 phi_arg_in_outermost_loop.
609 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
610 (remove_invariant_phi): Same.
612 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
614 * graphite-blocking.c
615 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
616 * graphite-clast-to-gimple.c
617 (clast_to_gcc_expression): Same.
618 (precision_for_value): Same.
619 (precision_for_interval): Same.
620 (gcc_type_for_interval): Same.
621 (graphite_create_new_guard): Same.
622 (compute_bounds_for_level): Same.
623 (graphite_create_new_loop_guard): Same.
624 * graphite-interchange.c
625 (build_linearized_memory_access): Same.
626 (pdr_stride_in_loop): Same.
627 (memory_strides_in_loop_1): Same.
628 (memory_strides_in_loop): Same.
629 (extend_scattering): Same.
630 (psct_scattering_dim_for_loop_depth): Same.
631 (pbb_number_of_iterations): Same.
633 (debug_iteration_domains): Same.
635 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
636 (ppl_set_inhomogeneous_gmp): Same.
637 (ppl_strip_loop): Same.
638 (ppl_lexico_compare_linear_expressions): Same.
639 (ppl_read_polyhedron_matrix): Same.
640 (ppl_max_for_le_pointset): Same.
642 (ppl_read_polyhedron_matrix): Same.
643 (tree_int_to_gmp): Same.
644 (gmp_cst_to_tree): Same.
645 (ppl_set_inhomogeneous): Same.
646 (ppl_set_inhomogeneous_tree): Same.
647 (ppl_set_coef): Same.
648 (ppl_set_coef_tree): Same.
649 * graphite-sese-to-poly.c
650 (build_pbb_scattering_polyhedrons): Same.
651 (build_scop_scattering): Same.
652 (scan_tree_for_params_right_scev): Same.
653 (scan_tree_for_params): Same.
654 (find_params_in_bb): Same.
655 (find_scop_parameters): Same.
656 (add_upper_bounds_from_estimated_nit): Same.
657 (build_loop_iteration_domains): Same.
658 (add_condition_to_domain): Same.
659 (pdr_add_memory_accesses): Same.
661 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
663 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
664 CLooG's value_* macros to their respective mpz_* counterparts.
665 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
666 (graphite_create_new_loop_guard): Same.
667 * graphite-interchange.c (build_linearized_memory_access): Same.
668 (pdr_stride_in_loop): Same.
669 (memory_strides_in_loop_1): Same.
670 (1st_interchange_profitable_p): Same.
671 * graphite-poly.c (extend_scattering): Same.
672 (psct_scattering_dim_for_loop_depth): Same.
673 (pbb_number_of_iterations): Same.
674 (pbb_number_of_iterations_at_time): Same.
675 * graphite-poly.h (new_1st_loop): Same.
676 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
677 (oppose_constraint): Same.
678 (insert_constraint_into_matrix): Same.
679 (ppl_set_inhomogeneous_gmp): Same.
680 (ppl_set_coef_gmp): Same.
681 (ppl_strip_loop): Same.
682 (ppl_lexico_compare_linear_expressions): Same.
683 (ppl_max_for_le_pointset): Same.
684 (ppl_min_for_le_pointset): Same.
685 (ppl_build_realtion): Same.
686 * graphite-ppl.h (gmp_cst_to_tree): Same.
687 (ppl_set_inhomogeneous): Same.
688 (ppl_set_inhomogeneous_tree): Same.
689 (ppl_set_coef): Same.
690 (ppl_set_coef_tree): Same.
691 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
692 (build_scop_scattering): Same.
693 (add_value_to_dim): Same.
694 (scan_tree_for_params_right_scev): Same.
695 (scan_tree_for_params_int): Same.
696 (scan_tree_for_params): Same.
697 (find_params_in_bb): Same.
698 (find_scop_parameters): Same.
699 (add_upper_bounds_from_estimated_nit): Same.
700 (build_loop_iteration_domains): Same.
701 (create_linear_expr_from_tree): Same.
702 (add_condition_to_domain): Same.
703 (pdr_add_memory_accesses): Same.
705 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
708 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
709 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
710 When converting an unsigned type to signed, double its precision.
711 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
712 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
713 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
715 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
718 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
719 build_nonstandard_integer_type.
720 (gcc_type_for_interval): Same.
722 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
725 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
726 POINTER_PLUS_EXPR for pointer types.
728 * gcc.dg/graphite/id-19.c: New.
730 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
733 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
734 * graphite-clast-to-gimple.c: Include langhooks.h.
735 (max_signed_precision_type): New.
736 (max_precision_type): Takes two types as arguments.
737 (precision_for_value): New.
738 (precision_for_interval): New.
739 (gcc_type_for_interval): New.
740 (gcc_type_for_value): New.
741 (gcc_type_for_clast_term): New.
742 (gcc_type_for_clast_red): New.
743 (gcc_type_for_clast_bin): New.
744 (gcc_type_for_clast_expr): Split up into several functions.
745 (gcc_type_for_clast_eq): Rewritten.
746 (compute_bounds_for_level): New.
747 (compute_type_for_level_1): New.
748 (compute_type_for_level): New.
749 (gcc_type_for_cloog_iv): Removed.
750 (gcc_type_for_iv_of_clast_loop): Rewritten.
751 (graphite_create_new_loop): Compute the lower and upper bound types
752 with gcc_type_for_clast_expr.
753 (graphite_create_new_loop_guard): Same.
754 (find_cloog_iv_in_expr): Removed.
755 (compute_cloog_iv_types_1): Removed.
756 (compute_cloog_iv_types): Removed.
757 (gloog): Do not call compute_cloog_iv_types.
758 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
760 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
761 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
762 (GBB_CLOOG_IV_TYPES): Removed.
764 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
766 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
768 Reverted this commit: as at this point the loop closed SSA form
769 is under a canonical form respecting the single argument condition.
770 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
771 close phi nodes may have more than one argument.
773 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
775 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
776 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
777 (detect_commutative_reduction): Same.
779 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
781 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
782 close phi nodes may have more than one argument.
784 2010-03-30 Richard Guenther <rguenther@suse.de>
785 Zdenek Dvorak <ook@ucw.cz>
786 Sebastian Pop <sebastian.pop@amd.com>
789 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
790 with multiple arguments.
791 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
793 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
795 * graphite-dependences.c (print_pddr): Call print_pdr with an
797 * graphite-poly.c (debug_pdr): Add an extra argument for the
800 (print_pbb_domain): Same.
802 (print_scop_context): Same.
805 (debug_pbb_domain): Same.
809 (debug_scop_context): Same.
812 (print_scop_params): Same.
813 (debug_scop_params): Same.
814 (print_iteration_domain): Same.
815 (print_iteration_domains): Same.
816 (debug_iteration_domain): Same.
817 (debug_iteration_domains): Same.
818 (print_scattering_function): Same.
819 (print_scattering_functions): Same.
820 (debug_scattering_function): Same.
821 (debug_scattering_functions): Same.
822 * graphite-poly.h (debug_pdr): Update declaration.
824 (print_pbb_domain): Same.
826 (print_scop_context): Same.
829 (debug_pbb_domain): Same.
833 (debug_scop_context): Same.
836 (print_scop_params): Same.
837 (debug_scop_params): Same.
838 (print_iteration_domain): Same.
839 (print_iteration_domains): Same.
840 (debug_iteration_domain): Same.
841 (debug_iteration_domains): Same.
842 (print_scattering_function): Same.
843 (print_scattering_functions): Same.
844 (debug_scattering_function): Same.
845 (debug_scattering_functions): Same.
847 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
849 * graphite-poly.c (print_scattering_function_1): New.
850 (print_scattering_function): Call it.
851 (print_scop_params): Remove spaces at the end of lines.
854 * graphite-poly.h (print_cloog): Declared.
855 (debug_cloog): Declared.
857 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
859 * tree-ssa-copy.c: Revert this previous change:
860 (init_copy_prop): Loop closed phi nodes cancontain more than one
862 (execute_copy_prop): Revert the previous change: do not call
863 rewrite_into_loop_closed_ssa.
865 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
866 Richard Guenther <rguenther@suse.de>
869 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
870 contain more than one argument.
871 (execute_copy_prop): Revert the previous change: do not call
872 rewrite_into_loop_closed_ssa.
874 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
875 * gcc.dg/graphite/id-pr43464-1.c: New.
877 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
880 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
881 and verify_loop_closed_ssa when copy prop is executed in the LNO.
883 * gcc.dg/graphite/id-pr43464.c: New.
885 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
887 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
889 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
890 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
891 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
892 to switch between adding the IV bump in loop->latch or in loop->header.
894 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
896 * passes.c (init_optimization_passes): Add pass_copy_prop
899 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
901 * graphite-poly.c (print_scattering_function): Pretty print following
904 (print_pbb_domain): Same.
905 (dump_gbb_cases): Same.
906 (dump_gbb_conditions): Same.
909 (print_scop_params): Same.
910 (print_scop_context): Same.
912 (print_pbb_body): New.
913 (lst_indent_to): New.
914 (print_lst): Start new lines with a #.
915 * graphite-poly.h (pbb_bb): New.
916 (pbb_index): Use pbb_bb.
917 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
919 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
921 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
924 * gcc.dg/graphite/id-pr43351.c
926 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
929 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
930 call insert_out_of_ssa_copy for default definitions.
931 * gfortran.dg/graphite/id-pr43354.f: New.
933 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
936 * gfortran.dg/graphite/pr43349.f: New.
938 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
940 * graphite-clast-to-gimple.c (my_long_long): Defined.
941 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
942 * graphite-sese-to-poly.c (my_long_long): Defined.
943 (scop_ivs_can_be_represented): Use it.
945 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
947 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
948 graphite-max-bbs-per-function, and loop-block-tile-size.
949 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
951 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
953 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
955 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
957 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
958 (add_upper_bounds_from_estimated_nit): New.
959 (build_loop_iteration_domains): Use it.
961 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
963 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
965 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
968 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
969 should be an INTEGER_CST. Also handle CASE_CONVERT.
970 * gcc.dg/graphite/pr43306.c: New.
972 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
974 * graphite.c (graphite_initialize): To bound the number of bbs per
975 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
976 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
977 * doc/invoke.texi: Document it.
979 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
981 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
982 * graphite-sese-to-poly.h (build_poly_scop): Same.
984 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
986 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
987 the number of parameters in the scop. Use as an upper bound
988 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
989 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
990 * doc/invoke.texi: Document it.
992 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
994 * graphite-sese-to-poly.c (add_param_constraints): Use
995 lower_bound_in_type and upper_bound_in_type.
997 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
999 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1000 instead of unsigned_type_node.
1002 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1003 Reza Yazdani <reza.yazdani@amd.com>
1006 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1007 on pointer type parameters.
1009 * gcc.dg/graphite/run-id-4.c: New.
1011 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1014 * gcc.dg/graphite/run-id-3.c: New.
1016 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1017 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1019 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1020 handle conversions from pointer to integers.
1021 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1022 induction variable, to be able to work with code generated by CLooG.
1023 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1024 (build_poly_scop): Bail out if we cannot codegen a loop.
1026 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1028 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1029 code generation with gloog_error.
1031 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1033 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1034 Call fold_convert on all the returned values.
1035 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1036 the type of the resulting expression.
1038 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1040 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1041 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1042 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1044 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1046 * graphite-dependences.c (map_into_dep_poly): Removed.
1047 (dependence_polyhedron_1): Use combine_context_id_scat.
1049 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1051 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1052 (struct poly_bb): Same.
1053 (combine_context_id_scat): New.
1055 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1058 * sese.c (name_defined_in_loop_p): Return false for default
1061 * gcc.dg/graphite/pr42326.c: New.
1063 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1065 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1066 and clean up the logic.
1068 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1070 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1073 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1076 * graphite-scop-detection.c (create_single_exit_edge): Move
1077 the call to find_single_exit_edge to....
1078 (create_sese_edges): ...here. Don't handle multiple edges
1079 exiting the function.
1080 (build_graphite_scops): Don't handle multiple edges
1081 exiting the function.
1083 * gcc.dg/graphite/pr43083.c: New.
1085 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1088 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1089 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1091 * gfortran.dg/graphite/pr43097.f: New.
1093 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1094 Manuel López-Ibáñez <manu@gcc.gnu.org>
1097 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1099 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1102 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1104 * g++.dg/graphite/pr43026.C: New.
1106 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1108 * Merge from mainline (154736:156693).
1110 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1113 * gcc.dg/graphite/pr43012.c: New.
1115 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1117 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1118 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1120 * g++.dg/graphite/pr42930.C: New.
1122 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1125 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1126 graphite_can_represent_init for MULT_EXPR.
1128 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1132 * graphite-sese-to-poly.c (remove_phi): New.
1133 (translate_scalar_reduction_to_array): Call remove_phi.
1135 * gcc.dg/graphite/pr42530.c: New.
1136 * gcc.dg/graphite/pr42914.c: New.
1138 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1141 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1142 * graphite-clast-to-gimple.h (gloog): Update declaration.
1143 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1144 * graphite-poly.h (struct poly_bb): Add missing comments.
1145 (struct scop): Add poly_scop_p field.
1147 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1148 * graphite.c (graphite_transform_loops): Build the polyhedral
1149 representation for each scop before code generation.
1150 * sese.c (rename_variables_in_operand): Removed.
1151 (rename_variables_in_expr): Return the renamed expression.
1152 (rename_sese_parameters): New.
1153 * sese.h (rename_sese_parameters): Declared.
1155 * gcc.dg/graphite/pr42771.c: New.
1157 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1159 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1161 * gcc.dg/graphite/block-1.c: Same.
1162 * gcc.dg/graphite/block-3.c: Same.
1163 * gcc.dg/graphite/block-4.c: Same.
1164 * gcc.dg/graphite/block-5.c: Same.
1165 * gcc.dg/graphite/block-6.c: Same.
1166 * gcc.dg/graphite/block-7.c: Same.
1167 * gcc.dg/graphite/interchange-0.c: Same.
1168 * gcc.dg/graphite/interchange-1.c: Same.
1169 * gcc.dg/graphite/interchange-10.c: Same.
1170 * gcc.dg/graphite/interchange-11.c: Same.
1171 * gcc.dg/graphite/interchange-12.c: Same.
1172 * gcc.dg/graphite/interchange-2.c: Same.
1173 * gcc.dg/graphite/interchange-3.c: Same.
1174 * gcc.dg/graphite/interchange-4.c: Same.
1175 * gcc.dg/graphite/interchange-5.c: Same.
1176 * gcc.dg/graphite/interchange-6.c: Same.
1177 * gcc.dg/graphite/interchange-7.c: Same.
1178 * gcc.dg/graphite/interchange-8.c: Same.
1179 * gcc.dg/graphite/interchange-9.c: Same.
1180 * gcc.dg/graphite/interchange-mvt.c: Same.
1182 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1184 * gfortran.dg/graphite/id-19.f: New.
1185 * gfortran.dg/graphite/pr14741.f90: New.
1186 * gfortran.dg/graphite/pr41924.f90: New.
1187 * gfortran.dg/graphite/run-id-2.f90: New.
1189 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1192 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1193 to unknown_dependence.
1194 (graphite_legal_transform_dr): Handle the unknown_dependence.
1195 (graphite_carried_dependence_level_k): Same.
1197 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1199 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1201 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1202 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1205 * graphite-dependences.c (build_lexicographical_constraint): Return
1206 a union of dependence polyhedra.
1207 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1209 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1210 * gcc.dg/graphite/block-4.c: Same.
1211 * gcc.dg/graphite/block-7.c: Same.
1212 * gcc.dg/graphite/interchange-12.c: Same.
1213 * gcc.dg/graphite/interchange-mvt.c: Same.
1214 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1215 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1216 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1218 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1220 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1221 the execution check to FAIL. This testcase is miscompiled by Graphite
1222 and the check should be re-enabled.
1223 * gcc.dg/graphite/interchange-mvt.c: Same.
1224 * gcc.dg/graphite/block-0.c: Same.
1225 * gcc.dg/graphite/block-4.c: Same.
1226 * gcc.dg/graphite/block-7.c: Same.
1228 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1230 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1231 * gcc.dg/graphite/scop-0.c: Fix spaces.
1232 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1233 * gfortran.dg/graphite/block-2.f: Same.
1234 * gfortran.dg/graphite/block-3.f90: Same.
1235 * gfortran.dg/graphite/block-4.f90: Same.
1236 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1237 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1239 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1241 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1242 PDDR_ORIGINAL_SCATTERING_P.
1243 (pddr_is_empty): Rewritten.
1244 (print_dependence_polyhedron_layout): New.
1247 (build_alias_set_powerset): Moved up.
1248 (poly_drs_may_alias_p): Moved up.
1249 (lexicographically_gt_p): Removed.
1250 (build_lexicographically_gt_constraint): Renamed
1251 build_lexicographical_constraint, reimplemented.
1252 (dependence_polyhedron_1): Simplified parameters.
1253 (dependence_polyhedron): Same. Keep along empty PDDRs
1254 to make efficient use of the cache.
1255 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1256 (graphite_legal_transform_dr): Rewritten.
1257 (graphite_legal_transform_bb): Pass fewer arguments to
1258 graphite_legal_transform_dr.
1259 (graphite_carried_dependence_level_k): Simplified implementation.
1260 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1261 (dot_transformed_deps_stmt_1): Same.
1262 (dot_original_deps): Same.
1263 (dot_transformed_deps): Same.
1264 * graphite-dependences.h (struct poly_ddr): Added a new field
1265 original_scattering_p.
1266 (PDDR_ORIGINAL_SCATTERING_P): New.
1267 (print_pddr): Declared.
1268 (debug_pddr): Declared.
1269 * graphite-ppl.c: Clarify comment.
1270 * sese.h (print_gimple_bb): Removed unused declaration.
1273 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1275 * g++.dg/graphite/graphite.exp: Rewritten.
1276 * gcc.dg/graphite/graphite.exp: Rewritten.
1277 * gfortran.dg/graphite/graphite.exp: Rewritten.
1278 * gcc.dg/graphite/block-0.c: Added runtime test.
1279 * gcc.dg/graphite/block-1.c: Same.
1280 * gcc.dg/graphite/block-3.c: Same.
1281 * gcc.dg/graphite/block-4.c: Same.
1282 * gcc.dg/graphite/block-5.c: Same.
1283 * gcc.dg/graphite/block-6.c: Same.
1284 * gcc.dg/graphite/block-7.c: Same.
1285 * gcc.dg/graphite/interchange-0.c: Same.
1286 * gcc.dg/graphite/interchange-1.c: Same.
1287 * gcc.dg/graphite/interchange-10.c: Same.
1288 * gcc.dg/graphite/interchange-11.c: Same.
1289 * gcc.dg/graphite/interchange-12.c: Same.
1290 * gcc.dg/graphite/interchange-2.c: Same.
1291 * gcc.dg/graphite/interchange-3.c: Same.
1292 * gcc.dg/graphite/interchange-4.c: Same.
1293 * gcc.dg/graphite/interchange-5.c: Same.
1294 * gcc.dg/graphite/interchange-6.c: Same.
1295 * gcc.dg/graphite/interchange-7.c: Same.
1296 * gcc.dg/graphite/interchange-8.c: Same.
1297 * gcc.dg/graphite/interchange-9.c: Same.
1298 * gcc.dg/graphite/interchange-mvt.c: Same.
1299 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1301 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1303 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1306 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1308 * common.opt: Add -fgraphite-cloog-opts.
1309 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1310 * opts.c (decode_options): Same.
1312 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1314 * gcc.dg/graphite/id-17.c: New.
1315 * gcc.dg/graphite/pr41888.c: New.
1316 * gcc.dg/graphite/scop-22.c: New.
1317 * gfortran.dg/graphite/pr40982.f90: New.
1319 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1321 * graphite-dependences.c: Clarify comments.
1322 (build_pddr): Add an extra parameter direction.
1323 (graphite_legal_transform_dr): Use build_pddr.
1324 (dot_original_deps_stmt_1): Update use of build_pddr.
1325 (dot_transformed_deps_stmt_1): Same.
1326 (dot_original_deps): Same.
1327 (dot_transformed_deps): Same.
1329 * gcc.dg/graphite/interchange-12.c: New.
1330 * gcc.dg/graphite/block-7.c: New.
1332 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1334 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1335 (pddr_transformed_scattering): Removed.
1336 (graphite_legal_transform_dr): Use build_pddr.
1337 (dot_original_deps_stmt_1): Same.
1338 (dot_transformed_deps_stmt_1): Same.
1339 (dot_original_deps): Same.
1340 (dot_transformed_deps): Same.
1342 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1344 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1345 (build_lexicographically_gt_constraint): Same.
1346 (dependence_polyhedron_1): Same.
1347 (dependence_polyhedron): Same.
1349 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1351 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1352 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1353 (lexicographically_gt_p): Change type of direction to int.
1354 (build_lexicographically_gt_constraint): Same.
1355 (dependence_polyhedron_1): Same.
1356 (dependence_polyhedron): Same.
1357 (pddr_original_scattering): Use integers for direction.
1358 (pddr_transformed_scattering): Same.
1359 (graphite_legal_transform_dr): Same.
1360 (graphite_carried_dependence_level_k): Same.
1362 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1364 * graphite-dependences.c (build_pairwise_constraint): Renamed
1365 ppl_build_relation. Moved...
1366 (dr_equality_constraints): Use ppl_build_relation.
1367 (build_pairwise_scheduling_equality): Same.
1368 (build_pairwise_scheduling_inequality): Same.
1369 * graphite-ppl.c (ppl_build_relation): ...here.
1370 * graphite-ppl.h (ppl_build_relation): Declared.
1372 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1375 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1376 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1377 Set gloog_error when such an expression failed to be built.
1378 (translate_clast): Early return when gloog_error is set.
1379 (gloog): Clear gloog_error. When gloog_error is set, call
1380 set_ifsese_condition to enable the original code. Return the status
1381 of the code generation based on gloog_error.
1382 * sese.c (set_ifsese_condition): New.
1383 * sese.h (set_ifsese_condition): Declared.
1385 * g++.dg/graphite/pr42681.C: New.
1387 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1390 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1391 rename_nb_iterations.
1392 * sese.c (rename_variables_in_operand): New.
1393 (rename_variables_in_expr): New.
1394 (rename_nb_iterations): New.
1395 (sese_adjust_liveout_phis): Update the rename_map.
1396 * sese.h (rename_nb_iterations): Declared.
1397 * tree-scalar-evolution.c (scev_reset_htab): New.
1398 (scev_reset): Call scev_reset_htab.
1399 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1401 * gfortran.dg/graphite/pr42732.f: New.
1403 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1406 * graphite-clast-to-gimple.c: Fix formatting.
1407 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1408 (expr_defined_in_loop_p): New.
1409 (add_loop_exit_phis): Also handle full expressions: remove from
1410 the rename_map the expressions defined in the loop that we're closing.
1412 * gfortran.dg/graphite/pr42393-1.f90: New.
1413 * gfortran.dg/graphite/pr42393.f90: Add new flags
1414 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1415 make this testcase useful in the Graphite branch.
1417 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1419 * graphite-scop-detection.c (exclude_component_ref): Removed.
1420 (is_simple_operand): Removed.
1421 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1423 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1426 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1427 the array indexing of ADDR_EXPRs.
1429 * gcc.dg/graphite/pr42221.c: New.
1431 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1434 * graphite.c (graphite_finalize): Call scev_reset.
1435 (graphite_transform_loops): Do not call scev_reset between the code
1436 generation of scops.
1438 * gcc.dg/graphite/pr42521.c: New.
1440 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1442 * graphite-interchange.c (memory_stride_in_loop): Renamed
1444 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1445 (memory_strides_in_loop): Memoize the memory strides per loop.
1446 (lst_interchange_profitable_p): Do not initialize to zero the memory
1448 * graphite-poly.h (struct lst): Add a field memory_strides.
1449 (LST_LOOP_MEMORY_STRIDES): New.
1450 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1451 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1453 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1455 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1456 memory_strides_in_loop. Gather memory strides on a whole loop.
1457 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1458 (lst_interchange_profitable_p): Removed.
1459 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1461 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1463 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1464 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1465 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1466 Remove context_loop and level.
1468 2010-01-07 Richard Guenther <rguenther@suse.de>
1470 PR tree-optimization/42641
1471 * sese.c (rename_map_elt_info): Use the SSA name version, do
1474 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1476 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1477 blocked" only when both the strip mine and the interchange have
1480 * gcc.dg/graphite/block-2.c: Removed.
1481 * gcc.dg/graphite/block-3.c: Add scan pattern.
1482 * gcc.dg/graphite/block-4.c: Same.
1483 * gcc.dg/graphite/block-5.c: Same.
1484 * gcc.dg/graphite/block-6.c: Same.
1486 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1488 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1489 before allocating a new one.
1490 (copy_renames): Check that slot is not NULL.
1491 (mark_bb_with_pbb): Same.
1492 (compute_cloog_iv_types_1): Same.
1493 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1494 nest, and after LSTs.
1495 (lst_try_interchange_loops): Same.
1497 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1500 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1501 the before, nest, and after LSTs.
1502 (lst_try_interchange): Removed.
1503 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1505 (lst_interchange_select_outer): Apply interchange on the outer loop
1506 until there are no more changes in the inner loops.
1508 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1510 Revert patch fixing PR middle-end/42221.
1512 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1515 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1518 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1520 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1523 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1524 that contain only one statement.
1526 * gfortran.dg/graphite/pr42180.f90: New.
1528 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1531 * gfortran.dg/graphite/pr42393.f90: New.
1533 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1536 * gfortran.dg/graphite/pr42186.f90: New.
1538 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1541 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1542 Insert the reduction copy in the same block as the phi node.
1543 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1545 * gcc.dg/graphite/pr42205-1.c: New.
1546 * gcc.dg/graphite/pr42205-2.c: New.
1548 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1551 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1552 the array indexing of ADDR_EXPRs.
1554 * gcc.dg/graphite/pr42221.c: New.
1556 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1560 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1561 index. Call lst_interchange_select_inner only once.
1562 (lst_interchange_select_inner): Update use of lst_try_interchange.
1563 (lst_interchange_select_outer): Update.
1565 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1569 * graphite-interchange.c (lst_try_interchange): Do not increment the
1570 the OUTER index when there is no AFTER kernel. Do not increment the
1571 OUTER index for after processing the AFTER kernel.
1572 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1573 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1574 index. Do not pass to lst_interchange_select_inner the OUTER index.
1575 (scop_do_interchange): Update use of lst_interchange_select_outer.
1577 * gfortran.dg/graphite/graphite.exp
1578 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1579 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1580 the graphite dump file.
1581 * gfortran.dg/graphite/interchange-2.f: Same.
1582 * gfortran.dg/graphite/pr42334-1.f: New.
1584 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1588 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1590 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1591 (lst_try_interchange): Reimplemented.
1592 (lst_interchange_select_inner): Same.
1593 (lst_do_interchange): Renamed lst_interchange_select_outer.
1595 (scop_do_interchange): Update use of lst_interchange_select_outer.
1597 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1598 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1599 * gcc.dg/graphite/pr42211.c: New.
1600 * gfortran.dg/graphite/pr42334.f90: New.
1602 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1605 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1606 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1608 * gfortran.dg/graphite/pr42181.f90: New.
1610 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1613 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1614 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1615 (detect_commutative_reduction_arg): Simplified.
1616 (detect_commutative_reduction): Early return when the argument of
1617 the close phi is not of an SSA_NAME.
1619 * gcc.dg/graphite/pr42284.c: New.
1621 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1623 * dbgcnt.def (graphite_scop): New counter.
1624 * graphite.c: Include dbgcnt.h
1625 (graphite_transform_loops): Use new counter to limit transformations.
1627 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1630 * graphite-scop-detection.c (graphite_can_represent_init): Also
1631 handle more complex MULT_EXPRs containing parameters by recursion
1634 * gfortran.dg/graphite/pr42285.f90: New.
1636 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1638 * g++.dg/graphite/pr42130.C: Fix type.
1640 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1642 * g++.dg/graphite/pr42130.C: Correct testcase.
1644 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1646 * Merge from mainline (154493:154734).
1648 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1650 * Merge from mainline (151362:154491).
1652 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1654 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1655 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1657 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1660 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1661 translate_clast_for_loop): New.
1662 (translate_clast_for): Add a condition around the loop, to do not
1663 execute loops with zero iterations.
1664 * g++.dg/graphite/pr42130.C: New.
1665 * gcc.dg/graphite/pr35356-2.c: Adapt.
1667 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1669 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1670 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1671 Remove context_loop and level.
1673 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1675 * graphite-clast-to-gimple.c (translate_clast_user,
1676 translate_clast_for, translate_clast_guard): Simplify and move common
1677 elements to translate_clast().
1678 (translate_clast): Simplify and get common elements.
1680 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1682 * graphite-clast-to-gimple.c (translate_clast_user,
1683 translate_clast_for, translate_clast_guard): Split out of
1686 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1688 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1689 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1690 debug_clast_name_indexes_1, debug_clast_name_indexes,
1691 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1692 (clast_name_to_gcc, clast_to_gcc_expression,
1693 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1694 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1695 graphite_create_guard_cond_expr, graphite_create_new_loop,
1696 translate_clast): Add params_index.
1697 (initialize_cloog_names): Create parameter strings from scratch, do
1698 not reference other strings.
1699 (create_params_index): New.
1700 (gloog): Initialize params_index.
1701 * graphite-scop-detection (free_scops_1): Removed.
1702 (limit_scops): Use normal free_scops.
1703 * graphite-sese-to-poly.c (save_var_names): Removed.
1704 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1705 and SESE_PARAMS_INDEX.
1706 * sese.c (new_sese, free_sese): Dito.
1707 * sese.h (struct sese): Remove params_index, params_names.
1708 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1710 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1712 Revert the following patch from 2009-09-14:
1713 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1714 tree-scalar-evolution.h, and then tree-data-ref.h.
1715 * graphite-clast-to-gimple.c: Same.
1716 * graphite-dependences.c: Same.
1717 * graphite-interchange.c: Same.
1718 * graphite-poly.c: Same.
1719 * graphite-scop-detection.c: Same.
1720 * graphite-sese-to-poly.c: Same.
1722 * lambda-code.c: Same.
1723 * matrix-reorg.c: Same.
1724 * tree-data-ref.c: Same.
1725 * tree-if-conv.c: Same.
1726 * tree-loop-distribu: Same.: Same.
1727 * tree-loop-linear.c: Same.
1728 * tree-parloops.c: Same.
1729 * tree-predcom.c: Same.
1730 * tree-vect-patterns.c: Same.
1732 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1734 Revert patch from 2009-09-14.
1735 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1736 passes at -O1 and below.
1738 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1741 * gcc.dg/graphite/pr40281.c: New.
1743 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1744 evolutions should not variate in inner loops.
1746 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1749 * gfortran.dg/graphite/pr42050.f90: New.
1751 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1753 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1754 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1756 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1758 * graphite-blocking.c (scop_do_block): New.
1759 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1760 * graphite-poly.h (scop_do_block): Declared.
1762 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1764 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1765 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1766 to transform depth into the time_depth before calling
1767 pbb_number_of_iterations_at_time.
1768 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1771 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1773 Reverted the patch for "scattering permutations" from 2009-10-28.
1775 * graphite-poly.c (print_permutation): New.
1776 (debug_permutation): New.
1777 (new_poly_bb): Initialize PBB_PERMUTATION.
1778 (free_poly_bb): Free PBB_PERMUTATION.
1779 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1780 (struct pbb_permutation_elt): New.
1781 (PBB_PERMUTATION_ELT_STRIDE): New.
1782 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1783 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1784 (new_pbb_permutation_elt): New.
1785 (pbb_permutation_elt_free): New.
1786 (struct poly_bb): Add field permutation.
1787 (PBB_PERMUTATION): New.
1788 (print_permutation): Declared.
1789 (debug_permutation): Declared.
1791 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1793 * graphite-interchange.c (build_partial_difference): New.
1794 (memory_stride_in_loop): Refactored the computation of
1795 equality constraints into build_partial_difference function.
1796 Added support for debugging stride computations.
1798 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1800 * graphite-clast-to-gimple.c (gloog): Free if_region,
1801 if_region->true_region, and if_region->region.
1802 * sese.c (if_region_set_false_region): Free if_region->false_region.
1803 (create_if_region_on_edge): Do not use GGC_NEW.
1804 (move_sese_in_condition): Remove useless initialization.
1806 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1808 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1809 for the loops created by the loop distribution. Do not modify the
1811 (lst_try_interchange_loops): Same. Use a temporary LST for the
1812 transformed schedule. Call lst_update_scattering before data
1813 dependence analysis.
1814 (lst_try_interchange): Pass an extra parameter INDEX.
1815 (lst_do_interchange_1): New.
1816 (lst_do_interchange): Call lst_do_interchange_1.
1817 (scop_do_interchange): Call lst_update_scattering.
1818 * graphite-poly.c (apply_poly_transforms): Do not call
1819 lst_update_scattering.
1820 * graphite-poly.h (lst_pred): New.
1822 (lst_find_first_pbb): Return NULL when not found.
1824 (lst_insert_in_sequence): Allow LST1 to be NULL.
1826 (lst_substitute_3): New.
1827 * gcc.dg/graphite/interchange-1.c: XFail.
1828 * gcc.dg/graphite/interchange-8.c: XFail.
1829 * gcc.dg/graphite/interchange-11.c: XFail.
1831 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1833 * graphite-interchange.c (lst_perfectly_nested_p): New.
1834 (lst_perfect_nestify): New.
1835 (lst_try_interchange_loops): Call store_lst_schedule,
1836 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1837 (scop_do_interchange): Avoid redundant legality test.
1838 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1839 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1840 * graphite-poly.h (psct_static_dim): New.
1841 (lst_dewey_number_at_depth): New.
1842 (lst_find_pbb): Restructured.
1843 (lst_find_first_pbb): Restructured.
1844 (lst_find_last_pbb): New.
1845 (lst_contains_p): New.
1846 (lst_contains_pbb): New.
1847 (lst_create_nest): New.
1848 (lst_remove_from_sequence): New.
1849 (pbb_update_scattering): New.
1850 (lst_update_scattering_under): New.
1851 (lst_update_scattering_seq): New.
1852 (lst_update_scattering): New.
1853 (lst_insert_in_sequence): New.
1854 (lst_distribute_lst): New.
1855 (lst_remove_all_before_including_pbb): New.
1856 (lst_remove_all_before_excluding_pbb): New.
1858 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1860 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1861 get_loop_exit_edges.
1863 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1865 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1867 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1869 * graphite-poly.c (print_permutation): New.
1870 (debug_permutation): New.
1871 (new_poly_bb): Initialize PBB_PERMUTATION.
1872 (free_poly_bb): Free PBB_PERMUTATION.
1873 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1874 (struct pbb_permutation_elt): New.
1875 (PBB_PERMUTATION_ELT_STRIDE): New.
1876 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1877 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1878 (new_pbb_permutation_elt): New.
1879 (pbb_permutation_elt_free): New.
1880 (struct poly_bb): Add field permutation.
1881 (PBB_PERMUTATION): New.
1882 (print_permutation): Declared.
1883 (debug_permutation): Declared.
1885 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1887 * graphite-clast-to-gimple.c (gloog): Do not call
1888 sese_reset_aux_in_loops.
1889 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
1890 extra argument for domains. Do not use loop->aux.
1891 (build_scop_iteration_domain): Initialize and free domains, pass it
1892 to build_loop_iteration_domains and extract the information from
1893 domains. Do not use loop->aux.
1894 * sese.c (sese_reset_aux_in_loops): Removed.
1895 * sese.h (sese_reset_aux_in_loops): Removed.
1897 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1899 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
1900 (dependency_in_loop_p): Same.
1901 (translate_clast): Do not use loop->aux. Initialize
1902 loop->can_be_parallel.
1903 (mark_loops_parallel): Removed.
1904 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
1905 * graphite.c (free_aux_in_new_loops): Removed.
1906 (graphite_finalize): Do not call free_aux_in_new_loops.
1907 (graphite_transform_loops): Do not call mark_loops_parallel.
1909 2009-10-26 Li Feng <nemokingdom@gmail.com>
1911 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
1912 (translate_clast): Pass an extra parameter LEVEL.
1913 Call get_scattering_level.
1914 * graphite-clast-to-gimple.h (get_scattering_level): New.
1916 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1918 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
1919 * cfgloop.h (struct loop): New field single_iv.
1921 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
1922 loop->aux anymore: use loop->single_iv.
1923 (graphite_loop_normal_form): Moved...
1924 (build_graphite_loop_normal_form): Removed.
1925 (gloog): Do not call build_graphite_loop_normal_form.
1926 (free_aux_in_new_loops): Moved...
1927 (mark_loops_parallel): Restructure.
1928 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
1929 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
1930 (scop_canonicalize_loops): New.
1931 (build_poly_scop): Call scop_canonicalize_loops.
1932 * graphite.c (free_aux_in_new_loops): ...here.
1934 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1936 * g++.dg/graphite/graphite.exp: Add the same rules as in
1937 gcc.dg/graphite/graphite.exp.
1939 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1941 * g++.dg/graphite/id-1.C: New.
1943 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1945 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
1947 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
1948 (rewrite_phi_out_of_ssa): Same.
1949 (rewrite_cross_bb_scalar_deps): Same.
1950 (translate_scalar_reduction_to_array): Same.
1952 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1954 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
1957 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1959 * graphite-sese-to-poly.c (dump_alias_graphs): New.
1960 (build_scop_drs): Call dump_alias_graphs.
1962 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1964 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
1965 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1966 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
1967 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1968 * graphite-poly.h (free_lst): New.
1969 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
1970 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
1972 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1974 * graphite-poly.h (struct scop): Add a field saved_schedule.
1975 (SCOP_SAVED_SCHEDULE): New.
1976 (store_lst_schedule): New.
1977 (restore_lst_schedule): New.
1978 (store_scattering): Call store_lst_schedule.
1979 (restore_scattering): Call restore_lst_schedule.
1981 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1983 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
1984 (pdr_add_alias_set): Same.
1985 (build_poly_dr): Same.
1986 (build_alias_set_optimal_p): Same.
1987 (build_base_obj_set_for_drs): Same. Do not store the result of
1990 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1992 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
1993 all_components_are_cliques to 1.
1995 2009-10-20 Li Feng <nemokingdom@gmail.com>
1997 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
1999 (pdr_add_alias_set): Update retrieving alias_set_num.
2000 (build_poly_dr): Update retrieving dr_base_object_set.
2001 (partition_drs_to_sets): Remove.
2002 (build_alias_set_optimal_p): New.
2003 (build_alias_set_for_drs): Rename.
2004 (build_scop_drs): Update.
2005 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2006 (ALIAS_SET_INDEX): Remove.
2007 (BASE_OBJECT_SET_INDEX): Remove.
2009 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2011 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2013 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2015 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2016 loop upper bounds for 1-element arrays at end of structures.
2017 * tree-flow.h (array_at_struct_end_p): Declared.
2018 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2020 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2022 * g++.dg/graphite/pr41305.C: New.
2024 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2026 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2027 construction of parameter constraints from loop iteration analysis.
2028 * gcc.dg/graphite/run-id-2.c: New test.
2030 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2032 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2035 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2037 * graphite-dependences.c (dependence_polyhedron_1): Remove
2038 unused gdim dimensions from the DDR polyhedron.
2040 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2042 * graphite-dependences.c (pddr_transformed_scattering): New.
2043 (dot_original_deps_stmt_1): New.
2044 (dot_transformed_deps_stmt_1): New.
2045 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2046 dot_transformed_deps_stmt_1.
2047 (dot_original_deps): New.
2048 (dot_transformed_deps): New.
2049 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2051 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2053 * graphite-dependences.c (reduction_dr_1): Remove wrong
2054 assert: reduction BBs can have multiple reduction writes
2055 to memory. interchange-3.f90 is an example.
2057 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2059 * gfortran.dg/graphite/interchange-3.f90: New.
2061 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2063 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2065 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2067 * graphite-dependences.c (dependence_polyhedron_1): Add the
2068 context to the dependence polyhedron.
2070 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2072 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2073 PBB_PDR_DUPLICATES_REMOVED.
2074 (new_poly_bb): Same.
2076 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2078 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2080 (build_loop_iteration_domains): Extract bounds on parameters
2081 based on the data size.
2082 (build_scop_context): Do not initialize SCOP_CONTEXT;
2083 add new constraints.
2085 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2087 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2088 * graphite-ppl.h (graphite-ppl.h): Declared.
2090 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2092 * graphite-ppl.c (ppl_print_linear_expr): New.
2093 (debug_ppl_linear_expr): New.
2094 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2095 (debug_ppl_linear_expr): Declared.
2097 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2099 * graphite-interchange.c: Fix comments.
2100 * gcc.dg/graphite/block-1.c: Fix comments.
2102 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2104 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2105 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2107 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2109 Reapply the patch from Alexander Monakov that disappeared during
2110 the last merges from trunk.
2112 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2114 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2115 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2117 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2119 * graphite-interchange.c (memory_stride_in_loop): The depth
2120 argument corresponds to a dynamic time dimension, so use
2121 psct_dynamic_dim to refer to the transformed scattering dimension.
2123 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2125 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2127 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2129 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2131 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2132 the root of the LST.
2133 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2135 (print_lst): Print the root of LST in a different format.
2136 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2138 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2140 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2142 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2144 * doc/passes.texi: Document the Graphite infrastructure.
2146 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2148 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2149 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2150 and check the SSA representation.
2152 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2154 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2156 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2158 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2160 * gcc.dg/graphite/interchange-11.c: New.
2162 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2164 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2166 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2168 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2169 Add -fno-loop-strip-mine and -fno-loop-interchange.
2170 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2171 -fno-loop-strip-mine.
2172 * gfortran.dg/graphite/graphite.exp: Same.
2174 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2176 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2177 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2178 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2179 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2180 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2181 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2182 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2183 DEFAULT_FLAGS_GRAPHITE_SCOP.
2184 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2185 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2187 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2189 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2191 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2192 Sebastian Pop <sebastian.pop@amd.com>
2194 * graphite-interchange.c (build_linearized_memory_access): Pass an
2195 offset as parameter.
2196 (memory_stride_in_loop): Include transform scattering in the
2197 access functions to be able to querry the strides in the
2199 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2200 not the psct_iterator_dim.
2202 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2204 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2205 (lst_do_strip_mine_loop): New.
2206 (lst_do_strip_mine): New.
2207 (scop_do_strip_mine): Call lst_do_strip_mine.
2208 * graphite-poly.h (lst_add_loop_under_loop): New.
2209 (lst_find_first_pbb): New.
2211 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2213 * graphite-poly.c (loop_to_lst): Fix LST creation.
2215 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2217 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2218 sizeof(unsigned long) to make it run on 32bit systems.
2220 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2222 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2225 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2227 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2229 (write_alias_graph_to_ascii_dot): New.
2230 (write_alias_graph_to_ascii_ecc): Ditto.
2231 (partition_drs_to_sets): Add testing of optimality of current method
2232 which assigns alias numbers according to DFS Comopnent number. used
2233 as heuristic for the upcoming ECC algorithm.
2234 (build_scop_drs): Write to file also with the ecc and dot format.
2236 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2238 * gfortran.dg/graphite/interchange-1.f: XFail.
2240 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2242 * graphite.c (graphite_initialize): Do not handle functions with
2243 more than 100 basic blocks.
2245 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2247 * graphite-blocking.c (pbb_do_strip_mine): Use
2248 PARAM_LOOP_BLOCK_TILE_SIZE.
2250 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2252 * graphite-poly.c (dot_lst_1): New.
2254 * graphite-poly.h (dot_lst): Declared.
2256 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2258 * graphite-dependences.c (dot_deps_stmt_1): New.
2259 (dot_deps_stmt): New.
2260 * graphite-dependences.h (dot_deps_stmt): Declared.
2262 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2264 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2265 not replace cross BB scalar dependences ending on PHI nodes.
2266 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2268 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2270 * graphite-poly.c (apply_poly_transforms): Implement the high
2271 level driver for flag_loop_block.
2272 * opts.c (decode_options): Enable flag_loop_block at -O2.
2273 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2276 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2278 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2281 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2283 * graphite-poly.h (lst_find_pbb): New.
2284 (find_lst_loop): New.
2286 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2288 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2289 * graphite-poly.h (struct scop): Remove dep_graph field.
2290 (SCOP_DEP_GRAPH): Removed.
2292 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2294 * graphite-poly.h (copy_lst): Do full copy of LST.
2296 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2298 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2299 when the loop stride is zero.
2301 * gcc.dg/graphite/id-16.c: New.
2303 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2305 * graphite-dependences.c (reduction_dr_1): New.
2306 (reduction_dr_p): New.
2307 (graphite_legal_transform_dr): Call reduction_dr_p.
2308 (reduction_ddr): Renamed reduction_ddr_p.
2309 * graphite-poly.h (same_pdr_p): New.
2310 (number_of_write_pdrs): New.
2311 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2312 (split_reduction_stmt): Do not split reduction statements
2313 when there are no writes to memory.
2314 (translate_scalar_reduction_to_array_for_stmt): Insert the
2315 memory reduction statement just after the scalar reduction statement.
2317 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2319 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2320 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2322 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2324 * graphite-interchange.c (lst_apply_interchange): New.
2325 (lst_interchange_profitable_p): New.
2326 (lst_try_interchange_loops): New.
2327 (lst_try_interchange): New.
2328 (lst_do_interchange): New.
2329 (pbb_do_interchange): Removed.
2330 (scop_do_interchange): Call lst_do_interchange.
2332 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2334 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2335 SCOP_TRANSFORMED_SCHEDULE.
2340 * graphite-poly.h (lst_p): New.
2343 (LST_LOOP_FATHER): New.
2346 (scop_to_lst): Declared.
2347 (print_lst): Declared.
2348 (debug_lst): Declared.
2349 (new_lst_loop): New.
2350 (new_lst_stmt): New.
2353 (lst_dewey_number): New.
2354 (struct scop): Add original_schedule and transformed_schedule fields.
2355 (SCOP_ORIGINAL_SCHEDULE): New.
2356 (SCOP_TRANSFORMED_SCHEDULE): New.
2357 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2359 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2361 * graphite-dependences.c (reduction_ddr): New.
2362 (graphite_legal_transform_bb): Call reduction_ddr.
2363 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2364 Initialize PBB_IS_REDUCTION.
2365 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2366 (PBB_IS_REDUCTION): New.
2367 (new_poly_bb): Update declaration.
2368 * graphite-scop-detection.h (build_scop_bbs): Removed.
2369 (nb_reductions_in_loop): Removed.
2370 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2371 parameter for reductions.
2372 (try_generate_gimple_bb): Update call to new_poly_bb.
2373 (build_scop_bbs_1): Same.
2374 (build_scop_bbs): Same.
2375 (gsi_for_phi_node): New.
2376 (scalar_close_phi_node_p): Remove gcc_assert.
2377 (split_reduction_stmt): New.
2378 (is_reduction_operation_p): New.
2379 (phi_contains_arg): New.
2380 (follow_ssa_with_commutative_ops): New.
2381 (detect_commutative_reduction_arg): New.
2382 (detect_commutative_reduction_assign): New.
2383 (follow_inital_value_to_phi): New.
2384 (edge_initial_value_for_loop_phi): New.
2385 (initial_value_for_loop_phi): New.
2386 (detect_commutative_reduction): New.
2387 (translate_scalar_reduction_to_array_for_stmt): New.
2388 (insert_copyout): New.
2389 (insert_copyin): New.
2390 (translate_scalar_reduction_to_array): New.
2391 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2392 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2393 (rewrite_commutative_reductions_out_of_ssa): New.
2394 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2395 * sese.h (split_region_for_bb): New.
2397 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2398 * gcc.dg/graphite/interchange-1.c: Fix format.
2399 * gcc.dg/graphite/interchange-10.c: New.
2401 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2403 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2406 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2408 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2409 (rewrite_cross_bb_scalar_dependence): New.
2410 (rewrite_cross_bb_scalar_deps): New.
2411 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2412 Call rewrite_cross_bb_scalar_deps.
2414 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2416 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2417 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2420 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2422 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2423 * graphite-interchange.c (pbb_do_interchange): Same.
2424 * graphite-poly.c (print_scattering_function): Same.
2426 * graphite-poly.h (pbb_loop): New.
2427 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2429 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2431 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2433 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2435 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2436 so don't pass a pointer to it.
2437 (build_alias_set_for_drs): Same.
2438 (build_base_obj_set_for_drs): Same.
2439 (build_scop_drs): Same.
2441 2009-09-26 Li Feng <nemokingdom@gmail.com>
2443 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2444 the alias graph of data references.
2446 2009-09-25 Li Feng <nemokingdom@gmail.com>
2448 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2449 (build_scop_drs): When debugging, write the alias graph to file,
2450 otherwise, should be disabled.
2452 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2454 * Merge from mainline (151310:151361).
2456 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2458 * Merge from mainline (151171:151310).
2460 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2462 * Merge from mainline (151171:151806).
2464 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2466 * Revert the last commit.
2468 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2470 * Merge from mainline (151171:151819).
2472 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2474 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2475 (is_simple_operand): Remove call to stmt_simple_memref_p.
2476 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2478 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2480 * gcc.dg/graphite/interchange-mvt.c: New File.
2481 * gcc.dg/graphite/scop-dsyrk.c: New File.
2482 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2483 * gcc.dg/graphite/scop-mvt.c: New File.
2484 * gcc.dg/graphite/scop-sor.c: New File.
2486 2009-09-17 Li Feng <nemokingdom@gmail.com>
2488 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2489 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2490 (graphite_carried_dependence_level_k): Ditto.
2491 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2492 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2493 (new_poly_dr): Adjust declaration.
2494 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2495 (free_gimple_bb): Added free_data_refs_aux.
2496 (build_poly_dr): Add dr_base_object_set.
2497 (partition_drs_to_sets): New.
2498 (dr_same_base_object_p): New.
2499 (build_alias_set_for_drs): New.
2500 (build_base_object_set_for_drs): New.
2501 (build_scop_drs): Add build_base_obj_set_for_drs.
2502 * graphite-sese-to-poly.h: Added #define for alias set number index and
2503 base object set index.
2504 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2505 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2507 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2509 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2510 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2512 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2514 * graphite-sese-to-poly.c (struct irp_data): Removed.
2515 (idx_record_params): Removed.
2516 (find_params_in_bb): Scan for parameters the access functions; don't
2517 parse the tree representation.
2519 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2521 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2522 passes at -O1 and below.
2524 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2526 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2527 tree-scalar-evolution.h, and then tree-data-ref.h.
2528 * graphite-clast-to-gimple.c: Same.
2529 * graphite-dependences.c: Same.
2530 * graphite-interchange.c: Same.
2531 * graphite-poly.c: Same.
2532 * graphite-scop-detection.c: Same.
2533 * graphite-sese-to-poly.c: Same.
2535 * lambda-code.c: Same.
2536 * matrix-reorg.c: Same.
2537 * tree-data-ref.c: Same.
2538 * tree-if-conv.c: Same.
2539 * tree-loop-distribu: Same.: Same.
2540 * tree-loop-linear.c: Same.
2541 * tree-parloops.c: Same.
2542 * tree-predcom.c: Same.
2543 * tree-vect-patterns.c: Same.
2545 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2547 Partially revert the previous patch, except the following.
2548 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2549 as parameters the operands of the not expression.
2551 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2553 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2554 Do not call analyze_scalar_evolution on assignments.
2555 (instantiate_scev_phi): Call analyze_scalar_evolution.
2556 (instantiate_scev_name): Call instantiate_scev_assign and
2557 instantiate_scev_phi.
2558 (instantiate_scev_not): Adapted to pass as parameters the operands
2559 of the not expression.
2561 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2563 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2564 to pass as parameters the operands of the binary expression.
2566 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2568 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2569 instantiate_scev_not. Handle NEGATE_EXPR.
2570 (instantiate_scev_r): Handle NEGATE_EXPR.
2572 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2574 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2576 (instantiate_scev_r): Move code in instantiate_scev_2
2577 and instantiate_scev_1.
2579 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2581 * tree-scalar-evolution.c (instantiate_scev_3): New.
2582 (instantiate_scev_1): Move code in instantiate_scev_3.
2584 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2586 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2587 (instantiate_scev_1): Move code in instantiate_scev_poly.
2589 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2591 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2592 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2594 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2596 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2597 (instantiate_scev_1): Move code in instantiate_scev_convert.
2599 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2601 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2602 (instantiate_scev_1): Move code in instantiate_scev_binary.
2604 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2606 * tree-scalar-evolution.c (instantiate_scev_name): New.
2607 (instantiate_scev_1): Move code in instantiate_scev_name.
2609 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2611 * Merge from mainline (150992:151171).
2613 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2615 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2617 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2619 * graphite-dependences.c (graphite_legal_transform_bb): Call
2620 pbb_remove_duplicate_pdrs.
2621 * graphite-poly.c (can_collapse_pdr): Removed.
2622 (pdr_find_duplicate): Removed.
2623 (can_collapse_pdrs): New.
2624 (pbb_remove_duplicate_pdrs): New.
2625 (new_poly_dr): Do not look for duplicates.
2626 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2627 (PBB_PDR_DUPLICATES_REMOVED): New.
2628 (pbb_remove_duplicate_pdrs): Declared.
2630 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2632 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2633 the strides by multiplying by PDR_NB_REFS.
2634 * graphite-poly.c (can_collapse_pdr): New.
2635 (pdr_find_duplicate): New.
2636 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2637 Initialize PDR_NB_REFS.
2638 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2640 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2642 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2644 Revert one of the previous commits:
2645 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2646 the computation of symmetric data dependence relations.
2647 (dependency_between_pbbs_p): Same.
2649 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2652 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2655 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2657 * graphite-dependences.c (pddr_original_scattering): Return NULL
2658 for read-read dependence relations.
2659 * graphite-poly.h (enum poly_dr_type): Fix comment.
2662 (pdr_may_write_p): New.
2664 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2666 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2667 (struct poly_dr): Same.
2668 (new_poly_dr): Same.
2669 * graphite-poly.c (new_poly_dr): Same.
2671 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2672 Sebastian Pop <sebastian.pop@amd.com>
2674 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2675 pbb_strip_mine_time_depth. Changed the implementation so that
2676 transformation is expressed as a transformation on
2677 time (scatttering) dimensions. Also, ensures that the 2d+1
2678 scheduling format is preserved.
2679 (pbb_strip_mine_profitable_p): Profitability is based on the
2680 iteration number of a given time (scattering) dimension,
2681 and not on a original loop depth dimension.
2682 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2683 (pbb_do_strip_mine): Call psct_dynamic_dim.
2684 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2685 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2686 (pbb_nb_dynamic_scattering_transform): New.
2687 (psct_dynamic_dim): New.
2689 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2691 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2692 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2693 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2694 * graphite-interchange.c (build_linearized_memory_access): Same.
2695 (memory_stride_in_loop): Same.
2697 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2699 * graphite-dependences.c (pddr_original_scattering): New.
2700 (graphite_legal_transform_dr): Call pddr_original_scattering.
2703 * graphite-dependences.h (dot_deps): Declared.
2704 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2705 (print_pdr): Print PDR_ID.
2706 * graphite-poly.h (struct poly_dr): Add field id.
2709 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2711 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2713 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2714 not delete the original dependence relation.
2716 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2718 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2719 the computation of symmetric data dependence relations.
2720 (dependency_between_pbbs_p): Same.
2722 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2724 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2725 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2726 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2727 (free_poly_ddr): New.
2728 (pddr_is_empty): New.
2729 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2730 (dependence_polyhedron): Same. Remove useless gcc_assert.
2732 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2733 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2734 * graphite-dependences.h (enum poly_dependence_kind): New.
2735 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2736 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2737 (PDRP_SINK): Renamed PDDR_SINK.
2738 (PDRP_DDP): Renamed PDDR_DDP.
2740 (free_poly_ddr): Declared.
2741 * graphite-poly.c (new_scop): Use the new hash function names.
2742 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2743 into original_pddrs.
2744 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2746 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2748 * Merge from mainline (150764:150992).
2750 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2752 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2753 bounds with LT_EXPR to make niter analysis more precise on code
2754 generated by Graphite.
2756 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2758 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2759 (graphite_legal_transform_bb): Same.
2760 (poly_drs_may_alias_p): Same.
2762 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2765 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2766 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2768 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2770 * graphite-poly.c (print_pbb): Print PBB index.
2772 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2774 * Merge from mainline (r150672:150764).
2776 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2778 * graphite-interchange.c (ppl_max_for_le): Moved...
2779 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2780 * graphite-ppl.c (ppl_max_for_le): ... here.
2781 * graphite-ppl.h (ppl_max_for_le): Declared.
2783 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2785 * Merge from mainline (r150372:150672).
2787 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2790 * sese.c (convert_for_phi_arg): New.
2791 (add_guard_exit_phis): Use convert_for_phi_arg.
2793 * gfortran.dg/graphite/id-17.f: New.
2795 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2797 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2798 unknown subscript upper bounds.
2800 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2802 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2803 Pranav Garg <pranav.garg2107@gmail.com>
2805 * graphite-interchange.c (gather_access_strides): Removed.
2806 (ppl_max_for_le): New.
2807 (build_linearized_memory_access): New.
2808 (memory_stride_in_loop): New.
2809 (pbb_interchange_profitable_p): Reimplemented.
2810 * graphite-ppl.h (ppl_new_id_map): New.
2811 (ppl_interchange): New.
2813 * gcc.dg/graphite/interchange-6.c: XFAILed.
2815 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2817 * graphite-interchange.c (compute_subscript): Removed.
2818 (compute_array_size_cstr): Removed.
2819 (compute_array_size_poly): Removed.
2820 (compute_array_size): Removed.
2821 (gather_access_strides_poly): Removed.
2822 (gather_access_strides): Empty.
2824 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2826 * graphite-dependences.c (dependence_polyhedron_1): Replace
2827 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2828 (graphite_legal_transform_dr): Same.
2829 (graphite_carried_dependence_level_k): Same.
2830 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2831 Initialize PDR_NB_SUBSCRIPTS.
2832 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2834 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2835 (PDR_NB_SUBSCRIPTS): New.
2836 (pdr_nb_subscripts): Removed.
2837 (pdr_dim): Simplified.
2838 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2839 with PDR_NB_SUBSCRIPTS.
2841 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2843 * graphite-interchange.c (compute_array_size): Remove use of
2845 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2846 Do not initialize PDR_DATA_CONTAINER.
2847 (print_pdr): Do not print PDR_DATA_CONTAINER.
2848 * graphite-poly.h (struct poly_dr): Remove data_container field.
2849 (PDR_DATA_CONTAINER): Removed.
2850 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2852 (build_poly_dr): Same.
2854 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2856 * gcc.dg/graphite/interchange-9.c: New.
2858 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2859 Sebastian Pop <sebastian.pop@amd.com>
2861 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2862 copy of the dependence polyhedron. Free the temporary objects.
2863 (graphite_carried_dependence_level_k): Free unused objects before
2866 * gcc.dg/graphite/interchange-1.c: XFAILed.
2867 * gcc.dg/graphite/interchange-2.c: XFAILed.
2868 * gcc.dg/graphite/interchange-3.c: XFAILed.
2869 * gcc.dg/graphite/interchange-4.c: XFAILed.
2870 * gcc.dg/graphite/interchange-7.c: XFAILed.
2872 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2874 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2875 Early return without analyzing the data dependences if no
2876 transform has been done. Call restore_scattering if the transform
2878 (graphite-interchange.c): Same.
2879 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2880 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2881 (apply_poly_transforms): Do not gcc_assert that
2882 the transform is legal.
2883 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2884 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
2885 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
2886 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2887 * graphite-poly.h (struct poly_scattering): New.
2888 (struct poly_bb): Add original, transformed, and saved fields.
2889 Remove transformed_scattering, original_scattering, nb_local_variables,
2890 and nb_scattering_transform fields.
2891 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
2892 (poly_scattering_new): New.
2893 (poly_scattering_free): New.
2894 (poly_scattering_copy): New.
2895 (store_scattering_pbb): New.
2896 (store_scattering): New.
2897 (restore_scattering_pbb): New.
2898 (restore_scattering): New.
2899 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2900 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
2902 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2904 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
2907 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2909 * Makefile.in (graphite.o): Depends on PREDICT_H.
2910 * graphite.c: Include predict.h.
2911 (graphite_finalize): Call tree_estimate_probability.
2912 * predict.c (predict_loops): Do not call scev_initialize and
2914 (tree_estimate_probability_bb): New.
2915 (tree_estimate_probability): Do not initialize loops: move that
2916 code to the driver. Call tree_estimate_probability_bb.
2917 (tree_estimate_probability_driver): New.
2918 (pass_profile): Use tree_estimate_probability_driver.
2919 * predict.h (tree_estimate_probability): Declared.
2921 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2923 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
2924 * graphite-dependences.c (graphite_legal_transform): Add time to
2925 TV_GRAPHITE_DATA_DEPS.
2926 (dependency_between_pbbs_p): Same.
2927 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2929 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
2931 * Merge from mainline (r149952:150372).
2933 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2935 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
2936 * graphite-blocking.c: Same.
2937 * graphite-clast-to-gimple.c: Same.
2938 * graphite-dependences.c: Same.
2939 * graphite-poly.c: Same.
2940 * graphite-poly.h: Same.
2941 * graphite-ppl.c: Same.
2942 * graphite-scop-detection.c: Same.
2943 * graphite-sese-to-poly.c: Same.
2946 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2948 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
2949 (remove_simple_copy_phi): New.
2950 (remove_invariant_phi): New.
2951 (simple_copy_phi_p): New.
2952 (reduction_phi_p): New.
2953 (gsi_for_ssa_name_def): New.
2954 (insert_out_of_ssa_copy): New.
2955 (insert_out_of_ssa_copy_on_edge): New.
2956 (create_zero_dim_array): New.
2957 (scalar_close_phi_node_p): New.
2958 (rewrite_close_phi_out_of_ssa): New.
2959 (rewrite_phi_out_of_ssa): New.
2960 (rewrite_reductions_out_of_ssa): New.
2961 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
2963 * gcc.dg/graphite/id-11.c: New.
2964 * gcc.dg/graphite/id-15.c: New.
2965 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
2966 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
2967 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
2968 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
2969 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
2970 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
2971 * gfortran.dg/graphite/id-13.f: New.
2972 * gfortran.dg/graphite/id-5.f: New.
2974 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2976 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
2977 check that nb_reductions_in_loop is zero.
2978 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
2979 reduction phi nodes.
2980 (nb_reductions_in_loop): Removed.
2981 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
2982 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
2983 (bb_contains_non_iv_scalar_phi_nodes): Removed.
2984 (scop_contains_non_iv_scalar_phi_nodes): Removed.
2985 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
2987 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2989 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
2990 statements that have an empty iteration domain.
2991 * gfortran.dg/graphite/id-16.f: New.
2993 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2995 * tree-scalar-evolution.c (instantiate_scev_1): Return
2996 chrec_dont_know when the result is not above instantiate_below.
2997 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
2998 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
2999 the tree has a known scalar evolution.
3000 * gfortran.dg/graphite/id-14.f: New.
3001 * gfortran.dg/graphite/id-15.f: New.
3003 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3005 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3007 (rename_variables): Keep inserting renames after the ones already
3010 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3012 * graphite-sese-to-poly.c (compare_bb_depths): New.
3013 (graphite_sort_dominated_info): New.
3014 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3015 (build_scop_scattering): Fix comment.
3017 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3019 * graphite.c (graphite_finalize): Call print_loops instead of
3020 dump_function_to_file.
3021 * gcc.dg/graphite/graphite.exp: Fix formatting.
3022 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3023 loops generated in the graphite output file.
3024 * gcc.dg/graphite/pr35356-2.c: New.
3025 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3026 * gfortran.dg/graphite/id-12.f: New.
3028 2009-07-24 Li Feng <nemokingdom@gmail.com>
3030 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3033 2009-07-24 Li Feng <nemokingdom@gmail.com>
3034 Tobias Grosser <grosser@fim.uni-passau.de>
3036 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3037 alias set number build alias in ACCESSES polyhedron.
3038 (build_alias_set_for_drs): New.
3039 (build_pbb_drs): Added build_alias_set_for_drs.
3040 * graphite-dependences.c (poly_drs_may_alias_p): New.
3041 (graphite_carried_dependence_level_k): Check alias information
3042 before building polyhedron.
3044 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3046 * Makefile.in (lambda-code.o): Fix formatting.
3048 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3050 * Merge from mainline (r149350-149952)
3052 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3054 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3055 before interchange to prepare for loop blocking.
3057 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3059 * graphite-poly.c (apply_poly_transforms): Add checks after every
3061 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3062 done in apply_poly_transforms.
3064 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3066 * graphite-dependences.c (build_lexicographically_gt_constraint):
3067 Replace RES parameter with *RES.
3068 (dependence_polyhedron_1): Pass an address of the parameter RES
3069 instead of value of RES.
3071 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3073 * graphite.c (graphite_finalize): Fix comment.
3074 (graphite_transform_loops): Reset scev info after code generation
3077 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3079 * graphite.c (graphite_finalize): Call scev_reset.
3081 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3083 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3084 GBB_CLOOG_IV_TYPES hash table twice.
3085 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3086 (add_condition_to_domain): Clear GMP values.
3088 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3090 * graphite-dependences.c: Fix formatting.
3091 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3092 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3093 * graphite-sese-to-poly.c: Fix formatting.
3094 * graphite.c (graphite_transform_loops): Create the hash table
3095 after the early return.
3097 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3099 * gcc.dg/graphite/id-14.c: New.
3100 * gcc.dg/graphite/pr40157.c: New.
3101 * gfortran.dg/graphite/id-11.f: New.
3103 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3105 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3106 (build_poly_scop): Return false when there are no pbbs within
3107 loops to avoid to pass to cloog scops with no loops.
3109 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3111 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3112 useless test "i % 2".
3113 (build_pbb_scattering_polyhedrons): Fix formatting.
3114 (build_poly_dr): Same.
3115 * graphite.c (graphite_transform_loops): Restructure.
3117 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
3119 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3120 reduction_list parameter.
3121 (rewrite_all_phi_nodes_with_iv): Same.
3122 (canonicalize_loop_ivs): Same.
3123 * tree-parloops.c (struct brli): Removed.
3124 (build_reduction_list_info): Removed.
3125 (build_new_reduction): New.
3126 (analyze_reduction_list): Removed.
3127 (gather_scalar_reductions): Find reductions instead of phi
3128 nodes that can't be canonicalized.
3129 (try_create_reduction_list): Remove reduction_list parameter.
3130 (gen_parallel_loop): Same.
3131 (parallelize_loops): Remove analyze_reductions variable,
3132 initialization and free.
3133 Change reduction_list htab initialization to reduction_info
3134 elements instead of ssa names.
3135 Call try_create_reduction_list and gen_parallel_loop without
3136 analyzed_reduction argument.
3137 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3138 canonicalize_loop_ivs with one less argument.
3139 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3141 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3143 * graphite-dependences.c (new_poly_dr_pair): New.
3144 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3145 (new_poly_dr_pair): New.
3146 (eq_poly_dr_pair_p): New.
3147 (hash_poly_dr_pair_p): New.
3148 * graphite-dependences.h (struct poly_dr_pair): New.
3149 (eq_poly_dr_pair_p): Declared.
3150 (hash_poly_dr_pair_p): Declared.
3151 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3152 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3153 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3154 * Makefile.in (graphite-poly.o): Add dependence on
3155 graphite-dependences.h.
3157 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3159 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3160 polynomials of degree > 1 pass to Graphite.
3161 * tree-chrec.c (scev_is_linear_expression): Call
3162 evolution_function_is_affine_multivariate_p.
3163 * gfortran.dg/graphite/id-10.f90: New.
3165 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3167 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3168 Instantiate scevs varying in outer loops.
3169 * gfortran.dg/graphite/id-9.f: Correct testcase.
3171 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3173 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3174 redundant constraint.
3176 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3178 * gcc.dg/graphite/graphite.exp: Fix comments.
3179 * gfortran.dg/graphite/graphite.exp: Trigger actions
3180 based on the file names as in the C testsuite.
3181 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3182 * gfortran.dg/graphite/block-2.f: Same.
3183 * gfortran.dg/graphite/block-3.f90: Same.
3184 * gfortran.dg/graphite/block-4.f90: Same.
3185 * gfortran.dg/graphite/id-1.f90: Same.
3186 * gfortran.dg/graphite/id-2.f90: Same.
3187 * gfortran.dg/graphite/id-3.f90: Same.
3188 * gfortran.dg/graphite/id-4.f90: Same.
3189 * gfortran.dg/graphite/id-6.f: Same.
3190 * gfortran.dg/graphite/id-9.f: Same.
3191 * gfortran.dg/graphite/interchange-1.f: Same.
3192 * gfortran.dg/graphite/interchange-2.f: Same.
3193 * gfortran.dg/graphite/scop-1.f: Same.
3195 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3197 * sese.c (expand_scalar_variables_call): New.
3198 (expand_scalar_variables_ssa_name): Handle calls in expander.
3200 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3202 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3203 Expect to see the pattern twice.
3204 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3205 * gcc.dg/graphite/interchange-5.c: Same.
3206 * gcc.dg/graphite/interchange-6.c: Same.
3208 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3210 * gcc.dg/graphite/id-10.c: New.
3211 * gcc.dg/graphite/id-12.c: New.
3212 * gfortran.dg/graphite/id-7.f: New.
3213 * gfortran.dg/graphite/id-8.f: New.
3215 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3217 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3220 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3222 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3224 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3226 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3228 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3230 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3231 building PDR subscripts.
3233 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3235 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3236 computation of array sizes.
3238 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3240 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3242 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3244 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3245 build_pairwise_constraint, dr_equality_constraints,
3246 build_pairwise_scheduling_equality,
3247 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3248 build_lexicographically_gt_constraint, dependence_polyhedron,
3249 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3250 Move from NNC_Polyhedron to C_Polyhedron.
3251 * graphite-interchange.c (compute_array_size_poly,
3252 gather_access_strides): Dito.
3253 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3254 free_scop, pbb_number_of_iterations): Dito.
3255 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3256 pbb_dim_iter_domain, struct scop): Dito.
3257 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3258 new_Cloog_Domain_from_ppl_Polyhedron,
3259 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3260 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3261 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3262 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3263 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3264 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3265 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3266 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3267 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3268 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3269 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3270 build_scop_iteration_domain, build_poly_dr): Dito
3272 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3274 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3276 * gcc.dg/graphite/run-id-1.c: New.
3278 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3280 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3281 positivity constraint on the symbolic number of iterations.
3283 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3285 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3287 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3288 Tobias Grosser <grosser@fim.uni-passau.de>
3290 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3291 (build_cloog_prog): Directly use SCOP_CONTEXT.
3292 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3293 (free_scop): Free SCOP_CONTEXT.
3294 (print_scop_context): New.
3295 (print_scop): Call print_scop_context.
3296 (debug_scop_context): New.
3297 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3298 (struct scop): Added field context.
3299 (SCOP_CONTEXT): New.
3300 * graphite-sese-to-poly.c (add_param_constraints): New.
3301 (build_scop_context): New.
3302 (build_poly_scop): Call build_scop_context.
3304 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3306 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3307 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3308 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3309 * graphite-ppl.h: Include double-int.h and tree.h.
3310 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3311 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3312 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3313 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3315 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3317 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3318 POINTER_PLUS_EXPR for pointer types.
3319 (clast_to_gcc_expression): Same.
3321 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3323 * graphite-poly.c (print_scattering_function): Early return when
3324 PBB_TRANSFORMED_SCATTERING is not initialized.
3325 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3327 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3329 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3332 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3334 * tree-parloops.c (analyze_reduction_list): Change return
3336 (try_create_reduction_list): Move the call to
3337 analyze_reduction_list to the beginining.
3338 Call reduction_phi with analyzed_reductions as argument
3339 instead of reduction_list.
3341 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3343 * Merge from mainline (r148296:149346)
3345 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3347 * graphite-scop-detection.c (graphite_can_represent_init): New.
3348 (graphite_can_represent_scev): Call graphite_can_represent_init:
3349 check that the initial value does not contain multiplications of
3351 (stmt_has_simple_data_refs_p): New.
3352 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3353 (is_simple_operand): Fix formatting.
3354 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3356 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3358 * gcc.dg/graphite/id-13.c: New.
3359 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3360 analyze_scalar_evolution, use scalar_evolution_in_region.
3361 (scan_tree_for_params_right_scev): Add extra assert.
3362 (parameter_index_in_region_1): Split from parameter_index_in_region.
3363 (idx_record_params): Use scalar_evolution_in_region.
3364 (find_params_in_bb): Same.
3365 (find_scop_parameters): Same.
3366 (build_loop_iteration_domains): Same.
3367 (create_linear_expr_from_tree): Same.
3368 * sese.c (scalar_evolution_in_region): New.
3369 * sese.h (scalar_evolution_in_region): Declared.
3370 (defined_in_sese_p): New.
3371 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3373 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3376 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3378 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3379 TREE_DATA_REF_H also implies SCEV_H.
3381 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3383 * graphite-poly.c (print_scop_params): New.
3384 (print_scop): Call print_scop_params.
3385 (debug_scop_params): New.
3386 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3388 2009-07-07 Li Feng <nemokingdom@gmail.com>
3390 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3391 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3392 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3393 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3394 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3395 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3397 2009-07-07 Li Feng <nemokingdom@gmail.com>
3399 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3400 for dependency checking part.
3401 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3402 tests for dependency checking.
3403 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3404 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3405 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3406 flag -fdump-tree-graphite-all for autopar testsuites.
3408 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3410 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3411 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3412 canonicalize_loop_ivs): Moved...
3413 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3415 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3417 * tree-parloops.c (try_create_reduction_list): Pass an extra
3418 argument analyzed_reductions. Call analyze_reduction_list.
3419 (gen_parallel_loop): Do not call analyze_reduction_list.
3420 (parallelize_loops): Init and finalize analyzed_reductions.
3422 2009-07-06 Li Feng <nemokingdom@gmail.com>
3424 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3425 Added flag -fno-loop-strip-mine for autopar testcase.
3427 2009-07-04 Li Feng <nemokingdom@gmail.com>
3429 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3430 transformed scattering dimension instead of unmatch orignal when
3431 calling dependence_polyhedron.
3433 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3435 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3437 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3439 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3440 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3442 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3444 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3445 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3446 * graphite-poly.c (pbb_number_of_iterations): New.
3447 * graphite-poly.h (pbb_number_of_iterations): Declared.
3448 (pbb_iterator_dim, pbb_parameter_dim): New.
3450 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3452 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3453 last commit on type of lower and upper bound of loops.
3455 2009-06-29 Li Feng <nemokingdom@gmail.com>
3457 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3458 graphite-dependences.h.
3459 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3460 (mark_bb_with_pbb): New.
3461 (get_stmtfor_depth): New.
3462 (find_pbb_via_hash): New.
3463 (dependency_in_loop_p): New.
3464 (mark_loops_parallel): New.
3465 (free_aux_in_new_loops): New.
3466 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3467 bb with it's relevant pbb. Mark newly created loops. Remove mark
3468 innermost loop parallel without checking.
3469 (gloog): Add parameter BB_PBB_MAPPING.
3470 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3471 (gloog): Change declaration.
3472 (mark_loop_parallel): Make extern.
3473 (free_aux_in_new_loops): Declare.
3474 (bb_pbb_map_hash): New.
3475 (eq_bb_pbb_map): New.
3476 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3477 auto parallelization when flag_graphite_force_parallel is set.
3478 (graphite_finalize): Added free_aux_in_new_loops.
3479 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3480 the innermost loop that marked parallel. Use
3481 flag_graphite_force_parallel instead of loop->can_be_parallel.
3482 (loop_parallel_p): Move inner most checking out of function.
3484 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3486 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3487 type of lower and upper bound of loops signed long int.
3489 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3491 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3492 expression outside the loop.
3494 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3496 * gcc.dg/graphite/interchange-8.c: New.
3498 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3500 * gcc.dg/graphite/interchange-0.c: XFailed.
3501 * gcc.dg/graphite/interchange-5.c: XFailed.
3502 * gcc.dg/graphite/interchange-6.c: XFailed.
3504 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3506 * graphite-interchange.c (compute_array_size_poly): The end of the
3507 recursion should return 1.
3509 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3511 * graphite-interchange.c (compute_array_size_cstr): Allow the
3512 subscript multiplier to be -1.
3513 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3514 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3515 data_container. Initializes PDR_DATA_CONTAINER.
3516 (print_pdr_access_layout): New.
3517 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3518 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3520 (PDR_DATA_CONTAINER): New.
3521 (new_poly_dr): Update declaration.
3522 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3523 (build_poly_dr): Call pdr_add_data_dimensions.
3525 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3527 * graphite-poly.h (struct poly_dr): Fix comment.
3528 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3529 (pdr_add_memory_accesses): New.
3530 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3532 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3534 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3535 (print_pbb): Add call to print_pdrs.
3536 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3538 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3539 Li Feng <nemokingdom@gmail.com>
3541 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3542 (dependency_between_pbbs_p): New.
3543 (lexicographically_gt_p): Assure !empty_p before polyhedron
3544 intersection assign.
3545 (build_lexicographically_gt_constraint): Correct lexicographically
3547 * graphite-dependences.h: New.
3548 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3550 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3552 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3553 (gloog): Print to dump_file the generated clast.
3554 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3555 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3557 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3559 * graphite-poly.c (extend_scattering): Increment
3560 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3562 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3564 * graphite-interchange.c (compute_array_size_poly): Added exit of
3565 recursion condition. Continue iterating even after the first equality.
3566 (compute_array_size): Same.
3568 2009-06-24 Li Feng <nemokingdom@gmail.com>
3570 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3571 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3572 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3573 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3574 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3576 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3578 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3579 only when the use verifies is_gimple_reg.
3581 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3583 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3584 Allocate scaldims after call to unify_scattering_dimensions.
3586 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3588 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3590 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3591 Albert Cohen <albert.cohen@inria.fr>
3593 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3594 variables for the strip mining.
3596 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3597 Pranav Garg <pranav.garg2107@gmail.com>
3599 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3600 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3601 (graphite-blocking.o): New rule.
3602 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3603 * graphite-blocking.c: New.
3604 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3605 flag_loop_strip_mine.
3606 (psct_scattering_dim_for_loop_depth): New.
3607 * graphite-poly.h (scop_do_strip_mine): Declared.
3608 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3609 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3610 flag_loop_strip_mine.
3612 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3614 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3615 a GMP value and a PPL coefficient at each iteration of a loop.
3617 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3619 * graphite-dependences.c (dependence_polyhedron): Do not use
3620 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3621 pbb_nb_scattering_transform.
3622 (graphite_legal_transform_dr): Same.
3623 * graphite-poly.c (extend_scattering): Same.
3624 (unify_scattering_dimensions): Same.
3625 (print_scattering_function): Same.
3626 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3627 PBB_NB_LOCAL_VARIABLES.
3628 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3629 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3630 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3631 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3632 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3633 (pbb_nb_scattering_transform): New.
3634 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3635 (psco_scattering_dim): Add assert on parameters.
3636 (psct_scattering_dim): Same.
3637 (psct_scattering_dim_for_loop_depth): Declared.
3638 (psct_local_var_dim): New.
3639 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3640 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3641 correct layout, call pbb_nb_local_vars.
3642 (psct_add_local_variable, psct_add_scattering_dimension): New.
3643 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3644 Initialize PBB_NB_SCATTERING_TRANSFORM.
3646 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3648 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3649 (set_coef): Renamed ppl_set_coef.
3650 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3652 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3654 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3655 test a boolean against 1.
3656 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3657 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3658 (pbb_do_interchange): Returns true when a transform has been performed.
3659 (scop_do_interchange): Same.
3660 * graphite-poly.c (apply_poly_transforms): Use the return value of
3661 scop_do_interchange.
3662 * graphite-poly.h (scop_do_interchange): Update declaration.
3664 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3666 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3668 * sese.c (sese_reset_aux_in_loops): New.
3669 * sese.h (sese_reset_aux_in_loops): New.
3671 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3673 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3674 multiplier and multiply the constant by the multiplier.
3675 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3676 (build_poly_dr): Do not use the multiplier to define the subscript.
3678 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3680 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3681 compiler's data reference. Initialize PDR_CDR.
3682 (print_pdr): Call dump_data_reference.
3683 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3684 Add compiler_dr field.
3685 (PDR_BB): Renamed PDR_PBB.
3687 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3688 GCC's data reference representation.
3689 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3690 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3692 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3694 * graphite-poly.c (print_scattering_function): Also print the layout.
3695 * graphite-poly.h (pbb_nb_local_vars): New.
3697 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3699 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3701 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3703 * graphite-poly.c (print_pdr, debug_pdr): New.
3704 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3705 (PDR_BASE): Removed.
3707 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3709 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3712 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3714 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3715 subscript identification column.
3716 (pbb_do_interchange): Print to dump_file that some loops "will be
3717 interchanged". Rely on that chain of characters in the testcases.
3718 * gcc.dg/graphite/interchange-0.c: New.
3719 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3720 interchange-*.c files and compile them with -floop-interchange.
3722 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3724 * graphite-interchange.c (interchange_profitable_p): Renamed
3725 pbb_interchange_profitable_p.
3727 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3728 Harsha Jagasia <harsha.jagasia@amd.com>
3729 Pranav Garg <pranav.garg2107@gmail.com>
3731 * graphite-interchange.c (interchange_profitable_p): Make static.
3732 (pbb_interchange_loop_depths, pbb_do_interchange,
3733 scop_do_interchange): New.
3734 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3735 for flag_loop_interchange.
3736 * graphite-poly.h (scop_do_interchange): Declared.
3737 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3738 flag_loop_interchange is used.
3740 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3742 * graphite-dependences.c (dependence_polyhedron): Update use of
3743 pbb_nb_scattering_dims.
3744 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3745 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3746 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3747 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3749 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3751 * graphite.c: Cleanup foo.
3753 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3755 * Merge from mainline (r143684:148293).
3756 * Disabled libpcp until it gets fixed.
3758 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3759 Harsha Jagasia <harsha.jagasia@amd.com>
3761 * graphite-interchange.c: New.
3762 * Makefile.in (graphite-interchange.o): New.
3763 * graphite-poly.h (interchange_profitable_p): Declared.
3764 * graphite-ppl.h (value_max): New.
3766 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3768 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3769 * graphite-poly.h: Fix some comments.
3773 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3776 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3777 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3778 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3779 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3780 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3781 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3782 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3783 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3784 * graphite-clast-to-gimple.c: Same.
3785 * graphite-dependences.c: Same.
3786 * graphite-poly.c: Same.
3787 * graphite-sese-to-poly.c: Same.
3789 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3791 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3792 expressions for an IV rename, as returned by clast_to_gcc_expression.
3793 (copy_renames): Rename new_name to expr.
3794 * sese.c (debug_rename_elt): Same.
3797 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3798 the information from the rename map.
3799 (rename_variables_in_stmt): Same.
3800 (add_loop_exit_phis): Rename new_name to expr.
3801 (insert_loop_close_phis): Same.
3802 (add_guard_exit_phis): Same. Call force_gimple_operand.
3803 * sese.h (struct rename_map_elt): Rename new_name to expr.
3804 (new_rename_map_elt): Same.
3806 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3808 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3809 * sese.c (set_rename): Make it extern.
3810 * sese.h (set_rename): Declared.
3812 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3814 * graphite-poly.c (extend_scattering): Free values.
3815 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3817 (ppl_print_powerset_matrix): Same.
3818 * graphite-scop-detection.c (free_scops_1): New.
3819 (limit_scops): Call free_scops_1.
3820 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3821 (build_poly_dr): Free PPL coefficients.
3822 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3824 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3826 * graphite-dependences.c: New.
3827 * graphite-data-ref.c: Removed.
3828 * graphite-data-ref.h: Removed.
3829 * Makefile.in (graphite-data-ref.o): Removed.
3830 (graphite-dependences.o): Added.
3831 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3832 * graphite-poly.c: Same.
3833 Move the data dependence testing to graphite-dependences.c.
3835 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3837 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3838 from graphite_cannot_represent_loop. Code refactored.
3839 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3841 2009-05-17 Li Feng <nemokingdom@gmail.com>
3843 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3844 Cover all the testcases (not only the filtered ones).
3846 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3848 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3849 unnecessary check. Update comments. Move check for REAL_TYPE here.
3850 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3851 done in (stmt_simple_for_scop_p).
3853 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3855 * graphite.c (print_global_statistics): New.
3856 (print_graphite_scop_statistic): New.
3857 (print_graphite_statistics): New.
3858 (graphite_initialize, graphite_transform_loops): Print statistics.
3859 * graphite-scop-detection (build_scops): Print statistics.
3860 (print_graphite_scop_statistics): New.
3861 (print_graphite_statistics): New.
3863 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3865 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3866 (debug_clast_name_index): Removed.
3867 (debug_clast_name_indexes_1): Removed.
3868 (debug_clast_name_indexes): Removed.
3869 (clast_name_index_elt_info): Removed.
3870 (eq_clast_name_indexes): Removed.
3871 (clast_name_to_index): Removed.
3872 (new_clast_name_index): Removed.
3873 (save_clast_name_index): Removed.
3874 (save_var_name): Moved...
3875 (init_sese_params_index): Removed.
3876 (clast_name_to_gcc): Remove use of name_tree.
3877 (initialize_cloog_names): Same.
3878 (gloog): Do not call init_sese_params_index.
3879 * graphite-sese-to-poly.c (save_var_name): ...here.
3880 (parameter_index_in_region): New.
3881 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3882 (parameter_index_in_region): Removed.
3883 (is_parameter): Remove use of name_tree.
3884 * sese.h (struct name_tree): Removed.
3885 (struct sese): Remove use of name_tree. New field params_names.
3886 (SESE_PARAMS_NAMES): New.
3887 (SESE_PARAMS): Remove duplicate.
3888 (parameter_index_in_region): Removed.
3889 (sese_nb_params): Remove use of name_tree.
3890 (struct clast_name_index): New.
3891 (new_clast_name_index): New.
3892 (clast_name_to_index): New.
3893 (save_clast_name_index): New.
3894 (debug_clast_name_index): New.
3895 (debug_clast_name_indexes_1): New.
3896 (debug_clast_name_indexes): New.
3897 (clast_name_index_elt_info): New.
3898 (eq_clast_name_indexes): New.
3900 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3902 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
3903 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
3904 (graphite_loop_normal_form): Do not pass region. Do not
3905 initialize SESE_OLDIVS.
3906 (build_graphite_loop_normal_form): Update call to
3907 graphite_loop_normal_form.
3908 * sese.c (debug_oldivs): Removed.
3909 (new_sese): Do not initialize SESE_OLDIVS.
3910 (free_sese): Do not free SESE_OLDIVS.
3911 (oldiv_for_loop): Removed.
3912 * sese.h (struct sese): Remove old_ivs.
3913 (SESE_OLDIVS): Removed.
3914 (oldiv_for_loop): Removed.
3916 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3918 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
3919 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
3920 replaced by a call to newivs_to_depth_to_newiv.
3921 (clast_to_gcc_expression): Pass newivs, remove ivstack.
3922 (clast_to_gcc_expression_red): Same.
3923 (gcc_type_for_clast_expr): Same.
3924 (gcc_type_for_clast_eq): Same.
3925 (graphite_translate_clast_equation): Same.
3926 (graphite_create_guard_cond_expr): Same.
3927 (graphite_create_new_guard): Same.
3928 (graphite_create_new_loop): Same.
3929 (build_iv_mapping): Same.
3930 (translate_clast): Same.
3932 (loop_iv_stack_patch_for_consts): Removed. *
3933 sese.c (iv_stack_entry_is_constant): Removed.
3934 (iv_stack_entry_is_iv): Removed.
3935 (loop_iv_stack_push_iv): Removed.
3936 (loop_iv_stack_insert_constant): Removed.
3937 (loop_iv_stack_pop): Removed.
3938 (loop_iv_stack_get_iv): Removed.
3939 (loop_iv_stack_get_iv_from_name): Removed.
3940 (debug_loop_iv_stack): Removed.
3941 (free_loop_iv_stack): Removed.
3942 (loop_iv_stack_remove_constants): Removed. *
3943 sese.h (iv_stack_entry_kind): Removed.
3944 (iv_stack_entry_data_union): Removed.
3945 (iv_stack_entry_struct): Removed.
3946 (iv_stack_entry_p): Removed.
3947 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
3948 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
3949 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
3950 loop_iv_stack_pop, free_loop_iv_stack): Removed.
3951 (gbb_loop_at_index): Fix indenting.
3952 (gbb_loop_index): Removed.
3954 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3956 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
3957 Call clast_name_to_index.
3959 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3961 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
3962 do not pass params. Get params from SESE_PARAMS.
3963 (clast_to_gcc_expression): Same.
3964 (clast_to_gcc_expression_red): Same.
3965 (gcc_type_for_clast_eq): Same.
3966 (graphite_translate_clast_equation): Same.
3967 (graphite_create_new_loop): Same.
3968 * sese.c (rename_variables_in_stmt): Fix comment.
3970 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3972 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
3974 Call save_clast_name_index.
3975 (translate_clast): Pass newivs_index.
3976 (gloog): Create and free newivs_index.
3978 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3980 * graphite-clast-to-gimple.c (clast_name_index): New structure.
3981 (clast_name_index_p): New type.
3982 (debug_clast_name_index): New.
3983 (debug_clast_name_indexes_1): New.
3984 (debug_clast_name_indexes): New.
3985 (clast_name_index_elt_info): New.
3986 (eq_clast_name_indexes): New.
3987 (clast_name_to_index): New.
3988 (new_clast_name_index): New.
3989 (save_clast_name_index): New.
3990 (init_sese_params_index): New.
3991 (gloog): Call init_sese_params_index.
3992 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
3993 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
3994 (free_sese): Free SESE_PARAMS_INDEX.
3995 * sese.h (struct sese): Add params_index.
3996 (SESE_PARAMS_INDEX): New.
3998 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4000 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4001 (graphite_create_new_loop): Pass the newivs vector. Push the
4002 newly created IV to newivs.
4003 (translate_clast): Pass the newivs vector.
4004 (gloog): Create and destroy the newivs vector.
4006 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4008 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4009 (graphite_loop_normal_form): Initialize loop->aux with the unique
4010 IV that has been created.
4012 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4014 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4015 scev with parameters in the base part. They where forbidden
4018 2009-05-11 Li Feng <nemokingdom@gmail.com>
4020 * gcc.dg/graphite/graphite.exp: Set different default
4021 compile options by file names.
4022 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4023 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4024 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4025 * gcc.dg/graphite/scop-matmult.c: Ditto.
4027 2009-05-08 Li Feng <nemokingdom@gmail.com>
4029 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4030 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4031 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4032 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4034 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4036 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4039 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4041 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4042 allow integer constant strides.
4043 (graphite_can_represent_expr): Depend on outermost_loop.
4044 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4045 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4046 build_scops_1): Same.
4047 (scopdet_basic_block_info): Same and insert layered SCoP
4049 (try_generate_gimple_bb): Cleanup.
4050 (build_scops): Enable data references.
4052 * gcc.dg/graphite/id-5.c: New.
4053 * gcc.dg/graphite/id-9.c: New.
4054 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4055 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4057 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4059 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4060 that we have not yet built for this SCoP.
4062 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4064 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4065 for complex numbers.
4067 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4069 * graphite-ppl.c: Fix build if cloog is not available.
4071 2009-05-04 Li Feng <nemokingdom@gmail.com>
4073 * tree-parloops.c (loop_parallel_p): Remove construction of
4074 NITER and REDUCTION_LIST.
4075 (try_get_loop_niter): New.
4076 (try_create_reduction_list): New.
4077 (parallelize_loops): Bypass the failed checkings in autopar
4078 when can_be_parallel in loop structure is set to true.
4080 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4082 * gcc.dg/graphite/id-6.c: Update testcase.
4083 * gcc.dg/graphite/scop-3.c: Dito.
4085 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4087 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4088 Enable EQ_EXPR and NE_EXPR again.
4090 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4092 * graphite-scop-detection.c (graphite_can_represent_scev):
4093 Add check if scev is affine multivariate.
4094 (harmful_stmt_in_bb): Check if we can represent the conditions.
4095 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4097 * gcc.dg/graphite/id-7.c: New.
4099 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4101 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4102 Check all bbs in region, not only the bbs that are represented in
4104 (build_poly_scop): Add newline.
4105 * gcc.dg/graphite/id-8.c: New.
4107 2009-04-30 Li Feng <nemokingdom@gmail.com>
4109 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4110 when loop initialize.
4111 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4112 * common.opt: Declare flag_graphite_force_parallel.
4113 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4115 * graphite-poly.c (apply_poly_transforms): Introduce
4116 flag_graphite_force_parallel.
4117 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4118 * toplev.c (process_options): ditto and replace a not correctly
4121 2009-04-30 Li Feng <nemokingdom@gmail.com>
4123 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4124 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4125 to the redefinition.
4126 (compute_cloog_iv_types_1): ditto.
4127 (build_iv_mapping): ditto.
4128 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4130 (free_gimple_bb): Removed GBB_LOOPS related free part.
4131 (build_bb_loops): Removed.
4132 * sese.h (struct gimple_bb): Removed loops.
4133 (GBB_LOOPS): Removed.
4134 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4135 (gbb_loop_index): ditto.
4137 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4139 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4140 allow non constant strides.
4141 * gcc.dg/graphite/scop-20.c: New.
4143 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4145 * graphite-scop-detection.c (dot_all_scops): Fix system call
4146 return value warning.
4149 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4151 * gcc.dg/graphite/id-6.c: Fix pattern.
4152 * gcc.dg/graphite/scop-3.c: Same.
4154 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4156 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4157 build_pairwise_constraint, dr_equality_constraints,
4158 build_pairwise_scheduling_equality,
4159 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4160 build_lexicographically_gt_constraint, dependence_polyhedron,
4161 graphite_legal_transform_dr, graphite_legal_transform_bb,
4162 graphite_legal_transform): New.
4163 * graphite-poly.h (graphite_legal_transform): Declared.
4164 * graphite-sese-to-poly.c (build_poly_scop): Call to
4165 graphite_legal_transform is disabled for the moment.
4167 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4169 * graphite-poly.h (pbb_nb_scattering_dims): New.
4170 (pbb_nb_scattering): Use it.
4172 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4174 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4175 Pointset_Powerset version of ppl_insert_dimensions.
4176 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4178 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4180 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4182 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4184 * graphite-poly.h: Fix comment.
4186 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4188 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4190 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4192 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4195 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4197 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4198 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4201 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4203 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4204 handle EQ_EXPR and NE_EXPR.
4206 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4208 * graphite-poly.h (poly_dr): Fix comment.
4210 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4211 Tobias Grosser <grosser@fim.uni-passau.de>
4213 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4214 with a zero dimension polyhedron.
4215 (find_scop_parameters): Move the call to scop_set_nb_params here.
4216 (build_loop_iteration_domains): Store in loop->aux the iteration
4218 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4219 by any loop in scop.
4220 (build_poly_scop): Do not call scop_set_nb_params.
4222 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4223 Tobias Grosser <grosser@fim.uni-passau.de>
4225 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4226 add_condition_to_domain not GT_EXPR.
4228 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4230 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4231 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4232 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4233 upper_bound_assign to calculate unions.
4234 * gcc.dg/graphite/id-6.c: New.
4236 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4238 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4239 handle abnormal edges.
4241 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4243 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4244 (free_poly_bb): Also free poly_drs.
4245 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4246 (poly_dr): Polyhedron to Pointset_Powerset.
4247 (pdr_accessp_nb_subscripts): Same.
4248 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4251 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4253 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4254 names into more meaningful names.
4256 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4258 * gfortran.dg/graphite/interchange-1.c: New.
4259 * gfortran.dg/graphite/interchange-2.c: New.
4261 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4263 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4265 * tree-parloops.c (rewrite_phi_with_iv): New.
4266 (rewrite_all_phi_nodes_with_iv): New.
4267 (canonicalize_loop_ivs): Call them.
4269 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4271 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4272 graphite_find_data_references_in_stmt.
4273 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4274 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4276 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4278 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4280 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4282 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4283 instead of bb_in_region.
4284 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4285 (build_sese_conditions): Use flag_bb_in_sese.
4286 * sese.c (register_bb_in_sese): Removed.
4287 (new_sese): Remove initialization of SESE_REGION_BBS.
4288 (free_sese): Do not free SESE_REGION_BBS.
4289 * sese.h (struct sese): Remove field region_basic_blocks.
4290 (SESE_REGION_BBS): Removed.
4291 (bb_in_sese_p): Implement in function of bb_in_region.
4293 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4295 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4298 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4300 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4302 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4303 (add_condition_to_domain): New.
4304 (add_condition_to_pbb): New.
4305 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4306 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4308 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4310 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4311 ppl_Pointset_Powerset.
4312 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4313 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4314 (pbb_nb_loops): Same.
4315 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4316 add_conditions_to_domain): Same.
4317 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4318 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4319 ppl_const_Polyhedron_t.
4320 (ppl_print_powerset_matrix): New.
4321 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4322 ppl_print_powerset_matrix): New.
4323 (ppl_print_polyhedron_matrix): Updated.
4325 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4327 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4329 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4331 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4332 (print_iteration_domains, debug_iteration_domain,
4333 debug_iteration_domains): New.
4334 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4335 debug_iteration_domains): Declared.
4336 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4339 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4340 Sebastian Pop <sebastian.pop@amd.com>
4342 * graphite-poly.h (print_iteration_domain): New.
4343 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4344 (build_sese_conditions_1, build_sese_conditions_after,
4345 build_sese_conditions_before): New.
4346 (build_sese_conditions): Rewritten.
4348 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4349 Tobias Grosser <grosser@fim.uni-passau.de>
4351 Cleanup of code generation liveouts.
4352 * graphite-clast-to-gimple.c (translate_clast): Use a single
4353 rename_map instead of one per translated statement.
4354 Do not use SESE_LIVEOUT_RENAMES.
4355 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4356 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4357 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4358 phi node of a reduction: when a loop contains a reduction used outside
4359 the loop, there should be a scalar close phi node on the exit block.
4360 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4361 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4362 (free_sese): Do not free them.
4363 (sese_build_liveouts_use): Do not use them.
4364 (sese_build_liveouts_bb): Same.
4365 (sese_build_liveouts): Same.
4366 (sese_insert_phis_for_liveouts): Same.
4367 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4368 (defined_in_loop_p): New.
4369 (alive_after_loop): New.
4370 (close_phi_not_yet_inserted_p): New.
4371 (struct alep, alep_p): New.
4372 (add_loop_exit_phis): Remove from the rename_map all the names defined
4373 in the code generated loop.
4374 (insert_loop_close_phis): Traverse the rename_map passed to it.
4375 Don't use SESE_LIVEOUT_RENAMES.
4376 (default_liveout_before_guard): Renamed default_before_guard.
4377 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4378 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4379 (register_sese_liveout_renames): Removed.
4380 (copy_bb_and_scalar_dependences): Do not call it.
4381 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4383 (SESE_LIVEOUT): Removed.
4384 (SESE_LIVEOUT_RENAMES): Removed.
4385 (SESE_REDUCTION_LIST): Removed.
4386 (sese_build_liveouts): Removed.
4387 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4388 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4389 (insert_guard_phis): Same.
4390 (rename_map_elt): Declare a VEC of them.
4391 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4392 trees not pointers to trees.
4394 Rewrite in canonical close SSA form:
4395 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4396 (limit_scops): Close the scop after the block containing the close phi
4398 (canonicalize_loop_closed_ssa): New.
4399 (canonicalize_loop_closed_ssa_form): New.
4400 (build_scops): Call canonicalize_loop_closed_ssa_form.
4402 * graphite-sese-to-poly.c: Fix typos.
4404 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4406 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4408 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4409 (print_pbb): Add conditions.
4411 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4412 Sebastian Pop <sebastian.pop@amd.com>
4414 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4415 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4416 (build_scop_bbs_1): New.
4417 (build_scop_bbs): Rewrite.
4418 * sese.h (bb_in_region): New.
4420 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4422 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4424 (print_scop): Style.
4425 * graphite-poly.h (poly_bb): Add drs vector.
4426 (PBB_DRS): Add accessor.
4427 * graphite-sese-to-poly.c (build_poly_dr): New.
4428 (build_pbb_drs, build_scop_drs): New.
4429 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4431 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4433 * tree-ssa-loop.c: Include forgotten toplev.h
4435 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4437 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4438 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4439 * gcc.dg/graphite/pr37928.c: Same
4440 * gcc.dg/graphite/pr38409.c: Same
4441 * gcc.dg/graphite/pr38498.c: Same
4442 * gcc.dg/graphite/pr38559.c: Same
4443 * gcc.dg/graphite/pr39335.c: Same
4444 * gcc.dg/graphite/pr39335_1.c: Same
4445 * gfortran.dg/graphite/block-2.f: Same
4446 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4449 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4451 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4452 build_access_matrix, build_scop_data_accesses): Remove access function
4453 building. (We get a new version soon).
4454 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4455 * sese.h (nb_loops_around_loop_in_sese): Remove.
4456 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4458 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4459 Sebastian Pop <sebastian.pop@amd.com>
4461 * graphite-scop-detection.c (struct scopdet_info): Rename last
4463 (scopdet_basic_block_info, build_scops_1): Don't use
4464 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4466 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4467 Sebastian Pop <sebastian.pop@amd.com>
4469 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4470 * sese.c (sese_build_liveouts_use): Renamed from
4471 sese_build_livein_liveouts_use. Remove liveins.
4472 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4473 Call sese_build_liveouts_use.
4474 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4475 Call sese_build_liveouts_bb.
4476 (new_sese, free_sese): Remove liveins.
4477 (sese_add_exit_phis_var): Deleted.
4478 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4480 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4482 * sese.h (sese): Remove num_ver and livein.
4483 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4485 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4487 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4489 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4491 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4492 (build_scop_scattering): Do not use compare_prefix_loops any more.
4493 (nb_common_loops): New.
4495 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4497 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4498 (register_old_and_new_names): Renamed set_rename.
4500 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4502 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4503 of the decl from the previous commit.
4505 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4507 * graphite-scop-detection.c (dot_scop): New.
4508 * graphite-scop-detection.h (dot_scop): Declared.
4510 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4512 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4514 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4516 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4517 condition at the end of the loop.
4518 * graphite.c (graphite_initialize, graphite_finalize): Print to
4519 dump_file the compiled function.
4520 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4521 of create_empty_loop_on_edge.
4522 (translate_clast): Update the code generation of loops for the new
4524 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4526 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4528 Reverted the patch from 2009-03-19.
4530 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4532 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4534 (print_scop): Style.
4535 * graphite-poly.h (poly_bb): Add drs vector.
4536 (PBB_DRS): Add accessor.
4537 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4538 (build_access_matrix_with_af, build_access_matrix,
4539 build_scop_data_accesses): Delete.
4540 (build_poly_dr): New.
4541 (build_pbb_drs, build_scop_drs): New.
4542 (build_poly_scop): call build_scop_drs.
4544 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4546 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4547 once per basic block.
4549 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4551 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4552 (graphite_can_represent_expr): Renamed from loop_affine_expr
4554 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4555 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4556 (scopdet_basic_block_info): Actually define entry_block.
4557 (stmt_simple_memref_p): Moved here from ...
4559 * tree-data-ref.c (stmt_simple_memref_p): here.
4560 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4562 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4564 * gcc.dg/graphite/id-4.c: New.
4566 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4568 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4569 (register_old_and_new_names): Update the content of the map.
4570 When there was already a rename_map_elt in the map at that
4572 (copy_bb_and_scalar_dependences): Do rename_variables after
4573 expand_scalar_variables.
4574 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4575 of the map. When there was already a rename_map_elt in the
4576 map at that location, free it.
4577 (translate_clast): Pass the rename_map. Do not initialize and free
4578 a rename_map per stmt_user.
4579 (gloog): Initialize and free one rename_map and pass it to
4582 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4584 * sese.c (expand_scalar_variables_stmt,
4585 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4587 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4588 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4589 the gimple_stmt_iterator of the statement to be expanded.
4590 * graphite-scop-detection.c (is_simple_operand): Do handle
4593 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4595 * graphite-scop-detection.c (is_simple_operand): Do not handle
4597 * gcc.dg/graphite/id-2.c: New.
4599 * graphite-sese-to-poly.c (build_bb_loops,
4600 add_value_to_dim, scan_tree_for_params_right_scev,
4601 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4602 find_params_in_bb, build_loop_iteration_domains,
4603 add_conditions_to_domain): Remove subtract.
4605 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4607 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4608 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4609 pbb_loop_at_index -> gbb_loop_at_index.
4610 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4611 (debug_loop_vec): Delete.
4612 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4613 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4614 (PBB_LOOPS): Removed.
4615 (PBB_BLACK_BOX): Insert cast.
4616 (pbb_set_black_box): New setter.
4617 (pbb_loop_at_index, pbb_loop_index): Removed.
4618 (scop_set_region, scop_set_nb_params): New.
4619 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4620 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4621 (build_poly_scop): Use scop_set_nb_params.
4622 * sese.h (gimple_bb): Add LOOPS.
4623 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4625 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4627 Revert previous commit.
4629 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4631 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4632 (register_old_and_new_names): Update the content of the map.
4633 When there was already a rename_map_elt in the map at that
4635 (copy_bb_and_scalar_dependences): Do rename_variables after
4636 expand_scalar_variables.
4637 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4638 of the map. When there was already a rename_map_elt in the
4639 map at that location, free it.
4640 (translate_clast): Pass the rename_map. Do not initialize and free
4641 a rename_map per stmt_user.
4642 (gloog): Initialize and free one rename_map and pass it to
4645 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4647 Remove forgotten line in revert.
4649 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4651 Revert previous commit.
4653 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4655 * sese.c (register_old_and_new_names): Update the content
4656 of the map. When there was already a rename_map_elt in the
4657 map at that location, free it.
4658 (copy_bb_and_scalar_dependences): Do rename_variables after
4659 expand_scalar_variables.
4660 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4661 of the map. When there was already a rename_map_elt in the
4662 map at that location, free it.
4663 (translate_clast): Pass the rename_map. Do not initialize and free
4664 a rename_map per stmt_user.
4665 (gloog): Initialize and free one rename_map and pass it to
4668 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4670 * graphite-clast-to-gimple.c (translate_clast): context_loop
4673 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4674 Sebastian Pop <sebastian.pop@amd.com>
4676 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4677 of the use of ppl_Polyhedron_map_space_dimensions.
4679 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4680 Sebastian Pop <sebastian.pop@amd.com>
4682 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4683 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4684 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4685 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4686 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4687 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4688 pbb_nb_params): New.
4689 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4690 nb_loops_around_pbb): Adapt return types.
4692 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4694 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4695 graphite-clast-to-gimple.o, graphite-data-ref.o,
4696 graphite-scop-detection.o, graphite-poly.o): Add
4699 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4701 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4702 graphite-clast-to-gimple.o, graphite-data-ref.o,
4703 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4705 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4707 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4708 * gcc.dg/graphite/pr37828.c: Same.
4709 * gcc.dg/graphite/pr37684.c: Same.
4710 * gcc.dg/graphite/block-0.c: Same.
4711 * gcc.dg/graphite/block-1.c: Same.
4712 * gcc.dg/graphite/block-2.c: Same.
4713 * gcc.dg/graphite/block-3.c: Same.
4714 * gcc.dg/graphite/block-4.c: Same.
4715 * gcc.dg/graphite/block-5.c: Same.
4716 * gcc.dg/graphite/block-6.c: Same.
4717 * gfortran.dg/graphite/pr38083.f90: Same.
4718 * gfortran.dg/graphite/block-1.f90: Same.
4719 * gfortran.dg/graphite/block-3.f90: Same.
4720 * gfortran.dg/graphite/pr37852.f90: Same.
4721 * gfortran.dg/graphite/block-4.f90: Same.
4722 * gfortran.dg/graphite/pr37980.f90: Same.
4723 * gfortran.dg/graphite/pr38953.f90: Same.
4724 * gfortran.dg/graphite/pr37857.f90: Same.
4725 * opts.c: Remove -floop-block from -O2.
4726 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4727 -floop-strip-mine are used.
4729 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4730 Sebastian Pop <sebastian.pop@amd.com>
4732 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4734 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4735 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4736 strip_mine_profitable_p, is_interchange_valid,
4737 graphite_trans_bb_block, graphite_trans_loop_block,
4738 graphite_trans_scop_block): Temporary removed.
4739 (extend_scattering, unify_scattering_dimensions): New.
4740 (print_scattering_function, graphite_read_transforms):
4741 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4742 (graphite_generate_scattering_fns): Removed.
4743 (apply_poly_transforms): Cleanup.
4744 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4745 (schedule_to_scattering): Moved.
4746 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4747 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4748 (pbb_nb_scattering): New.
4749 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4750 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4752 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4754 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4755 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4756 -> PBB_TRANSFORMED_SCATTERING.
4757 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4758 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4759 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4760 (check_poly_representation): Do not return bool.
4761 (graphite_transform_loops): Reformat.
4762 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4764 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4766 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4767 debug_pbb_domain, debug_pbb, debug_scop): New.
4768 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4769 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4771 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4774 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4775 when the type precision of the induction variable should be
4776 larger than the type precision of nit.
4777 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4778 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4779 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4781 * gcc.dg/graphite/pr39335_1.c: New.
4782 * gcc.dg/graphite/pr39335.c: New.
4784 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4786 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4787 SSA_NAMES not struct reduction_info.
4789 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4791 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4793 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4794 Tobias Grosser <grosser@fim.uni-passau.de>
4796 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4797 (free_sese): Free SESE_REDUCTION_LIST.
4798 * sese.h (struct sese): Add field reduction_list.
4799 (SESE_REDUCTION_LIST): New.
4800 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4801 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4803 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4804 Tobias Grosser <grosser@fim.uni-passau.de>
4806 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4809 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4810 Tobias Grosser <grosser@fim.uni-passau.de>
4812 * tree-parloops.c (struct brli, build_reduction_list_info,
4813 analyze_reduction_list, gather_scalar_reductions): New.
4814 (loop_parallel_p): Build a reduction list containing only
4815 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4816 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4817 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4818 * tree-flow.h (gather_scalar_reductions): Declared.
4820 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4823 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4824 number_of_iterations_exit from a gcc_assert.
4826 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4827 Jan Sjodin <jan.sjodin@amd.com>
4829 * output.h (graphite_out_file, graphite_in_file): Declared.
4830 * toplev.c (graphite_out_file, graphite_in_file): New.
4831 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4832 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4833 Don't call schedule_to_scattering.
4834 * common.opt (fgraphite-write, fgraphite-read): New.
4835 * graphite-poly.c: Include output.h.
4836 (print_scattering_function, print_scattering_functions,
4837 debug_scattering_function, debug_scattering_functions,
4838 graphite_write_transforms, graphite_read_transforms,
4839 graphite_generate_scattering_fns): New.
4840 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4841 Call graphite_generate_scattering_fns, graphite_write_transforms,
4842 graphite_read_transforms.
4843 (new_poly_bb): Initialize PBB_SCATTERING.
4844 (free_poly_bb): Free PBB_SCATTERING.
4845 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4846 * graphite-poly.h (struct poly_bb): Add field scattering.
4847 (PBB_SCATTERING): New.
4848 (print_scattering_function, print_scattering_functions,
4849 debug_scattering_function, debug_scattering_functions): Declared.
4850 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4851 GMP values, not integers!
4852 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4853 ppl_read_polyhedron_matrix): New.
4854 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4855 debug_ppl_polyhedron_matrix,
4856 ppl_read_polyhedron_matrix): Declared.
4857 * Makefile.in (graphite-poly.o): Depends on output.h.
4859 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4860 Tobias Grosser <grosser@fim.uni-passau.de>
4863 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4864 scalar evolutions in the scop_entry->loop_father.
4866 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4867 Tobias Grosser <grosser@fim.uni-passau.de>
4869 * graphite.h (ref_nb_loops): Remove declaration.
4870 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4871 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4872 debug_gbb): Moved to sese.h.
4875 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4876 Tobias Grosser <grosser@fim.uni-passau.de>
4878 * graphite-data-ref.[ch]: Disable.
4880 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4881 Tobias Grosser <grosser@fim.uni-passau.de>
4883 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4884 scalar evolutions in the scop_entry->loop_father.
4886 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4888 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
4889 (graphite_cannot_represent_loop_niter): Renamed
4890 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
4891 (limit_scops): build_sese_loop_nests does not return a bool.
4892 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
4893 * sese.c (nb_reductions_in_loop): ... from here.
4894 (graphite_loop_normal_form): ... from here.
4895 (sese_record_loop): Does not fail, so does not return a bool.
4896 (build_sese_loop_nests): Same.
4897 * sese.h (build_sese_loop_nests): Update declaration.
4898 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
4899 (build_graphite_loop_normal_form): New.
4900 (gloog): Call build_graphite_loop_normal_form.
4901 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
4902 build_sese_loop_nests.
4904 * gcc.dg/graphite/id-1.c: New.
4906 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4907 Tobias Grosser <grosser@fim.uni-passau.de>
4909 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
4910 The SCoP detection fix is sufficient.
4912 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4914 PR tree-optimization/39260
4915 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
4916 the basic block contains a condition with a real type.
4917 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
4919 * gcc.dg/graphite/pr39260.c: New.
4921 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4923 * graphite-poly.c: Inlcude params.h.
4924 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
4926 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
4927 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
4929 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4930 Tobias Grosser <grosser@fim.uni-passau.de>
4932 * graphite-scop-detection.c (dot_all_scops_1,
4933 dot_all_scops): Moved here.
4934 * graphite-scop-detection.h (dot_all_scops): Declared here.
4935 * graphite.c (graphite_initialize, graphite_finalize): New.
4936 (graphite_transform_loops): Cleaned up.
4937 * sese.c (debug_oldivs): Moved here.
4938 * graphite-poly.c (graphite_apply_transformations): Renamed
4939 apply_poly_transforms.
4940 (debug_loop_vec): Moved here.
4941 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
4942 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
4943 find_scop_parameters, build_scop_iteration_domain,
4944 add_conditions_to_constraints, build_scop_canonical_schedules,
4945 build_scop_data_accesses): Now static.
4946 (build_poly_scop, check_poly_representation): New.
4948 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4950 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
4951 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
4952 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
4953 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
4954 scan_tree_for_params_right_scev, scan_tree_for_params_int,
4955 scan_tree_for_params, struct irp_data, dx_record_params,
4956 find_params_in_bb, find_scop_parameters, gbb_from_bb,
4957 build_loop_iteration_domains, add_conditions_to_domain,
4958 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
4959 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
4960 build_sese_conditions, add_conditions_to_constraints,
4961 build_scop_iteration_domain, build_access_matrix_with_af,
4962 build_access_matrix,
4963 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
4965 * graphite-sese-to-poly.c: New.
4966 * graphite-sese-to-poly.h: New.
4968 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
4970 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4972 * graphite.c: Split graphite code generation to a new file.
4973 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
4974 max_precision_type, clast_to_gcc_expression_red,
4975 clast_to_gcc_expression, gcc_type_for_clast_expr,
4976 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
4977 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
4978 graphite_create_new_guard, clast_get_body_of_loop,
4979 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
4980 graphite_create_new_loop, build_iv_mapping, copy_renames,
4981 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4982 compute_cloog_iv_types, free_scattering, save_var_name,
4983 initialize_cloog_names, build_scop_context, build_cloog_prog,
4984 set_cloog_options, debug_clast_stmt, scop_to_clast,
4985 print_generated_program, debug_generated_program,
4986 gloog): Moved to graphite-clast-to-gimple.c.
4988 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
4990 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
4991 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
4992 loop_iv_stack_pop, loop_iv_stack_get_iv,
4993 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
4994 free_loop_iv_stack, loop_iv_stack_remove_constants,
4995 debug_rename_elt, debug_rename_map_1, debug_rename_map,
4996 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
4997 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
4998 eq_ivtype_map_elts, sese_add_exit_phis_edge,
4999 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5000 get_vdef_before_sese, sese_adjust_vphi,
5001 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5002 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5003 is_iv, expand_scalar_variables_ssa_name,
5004 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5005 expand_scalar_variables, rename_variables, remove_condition,
5006 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5007 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5008 default_liveout_before_guard, add_guard_exit_phis,
5009 insert_guard_phis, register_old_and_new_names,
5010 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5011 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5012 if_region_set_false_region, create_if_region_on_edge,
5013 move_sese_in_condition): Moved to sese.c.
5015 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5016 if_region_exit, if_region_get_condition_block,
5017 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5018 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5019 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5020 ivtype_map_elt, new_ivtype_map_elt,
5021 recompute_all_dominators): Moved to sese.h.
5023 * graphite-clast-to-gimple.c: New.
5024 * graphite-clast-to-gimple.h: New.
5025 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5026 * sese.c: Modified as said above.
5029 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5031 * graphite.c: Split scop detection to a new file.
5032 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5033 move_sd_regions, loop_affine_expr, exclude_component_ref,
5034 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5035 graphite_cannot_represent_loop_niter, struct scopdet_info,
5036 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5037 find_single_entry_edge, find_single_exit_edge,
5038 create_single_entry_edge, sd_region_without_exit,
5039 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5040 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5041 Moved to graphite-scop-detection.c.
5043 * graphite-scop-detection.c: New.
5044 * graphite-scop-detection.h: New.
5045 * Makefile.in: Add new rule for graphite-scop-detection.o.
5047 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5048 tree-scalar-evolution.h.
5049 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5050 build_sese_loop_nests): Moved here from graphite.c.
5051 (param_index): Renamed parameter_index_in_region.
5053 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5054 Sebastian Pop <sebastian.pop@amd.com>
5056 * gcc.dg/graphite/block-0.c: Expected to fail now.
5057 * gcc.dg/graphite/block-1.c: Same.
5058 * gcc.dg/graphite/block-5.c: Same.
5059 * gcc.dg/graphite/block-6.c: Same.
5061 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5062 Sebastian Pop <sebastian.pop@amd.com>
5064 * graphite.h: Separate from graphite_bb_p the polyhedral
5065 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5066 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5067 graphite-data-ref.h.
5068 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5069 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5070 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5071 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5072 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5073 scop_nb_params): Moved to graphite-poly.h.
5074 * graphite-data-ref.c: Same.
5075 * graphite-data-ref.h: New.
5077 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5078 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5079 is_interchange_valid, graphite_trans_bb_block,
5080 graphite_trans_loop_block, scop_max_loop_depth,
5081 graphite_trans_scop_block, graphite_apply_transformations,
5082 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5084 * graphite-poly.h: New.
5085 * graphite-poly.c: New.
5086 * Makefile.in (OBJS-common): Add graphite-poly.o.
5087 (graphite-poly.o): New rule.
5088 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5091 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5092 Tobias Grosser <grosser@fim.uni-passau.de>
5094 * graphite.c: Replace gb -> gbb.
5096 * graphite-data-ref.c: Same.
5098 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5099 Tobias Grosser <grosser@fim.uni-passau.de>
5101 * Makefile.in (OBJS-commmon): Add sese.o.
5103 (graphite.o): Add sese.h.
5104 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5105 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5106 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5108 (block_before_scop): Add missing return.
5109 (new_scop, free_scop): Remove SESE data structures.
5110 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5111 find_scop_parameters, build_loop_iteration_domains,
5112 add_conditions_to_domain, register_scop_liveout_renames,
5113 copy_bb_and_scalar_dependences): Scop -> SESE.
5115 (add_conditions_to_domain): SCoP -> SESE and remove check
5116 (scop_contains_non_iv_scalar_phi_nodes): New.
5117 (build_scop_conditions_1, build_scop_conditions): Remove check for
5118 non iv scalar phi nodes.
5119 (print_scop_statistics): New.
5120 (graphite_transform_loops): Cleanup.
5122 * graphite.h: Move to sese & cleanup.
5126 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5127 Tobias Grosser <grosser@fim.uni-passau.de>
5129 * graphite.c (build_scop_conditions_1): Conditions are only
5130 at the end of a basic block.
5132 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5133 Tobias Grosser <grosser@fim.uni-passau>
5135 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5137 (GBB_ALPHA): Removed.
5139 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5140 Tobias Grosser <grosser@fim.uni-passau.de>
5142 * graphite-data-ref.c (graphite_test_dependence): Don't use
5143 GBB_DYNAMIC_SCHEDULE.
5144 * graphite.c (new_graphite_bb): Same.
5145 (free_graphite_bb): Same.
5146 (build_scop_dynamic_schedules): Removed.
5147 (graphite_transform_loops): Don't call it.
5148 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5149 (GBB_DYNAMIC_SCHEDULE): Removed.
5151 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5152 Tobias Grosser <grosser@fim.uni-passau.de>
5154 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5155 (print_graphite_bb): Same.
5156 (build_cloog_prog): Same.
5158 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5159 Tobias Grosser <grosser@fim.uni-passau.de>
5161 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5163 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5164 Tobias Grosser <grosser@fim.uni-passau.de>
5166 * graphite.c (build_scop_context): Don't use CloogMatrix.
5167 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5168 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5170 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5171 Tobias Grosser <grosser@fim.uni-passau.de>
5173 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5174 liveout_renames, add_params fields...
5175 (struct sese): ... here.
5176 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5177 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5179 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5180 Tobias Grosser <grosser@fim.uni-passau.de>
5182 * graphite.c (print_scop): Do not print the CLooG program.
5183 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5184 build_cloog_prog, gloog): Don't use SCOP_PROG.
5185 (find_transform): Renamed scop_to_clast.
5186 (print_generated_program, debug_generated_program): New.
5187 (graphite_transform_loops): Adapt to new interface.
5188 * graphite.h (struct scop): Remove program field.
5189 (SCOP_PROG): Removed.
5190 (print_generated_program, debug_generated_program): Declared.
5192 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5194 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5195 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5196 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5197 free_graphite_bb, build_scop_canonical_schedules,
5198 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5199 schedules are now represented using a ppl_Linear_Expression_t.
5200 * graphite.h (struct graphite_bb): Same.
5201 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5202 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5204 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5206 * graphite.c: Free local memory.
5207 * graphite-ppl.c: Same.
5209 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5211 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5212 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5213 swap_constraint_variables, scale_constraint_variable): Removed.
5214 (graphite_trans_bb_strip_mine): Remove pong.
5215 * graphite-ppl.c: Include missing header files.
5216 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5217 * graphite-ppl.h (ppl_strip_loop): Declared.
5218 * Makefile.in (graphite-ppl.o): Adjust dependences.
5220 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5222 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5223 (build_scop_iteration_domain): Same.
5225 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5227 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5229 (add_value_to_dim, scan_tree_for_params_right_scev,
5230 scan_tree_for_params_int): New.
5231 * graphite-ppl.c (oppose_constraint): New.
5232 (insert_constraint_into_matrix): Implement missing cases.
5233 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5235 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5237 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5238 use ppl_move_dimension.
5240 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5242 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5245 * graphite-ppl.c: Same.
5246 * graphite-ppl.h: Same.
5248 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5250 Revert last 3 commits.
5252 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5254 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5256 (add_value_to_dim, scan_tree_for_params_right_scev,
5257 scan_tree_for_params_int): New.
5258 * graphite-ppl.c (oppose_constraint): New.
5259 (insert_constraint_into_matrix): Implement missing cases.
5260 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5262 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5264 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5266 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5267 Tobias Grosser <grosser@fim.uni-passau.de>
5269 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5270 use ppl_move_dimension.
5271 * graphite-ppl.c (ppl_move_dimension): New.
5272 * graphite-ppl.h (ppl_move_dimension): Declared.
5274 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5276 * graphite.c: Do not include cloog/cloog.h.
5277 (print_graphite_bb): Remove ping pong, call PPL print function.
5279 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5281 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5282 (graphite.o): Add dependence on graphite-ppl.h.
5283 (graphite-ppl.o): New.
5284 (graphite-data-ref.c): Ping pong between PPL data structures
5286 * graphite-ppl.c: New.
5287 * graphite-ppl.h: New.
5288 * graphite.c: Include graphite-ppl.h.
5289 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5290 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5291 Ping pong between PPL data structures and matrices.
5292 (new_graphite_bb): Create a PPL constraint system.
5293 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5294 (build_loop_iteration_domains): Use PPL functions.
5295 * graphite.h: Include graphite-ppl.h. Fix comments.
5296 (graphite_bb): Use a ppl_Constraint_System_t instead of
5297 CloogMatrix for representing the domain.
5298 (scop): Remove static_schedule.
5299 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5301 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5303 * graphite.c: Fix some comments.
5305 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5308 * graphite.c (if_region_set_false_region): After moving a region
5309 in the false branch of a condition, remove the empty dummy
5311 (gloog): Remove wrong fix for PR38953.
5313 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5315 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5316 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5317 register_bb_in_sese, new_sese, free_sese): Moved.
5318 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5319 outermost_loop_in_scop, build_scop_iteration_domain,
5320 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5321 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5322 Use loop_in_sese_p instead of loop_in_scop_p.
5323 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5324 (free_scop): Do not free SCOP_BBS_B.
5325 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5326 ref_nb_loops): Moved here...
5327 * graphite.h (ref_nb_loops): ... from here.
5328 (struct scop): Remove bbs_b bitmap.
5329 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5330 * gcc.dg/graphite/scop-19.c: New
5332 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5334 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5337 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5339 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5340 eq_loop_to_cloog_loop): Remove.
5341 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5342 * graphite.h (struct scop): Remove loop2cloog_loop.
5343 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5345 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5347 * opts.c (decode_options): Only add graphite options to O2
5348 if we compile with graphite enabled.
5350 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5352 * Merge from mainline (r143163:143684).
5354 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5356 * graphite.c (debug_value): Removed.
5357 * graphite.h (debug_value): Removed.
5359 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5361 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5362 after graphite: pass_copy_prop does not maintain a proper loop closed
5363 SSA form. pass_copy_prop should be fixed.
5365 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5367 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5369 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5371 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5372 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5373 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5376 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5378 * graphite.c (gloog): Return true when code gen succeeded.
5379 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5380 the code of the function did not changed. After cleanup_tree_cfg
5381 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5384 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5386 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5387 gimple_call_lhs is NULL.
5389 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5390 Tobias Grosser <tobi.grosser@amd.com>
5392 * graphite.c (graphite_trans_scop_block): Do not block single
5395 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5396 Tobias Grosser <tobi.grosser@amd.com>
5398 * graphite.c (build_scop_canonical_schedules): Start schedules at
5401 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5402 Tobias Grosser <tobi.grosser@amd.com>
5404 * graphite.c (compare_prefix_loops): New.
5405 (build_scop_canonical_schedules): Rewritten.
5406 (graphite_transform_loops): Move build_scop_canonical_schedules
5407 after build_scop_iteration_domain.
5409 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5410 Tobias Grosser <tobi.grosser@amd.com>
5412 * graphite.c (add_conditions_to_domain): Add the loops to
5413 the dimension of the iteration domain. Do copy the domain
5414 only when it exists.
5415 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5416 (add_conditions_to_constraints): New.
5417 (can_generate_code_stmt, can_generate_code): Removed.
5418 (gloog): Do not call can_generate_code.
5419 (graphite_transform_loops): Call add_conditions_to_constraints
5420 after building the iteration domain.
5422 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5423 Tobias Grosser <tobi.grosser@amd.com>
5424 Jan Sjodin <jan.sjodin@amd.com>
5426 * graphite.c (scan_tree_for_params): On substractions negate
5427 all the coefficients of the term.
5428 (clast_to_gcc_expression_red): New. Handle reduction expressions
5429 of more than two operands.
5430 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5431 (get_vdef_before_scop): Handle also the case of default definitions.
5433 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5436 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5437 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5438 (gloog): Do not call cleanup_tree_cfg.
5439 (graphite_transform_loops): Call cleanup_tree_cfg after all
5440 scops have been code generated.
5442 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5444 * passes.c (init_optimization_passes): Schedule after
5445 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5447 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5449 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5451 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5452 Set the type of an expression to the type of its assign statement.
5453 (expand_scalar_variables_expr): Do not pass loop_p.
5454 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5455 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5456 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5458 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5460 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5461 an expression to the gimple_expr_type of its assign statement.
5462 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5465 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5467 PR tree-optimization/38786
5468 * gcc.dg/graphite/pr38786.c: New.
5469 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5470 the SSA_NAME case of expand_scalar_variables_expr.
5471 (expand_scalar_variables_expr): Also gather the scalar computation
5472 used to index the memory access.
5473 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5474 the gimple_stmt_iterator where it inserts new code.
5476 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5478 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5480 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5482 * opts.c (decode_options): Enable flag_graphite_identity and
5483 flag_loop_block in -O2 and above.
5485 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5487 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5488 Fix merge problem: replace with the file from trunk.
5490 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5492 * Merge from mainline (r141727:143163).
5494 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5495 Jan Sjodin <jan.sjodin@amd.com>
5497 PR tree-optimization/38559
5498 * gcc.dg/graphite/pr38559.c: New.
5500 * graphite.c (debug_value, copy_constraint,
5501 swap_constraint_variables, scale_constraint_variable, ): New.
5502 (get_lower_bound, get_upper_bound): Removed.
5503 (graphite_trans_bb_strip_mine): Clean up this code that works
5504 only for constant number of iterations. Fully copy upper and
5505 lower bound constraints, not only the constant part of them.
5506 * graphite.h (debug_value): Declared.
5508 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5510 PR tree-optimization/38492
5511 PR tree-optimization/38498
5512 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5513 * tree-chrec.h (scev_is_linear_expression): Declared.
5514 * graphite.c (graphite_cannot_represent_loop_niter): New.
5515 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5516 (graphite_loop_normal_form): Use gcc_assert.
5517 (scan_tree_for_params): Use CASE_CONVERT.
5518 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5519 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5520 Use gcc_assert. Discard scops that contain unhandled cases.
5521 (build_scop_conditions): Return a boolean status for unhandled cases.
5522 (strip_mine_profitable_p): Print the loop number, not its depth.
5523 (is_interchange_valid): Pass the depth of the loop nest, don't
5524 recompute it wrongly.
5525 (graphite_trans_bb_block): Same.
5526 (graphite_trans_bb_block): Print tentative of loop blocking.
5527 (graphite_trans_scop_block): Do not print that the loop has been
5529 (graphite_transform_loops): Do not handle scops that contain condition
5532 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5534 * gcc.dg/graphite/block-0.c: Update test.
5535 * gcc.dg/graphite/block-1.c: Same.
5536 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5538 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5539 * gcc.dg/graphite/block-3.c: New.
5540 * gcc.dg/graphite/pr38498.c: New.
5542 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5544 PR tree-optimization/38510
5545 * gcc.dg/graphite/pr38510.c: New.
5546 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5547 (translate_clast): Call recompute_all_dominators before
5549 (gloog): Call recompute_all_dominators before graphite_verify.
5551 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5553 PR tree-optimization/38492
5554 * graphite.c (rename_map_elt, debug_rename_elt,
5555 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5556 rename_map_elt_info, eq_rename_map_elts,
5557 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5558 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5559 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5560 (sese_build_livein_liveouts): New.
5561 (new_sese, free_sese): New.
5562 (new_scop): Call new_sese.
5563 (free_scop): Call free_sese.
5564 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5565 (register_old_new_names): Renamed register_old_and_new_names.
5566 (register_scop_liveout_renames, add_loop_exit_phis,
5567 insert_loop_close_phis, struct igp,
5568 default_liveout_before_guard, add_guard_exit_phis,
5569 insert_guard_phis, copy_renames): New.
5570 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5571 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5572 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5573 (scop_adjust_phis_for_liveouts): New.
5574 (gloog): Call scop_adjust_phis_for_liveouts.
5576 * graphite.h (struct sese): Documented. Added fields liveout,
5578 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5579 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5580 (struct scop): Added field liveout_renames.
5581 (SCOP_LIVEOUT_RENAMES): New.
5583 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5585 PR tree-optimization/38409
5586 * gcc.dg/graphite/pr38409.c: New.
5587 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5589 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5591 * graphite.c (gcc_type_for_cloog_iv): By default return
5593 (graphite_create_new_loop): Don't fold_convert the already
5594 fold_convert-ed expression.
5596 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5598 PR tree-optimization/38446
5599 * gcc.dg/graphite/pr38446.c: New.
5600 * graphite.c (register_bb_in_sese): New.
5601 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5602 looking at the bbs in the region.
5603 * graphite.h (sese): Add region_basic_blocks pointer set to
5604 structure and initialize at the time of defining new scop.
5606 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5608 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5609 (find_params_in_bb): Do not free data refs.
5610 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5612 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5614 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5615 * gcc.dg/graphite/scop-17.c: Same.
5616 * gcc.dg/graphite/block-5.c: New.
5617 * gcc.dg/graphite/block-6.c: New.
5618 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5619 * gcc.dg/graphite/pr37684.c: Same.
5620 * gcc.dg/graphite/block-2.c: Same.
5622 * graphite.c (struct ivtype_map_elt): New.
5623 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5624 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5625 gcc_type_for_cloog_iv): New.
5626 (loop_iv_stack_patch_for_consts): Use the type of the induction
5627 variable from the original loop, except for the automatically
5628 generated loops, i.e., in the case of a strip-mined loop, in
5629 which case there is no original loop: in that case just use
5631 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5632 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5633 (clast_name_to_gcc): Accept params to be NULL.
5634 (clast_to_gcc_expression): Take an extra parameter for the type.
5635 Convert to that type all the expressions built by this function.
5636 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5637 (graphite_translate_clast_equation): Compute the type of the
5638 clast_equation before translating its LHS and RHS.
5639 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5640 (graphite_create_new_loop): Compute the type of the induction
5641 variable before translating the lower and upper bounds and before
5642 creating the induction variable.
5643 (rename_variables_from_edge, rename_phis_end_scop): New.
5644 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5645 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5646 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5647 compute_cloog_iv_types): New.
5648 (gloog): Call compute_cloog_iv_types before starting the
5649 translation of the clast.
5651 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5652 (GBB_CLOOG_IV_TYPES): New.
5653 (debug_ivtype_map): Declared.
5654 (oldiv_for_loop): New.
5656 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5659 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5660 (param_index): Assert if parameter is not know after parameter
5662 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5663 (find_scop_parameters): Mark, that we have finished parameter
5665 (graphite_transform_loops): Move condition detection before parameter
5667 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5668 * gfortran.dg/graphite/pr38459.f90: New.
5670 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5672 * graphite.c (graphite_transform_loops): Always call find_transform ()
5673 in ENABLE_CHECKING. So we test these code paths, even if we do not
5676 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5678 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5679 (print_scop): Ditto.
5681 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5684 Fix gfortran.dg/graphite/id-3.f90.
5685 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5686 regions more than once.
5688 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5690 Fix gfortran.dg/graphite/id-4.f90.
5691 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5694 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5696 Fix gfortran.dg/graphite/id-1.f90.
5697 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5698 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5699 (max_precision_type): New.
5700 (value_clast): Removed.
5701 (clast_to_gcc_expression): Be more careful to types of expressions.
5702 Use max_precision_type and update use of gmp_cst_to_tree.
5703 (graphite_translate_clast_equation): Use max_precision_type.
5704 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5705 use the type of the condition.
5706 (graphite_create_new_loop): Do not use integer_type_node, use the
5707 max_precision_type of lb and ub.
5709 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5711 * graphite.c (build_scops_1): Initialize open_scop.exit
5714 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5716 * gcc.dg/graphite/pr38084.c: New.
5717 * gfortran.dg/graphite/id-1.f90: New.
5718 * gfortran.dg/graphite/id-2.f90: New.
5719 * gfortran.dg/graphite/id-3.f90: New.
5720 * gfortran.dg/graphite/id-4.f90: New.
5721 * gfortran.dg/graphite/pr37857.f90: New.
5723 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5724 Jan Sjodin <jan.sjodin@amd.com>
5725 Harsha Jagasia <harsha.jagasia@amd.com>
5737 * gcc.dg/graphite/pr38073.c: New.
5738 * gcc.dg/graphite/pr37928.c: New.
5739 * gcc.dg/graphite/pr37883.c: New.
5740 * gcc.dg/graphite/pr38125.c: New.
5741 * gfortran.dg/graphite/pr38083.f90: New.
5742 * gfortran.dg/graphite/pr37852.f90: New.
5743 * gfortran.dg/graphite/pr37980.f90: New.
5745 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5746 the number of detected scops. Copy exact same test for loop
5748 * gcc.dg/graphite/block-1.c: Fix the number of expected
5749 loops to be blocked as reductions are not handled.
5750 * gcc.dg/graphite/block-4.c: ...here. New.
5752 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5753 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5755 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5756 * Makefile.in (graphite.o): Depend on value-prof.h.
5757 (graphite.o-warn): Removed -Wno-error.
5758 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5759 to be a NULL pointer. Call update_stmt. Return the newly created
5760 cannonical induction variable.
5762 * graphite.h (debug_rename_map): Declared. Fix some comments.
5764 * graphite.c: Reimplement the code generation from graphite to gimple.
5765 Include value-prof.h.
5766 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5767 (get_old_iv_from_ssa_name): Removed.
5768 (graphite_stmt_p): New.
5769 (new_graphite_bb): Test for useful statements before building a
5770 graphite statement for the basic block.
5771 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5772 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5774 (recompute_all_dominators, graphite_verify,
5775 nb_reductions_in_loop, graphite_loop_normal_form): New.
5776 (scop_record_loop): Call graphite_loop_normal_form.
5777 (build_scop_loop_nests): Iterate over all the blocks of the
5778 function instead of relying on the incomplete information from
5779 SCOP_BBS. Return the success of the operation.
5780 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5781 (add_bb_domains): Removed.
5782 (build_loop_iteration_domains): Don't call add_bb_domains.
5783 Add the iteration domain only to the basic blocks that have been
5784 translated to graphite.
5785 (build_scop_conditions_1): Add constraints only if the basic
5786 block have been translated to graphite.
5787 (build_scop_data_accesses): Completely disabled until data
5788 dependence is correctly implemented.
5789 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5790 (remove_all_edges_1, remove_all_edges): Removed.
5791 (get_new_name_from_old_name): New.
5792 (graphite_rename_variables_in_stmt): Renamed
5793 rename_variables_in_stmt. Call get_new_name_from_old_name.
5794 Use replace_exp and update_stmt.
5795 (is_old_iv): Renamed is_iv.
5796 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5797 Use replace_exp and update_stmt.
5798 (expand_scalar_variables_expr): Same. Use the map to get the
5799 new names for the renaming of induction variables and for the
5800 renaming of variables after a basic block has been copied.
5801 (expand_scalar_variables): Same.
5802 (graphite_rename_variables): Renamed rename_variables.
5803 (move_phi_nodes): Removed.
5804 (get_false_edge_from_guard_bb): New.
5805 (build_iv_mapping): Do not insert the induction variable of a
5806 loop in the renaming iv map if the basic block does not belong
5808 (register_old_new_names, graphite_copy_stmts_from_block,
5809 copy_bb_and_scalar_dependences): New.
5810 (translate_clast): Heavily reimplemented: copy basic blocks,
5811 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5812 At each translation step call graphite_verify ensuring the
5813 consistency of the SSA, loops and dominators information.
5814 (collect_virtual_phis, find_vdef_for_var_in_bb,
5815 find_vdef_for_var_1, find_vdef_for_var,
5816 patch_phis_for_virtual_defs): Removed huge hack.
5817 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5818 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5819 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5820 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5821 if_region_get_condition_block, if_region_set_false_region,
5822 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5823 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5824 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5825 rewrite_into_sese_closed_ssa): New.
5826 (gloog): Remove dead code. Early return if code cannot be
5827 generated. Call cleanup_tree_cfg once the scop has been code
5829 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5830 block loops with less than two loops.
5831 (graphite_apply_transformations): Remove the call to
5832 scop_remove_ignoreable_gbbs.
5833 (limit_scops): When build_scop_loop_nests fails, continue on
5834 the next scop. Fix open_scop.entry.
5835 (graphite_transform_loops): Call recompute_all_dominators: force the
5836 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5837 Call initialize_original_copy_tables and free_original_copy_tables
5838 to be able to copy basic blocks during code generation.
5839 When build_scop_loop_nests fails, continue on next scop.
5840 (value_clast): New union.
5841 (clast_to_gcc_expression): Fix type cast warning.
5843 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5845 * Merge from mainline (r140838:141727).
5847 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5851 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5853 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5857 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5858 exits and conditions.
5859 * gcc.dg/graphite/pr37943.c: New.
5861 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5864 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5866 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5868 * doc/invoke.texi: Fix spaces.
5870 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5872 PR tree-optimization/37891
5873 Reverted last commit.
5874 * graphite.c (create_single_entry_edge): Set
5875 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5877 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5878 Mitul Thakkar <mitul.thakkar@amd.com>
5880 * graphite.c (create_single_entry_edge): Set
5881 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5883 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
5885 * doc/invoke.texi: Add -fgraphite-identity.
5886 * graphite.c (graphite_apply_transformations): Check for
5887 -fgraphite-identity.
5888 * toplev.c (process_options): Add flag_graphite_identity.
5889 * tree-ssa-loop.c: Add flag_graphite_identity.
5891 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5893 Undo changes from 2008-10-02:
5894 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5895 operand type when copying the operand to a variable of different type.
5896 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5897 with the IV name after increment.
5899 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5900 Harsha Jagasia <harsha.jagasia@amd.com>
5902 PR tree-optimization/37828
5903 * gcc.dg/graphite/pr37828.c: New.
5904 * graphite.c (graphite_trans_loop_block): Do not loop block
5905 single nested loops.
5907 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
5908 Sebastian Pop <sebastian.pop@amd.com>
5910 * graphite.c (struct rename_map_elt, new_rename_map_elt,
5911 rename_map_elt_info, eq_rename_map_elts): New.
5912 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
5913 (expand_scalar_variables_expr): Change parameters.
5914 (expand_scalar_variables_stmt): Same.
5915 (expand_scalar_variables): Same.
5916 (graphite_rename_ivs): Rename graphite_rename_variables.
5917 (build_iv_mapping): New.
5918 (translate_clast): Call build_iv_mapping.
5919 * graphite.h (gbb_p): New name.
5921 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
5923 PR tree-optimization/37684
5924 * gcc.dg/graphite/pr37684.c: New.
5925 * graphite.c (exclude_component_ref): New.
5926 (is_simple_operand): Call exclude_component_ref.
5928 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
5929 Harsha Jagasia <harsha.jagasia@amd.com>
5931 PR tree-optimization/37485
5932 * gcc.dg/graphite/block-2.c: New
5933 * graphite.c (gmp_cst_to_tree): Moved.
5934 (iv_stack_entry_is_constant): New.
5935 (iv_stack_entry_is_iv): New.
5936 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
5937 (loop_iv_stack_insert_constant): New.
5938 (loop_iv_stack_pop): Use new datatpype.
5939 (loop_iv_stack_get_iv): Same.
5940 (loop_iv_stack_get_iv_from_name): Same.
5941 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
5942 (loop_iv_stack_patch_for_consts): New.
5943 (loop_iv_stack_remove_constants): New.
5944 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
5945 (translate_clast): Call loop_iv_stack_patch_for_consts and
5946 loop_iv_stack_remove_constants.
5947 (gloog): Use new datatype. Redirect construction edge to end
5948 block to avoid accidental deletion.
5949 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
5951 (union iv_stack_entry_data): New. Data in iv stack entry.
5952 (struct iv_stack_entry): New. Datatype for iv stack entries.
5954 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5956 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5957 operand type when copying the operand to a variable of different type.
5959 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5961 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5962 with the IV name after increment.
5964 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5966 * Merge from mainline (r140164:140838).
5968 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5970 * graphite-data-ref.c: New.
5971 * graphite.c (print_scop): Also dump the dependence graph.
5972 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
5973 (new_scop): Initialize SCOP_DEP_GRAPH.
5974 (build_scop_dynamic_schedules): New.
5975 (build_access_matrix_with_af): Fixed column numbering.
5976 (graphite_transform_loops): Call build_scop_dynamic_schedules.
5977 * graphite.h: Add ifndef/define guards against multiple inclusion.
5978 (struct scop): Add dep_graph field.
5979 (SCOP_DEP_GRAPH): Defined.
5980 (ref_nb_loops): Fixed and moved to other position.
5981 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
5982 (nb_loops_around_loop_in_scop): New.
5983 (graphite_dump_dependence_graph): Declared.
5984 (graphite_build_rdg_all_levels): Declared.
5985 (graphite_test_dependence): Declared.
5986 * Makefile.in (graphite-data-ref.o): New target.
5988 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
5990 * Merge from mainline (139870:140164).
5992 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5994 * Merge from mainline (138275:139870).
5995 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
5996 the commits from trunk broke the niter detection.
5998 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6000 * graphite.c: Add more documentation. Fix formatting.
6001 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6002 loop_iv_stack_debug): Moved...
6003 (schedule_to_scattering): Move before use.
6004 (dot_all_scops): Include in "#if 0" the code for system
6007 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6008 loop_iv_stack_debug): ...here.
6010 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6012 * tree-phinodes.c (make_phi_node): Extern.
6013 (add_phi_node_to_bb): New.
6014 (create_phi_node): Call add_phi_node_to_bb.
6015 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6016 (remove_statement): Handle case where stored phi was updated
6017 and is no longer the same.
6018 * graphite.c (is_parameter): New.
6020 (expand_scalar_variables_expr): New.
6021 (expand_scalar_variables_stmt): New.
6022 (expand_scalar_variables): New.
6023 (move_phi_nodes): Create new phi instead of moving old one.
6024 (translate_clast): Call expand_scalar_variables.
6025 (find_vdef_for_var_in_bb): Also scan regular definitions.
6026 (skip_phi_defs): New.
6027 (collect_scop_exit_phi_args): New.
6028 (patch_scop_exit_phi_args): New.
6029 (gloog): Patch phis after scop.
6030 * tree-flow.h: (add_phi_node_to_bb): Declared.
6031 (make_phi_node): Declared.
6033 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6035 * graphite.c (end_scop): Split the entry of the scop when it
6036 is the header of the loop in which the scop is ending.
6037 (build_scops_1, limit_scops): Update uses of end_scop.
6039 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6041 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6042 SCOP_ENTRY or SCOP_EXIT.
6044 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6046 * graphite.c (get_construction_edge): Removed.
6047 (gloog): Construction edge is the scop entry edge.
6049 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6051 * graphite.c (can_generate_for_scop): Removed.
6052 (gloog): Do not call it.
6054 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6056 * graphite.c (new_scop): Entry of a scop is an edge.
6057 Initialize SESE region.
6058 (free_scop): Free SESE region.
6059 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6060 (split_difficult_bb): New, split from end_scop.
6061 (end_scop): Exit of a scop is an edge.
6062 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6063 not automatically updated and thus is always wrong.
6064 * graphite.h (struct sese): New.
6067 (struct scop): New field for a SESE region. Remove entry, exit.
6068 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6069 semantics as before. Moved comment around.
6071 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6072 Sebastian Pop <sebastian.pop@amd.com>
6074 * graphite.c (graphite_transform_loops): Always enable gloog
6075 and find_transform when ENABLE_CHECKING.
6077 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6079 * graphite.c (graphite_transform_loops): Move pretty printer
6080 of SCOPs before doing any transform. Remove call to print_scops
6081 and dot_all_scops_1.
6083 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6085 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6086 (print_graphite_bb): Same.
6088 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6090 * graphite.c (dot_all_scops_1): Cleanup.
6091 (move_scops): Fix comment.
6093 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6095 * graphite.c (build_scop_bbs): Revert commit 139355:
6097 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6098 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6100 * graphite.c (build_scop_bbs): Factor up code.
6102 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6104 * graphite.c (gloog): Update dominator info.
6106 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6108 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6110 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6112 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6114 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6115 (translate_clast): Correct formatting.
6116 * graphite.h (struct num_map): Removed.
6117 (struct graphite_bb): Remove num_map field.
6118 (GBB_INDEX_TO_NUM_MAP): Removed.
6120 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6122 * graphite.c (build_access_matrix_with_af): Fix comments.
6123 (build_scop_data_accesses): Same.
6125 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6127 * graphite.c (build_scop_data_accesses): Don't construct
6128 access matrices. Add a FIXME and an assert condition that
6129 should pass when the access matrices will be needed.
6131 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6133 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6135 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6136 Moved close by free_graphite_bb.
6137 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6138 (new_scop): Move close by free_scop.
6139 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6141 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6143 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6144 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6145 instead of recursive call.
6146 (graphite_translate_clast_equation): New.
6147 (graphite_create_guard_cond_expr): New.
6148 (graphite_create_new_guard): New.
6149 (get_stack_index_from_iv): Removed.
6150 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6151 (get_true_edge_from_guard_bb): New.
6152 (translate_clast): Handle stmt_guard in clast.
6153 (get_construction_edge): Allow construction edge detection for
6154 a scope entry with multiple predecessors if one predecessor is
6155 the immediate dominator of scope entry.
6156 (can_generate_code_stmt): Enable code generation for clast_guard.
6157 (gloog): Use correct context loop. Removed check for post dominators.
6158 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6160 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6162 * graphite.c (remove_dead_loops): Document better which
6165 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6167 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6169 (graphite.o): Also depends on pointer-set.h.
6171 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6173 * graphite.c (scop_record_loop): Fix compile warning.
6175 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6176 Sebastian Pop <sebastian.pop@amd.com>
6178 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6180 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6182 * graphite.c (build_graphite_bb): Initialize bb->aux to
6183 point to the graphite_bb_p.
6184 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6186 (add_bb_domains): Does not use the scop parameter.
6187 (graphite_transform_loops): Clean bb->aux at the end.
6189 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6190 Sebastian Pop <sebastian.pop@amd.com>
6192 * lib/target-supports.exp
6193 (check_effective_target_fgraphite): New.
6195 * gcc.dg/graphite/graphite.exp: Early exit when
6196 check_effective_target_fgraphite returns false.
6197 Set dg-do-what-default to compile.
6198 (scan-graphite-dump-times): Removed.
6199 * gfortran.dg/graphite/graphite.exp: Same.
6201 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6202 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6203 * gcc.dg/graphite/scop-1.c: Same.
6204 * gcc.dg/graphite/scop-2.c: Same.
6205 * gcc.dg/graphite/scop-3.c: Same.
6206 * gcc.dg/graphite/scop-4.c: Same.
6207 * gcc.dg/graphite/scop-5.c: Same.
6208 * gcc.dg/graphite/scop-6.c: Same.
6209 * gcc.dg/graphite/scop-7.c: Same.
6210 * gcc.dg/graphite/scop-8.c: Same.
6211 * gcc.dg/graphite/scop-9.c: Same.
6212 * gcc.dg/graphite/scop-10.c: Same.
6213 * gcc.dg/graphite/scop-11.c: Same.
6214 * gcc.dg/graphite/scop-12.c: Same.
6215 * gcc.dg/graphite/scop-13.c: Same.
6216 * gcc.dg/graphite/scop-matmult.c: Same.
6217 * gcc.dg/graphite/scop-14.c: Same.
6218 * gcc.dg/graphite/scop-15.c: Same.
6219 * gcc.dg/graphite/block-0.c: Same.
6220 * gcc.dg/graphite/scop-16.c: Same.
6221 * gcc.dg/graphite/block-1.c: Same.
6222 * gcc.dg/graphite/scop-17.c: Same.
6223 * gcc.dg/graphite/scop-18.c: Same.
6224 * gfortran.dg/graphite/block-1.f90: Same.
6225 * gfortran.dg/graphite/scop-1.f: Same.
6226 * gfortran.dg/graphite/block-2.f: Same.
6228 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6230 * graphite.c: Fix some XXX comments.
6231 (build_scop_dynamic_schedules): Removed.
6233 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6235 * graphite.h (scop_max_loop_depth): Moved...
6236 * graphite.c (scop_max_loop_depth): ...here.
6237 (remove_all_edges_1): New.
6238 (remove_all_edges): Factored code.
6239 (remove_cond_exprs): Check only the last statement for
6240 a GIMPLE_COND expression.
6242 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6244 * graphite.c (scan_tree_for_params): Early return when the
6245 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6246 (find_scop_parameters): Factor out code.
6247 (graphite_trans_bb_strip_mine): Remove dead code.
6249 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6251 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6252 graphite_trans_bb_move_loop): Factor asserts.
6253 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6254 Do not call calculate_dominance_info and estimate_bb_frequencies.
6256 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6258 * graphite.c (create_loops_mapping, free_loops_mapping,
6259 create_loops_mapping_num, debug_loop_mapping_1,
6260 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6261 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6262 graphite_loops_mapping_add_child_num,
6263 graphite_loops_mapping_insert_child,
6264 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6265 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6266 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6267 create_num_from_index, get_num_from_index,
6268 swap_loop_mapped_depth): Removed.
6269 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6270 (free_scop): Do not call free_loops_mapping.
6271 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6272 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6273 get_loop_mapped_depth.
6274 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6275 (graphite_trans_bb_strip_mine): Same.
6276 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6277 (struct scop): Remove field loops_mapping.
6279 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6280 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6282 * graphite.c (scop_record_loop): Factor out one level of the
6283 condition by early return.
6284 (build_scop_loop_nests): Format following FSF coding style.
6285 (build_scop_dynamic_schedules): Factor out code.
6286 (scopdet_bb_info): Reindent. Default case should not be reachable.
6288 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6289 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6291 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6292 assignments that are not handled as simple operands for now.
6294 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6295 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6297 * graphite.c (build_scop_bbs): Factor up code.
6299 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6300 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6302 * graphite.c (stmt_simple_for_scop_p): Factor code out
6304 (enum gbb_type): New. Group all the GBB_* types under it.
6305 (is_loop_exit): Moved...
6306 (end_scop): Enable BB spliting.
6307 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6308 * cfgloop.h (is_loop_exit): Declared.
6310 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6312 * doc/invoke.texi: Remove strides from examples containing
6313 DO loops when the strides are equal to 1.
6315 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6316 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6318 * graphite.c (graphite_trans_scop_block): Or the result with
6319 the result from graphite_trans_loop_block.
6320 * gcc.dg/graphite/block-1.c: New.
6321 * gfortran.dg/graphite/block-1.f90: New.
6322 * gfortran.dg/graphite/block-2.f: New.
6324 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6326 * graphite.c (graphite_transform_loops): Call cloog_initialize
6329 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6331 * tree-data-ref.c) (stmt_simple_memref_p): New.
6332 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6333 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6334 (is_simple_operand): Call stmt_simple_memref_p.
6336 * gcc.dg/graphite/scop-matmult.c: Updated for not
6337 using pointer arithmetic, as this is optimized by PRE and
6338 makes the code too difficult to analyze.
6340 * gcc.dg/graphite/scop-18.c: Same.
6342 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6344 * gdbinit.in (pgg): New.
6346 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6348 * graphite.c (graphite_trans_loop_block): Fix warning.
6350 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6352 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6354 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6356 * graphite.c (graphite_trans_bb_block): Remove check for
6357 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6358 Check if loop blocking is profitable for every loop, before applying
6360 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6361 if flag_loop_block is set.
6363 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6365 * graphite.c: Add some more documentation for the loop
6368 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6370 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6371 * graphite.c: Format on less than 80 columns.
6374 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6376 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6378 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6380 * doc/invoke.texi (floop-block, floop-strip-mine,
6381 floop-interchange): Update documentation with examples.
6383 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6385 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6387 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6389 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6391 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6392 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6393 * tree-scalar-evolution.c: Revert useless changes.
6394 * tree-phinodes.c: Same.
6397 * tree-vectorizer.h: Same.
6398 * tree-flow.h: Same.
6400 * common.opt (fgraphite): Update documentation.
6402 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6404 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6405 -floop-interchange): Add more text for explaining what each of these
6407 * tree-into-ssa.c (gimple_vec): Moved to...
6408 * graphite.c: Include gimple.h.
6409 (gimple_vec): Moved to...
6410 (del_loop_to_cloog_loop): Removed.
6411 (loop_affine_expr): Do not call create_data_ref when the
6412 operand is a constant.
6413 (new_scop): Use free instead of del_loop_to_cloog_loop.
6414 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6415 * gimple.h (gimple_vec): ... here.
6417 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6419 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6421 (build_loop_iteration_domains): Fail, if latch executions unknown.
6423 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6425 * graphite.c (add_conditions_to_domain): New.
6426 (build_scop_conditions_1): Call add_conditions_to_domain.
6427 (set_cloog_options): Allow to disable optimizations.
6429 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6431 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6432 Do not use walk_dominator_tree.
6433 (find_scop_parameters): Do not use walk_dominator_tree.
6435 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6437 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6438 (idx_record_params): Adapt.
6439 * graphite.h (scop_gimple_loop_depth): New.
6441 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6443 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6444 (scan_tree_for_params): Remove value_init.
6445 (build_scop_context): Remove value_init.
6446 (build_loop_iteration_domains): Remove value_init.
6447 (schedule_to_scattering): Remove value_init.
6448 (graphite_trans_bb_strip_mine): Remove value_init.
6450 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6452 * gcc/graphite.c (limit_scops): New.
6453 (graphite_transform_loops): Add limit SCoPs.
6454 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6455 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6456 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6457 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6458 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6459 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6460 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6461 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6462 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6463 Change loop numbers.
6464 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6465 Change loop numbers.
6466 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6467 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6468 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6469 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6470 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6471 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6472 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6473 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6474 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6475 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6477 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6479 * graphite.c (graphite_transform_loops): Call always find_transform.
6481 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6483 * graphite.c (free_loops_mapping): New.
6484 (stmt_simple_for_scop_p): Fix typo.
6485 (stmt_simple_for_scop_p): Fix tuples functions, that
6487 (free_graphite_bb): Fix some memleaks.
6488 (free_scop): Fix some memleaks.
6489 (scopdet_bb_info): Do not forget some tmp SCoPs.
6490 (find_params_in_bb): Fix some memleaks.
6491 (clast_to_gcc_expression): Fix warning.
6493 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6495 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6496 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6498 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6500 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6501 Move code ifdef-ed HAVE_cloog...
6502 * graphite.c: Include toplev.h.
6504 * Makefile.in (OBJS-common): Always build graphite.o.
6505 (BACKEND): Remove @GRAPHITE@.
6506 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6507 (graphite.o): Depend on TOPLEV_H.
6509 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6511 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6512 Remove typo left from polylib to ppl conversion.
6513 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6515 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6517 * toplev.c (process_options): Move the graphite loop optimization
6519 * tree-ssa-loop.c (graphite_transforms): ... here.
6520 When not configured with CLooG, print to dump_file that
6521 Graphite transforms were not performed.
6522 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6524 * gcc.dg/graphite/*.c: Updated all testcases to use
6525 scan-graphite-dump-times.
6527 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6529 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6530 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6532 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6533 Jan Sjodin <jan.sjodin@amd.com>
6535 * configure: Regenerated.
6536 * omp-low.c (expand_omp_sections): Remove now unused code.
6537 * config.in (HAVE_polylib): Removed.
6538 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6539 (PPLLIBS, PPLINC): Added.
6540 * graphite.c: Replace unsigned with int wherever possible.
6541 Don't access Cloog's data structures, but use accessor functions.
6542 Clast's stmt->type is now implemented as a vtable: change the
6543 switches of stmt->type into ifs.
6544 (polylib/polylibgmp.h): Don't include.
6545 (initialize_dependence_polyhedron,
6546 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6547 statement_precedes_p, test_dependence, build_rdg_all_levels,
6548 dump_dependence_graph): Removed until this code is cleaned up
6550 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6551 (POLYLIBINC): Renamed PPLINC.
6553 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6554 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6555 Jan Sjodin <jan.sjodin@amd.com>
6557 Finish the merge and tuplification of graphite.
6559 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6560 Jan Sjodin <jan.sjodin@amd.com>
6562 Partial merge from mainline (138072:138275).
6563 * graphite.c still has to be tuplified.
6565 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6567 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6568 (create_num_from_index): New.
6569 (get_num_from_index): Also pass in the graphite BB.
6570 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6571 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6572 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6573 (is_interchange_valid): Return false when failing.
6574 * graphite.h (struct num_map): New.
6575 (struct graphite_bb): New field num_map.
6576 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6578 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6580 * graphite.c (dump_gbb_conditions): Print also conditions like
6581 "if (a)". Remove dublicated code and use print_generic_expr ().
6582 (stmt_simple_for_scop_p): Only allow conditions we can handle
6585 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6587 * graphite.h (struct scop): Removed new_ivs field.
6588 (SCOP_NEWIVS): Deleted.
6589 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6590 clast_to_gcc_expression, graphite_create_new_loop):
6591 Removed use of new_ivs.
6593 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6595 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6596 create_loops_mapping_num, debug_loop_mapping_1): New.
6597 (debug_loop_mapping): Call debug_loop_mapping_1.
6598 (get_loop_mapping_for_num,
6599 graphite_loops_mapping_add_child,
6600 graphite_loops_mapping_add_child_num,
6601 graphite_loops_mapping_insert_child,
6602 graphite_loops_mapping_parent,
6603 split_loop_mapped_depth_for_num,
6604 loop_mapped_depth_split_loop): New.
6605 (increment_loop_mapped_depths): Removed.
6606 (swap_loop_mapped_depth_for_num): Reimplemented.
6607 (new_scop): Call create_loops_mapping.
6608 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6609 (translate_clast): Pass the old loop father in parameter, and pass
6610 it to get_old_iv_from_ssa_name.
6611 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6612 can_generate_code, can_generate_for_scop): New.
6613 (graphite_trans_bb_block): Returns false when it fails to transform.
6614 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6616 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6618 Reverted all the changes related to the streamization and
6620 These changes are now tracked in the streamization branch.
6622 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6623 Jan Sjodin <jan.sjodin@amd.com>
6625 * graphite.c (gbb_compare): Correctly constify.
6626 (gbb_can_be_ignored): Indent.
6627 (graphite_trans_scop_swap_1and2): Add legality check.
6630 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6632 Remove fallouts from "Reverted the Condate changes".
6633 * tree.h: Remove unused decl.
6634 * gcc.dg/tree-checker: Same.
6635 * timevar.def: Remove counter.
6637 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6639 * Merge from mainline (135673:138072).
6641 Reverted the MIRO changes (from 2008-04-05) that are now
6642 tracked in the miro branch.
6643 * tree-bounds.c: Removed.
6644 * tree-bounds.h: Removed.
6646 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6647 are now tracked in the condate branch.
6648 * tree-check.c: Removed.
6649 * tree-match.c: Removed.
6650 * condate.y: Removed.
6652 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6654 * common.opt: New user flag -floop-block, -floop-strip-mine
6655 and -floop-interchange.
6656 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6657 graphite loop optimization flags is turned on.
6658 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6659 flag_loop_strip_mine and flag_loop_interchange checks before
6661 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6662 -floop-strip-mine and -floop-interchange.
6663 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6665 * gcc.dg/graphite/scop-16.c: Ditto.
6666 * gcc.dg/graphite/scop-17.c: Ditto.
6667 * gcc.dg/graphite/scop-18.c: Ditto.
6669 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6670 Sebastian Pop <sebastian.pop@amd.com>
6672 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6673 (create_empty_loop_on_edge): More fixes.
6674 * tree-phinodes.c (resize_phi_node): Extern.
6675 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6676 * cfghooks.c (update_dominator_information): New split from
6678 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6679 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6680 successor of the function entry block.
6682 * graphite.c: Include pointer-set.h.
6683 (debug_loop_mapping, increment_loop_mapped_depths,
6684 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6685 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6686 swap_loop_mapped_depth_for_num, get_num_from_index,
6687 swap_loop_mapped_depth, loop_iv_stack_debug,
6688 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6689 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6690 get_old_iv_from_ssa_name): New.
6691 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6692 (free_scop): Free SCOP_LOOPS_MAPPING.
6693 (scop_record_loop): Record old ivs.
6694 (create_var_name): Removed.
6695 (initialize_cloog_names): Allocate double space in case strip mine
6696 applies to all loops once.
6697 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6698 (clast_to_gcc_expression): Same. Implement more clast to gimple
6700 (graphite_create_new_loop): Pass in ivstack.
6701 (remove_all_edges): Pass in the construction_edge.
6702 (graphite_remove_iv): Removed.
6703 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6704 remove_cond_exprs): Rewritten.
6705 (move_phi_nodes): New.
6706 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6707 (translate_clast): Pass in ivstack. Rewrite some cases.
6708 (set_cloog_options, debug_clast_stmt): New.
6709 (find_transform): Use set_cloog_options.
6710 (outermost_loop_layer): Removed.
6711 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6712 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6713 mark_old_loops, remove_dead_loops): New.
6715 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6716 (const_column_index, get_first_matching_sign_row_index,
6717 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6718 get_upper_bound): New.
6719 (graphite_trans_bb_strip_mine): Also update the iv map.
6721 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6722 (struct name_tree): Add a loop field.
6723 (struct scop): Add a graphite_loops_mapping field.
6724 (SCOP_LOOPS_MAPPING): New.
6725 (debug_clast_stmt): Declare.
6726 * lambda.h (find_induction_var_from_exit_cond): Declare.
6727 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6728 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6729 (create_empty_loop_on_edge): Updated.
6730 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6731 rename_variables_in_bb): Declare.
6732 * tree-cfg.c (remove_bb): Extern.
6734 * gcc.dg/graphite/block-0.c: New.
6736 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6737 Sebastian Pop <sebastian.pop@amd.com>
6739 * graphite.c (strip_mine_profitable_p): New.
6740 (graphite_trans_bb_block): Disable strip mining if not profitable.
6742 * gcc.dg/graphite/scop-18.c: New.
6743 * gcc.dg/graphite/scop-17.c: Fixed.
6744 * gcc.dg/graphite/scop-16.c: Fixed.
6746 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6747 Jan Sjodin <jan.sjodin@amd.com>
6748 Sebastian Pop <sebastian.pop@amd.com>
6750 * graphite.c (is_interchange_valid): New.
6751 (graphite_trans_bb_block): Check loop nest of basic block for legality
6754 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6755 outer_most_loop, gbb_outer_most_loop_index): New.
6757 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6758 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6759 * gcc.dg/graphite/scop-16.c: New.
6760 * gcc.dg/graphite/scop-17.c: New.
6762 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6764 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6765 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6767 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6769 * graphite.c (new_scop): Initialize SCOP_EXIT.
6770 (scopdet_info): Add.
6771 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6772 (build_scops_1): Cleanup, bugfixes.
6773 (build_scops): Cleanup.
6775 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6776 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6778 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6780 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6782 * gfortran.dg/graphite/graphite.exp: Use
6783 DEFAULT_GRAPHITE_FLAGS.
6785 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6787 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6789 * graphite.c (scan_tree_for_params): Do not assert any more if
6790 MULT_EXPR parameter is negative.
6792 * gfortran.dg/graphite/scop-1.f: New.
6794 * gfortran.dg/graphite/graphite.exp: New.
6796 * gcc.dg/graphite/scop-15.c: New.
6798 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6800 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6802 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6804 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6805 graphite_swap_loops.
6806 (graphite_trans_bb_move_loop): New.
6807 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6808 (graphite_trans_bb_block): New.
6809 (graphite_trans_loop_block): New.
6810 (graphite_trans_scop_swap_1and2): Rename from
6811 graphite_trans_swap_1and2.
6812 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6813 (graphite_trans_scop_block): New.
6814 (graphite_apply_transformations): Rename from
6815 graphite_transformations.
6817 * gcc.dg/graphite/scop-matmult.c: New.
6819 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6821 * graphite.c (gbb_compare): New.
6822 (graphite_sort_gbbs): New.
6823 (gbb_can_be_ignored): New.
6824 (scop_remove_ignoreable_gbbs): New.
6825 (graphite_transformations): Cleanup and add
6826 scop_remove_ignoreable_gbbs.
6827 * lambda.h (lambda_vector_compare): New.
6829 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6831 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6832 (graphite_swap_loops): int -> unsigned
6833 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6834 (graphite_transformations): New.
6835 (graphite_transform_loops): Move to graphite_transformations.
6836 * graphite.h (gbb_nb_loops): Return unsigned.
6838 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6840 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6841 the domain matrix. This makes scop-0.c work again.
6843 2008-06-20 Richard Guenther <rguenther@suse.de>
6845 * graphite.h: Adjust copyright to GPLv3.
6846 * graphite.c: Likewise.
6847 (stmt_simple_memref_for_scop_p): Split out from ...
6848 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6850 (get_bb_type): Optimize.
6852 (is_bb_addable): Fix memleak, replace is_pred call with
6854 (build_scops): Use current_loops.
6855 (param_index): Fix memleak.
6857 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6859 * graphite.c: Fix formatting.
6861 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6863 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6864 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6865 (create_var_name, save_var_name): Newly defined functions.
6866 (initialize_cloog_names): Part of the code factored out to
6868 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6869 in clast_reduction statement.
6870 (graphite_create_new_loop): Now takes a new parameter
6872 (translate_clast): Now also takes the context_loop and bb_exit
6873 parameters. Rewritten the code so that it creates a gimple code
6874 inside the given context.
6875 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6876 remove_cond_expr, disconnect_cond_expr,
6877 disconnect_virtual_phi_nodes): Newly defined functions.
6878 * graphite.h (struct scop): added old_ivs vector.
6879 SCOP_OLDIVS: New macro.
6881 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6883 * cfgloopmanip.c: Add missing function comments, fix formatting.
6885 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6887 * cfgloopmanip.c (update_dominators_in_loop): Defined.
6888 (create_empty_loop_on_edge): Defined.
6889 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
6891 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
6892 (update_dominators_in_loop): Declared as extern
6893 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
6895 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
6897 * graphite.c (print_graphite_bb): Allow changing number of loops
6899 (initialize_cloog_names): Allow changing number of loops.
6900 (build_cloog_prog): Simplify.
6901 (find_transform): Enable cloog option --strides.
6902 (graphite_swap_loops): New.
6903 (graphite_strip_mine_loop): New.
6904 (graphite_trans_swap_1and2): New.
6905 (graphite_trans_strip): New.
6906 (graphite_transform_loops): Add graphite_trans_strip.
6907 * graphite.h (scop_max_loop_depth): New.
6909 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6911 * graphite.c (build_scop_iteration_domain): Remove forgotten
6912 line. (Fixes compile)
6914 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6916 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
6917 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
6918 (build_bb_loops): New.
6919 (graphite_transform_loops): Add build_bb_loops.
6920 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
6922 * graphite.h (graphite_bb): Add loops.
6923 (gbb_nb_loops): New.
6924 (gbb_loop_at_index): New.
6925 (gbb_loop_index): New.
6926 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
6927 using nb_params_in_scop.
6929 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6931 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
6932 (build_scop_canonical_schedules): Build minimized schedule.
6933 (schedule_to_scattering): Adapt to minimized schedule.
6934 * graphite.h (graphite_bb): Add/Update descriptions.
6936 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
6937 Tobias Grosser <grosser@fim.uni-passau.de>
6939 * graphite.c (print_graphite_bb): Add condition printing.
6941 (dump_gbb_conditions): New.
6942 (build_scop_conditions_1): New.
6943 (build_scop_conditions): New.
6944 * graphite.h (graphite_bb): Add conditions.
6946 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6948 * graphite.c (print_graphite_bb):
6949 (free_graphite_bb): New.
6950 (free_scop): Free bbs.
6951 (get_bb_type): Free doms.
6952 (build_scop_context): Free context matrix.
6953 (build_loop_iteration_domains): Remove unused code.
6954 (build_cloog_prog): Free scattering function and blocklist.
6955 (find_transform): Free options.
6957 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
6959 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
6960 Remove unnecessery cloog data structures. Make a copy of the domain
6961 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
6962 unnecessary cloog data structures. Fix memory leaks. Remove insert
6963 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
6965 (build_scop_iteration_domain): Remove unnecessary cloog
6966 data structures. Fix memory leaks.
6967 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
6968 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
6970 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6972 * graphite.c (find_scop_params): Remove initialize_cloog_names.
6974 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6976 * graphite.c (end_scop): Style fix.
6977 (schedule_to_scattering): Style and comment fix.
6979 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6980 * graphite.c (print_graphite_bb): Fix definiton of
6981 schedule_to_scattering.
6982 (initialize_cloog_names): Change nb_scattdims to max loop
6984 (schedule_to_scattering): Take parameter for number of scattering
6986 (build_cloog_prog): Only build as much scattering dimensions as
6989 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6991 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
6992 in polyhedron/aermod.f90.
6994 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
6995 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6996 Harsha Jagasia <harsha.jagasia@amd.com>
6998 * graphite.c (is_bb_addable): Fix segfault.
7000 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7002 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7003 with multiple exits and conditional handling in edge cases.
7004 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7006 * gcc.dg/graphite/scop-14.c: New.
7008 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7009 Adrien Eliche <aeliche@isty.uvsq.fr>
7011 * graphite.c (is_bb_addable): Add more comments and enhance
7012 readablity of the source code. Fix memory leak.
7013 (is_loop_exit): Fix memory leak.
7015 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7017 * graphite.c (first_loop_in_scop): Deleted.
7018 (setup_cloog_loop): Only walk the loop chain for inner loops.
7019 (build_scop_iteration_domain): Execute setup_cloog_loop for
7020 all loops in the first layer.
7022 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7024 * graphite.c (scan_tree_for_params): Change the way params are
7025 added to be indepenent of the number of loops.
7026 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7028 (build_cloog_prog): Revert to short matrix format.
7030 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7031 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7033 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7036 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7038 * graphite.c (nb_data_refs_in_scop): New.
7039 (graphite_transform_loops): Print more stats: number of
7040 loops, basic blocks and data references per scop.
7042 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7043 Jan Sjodin <jan.sjodin@amd.com>
7045 * graphite.c (loop_affine_expr, idx_record_params,
7046 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7047 instead of instantiate_parameters.
7049 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7051 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7052 add support for parameters, add STATIC_SCHEDULE at the right places,
7055 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7057 * graphite.c (build_scop_loop_nests): Only add the loops, that
7058 are contained completely in the SCoP.
7059 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7060 and the domains are fixed.
7061 (build_scop_canonical_schedules): Add support for bbs not contained
7064 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7066 * graphite.h (scop_contains_loop): Update comments to match
7067 the actual behavior.
7068 (scop_contains_loop): New.
7069 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7071 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7073 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7074 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7077 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7078 Tobias Grosser <grosser@fim.uni-passau.de>
7080 * graphite.c (graphite_transform_loops): Early return when
7081 there are no loops in the function.
7083 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7084 Jan Sjodin <jan.sjodin@amd.com>
7086 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7087 offset of the last loop.
7088 (setup_cloog_loop): Copy the entire outer constraint matrix.
7090 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7091 Jan Sjodin <jan.sjodin@amd.com>
7093 * graphite.c (stmt_in_scop_p, function_parameter_p,
7094 invariant_in_scop_p): Removed.
7095 (scan_tree_for_params): Can be used with no constraint
7096 matrix for gathering parameters.
7097 (idx_record_params): Don't use idx_record_param, instead use
7098 scan_tree_for_params.
7099 (find_scop_parameters): Same.
7100 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7101 Fix the size of loop domains.
7102 (schedule_to_scattering): Exit when the outer loop is not in scop.
7103 (find_transform): Enable build_cloog_prog.
7105 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7106 Jan Sjodin <jan.sjodin@amd.com>
7108 * graphite.c (schedule_to_scattering): Make scattering domains
7109 uniformly of the same size, as required by CLooG 0.14.0 and before.
7111 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7112 Jan Sjodin <jan.sjodin@amd.com>
7114 * graphite.c (schedule_to_scattering): Rewrite, correct the
7115 translation of the scheduling function to scattering.
7116 (build_cloog_prog): Call schedule_to_scattering only once.
7117 * graphite.h (scop_loop_index): Do not fail for loops not
7118 in the scop: return -1.
7120 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7122 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7123 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7124 (setup_cloog_loop): Export GBB_DOMAIN.
7125 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7126 able to rebuild the original control flow.
7127 * graphite.h (graphite_bb): Add domain field and access macro.
7130 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7132 * graphite.c (debug_gbb): New.
7133 (print_scop, build_graphite_bb): Use SCOP_BBS.
7134 (build_scop_bbs): Reimplemented.
7135 (dfs_bb_in_scop_p): Removed.
7136 (build_scop_loop_nests): Reorder loops inserted in
7137 SCOP_LOOP_NEST: outer loops should come first.
7138 (build_scop_canonical_schedules): Reinitialize at zero
7139 the components of the SCOP_STATIC_SCHEDULE for the loops
7140 that have already been parsed.
7142 * graphite.h (debug_gbb): Declared.
7144 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7145 Jan Sjodin <jan.sjodin@amd.com>
7147 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7148 (graphite_loop_to_gcc_loop): Removed.
7149 (remove_all_edges): New.
7150 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7151 (gloog): Remove useless code.
7153 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7155 * graphite.c (get_bb_type): Reworked. We distinguish between
7156 loops with one or multiple exits.
7157 (is_loop_exit): New.
7159 (is_bb_addable): Rework condition handling, now support for case
7160 case statements and loops with multiple exits.
7162 * gcc.dg/graphite/scop-11.c: New.
7163 * gcc.dg/graphite/scop-12.c: New.
7164 * gcc.dg/graphite/scop-13.c: New.
7166 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7168 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7169 we have too many colors.
7171 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7173 * doc/invoke.texi (-ftree-loop-fusion): Document.
7174 * tree-pass.h (pass_loop_fusion): Declared.
7175 * tree-loop-fusion.c: New.
7176 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7177 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7178 * tree-data-ref.h (find_data_references_in_loop): Declared.
7179 * common.opt (ftree-loop-fusion): Declared.
7180 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7182 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7184 * graphite.c (build_access_matrix): Fix typo from the merge.
7186 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7188 * Merge from mainline (130800:135673).
7190 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7192 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7193 Update dominators after splitting.
7195 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7197 * graphite.c (is_bb_addable): Return the harmful statement.
7198 Factor up some code.
7199 (end_scop): New. Splits end of scope bbs on a harmful statement.
7200 (build_scops_1): Call end_scop.
7202 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7204 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7205 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7206 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7207 build_scops_1): Removed.
7208 (build_scops_2): Renamed build_scops_1.
7210 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7212 * graphite.c: Fix formatting.
7214 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7216 * graphite.c (get_bb_type): New.
7218 (build_scops_2): New.
7219 (is_bb_addable): New.
7220 (build_scops): Switch the scop detection.
7221 (build_scop_bbs): Add entry bb to scop.
7222 * graphite.h (struct scop): Update comment.
7224 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7226 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7229 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7231 * gcc.dg/graphite/scop-1.c: Update.
7232 * gcc.dg/graphite/scop-2.c: Update.
7233 * gcc.dg/graphite/scop-4.c: Update.
7234 * gcc.dg/graphite/scop-5.c: Add.
7235 * gcc.dg/graphite/scop-6.c: Add.
7237 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7239 * gcc.dg/graphite/scop-0.c: Add.
7240 * gcc.dg/graphite/scop-7.c: Add.
7241 * gcc.dg/graphite/scop-8.c: Add.
7242 * gcc.dg/graphite/scop-9.c: Add.
7243 * gcc.dg/graphite/scop-10.c: Add.
7245 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7247 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7248 Check affine expressions depending on the outermost loop
7250 (stmt_simple_for_scop_p): Same.
7251 (harmfule_stmt_in_scop): Same.
7253 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7255 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7256 mark entry and exit, that are not part of the SCoP and update HTML
7259 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7261 * graphite.c (basic_block_simple_for_scop_p): Renamed
7263 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7264 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7265 (all_preds_visited_p, all_succs_visited_p,
7266 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7267 scop_end_loop): New.
7268 (build_scops): Do not use dfs_enumerate_from.
7270 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7272 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7274 * graphite.c: Add comments to functions that are missing a
7276 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7278 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7280 * graphite.c (nb_params_in_scop): Moved...
7281 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7282 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7283 (clast_to_gcc_expression): Reduce column size to less than 80.
7284 (graphite_create_iv): Return the new name of the IV.
7285 (find_transform): Set options->esp and options->cpp.
7286 (gloog): Comment out the invalidation of the old loop code.
7287 (initialize_dependence_polyhedron): Replace scop_nb_params with
7290 * graphite.h (nb_params_in_scop): ... here.
7291 (scop_nb_params): Removed.
7292 (loop_domain_dim): Return something even when the loop was not
7293 found in the hash table: avoid ICEing on all the graphite.exp
7296 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7298 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7300 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7301 according to nesting level.
7302 (find_scop_parameters): Call instantiate_parameters.
7303 (scan_tree_for_params): Extend it to handle general affine bounds.
7304 Inner loop bound can depend on outer loop induction variable.
7305 (setup_cloog_loop): tmp variable is allocated on stack. Call
7306 instantiate_parameters with respect to outermost_loop_in_scop.
7307 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7309 (create_empty_loop): Function loopify should be given edge
7310 probability, instead of edge frequency. Dominance relation from
7311 switch_bb to loop_header.
7312 (clast_to_gcc_expression): Added handling of clast_reduction node.
7313 (gloog): New functionality for removing old loop.
7314 (test_dependence): Factored out from build_rdg_all_levels.
7315 (build_rdg_all_levels): Dependence testing factored out to
7316 test_dependence function.
7318 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7319 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7322 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7324 * graphite.c (free_scop, param_index, initialize_cloog_names,
7325 nb_params_in_scop): Use name_tree map instead of just a tree
7326 for keeping track of the variable name associated to that tree.
7327 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7328 clast_to_gcc_expression, graphite_create_iv,
7329 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7330 graphite_stmt_to_gcc_stmt): New.
7331 (gloog): Call these.
7332 * graphite.h (struct name_tree): New.
7333 (struct scop): Use name_tree instead of tree for params.
7334 Store a vector of name_tree for new_ivs.
7336 (scop_nb_params): Use name_tree instead of tree.
7338 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7339 Sebastian Pop <sebastian.pop@amd.com>
7341 * tree-bounds.c: New.
7342 * tree-bounds.h: New.
7343 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7344 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7345 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7349 * c-cppbuiltin.c: Same.
7353 * tree-outof-ssa.c: Same.
7355 * Makefile.in: Same.
7357 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7358 Sebastian Pop <sebastian.pop@amd.com>
7360 * tree-loop-distribution.c (remaining_stmts,
7361 upstream_mem_writes): Removed static variables.
7362 (copy_loop_before, create_bb_after_loop,
7363 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7364 rdg_build_components, rdg_build_partitions,
7365 dump_rdg_partitions): Extern.
7366 (generate_loops_for_partition, generate_code_for_partition): Do not
7368 (already_processed_vertex_p, predecessor_has_mem_write,
7369 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7370 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7371 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7372 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7373 Pass remaining_stmts and upstream_mem_writes as parameters.
7374 (rdg_component): Moved...
7375 (build_rdg_partition_for_component): Do not aggregate components when
7376 flag_streamize_loops is set.
7377 (gen_sequential_loops): New.
7378 (ldist_gen): Call gen_sequential_loops.
7380 * tree-pass.h (pass_loop_streamization): Declared.
7382 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7383 basic blocks when loops structures exist.
7385 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7387 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7389 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7390 eliminate_local_variables_stmt, eliminate_local_variables,
7391 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7392 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7393 of code delimited by two edges in the CFG.
7394 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7395 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7396 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7397 the case of parallelisation of reductions.
7398 (create_loop_fn): Extern.
7399 (create_omp_parallel_region): New.
7401 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7402 dump_data_reference for printing dra and drb.
7403 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7405 (build_rdg): Don't call free_dependence_relations for the moment, as
7406 we attach dependence relations on each edge of the RDG.
7409 * tree-data-ref.h (rdg_component): ...here.
7410 (struct rdg_edge): New field ddr_p relation.
7411 (RDGE_RELATION): New.
7412 (create_bb_after_loop, copy_loop_before,
7413 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7414 rdg_build_partitions, dump_rdg_partitions,
7415 free_rdg_components): Declared.
7417 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7418 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7420 * tree-loop-streamization.c: New.
7422 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7423 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7425 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7427 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7429 * passes.c: Schedule pass_loop_streamization.
7431 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7433 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7436 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7438 * graphite.c (dot_all_scops): Update formatting.
7439 Bbs can now be part of more than one SCoP.
7441 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7443 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7445 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7446 * graphite.h (loop_to_cloog_loop): New.
7448 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7450 * graphite.c (loop_domain_dim, ref_nb_loops,
7451 loop_iteration_vector_dim): New.
7452 (build_access_matrix_with_af, build_access_matrix,
7453 initialize_dependence_polyhedron): Fixed for new matrix layout.
7454 No longer assume that all iteration domains are of the same
7457 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7459 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7460 defined in a loop at depth 0 is invariant.
7461 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7462 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7463 be called at loop depth 0.
7465 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7467 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7468 (down_open_scop): Removed.
7469 (loop_in_scop_p): Redefined.
7470 (scop_affine_expr): New argument: scop.
7471 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7472 a harmful statement ending a scop.
7473 (basic_block_simple_for_scop_p): New argument: scop.
7474 (get_loop_start): Removed.
7475 (new_scop): Initialize SCOP_LOOPS.
7476 (free_scop): Free SCOP_LOOPS.
7477 (succs_at_same_depth, preds_at_same_depth): New.
7478 (end_scop): Test the validity of a scop.
7479 (add_dominators_to_open_scops): New.
7480 (test_for_scop_bound): Call add_dominators_to_open_scops.
7481 Add cases for opening and closing multiple scops.
7482 (build_scops, build_scop_bbs): Iterate over basic blocks in
7484 (build_graphite_bb): Pass scop directly.
7485 (dfs_bb_in_scop_p): New.
7486 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7488 (nb_loops_around_gb): Use loop_in_scop_p.
7489 (schedule_to_scattering): Disabled for the moment the code computing
7490 the "textual order for outer loop".
7492 * graphite.h (struct scop): New field loops.
7494 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7496 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7498 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7499 Sebastian Pop <sebastian.pop@amd.com>
7501 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7502 * common.opt (fstreamize-loops): New.
7503 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7504 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7505 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7506 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7508 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7510 * tree-data-ref.c (build_empty_rdg): New.
7511 (build_rdg): Use it.
7512 * tree-data-ref.h (build_empty_rdg): Declared.
7513 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7514 (find_vertex_for_stmt): Removed.
7515 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7517 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7519 * tree-loop-distribution.c (generate_builtin): After cancelling the
7520 loop tree, also delete basic blocks.
7521 (rdg_flag_uses): Stop recursion when a vertex has already been
7524 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7526 * graphite.c (build_scop_alpha): Removed.
7527 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7528 and dump_dependence_graph to avoid compiler warnings.
7530 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7532 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7533 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7534 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7535 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7536 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7537 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7538 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7539 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7540 dump_dependence_graph): New.
7541 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7543 (struct scop): New field loop2cloog_loop.
7544 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7545 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7547 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7549 * graphite.c (build_graphite_bb): Fix initialization
7550 of the graphite basic block.
7552 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7554 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7555 loop domain matrix. Pass in the number of loops contained in the
7557 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7558 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7559 loops that are not surrounding the current loop are not represented
7560 in the domain constraint matrix.
7561 (build_scop_iteration_domain): Initial domain constraint matrix
7562 contains only the eq/ineq, cst, and scop parameters columns.
7564 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7566 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7567 (print_graphite_bb): Print scattering.
7569 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7571 * graphite.c (initialize_cloog_names): Initialize names of
7572 scattering variables.
7574 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7576 * graphite.c (dot_all_scops_1): Disable debug output while
7579 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7581 * graphite.c (find_transform): Change cloog output language to C.
7583 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7585 * tree-loop-distribution.c (generate_memset_zero,
7586 generate_builtin, generate_code_for_partition,
7587 rdg_flag_all_uses): New.
7588 (rdg_flag_uses): Gather in the same partition the statements defining
7589 the VUSES of the current statement.
7590 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7591 Gather in the same partition not only the stores to the same memory
7592 access, but also the reads.
7593 (ldist_generate_loops): Renamed ldist_gen.
7595 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7596 Tobias Grosser <grosser@fmi.uni-passau.de>
7598 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7599 next pointer, don't use the inner pointer.
7601 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7603 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7604 (find_transform): Call dot_all_1.
7605 * graphite.h (dot_all_scops): Declared.
7607 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7609 * tree-loop-distribution.c: Fix apsi.f ICE.
7610 (create_bb_after_loop): New.
7611 (generate_loops_for_partition): Use it.
7612 * gfortran.dg/ldist-1.f90: New.
7614 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7615 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7617 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7619 * graphite.c (find_transform): Dump cloog program sent to cloog.
7621 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7623 * graphite.c (initialize_cloog_names): Initialize cloog
7626 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7628 * graphite.c (build_scop_context): Fix typo, for the matrix
7629 format: insert '0 >= 0' instead of '-1 >= 0'.
7631 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7633 * Fix merge problems.
7635 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7637 * graphite.c (setup_cloog_loop): Fix typo.
7639 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7641 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7642 * tree-loop-distribution.c: Reimplemented.
7643 * tree-pass.h (pass_loop_distribution): New.
7644 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7646 * graphds.h (struct graph): New field indexes.
7647 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7649 * tree-vect-analyze.c: Remove declaration of static functions when not
7651 * tree-vectorizer.c: Same.
7652 (rename_variables_in_loop): Now extern.
7653 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7654 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7655 calling redirect_edge_and_branch_force.
7657 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7659 * tree-data-ref.c: Don't include tree-chrec.h.
7660 (debug_data_dependence_relations): New.
7661 (dump_data_dependence_relation): Call dump_data_reference on data refs
7663 (same_access_functions): Moved...
7664 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7665 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7666 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7667 struct rdg_vertex_info, ): New.
7668 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7670 (create_rdg_vertices): Initialize the htab of graph->indexes.
7671 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7672 (stmts_from_loop): Don't save LABEL_EXPR.
7673 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7674 hash_stmt_vertex_del): New.
7675 (build_rdg): Initialize rdg->indexes.
7676 (free_rdg, stores_from_loop, ref_base_address,
7677 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7678 have_similar_memory_accesses_1, ref_base_address_1,
7679 remove_similar_memory_refs): New.
7681 * tree-data-ref.h: Include tree-chrec.h.
7682 (debug_data_dependence_relations): Declared.
7683 (same_access_functions): ...here. Now static inline.
7684 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7685 ddr_dependence_level): New.
7686 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7687 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7688 RDG_MEM_READS_STMT): New.
7689 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7690 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7691 rdg_vertex_for_stmt): Declared.
7692 (struct rdg_edge): New field level.
7693 (RDGE_LEVEL, free_rdg): New.
7694 (stores_from_loop, remove_similar_memory_refs,
7695 rdg_defs_used_in_other_loops_p,
7696 have_similar_memory_accesses): Declared.
7697 (rdg_has_similar_memory_accesses): New.
7699 * lambda.h (dependence_level): New.
7700 * common.opt (ftree-loop-distribution): New.
7701 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7702 (print_loop_ir): Renamed print_loops.
7703 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7704 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7705 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7706 (tree-loop-distribution.o): Added.
7707 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7708 (mark_virtual_ops_in_bb): New.
7709 (print_loops_bb, debug_loop_num, debug_loop): New.
7710 * passes.c: Scheduled pass_loop_distribution.
7712 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7714 * graphite.c (scan_tree_for_params): Correct the number of columns
7716 (nb_flat_iterator): New.
7717 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7718 (build_scop_iteration_domain): Correct the number of columns for
7721 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7723 * Merge from mainline (129697:130800).
7725 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7727 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7728 dominated by SCoP's exit.
7729 (graphite_transform_loops): Compute post dominators.
7731 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7733 * Merge from mainline (127169:129697).
7735 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7737 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7738 parameter for the basic block that contains the expression. Use
7739 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7740 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7742 * graphite.h (gbb_loop): New.
7743 (GBB_LOOP): Removed.
7745 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7747 * Makefile.in: Fix merge problem.
7749 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7751 * Merge from mainline (125309:127169).
7752 * tree-loop-distribution.c: Disabled.
7754 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7756 * Merge from mainline (r123693:125309).
7758 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7760 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7762 (correct_modify_p, check_statements, number_of_lvalue_uses,
7763 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7764 instead of MODIFY_EXPR.
7765 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7768 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7770 * tree-loop-distribution.c (struct rdg): Replace arrays by
7771 VECs for edges and vertices.
7772 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7773 (RDGV_NB_PARTITIONS): New.
7774 (PRDG_NBV, PRDG_NBE): Removed.
7775 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7776 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7777 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7779 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7780 Sebastian Pop <sebpop@gmail.com>
7782 * doc/invoke.texi (-ftree-loop-distribution): Document.
7783 * tree-loop-distribution.c: New file.
7784 * tree-pass.h (pass_loop_distribution): Declared.
7785 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7786 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7788 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7789 (DDR_REVERSED_P): New.
7790 * common.opt (-ftree-loop-distribution): New.
7791 * tree-flow.h (distribute_loops): Declared.
7792 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7793 * passes.c (init_optimization_passes): Schedule loop distribution.
7795 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7797 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7798 (print_scop): Don't print when scop is NULL.
7799 (build_scop_context, find_transform): Don't output to stderr.
7801 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7803 * tree-data-ref.c: Don't include graphite.h.
7804 Comment out the code for printing data reference's scop.
7805 (build_access_matrix_with_af): Moved...
7806 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7807 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7808 (print_graphite_bb): Print basic block's schedule.
7809 (print_scop): Don't print the schedule, call cloog's pretty printer.
7810 (bb_in_scop_p): A basic block is in a scop only if it is both
7811 dominated and postdominated by the scop's entry and exit basic blocks.
7812 (function_parameter_p): New.
7813 (invariant_in_scop_p): Use function_parameter_p.
7814 (new_scop, save_scop): New.
7815 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7817 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7818 (loop_in_scop_p): New.
7819 (scop_record_loop): Use loop_in_scop_p.
7820 (build_scop_domain): Renamed build_scop_iteration_domain.
7821 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7822 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7823 setup_cloog_loop, dot_scop_1, dot_scop): New.
7824 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7825 (struct scop): Add a pointer to cloog's representation of a program.
7827 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7829 * doc/invoke.texi (-ftree-check-verbose): Renamed
7830 -ftree-checks-verbose.
7831 * common.opt (flag_tree_check_verbose): Renamed
7832 flag_tree_checks_verbose.
7833 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7835 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7837 * configure: Regenerated.
7838 * config.in: Regenerated.
7839 * tree-ssa-loop.c (graphite_transforms): Execute
7840 graphite_transform_loops only when HAVE_cloog.
7841 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7842 * graphite.c: Include polylibgmp.h and cloog.h.
7843 (graphite_transform_loops): Removed loops parameter.
7844 * tree-flow.h (graphite_transform_loops): Update declaration.
7845 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7846 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7847 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7848 (OBJS-common): Remove dependence on graphite.o.
7849 (BACKEND): Depend on @GRAPHITE@.
7851 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7853 * doc/invoke.texi (-ftree-check-verbose): Documented.
7854 * gcc.dg/tree-checker/tree-checks-1.c: New.
7855 * gcc.dg/tree-checker/tree-checks-2.c: New.
7856 * gcc.dg/tree-checker/tree-checks-3.c: New.
7857 * gcc.dg/tree-checker/tree-checks-4.c: New.
7858 * gcc.dg/tree-checker/tree-checks.exp: New.
7859 * gcc.dg/tree-checker/condates.crp: New.
7860 * common.opt (ftree-checks-verbose): New.
7861 * tree-check.c (tree_check_warning): Move extra stderr output
7862 under control of flag_tree_check_verbose.
7864 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7866 * tree-match.c: Fix comments formatting.
7867 * tree-match.h: Fix comments formatting.
7868 * tree-check.c: Fix comments formatting.
7869 (tree_check_init): Restructure.
7871 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7873 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7875 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7877 * Merge from mainline (r120733:123693).
7879 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7881 * condate.y: New file.
7882 * tree-match.h (struct patt_info_s): New field sign.
7883 (struct condate_s): New field msg.
7884 (normalize_condate, name_condate, add_condate): New.
7885 (conds[], condate_parse): Made extern.
7886 * tree-check.c (tree_check_warning): First arg changed to cond;
7887 warning reformatted.
7888 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
7890 (tree_check): Process trivial condates.
7891 (read_delimited_string): Removed.
7892 (print_cond): Print name and msg.
7893 (conds[]): Made extern.
7894 (parse_tree_check_file_once): Rewritten to use the parser in
7896 Processing of option --tree_check_string moved to tree_scan().
7897 * Makefile.in: Added condate.y
7899 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
7901 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
7902 Use VECs instead of varrays.
7903 * diagnostic.h (lazy_dump_generic_node): Update declaration.
7904 * Makefile.in (pretty-print.o): Depend on vec.h.
7905 * pretty-print.c: Include tree.h and vec.h.
7906 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
7907 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
7908 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
7909 pp_free_list): Use VECs instead of varrays.
7910 * pretty-print.h: Do not include varray.h.
7911 (struct tree_chunk_s): Declaration moved before its use.
7912 (output_buffer): Rename varray field to chunks.
7913 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
7914 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
7915 save_global_holes): Use VECs instead of varrays.
7916 * tree-match.h: Declare VECs of cfg_node, and hole_p.
7917 * tree-check.c (scan_cfg_stmts, push_node,
7918 print_matching_stmt): Removed.
7919 (tree_check_instance, push_global_holes_if_new, tree_check,
7920 execute_tree_check): Use VECs instead of varrays.
7921 (gate_tree_check): Don't execute the CFG check when basic_block_info
7924 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7926 * Merge from mainline (r115016:120733).
7928 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7930 * Merge from mainline (r117632:117661).
7932 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7934 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
7935 * tree-pass.h (TDF_DEBUG, debug_p): New.
7936 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
7937 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
7938 get_loop_exit_condition, analyze_evolution_in_loop,
7939 analyze_initial_condition, analyze_scalar_evolution,
7940 instantiate_parameters, number_of_latch_executions): Use debug_p.
7941 * tree-chrec.c (chrec_apply): Use debug_p.
7942 * tree-data-ref.c: Include graphite.h.
7943 (dump_data_reference): Print also the access matrix.
7944 (analyze_array, analyze_indirect_ref, init_data_ref,
7945 analyze_offset_expr, address_analysis, object_analysis,
7946 create_data_ref, finalize_ddr_dependent,
7947 non_affine_dependence_relation, analyze_ziv_subscript,
7948 analyze_siv_subscript_cst_affine,
7949 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
7950 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
7951 analyze_miv_subscript, analyze_overlapping_iterations,
7952 build_classic_dist_vector, subscript_dependence_tester,
7953 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
7954 (build_access_matrix_with_af): No longer static.
7955 * tree-data-ref.h (scop_p): ... declaration here.
7956 (data_reference.scop): New field.
7957 (DR_SCOP, DR_ACCESS_MATRIX): New.
7958 (build_access_matrix_with_af, dr_num_subscripts): Declared.
7959 * graphite.c (print_graphite_bb): Call dump_data_references.
7960 (print_scop): Use scop_nb_loops and scop_dim_domain.
7961 (test_for_scop_bound): Use debug_p.
7962 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
7964 (scop_loop_index): Moved...
7965 (scop_record_loop): New.
7966 (build_scop_loop_nests): Use scop_record_loop.
7967 (build_scop_domain): Use scop_dim_domain.
7968 (build_access_matrix): Implemented.
7969 (build_scop_canonical_schedules): Use scop_nb_loops.
7970 (build_graphite_bb): Initialize GBB_SCOP.
7971 * graphite.h (scop_p): Moved...
7972 (graphite_bb.scop): New field.
7973 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
7974 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
7975 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
7976 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
7977 scop_loop_index): New.
7978 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
7980 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
7982 * Merge from mainline (r117661:120450).
7984 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
7986 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
7987 at the first declaration outside the varying loop, instantiate as
7989 * tree-chrec.c (for_each_scev_op): New.
7990 * tree-chrec.h (for_each_scev_op): Declared.
7991 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
7992 * tree-data-ref.c (get_references_in_stmt,
7993 find_data_references_in_stmt): New, from trunk.
7994 (find_data_references_in_loop): Use get_references_in_stmt
7995 and find_data_references_in_loop, modified as in trunk.
7996 (build_access_matrix_with_af): New.
7997 * tree-data-ref.h (data_reference): Add a field access_matrix.
7998 (data_ref_loc): New, as in trunk.
7999 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8000 invariant_in_scop_p, param_index, scan_tree_for_params,
8001 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8002 idx_record_param, idx_record_params, build_access_matrix,
8003 build_scop_data_accesses, build_scop_canonical_schedules,
8004 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8005 build_scop_params): New.
8006 * graphite.h (graphite_bb): New.
8007 (scop): Add fields static_schedule, params, loop_nest,
8009 * lambda.h: Declare vecs of lambda_matrix.
8010 * tree-flow.h (print_loop_ir_bb): Declared.
8011 * tree-cfg.c (print_loop_ir_bb): New.
8012 (print_loop): Use print_loop_ir_bb.
8014 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8016 * Merge from mainline (r115016:117632).
8018 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8020 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8021 break due to a warning.
8023 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8025 * graphite.c (print_scops, debug_scops): New.
8026 (graphite_transform): Renamed graphite_find_transform.
8027 * graphite.h (debug_scops): Declared.
8029 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8031 * tree-match.c: Reformat following the GNU style.
8032 * tree-match.h: Reformat following the GNU style.
8033 * tree-pattern.h: Removed empty file.
8034 * Makefile.in: Remove references to tree-pattern.h.
8035 * tree-check.c: Reformat following the GNU style.
8036 (execute_tree_check): Move gate condition code to...
8037 (gate_tree_check): ...here. New function.
8038 (pass_check): Use the gate function.
8040 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8042 * tree-pattern.h: New. Tree pattern matching and checking using
8044 * tree-check.c: New. Tree/CFG checking pass.
8045 * tree-match.c: New. Library for tree pattern matching.
8046 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8047 * toplev.c, flags.h: Add globals for tree-check pass.
8048 * Makefile.in: Integrate the files in tree-check pass.
8049 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8050 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8051 Introduce a "lazy" pretty-print mode.
8052 * tree.c, tree.h: Add tree_name.
8054 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8056 * doc/invoke.texi (-fgraphite): Correct typo.
8057 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8058 use of print_loop_ir.
8059 * gcc.dg/graphite/scop-1.c: New.
8060 * gcc.dg/graphite/scop-2.c: New.
8061 * gcc.dg/graphite/graphite.exp: New.
8062 * graphite.c: Include domwalk.h.
8063 (print_scop): Print only the entry and exit blocks.
8064 (debug_scop): No longer static.
8065 (affine_expr): Fix formating. Return also true when the expression is
8067 (stmt_simple_for_scop_p): Fix formating.
8068 (build_scops): Use domwalk.
8069 (get_loop_start, end_scop, test_for_scop_bound): New.
8070 (graphite_transform_loops): Avoid printing on stderr.
8071 * graphite.h (debug_scop): Declared.
8072 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8073 * Makefile.in (graphite.o): Depend on domwalk.h.
8074 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8075 declarations for static functions.
8076 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8077 controlling output verbosity.
8079 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8080 Plesco Alexandru <shurikx@gmail.com>
8082 * doc/invoke.texi (-fgraphite): Document.
8083 * tree-pass.h (pass_graphite_transforms): Declared.
8084 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8085 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8086 (pass_graphite_transforms): Defined.
8087 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8088 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8089 * graphite.c, graphite.h: New.
8090 * common.opt (fgraphite): Declared.
8091 * tree-flow.h (graphite_transform_loops): Declared.
8092 * Makefile.in (OBJS-common): Add graphite.o.
8093 (graphite.o): New rule.
8094 * passes.c (pass_graphite_transforms): Scheduled.