1 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
4 case non close-phi nodes with one argument.
6 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
8 * sese.h (scev_analyzable_p): Scevs could be expressions without
9 chrecs and still be scev_analyzable_p.
11 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
13 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
15 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
17 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
18 * cfgloop.h (struct loop): Remove single_iv field.
19 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
20 (scop_canonicalize_loops): Removed.
21 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
22 over all the loop phi nodes in loop->header.
23 (build_poly_scop): Remove use of scop_canonicalize_loops.
25 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
27 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
30 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
32 * tree-chrec.c (chrec_apply): Should only apply to the specified
33 variable. Also handle multivariate chains of recurrences that
34 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
36 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
38 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
39 (debug_clast_name_indexes_1): Removed.
40 (debug_clast_name_indexes): Removed.
41 (pbb_to_depth_to_oldiv): Removed.
42 (build_iv_mapping): Replace the use of rename_map with iv_map.
43 (translate_clast_user): Remove uses of rename_map. Allocate and
45 (translate_clast_for_loop): Remove uses of rename_map.
46 (translate_clast_for): Same.
47 (translate_clast_guard): Same.
48 (translate_clast): Same.
50 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
51 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
52 * sese.c (set_rename): Now static.
53 (rename_variables_in_stmt): Removed.
55 (is_parameter): Removed.
57 (expand_scalar_variables_call): Removed.
58 (expand_scalar_variables_ssa_name): Removed.
59 (expand_scalar_variables_expr): Removed.
60 (expand_scalar_variables_stmt): Removed.
61 (expand_scalar_variables): Removed.
62 (rename_variables): Removed.
63 (remove_condition): Removed.
64 (get_true_edge_from_guard_bb): Removed.
65 (get_false_edge_from_guard_bb): Removed.
66 (struct igp): Removed.
67 (default_before_guard): Removed.
68 (convert_for_phi_arg): Removed.
69 (add_guard_exit_phis): Removed.
70 (insert_guard_phis): Removed.
71 (graphite_copy_stmts_from_block): Now also uses iv_map and a
72 region. Do not copy conditions. Do not copy induction variables.
74 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
75 the translated statement. Use the iv_map for the induction
77 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
78 (set_rename): Removed declaration.
79 (scev_analyzable_p): ...here.
80 * tree-chrec.c (chrec_apply_map): New.
81 * tree-chrec.h (chrec_apply_map): Declared.
83 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
85 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
86 insert_loop_close_phis.
87 * sese.c (name_defined_in_loop_p): Removed.
88 (expr_defined_in_loop_p): Removed.
89 (alive_after_loop): Removed.
90 (close_phi_not_yet_inserted_p): Removed.
91 (struct alep): Removed.
92 (add_loop_exit_phis): Removed.
93 (insert_loop_close_phis): Removed.
95 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
97 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
99 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
101 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
103 * gfortran.dg/graphite/id-20.f: New.
105 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
107 * graphite-cloog-util.h: Added cloog.h.
108 * graphite-blocking.c: Removed cloog.h.
109 * graphite-dependences.c: Same.
110 * graphite-interchange.c: Same.
111 * graphite-poly.c: Same.
112 * graphite-ppl.c: Same.
113 * graphite-scop-detection.c: Same.
114 * graphite-sese-to-poly.c:
116 Removed graphite-clast-to-gimple.h.
117 (check_poly_representation): Removed (unused).
118 * graphite-sese-to-poly.h
119 (check_poly_representation): Removed (unused).
121 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
124 (OBJS-common): Added graphite-cloog-util.o.
125 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
126 (graphite-cloog-util.o): New.
127 (graphite-ppl.o): Added graphite-cloog-util.h.
128 * graphite-clast-to-gimple.c:
129 Added graphite-cloog-util.h to include statements.
130 * graphite-cloog-util.c: New.
131 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
132 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
133 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
134 (new_C_Polyhedron_from_Cloog_Matrix): Same.
135 (ppl_Constrain_System_number_of_constraints): Same.
136 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
137 (oppose_constraint): Same.
138 (cloog_matrix_to_ppl_constraint): Same.
139 (new_Constraint_System_from_Cloog_Matrix): Same.
140 (insert_constraint_into_matrix): Same. Declared static.
141 * graphite-cloog-util.h: New.
142 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
143 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
144 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
145 (new_C_Polyhedron_from_Cloog_Matrix): Same.
146 (insert_constraint_into_matrix): Same.
148 Added graphite-cloog-util.h to include statements.
149 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
150 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
151 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
152 (new_C_Polyhedron_from_Cloog_Matrix): Same.
153 (insert_constraint_into_matrix): Same.
154 (ppl_Constrain_System_number_of_constraints): Same.
155 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
156 (oppose_constraint): Same.
157 (cloog_matrix_to_ppl_constraint): Same.
158 (new_Constraint_System_from_Cloog_Matrix): Same.
160 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
161 graphite-cloog-util.h.
162 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
163 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
164 (new_C_Polyhedron_from_Cloog_Matrix): Same.
165 (insert_constraint_into_matrix): Removed.
167 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
169 * graphite-clast-to-gimple.c
170 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
171 (precision_for_interval): Same.
172 (gcc_type_for_interval): Same.
173 (compute_type_for_level): Same.
174 * graphite-interchange.c
175 (lst_interchange_profitable_p): Same.
177 (psct_scattering_dim_for_loop_depth): Same.
179 (ppl_max_for_le_pointset): Same.
180 (ppl_min_for_le_pointset): Same.
182 2010-06-25 Vladimir Kargov <kargov@gmail.com>
184 * refined-regions.c (bb_index_compare): New.
185 (get_bbs_in_region): New.
186 (print_bbs_in_region): New.
187 (print_refined_region): Add an argument that allows to print
188 all basic blocks contained in regions.
189 (debug_refined_region): Update call to print_refined_region.
190 * refined-regions.h (print_refined_region): Update declaration.
191 (get_bbs_in_region): Declared.
192 * graphite-scop-detection.c (build_scops_new): Print the refined
193 region tree into the Grahite dump file.
195 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
197 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
198 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
200 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
202 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
203 rewrite_close_phi_out_of_ssa.
205 * gcc.dg/graphite/id-22.c: New.
207 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
209 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
211 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
213 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
215 * sese.c (debug_rename_map): Same.
218 (rename_variables_in_stmt): Same.
219 (expand_scalar_variables_call): Same.
220 (expand_scalar_variables_ssa_name): Same.
221 (expand_scalar_variables_expr): Same.
222 (expand_scalar_variables_stmt): Same.
223 (expand_scalar_variables): Same.
224 (rename_variables): Same.
225 (graphite_copy_stmts_from_block): Same.
226 (copy_bb_and_scalar_dependences): Same.
228 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
230 * graphite-clast-to-gimple.c (copy_renames): Removed.
231 (translate_clast_for): Do not call copy_renames.
232 (translate_clast_guard): Same.
234 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
236 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
237 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
238 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
239 before rewrite_cross_bb_scalar_deps.
241 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
243 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
244 Early return in when flag_associative_math is not set.
246 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
248 * gcc.dg/graphite/run-id-2.c: Call abort.
250 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
252 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
253 of SSA copies on edges except for loop->latch.
255 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
257 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
258 Split out of rewrite_reductions_out_of_ssa.
259 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
261 * graphite.c (graphite_transform_loops): Call it.
263 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
265 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
267 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
269 * passes.c (init_optimization_passes): Add pass_graphite.
270 Schedule a pass_copy_prop before pass_graphite_transforms.
271 * timevar.def (TV_GRAPHITE): Declared.
272 * tree-pass.h (pass_graphite): Declared.
273 * tree-ssa-loop.c (pass_graphite): New.
275 * gcc.dg/graphite/id-20.c: New.
277 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
279 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
280 Remove calls to rename_nb_iterations and rename_sese_parameters.
281 * graphite-clast-to-gimple.h (gloog): Update declaration.
282 * graphite.c (graphite_transform_loops): Update call to gloog.
283 * sese.c (rename_variables_in_expr): Removed.
284 (rename_nb_iterations): Removed.
285 (rename_sese_parameters): Removed.
286 * sese.h (rename_nb_iterations): Removed.
287 (rename_sese_parameters): Removed.
289 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
291 * graphite-clast-to-gimple.c (gloog): Remove call to
292 sese_adjust_liveout_phis.
293 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
294 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
295 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
296 rewrite_phi_out_of_ssa.
297 * sese.c (get_vdef_before_sese): Removed.
298 (sese_adjust_vphi): Removed.
299 (sese_adjust_liveout_phis): Removed.
300 * sese.h (sese_adjust_liveout_phis): Removed.
302 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
304 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
305 argument for the place after which to insert the out of SSA copy.
306 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
307 (rewrite_phi_out_of_ssa): Same.
308 (rewrite_cross_bb_scalar_deps): Same.
309 (insert_copyout): Removed.
310 (insert_copyin): Removed.
311 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
312 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
315 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
317 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
318 (rewrite_reductions_out_of_ssa): Same.
319 (rewrite_commutative_reductions_out_of_ssa): Same.
320 (build_poly_scop): Do not call these functions.
321 * graphite-sese-to-poly.h (build_poly_scop): Declared.
322 (rewrite_reductions_out_of_ssa): Declared.
323 (rewrite_commutative_reductions_out_of_ssa): Declared.
324 * graphite.c (graphite_transform_loops): Call on every scop
325 rewrite_commutative_reductions_out_of_ssa before calling
326 rewrite_reductions_out_of_ssa and build_scop_bbs.
328 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
330 * graphite-dependences.c (dot_deps): Make system call to dotty run
332 (dot_deps_stmt): Same.
333 * graphite-poly.c (dot_lst): Same.
335 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
337 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
338 old_type in parameter.
339 (gcc_type_for_value): Update call to gcc_type_for_interval.
340 (compute_type_for_level_1): Renamed compute_type_for_level.
341 Update call to gcc_type_for_interval.
343 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
345 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
346 the scev analysis when the variable is not used outside the loop
347 in a close phi node: call compute_overall_effect_of_inner_loop.
349 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
351 * graphite-sese-to-poly.c (single_pred_cond): Renamed
352 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
353 (build_sese_conditions_before): Renamed call to single_pred_cond.
354 (build_sese_conditions_after): Same.
356 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
358 * graphite-poly.h: Fix comments and indentation.
359 * graphite-sese-to-poly.c: Same.
360 (build_sese_conditions_before): Compute stmt and gbb only when needed.
361 * tree-chrec.c: Fix comments and indentation.
362 (tree-ssa-loop-niter.c): Same.
364 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
366 * refined-regions.c (create_region): Only initialize the region.
367 (find_regions_with_entry): Initialize parent relation and bbmap
369 (build_regions_tree): Set outermost_region to region instead of
371 (calculate_region_tree): Remove unneeded parameters.
373 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
375 * graphite-scop-detection.c (is_scop_p): New.
376 (build_scops_new): New. A skeleton for the new scop detection.
377 (build_scops_old): Renamed from build_scops.
378 (build_scops): New version. Call the new and the old scop
381 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
382 Antoniu Pop <antoniu.pop@gmail.com>
384 * Makefile.in (OBJS-common): Add refined-regions.o.
385 (refined-regions.o): New.
386 (graphite-scop-detection.o): Use refined-regions.h.
387 * graphite-scop-detection.c: Include refined-regions.h
388 (build_scops): Also build the refined region tree.
389 * refined-regions.c: New. Adds an algorithm to detect refined
391 (print_refined_region): New.
392 (debug_refined_region): New.
393 (refined_region_contains_bb_p): New.
394 (refined_region_contains_region_p): New.
396 (struct find_regions_global_data): New.
398 (typedef struct bb_bb_def): New.
399 (new_bb_bb_def): New.
400 (bb_bb_map_hash): New.
404 (new_bb_reg_def): New.
405 (bb_reg_map_hash): New.
406 (eq_bb_reg_map): New.
407 (find_new_region): New.
408 (insert_new_reg): New.
409 (insert_new_bb): New.
410 (insert_shortcut): New.
411 (get_next_postdom): New.
412 (create_region): New.
413 (find_regions_with_entry): New.
414 (find_regions_adc): New.
416 (get_topmost_parent): New.
417 (build_regions_tree): New.
418 (calculate_region_tree): New.
419 (free_region_tree): New.
420 * refined-regions.h: New.
421 (struct refined_region): New.
422 (calculate_region_tree): New.
423 (free_region_tree): New.
424 (refined_region_contains_bb_p): New.
425 (refined_region_contains_region_p): New.
426 (print_refined_region): New.
427 (debug_refined_region): New.
429 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
431 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
434 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
436 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
437 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
439 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
441 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
442 phi_arg_in_outermost_loop.
443 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
444 (remove_invariant_phi): Same.
446 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
448 * graphite-blocking.c
449 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
450 * graphite-clast-to-gimple.c
451 (clast_to_gcc_expression): Same.
452 (precision_for_value): Same.
453 (precision_for_interval): Same.
454 (gcc_type_for_interval): Same.
455 (graphite_create_new_guard): Same.
456 (compute_bounds_for_level): Same.
457 (graphite_create_new_loop_guard): Same.
458 * graphite-interchange.c
459 (build_linearized_memory_access): Same.
460 (pdr_stride_in_loop): Same.
461 (memory_strides_in_loop_1): Same.
462 (memory_strides_in_loop): Same.
463 (extend_scattering): Same.
464 (psct_scattering_dim_for_loop_depth): Same.
465 (pbb_number_of_iterations): Same.
467 (debug_iteration_domains): Same.
469 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
470 (ppl_set_inhomogeneous_gmp): Same.
471 (ppl_strip_loop): Same.
472 (ppl_lexico_compare_linear_expressions): Same.
473 (ppl_read_polyhedron_matrix): Same.
474 (ppl_max_for_le_pointset): Same.
476 (ppl_read_polyhedron_matrix): Same.
477 (tree_int_to_gmp): Same.
478 (gmp_cst_to_tree): Same.
479 (ppl_set_inhomogeneous): Same.
480 (ppl_set_inhomogeneous_tree): Same.
481 (ppl_set_coef): Same.
482 (ppl_set_coef_tree): Same.
483 * graphite-sese-to-poly.c
484 (build_pbb_scattering_polyhedrons): Same.
485 (build_scop_scattering): Same.
486 (scan_tree_for_params_right_scev): Same.
487 (scan_tree_for_params): Same.
488 (find_params_in_bb): Same.
489 (find_scop_parameters): Same.
490 (add_upper_bounds_from_estimated_nit): Same.
491 (build_loop_iteration_domains): Same.
492 (add_condition_to_domain): Same.
493 (pdr_add_memory_accesses): Same.
495 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
497 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
498 CLooG's value_* macros to their respective mpz_* counterparts.
499 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
500 (graphite_create_new_loop_guard): Same.
501 * graphite-interchange.c (build_linearized_memory_access): Same.
502 (pdr_stride_in_loop): Same.
503 (memory_strides_in_loop_1): Same.
504 (1st_interchange_profitable_p): Same.
505 * graphite-poly.c (extend_scattering): Same.
506 (psct_scattering_dim_for_loop_depth): Same.
507 (pbb_number_of_iterations): Same.
508 (pbb_number_of_iterations_at_time): Same.
509 * graphite-poly.h (new_1st_loop): Same.
510 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
511 (oppose_constraint): Same.
512 (insert_constraint_into_matrix): Same.
513 (ppl_set_inhomogeneous_gmp): Same.
514 (ppl_set_coef_gmp): Same.
515 (ppl_strip_loop): Same.
516 (ppl_lexico_compare_linear_expressions): Same.
517 (ppl_max_for_le_pointset): Same.
518 (ppl_min_for_le_pointset): Same.
519 (ppl_build_realtion): Same.
520 * graphite-ppl.h (gmp_cst_to_tree): Same.
521 (ppl_set_inhomogeneous): Same.
522 (ppl_set_inhomogeneous_tree): Same.
523 (ppl_set_coef): Same.
524 (ppl_set_coef_tree): Same.
525 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
526 (build_scop_scattering): Same.
527 (add_value_to_dim): Same.
528 (scan_tree_for_params_right_scev): Same.
529 (scan_tree_for_params_int): Same.
530 (scan_tree_for_params): Same.
531 (find_params_in_bb): Same.
532 (find_scop_parameters): Same.
533 (add_upper_bounds_from_estimated_nit): Same.
534 (build_loop_iteration_domains): Same.
535 (create_linear_expr_from_tree): Same.
536 (add_condition_to_domain): Same.
537 (pdr_add_memory_accesses): Same.
539 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
542 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
543 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
544 When converting an unsigned type to signed, double its precision.
545 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
546 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
547 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
549 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
552 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
553 build_nonstandard_integer_type.
554 (gcc_type_for_interval): Same.
556 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
559 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
560 POINTER_PLUS_EXPR for pointer types.
562 * gcc.dg/graphite/id-19.c: New.
564 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
567 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
568 * graphite-clast-to-gimple.c: Include langhooks.h.
569 (max_signed_precision_type): New.
570 (max_precision_type): Takes two types as arguments.
571 (precision_for_value): New.
572 (precision_for_interval): New.
573 (gcc_type_for_interval): New.
574 (gcc_type_for_value): New.
575 (gcc_type_for_clast_term): New.
576 (gcc_type_for_clast_red): New.
577 (gcc_type_for_clast_bin): New.
578 (gcc_type_for_clast_expr): Split up into several functions.
579 (gcc_type_for_clast_eq): Rewritten.
580 (compute_bounds_for_level): New.
581 (compute_type_for_level_1): New.
582 (compute_type_for_level): New.
583 (gcc_type_for_cloog_iv): Removed.
584 (gcc_type_for_iv_of_clast_loop): Rewritten.
585 (graphite_create_new_loop): Compute the lower and upper bound types
586 with gcc_type_for_clast_expr.
587 (graphite_create_new_loop_guard): Same.
588 (find_cloog_iv_in_expr): Removed.
589 (compute_cloog_iv_types_1): Removed.
590 (compute_cloog_iv_types): Removed.
591 (gloog): Do not call compute_cloog_iv_types.
592 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
594 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
595 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
596 (GBB_CLOOG_IV_TYPES): Removed.
598 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
600 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
602 Reverted this commit: as at this point the loop closed SSA form
603 is under a canonical form respecting the single argument condition.
604 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
605 close phi nodes may have more than one argument.
607 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
609 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
610 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
611 (detect_commutative_reduction): Same.
613 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
615 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
616 close phi nodes may have more than one argument.
618 2010-03-30 Richard Guenther <rguenther@suse.de>
619 Zdenek Dvorak <ook@ucw.cz>
620 Sebastian Pop <sebastian.pop@amd.com>
623 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
624 with multiple arguments.
625 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
627 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
629 * graphite-dependences.c (print_pddr): Call print_pdr with an
631 * graphite-poly.c (debug_pdr): Add an extra argument for the
634 (print_pbb_domain): Same.
636 (print_scop_context): Same.
639 (debug_pbb_domain): Same.
643 (debug_scop_context): Same.
646 (print_scop_params): Same.
647 (debug_scop_params): Same.
648 (print_iteration_domain): Same.
649 (print_iteration_domains): Same.
650 (debug_iteration_domain): Same.
651 (debug_iteration_domains): Same.
652 (print_scattering_function): Same.
653 (print_scattering_functions): Same.
654 (debug_scattering_function): Same.
655 (debug_scattering_functions): Same.
656 * graphite-poly.h (debug_pdr): Update declaration.
658 (print_pbb_domain): Same.
660 (print_scop_context): Same.
663 (debug_pbb_domain): Same.
667 (debug_scop_context): Same.
670 (print_scop_params): Same.
671 (debug_scop_params): Same.
672 (print_iteration_domain): Same.
673 (print_iteration_domains): Same.
674 (debug_iteration_domain): Same.
675 (debug_iteration_domains): Same.
676 (print_scattering_function): Same.
677 (print_scattering_functions): Same.
678 (debug_scattering_function): Same.
679 (debug_scattering_functions): Same.
681 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
683 * graphite-poly.c (print_scattering_function_1): New.
684 (print_scattering_function): Call it.
685 (print_scop_params): Remove spaces at the end of lines.
688 * graphite-poly.h (print_cloog): Declared.
689 (debug_cloog): Declared.
691 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
693 * tree-ssa-copy.c: Revert this previous change:
694 (init_copy_prop): Loop closed phi nodes cancontain more than one
696 (execute_copy_prop): Revert the previous change: do not call
697 rewrite_into_loop_closed_ssa.
699 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
700 Richard Guenther <rguenther@suse.de>
703 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
704 contain more than one argument.
705 (execute_copy_prop): Revert the previous change: do not call
706 rewrite_into_loop_closed_ssa.
708 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
709 * gcc.dg/graphite/id-pr43464-1.c: New.
711 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
714 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
715 and verify_loop_closed_ssa when copy prop is executed in the LNO.
717 * gcc.dg/graphite/id-pr43464.c: New.
719 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
721 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
723 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
724 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
725 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
726 to switch between adding the IV bump in loop->latch or in loop->header.
728 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
730 * passes.c (init_optimization_passes): Add pass_copy_prop
733 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
735 * graphite-poly.c (print_scattering_function): Pretty print following
738 (print_pbb_domain): Same.
739 (dump_gbb_cases): Same.
740 (dump_gbb_conditions): Same.
743 (print_scop_params): Same.
744 (print_scop_context): Same.
746 (print_pbb_body): New.
747 (lst_indent_to): New.
748 (print_lst): Start new lines with a #.
749 * graphite-poly.h (pbb_bb): New.
750 (pbb_index): Use pbb_bb.
751 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
753 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
755 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
758 * gcc.dg/graphite/id-pr43351.c
760 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
763 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
764 call insert_out_of_ssa_copy for default definitions.
765 * gfortran.dg/graphite/id-pr43354.f: New.
767 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
770 * gfortran.dg/graphite/pr43349.f: New.
772 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
774 * graphite-clast-to-gimple.c (my_long_long): Defined.
775 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
776 * graphite-sese-to-poly.c (my_long_long): Defined.
777 (scop_ivs_can_be_represented): Use it.
779 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
781 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
782 graphite-max-bbs-per-function, and loop-block-tile-size.
783 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
785 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
787 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
789 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
791 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
792 (add_upper_bounds_from_estimated_nit): New.
793 (build_loop_iteration_domains): Use it.
795 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
797 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
799 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
802 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
803 should be an INTEGER_CST. Also handle CASE_CONVERT.
804 * gcc.dg/graphite/pr43306.c: New.
806 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
808 * graphite.c (graphite_initialize): To bound the number of bbs per
809 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
810 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
811 * doc/invoke.texi: Document it.
813 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
815 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
816 * graphite-sese-to-poly.h (build_poly_scop): Same.
818 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
820 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
821 the number of parameters in the scop. Use as an upper bound
822 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
823 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
824 * doc/invoke.texi: Document it.
826 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
828 * graphite-sese-to-poly.c (add_param_constraints): Use
829 lower_bound_in_type and upper_bound_in_type.
831 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
833 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
834 instead of unsigned_type_node.
836 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
837 Reza Yazdani <reza.yazdani@amd.com>
840 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
841 on pointer type parameters.
843 * gcc.dg/graphite/run-id-4.c: New.
845 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
848 * gcc.dg/graphite/run-id-3.c: New.
850 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
851 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
853 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
854 handle conversions from pointer to integers.
855 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
856 induction variable, to be able to work with code generated by CLooG.
857 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
858 (build_poly_scop): Bail out if we cannot codegen a loop.
860 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
862 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
863 code generation with gloog_error.
865 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
867 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
868 Call fold_convert on all the returned values.
869 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
870 the type of the resulting expression.
872 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
874 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
875 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
876 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
878 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
880 * graphite-dependences.c (map_into_dep_poly): Removed.
881 (dependence_polyhedron_1): Use combine_context_id_scat.
883 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
885 * graphite-poly.h (struct poly_scattering): Add layout documentation.
886 (struct poly_bb): Same.
887 (combine_context_id_scat): New.
889 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
892 * sese.c (name_defined_in_loop_p): Return false for default
895 * gcc.dg/graphite/pr42326.c: New.
897 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
899 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
900 and clean up the logic.
902 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
904 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
907 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
910 * graphite-scop-detection.c (create_single_exit_edge): Move
911 the call to find_single_exit_edge to....
912 (create_sese_edges): ...here. Don't handle multiple edges
913 exiting the function.
914 (build_graphite_scops): Don't handle multiple edges
915 exiting the function.
917 * gcc.dg/graphite/pr43083.c: New.
919 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
922 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
923 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
925 * gfortran.dg/graphite/pr43097.f: New.
927 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
928 Manuel López-Ibáñez <manu@gcc.gnu.org>
931 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
933 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
936 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
938 * g++.dg/graphite/pr43026.C: New.
940 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
942 * Merge from mainline (154736:156693).
944 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
947 * gcc.dg/graphite/pr43012.c: New.
949 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
951 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
952 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
954 * g++.dg/graphite/pr42930.C: New.
956 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
959 * graphite-scop-detection.c (graphite_can_represent_scev): Call
960 graphite_can_represent_init for MULT_EXPR.
962 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
966 * graphite-sese-to-poly.c (remove_phi): New.
967 (translate_scalar_reduction_to_array): Call remove_phi.
969 * gcc.dg/graphite/pr42530.c: New.
970 * gcc.dg/graphite/pr42914.c: New.
972 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
975 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
976 * graphite-clast-to-gimple.h (gloog): Update declaration.
977 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
978 * graphite-poly.h (struct poly_bb): Add missing comments.
979 (struct scop): Add poly_scop_p field.
981 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
982 * graphite.c (graphite_transform_loops): Build the polyhedral
983 representation for each scop before code generation.
984 * sese.c (rename_variables_in_operand): Removed.
985 (rename_variables_in_expr): Return the renamed expression.
986 (rename_sese_parameters): New.
987 * sese.h (rename_sese_parameters): Declared.
989 * gcc.dg/graphite/pr42771.c: New.
991 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
993 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
995 * gcc.dg/graphite/block-1.c: Same.
996 * gcc.dg/graphite/block-3.c: Same.
997 * gcc.dg/graphite/block-4.c: Same.
998 * gcc.dg/graphite/block-5.c: Same.
999 * gcc.dg/graphite/block-6.c: Same.
1000 * gcc.dg/graphite/block-7.c: Same.
1001 * gcc.dg/graphite/interchange-0.c: Same.
1002 * gcc.dg/graphite/interchange-1.c: Same.
1003 * gcc.dg/graphite/interchange-10.c: Same.
1004 * gcc.dg/graphite/interchange-11.c: Same.
1005 * gcc.dg/graphite/interchange-12.c: Same.
1006 * gcc.dg/graphite/interchange-2.c: Same.
1007 * gcc.dg/graphite/interchange-3.c: Same.
1008 * gcc.dg/graphite/interchange-4.c: Same.
1009 * gcc.dg/graphite/interchange-5.c: Same.
1010 * gcc.dg/graphite/interchange-6.c: Same.
1011 * gcc.dg/graphite/interchange-7.c: Same.
1012 * gcc.dg/graphite/interchange-8.c: Same.
1013 * gcc.dg/graphite/interchange-9.c: Same.
1014 * gcc.dg/graphite/interchange-mvt.c: Same.
1016 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1018 * gfortran.dg/graphite/id-19.f: New.
1019 * gfortran.dg/graphite/pr14741.f90: New.
1020 * gfortran.dg/graphite/pr41924.f90: New.
1021 * gfortran.dg/graphite/run-id-2.f90: New.
1023 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1026 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1027 to unknown_dependence.
1028 (graphite_legal_transform_dr): Handle the unknown_dependence.
1029 (graphite_carried_dependence_level_k): Same.
1031 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1033 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1035 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1036 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1039 * graphite-dependences.c (build_lexicographical_constraint): Return
1040 a union of dependence polyhedra.
1041 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1043 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1044 * gcc.dg/graphite/block-4.c: Same.
1045 * gcc.dg/graphite/block-7.c: Same.
1046 * gcc.dg/graphite/interchange-12.c: Same.
1047 * gcc.dg/graphite/interchange-mvt.c: Same.
1048 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1049 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1050 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1052 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1054 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1055 the execution check to FAIL. This testcase is miscompiled by Graphite
1056 and the check should be re-enabled.
1057 * gcc.dg/graphite/interchange-mvt.c: Same.
1058 * gcc.dg/graphite/block-0.c: Same.
1059 * gcc.dg/graphite/block-4.c: Same.
1060 * gcc.dg/graphite/block-7.c: Same.
1062 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1064 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1065 * gcc.dg/graphite/scop-0.c: Fix spaces.
1066 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1067 * gfortran.dg/graphite/block-2.f: Same.
1068 * gfortran.dg/graphite/block-3.f90: Same.
1069 * gfortran.dg/graphite/block-4.f90: Same.
1070 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1071 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1073 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1075 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1076 PDDR_ORIGINAL_SCATTERING_P.
1077 (pddr_is_empty): Rewritten.
1078 (print_dependence_polyhedron_layout): New.
1081 (build_alias_set_powerset): Moved up.
1082 (poly_drs_may_alias_p): Moved up.
1083 (lexicographically_gt_p): Removed.
1084 (build_lexicographically_gt_constraint): Renamed
1085 build_lexicographical_constraint, reimplemented.
1086 (dependence_polyhedron_1): Simplified parameters.
1087 (dependence_polyhedron): Same. Keep along empty PDDRs
1088 to make efficient use of the cache.
1089 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1090 (graphite_legal_transform_dr): Rewritten.
1091 (graphite_legal_transform_bb): Pass fewer arguments to
1092 graphite_legal_transform_dr.
1093 (graphite_carried_dependence_level_k): Simplified implementation.
1094 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1095 (dot_transformed_deps_stmt_1): Same.
1096 (dot_original_deps): Same.
1097 (dot_transformed_deps): Same.
1098 * graphite-dependences.h (struct poly_ddr): Added a new field
1099 original_scattering_p.
1100 (PDDR_ORIGINAL_SCATTERING_P): New.
1101 (print_pddr): Declared.
1102 (debug_pddr): Declared.
1103 * graphite-ppl.c: Clarify comment.
1104 * sese.h (print_gimple_bb): Removed unused declaration.
1107 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1109 * g++.dg/graphite/graphite.exp: Rewritten.
1110 * gcc.dg/graphite/graphite.exp: Rewritten.
1111 * gfortran.dg/graphite/graphite.exp: Rewritten.
1112 * gcc.dg/graphite/block-0.c: Added runtime test.
1113 * gcc.dg/graphite/block-1.c: Same.
1114 * gcc.dg/graphite/block-3.c: Same.
1115 * gcc.dg/graphite/block-4.c: Same.
1116 * gcc.dg/graphite/block-5.c: Same.
1117 * gcc.dg/graphite/block-6.c: Same.
1118 * gcc.dg/graphite/block-7.c: Same.
1119 * gcc.dg/graphite/interchange-0.c: Same.
1120 * gcc.dg/graphite/interchange-1.c: Same.
1121 * gcc.dg/graphite/interchange-10.c: Same.
1122 * gcc.dg/graphite/interchange-11.c: Same.
1123 * gcc.dg/graphite/interchange-12.c: Same.
1124 * gcc.dg/graphite/interchange-2.c: Same.
1125 * gcc.dg/graphite/interchange-3.c: Same.
1126 * gcc.dg/graphite/interchange-4.c: Same.
1127 * gcc.dg/graphite/interchange-5.c: Same.
1128 * gcc.dg/graphite/interchange-6.c: Same.
1129 * gcc.dg/graphite/interchange-7.c: Same.
1130 * gcc.dg/graphite/interchange-8.c: Same.
1131 * gcc.dg/graphite/interchange-9.c: Same.
1132 * gcc.dg/graphite/interchange-mvt.c: Same.
1133 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1135 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1137 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1140 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1142 * common.opt: Add -fgraphite-cloog-opts.
1143 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1144 * opts.c (decode_options): Same.
1146 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1148 * gcc.dg/graphite/id-17.c: New.
1149 * gcc.dg/graphite/pr41888.c: New.
1150 * gcc.dg/graphite/scop-22.c: New.
1151 * gfortran.dg/graphite/pr40982.f90: New.
1153 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1155 * graphite-dependences.c: Clarify comments.
1156 (build_pddr): Add an extra parameter direction.
1157 (graphite_legal_transform_dr): Use build_pddr.
1158 (dot_original_deps_stmt_1): Update use of build_pddr.
1159 (dot_transformed_deps_stmt_1): Same.
1160 (dot_original_deps): Same.
1161 (dot_transformed_deps): Same.
1163 * gcc.dg/graphite/interchange-12.c: New.
1164 * gcc.dg/graphite/block-7.c: New.
1166 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1168 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1169 (pddr_transformed_scattering): Removed.
1170 (graphite_legal_transform_dr): Use build_pddr.
1171 (dot_original_deps_stmt_1): Same.
1172 (dot_transformed_deps_stmt_1): Same.
1173 (dot_original_deps): Same.
1174 (dot_transformed_deps): Same.
1176 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1178 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1179 (build_lexicographically_gt_constraint): Same.
1180 (dependence_polyhedron_1): Same.
1181 (dependence_polyhedron): Same.
1183 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1185 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1186 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1187 (lexicographically_gt_p): Change type of direction to int.
1188 (build_lexicographically_gt_constraint): Same.
1189 (dependence_polyhedron_1): Same.
1190 (dependence_polyhedron): Same.
1191 (pddr_original_scattering): Use integers for direction.
1192 (pddr_transformed_scattering): Same.
1193 (graphite_legal_transform_dr): Same.
1194 (graphite_carried_dependence_level_k): Same.
1196 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1198 * graphite-dependences.c (build_pairwise_constraint): Renamed
1199 ppl_build_relation. Moved...
1200 (dr_equality_constraints): Use ppl_build_relation.
1201 (build_pairwise_scheduling_equality): Same.
1202 (build_pairwise_scheduling_inequality): Same.
1203 * graphite-ppl.c (ppl_build_relation): ...here.
1204 * graphite-ppl.h (ppl_build_relation): Declared.
1206 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1209 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1210 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1211 Set gloog_error when such an expression failed to be built.
1212 (translate_clast): Early return when gloog_error is set.
1213 (gloog): Clear gloog_error. When gloog_error is set, call
1214 set_ifsese_condition to enable the original code. Return the status
1215 of the code generation based on gloog_error.
1216 * sese.c (set_ifsese_condition): New.
1217 * sese.h (set_ifsese_condition): Declared.
1219 * g++.dg/graphite/pr42681.C: New.
1221 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1224 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1225 rename_nb_iterations.
1226 * sese.c (rename_variables_in_operand): New.
1227 (rename_variables_in_expr): New.
1228 (rename_nb_iterations): New.
1229 (sese_adjust_liveout_phis): Update the rename_map.
1230 * sese.h (rename_nb_iterations): Declared.
1231 * tree-scalar-evolution.c (scev_reset_htab): New.
1232 (scev_reset): Call scev_reset_htab.
1233 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1235 * gfortran.dg/graphite/pr42732.f: New.
1237 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1240 * graphite-clast-to-gimple.c: Fix formatting.
1241 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1242 (expr_defined_in_loop_p): New.
1243 (add_loop_exit_phis): Also handle full expressions: remove from
1244 the rename_map the expressions defined in the loop that we're closing.
1246 * gfortran.dg/graphite/pr42393-1.f90: New.
1247 * gfortran.dg/graphite/pr42393.f90: Add new flags
1248 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1249 make this testcase useful in the Graphite branch.
1251 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1253 * graphite-scop-detection.c (exclude_component_ref): Removed.
1254 (is_simple_operand): Removed.
1255 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1257 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1260 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1261 the array indexing of ADDR_EXPRs.
1263 * gcc.dg/graphite/pr42221.c: New.
1265 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1268 * graphite.c (graphite_finalize): Call scev_reset.
1269 (graphite_transform_loops): Do not call scev_reset between the code
1270 generation of scops.
1272 * gcc.dg/graphite/pr42521.c: New.
1274 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1276 * graphite-interchange.c (memory_stride_in_loop): Renamed
1278 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1279 (memory_strides_in_loop): Memoize the memory strides per loop.
1280 (lst_interchange_profitable_p): Do not initialize to zero the memory
1282 * graphite-poly.h (struct lst): Add a field memory_strides.
1283 (LST_LOOP_MEMORY_STRIDES): New.
1284 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1285 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1287 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1289 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1290 memory_strides_in_loop. Gather memory strides on a whole loop.
1291 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1292 (lst_interchange_profitable_p): Removed.
1293 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1295 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1297 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1298 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1299 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1300 Remove context_loop and level.
1302 2010-01-07 Richard Guenther <rguenther@suse.de>
1304 PR tree-optimization/42641
1305 * sese.c (rename_map_elt_info): Use the SSA name version, do
1308 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1310 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1311 blocked" only when both the strip mine and the interchange have
1314 * gcc.dg/graphite/block-2.c: Removed.
1315 * gcc.dg/graphite/block-3.c: Add scan pattern.
1316 * gcc.dg/graphite/block-4.c: Same.
1317 * gcc.dg/graphite/block-5.c: Same.
1318 * gcc.dg/graphite/block-6.c: Same.
1320 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1322 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1323 before allocating a new one.
1324 (copy_renames): Check that slot is not NULL.
1325 (mark_bb_with_pbb): Same.
1326 (compute_cloog_iv_types_1): Same.
1327 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1328 nest, and after LSTs.
1329 (lst_try_interchange_loops): Same.
1331 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1334 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1335 the before, nest, and after LSTs.
1336 (lst_try_interchange): Removed.
1337 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1339 (lst_interchange_select_outer): Apply interchange on the outer loop
1340 until there are no more changes in the inner loops.
1342 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1344 Revert patch fixing PR middle-end/42221.
1346 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1349 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1352 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1354 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1357 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1358 that contain only one statement.
1360 * gfortran.dg/graphite/pr42180.f90: New.
1362 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1365 * gfortran.dg/graphite/pr42393.f90: New.
1367 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1370 * gfortran.dg/graphite/pr42186.f90: New.
1372 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1375 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1376 Insert the reduction copy in the same block as the phi node.
1377 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1379 * gcc.dg/graphite/pr42205-1.c: New.
1380 * gcc.dg/graphite/pr42205-2.c: New.
1382 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1385 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1386 the array indexing of ADDR_EXPRs.
1388 * gcc.dg/graphite/pr42221.c: New.
1390 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1394 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1395 index. Call lst_interchange_select_inner only once.
1396 (lst_interchange_select_inner): Update use of lst_try_interchange.
1397 (lst_interchange_select_outer): Update.
1399 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1403 * graphite-interchange.c (lst_try_interchange): Do not increment the
1404 the OUTER index when there is no AFTER kernel. Do not increment the
1405 OUTER index for after processing the AFTER kernel.
1406 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1407 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1408 index. Do not pass to lst_interchange_select_inner the OUTER index.
1409 (scop_do_interchange): Update use of lst_interchange_select_outer.
1411 * gfortran.dg/graphite/graphite.exp
1412 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1413 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1414 the graphite dump file.
1415 * gfortran.dg/graphite/interchange-2.f: Same.
1416 * gfortran.dg/graphite/pr42334-1.f: New.
1418 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1422 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1424 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1425 (lst_try_interchange): Reimplemented.
1426 (lst_interchange_select_inner): Same.
1427 (lst_do_interchange): Renamed lst_interchange_select_outer.
1429 (scop_do_interchange): Update use of lst_interchange_select_outer.
1431 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1432 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1433 * gcc.dg/graphite/pr42211.c: New.
1434 * gfortran.dg/graphite/pr42334.f90: New.
1436 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1439 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1440 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1442 * gfortran.dg/graphite/pr42181.f90: New.
1444 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1447 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1448 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1449 (detect_commutative_reduction_arg): Simplified.
1450 (detect_commutative_reduction): Early return when the argument of
1451 the close phi is not of an SSA_NAME.
1453 * gcc.dg/graphite/pr42284.c: New.
1455 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1457 * dbgcnt.def (graphite_scop): New counter.
1458 * graphite.c: Include dbgcnt.h
1459 (graphite_transform_loops): Use new counter to limit transformations.
1461 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1464 * graphite-scop-detection.c (graphite_can_represent_init): Also
1465 handle more complex MULT_EXPRs containing parameters by recursion
1468 * gfortran.dg/graphite/pr42285.f90: New.
1470 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1472 * g++.dg/graphite/pr42130.C: Fix type.
1474 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1476 * g++.dg/graphite/pr42130.C: Correct testcase.
1478 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1480 * Merge from mainline (154493:154734).
1482 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1484 * Merge from mainline (151362:154491).
1486 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1488 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1489 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1491 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1494 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1495 translate_clast_for_loop): New.
1496 (translate_clast_for): Add a condition around the loop, to do not
1497 execute loops with zero iterations.
1498 * g++.dg/graphite/pr42130.C: New.
1499 * gcc.dg/graphite/pr35356-2.c: Adapt.
1501 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1503 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1504 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1505 Remove context_loop and level.
1507 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1509 * graphite-clast-to-gimple.c (translate_clast_user,
1510 translate_clast_for, translate_clast_guard): Simplify and move common
1511 elements to translate_clast().
1512 (translate_clast): Simplify and get common elements.
1514 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1516 * graphite-clast-to-gimple.c (translate_clast_user,
1517 translate_clast_for, translate_clast_guard): Split out of
1520 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1522 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1523 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1524 debug_clast_name_indexes_1, debug_clast_name_indexes,
1525 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1526 (clast_name_to_gcc, clast_to_gcc_expression,
1527 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1528 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1529 graphite_create_guard_cond_expr, graphite_create_new_loop,
1530 translate_clast): Add params_index.
1531 (initialize_cloog_names): Create parameter strings from scratch, do
1532 not reference other strings.
1533 (create_params_index): New.
1534 (gloog): Initialize params_index.
1535 * graphite-scop-detection (free_scops_1): Removed.
1536 (limit_scops): Use normal free_scops.
1537 * graphite-sese-to-poly.c (save_var_names): Removed.
1538 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1539 and SESE_PARAMS_INDEX.
1540 * sese.c (new_sese, free_sese): Dito.
1541 * sese.h (struct sese): Remove params_index, params_names.
1542 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1544 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1546 Revert the following patch from 2009-09-14:
1547 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1548 tree-scalar-evolution.h, and then tree-data-ref.h.
1549 * graphite-clast-to-gimple.c: Same.
1550 * graphite-dependences.c: Same.
1551 * graphite-interchange.c: Same.
1552 * graphite-poly.c: Same.
1553 * graphite-scop-detection.c: Same.
1554 * graphite-sese-to-poly.c: Same.
1556 * lambda-code.c: Same.
1557 * matrix-reorg.c: Same.
1558 * tree-data-ref.c: Same.
1559 * tree-if-conv.c: Same.
1560 * tree-loop-distribu: Same.: Same.
1561 * tree-loop-linear.c: Same.
1562 * tree-parloops.c: Same.
1563 * tree-predcom.c: Same.
1564 * tree-vect-patterns.c: Same.
1566 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1568 Revert patch from 2009-09-14.
1569 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1570 passes at -O1 and below.
1572 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1575 * gcc.dg/graphite/pr40281.c: New.
1577 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1578 evolutions should not variate in inner loops.
1580 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1583 * gfortran.dg/graphite/pr42050.f90: New.
1585 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1587 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1588 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1590 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1592 * graphite-blocking.c (scop_do_block): New.
1593 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1594 * graphite-poly.h (scop_do_block): Declared.
1596 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1598 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1599 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1600 to transform depth into the time_depth before calling
1601 pbb_number_of_iterations_at_time.
1602 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1605 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1607 Reverted the patch for "scattering permutations" from 2009-10-28.
1609 * graphite-poly.c (print_permutation): New.
1610 (debug_permutation): New.
1611 (new_poly_bb): Initialize PBB_PERMUTATION.
1612 (free_poly_bb): Free PBB_PERMUTATION.
1613 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1614 (struct pbb_permutation_elt): New.
1615 (PBB_PERMUTATION_ELT_STRIDE): New.
1616 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1617 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1618 (new_pbb_permutation_elt): New.
1619 (pbb_permutation_elt_free): New.
1620 (struct poly_bb): Add field permutation.
1621 (PBB_PERMUTATION): New.
1622 (print_permutation): Declared.
1623 (debug_permutation): Declared.
1625 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1627 * graphite-interchange.c (build_partial_difference): New.
1628 (memory_stride_in_loop): Refactored the computation of
1629 equality constraints into build_partial_difference function.
1630 Added support for debugging stride computations.
1632 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1634 * graphite-clast-to-gimple.c (gloog): Free if_region,
1635 if_region->true_region, and if_region->region.
1636 * sese.c (if_region_set_false_region): Free if_region->false_region.
1637 (create_if_region_on_edge): Do not use GGC_NEW.
1638 (move_sese_in_condition): Remove useless initialization.
1640 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1642 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1643 for the loops created by the loop distribution. Do not modify the
1645 (lst_try_interchange_loops): Same. Use a temporary LST for the
1646 transformed schedule. Call lst_update_scattering before data
1647 dependence analysis.
1648 (lst_try_interchange): Pass an extra parameter INDEX.
1649 (lst_do_interchange_1): New.
1650 (lst_do_interchange): Call lst_do_interchange_1.
1651 (scop_do_interchange): Call lst_update_scattering.
1652 * graphite-poly.c (apply_poly_transforms): Do not call
1653 lst_update_scattering.
1654 * graphite-poly.h (lst_pred): New.
1656 (lst_find_first_pbb): Return NULL when not found.
1658 (lst_insert_in_sequence): Allow LST1 to be NULL.
1660 (lst_substitute_3): New.
1661 * gcc.dg/graphite/interchange-1.c: XFail.
1662 * gcc.dg/graphite/interchange-8.c: XFail.
1663 * gcc.dg/graphite/interchange-11.c: XFail.
1665 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1667 * graphite-interchange.c (lst_perfectly_nested_p): New.
1668 (lst_perfect_nestify): New.
1669 (lst_try_interchange_loops): Call store_lst_schedule,
1670 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1671 (scop_do_interchange): Avoid redundant legality test.
1672 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1673 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1674 * graphite-poly.h (psct_static_dim): New.
1675 (lst_dewey_number_at_depth): New.
1676 (lst_find_pbb): Restructured.
1677 (lst_find_first_pbb): Restructured.
1678 (lst_find_last_pbb): New.
1679 (lst_contains_p): New.
1680 (lst_contains_pbb): New.
1681 (lst_create_nest): New.
1682 (lst_remove_from_sequence): New.
1683 (pbb_update_scattering): New.
1684 (lst_update_scattering_under): New.
1685 (lst_update_scattering_seq): New.
1686 (lst_update_scattering): New.
1687 (lst_insert_in_sequence): New.
1688 (lst_distribute_lst): New.
1689 (lst_remove_all_before_including_pbb): New.
1690 (lst_remove_all_before_excluding_pbb): New.
1692 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1694 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1695 get_loop_exit_edges.
1697 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1699 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1701 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1703 * graphite-poly.c (print_permutation): New.
1704 (debug_permutation): New.
1705 (new_poly_bb): Initialize PBB_PERMUTATION.
1706 (free_poly_bb): Free PBB_PERMUTATION.
1707 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1708 (struct pbb_permutation_elt): New.
1709 (PBB_PERMUTATION_ELT_STRIDE): New.
1710 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1711 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1712 (new_pbb_permutation_elt): New.
1713 (pbb_permutation_elt_free): New.
1714 (struct poly_bb): Add field permutation.
1715 (PBB_PERMUTATION): New.
1716 (print_permutation): Declared.
1717 (debug_permutation): Declared.
1719 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1721 * graphite-clast-to-gimple.c (gloog): Do not call
1722 sese_reset_aux_in_loops.
1723 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
1724 extra argument for domains. Do not use loop->aux.
1725 (build_scop_iteration_domain): Initialize and free domains, pass it
1726 to build_loop_iteration_domains and extract the information from
1727 domains. Do not use loop->aux.
1728 * sese.c (sese_reset_aux_in_loops): Removed.
1729 * sese.h (sese_reset_aux_in_loops): Removed.
1731 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1733 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
1734 (dependency_in_loop_p): Same.
1735 (translate_clast): Do not use loop->aux. Initialize
1736 loop->can_be_parallel.
1737 (mark_loops_parallel): Removed.
1738 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
1739 * graphite.c (free_aux_in_new_loops): Removed.
1740 (graphite_finalize): Do not call free_aux_in_new_loops.
1741 (graphite_transform_loops): Do not call mark_loops_parallel.
1743 2009-10-26 Li Feng <nemokingdom@gmail.com>
1745 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
1746 (translate_clast): Pass an extra parameter LEVEL.
1747 Call get_scattering_level.
1748 * graphite-clast-to-gimple.h (get_scattering_level): New.
1750 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1752 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
1753 * cfgloop.h (struct loop): New field single_iv.
1755 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
1756 loop->aux anymore: use loop->single_iv.
1757 (graphite_loop_normal_form): Moved...
1758 (build_graphite_loop_normal_form): Removed.
1759 (gloog): Do not call build_graphite_loop_normal_form.
1760 (free_aux_in_new_loops): Moved...
1761 (mark_loops_parallel): Restructure.
1762 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
1763 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
1764 (scop_canonicalize_loops): New.
1765 (build_poly_scop): Call scop_canonicalize_loops.
1766 * graphite.c (free_aux_in_new_loops): ...here.
1768 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1770 * g++.dg/graphite/graphite.exp: Add the same rules as in
1771 gcc.dg/graphite/graphite.exp.
1773 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1775 * g++.dg/graphite/id-1.C: New.
1777 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1779 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
1781 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
1782 (rewrite_phi_out_of_ssa): Same.
1783 (rewrite_cross_bb_scalar_deps): Same.
1784 (translate_scalar_reduction_to_array): Same.
1786 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1788 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
1791 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1793 * graphite-sese-to-poly.c (dump_alias_graphs): New.
1794 (build_scop_drs): Call dump_alias_graphs.
1796 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1798 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
1799 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1800 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
1801 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1802 * graphite-poly.h (free_lst): New.
1803 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
1804 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
1806 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1808 * graphite-poly.h (struct scop): Add a field saved_schedule.
1809 (SCOP_SAVED_SCHEDULE): New.
1810 (store_lst_schedule): New.
1811 (restore_lst_schedule): New.
1812 (store_scattering): Call store_lst_schedule.
1813 (restore_scattering): Call restore_lst_schedule.
1815 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1817 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
1818 (pdr_add_alias_set): Same.
1819 (build_poly_dr): Same.
1820 (build_alias_set_optimal_p): Same.
1821 (build_base_obj_set_for_drs): Same. Do not store the result of
1824 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1826 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
1827 all_components_are_cliques to 1.
1829 2009-10-20 Li Feng <nemokingdom@gmail.com>
1831 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
1833 (pdr_add_alias_set): Update retrieving alias_set_num.
1834 (build_poly_dr): Update retrieving dr_base_object_set.
1835 (partition_drs_to_sets): Remove.
1836 (build_alias_set_optimal_p): New.
1837 (build_alias_set_for_drs): Rename.
1838 (build_scop_drs): Update.
1839 * graphite-sese-to-poly.h (struct base_alias_pair): New.
1840 (ALIAS_SET_INDEX): Remove.
1841 (BASE_OBJECT_SET_INDEX): Remove.
1843 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1845 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
1847 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1849 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
1850 loop upper bounds for 1-element arrays at end of structures.
1851 * tree-flow.h (array_at_struct_end_p): Declared.
1852 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
1854 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1856 * g++.dg/graphite/pr41305.C: New.
1858 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
1860 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
1861 construction of parameter constraints from loop iteration analysis.
1862 * gcc.dg/graphite/run-id-2.c: New test.
1864 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1866 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
1869 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1871 * graphite-dependences.c (dependence_polyhedron_1): Remove
1872 unused gdim dimensions from the DDR polyhedron.
1874 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1876 * graphite-dependences.c (pddr_transformed_scattering): New.
1877 (dot_original_deps_stmt_1): New.
1878 (dot_transformed_deps_stmt_1): New.
1879 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
1880 dot_transformed_deps_stmt_1.
1881 (dot_original_deps): New.
1882 (dot_transformed_deps): New.
1883 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
1885 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1887 * graphite-dependences.c (reduction_dr_1): Remove wrong
1888 assert: reduction BBs can have multiple reduction writes
1889 to memory. interchange-3.f90 is an example.
1891 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1893 * gfortran.dg/graphite/interchange-3.f90: New.
1895 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1897 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
1899 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1901 * graphite-dependences.c (dependence_polyhedron_1): Add the
1902 context to the dependence polyhedron.
1904 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1906 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
1907 PBB_PDR_DUPLICATES_REMOVED.
1908 (new_poly_bb): Same.
1910 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1912 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
1914 (build_loop_iteration_domains): Extract bounds on parameters
1915 based on the data size.
1916 (build_scop_context): Do not initialize SCOP_CONTEXT;
1917 add new constraints.
1919 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1921 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
1922 * graphite-ppl.h (graphite-ppl.h): Declared.
1924 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1926 * graphite-ppl.c (ppl_print_linear_expr): New.
1927 (debug_ppl_linear_expr): New.
1928 * graphite-ppl.h (ppl_print_linear_expr): Declared.
1929 (debug_ppl_linear_expr): Declared.
1931 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1933 * graphite-interchange.c: Fix comments.
1934 * gcc.dg/graphite/block-1.c: Fix comments.
1936 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1938 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
1939 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
1941 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1943 Reapply the patch from Alexander Monakov that disappeared during
1944 the last merges from trunk.
1946 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
1948 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1949 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
1951 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1953 * graphite-interchange.c (memory_stride_in_loop): The depth
1954 argument corresponds to a dynamic time dimension, so use
1955 psct_dynamic_dim to refer to the transformed scattering dimension.
1957 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1959 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
1961 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1963 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
1965 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
1966 the root of the LST.
1967 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
1969 (print_lst): Print the root of LST in a different format.
1970 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
1972 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1974 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
1976 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1978 * doc/passes.texi: Document the Graphite infrastructure.
1980 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1982 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
1983 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
1984 and check the SSA representation.
1986 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
1988 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1990 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
1992 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1994 * gcc.dg/graphite/interchange-11.c: New.
1996 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1998 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2000 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2002 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2003 Add -fno-loop-strip-mine and -fno-loop-interchange.
2004 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2005 -fno-loop-strip-mine.
2006 * gfortran.dg/graphite/graphite.exp: Same.
2008 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2010 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2011 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2012 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2013 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2014 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2015 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2016 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2017 DEFAULT_FLAGS_GRAPHITE_SCOP.
2018 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2019 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2021 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2023 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2025 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2026 Sebastian Pop <sebastian.pop@amd.com>
2028 * graphite-interchange.c (build_linearized_memory_access): Pass an
2029 offset as parameter.
2030 (memory_stride_in_loop): Include transform scattering in the
2031 access functions to be able to querry the strides in the
2033 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2034 not the psct_iterator_dim.
2036 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2038 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2039 (lst_do_strip_mine_loop): New.
2040 (lst_do_strip_mine): New.
2041 (scop_do_strip_mine): Call lst_do_strip_mine.
2042 * graphite-poly.h (lst_add_loop_under_loop): New.
2043 (lst_find_first_pbb): New.
2045 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2047 * graphite-poly.c (loop_to_lst): Fix LST creation.
2049 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2051 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2052 sizeof(unsigned long) to make it run on 32bit systems.
2054 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2056 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2059 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2061 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2063 (write_alias_graph_to_ascii_dot): New.
2064 (write_alias_graph_to_ascii_ecc): Ditto.
2065 (partition_drs_to_sets): Add testing of optimality of current method
2066 which assigns alias numbers according to DFS Comopnent number. used
2067 as heuristic for the upcoming ECC algorithm.
2068 (build_scop_drs): Write to file also with the ecc and dot format.
2070 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2072 * gfortran.dg/graphite/interchange-1.f: XFail.
2074 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2076 * graphite.c (graphite_initialize): Do not handle functions with
2077 more than 100 basic blocks.
2079 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2081 * graphite-blocking.c (pbb_do_strip_mine): Use
2082 PARAM_LOOP_BLOCK_TILE_SIZE.
2084 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2086 * graphite-poly.c (dot_lst_1): New.
2088 * graphite-poly.h (dot_lst): Declared.
2090 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2092 * graphite-dependences.c (dot_deps_stmt_1): New.
2093 (dot_deps_stmt): New.
2094 * graphite-dependences.h (dot_deps_stmt): Declared.
2096 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2098 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2099 not replace cross BB scalar dependences ending on PHI nodes.
2100 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2102 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2104 * graphite-poly.c (apply_poly_transforms): Implement the high
2105 level driver for flag_loop_block.
2106 * opts.c (decode_options): Enable flag_loop_block at -O2.
2107 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2110 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2112 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2115 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2117 * graphite-poly.h (lst_find_pbb): New.
2118 (find_lst_loop): New.
2120 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2122 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2123 * graphite-poly.h (struct scop): Remove dep_graph field.
2124 (SCOP_DEP_GRAPH): Removed.
2126 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2128 * graphite-poly.h (copy_lst): Do full copy of LST.
2130 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2132 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2133 when the loop stride is zero.
2135 * gcc.dg/graphite/id-16.c: New.
2137 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2139 * graphite-dependences.c (reduction_dr_1): New.
2140 (reduction_dr_p): New.
2141 (graphite_legal_transform_dr): Call reduction_dr_p.
2142 (reduction_ddr): Renamed reduction_ddr_p.
2143 * graphite-poly.h (same_pdr_p): New.
2144 (number_of_write_pdrs): New.
2145 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2146 (split_reduction_stmt): Do not split reduction statements
2147 when there are no writes to memory.
2148 (translate_scalar_reduction_to_array_for_stmt): Insert the
2149 memory reduction statement just after the scalar reduction statement.
2151 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2153 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2154 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2156 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2158 * graphite-interchange.c (lst_apply_interchange): New.
2159 (lst_interchange_profitable_p): New.
2160 (lst_try_interchange_loops): New.
2161 (lst_try_interchange): New.
2162 (lst_do_interchange): New.
2163 (pbb_do_interchange): Removed.
2164 (scop_do_interchange): Call lst_do_interchange.
2166 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2168 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2169 SCOP_TRANSFORMED_SCHEDULE.
2174 * graphite-poly.h (lst_p): New.
2177 (LST_LOOP_FATHER): New.
2180 (scop_to_lst): Declared.
2181 (print_lst): Declared.
2182 (debug_lst): Declared.
2183 (new_lst_loop): New.
2184 (new_lst_stmt): New.
2187 (lst_dewey_number): New.
2188 (struct scop): Add original_schedule and transformed_schedule fields.
2189 (SCOP_ORIGINAL_SCHEDULE): New.
2190 (SCOP_TRANSFORMED_SCHEDULE): New.
2191 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2193 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2195 * graphite-dependences.c (reduction_ddr): New.
2196 (graphite_legal_transform_bb): Call reduction_ddr.
2197 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2198 Initialize PBB_IS_REDUCTION.
2199 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2200 (PBB_IS_REDUCTION): New.
2201 (new_poly_bb): Update declaration.
2202 * graphite-scop-detection.h (build_scop_bbs): Removed.
2203 (nb_reductions_in_loop): Removed.
2204 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2205 parameter for reductions.
2206 (try_generate_gimple_bb): Update call to new_poly_bb.
2207 (build_scop_bbs_1): Same.
2208 (build_scop_bbs): Same.
2209 (gsi_for_phi_node): New.
2210 (scalar_close_phi_node_p): Remove gcc_assert.
2211 (split_reduction_stmt): New.
2212 (is_reduction_operation_p): New.
2213 (phi_contains_arg): New.
2214 (follow_ssa_with_commutative_ops): New.
2215 (detect_commutative_reduction_arg): New.
2216 (detect_commutative_reduction_assign): New.
2217 (follow_inital_value_to_phi): New.
2218 (edge_initial_value_for_loop_phi): New.
2219 (initial_value_for_loop_phi): New.
2220 (detect_commutative_reduction): New.
2221 (translate_scalar_reduction_to_array_for_stmt): New.
2222 (insert_copyout): New.
2223 (insert_copyin): New.
2224 (translate_scalar_reduction_to_array): New.
2225 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2226 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2227 (rewrite_commutative_reductions_out_of_ssa): New.
2228 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2229 * sese.h (split_region_for_bb): New.
2231 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2232 * gcc.dg/graphite/interchange-1.c: Fix format.
2233 * gcc.dg/graphite/interchange-10.c: New.
2235 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2237 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2240 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2242 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2243 (rewrite_cross_bb_scalar_dependence): New.
2244 (rewrite_cross_bb_scalar_deps): New.
2245 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2246 Call rewrite_cross_bb_scalar_deps.
2248 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2250 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2251 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2254 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2256 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2257 * graphite-interchange.c (pbb_do_interchange): Same.
2258 * graphite-poly.c (print_scattering_function): Same.
2260 * graphite-poly.h (pbb_loop): New.
2261 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2263 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2265 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2267 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2269 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2270 so don't pass a pointer to it.
2271 (build_alias_set_for_drs): Same.
2272 (build_base_obj_set_for_drs): Same.
2273 (build_scop_drs): Same.
2275 2009-09-26 Li Feng <nemokingdom@gmail.com>
2277 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2278 the alias graph of data references.
2280 2009-09-25 Li Feng <nemokingdom@gmail.com>
2282 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2283 (build_scop_drs): When debugging, write the alias graph to file,
2284 otherwise, should be disabled.
2286 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2288 * Merge from mainline (151310:151361).
2290 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2292 * Merge from mainline (151171:151310).
2294 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2296 * Merge from mainline (151171:151806).
2298 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2300 * Revert the last commit.
2302 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2304 * Merge from mainline (151171:151819).
2306 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2308 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2309 (is_simple_operand): Remove call to stmt_simple_memref_p.
2310 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2312 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2314 * gcc.dg/graphite/interchange-mvt.c: New File.
2315 * gcc.dg/graphite/scop-dsyrk.c: New File.
2316 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2317 * gcc.dg/graphite/scop-mvt.c: New File.
2318 * gcc.dg/graphite/scop-sor.c: New File.
2320 2009-09-17 Li Feng <nemokingdom@gmail.com>
2322 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2323 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2324 (graphite_carried_dependence_level_k): Ditto.
2325 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2326 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2327 (new_poly_dr): Adjust declaration.
2328 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2329 (free_gimple_bb): Added free_data_refs_aux.
2330 (build_poly_dr): Add dr_base_object_set.
2331 (partition_drs_to_sets): New.
2332 (dr_same_base_object_p): New.
2333 (build_alias_set_for_drs): New.
2334 (build_base_object_set_for_drs): New.
2335 (build_scop_drs): Add build_base_obj_set_for_drs.
2336 * graphite-sese-to-poly.h: Added #define for alias set number index and
2337 base object set index.
2338 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2339 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2341 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2343 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2344 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2346 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2348 * graphite-sese-to-poly.c (struct irp_data): Removed.
2349 (idx_record_params): Removed.
2350 (find_params_in_bb): Scan for parameters the access functions; don't
2351 parse the tree representation.
2353 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2355 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2356 passes at -O1 and below.
2358 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2360 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2361 tree-scalar-evolution.h, and then tree-data-ref.h.
2362 * graphite-clast-to-gimple.c: Same.
2363 * graphite-dependences.c: Same.
2364 * graphite-interchange.c: Same.
2365 * graphite-poly.c: Same.
2366 * graphite-scop-detection.c: Same.
2367 * graphite-sese-to-poly.c: Same.
2369 * lambda-code.c: Same.
2370 * matrix-reorg.c: Same.
2371 * tree-data-ref.c: Same.
2372 * tree-if-conv.c: Same.
2373 * tree-loop-distribu: Same.: Same.
2374 * tree-loop-linear.c: Same.
2375 * tree-parloops.c: Same.
2376 * tree-predcom.c: Same.
2377 * tree-vect-patterns.c: Same.
2379 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2381 Partially revert the previous patch, except the following.
2382 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2383 as parameters the operands of the not expression.
2385 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2387 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2388 Do not call analyze_scalar_evolution on assignments.
2389 (instantiate_scev_phi): Call analyze_scalar_evolution.
2390 (instantiate_scev_name): Call instantiate_scev_assign and
2391 instantiate_scev_phi.
2392 (instantiate_scev_not): Adapted to pass as parameters the operands
2393 of the not expression.
2395 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2397 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2398 to pass as parameters the operands of the binary expression.
2400 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2402 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2403 instantiate_scev_not. Handle NEGATE_EXPR.
2404 (instantiate_scev_r): Handle NEGATE_EXPR.
2406 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2408 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2410 (instantiate_scev_r): Move code in instantiate_scev_2
2411 and instantiate_scev_1.
2413 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2415 * tree-scalar-evolution.c (instantiate_scev_3): New.
2416 (instantiate_scev_1): Move code in instantiate_scev_3.
2418 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2420 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2421 (instantiate_scev_1): Move code in instantiate_scev_poly.
2423 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2425 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2426 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2428 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2430 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2431 (instantiate_scev_1): Move code in instantiate_scev_convert.
2433 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2435 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2436 (instantiate_scev_1): Move code in instantiate_scev_binary.
2438 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2440 * tree-scalar-evolution.c (instantiate_scev_name): New.
2441 (instantiate_scev_1): Move code in instantiate_scev_name.
2443 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2445 * Merge from mainline (150992:151171).
2447 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2449 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2451 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2453 * graphite-dependences.c (graphite_legal_transform_bb): Call
2454 pbb_remove_duplicate_pdrs.
2455 * graphite-poly.c (can_collapse_pdr): Removed.
2456 (pdr_find_duplicate): Removed.
2457 (can_collapse_pdrs): New.
2458 (pbb_remove_duplicate_pdrs): New.
2459 (new_poly_dr): Do not look for duplicates.
2460 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2461 (PBB_PDR_DUPLICATES_REMOVED): New.
2462 (pbb_remove_duplicate_pdrs): Declared.
2464 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2466 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2467 the strides by multiplying by PDR_NB_REFS.
2468 * graphite-poly.c (can_collapse_pdr): New.
2469 (pdr_find_duplicate): New.
2470 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2471 Initialize PDR_NB_REFS.
2472 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2474 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2476 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2478 Revert one of the previous commits:
2479 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2480 the computation of symmetric data dependence relations.
2481 (dependency_between_pbbs_p): Same.
2483 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2486 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2489 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2491 * graphite-dependences.c (pddr_original_scattering): Return NULL
2492 for read-read dependence relations.
2493 * graphite-poly.h (enum poly_dr_type): Fix comment.
2496 (pdr_may_write_p): New.
2498 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2500 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2501 (struct poly_dr): Same.
2502 (new_poly_dr): Same.
2503 * graphite-poly.c (new_poly_dr): Same.
2505 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2506 Sebastian Pop <sebastian.pop@amd.com>
2508 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2509 pbb_strip_mine_time_depth. Changed the implementation so that
2510 transformation is expressed as a transformation on
2511 time (scatttering) dimensions. Also, ensures that the 2d+1
2512 scheduling format is preserved.
2513 (pbb_strip_mine_profitable_p): Profitability is based on the
2514 iteration number of a given time (scattering) dimension,
2515 and not on a original loop depth dimension.
2516 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2517 (pbb_do_strip_mine): Call psct_dynamic_dim.
2518 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2519 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2520 (pbb_nb_dynamic_scattering_transform): New.
2521 (psct_dynamic_dim): New.
2523 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2525 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2526 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2527 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2528 * graphite-interchange.c (build_linearized_memory_access): Same.
2529 (memory_stride_in_loop): Same.
2531 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2533 * graphite-dependences.c (pddr_original_scattering): New.
2534 (graphite_legal_transform_dr): Call pddr_original_scattering.
2537 * graphite-dependences.h (dot_deps): Declared.
2538 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2539 (print_pdr): Print PDR_ID.
2540 * graphite-poly.h (struct poly_dr): Add field id.
2543 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2545 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2547 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2548 not delete the original dependence relation.
2550 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2552 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2553 the computation of symmetric data dependence relations.
2554 (dependency_between_pbbs_p): Same.
2556 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2558 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2559 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2560 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2561 (free_poly_ddr): New.
2562 (pddr_is_empty): New.
2563 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2564 (dependence_polyhedron): Same. Remove useless gcc_assert.
2566 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2567 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2568 * graphite-dependences.h (enum poly_dependence_kind): New.
2569 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2570 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2571 (PDRP_SINK): Renamed PDDR_SINK.
2572 (PDRP_DDP): Renamed PDDR_DDP.
2574 (free_poly_ddr): Declared.
2575 * graphite-poly.c (new_scop): Use the new hash function names.
2576 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2577 into original_pddrs.
2578 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2580 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2582 * Merge from mainline (150764:150992).
2584 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2586 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2587 bounds with LT_EXPR to make niter analysis more precise on code
2588 generated by Graphite.
2590 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2592 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2593 (graphite_legal_transform_bb): Same.
2594 (poly_drs_may_alias_p): Same.
2596 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2599 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2600 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2602 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2604 * graphite-poly.c (print_pbb): Print PBB index.
2606 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2608 * Merge from mainline (r150672:150764).
2610 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2612 * graphite-interchange.c (ppl_max_for_le): Moved...
2613 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2614 * graphite-ppl.c (ppl_max_for_le): ... here.
2615 * graphite-ppl.h (ppl_max_for_le): Declared.
2617 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2619 * Merge from mainline (r150372:150672).
2621 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2624 * sese.c (convert_for_phi_arg): New.
2625 (add_guard_exit_phis): Use convert_for_phi_arg.
2627 * gfortran.dg/graphite/id-17.f: New.
2629 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2631 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2632 unknown subscript upper bounds.
2634 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2636 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2637 Pranav Garg <pranav.garg2107@gmail.com>
2639 * graphite-interchange.c (gather_access_strides): Removed.
2640 (ppl_max_for_le): New.
2641 (build_linearized_memory_access): New.
2642 (memory_stride_in_loop): New.
2643 (pbb_interchange_profitable_p): Reimplemented.
2644 * graphite-ppl.h (ppl_new_id_map): New.
2645 (ppl_interchange): New.
2647 * gcc.dg/graphite/interchange-6.c: XFAILed.
2649 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2651 * graphite-interchange.c (compute_subscript): Removed.
2652 (compute_array_size_cstr): Removed.
2653 (compute_array_size_poly): Removed.
2654 (compute_array_size): Removed.
2655 (gather_access_strides_poly): Removed.
2656 (gather_access_strides): Empty.
2658 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2660 * graphite-dependences.c (dependence_polyhedron_1): Replace
2661 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2662 (graphite_legal_transform_dr): Same.
2663 (graphite_carried_dependence_level_k): Same.
2664 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2665 Initialize PDR_NB_SUBSCRIPTS.
2666 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2668 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2669 (PDR_NB_SUBSCRIPTS): New.
2670 (pdr_nb_subscripts): Removed.
2671 (pdr_dim): Simplified.
2672 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2673 with PDR_NB_SUBSCRIPTS.
2675 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2677 * graphite-interchange.c (compute_array_size): Remove use of
2679 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2680 Do not initialize PDR_DATA_CONTAINER.
2681 (print_pdr): Do not print PDR_DATA_CONTAINER.
2682 * graphite-poly.h (struct poly_dr): Remove data_container field.
2683 (PDR_DATA_CONTAINER): Removed.
2684 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2686 (build_poly_dr): Same.
2688 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2690 * gcc.dg/graphite/interchange-9.c: New.
2692 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2693 Sebastian Pop <sebastian.pop@amd.com>
2695 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2696 copy of the dependence polyhedron. Free the temporary objects.
2697 (graphite_carried_dependence_level_k): Free unused objects before
2700 * gcc.dg/graphite/interchange-1.c: XFAILed.
2701 * gcc.dg/graphite/interchange-2.c: XFAILed.
2702 * gcc.dg/graphite/interchange-3.c: XFAILed.
2703 * gcc.dg/graphite/interchange-4.c: XFAILed.
2704 * gcc.dg/graphite/interchange-7.c: XFAILed.
2706 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2708 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2709 Early return without analyzing the data dependences if no
2710 transform has been done. Call restore_scattering if the transform
2712 (graphite-interchange.c): Same.
2713 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2714 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2715 (apply_poly_transforms): Do not gcc_assert that
2716 the transform is legal.
2717 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2718 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
2719 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
2720 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2721 * graphite-poly.h (struct poly_scattering): New.
2722 (struct poly_bb): Add original, transformed, and saved fields.
2723 Remove transformed_scattering, original_scattering, nb_local_variables,
2724 and nb_scattering_transform fields.
2725 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
2726 (poly_scattering_new): New.
2727 (poly_scattering_free): New.
2728 (poly_scattering_copy): New.
2729 (store_scattering_pbb): New.
2730 (store_scattering): New.
2731 (restore_scattering_pbb): New.
2732 (restore_scattering): New.
2733 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2734 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
2736 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2738 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
2741 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2743 * Makefile.in (graphite.o): Depends on PREDICT_H.
2744 * graphite.c: Include predict.h.
2745 (graphite_finalize): Call tree_estimate_probability.
2746 * predict.c (predict_loops): Do not call scev_initialize and
2748 (tree_estimate_probability_bb): New.
2749 (tree_estimate_probability): Do not initialize loops: move that
2750 code to the driver. Call tree_estimate_probability_bb.
2751 (tree_estimate_probability_driver): New.
2752 (pass_profile): Use tree_estimate_probability_driver.
2753 * predict.h (tree_estimate_probability): Declared.
2755 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2757 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
2758 * graphite-dependences.c (graphite_legal_transform): Add time to
2759 TV_GRAPHITE_DATA_DEPS.
2760 (dependency_between_pbbs_p): Same.
2761 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2763 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
2765 * Merge from mainline (r149952:150372).
2767 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2769 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
2770 * graphite-blocking.c: Same.
2771 * graphite-clast-to-gimple.c: Same.
2772 * graphite-dependences.c: Same.
2773 * graphite-poly.c: Same.
2774 * graphite-poly.h: Same.
2775 * graphite-ppl.c: Same.
2776 * graphite-scop-detection.c: Same.
2777 * graphite-sese-to-poly.c: Same.
2780 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2782 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
2783 (remove_simple_copy_phi): New.
2784 (remove_invariant_phi): New.
2785 (simple_copy_phi_p): New.
2786 (reduction_phi_p): New.
2787 (gsi_for_ssa_name_def): New.
2788 (insert_out_of_ssa_copy): New.
2789 (insert_out_of_ssa_copy_on_edge): New.
2790 (create_zero_dim_array): New.
2791 (scalar_close_phi_node_p): New.
2792 (rewrite_close_phi_out_of_ssa): New.
2793 (rewrite_phi_out_of_ssa): New.
2794 (rewrite_reductions_out_of_ssa): New.
2795 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
2797 * gcc.dg/graphite/id-11.c: New.
2798 * gcc.dg/graphite/id-15.c: New.
2799 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
2800 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
2801 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
2802 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
2803 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
2804 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
2805 * gfortran.dg/graphite/id-13.f: New.
2806 * gfortran.dg/graphite/id-5.f: New.
2808 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2810 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
2811 check that nb_reductions_in_loop is zero.
2812 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
2813 reduction phi nodes.
2814 (nb_reductions_in_loop): Removed.
2815 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
2816 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
2817 (bb_contains_non_iv_scalar_phi_nodes): Removed.
2818 (scop_contains_non_iv_scalar_phi_nodes): Removed.
2819 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
2821 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2823 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
2824 statements that have an empty iteration domain.
2825 * gfortran.dg/graphite/id-16.f: New.
2827 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2829 * tree-scalar-evolution.c (instantiate_scev_1): Return
2830 chrec_dont_know when the result is not above instantiate_below.
2831 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
2832 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
2833 the tree has a known scalar evolution.
2834 * gfortran.dg/graphite/id-14.f: New.
2835 * gfortran.dg/graphite/id-15.f: New.
2837 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2839 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
2841 (rename_variables): Keep inserting renames after the ones already
2844 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2846 * graphite-sese-to-poly.c (compare_bb_depths): New.
2847 (graphite_sort_dominated_info): New.
2848 (build_scop_bbs_1): Call graphite_sort_dominated_info.
2849 (build_scop_scattering): Fix comment.
2851 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2853 * graphite.c (graphite_finalize): Call print_loops instead of
2854 dump_function_to_file.
2855 * gcc.dg/graphite/graphite.exp: Fix formatting.
2856 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
2857 loops generated in the graphite output file.
2858 * gcc.dg/graphite/pr35356-2.c: New.
2859 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
2860 * gfortran.dg/graphite/id-12.f: New.
2862 2009-07-24 Li Feng <nemokingdom@gmail.com>
2864 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
2867 2009-07-24 Li Feng <nemokingdom@gmail.com>
2868 Tobias Grosser <grosser@fim.uni-passau.de>
2870 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
2871 alias set number build alias in ACCESSES polyhedron.
2872 (build_alias_set_for_drs): New.
2873 (build_pbb_drs): Added build_alias_set_for_drs.
2874 * graphite-dependences.c (poly_drs_may_alias_p): New.
2875 (graphite_carried_dependence_level_k): Check alias information
2876 before building polyhedron.
2878 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2880 * Makefile.in (lambda-code.o): Fix formatting.
2882 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2884 * Merge from mainline (r149350-149952)
2886 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2888 * graphite-poly.c (apply_poly_transforms): Move strip_mine
2889 before interchange to prepare for loop blocking.
2891 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2893 * graphite-poly.c (apply_poly_transforms): Add checks after every
2895 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
2896 done in apply_poly_transforms.
2898 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2900 * graphite-dependences.c (build_lexicographically_gt_constraint):
2901 Replace RES parameter with *RES.
2902 (dependence_polyhedron_1): Pass an address of the parameter RES
2903 instead of value of RES.
2905 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2907 * graphite.c (graphite_finalize): Fix comment.
2908 (graphite_transform_loops): Reset scev info after code generation
2911 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2913 * graphite.c (graphite_finalize): Call scev_reset.
2915 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2917 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
2918 GBB_CLOOG_IV_TYPES hash table twice.
2919 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
2920 (add_condition_to_domain): Clear GMP values.
2922 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2924 * graphite-dependences.c: Fix formatting.
2925 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
2926 (pbb_number_of_iterations): Free ppl_Linear_Expression.
2927 * graphite-sese-to-poly.c: Fix formatting.
2928 * graphite.c (graphite_transform_loops): Create the hash table
2929 after the early return.
2931 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2933 * gcc.dg/graphite/id-14.c: New.
2934 * gcc.dg/graphite/pr40157.c: New.
2935 * gfortran.dg/graphite/id-11.f: New.
2937 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2939 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
2940 (build_poly_scop): Return false when there are no pbbs within
2941 loops to avoid to pass to cloog scops with no loops.
2943 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2945 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
2946 useless test "i % 2".
2947 (build_pbb_scattering_polyhedrons): Fix formatting.
2948 (build_poly_dr): Same.
2949 * graphite.c (graphite_transform_loops): Restructure.
2951 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
2953 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
2954 reduction_list parameter.
2955 (rewrite_all_phi_nodes_with_iv): Same.
2956 (canonicalize_loop_ivs): Same.
2957 * tree-parloops.c (struct brli): Removed.
2958 (build_reduction_list_info): Removed.
2959 (build_new_reduction): New.
2960 (analyze_reduction_list): Removed.
2961 (gather_scalar_reductions): Find reductions instead of phi
2962 nodes that can't be canonicalized.
2963 (try_create_reduction_list): Remove reduction_list parameter.
2964 (gen_parallel_loop): Same.
2965 (parallelize_loops): Remove analyze_reductions variable,
2966 initialization and free.
2967 Change reduction_list htab initialization to reduction_info
2968 elements instead of ssa names.
2969 Call try_create_reduction_list and gen_parallel_loop without
2970 analyzed_reduction argument.
2971 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
2972 canonicalize_loop_ivs with one less argument.
2973 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
2975 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2977 * graphite-dependences.c (new_poly_dr_pair): New.
2978 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
2979 (new_poly_dr_pair): New.
2980 (eq_poly_dr_pair_p): New.
2981 (hash_poly_dr_pair_p): New.
2982 * graphite-dependences.h (struct poly_dr_pair): New.
2983 (eq_poly_dr_pair_p): Declared.
2984 (hash_poly_dr_pair_p): Declared.
2985 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
2986 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
2987 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
2988 * Makefile.in (graphite-poly.o): Add dependence on
2989 graphite-dependences.h.
2991 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2993 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
2994 polynomials of degree > 1 pass to Graphite.
2995 * tree-chrec.c (scev_is_linear_expression): Call
2996 evolution_function_is_affine_multivariate_p.
2997 * gfortran.dg/graphite/id-10.f90: New.
2999 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3001 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3002 Instantiate scevs varying in outer loops.
3003 * gfortran.dg/graphite/id-9.f: Correct testcase.
3005 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3007 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3008 redundant constraint.
3010 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3012 * gcc.dg/graphite/graphite.exp: Fix comments.
3013 * gfortran.dg/graphite/graphite.exp: Trigger actions
3014 based on the file names as in the C testsuite.
3015 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3016 * gfortran.dg/graphite/block-2.f: Same.
3017 * gfortran.dg/graphite/block-3.f90: Same.
3018 * gfortran.dg/graphite/block-4.f90: Same.
3019 * gfortran.dg/graphite/id-1.f90: Same.
3020 * gfortran.dg/graphite/id-2.f90: Same.
3021 * gfortran.dg/graphite/id-3.f90: Same.
3022 * gfortran.dg/graphite/id-4.f90: Same.
3023 * gfortran.dg/graphite/id-6.f: Same.
3024 * gfortran.dg/graphite/id-9.f: Same.
3025 * gfortran.dg/graphite/interchange-1.f: Same.
3026 * gfortran.dg/graphite/interchange-2.f: Same.
3027 * gfortran.dg/graphite/scop-1.f: Same.
3029 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3031 * sese.c (expand_scalar_variables_call): New.
3032 (expand_scalar_variables_ssa_name): Handle calls in expander.
3034 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3036 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3037 Expect to see the pattern twice.
3038 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3039 * gcc.dg/graphite/interchange-5.c: Same.
3040 * gcc.dg/graphite/interchange-6.c: Same.
3042 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3044 * gcc.dg/graphite/id-10.c: New.
3045 * gcc.dg/graphite/id-12.c: New.
3046 * gfortran.dg/graphite/id-7.f: New.
3047 * gfortran.dg/graphite/id-8.f: New.
3049 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3051 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3054 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3056 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3058 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3060 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3062 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3064 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3065 building PDR subscripts.
3067 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3069 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3070 computation of array sizes.
3072 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3074 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3076 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3078 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3079 build_pairwise_constraint, dr_equality_constraints,
3080 build_pairwise_scheduling_equality,
3081 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3082 build_lexicographically_gt_constraint, dependence_polyhedron,
3083 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3084 Move from NNC_Polyhedron to C_Polyhedron.
3085 * graphite-interchange.c (compute_array_size_poly,
3086 gather_access_strides): Dito.
3087 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3088 free_scop, pbb_number_of_iterations): Dito.
3089 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3090 pbb_dim_iter_domain, struct scop): Dito.
3091 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3092 new_Cloog_Domain_from_ppl_Polyhedron,
3093 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3094 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3095 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3096 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3097 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3098 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3099 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3100 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3101 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3102 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3103 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3104 build_scop_iteration_domain, build_poly_dr): Dito
3106 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3108 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3110 * gcc.dg/graphite/run-id-1.c: New.
3112 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3114 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3115 positivity constraint on the symbolic number of iterations.
3117 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3119 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3121 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3122 Tobias Grosser <grosser@fim.uni-passau.de>
3124 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3125 (build_cloog_prog): Directly use SCOP_CONTEXT.
3126 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3127 (free_scop): Free SCOP_CONTEXT.
3128 (print_scop_context): New.
3129 (print_scop): Call print_scop_context.
3130 (debug_scop_context): New.
3131 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3132 (struct scop): Added field context.
3133 (SCOP_CONTEXT): New.
3134 * graphite-sese-to-poly.c (add_param_constraints): New.
3135 (build_scop_context): New.
3136 (build_poly_scop): Call build_scop_context.
3138 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3140 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3141 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3142 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3143 * graphite-ppl.h: Include double-int.h and tree.h.
3144 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3145 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3146 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3147 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3149 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3151 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3152 POINTER_PLUS_EXPR for pointer types.
3153 (clast_to_gcc_expression): Same.
3155 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3157 * graphite-poly.c (print_scattering_function): Early return when
3158 PBB_TRANSFORMED_SCATTERING is not initialized.
3159 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3161 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3163 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3166 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3168 * tree-parloops.c (analyze_reduction_list): Change return
3170 (try_create_reduction_list): Move the call to
3171 analyze_reduction_list to the beginining.
3172 Call reduction_phi with analyzed_reductions as argument
3173 instead of reduction_list.
3175 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3177 * Merge from mainline (r148296:149346)
3179 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3181 * graphite-scop-detection.c (graphite_can_represent_init): New.
3182 (graphite_can_represent_scev): Call graphite_can_represent_init:
3183 check that the initial value does not contain multiplications of
3185 (stmt_has_simple_data_refs_p): New.
3186 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3187 (is_simple_operand): Fix formatting.
3188 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3190 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3192 * gcc.dg/graphite/id-13.c: New.
3193 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3194 analyze_scalar_evolution, use scalar_evolution_in_region.
3195 (scan_tree_for_params_right_scev): Add extra assert.
3196 (parameter_index_in_region_1): Split from parameter_index_in_region.
3197 (idx_record_params): Use scalar_evolution_in_region.
3198 (find_params_in_bb): Same.
3199 (find_scop_parameters): Same.
3200 (build_loop_iteration_domains): Same.
3201 (create_linear_expr_from_tree): Same.
3202 * sese.c (scalar_evolution_in_region): New.
3203 * sese.h (scalar_evolution_in_region): Declared.
3204 (defined_in_sese_p): New.
3205 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3207 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3210 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3212 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3213 TREE_DATA_REF_H also implies SCEV_H.
3215 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3217 * graphite-poly.c (print_scop_params): New.
3218 (print_scop): Call print_scop_params.
3219 (debug_scop_params): New.
3220 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3222 2009-07-07 Li Feng <nemokingdom@gmail.com>
3224 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3225 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3226 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3227 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3228 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3229 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3231 2009-07-07 Li Feng <nemokingdom@gmail.com>
3233 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3234 for dependency checking part.
3235 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3236 tests for dependency checking.
3237 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3238 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3239 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3240 flag -fdump-tree-graphite-all for autopar testsuites.
3242 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3244 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3245 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3246 canonicalize_loop_ivs): Moved...
3247 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3249 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3251 * tree-parloops.c (try_create_reduction_list): Pass an extra
3252 argument analyzed_reductions. Call analyze_reduction_list.
3253 (gen_parallel_loop): Do not call analyze_reduction_list.
3254 (parallelize_loops): Init and finalize analyzed_reductions.
3256 2009-07-06 Li Feng <nemokingdom@gmail.com>
3258 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3259 Added flag -fno-loop-strip-mine for autopar testcase.
3261 2009-07-04 Li Feng <nemokingdom@gmail.com>
3263 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3264 transformed scattering dimension instead of unmatch orignal when
3265 calling dependence_polyhedron.
3267 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3269 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3271 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3273 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3274 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3276 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3278 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3279 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3280 * graphite-poly.c (pbb_number_of_iterations): New.
3281 * graphite-poly.h (pbb_number_of_iterations): Declared.
3282 (pbb_iterator_dim, pbb_parameter_dim): New.
3284 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3286 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3287 last commit on type of lower and upper bound of loops.
3289 2009-06-29 Li Feng <nemokingdom@gmail.com>
3291 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3292 graphite-dependences.h.
3293 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3294 (mark_bb_with_pbb): New.
3295 (get_stmtfor_depth): New.
3296 (find_pbb_via_hash): New.
3297 (dependency_in_loop_p): New.
3298 (mark_loops_parallel): New.
3299 (free_aux_in_new_loops): New.
3300 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3301 bb with it's relevant pbb. Mark newly created loops. Remove mark
3302 innermost loop parallel without checking.
3303 (gloog): Add parameter BB_PBB_MAPPING.
3304 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3305 (gloog): Change declaration.
3306 (mark_loop_parallel): Make extern.
3307 (free_aux_in_new_loops): Declare.
3308 (bb_pbb_map_hash): New.
3309 (eq_bb_pbb_map): New.
3310 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3311 auto parallelization when flag_graphite_force_parallel is set.
3312 (graphite_finalize): Added free_aux_in_new_loops.
3313 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3314 the innermost loop that marked parallel. Use
3315 flag_graphite_force_parallel instead of loop->can_be_parallel.
3316 (loop_parallel_p): Move inner most checking out of function.
3318 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3320 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3321 type of lower and upper bound of loops signed long int.
3323 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3325 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3326 expression outside the loop.
3328 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3330 * gcc.dg/graphite/interchange-8.c: New.
3332 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3334 * gcc.dg/graphite/interchange-0.c: XFailed.
3335 * gcc.dg/graphite/interchange-5.c: XFailed.
3336 * gcc.dg/graphite/interchange-6.c: XFailed.
3338 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3340 * graphite-interchange.c (compute_array_size_poly): The end of the
3341 recursion should return 1.
3343 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3345 * graphite-interchange.c (compute_array_size_cstr): Allow the
3346 subscript multiplier to be -1.
3347 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3348 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3349 data_container. Initializes PDR_DATA_CONTAINER.
3350 (print_pdr_access_layout): New.
3351 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3352 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3354 (PDR_DATA_CONTAINER): New.
3355 (new_poly_dr): Update declaration.
3356 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3357 (build_poly_dr): Call pdr_add_data_dimensions.
3359 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3361 * graphite-poly.h (struct poly_dr): Fix comment.
3362 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3363 (pdr_add_memory_accesses): New.
3364 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3366 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3368 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3369 (print_pbb): Add call to print_pdrs.
3370 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3372 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3373 Li Feng <nemokingdom@gmail.com>
3375 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3376 (dependency_between_pbbs_p): New.
3377 (lexicographically_gt_p): Assure !empty_p before polyhedron
3378 intersection assign.
3379 (build_lexicographically_gt_constraint): Correct lexicographically
3381 * graphite-dependences.h: New.
3382 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3384 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3386 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3387 (gloog): Print to dump_file the generated clast.
3388 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3389 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3391 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3393 * graphite-poly.c (extend_scattering): Increment
3394 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3396 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3398 * graphite-interchange.c (compute_array_size_poly): Added exit of
3399 recursion condition. Continue iterating even after the first equality.
3400 (compute_array_size): Same.
3402 2009-06-24 Li Feng <nemokingdom@gmail.com>
3404 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3405 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3406 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3407 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3408 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3410 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3412 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3413 only when the use verifies is_gimple_reg.
3415 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3417 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3418 Allocate scaldims after call to unify_scattering_dimensions.
3420 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3422 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3424 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3425 Albert Cohen <albert.cohen@inria.fr>
3427 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3428 variables for the strip mining.
3430 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3431 Pranav Garg <pranav.garg2107@gmail.com>
3433 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3434 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3435 (graphite-blocking.o): New rule.
3436 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3437 * graphite-blocking.c: New.
3438 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3439 flag_loop_strip_mine.
3440 (psct_scattering_dim_for_loop_depth): New.
3441 * graphite-poly.h (scop_do_strip_mine): Declared.
3442 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3443 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3444 flag_loop_strip_mine.
3446 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3448 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3449 a GMP value and a PPL coefficient at each iteration of a loop.
3451 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3453 * graphite-dependences.c (dependence_polyhedron): Do not use
3454 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3455 pbb_nb_scattering_transform.
3456 (graphite_legal_transform_dr): Same.
3457 * graphite-poly.c (extend_scattering): Same.
3458 (unify_scattering_dimensions): Same.
3459 (print_scattering_function): Same.
3460 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3461 PBB_NB_LOCAL_VARIABLES.
3462 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3463 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3464 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3465 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3466 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3467 (pbb_nb_scattering_transform): New.
3468 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3469 (psco_scattering_dim): Add assert on parameters.
3470 (psct_scattering_dim): Same.
3471 (psct_scattering_dim_for_loop_depth): Declared.
3472 (psct_local_var_dim): New.
3473 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3474 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3475 correct layout, call pbb_nb_local_vars.
3476 (psct_add_local_variable, psct_add_scattering_dimension): New.
3477 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3478 Initialize PBB_NB_SCATTERING_TRANSFORM.
3480 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3482 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3483 (set_coef): Renamed ppl_set_coef.
3484 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3486 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3488 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3489 test a boolean against 1.
3490 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3491 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3492 (pbb_do_interchange): Returns true when a transform has been performed.
3493 (scop_do_interchange): Same.
3494 * graphite-poly.c (apply_poly_transforms): Use the return value of
3495 scop_do_interchange.
3496 * graphite-poly.h (scop_do_interchange): Update declaration.
3498 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3500 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3502 * sese.c (sese_reset_aux_in_loops): New.
3503 * sese.h (sese_reset_aux_in_loops): New.
3505 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3507 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3508 multiplier and multiply the constant by the multiplier.
3509 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3510 (build_poly_dr): Do not use the multiplier to define the subscript.
3512 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3514 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3515 compiler's data reference. Initialize PDR_CDR.
3516 (print_pdr): Call dump_data_reference.
3517 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3518 Add compiler_dr field.
3519 (PDR_BB): Renamed PDR_PBB.
3521 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3522 GCC's data reference representation.
3523 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3524 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3526 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3528 * graphite-poly.c (print_scattering_function): Also print the layout.
3529 * graphite-poly.h (pbb_nb_local_vars): New.
3531 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3533 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3535 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3537 * graphite-poly.c (print_pdr, debug_pdr): New.
3538 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3539 (PDR_BASE): Removed.
3541 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3543 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3546 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3548 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3549 subscript identification column.
3550 (pbb_do_interchange): Print to dump_file that some loops "will be
3551 interchanged". Rely on that chain of characters in the testcases.
3552 * gcc.dg/graphite/interchange-0.c: New.
3553 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3554 interchange-*.c files and compile them with -floop-interchange.
3556 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3558 * graphite-interchange.c (interchange_profitable_p): Renamed
3559 pbb_interchange_profitable_p.
3561 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3562 Harsha Jagasia <harsha.jagasia@amd.com>
3563 Pranav Garg <pranav.garg2107@gmail.com>
3565 * graphite-interchange.c (interchange_profitable_p): Make static.
3566 (pbb_interchange_loop_depths, pbb_do_interchange,
3567 scop_do_interchange): New.
3568 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3569 for flag_loop_interchange.
3570 * graphite-poly.h (scop_do_interchange): Declared.
3571 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3572 flag_loop_interchange is used.
3574 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3576 * graphite-dependences.c (dependence_polyhedron): Update use of
3577 pbb_nb_scattering_dims.
3578 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3579 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3580 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3581 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3583 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3585 * graphite.c: Cleanup foo.
3587 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3589 * Merge from mainline (r143684:148293).
3590 * Disabled libpcp until it gets fixed.
3592 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3593 Harsha Jagasia <harsha.jagasia@amd.com>
3595 * graphite-interchange.c: New.
3596 * Makefile.in (graphite-interchange.o): New.
3597 * graphite-poly.h (interchange_profitable_p): Declared.
3598 * graphite-ppl.h (value_max): New.
3600 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3602 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3603 * graphite-poly.h: Fix some comments.
3607 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3610 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3611 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3612 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3613 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3614 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3615 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3616 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3617 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3618 * graphite-clast-to-gimple.c: Same.
3619 * graphite-dependences.c: Same.
3620 * graphite-poly.c: Same.
3621 * graphite-sese-to-poly.c: Same.
3623 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3625 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3626 expressions for an IV rename, as returned by clast_to_gcc_expression.
3627 (copy_renames): Rename new_name to expr.
3628 * sese.c (debug_rename_elt): Same.
3631 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3632 the information from the rename map.
3633 (rename_variables_in_stmt): Same.
3634 (add_loop_exit_phis): Rename new_name to expr.
3635 (insert_loop_close_phis): Same.
3636 (add_guard_exit_phis): Same. Call force_gimple_operand.
3637 * sese.h (struct rename_map_elt): Rename new_name to expr.
3638 (new_rename_map_elt): Same.
3640 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3642 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3643 * sese.c (set_rename): Make it extern.
3644 * sese.h (set_rename): Declared.
3646 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3648 * graphite-poly.c (extend_scattering): Free values.
3649 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3651 (ppl_print_powerset_matrix): Same.
3652 * graphite-scop-detection.c (free_scops_1): New.
3653 (limit_scops): Call free_scops_1.
3654 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3655 (build_poly_dr): Free PPL coefficients.
3656 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3658 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3660 * graphite-dependences.c: New.
3661 * graphite-data-ref.c: Removed.
3662 * graphite-data-ref.h: Removed.
3663 * Makefile.in (graphite-data-ref.o): Removed.
3664 (graphite-dependences.o): Added.
3665 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3666 * graphite-poly.c: Same.
3667 Move the data dependence testing to graphite-dependences.c.
3669 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3671 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3672 from graphite_cannot_represent_loop. Code refactored.
3673 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3675 2009-05-17 Li Feng <nemokingdom@gmail.com>
3677 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3678 Cover all the testcases (not only the filtered ones).
3680 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3682 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3683 unnecessary check. Update comments. Move check for REAL_TYPE here.
3684 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3685 done in (stmt_simple_for_scop_p).
3687 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3689 * graphite.c (print_global_statistics): New.
3690 (print_graphite_scop_statistic): New.
3691 (print_graphite_statistics): New.
3692 (graphite_initialize, graphite_transform_loops): Print statistics.
3693 * graphite-scop-detection (build_scops): Print statistics.
3694 (print_graphite_scop_statistics): New.
3695 (print_graphite_statistics): New.
3697 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3699 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3700 (debug_clast_name_index): Removed.
3701 (debug_clast_name_indexes_1): Removed.
3702 (debug_clast_name_indexes): Removed.
3703 (clast_name_index_elt_info): Removed.
3704 (eq_clast_name_indexes): Removed.
3705 (clast_name_to_index): Removed.
3706 (new_clast_name_index): Removed.
3707 (save_clast_name_index): Removed.
3708 (save_var_name): Moved...
3709 (init_sese_params_index): Removed.
3710 (clast_name_to_gcc): Remove use of name_tree.
3711 (initialize_cloog_names): Same.
3712 (gloog): Do not call init_sese_params_index.
3713 * graphite-sese-to-poly.c (save_var_name): ...here.
3714 (parameter_index_in_region): New.
3715 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3716 (parameter_index_in_region): Removed.
3717 (is_parameter): Remove use of name_tree.
3718 * sese.h (struct name_tree): Removed.
3719 (struct sese): Remove use of name_tree. New field params_names.
3720 (SESE_PARAMS_NAMES): New.
3721 (SESE_PARAMS): Remove duplicate.
3722 (parameter_index_in_region): Removed.
3723 (sese_nb_params): Remove use of name_tree.
3724 (struct clast_name_index): New.
3725 (new_clast_name_index): New.
3726 (clast_name_to_index): New.
3727 (save_clast_name_index): New.
3728 (debug_clast_name_index): New.
3729 (debug_clast_name_indexes_1): New.
3730 (debug_clast_name_indexes): New.
3731 (clast_name_index_elt_info): New.
3732 (eq_clast_name_indexes): New.
3734 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3736 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
3737 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
3738 (graphite_loop_normal_form): Do not pass region. Do not
3739 initialize SESE_OLDIVS.
3740 (build_graphite_loop_normal_form): Update call to
3741 graphite_loop_normal_form.
3742 * sese.c (debug_oldivs): Removed.
3743 (new_sese): Do not initialize SESE_OLDIVS.
3744 (free_sese): Do not free SESE_OLDIVS.
3745 (oldiv_for_loop): Removed.
3746 * sese.h (struct sese): Remove old_ivs.
3747 (SESE_OLDIVS): Removed.
3748 (oldiv_for_loop): Removed.
3750 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3752 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
3753 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
3754 replaced by a call to newivs_to_depth_to_newiv.
3755 (clast_to_gcc_expression): Pass newivs, remove ivstack.
3756 (clast_to_gcc_expression_red): Same.
3757 (gcc_type_for_clast_expr): Same.
3758 (gcc_type_for_clast_eq): Same.
3759 (graphite_translate_clast_equation): Same.
3760 (graphite_create_guard_cond_expr): Same.
3761 (graphite_create_new_guard): Same.
3762 (graphite_create_new_loop): Same.
3763 (build_iv_mapping): Same.
3764 (translate_clast): Same.
3766 (loop_iv_stack_patch_for_consts): Removed. *
3767 sese.c (iv_stack_entry_is_constant): Removed.
3768 (iv_stack_entry_is_iv): Removed.
3769 (loop_iv_stack_push_iv): Removed.
3770 (loop_iv_stack_insert_constant): Removed.
3771 (loop_iv_stack_pop): Removed.
3772 (loop_iv_stack_get_iv): Removed.
3773 (loop_iv_stack_get_iv_from_name): Removed.
3774 (debug_loop_iv_stack): Removed.
3775 (free_loop_iv_stack): Removed.
3776 (loop_iv_stack_remove_constants): Removed. *
3777 sese.h (iv_stack_entry_kind): Removed.
3778 (iv_stack_entry_data_union): Removed.
3779 (iv_stack_entry_struct): Removed.
3780 (iv_stack_entry_p): Removed.
3781 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
3782 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
3783 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
3784 loop_iv_stack_pop, free_loop_iv_stack): Removed.
3785 (gbb_loop_at_index): Fix indenting.
3786 (gbb_loop_index): Removed.
3788 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3790 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
3791 Call clast_name_to_index.
3793 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3795 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
3796 do not pass params. Get params from SESE_PARAMS.
3797 (clast_to_gcc_expression): Same.
3798 (clast_to_gcc_expression_red): Same.
3799 (gcc_type_for_clast_eq): Same.
3800 (graphite_translate_clast_equation): Same.
3801 (graphite_create_new_loop): Same.
3802 * sese.c (rename_variables_in_stmt): Fix comment.
3804 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3806 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
3808 Call save_clast_name_index.
3809 (translate_clast): Pass newivs_index.
3810 (gloog): Create and free newivs_index.
3812 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3814 * graphite-clast-to-gimple.c (clast_name_index): New structure.
3815 (clast_name_index_p): New type.
3816 (debug_clast_name_index): New.
3817 (debug_clast_name_indexes_1): New.
3818 (debug_clast_name_indexes): New.
3819 (clast_name_index_elt_info): New.
3820 (eq_clast_name_indexes): New.
3821 (clast_name_to_index): New.
3822 (new_clast_name_index): New.
3823 (save_clast_name_index): New.
3824 (init_sese_params_index): New.
3825 (gloog): Call init_sese_params_index.
3826 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
3827 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
3828 (free_sese): Free SESE_PARAMS_INDEX.
3829 * sese.h (struct sese): Add params_index.
3830 (SESE_PARAMS_INDEX): New.
3832 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3834 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
3835 (graphite_create_new_loop): Pass the newivs vector. Push the
3836 newly created IV to newivs.
3837 (translate_clast): Pass the newivs vector.
3838 (gloog): Create and destroy the newivs vector.
3840 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3842 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
3843 (graphite_loop_normal_form): Initialize loop->aux with the unique
3844 IV that has been created.
3846 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
3848 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
3849 scev with parameters in the base part. They where forbidden
3852 2009-05-11 Li Feng <nemokingdom@gmail.com>
3854 * gcc.dg/graphite/graphite.exp: Set different default
3855 compile options by file names.
3856 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
3857 * gcc.dg/graphite/id-{1-9}.c: Ditto.
3858 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
3859 * gcc.dg/graphite/scop-matmult.c: Ditto.
3861 2009-05-08 Li Feng <nemokingdom@gmail.com>
3863 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
3864 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
3865 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
3866 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
3868 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3870 * graphite-scop-detection (build_scops_1): Fix little bug introduced
3873 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3875 * graphite-scop-detection.c (graphite_can_represent_scev): Only
3876 allow integer constant strides.
3877 (graphite_can_represent_expr): Depend on outermost_loop.
3878 (stmt_simple_memref_p, graphite_cannot_represent_loop,
3879 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
3880 build_scops_1): Same.
3881 (scopdet_basic_block_info): Same and insert layered SCoP
3883 (try_generate_gimple_bb): Cleanup.
3884 (build_scops): Enable data references.
3886 * gcc.dg/graphite/id-5.c: New.
3887 * gcc.dg/graphite/id-9.c: New.
3888 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
3889 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
3891 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3893 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
3894 that we have not yet built for this SCoP.
3896 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3898 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
3899 for complex numbers.
3901 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3903 * graphite-ppl.c: Fix build if cloog is not available.
3905 2009-05-04 Li Feng <nemokingdom@gmail.com>
3907 * tree-parloops.c (loop_parallel_p): Remove construction of
3908 NITER and REDUCTION_LIST.
3909 (try_get_loop_niter): New.
3910 (try_create_reduction_list): New.
3911 (parallelize_loops): Bypass the failed checkings in autopar
3912 when can_be_parallel in loop structure is set to true.
3914 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3916 * gcc.dg/graphite/id-6.c: Update testcase.
3917 * gcc.dg/graphite/scop-3.c: Dito.
3919 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3921 * graphite-scop-detection.c (stmt_simple_for_scop_p):
3922 Enable EQ_EXPR and NE_EXPR again.
3924 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3926 * graphite-scop-detection.c (graphite_can_represent_scev):
3927 Add check if scev is affine multivariate.
3928 (harmful_stmt_in_bb): Check if we can represent the conditions.
3929 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
3931 * gcc.dg/graphite/id-7.c: New.
3933 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3935 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
3936 Check all bbs in region, not only the bbs that are represented in
3938 (build_poly_scop): Add newline.
3939 * gcc.dg/graphite/id-8.c: New.
3941 2009-04-30 Li Feng <nemokingdom@gmail.com>
3943 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
3944 when loop initialize.
3945 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
3946 * common.opt: Declare flag_graphite_force_parallel.
3947 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
3949 * graphite-poly.c (apply_poly_transforms): Introduce
3950 flag_graphite_force_parallel.
3951 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
3952 * toplev.c (process_options): ditto and replace a not correctly
3955 2009-04-30 Li Feng <nemokingdom@gmail.com>
3957 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
3958 Change the call of gbb_loop_at_index and/or gbb_loop_index due
3959 to the redefinition.
3960 (compute_cloog_iv_types_1): ditto.
3961 (build_iv_mapping): ditto.
3962 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
3964 (free_gimple_bb): Removed GBB_LOOPS related free part.
3965 (build_bb_loops): Removed.
3966 * sese.h (struct gimple_bb): Removed loops.
3967 (GBB_LOOPS): Removed.
3968 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
3969 (gbb_loop_index): ditto.
3971 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3973 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
3974 allow non constant strides.
3975 * gcc.dg/graphite/scop-20.c: New.
3977 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3979 * graphite-scop-detection.c (dot_all_scops): Fix system call
3980 return value warning.
3983 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3985 * gcc.dg/graphite/id-6.c: Fix pattern.
3986 * gcc.dg/graphite/scop-3.c: Same.
3988 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3990 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
3991 build_pairwise_constraint, dr_equality_constraints,
3992 build_pairwise_scheduling_equality,
3993 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3994 build_lexicographically_gt_constraint, dependence_polyhedron,
3995 graphite_legal_transform_dr, graphite_legal_transform_bb,
3996 graphite_legal_transform): New.
3997 * graphite-poly.h (graphite_legal_transform): Declared.
3998 * graphite-sese-to-poly.c (build_poly_scop): Call to
3999 graphite_legal_transform is disabled for the moment.
4001 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4003 * graphite-poly.h (pbb_nb_scattering_dims): New.
4004 (pbb_nb_scattering): Use it.
4006 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4008 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4009 Pointset_Powerset version of ppl_insert_dimensions.
4010 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4012 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4014 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4016 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4018 * graphite-poly.h: Fix comment.
4020 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4022 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4024 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4026 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4029 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4031 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4032 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4035 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4037 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4038 handle EQ_EXPR and NE_EXPR.
4040 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4042 * graphite-poly.h (poly_dr): Fix comment.
4044 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4045 Tobias Grosser <grosser@fim.uni-passau.de>
4047 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4048 with a zero dimension polyhedron.
4049 (find_scop_parameters): Move the call to scop_set_nb_params here.
4050 (build_loop_iteration_domains): Store in loop->aux the iteration
4052 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4053 by any loop in scop.
4054 (build_poly_scop): Do not call scop_set_nb_params.
4056 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4057 Tobias Grosser <grosser@fim.uni-passau.de>
4059 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4060 add_condition_to_domain not GT_EXPR.
4062 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4064 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4065 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4066 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4067 upper_bound_assign to calculate unions.
4068 * gcc.dg/graphite/id-6.c: New.
4070 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4072 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4073 handle abnormal edges.
4075 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4077 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4078 (free_poly_bb): Also free poly_drs.
4079 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4080 (poly_dr): Polyhedron to Pointset_Powerset.
4081 (pdr_accessp_nb_subscripts): Same.
4082 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4085 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4087 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4088 names into more meaningful names.
4090 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4092 * gfortran.dg/graphite/interchange-1.c: New.
4093 * gfortran.dg/graphite/interchange-2.c: New.
4095 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4097 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4099 * tree-parloops.c (rewrite_phi_with_iv): New.
4100 (rewrite_all_phi_nodes_with_iv): New.
4101 (canonicalize_loop_ivs): Call them.
4103 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4105 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4106 graphite_find_data_references_in_stmt.
4107 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4108 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4110 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4112 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4114 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4116 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4117 instead of bb_in_region.
4118 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4119 (build_sese_conditions): Use flag_bb_in_sese.
4120 * sese.c (register_bb_in_sese): Removed.
4121 (new_sese): Remove initialization of SESE_REGION_BBS.
4122 (free_sese): Do not free SESE_REGION_BBS.
4123 * sese.h (struct sese): Remove field region_basic_blocks.
4124 (SESE_REGION_BBS): Removed.
4125 (bb_in_sese_p): Implement in function of bb_in_region.
4127 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4129 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4132 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4134 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4136 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4137 (add_condition_to_domain): New.
4138 (add_condition_to_pbb): New.
4139 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4140 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4142 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4144 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4145 ppl_Pointset_Powerset.
4146 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4147 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4148 (pbb_nb_loops): Same.
4149 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4150 add_conditions_to_domain): Same.
4151 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4152 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4153 ppl_const_Polyhedron_t.
4154 (ppl_print_powerset_matrix): New.
4155 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4156 ppl_print_powerset_matrix): New.
4157 (ppl_print_polyhedron_matrix): Updated.
4159 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4161 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4163 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4165 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4166 (print_iteration_domains, debug_iteration_domain,
4167 debug_iteration_domains): New.
4168 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4169 debug_iteration_domains): Declared.
4170 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4173 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4174 Sebastian Pop <sebastian.pop@amd.com>
4176 * graphite-poly.h (print_iteration_domain): New.
4177 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4178 (build_sese_conditions_1, build_sese_conditions_after,
4179 build_sese_conditions_before): New.
4180 (build_sese_conditions): Rewritten.
4182 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4183 Tobias Grosser <grosser@fim.uni-passau.de>
4185 Cleanup of code generation liveouts.
4186 * graphite-clast-to-gimple.c (translate_clast): Use a single
4187 rename_map instead of one per translated statement.
4188 Do not use SESE_LIVEOUT_RENAMES.
4189 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4190 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4191 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4192 phi node of a reduction: when a loop contains a reduction used outside
4193 the loop, there should be a scalar close phi node on the exit block.
4194 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4195 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4196 (free_sese): Do not free them.
4197 (sese_build_liveouts_use): Do not use them.
4198 (sese_build_liveouts_bb): Same.
4199 (sese_build_liveouts): Same.
4200 (sese_insert_phis_for_liveouts): Same.
4201 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4202 (defined_in_loop_p): New.
4203 (alive_after_loop): New.
4204 (close_phi_not_yet_inserted_p): New.
4205 (struct alep, alep_p): New.
4206 (add_loop_exit_phis): Remove from the rename_map all the names defined
4207 in the code generated loop.
4208 (insert_loop_close_phis): Traverse the rename_map passed to it.
4209 Don't use SESE_LIVEOUT_RENAMES.
4210 (default_liveout_before_guard): Renamed default_before_guard.
4211 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4212 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4213 (register_sese_liveout_renames): Removed.
4214 (copy_bb_and_scalar_dependences): Do not call it.
4215 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4217 (SESE_LIVEOUT): Removed.
4218 (SESE_LIVEOUT_RENAMES): Removed.
4219 (SESE_REDUCTION_LIST): Removed.
4220 (sese_build_liveouts): Removed.
4221 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4222 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4223 (insert_guard_phis): Same.
4224 (rename_map_elt): Declare a VEC of them.
4225 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4226 trees not pointers to trees.
4228 Rewrite in canonical close SSA form:
4229 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4230 (limit_scops): Close the scop after the block containing the close phi
4232 (canonicalize_loop_closed_ssa): New.
4233 (canonicalize_loop_closed_ssa_form): New.
4234 (build_scops): Call canonicalize_loop_closed_ssa_form.
4236 * graphite-sese-to-poly.c: Fix typos.
4238 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4240 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4242 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4243 (print_pbb): Add conditions.
4245 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4246 Sebastian Pop <sebastian.pop@amd.com>
4248 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4249 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4250 (build_scop_bbs_1): New.
4251 (build_scop_bbs): Rewrite.
4252 * sese.h (bb_in_region): New.
4254 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4256 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4258 (print_scop): Style.
4259 * graphite-poly.h (poly_bb): Add drs vector.
4260 (PBB_DRS): Add accessor.
4261 * graphite-sese-to-poly.c (build_poly_dr): New.
4262 (build_pbb_drs, build_scop_drs): New.
4263 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4265 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4267 * tree-ssa-loop.c: Include forgotten toplev.h
4269 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4271 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4272 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4273 * gcc.dg/graphite/pr37928.c: Same
4274 * gcc.dg/graphite/pr38409.c: Same
4275 * gcc.dg/graphite/pr38498.c: Same
4276 * gcc.dg/graphite/pr38559.c: Same
4277 * gcc.dg/graphite/pr39335.c: Same
4278 * gcc.dg/graphite/pr39335_1.c: Same
4279 * gfortran.dg/graphite/block-2.f: Same
4280 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4283 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4285 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4286 build_access_matrix, build_scop_data_accesses): Remove access function
4287 building. (We get a new version soon).
4288 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4289 * sese.h (nb_loops_around_loop_in_sese): Remove.
4290 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4292 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4293 Sebastian Pop <sebastian.pop@amd.com>
4295 * graphite-scop-detection.c (struct scopdet_info): Rename last
4297 (scopdet_basic_block_info, build_scops_1): Don't use
4298 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4300 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4301 Sebastian Pop <sebastian.pop@amd.com>
4303 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4304 * sese.c (sese_build_liveouts_use): Renamed from
4305 sese_build_livein_liveouts_use. Remove liveins.
4306 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4307 Call sese_build_liveouts_use.
4308 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4309 Call sese_build_liveouts_bb.
4310 (new_sese, free_sese): Remove liveins.
4311 (sese_add_exit_phis_var): Deleted.
4312 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4314 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4316 * sese.h (sese): Remove num_ver and livein.
4317 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4319 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4321 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4323 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4325 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4326 (build_scop_scattering): Do not use compare_prefix_loops any more.
4327 (nb_common_loops): New.
4329 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4331 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4332 (register_old_and_new_names): Renamed set_rename.
4334 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4336 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4337 of the decl from the previous commit.
4339 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4341 * graphite-scop-detection.c (dot_scop): New.
4342 * graphite-scop-detection.h (dot_scop): Declared.
4344 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4346 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4348 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4350 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4351 condition at the end of the loop.
4352 * graphite.c (graphite_initialize, graphite_finalize): Print to
4353 dump_file the compiled function.
4354 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4355 of create_empty_loop_on_edge.
4356 (translate_clast): Update the code generation of loops for the new
4358 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4360 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4362 Reverted the patch from 2009-03-19.
4364 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4366 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4368 (print_scop): Style.
4369 * graphite-poly.h (poly_bb): Add drs vector.
4370 (PBB_DRS): Add accessor.
4371 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4372 (build_access_matrix_with_af, build_access_matrix,
4373 build_scop_data_accesses): Delete.
4374 (build_poly_dr): New.
4375 (build_pbb_drs, build_scop_drs): New.
4376 (build_poly_scop): call build_scop_drs.
4378 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4380 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4381 once per basic block.
4383 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4385 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4386 (graphite_can_represent_expr): Renamed from loop_affine_expr
4388 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4389 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4390 (scopdet_basic_block_info): Actually define entry_block.
4391 (stmt_simple_memref_p): Moved here from ...
4393 * tree-data-ref.c (stmt_simple_memref_p): here.
4394 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4396 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4398 * gcc.dg/graphite/id-4.c: New.
4400 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4402 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4403 (register_old_and_new_names): Update the content of the map.
4404 When there was already a rename_map_elt in the map at that
4406 (copy_bb_and_scalar_dependences): Do rename_variables after
4407 expand_scalar_variables.
4408 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4409 of the map. When there was already a rename_map_elt in the
4410 map at that location, free it.
4411 (translate_clast): Pass the rename_map. Do not initialize and free
4412 a rename_map per stmt_user.
4413 (gloog): Initialize and free one rename_map and pass it to
4416 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4418 * sese.c (expand_scalar_variables_stmt,
4419 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4421 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4422 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4423 the gimple_stmt_iterator of the statement to be expanded.
4424 * graphite-scop-detection.c (is_simple_operand): Do handle
4427 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4429 * graphite-scop-detection.c (is_simple_operand): Do not handle
4431 * gcc.dg/graphite/id-2.c: New.
4433 * graphite-sese-to-poly.c (build_bb_loops,
4434 add_value_to_dim, scan_tree_for_params_right_scev,
4435 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4436 find_params_in_bb, build_loop_iteration_domains,
4437 add_conditions_to_domain): Remove subtract.
4439 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4441 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4442 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4443 pbb_loop_at_index -> gbb_loop_at_index.
4444 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4445 (debug_loop_vec): Delete.
4446 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4447 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4448 (PBB_LOOPS): Removed.
4449 (PBB_BLACK_BOX): Insert cast.
4450 (pbb_set_black_box): New setter.
4451 (pbb_loop_at_index, pbb_loop_index): Removed.
4452 (scop_set_region, scop_set_nb_params): New.
4453 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4454 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4455 (build_poly_scop): Use scop_set_nb_params.
4456 * sese.h (gimple_bb): Add LOOPS.
4457 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4459 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4461 Revert previous commit.
4463 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4465 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4466 (register_old_and_new_names): Update the content of the map.
4467 When there was already a rename_map_elt in the map at that
4469 (copy_bb_and_scalar_dependences): Do rename_variables after
4470 expand_scalar_variables.
4471 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4472 of the map. When there was already a rename_map_elt in the
4473 map at that location, free it.
4474 (translate_clast): Pass the rename_map. Do not initialize and free
4475 a rename_map per stmt_user.
4476 (gloog): Initialize and free one rename_map and pass it to
4479 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4481 Remove forgotten line in revert.
4483 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4485 Revert previous commit.
4487 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4489 * sese.c (register_old_and_new_names): Update the content
4490 of the map. When there was already a rename_map_elt in the
4491 map at that location, free it.
4492 (copy_bb_and_scalar_dependences): Do rename_variables after
4493 expand_scalar_variables.
4494 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4495 of the map. When there was already a rename_map_elt in the
4496 map at that location, free it.
4497 (translate_clast): Pass the rename_map. Do not initialize and free
4498 a rename_map per stmt_user.
4499 (gloog): Initialize and free one rename_map and pass it to
4502 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4504 * graphite-clast-to-gimple.c (translate_clast): context_loop
4507 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4508 Sebastian Pop <sebastian.pop@amd.com>
4510 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4511 of the use of ppl_Polyhedron_map_space_dimensions.
4513 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4514 Sebastian Pop <sebastian.pop@amd.com>
4516 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4517 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4518 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4519 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4520 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4521 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4522 pbb_nb_params): New.
4523 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4524 nb_loops_around_pbb): Adapt return types.
4526 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4528 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4529 graphite-clast-to-gimple.o, graphite-data-ref.o,
4530 graphite-scop-detection.o, graphite-poly.o): Add
4533 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4535 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4536 graphite-clast-to-gimple.o, graphite-data-ref.o,
4537 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4539 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4541 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4542 * gcc.dg/graphite/pr37828.c: Same.
4543 * gcc.dg/graphite/pr37684.c: Same.
4544 * gcc.dg/graphite/block-0.c: Same.
4545 * gcc.dg/graphite/block-1.c: Same.
4546 * gcc.dg/graphite/block-2.c: Same.
4547 * gcc.dg/graphite/block-3.c: Same.
4548 * gcc.dg/graphite/block-4.c: Same.
4549 * gcc.dg/graphite/block-5.c: Same.
4550 * gcc.dg/graphite/block-6.c: Same.
4551 * gfortran.dg/graphite/pr38083.f90: Same.
4552 * gfortran.dg/graphite/block-1.f90: Same.
4553 * gfortran.dg/graphite/block-3.f90: Same.
4554 * gfortran.dg/graphite/pr37852.f90: Same.
4555 * gfortran.dg/graphite/block-4.f90: Same.
4556 * gfortran.dg/graphite/pr37980.f90: Same.
4557 * gfortran.dg/graphite/pr38953.f90: Same.
4558 * gfortran.dg/graphite/pr37857.f90: Same.
4559 * opts.c: Remove -floop-block from -O2.
4560 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4561 -floop-strip-mine are used.
4563 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4564 Sebastian Pop <sebastian.pop@amd.com>
4566 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4568 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4569 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4570 strip_mine_profitable_p, is_interchange_valid,
4571 graphite_trans_bb_block, graphite_trans_loop_block,
4572 graphite_trans_scop_block): Temporary removed.
4573 (extend_scattering, unify_scattering_dimensions): New.
4574 (print_scattering_function, graphite_read_transforms):
4575 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4576 (graphite_generate_scattering_fns): Removed.
4577 (apply_poly_transforms): Cleanup.
4578 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4579 (schedule_to_scattering): Moved.
4580 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4581 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4582 (pbb_nb_scattering): New.
4583 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4584 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4586 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4588 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4589 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4590 -> PBB_TRANSFORMED_SCATTERING.
4591 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4592 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4593 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4594 (check_poly_representation): Do not return bool.
4595 (graphite_transform_loops): Reformat.
4596 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4598 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4600 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4601 debug_pbb_domain, debug_pbb, debug_scop): New.
4602 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4603 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4605 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4608 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4609 when the type precision of the induction variable should be
4610 larger than the type precision of nit.
4611 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4612 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4613 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4615 * gcc.dg/graphite/pr39335_1.c: New.
4616 * gcc.dg/graphite/pr39335.c: New.
4618 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4620 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4621 SSA_NAMES not struct reduction_info.
4623 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4625 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4627 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4628 Tobias Grosser <grosser@fim.uni-passau.de>
4630 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4631 (free_sese): Free SESE_REDUCTION_LIST.
4632 * sese.h (struct sese): Add field reduction_list.
4633 (SESE_REDUCTION_LIST): New.
4634 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4635 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4637 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4638 Tobias Grosser <grosser@fim.uni-passau.de>
4640 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4643 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4644 Tobias Grosser <grosser@fim.uni-passau.de>
4646 * tree-parloops.c (struct brli, build_reduction_list_info,
4647 analyze_reduction_list, gather_scalar_reductions): New.
4648 (loop_parallel_p): Build a reduction list containing only
4649 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4650 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4651 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4652 * tree-flow.h (gather_scalar_reductions): Declared.
4654 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4657 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4658 number_of_iterations_exit from a gcc_assert.
4660 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4661 Jan Sjodin <jan.sjodin@amd.com>
4663 * output.h (graphite_out_file, graphite_in_file): Declared.
4664 * toplev.c (graphite_out_file, graphite_in_file): New.
4665 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4666 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4667 Don't call schedule_to_scattering.
4668 * common.opt (fgraphite-write, fgraphite-read): New.
4669 * graphite-poly.c: Include output.h.
4670 (print_scattering_function, print_scattering_functions,
4671 debug_scattering_function, debug_scattering_functions,
4672 graphite_write_transforms, graphite_read_transforms,
4673 graphite_generate_scattering_fns): New.
4674 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4675 Call graphite_generate_scattering_fns, graphite_write_transforms,
4676 graphite_read_transforms.
4677 (new_poly_bb): Initialize PBB_SCATTERING.
4678 (free_poly_bb): Free PBB_SCATTERING.
4679 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4680 * graphite-poly.h (struct poly_bb): Add field scattering.
4681 (PBB_SCATTERING): New.
4682 (print_scattering_function, print_scattering_functions,
4683 debug_scattering_function, debug_scattering_functions): Declared.
4684 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4685 GMP values, not integers!
4686 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4687 ppl_read_polyhedron_matrix): New.
4688 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4689 debug_ppl_polyhedron_matrix,
4690 ppl_read_polyhedron_matrix): Declared.
4691 * Makefile.in (graphite-poly.o): Depends on output.h.
4693 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4694 Tobias Grosser <grosser@fim.uni-passau.de>
4697 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4698 scalar evolutions in the scop_entry->loop_father.
4700 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4701 Tobias Grosser <grosser@fim.uni-passau.de>
4703 * graphite.h (ref_nb_loops): Remove declaration.
4704 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4705 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4706 debug_gbb): Moved to sese.h.
4709 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4710 Tobias Grosser <grosser@fim.uni-passau.de>
4712 * graphite-data-ref.[ch]: Disable.
4714 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4715 Tobias Grosser <grosser@fim.uni-passau.de>
4717 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4718 scalar evolutions in the scop_entry->loop_father.
4720 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4722 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
4723 (graphite_cannot_represent_loop_niter): Renamed
4724 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
4725 (limit_scops): build_sese_loop_nests does not return a bool.
4726 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
4727 * sese.c (nb_reductions_in_loop): ... from here.
4728 (graphite_loop_normal_form): ... from here.
4729 (sese_record_loop): Does not fail, so does not return a bool.
4730 (build_sese_loop_nests): Same.
4731 * sese.h (build_sese_loop_nests): Update declaration.
4732 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
4733 (build_graphite_loop_normal_form): New.
4734 (gloog): Call build_graphite_loop_normal_form.
4735 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
4736 build_sese_loop_nests.
4738 * gcc.dg/graphite/id-1.c: New.
4740 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4741 Tobias Grosser <grosser@fim.uni-passau.de>
4743 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
4744 The SCoP detection fix is sufficient.
4746 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4748 PR tree-optimization/39260
4749 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
4750 the basic block contains a condition with a real type.
4751 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
4753 * gcc.dg/graphite/pr39260.c: New.
4755 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4757 * graphite-poly.c: Inlcude params.h.
4758 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
4760 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
4761 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
4763 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4764 Tobias Grosser <grosser@fim.uni-passau.de>
4766 * graphite-scop-detection.c (dot_all_scops_1,
4767 dot_all_scops): Moved here.
4768 * graphite-scop-detection.h (dot_all_scops): Declared here.
4769 * graphite.c (graphite_initialize, graphite_finalize): New.
4770 (graphite_transform_loops): Cleaned up.
4771 * sese.c (debug_oldivs): Moved here.
4772 * graphite-poly.c (graphite_apply_transformations): Renamed
4773 apply_poly_transforms.
4774 (debug_loop_vec): Moved here.
4775 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
4776 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
4777 find_scop_parameters, build_scop_iteration_domain,
4778 add_conditions_to_constraints, build_scop_canonical_schedules,
4779 build_scop_data_accesses): Now static.
4780 (build_poly_scop, check_poly_representation): New.
4782 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4784 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
4785 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
4786 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
4787 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
4788 scan_tree_for_params_right_scev, scan_tree_for_params_int,
4789 scan_tree_for_params, struct irp_data, dx_record_params,
4790 find_params_in_bb, find_scop_parameters, gbb_from_bb,
4791 build_loop_iteration_domains, add_conditions_to_domain,
4792 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
4793 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
4794 build_sese_conditions, add_conditions_to_constraints,
4795 build_scop_iteration_domain, build_access_matrix_with_af,
4796 build_access_matrix,
4797 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
4799 * graphite-sese-to-poly.c: New.
4800 * graphite-sese-to-poly.h: New.
4802 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
4804 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4806 * graphite.c: Split graphite code generation to a new file.
4807 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
4808 max_precision_type, clast_to_gcc_expression_red,
4809 clast_to_gcc_expression, gcc_type_for_clast_expr,
4810 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
4811 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
4812 graphite_create_new_guard, clast_get_body_of_loop,
4813 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
4814 graphite_create_new_loop, build_iv_mapping, copy_renames,
4815 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4816 compute_cloog_iv_types, free_scattering, save_var_name,
4817 initialize_cloog_names, build_scop_context, build_cloog_prog,
4818 set_cloog_options, debug_clast_stmt, scop_to_clast,
4819 print_generated_program, debug_generated_program,
4820 gloog): Moved to graphite-clast-to-gimple.c.
4822 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
4824 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
4825 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
4826 loop_iv_stack_pop, loop_iv_stack_get_iv,
4827 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
4828 free_loop_iv_stack, loop_iv_stack_remove_constants,
4829 debug_rename_elt, debug_rename_map_1, debug_rename_map,
4830 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
4831 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
4832 eq_ivtype_map_elts, sese_add_exit_phis_edge,
4833 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
4834 get_vdef_before_sese, sese_adjust_vphi,
4835 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
4836 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
4837 is_iv, expand_scalar_variables_ssa_name,
4838 expand_scalar_variables_expr, expand_scalar_variables_stmt,
4839 expand_scalar_variables, rename_variables, remove_condition,
4840 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
4841 add_loop_exit_phis, insert_loop_close_phis, struct igp,
4842 default_liveout_before_guard, add_guard_exit_phis,
4843 insert_guard_phis, register_old_and_new_names,
4844 graphite_copy_stmts_from_block, register_sese_liveout_renames,
4845 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
4846 if_region_set_false_region, create_if_region_on_edge,
4847 move_sese_in_condition): Moved to sese.c.
4849 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
4850 if_region_exit, if_region_get_condition_block,
4851 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
4852 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
4853 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
4854 ivtype_map_elt, new_ivtype_map_elt,
4855 recompute_all_dominators): Moved to sese.h.
4857 * graphite-clast-to-gimple.c: New.
4858 * graphite-clast-to-gimple.h: New.
4859 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
4860 * sese.c: Modified as said above.
4863 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4865 * graphite.c: Split scop detection to a new file.
4866 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
4867 move_sd_regions, loop_affine_expr, exclude_component_ref,
4868 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
4869 graphite_cannot_represent_loop_niter, struct scopdet_info,
4870 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
4871 find_single_entry_edge, find_single_exit_edge,
4872 create_single_entry_edge, sd_region_without_exit,
4873 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
4874 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
4875 Moved to graphite-scop-detection.c.
4877 * graphite-scop-detection.c: New.
4878 * graphite-scop-detection.h: New.
4879 * Makefile.in: Add new rule for graphite-scop-detection.o.
4881 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
4882 tree-scalar-evolution.h.
4883 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
4884 build_sese_loop_nests): Moved here from graphite.c.
4885 (param_index): Renamed parameter_index_in_region.
4887 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4888 Sebastian Pop <sebastian.pop@amd.com>
4890 * gcc.dg/graphite/block-0.c: Expected to fail now.
4891 * gcc.dg/graphite/block-1.c: Same.
4892 * gcc.dg/graphite/block-5.c: Same.
4893 * gcc.dg/graphite/block-6.c: Same.
4895 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4896 Sebastian Pop <sebastian.pop@amd.com>
4898 * graphite.h: Separate from graphite_bb_p the polyhedral
4899 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
4900 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
4901 graphite-data-ref.h.
4902 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
4903 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
4904 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
4905 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4906 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
4907 scop_nb_params): Moved to graphite-poly.h.
4908 * graphite-data-ref.c: Same.
4909 * graphite-data-ref.h: New.
4911 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
4912 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
4913 is_interchange_valid, graphite_trans_bb_block,
4914 graphite_trans_loop_block, scop_max_loop_depth,
4915 graphite_trans_scop_block, graphite_apply_transformations,
4916 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
4918 * graphite-poly.h: New.
4919 * graphite-poly.c: New.
4920 * Makefile.in (OBJS-common): Add graphite-poly.o.
4921 (graphite-poly.o): New rule.
4922 * tree-data-ref.h (struct data_reference): Remove unused scop field.
4925 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4926 Tobias Grosser <grosser@fim.uni-passau.de>
4928 * graphite.c: Replace gb -> gbb.
4930 * graphite-data-ref.c: Same.
4932 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4933 Tobias Grosser <grosser@fim.uni-passau.de>
4935 * Makefile.in (OBJS-commmon): Add sese.o.
4937 (graphite.o): Add sese.h.
4938 * graphite.c (bb_in_ss_p, loop_in_sese_p,
4939 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
4940 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
4942 (block_before_scop): Add missing return.
4943 (new_scop, free_scop): Remove SESE data structures.
4944 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
4945 find_scop_parameters, build_loop_iteration_domains,
4946 add_conditions_to_domain, register_scop_liveout_renames,
4947 copy_bb_and_scalar_dependences): Scop -> SESE.
4949 (add_conditions_to_domain): SCoP -> SESE and remove check
4950 (scop_contains_non_iv_scalar_phi_nodes): New.
4951 (build_scop_conditions_1, build_scop_conditions): Remove check for
4952 non iv scalar phi nodes.
4953 (print_scop_statistics): New.
4954 (graphite_transform_loops): Cleanup.
4956 * graphite.h: Move to sese & cleanup.
4960 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4961 Tobias Grosser <grosser@fim.uni-passau.de>
4963 * graphite.c (build_scop_conditions_1): Conditions are only
4964 at the end of a basic block.
4966 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4967 Tobias Grosser <grosser@fim.uni-passau>
4969 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
4971 (GBB_ALPHA): Removed.
4973 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4974 Tobias Grosser <grosser@fim.uni-passau.de>
4976 * graphite-data-ref.c (graphite_test_dependence): Don't use
4977 GBB_DYNAMIC_SCHEDULE.
4978 * graphite.c (new_graphite_bb): Same.
4979 (free_graphite_bb): Same.
4980 (build_scop_dynamic_schedules): Removed.
4981 (graphite_transform_loops): Don't call it.
4982 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
4983 (GBB_DYNAMIC_SCHEDULE): Removed.
4985 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4986 Tobias Grosser <grosser@fim.uni-passau.de>
4988 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
4989 (print_graphite_bb): Same.
4990 (build_cloog_prog): Same.
4992 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4993 Tobias Grosser <grosser@fim.uni-passau.de>
4995 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
4997 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4998 Tobias Grosser <grosser@fim.uni-passau.de>
5000 * graphite.c (build_scop_context): Don't use CloogMatrix.
5001 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5002 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5004 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5005 Tobias Grosser <grosser@fim.uni-passau.de>
5007 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5008 liveout_renames, add_params fields...
5009 (struct sese): ... here.
5010 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5011 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5013 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5014 Tobias Grosser <grosser@fim.uni-passau.de>
5016 * graphite.c (print_scop): Do not print the CLooG program.
5017 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5018 build_cloog_prog, gloog): Don't use SCOP_PROG.
5019 (find_transform): Renamed scop_to_clast.
5020 (print_generated_program, debug_generated_program): New.
5021 (graphite_transform_loops): Adapt to new interface.
5022 * graphite.h (struct scop): Remove program field.
5023 (SCOP_PROG): Removed.
5024 (print_generated_program, debug_generated_program): Declared.
5026 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5028 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5029 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5030 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5031 free_graphite_bb, build_scop_canonical_schedules,
5032 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5033 schedules are now represented using a ppl_Linear_Expression_t.
5034 * graphite.h (struct graphite_bb): Same.
5035 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5036 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5038 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5040 * graphite.c: Free local memory.
5041 * graphite-ppl.c: Same.
5043 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5045 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5046 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5047 swap_constraint_variables, scale_constraint_variable): Removed.
5048 (graphite_trans_bb_strip_mine): Remove pong.
5049 * graphite-ppl.c: Include missing header files.
5050 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5051 * graphite-ppl.h (ppl_strip_loop): Declared.
5052 * Makefile.in (graphite-ppl.o): Adjust dependences.
5054 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5056 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5057 (build_scop_iteration_domain): Same.
5059 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5061 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5063 (add_value_to_dim, scan_tree_for_params_right_scev,
5064 scan_tree_for_params_int): New.
5065 * graphite-ppl.c (oppose_constraint): New.
5066 (insert_constraint_into_matrix): Implement missing cases.
5067 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5069 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5071 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5072 use ppl_move_dimension.
5074 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5076 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5079 * graphite-ppl.c: Same.
5080 * graphite-ppl.h: Same.
5082 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5084 Revert last 3 commits.
5086 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5088 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5090 (add_value_to_dim, scan_tree_for_params_right_scev,
5091 scan_tree_for_params_int): New.
5092 * graphite-ppl.c (oppose_constraint): New.
5093 (insert_constraint_into_matrix): Implement missing cases.
5094 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5096 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5098 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5100 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5101 Tobias Grosser <grosser@fim.uni-passau.de>
5103 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5104 use ppl_move_dimension.
5105 * graphite-ppl.c (ppl_move_dimension): New.
5106 * graphite-ppl.h (ppl_move_dimension): Declared.
5108 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5110 * graphite.c: Do not include cloog/cloog.h.
5111 (print_graphite_bb): Remove ping pong, call PPL print function.
5113 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5115 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5116 (graphite.o): Add dependence on graphite-ppl.h.
5117 (graphite-ppl.o): New.
5118 (graphite-data-ref.c): Ping pong between PPL data structures
5120 * graphite-ppl.c: New.
5121 * graphite-ppl.h: New.
5122 * graphite.c: Include graphite-ppl.h.
5123 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5124 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5125 Ping pong between PPL data structures and matrices.
5126 (new_graphite_bb): Create a PPL constraint system.
5127 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5128 (build_loop_iteration_domains): Use PPL functions.
5129 * graphite.h: Include graphite-ppl.h. Fix comments.
5130 (graphite_bb): Use a ppl_Constraint_System_t instead of
5131 CloogMatrix for representing the domain.
5132 (scop): Remove static_schedule.
5133 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5135 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5137 * graphite.c: Fix some comments.
5139 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5142 * graphite.c (if_region_set_false_region): After moving a region
5143 in the false branch of a condition, remove the empty dummy
5145 (gloog): Remove wrong fix for PR38953.
5147 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5149 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5150 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5151 register_bb_in_sese, new_sese, free_sese): Moved.
5152 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5153 outermost_loop_in_scop, build_scop_iteration_domain,
5154 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5155 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5156 Use loop_in_sese_p instead of loop_in_scop_p.
5157 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5158 (free_scop): Do not free SCOP_BBS_B.
5159 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5160 ref_nb_loops): Moved here...
5161 * graphite.h (ref_nb_loops): ... from here.
5162 (struct scop): Remove bbs_b bitmap.
5163 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5164 * gcc.dg/graphite/scop-19.c: New
5166 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5168 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5171 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5173 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5174 eq_loop_to_cloog_loop): Remove.
5175 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5176 * graphite.h (struct scop): Remove loop2cloog_loop.
5177 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5179 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5181 * opts.c (decode_options): Only add graphite options to O2
5182 if we compile with graphite enabled.
5184 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5186 * Merge from mainline (r143163:143684).
5188 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5190 * graphite.c (debug_value): Removed.
5191 * graphite.h (debug_value): Removed.
5193 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5195 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5196 after graphite: pass_copy_prop does not maintain a proper loop closed
5197 SSA form. pass_copy_prop should be fixed.
5199 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5201 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5203 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5205 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5206 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5207 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5210 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5212 * graphite.c (gloog): Return true when code gen succeeded.
5213 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5214 the code of the function did not changed. After cleanup_tree_cfg
5215 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5218 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5220 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5221 gimple_call_lhs is NULL.
5223 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5224 Tobias Grosser <tobi.grosser@amd.com>
5226 * graphite.c (graphite_trans_scop_block): Do not block single
5229 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5230 Tobias Grosser <tobi.grosser@amd.com>
5232 * graphite.c (build_scop_canonical_schedules): Start schedules at
5235 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5236 Tobias Grosser <tobi.grosser@amd.com>
5238 * graphite.c (compare_prefix_loops): New.
5239 (build_scop_canonical_schedules): Rewritten.
5240 (graphite_transform_loops): Move build_scop_canonical_schedules
5241 after build_scop_iteration_domain.
5243 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5244 Tobias Grosser <tobi.grosser@amd.com>
5246 * graphite.c (add_conditions_to_domain): Add the loops to
5247 the dimension of the iteration domain. Do copy the domain
5248 only when it exists.
5249 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5250 (add_conditions_to_constraints): New.
5251 (can_generate_code_stmt, can_generate_code): Removed.
5252 (gloog): Do not call can_generate_code.
5253 (graphite_transform_loops): Call add_conditions_to_constraints
5254 after building the iteration domain.
5256 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5257 Tobias Grosser <tobi.grosser@amd.com>
5258 Jan Sjodin <jan.sjodin@amd.com>
5260 * graphite.c (scan_tree_for_params): On substractions negate
5261 all the coefficients of the term.
5262 (clast_to_gcc_expression_red): New. Handle reduction expressions
5263 of more than two operands.
5264 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5265 (get_vdef_before_scop): Handle also the case of default definitions.
5267 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5270 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5271 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5272 (gloog): Do not call cleanup_tree_cfg.
5273 (graphite_transform_loops): Call cleanup_tree_cfg after all
5274 scops have been code generated.
5276 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5278 * passes.c (init_optimization_passes): Schedule after
5279 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5281 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5283 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5285 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5286 Set the type of an expression to the type of its assign statement.
5287 (expand_scalar_variables_expr): Do not pass loop_p.
5288 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5289 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5290 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5292 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5294 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5295 an expression to the gimple_expr_type of its assign statement.
5296 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5299 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5301 PR tree-optimization/38786
5302 * gcc.dg/graphite/pr38786.c: New.
5303 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5304 the SSA_NAME case of expand_scalar_variables_expr.
5305 (expand_scalar_variables_expr): Also gather the scalar computation
5306 used to index the memory access.
5307 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5308 the gimple_stmt_iterator where it inserts new code.
5310 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5312 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5314 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5316 * opts.c (decode_options): Enable flag_graphite_identity and
5317 flag_loop_block in -O2 and above.
5319 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5321 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5322 Fix merge problem: replace with the file from trunk.
5324 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5326 * Merge from mainline (r141727:143163).
5328 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5329 Jan Sjodin <jan.sjodin@amd.com>
5331 PR tree-optimization/38559
5332 * gcc.dg/graphite/pr38559.c: New.
5334 * graphite.c (debug_value, copy_constraint,
5335 swap_constraint_variables, scale_constraint_variable, ): New.
5336 (get_lower_bound, get_upper_bound): Removed.
5337 (graphite_trans_bb_strip_mine): Clean up this code that works
5338 only for constant number of iterations. Fully copy upper and
5339 lower bound constraints, not only the constant part of them.
5340 * graphite.h (debug_value): Declared.
5342 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5344 PR tree-optimization/38492
5345 PR tree-optimization/38498
5346 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5347 * tree-chrec.h (scev_is_linear_expression): Declared.
5348 * graphite.c (graphite_cannot_represent_loop_niter): New.
5349 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5350 (graphite_loop_normal_form): Use gcc_assert.
5351 (scan_tree_for_params): Use CASE_CONVERT.
5352 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5353 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5354 Use gcc_assert. Discard scops that contain unhandled cases.
5355 (build_scop_conditions): Return a boolean status for unhandled cases.
5356 (strip_mine_profitable_p): Print the loop number, not its depth.
5357 (is_interchange_valid): Pass the depth of the loop nest, don't
5358 recompute it wrongly.
5359 (graphite_trans_bb_block): Same.
5360 (graphite_trans_bb_block): Print tentative of loop blocking.
5361 (graphite_trans_scop_block): Do not print that the loop has been
5363 (graphite_transform_loops): Do not handle scops that contain condition
5366 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5368 * gcc.dg/graphite/block-0.c: Update test.
5369 * gcc.dg/graphite/block-1.c: Same.
5370 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5372 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5373 * gcc.dg/graphite/block-3.c: New.
5374 * gcc.dg/graphite/pr38498.c: New.
5376 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5378 PR tree-optimization/38510
5379 * gcc.dg/graphite/pr38510.c: New.
5380 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5381 (translate_clast): Call recompute_all_dominators before
5383 (gloog): Call recompute_all_dominators before graphite_verify.
5385 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5387 PR tree-optimization/38492
5388 * graphite.c (rename_map_elt, debug_rename_elt,
5389 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5390 rename_map_elt_info, eq_rename_map_elts,
5391 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5392 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5393 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5394 (sese_build_livein_liveouts): New.
5395 (new_sese, free_sese): New.
5396 (new_scop): Call new_sese.
5397 (free_scop): Call free_sese.
5398 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5399 (register_old_new_names): Renamed register_old_and_new_names.
5400 (register_scop_liveout_renames, add_loop_exit_phis,
5401 insert_loop_close_phis, struct igp,
5402 default_liveout_before_guard, add_guard_exit_phis,
5403 insert_guard_phis, copy_renames): New.
5404 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5405 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5406 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5407 (scop_adjust_phis_for_liveouts): New.
5408 (gloog): Call scop_adjust_phis_for_liveouts.
5410 * graphite.h (struct sese): Documented. Added fields liveout,
5412 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5413 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5414 (struct scop): Added field liveout_renames.
5415 (SCOP_LIVEOUT_RENAMES): New.
5417 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5419 PR tree-optimization/38409
5420 * gcc.dg/graphite/pr38409.c: New.
5421 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5423 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5425 * graphite.c (gcc_type_for_cloog_iv): By default return
5427 (graphite_create_new_loop): Don't fold_convert the already
5428 fold_convert-ed expression.
5430 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5432 PR tree-optimization/38446
5433 * gcc.dg/graphite/pr38446.c: New.
5434 * graphite.c (register_bb_in_sese): New.
5435 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5436 looking at the bbs in the region.
5437 * graphite.h (sese): Add region_basic_blocks pointer set to
5438 structure and initialize at the time of defining new scop.
5440 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5442 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5443 (find_params_in_bb): Do not free data refs.
5444 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5446 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5448 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5449 * gcc.dg/graphite/scop-17.c: Same.
5450 * gcc.dg/graphite/block-5.c: New.
5451 * gcc.dg/graphite/block-6.c: New.
5452 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5453 * gcc.dg/graphite/pr37684.c: Same.
5454 * gcc.dg/graphite/block-2.c: Same.
5456 * graphite.c (struct ivtype_map_elt): New.
5457 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5458 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5459 gcc_type_for_cloog_iv): New.
5460 (loop_iv_stack_patch_for_consts): Use the type of the induction
5461 variable from the original loop, except for the automatically
5462 generated loops, i.e., in the case of a strip-mined loop, in
5463 which case there is no original loop: in that case just use
5465 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5466 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5467 (clast_name_to_gcc): Accept params to be NULL.
5468 (clast_to_gcc_expression): Take an extra parameter for the type.
5469 Convert to that type all the expressions built by this function.
5470 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5471 (graphite_translate_clast_equation): Compute the type of the
5472 clast_equation before translating its LHS and RHS.
5473 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5474 (graphite_create_new_loop): Compute the type of the induction
5475 variable before translating the lower and upper bounds and before
5476 creating the induction variable.
5477 (rename_variables_from_edge, rename_phis_end_scop): New.
5478 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5479 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5480 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5481 compute_cloog_iv_types): New.
5482 (gloog): Call compute_cloog_iv_types before starting the
5483 translation of the clast.
5485 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5486 (GBB_CLOOG_IV_TYPES): New.
5487 (debug_ivtype_map): Declared.
5488 (oldiv_for_loop): New.
5490 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5493 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5494 (param_index): Assert if parameter is not know after parameter
5496 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5497 (find_scop_parameters): Mark, that we have finished parameter
5499 (graphite_transform_loops): Move condition detection before parameter
5501 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5502 * gfortran.dg/graphite/pr38459.f90: New.
5504 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5506 * graphite.c (graphite_transform_loops): Always call find_transform ()
5507 in ENABLE_CHECKING. So we test these code paths, even if we do not
5510 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5512 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5513 (print_scop): Ditto.
5515 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5518 Fix gfortran.dg/graphite/id-3.f90.
5519 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5520 regions more than once.
5522 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5524 Fix gfortran.dg/graphite/id-4.f90.
5525 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5528 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5530 Fix gfortran.dg/graphite/id-1.f90.
5531 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5532 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5533 (max_precision_type): New.
5534 (value_clast): Removed.
5535 (clast_to_gcc_expression): Be more careful to types of expressions.
5536 Use max_precision_type and update use of gmp_cst_to_tree.
5537 (graphite_translate_clast_equation): Use max_precision_type.
5538 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5539 use the type of the condition.
5540 (graphite_create_new_loop): Do not use integer_type_node, use the
5541 max_precision_type of lb and ub.
5543 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5545 * graphite.c (build_scops_1): Initialize open_scop.exit
5548 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5550 * gcc.dg/graphite/pr38084.c: New.
5551 * gfortran.dg/graphite/id-1.f90: New.
5552 * gfortran.dg/graphite/id-2.f90: New.
5553 * gfortran.dg/graphite/id-3.f90: New.
5554 * gfortran.dg/graphite/id-4.f90: New.
5555 * gfortran.dg/graphite/pr37857.f90: New.
5557 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5558 Jan Sjodin <jan.sjodin@amd.com>
5559 Harsha Jagasia <harsha.jagasia@amd.com>
5571 * gcc.dg/graphite/pr38073.c: New.
5572 * gcc.dg/graphite/pr37928.c: New.
5573 * gcc.dg/graphite/pr37883.c: New.
5574 * gcc.dg/graphite/pr38125.c: New.
5575 * gfortran.dg/graphite/pr38083.f90: New.
5576 * gfortran.dg/graphite/pr37852.f90: New.
5577 * gfortran.dg/graphite/pr37980.f90: New.
5579 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5580 the number of detected scops. Copy exact same test for loop
5582 * gcc.dg/graphite/block-1.c: Fix the number of expected
5583 loops to be blocked as reductions are not handled.
5584 * gcc.dg/graphite/block-4.c: ...here. New.
5586 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5587 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5589 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5590 * Makefile.in (graphite.o): Depend on value-prof.h.
5591 (graphite.o-warn): Removed -Wno-error.
5592 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5593 to be a NULL pointer. Call update_stmt. Return the newly created
5594 cannonical induction variable.
5596 * graphite.h (debug_rename_map): Declared. Fix some comments.
5598 * graphite.c: Reimplement the code generation from graphite to gimple.
5599 Include value-prof.h.
5600 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5601 (get_old_iv_from_ssa_name): Removed.
5602 (graphite_stmt_p): New.
5603 (new_graphite_bb): Test for useful statements before building a
5604 graphite statement for the basic block.
5605 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5606 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5608 (recompute_all_dominators, graphite_verify,
5609 nb_reductions_in_loop, graphite_loop_normal_form): New.
5610 (scop_record_loop): Call graphite_loop_normal_form.
5611 (build_scop_loop_nests): Iterate over all the blocks of the
5612 function instead of relying on the incomplete information from
5613 SCOP_BBS. Return the success of the operation.
5614 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5615 (add_bb_domains): Removed.
5616 (build_loop_iteration_domains): Don't call add_bb_domains.
5617 Add the iteration domain only to the basic blocks that have been
5618 translated to graphite.
5619 (build_scop_conditions_1): Add constraints only if the basic
5620 block have been translated to graphite.
5621 (build_scop_data_accesses): Completely disabled until data
5622 dependence is correctly implemented.
5623 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5624 (remove_all_edges_1, remove_all_edges): Removed.
5625 (get_new_name_from_old_name): New.
5626 (graphite_rename_variables_in_stmt): Renamed
5627 rename_variables_in_stmt. Call get_new_name_from_old_name.
5628 Use replace_exp and update_stmt.
5629 (is_old_iv): Renamed is_iv.
5630 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5631 Use replace_exp and update_stmt.
5632 (expand_scalar_variables_expr): Same. Use the map to get the
5633 new names for the renaming of induction variables and for the
5634 renaming of variables after a basic block has been copied.
5635 (expand_scalar_variables): Same.
5636 (graphite_rename_variables): Renamed rename_variables.
5637 (move_phi_nodes): Removed.
5638 (get_false_edge_from_guard_bb): New.
5639 (build_iv_mapping): Do not insert the induction variable of a
5640 loop in the renaming iv map if the basic block does not belong
5642 (register_old_new_names, graphite_copy_stmts_from_block,
5643 copy_bb_and_scalar_dependences): New.
5644 (translate_clast): Heavily reimplemented: copy basic blocks,
5645 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5646 At each translation step call graphite_verify ensuring the
5647 consistency of the SSA, loops and dominators information.
5648 (collect_virtual_phis, find_vdef_for_var_in_bb,
5649 find_vdef_for_var_1, find_vdef_for_var,
5650 patch_phis_for_virtual_defs): Removed huge hack.
5651 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5652 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5653 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5654 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5655 if_region_get_condition_block, if_region_set_false_region,
5656 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5657 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5658 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5659 rewrite_into_sese_closed_ssa): New.
5660 (gloog): Remove dead code. Early return if code cannot be
5661 generated. Call cleanup_tree_cfg once the scop has been code
5663 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5664 block loops with less than two loops.
5665 (graphite_apply_transformations): Remove the call to
5666 scop_remove_ignoreable_gbbs.
5667 (limit_scops): When build_scop_loop_nests fails, continue on
5668 the next scop. Fix open_scop.entry.
5669 (graphite_transform_loops): Call recompute_all_dominators: force the
5670 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5671 Call initialize_original_copy_tables and free_original_copy_tables
5672 to be able to copy basic blocks during code generation.
5673 When build_scop_loop_nests fails, continue on next scop.
5674 (value_clast): New union.
5675 (clast_to_gcc_expression): Fix type cast warning.
5677 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5679 * Merge from mainline (r140838:141727).
5681 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5685 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5687 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5691 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5692 exits and conditions.
5693 * gcc.dg/graphite/pr37943.c: New.
5695 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5698 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5700 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5702 * doc/invoke.texi: Fix spaces.
5704 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5706 PR tree-optimization/37891
5707 Reverted last commit.
5708 * graphite.c (create_single_entry_edge): Set
5709 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5711 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5712 Mitul Thakkar <mitul.thakkar@amd.com>
5714 * graphite.c (create_single_entry_edge): Set
5715 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5717 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
5719 * doc/invoke.texi: Add -fgraphite-identity.
5720 * graphite.c (graphite_apply_transformations): Check for
5721 -fgraphite-identity.
5722 * toplev.c (process_options): Add flag_graphite_identity.
5723 * tree-ssa-loop.c: Add flag_graphite_identity.
5725 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5727 Undo changes from 2008-10-02:
5728 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5729 operand type when copying the operand to a variable of different type.
5730 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5731 with the IV name after increment.
5733 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5734 Harsha Jagasia <harsha.jagasia@amd.com>
5736 PR tree-optimization/37828
5737 * gcc.dg/graphite/pr37828.c: New.
5738 * graphite.c (graphite_trans_loop_block): Do not loop block
5739 single nested loops.
5741 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
5742 Sebastian Pop <sebastian.pop@amd.com>
5744 * graphite.c (struct rename_map_elt, new_rename_map_elt,
5745 rename_map_elt_info, eq_rename_map_elts): New.
5746 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
5747 (expand_scalar_variables_expr): Change parameters.
5748 (expand_scalar_variables_stmt): Same.
5749 (expand_scalar_variables): Same.
5750 (graphite_rename_ivs): Rename graphite_rename_variables.
5751 (build_iv_mapping): New.
5752 (translate_clast): Call build_iv_mapping.
5753 * graphite.h (gbb_p): New name.
5755 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
5757 PR tree-optimization/37684
5758 * gcc.dg/graphite/pr37684.c: New.
5759 * graphite.c (exclude_component_ref): New.
5760 (is_simple_operand): Call exclude_component_ref.
5762 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
5763 Harsha Jagasia <harsha.jagasia@amd.com>
5765 PR tree-optimization/37485
5766 * gcc.dg/graphite/block-2.c: New
5767 * graphite.c (gmp_cst_to_tree): Moved.
5768 (iv_stack_entry_is_constant): New.
5769 (iv_stack_entry_is_iv): New.
5770 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
5771 (loop_iv_stack_insert_constant): New.
5772 (loop_iv_stack_pop): Use new datatpype.
5773 (loop_iv_stack_get_iv): Same.
5774 (loop_iv_stack_get_iv_from_name): Same.
5775 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
5776 (loop_iv_stack_patch_for_consts): New.
5777 (loop_iv_stack_remove_constants): New.
5778 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
5779 (translate_clast): Call loop_iv_stack_patch_for_consts and
5780 loop_iv_stack_remove_constants.
5781 (gloog): Use new datatype. Redirect construction edge to end
5782 block to avoid accidental deletion.
5783 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
5785 (union iv_stack_entry_data): New. Data in iv stack entry.
5786 (struct iv_stack_entry): New. Datatype for iv stack entries.
5788 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5790 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5791 operand type when copying the operand to a variable of different type.
5793 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5795 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5796 with the IV name after increment.
5798 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5800 * Merge from mainline (r140164:140838).
5802 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5804 * graphite-data-ref.c: New.
5805 * graphite.c (print_scop): Also dump the dependence graph.
5806 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
5807 (new_scop): Initialize SCOP_DEP_GRAPH.
5808 (build_scop_dynamic_schedules): New.
5809 (build_access_matrix_with_af): Fixed column numbering.
5810 (graphite_transform_loops): Call build_scop_dynamic_schedules.
5811 * graphite.h: Add ifndef/define guards against multiple inclusion.
5812 (struct scop): Add dep_graph field.
5813 (SCOP_DEP_GRAPH): Defined.
5814 (ref_nb_loops): Fixed and moved to other position.
5815 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
5816 (nb_loops_around_loop_in_scop): New.
5817 (graphite_dump_dependence_graph): Declared.
5818 (graphite_build_rdg_all_levels): Declared.
5819 (graphite_test_dependence): Declared.
5820 * Makefile.in (graphite-data-ref.o): New target.
5822 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
5824 * Merge from mainline (139870:140164).
5826 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5828 * Merge from mainline (138275:139870).
5829 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
5830 the commits from trunk broke the niter detection.
5832 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5834 * graphite.c: Add more documentation. Fix formatting.
5835 (debug_loop_vec, debug_oldivs, loop_iv_stack,
5836 loop_iv_stack_debug): Moved...
5837 (schedule_to_scattering): Move before use.
5838 (dot_all_scops): Include in "#if 0" the code for system
5841 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
5842 loop_iv_stack_debug): ...here.
5844 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
5846 * tree-phinodes.c (make_phi_node): Extern.
5847 (add_phi_node_to_bb): New.
5848 (create_phi_node): Call add_phi_node_to_bb.
5849 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
5850 (remove_statement): Handle case where stored phi was updated
5851 and is no longer the same.
5852 * graphite.c (is_parameter): New.
5854 (expand_scalar_variables_expr): New.
5855 (expand_scalar_variables_stmt): New.
5856 (expand_scalar_variables): New.
5857 (move_phi_nodes): Create new phi instead of moving old one.
5858 (translate_clast): Call expand_scalar_variables.
5859 (find_vdef_for_var_in_bb): Also scan regular definitions.
5860 (skip_phi_defs): New.
5861 (collect_scop_exit_phi_args): New.
5862 (patch_scop_exit_phi_args): New.
5863 (gloog): Patch phis after scop.
5864 * tree-flow.h: (add_phi_node_to_bb): Declared.
5865 (make_phi_node): Declared.
5867 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5869 * graphite.c (end_scop): Split the entry of the scop when it
5870 is the header of the loop in which the scop is ending.
5871 (build_scops_1, limit_scops): Update uses of end_scop.
5873 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5875 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
5876 SCOP_ENTRY or SCOP_EXIT.
5878 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5880 * graphite.c (get_construction_edge): Removed.
5881 (gloog): Construction edge is the scop entry edge.
5883 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5885 * graphite.c (can_generate_for_scop): Removed.
5886 (gloog): Do not call it.
5888 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5890 * graphite.c (new_scop): Entry of a scop is an edge.
5891 Initialize SESE region.
5892 (free_scop): Free SESE region.
5893 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
5894 (split_difficult_bb): New, split from end_scop.
5895 (end_scop): Exit of a scop is an edge.
5896 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
5897 not automatically updated and thus is always wrong.
5898 * graphite.h (struct sese): New.
5901 (struct scop): New field for a SESE region. Remove entry, exit.
5902 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
5903 semantics as before. Moved comment around.
5905 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5906 Sebastian Pop <sebastian.pop@amd.com>
5908 * graphite.c (graphite_transform_loops): Always enable gloog
5909 and find_transform when ENABLE_CHECKING.
5911 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5913 * graphite.c (graphite_transform_loops): Move pretty printer
5914 of SCOPs before doing any transform. Remove call to print_scops
5915 and dot_all_scops_1.
5917 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5919 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
5920 (print_graphite_bb): Same.
5922 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5924 * graphite.c (dot_all_scops_1): Cleanup.
5925 (move_scops): Fix comment.
5927 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5929 * graphite.c (build_scop_bbs): Revert commit 139355:
5931 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5932 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5934 * graphite.c (build_scop_bbs): Factor up code.
5936 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5938 * graphite.c (gloog): Update dominator info.
5940 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5942 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
5944 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5946 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
5948 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
5949 (translate_clast): Correct formatting.
5950 * graphite.h (struct num_map): Removed.
5951 (struct graphite_bb): Remove num_map field.
5952 (GBB_INDEX_TO_NUM_MAP): Removed.
5954 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5956 * graphite.c (build_access_matrix_with_af): Fix comments.
5957 (build_scop_data_accesses): Same.
5959 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5961 * graphite.c (build_scop_data_accesses): Don't construct
5962 access matrices. Add a FIXME and an assert condition that
5963 should pass when the access matrices will be needed.
5965 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5967 * tree-data-ref.c (stmt_simple_memref_p): Don't call
5969 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
5970 Moved close by free_graphite_bb.
5971 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
5972 (new_scop): Move close by free_scop.
5973 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
5975 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
5977 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
5978 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
5979 instead of recursive call.
5980 (graphite_translate_clast_equation): New.
5981 (graphite_create_guard_cond_expr): New.
5982 (graphite_create_new_guard): New.
5983 (get_stack_index_from_iv): Removed.
5984 (graphite_rename_ivs_stmt): Use gbb_loop_index.
5985 (get_true_edge_from_guard_bb): New.
5986 (translate_clast): Handle stmt_guard in clast.
5987 (get_construction_edge): Allow construction edge detection for
5988 a scope entry with multiple predecessors if one predecessor is
5989 the immediate dominator of scope entry.
5990 (can_generate_code_stmt): Enable code generation for clast_guard.
5991 (gloog): Use correct context loop. Removed check for post dominators.
5992 * cfgloop.h (create_empty_if_region_on_edge): Declared.
5994 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5996 * graphite.c (remove_dead_loops): Document better which
5999 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6001 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6003 (graphite.o): Also depends on pointer-set.h.
6005 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6007 * graphite.c (scop_record_loop): Fix compile warning.
6009 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6010 Sebastian Pop <sebastian.pop@amd.com>
6012 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6014 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6016 * graphite.c (build_graphite_bb): Initialize bb->aux to
6017 point to the graphite_bb_p.
6018 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6020 (add_bb_domains): Does not use the scop parameter.
6021 (graphite_transform_loops): Clean bb->aux at the end.
6023 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6024 Sebastian Pop <sebastian.pop@amd.com>
6026 * lib/target-supports.exp
6027 (check_effective_target_fgraphite): New.
6029 * gcc.dg/graphite/graphite.exp: Early exit when
6030 check_effective_target_fgraphite returns false.
6031 Set dg-do-what-default to compile.
6032 (scan-graphite-dump-times): Removed.
6033 * gfortran.dg/graphite/graphite.exp: Same.
6035 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6036 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6037 * gcc.dg/graphite/scop-1.c: Same.
6038 * gcc.dg/graphite/scop-2.c: Same.
6039 * gcc.dg/graphite/scop-3.c: Same.
6040 * gcc.dg/graphite/scop-4.c: Same.
6041 * gcc.dg/graphite/scop-5.c: Same.
6042 * gcc.dg/graphite/scop-6.c: Same.
6043 * gcc.dg/graphite/scop-7.c: Same.
6044 * gcc.dg/graphite/scop-8.c: Same.
6045 * gcc.dg/graphite/scop-9.c: Same.
6046 * gcc.dg/graphite/scop-10.c: Same.
6047 * gcc.dg/graphite/scop-11.c: Same.
6048 * gcc.dg/graphite/scop-12.c: Same.
6049 * gcc.dg/graphite/scop-13.c: Same.
6050 * gcc.dg/graphite/scop-matmult.c: Same.
6051 * gcc.dg/graphite/scop-14.c: Same.
6052 * gcc.dg/graphite/scop-15.c: Same.
6053 * gcc.dg/graphite/block-0.c: Same.
6054 * gcc.dg/graphite/scop-16.c: Same.
6055 * gcc.dg/graphite/block-1.c: Same.
6056 * gcc.dg/graphite/scop-17.c: Same.
6057 * gcc.dg/graphite/scop-18.c: Same.
6058 * gfortran.dg/graphite/block-1.f90: Same.
6059 * gfortran.dg/graphite/scop-1.f: Same.
6060 * gfortran.dg/graphite/block-2.f: Same.
6062 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6064 * graphite.c: Fix some XXX comments.
6065 (build_scop_dynamic_schedules): Removed.
6067 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6069 * graphite.h (scop_max_loop_depth): Moved...
6070 * graphite.c (scop_max_loop_depth): ...here.
6071 (remove_all_edges_1): New.
6072 (remove_all_edges): Factored code.
6073 (remove_cond_exprs): Check only the last statement for
6074 a GIMPLE_COND expression.
6076 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6078 * graphite.c (scan_tree_for_params): Early return when the
6079 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6080 (find_scop_parameters): Factor out code.
6081 (graphite_trans_bb_strip_mine): Remove dead code.
6083 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6085 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6086 graphite_trans_bb_move_loop): Factor asserts.
6087 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6088 Do not call calculate_dominance_info and estimate_bb_frequencies.
6090 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6092 * graphite.c (create_loops_mapping, free_loops_mapping,
6093 create_loops_mapping_num, debug_loop_mapping_1,
6094 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6095 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6096 graphite_loops_mapping_add_child_num,
6097 graphite_loops_mapping_insert_child,
6098 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6099 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6100 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6101 create_num_from_index, get_num_from_index,
6102 swap_loop_mapped_depth): Removed.
6103 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6104 (free_scop): Do not call free_loops_mapping.
6105 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6106 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6107 get_loop_mapped_depth.
6108 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6109 (graphite_trans_bb_strip_mine): Same.
6110 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6111 (struct scop): Remove field loops_mapping.
6113 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6114 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6116 * graphite.c (scop_record_loop): Factor out one level of the
6117 condition by early return.
6118 (build_scop_loop_nests): Format following FSF coding style.
6119 (build_scop_dynamic_schedules): Factor out code.
6120 (scopdet_bb_info): Reindent. Default case should not be reachable.
6122 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6123 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6125 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6126 assignments that are not handled as simple operands for now.
6128 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6129 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6131 * graphite.c (build_scop_bbs): Factor up code.
6133 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6134 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6136 * graphite.c (stmt_simple_for_scop_p): Factor code out
6138 (enum gbb_type): New. Group all the GBB_* types under it.
6139 (is_loop_exit): Moved...
6140 (end_scop): Enable BB spliting.
6141 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6142 * cfgloop.h (is_loop_exit): Declared.
6144 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6146 * doc/invoke.texi: Remove strides from examples containing
6147 DO loops when the strides are equal to 1.
6149 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6150 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6152 * graphite.c (graphite_trans_scop_block): Or the result with
6153 the result from graphite_trans_loop_block.
6154 * gcc.dg/graphite/block-1.c: New.
6155 * gfortran.dg/graphite/block-1.f90: New.
6156 * gfortran.dg/graphite/block-2.f: New.
6158 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6160 * graphite.c (graphite_transform_loops): Call cloog_initialize
6163 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6165 * tree-data-ref.c) (stmt_simple_memref_p): New.
6166 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6167 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6168 (is_simple_operand): Call stmt_simple_memref_p.
6170 * gcc.dg/graphite/scop-matmult.c: Updated for not
6171 using pointer arithmetic, as this is optimized by PRE and
6172 makes the code too difficult to analyze.
6174 * gcc.dg/graphite/scop-18.c: Same.
6176 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6178 * gdbinit.in (pgg): New.
6180 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6182 * graphite.c (graphite_trans_loop_block): Fix warning.
6184 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6186 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6188 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6190 * graphite.c (graphite_trans_bb_block): Remove check for
6191 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6192 Check if loop blocking is profitable for every loop, before applying
6194 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6195 if flag_loop_block is set.
6197 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6199 * graphite.c: Add some more documentation for the loop
6202 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6204 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6205 * graphite.c: Format on less than 80 columns.
6208 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6210 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6212 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6214 * doc/invoke.texi (floop-block, floop-strip-mine,
6215 floop-interchange): Update documentation with examples.
6217 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6219 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6221 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6223 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6225 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6226 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6227 * tree-scalar-evolution.c: Revert useless changes.
6228 * tree-phinodes.c: Same.
6231 * tree-vectorizer.h: Same.
6232 * tree-flow.h: Same.
6234 * common.opt (fgraphite): Update documentation.
6236 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6238 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6239 -floop-interchange): Add more text for explaining what each of these
6241 * tree-into-ssa.c (gimple_vec): Moved to...
6242 * graphite.c: Include gimple.h.
6243 (gimple_vec): Moved to...
6244 (del_loop_to_cloog_loop): Removed.
6245 (loop_affine_expr): Do not call create_data_ref when the
6246 operand is a constant.
6247 (new_scop): Use free instead of del_loop_to_cloog_loop.
6248 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6249 * gimple.h (gimple_vec): ... here.
6251 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6253 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6255 (build_loop_iteration_domains): Fail, if latch executions unknown.
6257 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6259 * graphite.c (add_conditions_to_domain): New.
6260 (build_scop_conditions_1): Call add_conditions_to_domain.
6261 (set_cloog_options): Allow to disable optimizations.
6263 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6265 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6266 Do not use walk_dominator_tree.
6267 (find_scop_parameters): Do not use walk_dominator_tree.
6269 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6271 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6272 (idx_record_params): Adapt.
6273 * graphite.h (scop_gimple_loop_depth): New.
6275 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6277 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6278 (scan_tree_for_params): Remove value_init.
6279 (build_scop_context): Remove value_init.
6280 (build_loop_iteration_domains): Remove value_init.
6281 (schedule_to_scattering): Remove value_init.
6282 (graphite_trans_bb_strip_mine): Remove value_init.
6284 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6286 * gcc/graphite.c (limit_scops): New.
6287 (graphite_transform_loops): Add limit SCoPs.
6288 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6289 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6290 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6291 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6292 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6293 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6294 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6295 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6296 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6297 Change loop numbers.
6298 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6299 Change loop numbers.
6300 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6301 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6302 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6303 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6304 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6305 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6306 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6307 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6308 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6309 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6311 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6313 * graphite.c (graphite_transform_loops): Call always find_transform.
6315 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6317 * graphite.c (free_loops_mapping): New.
6318 (stmt_simple_for_scop_p): Fix typo.
6319 (stmt_simple_for_scop_p): Fix tuples functions, that
6321 (free_graphite_bb): Fix some memleaks.
6322 (free_scop): Fix some memleaks.
6323 (scopdet_bb_info): Do not forget some tmp SCoPs.
6324 (find_params_in_bb): Fix some memleaks.
6325 (clast_to_gcc_expression): Fix warning.
6327 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6329 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6330 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6332 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6334 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6335 Move code ifdef-ed HAVE_cloog...
6336 * graphite.c: Include toplev.h.
6338 * Makefile.in (OBJS-common): Always build graphite.o.
6339 (BACKEND): Remove @GRAPHITE@.
6340 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6341 (graphite.o): Depend on TOPLEV_H.
6343 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6345 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6346 Remove typo left from polylib to ppl conversion.
6347 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6349 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6351 * toplev.c (process_options): Move the graphite loop optimization
6353 * tree-ssa-loop.c (graphite_transforms): ... here.
6354 When not configured with CLooG, print to dump_file that
6355 Graphite transforms were not performed.
6356 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6358 * gcc.dg/graphite/*.c: Updated all testcases to use
6359 scan-graphite-dump-times.
6361 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6363 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6364 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6366 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6367 Jan Sjodin <jan.sjodin@amd.com>
6369 * configure: Regenerated.
6370 * omp-low.c (expand_omp_sections): Remove now unused code.
6371 * config.in (HAVE_polylib): Removed.
6372 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6373 (PPLLIBS, PPLINC): Added.
6374 * graphite.c: Replace unsigned with int wherever possible.
6375 Don't access Cloog's data structures, but use accessor functions.
6376 Clast's stmt->type is now implemented as a vtable: change the
6377 switches of stmt->type into ifs.
6378 (polylib/polylibgmp.h): Don't include.
6379 (initialize_dependence_polyhedron,
6380 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6381 statement_precedes_p, test_dependence, build_rdg_all_levels,
6382 dump_dependence_graph): Removed until this code is cleaned up
6384 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6385 (POLYLIBINC): Renamed PPLINC.
6387 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6388 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6389 Jan Sjodin <jan.sjodin@amd.com>
6391 Finish the merge and tuplification of graphite.
6393 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6394 Jan Sjodin <jan.sjodin@amd.com>
6396 Partial merge from mainline (138072:138275).
6397 * graphite.c still has to be tuplified.
6399 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6401 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6402 (create_num_from_index): New.
6403 (get_num_from_index): Also pass in the graphite BB.
6404 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6405 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6406 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6407 (is_interchange_valid): Return false when failing.
6408 * graphite.h (struct num_map): New.
6409 (struct graphite_bb): New field num_map.
6410 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6412 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6414 * graphite.c (dump_gbb_conditions): Print also conditions like
6415 "if (a)". Remove dublicated code and use print_generic_expr ().
6416 (stmt_simple_for_scop_p): Only allow conditions we can handle
6419 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6421 * graphite.h (struct scop): Removed new_ivs field.
6422 (SCOP_NEWIVS): Deleted.
6423 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6424 clast_to_gcc_expression, graphite_create_new_loop):
6425 Removed use of new_ivs.
6427 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6429 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6430 create_loops_mapping_num, debug_loop_mapping_1): New.
6431 (debug_loop_mapping): Call debug_loop_mapping_1.
6432 (get_loop_mapping_for_num,
6433 graphite_loops_mapping_add_child,
6434 graphite_loops_mapping_add_child_num,
6435 graphite_loops_mapping_insert_child,
6436 graphite_loops_mapping_parent,
6437 split_loop_mapped_depth_for_num,
6438 loop_mapped_depth_split_loop): New.
6439 (increment_loop_mapped_depths): Removed.
6440 (swap_loop_mapped_depth_for_num): Reimplemented.
6441 (new_scop): Call create_loops_mapping.
6442 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6443 (translate_clast): Pass the old loop father in parameter, and pass
6444 it to get_old_iv_from_ssa_name.
6445 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6446 can_generate_code, can_generate_for_scop): New.
6447 (graphite_trans_bb_block): Returns false when it fails to transform.
6448 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6450 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6452 Reverted all the changes related to the streamization and
6454 These changes are now tracked in the streamization branch.
6456 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6457 Jan Sjodin <jan.sjodin@amd.com>
6459 * graphite.c (gbb_compare): Correctly constify.
6460 (gbb_can_be_ignored): Indent.
6461 (graphite_trans_scop_swap_1and2): Add legality check.
6464 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6466 Remove fallouts from "Reverted the Condate changes".
6467 * tree.h: Remove unused decl.
6468 * gcc.dg/tree-checker: Same.
6469 * timevar.def: Remove counter.
6471 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6473 * Merge from mainline (135673:138072).
6475 Reverted the MIRO changes (from 2008-04-05) that are now
6476 tracked in the miro branch.
6477 * tree-bounds.c: Removed.
6478 * tree-bounds.h: Removed.
6480 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6481 are now tracked in the condate branch.
6482 * tree-check.c: Removed.
6483 * tree-match.c: Removed.
6484 * condate.y: Removed.
6486 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6488 * common.opt: New user flag -floop-block, -floop-strip-mine
6489 and -floop-interchange.
6490 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6491 graphite loop optimization flags is turned on.
6492 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6493 flag_loop_strip_mine and flag_loop_interchange checks before
6495 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6496 -floop-strip-mine and -floop-interchange.
6497 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6499 * gcc.dg/graphite/scop-16.c: Ditto.
6500 * gcc.dg/graphite/scop-17.c: Ditto.
6501 * gcc.dg/graphite/scop-18.c: Ditto.
6503 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6504 Sebastian Pop <sebastian.pop@amd.com>
6506 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6507 (create_empty_loop_on_edge): More fixes.
6508 * tree-phinodes.c (resize_phi_node): Extern.
6509 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6510 * cfghooks.c (update_dominator_information): New split from
6512 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6513 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6514 successor of the function entry block.
6516 * graphite.c: Include pointer-set.h.
6517 (debug_loop_mapping, increment_loop_mapped_depths,
6518 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6519 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6520 swap_loop_mapped_depth_for_num, get_num_from_index,
6521 swap_loop_mapped_depth, loop_iv_stack_debug,
6522 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6523 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6524 get_old_iv_from_ssa_name): New.
6525 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6526 (free_scop): Free SCOP_LOOPS_MAPPING.
6527 (scop_record_loop): Record old ivs.
6528 (create_var_name): Removed.
6529 (initialize_cloog_names): Allocate double space in case strip mine
6530 applies to all loops once.
6531 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6532 (clast_to_gcc_expression): Same. Implement more clast to gimple
6534 (graphite_create_new_loop): Pass in ivstack.
6535 (remove_all_edges): Pass in the construction_edge.
6536 (graphite_remove_iv): Removed.
6537 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6538 remove_cond_exprs): Rewritten.
6539 (move_phi_nodes): New.
6540 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6541 (translate_clast): Pass in ivstack. Rewrite some cases.
6542 (set_cloog_options, debug_clast_stmt): New.
6543 (find_transform): Use set_cloog_options.
6544 (outermost_loop_layer): Removed.
6545 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6546 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6547 mark_old_loops, remove_dead_loops): New.
6549 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6550 (const_column_index, get_first_matching_sign_row_index,
6551 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6552 get_upper_bound): New.
6553 (graphite_trans_bb_strip_mine): Also update the iv map.
6555 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6556 (struct name_tree): Add a loop field.
6557 (struct scop): Add a graphite_loops_mapping field.
6558 (SCOP_LOOPS_MAPPING): New.
6559 (debug_clast_stmt): Declare.
6560 * lambda.h (find_induction_var_from_exit_cond): Declare.
6561 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6562 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6563 (create_empty_loop_on_edge): Updated.
6564 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6565 rename_variables_in_bb): Declare.
6566 * tree-cfg.c (remove_bb): Extern.
6568 * gcc.dg/graphite/block-0.c: New.
6570 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6571 Sebastian Pop <sebastian.pop@amd.com>
6573 * graphite.c (strip_mine_profitable_p): New.
6574 (graphite_trans_bb_block): Disable strip mining if not profitable.
6576 * gcc.dg/graphite/scop-18.c: New.
6577 * gcc.dg/graphite/scop-17.c: Fixed.
6578 * gcc.dg/graphite/scop-16.c: Fixed.
6580 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6581 Jan Sjodin <jan.sjodin@amd.com>
6582 Sebastian Pop <sebastian.pop@amd.com>
6584 * graphite.c (is_interchange_valid): New.
6585 (graphite_trans_bb_block): Check loop nest of basic block for legality
6588 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6589 outer_most_loop, gbb_outer_most_loop_index): New.
6591 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6592 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6593 * gcc.dg/graphite/scop-16.c: New.
6594 * gcc.dg/graphite/scop-17.c: New.
6596 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6598 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6599 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6601 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6603 * graphite.c (new_scop): Initialize SCOP_EXIT.
6604 (scopdet_info): Add.
6605 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6606 (build_scops_1): Cleanup, bugfixes.
6607 (build_scops): Cleanup.
6609 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6610 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6612 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6614 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6616 * gfortran.dg/graphite/graphite.exp: Use
6617 DEFAULT_GRAPHITE_FLAGS.
6619 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6621 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6623 * graphite.c (scan_tree_for_params): Do not assert any more if
6624 MULT_EXPR parameter is negative.
6626 * gfortran.dg/graphite/scop-1.f: New.
6628 * gfortran.dg/graphite/graphite.exp: New.
6630 * gcc.dg/graphite/scop-15.c: New.
6632 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6634 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6636 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6638 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6639 graphite_swap_loops.
6640 (graphite_trans_bb_move_loop): New.
6641 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6642 (graphite_trans_bb_block): New.
6643 (graphite_trans_loop_block): New.
6644 (graphite_trans_scop_swap_1and2): Rename from
6645 graphite_trans_swap_1and2.
6646 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6647 (graphite_trans_scop_block): New.
6648 (graphite_apply_transformations): Rename from
6649 graphite_transformations.
6651 * gcc.dg/graphite/scop-matmult.c: New.
6653 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6655 * graphite.c (gbb_compare): New.
6656 (graphite_sort_gbbs): New.
6657 (gbb_can_be_ignored): New.
6658 (scop_remove_ignoreable_gbbs): New.
6659 (graphite_transformations): Cleanup and add
6660 scop_remove_ignoreable_gbbs.
6661 * lambda.h (lambda_vector_compare): New.
6663 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6665 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6666 (graphite_swap_loops): int -> unsigned
6667 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6668 (graphite_transformations): New.
6669 (graphite_transform_loops): Move to graphite_transformations.
6670 * graphite.h (gbb_nb_loops): Return unsigned.
6672 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6674 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6675 the domain matrix. This makes scop-0.c work again.
6677 2008-06-20 Richard Guenther <rguenther@suse.de>
6679 * graphite.h: Adjust copyright to GPLv3.
6680 * graphite.c: Likewise.
6681 (stmt_simple_memref_for_scop_p): Split out from ...
6682 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6684 (get_bb_type): Optimize.
6686 (is_bb_addable): Fix memleak, replace is_pred call with
6688 (build_scops): Use current_loops.
6689 (param_index): Fix memleak.
6691 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6693 * graphite.c: Fix formatting.
6695 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6697 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6698 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6699 (create_var_name, save_var_name): Newly defined functions.
6700 (initialize_cloog_names): Part of the code factored out to
6702 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6703 in clast_reduction statement.
6704 (graphite_create_new_loop): Now takes a new parameter
6706 (translate_clast): Now also takes the context_loop and bb_exit
6707 parameters. Rewritten the code so that it creates a gimple code
6708 inside the given context.
6709 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6710 remove_cond_expr, disconnect_cond_expr,
6711 disconnect_virtual_phi_nodes): Newly defined functions.
6712 * graphite.h (struct scop): added old_ivs vector.
6713 SCOP_OLDIVS: New macro.
6715 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6717 * cfgloopmanip.c: Add missing function comments, fix formatting.
6719 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6721 * cfgloopmanip.c (update_dominators_in_loop): Defined.
6722 (create_empty_loop_on_edge): Defined.
6723 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
6725 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
6726 (update_dominators_in_loop): Declared as extern
6727 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
6729 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
6731 * graphite.c (print_graphite_bb): Allow changing number of loops
6733 (initialize_cloog_names): Allow changing number of loops.
6734 (build_cloog_prog): Simplify.
6735 (find_transform): Enable cloog option --strides.
6736 (graphite_swap_loops): New.
6737 (graphite_strip_mine_loop): New.
6738 (graphite_trans_swap_1and2): New.
6739 (graphite_trans_strip): New.
6740 (graphite_transform_loops): Add graphite_trans_strip.
6741 * graphite.h (scop_max_loop_depth): New.
6743 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6745 * graphite.c (build_scop_iteration_domain): Remove forgotten
6746 line. (Fixes compile)
6748 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6750 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
6751 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
6752 (build_bb_loops): New.
6753 (graphite_transform_loops): Add build_bb_loops.
6754 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
6756 * graphite.h (graphite_bb): Add loops.
6757 (gbb_nb_loops): New.
6758 (gbb_loop_at_index): New.
6759 (gbb_loop_index): New.
6760 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
6761 using nb_params_in_scop.
6763 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6765 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
6766 (build_scop_canonical_schedules): Build minimized schedule.
6767 (schedule_to_scattering): Adapt to minimized schedule.
6768 * graphite.h (graphite_bb): Add/Update descriptions.
6770 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
6771 Tobias Grosser <grosser@fim.uni-passau.de>
6773 * graphite.c (print_graphite_bb): Add condition printing.
6775 (dump_gbb_conditions): New.
6776 (build_scop_conditions_1): New.
6777 (build_scop_conditions): New.
6778 * graphite.h (graphite_bb): Add conditions.
6780 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6782 * graphite.c (print_graphite_bb):
6783 (free_graphite_bb): New.
6784 (free_scop): Free bbs.
6785 (get_bb_type): Free doms.
6786 (build_scop_context): Free context matrix.
6787 (build_loop_iteration_domains): Remove unused code.
6788 (build_cloog_prog): Free scattering function and blocklist.
6789 (find_transform): Free options.
6791 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
6793 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
6794 Remove unnecessery cloog data structures. Make a copy of the domain
6795 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
6796 unnecessary cloog data structures. Fix memory leaks. Remove insert
6797 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
6799 (build_scop_iteration_domain): Remove unnecessary cloog
6800 data structures. Fix memory leaks.
6801 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
6802 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
6804 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6806 * graphite.c (find_scop_params): Remove initialize_cloog_names.
6808 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6810 * graphite.c (end_scop): Style fix.
6811 (schedule_to_scattering): Style and comment fix.
6813 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6814 * graphite.c (print_graphite_bb): Fix definiton of
6815 schedule_to_scattering.
6816 (initialize_cloog_names): Change nb_scattdims to max loop
6818 (schedule_to_scattering): Take parameter for number of scattering
6820 (build_cloog_prog): Only build as much scattering dimensions as
6823 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6825 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
6826 in polyhedron/aermod.f90.
6828 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
6829 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6830 Harsha Jagasia <harsha.jagasia@amd.com>
6832 * graphite.c (is_bb_addable): Fix segfault.
6834 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
6836 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
6837 with multiple exits and conditional handling in edge cases.
6838 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
6840 * gcc.dg/graphite/scop-14.c: New.
6842 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
6843 Adrien Eliche <aeliche@isty.uvsq.fr>
6845 * graphite.c (is_bb_addable): Add more comments and enhance
6846 readablity of the source code. Fix memory leak.
6847 (is_loop_exit): Fix memory leak.
6849 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6851 * graphite.c (first_loop_in_scop): Deleted.
6852 (setup_cloog_loop): Only walk the loop chain for inner loops.
6853 (build_scop_iteration_domain): Execute setup_cloog_loop for
6854 all loops in the first layer.
6856 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6858 * graphite.c (scan_tree_for_params): Change the way params are
6859 added to be indepenent of the number of loops.
6860 (setup_cloog_loop): Revert to short matrix format. Fix parameter
6862 (build_cloog_prog): Revert to short matrix format.
6864 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6865 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6867 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
6870 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6872 * graphite.c (nb_data_refs_in_scop): New.
6873 (graphite_transform_loops): Print more stats: number of
6874 loops, basic blocks and data references per scop.
6876 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6877 Jan Sjodin <jan.sjodin@amd.com>
6879 * graphite.c (loop_affine_expr, idx_record_params,
6880 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
6881 instead of instantiate_parameters.
6883 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6885 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
6886 add support for parameters, add STATIC_SCHEDULE at the right places,
6889 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6891 * graphite.c (build_scop_loop_nests): Only add the loops, that
6892 are contained completely in the SCoP.
6893 (build_cloog_prog): Disable scattering, until schedule_to_scattering
6894 and the domains are fixed.
6895 (build_scop_canonical_schedules): Add support for bbs not contained
6898 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6900 * graphite.h (scop_contains_loop): Update comments to match
6901 the actual behavior.
6902 (scop_contains_loop): New.
6903 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
6905 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6907 * graphite.c (get_bb_type): On function body, i.e. loop_0,
6908 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
6911 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6912 Tobias Grosser <grosser@fim.uni-passau.de>
6914 * graphite.c (graphite_transform_loops): Early return when
6915 there are no loops in the function.
6917 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6918 Jan Sjodin <jan.sjodin@amd.com>
6920 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
6921 offset of the last loop.
6922 (setup_cloog_loop): Copy the entire outer constraint matrix.
6924 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6925 Jan Sjodin <jan.sjodin@amd.com>
6927 * graphite.c (stmt_in_scop_p, function_parameter_p,
6928 invariant_in_scop_p): Removed.
6929 (scan_tree_for_params): Can be used with no constraint
6930 matrix for gathering parameters.
6931 (idx_record_params): Don't use idx_record_param, instead use
6932 scan_tree_for_params.
6933 (find_scop_parameters): Same.
6934 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
6935 Fix the size of loop domains.
6936 (schedule_to_scattering): Exit when the outer loop is not in scop.
6937 (find_transform): Enable build_cloog_prog.
6939 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6940 Jan Sjodin <jan.sjodin@amd.com>
6942 * graphite.c (schedule_to_scattering): Make scattering domains
6943 uniformly of the same size, as required by CLooG 0.14.0 and before.
6945 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6946 Jan Sjodin <jan.sjodin@amd.com>
6948 * graphite.c (schedule_to_scattering): Rewrite, correct the
6949 translation of the scheduling function to scattering.
6950 (build_cloog_prog): Call schedule_to_scattering only once.
6951 * graphite.h (scop_loop_index): Do not fail for loops not
6952 in the scop: return -1.
6954 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
6956 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
6957 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
6958 (setup_cloog_loop): Export GBB_DOMAIN.
6959 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
6960 able to rebuild the original control flow.
6961 * graphite.h (graphite_bb): Add domain field and access macro.
6964 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6966 * graphite.c (debug_gbb): New.
6967 (print_scop, build_graphite_bb): Use SCOP_BBS.
6968 (build_scop_bbs): Reimplemented.
6969 (dfs_bb_in_scop_p): Removed.
6970 (build_scop_loop_nests): Reorder loops inserted in
6971 SCOP_LOOP_NEST: outer loops should come first.
6972 (build_scop_canonical_schedules): Reinitialize at zero
6973 the components of the SCOP_STATIC_SCHEDULE for the loops
6974 that have already been parsed.
6976 * graphite.h (debug_gbb): Declared.
6978 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6979 Jan Sjodin <jan.sjodin@amd.com>
6981 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
6982 (graphite_loop_to_gcc_loop): Removed.
6983 (remove_all_edges): New.
6984 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
6985 (gloog): Remove useless code.
6987 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6989 * graphite.c (get_bb_type): Reworked. We distinguish between
6990 loops with one or multiple exits.
6991 (is_loop_exit): New.
6993 (is_bb_addable): Rework condition handling, now support for case
6994 case statements and loops with multiple exits.
6996 * gcc.dg/graphite/scop-11.c: New.
6997 * gcc.dg/graphite/scop-12.c: New.
6998 * gcc.dg/graphite/scop-13.c: New.
7000 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7002 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7003 we have too many colors.
7005 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7007 * doc/invoke.texi (-ftree-loop-fusion): Document.
7008 * tree-pass.h (pass_loop_fusion): Declared.
7009 * tree-loop-fusion.c: New.
7010 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7011 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7012 * tree-data-ref.h (find_data_references_in_loop): Declared.
7013 * common.opt (ftree-loop-fusion): Declared.
7014 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7016 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7018 * graphite.c (build_access_matrix): Fix typo from the merge.
7020 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7022 * Merge from mainline (130800:135673).
7024 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7026 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7027 Update dominators after splitting.
7029 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7031 * graphite.c (is_bb_addable): Return the harmful statement.
7032 Factor up some code.
7033 (end_scop): New. Splits end of scope bbs on a harmful statement.
7034 (build_scops_1): Call end_scop.
7036 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7038 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7039 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7040 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7041 build_scops_1): Removed.
7042 (build_scops_2): Renamed build_scops_1.
7044 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7046 * graphite.c: Fix formatting.
7048 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7050 * graphite.c (get_bb_type): New.
7052 (build_scops_2): New.
7053 (is_bb_addable): New.
7054 (build_scops): Switch the scop detection.
7055 (build_scop_bbs): Add entry bb to scop.
7056 * graphite.h (struct scop): Update comment.
7058 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7060 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7063 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7065 * gcc.dg/graphite/scop-1.c: Update.
7066 * gcc.dg/graphite/scop-2.c: Update.
7067 * gcc.dg/graphite/scop-4.c: Update.
7068 * gcc.dg/graphite/scop-5.c: Add.
7069 * gcc.dg/graphite/scop-6.c: Add.
7071 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7073 * gcc.dg/graphite/scop-0.c: Add.
7074 * gcc.dg/graphite/scop-7.c: Add.
7075 * gcc.dg/graphite/scop-8.c: Add.
7076 * gcc.dg/graphite/scop-9.c: Add.
7077 * gcc.dg/graphite/scop-10.c: Add.
7079 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7081 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7082 Check affine expressions depending on the outermost loop
7084 (stmt_simple_for_scop_p): Same.
7085 (harmfule_stmt_in_scop): Same.
7087 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7089 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7090 mark entry and exit, that are not part of the SCoP and update HTML
7093 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7095 * graphite.c (basic_block_simple_for_scop_p): Renamed
7097 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7098 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7099 (all_preds_visited_p, all_succs_visited_p,
7100 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7101 scop_end_loop): New.
7102 (build_scops): Do not use dfs_enumerate_from.
7104 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7106 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7108 * graphite.c: Add comments to functions that are missing a
7110 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7112 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7114 * graphite.c (nb_params_in_scop): Moved...
7115 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7116 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7117 (clast_to_gcc_expression): Reduce column size to less than 80.
7118 (graphite_create_iv): Return the new name of the IV.
7119 (find_transform): Set options->esp and options->cpp.
7120 (gloog): Comment out the invalidation of the old loop code.
7121 (initialize_dependence_polyhedron): Replace scop_nb_params with
7124 * graphite.h (nb_params_in_scop): ... here.
7125 (scop_nb_params): Removed.
7126 (loop_domain_dim): Return something even when the loop was not
7127 found in the hash table: avoid ICEing on all the graphite.exp
7130 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7132 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7134 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7135 according to nesting level.
7136 (find_scop_parameters): Call instantiate_parameters.
7137 (scan_tree_for_params): Extend it to handle general affine bounds.
7138 Inner loop bound can depend on outer loop induction variable.
7139 (setup_cloog_loop): tmp variable is allocated on stack. Call
7140 instantiate_parameters with respect to outermost_loop_in_scop.
7141 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7143 (create_empty_loop): Function loopify should be given edge
7144 probability, instead of edge frequency. Dominance relation from
7145 switch_bb to loop_header.
7146 (clast_to_gcc_expression): Added handling of clast_reduction node.
7147 (gloog): New functionality for removing old loop.
7148 (test_dependence): Factored out from build_rdg_all_levels.
7149 (build_rdg_all_levels): Dependence testing factored out to
7150 test_dependence function.
7152 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7153 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7156 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7158 * graphite.c (free_scop, param_index, initialize_cloog_names,
7159 nb_params_in_scop): Use name_tree map instead of just a tree
7160 for keeping track of the variable name associated to that tree.
7161 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7162 clast_to_gcc_expression, graphite_create_iv,
7163 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7164 graphite_stmt_to_gcc_stmt): New.
7165 (gloog): Call these.
7166 * graphite.h (struct name_tree): New.
7167 (struct scop): Use name_tree instead of tree for params.
7168 Store a vector of name_tree for new_ivs.
7170 (scop_nb_params): Use name_tree instead of tree.
7172 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7173 Sebastian Pop <sebastian.pop@amd.com>
7175 * tree-bounds.c: New.
7176 * tree-bounds.h: New.
7177 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7178 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7179 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7183 * c-cppbuiltin.c: Same.
7187 * tree-outof-ssa.c: Same.
7189 * Makefile.in: Same.
7191 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7192 Sebastian Pop <sebastian.pop@amd.com>
7194 * tree-loop-distribution.c (remaining_stmts,
7195 upstream_mem_writes): Removed static variables.
7196 (copy_loop_before, create_bb_after_loop,
7197 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7198 rdg_build_components, rdg_build_partitions,
7199 dump_rdg_partitions): Extern.
7200 (generate_loops_for_partition, generate_code_for_partition): Do not
7202 (already_processed_vertex_p, predecessor_has_mem_write,
7203 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7204 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7205 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7206 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7207 Pass remaining_stmts and upstream_mem_writes as parameters.
7208 (rdg_component): Moved...
7209 (build_rdg_partition_for_component): Do not aggregate components when
7210 flag_streamize_loops is set.
7211 (gen_sequential_loops): New.
7212 (ldist_gen): Call gen_sequential_loops.
7214 * tree-pass.h (pass_loop_streamization): Declared.
7216 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7217 basic blocks when loops structures exist.
7219 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7221 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7223 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7224 eliminate_local_variables_stmt, eliminate_local_variables,
7225 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7226 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7227 of code delimited by two edges in the CFG.
7228 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7229 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7230 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7231 the case of parallelisation of reductions.
7232 (create_loop_fn): Extern.
7233 (create_omp_parallel_region): New.
7235 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7236 dump_data_reference for printing dra and drb.
7237 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7239 (build_rdg): Don't call free_dependence_relations for the moment, as
7240 we attach dependence relations on each edge of the RDG.
7243 * tree-data-ref.h (rdg_component): ...here.
7244 (struct rdg_edge): New field ddr_p relation.
7245 (RDGE_RELATION): New.
7246 (create_bb_after_loop, copy_loop_before,
7247 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7248 rdg_build_partitions, dump_rdg_partitions,
7249 free_rdg_components): Declared.
7251 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7252 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7254 * tree-loop-streamization.c: New.
7256 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7257 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7259 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7261 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7263 * passes.c: Schedule pass_loop_streamization.
7265 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7267 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7270 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7272 * graphite.c (dot_all_scops): Update formatting.
7273 Bbs can now be part of more than one SCoP.
7275 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7277 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7279 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7280 * graphite.h (loop_to_cloog_loop): New.
7282 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7284 * graphite.c (loop_domain_dim, ref_nb_loops,
7285 loop_iteration_vector_dim): New.
7286 (build_access_matrix_with_af, build_access_matrix,
7287 initialize_dependence_polyhedron): Fixed for new matrix layout.
7288 No longer assume that all iteration domains are of the same
7291 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7293 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7294 defined in a loop at depth 0 is invariant.
7295 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7296 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7297 be called at loop depth 0.
7299 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7301 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7302 (down_open_scop): Removed.
7303 (loop_in_scop_p): Redefined.
7304 (scop_affine_expr): New argument: scop.
7305 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7306 a harmful statement ending a scop.
7307 (basic_block_simple_for_scop_p): New argument: scop.
7308 (get_loop_start): Removed.
7309 (new_scop): Initialize SCOP_LOOPS.
7310 (free_scop): Free SCOP_LOOPS.
7311 (succs_at_same_depth, preds_at_same_depth): New.
7312 (end_scop): Test the validity of a scop.
7313 (add_dominators_to_open_scops): New.
7314 (test_for_scop_bound): Call add_dominators_to_open_scops.
7315 Add cases for opening and closing multiple scops.
7316 (build_scops, build_scop_bbs): Iterate over basic blocks in
7318 (build_graphite_bb): Pass scop directly.
7319 (dfs_bb_in_scop_p): New.
7320 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7322 (nb_loops_around_gb): Use loop_in_scop_p.
7323 (schedule_to_scattering): Disabled for the moment the code computing
7324 the "textual order for outer loop".
7326 * graphite.h (struct scop): New field loops.
7328 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7330 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7332 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7333 Sebastian Pop <sebastian.pop@amd.com>
7335 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7336 * common.opt (fstreamize-loops): New.
7337 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7338 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7339 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7340 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7342 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7344 * tree-data-ref.c (build_empty_rdg): New.
7345 (build_rdg): Use it.
7346 * tree-data-ref.h (build_empty_rdg): Declared.
7347 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7348 (find_vertex_for_stmt): Removed.
7349 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7351 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7353 * tree-loop-distribution.c (generate_builtin): After cancelling the
7354 loop tree, also delete basic blocks.
7355 (rdg_flag_uses): Stop recursion when a vertex has already been
7358 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7360 * graphite.c (build_scop_alpha): Removed.
7361 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7362 and dump_dependence_graph to avoid compiler warnings.
7364 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7366 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7367 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7368 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7369 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7370 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7371 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7372 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7373 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7374 dump_dependence_graph): New.
7375 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7377 (struct scop): New field loop2cloog_loop.
7378 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7379 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7381 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7383 * graphite.c (build_graphite_bb): Fix initialization
7384 of the graphite basic block.
7386 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7388 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7389 loop domain matrix. Pass in the number of loops contained in the
7391 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7392 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7393 loops that are not surrounding the current loop are not represented
7394 in the domain constraint matrix.
7395 (build_scop_iteration_domain): Initial domain constraint matrix
7396 contains only the eq/ineq, cst, and scop parameters columns.
7398 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7400 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7401 (print_graphite_bb): Print scattering.
7403 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7405 * graphite.c (initialize_cloog_names): Initialize names of
7406 scattering variables.
7408 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7410 * graphite.c (dot_all_scops_1): Disable debug output while
7413 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7415 * graphite.c (find_transform): Change cloog output language to C.
7417 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7419 * tree-loop-distribution.c (generate_memset_zero,
7420 generate_builtin, generate_code_for_partition,
7421 rdg_flag_all_uses): New.
7422 (rdg_flag_uses): Gather in the same partition the statements defining
7423 the VUSES of the current statement.
7424 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7425 Gather in the same partition not only the stores to the same memory
7426 access, but also the reads.
7427 (ldist_generate_loops): Renamed ldist_gen.
7429 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7430 Tobias Grosser <grosser@fmi.uni-passau.de>
7432 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7433 next pointer, don't use the inner pointer.
7435 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7437 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7438 (find_transform): Call dot_all_1.
7439 * graphite.h (dot_all_scops): Declared.
7441 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7443 * tree-loop-distribution.c: Fix apsi.f ICE.
7444 (create_bb_after_loop): New.
7445 (generate_loops_for_partition): Use it.
7446 * gfortran.dg/ldist-1.f90: New.
7448 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7449 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7451 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7453 * graphite.c (find_transform): Dump cloog program sent to cloog.
7455 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7457 * graphite.c (initialize_cloog_names): Initialize cloog
7460 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7462 * graphite.c (build_scop_context): Fix typo, for the matrix
7463 format: insert '0 >= 0' instead of '-1 >= 0'.
7465 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7467 * Fix merge problems.
7469 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7471 * graphite.c (setup_cloog_loop): Fix typo.
7473 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7475 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7476 * tree-loop-distribution.c: Reimplemented.
7477 * tree-pass.h (pass_loop_distribution): New.
7478 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7480 * graphds.h (struct graph): New field indexes.
7481 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7483 * tree-vect-analyze.c: Remove declaration of static functions when not
7485 * tree-vectorizer.c: Same.
7486 (rename_variables_in_loop): Now extern.
7487 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7488 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7489 calling redirect_edge_and_branch_force.
7491 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7493 * tree-data-ref.c: Don't include tree-chrec.h.
7494 (debug_data_dependence_relations): New.
7495 (dump_data_dependence_relation): Call dump_data_reference on data refs
7497 (same_access_functions): Moved...
7498 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7499 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7500 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7501 struct rdg_vertex_info, ): New.
7502 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7504 (create_rdg_vertices): Initialize the htab of graph->indexes.
7505 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7506 (stmts_from_loop): Don't save LABEL_EXPR.
7507 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7508 hash_stmt_vertex_del): New.
7509 (build_rdg): Initialize rdg->indexes.
7510 (free_rdg, stores_from_loop, ref_base_address,
7511 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7512 have_similar_memory_accesses_1, ref_base_address_1,
7513 remove_similar_memory_refs): New.
7515 * tree-data-ref.h: Include tree-chrec.h.
7516 (debug_data_dependence_relations): Declared.
7517 (same_access_functions): ...here. Now static inline.
7518 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7519 ddr_dependence_level): New.
7520 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7521 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7522 RDG_MEM_READS_STMT): New.
7523 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7524 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7525 rdg_vertex_for_stmt): Declared.
7526 (struct rdg_edge): New field level.
7527 (RDGE_LEVEL, free_rdg): New.
7528 (stores_from_loop, remove_similar_memory_refs,
7529 rdg_defs_used_in_other_loops_p,
7530 have_similar_memory_accesses): Declared.
7531 (rdg_has_similar_memory_accesses): New.
7533 * lambda.h (dependence_level): New.
7534 * common.opt (ftree-loop-distribution): New.
7535 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7536 (print_loop_ir): Renamed print_loops.
7537 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7538 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7539 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7540 (tree-loop-distribution.o): Added.
7541 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7542 (mark_virtual_ops_in_bb): New.
7543 (print_loops_bb, debug_loop_num, debug_loop): New.
7544 * passes.c: Scheduled pass_loop_distribution.
7546 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7548 * graphite.c (scan_tree_for_params): Correct the number of columns
7550 (nb_flat_iterator): New.
7551 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7552 (build_scop_iteration_domain): Correct the number of columns for
7555 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7557 * Merge from mainline (129697:130800).
7559 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7561 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7562 dominated by SCoP's exit.
7563 (graphite_transform_loops): Compute post dominators.
7565 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7567 * Merge from mainline (127169:129697).
7569 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7571 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7572 parameter for the basic block that contains the expression. Use
7573 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7574 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7576 * graphite.h (gbb_loop): New.
7577 (GBB_LOOP): Removed.
7579 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7581 * Makefile.in: Fix merge problem.
7583 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7585 * Merge from mainline (125309:127169).
7586 * tree-loop-distribution.c: Disabled.
7588 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7590 * Merge from mainline (r123693:125309).
7592 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7594 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7596 (correct_modify_p, check_statements, number_of_lvalue_uses,
7597 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7598 instead of MODIFY_EXPR.
7599 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7602 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7604 * tree-loop-distribution.c (struct rdg): Replace arrays by
7605 VECs for edges and vertices.
7606 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7607 (RDGV_NB_PARTITIONS): New.
7608 (PRDG_NBV, PRDG_NBE): Removed.
7609 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7610 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7611 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7613 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7614 Sebastian Pop <sebpop@gmail.com>
7616 * doc/invoke.texi (-ftree-loop-distribution): Document.
7617 * tree-loop-distribution.c: New file.
7618 * tree-pass.h (pass_loop_distribution): Declared.
7619 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7620 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7622 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7623 (DDR_REVERSED_P): New.
7624 * common.opt (-ftree-loop-distribution): New.
7625 * tree-flow.h (distribute_loops): Declared.
7626 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7627 * passes.c (init_optimization_passes): Schedule loop distribution.
7629 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7631 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7632 (print_scop): Don't print when scop is NULL.
7633 (build_scop_context, find_transform): Don't output to stderr.
7635 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7637 * tree-data-ref.c: Don't include graphite.h.
7638 Comment out the code for printing data reference's scop.
7639 (build_access_matrix_with_af): Moved...
7640 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7641 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7642 (print_graphite_bb): Print basic block's schedule.
7643 (print_scop): Don't print the schedule, call cloog's pretty printer.
7644 (bb_in_scop_p): A basic block is in a scop only if it is both
7645 dominated and postdominated by the scop's entry and exit basic blocks.
7646 (function_parameter_p): New.
7647 (invariant_in_scop_p): Use function_parameter_p.
7648 (new_scop, save_scop): New.
7649 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7651 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7652 (loop_in_scop_p): New.
7653 (scop_record_loop): Use loop_in_scop_p.
7654 (build_scop_domain): Renamed build_scop_iteration_domain.
7655 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7656 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7657 setup_cloog_loop, dot_scop_1, dot_scop): New.
7658 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7659 (struct scop): Add a pointer to cloog's representation of a program.
7661 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7663 * doc/invoke.texi (-ftree-check-verbose): Renamed
7664 -ftree-checks-verbose.
7665 * common.opt (flag_tree_check_verbose): Renamed
7666 flag_tree_checks_verbose.
7667 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7669 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7671 * configure: Regenerated.
7672 * config.in: Regenerated.
7673 * tree-ssa-loop.c (graphite_transforms): Execute
7674 graphite_transform_loops only when HAVE_cloog.
7675 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7676 * graphite.c: Include polylibgmp.h and cloog.h.
7677 (graphite_transform_loops): Removed loops parameter.
7678 * tree-flow.h (graphite_transform_loops): Update declaration.
7679 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7680 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7681 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7682 (OBJS-common): Remove dependence on graphite.o.
7683 (BACKEND): Depend on @GRAPHITE@.
7685 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7687 * doc/invoke.texi (-ftree-check-verbose): Documented.
7688 * gcc.dg/tree-checker/tree-checks-1.c: New.
7689 * gcc.dg/tree-checker/tree-checks-2.c: New.
7690 * gcc.dg/tree-checker/tree-checks-3.c: New.
7691 * gcc.dg/tree-checker/tree-checks-4.c: New.
7692 * gcc.dg/tree-checker/tree-checks.exp: New.
7693 * gcc.dg/tree-checker/condates.crp: New.
7694 * common.opt (ftree-checks-verbose): New.
7695 * tree-check.c (tree_check_warning): Move extra stderr output
7696 under control of flag_tree_check_verbose.
7698 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7700 * tree-match.c: Fix comments formatting.
7701 * tree-match.h: Fix comments formatting.
7702 * tree-check.c: Fix comments formatting.
7703 (tree_check_init): Restructure.
7705 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7707 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7709 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7711 * Merge from mainline (r120733:123693).
7713 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7715 * condate.y: New file.
7716 * tree-match.h (struct patt_info_s): New field sign.
7717 (struct condate_s): New field msg.
7718 (normalize_condate, name_condate, add_condate): New.
7719 (conds[], condate_parse): Made extern.
7720 * tree-check.c (tree_check_warning): First arg changed to cond;
7721 warning reformatted.
7722 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
7724 (tree_check): Process trivial condates.
7725 (read_delimited_string): Removed.
7726 (print_cond): Print name and msg.
7727 (conds[]): Made extern.
7728 (parse_tree_check_file_once): Rewritten to use the parser in
7730 Processing of option --tree_check_string moved to tree_scan().
7731 * Makefile.in: Added condate.y
7733 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
7735 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
7736 Use VECs instead of varrays.
7737 * diagnostic.h (lazy_dump_generic_node): Update declaration.
7738 * Makefile.in (pretty-print.o): Depend on vec.h.
7739 * pretty-print.c: Include tree.h and vec.h.
7740 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
7741 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
7742 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
7743 pp_free_list): Use VECs instead of varrays.
7744 * pretty-print.h: Do not include varray.h.
7745 (struct tree_chunk_s): Declaration moved before its use.
7746 (output_buffer): Rename varray field to chunks.
7747 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
7748 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
7749 save_global_holes): Use VECs instead of varrays.
7750 * tree-match.h: Declare VECs of cfg_node, and hole_p.
7751 * tree-check.c (scan_cfg_stmts, push_node,
7752 print_matching_stmt): Removed.
7753 (tree_check_instance, push_global_holes_if_new, tree_check,
7754 execute_tree_check): Use VECs instead of varrays.
7755 (gate_tree_check): Don't execute the CFG check when basic_block_info
7758 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7760 * Merge from mainline (r115016:120733).
7762 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7764 * Merge from mainline (r117632:117661).
7766 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7768 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
7769 * tree-pass.h (TDF_DEBUG, debug_p): New.
7770 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
7771 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
7772 get_loop_exit_condition, analyze_evolution_in_loop,
7773 analyze_initial_condition, analyze_scalar_evolution,
7774 instantiate_parameters, number_of_latch_executions): Use debug_p.
7775 * tree-chrec.c (chrec_apply): Use debug_p.
7776 * tree-data-ref.c: Include graphite.h.
7777 (dump_data_reference): Print also the access matrix.
7778 (analyze_array, analyze_indirect_ref, init_data_ref,
7779 analyze_offset_expr, address_analysis, object_analysis,
7780 create_data_ref, finalize_ddr_dependent,
7781 non_affine_dependence_relation, analyze_ziv_subscript,
7782 analyze_siv_subscript_cst_affine,
7783 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
7784 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
7785 analyze_miv_subscript, analyze_overlapping_iterations,
7786 build_classic_dist_vector, subscript_dependence_tester,
7787 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
7788 (build_access_matrix_with_af): No longer static.
7789 * tree-data-ref.h (scop_p): ... declaration here.
7790 (data_reference.scop): New field.
7791 (DR_SCOP, DR_ACCESS_MATRIX): New.
7792 (build_access_matrix_with_af, dr_num_subscripts): Declared.
7793 * graphite.c (print_graphite_bb): Call dump_data_references.
7794 (print_scop): Use scop_nb_loops and scop_dim_domain.
7795 (test_for_scop_bound): Use debug_p.
7796 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
7798 (scop_loop_index): Moved...
7799 (scop_record_loop): New.
7800 (build_scop_loop_nests): Use scop_record_loop.
7801 (build_scop_domain): Use scop_dim_domain.
7802 (build_access_matrix): Implemented.
7803 (build_scop_canonical_schedules): Use scop_nb_loops.
7804 (build_graphite_bb): Initialize GBB_SCOP.
7805 * graphite.h (scop_p): Moved...
7806 (graphite_bb.scop): New field.
7807 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
7808 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
7809 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
7810 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
7811 scop_loop_index): New.
7812 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
7814 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
7816 * Merge from mainline (r117661:120450).
7818 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
7820 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
7821 at the first declaration outside the varying loop, instantiate as
7823 * tree-chrec.c (for_each_scev_op): New.
7824 * tree-chrec.h (for_each_scev_op): Declared.
7825 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
7826 * tree-data-ref.c (get_references_in_stmt,
7827 find_data_references_in_stmt): New, from trunk.
7828 (find_data_references_in_loop): Use get_references_in_stmt
7829 and find_data_references_in_loop, modified as in trunk.
7830 (build_access_matrix_with_af): New.
7831 * tree-data-ref.h (data_reference): Add a field access_matrix.
7832 (data_ref_loc): New, as in trunk.
7833 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
7834 invariant_in_scop_p, param_index, scan_tree_for_params,
7835 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
7836 idx_record_param, idx_record_params, build_access_matrix,
7837 build_scop_data_accesses, build_scop_canonical_schedules,
7838 build_graphite_bb, build_scop_bbs, find_params_in_bb,
7839 build_scop_params): New.
7840 * graphite.h (graphite_bb): New.
7841 (scop): Add fields static_schedule, params, loop_nest,
7843 * lambda.h: Declare vecs of lambda_matrix.
7844 * tree-flow.h (print_loop_ir_bb): Declared.
7845 * tree-cfg.c (print_loop_ir_bb): New.
7846 (print_loop): Use print_loop_ir_bb.
7848 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
7850 * Merge from mainline (r115016:117632).
7852 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
7854 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
7855 break due to a warning.
7857 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
7859 * graphite.c (print_scops, debug_scops): New.
7860 (graphite_transform): Renamed graphite_find_transform.
7861 * graphite.h (debug_scops): Declared.
7863 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
7865 * tree-match.c: Reformat following the GNU style.
7866 * tree-match.h: Reformat following the GNU style.
7867 * tree-pattern.h: Removed empty file.
7868 * Makefile.in: Remove references to tree-pattern.h.
7869 * tree-check.c: Reformat following the GNU style.
7870 (execute_tree_check): Move gate condition code to...
7871 (gate_tree_check): ...here. New function.
7872 (pass_check): Use the gate function.
7874 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
7876 * tree-pattern.h: New. Tree pattern matching and checking using
7878 * tree-check.c: New. Tree/CFG checking pass.
7879 * tree-match.c: New. Library for tree pattern matching.
7880 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
7881 * toplev.c, flags.h: Add globals for tree-check pass.
7882 * Makefile.in: Integrate the files in tree-check pass.
7883 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
7884 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
7885 Introduce a "lazy" pretty-print mode.
7886 * tree.c, tree.h: Add tree_name.
7888 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
7890 * doc/invoke.texi (-fgraphite): Correct typo.
7891 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
7892 use of print_loop_ir.
7893 * gcc.dg/graphite/scop-1.c: New.
7894 * gcc.dg/graphite/scop-2.c: New.
7895 * gcc.dg/graphite/graphite.exp: New.
7896 * graphite.c: Include domwalk.h.
7897 (print_scop): Print only the entry and exit blocks.
7898 (debug_scop): No longer static.
7899 (affine_expr): Fix formating. Return also true when the expression is
7901 (stmt_simple_for_scop_p): Fix formating.
7902 (build_scops): Use domwalk.
7903 (get_loop_start, end_scop, test_for_scop_bound): New.
7904 (graphite_transform_loops): Avoid printing on stderr.
7905 * graphite.h (debug_scop): Declared.
7906 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
7907 * Makefile.in (graphite.o): Depend on domwalk.h.
7908 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
7909 declarations for static functions.
7910 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
7911 controlling output verbosity.
7913 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
7914 Plesco Alexandru <shurikx@gmail.com>
7916 * doc/invoke.texi (-fgraphite): Document.
7917 * tree-pass.h (pass_graphite_transforms): Declared.
7918 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
7919 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
7920 (pass_graphite_transforms): Defined.
7921 * tree-data-ref.c (free_data_ref, data_reference): Extern.
7922 * tree-data-ref.h (free_data_ref, data_reference): Declared.
7923 * graphite.c, graphite.h: New.
7924 * common.opt (fgraphite): Declared.
7925 * tree-flow.h (graphite_transform_loops): Declared.
7926 * Makefile.in (OBJS-common): Add graphite.o.
7927 (graphite.o): New rule.
7928 * passes.c (pass_graphite_transforms): Scheduled.