1 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
3 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
5 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
7 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
8 * cfgloop.h (struct loop): Remove single_iv field.
9 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
10 (scop_canonicalize_loops): Removed.
11 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
12 over all the loop phi nodes in loop->header.
13 (build_poly_scop): Remove use of scop_canonicalize_loops.
15 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
17 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
20 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
22 * tree-chrec.c (chrec_apply): Should only apply to the specified
23 variable. Also handle multivariate chains of recurrences that
24 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
26 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
28 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
29 (debug_clast_name_indexes_1): Removed.
30 (debug_clast_name_indexes): Removed.
31 (pbb_to_depth_to_oldiv): Removed.
32 (build_iv_mapping): Replace the use of rename_map with iv_map.
33 (translate_clast_user): Remove uses of rename_map. Allocate and
35 (translate_clast_for_loop): Remove uses of rename_map.
36 (translate_clast_for): Same.
37 (translate_clast_guard): Same.
38 (translate_clast): Same.
40 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
41 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
42 * sese.c (set_rename): Now static.
43 (rename_variables_in_stmt): Removed.
45 (is_parameter): Removed.
47 (expand_scalar_variables_call): Removed.
48 (expand_scalar_variables_ssa_name): Removed.
49 (expand_scalar_variables_expr): Removed.
50 (expand_scalar_variables_stmt): Removed.
51 (expand_scalar_variables): Removed.
52 (rename_variables): Removed.
53 (remove_condition): Removed.
54 (get_true_edge_from_guard_bb): Removed.
55 (get_false_edge_from_guard_bb): Removed.
56 (struct igp): Removed.
57 (default_before_guard): Removed.
58 (convert_for_phi_arg): Removed.
59 (add_guard_exit_phis): Removed.
60 (insert_guard_phis): Removed.
61 (graphite_copy_stmts_from_block): Now also uses iv_map and a
62 region. Do not copy conditions. Do not copy induction variables.
64 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
65 the translated statement. Use the iv_map for the induction
67 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
68 (set_rename): Removed declaration.
69 (scev_analyzable_p): ...here.
70 * tree-chrec.c (chrec_apply_map): New.
71 * tree-chrec.h (chrec_apply_map): Declared.
73 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
75 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
76 insert_loop_close_phis.
77 * sese.c (name_defined_in_loop_p): Removed.
78 (expr_defined_in_loop_p): Removed.
79 (alive_after_loop): Removed.
80 (close_phi_not_yet_inserted_p): Removed.
81 (struct alep): Removed.
82 (add_loop_exit_phis): Removed.
83 (insert_loop_close_phis): Removed.
85 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
87 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
89 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
91 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
93 * gfortran.dg/graphite/id-20.f: New.
95 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
97 * graphite-cloog-util.h: Added cloog.h.
98 * graphite-blocking.c: Removed cloog.h.
99 * graphite-dependences.c: Same.
100 * graphite-interchange.c: Same.
101 * graphite-poly.c: Same.
102 * graphite-ppl.c: Same.
103 * graphite-scop-detection.c: Same.
104 * graphite-sese-to-poly.c:
106 Removed graphite-clast-to-gimple.h.
107 (check_poly_representation): Removed (unused).
108 * graphite-sese-to-poly.h
109 (check_poly_representation): Removed (unused).
111 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
114 (OBJS-common): Added graphite-cloog-util.o.
115 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
116 (graphite-cloog-util.o): New.
117 (graphite-ppl.o): Added graphite-cloog-util.h.
118 * graphite-clast-to-gimple.c:
119 Added graphite-cloog-util.h to include statements.
120 * graphite-cloog-util.c: New.
121 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
122 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
123 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
124 (new_C_Polyhedron_from_Cloog_Matrix): Same.
125 (ppl_Constrain_System_number_of_constraints): Same.
126 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
127 (oppose_constraint): Same.
128 (cloog_matrix_to_ppl_constraint): Same.
129 (new_Constraint_System_from_Cloog_Matrix): Same.
130 (insert_constraint_into_matrix): Same. Declared static.
131 * graphite-cloog-util.h: New.
132 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
133 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
134 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
135 (new_C_Polyhedron_from_Cloog_Matrix): Same.
136 (insert_constraint_into_matrix): Same.
138 Added graphite-cloog-util.h to include statements.
139 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
140 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
141 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
142 (new_C_Polyhedron_from_Cloog_Matrix): Same.
143 (insert_constraint_into_matrix): Same.
144 (ppl_Constrain_System_number_of_constraints): Same.
145 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
146 (oppose_constraint): Same.
147 (cloog_matrix_to_ppl_constraint): Same.
148 (new_Constraint_System_from_Cloog_Matrix): Same.
150 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
151 graphite-cloog-util.h.
152 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
153 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
154 (new_C_Polyhedron_from_Cloog_Matrix): Same.
155 (insert_constraint_into_matrix): Removed.
157 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
159 * graphite-clast-to-gimple.c
160 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
161 (precision_for_interval): Same.
162 (gcc_type_for_interval): Same.
163 (compute_type_for_level): Same.
164 * graphite-interchange.c
165 (lst_interchange_profitable_p): Same.
167 (psct_scattering_dim_for_loop_depth): Same.
169 (ppl_max_for_le_pointset): Same.
170 (ppl_min_for_le_pointset): Same.
172 2010-06-25 Vladimir Kargov <kargov@gmail.com>
174 * refined-regions.c (bb_index_compare): New.
175 (get_bbs_in_region): New.
176 (print_bbs_in_region): New.
177 (print_refined_region): Add an argument that allows to print
178 all basic blocks contained in regions.
179 (debug_refined_region): Update call to print_refined_region.
180 * refined-regions.h (print_refined_region): Update declaration.
181 (get_bbs_in_region): Declared.
182 * graphite-scop-detection.c (build_scops_new): Print the refined
183 region tree into the Grahite dump file.
185 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
187 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
188 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
190 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
192 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
193 rewrite_close_phi_out_of_ssa.
195 * gcc.dg/graphite/id-22.c: New.
197 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
199 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
201 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
203 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
205 * sese.c (debug_rename_map): Same.
208 (rename_variables_in_stmt): Same.
209 (expand_scalar_variables_call): Same.
210 (expand_scalar_variables_ssa_name): Same.
211 (expand_scalar_variables_expr): Same.
212 (expand_scalar_variables_stmt): Same.
213 (expand_scalar_variables): Same.
214 (rename_variables): Same.
215 (graphite_copy_stmts_from_block): Same.
216 (copy_bb_and_scalar_dependences): Same.
218 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
220 * graphite-clast-to-gimple.c (copy_renames): Removed.
221 (translate_clast_for): Do not call copy_renames.
222 (translate_clast_guard): Same.
224 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
226 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
227 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
228 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
229 before rewrite_cross_bb_scalar_deps.
231 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
233 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
234 Early return in when flag_associative_math is not set.
236 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
238 * gcc.dg/graphite/run-id-2.c: Call abort.
240 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
242 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
243 of SSA copies on edges except for loop->latch.
245 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
247 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
248 Split out of rewrite_reductions_out_of_ssa.
249 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
251 * graphite.c (graphite_transform_loops): Call it.
253 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
255 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
257 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
259 * passes.c (init_optimization_passes): Add pass_graphite.
260 Schedule a pass_copy_prop before pass_graphite_transforms.
261 * timevar.def (TV_GRAPHITE): Declared.
262 * tree-pass.h (pass_graphite): Declared.
263 * tree-ssa-loop.c (pass_graphite): New.
265 * gcc.dg/graphite/id-20.c: New.
267 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
269 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
270 Remove calls to rename_nb_iterations and rename_sese_parameters.
271 * graphite-clast-to-gimple.h (gloog): Update declaration.
272 * graphite.c (graphite_transform_loops): Update call to gloog.
273 * sese.c (rename_variables_in_expr): Removed.
274 (rename_nb_iterations): Removed.
275 (rename_sese_parameters): Removed.
276 * sese.h (rename_nb_iterations): Removed.
277 (rename_sese_parameters): Removed.
279 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
281 * graphite-clast-to-gimple.c (gloog): Remove call to
282 sese_adjust_liveout_phis.
283 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
284 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
285 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
286 rewrite_phi_out_of_ssa.
287 * sese.c (get_vdef_before_sese): Removed.
288 (sese_adjust_vphi): Removed.
289 (sese_adjust_liveout_phis): Removed.
290 * sese.h (sese_adjust_liveout_phis): Removed.
292 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
294 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
295 argument for the place after which to insert the out of SSA copy.
296 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
297 (rewrite_phi_out_of_ssa): Same.
298 (rewrite_cross_bb_scalar_deps): Same.
299 (insert_copyout): Removed.
300 (insert_copyin): Removed.
301 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
302 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
305 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
307 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
308 (rewrite_reductions_out_of_ssa): Same.
309 (rewrite_commutative_reductions_out_of_ssa): Same.
310 (build_poly_scop): Do not call these functions.
311 * graphite-sese-to-poly.h (build_poly_scop): Declared.
312 (rewrite_reductions_out_of_ssa): Declared.
313 (rewrite_commutative_reductions_out_of_ssa): Declared.
314 * graphite.c (graphite_transform_loops): Call on every scop
315 rewrite_commutative_reductions_out_of_ssa before calling
316 rewrite_reductions_out_of_ssa and build_scop_bbs.
318 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
320 * graphite-dependences.c (dot_deps): Make system call to dotty run
322 (dot_deps_stmt): Same.
323 * graphite-poly.c (dot_lst): Same.
325 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
327 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
328 old_type in parameter.
329 (gcc_type_for_value): Update call to gcc_type_for_interval.
330 (compute_type_for_level_1): Renamed compute_type_for_level.
331 Update call to gcc_type_for_interval.
333 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
335 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
336 the scev analysis when the variable is not used outside the loop
337 in a close phi node: call compute_overall_effect_of_inner_loop.
339 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
341 * graphite-sese-to-poly.c (single_pred_cond): Renamed
342 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
343 (build_sese_conditions_before): Renamed call to single_pred_cond.
344 (build_sese_conditions_after): Same.
346 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
348 * graphite-poly.h: Fix comments and indentation.
349 * graphite-sese-to-poly.c: Same.
350 (build_sese_conditions_before): Compute stmt and gbb only when needed.
351 * tree-chrec.c: Fix comments and indentation.
352 (tree-ssa-loop-niter.c): Same.
354 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
356 * refined-regions.c (create_region): Only initialize the region.
357 (find_regions_with_entry): Initialize parent relation and bbmap
359 (build_regions_tree): Set outermost_region to region instead of
361 (calculate_region_tree): Remove unneeded parameters.
363 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
365 * graphite-scop-detection.c (is_scop_p): New.
366 (build_scops_new): New. A skeleton for the new scop detection.
367 (build_scops_old): Renamed from build_scops.
368 (build_scops): New version. Call the new and the old scop
371 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
372 Antoniu Pop <antoniu.pop@gmail.com>
374 * Makefile.in (OBJS-common): Add refined-regions.o.
375 (refined-regions.o): New.
376 (graphite-scop-detection.o): Use refined-regions.h.
377 * graphite-scop-detection.c: Include refined-regions.h
378 (build_scops): Also build the refined region tree.
379 * refined-regions.c: New. Adds an algorithm to detect refined
381 (print_refined_region): New.
382 (debug_refined_region): New.
383 (refined_region_contains_bb_p): New.
384 (refined_region_contains_region_p): New.
386 (struct find_regions_global_data): New.
388 (typedef struct bb_bb_def): New.
389 (new_bb_bb_def): New.
390 (bb_bb_map_hash): New.
394 (new_bb_reg_def): New.
395 (bb_reg_map_hash): New.
396 (eq_bb_reg_map): New.
397 (find_new_region): New.
398 (insert_new_reg): New.
399 (insert_new_bb): New.
400 (insert_shortcut): New.
401 (get_next_postdom): New.
402 (create_region): New.
403 (find_regions_with_entry): New.
404 (find_regions_adc): New.
406 (get_topmost_parent): New.
407 (build_regions_tree): New.
408 (calculate_region_tree): New.
409 (free_region_tree): New.
410 * refined-regions.h: New.
411 (struct refined_region): New.
412 (calculate_region_tree): New.
413 (free_region_tree): New.
414 (refined_region_contains_bb_p): New.
415 (refined_region_contains_region_p): New.
416 (print_refined_region): New.
417 (debug_refined_region): New.
419 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
421 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
424 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
426 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
427 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
429 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
431 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
432 phi_arg_in_outermost_loop.
433 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
434 (remove_invariant_phi): Same.
436 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
438 * graphite-blocking.c
439 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
440 * graphite-clast-to-gimple.c
441 (clast_to_gcc_expression): Same.
442 (precision_for_value): Same.
443 (precision_for_interval): Same.
444 (gcc_type_for_interval): Same.
445 (graphite_create_new_guard): Same.
446 (compute_bounds_for_level): Same.
447 (graphite_create_new_loop_guard): Same.
448 * graphite-interchange.c
449 (build_linearized_memory_access): Same.
450 (pdr_stride_in_loop): Same.
451 (memory_strides_in_loop_1): Same.
452 (memory_strides_in_loop): Same.
453 (extend_scattering): Same.
454 (psct_scattering_dim_for_loop_depth): Same.
455 (pbb_number_of_iterations): Same.
457 (debug_iteration_domains): Same.
459 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
460 (ppl_set_inhomogeneous_gmp): Same.
461 (ppl_strip_loop): Same.
462 (ppl_lexico_compare_linear_expressions): Same.
463 (ppl_read_polyhedron_matrix): Same.
464 (ppl_max_for_le_pointset): Same.
466 (ppl_read_polyhedron_matrix): Same.
467 (tree_int_to_gmp): Same.
468 (gmp_cst_to_tree): Same.
469 (ppl_set_inhomogeneous): Same.
470 (ppl_set_inhomogeneous_tree): Same.
471 (ppl_set_coef): Same.
472 (ppl_set_coef_tree): Same.
473 * graphite-sese-to-poly.c
474 (build_pbb_scattering_polyhedrons): Same.
475 (build_scop_scattering): Same.
476 (scan_tree_for_params_right_scev): Same.
477 (scan_tree_for_params): Same.
478 (find_params_in_bb): Same.
479 (find_scop_parameters): Same.
480 (add_upper_bounds_from_estimated_nit): Same.
481 (build_loop_iteration_domains): Same.
482 (add_condition_to_domain): Same.
483 (pdr_add_memory_accesses): Same.
485 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
487 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
488 CLooG's value_* macros to their respective mpz_* counterparts.
489 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
490 (graphite_create_new_loop_guard): Same.
491 * graphite-interchange.c (build_linearized_memory_access): Same.
492 (pdr_stride_in_loop): Same.
493 (memory_strides_in_loop_1): Same.
494 (1st_interchange_profitable_p): Same.
495 * graphite-poly.c (extend_scattering): Same.
496 (psct_scattering_dim_for_loop_depth): Same.
497 (pbb_number_of_iterations): Same.
498 (pbb_number_of_iterations_at_time): Same.
499 * graphite-poly.h (new_1st_loop): Same.
500 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
501 (oppose_constraint): Same.
502 (insert_constraint_into_matrix): Same.
503 (ppl_set_inhomogeneous_gmp): Same.
504 (ppl_set_coef_gmp): Same.
505 (ppl_strip_loop): Same.
506 (ppl_lexico_compare_linear_expressions): Same.
507 (ppl_max_for_le_pointset): Same.
508 (ppl_min_for_le_pointset): Same.
509 (ppl_build_realtion): Same.
510 * graphite-ppl.h (gmp_cst_to_tree): Same.
511 (ppl_set_inhomogeneous): Same.
512 (ppl_set_inhomogeneous_tree): Same.
513 (ppl_set_coef): Same.
514 (ppl_set_coef_tree): Same.
515 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
516 (build_scop_scattering): Same.
517 (add_value_to_dim): Same.
518 (scan_tree_for_params_right_scev): Same.
519 (scan_tree_for_params_int): Same.
520 (scan_tree_for_params): Same.
521 (find_params_in_bb): Same.
522 (find_scop_parameters): Same.
523 (add_upper_bounds_from_estimated_nit): Same.
524 (build_loop_iteration_domains): Same.
525 (create_linear_expr_from_tree): Same.
526 (add_condition_to_domain): Same.
527 (pdr_add_memory_accesses): Same.
529 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
532 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
533 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
534 When converting an unsigned type to signed, double its precision.
535 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
536 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
537 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
539 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
542 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
543 build_nonstandard_integer_type.
544 (gcc_type_for_interval): Same.
546 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
549 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
550 POINTER_PLUS_EXPR for pointer types.
552 * gcc.dg/graphite/id-19.c: New.
554 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
557 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
558 * graphite-clast-to-gimple.c: Include langhooks.h.
559 (max_signed_precision_type): New.
560 (max_precision_type): Takes two types as arguments.
561 (precision_for_value): New.
562 (precision_for_interval): New.
563 (gcc_type_for_interval): New.
564 (gcc_type_for_value): New.
565 (gcc_type_for_clast_term): New.
566 (gcc_type_for_clast_red): New.
567 (gcc_type_for_clast_bin): New.
568 (gcc_type_for_clast_expr): Split up into several functions.
569 (gcc_type_for_clast_eq): Rewritten.
570 (compute_bounds_for_level): New.
571 (compute_type_for_level_1): New.
572 (compute_type_for_level): New.
573 (gcc_type_for_cloog_iv): Removed.
574 (gcc_type_for_iv_of_clast_loop): Rewritten.
575 (graphite_create_new_loop): Compute the lower and upper bound types
576 with gcc_type_for_clast_expr.
577 (graphite_create_new_loop_guard): Same.
578 (find_cloog_iv_in_expr): Removed.
579 (compute_cloog_iv_types_1): Removed.
580 (compute_cloog_iv_types): Removed.
581 (gloog): Do not call compute_cloog_iv_types.
582 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
584 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
585 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
586 (GBB_CLOOG_IV_TYPES): Removed.
588 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
590 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
592 Reverted this commit: as at this point the loop closed SSA form
593 is under a canonical form respecting the single argument condition.
594 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
595 close phi nodes may have more than one argument.
597 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
599 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
600 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
601 (detect_commutative_reduction): Same.
603 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
605 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
606 close phi nodes may have more than one argument.
608 2010-03-30 Richard Guenther <rguenther@suse.de>
609 Zdenek Dvorak <ook@ucw.cz>
610 Sebastian Pop <sebastian.pop@amd.com>
613 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
614 with multiple arguments.
615 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
617 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
619 * graphite-dependences.c (print_pddr): Call print_pdr with an
621 * graphite-poly.c (debug_pdr): Add an extra argument for the
624 (print_pbb_domain): Same.
626 (print_scop_context): Same.
629 (debug_pbb_domain): Same.
633 (debug_scop_context): Same.
636 (print_scop_params): Same.
637 (debug_scop_params): Same.
638 (print_iteration_domain): Same.
639 (print_iteration_domains): Same.
640 (debug_iteration_domain): Same.
641 (debug_iteration_domains): Same.
642 (print_scattering_function): Same.
643 (print_scattering_functions): Same.
644 (debug_scattering_function): Same.
645 (debug_scattering_functions): Same.
646 * graphite-poly.h (debug_pdr): Update declaration.
648 (print_pbb_domain): Same.
650 (print_scop_context): Same.
653 (debug_pbb_domain): Same.
657 (debug_scop_context): Same.
660 (print_scop_params): Same.
661 (debug_scop_params): Same.
662 (print_iteration_domain): Same.
663 (print_iteration_domains): Same.
664 (debug_iteration_domain): Same.
665 (debug_iteration_domains): Same.
666 (print_scattering_function): Same.
667 (print_scattering_functions): Same.
668 (debug_scattering_function): Same.
669 (debug_scattering_functions): Same.
671 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
673 * graphite-poly.c (print_scattering_function_1): New.
674 (print_scattering_function): Call it.
675 (print_scop_params): Remove spaces at the end of lines.
678 * graphite-poly.h (print_cloog): Declared.
679 (debug_cloog): Declared.
681 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
683 * tree-ssa-copy.c: Revert this previous change:
684 (init_copy_prop): Loop closed phi nodes cancontain more than one
686 (execute_copy_prop): Revert the previous change: do not call
687 rewrite_into_loop_closed_ssa.
689 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
690 Richard Guenther <rguenther@suse.de>
693 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
694 contain more than one argument.
695 (execute_copy_prop): Revert the previous change: do not call
696 rewrite_into_loop_closed_ssa.
698 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
699 * gcc.dg/graphite/id-pr43464-1.c: New.
701 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
704 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
705 and verify_loop_closed_ssa when copy prop is executed in the LNO.
707 * gcc.dg/graphite/id-pr43464.c: New.
709 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
711 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
713 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
714 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
715 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
716 to switch between adding the IV bump in loop->latch or in loop->header.
718 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
720 * passes.c (init_optimization_passes): Add pass_copy_prop
723 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
725 * graphite-poly.c (print_scattering_function): Pretty print following
728 (print_pbb_domain): Same.
729 (dump_gbb_cases): Same.
730 (dump_gbb_conditions): Same.
733 (print_scop_params): Same.
734 (print_scop_context): Same.
736 (print_pbb_body): New.
737 (lst_indent_to): New.
738 (print_lst): Start new lines with a #.
739 * graphite-poly.h (pbb_bb): New.
740 (pbb_index): Use pbb_bb.
741 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
743 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
745 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
748 * gcc.dg/graphite/id-pr43351.c
750 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
753 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
754 call insert_out_of_ssa_copy for default definitions.
755 * gfortran.dg/graphite/id-pr43354.f: New.
757 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
760 * gfortran.dg/graphite/pr43349.f: New.
762 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
764 * graphite-clast-to-gimple.c (my_long_long): Defined.
765 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
766 * graphite-sese-to-poly.c (my_long_long): Defined.
767 (scop_ivs_can_be_represented): Use it.
769 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
771 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
772 graphite-max-bbs-per-function, and loop-block-tile-size.
773 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
775 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
777 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
779 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
781 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
782 (add_upper_bounds_from_estimated_nit): New.
783 (build_loop_iteration_domains): Use it.
785 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
787 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
789 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
792 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
793 should be an INTEGER_CST. Also handle CASE_CONVERT.
794 * gcc.dg/graphite/pr43306.c: New.
796 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
798 * graphite.c (graphite_initialize): To bound the number of bbs per
799 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
800 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
801 * doc/invoke.texi: Document it.
803 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
805 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
806 * graphite-sese-to-poly.h (build_poly_scop): Same.
808 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
810 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
811 the number of parameters in the scop. Use as an upper bound
812 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
813 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
814 * doc/invoke.texi: Document it.
816 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
818 * graphite-sese-to-poly.c (add_param_constraints): Use
819 lower_bound_in_type and upper_bound_in_type.
821 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
823 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
824 instead of unsigned_type_node.
826 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
827 Reza Yazdani <reza.yazdani@amd.com>
830 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
831 on pointer type parameters.
833 * gcc.dg/graphite/run-id-4.c: New.
835 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
838 * gcc.dg/graphite/run-id-3.c: New.
840 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
841 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
843 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
844 handle conversions from pointer to integers.
845 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
846 induction variable, to be able to work with code generated by CLooG.
847 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
848 (build_poly_scop): Bail out if we cannot codegen a loop.
850 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
852 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
853 code generation with gloog_error.
855 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
857 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
858 Call fold_convert on all the returned values.
859 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
860 the type of the resulting expression.
862 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
864 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
865 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
866 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
868 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
870 * graphite-dependences.c (map_into_dep_poly): Removed.
871 (dependence_polyhedron_1): Use combine_context_id_scat.
873 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
875 * graphite-poly.h (struct poly_scattering): Add layout documentation.
876 (struct poly_bb): Same.
877 (combine_context_id_scat): New.
879 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
882 * sese.c (name_defined_in_loop_p): Return false for default
885 * gcc.dg/graphite/pr42326.c: New.
887 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
889 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
890 and clean up the logic.
892 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
894 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
897 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
900 * graphite-scop-detection.c (create_single_exit_edge): Move
901 the call to find_single_exit_edge to....
902 (create_sese_edges): ...here. Don't handle multiple edges
903 exiting the function.
904 (build_graphite_scops): Don't handle multiple edges
905 exiting the function.
907 * gcc.dg/graphite/pr43083.c: New.
909 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
912 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
913 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
915 * gfortran.dg/graphite/pr43097.f: New.
917 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
918 Manuel López-Ibáñez <manu@gcc.gnu.org>
921 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
923 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
926 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
928 * g++.dg/graphite/pr43026.C: New.
930 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
932 * Merge from mainline (154736:156693).
934 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
937 * gcc.dg/graphite/pr43012.c: New.
939 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
941 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
942 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
944 * g++.dg/graphite/pr42930.C: New.
946 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
949 * graphite-scop-detection.c (graphite_can_represent_scev): Call
950 graphite_can_represent_init for MULT_EXPR.
952 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
956 * graphite-sese-to-poly.c (remove_phi): New.
957 (translate_scalar_reduction_to_array): Call remove_phi.
959 * gcc.dg/graphite/pr42530.c: New.
960 * gcc.dg/graphite/pr42914.c: New.
962 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
965 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
966 * graphite-clast-to-gimple.h (gloog): Update declaration.
967 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
968 * graphite-poly.h (struct poly_bb): Add missing comments.
969 (struct scop): Add poly_scop_p field.
971 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
972 * graphite.c (graphite_transform_loops): Build the polyhedral
973 representation for each scop before code generation.
974 * sese.c (rename_variables_in_operand): Removed.
975 (rename_variables_in_expr): Return the renamed expression.
976 (rename_sese_parameters): New.
977 * sese.h (rename_sese_parameters): Declared.
979 * gcc.dg/graphite/pr42771.c: New.
981 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
983 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
985 * gcc.dg/graphite/block-1.c: Same.
986 * gcc.dg/graphite/block-3.c: Same.
987 * gcc.dg/graphite/block-4.c: Same.
988 * gcc.dg/graphite/block-5.c: Same.
989 * gcc.dg/graphite/block-6.c: Same.
990 * gcc.dg/graphite/block-7.c: Same.
991 * gcc.dg/graphite/interchange-0.c: Same.
992 * gcc.dg/graphite/interchange-1.c: Same.
993 * gcc.dg/graphite/interchange-10.c: Same.
994 * gcc.dg/graphite/interchange-11.c: Same.
995 * gcc.dg/graphite/interchange-12.c: Same.
996 * gcc.dg/graphite/interchange-2.c: Same.
997 * gcc.dg/graphite/interchange-3.c: Same.
998 * gcc.dg/graphite/interchange-4.c: Same.
999 * gcc.dg/graphite/interchange-5.c: Same.
1000 * gcc.dg/graphite/interchange-6.c: Same.
1001 * gcc.dg/graphite/interchange-7.c: Same.
1002 * gcc.dg/graphite/interchange-8.c: Same.
1003 * gcc.dg/graphite/interchange-9.c: Same.
1004 * gcc.dg/graphite/interchange-mvt.c: Same.
1006 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1008 * gfortran.dg/graphite/id-19.f: New.
1009 * gfortran.dg/graphite/pr14741.f90: New.
1010 * gfortran.dg/graphite/pr41924.f90: New.
1011 * gfortran.dg/graphite/run-id-2.f90: New.
1013 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1016 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1017 to unknown_dependence.
1018 (graphite_legal_transform_dr): Handle the unknown_dependence.
1019 (graphite_carried_dependence_level_k): Same.
1021 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1023 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1025 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1026 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1029 * graphite-dependences.c (build_lexicographical_constraint): Return
1030 a union of dependence polyhedra.
1031 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1033 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1034 * gcc.dg/graphite/block-4.c: Same.
1035 * gcc.dg/graphite/block-7.c: Same.
1036 * gcc.dg/graphite/interchange-12.c: Same.
1037 * gcc.dg/graphite/interchange-mvt.c: Same.
1038 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1039 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1040 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1042 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1044 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1045 the execution check to FAIL. This testcase is miscompiled by Graphite
1046 and the check should be re-enabled.
1047 * gcc.dg/graphite/interchange-mvt.c: Same.
1048 * gcc.dg/graphite/block-0.c: Same.
1049 * gcc.dg/graphite/block-4.c: Same.
1050 * gcc.dg/graphite/block-7.c: Same.
1052 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1054 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1055 * gcc.dg/graphite/scop-0.c: Fix spaces.
1056 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1057 * gfortran.dg/graphite/block-2.f: Same.
1058 * gfortran.dg/graphite/block-3.f90: Same.
1059 * gfortran.dg/graphite/block-4.f90: Same.
1060 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1061 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1063 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1065 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1066 PDDR_ORIGINAL_SCATTERING_P.
1067 (pddr_is_empty): Rewritten.
1068 (print_dependence_polyhedron_layout): New.
1071 (build_alias_set_powerset): Moved up.
1072 (poly_drs_may_alias_p): Moved up.
1073 (lexicographically_gt_p): Removed.
1074 (build_lexicographically_gt_constraint): Renamed
1075 build_lexicographical_constraint, reimplemented.
1076 (dependence_polyhedron_1): Simplified parameters.
1077 (dependence_polyhedron): Same. Keep along empty PDDRs
1078 to make efficient use of the cache.
1079 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1080 (graphite_legal_transform_dr): Rewritten.
1081 (graphite_legal_transform_bb): Pass fewer arguments to
1082 graphite_legal_transform_dr.
1083 (graphite_carried_dependence_level_k): Simplified implementation.
1084 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1085 (dot_transformed_deps_stmt_1): Same.
1086 (dot_original_deps): Same.
1087 (dot_transformed_deps): Same.
1088 * graphite-dependences.h (struct poly_ddr): Added a new field
1089 original_scattering_p.
1090 (PDDR_ORIGINAL_SCATTERING_P): New.
1091 (print_pddr): Declared.
1092 (debug_pddr): Declared.
1093 * graphite-ppl.c: Clarify comment.
1094 * sese.h (print_gimple_bb): Removed unused declaration.
1097 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1099 * g++.dg/graphite/graphite.exp: Rewritten.
1100 * gcc.dg/graphite/graphite.exp: Rewritten.
1101 * gfortran.dg/graphite/graphite.exp: Rewritten.
1102 * gcc.dg/graphite/block-0.c: Added runtime test.
1103 * gcc.dg/graphite/block-1.c: Same.
1104 * gcc.dg/graphite/block-3.c: Same.
1105 * gcc.dg/graphite/block-4.c: Same.
1106 * gcc.dg/graphite/block-5.c: Same.
1107 * gcc.dg/graphite/block-6.c: Same.
1108 * gcc.dg/graphite/block-7.c: Same.
1109 * gcc.dg/graphite/interchange-0.c: Same.
1110 * gcc.dg/graphite/interchange-1.c: Same.
1111 * gcc.dg/graphite/interchange-10.c: Same.
1112 * gcc.dg/graphite/interchange-11.c: Same.
1113 * gcc.dg/graphite/interchange-12.c: Same.
1114 * gcc.dg/graphite/interchange-2.c: Same.
1115 * gcc.dg/graphite/interchange-3.c: Same.
1116 * gcc.dg/graphite/interchange-4.c: Same.
1117 * gcc.dg/graphite/interchange-5.c: Same.
1118 * gcc.dg/graphite/interchange-6.c: Same.
1119 * gcc.dg/graphite/interchange-7.c: Same.
1120 * gcc.dg/graphite/interchange-8.c: Same.
1121 * gcc.dg/graphite/interchange-9.c: Same.
1122 * gcc.dg/graphite/interchange-mvt.c: Same.
1123 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1125 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1127 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1130 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1132 * common.opt: Add -fgraphite-cloog-opts.
1133 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1134 * opts.c (decode_options): Same.
1136 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1138 * gcc.dg/graphite/id-17.c: New.
1139 * gcc.dg/graphite/pr41888.c: New.
1140 * gcc.dg/graphite/scop-22.c: New.
1141 * gfortran.dg/graphite/pr40982.f90: New.
1143 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1145 * graphite-dependences.c: Clarify comments.
1146 (build_pddr): Add an extra parameter direction.
1147 (graphite_legal_transform_dr): Use build_pddr.
1148 (dot_original_deps_stmt_1): Update use of build_pddr.
1149 (dot_transformed_deps_stmt_1): Same.
1150 (dot_original_deps): Same.
1151 (dot_transformed_deps): Same.
1153 * gcc.dg/graphite/interchange-12.c: New.
1154 * gcc.dg/graphite/block-7.c: New.
1156 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1158 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1159 (pddr_transformed_scattering): Removed.
1160 (graphite_legal_transform_dr): Use build_pddr.
1161 (dot_original_deps_stmt_1): Same.
1162 (dot_transformed_deps_stmt_1): Same.
1163 (dot_original_deps): Same.
1164 (dot_transformed_deps): Same.
1166 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1168 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1169 (build_lexicographically_gt_constraint): Same.
1170 (dependence_polyhedron_1): Same.
1171 (dependence_polyhedron): Same.
1173 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1175 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1176 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1177 (lexicographically_gt_p): Change type of direction to int.
1178 (build_lexicographically_gt_constraint): Same.
1179 (dependence_polyhedron_1): Same.
1180 (dependence_polyhedron): Same.
1181 (pddr_original_scattering): Use integers for direction.
1182 (pddr_transformed_scattering): Same.
1183 (graphite_legal_transform_dr): Same.
1184 (graphite_carried_dependence_level_k): Same.
1186 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1188 * graphite-dependences.c (build_pairwise_constraint): Renamed
1189 ppl_build_relation. Moved...
1190 (dr_equality_constraints): Use ppl_build_relation.
1191 (build_pairwise_scheduling_equality): Same.
1192 (build_pairwise_scheduling_inequality): Same.
1193 * graphite-ppl.c (ppl_build_relation): ...here.
1194 * graphite-ppl.h (ppl_build_relation): Declared.
1196 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1199 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1200 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1201 Set gloog_error when such an expression failed to be built.
1202 (translate_clast): Early return when gloog_error is set.
1203 (gloog): Clear gloog_error. When gloog_error is set, call
1204 set_ifsese_condition to enable the original code. Return the status
1205 of the code generation based on gloog_error.
1206 * sese.c (set_ifsese_condition): New.
1207 * sese.h (set_ifsese_condition): Declared.
1209 * g++.dg/graphite/pr42681.C: New.
1211 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1214 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1215 rename_nb_iterations.
1216 * sese.c (rename_variables_in_operand): New.
1217 (rename_variables_in_expr): New.
1218 (rename_nb_iterations): New.
1219 (sese_adjust_liveout_phis): Update the rename_map.
1220 * sese.h (rename_nb_iterations): Declared.
1221 * tree-scalar-evolution.c (scev_reset_htab): New.
1222 (scev_reset): Call scev_reset_htab.
1223 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1225 * gfortran.dg/graphite/pr42732.f: New.
1227 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1230 * graphite-clast-to-gimple.c: Fix formatting.
1231 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1232 (expr_defined_in_loop_p): New.
1233 (add_loop_exit_phis): Also handle full expressions: remove from
1234 the rename_map the expressions defined in the loop that we're closing.
1236 * gfortran.dg/graphite/pr42393-1.f90: New.
1237 * gfortran.dg/graphite/pr42393.f90: Add new flags
1238 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1239 make this testcase useful in the Graphite branch.
1241 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1243 * graphite-scop-detection.c (exclude_component_ref): Removed.
1244 (is_simple_operand): Removed.
1245 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1247 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1250 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1251 the array indexing of ADDR_EXPRs.
1253 * gcc.dg/graphite/pr42221.c: New.
1255 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1258 * graphite.c (graphite_finalize): Call scev_reset.
1259 (graphite_transform_loops): Do not call scev_reset between the code
1260 generation of scops.
1262 * gcc.dg/graphite/pr42521.c: New.
1264 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1266 * graphite-interchange.c (memory_stride_in_loop): Renamed
1268 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1269 (memory_strides_in_loop): Memoize the memory strides per loop.
1270 (lst_interchange_profitable_p): Do not initialize to zero the memory
1272 * graphite-poly.h (struct lst): Add a field memory_strides.
1273 (LST_LOOP_MEMORY_STRIDES): New.
1274 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1275 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1277 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1279 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1280 memory_strides_in_loop. Gather memory strides on a whole loop.
1281 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1282 (lst_interchange_profitable_p): Removed.
1283 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1285 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1287 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1288 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1289 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1290 Remove context_loop and level.
1292 2010-01-07 Richard Guenther <rguenther@suse.de>
1294 PR tree-optimization/42641
1295 * sese.c (rename_map_elt_info): Use the SSA name version, do
1298 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1300 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1301 blocked" only when both the strip mine and the interchange have
1304 * gcc.dg/graphite/block-2.c: Removed.
1305 * gcc.dg/graphite/block-3.c: Add scan pattern.
1306 * gcc.dg/graphite/block-4.c: Same.
1307 * gcc.dg/graphite/block-5.c: Same.
1308 * gcc.dg/graphite/block-6.c: Same.
1310 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1312 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1313 before allocating a new one.
1314 (copy_renames): Check that slot is not NULL.
1315 (mark_bb_with_pbb): Same.
1316 (compute_cloog_iv_types_1): Same.
1317 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1318 nest, and after LSTs.
1319 (lst_try_interchange_loops): Same.
1321 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1324 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1325 the before, nest, and after LSTs.
1326 (lst_try_interchange): Removed.
1327 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1329 (lst_interchange_select_outer): Apply interchange on the outer loop
1330 until there are no more changes in the inner loops.
1332 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1334 Revert patch fixing PR middle-end/42221.
1336 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1339 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1342 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1344 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1347 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1348 that contain only one statement.
1350 * gfortran.dg/graphite/pr42180.f90: New.
1352 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1355 * gfortran.dg/graphite/pr42393.f90: New.
1357 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1360 * gfortran.dg/graphite/pr42186.f90: New.
1362 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1365 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1366 Insert the reduction copy in the same block as the phi node.
1367 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1369 * gcc.dg/graphite/pr42205-1.c: New.
1370 * gcc.dg/graphite/pr42205-2.c: New.
1372 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1375 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1376 the array indexing of ADDR_EXPRs.
1378 * gcc.dg/graphite/pr42221.c: New.
1380 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1384 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1385 index. Call lst_interchange_select_inner only once.
1386 (lst_interchange_select_inner): Update use of lst_try_interchange.
1387 (lst_interchange_select_outer): Update.
1389 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1393 * graphite-interchange.c (lst_try_interchange): Do not increment the
1394 the OUTER index when there is no AFTER kernel. Do not increment the
1395 OUTER index for after processing the AFTER kernel.
1396 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1397 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1398 index. Do not pass to lst_interchange_select_inner the OUTER index.
1399 (scop_do_interchange): Update use of lst_interchange_select_outer.
1401 * gfortran.dg/graphite/graphite.exp
1402 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1403 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1404 the graphite dump file.
1405 * gfortran.dg/graphite/interchange-2.f: Same.
1406 * gfortran.dg/graphite/pr42334-1.f: New.
1408 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1412 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1414 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1415 (lst_try_interchange): Reimplemented.
1416 (lst_interchange_select_inner): Same.
1417 (lst_do_interchange): Renamed lst_interchange_select_outer.
1419 (scop_do_interchange): Update use of lst_interchange_select_outer.
1421 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1422 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1423 * gcc.dg/graphite/pr42211.c: New.
1424 * gfortran.dg/graphite/pr42334.f90: New.
1426 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1429 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1430 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1432 * gfortran.dg/graphite/pr42181.f90: New.
1434 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1437 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1438 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1439 (detect_commutative_reduction_arg): Simplified.
1440 (detect_commutative_reduction): Early return when the argument of
1441 the close phi is not of an SSA_NAME.
1443 * gcc.dg/graphite/pr42284.c: New.
1445 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1447 * dbgcnt.def (graphite_scop): New counter.
1448 * graphite.c: Include dbgcnt.h
1449 (graphite_transform_loops): Use new counter to limit transformations.
1451 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1454 * graphite-scop-detection.c (graphite_can_represent_init): Also
1455 handle more complex MULT_EXPRs containing parameters by recursion
1458 * gfortran.dg/graphite/pr42285.f90: New.
1460 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1462 * g++.dg/graphite/pr42130.C: Fix type.
1464 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1466 * g++.dg/graphite/pr42130.C: Correct testcase.
1468 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1470 * Merge from mainline (154493:154734).
1472 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1474 * Merge from mainline (151362:154491).
1476 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1478 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1479 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1481 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1484 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1485 translate_clast_for_loop): New.
1486 (translate_clast_for): Add a condition around the loop, to do not
1487 execute loops with zero iterations.
1488 * g++.dg/graphite/pr42130.C: New.
1489 * gcc.dg/graphite/pr35356-2.c: Adapt.
1491 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1493 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1494 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1495 Remove context_loop and level.
1497 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1499 * graphite-clast-to-gimple.c (translate_clast_user,
1500 translate_clast_for, translate_clast_guard): Simplify and move common
1501 elements to translate_clast().
1502 (translate_clast): Simplify and get common elements.
1504 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1506 * graphite-clast-to-gimple.c (translate_clast_user,
1507 translate_clast_for, translate_clast_guard): Split out of
1510 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1512 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1513 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1514 debug_clast_name_indexes_1, debug_clast_name_indexes,
1515 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1516 (clast_name_to_gcc, clast_to_gcc_expression,
1517 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1518 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1519 graphite_create_guard_cond_expr, graphite_create_new_loop,
1520 translate_clast): Add params_index.
1521 (initialize_cloog_names): Create parameter strings from scratch, do
1522 not reference other strings.
1523 (create_params_index): New.
1524 (gloog): Initialize params_index.
1525 * graphite-scop-detection (free_scops_1): Removed.
1526 (limit_scops): Use normal free_scops.
1527 * graphite-sese-to-poly.c (save_var_names): Removed.
1528 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1529 and SESE_PARAMS_INDEX.
1530 * sese.c (new_sese, free_sese): Dito.
1531 * sese.h (struct sese): Remove params_index, params_names.
1532 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1534 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1536 Revert the following patch from 2009-09-14:
1537 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1538 tree-scalar-evolution.h, and then tree-data-ref.h.
1539 * graphite-clast-to-gimple.c: Same.
1540 * graphite-dependences.c: Same.
1541 * graphite-interchange.c: Same.
1542 * graphite-poly.c: Same.
1543 * graphite-scop-detection.c: Same.
1544 * graphite-sese-to-poly.c: Same.
1546 * lambda-code.c: Same.
1547 * matrix-reorg.c: Same.
1548 * tree-data-ref.c: Same.
1549 * tree-if-conv.c: Same.
1550 * tree-loop-distribu: Same.: Same.
1551 * tree-loop-linear.c: Same.
1552 * tree-parloops.c: Same.
1553 * tree-predcom.c: Same.
1554 * tree-vect-patterns.c: Same.
1556 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1558 Revert patch from 2009-09-14.
1559 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1560 passes at -O1 and below.
1562 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1565 * gcc.dg/graphite/pr40281.c: New.
1567 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1568 evolutions should not variate in inner loops.
1570 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1573 * gfortran.dg/graphite/pr42050.f90: New.
1575 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1577 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1578 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1580 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1582 * graphite-blocking.c (scop_do_block): New.
1583 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1584 * graphite-poly.h (scop_do_block): Declared.
1586 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1588 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1589 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1590 to transform depth into the time_depth before calling
1591 pbb_number_of_iterations_at_time.
1592 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1595 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1597 Reverted the patch for "scattering permutations" from 2009-10-28.
1599 * graphite-poly.c (print_permutation): New.
1600 (debug_permutation): New.
1601 (new_poly_bb): Initialize PBB_PERMUTATION.
1602 (free_poly_bb): Free PBB_PERMUTATION.
1603 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1604 (struct pbb_permutation_elt): New.
1605 (PBB_PERMUTATION_ELT_STRIDE): New.
1606 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1607 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1608 (new_pbb_permutation_elt): New.
1609 (pbb_permutation_elt_free): New.
1610 (struct poly_bb): Add field permutation.
1611 (PBB_PERMUTATION): New.
1612 (print_permutation): Declared.
1613 (debug_permutation): Declared.
1615 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1617 * graphite-interchange.c (build_partial_difference): New.
1618 (memory_stride_in_loop): Refactored the computation of
1619 equality constraints into build_partial_difference function.
1620 Added support for debugging stride computations.
1622 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1624 * graphite-clast-to-gimple.c (gloog): Free if_region,
1625 if_region->true_region, and if_region->region.
1626 * sese.c (if_region_set_false_region): Free if_region->false_region.
1627 (create_if_region_on_edge): Do not use GGC_NEW.
1628 (move_sese_in_condition): Remove useless initialization.
1630 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1632 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1633 for the loops created by the loop distribution. Do not modify the
1635 (lst_try_interchange_loops): Same. Use a temporary LST for the
1636 transformed schedule. Call lst_update_scattering before data
1637 dependence analysis.
1638 (lst_try_interchange): Pass an extra parameter INDEX.
1639 (lst_do_interchange_1): New.
1640 (lst_do_interchange): Call lst_do_interchange_1.
1641 (scop_do_interchange): Call lst_update_scattering.
1642 * graphite-poly.c (apply_poly_transforms): Do not call
1643 lst_update_scattering.
1644 * graphite-poly.h (lst_pred): New.
1646 (lst_find_first_pbb): Return NULL when not found.
1648 (lst_insert_in_sequence): Allow LST1 to be NULL.
1650 (lst_substitute_3): New.
1651 * gcc.dg/graphite/interchange-1.c: XFail.
1652 * gcc.dg/graphite/interchange-8.c: XFail.
1653 * gcc.dg/graphite/interchange-11.c: XFail.
1655 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1657 * graphite-interchange.c (lst_perfectly_nested_p): New.
1658 (lst_perfect_nestify): New.
1659 (lst_try_interchange_loops): Call store_lst_schedule,
1660 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1661 (scop_do_interchange): Avoid redundant legality test.
1662 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1663 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1664 * graphite-poly.h (psct_static_dim): New.
1665 (lst_dewey_number_at_depth): New.
1666 (lst_find_pbb): Restructured.
1667 (lst_find_first_pbb): Restructured.
1668 (lst_find_last_pbb): New.
1669 (lst_contains_p): New.
1670 (lst_contains_pbb): New.
1671 (lst_create_nest): New.
1672 (lst_remove_from_sequence): New.
1673 (pbb_update_scattering): New.
1674 (lst_update_scattering_under): New.
1675 (lst_update_scattering_seq): New.
1676 (lst_update_scattering): New.
1677 (lst_insert_in_sequence): New.
1678 (lst_distribute_lst): New.
1679 (lst_remove_all_before_including_pbb): New.
1680 (lst_remove_all_before_excluding_pbb): New.
1682 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1684 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1685 get_loop_exit_edges.
1687 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1689 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1691 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1693 * graphite-poly.c (print_permutation): New.
1694 (debug_permutation): New.
1695 (new_poly_bb): Initialize PBB_PERMUTATION.
1696 (free_poly_bb): Free PBB_PERMUTATION.
1697 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1698 (struct pbb_permutation_elt): New.
1699 (PBB_PERMUTATION_ELT_STRIDE): New.
1700 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1701 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1702 (new_pbb_permutation_elt): New.
1703 (pbb_permutation_elt_free): New.
1704 (struct poly_bb): Add field permutation.
1705 (PBB_PERMUTATION): New.
1706 (print_permutation): Declared.
1707 (debug_permutation): Declared.
1709 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1711 * graphite-clast-to-gimple.c (gloog): Do not call
1712 sese_reset_aux_in_loops.
1713 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
1714 extra argument for domains. Do not use loop->aux.
1715 (build_scop_iteration_domain): Initialize and free domains, pass it
1716 to build_loop_iteration_domains and extract the information from
1717 domains. Do not use loop->aux.
1718 * sese.c (sese_reset_aux_in_loops): Removed.
1719 * sese.h (sese_reset_aux_in_loops): Removed.
1721 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1723 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
1724 (dependency_in_loop_p): Same.
1725 (translate_clast): Do not use loop->aux. Initialize
1726 loop->can_be_parallel.
1727 (mark_loops_parallel): Removed.
1728 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
1729 * graphite.c (free_aux_in_new_loops): Removed.
1730 (graphite_finalize): Do not call free_aux_in_new_loops.
1731 (graphite_transform_loops): Do not call mark_loops_parallel.
1733 2009-10-26 Li Feng <nemokingdom@gmail.com>
1735 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
1736 (translate_clast): Pass an extra parameter LEVEL.
1737 Call get_scattering_level.
1738 * graphite-clast-to-gimple.h (get_scattering_level): New.
1740 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1742 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
1743 * cfgloop.h (struct loop): New field single_iv.
1745 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
1746 loop->aux anymore: use loop->single_iv.
1747 (graphite_loop_normal_form): Moved...
1748 (build_graphite_loop_normal_form): Removed.
1749 (gloog): Do not call build_graphite_loop_normal_form.
1750 (free_aux_in_new_loops): Moved...
1751 (mark_loops_parallel): Restructure.
1752 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
1753 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
1754 (scop_canonicalize_loops): New.
1755 (build_poly_scop): Call scop_canonicalize_loops.
1756 * graphite.c (free_aux_in_new_loops): ...here.
1758 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1760 * g++.dg/graphite/graphite.exp: Add the same rules as in
1761 gcc.dg/graphite/graphite.exp.
1763 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1765 * g++.dg/graphite/id-1.C: New.
1767 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1769 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
1771 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
1772 (rewrite_phi_out_of_ssa): Same.
1773 (rewrite_cross_bb_scalar_deps): Same.
1774 (translate_scalar_reduction_to_array): Same.
1776 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1778 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
1781 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1783 * graphite-sese-to-poly.c (dump_alias_graphs): New.
1784 (build_scop_drs): Call dump_alias_graphs.
1786 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1788 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
1789 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1790 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
1791 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1792 * graphite-poly.h (free_lst): New.
1793 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
1794 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
1796 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1798 * graphite-poly.h (struct scop): Add a field saved_schedule.
1799 (SCOP_SAVED_SCHEDULE): New.
1800 (store_lst_schedule): New.
1801 (restore_lst_schedule): New.
1802 (store_scattering): Call store_lst_schedule.
1803 (restore_scattering): Call restore_lst_schedule.
1805 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1807 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
1808 (pdr_add_alias_set): Same.
1809 (build_poly_dr): Same.
1810 (build_alias_set_optimal_p): Same.
1811 (build_base_obj_set_for_drs): Same. Do not store the result of
1814 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1816 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
1817 all_components_are_cliques to 1.
1819 2009-10-20 Li Feng <nemokingdom@gmail.com>
1821 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
1823 (pdr_add_alias_set): Update retrieving alias_set_num.
1824 (build_poly_dr): Update retrieving dr_base_object_set.
1825 (partition_drs_to_sets): Remove.
1826 (build_alias_set_optimal_p): New.
1827 (build_alias_set_for_drs): Rename.
1828 (build_scop_drs): Update.
1829 * graphite-sese-to-poly.h (struct base_alias_pair): New.
1830 (ALIAS_SET_INDEX): Remove.
1831 (BASE_OBJECT_SET_INDEX): Remove.
1833 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1835 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
1837 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1839 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
1840 loop upper bounds for 1-element arrays at end of structures.
1841 * tree-flow.h (array_at_struct_end_p): Declared.
1842 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
1844 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1846 * g++.dg/graphite/pr41305.C: New.
1848 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
1850 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
1851 construction of parameter constraints from loop iteration analysis.
1852 * gcc.dg/graphite/run-id-2.c: New test.
1854 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1856 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
1859 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1861 * graphite-dependences.c (dependence_polyhedron_1): Remove
1862 unused gdim dimensions from the DDR polyhedron.
1864 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1866 * graphite-dependences.c (pddr_transformed_scattering): New.
1867 (dot_original_deps_stmt_1): New.
1868 (dot_transformed_deps_stmt_1): New.
1869 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
1870 dot_transformed_deps_stmt_1.
1871 (dot_original_deps): New.
1872 (dot_transformed_deps): New.
1873 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
1875 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1877 * graphite-dependences.c (reduction_dr_1): Remove wrong
1878 assert: reduction BBs can have multiple reduction writes
1879 to memory. interchange-3.f90 is an example.
1881 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1883 * gfortran.dg/graphite/interchange-3.f90: New.
1885 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1887 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
1889 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1891 * graphite-dependences.c (dependence_polyhedron_1): Add the
1892 context to the dependence polyhedron.
1894 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1896 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
1897 PBB_PDR_DUPLICATES_REMOVED.
1898 (new_poly_bb): Same.
1900 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1902 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
1904 (build_loop_iteration_domains): Extract bounds on parameters
1905 based on the data size.
1906 (build_scop_context): Do not initialize SCOP_CONTEXT;
1907 add new constraints.
1909 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1911 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
1912 * graphite-ppl.h (graphite-ppl.h): Declared.
1914 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1916 * graphite-ppl.c (ppl_print_linear_expr): New.
1917 (debug_ppl_linear_expr): New.
1918 * graphite-ppl.h (ppl_print_linear_expr): Declared.
1919 (debug_ppl_linear_expr): Declared.
1921 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1923 * graphite-interchange.c: Fix comments.
1924 * gcc.dg/graphite/block-1.c: Fix comments.
1926 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1928 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
1929 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
1931 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1933 Reapply the patch from Alexander Monakov that disappeared during
1934 the last merges from trunk.
1936 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
1938 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1939 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
1941 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1943 * graphite-interchange.c (memory_stride_in_loop): The depth
1944 argument corresponds to a dynamic time dimension, so use
1945 psct_dynamic_dim to refer to the transformed scattering dimension.
1947 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1949 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
1951 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1953 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
1955 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
1956 the root of the LST.
1957 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
1959 (print_lst): Print the root of LST in a different format.
1960 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
1962 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1964 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
1966 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1968 * doc/passes.texi: Document the Graphite infrastructure.
1970 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1972 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
1973 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
1974 and check the SSA representation.
1976 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
1978 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1980 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
1982 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1984 * gcc.dg/graphite/interchange-11.c: New.
1986 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1988 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
1990 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1992 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1993 Add -fno-loop-strip-mine and -fno-loop-interchange.
1994 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
1995 -fno-loop-strip-mine.
1996 * gfortran.dg/graphite/graphite.exp: Same.
1998 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2000 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2001 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2002 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2003 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2004 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2005 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2006 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2007 DEFAULT_FLAGS_GRAPHITE_SCOP.
2008 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2009 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2011 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2013 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2015 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2016 Sebastian Pop <sebastian.pop@amd.com>
2018 * graphite-interchange.c (build_linearized_memory_access): Pass an
2019 offset as parameter.
2020 (memory_stride_in_loop): Include transform scattering in the
2021 access functions to be able to querry the strides in the
2023 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2024 not the psct_iterator_dim.
2026 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2028 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2029 (lst_do_strip_mine_loop): New.
2030 (lst_do_strip_mine): New.
2031 (scop_do_strip_mine): Call lst_do_strip_mine.
2032 * graphite-poly.h (lst_add_loop_under_loop): New.
2033 (lst_find_first_pbb): New.
2035 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2037 * graphite-poly.c (loop_to_lst): Fix LST creation.
2039 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2041 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2042 sizeof(unsigned long) to make it run on 32bit systems.
2044 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2046 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2049 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2051 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2053 (write_alias_graph_to_ascii_dot): New.
2054 (write_alias_graph_to_ascii_ecc): Ditto.
2055 (partition_drs_to_sets): Add testing of optimality of current method
2056 which assigns alias numbers according to DFS Comopnent number. used
2057 as heuristic for the upcoming ECC algorithm.
2058 (build_scop_drs): Write to file also with the ecc and dot format.
2060 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2062 * gfortran.dg/graphite/interchange-1.f: XFail.
2064 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2066 * graphite.c (graphite_initialize): Do not handle functions with
2067 more than 100 basic blocks.
2069 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2071 * graphite-blocking.c (pbb_do_strip_mine): Use
2072 PARAM_LOOP_BLOCK_TILE_SIZE.
2074 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2076 * graphite-poly.c (dot_lst_1): New.
2078 * graphite-poly.h (dot_lst): Declared.
2080 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2082 * graphite-dependences.c (dot_deps_stmt_1): New.
2083 (dot_deps_stmt): New.
2084 * graphite-dependences.h (dot_deps_stmt): Declared.
2086 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2088 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2089 not replace cross BB scalar dependences ending on PHI nodes.
2090 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2092 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2094 * graphite-poly.c (apply_poly_transforms): Implement the high
2095 level driver for flag_loop_block.
2096 * opts.c (decode_options): Enable flag_loop_block at -O2.
2097 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2100 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2102 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2105 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2107 * graphite-poly.h (lst_find_pbb): New.
2108 (find_lst_loop): New.
2110 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2112 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2113 * graphite-poly.h (struct scop): Remove dep_graph field.
2114 (SCOP_DEP_GRAPH): Removed.
2116 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2118 * graphite-poly.h (copy_lst): Do full copy of LST.
2120 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2122 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2123 when the loop stride is zero.
2125 * gcc.dg/graphite/id-16.c: New.
2127 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2129 * graphite-dependences.c (reduction_dr_1): New.
2130 (reduction_dr_p): New.
2131 (graphite_legal_transform_dr): Call reduction_dr_p.
2132 (reduction_ddr): Renamed reduction_ddr_p.
2133 * graphite-poly.h (same_pdr_p): New.
2134 (number_of_write_pdrs): New.
2135 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2136 (split_reduction_stmt): Do not split reduction statements
2137 when there are no writes to memory.
2138 (translate_scalar_reduction_to_array_for_stmt): Insert the
2139 memory reduction statement just after the scalar reduction statement.
2141 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2143 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2144 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2146 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2148 * graphite-interchange.c (lst_apply_interchange): New.
2149 (lst_interchange_profitable_p): New.
2150 (lst_try_interchange_loops): New.
2151 (lst_try_interchange): New.
2152 (lst_do_interchange): New.
2153 (pbb_do_interchange): Removed.
2154 (scop_do_interchange): Call lst_do_interchange.
2156 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2158 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2159 SCOP_TRANSFORMED_SCHEDULE.
2164 * graphite-poly.h (lst_p): New.
2167 (LST_LOOP_FATHER): New.
2170 (scop_to_lst): Declared.
2171 (print_lst): Declared.
2172 (debug_lst): Declared.
2173 (new_lst_loop): New.
2174 (new_lst_stmt): New.
2177 (lst_dewey_number): New.
2178 (struct scop): Add original_schedule and transformed_schedule fields.
2179 (SCOP_ORIGINAL_SCHEDULE): New.
2180 (SCOP_TRANSFORMED_SCHEDULE): New.
2181 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2183 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2185 * graphite-dependences.c (reduction_ddr): New.
2186 (graphite_legal_transform_bb): Call reduction_ddr.
2187 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2188 Initialize PBB_IS_REDUCTION.
2189 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2190 (PBB_IS_REDUCTION): New.
2191 (new_poly_bb): Update declaration.
2192 * graphite-scop-detection.h (build_scop_bbs): Removed.
2193 (nb_reductions_in_loop): Removed.
2194 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2195 parameter for reductions.
2196 (try_generate_gimple_bb): Update call to new_poly_bb.
2197 (build_scop_bbs_1): Same.
2198 (build_scop_bbs): Same.
2199 (gsi_for_phi_node): New.
2200 (scalar_close_phi_node_p): Remove gcc_assert.
2201 (split_reduction_stmt): New.
2202 (is_reduction_operation_p): New.
2203 (phi_contains_arg): New.
2204 (follow_ssa_with_commutative_ops): New.
2205 (detect_commutative_reduction_arg): New.
2206 (detect_commutative_reduction_assign): New.
2207 (follow_inital_value_to_phi): New.
2208 (edge_initial_value_for_loop_phi): New.
2209 (initial_value_for_loop_phi): New.
2210 (detect_commutative_reduction): New.
2211 (translate_scalar_reduction_to_array_for_stmt): New.
2212 (insert_copyout): New.
2213 (insert_copyin): New.
2214 (translate_scalar_reduction_to_array): New.
2215 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2216 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2217 (rewrite_commutative_reductions_out_of_ssa): New.
2218 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2219 * sese.h (split_region_for_bb): New.
2221 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2222 * gcc.dg/graphite/interchange-1.c: Fix format.
2223 * gcc.dg/graphite/interchange-10.c: New.
2225 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2227 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2230 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2232 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2233 (rewrite_cross_bb_scalar_dependence): New.
2234 (rewrite_cross_bb_scalar_deps): New.
2235 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2236 Call rewrite_cross_bb_scalar_deps.
2238 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2240 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2241 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2244 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2246 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2247 * graphite-interchange.c (pbb_do_interchange): Same.
2248 * graphite-poly.c (print_scattering_function): Same.
2250 * graphite-poly.h (pbb_loop): New.
2251 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2253 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2255 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2257 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2259 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2260 so don't pass a pointer to it.
2261 (build_alias_set_for_drs): Same.
2262 (build_base_obj_set_for_drs): Same.
2263 (build_scop_drs): Same.
2265 2009-09-26 Li Feng <nemokingdom@gmail.com>
2267 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2268 the alias graph of data references.
2270 2009-09-25 Li Feng <nemokingdom@gmail.com>
2272 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2273 (build_scop_drs): When debugging, write the alias graph to file,
2274 otherwise, should be disabled.
2276 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2278 * Merge from mainline (151310:151361).
2280 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2282 * Merge from mainline (151171:151310).
2284 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2286 * Merge from mainline (151171:151806).
2288 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2290 * Revert the last commit.
2292 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2294 * Merge from mainline (151171:151819).
2296 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2298 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2299 (is_simple_operand): Remove call to stmt_simple_memref_p.
2300 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2302 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2304 * gcc.dg/graphite/interchange-mvt.c: New File.
2305 * gcc.dg/graphite/scop-dsyrk.c: New File.
2306 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2307 * gcc.dg/graphite/scop-mvt.c: New File.
2308 * gcc.dg/graphite/scop-sor.c: New File.
2310 2009-09-17 Li Feng <nemokingdom@gmail.com>
2312 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2313 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2314 (graphite_carried_dependence_level_k): Ditto.
2315 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2316 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2317 (new_poly_dr): Adjust declaration.
2318 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2319 (free_gimple_bb): Added free_data_refs_aux.
2320 (build_poly_dr): Add dr_base_object_set.
2321 (partition_drs_to_sets): New.
2322 (dr_same_base_object_p): New.
2323 (build_alias_set_for_drs): New.
2324 (build_base_object_set_for_drs): New.
2325 (build_scop_drs): Add build_base_obj_set_for_drs.
2326 * graphite-sese-to-poly.h: Added #define for alias set number index and
2327 base object set index.
2328 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2329 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2331 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2333 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2334 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2336 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2338 * graphite-sese-to-poly.c (struct irp_data): Removed.
2339 (idx_record_params): Removed.
2340 (find_params_in_bb): Scan for parameters the access functions; don't
2341 parse the tree representation.
2343 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2345 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2346 passes at -O1 and below.
2348 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2350 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2351 tree-scalar-evolution.h, and then tree-data-ref.h.
2352 * graphite-clast-to-gimple.c: Same.
2353 * graphite-dependences.c: Same.
2354 * graphite-interchange.c: Same.
2355 * graphite-poly.c: Same.
2356 * graphite-scop-detection.c: Same.
2357 * graphite-sese-to-poly.c: Same.
2359 * lambda-code.c: Same.
2360 * matrix-reorg.c: Same.
2361 * tree-data-ref.c: Same.
2362 * tree-if-conv.c: Same.
2363 * tree-loop-distribu: Same.: Same.
2364 * tree-loop-linear.c: Same.
2365 * tree-parloops.c: Same.
2366 * tree-predcom.c: Same.
2367 * tree-vect-patterns.c: Same.
2369 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2371 Partially revert the previous patch, except the following.
2372 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2373 as parameters the operands of the not expression.
2375 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2377 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2378 Do not call analyze_scalar_evolution on assignments.
2379 (instantiate_scev_phi): Call analyze_scalar_evolution.
2380 (instantiate_scev_name): Call instantiate_scev_assign and
2381 instantiate_scev_phi.
2382 (instantiate_scev_not): Adapted to pass as parameters the operands
2383 of the not expression.
2385 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2387 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2388 to pass as parameters the operands of the binary expression.
2390 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2392 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2393 instantiate_scev_not. Handle NEGATE_EXPR.
2394 (instantiate_scev_r): Handle NEGATE_EXPR.
2396 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2398 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2400 (instantiate_scev_r): Move code in instantiate_scev_2
2401 and instantiate_scev_1.
2403 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2405 * tree-scalar-evolution.c (instantiate_scev_3): New.
2406 (instantiate_scev_1): Move code in instantiate_scev_3.
2408 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2410 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2411 (instantiate_scev_1): Move code in instantiate_scev_poly.
2413 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2415 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2416 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2418 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2420 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2421 (instantiate_scev_1): Move code in instantiate_scev_convert.
2423 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2425 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2426 (instantiate_scev_1): Move code in instantiate_scev_binary.
2428 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2430 * tree-scalar-evolution.c (instantiate_scev_name): New.
2431 (instantiate_scev_1): Move code in instantiate_scev_name.
2433 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2435 * Merge from mainline (150992:151171).
2437 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2439 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2441 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2443 * graphite-dependences.c (graphite_legal_transform_bb): Call
2444 pbb_remove_duplicate_pdrs.
2445 * graphite-poly.c (can_collapse_pdr): Removed.
2446 (pdr_find_duplicate): Removed.
2447 (can_collapse_pdrs): New.
2448 (pbb_remove_duplicate_pdrs): New.
2449 (new_poly_dr): Do not look for duplicates.
2450 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2451 (PBB_PDR_DUPLICATES_REMOVED): New.
2452 (pbb_remove_duplicate_pdrs): Declared.
2454 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2456 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2457 the strides by multiplying by PDR_NB_REFS.
2458 * graphite-poly.c (can_collapse_pdr): New.
2459 (pdr_find_duplicate): New.
2460 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2461 Initialize PDR_NB_REFS.
2462 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2464 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2466 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2468 Revert one of the previous commits:
2469 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2470 the computation of symmetric data dependence relations.
2471 (dependency_between_pbbs_p): Same.
2473 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2476 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2479 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2481 * graphite-dependences.c (pddr_original_scattering): Return NULL
2482 for read-read dependence relations.
2483 * graphite-poly.h (enum poly_dr_type): Fix comment.
2486 (pdr_may_write_p): New.
2488 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2490 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2491 (struct poly_dr): Same.
2492 (new_poly_dr): Same.
2493 * graphite-poly.c (new_poly_dr): Same.
2495 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2496 Sebastian Pop <sebastian.pop@amd.com>
2498 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2499 pbb_strip_mine_time_depth. Changed the implementation so that
2500 transformation is expressed as a transformation on
2501 time (scatttering) dimensions. Also, ensures that the 2d+1
2502 scheduling format is preserved.
2503 (pbb_strip_mine_profitable_p): Profitability is based on the
2504 iteration number of a given time (scattering) dimension,
2505 and not on a original loop depth dimension.
2506 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2507 (pbb_do_strip_mine): Call psct_dynamic_dim.
2508 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2509 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2510 (pbb_nb_dynamic_scattering_transform): New.
2511 (psct_dynamic_dim): New.
2513 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2515 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2516 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2517 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2518 * graphite-interchange.c (build_linearized_memory_access): Same.
2519 (memory_stride_in_loop): Same.
2521 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2523 * graphite-dependences.c (pddr_original_scattering): New.
2524 (graphite_legal_transform_dr): Call pddr_original_scattering.
2527 * graphite-dependences.h (dot_deps): Declared.
2528 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2529 (print_pdr): Print PDR_ID.
2530 * graphite-poly.h (struct poly_dr): Add field id.
2533 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2535 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2537 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2538 not delete the original dependence relation.
2540 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2542 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2543 the computation of symmetric data dependence relations.
2544 (dependency_between_pbbs_p): Same.
2546 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2548 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2549 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2550 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2551 (free_poly_ddr): New.
2552 (pddr_is_empty): New.
2553 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2554 (dependence_polyhedron): Same. Remove useless gcc_assert.
2556 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2557 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2558 * graphite-dependences.h (enum poly_dependence_kind): New.
2559 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2560 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2561 (PDRP_SINK): Renamed PDDR_SINK.
2562 (PDRP_DDP): Renamed PDDR_DDP.
2564 (free_poly_ddr): Declared.
2565 * graphite-poly.c (new_scop): Use the new hash function names.
2566 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2567 into original_pddrs.
2568 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2570 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2572 * Merge from mainline (150764:150992).
2574 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2576 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2577 bounds with LT_EXPR to make niter analysis more precise on code
2578 generated by Graphite.
2580 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2582 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2583 (graphite_legal_transform_bb): Same.
2584 (poly_drs_may_alias_p): Same.
2586 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2589 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2590 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2592 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2594 * graphite-poly.c (print_pbb): Print PBB index.
2596 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2598 * Merge from mainline (r150672:150764).
2600 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2602 * graphite-interchange.c (ppl_max_for_le): Moved...
2603 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2604 * graphite-ppl.c (ppl_max_for_le): ... here.
2605 * graphite-ppl.h (ppl_max_for_le): Declared.
2607 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2609 * Merge from mainline (r150372:150672).
2611 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2614 * sese.c (convert_for_phi_arg): New.
2615 (add_guard_exit_phis): Use convert_for_phi_arg.
2617 * gfortran.dg/graphite/id-17.f: New.
2619 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2621 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2622 unknown subscript upper bounds.
2624 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2626 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2627 Pranav Garg <pranav.garg2107@gmail.com>
2629 * graphite-interchange.c (gather_access_strides): Removed.
2630 (ppl_max_for_le): New.
2631 (build_linearized_memory_access): New.
2632 (memory_stride_in_loop): New.
2633 (pbb_interchange_profitable_p): Reimplemented.
2634 * graphite-ppl.h (ppl_new_id_map): New.
2635 (ppl_interchange): New.
2637 * gcc.dg/graphite/interchange-6.c: XFAILed.
2639 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2641 * graphite-interchange.c (compute_subscript): Removed.
2642 (compute_array_size_cstr): Removed.
2643 (compute_array_size_poly): Removed.
2644 (compute_array_size): Removed.
2645 (gather_access_strides_poly): Removed.
2646 (gather_access_strides): Empty.
2648 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2650 * graphite-dependences.c (dependence_polyhedron_1): Replace
2651 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2652 (graphite_legal_transform_dr): Same.
2653 (graphite_carried_dependence_level_k): Same.
2654 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2655 Initialize PDR_NB_SUBSCRIPTS.
2656 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2658 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2659 (PDR_NB_SUBSCRIPTS): New.
2660 (pdr_nb_subscripts): Removed.
2661 (pdr_dim): Simplified.
2662 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2663 with PDR_NB_SUBSCRIPTS.
2665 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2667 * graphite-interchange.c (compute_array_size): Remove use of
2669 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2670 Do not initialize PDR_DATA_CONTAINER.
2671 (print_pdr): Do not print PDR_DATA_CONTAINER.
2672 * graphite-poly.h (struct poly_dr): Remove data_container field.
2673 (PDR_DATA_CONTAINER): Removed.
2674 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2676 (build_poly_dr): Same.
2678 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2680 * gcc.dg/graphite/interchange-9.c: New.
2682 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2683 Sebastian Pop <sebastian.pop@amd.com>
2685 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2686 copy of the dependence polyhedron. Free the temporary objects.
2687 (graphite_carried_dependence_level_k): Free unused objects before
2690 * gcc.dg/graphite/interchange-1.c: XFAILed.
2691 * gcc.dg/graphite/interchange-2.c: XFAILed.
2692 * gcc.dg/graphite/interchange-3.c: XFAILed.
2693 * gcc.dg/graphite/interchange-4.c: XFAILed.
2694 * gcc.dg/graphite/interchange-7.c: XFAILed.
2696 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2698 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2699 Early return without analyzing the data dependences if no
2700 transform has been done. Call restore_scattering if the transform
2702 (graphite-interchange.c): Same.
2703 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2704 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2705 (apply_poly_transforms): Do not gcc_assert that
2706 the transform is legal.
2707 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2708 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
2709 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
2710 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2711 * graphite-poly.h (struct poly_scattering): New.
2712 (struct poly_bb): Add original, transformed, and saved fields.
2713 Remove transformed_scattering, original_scattering, nb_local_variables,
2714 and nb_scattering_transform fields.
2715 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
2716 (poly_scattering_new): New.
2717 (poly_scattering_free): New.
2718 (poly_scattering_copy): New.
2719 (store_scattering_pbb): New.
2720 (store_scattering): New.
2721 (restore_scattering_pbb): New.
2722 (restore_scattering): New.
2723 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2724 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
2726 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2728 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
2731 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2733 * Makefile.in (graphite.o): Depends on PREDICT_H.
2734 * graphite.c: Include predict.h.
2735 (graphite_finalize): Call tree_estimate_probability.
2736 * predict.c (predict_loops): Do not call scev_initialize and
2738 (tree_estimate_probability_bb): New.
2739 (tree_estimate_probability): Do not initialize loops: move that
2740 code to the driver. Call tree_estimate_probability_bb.
2741 (tree_estimate_probability_driver): New.
2742 (pass_profile): Use tree_estimate_probability_driver.
2743 * predict.h (tree_estimate_probability): Declared.
2745 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2747 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
2748 * graphite-dependences.c (graphite_legal_transform): Add time to
2749 TV_GRAPHITE_DATA_DEPS.
2750 (dependency_between_pbbs_p): Same.
2751 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2753 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
2755 * Merge from mainline (r149952:150372).
2757 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2759 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
2760 * graphite-blocking.c: Same.
2761 * graphite-clast-to-gimple.c: Same.
2762 * graphite-dependences.c: Same.
2763 * graphite-poly.c: Same.
2764 * graphite-poly.h: Same.
2765 * graphite-ppl.c: Same.
2766 * graphite-scop-detection.c: Same.
2767 * graphite-sese-to-poly.c: Same.
2770 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2772 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
2773 (remove_simple_copy_phi): New.
2774 (remove_invariant_phi): New.
2775 (simple_copy_phi_p): New.
2776 (reduction_phi_p): New.
2777 (gsi_for_ssa_name_def): New.
2778 (insert_out_of_ssa_copy): New.
2779 (insert_out_of_ssa_copy_on_edge): New.
2780 (create_zero_dim_array): New.
2781 (scalar_close_phi_node_p): New.
2782 (rewrite_close_phi_out_of_ssa): New.
2783 (rewrite_phi_out_of_ssa): New.
2784 (rewrite_reductions_out_of_ssa): New.
2785 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
2787 * gcc.dg/graphite/id-11.c: New.
2788 * gcc.dg/graphite/id-15.c: New.
2789 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
2790 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
2791 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
2792 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
2793 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
2794 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
2795 * gfortran.dg/graphite/id-13.f: New.
2796 * gfortran.dg/graphite/id-5.f: New.
2798 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2800 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
2801 check that nb_reductions_in_loop is zero.
2802 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
2803 reduction phi nodes.
2804 (nb_reductions_in_loop): Removed.
2805 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
2806 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
2807 (bb_contains_non_iv_scalar_phi_nodes): Removed.
2808 (scop_contains_non_iv_scalar_phi_nodes): Removed.
2809 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
2811 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2813 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
2814 statements that have an empty iteration domain.
2815 * gfortran.dg/graphite/id-16.f: New.
2817 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2819 * tree-scalar-evolution.c (instantiate_scev_1): Return
2820 chrec_dont_know when the result is not above instantiate_below.
2821 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
2822 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
2823 the tree has a known scalar evolution.
2824 * gfortran.dg/graphite/id-14.f: New.
2825 * gfortran.dg/graphite/id-15.f: New.
2827 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2829 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
2831 (rename_variables): Keep inserting renames after the ones already
2834 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2836 * graphite-sese-to-poly.c (compare_bb_depths): New.
2837 (graphite_sort_dominated_info): New.
2838 (build_scop_bbs_1): Call graphite_sort_dominated_info.
2839 (build_scop_scattering): Fix comment.
2841 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2843 * graphite.c (graphite_finalize): Call print_loops instead of
2844 dump_function_to_file.
2845 * gcc.dg/graphite/graphite.exp: Fix formatting.
2846 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
2847 loops generated in the graphite output file.
2848 * gcc.dg/graphite/pr35356-2.c: New.
2849 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
2850 * gfortran.dg/graphite/id-12.f: New.
2852 2009-07-24 Li Feng <nemokingdom@gmail.com>
2854 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
2857 2009-07-24 Li Feng <nemokingdom@gmail.com>
2858 Tobias Grosser <grosser@fim.uni-passau.de>
2860 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
2861 alias set number build alias in ACCESSES polyhedron.
2862 (build_alias_set_for_drs): New.
2863 (build_pbb_drs): Added build_alias_set_for_drs.
2864 * graphite-dependences.c (poly_drs_may_alias_p): New.
2865 (graphite_carried_dependence_level_k): Check alias information
2866 before building polyhedron.
2868 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2870 * Makefile.in (lambda-code.o): Fix formatting.
2872 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2874 * Merge from mainline (r149350-149952)
2876 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2878 * graphite-poly.c (apply_poly_transforms): Move strip_mine
2879 before interchange to prepare for loop blocking.
2881 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2883 * graphite-poly.c (apply_poly_transforms): Add checks after every
2885 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
2886 done in apply_poly_transforms.
2888 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2890 * graphite-dependences.c (build_lexicographically_gt_constraint):
2891 Replace RES parameter with *RES.
2892 (dependence_polyhedron_1): Pass an address of the parameter RES
2893 instead of value of RES.
2895 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2897 * graphite.c (graphite_finalize): Fix comment.
2898 (graphite_transform_loops): Reset scev info after code generation
2901 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2903 * graphite.c (graphite_finalize): Call scev_reset.
2905 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2907 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
2908 GBB_CLOOG_IV_TYPES hash table twice.
2909 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
2910 (add_condition_to_domain): Clear GMP values.
2912 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2914 * graphite-dependences.c: Fix formatting.
2915 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
2916 (pbb_number_of_iterations): Free ppl_Linear_Expression.
2917 * graphite-sese-to-poly.c: Fix formatting.
2918 * graphite.c (graphite_transform_loops): Create the hash table
2919 after the early return.
2921 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2923 * gcc.dg/graphite/id-14.c: New.
2924 * gcc.dg/graphite/pr40157.c: New.
2925 * gfortran.dg/graphite/id-11.f: New.
2927 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2929 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
2930 (build_poly_scop): Return false when there are no pbbs within
2931 loops to avoid to pass to cloog scops with no loops.
2933 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2935 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
2936 useless test "i % 2".
2937 (build_pbb_scattering_polyhedrons): Fix formatting.
2938 (build_poly_dr): Same.
2939 * graphite.c (graphite_transform_loops): Restructure.
2941 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
2943 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
2944 reduction_list parameter.
2945 (rewrite_all_phi_nodes_with_iv): Same.
2946 (canonicalize_loop_ivs): Same.
2947 * tree-parloops.c (struct brli): Removed.
2948 (build_reduction_list_info): Removed.
2949 (build_new_reduction): New.
2950 (analyze_reduction_list): Removed.
2951 (gather_scalar_reductions): Find reductions instead of phi
2952 nodes that can't be canonicalized.
2953 (try_create_reduction_list): Remove reduction_list parameter.
2954 (gen_parallel_loop): Same.
2955 (parallelize_loops): Remove analyze_reductions variable,
2956 initialization and free.
2957 Change reduction_list htab initialization to reduction_info
2958 elements instead of ssa names.
2959 Call try_create_reduction_list and gen_parallel_loop without
2960 analyzed_reduction argument.
2961 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
2962 canonicalize_loop_ivs with one less argument.
2963 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
2965 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2967 * graphite-dependences.c (new_poly_dr_pair): New.
2968 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
2969 (new_poly_dr_pair): New.
2970 (eq_poly_dr_pair_p): New.
2971 (hash_poly_dr_pair_p): New.
2972 * graphite-dependences.h (struct poly_dr_pair): New.
2973 (eq_poly_dr_pair_p): Declared.
2974 (hash_poly_dr_pair_p): Declared.
2975 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
2976 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
2977 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
2978 * Makefile.in (graphite-poly.o): Add dependence on
2979 graphite-dependences.h.
2981 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2983 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
2984 polynomials of degree > 1 pass to Graphite.
2985 * tree-chrec.c (scev_is_linear_expression): Call
2986 evolution_function_is_affine_multivariate_p.
2987 * gfortran.dg/graphite/id-10.f90: New.
2989 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2991 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
2992 Instantiate scevs varying in outer loops.
2993 * gfortran.dg/graphite/id-9.f: Correct testcase.
2995 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2997 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
2998 redundant constraint.
3000 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3002 * gcc.dg/graphite/graphite.exp: Fix comments.
3003 * gfortran.dg/graphite/graphite.exp: Trigger actions
3004 based on the file names as in the C testsuite.
3005 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3006 * gfortran.dg/graphite/block-2.f: Same.
3007 * gfortran.dg/graphite/block-3.f90: Same.
3008 * gfortran.dg/graphite/block-4.f90: Same.
3009 * gfortran.dg/graphite/id-1.f90: Same.
3010 * gfortran.dg/graphite/id-2.f90: Same.
3011 * gfortran.dg/graphite/id-3.f90: Same.
3012 * gfortran.dg/graphite/id-4.f90: Same.
3013 * gfortran.dg/graphite/id-6.f: Same.
3014 * gfortran.dg/graphite/id-9.f: Same.
3015 * gfortran.dg/graphite/interchange-1.f: Same.
3016 * gfortran.dg/graphite/interchange-2.f: Same.
3017 * gfortran.dg/graphite/scop-1.f: Same.
3019 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3021 * sese.c (expand_scalar_variables_call): New.
3022 (expand_scalar_variables_ssa_name): Handle calls in expander.
3024 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3026 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3027 Expect to see the pattern twice.
3028 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3029 * gcc.dg/graphite/interchange-5.c: Same.
3030 * gcc.dg/graphite/interchange-6.c: Same.
3032 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3034 * gcc.dg/graphite/id-10.c: New.
3035 * gcc.dg/graphite/id-12.c: New.
3036 * gfortran.dg/graphite/id-7.f: New.
3037 * gfortran.dg/graphite/id-8.f: New.
3039 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3041 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3044 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3046 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3048 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3050 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3052 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3054 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3055 building PDR subscripts.
3057 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3059 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3060 computation of array sizes.
3062 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3064 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3066 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3068 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3069 build_pairwise_constraint, dr_equality_constraints,
3070 build_pairwise_scheduling_equality,
3071 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3072 build_lexicographically_gt_constraint, dependence_polyhedron,
3073 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3074 Move from NNC_Polyhedron to C_Polyhedron.
3075 * graphite-interchange.c (compute_array_size_poly,
3076 gather_access_strides): Dito.
3077 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3078 free_scop, pbb_number_of_iterations): Dito.
3079 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3080 pbb_dim_iter_domain, struct scop): Dito.
3081 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3082 new_Cloog_Domain_from_ppl_Polyhedron,
3083 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3084 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3085 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3086 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3087 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3088 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3089 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3090 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3091 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3092 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3093 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3094 build_scop_iteration_domain, build_poly_dr): Dito
3096 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3098 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3100 * gcc.dg/graphite/run-id-1.c: New.
3102 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3104 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3105 positivity constraint on the symbolic number of iterations.
3107 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3109 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3111 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3112 Tobias Grosser <grosser@fim.uni-passau.de>
3114 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3115 (build_cloog_prog): Directly use SCOP_CONTEXT.
3116 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3117 (free_scop): Free SCOP_CONTEXT.
3118 (print_scop_context): New.
3119 (print_scop): Call print_scop_context.
3120 (debug_scop_context): New.
3121 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3122 (struct scop): Added field context.
3123 (SCOP_CONTEXT): New.
3124 * graphite-sese-to-poly.c (add_param_constraints): New.
3125 (build_scop_context): New.
3126 (build_poly_scop): Call build_scop_context.
3128 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3130 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3131 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3132 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3133 * graphite-ppl.h: Include double-int.h and tree.h.
3134 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3135 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3136 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3137 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3139 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3141 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3142 POINTER_PLUS_EXPR for pointer types.
3143 (clast_to_gcc_expression): Same.
3145 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3147 * graphite-poly.c (print_scattering_function): Early return when
3148 PBB_TRANSFORMED_SCATTERING is not initialized.
3149 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3151 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3153 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3156 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3158 * tree-parloops.c (analyze_reduction_list): Change return
3160 (try_create_reduction_list): Move the call to
3161 analyze_reduction_list to the beginining.
3162 Call reduction_phi with analyzed_reductions as argument
3163 instead of reduction_list.
3165 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3167 * Merge from mainline (r148296:149346)
3169 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3171 * graphite-scop-detection.c (graphite_can_represent_init): New.
3172 (graphite_can_represent_scev): Call graphite_can_represent_init:
3173 check that the initial value does not contain multiplications of
3175 (stmt_has_simple_data_refs_p): New.
3176 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3177 (is_simple_operand): Fix formatting.
3178 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3180 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3182 * gcc.dg/graphite/id-13.c: New.
3183 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3184 analyze_scalar_evolution, use scalar_evolution_in_region.
3185 (scan_tree_for_params_right_scev): Add extra assert.
3186 (parameter_index_in_region_1): Split from parameter_index_in_region.
3187 (idx_record_params): Use scalar_evolution_in_region.
3188 (find_params_in_bb): Same.
3189 (find_scop_parameters): Same.
3190 (build_loop_iteration_domains): Same.
3191 (create_linear_expr_from_tree): Same.
3192 * sese.c (scalar_evolution_in_region): New.
3193 * sese.h (scalar_evolution_in_region): Declared.
3194 (defined_in_sese_p): New.
3195 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3197 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3200 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3202 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3203 TREE_DATA_REF_H also implies SCEV_H.
3205 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3207 * graphite-poly.c (print_scop_params): New.
3208 (print_scop): Call print_scop_params.
3209 (debug_scop_params): New.
3210 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3212 2009-07-07 Li Feng <nemokingdom@gmail.com>
3214 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3215 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3216 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3217 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3218 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3219 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3221 2009-07-07 Li Feng <nemokingdom@gmail.com>
3223 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3224 for dependency checking part.
3225 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3226 tests for dependency checking.
3227 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3228 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3229 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3230 flag -fdump-tree-graphite-all for autopar testsuites.
3232 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3234 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3235 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3236 canonicalize_loop_ivs): Moved...
3237 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3239 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3241 * tree-parloops.c (try_create_reduction_list): Pass an extra
3242 argument analyzed_reductions. Call analyze_reduction_list.
3243 (gen_parallel_loop): Do not call analyze_reduction_list.
3244 (parallelize_loops): Init and finalize analyzed_reductions.
3246 2009-07-06 Li Feng <nemokingdom@gmail.com>
3248 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3249 Added flag -fno-loop-strip-mine for autopar testcase.
3251 2009-07-04 Li Feng <nemokingdom@gmail.com>
3253 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3254 transformed scattering dimension instead of unmatch orignal when
3255 calling dependence_polyhedron.
3257 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3259 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3261 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3263 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3264 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3266 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3268 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3269 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3270 * graphite-poly.c (pbb_number_of_iterations): New.
3271 * graphite-poly.h (pbb_number_of_iterations): Declared.
3272 (pbb_iterator_dim, pbb_parameter_dim): New.
3274 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3276 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3277 last commit on type of lower and upper bound of loops.
3279 2009-06-29 Li Feng <nemokingdom@gmail.com>
3281 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3282 graphite-dependences.h.
3283 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3284 (mark_bb_with_pbb): New.
3285 (get_stmtfor_depth): New.
3286 (find_pbb_via_hash): New.
3287 (dependency_in_loop_p): New.
3288 (mark_loops_parallel): New.
3289 (free_aux_in_new_loops): New.
3290 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3291 bb with it's relevant pbb. Mark newly created loops. Remove mark
3292 innermost loop parallel without checking.
3293 (gloog): Add parameter BB_PBB_MAPPING.
3294 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3295 (gloog): Change declaration.
3296 (mark_loop_parallel): Make extern.
3297 (free_aux_in_new_loops): Declare.
3298 (bb_pbb_map_hash): New.
3299 (eq_bb_pbb_map): New.
3300 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3301 auto parallelization when flag_graphite_force_parallel is set.
3302 (graphite_finalize): Added free_aux_in_new_loops.
3303 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3304 the innermost loop that marked parallel. Use
3305 flag_graphite_force_parallel instead of loop->can_be_parallel.
3306 (loop_parallel_p): Move inner most checking out of function.
3308 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3310 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3311 type of lower and upper bound of loops signed long int.
3313 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3315 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3316 expression outside the loop.
3318 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3320 * gcc.dg/graphite/interchange-8.c: New.
3322 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3324 * gcc.dg/graphite/interchange-0.c: XFailed.
3325 * gcc.dg/graphite/interchange-5.c: XFailed.
3326 * gcc.dg/graphite/interchange-6.c: XFailed.
3328 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3330 * graphite-interchange.c (compute_array_size_poly): The end of the
3331 recursion should return 1.
3333 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3335 * graphite-interchange.c (compute_array_size_cstr): Allow the
3336 subscript multiplier to be -1.
3337 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3338 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3339 data_container. Initializes PDR_DATA_CONTAINER.
3340 (print_pdr_access_layout): New.
3341 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3342 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3344 (PDR_DATA_CONTAINER): New.
3345 (new_poly_dr): Update declaration.
3346 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3347 (build_poly_dr): Call pdr_add_data_dimensions.
3349 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3351 * graphite-poly.h (struct poly_dr): Fix comment.
3352 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3353 (pdr_add_memory_accesses): New.
3354 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3356 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3358 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3359 (print_pbb): Add call to print_pdrs.
3360 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3362 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3363 Li Feng <nemokingdom@gmail.com>
3365 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3366 (dependency_between_pbbs_p): New.
3367 (lexicographically_gt_p): Assure !empty_p before polyhedron
3368 intersection assign.
3369 (build_lexicographically_gt_constraint): Correct lexicographically
3371 * graphite-dependences.h: New.
3372 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3374 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3376 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3377 (gloog): Print to dump_file the generated clast.
3378 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3379 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3381 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3383 * graphite-poly.c (extend_scattering): Increment
3384 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3386 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3388 * graphite-interchange.c (compute_array_size_poly): Added exit of
3389 recursion condition. Continue iterating even after the first equality.
3390 (compute_array_size): Same.
3392 2009-06-24 Li Feng <nemokingdom@gmail.com>
3394 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3395 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3396 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3397 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3398 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3400 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3402 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3403 only when the use verifies is_gimple_reg.
3405 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3407 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3408 Allocate scaldims after call to unify_scattering_dimensions.
3410 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3412 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3414 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3415 Albert Cohen <albert.cohen@inria.fr>
3417 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3418 variables for the strip mining.
3420 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3421 Pranav Garg <pranav.garg2107@gmail.com>
3423 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3424 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3425 (graphite-blocking.o): New rule.
3426 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3427 * graphite-blocking.c: New.
3428 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3429 flag_loop_strip_mine.
3430 (psct_scattering_dim_for_loop_depth): New.
3431 * graphite-poly.h (scop_do_strip_mine): Declared.
3432 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3433 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3434 flag_loop_strip_mine.
3436 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3438 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3439 a GMP value and a PPL coefficient at each iteration of a loop.
3441 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3443 * graphite-dependences.c (dependence_polyhedron): Do not use
3444 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3445 pbb_nb_scattering_transform.
3446 (graphite_legal_transform_dr): Same.
3447 * graphite-poly.c (extend_scattering): Same.
3448 (unify_scattering_dimensions): Same.
3449 (print_scattering_function): Same.
3450 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3451 PBB_NB_LOCAL_VARIABLES.
3452 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3453 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3454 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3455 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3456 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3457 (pbb_nb_scattering_transform): New.
3458 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3459 (psco_scattering_dim): Add assert on parameters.
3460 (psct_scattering_dim): Same.
3461 (psct_scattering_dim_for_loop_depth): Declared.
3462 (psct_local_var_dim): New.
3463 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3464 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3465 correct layout, call pbb_nb_local_vars.
3466 (psct_add_local_variable, psct_add_scattering_dimension): New.
3467 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3468 Initialize PBB_NB_SCATTERING_TRANSFORM.
3470 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3472 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3473 (set_coef): Renamed ppl_set_coef.
3474 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3476 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3478 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3479 test a boolean against 1.
3480 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3481 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3482 (pbb_do_interchange): Returns true when a transform has been performed.
3483 (scop_do_interchange): Same.
3484 * graphite-poly.c (apply_poly_transforms): Use the return value of
3485 scop_do_interchange.
3486 * graphite-poly.h (scop_do_interchange): Update declaration.
3488 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3490 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3492 * sese.c (sese_reset_aux_in_loops): New.
3493 * sese.h (sese_reset_aux_in_loops): New.
3495 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3497 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3498 multiplier and multiply the constant by the multiplier.
3499 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3500 (build_poly_dr): Do not use the multiplier to define the subscript.
3502 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3504 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3505 compiler's data reference. Initialize PDR_CDR.
3506 (print_pdr): Call dump_data_reference.
3507 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3508 Add compiler_dr field.
3509 (PDR_BB): Renamed PDR_PBB.
3511 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3512 GCC's data reference representation.
3513 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3514 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3516 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3518 * graphite-poly.c (print_scattering_function): Also print the layout.
3519 * graphite-poly.h (pbb_nb_local_vars): New.
3521 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3523 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3525 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3527 * graphite-poly.c (print_pdr, debug_pdr): New.
3528 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3529 (PDR_BASE): Removed.
3531 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3533 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3536 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3538 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3539 subscript identification column.
3540 (pbb_do_interchange): Print to dump_file that some loops "will be
3541 interchanged". Rely on that chain of characters in the testcases.
3542 * gcc.dg/graphite/interchange-0.c: New.
3543 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3544 interchange-*.c files and compile them with -floop-interchange.
3546 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3548 * graphite-interchange.c (interchange_profitable_p): Renamed
3549 pbb_interchange_profitable_p.
3551 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3552 Harsha Jagasia <harsha.jagasia@amd.com>
3553 Pranav Garg <pranav.garg2107@gmail.com>
3555 * graphite-interchange.c (interchange_profitable_p): Make static.
3556 (pbb_interchange_loop_depths, pbb_do_interchange,
3557 scop_do_interchange): New.
3558 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3559 for flag_loop_interchange.
3560 * graphite-poly.h (scop_do_interchange): Declared.
3561 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3562 flag_loop_interchange is used.
3564 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3566 * graphite-dependences.c (dependence_polyhedron): Update use of
3567 pbb_nb_scattering_dims.
3568 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3569 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3570 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3571 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3573 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3575 * graphite.c: Cleanup foo.
3577 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3579 * Merge from mainline (r143684:148293).
3580 * Disabled libpcp until it gets fixed.
3582 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3583 Harsha Jagasia <harsha.jagasia@amd.com>
3585 * graphite-interchange.c: New.
3586 * Makefile.in (graphite-interchange.o): New.
3587 * graphite-poly.h (interchange_profitable_p): Declared.
3588 * graphite-ppl.h (value_max): New.
3590 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3592 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3593 * graphite-poly.h: Fix some comments.
3597 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3600 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3601 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3602 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3603 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3604 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3605 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3606 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3607 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3608 * graphite-clast-to-gimple.c: Same.
3609 * graphite-dependences.c: Same.
3610 * graphite-poly.c: Same.
3611 * graphite-sese-to-poly.c: Same.
3613 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3615 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3616 expressions for an IV rename, as returned by clast_to_gcc_expression.
3617 (copy_renames): Rename new_name to expr.
3618 * sese.c (debug_rename_elt): Same.
3621 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3622 the information from the rename map.
3623 (rename_variables_in_stmt): Same.
3624 (add_loop_exit_phis): Rename new_name to expr.
3625 (insert_loop_close_phis): Same.
3626 (add_guard_exit_phis): Same. Call force_gimple_operand.
3627 * sese.h (struct rename_map_elt): Rename new_name to expr.
3628 (new_rename_map_elt): Same.
3630 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3632 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3633 * sese.c (set_rename): Make it extern.
3634 * sese.h (set_rename): Declared.
3636 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3638 * graphite-poly.c (extend_scattering): Free values.
3639 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3641 (ppl_print_powerset_matrix): Same.
3642 * graphite-scop-detection.c (free_scops_1): New.
3643 (limit_scops): Call free_scops_1.
3644 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3645 (build_poly_dr): Free PPL coefficients.
3646 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3648 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3650 * graphite-dependences.c: New.
3651 * graphite-data-ref.c: Removed.
3652 * graphite-data-ref.h: Removed.
3653 * Makefile.in (graphite-data-ref.o): Removed.
3654 (graphite-dependences.o): Added.
3655 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3656 * graphite-poly.c: Same.
3657 Move the data dependence testing to graphite-dependences.c.
3659 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3661 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3662 from graphite_cannot_represent_loop. Code refactored.
3663 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3665 2009-05-17 Li Feng <nemokingdom@gmail.com>
3667 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3668 Cover all the testcases (not only the filtered ones).
3670 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3672 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3673 unnecessary check. Update comments. Move check for REAL_TYPE here.
3674 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3675 done in (stmt_simple_for_scop_p).
3677 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3679 * graphite.c (print_global_statistics): New.
3680 (print_graphite_scop_statistic): New.
3681 (print_graphite_statistics): New.
3682 (graphite_initialize, graphite_transform_loops): Print statistics.
3683 * graphite-scop-detection (build_scops): Print statistics.
3684 (print_graphite_scop_statistics): New.
3685 (print_graphite_statistics): New.
3687 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3689 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3690 (debug_clast_name_index): Removed.
3691 (debug_clast_name_indexes_1): Removed.
3692 (debug_clast_name_indexes): Removed.
3693 (clast_name_index_elt_info): Removed.
3694 (eq_clast_name_indexes): Removed.
3695 (clast_name_to_index): Removed.
3696 (new_clast_name_index): Removed.
3697 (save_clast_name_index): Removed.
3698 (save_var_name): Moved...
3699 (init_sese_params_index): Removed.
3700 (clast_name_to_gcc): Remove use of name_tree.
3701 (initialize_cloog_names): Same.
3702 (gloog): Do not call init_sese_params_index.
3703 * graphite-sese-to-poly.c (save_var_name): ...here.
3704 (parameter_index_in_region): New.
3705 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3706 (parameter_index_in_region): Removed.
3707 (is_parameter): Remove use of name_tree.
3708 * sese.h (struct name_tree): Removed.
3709 (struct sese): Remove use of name_tree. New field params_names.
3710 (SESE_PARAMS_NAMES): New.
3711 (SESE_PARAMS): Remove duplicate.
3712 (parameter_index_in_region): Removed.
3713 (sese_nb_params): Remove use of name_tree.
3714 (struct clast_name_index): New.
3715 (new_clast_name_index): New.
3716 (clast_name_to_index): New.
3717 (save_clast_name_index): New.
3718 (debug_clast_name_index): New.
3719 (debug_clast_name_indexes_1): New.
3720 (debug_clast_name_indexes): New.
3721 (clast_name_index_elt_info): New.
3722 (eq_clast_name_indexes): New.
3724 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3726 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
3727 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
3728 (graphite_loop_normal_form): Do not pass region. Do not
3729 initialize SESE_OLDIVS.
3730 (build_graphite_loop_normal_form): Update call to
3731 graphite_loop_normal_form.
3732 * sese.c (debug_oldivs): Removed.
3733 (new_sese): Do not initialize SESE_OLDIVS.
3734 (free_sese): Do not free SESE_OLDIVS.
3735 (oldiv_for_loop): Removed.
3736 * sese.h (struct sese): Remove old_ivs.
3737 (SESE_OLDIVS): Removed.
3738 (oldiv_for_loop): Removed.
3740 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3742 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
3743 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
3744 replaced by a call to newivs_to_depth_to_newiv.
3745 (clast_to_gcc_expression): Pass newivs, remove ivstack.
3746 (clast_to_gcc_expression_red): Same.
3747 (gcc_type_for_clast_expr): Same.
3748 (gcc_type_for_clast_eq): Same.
3749 (graphite_translate_clast_equation): Same.
3750 (graphite_create_guard_cond_expr): Same.
3751 (graphite_create_new_guard): Same.
3752 (graphite_create_new_loop): Same.
3753 (build_iv_mapping): Same.
3754 (translate_clast): Same.
3756 (loop_iv_stack_patch_for_consts): Removed. *
3757 sese.c (iv_stack_entry_is_constant): Removed.
3758 (iv_stack_entry_is_iv): Removed.
3759 (loop_iv_stack_push_iv): Removed.
3760 (loop_iv_stack_insert_constant): Removed.
3761 (loop_iv_stack_pop): Removed.
3762 (loop_iv_stack_get_iv): Removed.
3763 (loop_iv_stack_get_iv_from_name): Removed.
3764 (debug_loop_iv_stack): Removed.
3765 (free_loop_iv_stack): Removed.
3766 (loop_iv_stack_remove_constants): Removed. *
3767 sese.h (iv_stack_entry_kind): Removed.
3768 (iv_stack_entry_data_union): Removed.
3769 (iv_stack_entry_struct): Removed.
3770 (iv_stack_entry_p): Removed.
3771 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
3772 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
3773 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
3774 loop_iv_stack_pop, free_loop_iv_stack): Removed.
3775 (gbb_loop_at_index): Fix indenting.
3776 (gbb_loop_index): Removed.
3778 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3780 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
3781 Call clast_name_to_index.
3783 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3785 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
3786 do not pass params. Get params from SESE_PARAMS.
3787 (clast_to_gcc_expression): Same.
3788 (clast_to_gcc_expression_red): Same.
3789 (gcc_type_for_clast_eq): Same.
3790 (graphite_translate_clast_equation): Same.
3791 (graphite_create_new_loop): Same.
3792 * sese.c (rename_variables_in_stmt): Fix comment.
3794 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3796 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
3798 Call save_clast_name_index.
3799 (translate_clast): Pass newivs_index.
3800 (gloog): Create and free newivs_index.
3802 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3804 * graphite-clast-to-gimple.c (clast_name_index): New structure.
3805 (clast_name_index_p): New type.
3806 (debug_clast_name_index): New.
3807 (debug_clast_name_indexes_1): New.
3808 (debug_clast_name_indexes): New.
3809 (clast_name_index_elt_info): New.
3810 (eq_clast_name_indexes): New.
3811 (clast_name_to_index): New.
3812 (new_clast_name_index): New.
3813 (save_clast_name_index): New.
3814 (init_sese_params_index): New.
3815 (gloog): Call init_sese_params_index.
3816 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
3817 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
3818 (free_sese): Free SESE_PARAMS_INDEX.
3819 * sese.h (struct sese): Add params_index.
3820 (SESE_PARAMS_INDEX): New.
3822 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3824 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
3825 (graphite_create_new_loop): Pass the newivs vector. Push the
3826 newly created IV to newivs.
3827 (translate_clast): Pass the newivs vector.
3828 (gloog): Create and destroy the newivs vector.
3830 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3832 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
3833 (graphite_loop_normal_form): Initialize loop->aux with the unique
3834 IV that has been created.
3836 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
3838 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
3839 scev with parameters in the base part. They where forbidden
3842 2009-05-11 Li Feng <nemokingdom@gmail.com>
3844 * gcc.dg/graphite/graphite.exp: Set different default
3845 compile options by file names.
3846 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
3847 * gcc.dg/graphite/id-{1-9}.c: Ditto.
3848 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
3849 * gcc.dg/graphite/scop-matmult.c: Ditto.
3851 2009-05-08 Li Feng <nemokingdom@gmail.com>
3853 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
3854 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
3855 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
3856 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
3858 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3860 * graphite-scop-detection (build_scops_1): Fix little bug introduced
3863 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3865 * graphite-scop-detection.c (graphite_can_represent_scev): Only
3866 allow integer constant strides.
3867 (graphite_can_represent_expr): Depend on outermost_loop.
3868 (stmt_simple_memref_p, graphite_cannot_represent_loop,
3869 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
3870 build_scops_1): Same.
3871 (scopdet_basic_block_info): Same and insert layered SCoP
3873 (try_generate_gimple_bb): Cleanup.
3874 (build_scops): Enable data references.
3876 * gcc.dg/graphite/id-5.c: New.
3877 * gcc.dg/graphite/id-9.c: New.
3878 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
3879 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
3881 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3883 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
3884 that we have not yet built for this SCoP.
3886 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3888 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
3889 for complex numbers.
3891 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3893 * graphite-ppl.c: Fix build if cloog is not available.
3895 2009-05-04 Li Feng <nemokingdom@gmail.com>
3897 * tree-parloops.c (loop_parallel_p): Remove construction of
3898 NITER and REDUCTION_LIST.
3899 (try_get_loop_niter): New.
3900 (try_create_reduction_list): New.
3901 (parallelize_loops): Bypass the failed checkings in autopar
3902 when can_be_parallel in loop structure is set to true.
3904 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3906 * gcc.dg/graphite/id-6.c: Update testcase.
3907 * gcc.dg/graphite/scop-3.c: Dito.
3909 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3911 * graphite-scop-detection.c (stmt_simple_for_scop_p):
3912 Enable EQ_EXPR and NE_EXPR again.
3914 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3916 * graphite-scop-detection.c (graphite_can_represent_scev):
3917 Add check if scev is affine multivariate.
3918 (harmful_stmt_in_bb): Check if we can represent the conditions.
3919 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
3921 * gcc.dg/graphite/id-7.c: New.
3923 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3925 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
3926 Check all bbs in region, not only the bbs that are represented in
3928 (build_poly_scop): Add newline.
3929 * gcc.dg/graphite/id-8.c: New.
3931 2009-04-30 Li Feng <nemokingdom@gmail.com>
3933 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
3934 when loop initialize.
3935 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
3936 * common.opt: Declare flag_graphite_force_parallel.
3937 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
3939 * graphite-poly.c (apply_poly_transforms): Introduce
3940 flag_graphite_force_parallel.
3941 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
3942 * toplev.c (process_options): ditto and replace a not correctly
3945 2009-04-30 Li Feng <nemokingdom@gmail.com>
3947 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
3948 Change the call of gbb_loop_at_index and/or gbb_loop_index due
3949 to the redefinition.
3950 (compute_cloog_iv_types_1): ditto.
3951 (build_iv_mapping): ditto.
3952 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
3954 (free_gimple_bb): Removed GBB_LOOPS related free part.
3955 (build_bb_loops): Removed.
3956 * sese.h (struct gimple_bb): Removed loops.
3957 (GBB_LOOPS): Removed.
3958 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
3959 (gbb_loop_index): ditto.
3961 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3963 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
3964 allow non constant strides.
3965 * gcc.dg/graphite/scop-20.c: New.
3967 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3969 * graphite-scop-detection.c (dot_all_scops): Fix system call
3970 return value warning.
3973 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3975 * gcc.dg/graphite/id-6.c: Fix pattern.
3976 * gcc.dg/graphite/scop-3.c: Same.
3978 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3980 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
3981 build_pairwise_constraint, dr_equality_constraints,
3982 build_pairwise_scheduling_equality,
3983 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3984 build_lexicographically_gt_constraint, dependence_polyhedron,
3985 graphite_legal_transform_dr, graphite_legal_transform_bb,
3986 graphite_legal_transform): New.
3987 * graphite-poly.h (graphite_legal_transform): Declared.
3988 * graphite-sese-to-poly.c (build_poly_scop): Call to
3989 graphite_legal_transform is disabled for the moment.
3991 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3993 * graphite-poly.h (pbb_nb_scattering_dims): New.
3994 (pbb_nb_scattering): Use it.
3996 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3998 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
3999 Pointset_Powerset version of ppl_insert_dimensions.
4000 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4002 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4004 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4006 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4008 * graphite-poly.h: Fix comment.
4010 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4012 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4014 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4016 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4019 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4021 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4022 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4025 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4027 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4028 handle EQ_EXPR and NE_EXPR.
4030 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4032 * graphite-poly.h (poly_dr): Fix comment.
4034 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4035 Tobias Grosser <grosser@fim.uni-passau.de>
4037 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4038 with a zero dimension polyhedron.
4039 (find_scop_parameters): Move the call to scop_set_nb_params here.
4040 (build_loop_iteration_domains): Store in loop->aux the iteration
4042 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4043 by any loop in scop.
4044 (build_poly_scop): Do not call scop_set_nb_params.
4046 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4047 Tobias Grosser <grosser@fim.uni-passau.de>
4049 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4050 add_condition_to_domain not GT_EXPR.
4052 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4054 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4055 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4056 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4057 upper_bound_assign to calculate unions.
4058 * gcc.dg/graphite/id-6.c: New.
4060 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4062 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4063 handle abnormal edges.
4065 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4067 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4068 (free_poly_bb): Also free poly_drs.
4069 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4070 (poly_dr): Polyhedron to Pointset_Powerset.
4071 (pdr_accessp_nb_subscripts): Same.
4072 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4075 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4077 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4078 names into more meaningful names.
4080 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4082 * gfortran.dg/graphite/interchange-1.c: New.
4083 * gfortran.dg/graphite/interchange-2.c: New.
4085 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4087 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4089 * tree-parloops.c (rewrite_phi_with_iv): New.
4090 (rewrite_all_phi_nodes_with_iv): New.
4091 (canonicalize_loop_ivs): Call them.
4093 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4095 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4096 graphite_find_data_references_in_stmt.
4097 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4098 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4100 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4102 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4104 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4106 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4107 instead of bb_in_region.
4108 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4109 (build_sese_conditions): Use flag_bb_in_sese.
4110 * sese.c (register_bb_in_sese): Removed.
4111 (new_sese): Remove initialization of SESE_REGION_BBS.
4112 (free_sese): Do not free SESE_REGION_BBS.
4113 * sese.h (struct sese): Remove field region_basic_blocks.
4114 (SESE_REGION_BBS): Removed.
4115 (bb_in_sese_p): Implement in function of bb_in_region.
4117 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4119 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4122 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4124 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4126 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4127 (add_condition_to_domain): New.
4128 (add_condition_to_pbb): New.
4129 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4130 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4132 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4134 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4135 ppl_Pointset_Powerset.
4136 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4137 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4138 (pbb_nb_loops): Same.
4139 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4140 add_conditions_to_domain): Same.
4141 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4142 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4143 ppl_const_Polyhedron_t.
4144 (ppl_print_powerset_matrix): New.
4145 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4146 ppl_print_powerset_matrix): New.
4147 (ppl_print_polyhedron_matrix): Updated.
4149 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4151 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4153 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4155 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4156 (print_iteration_domains, debug_iteration_domain,
4157 debug_iteration_domains): New.
4158 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4159 debug_iteration_domains): Declared.
4160 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4163 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4164 Sebastian Pop <sebastian.pop@amd.com>
4166 * graphite-poly.h (print_iteration_domain): New.
4167 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4168 (build_sese_conditions_1, build_sese_conditions_after,
4169 build_sese_conditions_before): New.
4170 (build_sese_conditions): Rewritten.
4172 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4173 Tobias Grosser <grosser@fim.uni-passau.de>
4175 Cleanup of code generation liveouts.
4176 * graphite-clast-to-gimple.c (translate_clast): Use a single
4177 rename_map instead of one per translated statement.
4178 Do not use SESE_LIVEOUT_RENAMES.
4179 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4180 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4181 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4182 phi node of a reduction: when a loop contains a reduction used outside
4183 the loop, there should be a scalar close phi node on the exit block.
4184 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4185 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4186 (free_sese): Do not free them.
4187 (sese_build_liveouts_use): Do not use them.
4188 (sese_build_liveouts_bb): Same.
4189 (sese_build_liveouts): Same.
4190 (sese_insert_phis_for_liveouts): Same.
4191 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4192 (defined_in_loop_p): New.
4193 (alive_after_loop): New.
4194 (close_phi_not_yet_inserted_p): New.
4195 (struct alep, alep_p): New.
4196 (add_loop_exit_phis): Remove from the rename_map all the names defined
4197 in the code generated loop.
4198 (insert_loop_close_phis): Traverse the rename_map passed to it.
4199 Don't use SESE_LIVEOUT_RENAMES.
4200 (default_liveout_before_guard): Renamed default_before_guard.
4201 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4202 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4203 (register_sese_liveout_renames): Removed.
4204 (copy_bb_and_scalar_dependences): Do not call it.
4205 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4207 (SESE_LIVEOUT): Removed.
4208 (SESE_LIVEOUT_RENAMES): Removed.
4209 (SESE_REDUCTION_LIST): Removed.
4210 (sese_build_liveouts): Removed.
4211 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4212 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4213 (insert_guard_phis): Same.
4214 (rename_map_elt): Declare a VEC of them.
4215 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4216 trees not pointers to trees.
4218 Rewrite in canonical close SSA form:
4219 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4220 (limit_scops): Close the scop after the block containing the close phi
4222 (canonicalize_loop_closed_ssa): New.
4223 (canonicalize_loop_closed_ssa_form): New.
4224 (build_scops): Call canonicalize_loop_closed_ssa_form.
4226 * graphite-sese-to-poly.c: Fix typos.
4228 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4230 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4232 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4233 (print_pbb): Add conditions.
4235 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4236 Sebastian Pop <sebastian.pop@amd.com>
4238 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4239 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4240 (build_scop_bbs_1): New.
4241 (build_scop_bbs): Rewrite.
4242 * sese.h (bb_in_region): New.
4244 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4246 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4248 (print_scop): Style.
4249 * graphite-poly.h (poly_bb): Add drs vector.
4250 (PBB_DRS): Add accessor.
4251 * graphite-sese-to-poly.c (build_poly_dr): New.
4252 (build_pbb_drs, build_scop_drs): New.
4253 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4255 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4257 * tree-ssa-loop.c: Include forgotten toplev.h
4259 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4261 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4262 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4263 * gcc.dg/graphite/pr37928.c: Same
4264 * gcc.dg/graphite/pr38409.c: Same
4265 * gcc.dg/graphite/pr38498.c: Same
4266 * gcc.dg/graphite/pr38559.c: Same
4267 * gcc.dg/graphite/pr39335.c: Same
4268 * gcc.dg/graphite/pr39335_1.c: Same
4269 * gfortran.dg/graphite/block-2.f: Same
4270 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4273 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4275 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4276 build_access_matrix, build_scop_data_accesses): Remove access function
4277 building. (We get a new version soon).
4278 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4279 * sese.h (nb_loops_around_loop_in_sese): Remove.
4280 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4282 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4283 Sebastian Pop <sebastian.pop@amd.com>
4285 * graphite-scop-detection.c (struct scopdet_info): Rename last
4287 (scopdet_basic_block_info, build_scops_1): Don't use
4288 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4290 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4291 Sebastian Pop <sebastian.pop@amd.com>
4293 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4294 * sese.c (sese_build_liveouts_use): Renamed from
4295 sese_build_livein_liveouts_use. Remove liveins.
4296 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4297 Call sese_build_liveouts_use.
4298 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4299 Call sese_build_liveouts_bb.
4300 (new_sese, free_sese): Remove liveins.
4301 (sese_add_exit_phis_var): Deleted.
4302 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4304 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4306 * sese.h (sese): Remove num_ver and livein.
4307 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4309 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4311 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4313 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4315 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4316 (build_scop_scattering): Do not use compare_prefix_loops any more.
4317 (nb_common_loops): New.
4319 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4321 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4322 (register_old_and_new_names): Renamed set_rename.
4324 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4326 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4327 of the decl from the previous commit.
4329 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4331 * graphite-scop-detection.c (dot_scop): New.
4332 * graphite-scop-detection.h (dot_scop): Declared.
4334 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4336 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4338 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4340 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4341 condition at the end of the loop.
4342 * graphite.c (graphite_initialize, graphite_finalize): Print to
4343 dump_file the compiled function.
4344 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4345 of create_empty_loop_on_edge.
4346 (translate_clast): Update the code generation of loops for the new
4348 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4350 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4352 Reverted the patch from 2009-03-19.
4354 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4356 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4358 (print_scop): Style.
4359 * graphite-poly.h (poly_bb): Add drs vector.
4360 (PBB_DRS): Add accessor.
4361 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4362 (build_access_matrix_with_af, build_access_matrix,
4363 build_scop_data_accesses): Delete.
4364 (build_poly_dr): New.
4365 (build_pbb_drs, build_scop_drs): New.
4366 (build_poly_scop): call build_scop_drs.
4368 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4370 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4371 once per basic block.
4373 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4375 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4376 (graphite_can_represent_expr): Renamed from loop_affine_expr
4378 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4379 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4380 (scopdet_basic_block_info): Actually define entry_block.
4381 (stmt_simple_memref_p): Moved here from ...
4383 * tree-data-ref.c (stmt_simple_memref_p): here.
4384 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4386 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4388 * gcc.dg/graphite/id-4.c: New.
4390 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4392 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4393 (register_old_and_new_names): Update the content of the map.
4394 When there was already a rename_map_elt in the map at that
4396 (copy_bb_and_scalar_dependences): Do rename_variables after
4397 expand_scalar_variables.
4398 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4399 of the map. When there was already a rename_map_elt in the
4400 map at that location, free it.
4401 (translate_clast): Pass the rename_map. Do not initialize and free
4402 a rename_map per stmt_user.
4403 (gloog): Initialize and free one rename_map and pass it to
4406 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4408 * sese.c (expand_scalar_variables_stmt,
4409 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4411 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4412 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4413 the gimple_stmt_iterator of the statement to be expanded.
4414 * graphite-scop-detection.c (is_simple_operand): Do handle
4417 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4419 * graphite-scop-detection.c (is_simple_operand): Do not handle
4421 * gcc.dg/graphite/id-2.c: New.
4423 * graphite-sese-to-poly.c (build_bb_loops,
4424 add_value_to_dim, scan_tree_for_params_right_scev,
4425 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4426 find_params_in_bb, build_loop_iteration_domains,
4427 add_conditions_to_domain): Remove subtract.
4429 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4431 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4432 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4433 pbb_loop_at_index -> gbb_loop_at_index.
4434 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4435 (debug_loop_vec): Delete.
4436 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4437 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4438 (PBB_LOOPS): Removed.
4439 (PBB_BLACK_BOX): Insert cast.
4440 (pbb_set_black_box): New setter.
4441 (pbb_loop_at_index, pbb_loop_index): Removed.
4442 (scop_set_region, scop_set_nb_params): New.
4443 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4444 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4445 (build_poly_scop): Use scop_set_nb_params.
4446 * sese.h (gimple_bb): Add LOOPS.
4447 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4449 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4451 Revert previous commit.
4453 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4455 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4456 (register_old_and_new_names): Update the content of the map.
4457 When there was already a rename_map_elt in the map at that
4459 (copy_bb_and_scalar_dependences): Do rename_variables after
4460 expand_scalar_variables.
4461 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4462 of the map. When there was already a rename_map_elt in the
4463 map at that location, free it.
4464 (translate_clast): Pass the rename_map. Do not initialize and free
4465 a rename_map per stmt_user.
4466 (gloog): Initialize and free one rename_map and pass it to
4469 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4471 Remove forgotten line in revert.
4473 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4475 Revert previous commit.
4477 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4479 * sese.c (register_old_and_new_names): Update the content
4480 of the map. When there was already a rename_map_elt in the
4481 map at that location, free it.
4482 (copy_bb_and_scalar_dependences): Do rename_variables after
4483 expand_scalar_variables.
4484 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4485 of the map. When there was already a rename_map_elt in the
4486 map at that location, free it.
4487 (translate_clast): Pass the rename_map. Do not initialize and free
4488 a rename_map per stmt_user.
4489 (gloog): Initialize and free one rename_map and pass it to
4492 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4494 * graphite-clast-to-gimple.c (translate_clast): context_loop
4497 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4498 Sebastian Pop <sebastian.pop@amd.com>
4500 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4501 of the use of ppl_Polyhedron_map_space_dimensions.
4503 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4504 Sebastian Pop <sebastian.pop@amd.com>
4506 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4507 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4508 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4509 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4510 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4511 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4512 pbb_nb_params): New.
4513 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4514 nb_loops_around_pbb): Adapt return types.
4516 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4518 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4519 graphite-clast-to-gimple.o, graphite-data-ref.o,
4520 graphite-scop-detection.o, graphite-poly.o): Add
4523 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4525 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4526 graphite-clast-to-gimple.o, graphite-data-ref.o,
4527 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4529 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4531 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4532 * gcc.dg/graphite/pr37828.c: Same.
4533 * gcc.dg/graphite/pr37684.c: Same.
4534 * gcc.dg/graphite/block-0.c: Same.
4535 * gcc.dg/graphite/block-1.c: Same.
4536 * gcc.dg/graphite/block-2.c: Same.
4537 * gcc.dg/graphite/block-3.c: Same.
4538 * gcc.dg/graphite/block-4.c: Same.
4539 * gcc.dg/graphite/block-5.c: Same.
4540 * gcc.dg/graphite/block-6.c: Same.
4541 * gfortran.dg/graphite/pr38083.f90: Same.
4542 * gfortran.dg/graphite/block-1.f90: Same.
4543 * gfortran.dg/graphite/block-3.f90: Same.
4544 * gfortran.dg/graphite/pr37852.f90: Same.
4545 * gfortran.dg/graphite/block-4.f90: Same.
4546 * gfortran.dg/graphite/pr37980.f90: Same.
4547 * gfortran.dg/graphite/pr38953.f90: Same.
4548 * gfortran.dg/graphite/pr37857.f90: Same.
4549 * opts.c: Remove -floop-block from -O2.
4550 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4551 -floop-strip-mine are used.
4553 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4554 Sebastian Pop <sebastian.pop@amd.com>
4556 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4558 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4559 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4560 strip_mine_profitable_p, is_interchange_valid,
4561 graphite_trans_bb_block, graphite_trans_loop_block,
4562 graphite_trans_scop_block): Temporary removed.
4563 (extend_scattering, unify_scattering_dimensions): New.
4564 (print_scattering_function, graphite_read_transforms):
4565 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4566 (graphite_generate_scattering_fns): Removed.
4567 (apply_poly_transforms): Cleanup.
4568 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4569 (schedule_to_scattering): Moved.
4570 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4571 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4572 (pbb_nb_scattering): New.
4573 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4574 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4576 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4578 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4579 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4580 -> PBB_TRANSFORMED_SCATTERING.
4581 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4582 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4583 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4584 (check_poly_representation): Do not return bool.
4585 (graphite_transform_loops): Reformat.
4586 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4588 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4590 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4591 debug_pbb_domain, debug_pbb, debug_scop): New.
4592 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4593 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4595 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4598 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4599 when the type precision of the induction variable should be
4600 larger than the type precision of nit.
4601 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4602 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4603 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4605 * gcc.dg/graphite/pr39335_1.c: New.
4606 * gcc.dg/graphite/pr39335.c: New.
4608 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4610 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4611 SSA_NAMES not struct reduction_info.
4613 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4615 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4617 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4618 Tobias Grosser <grosser@fim.uni-passau.de>
4620 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4621 (free_sese): Free SESE_REDUCTION_LIST.
4622 * sese.h (struct sese): Add field reduction_list.
4623 (SESE_REDUCTION_LIST): New.
4624 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4625 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4627 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4628 Tobias Grosser <grosser@fim.uni-passau.de>
4630 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4633 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4634 Tobias Grosser <grosser@fim.uni-passau.de>
4636 * tree-parloops.c (struct brli, build_reduction_list_info,
4637 analyze_reduction_list, gather_scalar_reductions): New.
4638 (loop_parallel_p): Build a reduction list containing only
4639 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4640 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4641 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4642 * tree-flow.h (gather_scalar_reductions): Declared.
4644 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4647 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4648 number_of_iterations_exit from a gcc_assert.
4650 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4651 Jan Sjodin <jan.sjodin@amd.com>
4653 * output.h (graphite_out_file, graphite_in_file): Declared.
4654 * toplev.c (graphite_out_file, graphite_in_file): New.
4655 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4656 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4657 Don't call schedule_to_scattering.
4658 * common.opt (fgraphite-write, fgraphite-read): New.
4659 * graphite-poly.c: Include output.h.
4660 (print_scattering_function, print_scattering_functions,
4661 debug_scattering_function, debug_scattering_functions,
4662 graphite_write_transforms, graphite_read_transforms,
4663 graphite_generate_scattering_fns): New.
4664 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4665 Call graphite_generate_scattering_fns, graphite_write_transforms,
4666 graphite_read_transforms.
4667 (new_poly_bb): Initialize PBB_SCATTERING.
4668 (free_poly_bb): Free PBB_SCATTERING.
4669 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4670 * graphite-poly.h (struct poly_bb): Add field scattering.
4671 (PBB_SCATTERING): New.
4672 (print_scattering_function, print_scattering_functions,
4673 debug_scattering_function, debug_scattering_functions): Declared.
4674 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4675 GMP values, not integers!
4676 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4677 ppl_read_polyhedron_matrix): New.
4678 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4679 debug_ppl_polyhedron_matrix,
4680 ppl_read_polyhedron_matrix): Declared.
4681 * Makefile.in (graphite-poly.o): Depends on output.h.
4683 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4684 Tobias Grosser <grosser@fim.uni-passau.de>
4687 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4688 scalar evolutions in the scop_entry->loop_father.
4690 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4691 Tobias Grosser <grosser@fim.uni-passau.de>
4693 * graphite.h (ref_nb_loops): Remove declaration.
4694 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4695 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4696 debug_gbb): Moved to sese.h.
4699 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4700 Tobias Grosser <grosser@fim.uni-passau.de>
4702 * graphite-data-ref.[ch]: Disable.
4704 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4705 Tobias Grosser <grosser@fim.uni-passau.de>
4707 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4708 scalar evolutions in the scop_entry->loop_father.
4710 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4712 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
4713 (graphite_cannot_represent_loop_niter): Renamed
4714 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
4715 (limit_scops): build_sese_loop_nests does not return a bool.
4716 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
4717 * sese.c (nb_reductions_in_loop): ... from here.
4718 (graphite_loop_normal_form): ... from here.
4719 (sese_record_loop): Does not fail, so does not return a bool.
4720 (build_sese_loop_nests): Same.
4721 * sese.h (build_sese_loop_nests): Update declaration.
4722 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
4723 (build_graphite_loop_normal_form): New.
4724 (gloog): Call build_graphite_loop_normal_form.
4725 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
4726 build_sese_loop_nests.
4728 * gcc.dg/graphite/id-1.c: New.
4730 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4731 Tobias Grosser <grosser@fim.uni-passau.de>
4733 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
4734 The SCoP detection fix is sufficient.
4736 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4738 PR tree-optimization/39260
4739 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
4740 the basic block contains a condition with a real type.
4741 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
4743 * gcc.dg/graphite/pr39260.c: New.
4745 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4747 * graphite-poly.c: Inlcude params.h.
4748 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
4750 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
4751 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
4753 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4754 Tobias Grosser <grosser@fim.uni-passau.de>
4756 * graphite-scop-detection.c (dot_all_scops_1,
4757 dot_all_scops): Moved here.
4758 * graphite-scop-detection.h (dot_all_scops): Declared here.
4759 * graphite.c (graphite_initialize, graphite_finalize): New.
4760 (graphite_transform_loops): Cleaned up.
4761 * sese.c (debug_oldivs): Moved here.
4762 * graphite-poly.c (graphite_apply_transformations): Renamed
4763 apply_poly_transforms.
4764 (debug_loop_vec): Moved here.
4765 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
4766 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
4767 find_scop_parameters, build_scop_iteration_domain,
4768 add_conditions_to_constraints, build_scop_canonical_schedules,
4769 build_scop_data_accesses): Now static.
4770 (build_poly_scop, check_poly_representation): New.
4772 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4774 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
4775 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
4776 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
4777 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
4778 scan_tree_for_params_right_scev, scan_tree_for_params_int,
4779 scan_tree_for_params, struct irp_data, dx_record_params,
4780 find_params_in_bb, find_scop_parameters, gbb_from_bb,
4781 build_loop_iteration_domains, add_conditions_to_domain,
4782 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
4783 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
4784 build_sese_conditions, add_conditions_to_constraints,
4785 build_scop_iteration_domain, build_access_matrix_with_af,
4786 build_access_matrix,
4787 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
4789 * graphite-sese-to-poly.c: New.
4790 * graphite-sese-to-poly.h: New.
4792 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
4794 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4796 * graphite.c: Split graphite code generation to a new file.
4797 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
4798 max_precision_type, clast_to_gcc_expression_red,
4799 clast_to_gcc_expression, gcc_type_for_clast_expr,
4800 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
4801 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
4802 graphite_create_new_guard, clast_get_body_of_loop,
4803 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
4804 graphite_create_new_loop, build_iv_mapping, copy_renames,
4805 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4806 compute_cloog_iv_types, free_scattering, save_var_name,
4807 initialize_cloog_names, build_scop_context, build_cloog_prog,
4808 set_cloog_options, debug_clast_stmt, scop_to_clast,
4809 print_generated_program, debug_generated_program,
4810 gloog): Moved to graphite-clast-to-gimple.c.
4812 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
4814 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
4815 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
4816 loop_iv_stack_pop, loop_iv_stack_get_iv,
4817 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
4818 free_loop_iv_stack, loop_iv_stack_remove_constants,
4819 debug_rename_elt, debug_rename_map_1, debug_rename_map,
4820 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
4821 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
4822 eq_ivtype_map_elts, sese_add_exit_phis_edge,
4823 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
4824 get_vdef_before_sese, sese_adjust_vphi,
4825 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
4826 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
4827 is_iv, expand_scalar_variables_ssa_name,
4828 expand_scalar_variables_expr, expand_scalar_variables_stmt,
4829 expand_scalar_variables, rename_variables, remove_condition,
4830 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
4831 add_loop_exit_phis, insert_loop_close_phis, struct igp,
4832 default_liveout_before_guard, add_guard_exit_phis,
4833 insert_guard_phis, register_old_and_new_names,
4834 graphite_copy_stmts_from_block, register_sese_liveout_renames,
4835 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
4836 if_region_set_false_region, create_if_region_on_edge,
4837 move_sese_in_condition): Moved to sese.c.
4839 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
4840 if_region_exit, if_region_get_condition_block,
4841 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
4842 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
4843 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
4844 ivtype_map_elt, new_ivtype_map_elt,
4845 recompute_all_dominators): Moved to sese.h.
4847 * graphite-clast-to-gimple.c: New.
4848 * graphite-clast-to-gimple.h: New.
4849 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
4850 * sese.c: Modified as said above.
4853 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4855 * graphite.c: Split scop detection to a new file.
4856 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
4857 move_sd_regions, loop_affine_expr, exclude_component_ref,
4858 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
4859 graphite_cannot_represent_loop_niter, struct scopdet_info,
4860 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
4861 find_single_entry_edge, find_single_exit_edge,
4862 create_single_entry_edge, sd_region_without_exit,
4863 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
4864 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
4865 Moved to graphite-scop-detection.c.
4867 * graphite-scop-detection.c: New.
4868 * graphite-scop-detection.h: New.
4869 * Makefile.in: Add new rule for graphite-scop-detection.o.
4871 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
4872 tree-scalar-evolution.h.
4873 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
4874 build_sese_loop_nests): Moved here from graphite.c.
4875 (param_index): Renamed parameter_index_in_region.
4877 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4878 Sebastian Pop <sebastian.pop@amd.com>
4880 * gcc.dg/graphite/block-0.c: Expected to fail now.
4881 * gcc.dg/graphite/block-1.c: Same.
4882 * gcc.dg/graphite/block-5.c: Same.
4883 * gcc.dg/graphite/block-6.c: Same.
4885 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4886 Sebastian Pop <sebastian.pop@amd.com>
4888 * graphite.h: Separate from graphite_bb_p the polyhedral
4889 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
4890 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
4891 graphite-data-ref.h.
4892 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
4893 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
4894 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
4895 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4896 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
4897 scop_nb_params): Moved to graphite-poly.h.
4898 * graphite-data-ref.c: Same.
4899 * graphite-data-ref.h: New.
4901 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
4902 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
4903 is_interchange_valid, graphite_trans_bb_block,
4904 graphite_trans_loop_block, scop_max_loop_depth,
4905 graphite_trans_scop_block, graphite_apply_transformations,
4906 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
4908 * graphite-poly.h: New.
4909 * graphite-poly.c: New.
4910 * Makefile.in (OBJS-common): Add graphite-poly.o.
4911 (graphite-poly.o): New rule.
4912 * tree-data-ref.h (struct data_reference): Remove unused scop field.
4915 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4916 Tobias Grosser <grosser@fim.uni-passau.de>
4918 * graphite.c: Replace gb -> gbb.
4920 * graphite-data-ref.c: Same.
4922 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4923 Tobias Grosser <grosser@fim.uni-passau.de>
4925 * Makefile.in (OBJS-commmon): Add sese.o.
4927 (graphite.o): Add sese.h.
4928 * graphite.c (bb_in_ss_p, loop_in_sese_p,
4929 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
4930 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
4932 (block_before_scop): Add missing return.
4933 (new_scop, free_scop): Remove SESE data structures.
4934 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
4935 find_scop_parameters, build_loop_iteration_domains,
4936 add_conditions_to_domain, register_scop_liveout_renames,
4937 copy_bb_and_scalar_dependences): Scop -> SESE.
4939 (add_conditions_to_domain): SCoP -> SESE and remove check
4940 (scop_contains_non_iv_scalar_phi_nodes): New.
4941 (build_scop_conditions_1, build_scop_conditions): Remove check for
4942 non iv scalar phi nodes.
4943 (print_scop_statistics): New.
4944 (graphite_transform_loops): Cleanup.
4946 * graphite.h: Move to sese & cleanup.
4950 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4951 Tobias Grosser <grosser@fim.uni-passau.de>
4953 * graphite.c (build_scop_conditions_1): Conditions are only
4954 at the end of a basic block.
4956 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4957 Tobias Grosser <grosser@fim.uni-passau>
4959 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
4961 (GBB_ALPHA): Removed.
4963 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4964 Tobias Grosser <grosser@fim.uni-passau.de>
4966 * graphite-data-ref.c (graphite_test_dependence): Don't use
4967 GBB_DYNAMIC_SCHEDULE.
4968 * graphite.c (new_graphite_bb): Same.
4969 (free_graphite_bb): Same.
4970 (build_scop_dynamic_schedules): Removed.
4971 (graphite_transform_loops): Don't call it.
4972 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
4973 (GBB_DYNAMIC_SCHEDULE): Removed.
4975 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4976 Tobias Grosser <grosser@fim.uni-passau.de>
4978 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
4979 (print_graphite_bb): Same.
4980 (build_cloog_prog): Same.
4982 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4983 Tobias Grosser <grosser@fim.uni-passau.de>
4985 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
4987 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4988 Tobias Grosser <grosser@fim.uni-passau.de>
4990 * graphite.c (build_scop_context): Don't use CloogMatrix.
4991 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
4992 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
4994 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4995 Tobias Grosser <grosser@fim.uni-passau.de>
4997 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
4998 liveout_renames, add_params fields...
4999 (struct sese): ... here.
5000 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5001 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5003 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5004 Tobias Grosser <grosser@fim.uni-passau.de>
5006 * graphite.c (print_scop): Do not print the CLooG program.
5007 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5008 build_cloog_prog, gloog): Don't use SCOP_PROG.
5009 (find_transform): Renamed scop_to_clast.
5010 (print_generated_program, debug_generated_program): New.
5011 (graphite_transform_loops): Adapt to new interface.
5012 * graphite.h (struct scop): Remove program field.
5013 (SCOP_PROG): Removed.
5014 (print_generated_program, debug_generated_program): Declared.
5016 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5018 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5019 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5020 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5021 free_graphite_bb, build_scop_canonical_schedules,
5022 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5023 schedules are now represented using a ppl_Linear_Expression_t.
5024 * graphite.h (struct graphite_bb): Same.
5025 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5026 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5028 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5030 * graphite.c: Free local memory.
5031 * graphite-ppl.c: Same.
5033 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5035 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5036 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5037 swap_constraint_variables, scale_constraint_variable): Removed.
5038 (graphite_trans_bb_strip_mine): Remove pong.
5039 * graphite-ppl.c: Include missing header files.
5040 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5041 * graphite-ppl.h (ppl_strip_loop): Declared.
5042 * Makefile.in (graphite-ppl.o): Adjust dependences.
5044 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5046 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5047 (build_scop_iteration_domain): Same.
5049 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5051 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5053 (add_value_to_dim, scan_tree_for_params_right_scev,
5054 scan_tree_for_params_int): New.
5055 * graphite-ppl.c (oppose_constraint): New.
5056 (insert_constraint_into_matrix): Implement missing cases.
5057 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5059 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5061 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5062 use ppl_move_dimension.
5064 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5066 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5069 * graphite-ppl.c: Same.
5070 * graphite-ppl.h: Same.
5072 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5074 Revert last 3 commits.
5076 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5078 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5080 (add_value_to_dim, scan_tree_for_params_right_scev,
5081 scan_tree_for_params_int): New.
5082 * graphite-ppl.c (oppose_constraint): New.
5083 (insert_constraint_into_matrix): Implement missing cases.
5084 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5086 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5088 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5090 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5091 Tobias Grosser <grosser@fim.uni-passau.de>
5093 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5094 use ppl_move_dimension.
5095 * graphite-ppl.c (ppl_move_dimension): New.
5096 * graphite-ppl.h (ppl_move_dimension): Declared.
5098 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5100 * graphite.c: Do not include cloog/cloog.h.
5101 (print_graphite_bb): Remove ping pong, call PPL print function.
5103 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5105 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5106 (graphite.o): Add dependence on graphite-ppl.h.
5107 (graphite-ppl.o): New.
5108 (graphite-data-ref.c): Ping pong between PPL data structures
5110 * graphite-ppl.c: New.
5111 * graphite-ppl.h: New.
5112 * graphite.c: Include graphite-ppl.h.
5113 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5114 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5115 Ping pong between PPL data structures and matrices.
5116 (new_graphite_bb): Create a PPL constraint system.
5117 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5118 (build_loop_iteration_domains): Use PPL functions.
5119 * graphite.h: Include graphite-ppl.h. Fix comments.
5120 (graphite_bb): Use a ppl_Constraint_System_t instead of
5121 CloogMatrix for representing the domain.
5122 (scop): Remove static_schedule.
5123 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5125 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5127 * graphite.c: Fix some comments.
5129 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5132 * graphite.c (if_region_set_false_region): After moving a region
5133 in the false branch of a condition, remove the empty dummy
5135 (gloog): Remove wrong fix for PR38953.
5137 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5139 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5140 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5141 register_bb_in_sese, new_sese, free_sese): Moved.
5142 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5143 outermost_loop_in_scop, build_scop_iteration_domain,
5144 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5145 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5146 Use loop_in_sese_p instead of loop_in_scop_p.
5147 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5148 (free_scop): Do not free SCOP_BBS_B.
5149 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5150 ref_nb_loops): Moved here...
5151 * graphite.h (ref_nb_loops): ... from here.
5152 (struct scop): Remove bbs_b bitmap.
5153 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5154 * gcc.dg/graphite/scop-19.c: New
5156 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5158 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5161 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5163 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5164 eq_loop_to_cloog_loop): Remove.
5165 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5166 * graphite.h (struct scop): Remove loop2cloog_loop.
5167 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5169 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5171 * opts.c (decode_options): Only add graphite options to O2
5172 if we compile with graphite enabled.
5174 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5176 * Merge from mainline (r143163:143684).
5178 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5180 * graphite.c (debug_value): Removed.
5181 * graphite.h (debug_value): Removed.
5183 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5185 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5186 after graphite: pass_copy_prop does not maintain a proper loop closed
5187 SSA form. pass_copy_prop should be fixed.
5189 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5191 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5193 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5195 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5196 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5197 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5200 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5202 * graphite.c (gloog): Return true when code gen succeeded.
5203 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5204 the code of the function did not changed. After cleanup_tree_cfg
5205 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5208 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5210 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5211 gimple_call_lhs is NULL.
5213 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5214 Tobias Grosser <tobi.grosser@amd.com>
5216 * graphite.c (graphite_trans_scop_block): Do not block single
5219 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5220 Tobias Grosser <tobi.grosser@amd.com>
5222 * graphite.c (build_scop_canonical_schedules): Start schedules at
5225 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5226 Tobias Grosser <tobi.grosser@amd.com>
5228 * graphite.c (compare_prefix_loops): New.
5229 (build_scop_canonical_schedules): Rewritten.
5230 (graphite_transform_loops): Move build_scop_canonical_schedules
5231 after build_scop_iteration_domain.
5233 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5234 Tobias Grosser <tobi.grosser@amd.com>
5236 * graphite.c (add_conditions_to_domain): Add the loops to
5237 the dimension of the iteration domain. Do copy the domain
5238 only when it exists.
5239 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5240 (add_conditions_to_constraints): New.
5241 (can_generate_code_stmt, can_generate_code): Removed.
5242 (gloog): Do not call can_generate_code.
5243 (graphite_transform_loops): Call add_conditions_to_constraints
5244 after building the iteration domain.
5246 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5247 Tobias Grosser <tobi.grosser@amd.com>
5248 Jan Sjodin <jan.sjodin@amd.com>
5250 * graphite.c (scan_tree_for_params): On substractions negate
5251 all the coefficients of the term.
5252 (clast_to_gcc_expression_red): New. Handle reduction expressions
5253 of more than two operands.
5254 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5255 (get_vdef_before_scop): Handle also the case of default definitions.
5257 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5260 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5261 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5262 (gloog): Do not call cleanup_tree_cfg.
5263 (graphite_transform_loops): Call cleanup_tree_cfg after all
5264 scops have been code generated.
5266 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5268 * passes.c (init_optimization_passes): Schedule after
5269 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5271 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5273 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5275 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5276 Set the type of an expression to the type of its assign statement.
5277 (expand_scalar_variables_expr): Do not pass loop_p.
5278 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5279 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5280 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5282 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5284 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5285 an expression to the gimple_expr_type of its assign statement.
5286 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5289 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5291 PR tree-optimization/38786
5292 * gcc.dg/graphite/pr38786.c: New.
5293 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5294 the SSA_NAME case of expand_scalar_variables_expr.
5295 (expand_scalar_variables_expr): Also gather the scalar computation
5296 used to index the memory access.
5297 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5298 the gimple_stmt_iterator where it inserts new code.
5300 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5302 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5304 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5306 * opts.c (decode_options): Enable flag_graphite_identity and
5307 flag_loop_block in -O2 and above.
5309 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5311 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5312 Fix merge problem: replace with the file from trunk.
5314 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5316 * Merge from mainline (r141727:143163).
5318 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5319 Jan Sjodin <jan.sjodin@amd.com>
5321 PR tree-optimization/38559
5322 * gcc.dg/graphite/pr38559.c: New.
5324 * graphite.c (debug_value, copy_constraint,
5325 swap_constraint_variables, scale_constraint_variable, ): New.
5326 (get_lower_bound, get_upper_bound): Removed.
5327 (graphite_trans_bb_strip_mine): Clean up this code that works
5328 only for constant number of iterations. Fully copy upper and
5329 lower bound constraints, not only the constant part of them.
5330 * graphite.h (debug_value): Declared.
5332 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5334 PR tree-optimization/38492
5335 PR tree-optimization/38498
5336 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5337 * tree-chrec.h (scev_is_linear_expression): Declared.
5338 * graphite.c (graphite_cannot_represent_loop_niter): New.
5339 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5340 (graphite_loop_normal_form): Use gcc_assert.
5341 (scan_tree_for_params): Use CASE_CONVERT.
5342 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5343 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5344 Use gcc_assert. Discard scops that contain unhandled cases.
5345 (build_scop_conditions): Return a boolean status for unhandled cases.
5346 (strip_mine_profitable_p): Print the loop number, not its depth.
5347 (is_interchange_valid): Pass the depth of the loop nest, don't
5348 recompute it wrongly.
5349 (graphite_trans_bb_block): Same.
5350 (graphite_trans_bb_block): Print tentative of loop blocking.
5351 (graphite_trans_scop_block): Do not print that the loop has been
5353 (graphite_transform_loops): Do not handle scops that contain condition
5356 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5358 * gcc.dg/graphite/block-0.c: Update test.
5359 * gcc.dg/graphite/block-1.c: Same.
5360 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5362 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5363 * gcc.dg/graphite/block-3.c: New.
5364 * gcc.dg/graphite/pr38498.c: New.
5366 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5368 PR tree-optimization/38510
5369 * gcc.dg/graphite/pr38510.c: New.
5370 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5371 (translate_clast): Call recompute_all_dominators before
5373 (gloog): Call recompute_all_dominators before graphite_verify.
5375 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5377 PR tree-optimization/38492
5378 * graphite.c (rename_map_elt, debug_rename_elt,
5379 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5380 rename_map_elt_info, eq_rename_map_elts,
5381 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5382 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5383 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5384 (sese_build_livein_liveouts): New.
5385 (new_sese, free_sese): New.
5386 (new_scop): Call new_sese.
5387 (free_scop): Call free_sese.
5388 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5389 (register_old_new_names): Renamed register_old_and_new_names.
5390 (register_scop_liveout_renames, add_loop_exit_phis,
5391 insert_loop_close_phis, struct igp,
5392 default_liveout_before_guard, add_guard_exit_phis,
5393 insert_guard_phis, copy_renames): New.
5394 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5395 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5396 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5397 (scop_adjust_phis_for_liveouts): New.
5398 (gloog): Call scop_adjust_phis_for_liveouts.
5400 * graphite.h (struct sese): Documented. Added fields liveout,
5402 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5403 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5404 (struct scop): Added field liveout_renames.
5405 (SCOP_LIVEOUT_RENAMES): New.
5407 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5409 PR tree-optimization/38409
5410 * gcc.dg/graphite/pr38409.c: New.
5411 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5413 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5415 * graphite.c (gcc_type_for_cloog_iv): By default return
5417 (graphite_create_new_loop): Don't fold_convert the already
5418 fold_convert-ed expression.
5420 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5422 PR tree-optimization/38446
5423 * gcc.dg/graphite/pr38446.c: New.
5424 * graphite.c (register_bb_in_sese): New.
5425 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5426 looking at the bbs in the region.
5427 * graphite.h (sese): Add region_basic_blocks pointer set to
5428 structure and initialize at the time of defining new scop.
5430 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5432 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5433 (find_params_in_bb): Do not free data refs.
5434 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5436 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5438 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5439 * gcc.dg/graphite/scop-17.c: Same.
5440 * gcc.dg/graphite/block-5.c: New.
5441 * gcc.dg/graphite/block-6.c: New.
5442 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5443 * gcc.dg/graphite/pr37684.c: Same.
5444 * gcc.dg/graphite/block-2.c: Same.
5446 * graphite.c (struct ivtype_map_elt): New.
5447 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5448 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5449 gcc_type_for_cloog_iv): New.
5450 (loop_iv_stack_patch_for_consts): Use the type of the induction
5451 variable from the original loop, except for the automatically
5452 generated loops, i.e., in the case of a strip-mined loop, in
5453 which case there is no original loop: in that case just use
5455 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5456 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5457 (clast_name_to_gcc): Accept params to be NULL.
5458 (clast_to_gcc_expression): Take an extra parameter for the type.
5459 Convert to that type all the expressions built by this function.
5460 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5461 (graphite_translate_clast_equation): Compute the type of the
5462 clast_equation before translating its LHS and RHS.
5463 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5464 (graphite_create_new_loop): Compute the type of the induction
5465 variable before translating the lower and upper bounds and before
5466 creating the induction variable.
5467 (rename_variables_from_edge, rename_phis_end_scop): New.
5468 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5469 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5470 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5471 compute_cloog_iv_types): New.
5472 (gloog): Call compute_cloog_iv_types before starting the
5473 translation of the clast.
5475 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5476 (GBB_CLOOG_IV_TYPES): New.
5477 (debug_ivtype_map): Declared.
5478 (oldiv_for_loop): New.
5480 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5483 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5484 (param_index): Assert if parameter is not know after parameter
5486 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5487 (find_scop_parameters): Mark, that we have finished parameter
5489 (graphite_transform_loops): Move condition detection before parameter
5491 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5492 * gfortran.dg/graphite/pr38459.f90: New.
5494 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5496 * graphite.c (graphite_transform_loops): Always call find_transform ()
5497 in ENABLE_CHECKING. So we test these code paths, even if we do not
5500 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5502 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5503 (print_scop): Ditto.
5505 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5508 Fix gfortran.dg/graphite/id-3.f90.
5509 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5510 regions more than once.
5512 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5514 Fix gfortran.dg/graphite/id-4.f90.
5515 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5518 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5520 Fix gfortran.dg/graphite/id-1.f90.
5521 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5522 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5523 (max_precision_type): New.
5524 (value_clast): Removed.
5525 (clast_to_gcc_expression): Be more careful to types of expressions.
5526 Use max_precision_type and update use of gmp_cst_to_tree.
5527 (graphite_translate_clast_equation): Use max_precision_type.
5528 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5529 use the type of the condition.
5530 (graphite_create_new_loop): Do not use integer_type_node, use the
5531 max_precision_type of lb and ub.
5533 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5535 * graphite.c (build_scops_1): Initialize open_scop.exit
5538 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5540 * gcc.dg/graphite/pr38084.c: New.
5541 * gfortran.dg/graphite/id-1.f90: New.
5542 * gfortran.dg/graphite/id-2.f90: New.
5543 * gfortran.dg/graphite/id-3.f90: New.
5544 * gfortran.dg/graphite/id-4.f90: New.
5545 * gfortran.dg/graphite/pr37857.f90: New.
5547 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5548 Jan Sjodin <jan.sjodin@amd.com>
5549 Harsha Jagasia <harsha.jagasia@amd.com>
5561 * gcc.dg/graphite/pr38073.c: New.
5562 * gcc.dg/graphite/pr37928.c: New.
5563 * gcc.dg/graphite/pr37883.c: New.
5564 * gcc.dg/graphite/pr38125.c: New.
5565 * gfortran.dg/graphite/pr38083.f90: New.
5566 * gfortran.dg/graphite/pr37852.f90: New.
5567 * gfortran.dg/graphite/pr37980.f90: New.
5569 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5570 the number of detected scops. Copy exact same test for loop
5572 * gcc.dg/graphite/block-1.c: Fix the number of expected
5573 loops to be blocked as reductions are not handled.
5574 * gcc.dg/graphite/block-4.c: ...here. New.
5576 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5577 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5579 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5580 * Makefile.in (graphite.o): Depend on value-prof.h.
5581 (graphite.o-warn): Removed -Wno-error.
5582 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5583 to be a NULL pointer. Call update_stmt. Return the newly created
5584 cannonical induction variable.
5586 * graphite.h (debug_rename_map): Declared. Fix some comments.
5588 * graphite.c: Reimplement the code generation from graphite to gimple.
5589 Include value-prof.h.
5590 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5591 (get_old_iv_from_ssa_name): Removed.
5592 (graphite_stmt_p): New.
5593 (new_graphite_bb): Test for useful statements before building a
5594 graphite statement for the basic block.
5595 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5596 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5598 (recompute_all_dominators, graphite_verify,
5599 nb_reductions_in_loop, graphite_loop_normal_form): New.
5600 (scop_record_loop): Call graphite_loop_normal_form.
5601 (build_scop_loop_nests): Iterate over all the blocks of the
5602 function instead of relying on the incomplete information from
5603 SCOP_BBS. Return the success of the operation.
5604 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5605 (add_bb_domains): Removed.
5606 (build_loop_iteration_domains): Don't call add_bb_domains.
5607 Add the iteration domain only to the basic blocks that have been
5608 translated to graphite.
5609 (build_scop_conditions_1): Add constraints only if the basic
5610 block have been translated to graphite.
5611 (build_scop_data_accesses): Completely disabled until data
5612 dependence is correctly implemented.
5613 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5614 (remove_all_edges_1, remove_all_edges): Removed.
5615 (get_new_name_from_old_name): New.
5616 (graphite_rename_variables_in_stmt): Renamed
5617 rename_variables_in_stmt. Call get_new_name_from_old_name.
5618 Use replace_exp and update_stmt.
5619 (is_old_iv): Renamed is_iv.
5620 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5621 Use replace_exp and update_stmt.
5622 (expand_scalar_variables_expr): Same. Use the map to get the
5623 new names for the renaming of induction variables and for the
5624 renaming of variables after a basic block has been copied.
5625 (expand_scalar_variables): Same.
5626 (graphite_rename_variables): Renamed rename_variables.
5627 (move_phi_nodes): Removed.
5628 (get_false_edge_from_guard_bb): New.
5629 (build_iv_mapping): Do not insert the induction variable of a
5630 loop in the renaming iv map if the basic block does not belong
5632 (register_old_new_names, graphite_copy_stmts_from_block,
5633 copy_bb_and_scalar_dependences): New.
5634 (translate_clast): Heavily reimplemented: copy basic blocks,
5635 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5636 At each translation step call graphite_verify ensuring the
5637 consistency of the SSA, loops and dominators information.
5638 (collect_virtual_phis, find_vdef_for_var_in_bb,
5639 find_vdef_for_var_1, find_vdef_for_var,
5640 patch_phis_for_virtual_defs): Removed huge hack.
5641 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5642 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5643 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5644 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5645 if_region_get_condition_block, if_region_set_false_region,
5646 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5647 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5648 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5649 rewrite_into_sese_closed_ssa): New.
5650 (gloog): Remove dead code. Early return if code cannot be
5651 generated. Call cleanup_tree_cfg once the scop has been code
5653 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5654 block loops with less than two loops.
5655 (graphite_apply_transformations): Remove the call to
5656 scop_remove_ignoreable_gbbs.
5657 (limit_scops): When build_scop_loop_nests fails, continue on
5658 the next scop. Fix open_scop.entry.
5659 (graphite_transform_loops): Call recompute_all_dominators: force the
5660 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5661 Call initialize_original_copy_tables and free_original_copy_tables
5662 to be able to copy basic blocks during code generation.
5663 When build_scop_loop_nests fails, continue on next scop.
5664 (value_clast): New union.
5665 (clast_to_gcc_expression): Fix type cast warning.
5667 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5669 * Merge from mainline (r140838:141727).
5671 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5675 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5677 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5681 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5682 exits and conditions.
5683 * gcc.dg/graphite/pr37943.c: New.
5685 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5688 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5690 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5692 * doc/invoke.texi: Fix spaces.
5694 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5696 PR tree-optimization/37891
5697 Reverted last commit.
5698 * graphite.c (create_single_entry_edge): Set
5699 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5701 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5702 Mitul Thakkar <mitul.thakkar@amd.com>
5704 * graphite.c (create_single_entry_edge): Set
5705 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5707 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
5709 * doc/invoke.texi: Add -fgraphite-identity.
5710 * graphite.c (graphite_apply_transformations): Check for
5711 -fgraphite-identity.
5712 * toplev.c (process_options): Add flag_graphite_identity.
5713 * tree-ssa-loop.c: Add flag_graphite_identity.
5715 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5717 Undo changes from 2008-10-02:
5718 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5719 operand type when copying the operand to a variable of different type.
5720 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5721 with the IV name after increment.
5723 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5724 Harsha Jagasia <harsha.jagasia@amd.com>
5726 PR tree-optimization/37828
5727 * gcc.dg/graphite/pr37828.c: New.
5728 * graphite.c (graphite_trans_loop_block): Do not loop block
5729 single nested loops.
5731 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
5732 Sebastian Pop <sebastian.pop@amd.com>
5734 * graphite.c (struct rename_map_elt, new_rename_map_elt,
5735 rename_map_elt_info, eq_rename_map_elts): New.
5736 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
5737 (expand_scalar_variables_expr): Change parameters.
5738 (expand_scalar_variables_stmt): Same.
5739 (expand_scalar_variables): Same.
5740 (graphite_rename_ivs): Rename graphite_rename_variables.
5741 (build_iv_mapping): New.
5742 (translate_clast): Call build_iv_mapping.
5743 * graphite.h (gbb_p): New name.
5745 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
5747 PR tree-optimization/37684
5748 * gcc.dg/graphite/pr37684.c: New.
5749 * graphite.c (exclude_component_ref): New.
5750 (is_simple_operand): Call exclude_component_ref.
5752 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
5753 Harsha Jagasia <harsha.jagasia@amd.com>
5755 PR tree-optimization/37485
5756 * gcc.dg/graphite/block-2.c: New
5757 * graphite.c (gmp_cst_to_tree): Moved.
5758 (iv_stack_entry_is_constant): New.
5759 (iv_stack_entry_is_iv): New.
5760 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
5761 (loop_iv_stack_insert_constant): New.
5762 (loop_iv_stack_pop): Use new datatpype.
5763 (loop_iv_stack_get_iv): Same.
5764 (loop_iv_stack_get_iv_from_name): Same.
5765 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
5766 (loop_iv_stack_patch_for_consts): New.
5767 (loop_iv_stack_remove_constants): New.
5768 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
5769 (translate_clast): Call loop_iv_stack_patch_for_consts and
5770 loop_iv_stack_remove_constants.
5771 (gloog): Use new datatype. Redirect construction edge to end
5772 block to avoid accidental deletion.
5773 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
5775 (union iv_stack_entry_data): New. Data in iv stack entry.
5776 (struct iv_stack_entry): New. Datatype for iv stack entries.
5778 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5780 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5781 operand type when copying the operand to a variable of different type.
5783 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5785 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5786 with the IV name after increment.
5788 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5790 * Merge from mainline (r140164:140838).
5792 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5794 * graphite-data-ref.c: New.
5795 * graphite.c (print_scop): Also dump the dependence graph.
5796 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
5797 (new_scop): Initialize SCOP_DEP_GRAPH.
5798 (build_scop_dynamic_schedules): New.
5799 (build_access_matrix_with_af): Fixed column numbering.
5800 (graphite_transform_loops): Call build_scop_dynamic_schedules.
5801 * graphite.h: Add ifndef/define guards against multiple inclusion.
5802 (struct scop): Add dep_graph field.
5803 (SCOP_DEP_GRAPH): Defined.
5804 (ref_nb_loops): Fixed and moved to other position.
5805 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
5806 (nb_loops_around_loop_in_scop): New.
5807 (graphite_dump_dependence_graph): Declared.
5808 (graphite_build_rdg_all_levels): Declared.
5809 (graphite_test_dependence): Declared.
5810 * Makefile.in (graphite-data-ref.o): New target.
5812 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
5814 * Merge from mainline (139870:140164).
5816 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5818 * Merge from mainline (138275:139870).
5819 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
5820 the commits from trunk broke the niter detection.
5822 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5824 * graphite.c: Add more documentation. Fix formatting.
5825 (debug_loop_vec, debug_oldivs, loop_iv_stack,
5826 loop_iv_stack_debug): Moved...
5827 (schedule_to_scattering): Move before use.
5828 (dot_all_scops): Include in "#if 0" the code for system
5831 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
5832 loop_iv_stack_debug): ...here.
5834 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
5836 * tree-phinodes.c (make_phi_node): Extern.
5837 (add_phi_node_to_bb): New.
5838 (create_phi_node): Call add_phi_node_to_bb.
5839 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
5840 (remove_statement): Handle case where stored phi was updated
5841 and is no longer the same.
5842 * graphite.c (is_parameter): New.
5844 (expand_scalar_variables_expr): New.
5845 (expand_scalar_variables_stmt): New.
5846 (expand_scalar_variables): New.
5847 (move_phi_nodes): Create new phi instead of moving old one.
5848 (translate_clast): Call expand_scalar_variables.
5849 (find_vdef_for_var_in_bb): Also scan regular definitions.
5850 (skip_phi_defs): New.
5851 (collect_scop_exit_phi_args): New.
5852 (patch_scop_exit_phi_args): New.
5853 (gloog): Patch phis after scop.
5854 * tree-flow.h: (add_phi_node_to_bb): Declared.
5855 (make_phi_node): Declared.
5857 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5859 * graphite.c (end_scop): Split the entry of the scop when it
5860 is the header of the loop in which the scop is ending.
5861 (build_scops_1, limit_scops): Update uses of end_scop.
5863 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5865 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
5866 SCOP_ENTRY or SCOP_EXIT.
5868 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5870 * graphite.c (get_construction_edge): Removed.
5871 (gloog): Construction edge is the scop entry edge.
5873 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5875 * graphite.c (can_generate_for_scop): Removed.
5876 (gloog): Do not call it.
5878 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5880 * graphite.c (new_scop): Entry of a scop is an edge.
5881 Initialize SESE region.
5882 (free_scop): Free SESE region.
5883 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
5884 (split_difficult_bb): New, split from end_scop.
5885 (end_scop): Exit of a scop is an edge.
5886 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
5887 not automatically updated and thus is always wrong.
5888 * graphite.h (struct sese): New.
5891 (struct scop): New field for a SESE region. Remove entry, exit.
5892 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
5893 semantics as before. Moved comment around.
5895 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5896 Sebastian Pop <sebastian.pop@amd.com>
5898 * graphite.c (graphite_transform_loops): Always enable gloog
5899 and find_transform when ENABLE_CHECKING.
5901 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5903 * graphite.c (graphite_transform_loops): Move pretty printer
5904 of SCOPs before doing any transform. Remove call to print_scops
5905 and dot_all_scops_1.
5907 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5909 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
5910 (print_graphite_bb): Same.
5912 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5914 * graphite.c (dot_all_scops_1): Cleanup.
5915 (move_scops): Fix comment.
5917 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5919 * graphite.c (build_scop_bbs): Revert commit 139355:
5921 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5922 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5924 * graphite.c (build_scop_bbs): Factor up code.
5926 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5928 * graphite.c (gloog): Update dominator info.
5930 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5932 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
5934 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5936 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
5938 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
5939 (translate_clast): Correct formatting.
5940 * graphite.h (struct num_map): Removed.
5941 (struct graphite_bb): Remove num_map field.
5942 (GBB_INDEX_TO_NUM_MAP): Removed.
5944 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5946 * graphite.c (build_access_matrix_with_af): Fix comments.
5947 (build_scop_data_accesses): Same.
5949 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5951 * graphite.c (build_scop_data_accesses): Don't construct
5952 access matrices. Add a FIXME and an assert condition that
5953 should pass when the access matrices will be needed.
5955 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5957 * tree-data-ref.c (stmt_simple_memref_p): Don't call
5959 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
5960 Moved close by free_graphite_bb.
5961 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
5962 (new_scop): Move close by free_scop.
5963 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
5965 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
5967 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
5968 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
5969 instead of recursive call.
5970 (graphite_translate_clast_equation): New.
5971 (graphite_create_guard_cond_expr): New.
5972 (graphite_create_new_guard): New.
5973 (get_stack_index_from_iv): Removed.
5974 (graphite_rename_ivs_stmt): Use gbb_loop_index.
5975 (get_true_edge_from_guard_bb): New.
5976 (translate_clast): Handle stmt_guard in clast.
5977 (get_construction_edge): Allow construction edge detection for
5978 a scope entry with multiple predecessors if one predecessor is
5979 the immediate dominator of scope entry.
5980 (can_generate_code_stmt): Enable code generation for clast_guard.
5981 (gloog): Use correct context loop. Removed check for post dominators.
5982 * cfgloop.h (create_empty_if_region_on_edge): Declared.
5984 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5986 * graphite.c (remove_dead_loops): Document better which
5989 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5991 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
5993 (graphite.o): Also depends on pointer-set.h.
5995 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5997 * graphite.c (scop_record_loop): Fix compile warning.
5999 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6000 Sebastian Pop <sebastian.pop@amd.com>
6002 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6004 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6006 * graphite.c (build_graphite_bb): Initialize bb->aux to
6007 point to the graphite_bb_p.
6008 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6010 (add_bb_domains): Does not use the scop parameter.
6011 (graphite_transform_loops): Clean bb->aux at the end.
6013 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6014 Sebastian Pop <sebastian.pop@amd.com>
6016 * lib/target-supports.exp
6017 (check_effective_target_fgraphite): New.
6019 * gcc.dg/graphite/graphite.exp: Early exit when
6020 check_effective_target_fgraphite returns false.
6021 Set dg-do-what-default to compile.
6022 (scan-graphite-dump-times): Removed.
6023 * gfortran.dg/graphite/graphite.exp: Same.
6025 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6026 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6027 * gcc.dg/graphite/scop-1.c: Same.
6028 * gcc.dg/graphite/scop-2.c: Same.
6029 * gcc.dg/graphite/scop-3.c: Same.
6030 * gcc.dg/graphite/scop-4.c: Same.
6031 * gcc.dg/graphite/scop-5.c: Same.
6032 * gcc.dg/graphite/scop-6.c: Same.
6033 * gcc.dg/graphite/scop-7.c: Same.
6034 * gcc.dg/graphite/scop-8.c: Same.
6035 * gcc.dg/graphite/scop-9.c: Same.
6036 * gcc.dg/graphite/scop-10.c: Same.
6037 * gcc.dg/graphite/scop-11.c: Same.
6038 * gcc.dg/graphite/scop-12.c: Same.
6039 * gcc.dg/graphite/scop-13.c: Same.
6040 * gcc.dg/graphite/scop-matmult.c: Same.
6041 * gcc.dg/graphite/scop-14.c: Same.
6042 * gcc.dg/graphite/scop-15.c: Same.
6043 * gcc.dg/graphite/block-0.c: Same.
6044 * gcc.dg/graphite/scop-16.c: Same.
6045 * gcc.dg/graphite/block-1.c: Same.
6046 * gcc.dg/graphite/scop-17.c: Same.
6047 * gcc.dg/graphite/scop-18.c: Same.
6048 * gfortran.dg/graphite/block-1.f90: Same.
6049 * gfortran.dg/graphite/scop-1.f: Same.
6050 * gfortran.dg/graphite/block-2.f: Same.
6052 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6054 * graphite.c: Fix some XXX comments.
6055 (build_scop_dynamic_schedules): Removed.
6057 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6059 * graphite.h (scop_max_loop_depth): Moved...
6060 * graphite.c (scop_max_loop_depth): ...here.
6061 (remove_all_edges_1): New.
6062 (remove_all_edges): Factored code.
6063 (remove_cond_exprs): Check only the last statement for
6064 a GIMPLE_COND expression.
6066 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6068 * graphite.c (scan_tree_for_params): Early return when the
6069 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6070 (find_scop_parameters): Factor out code.
6071 (graphite_trans_bb_strip_mine): Remove dead code.
6073 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6075 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6076 graphite_trans_bb_move_loop): Factor asserts.
6077 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6078 Do not call calculate_dominance_info and estimate_bb_frequencies.
6080 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6082 * graphite.c (create_loops_mapping, free_loops_mapping,
6083 create_loops_mapping_num, debug_loop_mapping_1,
6084 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6085 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6086 graphite_loops_mapping_add_child_num,
6087 graphite_loops_mapping_insert_child,
6088 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6089 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6090 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6091 create_num_from_index, get_num_from_index,
6092 swap_loop_mapped_depth): Removed.
6093 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6094 (free_scop): Do not call free_loops_mapping.
6095 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6096 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6097 get_loop_mapped_depth.
6098 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6099 (graphite_trans_bb_strip_mine): Same.
6100 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6101 (struct scop): Remove field loops_mapping.
6103 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6104 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6106 * graphite.c (scop_record_loop): Factor out one level of the
6107 condition by early return.
6108 (build_scop_loop_nests): Format following FSF coding style.
6109 (build_scop_dynamic_schedules): Factor out code.
6110 (scopdet_bb_info): Reindent. Default case should not be reachable.
6112 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6113 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6115 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6116 assignments that are not handled as simple operands for now.
6118 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6119 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6121 * graphite.c (build_scop_bbs): Factor up code.
6123 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6124 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6126 * graphite.c (stmt_simple_for_scop_p): Factor code out
6128 (enum gbb_type): New. Group all the GBB_* types under it.
6129 (is_loop_exit): Moved...
6130 (end_scop): Enable BB spliting.
6131 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6132 * cfgloop.h (is_loop_exit): Declared.
6134 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6136 * doc/invoke.texi: Remove strides from examples containing
6137 DO loops when the strides are equal to 1.
6139 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6140 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6142 * graphite.c (graphite_trans_scop_block): Or the result with
6143 the result from graphite_trans_loop_block.
6144 * gcc.dg/graphite/block-1.c: New.
6145 * gfortran.dg/graphite/block-1.f90: New.
6146 * gfortran.dg/graphite/block-2.f: New.
6148 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6150 * graphite.c (graphite_transform_loops): Call cloog_initialize
6153 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6155 * tree-data-ref.c) (stmt_simple_memref_p): New.
6156 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6157 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6158 (is_simple_operand): Call stmt_simple_memref_p.
6160 * gcc.dg/graphite/scop-matmult.c: Updated for not
6161 using pointer arithmetic, as this is optimized by PRE and
6162 makes the code too difficult to analyze.
6164 * gcc.dg/graphite/scop-18.c: Same.
6166 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6168 * gdbinit.in (pgg): New.
6170 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6172 * graphite.c (graphite_trans_loop_block): Fix warning.
6174 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6176 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6178 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6180 * graphite.c (graphite_trans_bb_block): Remove check for
6181 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6182 Check if loop blocking is profitable for every loop, before applying
6184 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6185 if flag_loop_block is set.
6187 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6189 * graphite.c: Add some more documentation for the loop
6192 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6194 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6195 * graphite.c: Format on less than 80 columns.
6198 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6200 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6202 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6204 * doc/invoke.texi (floop-block, floop-strip-mine,
6205 floop-interchange): Update documentation with examples.
6207 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6209 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6211 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6213 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6215 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6216 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6217 * tree-scalar-evolution.c: Revert useless changes.
6218 * tree-phinodes.c: Same.
6221 * tree-vectorizer.h: Same.
6222 * tree-flow.h: Same.
6224 * common.opt (fgraphite): Update documentation.
6226 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6228 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6229 -floop-interchange): Add more text for explaining what each of these
6231 * tree-into-ssa.c (gimple_vec): Moved to...
6232 * graphite.c: Include gimple.h.
6233 (gimple_vec): Moved to...
6234 (del_loop_to_cloog_loop): Removed.
6235 (loop_affine_expr): Do not call create_data_ref when the
6236 operand is a constant.
6237 (new_scop): Use free instead of del_loop_to_cloog_loop.
6238 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6239 * gimple.h (gimple_vec): ... here.
6241 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6243 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6245 (build_loop_iteration_domains): Fail, if latch executions unknown.
6247 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6249 * graphite.c (add_conditions_to_domain): New.
6250 (build_scop_conditions_1): Call add_conditions_to_domain.
6251 (set_cloog_options): Allow to disable optimizations.
6253 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6255 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6256 Do not use walk_dominator_tree.
6257 (find_scop_parameters): Do not use walk_dominator_tree.
6259 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6261 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6262 (idx_record_params): Adapt.
6263 * graphite.h (scop_gimple_loop_depth): New.
6265 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6267 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6268 (scan_tree_for_params): Remove value_init.
6269 (build_scop_context): Remove value_init.
6270 (build_loop_iteration_domains): Remove value_init.
6271 (schedule_to_scattering): Remove value_init.
6272 (graphite_trans_bb_strip_mine): Remove value_init.
6274 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6276 * gcc/graphite.c (limit_scops): New.
6277 (graphite_transform_loops): Add limit SCoPs.
6278 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6279 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6280 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6281 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6282 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6283 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6284 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6285 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6286 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6287 Change loop numbers.
6288 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6289 Change loop numbers.
6290 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6291 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6292 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6293 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6294 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6295 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6296 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6297 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6298 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6299 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6301 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6303 * graphite.c (graphite_transform_loops): Call always find_transform.
6305 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6307 * graphite.c (free_loops_mapping): New.
6308 (stmt_simple_for_scop_p): Fix typo.
6309 (stmt_simple_for_scop_p): Fix tuples functions, that
6311 (free_graphite_bb): Fix some memleaks.
6312 (free_scop): Fix some memleaks.
6313 (scopdet_bb_info): Do not forget some tmp SCoPs.
6314 (find_params_in_bb): Fix some memleaks.
6315 (clast_to_gcc_expression): Fix warning.
6317 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6319 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6320 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6322 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6324 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6325 Move code ifdef-ed HAVE_cloog...
6326 * graphite.c: Include toplev.h.
6328 * Makefile.in (OBJS-common): Always build graphite.o.
6329 (BACKEND): Remove @GRAPHITE@.
6330 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6331 (graphite.o): Depend on TOPLEV_H.
6333 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6335 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6336 Remove typo left from polylib to ppl conversion.
6337 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6339 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6341 * toplev.c (process_options): Move the graphite loop optimization
6343 * tree-ssa-loop.c (graphite_transforms): ... here.
6344 When not configured with CLooG, print to dump_file that
6345 Graphite transforms were not performed.
6346 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6348 * gcc.dg/graphite/*.c: Updated all testcases to use
6349 scan-graphite-dump-times.
6351 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6353 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6354 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6356 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6357 Jan Sjodin <jan.sjodin@amd.com>
6359 * configure: Regenerated.
6360 * omp-low.c (expand_omp_sections): Remove now unused code.
6361 * config.in (HAVE_polylib): Removed.
6362 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6363 (PPLLIBS, PPLINC): Added.
6364 * graphite.c: Replace unsigned with int wherever possible.
6365 Don't access Cloog's data structures, but use accessor functions.
6366 Clast's stmt->type is now implemented as a vtable: change the
6367 switches of stmt->type into ifs.
6368 (polylib/polylibgmp.h): Don't include.
6369 (initialize_dependence_polyhedron,
6370 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6371 statement_precedes_p, test_dependence, build_rdg_all_levels,
6372 dump_dependence_graph): Removed until this code is cleaned up
6374 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6375 (POLYLIBINC): Renamed PPLINC.
6377 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6378 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6379 Jan Sjodin <jan.sjodin@amd.com>
6381 Finish the merge and tuplification of graphite.
6383 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6384 Jan Sjodin <jan.sjodin@amd.com>
6386 Partial merge from mainline (138072:138275).
6387 * graphite.c still has to be tuplified.
6389 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6391 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6392 (create_num_from_index): New.
6393 (get_num_from_index): Also pass in the graphite BB.
6394 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6395 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6396 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6397 (is_interchange_valid): Return false when failing.
6398 * graphite.h (struct num_map): New.
6399 (struct graphite_bb): New field num_map.
6400 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6402 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6404 * graphite.c (dump_gbb_conditions): Print also conditions like
6405 "if (a)". Remove dublicated code and use print_generic_expr ().
6406 (stmt_simple_for_scop_p): Only allow conditions we can handle
6409 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6411 * graphite.h (struct scop): Removed new_ivs field.
6412 (SCOP_NEWIVS): Deleted.
6413 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6414 clast_to_gcc_expression, graphite_create_new_loop):
6415 Removed use of new_ivs.
6417 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6419 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6420 create_loops_mapping_num, debug_loop_mapping_1): New.
6421 (debug_loop_mapping): Call debug_loop_mapping_1.
6422 (get_loop_mapping_for_num,
6423 graphite_loops_mapping_add_child,
6424 graphite_loops_mapping_add_child_num,
6425 graphite_loops_mapping_insert_child,
6426 graphite_loops_mapping_parent,
6427 split_loop_mapped_depth_for_num,
6428 loop_mapped_depth_split_loop): New.
6429 (increment_loop_mapped_depths): Removed.
6430 (swap_loop_mapped_depth_for_num): Reimplemented.
6431 (new_scop): Call create_loops_mapping.
6432 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6433 (translate_clast): Pass the old loop father in parameter, and pass
6434 it to get_old_iv_from_ssa_name.
6435 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6436 can_generate_code, can_generate_for_scop): New.
6437 (graphite_trans_bb_block): Returns false when it fails to transform.
6438 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6440 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6442 Reverted all the changes related to the streamization and
6444 These changes are now tracked in the streamization branch.
6446 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6447 Jan Sjodin <jan.sjodin@amd.com>
6449 * graphite.c (gbb_compare): Correctly constify.
6450 (gbb_can_be_ignored): Indent.
6451 (graphite_trans_scop_swap_1and2): Add legality check.
6454 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6456 Remove fallouts from "Reverted the Condate changes".
6457 * tree.h: Remove unused decl.
6458 * gcc.dg/tree-checker: Same.
6459 * timevar.def: Remove counter.
6461 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6463 * Merge from mainline (135673:138072).
6465 Reverted the MIRO changes (from 2008-04-05) that are now
6466 tracked in the miro branch.
6467 * tree-bounds.c: Removed.
6468 * tree-bounds.h: Removed.
6470 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6471 are now tracked in the condate branch.
6472 * tree-check.c: Removed.
6473 * tree-match.c: Removed.
6474 * condate.y: Removed.
6476 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6478 * common.opt: New user flag -floop-block, -floop-strip-mine
6479 and -floop-interchange.
6480 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6481 graphite loop optimization flags is turned on.
6482 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6483 flag_loop_strip_mine and flag_loop_interchange checks before
6485 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6486 -floop-strip-mine and -floop-interchange.
6487 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6489 * gcc.dg/graphite/scop-16.c: Ditto.
6490 * gcc.dg/graphite/scop-17.c: Ditto.
6491 * gcc.dg/graphite/scop-18.c: Ditto.
6493 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6494 Sebastian Pop <sebastian.pop@amd.com>
6496 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6497 (create_empty_loop_on_edge): More fixes.
6498 * tree-phinodes.c (resize_phi_node): Extern.
6499 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6500 * cfghooks.c (update_dominator_information): New split from
6502 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6503 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6504 successor of the function entry block.
6506 * graphite.c: Include pointer-set.h.
6507 (debug_loop_mapping, increment_loop_mapped_depths,
6508 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6509 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6510 swap_loop_mapped_depth_for_num, get_num_from_index,
6511 swap_loop_mapped_depth, loop_iv_stack_debug,
6512 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6513 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6514 get_old_iv_from_ssa_name): New.
6515 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6516 (free_scop): Free SCOP_LOOPS_MAPPING.
6517 (scop_record_loop): Record old ivs.
6518 (create_var_name): Removed.
6519 (initialize_cloog_names): Allocate double space in case strip mine
6520 applies to all loops once.
6521 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6522 (clast_to_gcc_expression): Same. Implement more clast to gimple
6524 (graphite_create_new_loop): Pass in ivstack.
6525 (remove_all_edges): Pass in the construction_edge.
6526 (graphite_remove_iv): Removed.
6527 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6528 remove_cond_exprs): Rewritten.
6529 (move_phi_nodes): New.
6530 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6531 (translate_clast): Pass in ivstack. Rewrite some cases.
6532 (set_cloog_options, debug_clast_stmt): New.
6533 (find_transform): Use set_cloog_options.
6534 (outermost_loop_layer): Removed.
6535 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6536 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6537 mark_old_loops, remove_dead_loops): New.
6539 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6540 (const_column_index, get_first_matching_sign_row_index,
6541 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6542 get_upper_bound): New.
6543 (graphite_trans_bb_strip_mine): Also update the iv map.
6545 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6546 (struct name_tree): Add a loop field.
6547 (struct scop): Add a graphite_loops_mapping field.
6548 (SCOP_LOOPS_MAPPING): New.
6549 (debug_clast_stmt): Declare.
6550 * lambda.h (find_induction_var_from_exit_cond): Declare.
6551 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6552 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6553 (create_empty_loop_on_edge): Updated.
6554 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6555 rename_variables_in_bb): Declare.
6556 * tree-cfg.c (remove_bb): Extern.
6558 * gcc.dg/graphite/block-0.c: New.
6560 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6561 Sebastian Pop <sebastian.pop@amd.com>
6563 * graphite.c (strip_mine_profitable_p): New.
6564 (graphite_trans_bb_block): Disable strip mining if not profitable.
6566 * gcc.dg/graphite/scop-18.c: New.
6567 * gcc.dg/graphite/scop-17.c: Fixed.
6568 * gcc.dg/graphite/scop-16.c: Fixed.
6570 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6571 Jan Sjodin <jan.sjodin@amd.com>
6572 Sebastian Pop <sebastian.pop@amd.com>
6574 * graphite.c (is_interchange_valid): New.
6575 (graphite_trans_bb_block): Check loop nest of basic block for legality
6578 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6579 outer_most_loop, gbb_outer_most_loop_index): New.
6581 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6582 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6583 * gcc.dg/graphite/scop-16.c: New.
6584 * gcc.dg/graphite/scop-17.c: New.
6586 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6588 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6589 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6591 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6593 * graphite.c (new_scop): Initialize SCOP_EXIT.
6594 (scopdet_info): Add.
6595 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6596 (build_scops_1): Cleanup, bugfixes.
6597 (build_scops): Cleanup.
6599 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6600 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6602 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6604 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6606 * gfortran.dg/graphite/graphite.exp: Use
6607 DEFAULT_GRAPHITE_FLAGS.
6609 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6611 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6613 * graphite.c (scan_tree_for_params): Do not assert any more if
6614 MULT_EXPR parameter is negative.
6616 * gfortran.dg/graphite/scop-1.f: New.
6618 * gfortran.dg/graphite/graphite.exp: New.
6620 * gcc.dg/graphite/scop-15.c: New.
6622 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6624 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6626 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6628 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6629 graphite_swap_loops.
6630 (graphite_trans_bb_move_loop): New.
6631 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6632 (graphite_trans_bb_block): New.
6633 (graphite_trans_loop_block): New.
6634 (graphite_trans_scop_swap_1and2): Rename from
6635 graphite_trans_swap_1and2.
6636 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6637 (graphite_trans_scop_block): New.
6638 (graphite_apply_transformations): Rename from
6639 graphite_transformations.
6641 * gcc.dg/graphite/scop-matmult.c: New.
6643 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6645 * graphite.c (gbb_compare): New.
6646 (graphite_sort_gbbs): New.
6647 (gbb_can_be_ignored): New.
6648 (scop_remove_ignoreable_gbbs): New.
6649 (graphite_transformations): Cleanup and add
6650 scop_remove_ignoreable_gbbs.
6651 * lambda.h (lambda_vector_compare): New.
6653 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6655 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6656 (graphite_swap_loops): int -> unsigned
6657 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6658 (graphite_transformations): New.
6659 (graphite_transform_loops): Move to graphite_transformations.
6660 * graphite.h (gbb_nb_loops): Return unsigned.
6662 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6664 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6665 the domain matrix. This makes scop-0.c work again.
6667 2008-06-20 Richard Guenther <rguenther@suse.de>
6669 * graphite.h: Adjust copyright to GPLv3.
6670 * graphite.c: Likewise.
6671 (stmt_simple_memref_for_scop_p): Split out from ...
6672 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6674 (get_bb_type): Optimize.
6676 (is_bb_addable): Fix memleak, replace is_pred call with
6678 (build_scops): Use current_loops.
6679 (param_index): Fix memleak.
6681 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6683 * graphite.c: Fix formatting.
6685 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6687 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6688 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6689 (create_var_name, save_var_name): Newly defined functions.
6690 (initialize_cloog_names): Part of the code factored out to
6692 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6693 in clast_reduction statement.
6694 (graphite_create_new_loop): Now takes a new parameter
6696 (translate_clast): Now also takes the context_loop and bb_exit
6697 parameters. Rewritten the code so that it creates a gimple code
6698 inside the given context.
6699 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6700 remove_cond_expr, disconnect_cond_expr,
6701 disconnect_virtual_phi_nodes): Newly defined functions.
6702 * graphite.h (struct scop): added old_ivs vector.
6703 SCOP_OLDIVS: New macro.
6705 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6707 * cfgloopmanip.c: Add missing function comments, fix formatting.
6709 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6711 * cfgloopmanip.c (update_dominators_in_loop): Defined.
6712 (create_empty_loop_on_edge): Defined.
6713 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
6715 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
6716 (update_dominators_in_loop): Declared as extern
6717 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
6719 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
6721 * graphite.c (print_graphite_bb): Allow changing number of loops
6723 (initialize_cloog_names): Allow changing number of loops.
6724 (build_cloog_prog): Simplify.
6725 (find_transform): Enable cloog option --strides.
6726 (graphite_swap_loops): New.
6727 (graphite_strip_mine_loop): New.
6728 (graphite_trans_swap_1and2): New.
6729 (graphite_trans_strip): New.
6730 (graphite_transform_loops): Add graphite_trans_strip.
6731 * graphite.h (scop_max_loop_depth): New.
6733 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6735 * graphite.c (build_scop_iteration_domain): Remove forgotten
6736 line. (Fixes compile)
6738 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6740 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
6741 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
6742 (build_bb_loops): New.
6743 (graphite_transform_loops): Add build_bb_loops.
6744 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
6746 * graphite.h (graphite_bb): Add loops.
6747 (gbb_nb_loops): New.
6748 (gbb_loop_at_index): New.
6749 (gbb_loop_index): New.
6750 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
6751 using nb_params_in_scop.
6753 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6755 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
6756 (build_scop_canonical_schedules): Build minimized schedule.
6757 (schedule_to_scattering): Adapt to minimized schedule.
6758 * graphite.h (graphite_bb): Add/Update descriptions.
6760 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
6761 Tobias Grosser <grosser@fim.uni-passau.de>
6763 * graphite.c (print_graphite_bb): Add condition printing.
6765 (dump_gbb_conditions): New.
6766 (build_scop_conditions_1): New.
6767 (build_scop_conditions): New.
6768 * graphite.h (graphite_bb): Add conditions.
6770 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6772 * graphite.c (print_graphite_bb):
6773 (free_graphite_bb): New.
6774 (free_scop): Free bbs.
6775 (get_bb_type): Free doms.
6776 (build_scop_context): Free context matrix.
6777 (build_loop_iteration_domains): Remove unused code.
6778 (build_cloog_prog): Free scattering function and blocklist.
6779 (find_transform): Free options.
6781 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
6783 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
6784 Remove unnecessery cloog data structures. Make a copy of the domain
6785 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
6786 unnecessary cloog data structures. Fix memory leaks. Remove insert
6787 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
6789 (build_scop_iteration_domain): Remove unnecessary cloog
6790 data structures. Fix memory leaks.
6791 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
6792 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
6794 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6796 * graphite.c (find_scop_params): Remove initialize_cloog_names.
6798 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6800 * graphite.c (end_scop): Style fix.
6801 (schedule_to_scattering): Style and comment fix.
6803 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6804 * graphite.c (print_graphite_bb): Fix definiton of
6805 schedule_to_scattering.
6806 (initialize_cloog_names): Change nb_scattdims to max loop
6808 (schedule_to_scattering): Take parameter for number of scattering
6810 (build_cloog_prog): Only build as much scattering dimensions as
6813 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6815 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
6816 in polyhedron/aermod.f90.
6818 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
6819 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6820 Harsha Jagasia <harsha.jagasia@amd.com>
6822 * graphite.c (is_bb_addable): Fix segfault.
6824 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
6826 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
6827 with multiple exits and conditional handling in edge cases.
6828 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
6830 * gcc.dg/graphite/scop-14.c: New.
6832 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
6833 Adrien Eliche <aeliche@isty.uvsq.fr>
6835 * graphite.c (is_bb_addable): Add more comments and enhance
6836 readablity of the source code. Fix memory leak.
6837 (is_loop_exit): Fix memory leak.
6839 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6841 * graphite.c (first_loop_in_scop): Deleted.
6842 (setup_cloog_loop): Only walk the loop chain for inner loops.
6843 (build_scop_iteration_domain): Execute setup_cloog_loop for
6844 all loops in the first layer.
6846 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6848 * graphite.c (scan_tree_for_params): Change the way params are
6849 added to be indepenent of the number of loops.
6850 (setup_cloog_loop): Revert to short matrix format. Fix parameter
6852 (build_cloog_prog): Revert to short matrix format.
6854 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6855 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6857 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
6860 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6862 * graphite.c (nb_data_refs_in_scop): New.
6863 (graphite_transform_loops): Print more stats: number of
6864 loops, basic blocks and data references per scop.
6866 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6867 Jan Sjodin <jan.sjodin@amd.com>
6869 * graphite.c (loop_affine_expr, idx_record_params,
6870 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
6871 instead of instantiate_parameters.
6873 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6875 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
6876 add support for parameters, add STATIC_SCHEDULE at the right places,
6879 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6881 * graphite.c (build_scop_loop_nests): Only add the loops, that
6882 are contained completely in the SCoP.
6883 (build_cloog_prog): Disable scattering, until schedule_to_scattering
6884 and the domains are fixed.
6885 (build_scop_canonical_schedules): Add support for bbs not contained
6888 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6890 * graphite.h (scop_contains_loop): Update comments to match
6891 the actual behavior.
6892 (scop_contains_loop): New.
6893 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
6895 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6897 * graphite.c (get_bb_type): On function body, i.e. loop_0,
6898 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
6901 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6902 Tobias Grosser <grosser@fim.uni-passau.de>
6904 * graphite.c (graphite_transform_loops): Early return when
6905 there are no loops in the function.
6907 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6908 Jan Sjodin <jan.sjodin@amd.com>
6910 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
6911 offset of the last loop.
6912 (setup_cloog_loop): Copy the entire outer constraint matrix.
6914 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6915 Jan Sjodin <jan.sjodin@amd.com>
6917 * graphite.c (stmt_in_scop_p, function_parameter_p,
6918 invariant_in_scop_p): Removed.
6919 (scan_tree_for_params): Can be used with no constraint
6920 matrix for gathering parameters.
6921 (idx_record_params): Don't use idx_record_param, instead use
6922 scan_tree_for_params.
6923 (find_scop_parameters): Same.
6924 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
6925 Fix the size of loop domains.
6926 (schedule_to_scattering): Exit when the outer loop is not in scop.
6927 (find_transform): Enable build_cloog_prog.
6929 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6930 Jan Sjodin <jan.sjodin@amd.com>
6932 * graphite.c (schedule_to_scattering): Make scattering domains
6933 uniformly of the same size, as required by CLooG 0.14.0 and before.
6935 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6936 Jan Sjodin <jan.sjodin@amd.com>
6938 * graphite.c (schedule_to_scattering): Rewrite, correct the
6939 translation of the scheduling function to scattering.
6940 (build_cloog_prog): Call schedule_to_scattering only once.
6941 * graphite.h (scop_loop_index): Do not fail for loops not
6942 in the scop: return -1.
6944 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
6946 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
6947 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
6948 (setup_cloog_loop): Export GBB_DOMAIN.
6949 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
6950 able to rebuild the original control flow.
6951 * graphite.h (graphite_bb): Add domain field and access macro.
6954 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6956 * graphite.c (debug_gbb): New.
6957 (print_scop, build_graphite_bb): Use SCOP_BBS.
6958 (build_scop_bbs): Reimplemented.
6959 (dfs_bb_in_scop_p): Removed.
6960 (build_scop_loop_nests): Reorder loops inserted in
6961 SCOP_LOOP_NEST: outer loops should come first.
6962 (build_scop_canonical_schedules): Reinitialize at zero
6963 the components of the SCOP_STATIC_SCHEDULE for the loops
6964 that have already been parsed.
6966 * graphite.h (debug_gbb): Declared.
6968 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6969 Jan Sjodin <jan.sjodin@amd.com>
6971 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
6972 (graphite_loop_to_gcc_loop): Removed.
6973 (remove_all_edges): New.
6974 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
6975 (gloog): Remove useless code.
6977 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6979 * graphite.c (get_bb_type): Reworked. We distinguish between
6980 loops with one or multiple exits.
6981 (is_loop_exit): New.
6983 (is_bb_addable): Rework condition handling, now support for case
6984 case statements and loops with multiple exits.
6986 * gcc.dg/graphite/scop-11.c: New.
6987 * gcc.dg/graphite/scop-12.c: New.
6988 * gcc.dg/graphite/scop-13.c: New.
6990 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6992 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
6993 we have too many colors.
6995 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
6997 * doc/invoke.texi (-ftree-loop-fusion): Document.
6998 * tree-pass.h (pass_loop_fusion): Declared.
6999 * tree-loop-fusion.c: New.
7000 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7001 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7002 * tree-data-ref.h (find_data_references_in_loop): Declared.
7003 * common.opt (ftree-loop-fusion): Declared.
7004 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7006 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7008 * graphite.c (build_access_matrix): Fix typo from the merge.
7010 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7012 * Merge from mainline (130800:135673).
7014 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7016 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7017 Update dominators after splitting.
7019 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7021 * graphite.c (is_bb_addable): Return the harmful statement.
7022 Factor up some code.
7023 (end_scop): New. Splits end of scope bbs on a harmful statement.
7024 (build_scops_1): Call end_scop.
7026 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7028 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7029 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7030 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7031 build_scops_1): Removed.
7032 (build_scops_2): Renamed build_scops_1.
7034 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7036 * graphite.c: Fix formatting.
7038 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7040 * graphite.c (get_bb_type): New.
7042 (build_scops_2): New.
7043 (is_bb_addable): New.
7044 (build_scops): Switch the scop detection.
7045 (build_scop_bbs): Add entry bb to scop.
7046 * graphite.h (struct scop): Update comment.
7048 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7050 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7053 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7055 * gcc.dg/graphite/scop-1.c: Update.
7056 * gcc.dg/graphite/scop-2.c: Update.
7057 * gcc.dg/graphite/scop-4.c: Update.
7058 * gcc.dg/graphite/scop-5.c: Add.
7059 * gcc.dg/graphite/scop-6.c: Add.
7061 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7063 * gcc.dg/graphite/scop-0.c: Add.
7064 * gcc.dg/graphite/scop-7.c: Add.
7065 * gcc.dg/graphite/scop-8.c: Add.
7066 * gcc.dg/graphite/scop-9.c: Add.
7067 * gcc.dg/graphite/scop-10.c: Add.
7069 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7071 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7072 Check affine expressions depending on the outermost loop
7074 (stmt_simple_for_scop_p): Same.
7075 (harmfule_stmt_in_scop): Same.
7077 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7079 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7080 mark entry and exit, that are not part of the SCoP and update HTML
7083 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7085 * graphite.c (basic_block_simple_for_scop_p): Renamed
7087 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7088 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7089 (all_preds_visited_p, all_succs_visited_p,
7090 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7091 scop_end_loop): New.
7092 (build_scops): Do not use dfs_enumerate_from.
7094 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7096 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7098 * graphite.c: Add comments to functions that are missing a
7100 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7102 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7104 * graphite.c (nb_params_in_scop): Moved...
7105 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7106 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7107 (clast_to_gcc_expression): Reduce column size to less than 80.
7108 (graphite_create_iv): Return the new name of the IV.
7109 (find_transform): Set options->esp and options->cpp.
7110 (gloog): Comment out the invalidation of the old loop code.
7111 (initialize_dependence_polyhedron): Replace scop_nb_params with
7114 * graphite.h (nb_params_in_scop): ... here.
7115 (scop_nb_params): Removed.
7116 (loop_domain_dim): Return something even when the loop was not
7117 found in the hash table: avoid ICEing on all the graphite.exp
7120 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7122 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7124 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7125 according to nesting level.
7126 (find_scop_parameters): Call instantiate_parameters.
7127 (scan_tree_for_params): Extend it to handle general affine bounds.
7128 Inner loop bound can depend on outer loop induction variable.
7129 (setup_cloog_loop): tmp variable is allocated on stack. Call
7130 instantiate_parameters with respect to outermost_loop_in_scop.
7131 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7133 (create_empty_loop): Function loopify should be given edge
7134 probability, instead of edge frequency. Dominance relation from
7135 switch_bb to loop_header.
7136 (clast_to_gcc_expression): Added handling of clast_reduction node.
7137 (gloog): New functionality for removing old loop.
7138 (test_dependence): Factored out from build_rdg_all_levels.
7139 (build_rdg_all_levels): Dependence testing factored out to
7140 test_dependence function.
7142 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7143 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7146 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7148 * graphite.c (free_scop, param_index, initialize_cloog_names,
7149 nb_params_in_scop): Use name_tree map instead of just a tree
7150 for keeping track of the variable name associated to that tree.
7151 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7152 clast_to_gcc_expression, graphite_create_iv,
7153 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7154 graphite_stmt_to_gcc_stmt): New.
7155 (gloog): Call these.
7156 * graphite.h (struct name_tree): New.
7157 (struct scop): Use name_tree instead of tree for params.
7158 Store a vector of name_tree for new_ivs.
7160 (scop_nb_params): Use name_tree instead of tree.
7162 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7163 Sebastian Pop <sebastian.pop@amd.com>
7165 * tree-bounds.c: New.
7166 * tree-bounds.h: New.
7167 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7168 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7169 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7173 * c-cppbuiltin.c: Same.
7177 * tree-outof-ssa.c: Same.
7179 * Makefile.in: Same.
7181 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7182 Sebastian Pop <sebastian.pop@amd.com>
7184 * tree-loop-distribution.c (remaining_stmts,
7185 upstream_mem_writes): Removed static variables.
7186 (copy_loop_before, create_bb_after_loop,
7187 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7188 rdg_build_components, rdg_build_partitions,
7189 dump_rdg_partitions): Extern.
7190 (generate_loops_for_partition, generate_code_for_partition): Do not
7192 (already_processed_vertex_p, predecessor_has_mem_write,
7193 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7194 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7195 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7196 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7197 Pass remaining_stmts and upstream_mem_writes as parameters.
7198 (rdg_component): Moved...
7199 (build_rdg_partition_for_component): Do not aggregate components when
7200 flag_streamize_loops is set.
7201 (gen_sequential_loops): New.
7202 (ldist_gen): Call gen_sequential_loops.
7204 * tree-pass.h (pass_loop_streamization): Declared.
7206 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7207 basic blocks when loops structures exist.
7209 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7211 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7213 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7214 eliminate_local_variables_stmt, eliminate_local_variables,
7215 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7216 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7217 of code delimited by two edges in the CFG.
7218 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7219 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7220 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7221 the case of parallelisation of reductions.
7222 (create_loop_fn): Extern.
7223 (create_omp_parallel_region): New.
7225 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7226 dump_data_reference for printing dra and drb.
7227 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7229 (build_rdg): Don't call free_dependence_relations for the moment, as
7230 we attach dependence relations on each edge of the RDG.
7233 * tree-data-ref.h (rdg_component): ...here.
7234 (struct rdg_edge): New field ddr_p relation.
7235 (RDGE_RELATION): New.
7236 (create_bb_after_loop, copy_loop_before,
7237 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7238 rdg_build_partitions, dump_rdg_partitions,
7239 free_rdg_components): Declared.
7241 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7242 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7244 * tree-loop-streamization.c: New.
7246 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7247 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7249 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7251 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7253 * passes.c: Schedule pass_loop_streamization.
7255 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7257 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7260 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7262 * graphite.c (dot_all_scops): Update formatting.
7263 Bbs can now be part of more than one SCoP.
7265 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7267 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7269 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7270 * graphite.h (loop_to_cloog_loop): New.
7272 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7274 * graphite.c (loop_domain_dim, ref_nb_loops,
7275 loop_iteration_vector_dim): New.
7276 (build_access_matrix_with_af, build_access_matrix,
7277 initialize_dependence_polyhedron): Fixed for new matrix layout.
7278 No longer assume that all iteration domains are of the same
7281 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7283 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7284 defined in a loop at depth 0 is invariant.
7285 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7286 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7287 be called at loop depth 0.
7289 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7291 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7292 (down_open_scop): Removed.
7293 (loop_in_scop_p): Redefined.
7294 (scop_affine_expr): New argument: scop.
7295 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7296 a harmful statement ending a scop.
7297 (basic_block_simple_for_scop_p): New argument: scop.
7298 (get_loop_start): Removed.
7299 (new_scop): Initialize SCOP_LOOPS.
7300 (free_scop): Free SCOP_LOOPS.
7301 (succs_at_same_depth, preds_at_same_depth): New.
7302 (end_scop): Test the validity of a scop.
7303 (add_dominators_to_open_scops): New.
7304 (test_for_scop_bound): Call add_dominators_to_open_scops.
7305 Add cases for opening and closing multiple scops.
7306 (build_scops, build_scop_bbs): Iterate over basic blocks in
7308 (build_graphite_bb): Pass scop directly.
7309 (dfs_bb_in_scop_p): New.
7310 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7312 (nb_loops_around_gb): Use loop_in_scop_p.
7313 (schedule_to_scattering): Disabled for the moment the code computing
7314 the "textual order for outer loop".
7316 * graphite.h (struct scop): New field loops.
7318 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7320 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7322 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7323 Sebastian Pop <sebastian.pop@amd.com>
7325 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7326 * common.opt (fstreamize-loops): New.
7327 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7328 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7329 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7330 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7332 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7334 * tree-data-ref.c (build_empty_rdg): New.
7335 (build_rdg): Use it.
7336 * tree-data-ref.h (build_empty_rdg): Declared.
7337 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7338 (find_vertex_for_stmt): Removed.
7339 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7341 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7343 * tree-loop-distribution.c (generate_builtin): After cancelling the
7344 loop tree, also delete basic blocks.
7345 (rdg_flag_uses): Stop recursion when a vertex has already been
7348 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7350 * graphite.c (build_scop_alpha): Removed.
7351 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7352 and dump_dependence_graph to avoid compiler warnings.
7354 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7356 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7357 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7358 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7359 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7360 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7361 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7362 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7363 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7364 dump_dependence_graph): New.
7365 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7367 (struct scop): New field loop2cloog_loop.
7368 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7369 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7371 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7373 * graphite.c (build_graphite_bb): Fix initialization
7374 of the graphite basic block.
7376 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7378 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7379 loop domain matrix. Pass in the number of loops contained in the
7381 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7382 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7383 loops that are not surrounding the current loop are not represented
7384 in the domain constraint matrix.
7385 (build_scop_iteration_domain): Initial domain constraint matrix
7386 contains only the eq/ineq, cst, and scop parameters columns.
7388 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7390 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7391 (print_graphite_bb): Print scattering.
7393 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7395 * graphite.c (initialize_cloog_names): Initialize names of
7396 scattering variables.
7398 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7400 * graphite.c (dot_all_scops_1): Disable debug output while
7403 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7405 * graphite.c (find_transform): Change cloog output language to C.
7407 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7409 * tree-loop-distribution.c (generate_memset_zero,
7410 generate_builtin, generate_code_for_partition,
7411 rdg_flag_all_uses): New.
7412 (rdg_flag_uses): Gather in the same partition the statements defining
7413 the VUSES of the current statement.
7414 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7415 Gather in the same partition not only the stores to the same memory
7416 access, but also the reads.
7417 (ldist_generate_loops): Renamed ldist_gen.
7419 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7420 Tobias Grosser <grosser@fmi.uni-passau.de>
7422 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7423 next pointer, don't use the inner pointer.
7425 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7427 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7428 (find_transform): Call dot_all_1.
7429 * graphite.h (dot_all_scops): Declared.
7431 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7433 * tree-loop-distribution.c: Fix apsi.f ICE.
7434 (create_bb_after_loop): New.
7435 (generate_loops_for_partition): Use it.
7436 * gfortran.dg/ldist-1.f90: New.
7438 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7439 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7441 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7443 * graphite.c (find_transform): Dump cloog program sent to cloog.
7445 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7447 * graphite.c (initialize_cloog_names): Initialize cloog
7450 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7452 * graphite.c (build_scop_context): Fix typo, for the matrix
7453 format: insert '0 >= 0' instead of '-1 >= 0'.
7455 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7457 * Fix merge problems.
7459 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7461 * graphite.c (setup_cloog_loop): Fix typo.
7463 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7465 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7466 * tree-loop-distribution.c: Reimplemented.
7467 * tree-pass.h (pass_loop_distribution): New.
7468 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7470 * graphds.h (struct graph): New field indexes.
7471 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7473 * tree-vect-analyze.c: Remove declaration of static functions when not
7475 * tree-vectorizer.c: Same.
7476 (rename_variables_in_loop): Now extern.
7477 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7478 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7479 calling redirect_edge_and_branch_force.
7481 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7483 * tree-data-ref.c: Don't include tree-chrec.h.
7484 (debug_data_dependence_relations): New.
7485 (dump_data_dependence_relation): Call dump_data_reference on data refs
7487 (same_access_functions): Moved...
7488 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7489 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7490 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7491 struct rdg_vertex_info, ): New.
7492 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7494 (create_rdg_vertices): Initialize the htab of graph->indexes.
7495 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7496 (stmts_from_loop): Don't save LABEL_EXPR.
7497 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7498 hash_stmt_vertex_del): New.
7499 (build_rdg): Initialize rdg->indexes.
7500 (free_rdg, stores_from_loop, ref_base_address,
7501 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7502 have_similar_memory_accesses_1, ref_base_address_1,
7503 remove_similar_memory_refs): New.
7505 * tree-data-ref.h: Include tree-chrec.h.
7506 (debug_data_dependence_relations): Declared.
7507 (same_access_functions): ...here. Now static inline.
7508 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7509 ddr_dependence_level): New.
7510 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7511 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7512 RDG_MEM_READS_STMT): New.
7513 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7514 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7515 rdg_vertex_for_stmt): Declared.
7516 (struct rdg_edge): New field level.
7517 (RDGE_LEVEL, free_rdg): New.
7518 (stores_from_loop, remove_similar_memory_refs,
7519 rdg_defs_used_in_other_loops_p,
7520 have_similar_memory_accesses): Declared.
7521 (rdg_has_similar_memory_accesses): New.
7523 * lambda.h (dependence_level): New.
7524 * common.opt (ftree-loop-distribution): New.
7525 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7526 (print_loop_ir): Renamed print_loops.
7527 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7528 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7529 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7530 (tree-loop-distribution.o): Added.
7531 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7532 (mark_virtual_ops_in_bb): New.
7533 (print_loops_bb, debug_loop_num, debug_loop): New.
7534 * passes.c: Scheduled pass_loop_distribution.
7536 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7538 * graphite.c (scan_tree_for_params): Correct the number of columns
7540 (nb_flat_iterator): New.
7541 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7542 (build_scop_iteration_domain): Correct the number of columns for
7545 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7547 * Merge from mainline (129697:130800).
7549 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7551 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7552 dominated by SCoP's exit.
7553 (graphite_transform_loops): Compute post dominators.
7555 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7557 * Merge from mainline (127169:129697).
7559 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7561 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7562 parameter for the basic block that contains the expression. Use
7563 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7564 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7566 * graphite.h (gbb_loop): New.
7567 (GBB_LOOP): Removed.
7569 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7571 * Makefile.in: Fix merge problem.
7573 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7575 * Merge from mainline (125309:127169).
7576 * tree-loop-distribution.c: Disabled.
7578 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7580 * Merge from mainline (r123693:125309).
7582 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7584 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7586 (correct_modify_p, check_statements, number_of_lvalue_uses,
7587 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7588 instead of MODIFY_EXPR.
7589 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7592 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7594 * tree-loop-distribution.c (struct rdg): Replace arrays by
7595 VECs for edges and vertices.
7596 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7597 (RDGV_NB_PARTITIONS): New.
7598 (PRDG_NBV, PRDG_NBE): Removed.
7599 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7600 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7601 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7603 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7604 Sebastian Pop <sebpop@gmail.com>
7606 * doc/invoke.texi (-ftree-loop-distribution): Document.
7607 * tree-loop-distribution.c: New file.
7608 * tree-pass.h (pass_loop_distribution): Declared.
7609 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7610 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7612 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7613 (DDR_REVERSED_P): New.
7614 * common.opt (-ftree-loop-distribution): New.
7615 * tree-flow.h (distribute_loops): Declared.
7616 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7617 * passes.c (init_optimization_passes): Schedule loop distribution.
7619 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7621 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7622 (print_scop): Don't print when scop is NULL.
7623 (build_scop_context, find_transform): Don't output to stderr.
7625 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7627 * tree-data-ref.c: Don't include graphite.h.
7628 Comment out the code for printing data reference's scop.
7629 (build_access_matrix_with_af): Moved...
7630 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7631 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7632 (print_graphite_bb): Print basic block's schedule.
7633 (print_scop): Don't print the schedule, call cloog's pretty printer.
7634 (bb_in_scop_p): A basic block is in a scop only if it is both
7635 dominated and postdominated by the scop's entry and exit basic blocks.
7636 (function_parameter_p): New.
7637 (invariant_in_scop_p): Use function_parameter_p.
7638 (new_scop, save_scop): New.
7639 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7641 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7642 (loop_in_scop_p): New.
7643 (scop_record_loop): Use loop_in_scop_p.
7644 (build_scop_domain): Renamed build_scop_iteration_domain.
7645 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7646 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7647 setup_cloog_loop, dot_scop_1, dot_scop): New.
7648 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7649 (struct scop): Add a pointer to cloog's representation of a program.
7651 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7653 * doc/invoke.texi (-ftree-check-verbose): Renamed
7654 -ftree-checks-verbose.
7655 * common.opt (flag_tree_check_verbose): Renamed
7656 flag_tree_checks_verbose.
7657 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7659 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7661 * configure: Regenerated.
7662 * config.in: Regenerated.
7663 * tree-ssa-loop.c (graphite_transforms): Execute
7664 graphite_transform_loops only when HAVE_cloog.
7665 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7666 * graphite.c: Include polylibgmp.h and cloog.h.
7667 (graphite_transform_loops): Removed loops parameter.
7668 * tree-flow.h (graphite_transform_loops): Update declaration.
7669 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7670 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7671 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7672 (OBJS-common): Remove dependence on graphite.o.
7673 (BACKEND): Depend on @GRAPHITE@.
7675 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7677 * doc/invoke.texi (-ftree-check-verbose): Documented.
7678 * gcc.dg/tree-checker/tree-checks-1.c: New.
7679 * gcc.dg/tree-checker/tree-checks-2.c: New.
7680 * gcc.dg/tree-checker/tree-checks-3.c: New.
7681 * gcc.dg/tree-checker/tree-checks-4.c: New.
7682 * gcc.dg/tree-checker/tree-checks.exp: New.
7683 * gcc.dg/tree-checker/condates.crp: New.
7684 * common.opt (ftree-checks-verbose): New.
7685 * tree-check.c (tree_check_warning): Move extra stderr output
7686 under control of flag_tree_check_verbose.
7688 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7690 * tree-match.c: Fix comments formatting.
7691 * tree-match.h: Fix comments formatting.
7692 * tree-check.c: Fix comments formatting.
7693 (tree_check_init): Restructure.
7695 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7697 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7699 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7701 * Merge from mainline (r120733:123693).
7703 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7705 * condate.y: New file.
7706 * tree-match.h (struct patt_info_s): New field sign.
7707 (struct condate_s): New field msg.
7708 (normalize_condate, name_condate, add_condate): New.
7709 (conds[], condate_parse): Made extern.
7710 * tree-check.c (tree_check_warning): First arg changed to cond;
7711 warning reformatted.
7712 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
7714 (tree_check): Process trivial condates.
7715 (read_delimited_string): Removed.
7716 (print_cond): Print name and msg.
7717 (conds[]): Made extern.
7718 (parse_tree_check_file_once): Rewritten to use the parser in
7720 Processing of option --tree_check_string moved to tree_scan().
7721 * Makefile.in: Added condate.y
7723 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
7725 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
7726 Use VECs instead of varrays.
7727 * diagnostic.h (lazy_dump_generic_node): Update declaration.
7728 * Makefile.in (pretty-print.o): Depend on vec.h.
7729 * pretty-print.c: Include tree.h and vec.h.
7730 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
7731 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
7732 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
7733 pp_free_list): Use VECs instead of varrays.
7734 * pretty-print.h: Do not include varray.h.
7735 (struct tree_chunk_s): Declaration moved before its use.
7736 (output_buffer): Rename varray field to chunks.
7737 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
7738 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
7739 save_global_holes): Use VECs instead of varrays.
7740 * tree-match.h: Declare VECs of cfg_node, and hole_p.
7741 * tree-check.c (scan_cfg_stmts, push_node,
7742 print_matching_stmt): Removed.
7743 (tree_check_instance, push_global_holes_if_new, tree_check,
7744 execute_tree_check): Use VECs instead of varrays.
7745 (gate_tree_check): Don't execute the CFG check when basic_block_info
7748 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7750 * Merge from mainline (r115016:120733).
7752 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7754 * Merge from mainline (r117632:117661).
7756 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7758 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
7759 * tree-pass.h (TDF_DEBUG, debug_p): New.
7760 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
7761 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
7762 get_loop_exit_condition, analyze_evolution_in_loop,
7763 analyze_initial_condition, analyze_scalar_evolution,
7764 instantiate_parameters, number_of_latch_executions): Use debug_p.
7765 * tree-chrec.c (chrec_apply): Use debug_p.
7766 * tree-data-ref.c: Include graphite.h.
7767 (dump_data_reference): Print also the access matrix.
7768 (analyze_array, analyze_indirect_ref, init_data_ref,
7769 analyze_offset_expr, address_analysis, object_analysis,
7770 create_data_ref, finalize_ddr_dependent,
7771 non_affine_dependence_relation, analyze_ziv_subscript,
7772 analyze_siv_subscript_cst_affine,
7773 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
7774 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
7775 analyze_miv_subscript, analyze_overlapping_iterations,
7776 build_classic_dist_vector, subscript_dependence_tester,
7777 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
7778 (build_access_matrix_with_af): No longer static.
7779 * tree-data-ref.h (scop_p): ... declaration here.
7780 (data_reference.scop): New field.
7781 (DR_SCOP, DR_ACCESS_MATRIX): New.
7782 (build_access_matrix_with_af, dr_num_subscripts): Declared.
7783 * graphite.c (print_graphite_bb): Call dump_data_references.
7784 (print_scop): Use scop_nb_loops and scop_dim_domain.
7785 (test_for_scop_bound): Use debug_p.
7786 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
7788 (scop_loop_index): Moved...
7789 (scop_record_loop): New.
7790 (build_scop_loop_nests): Use scop_record_loop.
7791 (build_scop_domain): Use scop_dim_domain.
7792 (build_access_matrix): Implemented.
7793 (build_scop_canonical_schedules): Use scop_nb_loops.
7794 (build_graphite_bb): Initialize GBB_SCOP.
7795 * graphite.h (scop_p): Moved...
7796 (graphite_bb.scop): New field.
7797 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
7798 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
7799 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
7800 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
7801 scop_loop_index): New.
7802 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
7804 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
7806 * Merge from mainline (r117661:120450).
7808 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
7810 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
7811 at the first declaration outside the varying loop, instantiate as
7813 * tree-chrec.c (for_each_scev_op): New.
7814 * tree-chrec.h (for_each_scev_op): Declared.
7815 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
7816 * tree-data-ref.c (get_references_in_stmt,
7817 find_data_references_in_stmt): New, from trunk.
7818 (find_data_references_in_loop): Use get_references_in_stmt
7819 and find_data_references_in_loop, modified as in trunk.
7820 (build_access_matrix_with_af): New.
7821 * tree-data-ref.h (data_reference): Add a field access_matrix.
7822 (data_ref_loc): New, as in trunk.
7823 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
7824 invariant_in_scop_p, param_index, scan_tree_for_params,
7825 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
7826 idx_record_param, idx_record_params, build_access_matrix,
7827 build_scop_data_accesses, build_scop_canonical_schedules,
7828 build_graphite_bb, build_scop_bbs, find_params_in_bb,
7829 build_scop_params): New.
7830 * graphite.h (graphite_bb): New.
7831 (scop): Add fields static_schedule, params, loop_nest,
7833 * lambda.h: Declare vecs of lambda_matrix.
7834 * tree-flow.h (print_loop_ir_bb): Declared.
7835 * tree-cfg.c (print_loop_ir_bb): New.
7836 (print_loop): Use print_loop_ir_bb.
7838 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
7840 * Merge from mainline (r115016:117632).
7842 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
7844 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
7845 break due to a warning.
7847 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
7849 * graphite.c (print_scops, debug_scops): New.
7850 (graphite_transform): Renamed graphite_find_transform.
7851 * graphite.h (debug_scops): Declared.
7853 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
7855 * tree-match.c: Reformat following the GNU style.
7856 * tree-match.h: Reformat following the GNU style.
7857 * tree-pattern.h: Removed empty file.
7858 * Makefile.in: Remove references to tree-pattern.h.
7859 * tree-check.c: Reformat following the GNU style.
7860 (execute_tree_check): Move gate condition code to...
7861 (gate_tree_check): ...here. New function.
7862 (pass_check): Use the gate function.
7864 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
7866 * tree-pattern.h: New. Tree pattern matching and checking using
7868 * tree-check.c: New. Tree/CFG checking pass.
7869 * tree-match.c: New. Library for tree pattern matching.
7870 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
7871 * toplev.c, flags.h: Add globals for tree-check pass.
7872 * Makefile.in: Integrate the files in tree-check pass.
7873 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
7874 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
7875 Introduce a "lazy" pretty-print mode.
7876 * tree.c, tree.h: Add tree_name.
7878 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
7880 * doc/invoke.texi (-fgraphite): Correct typo.
7881 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
7882 use of print_loop_ir.
7883 * gcc.dg/graphite/scop-1.c: New.
7884 * gcc.dg/graphite/scop-2.c: New.
7885 * gcc.dg/graphite/graphite.exp: New.
7886 * graphite.c: Include domwalk.h.
7887 (print_scop): Print only the entry and exit blocks.
7888 (debug_scop): No longer static.
7889 (affine_expr): Fix formating. Return also true when the expression is
7891 (stmt_simple_for_scop_p): Fix formating.
7892 (build_scops): Use domwalk.
7893 (get_loop_start, end_scop, test_for_scop_bound): New.
7894 (graphite_transform_loops): Avoid printing on stderr.
7895 * graphite.h (debug_scop): Declared.
7896 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
7897 * Makefile.in (graphite.o): Depend on domwalk.h.
7898 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
7899 declarations for static functions.
7900 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
7901 controlling output verbosity.
7903 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
7904 Plesco Alexandru <shurikx@gmail.com>
7906 * doc/invoke.texi (-fgraphite): Document.
7907 * tree-pass.h (pass_graphite_transforms): Declared.
7908 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
7909 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
7910 (pass_graphite_transforms): Defined.
7911 * tree-data-ref.c (free_data_ref, data_reference): Extern.
7912 * tree-data-ref.h (free_data_ref, data_reference): Declared.
7913 * graphite.c, graphite.h: New.
7914 * common.opt (fgraphite): Declared.
7915 * tree-flow.h (graphite_transform_loops): Declared.
7916 * Makefile.in (OBJS-common): Add graphite.o.
7917 (graphite.o): New rule.
7918 * passes.c (pass_graphite_transforms): Scheduled.