1 2010-06-25 Vladimir Kargov <kargov@gmail.com>
3 * refined-regions.c (bb_index_compare): New.
4 (get_bbs_in_region): New.
5 (print_bbs_in_region): New.
6 (print_refined_region): Add an argument that allows to print
7 all basic blocks contained in regions.
8 (debug_refined_region): Update call to print_refined_region.
9 * refined-regions.h (print_refined_region): Update declaration.
10 (get_bbs_in_region): Declared.
11 * graphite-scop-detection.c (build_scops_new): Print the refined
12 region tree into the Grahite dump file.
14 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
16 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
17 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
19 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
21 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
22 rewrite_close_phi_out_of_ssa.
24 * gcc.dg/graphite/id-22.c: New.
26 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
28 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
30 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
32 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
34 * sese.c (debug_rename_map): Same.
37 (rename_variables_in_stmt): Same.
38 (expand_scalar_variables_call): Same.
39 (expand_scalar_variables_ssa_name): Same.
40 (expand_scalar_variables_expr): Same.
41 (expand_scalar_variables_stmt): Same.
42 (expand_scalar_variables): Same.
43 (rename_variables): Same.
44 (graphite_copy_stmts_from_block): Same.
45 (copy_bb_and_scalar_dependences): Same.
47 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
49 * graphite-clast-to-gimple.c (copy_renames): Removed.
50 (translate_clast_for): Do not call copy_renames.
51 (translate_clast_guard): Same.
53 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
55 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
56 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
57 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
58 before rewrite_cross_bb_scalar_deps.
60 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
62 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
63 Early return in when flag_associative_math is not set.
65 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
67 * gcc.dg/graphite/run-id-2.c: Call abort.
69 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
71 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
72 of SSA copies on edges except for loop->latch.
74 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
76 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
77 Split out of rewrite_reductions_out_of_ssa.
78 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
80 * graphite.c (graphite_transform_loops): Call it.
82 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
84 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
86 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
88 * passes.c (init_optimization_passes): Add pass_graphite.
89 Schedule a pass_copy_prop before pass_graphite_transforms.
90 * timevar.def (TV_GRAPHITE): Declared.
91 * tree-pass.h (pass_graphite): Declared.
92 * tree-ssa-loop.c (pass_graphite): New.
94 * gcc.dg/graphite/id-20.c: New.
96 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
98 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
99 Remove calls to rename_nb_iterations and rename_sese_parameters.
100 * graphite-clast-to-gimple.h (gloog): Update declaration.
101 * graphite.c (graphite_transform_loops): Update call to gloog.
102 * sese.c (rename_variables_in_expr): Removed.
103 (rename_nb_iterations): Removed.
104 (rename_sese_parameters): Removed.
105 * sese.h (rename_nb_iterations): Removed.
106 (rename_sese_parameters): Removed.
108 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
110 * graphite-clast-to-gimple.c (gloog): Remove call to
111 sese_adjust_liveout_phis.
112 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
113 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
114 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
115 rewrite_phi_out_of_ssa.
116 * sese.c (get_vdef_before_sese): Removed.
117 (sese_adjust_vphi): Removed.
118 (sese_adjust_liveout_phis): Removed.
119 * sese.h (sese_adjust_liveout_phis): Removed.
121 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
123 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
124 argument for the place after which to insert the out of SSA copy.
125 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
126 (rewrite_phi_out_of_ssa): Same.
127 (rewrite_cross_bb_scalar_deps): Same.
128 (insert_copyout): Removed.
129 (insert_copyin): Removed.
130 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
131 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
134 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
136 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
137 (rewrite_reductions_out_of_ssa): Same.
138 (rewrite_commutative_reductions_out_of_ssa): Same.
139 (build_poly_scop): Do not call these functions.
140 * graphite-sese-to-poly.h (build_poly_scop): Declared.
141 (rewrite_reductions_out_of_ssa): Declared.
142 (rewrite_commutative_reductions_out_of_ssa): Declared.
143 * graphite.c (graphite_transform_loops): Call on every scop
144 rewrite_commutative_reductions_out_of_ssa before calling
145 rewrite_reductions_out_of_ssa and build_scop_bbs.
147 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
149 * graphite-dependences.c (dot_deps): Make system call to dotty run
151 (dot_deps_stmt): Same.
152 * graphite-poly.c (dot_lst): Same.
154 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
156 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
157 old_type in parameter.
158 (gcc_type_for_value): Update call to gcc_type_for_interval.
159 (compute_type_for_level_1): Renamed compute_type_for_level.
160 Update call to gcc_type_for_interval.
162 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
164 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
165 the scev analysis when the variable is not used outside the loop
166 in a close phi node: call compute_overall_effect_of_inner_loop.
168 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
170 * graphite-sese-to-poly.c (single_pred_cond): Renamed
171 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
172 (build_sese_conditions_before): Renamed call to single_pred_cond.
173 (build_sese_conditions_after): Same.
175 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
177 * graphite-poly.h: Fix comments and indentation.
178 * graphite-sese-to-poly.c: Same.
179 (build_sese_conditions_before): Compute stmt and gbb only when needed.
180 * tree-chrec.c: Fix comments and indentation.
181 (tree-ssa-loop-niter.c): Same.
183 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
185 * refined-regions.c (create_region): Only initialize the region.
186 (find_regions_with_entry): Initialize parent relation and bbmap
188 (build_regions_tree): Set outermost_region to region instead of
190 (calculate_region_tree): Remove unneeded parameters.
192 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
194 * graphite-scop-detection.c (is_scop_p): New.
195 (build_scops_new): New. A skeleton for the new scop detection.
196 (build_scops_old): Renamed from build_scops.
197 (build_scops): New version. Call the new and the old scop
200 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
201 Antoniu Pop <antoniu.pop@gmail.com>
203 * Makefile.in (OBJS-common): Add refined-regions.o.
204 (refined-regions.o): New.
205 (graphite-scop-detection.o): Use refined-regions.h.
206 * graphite-scop-detection.c: Include refined-regions.h
207 (build_scops): Also build the refined region tree.
208 * refined-regions.c: New. Adds an algorithm to detect refined
210 (print_refined_region): New.
211 (debug_refined_region): New.
212 (refined_region_contains_bb_p): New.
213 (refined_region_contains_region_p): New.
215 (struct find_regions_global_data): New.
217 (typedef struct bb_bb_def): New.
218 (new_bb_bb_def): New.
219 (bb_bb_map_hash): New.
223 (new_bb_reg_def): New.
224 (bb_reg_map_hash): New.
225 (eq_bb_reg_map): New.
226 (find_new_region): New.
227 (insert_new_reg): New.
228 (insert_new_bb): New.
229 (insert_shortcut): New.
230 (get_next_postdom): New.
231 (create_region): New.
232 (find_regions_with_entry): New.
233 (find_regions_adc): New.
235 (get_topmost_parent): New.
236 (build_regions_tree): New.
237 (calculate_region_tree): New.
238 (free_region_tree): New.
239 * refined-regions.h: New.
240 (struct refined_region): New.
241 (calculate_region_tree): New.
242 (free_region_tree): New.
243 (refined_region_contains_bb_p): New.
244 (refined_region_contains_region_p): New.
245 (print_refined_region): New.
246 (debug_refined_region): New.
248 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
250 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
253 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
255 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
256 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
258 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
260 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
261 phi_arg_in_outermost_loop.
262 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
263 (remove_invariant_phi): Same.
265 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
267 * graphite-blocking.c
268 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
269 * graphite-clast-to-gimple.c
270 (clast_to_gcc_expression): Same.
271 (precision_for_value): Same.
272 (precision_for_interval): Same.
273 (gcc_type_for_interval): Same.
274 (graphite_create_new_guard): Same.
275 (compute_bounds_for_level): Same.
276 (graphite_create_new_loop_guard): Same.
277 * graphite-interchange.c
278 (build_linearized_memory_access): Same.
279 (pdr_stride_in_loop): Same.
280 (memory_strides_in_loop_1): Same.
281 (memory_strides_in_loop): Same.
282 (extend_scattering): Same.
283 (psct_scattering_dim_for_loop_depth): Same.
284 (pbb_number_of_iterations): Same.
286 (debug_iteration_domains): Same.
288 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
289 (ppl_set_inhomogeneous_gmp): Same.
290 (ppl_strip_loop): Same.
291 (ppl_lexico_compare_linear_expressions): Same.
292 (ppl_read_polyhedron_matrix): Same.
293 (ppl_max_for_le_pointset): Same.
295 (ppl_read_polyhedron_matrix): Same.
296 (tree_int_to_gmp): Same.
297 (gmp_cst_to_tree): Same.
298 (ppl_set_inhomogeneous): Same.
299 (ppl_set_inhomogeneous_tree): Same.
300 (ppl_set_coef): Same.
301 (ppl_set_coef_tree): Same.
302 * graphite-sese-to-poly.c
303 (build_pbb_scattering_polyhedrons): Same.
304 (build_scop_scattering): Same.
305 (scan_tree_for_params_right_scev): Same.
306 (scan_tree_for_params): Same.
307 (find_params_in_bb): Same.
308 (find_scop_parameters): Same.
309 (add_upper_bounds_from_estimated_nit): Same.
310 (build_loop_iteration_domains): Same.
311 (add_condition_to_domain): Same.
312 (pdr_add_memory_accesses): Same.
314 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
316 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
317 CLooG's value_* macros to their respective mpz_* counterparts.
318 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
319 (graphite_create_new_loop_guard): Same.
320 * graphite-interchange.c (build_linearized_memory_access): Same.
321 (pdr_stride_in_loop): Same.
322 (memory_strides_in_loop_1): Same.
323 (1st_interchange_profitable_p): Same.
324 * graphite-poly.c (extend_scattering): Same.
325 (psct_scattering_dim_for_loop_depth): Same.
326 (pbb_number_of_iterations): Same.
327 (pbb_number_of_iterations_at_time): Same.
328 * graphite-poly.h (new_1st_loop): Same.
329 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
330 (oppose_constraint): Same.
331 (insert_constraint_into_matrix): Same.
332 (ppl_set_inhomogeneous_gmp): Same.
333 (ppl_set_coef_gmp): Same.
334 (ppl_strip_loop): Same.
335 (ppl_lexico_compare_linear_expressions): Same.
336 (ppl_max_for_le_pointset): Same.
337 (ppl_min_for_le_pointset): Same.
338 (ppl_build_realtion): Same.
339 * graphite-ppl.h (gmp_cst_to_tree): Same.
340 (ppl_set_inhomogeneous): Same.
341 (ppl_set_inhomogeneous_tree): Same.
342 (ppl_set_coef): Same.
343 (ppl_set_coef_tree): Same.
344 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
345 (build_scop_scattering): Same.
346 (add_value_to_dim): Same.
347 (scan_tree_for_params_right_scev): Same.
348 (scan_tree_for_params_int): Same.
349 (scan_tree_for_params): Same.
350 (find_params_in_bb): Same.
351 (find_scop_parameters): Same.
352 (add_upper_bounds_from_estimated_nit): Same.
353 (build_loop_iteration_domains): Same.
354 (create_linear_expr_from_tree): Same.
355 (add_condition_to_domain): Same.
356 (pdr_add_memory_accesses): Same.
358 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
361 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
362 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
363 When converting an unsigned type to signed, double its precision.
364 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
365 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
366 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
368 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
371 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
372 build_nonstandard_integer_type.
373 (gcc_type_for_interval): Same.
375 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
378 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
379 POINTER_PLUS_EXPR for pointer types.
381 * gcc.dg/graphite/id-19.c: New.
383 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
386 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
387 * graphite-clast-to-gimple.c: Include langhooks.h.
388 (max_signed_precision_type): New.
389 (max_precision_type): Takes two types as arguments.
390 (precision_for_value): New.
391 (precision_for_interval): New.
392 (gcc_type_for_interval): New.
393 (gcc_type_for_value): New.
394 (gcc_type_for_clast_term): New.
395 (gcc_type_for_clast_red): New.
396 (gcc_type_for_clast_bin): New.
397 (gcc_type_for_clast_expr): Split up into several functions.
398 (gcc_type_for_clast_eq): Rewritten.
399 (compute_bounds_for_level): New.
400 (compute_type_for_level_1): New.
401 (compute_type_for_level): New.
402 (gcc_type_for_cloog_iv): Removed.
403 (gcc_type_for_iv_of_clast_loop): Rewritten.
404 (graphite_create_new_loop): Compute the lower and upper bound types
405 with gcc_type_for_clast_expr.
406 (graphite_create_new_loop_guard): Same.
407 (find_cloog_iv_in_expr): Removed.
408 (compute_cloog_iv_types_1): Removed.
409 (compute_cloog_iv_types): Removed.
410 (gloog): Do not call compute_cloog_iv_types.
411 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
413 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
414 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
415 (GBB_CLOOG_IV_TYPES): Removed.
417 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
419 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
421 Reverted this commit: as at this point the loop closed SSA form
422 is under a canonical form respecting the single argument condition.
423 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
424 close phi nodes may have more than one argument.
426 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
428 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
429 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
430 (detect_commutative_reduction): Same.
432 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
434 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
435 close phi nodes may have more than one argument.
437 2010-03-30 Richard Guenther <rguenther@suse.de>
438 Zdenek Dvorak <ook@ucw.cz>
439 Sebastian Pop <sebastian.pop@amd.com>
442 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
443 with multiple arguments.
444 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
446 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
448 * graphite-dependences.c (print_pddr): Call print_pdr with an
450 * graphite-poly.c (debug_pdr): Add an extra argument for the
453 (print_pbb_domain): Same.
455 (print_scop_context): Same.
458 (debug_pbb_domain): Same.
462 (debug_scop_context): Same.
465 (print_scop_params): Same.
466 (debug_scop_params): Same.
467 (print_iteration_domain): Same.
468 (print_iteration_domains): Same.
469 (debug_iteration_domain): Same.
470 (debug_iteration_domains): Same.
471 (print_scattering_function): Same.
472 (print_scattering_functions): Same.
473 (debug_scattering_function): Same.
474 (debug_scattering_functions): Same.
475 * graphite-poly.h (debug_pdr): Update declaration.
477 (print_pbb_domain): Same.
479 (print_scop_context): Same.
482 (debug_pbb_domain): Same.
486 (debug_scop_context): Same.
489 (print_scop_params): Same.
490 (debug_scop_params): Same.
491 (print_iteration_domain): Same.
492 (print_iteration_domains): Same.
493 (debug_iteration_domain): Same.
494 (debug_iteration_domains): Same.
495 (print_scattering_function): Same.
496 (print_scattering_functions): Same.
497 (debug_scattering_function): Same.
498 (debug_scattering_functions): Same.
500 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
502 * graphite-poly.c (print_scattering_function_1): New.
503 (print_scattering_function): Call it.
504 (print_scop_params): Remove spaces at the end of lines.
507 * graphite-poly.h (print_cloog): Declared.
508 (debug_cloog): Declared.
510 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
512 * tree-ssa-copy.c: Revert this previous change:
513 (init_copy_prop): Loop closed phi nodes cancontain more than one
515 (execute_copy_prop): Revert the previous change: do not call
516 rewrite_into_loop_closed_ssa.
518 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
519 Richard Guenther <rguenther@suse.de>
522 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
523 contain more than one argument.
524 (execute_copy_prop): Revert the previous change: do not call
525 rewrite_into_loop_closed_ssa.
527 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
528 * gcc.dg/graphite/id-pr43464-1.c: New.
530 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
533 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
534 and verify_loop_closed_ssa when copy prop is executed in the LNO.
536 * gcc.dg/graphite/id-pr43464.c: New.
538 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
540 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
542 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
543 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
544 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
545 to switch between adding the IV bump in loop->latch or in loop->header.
547 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
549 * passes.c (init_optimization_passes): Add pass_copy_prop
552 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
554 * graphite-poly.c (print_scattering_function): Pretty print following
557 (print_pbb_domain): Same.
558 (dump_gbb_cases): Same.
559 (dump_gbb_conditions): Same.
562 (print_scop_params): Same.
563 (print_scop_context): Same.
565 (print_pbb_body): New.
566 (lst_indent_to): New.
567 (print_lst): Start new lines with a #.
568 * graphite-poly.h (pbb_bb): New.
569 (pbb_index): Use pbb_bb.
570 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
572 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
574 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
577 * gcc.dg/graphite/id-pr43351.c
579 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
582 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
583 call insert_out_of_ssa_copy for default definitions.
584 * gfortran.dg/graphite/id-pr43354.f: New.
586 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
589 * gfortran.dg/graphite/pr43349.f: New.
591 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
593 * graphite-clast-to-gimple.c (my_long_long): Defined.
594 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
595 * graphite-sese-to-poly.c (my_long_long): Defined.
596 (scop_ivs_can_be_represented): Use it.
598 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
600 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
601 graphite-max-bbs-per-function, and loop-block-tile-size.
602 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
604 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
606 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
608 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
610 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
611 (add_upper_bounds_from_estimated_nit): New.
612 (build_loop_iteration_domains): Use it.
614 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
616 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
618 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
621 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
622 should be an INTEGER_CST. Also handle CASE_CONVERT.
623 * gcc.dg/graphite/pr43306.c: New.
625 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
627 * graphite.c (graphite_initialize): To bound the number of bbs per
628 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
629 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
630 * doc/invoke.texi: Document it.
632 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
634 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
635 * graphite-sese-to-poly.h (build_poly_scop): Same.
637 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
639 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
640 the number of parameters in the scop. Use as an upper bound
641 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
642 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
643 * doc/invoke.texi: Document it.
645 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
647 * graphite-sese-to-poly.c (add_param_constraints): Use
648 lower_bound_in_type and upper_bound_in_type.
650 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
652 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
653 instead of unsigned_type_node.
655 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
656 Reza Yazdani <reza.yazdani@amd.com>
659 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
660 on pointer type parameters.
662 * gcc.dg/graphite/run-id-4.c: New.
664 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
667 * gcc.dg/graphite/run-id-3.c: New.
669 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
670 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
672 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
673 handle conversions from pointer to integers.
674 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
675 induction variable, to be able to work with code generated by CLooG.
676 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
677 (build_poly_scop): Bail out if we cannot codegen a loop.
679 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
681 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
682 code generation with gloog_error.
684 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
686 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
687 Call fold_convert on all the returned values.
688 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
689 the type of the resulting expression.
691 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
693 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
694 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
695 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
697 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
699 * graphite-dependences.c (map_into_dep_poly): Removed.
700 (dependence_polyhedron_1): Use combine_context_id_scat.
702 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
704 * graphite-poly.h (struct poly_scattering): Add layout documentation.
705 (struct poly_bb): Same.
706 (combine_context_id_scat): New.
708 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
711 * sese.c (name_defined_in_loop_p): Return false for default
714 * gcc.dg/graphite/pr42326.c: New.
716 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
718 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
719 and clean up the logic.
721 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
723 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
726 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
729 * graphite-scop-detection.c (create_single_exit_edge): Move
730 the call to find_single_exit_edge to....
731 (create_sese_edges): ...here. Don't handle multiple edges
732 exiting the function.
733 (build_graphite_scops): Don't handle multiple edges
734 exiting the function.
736 * gcc.dg/graphite/pr43083.c: New.
738 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
741 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
742 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
744 * gfortran.dg/graphite/pr43097.f: New.
746 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
747 Manuel López-Ibáñez <manu@gcc.gnu.org>
750 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
752 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
755 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
757 * g++.dg/graphite/pr43026.C: New.
759 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
761 * Merge from mainline (154736:156693).
763 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
766 * gcc.dg/graphite/pr43012.c: New.
768 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
770 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
771 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
773 * g++.dg/graphite/pr42930.C: New.
775 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
778 * graphite-scop-detection.c (graphite_can_represent_scev): Call
779 graphite_can_represent_init for MULT_EXPR.
781 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
785 * graphite-sese-to-poly.c (remove_phi): New.
786 (translate_scalar_reduction_to_array): Call remove_phi.
788 * gcc.dg/graphite/pr42530.c: New.
789 * gcc.dg/graphite/pr42914.c: New.
791 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
794 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
795 * graphite-clast-to-gimple.h (gloog): Update declaration.
796 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
797 * graphite-poly.h (struct poly_bb): Add missing comments.
798 (struct scop): Add poly_scop_p field.
800 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
801 * graphite.c (graphite_transform_loops): Build the polyhedral
802 representation for each scop before code generation.
803 * sese.c (rename_variables_in_operand): Removed.
804 (rename_variables_in_expr): Return the renamed expression.
805 (rename_sese_parameters): New.
806 * sese.h (rename_sese_parameters): Declared.
808 * gcc.dg/graphite/pr42771.c: New.
810 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
812 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
814 * gcc.dg/graphite/block-1.c: Same.
815 * gcc.dg/graphite/block-3.c: Same.
816 * gcc.dg/graphite/block-4.c: Same.
817 * gcc.dg/graphite/block-5.c: Same.
818 * gcc.dg/graphite/block-6.c: Same.
819 * gcc.dg/graphite/block-7.c: Same.
820 * gcc.dg/graphite/interchange-0.c: Same.
821 * gcc.dg/graphite/interchange-1.c: Same.
822 * gcc.dg/graphite/interchange-10.c: Same.
823 * gcc.dg/graphite/interchange-11.c: Same.
824 * gcc.dg/graphite/interchange-12.c: Same.
825 * gcc.dg/graphite/interchange-2.c: Same.
826 * gcc.dg/graphite/interchange-3.c: Same.
827 * gcc.dg/graphite/interchange-4.c: Same.
828 * gcc.dg/graphite/interchange-5.c: Same.
829 * gcc.dg/graphite/interchange-6.c: Same.
830 * gcc.dg/graphite/interchange-7.c: Same.
831 * gcc.dg/graphite/interchange-8.c: Same.
832 * gcc.dg/graphite/interchange-9.c: Same.
833 * gcc.dg/graphite/interchange-mvt.c: Same.
835 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
837 * gfortran.dg/graphite/id-19.f: New.
838 * gfortran.dg/graphite/pr14741.f90: New.
839 * gfortran.dg/graphite/pr41924.f90: New.
840 * gfortran.dg/graphite/run-id-2.f90: New.
842 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
845 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
846 to unknown_dependence.
847 (graphite_legal_transform_dr): Handle the unknown_dependence.
848 (graphite_carried_dependence_level_k): Same.
850 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
852 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
854 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
855 Konrad Trifunovic <konrad.trifunovic@inria.fr>
858 * graphite-dependences.c (build_lexicographical_constraint): Return
859 a union of dependence polyhedra.
860 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
862 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
863 * gcc.dg/graphite/block-4.c: Same.
864 * gcc.dg/graphite/block-7.c: Same.
865 * gcc.dg/graphite/interchange-12.c: Same.
866 * gcc.dg/graphite/interchange-mvt.c: Same.
867 * gfortran.dg/graphite/interchange-1.f: XFAILed.
868 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
869 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
871 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
873 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
874 the execution check to FAIL. This testcase is miscompiled by Graphite
875 and the check should be re-enabled.
876 * gcc.dg/graphite/interchange-mvt.c: Same.
877 * gcc.dg/graphite/block-0.c: Same.
878 * gcc.dg/graphite/block-4.c: Same.
879 * gcc.dg/graphite/block-7.c: Same.
881 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
883 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
884 * gcc.dg/graphite/scop-0.c: Fix spaces.
885 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
886 * gfortran.dg/graphite/block-2.f: Same.
887 * gfortran.dg/graphite/block-3.f90: Same.
888 * gfortran.dg/graphite/block-4.f90: Same.
889 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
890 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
892 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
894 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
895 PDDR_ORIGINAL_SCATTERING_P.
896 (pddr_is_empty): Rewritten.
897 (print_dependence_polyhedron_layout): New.
900 (build_alias_set_powerset): Moved up.
901 (poly_drs_may_alias_p): Moved up.
902 (lexicographically_gt_p): Removed.
903 (build_lexicographically_gt_constraint): Renamed
904 build_lexicographical_constraint, reimplemented.
905 (dependence_polyhedron_1): Simplified parameters.
906 (dependence_polyhedron): Same. Keep along empty PDDRs
907 to make efficient use of the cache.
908 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
909 (graphite_legal_transform_dr): Rewritten.
910 (graphite_legal_transform_bb): Pass fewer arguments to
911 graphite_legal_transform_dr.
912 (graphite_carried_dependence_level_k): Simplified implementation.
913 (dot_original_deps_stmt_1): Call dependence_polyhedron.
914 (dot_transformed_deps_stmt_1): Same.
915 (dot_original_deps): Same.
916 (dot_transformed_deps): Same.
917 * graphite-dependences.h (struct poly_ddr): Added a new field
918 original_scattering_p.
919 (PDDR_ORIGINAL_SCATTERING_P): New.
920 (print_pddr): Declared.
921 (debug_pddr): Declared.
922 * graphite-ppl.c: Clarify comment.
923 * sese.h (print_gimple_bb): Removed unused declaration.
926 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
928 * g++.dg/graphite/graphite.exp: Rewritten.
929 * gcc.dg/graphite/graphite.exp: Rewritten.
930 * gfortran.dg/graphite/graphite.exp: Rewritten.
931 * gcc.dg/graphite/block-0.c: Added runtime test.
932 * gcc.dg/graphite/block-1.c: Same.
933 * gcc.dg/graphite/block-3.c: Same.
934 * gcc.dg/graphite/block-4.c: Same.
935 * gcc.dg/graphite/block-5.c: Same.
936 * gcc.dg/graphite/block-6.c: Same.
937 * gcc.dg/graphite/block-7.c: Same.
938 * gcc.dg/graphite/interchange-0.c: Same.
939 * gcc.dg/graphite/interchange-1.c: Same.
940 * gcc.dg/graphite/interchange-10.c: Same.
941 * gcc.dg/graphite/interchange-11.c: Same.
942 * gcc.dg/graphite/interchange-12.c: Same.
943 * gcc.dg/graphite/interchange-2.c: Same.
944 * gcc.dg/graphite/interchange-3.c: Same.
945 * gcc.dg/graphite/interchange-4.c: Same.
946 * gcc.dg/graphite/interchange-5.c: Same.
947 * gcc.dg/graphite/interchange-6.c: Same.
948 * gcc.dg/graphite/interchange-7.c: Same.
949 * gcc.dg/graphite/interchange-8.c: Same.
950 * gcc.dg/graphite/interchange-9.c: Same.
951 * gcc.dg/graphite/interchange-mvt.c: Same.
952 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
954 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
956 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
959 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
961 * common.opt: Add -fgraphite-cloog-opts.
962 * graphite-clast-to-gimple.c (set_cloog_options): Same.
963 * opts.c (decode_options): Same.
965 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
967 * gcc.dg/graphite/id-17.c: New.
968 * gcc.dg/graphite/pr41888.c: New.
969 * gcc.dg/graphite/scop-22.c: New.
970 * gfortran.dg/graphite/pr40982.f90: New.
972 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
974 * graphite-dependences.c: Clarify comments.
975 (build_pddr): Add an extra parameter direction.
976 (graphite_legal_transform_dr): Use build_pddr.
977 (dot_original_deps_stmt_1): Update use of build_pddr.
978 (dot_transformed_deps_stmt_1): Same.
979 (dot_original_deps): Same.
980 (dot_transformed_deps): Same.
982 * gcc.dg/graphite/interchange-12.c: New.
983 * gcc.dg/graphite/block-7.c: New.
985 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
987 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
988 (pddr_transformed_scattering): Removed.
989 (graphite_legal_transform_dr): Use build_pddr.
990 (dot_original_deps_stmt_1): Same.
991 (dot_transformed_deps_stmt_1): Same.
992 (dot_original_deps): Same.
993 (dot_transformed_deps): Same.
995 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
997 * graphite-dependences.c (lexicographically_gt_p): Add comments.
998 (build_lexicographically_gt_constraint): Same.
999 (dependence_polyhedron_1): Same.
1000 (dependence_polyhedron): Same.
1002 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1004 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1005 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1006 (lexicographically_gt_p): Change type of direction to int.
1007 (build_lexicographically_gt_constraint): Same.
1008 (dependence_polyhedron_1): Same.
1009 (dependence_polyhedron): Same.
1010 (pddr_original_scattering): Use integers for direction.
1011 (pddr_transformed_scattering): Same.
1012 (graphite_legal_transform_dr): Same.
1013 (graphite_carried_dependence_level_k): Same.
1015 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1017 * graphite-dependences.c (build_pairwise_constraint): Renamed
1018 ppl_build_relation. Moved...
1019 (dr_equality_constraints): Use ppl_build_relation.
1020 (build_pairwise_scheduling_equality): Same.
1021 (build_pairwise_scheduling_inequality): Same.
1022 * graphite-ppl.c (ppl_build_relation): ...here.
1023 * graphite-ppl.h (ppl_build_relation): Declared.
1025 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1028 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1029 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1030 Set gloog_error when such an expression failed to be built.
1031 (translate_clast): Early return when gloog_error is set.
1032 (gloog): Clear gloog_error. When gloog_error is set, call
1033 set_ifsese_condition to enable the original code. Return the status
1034 of the code generation based on gloog_error.
1035 * sese.c (set_ifsese_condition): New.
1036 * sese.h (set_ifsese_condition): Declared.
1038 * g++.dg/graphite/pr42681.C: New.
1040 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1043 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1044 rename_nb_iterations.
1045 * sese.c (rename_variables_in_operand): New.
1046 (rename_variables_in_expr): New.
1047 (rename_nb_iterations): New.
1048 (sese_adjust_liveout_phis): Update the rename_map.
1049 * sese.h (rename_nb_iterations): Declared.
1050 * tree-scalar-evolution.c (scev_reset_htab): New.
1051 (scev_reset): Call scev_reset_htab.
1052 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1054 * gfortran.dg/graphite/pr42732.f: New.
1056 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1059 * graphite-clast-to-gimple.c: Fix formatting.
1060 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1061 (expr_defined_in_loop_p): New.
1062 (add_loop_exit_phis): Also handle full expressions: remove from
1063 the rename_map the expressions defined in the loop that we're closing.
1065 * gfortran.dg/graphite/pr42393-1.f90: New.
1066 * gfortran.dg/graphite/pr42393.f90: Add new flags
1067 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1068 make this testcase useful in the Graphite branch.
1070 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1072 * graphite-scop-detection.c (exclude_component_ref): Removed.
1073 (is_simple_operand): Removed.
1074 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1076 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1079 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1080 the array indexing of ADDR_EXPRs.
1082 * gcc.dg/graphite/pr42221.c: New.
1084 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1087 * graphite.c (graphite_finalize): Call scev_reset.
1088 (graphite_transform_loops): Do not call scev_reset between the code
1089 generation of scops.
1091 * gcc.dg/graphite/pr42521.c: New.
1093 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1095 * graphite-interchange.c (memory_stride_in_loop): Renamed
1097 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1098 (memory_strides_in_loop): Memoize the memory strides per loop.
1099 (lst_interchange_profitable_p): Do not initialize to zero the memory
1101 * graphite-poly.h (struct lst): Add a field memory_strides.
1102 (LST_LOOP_MEMORY_STRIDES): New.
1103 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1104 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1106 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1108 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1109 memory_strides_in_loop. Gather memory strides on a whole loop.
1110 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1111 (lst_interchange_profitable_p): Removed.
1112 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1114 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1116 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1117 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1118 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1119 Remove context_loop and level.
1121 2010-01-07 Richard Guenther <rguenther@suse.de>
1123 PR tree-optimization/42641
1124 * sese.c (rename_map_elt_info): Use the SSA name version, do
1127 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1129 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1130 blocked" only when both the strip mine and the interchange have
1133 * gcc.dg/graphite/block-2.c: Removed.
1134 * gcc.dg/graphite/block-3.c: Add scan pattern.
1135 * gcc.dg/graphite/block-4.c: Same.
1136 * gcc.dg/graphite/block-5.c: Same.
1137 * gcc.dg/graphite/block-6.c: Same.
1139 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1141 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1142 before allocating a new one.
1143 (copy_renames): Check that slot is not NULL.
1144 (mark_bb_with_pbb): Same.
1145 (compute_cloog_iv_types_1): Same.
1146 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1147 nest, and after LSTs.
1148 (lst_try_interchange_loops): Same.
1150 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1153 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1154 the before, nest, and after LSTs.
1155 (lst_try_interchange): Removed.
1156 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1158 (lst_interchange_select_outer): Apply interchange on the outer loop
1159 until there are no more changes in the inner loops.
1161 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1163 Revert patch fixing PR middle-end/42221.
1165 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1168 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1171 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1173 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1176 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1177 that contain only one statement.
1179 * gfortran.dg/graphite/pr42180.f90: New.
1181 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1184 * gfortran.dg/graphite/pr42393.f90: New.
1186 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1189 * gfortran.dg/graphite/pr42186.f90: New.
1191 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1194 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1195 Insert the reduction copy in the same block as the phi node.
1196 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1198 * gcc.dg/graphite/pr42205-1.c: New.
1199 * gcc.dg/graphite/pr42205-2.c: New.
1201 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1204 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1205 the array indexing of ADDR_EXPRs.
1207 * gcc.dg/graphite/pr42221.c: New.
1209 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1213 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1214 index. Call lst_interchange_select_inner only once.
1215 (lst_interchange_select_inner): Update use of lst_try_interchange.
1216 (lst_interchange_select_outer): Update.
1218 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1222 * graphite-interchange.c (lst_try_interchange): Do not increment the
1223 the OUTER index when there is no AFTER kernel. Do not increment the
1224 OUTER index for after processing the AFTER kernel.
1225 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1226 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1227 index. Do not pass to lst_interchange_select_inner the OUTER index.
1228 (scop_do_interchange): Update use of lst_interchange_select_outer.
1230 * gfortran.dg/graphite/graphite.exp
1231 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1232 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1233 the graphite dump file.
1234 * gfortran.dg/graphite/interchange-2.f: Same.
1235 * gfortran.dg/graphite/pr42334-1.f: New.
1237 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1241 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1243 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1244 (lst_try_interchange): Reimplemented.
1245 (lst_interchange_select_inner): Same.
1246 (lst_do_interchange): Renamed lst_interchange_select_outer.
1248 (scop_do_interchange): Update use of lst_interchange_select_outer.
1250 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1251 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1252 * gcc.dg/graphite/pr42211.c: New.
1253 * gfortran.dg/graphite/pr42334.f90: New.
1255 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1258 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1259 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1261 * gfortran.dg/graphite/pr42181.f90: New.
1263 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1266 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1267 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1268 (detect_commutative_reduction_arg): Simplified.
1269 (detect_commutative_reduction): Early return when the argument of
1270 the close phi is not of an SSA_NAME.
1272 * gcc.dg/graphite/pr42284.c: New.
1274 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1276 * dbgcnt.def (graphite_scop): New counter.
1277 * graphite.c: Include dbgcnt.h
1278 (graphite_transform_loops): Use new counter to limit transformations.
1280 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1283 * graphite-scop-detection.c (graphite_can_represent_init): Also
1284 handle more complex MULT_EXPRs containing parameters by recursion
1287 * gfortran.dg/graphite/pr42285.f90: New.
1289 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1291 * g++.dg/graphite/pr42130.C: Fix type.
1293 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1295 * g++.dg/graphite/pr42130.C: Correct testcase.
1297 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1299 * Merge from mainline (154493:154734).
1301 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1303 * Merge from mainline (151362:154491).
1305 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1307 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1308 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1310 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1313 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1314 translate_clast_for_loop): New.
1315 (translate_clast_for): Add a condition around the loop, to do not
1316 execute loops with zero iterations.
1317 * g++.dg/graphite/pr42130.C: New.
1318 * gcc.dg/graphite/pr35356-2.c: Adapt.
1320 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1322 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1323 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1324 Remove context_loop and level.
1326 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1328 * graphite-clast-to-gimple.c (translate_clast_user,
1329 translate_clast_for, translate_clast_guard): Simplify and move common
1330 elements to translate_clast().
1331 (translate_clast): Simplify and get common elements.
1333 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1335 * graphite-clast-to-gimple.c (translate_clast_user,
1336 translate_clast_for, translate_clast_guard): Split out of
1339 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1341 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1342 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1343 debug_clast_name_indexes_1, debug_clast_name_indexes,
1344 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1345 (clast_name_to_gcc, clast_to_gcc_expression,
1346 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1347 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1348 graphite_create_guard_cond_expr, graphite_create_new_loop,
1349 translate_clast): Add params_index.
1350 (initialize_cloog_names): Create parameter strings from scratch, do
1351 not reference other strings.
1352 (create_params_index): New.
1353 (gloog): Initialize params_index.
1354 * graphite-scop-detection (free_scops_1): Removed.
1355 (limit_scops): Use normal free_scops.
1356 * graphite-sese-to-poly.c (save_var_names): Removed.
1357 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1358 and SESE_PARAMS_INDEX.
1359 * sese.c (new_sese, free_sese): Dito.
1360 * sese.h (struct sese): Remove params_index, params_names.
1361 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1363 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1365 Revert the following patch from 2009-09-14:
1366 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1367 tree-scalar-evolution.h, and then tree-data-ref.h.
1368 * graphite-clast-to-gimple.c: Same.
1369 * graphite-dependences.c: Same.
1370 * graphite-interchange.c: Same.
1371 * graphite-poly.c: Same.
1372 * graphite-scop-detection.c: Same.
1373 * graphite-sese-to-poly.c: Same.
1375 * lambda-code.c: Same.
1376 * matrix-reorg.c: Same.
1377 * tree-data-ref.c: Same.
1378 * tree-if-conv.c: Same.
1379 * tree-loop-distribu: Same.: Same.
1380 * tree-loop-linear.c: Same.
1381 * tree-parloops.c: Same.
1382 * tree-predcom.c: Same.
1383 * tree-vect-patterns.c: Same.
1385 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1387 Revert patch from 2009-09-14.
1388 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1389 passes at -O1 and below.
1391 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1394 * gcc.dg/graphite/pr40281.c: New.
1396 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1397 evolutions should not variate in inner loops.
1399 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1402 * gfortran.dg/graphite/pr42050.f90: New.
1404 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1406 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1407 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1409 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1411 * graphite-blocking.c (scop_do_block): New.
1412 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1413 * graphite-poly.h (scop_do_block): Declared.
1415 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1417 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1418 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1419 to transform depth into the time_depth before calling
1420 pbb_number_of_iterations_at_time.
1421 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1424 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1426 Reverted the patch for "scattering permutations" from 2009-10-28.
1428 * graphite-poly.c (print_permutation): New.
1429 (debug_permutation): New.
1430 (new_poly_bb): Initialize PBB_PERMUTATION.
1431 (free_poly_bb): Free PBB_PERMUTATION.
1432 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1433 (struct pbb_permutation_elt): New.
1434 (PBB_PERMUTATION_ELT_STRIDE): New.
1435 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1436 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1437 (new_pbb_permutation_elt): New.
1438 (pbb_permutation_elt_free): New.
1439 (struct poly_bb): Add field permutation.
1440 (PBB_PERMUTATION): New.
1441 (print_permutation): Declared.
1442 (debug_permutation): Declared.
1444 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1446 * graphite-interchange.c (build_partial_difference): New.
1447 (memory_stride_in_loop): Refactored the computation of
1448 equality constraints into build_partial_difference function.
1449 Added support for debugging stride computations.
1451 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1453 * graphite-clast-to-gimple.c (gloog): Free if_region,
1454 if_region->true_region, and if_region->region.
1455 * sese.c (if_region_set_false_region): Free if_region->false_region.
1456 (create_if_region_on_edge): Do not use GGC_NEW.
1457 (move_sese_in_condition): Remove useless initialization.
1459 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1461 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1462 for the loops created by the loop distribution. Do not modify the
1464 (lst_try_interchange_loops): Same. Use a temporary LST for the
1465 transformed schedule. Call lst_update_scattering before data
1466 dependence analysis.
1467 (lst_try_interchange): Pass an extra parameter INDEX.
1468 (lst_do_interchange_1): New.
1469 (lst_do_interchange): Call lst_do_interchange_1.
1470 (scop_do_interchange): Call lst_update_scattering.
1471 * graphite-poly.c (apply_poly_transforms): Do not call
1472 lst_update_scattering.
1473 * graphite-poly.h (lst_pred): New.
1475 (lst_find_first_pbb): Return NULL when not found.
1477 (lst_insert_in_sequence): Allow LST1 to be NULL.
1479 (lst_substitute_3): New.
1480 * gcc.dg/graphite/interchange-1.c: XFail.
1481 * gcc.dg/graphite/interchange-8.c: XFail.
1482 * gcc.dg/graphite/interchange-11.c: XFail.
1484 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1486 * graphite-interchange.c (lst_perfectly_nested_p): New.
1487 (lst_perfect_nestify): New.
1488 (lst_try_interchange_loops): Call store_lst_schedule,
1489 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1490 (scop_do_interchange): Avoid redundant legality test.
1491 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1492 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1493 * graphite-poly.h (psct_static_dim): New.
1494 (lst_dewey_number_at_depth): New.
1495 (lst_find_pbb): Restructured.
1496 (lst_find_first_pbb): Restructured.
1497 (lst_find_last_pbb): New.
1498 (lst_contains_p): New.
1499 (lst_contains_pbb): New.
1500 (lst_create_nest): New.
1501 (lst_remove_from_sequence): New.
1502 (pbb_update_scattering): New.
1503 (lst_update_scattering_under): New.
1504 (lst_update_scattering_seq): New.
1505 (lst_update_scattering): New.
1506 (lst_insert_in_sequence): New.
1507 (lst_distribute_lst): New.
1508 (lst_remove_all_before_including_pbb): New.
1509 (lst_remove_all_before_excluding_pbb): New.
1511 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1513 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1514 get_loop_exit_edges.
1516 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1518 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1520 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1522 * graphite-poly.c (print_permutation): New.
1523 (debug_permutation): New.
1524 (new_poly_bb): Initialize PBB_PERMUTATION.
1525 (free_poly_bb): Free PBB_PERMUTATION.
1526 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1527 (struct pbb_permutation_elt): New.
1528 (PBB_PERMUTATION_ELT_STRIDE): New.
1529 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1530 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1531 (new_pbb_permutation_elt): New.
1532 (pbb_permutation_elt_free): New.
1533 (struct poly_bb): Add field permutation.
1534 (PBB_PERMUTATION): New.
1535 (print_permutation): Declared.
1536 (debug_permutation): Declared.
1538 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1540 * graphite-clast-to-gimple.c (gloog): Do not call
1541 sese_reset_aux_in_loops.
1542 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
1543 extra argument for domains. Do not use loop->aux.
1544 (build_scop_iteration_domain): Initialize and free domains, pass it
1545 to build_loop_iteration_domains and extract the information from
1546 domains. Do not use loop->aux.
1547 * sese.c (sese_reset_aux_in_loops): Removed.
1548 * sese.h (sese_reset_aux_in_loops): Removed.
1550 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1552 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
1553 (dependency_in_loop_p): Same.
1554 (translate_clast): Do not use loop->aux. Initialize
1555 loop->can_be_parallel.
1556 (mark_loops_parallel): Removed.
1557 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
1558 * graphite.c (free_aux_in_new_loops): Removed.
1559 (graphite_finalize): Do not call free_aux_in_new_loops.
1560 (graphite_transform_loops): Do not call mark_loops_parallel.
1562 2009-10-26 Li Feng <nemokingdom@gmail.com>
1564 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
1565 (translate_clast): Pass an extra parameter LEVEL.
1566 Call get_scattering_level.
1567 * graphite-clast-to-gimple.h (get_scattering_level): New.
1569 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1571 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
1572 * cfgloop.h (struct loop): New field single_iv.
1574 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
1575 loop->aux anymore: use loop->single_iv.
1576 (graphite_loop_normal_form): Moved...
1577 (build_graphite_loop_normal_form): Removed.
1578 (gloog): Do not call build_graphite_loop_normal_form.
1579 (free_aux_in_new_loops): Moved...
1580 (mark_loops_parallel): Restructure.
1581 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
1582 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
1583 (scop_canonicalize_loops): New.
1584 (build_poly_scop): Call scop_canonicalize_loops.
1585 * graphite.c (free_aux_in_new_loops): ...here.
1587 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1589 * g++.dg/graphite/graphite.exp: Add the same rules as in
1590 gcc.dg/graphite/graphite.exp.
1592 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1594 * g++.dg/graphite/id-1.C: New.
1596 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1598 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
1600 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
1601 (rewrite_phi_out_of_ssa): Same.
1602 (rewrite_cross_bb_scalar_deps): Same.
1603 (translate_scalar_reduction_to_array): Same.
1605 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1607 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
1610 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1612 * graphite-sese-to-poly.c (dump_alias_graphs): New.
1613 (build_scop_drs): Call dump_alias_graphs.
1615 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1617 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
1618 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1619 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
1620 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1621 * graphite-poly.h (free_lst): New.
1622 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
1623 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
1625 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1627 * graphite-poly.h (struct scop): Add a field saved_schedule.
1628 (SCOP_SAVED_SCHEDULE): New.
1629 (store_lst_schedule): New.
1630 (restore_lst_schedule): New.
1631 (store_scattering): Call store_lst_schedule.
1632 (restore_scattering): Call restore_lst_schedule.
1634 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1636 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
1637 (pdr_add_alias_set): Same.
1638 (build_poly_dr): Same.
1639 (build_alias_set_optimal_p): Same.
1640 (build_base_obj_set_for_drs): Same. Do not store the result of
1643 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1645 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
1646 all_components_are_cliques to 1.
1648 2009-10-20 Li Feng <nemokingdom@gmail.com>
1650 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
1652 (pdr_add_alias_set): Update retrieving alias_set_num.
1653 (build_poly_dr): Update retrieving dr_base_object_set.
1654 (partition_drs_to_sets): Remove.
1655 (build_alias_set_optimal_p): New.
1656 (build_alias_set_for_drs): Rename.
1657 (build_scop_drs): Update.
1658 * graphite-sese-to-poly.h (struct base_alias_pair): New.
1659 (ALIAS_SET_INDEX): Remove.
1660 (BASE_OBJECT_SET_INDEX): Remove.
1662 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1664 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
1666 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1668 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
1669 loop upper bounds for 1-element arrays at end of structures.
1670 * tree-flow.h (array_at_struct_end_p): Declared.
1671 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
1673 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1675 * g++.dg/graphite/pr41305.C: New.
1677 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
1679 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
1680 construction of parameter constraints from loop iteration analysis.
1681 * gcc.dg/graphite/run-id-2.c: New test.
1683 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1685 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
1688 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1690 * graphite-dependences.c (dependence_polyhedron_1): Remove
1691 unused gdim dimensions from the DDR polyhedron.
1693 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1695 * graphite-dependences.c (pddr_transformed_scattering): New.
1696 (dot_original_deps_stmt_1): New.
1697 (dot_transformed_deps_stmt_1): New.
1698 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
1699 dot_transformed_deps_stmt_1.
1700 (dot_original_deps): New.
1701 (dot_transformed_deps): New.
1702 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
1704 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1706 * graphite-dependences.c (reduction_dr_1): Remove wrong
1707 assert: reduction BBs can have multiple reduction writes
1708 to memory. interchange-3.f90 is an example.
1710 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1712 * gfortran.dg/graphite/interchange-3.f90: New.
1714 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1716 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
1718 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1720 * graphite-dependences.c (dependence_polyhedron_1): Add the
1721 context to the dependence polyhedron.
1723 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1725 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
1726 PBB_PDR_DUPLICATES_REMOVED.
1727 (new_poly_bb): Same.
1729 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1731 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
1733 (build_loop_iteration_domains): Extract bounds on parameters
1734 based on the data size.
1735 (build_scop_context): Do not initialize SCOP_CONTEXT;
1736 add new constraints.
1738 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1740 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
1741 * graphite-ppl.h (graphite-ppl.h): Declared.
1743 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1745 * graphite-ppl.c (ppl_print_linear_expr): New.
1746 (debug_ppl_linear_expr): New.
1747 * graphite-ppl.h (ppl_print_linear_expr): Declared.
1748 (debug_ppl_linear_expr): Declared.
1750 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1752 * graphite-interchange.c: Fix comments.
1753 * gcc.dg/graphite/block-1.c: Fix comments.
1755 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1757 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
1758 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
1760 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1762 Reapply the patch from Alexander Monakov that disappeared during
1763 the last merges from trunk.
1765 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
1767 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1768 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
1770 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1772 * graphite-interchange.c (memory_stride_in_loop): The depth
1773 argument corresponds to a dynamic time dimension, so use
1774 psct_dynamic_dim to refer to the transformed scattering dimension.
1776 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1778 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
1780 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1782 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
1784 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
1785 the root of the LST.
1786 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
1788 (print_lst): Print the root of LST in a different format.
1789 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
1791 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1793 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
1795 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1797 * doc/passes.texi: Document the Graphite infrastructure.
1799 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1801 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
1802 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
1803 and check the SSA representation.
1805 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
1807 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1809 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
1811 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1813 * gcc.dg/graphite/interchange-11.c: New.
1815 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1817 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
1819 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1821 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1822 Add -fno-loop-strip-mine and -fno-loop-interchange.
1823 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
1824 -fno-loop-strip-mine.
1825 * gfortran.dg/graphite/graphite.exp: Same.
1827 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1829 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1830 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
1831 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
1832 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
1833 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
1834 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
1835 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
1836 DEFAULT_FLAGS_GRAPHITE_SCOP.
1837 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
1838 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
1840 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1842 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
1844 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1845 Sebastian Pop <sebastian.pop@amd.com>
1847 * graphite-interchange.c (build_linearized_memory_access): Pass an
1848 offset as parameter.
1849 (memory_stride_in_loop): Include transform scattering in the
1850 access functions to be able to querry the strides in the
1852 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
1853 not the psct_iterator_dim.
1855 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1857 * graphite-blocking.c (pbb_do_strip_mine): Removed.
1858 (lst_do_strip_mine_loop): New.
1859 (lst_do_strip_mine): New.
1860 (scop_do_strip_mine): Call lst_do_strip_mine.
1861 * graphite-poly.h (lst_add_loop_under_loop): New.
1862 (lst_find_first_pbb): New.
1864 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1866 * graphite-poly.c (loop_to_lst): Fix LST creation.
1868 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
1870 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
1871 sizeof(unsigned long) to make it run on 32bit systems.
1873 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
1875 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
1878 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1880 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
1882 (write_alias_graph_to_ascii_dot): New.
1883 (write_alias_graph_to_ascii_ecc): Ditto.
1884 (partition_drs_to_sets): Add testing of optimality of current method
1885 which assigns alias numbers according to DFS Comopnent number. used
1886 as heuristic for the upcoming ECC algorithm.
1887 (build_scop_drs): Write to file also with the ecc and dot format.
1889 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1891 * gfortran.dg/graphite/interchange-1.f: XFail.
1893 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1895 * graphite.c (graphite_initialize): Do not handle functions with
1896 more than 100 basic blocks.
1898 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1900 * graphite-blocking.c (pbb_do_strip_mine): Use
1901 PARAM_LOOP_BLOCK_TILE_SIZE.
1903 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1905 * graphite-poly.c (dot_lst_1): New.
1907 * graphite-poly.h (dot_lst): Declared.
1909 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1911 * graphite-dependences.c (dot_deps_stmt_1): New.
1912 (dot_deps_stmt): New.
1913 * graphite-dependences.h (dot_deps_stmt): Declared.
1915 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1917 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
1918 not replace cross BB scalar dependences ending on PHI nodes.
1919 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
1921 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1923 * graphite-poly.c (apply_poly_transforms): Implement the high
1924 level driver for flag_loop_block.
1925 * opts.c (decode_options): Enable flag_loop_block at -O2.
1926 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
1929 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
1931 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1934 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1936 * graphite-poly.h (lst_find_pbb): New.
1937 (find_lst_loop): New.
1939 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1941 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
1942 * graphite-poly.h (struct scop): Remove dep_graph field.
1943 (SCOP_DEP_GRAPH): Removed.
1945 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1947 * graphite-poly.h (copy_lst): Do full copy of LST.
1949 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
1951 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
1952 when the loop stride is zero.
1954 * gcc.dg/graphite/id-16.c: New.
1956 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1958 * graphite-dependences.c (reduction_dr_1): New.
1959 (reduction_dr_p): New.
1960 (graphite_legal_transform_dr): Call reduction_dr_p.
1961 (reduction_ddr): Renamed reduction_ddr_p.
1962 * graphite-poly.h (same_pdr_p): New.
1963 (number_of_write_pdrs): New.
1964 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
1965 (split_reduction_stmt): Do not split reduction statements
1966 when there are no writes to memory.
1967 (translate_scalar_reduction_to_array_for_stmt): Insert the
1968 memory reduction statement just after the scalar reduction statement.
1970 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
1972 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
1973 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
1975 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1977 * graphite-interchange.c (lst_apply_interchange): New.
1978 (lst_interchange_profitable_p): New.
1979 (lst_try_interchange_loops): New.
1980 (lst_try_interchange): New.
1981 (lst_do_interchange): New.
1982 (pbb_do_interchange): Removed.
1983 (scop_do_interchange): Call lst_do_interchange.
1985 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1987 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
1988 SCOP_TRANSFORMED_SCHEDULE.
1993 * graphite-poly.h (lst_p): New.
1996 (LST_LOOP_FATHER): New.
1999 (scop_to_lst): Declared.
2000 (print_lst): Declared.
2001 (debug_lst): Declared.
2002 (new_lst_loop): New.
2003 (new_lst_stmt): New.
2006 (lst_dewey_number): New.
2007 (struct scop): Add original_schedule and transformed_schedule fields.
2008 (SCOP_ORIGINAL_SCHEDULE): New.
2009 (SCOP_TRANSFORMED_SCHEDULE): New.
2010 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2012 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2014 * graphite-dependences.c (reduction_ddr): New.
2015 (graphite_legal_transform_bb): Call reduction_ddr.
2016 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2017 Initialize PBB_IS_REDUCTION.
2018 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2019 (PBB_IS_REDUCTION): New.
2020 (new_poly_bb): Update declaration.
2021 * graphite-scop-detection.h (build_scop_bbs): Removed.
2022 (nb_reductions_in_loop): Removed.
2023 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2024 parameter for reductions.
2025 (try_generate_gimple_bb): Update call to new_poly_bb.
2026 (build_scop_bbs_1): Same.
2027 (build_scop_bbs): Same.
2028 (gsi_for_phi_node): New.
2029 (scalar_close_phi_node_p): Remove gcc_assert.
2030 (split_reduction_stmt): New.
2031 (is_reduction_operation_p): New.
2032 (phi_contains_arg): New.
2033 (follow_ssa_with_commutative_ops): New.
2034 (detect_commutative_reduction_arg): New.
2035 (detect_commutative_reduction_assign): New.
2036 (follow_inital_value_to_phi): New.
2037 (edge_initial_value_for_loop_phi): New.
2038 (initial_value_for_loop_phi): New.
2039 (detect_commutative_reduction): New.
2040 (translate_scalar_reduction_to_array_for_stmt): New.
2041 (insert_copyout): New.
2042 (insert_copyin): New.
2043 (translate_scalar_reduction_to_array): New.
2044 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2045 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2046 (rewrite_commutative_reductions_out_of_ssa): New.
2047 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2048 * sese.h (split_region_for_bb): New.
2050 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2051 * gcc.dg/graphite/interchange-1.c: Fix format.
2052 * gcc.dg/graphite/interchange-10.c: New.
2054 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2056 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2059 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2061 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2062 (rewrite_cross_bb_scalar_dependence): New.
2063 (rewrite_cross_bb_scalar_deps): New.
2064 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2065 Call rewrite_cross_bb_scalar_deps.
2067 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2069 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2070 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2073 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2075 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2076 * graphite-interchange.c (pbb_do_interchange): Same.
2077 * graphite-poly.c (print_scattering_function): Same.
2079 * graphite-poly.h (pbb_loop): New.
2080 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2082 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2084 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2086 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2088 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2089 so don't pass a pointer to it.
2090 (build_alias_set_for_drs): Same.
2091 (build_base_obj_set_for_drs): Same.
2092 (build_scop_drs): Same.
2094 2009-09-26 Li Feng <nemokingdom@gmail.com>
2096 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2097 the alias graph of data references.
2099 2009-09-25 Li Feng <nemokingdom@gmail.com>
2101 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2102 (build_scop_drs): When debugging, write the alias graph to file,
2103 otherwise, should be disabled.
2105 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2107 * Merge from mainline (151310:151361).
2109 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2111 * Merge from mainline (151171:151310).
2113 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2115 * Merge from mainline (151171:151806).
2117 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2119 * Revert the last commit.
2121 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2123 * Merge from mainline (151171:151819).
2125 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2127 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2128 (is_simple_operand): Remove call to stmt_simple_memref_p.
2129 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2131 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2133 * gcc.dg/graphite/interchange-mvt.c: New File.
2134 * gcc.dg/graphite/scop-dsyrk.c: New File.
2135 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2136 * gcc.dg/graphite/scop-mvt.c: New File.
2137 * gcc.dg/graphite/scop-sor.c: New File.
2139 2009-09-17 Li Feng <nemokingdom@gmail.com>
2141 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2142 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2143 (graphite_carried_dependence_level_k): Ditto.
2144 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2145 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2146 (new_poly_dr): Adjust declaration.
2147 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2148 (free_gimple_bb): Added free_data_refs_aux.
2149 (build_poly_dr): Add dr_base_object_set.
2150 (partition_drs_to_sets): New.
2151 (dr_same_base_object_p): New.
2152 (build_alias_set_for_drs): New.
2153 (build_base_object_set_for_drs): New.
2154 (build_scop_drs): Add build_base_obj_set_for_drs.
2155 * graphite-sese-to-poly.h: Added #define for alias set number index and
2156 base object set index.
2157 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2158 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2160 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2162 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2163 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2165 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2167 * graphite-sese-to-poly.c (struct irp_data): Removed.
2168 (idx_record_params): Removed.
2169 (find_params_in_bb): Scan for parameters the access functions; don't
2170 parse the tree representation.
2172 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2174 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2175 passes at -O1 and below.
2177 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2179 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2180 tree-scalar-evolution.h, and then tree-data-ref.h.
2181 * graphite-clast-to-gimple.c: Same.
2182 * graphite-dependences.c: Same.
2183 * graphite-interchange.c: Same.
2184 * graphite-poly.c: Same.
2185 * graphite-scop-detection.c: Same.
2186 * graphite-sese-to-poly.c: Same.
2188 * lambda-code.c: Same.
2189 * matrix-reorg.c: Same.
2190 * tree-data-ref.c: Same.
2191 * tree-if-conv.c: Same.
2192 * tree-loop-distribu: Same.: Same.
2193 * tree-loop-linear.c: Same.
2194 * tree-parloops.c: Same.
2195 * tree-predcom.c: Same.
2196 * tree-vect-patterns.c: Same.
2198 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2200 Partially revert the previous patch, except the following.
2201 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2202 as parameters the operands of the not expression.
2204 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2206 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2207 Do not call analyze_scalar_evolution on assignments.
2208 (instantiate_scev_phi): Call analyze_scalar_evolution.
2209 (instantiate_scev_name): Call instantiate_scev_assign and
2210 instantiate_scev_phi.
2211 (instantiate_scev_not): Adapted to pass as parameters the operands
2212 of the not expression.
2214 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2216 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2217 to pass as parameters the operands of the binary expression.
2219 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2221 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2222 instantiate_scev_not. Handle NEGATE_EXPR.
2223 (instantiate_scev_r): Handle NEGATE_EXPR.
2225 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2227 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2229 (instantiate_scev_r): Move code in instantiate_scev_2
2230 and instantiate_scev_1.
2232 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2234 * tree-scalar-evolution.c (instantiate_scev_3): New.
2235 (instantiate_scev_1): Move code in instantiate_scev_3.
2237 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2239 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2240 (instantiate_scev_1): Move code in instantiate_scev_poly.
2242 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2244 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2245 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2247 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2249 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2250 (instantiate_scev_1): Move code in instantiate_scev_convert.
2252 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2254 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2255 (instantiate_scev_1): Move code in instantiate_scev_binary.
2257 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2259 * tree-scalar-evolution.c (instantiate_scev_name): New.
2260 (instantiate_scev_1): Move code in instantiate_scev_name.
2262 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2264 * Merge from mainline (150992:151171).
2266 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2268 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2270 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2272 * graphite-dependences.c (graphite_legal_transform_bb): Call
2273 pbb_remove_duplicate_pdrs.
2274 * graphite-poly.c (can_collapse_pdr): Removed.
2275 (pdr_find_duplicate): Removed.
2276 (can_collapse_pdrs): New.
2277 (pbb_remove_duplicate_pdrs): New.
2278 (new_poly_dr): Do not look for duplicates.
2279 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2280 (PBB_PDR_DUPLICATES_REMOVED): New.
2281 (pbb_remove_duplicate_pdrs): Declared.
2283 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2285 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2286 the strides by multiplying by PDR_NB_REFS.
2287 * graphite-poly.c (can_collapse_pdr): New.
2288 (pdr_find_duplicate): New.
2289 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2290 Initialize PDR_NB_REFS.
2291 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2293 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2295 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2297 Revert one of the previous commits:
2298 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2299 the computation of symmetric data dependence relations.
2300 (dependency_between_pbbs_p): Same.
2302 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2305 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2308 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2310 * graphite-dependences.c (pddr_original_scattering): Return NULL
2311 for read-read dependence relations.
2312 * graphite-poly.h (enum poly_dr_type): Fix comment.
2315 (pdr_may_write_p): New.
2317 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2319 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2320 (struct poly_dr): Same.
2321 (new_poly_dr): Same.
2322 * graphite-poly.c (new_poly_dr): Same.
2324 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2325 Sebastian Pop <sebastian.pop@amd.com>
2327 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2328 pbb_strip_mine_time_depth. Changed the implementation so that
2329 transformation is expressed as a transformation on
2330 time (scatttering) dimensions. Also, ensures that the 2d+1
2331 scheduling format is preserved.
2332 (pbb_strip_mine_profitable_p): Profitability is based on the
2333 iteration number of a given time (scattering) dimension,
2334 and not on a original loop depth dimension.
2335 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2336 (pbb_do_strip_mine): Call psct_dynamic_dim.
2337 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2338 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2339 (pbb_nb_dynamic_scattering_transform): New.
2340 (psct_dynamic_dim): New.
2342 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2344 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2345 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2346 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2347 * graphite-interchange.c (build_linearized_memory_access): Same.
2348 (memory_stride_in_loop): Same.
2350 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2352 * graphite-dependences.c (pddr_original_scattering): New.
2353 (graphite_legal_transform_dr): Call pddr_original_scattering.
2356 * graphite-dependences.h (dot_deps): Declared.
2357 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2358 (print_pdr): Print PDR_ID.
2359 * graphite-poly.h (struct poly_dr): Add field id.
2362 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2364 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2366 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2367 not delete the original dependence relation.
2369 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2371 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2372 the computation of symmetric data dependence relations.
2373 (dependency_between_pbbs_p): Same.
2375 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2377 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2378 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2379 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2380 (free_poly_ddr): New.
2381 (pddr_is_empty): New.
2382 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2383 (dependence_polyhedron): Same. Remove useless gcc_assert.
2385 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2386 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2387 * graphite-dependences.h (enum poly_dependence_kind): New.
2388 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2389 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2390 (PDRP_SINK): Renamed PDDR_SINK.
2391 (PDRP_DDP): Renamed PDDR_DDP.
2393 (free_poly_ddr): Declared.
2394 * graphite-poly.c (new_scop): Use the new hash function names.
2395 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2396 into original_pddrs.
2397 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2399 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2401 * Merge from mainline (150764:150992).
2403 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2405 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2406 bounds with LT_EXPR to make niter analysis more precise on code
2407 generated by Graphite.
2409 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2411 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2412 (graphite_legal_transform_bb): Same.
2413 (poly_drs_may_alias_p): Same.
2415 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2418 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2419 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2421 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2423 * graphite-poly.c (print_pbb): Print PBB index.
2425 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2427 * Merge from mainline (r150672:150764).
2429 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2431 * graphite-interchange.c (ppl_max_for_le): Moved...
2432 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2433 * graphite-ppl.c (ppl_max_for_le): ... here.
2434 * graphite-ppl.h (ppl_max_for_le): Declared.
2436 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2438 * Merge from mainline (r150372:150672).
2440 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2443 * sese.c (convert_for_phi_arg): New.
2444 (add_guard_exit_phis): Use convert_for_phi_arg.
2446 * gfortran.dg/graphite/id-17.f: New.
2448 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2450 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2451 unknown subscript upper bounds.
2453 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2455 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2456 Pranav Garg <pranav.garg2107@gmail.com>
2458 * graphite-interchange.c (gather_access_strides): Removed.
2459 (ppl_max_for_le): New.
2460 (build_linearized_memory_access): New.
2461 (memory_stride_in_loop): New.
2462 (pbb_interchange_profitable_p): Reimplemented.
2463 * graphite-ppl.h (ppl_new_id_map): New.
2464 (ppl_interchange): New.
2466 * gcc.dg/graphite/interchange-6.c: XFAILed.
2468 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2470 * graphite-interchange.c (compute_subscript): Removed.
2471 (compute_array_size_cstr): Removed.
2472 (compute_array_size_poly): Removed.
2473 (compute_array_size): Removed.
2474 (gather_access_strides_poly): Removed.
2475 (gather_access_strides): Empty.
2477 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2479 * graphite-dependences.c (dependence_polyhedron_1): Replace
2480 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2481 (graphite_legal_transform_dr): Same.
2482 (graphite_carried_dependence_level_k): Same.
2483 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2484 Initialize PDR_NB_SUBSCRIPTS.
2485 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2487 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2488 (PDR_NB_SUBSCRIPTS): New.
2489 (pdr_nb_subscripts): Removed.
2490 (pdr_dim): Simplified.
2491 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2492 with PDR_NB_SUBSCRIPTS.
2494 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2496 * graphite-interchange.c (compute_array_size): Remove use of
2498 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2499 Do not initialize PDR_DATA_CONTAINER.
2500 (print_pdr): Do not print PDR_DATA_CONTAINER.
2501 * graphite-poly.h (struct poly_dr): Remove data_container field.
2502 (PDR_DATA_CONTAINER): Removed.
2503 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2505 (build_poly_dr): Same.
2507 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2509 * gcc.dg/graphite/interchange-9.c: New.
2511 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2512 Sebastian Pop <sebastian.pop@amd.com>
2514 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2515 copy of the dependence polyhedron. Free the temporary objects.
2516 (graphite_carried_dependence_level_k): Free unused objects before
2519 * gcc.dg/graphite/interchange-1.c: XFAILed.
2520 * gcc.dg/graphite/interchange-2.c: XFAILed.
2521 * gcc.dg/graphite/interchange-3.c: XFAILed.
2522 * gcc.dg/graphite/interchange-4.c: XFAILed.
2523 * gcc.dg/graphite/interchange-7.c: XFAILed.
2525 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2527 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2528 Early return without analyzing the data dependences if no
2529 transform has been done. Call restore_scattering if the transform
2531 (graphite-interchange.c): Same.
2532 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2533 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2534 (apply_poly_transforms): Do not gcc_assert that
2535 the transform is legal.
2536 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2537 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
2538 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
2539 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2540 * graphite-poly.h (struct poly_scattering): New.
2541 (struct poly_bb): Add original, transformed, and saved fields.
2542 Remove transformed_scattering, original_scattering, nb_local_variables,
2543 and nb_scattering_transform fields.
2544 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
2545 (poly_scattering_new): New.
2546 (poly_scattering_free): New.
2547 (poly_scattering_copy): New.
2548 (store_scattering_pbb): New.
2549 (store_scattering): New.
2550 (restore_scattering_pbb): New.
2551 (restore_scattering): New.
2552 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2553 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
2555 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2557 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
2560 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2562 * Makefile.in (graphite.o): Depends on PREDICT_H.
2563 * graphite.c: Include predict.h.
2564 (graphite_finalize): Call tree_estimate_probability.
2565 * predict.c (predict_loops): Do not call scev_initialize and
2567 (tree_estimate_probability_bb): New.
2568 (tree_estimate_probability): Do not initialize loops: move that
2569 code to the driver. Call tree_estimate_probability_bb.
2570 (tree_estimate_probability_driver): New.
2571 (pass_profile): Use tree_estimate_probability_driver.
2572 * predict.h (tree_estimate_probability): Declared.
2574 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2576 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
2577 * graphite-dependences.c (graphite_legal_transform): Add time to
2578 TV_GRAPHITE_DATA_DEPS.
2579 (dependency_between_pbbs_p): Same.
2580 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2582 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
2584 * Merge from mainline (r149952:150372).
2586 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2588 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
2589 * graphite-blocking.c: Same.
2590 * graphite-clast-to-gimple.c: Same.
2591 * graphite-dependences.c: Same.
2592 * graphite-poly.c: Same.
2593 * graphite-poly.h: Same.
2594 * graphite-ppl.c: Same.
2595 * graphite-scop-detection.c: Same.
2596 * graphite-sese-to-poly.c: Same.
2599 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2601 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
2602 (remove_simple_copy_phi): New.
2603 (remove_invariant_phi): New.
2604 (simple_copy_phi_p): New.
2605 (reduction_phi_p): New.
2606 (gsi_for_ssa_name_def): New.
2607 (insert_out_of_ssa_copy): New.
2608 (insert_out_of_ssa_copy_on_edge): New.
2609 (create_zero_dim_array): New.
2610 (scalar_close_phi_node_p): New.
2611 (rewrite_close_phi_out_of_ssa): New.
2612 (rewrite_phi_out_of_ssa): New.
2613 (rewrite_reductions_out_of_ssa): New.
2614 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
2616 * gcc.dg/graphite/id-11.c: New.
2617 * gcc.dg/graphite/id-15.c: New.
2618 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
2619 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
2620 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
2621 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
2622 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
2623 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
2624 * gfortran.dg/graphite/id-13.f: New.
2625 * gfortran.dg/graphite/id-5.f: New.
2627 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2629 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
2630 check that nb_reductions_in_loop is zero.
2631 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
2632 reduction phi nodes.
2633 (nb_reductions_in_loop): Removed.
2634 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
2635 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
2636 (bb_contains_non_iv_scalar_phi_nodes): Removed.
2637 (scop_contains_non_iv_scalar_phi_nodes): Removed.
2638 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
2640 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2642 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
2643 statements that have an empty iteration domain.
2644 * gfortran.dg/graphite/id-16.f: New.
2646 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2648 * tree-scalar-evolution.c (instantiate_scev_1): Return
2649 chrec_dont_know when the result is not above instantiate_below.
2650 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
2651 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
2652 the tree has a known scalar evolution.
2653 * gfortran.dg/graphite/id-14.f: New.
2654 * gfortran.dg/graphite/id-15.f: New.
2656 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2658 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
2660 (rename_variables): Keep inserting renames after the ones already
2663 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2665 * graphite-sese-to-poly.c (compare_bb_depths): New.
2666 (graphite_sort_dominated_info): New.
2667 (build_scop_bbs_1): Call graphite_sort_dominated_info.
2668 (build_scop_scattering): Fix comment.
2670 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2672 * graphite.c (graphite_finalize): Call print_loops instead of
2673 dump_function_to_file.
2674 * gcc.dg/graphite/graphite.exp: Fix formatting.
2675 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
2676 loops generated in the graphite output file.
2677 * gcc.dg/graphite/pr35356-2.c: New.
2678 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
2679 * gfortran.dg/graphite/id-12.f: New.
2681 2009-07-24 Li Feng <nemokingdom@gmail.com>
2683 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
2686 2009-07-24 Li Feng <nemokingdom@gmail.com>
2687 Tobias Grosser <grosser@fim.uni-passau.de>
2689 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
2690 alias set number build alias in ACCESSES polyhedron.
2691 (build_alias_set_for_drs): New.
2692 (build_pbb_drs): Added build_alias_set_for_drs.
2693 * graphite-dependences.c (poly_drs_may_alias_p): New.
2694 (graphite_carried_dependence_level_k): Check alias information
2695 before building polyhedron.
2697 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2699 * Makefile.in (lambda-code.o): Fix formatting.
2701 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2703 * Merge from mainline (r149350-149952)
2705 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2707 * graphite-poly.c (apply_poly_transforms): Move strip_mine
2708 before interchange to prepare for loop blocking.
2710 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2712 * graphite-poly.c (apply_poly_transforms): Add checks after every
2714 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
2715 done in apply_poly_transforms.
2717 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2719 * graphite-dependences.c (build_lexicographically_gt_constraint):
2720 Replace RES parameter with *RES.
2721 (dependence_polyhedron_1): Pass an address of the parameter RES
2722 instead of value of RES.
2724 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2726 * graphite.c (graphite_finalize): Fix comment.
2727 (graphite_transform_loops): Reset scev info after code generation
2730 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2732 * graphite.c (graphite_finalize): Call scev_reset.
2734 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2736 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
2737 GBB_CLOOG_IV_TYPES hash table twice.
2738 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
2739 (add_condition_to_domain): Clear GMP values.
2741 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2743 * graphite-dependences.c: Fix formatting.
2744 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
2745 (pbb_number_of_iterations): Free ppl_Linear_Expression.
2746 * graphite-sese-to-poly.c: Fix formatting.
2747 * graphite.c (graphite_transform_loops): Create the hash table
2748 after the early return.
2750 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2752 * gcc.dg/graphite/id-14.c: New.
2753 * gcc.dg/graphite/pr40157.c: New.
2754 * gfortran.dg/graphite/id-11.f: New.
2756 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2758 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
2759 (build_poly_scop): Return false when there are no pbbs within
2760 loops to avoid to pass to cloog scops with no loops.
2762 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2764 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
2765 useless test "i % 2".
2766 (build_pbb_scattering_polyhedrons): Fix formatting.
2767 (build_poly_dr): Same.
2768 * graphite.c (graphite_transform_loops): Restructure.
2770 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
2772 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
2773 reduction_list parameter.
2774 (rewrite_all_phi_nodes_with_iv): Same.
2775 (canonicalize_loop_ivs): Same.
2776 * tree-parloops.c (struct brli): Removed.
2777 (build_reduction_list_info): Removed.
2778 (build_new_reduction): New.
2779 (analyze_reduction_list): Removed.
2780 (gather_scalar_reductions): Find reductions instead of phi
2781 nodes that can't be canonicalized.
2782 (try_create_reduction_list): Remove reduction_list parameter.
2783 (gen_parallel_loop): Same.
2784 (parallelize_loops): Remove analyze_reductions variable,
2785 initialization and free.
2786 Change reduction_list htab initialization to reduction_info
2787 elements instead of ssa names.
2788 Call try_create_reduction_list and gen_parallel_loop without
2789 analyzed_reduction argument.
2790 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
2791 canonicalize_loop_ivs with one less argument.
2792 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
2794 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2796 * graphite-dependences.c (new_poly_dr_pair): New.
2797 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
2798 (new_poly_dr_pair): New.
2799 (eq_poly_dr_pair_p): New.
2800 (hash_poly_dr_pair_p): New.
2801 * graphite-dependences.h (struct poly_dr_pair): New.
2802 (eq_poly_dr_pair_p): Declared.
2803 (hash_poly_dr_pair_p): Declared.
2804 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
2805 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
2806 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
2807 * Makefile.in (graphite-poly.o): Add dependence on
2808 graphite-dependences.h.
2810 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2812 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
2813 polynomials of degree > 1 pass to Graphite.
2814 * tree-chrec.c (scev_is_linear_expression): Call
2815 evolution_function_is_affine_multivariate_p.
2816 * gfortran.dg/graphite/id-10.f90: New.
2818 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2820 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
2821 Instantiate scevs varying in outer loops.
2822 * gfortran.dg/graphite/id-9.f: Correct testcase.
2824 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2826 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
2827 redundant constraint.
2829 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2831 * gcc.dg/graphite/graphite.exp: Fix comments.
2832 * gfortran.dg/graphite/graphite.exp: Trigger actions
2833 based on the file names as in the C testsuite.
2834 * gfortran.dg/graphite/block-1.f90: Fix patterns.
2835 * gfortran.dg/graphite/block-2.f: Same.
2836 * gfortran.dg/graphite/block-3.f90: Same.
2837 * gfortran.dg/graphite/block-4.f90: Same.
2838 * gfortran.dg/graphite/id-1.f90: Same.
2839 * gfortran.dg/graphite/id-2.f90: Same.
2840 * gfortran.dg/graphite/id-3.f90: Same.
2841 * gfortran.dg/graphite/id-4.f90: Same.
2842 * gfortran.dg/graphite/id-6.f: Same.
2843 * gfortran.dg/graphite/id-9.f: Same.
2844 * gfortran.dg/graphite/interchange-1.f: Same.
2845 * gfortran.dg/graphite/interchange-2.f: Same.
2846 * gfortran.dg/graphite/scop-1.f: Same.
2848 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2850 * sese.c (expand_scalar_variables_call): New.
2851 (expand_scalar_variables_ssa_name): Handle calls in expander.
2853 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2855 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
2856 Expect to see the pattern twice.
2857 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
2858 * gcc.dg/graphite/interchange-5.c: Same.
2859 * gcc.dg/graphite/interchange-6.c: Same.
2861 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2863 * gcc.dg/graphite/id-10.c: New.
2864 * gcc.dg/graphite/id-12.c: New.
2865 * gfortran.dg/graphite/id-7.f: New.
2866 * gfortran.dg/graphite/id-8.f: New.
2868 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2870 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
2873 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2875 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
2877 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2879 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
2881 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2883 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
2884 building PDR subscripts.
2886 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2888 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
2889 computation of array sizes.
2891 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2893 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
2895 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
2897 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
2898 build_pairwise_constraint, dr_equality_constraints,
2899 build_pairwise_scheduling_equality,
2900 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2901 build_lexicographically_gt_constraint, dependence_polyhedron,
2902 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
2903 Move from NNC_Polyhedron to C_Polyhedron.
2904 * graphite-interchange.c (compute_array_size_poly,
2905 gather_access_strides): Dito.
2906 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
2907 free_scop, pbb_number_of_iterations): Dito.
2908 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
2909 pbb_dim_iter_domain, struct scop): Dito.
2910 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
2911 new_Cloog_Domain_from_ppl_Polyhedron,
2912 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
2913 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
2914 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
2915 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
2916 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
2917 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
2918 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
2919 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
2920 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
2921 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
2922 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
2923 build_scop_iteration_domain, build_poly_dr): Dito
2925 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2927 * gcc.dg/graphite/graphite.exp: Added a rule to execute
2929 * gcc.dg/graphite/run-id-1.c: New.
2931 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2933 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
2934 positivity constraint on the symbolic number of iterations.
2936 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2938 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
2940 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2941 Tobias Grosser <grosser@fim.uni-passau.de>
2943 * graphite-clast-to-gimple.c (build_scop_context): Removed.
2944 (build_cloog_prog): Directly use SCOP_CONTEXT.
2945 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
2946 (free_scop): Free SCOP_CONTEXT.
2947 (print_scop_context): New.
2948 (print_scop): Call print_scop_context.
2949 (debug_scop_context): New.
2950 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
2951 (struct scop): Added field context.
2952 (SCOP_CONTEXT): New.
2953 * graphite-sese-to-poly.c (add_param_constraints): New.
2954 (build_scop_context): New.
2955 (build_poly_scop): Call build_scop_context.
2957 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2959 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
2960 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
2961 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
2962 * graphite-ppl.h: Include double-int.h and tree.h.
2963 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
2964 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
2965 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
2966 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
2968 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2970 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
2971 POINTER_PLUS_EXPR for pointer types.
2972 (clast_to_gcc_expression): Same.
2974 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2976 * graphite-poly.c (print_scattering_function): Early return when
2977 PBB_TRANSFORMED_SCATTERING is not initialized.
2978 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
2980 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
2982 * tree-parloops.c (analyze_reduction_list): Remove unused variable
2985 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
2987 * tree-parloops.c (analyze_reduction_list): Change return
2989 (try_create_reduction_list): Move the call to
2990 analyze_reduction_list to the beginining.
2991 Call reduction_phi with analyzed_reductions as argument
2992 instead of reduction_list.
2994 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
2996 * Merge from mainline (r148296:149346)
2998 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3000 * graphite-scop-detection.c (graphite_can_represent_init): New.
3001 (graphite_can_represent_scev): Call graphite_can_represent_init:
3002 check that the initial value does not contain multiplications of
3004 (stmt_has_simple_data_refs_p): New.
3005 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3006 (is_simple_operand): Fix formatting.
3007 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3009 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3011 * gcc.dg/graphite/id-13.c: New.
3012 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3013 analyze_scalar_evolution, use scalar_evolution_in_region.
3014 (scan_tree_for_params_right_scev): Add extra assert.
3015 (parameter_index_in_region_1): Split from parameter_index_in_region.
3016 (idx_record_params): Use scalar_evolution_in_region.
3017 (find_params_in_bb): Same.
3018 (find_scop_parameters): Same.
3019 (build_loop_iteration_domains): Same.
3020 (create_linear_expr_from_tree): Same.
3021 * sese.c (scalar_evolution_in_region): New.
3022 * sese.h (scalar_evolution_in_region): Declared.
3023 (defined_in_sese_p): New.
3024 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3026 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3029 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3031 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3032 TREE_DATA_REF_H also implies SCEV_H.
3034 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3036 * graphite-poly.c (print_scop_params): New.
3037 (print_scop): Call print_scop_params.
3038 (debug_scop_params): New.
3039 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3041 2009-07-07 Li Feng <nemokingdom@gmail.com>
3043 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3044 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3045 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3046 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3047 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3048 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3050 2009-07-07 Li Feng <nemokingdom@gmail.com>
3052 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3053 for dependency checking part.
3054 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3055 tests for dependency checking.
3056 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3057 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3058 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3059 flag -fdump-tree-graphite-all for autopar testsuites.
3061 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3063 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3064 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3065 canonicalize_loop_ivs): Moved...
3066 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3068 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3070 * tree-parloops.c (try_create_reduction_list): Pass an extra
3071 argument analyzed_reductions. Call analyze_reduction_list.
3072 (gen_parallel_loop): Do not call analyze_reduction_list.
3073 (parallelize_loops): Init and finalize analyzed_reductions.
3075 2009-07-06 Li Feng <nemokingdom@gmail.com>
3077 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3078 Added flag -fno-loop-strip-mine for autopar testcase.
3080 2009-07-04 Li Feng <nemokingdom@gmail.com>
3082 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3083 transformed scattering dimension instead of unmatch orignal when
3084 calling dependence_polyhedron.
3086 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3088 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3090 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3092 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3093 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3095 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3097 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3098 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3099 * graphite-poly.c (pbb_number_of_iterations): New.
3100 * graphite-poly.h (pbb_number_of_iterations): Declared.
3101 (pbb_iterator_dim, pbb_parameter_dim): New.
3103 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3105 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3106 last commit on type of lower and upper bound of loops.
3108 2009-06-29 Li Feng <nemokingdom@gmail.com>
3110 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3111 graphite-dependences.h.
3112 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3113 (mark_bb_with_pbb): New.
3114 (get_stmtfor_depth): New.
3115 (find_pbb_via_hash): New.
3116 (dependency_in_loop_p): New.
3117 (mark_loops_parallel): New.
3118 (free_aux_in_new_loops): New.
3119 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3120 bb with it's relevant pbb. Mark newly created loops. Remove mark
3121 innermost loop parallel without checking.
3122 (gloog): Add parameter BB_PBB_MAPPING.
3123 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3124 (gloog): Change declaration.
3125 (mark_loop_parallel): Make extern.
3126 (free_aux_in_new_loops): Declare.
3127 (bb_pbb_map_hash): New.
3128 (eq_bb_pbb_map): New.
3129 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3130 auto parallelization when flag_graphite_force_parallel is set.
3131 (graphite_finalize): Added free_aux_in_new_loops.
3132 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3133 the innermost loop that marked parallel. Use
3134 flag_graphite_force_parallel instead of loop->can_be_parallel.
3135 (loop_parallel_p): Move inner most checking out of function.
3137 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3139 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3140 type of lower and upper bound of loops signed long int.
3142 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3144 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3145 expression outside the loop.
3147 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3149 * gcc.dg/graphite/interchange-8.c: New.
3151 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3153 * gcc.dg/graphite/interchange-0.c: XFailed.
3154 * gcc.dg/graphite/interchange-5.c: XFailed.
3155 * gcc.dg/graphite/interchange-6.c: XFailed.
3157 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3159 * graphite-interchange.c (compute_array_size_poly): The end of the
3160 recursion should return 1.
3162 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3164 * graphite-interchange.c (compute_array_size_cstr): Allow the
3165 subscript multiplier to be -1.
3166 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3167 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3168 data_container. Initializes PDR_DATA_CONTAINER.
3169 (print_pdr_access_layout): New.
3170 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3171 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3173 (PDR_DATA_CONTAINER): New.
3174 (new_poly_dr): Update declaration.
3175 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3176 (build_poly_dr): Call pdr_add_data_dimensions.
3178 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3180 * graphite-poly.h (struct poly_dr): Fix comment.
3181 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3182 (pdr_add_memory_accesses): New.
3183 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3185 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3187 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3188 (print_pbb): Add call to print_pdrs.
3189 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3191 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3192 Li Feng <nemokingdom@gmail.com>
3194 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3195 (dependency_between_pbbs_p): New.
3196 (lexicographically_gt_p): Assure !empty_p before polyhedron
3197 intersection assign.
3198 (build_lexicographically_gt_constraint): Correct lexicographically
3200 * graphite-dependences.h: New.
3201 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3203 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3205 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3206 (gloog): Print to dump_file the generated clast.
3207 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3208 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3210 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3212 * graphite-poly.c (extend_scattering): Increment
3213 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3215 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3217 * graphite-interchange.c (compute_array_size_poly): Added exit of
3218 recursion condition. Continue iterating even after the first equality.
3219 (compute_array_size): Same.
3221 2009-06-24 Li Feng <nemokingdom@gmail.com>
3223 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3224 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3225 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3226 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3227 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3229 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3231 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3232 only when the use verifies is_gimple_reg.
3234 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3236 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3237 Allocate scaldims after call to unify_scattering_dimensions.
3239 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3241 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3243 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3244 Albert Cohen <albert.cohen@inria.fr>
3246 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3247 variables for the strip mining.
3249 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3250 Pranav Garg <pranav.garg2107@gmail.com>
3252 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3253 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3254 (graphite-blocking.o): New rule.
3255 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3256 * graphite-blocking.c: New.
3257 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3258 flag_loop_strip_mine.
3259 (psct_scattering_dim_for_loop_depth): New.
3260 * graphite-poly.h (scop_do_strip_mine): Declared.
3261 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3262 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3263 flag_loop_strip_mine.
3265 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3267 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3268 a GMP value and a PPL coefficient at each iteration of a loop.
3270 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3272 * graphite-dependences.c (dependence_polyhedron): Do not use
3273 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3274 pbb_nb_scattering_transform.
3275 (graphite_legal_transform_dr): Same.
3276 * graphite-poly.c (extend_scattering): Same.
3277 (unify_scattering_dimensions): Same.
3278 (print_scattering_function): Same.
3279 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3280 PBB_NB_LOCAL_VARIABLES.
3281 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3282 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3283 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3284 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3285 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3286 (pbb_nb_scattering_transform): New.
3287 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3288 (psco_scattering_dim): Add assert on parameters.
3289 (psct_scattering_dim): Same.
3290 (psct_scattering_dim_for_loop_depth): Declared.
3291 (psct_local_var_dim): New.
3292 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3293 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3294 correct layout, call pbb_nb_local_vars.
3295 (psct_add_local_variable, psct_add_scattering_dimension): New.
3296 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3297 Initialize PBB_NB_SCATTERING_TRANSFORM.
3299 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3301 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3302 (set_coef): Renamed ppl_set_coef.
3303 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3305 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3307 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3308 test a boolean against 1.
3309 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3310 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3311 (pbb_do_interchange): Returns true when a transform has been performed.
3312 (scop_do_interchange): Same.
3313 * graphite-poly.c (apply_poly_transforms): Use the return value of
3314 scop_do_interchange.
3315 * graphite-poly.h (scop_do_interchange): Update declaration.
3317 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3319 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3321 * sese.c (sese_reset_aux_in_loops): New.
3322 * sese.h (sese_reset_aux_in_loops): New.
3324 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3326 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3327 multiplier and multiply the constant by the multiplier.
3328 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3329 (build_poly_dr): Do not use the multiplier to define the subscript.
3331 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3333 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3334 compiler's data reference. Initialize PDR_CDR.
3335 (print_pdr): Call dump_data_reference.
3336 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3337 Add compiler_dr field.
3338 (PDR_BB): Renamed PDR_PBB.
3340 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3341 GCC's data reference representation.
3342 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3343 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3345 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3347 * graphite-poly.c (print_scattering_function): Also print the layout.
3348 * graphite-poly.h (pbb_nb_local_vars): New.
3350 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3352 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3354 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3356 * graphite-poly.c (print_pdr, debug_pdr): New.
3357 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3358 (PDR_BASE): Removed.
3360 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3362 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3365 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3367 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3368 subscript identification column.
3369 (pbb_do_interchange): Print to dump_file that some loops "will be
3370 interchanged". Rely on that chain of characters in the testcases.
3371 * gcc.dg/graphite/interchange-0.c: New.
3372 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3373 interchange-*.c files and compile them with -floop-interchange.
3375 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3377 * graphite-interchange.c (interchange_profitable_p): Renamed
3378 pbb_interchange_profitable_p.
3380 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3381 Harsha Jagasia <harsha.jagasia@amd.com>
3382 Pranav Garg <pranav.garg2107@gmail.com>
3384 * graphite-interchange.c (interchange_profitable_p): Make static.
3385 (pbb_interchange_loop_depths, pbb_do_interchange,
3386 scop_do_interchange): New.
3387 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3388 for flag_loop_interchange.
3389 * graphite-poly.h (scop_do_interchange): Declared.
3390 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3391 flag_loop_interchange is used.
3393 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3395 * graphite-dependences.c (dependence_polyhedron): Update use of
3396 pbb_nb_scattering_dims.
3397 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3398 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3399 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3400 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3402 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3404 * graphite.c: Cleanup foo.
3406 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3408 * Merge from mainline (r143684:148293).
3409 * Disabled libpcp until it gets fixed.
3411 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3412 Harsha Jagasia <harsha.jagasia@amd.com>
3414 * graphite-interchange.c: New.
3415 * Makefile.in (graphite-interchange.o): New.
3416 * graphite-poly.h (interchange_profitable_p): Declared.
3417 * graphite-ppl.h (value_max): New.
3419 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3421 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3422 * graphite-poly.h: Fix some comments.
3426 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3429 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3430 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3431 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3432 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3433 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3434 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3435 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3436 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3437 * graphite-clast-to-gimple.c: Same.
3438 * graphite-dependences.c: Same.
3439 * graphite-poly.c: Same.
3440 * graphite-sese-to-poly.c: Same.
3442 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3444 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3445 expressions for an IV rename, as returned by clast_to_gcc_expression.
3446 (copy_renames): Rename new_name to expr.
3447 * sese.c (debug_rename_elt): Same.
3450 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3451 the information from the rename map.
3452 (rename_variables_in_stmt): Same.
3453 (add_loop_exit_phis): Rename new_name to expr.
3454 (insert_loop_close_phis): Same.
3455 (add_guard_exit_phis): Same. Call force_gimple_operand.
3456 * sese.h (struct rename_map_elt): Rename new_name to expr.
3457 (new_rename_map_elt): Same.
3459 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3461 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3462 * sese.c (set_rename): Make it extern.
3463 * sese.h (set_rename): Declared.
3465 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3467 * graphite-poly.c (extend_scattering): Free values.
3468 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3470 (ppl_print_powerset_matrix): Same.
3471 * graphite-scop-detection.c (free_scops_1): New.
3472 (limit_scops): Call free_scops_1.
3473 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3474 (build_poly_dr): Free PPL coefficients.
3475 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3477 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3479 * graphite-dependences.c: New.
3480 * graphite-data-ref.c: Removed.
3481 * graphite-data-ref.h: Removed.
3482 * Makefile.in (graphite-data-ref.o): Removed.
3483 (graphite-dependences.o): Added.
3484 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3485 * graphite-poly.c: Same.
3486 Move the data dependence testing to graphite-dependences.c.
3488 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3490 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3491 from graphite_cannot_represent_loop. Code refactored.
3492 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3494 2009-05-17 Li Feng <nemokingdom@gmail.com>
3496 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3497 Cover all the testcases (not only the filtered ones).
3499 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3501 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3502 unnecessary check. Update comments. Move check for REAL_TYPE here.
3503 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3504 done in (stmt_simple_for_scop_p).
3506 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3508 * graphite.c (print_global_statistics): New.
3509 (print_graphite_scop_statistic): New.
3510 (print_graphite_statistics): New.
3511 (graphite_initialize, graphite_transform_loops): Print statistics.
3512 * graphite-scop-detection (build_scops): Print statistics.
3513 (print_graphite_scop_statistics): New.
3514 (print_graphite_statistics): New.
3516 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3518 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3519 (debug_clast_name_index): Removed.
3520 (debug_clast_name_indexes_1): Removed.
3521 (debug_clast_name_indexes): Removed.
3522 (clast_name_index_elt_info): Removed.
3523 (eq_clast_name_indexes): Removed.
3524 (clast_name_to_index): Removed.
3525 (new_clast_name_index): Removed.
3526 (save_clast_name_index): Removed.
3527 (save_var_name): Moved...
3528 (init_sese_params_index): Removed.
3529 (clast_name_to_gcc): Remove use of name_tree.
3530 (initialize_cloog_names): Same.
3531 (gloog): Do not call init_sese_params_index.
3532 * graphite-sese-to-poly.c (save_var_name): ...here.
3533 (parameter_index_in_region): New.
3534 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3535 (parameter_index_in_region): Removed.
3536 (is_parameter): Remove use of name_tree.
3537 * sese.h (struct name_tree): Removed.
3538 (struct sese): Remove use of name_tree. New field params_names.
3539 (SESE_PARAMS_NAMES): New.
3540 (SESE_PARAMS): Remove duplicate.
3541 (parameter_index_in_region): Removed.
3542 (sese_nb_params): Remove use of name_tree.
3543 (struct clast_name_index): New.
3544 (new_clast_name_index): New.
3545 (clast_name_to_index): New.
3546 (save_clast_name_index): New.
3547 (debug_clast_name_index): New.
3548 (debug_clast_name_indexes_1): New.
3549 (debug_clast_name_indexes): New.
3550 (clast_name_index_elt_info): New.
3551 (eq_clast_name_indexes): New.
3553 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3555 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
3556 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
3557 (graphite_loop_normal_form): Do not pass region. Do not
3558 initialize SESE_OLDIVS.
3559 (build_graphite_loop_normal_form): Update call to
3560 graphite_loop_normal_form.
3561 * sese.c (debug_oldivs): Removed.
3562 (new_sese): Do not initialize SESE_OLDIVS.
3563 (free_sese): Do not free SESE_OLDIVS.
3564 (oldiv_for_loop): Removed.
3565 * sese.h (struct sese): Remove old_ivs.
3566 (SESE_OLDIVS): Removed.
3567 (oldiv_for_loop): Removed.
3569 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3571 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
3572 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
3573 replaced by a call to newivs_to_depth_to_newiv.
3574 (clast_to_gcc_expression): Pass newivs, remove ivstack.
3575 (clast_to_gcc_expression_red): Same.
3576 (gcc_type_for_clast_expr): Same.
3577 (gcc_type_for_clast_eq): Same.
3578 (graphite_translate_clast_equation): Same.
3579 (graphite_create_guard_cond_expr): Same.
3580 (graphite_create_new_guard): Same.
3581 (graphite_create_new_loop): Same.
3582 (build_iv_mapping): Same.
3583 (translate_clast): Same.
3585 (loop_iv_stack_patch_for_consts): Removed. *
3586 sese.c (iv_stack_entry_is_constant): Removed.
3587 (iv_stack_entry_is_iv): Removed.
3588 (loop_iv_stack_push_iv): Removed.
3589 (loop_iv_stack_insert_constant): Removed.
3590 (loop_iv_stack_pop): Removed.
3591 (loop_iv_stack_get_iv): Removed.
3592 (loop_iv_stack_get_iv_from_name): Removed.
3593 (debug_loop_iv_stack): Removed.
3594 (free_loop_iv_stack): Removed.
3595 (loop_iv_stack_remove_constants): Removed. *
3596 sese.h (iv_stack_entry_kind): Removed.
3597 (iv_stack_entry_data_union): Removed.
3598 (iv_stack_entry_struct): Removed.
3599 (iv_stack_entry_p): Removed.
3600 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
3601 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
3602 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
3603 loop_iv_stack_pop, free_loop_iv_stack): Removed.
3604 (gbb_loop_at_index): Fix indenting.
3605 (gbb_loop_index): Removed.
3607 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3609 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
3610 Call clast_name_to_index.
3612 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3614 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
3615 do not pass params. Get params from SESE_PARAMS.
3616 (clast_to_gcc_expression): Same.
3617 (clast_to_gcc_expression_red): Same.
3618 (gcc_type_for_clast_eq): Same.
3619 (graphite_translate_clast_equation): Same.
3620 (graphite_create_new_loop): Same.
3621 * sese.c (rename_variables_in_stmt): Fix comment.
3623 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3625 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
3627 Call save_clast_name_index.
3628 (translate_clast): Pass newivs_index.
3629 (gloog): Create and free newivs_index.
3631 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3633 * graphite-clast-to-gimple.c (clast_name_index): New structure.
3634 (clast_name_index_p): New type.
3635 (debug_clast_name_index): New.
3636 (debug_clast_name_indexes_1): New.
3637 (debug_clast_name_indexes): New.
3638 (clast_name_index_elt_info): New.
3639 (eq_clast_name_indexes): New.
3640 (clast_name_to_index): New.
3641 (new_clast_name_index): New.
3642 (save_clast_name_index): New.
3643 (init_sese_params_index): New.
3644 (gloog): Call init_sese_params_index.
3645 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
3646 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
3647 (free_sese): Free SESE_PARAMS_INDEX.
3648 * sese.h (struct sese): Add params_index.
3649 (SESE_PARAMS_INDEX): New.
3651 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3653 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
3654 (graphite_create_new_loop): Pass the newivs vector. Push the
3655 newly created IV to newivs.
3656 (translate_clast): Pass the newivs vector.
3657 (gloog): Create and destroy the newivs vector.
3659 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3661 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
3662 (graphite_loop_normal_form): Initialize loop->aux with the unique
3663 IV that has been created.
3665 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
3667 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
3668 scev with parameters in the base part. They where forbidden
3671 2009-05-11 Li Feng <nemokingdom@gmail.com>
3673 * gcc.dg/graphite/graphite.exp: Set different default
3674 compile options by file names.
3675 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
3676 * gcc.dg/graphite/id-{1-9}.c: Ditto.
3677 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
3678 * gcc.dg/graphite/scop-matmult.c: Ditto.
3680 2009-05-08 Li Feng <nemokingdom@gmail.com>
3682 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
3683 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
3684 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
3685 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
3687 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3689 * graphite-scop-detection (build_scops_1): Fix little bug introduced
3692 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3694 * graphite-scop-detection.c (graphite_can_represent_scev): Only
3695 allow integer constant strides.
3696 (graphite_can_represent_expr): Depend on outermost_loop.
3697 (stmt_simple_memref_p, graphite_cannot_represent_loop,
3698 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
3699 build_scops_1): Same.
3700 (scopdet_basic_block_info): Same and insert layered SCoP
3702 (try_generate_gimple_bb): Cleanup.
3703 (build_scops): Enable data references.
3705 * gcc.dg/graphite/id-5.c: New.
3706 * gcc.dg/graphite/id-9.c: New.
3707 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
3708 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
3710 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3712 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
3713 that we have not yet built for this SCoP.
3715 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3717 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
3718 for complex numbers.
3720 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3722 * graphite-ppl.c: Fix build if cloog is not available.
3724 2009-05-04 Li Feng <nemokingdom@gmail.com>
3726 * tree-parloops.c (loop_parallel_p): Remove construction of
3727 NITER and REDUCTION_LIST.
3728 (try_get_loop_niter): New.
3729 (try_create_reduction_list): New.
3730 (parallelize_loops): Bypass the failed checkings in autopar
3731 when can_be_parallel in loop structure is set to true.
3733 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3735 * gcc.dg/graphite/id-6.c: Update testcase.
3736 * gcc.dg/graphite/scop-3.c: Dito.
3738 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3740 * graphite-scop-detection.c (stmt_simple_for_scop_p):
3741 Enable EQ_EXPR and NE_EXPR again.
3743 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3745 * graphite-scop-detection.c (graphite_can_represent_scev):
3746 Add check if scev is affine multivariate.
3747 (harmful_stmt_in_bb): Check if we can represent the conditions.
3748 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
3750 * gcc.dg/graphite/id-7.c: New.
3752 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3754 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
3755 Check all bbs in region, not only the bbs that are represented in
3757 (build_poly_scop): Add newline.
3758 * gcc.dg/graphite/id-8.c: New.
3760 2009-04-30 Li Feng <nemokingdom@gmail.com>
3762 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
3763 when loop initialize.
3764 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
3765 * common.opt: Declare flag_graphite_force_parallel.
3766 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
3768 * graphite-poly.c (apply_poly_transforms): Introduce
3769 flag_graphite_force_parallel.
3770 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
3771 * toplev.c (process_options): ditto and replace a not correctly
3774 2009-04-30 Li Feng <nemokingdom@gmail.com>
3776 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
3777 Change the call of gbb_loop_at_index and/or gbb_loop_index due
3778 to the redefinition.
3779 (compute_cloog_iv_types_1): ditto.
3780 (build_iv_mapping): ditto.
3781 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
3783 (free_gimple_bb): Removed GBB_LOOPS related free part.
3784 (build_bb_loops): Removed.
3785 * sese.h (struct gimple_bb): Removed loops.
3786 (GBB_LOOPS): Removed.
3787 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
3788 (gbb_loop_index): ditto.
3790 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3792 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
3793 allow non constant strides.
3794 * gcc.dg/graphite/scop-20.c: New.
3796 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3798 * graphite-scop-detection.c (dot_all_scops): Fix system call
3799 return value warning.
3802 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3804 * gcc.dg/graphite/id-6.c: Fix pattern.
3805 * gcc.dg/graphite/scop-3.c: Same.
3807 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3809 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
3810 build_pairwise_constraint, dr_equality_constraints,
3811 build_pairwise_scheduling_equality,
3812 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3813 build_lexicographically_gt_constraint, dependence_polyhedron,
3814 graphite_legal_transform_dr, graphite_legal_transform_bb,
3815 graphite_legal_transform): New.
3816 * graphite-poly.h (graphite_legal_transform): Declared.
3817 * graphite-sese-to-poly.c (build_poly_scop): Call to
3818 graphite_legal_transform is disabled for the moment.
3820 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3822 * graphite-poly.h (pbb_nb_scattering_dims): New.
3823 (pbb_nb_scattering): Use it.
3825 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3827 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
3828 Pointset_Powerset version of ppl_insert_dimensions.
3829 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
3831 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3833 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
3835 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3837 * graphite-poly.h: Fix comment.
3839 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3841 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
3843 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3845 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
3848 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3850 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
3851 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
3854 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
3856 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
3857 handle EQ_EXPR and NE_EXPR.
3859 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
3861 * graphite-poly.h (poly_dr): Fix comment.
3863 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
3864 Tobias Grosser <grosser@fim.uni-passau.de>
3866 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
3867 with a zero dimension polyhedron.
3868 (find_scop_parameters): Move the call to scop_set_nb_params here.
3869 (build_loop_iteration_domains): Store in loop->aux the iteration
3871 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
3872 by any loop in scop.
3873 (build_poly_scop): Do not call scop_set_nb_params.
3875 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
3876 Tobias Grosser <grosser@fim.uni-passau.de>
3878 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
3879 add_condition_to_domain not GT_EXPR.
3881 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3883 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
3884 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
3885 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
3886 upper_bound_assign to calculate unions.
3887 * gcc.dg/graphite/id-6.c: New.
3889 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3891 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
3892 handle abnormal edges.
3894 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3896 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
3897 (free_poly_bb): Also free poly_drs.
3898 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
3899 (poly_dr): Polyhedron to Pointset_Powerset.
3900 (pdr_accessp_nb_subscripts): Same.
3901 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
3904 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3906 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
3907 names into more meaningful names.
3909 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3911 * gfortran.dg/graphite/interchange-1.c: New.
3912 * gfortran.dg/graphite/interchange-2.c: New.
3914 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3916 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
3918 * tree-parloops.c (rewrite_phi_with_iv): New.
3919 (rewrite_all_phi_nodes_with_iv): New.
3920 (canonicalize_loop_ivs): Call them.
3922 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3924 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
3925 graphite_find_data_references_in_stmt.
3926 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
3927 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
3929 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3931 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
3933 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3935 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
3936 instead of bb_in_region.
3937 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
3938 (build_sese_conditions): Use flag_bb_in_sese.
3939 * sese.c (register_bb_in_sese): Removed.
3940 (new_sese): Remove initialization of SESE_REGION_BBS.
3941 (free_sese): Do not free SESE_REGION_BBS.
3942 * sese.h (struct sese): Remove field region_basic_blocks.
3943 (SESE_REGION_BBS): Removed.
3944 (bb_in_sese_p): Implement in function of bb_in_region.
3946 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3948 * graphite-scop-detection.c (limit_scops): Deal only with single exit
3951 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
3953 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
3955 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
3956 (add_condition_to_domain): New.
3957 (add_condition_to_pbb): New.
3958 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
3959 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
3961 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
3963 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
3964 ppl_Pointset_Powerset.
3965 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
3966 * graphite-poly.h (poly_bb): poly_bb.domain Same.
3967 (pbb_nb_loops): Same.
3968 * graphite-sese-to-poly.c (build_loop_iteration_domains,
3969 add_conditions_to_domain): Same.
3970 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
3971 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
3972 ppl_const_Polyhedron_t.
3973 (ppl_print_powerset_matrix): New.
3974 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
3975 ppl_print_powerset_matrix): New.
3976 (ppl_print_polyhedron_matrix): Updated.
3978 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
3980 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
3982 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
3984 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
3985 (print_iteration_domains, debug_iteration_domain,
3986 debug_iteration_domains): New.
3987 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
3988 debug_iteration_domains): Declared.
3989 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
3992 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
3993 Sebastian Pop <sebastian.pop@amd.com>
3995 * graphite-poly.h (print_iteration_domain): New.
3996 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
3997 (build_sese_conditions_1, build_sese_conditions_after,
3998 build_sese_conditions_before): New.
3999 (build_sese_conditions): Rewritten.
4001 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4002 Tobias Grosser <grosser@fim.uni-passau.de>
4004 Cleanup of code generation liveouts.
4005 * graphite-clast-to-gimple.c (translate_clast): Use a single
4006 rename_map instead of one per translated statement.
4007 Do not use SESE_LIVEOUT_RENAMES.
4008 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4009 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4010 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4011 phi node of a reduction: when a loop contains a reduction used outside
4012 the loop, there should be a scalar close phi node on the exit block.
4013 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4014 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4015 (free_sese): Do not free them.
4016 (sese_build_liveouts_use): Do not use them.
4017 (sese_build_liveouts_bb): Same.
4018 (sese_build_liveouts): Same.
4019 (sese_insert_phis_for_liveouts): Same.
4020 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4021 (defined_in_loop_p): New.
4022 (alive_after_loop): New.
4023 (close_phi_not_yet_inserted_p): New.
4024 (struct alep, alep_p): New.
4025 (add_loop_exit_phis): Remove from the rename_map all the names defined
4026 in the code generated loop.
4027 (insert_loop_close_phis): Traverse the rename_map passed to it.
4028 Don't use SESE_LIVEOUT_RENAMES.
4029 (default_liveout_before_guard): Renamed default_before_guard.
4030 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4031 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4032 (register_sese_liveout_renames): Removed.
4033 (copy_bb_and_scalar_dependences): Do not call it.
4034 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4036 (SESE_LIVEOUT): Removed.
4037 (SESE_LIVEOUT_RENAMES): Removed.
4038 (SESE_REDUCTION_LIST): Removed.
4039 (sese_build_liveouts): Removed.
4040 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4041 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4042 (insert_guard_phis): Same.
4043 (rename_map_elt): Declare a VEC of them.
4044 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4045 trees not pointers to trees.
4047 Rewrite in canonical close SSA form:
4048 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4049 (limit_scops): Close the scop after the block containing the close phi
4051 (canonicalize_loop_closed_ssa): New.
4052 (canonicalize_loop_closed_ssa_form): New.
4053 (build_scops): Call canonicalize_loop_closed_ssa_form.
4055 * graphite-sese-to-poly.c: Fix typos.
4057 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4059 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4061 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4062 (print_pbb): Add conditions.
4064 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4065 Sebastian Pop <sebastian.pop@amd.com>
4067 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4068 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4069 (build_scop_bbs_1): New.
4070 (build_scop_bbs): Rewrite.
4071 * sese.h (bb_in_region): New.
4073 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4075 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4077 (print_scop): Style.
4078 * graphite-poly.h (poly_bb): Add drs vector.
4079 (PBB_DRS): Add accessor.
4080 * graphite-sese-to-poly.c (build_poly_dr): New.
4081 (build_pbb_drs, build_scop_drs): New.
4082 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4084 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4086 * tree-ssa-loop.c: Include forgotten toplev.h
4088 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4090 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4091 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4092 * gcc.dg/graphite/pr37928.c: Same
4093 * gcc.dg/graphite/pr38409.c: Same
4094 * gcc.dg/graphite/pr38498.c: Same
4095 * gcc.dg/graphite/pr38559.c: Same
4096 * gcc.dg/graphite/pr39335.c: Same
4097 * gcc.dg/graphite/pr39335_1.c: Same
4098 * gfortran.dg/graphite/block-2.f: Same
4099 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4102 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4104 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4105 build_access_matrix, build_scop_data_accesses): Remove access function
4106 building. (We get a new version soon).
4107 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4108 * sese.h (nb_loops_around_loop_in_sese): Remove.
4109 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4111 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4112 Sebastian Pop <sebastian.pop@amd.com>
4114 * graphite-scop-detection.c (struct scopdet_info): Rename last
4116 (scopdet_basic_block_info, build_scops_1): Don't use
4117 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4119 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4120 Sebastian Pop <sebastian.pop@amd.com>
4122 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4123 * sese.c (sese_build_liveouts_use): Renamed from
4124 sese_build_livein_liveouts_use. Remove liveins.
4125 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4126 Call sese_build_liveouts_use.
4127 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4128 Call sese_build_liveouts_bb.
4129 (new_sese, free_sese): Remove liveins.
4130 (sese_add_exit_phis_var): Deleted.
4131 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4133 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4135 * sese.h (sese): Remove num_ver and livein.
4136 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4138 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4140 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4142 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4144 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4145 (build_scop_scattering): Do not use compare_prefix_loops any more.
4146 (nb_common_loops): New.
4148 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4150 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4151 (register_old_and_new_names): Renamed set_rename.
4153 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4155 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4156 of the decl from the previous commit.
4158 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4160 * graphite-scop-detection.c (dot_scop): New.
4161 * graphite-scop-detection.h (dot_scop): Declared.
4163 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4165 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4167 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4169 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4170 condition at the end of the loop.
4171 * graphite.c (graphite_initialize, graphite_finalize): Print to
4172 dump_file the compiled function.
4173 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4174 of create_empty_loop_on_edge.
4175 (translate_clast): Update the code generation of loops for the new
4177 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4179 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4181 Reverted the patch from 2009-03-19.
4183 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4185 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4187 (print_scop): Style.
4188 * graphite-poly.h (poly_bb): Add drs vector.
4189 (PBB_DRS): Add accessor.
4190 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4191 (build_access_matrix_with_af, build_access_matrix,
4192 build_scop_data_accesses): Delete.
4193 (build_poly_dr): New.
4194 (build_pbb_drs, build_scop_drs): New.
4195 (build_poly_scop): call build_scop_drs.
4197 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4199 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4200 once per basic block.
4202 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4204 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4205 (graphite_can_represent_expr): Renamed from loop_affine_expr
4207 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4208 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4209 (scopdet_basic_block_info): Actually define entry_block.
4210 (stmt_simple_memref_p): Moved here from ...
4212 * tree-data-ref.c (stmt_simple_memref_p): here.
4213 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4215 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4217 * gcc.dg/graphite/id-4.c: New.
4219 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4221 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4222 (register_old_and_new_names): Update the content of the map.
4223 When there was already a rename_map_elt in the map at that
4225 (copy_bb_and_scalar_dependences): Do rename_variables after
4226 expand_scalar_variables.
4227 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4228 of the map. When there was already a rename_map_elt in the
4229 map at that location, free it.
4230 (translate_clast): Pass the rename_map. Do not initialize and free
4231 a rename_map per stmt_user.
4232 (gloog): Initialize and free one rename_map and pass it to
4235 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4237 * sese.c (expand_scalar_variables_stmt,
4238 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4240 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4241 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4242 the gimple_stmt_iterator of the statement to be expanded.
4243 * graphite-scop-detection.c (is_simple_operand): Do handle
4246 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4248 * graphite-scop-detection.c (is_simple_operand): Do not handle
4250 * gcc.dg/graphite/id-2.c: New.
4252 * graphite-sese-to-poly.c (build_bb_loops,
4253 add_value_to_dim, scan_tree_for_params_right_scev,
4254 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4255 find_params_in_bb, build_loop_iteration_domains,
4256 add_conditions_to_domain): Remove subtract.
4258 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4260 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4261 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4262 pbb_loop_at_index -> gbb_loop_at_index.
4263 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4264 (debug_loop_vec): Delete.
4265 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4266 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4267 (PBB_LOOPS): Removed.
4268 (PBB_BLACK_BOX): Insert cast.
4269 (pbb_set_black_box): New setter.
4270 (pbb_loop_at_index, pbb_loop_index): Removed.
4271 (scop_set_region, scop_set_nb_params): New.
4272 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4273 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4274 (build_poly_scop): Use scop_set_nb_params.
4275 * sese.h (gimple_bb): Add LOOPS.
4276 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4278 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4280 Revert previous commit.
4282 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4284 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4285 (register_old_and_new_names): Update the content of the map.
4286 When there was already a rename_map_elt in the map at that
4288 (copy_bb_and_scalar_dependences): Do rename_variables after
4289 expand_scalar_variables.
4290 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4291 of the map. When there was already a rename_map_elt in the
4292 map at that location, free it.
4293 (translate_clast): Pass the rename_map. Do not initialize and free
4294 a rename_map per stmt_user.
4295 (gloog): Initialize and free one rename_map and pass it to
4298 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4300 Remove forgotten line in revert.
4302 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4304 Revert previous commit.
4306 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4308 * sese.c (register_old_and_new_names): Update the content
4309 of the map. When there was already a rename_map_elt in the
4310 map at that location, free it.
4311 (copy_bb_and_scalar_dependences): Do rename_variables after
4312 expand_scalar_variables.
4313 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4314 of the map. When there was already a rename_map_elt in the
4315 map at that location, free it.
4316 (translate_clast): Pass the rename_map. Do not initialize and free
4317 a rename_map per stmt_user.
4318 (gloog): Initialize and free one rename_map and pass it to
4321 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4323 * graphite-clast-to-gimple.c (translate_clast): context_loop
4326 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4327 Sebastian Pop <sebastian.pop@amd.com>
4329 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4330 of the use of ppl_Polyhedron_map_space_dimensions.
4332 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4333 Sebastian Pop <sebastian.pop@amd.com>
4335 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4336 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4337 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4338 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4339 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4340 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4341 pbb_nb_params): New.
4342 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4343 nb_loops_around_pbb): Adapt return types.
4345 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4347 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4348 graphite-clast-to-gimple.o, graphite-data-ref.o,
4349 graphite-scop-detection.o, graphite-poly.o): Add
4352 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4354 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4355 graphite-clast-to-gimple.o, graphite-data-ref.o,
4356 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4358 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4360 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4361 * gcc.dg/graphite/pr37828.c: Same.
4362 * gcc.dg/graphite/pr37684.c: Same.
4363 * gcc.dg/graphite/block-0.c: Same.
4364 * gcc.dg/graphite/block-1.c: Same.
4365 * gcc.dg/graphite/block-2.c: Same.
4366 * gcc.dg/graphite/block-3.c: Same.
4367 * gcc.dg/graphite/block-4.c: Same.
4368 * gcc.dg/graphite/block-5.c: Same.
4369 * gcc.dg/graphite/block-6.c: Same.
4370 * gfortran.dg/graphite/pr38083.f90: Same.
4371 * gfortran.dg/graphite/block-1.f90: Same.
4372 * gfortran.dg/graphite/block-3.f90: Same.
4373 * gfortran.dg/graphite/pr37852.f90: Same.
4374 * gfortran.dg/graphite/block-4.f90: Same.
4375 * gfortran.dg/graphite/pr37980.f90: Same.
4376 * gfortran.dg/graphite/pr38953.f90: Same.
4377 * gfortran.dg/graphite/pr37857.f90: Same.
4378 * opts.c: Remove -floop-block from -O2.
4379 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4380 -floop-strip-mine are used.
4382 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4383 Sebastian Pop <sebastian.pop@amd.com>
4385 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4387 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4388 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4389 strip_mine_profitable_p, is_interchange_valid,
4390 graphite_trans_bb_block, graphite_trans_loop_block,
4391 graphite_trans_scop_block): Temporary removed.
4392 (extend_scattering, unify_scattering_dimensions): New.
4393 (print_scattering_function, graphite_read_transforms):
4394 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4395 (graphite_generate_scattering_fns): Removed.
4396 (apply_poly_transforms): Cleanup.
4397 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4398 (schedule_to_scattering): Moved.
4399 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4400 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4401 (pbb_nb_scattering): New.
4402 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4403 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4405 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4407 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4408 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4409 -> PBB_TRANSFORMED_SCATTERING.
4410 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4411 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4412 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4413 (check_poly_representation): Do not return bool.
4414 (graphite_transform_loops): Reformat.
4415 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4417 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4419 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4420 debug_pbb_domain, debug_pbb, debug_scop): New.
4421 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4422 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4424 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4427 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4428 when the type precision of the induction variable should be
4429 larger than the type precision of nit.
4430 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4431 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4432 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4434 * gcc.dg/graphite/pr39335_1.c: New.
4435 * gcc.dg/graphite/pr39335.c: New.
4437 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4439 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4440 SSA_NAMES not struct reduction_info.
4442 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4444 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4446 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4447 Tobias Grosser <grosser@fim.uni-passau.de>
4449 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4450 (free_sese): Free SESE_REDUCTION_LIST.
4451 * sese.h (struct sese): Add field reduction_list.
4452 (SESE_REDUCTION_LIST): New.
4453 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4454 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4456 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4457 Tobias Grosser <grosser@fim.uni-passau.de>
4459 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4462 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4463 Tobias Grosser <grosser@fim.uni-passau.de>
4465 * tree-parloops.c (struct brli, build_reduction_list_info,
4466 analyze_reduction_list, gather_scalar_reductions): New.
4467 (loop_parallel_p): Build a reduction list containing only
4468 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4469 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4470 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4471 * tree-flow.h (gather_scalar_reductions): Declared.
4473 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4476 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4477 number_of_iterations_exit from a gcc_assert.
4479 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4480 Jan Sjodin <jan.sjodin@amd.com>
4482 * output.h (graphite_out_file, graphite_in_file): Declared.
4483 * toplev.c (graphite_out_file, graphite_in_file): New.
4484 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4485 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4486 Don't call schedule_to_scattering.
4487 * common.opt (fgraphite-write, fgraphite-read): New.
4488 * graphite-poly.c: Include output.h.
4489 (print_scattering_function, print_scattering_functions,
4490 debug_scattering_function, debug_scattering_functions,
4491 graphite_write_transforms, graphite_read_transforms,
4492 graphite_generate_scattering_fns): New.
4493 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4494 Call graphite_generate_scattering_fns, graphite_write_transforms,
4495 graphite_read_transforms.
4496 (new_poly_bb): Initialize PBB_SCATTERING.
4497 (free_poly_bb): Free PBB_SCATTERING.
4498 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4499 * graphite-poly.h (struct poly_bb): Add field scattering.
4500 (PBB_SCATTERING): New.
4501 (print_scattering_function, print_scattering_functions,
4502 debug_scattering_function, debug_scattering_functions): Declared.
4503 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4504 GMP values, not integers!
4505 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4506 ppl_read_polyhedron_matrix): New.
4507 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4508 debug_ppl_polyhedron_matrix,
4509 ppl_read_polyhedron_matrix): Declared.
4510 * Makefile.in (graphite-poly.o): Depends on output.h.
4512 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4513 Tobias Grosser <grosser@fim.uni-passau.de>
4516 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4517 scalar evolutions in the scop_entry->loop_father.
4519 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4520 Tobias Grosser <grosser@fim.uni-passau.de>
4522 * graphite.h (ref_nb_loops): Remove declaration.
4523 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4524 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4525 debug_gbb): Moved to sese.h.
4528 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4529 Tobias Grosser <grosser@fim.uni-passau.de>
4531 * graphite-data-ref.[ch]: Disable.
4533 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4534 Tobias Grosser <grosser@fim.uni-passau.de>
4536 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4537 scalar evolutions in the scop_entry->loop_father.
4539 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4541 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
4542 (graphite_cannot_represent_loop_niter): Renamed
4543 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
4544 (limit_scops): build_sese_loop_nests does not return a bool.
4545 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
4546 * sese.c (nb_reductions_in_loop): ... from here.
4547 (graphite_loop_normal_form): ... from here.
4548 (sese_record_loop): Does not fail, so does not return a bool.
4549 (build_sese_loop_nests): Same.
4550 * sese.h (build_sese_loop_nests): Update declaration.
4551 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
4552 (build_graphite_loop_normal_form): New.
4553 (gloog): Call build_graphite_loop_normal_form.
4554 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
4555 build_sese_loop_nests.
4557 * gcc.dg/graphite/id-1.c: New.
4559 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4560 Tobias Grosser <grosser@fim.uni-passau.de>
4562 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
4563 The SCoP detection fix is sufficient.
4565 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4567 PR tree-optimization/39260
4568 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
4569 the basic block contains a condition with a real type.
4570 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
4572 * gcc.dg/graphite/pr39260.c: New.
4574 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4576 * graphite-poly.c: Inlcude params.h.
4577 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
4579 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
4580 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
4582 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4583 Tobias Grosser <grosser@fim.uni-passau.de>
4585 * graphite-scop-detection.c (dot_all_scops_1,
4586 dot_all_scops): Moved here.
4587 * graphite-scop-detection.h (dot_all_scops): Declared here.
4588 * graphite.c (graphite_initialize, graphite_finalize): New.
4589 (graphite_transform_loops): Cleaned up.
4590 * sese.c (debug_oldivs): Moved here.
4591 * graphite-poly.c (graphite_apply_transformations): Renamed
4592 apply_poly_transforms.
4593 (debug_loop_vec): Moved here.
4594 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
4595 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
4596 find_scop_parameters, build_scop_iteration_domain,
4597 add_conditions_to_constraints, build_scop_canonical_schedules,
4598 build_scop_data_accesses): Now static.
4599 (build_poly_scop, check_poly_representation): New.
4601 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4603 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
4604 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
4605 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
4606 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
4607 scan_tree_for_params_right_scev, scan_tree_for_params_int,
4608 scan_tree_for_params, struct irp_data, dx_record_params,
4609 find_params_in_bb, find_scop_parameters, gbb_from_bb,
4610 build_loop_iteration_domains, add_conditions_to_domain,
4611 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
4612 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
4613 build_sese_conditions, add_conditions_to_constraints,
4614 build_scop_iteration_domain, build_access_matrix_with_af,
4615 build_access_matrix,
4616 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
4618 * graphite-sese-to-poly.c: New.
4619 * graphite-sese-to-poly.h: New.
4621 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
4623 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4625 * graphite.c: Split graphite code generation to a new file.
4626 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
4627 max_precision_type, clast_to_gcc_expression_red,
4628 clast_to_gcc_expression, gcc_type_for_clast_expr,
4629 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
4630 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
4631 graphite_create_new_guard, clast_get_body_of_loop,
4632 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
4633 graphite_create_new_loop, build_iv_mapping, copy_renames,
4634 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4635 compute_cloog_iv_types, free_scattering, save_var_name,
4636 initialize_cloog_names, build_scop_context, build_cloog_prog,
4637 set_cloog_options, debug_clast_stmt, scop_to_clast,
4638 print_generated_program, debug_generated_program,
4639 gloog): Moved to graphite-clast-to-gimple.c.
4641 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
4643 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
4644 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
4645 loop_iv_stack_pop, loop_iv_stack_get_iv,
4646 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
4647 free_loop_iv_stack, loop_iv_stack_remove_constants,
4648 debug_rename_elt, debug_rename_map_1, debug_rename_map,
4649 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
4650 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
4651 eq_ivtype_map_elts, sese_add_exit_phis_edge,
4652 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
4653 get_vdef_before_sese, sese_adjust_vphi,
4654 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
4655 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
4656 is_iv, expand_scalar_variables_ssa_name,
4657 expand_scalar_variables_expr, expand_scalar_variables_stmt,
4658 expand_scalar_variables, rename_variables, remove_condition,
4659 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
4660 add_loop_exit_phis, insert_loop_close_phis, struct igp,
4661 default_liveout_before_guard, add_guard_exit_phis,
4662 insert_guard_phis, register_old_and_new_names,
4663 graphite_copy_stmts_from_block, register_sese_liveout_renames,
4664 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
4665 if_region_set_false_region, create_if_region_on_edge,
4666 move_sese_in_condition): Moved to sese.c.
4668 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
4669 if_region_exit, if_region_get_condition_block,
4670 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
4671 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
4672 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
4673 ivtype_map_elt, new_ivtype_map_elt,
4674 recompute_all_dominators): Moved to sese.h.
4676 * graphite-clast-to-gimple.c: New.
4677 * graphite-clast-to-gimple.h: New.
4678 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
4679 * sese.c: Modified as said above.
4682 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4684 * graphite.c: Split scop detection to a new file.
4685 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
4686 move_sd_regions, loop_affine_expr, exclude_component_ref,
4687 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
4688 graphite_cannot_represent_loop_niter, struct scopdet_info,
4689 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
4690 find_single_entry_edge, find_single_exit_edge,
4691 create_single_entry_edge, sd_region_without_exit,
4692 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
4693 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
4694 Moved to graphite-scop-detection.c.
4696 * graphite-scop-detection.c: New.
4697 * graphite-scop-detection.h: New.
4698 * Makefile.in: Add new rule for graphite-scop-detection.o.
4700 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
4701 tree-scalar-evolution.h.
4702 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
4703 build_sese_loop_nests): Moved here from graphite.c.
4704 (param_index): Renamed parameter_index_in_region.
4706 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4707 Sebastian Pop <sebastian.pop@amd.com>
4709 * gcc.dg/graphite/block-0.c: Expected to fail now.
4710 * gcc.dg/graphite/block-1.c: Same.
4711 * gcc.dg/graphite/block-5.c: Same.
4712 * gcc.dg/graphite/block-6.c: Same.
4714 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4715 Sebastian Pop <sebastian.pop@amd.com>
4717 * graphite.h: Separate from graphite_bb_p the polyhedral
4718 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
4719 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
4720 graphite-data-ref.h.
4721 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
4722 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
4723 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
4724 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4725 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
4726 scop_nb_params): Moved to graphite-poly.h.
4727 * graphite-data-ref.c: Same.
4728 * graphite-data-ref.h: New.
4730 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
4731 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
4732 is_interchange_valid, graphite_trans_bb_block,
4733 graphite_trans_loop_block, scop_max_loop_depth,
4734 graphite_trans_scop_block, graphite_apply_transformations,
4735 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
4737 * graphite-poly.h: New.
4738 * graphite-poly.c: New.
4739 * Makefile.in (OBJS-common): Add graphite-poly.o.
4740 (graphite-poly.o): New rule.
4741 * tree-data-ref.h (struct data_reference): Remove unused scop field.
4744 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4745 Tobias Grosser <grosser@fim.uni-passau.de>
4747 * graphite.c: Replace gb -> gbb.
4749 * graphite-data-ref.c: Same.
4751 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4752 Tobias Grosser <grosser@fim.uni-passau.de>
4754 * Makefile.in (OBJS-commmon): Add sese.o.
4756 (graphite.o): Add sese.h.
4757 * graphite.c (bb_in_ss_p, loop_in_sese_p,
4758 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
4759 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
4761 (block_before_scop): Add missing return.
4762 (new_scop, free_scop): Remove SESE data structures.
4763 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
4764 find_scop_parameters, build_loop_iteration_domains,
4765 add_conditions_to_domain, register_scop_liveout_renames,
4766 copy_bb_and_scalar_dependences): Scop -> SESE.
4768 (add_conditions_to_domain): SCoP -> SESE and remove check
4769 (scop_contains_non_iv_scalar_phi_nodes): New.
4770 (build_scop_conditions_1, build_scop_conditions): Remove check for
4771 non iv scalar phi nodes.
4772 (print_scop_statistics): New.
4773 (graphite_transform_loops): Cleanup.
4775 * graphite.h: Move to sese & cleanup.
4779 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4780 Tobias Grosser <grosser@fim.uni-passau.de>
4782 * graphite.c (build_scop_conditions_1): Conditions are only
4783 at the end of a basic block.
4785 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4786 Tobias Grosser <grosser@fim.uni-passau>
4788 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
4790 (GBB_ALPHA): Removed.
4792 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4793 Tobias Grosser <grosser@fim.uni-passau.de>
4795 * graphite-data-ref.c (graphite_test_dependence): Don't use
4796 GBB_DYNAMIC_SCHEDULE.
4797 * graphite.c (new_graphite_bb): Same.
4798 (free_graphite_bb): Same.
4799 (build_scop_dynamic_schedules): Removed.
4800 (graphite_transform_loops): Don't call it.
4801 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
4802 (GBB_DYNAMIC_SCHEDULE): Removed.
4804 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4805 Tobias Grosser <grosser@fim.uni-passau.de>
4807 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
4808 (print_graphite_bb): Same.
4809 (build_cloog_prog): Same.
4811 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4812 Tobias Grosser <grosser@fim.uni-passau.de>
4814 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
4816 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4817 Tobias Grosser <grosser@fim.uni-passau.de>
4819 * graphite.c (build_scop_context): Don't use CloogMatrix.
4820 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
4821 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
4823 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4824 Tobias Grosser <grosser@fim.uni-passau.de>
4826 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
4827 liveout_renames, add_params fields...
4828 (struct sese): ... here.
4829 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
4830 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
4832 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4833 Tobias Grosser <grosser@fim.uni-passau.de>
4835 * graphite.c (print_scop): Do not print the CLooG program.
4836 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
4837 build_cloog_prog, gloog): Don't use SCOP_PROG.
4838 (find_transform): Renamed scop_to_clast.
4839 (print_generated_program, debug_generated_program): New.
4840 (graphite_transform_loops): Adapt to new interface.
4841 * graphite.h (struct scop): Remove program field.
4842 (SCOP_PROG): Removed.
4843 (print_generated_program, debug_generated_program): Declared.
4845 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4847 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
4848 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
4849 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
4850 free_graphite_bb, build_scop_canonical_schedules,
4851 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
4852 schedules are now represented using a ppl_Linear_Expression_t.
4853 * graphite.h (struct graphite_bb): Same.
4854 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
4855 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
4857 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
4859 * graphite.c: Free local memory.
4860 * graphite-ppl.c: Same.
4862 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
4864 * graphite.c (const_column_index, get_first_matching_sign_row_index,
4865 get_lower_bound_row, get_upper_bound_row, copy_constraint,
4866 swap_constraint_variables, scale_constraint_variable): Removed.
4867 (graphite_trans_bb_strip_mine): Remove pong.
4868 * graphite-ppl.c: Include missing header files.
4869 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
4870 * graphite-ppl.h (ppl_strip_loop): Declared.
4871 * Makefile.in (graphite-ppl.o): Adjust dependences.
4873 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
4875 * graphite.c (build_loop_iteration_domains): Remove ping pong.
4876 (build_scop_iteration_domain): Same.
4878 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
4880 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
4882 (add_value_to_dim, scan_tree_for_params_right_scev,
4883 scan_tree_for_params_int): New.
4884 * graphite-ppl.c (oppose_constraint): New.
4885 (insert_constraint_into_matrix): Implement missing cases.
4886 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
4888 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
4890 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
4891 use ppl_move_dimension.
4893 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
4895 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
4898 * graphite-ppl.c: Same.
4899 * graphite-ppl.h: Same.
4901 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
4903 Revert last 3 commits.
4905 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4907 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
4909 (add_value_to_dim, scan_tree_for_params_right_scev,
4910 scan_tree_for_params_int): New.
4911 * graphite-ppl.c (oppose_constraint): New.
4912 (insert_constraint_into_matrix): Implement missing cases.
4913 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
4915 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4917 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
4919 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4920 Tobias Grosser <grosser@fim.uni-passau.de>
4922 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
4923 use ppl_move_dimension.
4924 * graphite-ppl.c (ppl_move_dimension): New.
4925 * graphite-ppl.h (ppl_move_dimension): Declared.
4927 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4929 * graphite.c: Do not include cloog/cloog.h.
4930 (print_graphite_bb): Remove ping pong, call PPL print function.
4932 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
4934 * Makefile.in (OBJS-common): Add graphite-ppl.o.
4935 (graphite.o): Add dependence on graphite-ppl.h.
4936 (graphite-ppl.o): New.
4937 (graphite-data-ref.c): Ping pong between PPL data structures
4939 * graphite-ppl.c: New.
4940 * graphite-ppl.h: New.
4941 * graphite.c: Include graphite-ppl.h.
4942 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
4943 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
4944 Ping pong between PPL data structures and matrices.
4945 (new_graphite_bb): Create a PPL constraint system.
4946 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
4947 (build_loop_iteration_domains): Use PPL functions.
4948 * graphite.h: Include graphite-ppl.h. Fix comments.
4949 (graphite_bb): Use a ppl_Constraint_System_t instead of
4950 CloogMatrix for representing the domain.
4951 (scop): Remove static_schedule.
4952 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
4954 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
4956 * graphite.c: Fix some comments.
4958 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
4961 * graphite.c (if_region_set_false_region): After moving a region
4962 in the false branch of a condition, remove the empty dummy
4964 (gloog): Remove wrong fix for PR38953.
4966 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
4968 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
4969 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
4970 register_bb_in_sese, new_sese, free_sese): Moved.
4971 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
4972 outermost_loop_in_scop, build_scop_iteration_domain,
4973 expand_scalar_variables_ssa_name, get_vdef_before_scop,
4974 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
4975 Use loop_in_sese_p instead of loop_in_scop_p.
4976 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
4977 (free_scop): Do not free SCOP_BBS_B.
4978 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
4979 ref_nb_loops): Moved here...
4980 * graphite.h (ref_nb_loops): ... from here.
4981 (struct scop): Remove bbs_b bitmap.
4982 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
4983 * gcc.dg/graphite/scop-19.c: New
4985 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
4987 * graphite.c (scopdet_basic_block_info): Fix bug in scop
4990 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
4992 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4993 eq_loop_to_cloog_loop): Remove.
4994 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
4995 * graphite.h (struct scop): Remove loop2cloog_loop.
4996 (loop_domain_dim, loop_iteration_vector_dim): Remove.
4998 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5000 * opts.c (decode_options): Only add graphite options to O2
5001 if we compile with graphite enabled.
5003 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5005 * Merge from mainline (r143163:143684).
5007 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5009 * graphite.c (debug_value): Removed.
5010 * graphite.h (debug_value): Removed.
5012 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5014 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5015 after graphite: pass_copy_prop does not maintain a proper loop closed
5016 SSA form. pass_copy_prop should be fixed.
5018 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5020 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5022 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5024 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5025 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5026 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5029 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5031 * graphite.c (gloog): Return true when code gen succeeded.
5032 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5033 the code of the function did not changed. After cleanup_tree_cfg
5034 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5037 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5039 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5040 gimple_call_lhs is NULL.
5042 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5043 Tobias Grosser <tobi.grosser@amd.com>
5045 * graphite.c (graphite_trans_scop_block): Do not block single
5048 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5049 Tobias Grosser <tobi.grosser@amd.com>
5051 * graphite.c (build_scop_canonical_schedules): Start schedules at
5054 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5055 Tobias Grosser <tobi.grosser@amd.com>
5057 * graphite.c (compare_prefix_loops): New.
5058 (build_scop_canonical_schedules): Rewritten.
5059 (graphite_transform_loops): Move build_scop_canonical_schedules
5060 after build_scop_iteration_domain.
5062 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5063 Tobias Grosser <tobi.grosser@amd.com>
5065 * graphite.c (add_conditions_to_domain): Add the loops to
5066 the dimension of the iteration domain. Do copy the domain
5067 only when it exists.
5068 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5069 (add_conditions_to_constraints): New.
5070 (can_generate_code_stmt, can_generate_code): Removed.
5071 (gloog): Do not call can_generate_code.
5072 (graphite_transform_loops): Call add_conditions_to_constraints
5073 after building the iteration domain.
5075 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5076 Tobias Grosser <tobi.grosser@amd.com>
5077 Jan Sjodin <jan.sjodin@amd.com>
5079 * graphite.c (scan_tree_for_params): On substractions negate
5080 all the coefficients of the term.
5081 (clast_to_gcc_expression_red): New. Handle reduction expressions
5082 of more than two operands.
5083 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5084 (get_vdef_before_scop): Handle also the case of default definitions.
5086 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5089 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5090 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5091 (gloog): Do not call cleanup_tree_cfg.
5092 (graphite_transform_loops): Call cleanup_tree_cfg after all
5093 scops have been code generated.
5095 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5097 * passes.c (init_optimization_passes): Schedule after
5098 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5100 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5102 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5104 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5105 Set the type of an expression to the type of its assign statement.
5106 (expand_scalar_variables_expr): Do not pass loop_p.
5107 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5108 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5109 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5111 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5113 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5114 an expression to the gimple_expr_type of its assign statement.
5115 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5118 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5120 PR tree-optimization/38786
5121 * gcc.dg/graphite/pr38786.c: New.
5122 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5123 the SSA_NAME case of expand_scalar_variables_expr.
5124 (expand_scalar_variables_expr): Also gather the scalar computation
5125 used to index the memory access.
5126 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5127 the gimple_stmt_iterator where it inserts new code.
5129 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5131 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5133 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5135 * opts.c (decode_options): Enable flag_graphite_identity and
5136 flag_loop_block in -O2 and above.
5138 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5140 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5141 Fix merge problem: replace with the file from trunk.
5143 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5145 * Merge from mainline (r141727:143163).
5147 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5148 Jan Sjodin <jan.sjodin@amd.com>
5150 PR tree-optimization/38559
5151 * gcc.dg/graphite/pr38559.c: New.
5153 * graphite.c (debug_value, copy_constraint,
5154 swap_constraint_variables, scale_constraint_variable, ): New.
5155 (get_lower_bound, get_upper_bound): Removed.
5156 (graphite_trans_bb_strip_mine): Clean up this code that works
5157 only for constant number of iterations. Fully copy upper and
5158 lower bound constraints, not only the constant part of them.
5159 * graphite.h (debug_value): Declared.
5161 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5163 PR tree-optimization/38492
5164 PR tree-optimization/38498
5165 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5166 * tree-chrec.h (scev_is_linear_expression): Declared.
5167 * graphite.c (graphite_cannot_represent_loop_niter): New.
5168 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5169 (graphite_loop_normal_form): Use gcc_assert.
5170 (scan_tree_for_params): Use CASE_CONVERT.
5171 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5172 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5173 Use gcc_assert. Discard scops that contain unhandled cases.
5174 (build_scop_conditions): Return a boolean status for unhandled cases.
5175 (strip_mine_profitable_p): Print the loop number, not its depth.
5176 (is_interchange_valid): Pass the depth of the loop nest, don't
5177 recompute it wrongly.
5178 (graphite_trans_bb_block): Same.
5179 (graphite_trans_bb_block): Print tentative of loop blocking.
5180 (graphite_trans_scop_block): Do not print that the loop has been
5182 (graphite_transform_loops): Do not handle scops that contain condition
5185 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5187 * gcc.dg/graphite/block-0.c: Update test.
5188 * gcc.dg/graphite/block-1.c: Same.
5189 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5191 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5192 * gcc.dg/graphite/block-3.c: New.
5193 * gcc.dg/graphite/pr38498.c: New.
5195 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5197 PR tree-optimization/38510
5198 * gcc.dg/graphite/pr38510.c: New.
5199 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5200 (translate_clast): Call recompute_all_dominators before
5202 (gloog): Call recompute_all_dominators before graphite_verify.
5204 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5206 PR tree-optimization/38492
5207 * graphite.c (rename_map_elt, debug_rename_elt,
5208 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5209 rename_map_elt_info, eq_rename_map_elts,
5210 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5211 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5212 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5213 (sese_build_livein_liveouts): New.
5214 (new_sese, free_sese): New.
5215 (new_scop): Call new_sese.
5216 (free_scop): Call free_sese.
5217 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5218 (register_old_new_names): Renamed register_old_and_new_names.
5219 (register_scop_liveout_renames, add_loop_exit_phis,
5220 insert_loop_close_phis, struct igp,
5221 default_liveout_before_guard, add_guard_exit_phis,
5222 insert_guard_phis, copy_renames): New.
5223 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5224 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5225 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5226 (scop_adjust_phis_for_liveouts): New.
5227 (gloog): Call scop_adjust_phis_for_liveouts.
5229 * graphite.h (struct sese): Documented. Added fields liveout,
5231 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5232 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5233 (struct scop): Added field liveout_renames.
5234 (SCOP_LIVEOUT_RENAMES): New.
5236 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5238 PR tree-optimization/38409
5239 * gcc.dg/graphite/pr38409.c: New.
5240 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5242 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5244 * graphite.c (gcc_type_for_cloog_iv): By default return
5246 (graphite_create_new_loop): Don't fold_convert the already
5247 fold_convert-ed expression.
5249 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5251 PR tree-optimization/38446
5252 * gcc.dg/graphite/pr38446.c: New.
5253 * graphite.c (register_bb_in_sese): New.
5254 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5255 looking at the bbs in the region.
5256 * graphite.h (sese): Add region_basic_blocks pointer set to
5257 structure and initialize at the time of defining new scop.
5259 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5261 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5262 (find_params_in_bb): Do not free data refs.
5263 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5265 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5267 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5268 * gcc.dg/graphite/scop-17.c: Same.
5269 * gcc.dg/graphite/block-5.c: New.
5270 * gcc.dg/graphite/block-6.c: New.
5271 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5272 * gcc.dg/graphite/pr37684.c: Same.
5273 * gcc.dg/graphite/block-2.c: Same.
5275 * graphite.c (struct ivtype_map_elt): New.
5276 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5277 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5278 gcc_type_for_cloog_iv): New.
5279 (loop_iv_stack_patch_for_consts): Use the type of the induction
5280 variable from the original loop, except for the automatically
5281 generated loops, i.e., in the case of a strip-mined loop, in
5282 which case there is no original loop: in that case just use
5284 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5285 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5286 (clast_name_to_gcc): Accept params to be NULL.
5287 (clast_to_gcc_expression): Take an extra parameter for the type.
5288 Convert to that type all the expressions built by this function.
5289 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5290 (graphite_translate_clast_equation): Compute the type of the
5291 clast_equation before translating its LHS and RHS.
5292 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5293 (graphite_create_new_loop): Compute the type of the induction
5294 variable before translating the lower and upper bounds and before
5295 creating the induction variable.
5296 (rename_variables_from_edge, rename_phis_end_scop): New.
5297 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5298 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5299 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5300 compute_cloog_iv_types): New.
5301 (gloog): Call compute_cloog_iv_types before starting the
5302 translation of the clast.
5304 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5305 (GBB_CLOOG_IV_TYPES): New.
5306 (debug_ivtype_map): Declared.
5307 (oldiv_for_loop): New.
5309 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5312 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5313 (param_index): Assert if parameter is not know after parameter
5315 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5316 (find_scop_parameters): Mark, that we have finished parameter
5318 (graphite_transform_loops): Move condition detection before parameter
5320 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5321 * gfortran.dg/graphite/pr38459.f90: New.
5323 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5325 * graphite.c (graphite_transform_loops): Always call find_transform ()
5326 in ENABLE_CHECKING. So we test these code paths, even if we do not
5329 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5331 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5332 (print_scop): Ditto.
5334 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5337 Fix gfortran.dg/graphite/id-3.f90.
5338 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5339 regions more than once.
5341 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5343 Fix gfortran.dg/graphite/id-4.f90.
5344 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5347 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5349 Fix gfortran.dg/graphite/id-1.f90.
5350 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5351 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5352 (max_precision_type): New.
5353 (value_clast): Removed.
5354 (clast_to_gcc_expression): Be more careful to types of expressions.
5355 Use max_precision_type and update use of gmp_cst_to_tree.
5356 (graphite_translate_clast_equation): Use max_precision_type.
5357 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5358 use the type of the condition.
5359 (graphite_create_new_loop): Do not use integer_type_node, use the
5360 max_precision_type of lb and ub.
5362 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5364 * graphite.c (build_scops_1): Initialize open_scop.exit
5367 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5369 * gcc.dg/graphite/pr38084.c: New.
5370 * gfortran.dg/graphite/id-1.f90: New.
5371 * gfortran.dg/graphite/id-2.f90: New.
5372 * gfortran.dg/graphite/id-3.f90: New.
5373 * gfortran.dg/graphite/id-4.f90: New.
5374 * gfortran.dg/graphite/pr37857.f90: New.
5376 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5377 Jan Sjodin <jan.sjodin@amd.com>
5378 Harsha Jagasia <harsha.jagasia@amd.com>
5390 * gcc.dg/graphite/pr38073.c: New.
5391 * gcc.dg/graphite/pr37928.c: New.
5392 * gcc.dg/graphite/pr37883.c: New.
5393 * gcc.dg/graphite/pr38125.c: New.
5394 * gfortran.dg/graphite/pr38083.f90: New.
5395 * gfortran.dg/graphite/pr37852.f90: New.
5396 * gfortran.dg/graphite/pr37980.f90: New.
5398 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5399 the number of detected scops. Copy exact same test for loop
5401 * gcc.dg/graphite/block-1.c: Fix the number of expected
5402 loops to be blocked as reductions are not handled.
5403 * gcc.dg/graphite/block-4.c: ...here. New.
5405 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5406 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5408 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5409 * Makefile.in (graphite.o): Depend on value-prof.h.
5410 (graphite.o-warn): Removed -Wno-error.
5411 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5412 to be a NULL pointer. Call update_stmt. Return the newly created
5413 cannonical induction variable.
5415 * graphite.h (debug_rename_map): Declared. Fix some comments.
5417 * graphite.c: Reimplement the code generation from graphite to gimple.
5418 Include value-prof.h.
5419 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5420 (get_old_iv_from_ssa_name): Removed.
5421 (graphite_stmt_p): New.
5422 (new_graphite_bb): Test for useful statements before building a
5423 graphite statement for the basic block.
5424 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5425 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5427 (recompute_all_dominators, graphite_verify,
5428 nb_reductions_in_loop, graphite_loop_normal_form): New.
5429 (scop_record_loop): Call graphite_loop_normal_form.
5430 (build_scop_loop_nests): Iterate over all the blocks of the
5431 function instead of relying on the incomplete information from
5432 SCOP_BBS. Return the success of the operation.
5433 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5434 (add_bb_domains): Removed.
5435 (build_loop_iteration_domains): Don't call add_bb_domains.
5436 Add the iteration domain only to the basic blocks that have been
5437 translated to graphite.
5438 (build_scop_conditions_1): Add constraints only if the basic
5439 block have been translated to graphite.
5440 (build_scop_data_accesses): Completely disabled until data
5441 dependence is correctly implemented.
5442 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5443 (remove_all_edges_1, remove_all_edges): Removed.
5444 (get_new_name_from_old_name): New.
5445 (graphite_rename_variables_in_stmt): Renamed
5446 rename_variables_in_stmt. Call get_new_name_from_old_name.
5447 Use replace_exp and update_stmt.
5448 (is_old_iv): Renamed is_iv.
5449 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5450 Use replace_exp and update_stmt.
5451 (expand_scalar_variables_expr): Same. Use the map to get the
5452 new names for the renaming of induction variables and for the
5453 renaming of variables after a basic block has been copied.
5454 (expand_scalar_variables): Same.
5455 (graphite_rename_variables): Renamed rename_variables.
5456 (move_phi_nodes): Removed.
5457 (get_false_edge_from_guard_bb): New.
5458 (build_iv_mapping): Do not insert the induction variable of a
5459 loop in the renaming iv map if the basic block does not belong
5461 (register_old_new_names, graphite_copy_stmts_from_block,
5462 copy_bb_and_scalar_dependences): New.
5463 (translate_clast): Heavily reimplemented: copy basic blocks,
5464 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5465 At each translation step call graphite_verify ensuring the
5466 consistency of the SSA, loops and dominators information.
5467 (collect_virtual_phis, find_vdef_for_var_in_bb,
5468 find_vdef_for_var_1, find_vdef_for_var,
5469 patch_phis_for_virtual_defs): Removed huge hack.
5470 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5471 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5472 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5473 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5474 if_region_get_condition_block, if_region_set_false_region,
5475 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5476 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5477 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5478 rewrite_into_sese_closed_ssa): New.
5479 (gloog): Remove dead code. Early return if code cannot be
5480 generated. Call cleanup_tree_cfg once the scop has been code
5482 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5483 block loops with less than two loops.
5484 (graphite_apply_transformations): Remove the call to
5485 scop_remove_ignoreable_gbbs.
5486 (limit_scops): When build_scop_loop_nests fails, continue on
5487 the next scop. Fix open_scop.entry.
5488 (graphite_transform_loops): Call recompute_all_dominators: force the
5489 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5490 Call initialize_original_copy_tables and free_original_copy_tables
5491 to be able to copy basic blocks during code generation.
5492 When build_scop_loop_nests fails, continue on next scop.
5493 (value_clast): New union.
5494 (clast_to_gcc_expression): Fix type cast warning.
5496 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5498 * Merge from mainline (r140838:141727).
5500 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5504 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5506 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5510 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5511 exits and conditions.
5512 * gcc.dg/graphite/pr37943.c: New.
5514 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5517 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5519 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5521 * doc/invoke.texi: Fix spaces.
5523 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5525 PR tree-optimization/37891
5526 Reverted last commit.
5527 * graphite.c (create_single_entry_edge): Set
5528 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5530 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5531 Mitul Thakkar <mitul.thakkar@amd.com>
5533 * graphite.c (create_single_entry_edge): Set
5534 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5536 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
5538 * doc/invoke.texi: Add -fgraphite-identity.
5539 * graphite.c (graphite_apply_transformations): Check for
5540 -fgraphite-identity.
5541 * toplev.c (process_options): Add flag_graphite_identity.
5542 * tree-ssa-loop.c: Add flag_graphite_identity.
5544 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5546 Undo changes from 2008-10-02:
5547 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5548 operand type when copying the operand to a variable of different type.
5549 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5550 with the IV name after increment.
5552 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5553 Harsha Jagasia <harsha.jagasia@amd.com>
5555 PR tree-optimization/37828
5556 * gcc.dg/graphite/pr37828.c: New.
5557 * graphite.c (graphite_trans_loop_block): Do not loop block
5558 single nested loops.
5560 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
5561 Sebastian Pop <sebastian.pop@amd.com>
5563 * graphite.c (struct rename_map_elt, new_rename_map_elt,
5564 rename_map_elt_info, eq_rename_map_elts): New.
5565 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
5566 (expand_scalar_variables_expr): Change parameters.
5567 (expand_scalar_variables_stmt): Same.
5568 (expand_scalar_variables): Same.
5569 (graphite_rename_ivs): Rename graphite_rename_variables.
5570 (build_iv_mapping): New.
5571 (translate_clast): Call build_iv_mapping.
5572 * graphite.h (gbb_p): New name.
5574 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
5576 PR tree-optimization/37684
5577 * gcc.dg/graphite/pr37684.c: New.
5578 * graphite.c (exclude_component_ref): New.
5579 (is_simple_operand): Call exclude_component_ref.
5581 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
5582 Harsha Jagasia <harsha.jagasia@amd.com>
5584 PR tree-optimization/37485
5585 * gcc.dg/graphite/block-2.c: New
5586 * graphite.c (gmp_cst_to_tree): Moved.
5587 (iv_stack_entry_is_constant): New.
5588 (iv_stack_entry_is_iv): New.
5589 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
5590 (loop_iv_stack_insert_constant): New.
5591 (loop_iv_stack_pop): Use new datatpype.
5592 (loop_iv_stack_get_iv): Same.
5593 (loop_iv_stack_get_iv_from_name): Same.
5594 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
5595 (loop_iv_stack_patch_for_consts): New.
5596 (loop_iv_stack_remove_constants): New.
5597 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
5598 (translate_clast): Call loop_iv_stack_patch_for_consts and
5599 loop_iv_stack_remove_constants.
5600 (gloog): Use new datatype. Redirect construction edge to end
5601 block to avoid accidental deletion.
5602 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
5604 (union iv_stack_entry_data): New. Data in iv stack entry.
5605 (struct iv_stack_entry): New. Datatype for iv stack entries.
5607 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5609 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5610 operand type when copying the operand to a variable of different type.
5612 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5614 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5615 with the IV name after increment.
5617 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5619 * Merge from mainline (r140164:140838).
5621 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5623 * graphite-data-ref.c: New.
5624 * graphite.c (print_scop): Also dump the dependence graph.
5625 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
5626 (new_scop): Initialize SCOP_DEP_GRAPH.
5627 (build_scop_dynamic_schedules): New.
5628 (build_access_matrix_with_af): Fixed column numbering.
5629 (graphite_transform_loops): Call build_scop_dynamic_schedules.
5630 * graphite.h: Add ifndef/define guards against multiple inclusion.
5631 (struct scop): Add dep_graph field.
5632 (SCOP_DEP_GRAPH): Defined.
5633 (ref_nb_loops): Fixed and moved to other position.
5634 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
5635 (nb_loops_around_loop_in_scop): New.
5636 (graphite_dump_dependence_graph): Declared.
5637 (graphite_build_rdg_all_levels): Declared.
5638 (graphite_test_dependence): Declared.
5639 * Makefile.in (graphite-data-ref.o): New target.
5641 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
5643 * Merge from mainline (139870:140164).
5645 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5647 * Merge from mainline (138275:139870).
5648 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
5649 the commits from trunk broke the niter detection.
5651 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5653 * graphite.c: Add more documentation. Fix formatting.
5654 (debug_loop_vec, debug_oldivs, loop_iv_stack,
5655 loop_iv_stack_debug): Moved...
5656 (schedule_to_scattering): Move before use.
5657 (dot_all_scops): Include in "#if 0" the code for system
5660 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
5661 loop_iv_stack_debug): ...here.
5663 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
5665 * tree-phinodes.c (make_phi_node): Extern.
5666 (add_phi_node_to_bb): New.
5667 (create_phi_node): Call add_phi_node_to_bb.
5668 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
5669 (remove_statement): Handle case where stored phi was updated
5670 and is no longer the same.
5671 * graphite.c (is_parameter): New.
5673 (expand_scalar_variables_expr): New.
5674 (expand_scalar_variables_stmt): New.
5675 (expand_scalar_variables): New.
5676 (move_phi_nodes): Create new phi instead of moving old one.
5677 (translate_clast): Call expand_scalar_variables.
5678 (find_vdef_for_var_in_bb): Also scan regular definitions.
5679 (skip_phi_defs): New.
5680 (collect_scop_exit_phi_args): New.
5681 (patch_scop_exit_phi_args): New.
5682 (gloog): Patch phis after scop.
5683 * tree-flow.h: (add_phi_node_to_bb): Declared.
5684 (make_phi_node): Declared.
5686 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5688 * graphite.c (end_scop): Split the entry of the scop when it
5689 is the header of the loop in which the scop is ending.
5690 (build_scops_1, limit_scops): Update uses of end_scop.
5692 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5694 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
5695 SCOP_ENTRY or SCOP_EXIT.
5697 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5699 * graphite.c (get_construction_edge): Removed.
5700 (gloog): Construction edge is the scop entry edge.
5702 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5704 * graphite.c (can_generate_for_scop): Removed.
5705 (gloog): Do not call it.
5707 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5709 * graphite.c (new_scop): Entry of a scop is an edge.
5710 Initialize SESE region.
5711 (free_scop): Free SESE region.
5712 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
5713 (split_difficult_bb): New, split from end_scop.
5714 (end_scop): Exit of a scop is an edge.
5715 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
5716 not automatically updated and thus is always wrong.
5717 * graphite.h (struct sese): New.
5720 (struct scop): New field for a SESE region. Remove entry, exit.
5721 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
5722 semantics as before. Moved comment around.
5724 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5725 Sebastian Pop <sebastian.pop@amd.com>
5727 * graphite.c (graphite_transform_loops): Always enable gloog
5728 and find_transform when ENABLE_CHECKING.
5730 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5732 * graphite.c (graphite_transform_loops): Move pretty printer
5733 of SCOPs before doing any transform. Remove call to print_scops
5734 and dot_all_scops_1.
5736 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5738 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
5739 (print_graphite_bb): Same.
5741 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5743 * graphite.c (dot_all_scops_1): Cleanup.
5744 (move_scops): Fix comment.
5746 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5748 * graphite.c (build_scop_bbs): Revert commit 139355:
5750 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5751 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5753 * graphite.c (build_scop_bbs): Factor up code.
5755 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5757 * graphite.c (gloog): Update dominator info.
5759 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5761 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
5763 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5765 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
5767 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
5768 (translate_clast): Correct formatting.
5769 * graphite.h (struct num_map): Removed.
5770 (struct graphite_bb): Remove num_map field.
5771 (GBB_INDEX_TO_NUM_MAP): Removed.
5773 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5775 * graphite.c (build_access_matrix_with_af): Fix comments.
5776 (build_scop_data_accesses): Same.
5778 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5780 * graphite.c (build_scop_data_accesses): Don't construct
5781 access matrices. Add a FIXME and an assert condition that
5782 should pass when the access matrices will be needed.
5784 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5786 * tree-data-ref.c (stmt_simple_memref_p): Don't call
5788 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
5789 Moved close by free_graphite_bb.
5790 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
5791 (new_scop): Move close by free_scop.
5792 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
5794 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
5796 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
5797 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
5798 instead of recursive call.
5799 (graphite_translate_clast_equation): New.
5800 (graphite_create_guard_cond_expr): New.
5801 (graphite_create_new_guard): New.
5802 (get_stack_index_from_iv): Removed.
5803 (graphite_rename_ivs_stmt): Use gbb_loop_index.
5804 (get_true_edge_from_guard_bb): New.
5805 (translate_clast): Handle stmt_guard in clast.
5806 (get_construction_edge): Allow construction edge detection for
5807 a scope entry with multiple predecessors if one predecessor is
5808 the immediate dominator of scope entry.
5809 (can_generate_code_stmt): Enable code generation for clast_guard.
5810 (gloog): Use correct context loop. Removed check for post dominators.
5811 * cfgloop.h (create_empty_if_region_on_edge): Declared.
5813 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5815 * graphite.c (remove_dead_loops): Document better which
5818 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5820 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
5822 (graphite.o): Also depends on pointer-set.h.
5824 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5826 * graphite.c (scop_record_loop): Fix compile warning.
5828 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
5829 Sebastian Pop <sebastian.pop@amd.com>
5831 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
5833 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5835 * graphite.c (build_graphite_bb): Initialize bb->aux to
5836 point to the graphite_bb_p.
5837 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
5839 (add_bb_domains): Does not use the scop parameter.
5840 (graphite_transform_loops): Clean bb->aux at the end.
5842 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5843 Sebastian Pop <sebastian.pop@amd.com>
5845 * lib/target-supports.exp
5846 (check_effective_target_fgraphite): New.
5848 * gcc.dg/graphite/graphite.exp: Early exit when
5849 check_effective_target_fgraphite returns false.
5850 Set dg-do-what-default to compile.
5851 (scan-graphite-dump-times): Removed.
5852 * gfortran.dg/graphite/graphite.exp: Same.
5854 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
5855 Use scan-tree-dump-times instead of scan-graphite-dump-times.
5856 * gcc.dg/graphite/scop-1.c: Same.
5857 * gcc.dg/graphite/scop-2.c: Same.
5858 * gcc.dg/graphite/scop-3.c: Same.
5859 * gcc.dg/graphite/scop-4.c: Same.
5860 * gcc.dg/graphite/scop-5.c: Same.
5861 * gcc.dg/graphite/scop-6.c: Same.
5862 * gcc.dg/graphite/scop-7.c: Same.
5863 * gcc.dg/graphite/scop-8.c: Same.
5864 * gcc.dg/graphite/scop-9.c: Same.
5865 * gcc.dg/graphite/scop-10.c: Same.
5866 * gcc.dg/graphite/scop-11.c: Same.
5867 * gcc.dg/graphite/scop-12.c: Same.
5868 * gcc.dg/graphite/scop-13.c: Same.
5869 * gcc.dg/graphite/scop-matmult.c: Same.
5870 * gcc.dg/graphite/scop-14.c: Same.
5871 * gcc.dg/graphite/scop-15.c: Same.
5872 * gcc.dg/graphite/block-0.c: Same.
5873 * gcc.dg/graphite/scop-16.c: Same.
5874 * gcc.dg/graphite/block-1.c: Same.
5875 * gcc.dg/graphite/scop-17.c: Same.
5876 * gcc.dg/graphite/scop-18.c: Same.
5877 * gfortran.dg/graphite/block-1.f90: Same.
5878 * gfortran.dg/graphite/scop-1.f: Same.
5879 * gfortran.dg/graphite/block-2.f: Same.
5881 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5883 * graphite.c: Fix some XXX comments.
5884 (build_scop_dynamic_schedules): Removed.
5886 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5888 * graphite.h (scop_max_loop_depth): Moved...
5889 * graphite.c (scop_max_loop_depth): ...here.
5890 (remove_all_edges_1): New.
5891 (remove_all_edges): Factored code.
5892 (remove_cond_exprs): Check only the last statement for
5893 a GIMPLE_COND expression.
5895 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5897 * graphite.c (scan_tree_for_params): Early return when the
5898 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
5899 (find_scop_parameters): Factor out code.
5900 (graphite_trans_bb_strip_mine): Remove dead code.
5902 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5904 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
5905 graphite_trans_bb_move_loop): Factor asserts.
5906 (gloog): Perform sanity checks only for ENABLE_CHECKING.
5907 Do not call calculate_dominance_info and estimate_bb_frequencies.
5909 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
5911 * graphite.c (create_loops_mapping, free_loops_mapping,
5912 create_loops_mapping_num, debug_loop_mapping_1,
5913 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
5914 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
5915 graphite_loops_mapping_add_child_num,
5916 graphite_loops_mapping_insert_child,
5917 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
5918 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
5919 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
5920 create_num_from_index, get_num_from_index,
5921 swap_loop_mapped_depth): Removed.
5922 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
5923 (free_scop): Do not call free_loops_mapping.
5924 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
5925 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
5926 get_loop_mapped_depth.
5927 (graphite_trans_bb_move_loop): Do not update the loop mapping.
5928 (graphite_trans_bb_strip_mine): Same.
5929 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
5930 (struct scop): Remove field loops_mapping.
5932 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5933 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5935 * graphite.c (scop_record_loop): Factor out one level of the
5936 condition by early return.
5937 (build_scop_loop_nests): Format following FSF coding style.
5938 (build_scop_dynamic_schedules): Factor out code.
5939 (scopdet_bb_info): Reindent. Default case should not be reachable.
5941 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5942 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5944 * graphite.c (loop_affine_expr): Check for DECL_P or struct
5945 assignments that are not handled as simple operands for now.
5947 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5948 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5950 * graphite.c (build_scop_bbs): Factor up code.
5952 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5953 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5955 * graphite.c (stmt_simple_for_scop_p): Factor code out
5957 (enum gbb_type): New. Group all the GBB_* types under it.
5958 (is_loop_exit): Moved...
5959 (end_scop): Enable BB spliting.
5960 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
5961 * cfgloop.h (is_loop_exit): Declared.
5963 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5965 * doc/invoke.texi: Remove strides from examples containing
5966 DO loops when the strides are equal to 1.
5968 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
5969 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5971 * graphite.c (graphite_trans_scop_block): Or the result with
5972 the result from graphite_trans_loop_block.
5973 * gcc.dg/graphite/block-1.c: New.
5974 * gfortran.dg/graphite/block-1.f90: New.
5975 * gfortran.dg/graphite/block-2.f: New.
5977 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5979 * graphite.c (graphite_transform_loops): Call cloog_initialize
5982 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5984 * tree-data-ref.c) (stmt_simple_memref_p): New.
5985 * tree-data-ref.h (stmt_simple_memref_p): Declared.
5986 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
5987 (is_simple_operand): Call stmt_simple_memref_p.
5989 * gcc.dg/graphite/scop-matmult.c: Updated for not
5990 using pointer arithmetic, as this is optimized by PRE and
5991 makes the code too difficult to analyze.
5993 * gcc.dg/graphite/scop-18.c: Same.
5995 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5997 * gdbinit.in (pgg): New.
5999 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6001 * graphite.c (graphite_trans_loop_block): Fix warning.
6003 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6005 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6007 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6009 * graphite.c (graphite_trans_bb_block): Remove check for
6010 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6011 Check if loop blocking is profitable for every loop, before applying
6013 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6014 if flag_loop_block is set.
6016 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6018 * graphite.c: Add some more documentation for the loop
6021 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6023 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6024 * graphite.c: Format on less than 80 columns.
6027 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6029 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6031 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6033 * doc/invoke.texi (floop-block, floop-strip-mine,
6034 floop-interchange): Update documentation with examples.
6036 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6038 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6040 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6042 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6044 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6045 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6046 * tree-scalar-evolution.c: Revert useless changes.
6047 * tree-phinodes.c: Same.
6050 * tree-vectorizer.h: Same.
6051 * tree-flow.h: Same.
6053 * common.opt (fgraphite): Update documentation.
6055 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6057 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6058 -floop-interchange): Add more text for explaining what each of these
6060 * tree-into-ssa.c (gimple_vec): Moved to...
6061 * graphite.c: Include gimple.h.
6062 (gimple_vec): Moved to...
6063 (del_loop_to_cloog_loop): Removed.
6064 (loop_affine_expr): Do not call create_data_ref when the
6065 operand is a constant.
6066 (new_scop): Use free instead of del_loop_to_cloog_loop.
6067 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6068 * gimple.h (gimple_vec): ... here.
6070 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6072 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6074 (build_loop_iteration_domains): Fail, if latch executions unknown.
6076 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6078 * graphite.c (add_conditions_to_domain): New.
6079 (build_scop_conditions_1): Call add_conditions_to_domain.
6080 (set_cloog_options): Allow to disable optimizations.
6082 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6084 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6085 Do not use walk_dominator_tree.
6086 (find_scop_parameters): Do not use walk_dominator_tree.
6088 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6090 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6091 (idx_record_params): Adapt.
6092 * graphite.h (scop_gimple_loop_depth): New.
6094 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6096 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6097 (scan_tree_for_params): Remove value_init.
6098 (build_scop_context): Remove value_init.
6099 (build_loop_iteration_domains): Remove value_init.
6100 (schedule_to_scattering): Remove value_init.
6101 (graphite_trans_bb_strip_mine): Remove value_init.
6103 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6105 * gcc/graphite.c (limit_scops): New.
6106 (graphite_transform_loops): Add limit SCoPs.
6107 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6108 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6109 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6110 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6111 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6112 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6113 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6114 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6115 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6116 Change loop numbers.
6117 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6118 Change loop numbers.
6119 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6120 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6121 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6122 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6123 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6124 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6125 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6126 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6127 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6128 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6130 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6132 * graphite.c (graphite_transform_loops): Call always find_transform.
6134 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6136 * graphite.c (free_loops_mapping): New.
6137 (stmt_simple_for_scop_p): Fix typo.
6138 (stmt_simple_for_scop_p): Fix tuples functions, that
6140 (free_graphite_bb): Fix some memleaks.
6141 (free_scop): Fix some memleaks.
6142 (scopdet_bb_info): Do not forget some tmp SCoPs.
6143 (find_params_in_bb): Fix some memleaks.
6144 (clast_to_gcc_expression): Fix warning.
6146 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6148 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6149 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6151 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6153 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6154 Move code ifdef-ed HAVE_cloog...
6155 * graphite.c: Include toplev.h.
6157 * Makefile.in (OBJS-common): Always build graphite.o.
6158 (BACKEND): Remove @GRAPHITE@.
6159 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6160 (graphite.o): Depend on TOPLEV_H.
6162 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6164 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6165 Remove typo left from polylib to ppl conversion.
6166 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6168 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6170 * toplev.c (process_options): Move the graphite loop optimization
6172 * tree-ssa-loop.c (graphite_transforms): ... here.
6173 When not configured with CLooG, print to dump_file that
6174 Graphite transforms were not performed.
6175 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6177 * gcc.dg/graphite/*.c: Updated all testcases to use
6178 scan-graphite-dump-times.
6180 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6182 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6183 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6185 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6186 Jan Sjodin <jan.sjodin@amd.com>
6188 * configure: Regenerated.
6189 * omp-low.c (expand_omp_sections): Remove now unused code.
6190 * config.in (HAVE_polylib): Removed.
6191 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6192 (PPLLIBS, PPLINC): Added.
6193 * graphite.c: Replace unsigned with int wherever possible.
6194 Don't access Cloog's data structures, but use accessor functions.
6195 Clast's stmt->type is now implemented as a vtable: change the
6196 switches of stmt->type into ifs.
6197 (polylib/polylibgmp.h): Don't include.
6198 (initialize_dependence_polyhedron,
6199 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6200 statement_precedes_p, test_dependence, build_rdg_all_levels,
6201 dump_dependence_graph): Removed until this code is cleaned up
6203 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6204 (POLYLIBINC): Renamed PPLINC.
6206 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6207 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6208 Jan Sjodin <jan.sjodin@amd.com>
6210 Finish the merge and tuplification of graphite.
6212 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6213 Jan Sjodin <jan.sjodin@amd.com>
6215 Partial merge from mainline (138072:138275).
6216 * graphite.c still has to be tuplified.
6218 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6220 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6221 (create_num_from_index): New.
6222 (get_num_from_index): Also pass in the graphite BB.
6223 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6224 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6225 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6226 (is_interchange_valid): Return false when failing.
6227 * graphite.h (struct num_map): New.
6228 (struct graphite_bb): New field num_map.
6229 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6231 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6233 * graphite.c (dump_gbb_conditions): Print also conditions like
6234 "if (a)". Remove dublicated code and use print_generic_expr ().
6235 (stmt_simple_for_scop_p): Only allow conditions we can handle
6238 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6240 * graphite.h (struct scop): Removed new_ivs field.
6241 (SCOP_NEWIVS): Deleted.
6242 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6243 clast_to_gcc_expression, graphite_create_new_loop):
6244 Removed use of new_ivs.
6246 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6248 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6249 create_loops_mapping_num, debug_loop_mapping_1): New.
6250 (debug_loop_mapping): Call debug_loop_mapping_1.
6251 (get_loop_mapping_for_num,
6252 graphite_loops_mapping_add_child,
6253 graphite_loops_mapping_add_child_num,
6254 graphite_loops_mapping_insert_child,
6255 graphite_loops_mapping_parent,
6256 split_loop_mapped_depth_for_num,
6257 loop_mapped_depth_split_loop): New.
6258 (increment_loop_mapped_depths): Removed.
6259 (swap_loop_mapped_depth_for_num): Reimplemented.
6260 (new_scop): Call create_loops_mapping.
6261 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6262 (translate_clast): Pass the old loop father in parameter, and pass
6263 it to get_old_iv_from_ssa_name.
6264 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6265 can_generate_code, can_generate_for_scop): New.
6266 (graphite_trans_bb_block): Returns false when it fails to transform.
6267 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6269 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6271 Reverted all the changes related to the streamization and
6273 These changes are now tracked in the streamization branch.
6275 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6276 Jan Sjodin <jan.sjodin@amd.com>
6278 * graphite.c (gbb_compare): Correctly constify.
6279 (gbb_can_be_ignored): Indent.
6280 (graphite_trans_scop_swap_1and2): Add legality check.
6283 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6285 Remove fallouts from "Reverted the Condate changes".
6286 * tree.h: Remove unused decl.
6287 * gcc.dg/tree-checker: Same.
6288 * timevar.def: Remove counter.
6290 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6292 * Merge from mainline (135673:138072).
6294 Reverted the MIRO changes (from 2008-04-05) that are now
6295 tracked in the miro branch.
6296 * tree-bounds.c: Removed.
6297 * tree-bounds.h: Removed.
6299 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6300 are now tracked in the condate branch.
6301 * tree-check.c: Removed.
6302 * tree-match.c: Removed.
6303 * condate.y: Removed.
6305 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6307 * common.opt: New user flag -floop-block, -floop-strip-mine
6308 and -floop-interchange.
6309 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6310 graphite loop optimization flags is turned on.
6311 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6312 flag_loop_strip_mine and flag_loop_interchange checks before
6314 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6315 -floop-strip-mine and -floop-interchange.
6316 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6318 * gcc.dg/graphite/scop-16.c: Ditto.
6319 * gcc.dg/graphite/scop-17.c: Ditto.
6320 * gcc.dg/graphite/scop-18.c: Ditto.
6322 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6323 Sebastian Pop <sebastian.pop@amd.com>
6325 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6326 (create_empty_loop_on_edge): More fixes.
6327 * tree-phinodes.c (resize_phi_node): Extern.
6328 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6329 * cfghooks.c (update_dominator_information): New split from
6331 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6332 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6333 successor of the function entry block.
6335 * graphite.c: Include pointer-set.h.
6336 (debug_loop_mapping, increment_loop_mapped_depths,
6337 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6338 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6339 swap_loop_mapped_depth_for_num, get_num_from_index,
6340 swap_loop_mapped_depth, loop_iv_stack_debug,
6341 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6342 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6343 get_old_iv_from_ssa_name): New.
6344 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6345 (free_scop): Free SCOP_LOOPS_MAPPING.
6346 (scop_record_loop): Record old ivs.
6347 (create_var_name): Removed.
6348 (initialize_cloog_names): Allocate double space in case strip mine
6349 applies to all loops once.
6350 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6351 (clast_to_gcc_expression): Same. Implement more clast to gimple
6353 (graphite_create_new_loop): Pass in ivstack.
6354 (remove_all_edges): Pass in the construction_edge.
6355 (graphite_remove_iv): Removed.
6356 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6357 remove_cond_exprs): Rewritten.
6358 (move_phi_nodes): New.
6359 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6360 (translate_clast): Pass in ivstack. Rewrite some cases.
6361 (set_cloog_options, debug_clast_stmt): New.
6362 (find_transform): Use set_cloog_options.
6363 (outermost_loop_layer): Removed.
6364 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6365 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6366 mark_old_loops, remove_dead_loops): New.
6368 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6369 (const_column_index, get_first_matching_sign_row_index,
6370 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6371 get_upper_bound): New.
6372 (graphite_trans_bb_strip_mine): Also update the iv map.
6374 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6375 (struct name_tree): Add a loop field.
6376 (struct scop): Add a graphite_loops_mapping field.
6377 (SCOP_LOOPS_MAPPING): New.
6378 (debug_clast_stmt): Declare.
6379 * lambda.h (find_induction_var_from_exit_cond): Declare.
6380 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6381 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6382 (create_empty_loop_on_edge): Updated.
6383 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6384 rename_variables_in_bb): Declare.
6385 * tree-cfg.c (remove_bb): Extern.
6387 * gcc.dg/graphite/block-0.c: New.
6389 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6390 Sebastian Pop <sebastian.pop@amd.com>
6392 * graphite.c (strip_mine_profitable_p): New.
6393 (graphite_trans_bb_block): Disable strip mining if not profitable.
6395 * gcc.dg/graphite/scop-18.c: New.
6396 * gcc.dg/graphite/scop-17.c: Fixed.
6397 * gcc.dg/graphite/scop-16.c: Fixed.
6399 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6400 Jan Sjodin <jan.sjodin@amd.com>
6401 Sebastian Pop <sebastian.pop@amd.com>
6403 * graphite.c (is_interchange_valid): New.
6404 (graphite_trans_bb_block): Check loop nest of basic block for legality
6407 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6408 outer_most_loop, gbb_outer_most_loop_index): New.
6410 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6411 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6412 * gcc.dg/graphite/scop-16.c: New.
6413 * gcc.dg/graphite/scop-17.c: New.
6415 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6417 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6418 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6420 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6422 * graphite.c (new_scop): Initialize SCOP_EXIT.
6423 (scopdet_info): Add.
6424 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6425 (build_scops_1): Cleanup, bugfixes.
6426 (build_scops): Cleanup.
6428 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6429 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6431 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6433 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6435 * gfortran.dg/graphite/graphite.exp: Use
6436 DEFAULT_GRAPHITE_FLAGS.
6438 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6440 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6442 * graphite.c (scan_tree_for_params): Do not assert any more if
6443 MULT_EXPR parameter is negative.
6445 * gfortran.dg/graphite/scop-1.f: New.
6447 * gfortran.dg/graphite/graphite.exp: New.
6449 * gcc.dg/graphite/scop-15.c: New.
6451 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6453 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6455 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6457 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6458 graphite_swap_loops.
6459 (graphite_trans_bb_move_loop): New.
6460 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6461 (graphite_trans_bb_block): New.
6462 (graphite_trans_loop_block): New.
6463 (graphite_trans_scop_swap_1and2): Rename from
6464 graphite_trans_swap_1and2.
6465 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6466 (graphite_trans_scop_block): New.
6467 (graphite_apply_transformations): Rename from
6468 graphite_transformations.
6470 * gcc.dg/graphite/scop-matmult.c: New.
6472 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6474 * graphite.c (gbb_compare): New.
6475 (graphite_sort_gbbs): New.
6476 (gbb_can_be_ignored): New.
6477 (scop_remove_ignoreable_gbbs): New.
6478 (graphite_transformations): Cleanup and add
6479 scop_remove_ignoreable_gbbs.
6480 * lambda.h (lambda_vector_compare): New.
6482 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6484 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6485 (graphite_swap_loops): int -> unsigned
6486 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6487 (graphite_transformations): New.
6488 (graphite_transform_loops): Move to graphite_transformations.
6489 * graphite.h (gbb_nb_loops): Return unsigned.
6491 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6493 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6494 the domain matrix. This makes scop-0.c work again.
6496 2008-06-20 Richard Guenther <rguenther@suse.de>
6498 * graphite.h: Adjust copyright to GPLv3.
6499 * graphite.c: Likewise.
6500 (stmt_simple_memref_for_scop_p): Split out from ...
6501 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6503 (get_bb_type): Optimize.
6505 (is_bb_addable): Fix memleak, replace is_pred call with
6507 (build_scops): Use current_loops.
6508 (param_index): Fix memleak.
6510 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6512 * graphite.c: Fix formatting.
6514 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6516 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6517 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6518 (create_var_name, save_var_name): Newly defined functions.
6519 (initialize_cloog_names): Part of the code factored out to
6521 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6522 in clast_reduction statement.
6523 (graphite_create_new_loop): Now takes a new parameter
6525 (translate_clast): Now also takes the context_loop and bb_exit
6526 parameters. Rewritten the code so that it creates a gimple code
6527 inside the given context.
6528 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6529 remove_cond_expr, disconnect_cond_expr,
6530 disconnect_virtual_phi_nodes): Newly defined functions.
6531 * graphite.h (struct scop): added old_ivs vector.
6532 SCOP_OLDIVS: New macro.
6534 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6536 * cfgloopmanip.c: Add missing function comments, fix formatting.
6538 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6540 * cfgloopmanip.c (update_dominators_in_loop): Defined.
6541 (create_empty_loop_on_edge): Defined.
6542 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
6544 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
6545 (update_dominators_in_loop): Declared as extern
6546 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
6548 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
6550 * graphite.c (print_graphite_bb): Allow changing number of loops
6552 (initialize_cloog_names): Allow changing number of loops.
6553 (build_cloog_prog): Simplify.
6554 (find_transform): Enable cloog option --strides.
6555 (graphite_swap_loops): New.
6556 (graphite_strip_mine_loop): New.
6557 (graphite_trans_swap_1and2): New.
6558 (graphite_trans_strip): New.
6559 (graphite_transform_loops): Add graphite_trans_strip.
6560 * graphite.h (scop_max_loop_depth): New.
6562 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6564 * graphite.c (build_scop_iteration_domain): Remove forgotten
6565 line. (Fixes compile)
6567 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6569 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
6570 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
6571 (build_bb_loops): New.
6572 (graphite_transform_loops): Add build_bb_loops.
6573 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
6575 * graphite.h (graphite_bb): Add loops.
6576 (gbb_nb_loops): New.
6577 (gbb_loop_at_index): New.
6578 (gbb_loop_index): New.
6579 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
6580 using nb_params_in_scop.
6582 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6584 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
6585 (build_scop_canonical_schedules): Build minimized schedule.
6586 (schedule_to_scattering): Adapt to minimized schedule.
6587 * graphite.h (graphite_bb): Add/Update descriptions.
6589 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
6590 Tobias Grosser <grosser@fim.uni-passau.de>
6592 * graphite.c (print_graphite_bb): Add condition printing.
6594 (dump_gbb_conditions): New.
6595 (build_scop_conditions_1): New.
6596 (build_scop_conditions): New.
6597 * graphite.h (graphite_bb): Add conditions.
6599 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6601 * graphite.c (print_graphite_bb):
6602 (free_graphite_bb): New.
6603 (free_scop): Free bbs.
6604 (get_bb_type): Free doms.
6605 (build_scop_context): Free context matrix.
6606 (build_loop_iteration_domains): Remove unused code.
6607 (build_cloog_prog): Free scattering function and blocklist.
6608 (find_transform): Free options.
6610 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
6612 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
6613 Remove unnecessery cloog data structures. Make a copy of the domain
6614 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
6615 unnecessary cloog data structures. Fix memory leaks. Remove insert
6616 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
6618 (build_scop_iteration_domain): Remove unnecessary cloog
6619 data structures. Fix memory leaks.
6620 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
6621 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
6623 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6625 * graphite.c (find_scop_params): Remove initialize_cloog_names.
6627 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6629 * graphite.c (end_scop): Style fix.
6630 (schedule_to_scattering): Style and comment fix.
6632 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6633 * graphite.c (print_graphite_bb): Fix definiton of
6634 schedule_to_scattering.
6635 (initialize_cloog_names): Change nb_scattdims to max loop
6637 (schedule_to_scattering): Take parameter for number of scattering
6639 (build_cloog_prog): Only build as much scattering dimensions as
6642 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6644 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
6645 in polyhedron/aermod.f90.
6647 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
6648 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6649 Harsha Jagasia <harsha.jagasia@amd.com>
6651 * graphite.c (is_bb_addable): Fix segfault.
6653 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
6655 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
6656 with multiple exits and conditional handling in edge cases.
6657 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
6659 * gcc.dg/graphite/scop-14.c: New.
6661 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
6662 Adrien Eliche <aeliche@isty.uvsq.fr>
6664 * graphite.c (is_bb_addable): Add more comments and enhance
6665 readablity of the source code. Fix memory leak.
6666 (is_loop_exit): Fix memory leak.
6668 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6670 * graphite.c (first_loop_in_scop): Deleted.
6671 (setup_cloog_loop): Only walk the loop chain for inner loops.
6672 (build_scop_iteration_domain): Execute setup_cloog_loop for
6673 all loops in the first layer.
6675 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6677 * graphite.c (scan_tree_for_params): Change the way params are
6678 added to be indepenent of the number of loops.
6679 (setup_cloog_loop): Revert to short matrix format. Fix parameter
6681 (build_cloog_prog): Revert to short matrix format.
6683 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6684 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6686 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
6689 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6691 * graphite.c (nb_data_refs_in_scop): New.
6692 (graphite_transform_loops): Print more stats: number of
6693 loops, basic blocks and data references per scop.
6695 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6696 Jan Sjodin <jan.sjodin@amd.com>
6698 * graphite.c (loop_affine_expr, idx_record_params,
6699 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
6700 instead of instantiate_parameters.
6702 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6704 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
6705 add support for parameters, add STATIC_SCHEDULE at the right places,
6708 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6710 * graphite.c (build_scop_loop_nests): Only add the loops, that
6711 are contained completely in the SCoP.
6712 (build_cloog_prog): Disable scattering, until schedule_to_scattering
6713 and the domains are fixed.
6714 (build_scop_canonical_schedules): Add support for bbs not contained
6717 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6719 * graphite.h (scop_contains_loop): Update comments to match
6720 the actual behavior.
6721 (scop_contains_loop): New.
6722 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
6724 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6726 * graphite.c (get_bb_type): On function body, i.e. loop_0,
6727 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
6730 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6731 Tobias Grosser <grosser@fim.uni-passau.de>
6733 * graphite.c (graphite_transform_loops): Early return when
6734 there are no loops in the function.
6736 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6737 Jan Sjodin <jan.sjodin@amd.com>
6739 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
6740 offset of the last loop.
6741 (setup_cloog_loop): Copy the entire outer constraint matrix.
6743 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6744 Jan Sjodin <jan.sjodin@amd.com>
6746 * graphite.c (stmt_in_scop_p, function_parameter_p,
6747 invariant_in_scop_p): Removed.
6748 (scan_tree_for_params): Can be used with no constraint
6749 matrix for gathering parameters.
6750 (idx_record_params): Don't use idx_record_param, instead use
6751 scan_tree_for_params.
6752 (find_scop_parameters): Same.
6753 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
6754 Fix the size of loop domains.
6755 (schedule_to_scattering): Exit when the outer loop is not in scop.
6756 (find_transform): Enable build_cloog_prog.
6758 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6759 Jan Sjodin <jan.sjodin@amd.com>
6761 * graphite.c (schedule_to_scattering): Make scattering domains
6762 uniformly of the same size, as required by CLooG 0.14.0 and before.
6764 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6765 Jan Sjodin <jan.sjodin@amd.com>
6767 * graphite.c (schedule_to_scattering): Rewrite, correct the
6768 translation of the scheduling function to scattering.
6769 (build_cloog_prog): Call schedule_to_scattering only once.
6770 * graphite.h (scop_loop_index): Do not fail for loops not
6771 in the scop: return -1.
6773 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
6775 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
6776 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
6777 (setup_cloog_loop): Export GBB_DOMAIN.
6778 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
6779 able to rebuild the original control flow.
6780 * graphite.h (graphite_bb): Add domain field and access macro.
6783 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6785 * graphite.c (debug_gbb): New.
6786 (print_scop, build_graphite_bb): Use SCOP_BBS.
6787 (build_scop_bbs): Reimplemented.
6788 (dfs_bb_in_scop_p): Removed.
6789 (build_scop_loop_nests): Reorder loops inserted in
6790 SCOP_LOOP_NEST: outer loops should come first.
6791 (build_scop_canonical_schedules): Reinitialize at zero
6792 the components of the SCOP_STATIC_SCHEDULE for the loops
6793 that have already been parsed.
6795 * graphite.h (debug_gbb): Declared.
6797 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6798 Jan Sjodin <jan.sjodin@amd.com>
6800 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
6801 (graphite_loop_to_gcc_loop): Removed.
6802 (remove_all_edges): New.
6803 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
6804 (gloog): Remove useless code.
6806 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6808 * graphite.c (get_bb_type): Reworked. We distinguish between
6809 loops with one or multiple exits.
6810 (is_loop_exit): New.
6812 (is_bb_addable): Rework condition handling, now support for case
6813 case statements and loops with multiple exits.
6815 * gcc.dg/graphite/scop-11.c: New.
6816 * gcc.dg/graphite/scop-12.c: New.
6817 * gcc.dg/graphite/scop-13.c: New.
6819 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6821 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
6822 we have too many colors.
6824 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
6826 * doc/invoke.texi (-ftree-loop-fusion): Document.
6827 * tree-pass.h (pass_loop_fusion): Declared.
6828 * tree-loop-fusion.c: New.
6829 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
6830 * tree-data-ref.c (find_data_references_in_loop): Make extern.
6831 * tree-data-ref.h (find_data_references_in_loop): Declared.
6832 * common.opt (ftree-loop-fusion): Declared.
6833 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
6835 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
6837 * graphite.c (build_access_matrix): Fix typo from the merge.
6839 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
6841 * Merge from mainline (130800:135673).
6843 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6845 * graphite.c (end_scop): The exit of the scop is not part of the scop.
6846 Update dominators after splitting.
6848 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6850 * graphite.c (is_bb_addable): Return the harmful statement.
6851 Factor up some code.
6852 (end_scop): New. Splits end of scope bbs on a harmful statement.
6853 (build_scops_1): Call end_scop.
6855 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6857 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
6858 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
6859 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
6860 build_scops_1): Removed.
6861 (build_scops_2): Renamed build_scops_1.
6863 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
6865 * graphite.c: Fix formatting.
6867 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6869 * graphite.c (get_bb_type): New.
6871 (build_scops_2): New.
6872 (is_bb_addable): New.
6873 (build_scops): Switch the scop detection.
6874 (build_scop_bbs): Add entry bb to scop.
6875 * graphite.h (struct scop): Update comment.
6877 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6879 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
6882 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6884 * gcc.dg/graphite/scop-1.c: Update.
6885 * gcc.dg/graphite/scop-2.c: Update.
6886 * gcc.dg/graphite/scop-4.c: Update.
6887 * gcc.dg/graphite/scop-5.c: Add.
6888 * gcc.dg/graphite/scop-6.c: Add.
6890 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
6892 * gcc.dg/graphite/scop-0.c: Add.
6893 * gcc.dg/graphite/scop-7.c: Add.
6894 * gcc.dg/graphite/scop-8.c: Add.
6895 * gcc.dg/graphite/scop-9.c: Add.
6896 * gcc.dg/graphite/scop-10.c: Add.
6898 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6900 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
6901 Check affine expressions depending on the outermost loop
6903 (stmt_simple_for_scop_p): Same.
6904 (harmfule_stmt_in_scop): Same.
6906 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
6908 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
6909 mark entry and exit, that are not part of the SCoP and update HTML
6912 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
6914 * graphite.c (basic_block_simple_for_scop_p): Renamed
6916 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
6917 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
6918 (all_preds_visited_p, all_succs_visited_p,
6919 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
6920 scop_end_loop): New.
6921 (build_scops): Do not use dfs_enumerate_from.
6923 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
6925 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
6927 * graphite.c: Add comments to functions that are missing a
6929 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
6931 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
6933 * graphite.c (nb_params_in_scop): Moved...
6934 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
6935 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
6936 (clast_to_gcc_expression): Reduce column size to less than 80.
6937 (graphite_create_iv): Return the new name of the IV.
6938 (find_transform): Set options->esp and options->cpp.
6939 (gloog): Comment out the invalidation of the old loop code.
6940 (initialize_dependence_polyhedron): Replace scop_nb_params with
6943 * graphite.h (nb_params_in_scop): ... here.
6944 (scop_nb_params): Removed.
6945 (loop_domain_dim): Return something even when the loop was not
6946 found in the hash table: avoid ICEing on all the graphite.exp
6949 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6951 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
6953 * graphite.c (build_scop_dynamic_schedules): Schedule is built
6954 according to nesting level.
6955 (find_scop_parameters): Call instantiate_parameters.
6956 (scan_tree_for_params): Extend it to handle general affine bounds.
6957 Inner loop bound can depend on outer loop induction variable.
6958 (setup_cloog_loop): tmp variable is allocated on stack. Call
6959 instantiate_parameters with respect to outermost_loop_in_scop.
6960 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
6962 (create_empty_loop): Function loopify should be given edge
6963 probability, instead of edge frequency. Dominance relation from
6964 switch_bb to loop_header.
6965 (clast_to_gcc_expression): Added handling of clast_reduction node.
6966 (gloog): New functionality for removing old loop.
6967 (test_dependence): Factored out from build_rdg_all_levels.
6968 (build_rdg_all_levels): Dependence testing factored out to
6969 test_dependence function.
6971 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
6972 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
6975 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
6977 * graphite.c (free_scop, param_index, initialize_cloog_names,
6978 nb_params_in_scop): Use name_tree map instead of just a tree
6979 for keeping track of the variable name associated to that tree.
6980 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
6981 clast_to_gcc_expression, graphite_create_iv,
6982 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
6983 graphite_stmt_to_gcc_stmt): New.
6984 (gloog): Call these.
6985 * graphite.h (struct name_tree): New.
6986 (struct scop): Use name_tree instead of tree for params.
6987 Store a vector of name_tree for new_ivs.
6989 (scop_nb_params): Use name_tree instead of tree.
6991 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
6992 Sebastian Pop <sebastian.pop@amd.com>
6994 * tree-bounds.c: New.
6995 * tree-bounds.h: New.
6996 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
6997 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
6998 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7002 * c-cppbuiltin.c: Same.
7006 * tree-outof-ssa.c: Same.
7008 * Makefile.in: Same.
7010 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7011 Sebastian Pop <sebastian.pop@amd.com>
7013 * tree-loop-distribution.c (remaining_stmts,
7014 upstream_mem_writes): Removed static variables.
7015 (copy_loop_before, create_bb_after_loop,
7016 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7017 rdg_build_components, rdg_build_partitions,
7018 dump_rdg_partitions): Extern.
7019 (generate_loops_for_partition, generate_code_for_partition): Do not
7021 (already_processed_vertex_p, predecessor_has_mem_write,
7022 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7023 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7024 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7025 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7026 Pass remaining_stmts and upstream_mem_writes as parameters.
7027 (rdg_component): Moved...
7028 (build_rdg_partition_for_component): Do not aggregate components when
7029 flag_streamize_loops is set.
7030 (gen_sequential_loops): New.
7031 (ldist_gen): Call gen_sequential_loops.
7033 * tree-pass.h (pass_loop_streamization): Declared.
7035 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7036 basic blocks when loops structures exist.
7038 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7040 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7042 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7043 eliminate_local_variables_stmt, eliminate_local_variables,
7044 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7045 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7046 of code delimited by two edges in the CFG.
7047 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7048 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7049 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7050 the case of parallelisation of reductions.
7051 (create_loop_fn): Extern.
7052 (create_omp_parallel_region): New.
7054 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7055 dump_data_reference for printing dra and drb.
7056 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7058 (build_rdg): Don't call free_dependence_relations for the moment, as
7059 we attach dependence relations on each edge of the RDG.
7062 * tree-data-ref.h (rdg_component): ...here.
7063 (struct rdg_edge): New field ddr_p relation.
7064 (RDGE_RELATION): New.
7065 (create_bb_after_loop, copy_loop_before,
7066 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7067 rdg_build_partitions, dump_rdg_partitions,
7068 free_rdg_components): Declared.
7070 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7071 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7073 * tree-loop-streamization.c: New.
7075 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7076 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7078 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7080 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7082 * passes.c: Schedule pass_loop_streamization.
7084 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7086 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7089 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7091 * graphite.c (dot_all_scops): Update formatting.
7092 Bbs can now be part of more than one SCoP.
7094 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7096 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7098 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7099 * graphite.h (loop_to_cloog_loop): New.
7101 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7103 * graphite.c (loop_domain_dim, ref_nb_loops,
7104 loop_iteration_vector_dim): New.
7105 (build_access_matrix_with_af, build_access_matrix,
7106 initialize_dependence_polyhedron): Fixed for new matrix layout.
7107 No longer assume that all iteration domains are of the same
7110 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7112 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7113 defined in a loop at depth 0 is invariant.
7114 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7115 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7116 be called at loop depth 0.
7118 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7120 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7121 (down_open_scop): Removed.
7122 (loop_in_scop_p): Redefined.
7123 (scop_affine_expr): New argument: scop.
7124 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7125 a harmful statement ending a scop.
7126 (basic_block_simple_for_scop_p): New argument: scop.
7127 (get_loop_start): Removed.
7128 (new_scop): Initialize SCOP_LOOPS.
7129 (free_scop): Free SCOP_LOOPS.
7130 (succs_at_same_depth, preds_at_same_depth): New.
7131 (end_scop): Test the validity of a scop.
7132 (add_dominators_to_open_scops): New.
7133 (test_for_scop_bound): Call add_dominators_to_open_scops.
7134 Add cases for opening and closing multiple scops.
7135 (build_scops, build_scop_bbs): Iterate over basic blocks in
7137 (build_graphite_bb): Pass scop directly.
7138 (dfs_bb_in_scop_p): New.
7139 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7141 (nb_loops_around_gb): Use loop_in_scop_p.
7142 (schedule_to_scattering): Disabled for the moment the code computing
7143 the "textual order for outer loop".
7145 * graphite.h (struct scop): New field loops.
7147 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7149 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7151 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7152 Sebastian Pop <sebastian.pop@amd.com>
7154 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7155 * common.opt (fstreamize-loops): New.
7156 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7157 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7158 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7159 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7161 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7163 * tree-data-ref.c (build_empty_rdg): New.
7164 (build_rdg): Use it.
7165 * tree-data-ref.h (build_empty_rdg): Declared.
7166 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7167 (find_vertex_for_stmt): Removed.
7168 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7170 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7172 * tree-loop-distribution.c (generate_builtin): After cancelling the
7173 loop tree, also delete basic blocks.
7174 (rdg_flag_uses): Stop recursion when a vertex has already been
7177 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7179 * graphite.c (build_scop_alpha): Removed.
7180 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7181 and dump_dependence_graph to avoid compiler warnings.
7183 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7185 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7186 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7187 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7188 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7189 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7190 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7191 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7192 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7193 dump_dependence_graph): New.
7194 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7196 (struct scop): New field loop2cloog_loop.
7197 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7198 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7200 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7202 * graphite.c (build_graphite_bb): Fix initialization
7203 of the graphite basic block.
7205 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7207 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7208 loop domain matrix. Pass in the number of loops contained in the
7210 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7211 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7212 loops that are not surrounding the current loop are not represented
7213 in the domain constraint matrix.
7214 (build_scop_iteration_domain): Initial domain constraint matrix
7215 contains only the eq/ineq, cst, and scop parameters columns.
7217 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7219 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7220 (print_graphite_bb): Print scattering.
7222 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7224 * graphite.c (initialize_cloog_names): Initialize names of
7225 scattering variables.
7227 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7229 * graphite.c (dot_all_scops_1): Disable debug output while
7232 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7234 * graphite.c (find_transform): Change cloog output language to C.
7236 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7238 * tree-loop-distribution.c (generate_memset_zero,
7239 generate_builtin, generate_code_for_partition,
7240 rdg_flag_all_uses): New.
7241 (rdg_flag_uses): Gather in the same partition the statements defining
7242 the VUSES of the current statement.
7243 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7244 Gather in the same partition not only the stores to the same memory
7245 access, but also the reads.
7246 (ldist_generate_loops): Renamed ldist_gen.
7248 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7249 Tobias Grosser <grosser@fmi.uni-passau.de>
7251 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7252 next pointer, don't use the inner pointer.
7254 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7256 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7257 (find_transform): Call dot_all_1.
7258 * graphite.h (dot_all_scops): Declared.
7260 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7262 * tree-loop-distribution.c: Fix apsi.f ICE.
7263 (create_bb_after_loop): New.
7264 (generate_loops_for_partition): Use it.
7265 * gfortran.dg/ldist-1.f90: New.
7267 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7268 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7270 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7272 * graphite.c (find_transform): Dump cloog program sent to cloog.
7274 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7276 * graphite.c (initialize_cloog_names): Initialize cloog
7279 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7281 * graphite.c (build_scop_context): Fix typo, for the matrix
7282 format: insert '0 >= 0' instead of '-1 >= 0'.
7284 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7286 * Fix merge problems.
7288 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7290 * graphite.c (setup_cloog_loop): Fix typo.
7292 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7294 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7295 * tree-loop-distribution.c: Reimplemented.
7296 * tree-pass.h (pass_loop_distribution): New.
7297 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7299 * graphds.h (struct graph): New field indexes.
7300 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7302 * tree-vect-analyze.c: Remove declaration of static functions when not
7304 * tree-vectorizer.c: Same.
7305 (rename_variables_in_loop): Now extern.
7306 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7307 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7308 calling redirect_edge_and_branch_force.
7310 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7312 * tree-data-ref.c: Don't include tree-chrec.h.
7313 (debug_data_dependence_relations): New.
7314 (dump_data_dependence_relation): Call dump_data_reference on data refs
7316 (same_access_functions): Moved...
7317 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7318 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7319 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7320 struct rdg_vertex_info, ): New.
7321 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7323 (create_rdg_vertices): Initialize the htab of graph->indexes.
7324 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7325 (stmts_from_loop): Don't save LABEL_EXPR.
7326 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7327 hash_stmt_vertex_del): New.
7328 (build_rdg): Initialize rdg->indexes.
7329 (free_rdg, stores_from_loop, ref_base_address,
7330 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7331 have_similar_memory_accesses_1, ref_base_address_1,
7332 remove_similar_memory_refs): New.
7334 * tree-data-ref.h: Include tree-chrec.h.
7335 (debug_data_dependence_relations): Declared.
7336 (same_access_functions): ...here. Now static inline.
7337 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7338 ddr_dependence_level): New.
7339 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7340 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7341 RDG_MEM_READS_STMT): New.
7342 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7343 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7344 rdg_vertex_for_stmt): Declared.
7345 (struct rdg_edge): New field level.
7346 (RDGE_LEVEL, free_rdg): New.
7347 (stores_from_loop, remove_similar_memory_refs,
7348 rdg_defs_used_in_other_loops_p,
7349 have_similar_memory_accesses): Declared.
7350 (rdg_has_similar_memory_accesses): New.
7352 * lambda.h (dependence_level): New.
7353 * common.opt (ftree-loop-distribution): New.
7354 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7355 (print_loop_ir): Renamed print_loops.
7356 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7357 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7358 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7359 (tree-loop-distribution.o): Added.
7360 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7361 (mark_virtual_ops_in_bb): New.
7362 (print_loops_bb, debug_loop_num, debug_loop): New.
7363 * passes.c: Scheduled pass_loop_distribution.
7365 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7367 * graphite.c (scan_tree_for_params): Correct the number of columns
7369 (nb_flat_iterator): New.
7370 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7371 (build_scop_iteration_domain): Correct the number of columns for
7374 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7376 * Merge from mainline (129697:130800).
7378 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7380 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7381 dominated by SCoP's exit.
7382 (graphite_transform_loops): Compute post dominators.
7384 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7386 * Merge from mainline (127169:129697).
7388 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7390 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7391 parameter for the basic block that contains the expression. Use
7392 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7393 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7395 * graphite.h (gbb_loop): New.
7396 (GBB_LOOP): Removed.
7398 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7400 * Makefile.in: Fix merge problem.
7402 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7404 * Merge from mainline (125309:127169).
7405 * tree-loop-distribution.c: Disabled.
7407 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7409 * Merge from mainline (r123693:125309).
7411 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7413 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7415 (correct_modify_p, check_statements, number_of_lvalue_uses,
7416 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7417 instead of MODIFY_EXPR.
7418 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7421 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7423 * tree-loop-distribution.c (struct rdg): Replace arrays by
7424 VECs for edges and vertices.
7425 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7426 (RDGV_NB_PARTITIONS): New.
7427 (PRDG_NBV, PRDG_NBE): Removed.
7428 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7429 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7430 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7432 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7433 Sebastian Pop <sebpop@gmail.com>
7435 * doc/invoke.texi (-ftree-loop-distribution): Document.
7436 * tree-loop-distribution.c: New file.
7437 * tree-pass.h (pass_loop_distribution): Declared.
7438 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7439 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7441 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7442 (DDR_REVERSED_P): New.
7443 * common.opt (-ftree-loop-distribution): New.
7444 * tree-flow.h (distribute_loops): Declared.
7445 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7446 * passes.c (init_optimization_passes): Schedule loop distribution.
7448 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7450 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7451 (print_scop): Don't print when scop is NULL.
7452 (build_scop_context, find_transform): Don't output to stderr.
7454 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7456 * tree-data-ref.c: Don't include graphite.h.
7457 Comment out the code for printing data reference's scop.
7458 (build_access_matrix_with_af): Moved...
7459 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7460 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7461 (print_graphite_bb): Print basic block's schedule.
7462 (print_scop): Don't print the schedule, call cloog's pretty printer.
7463 (bb_in_scop_p): A basic block is in a scop only if it is both
7464 dominated and postdominated by the scop's entry and exit basic blocks.
7465 (function_parameter_p): New.
7466 (invariant_in_scop_p): Use function_parameter_p.
7467 (new_scop, save_scop): New.
7468 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7470 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7471 (loop_in_scop_p): New.
7472 (scop_record_loop): Use loop_in_scop_p.
7473 (build_scop_domain): Renamed build_scop_iteration_domain.
7474 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7475 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7476 setup_cloog_loop, dot_scop_1, dot_scop): New.
7477 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7478 (struct scop): Add a pointer to cloog's representation of a program.
7480 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7482 * doc/invoke.texi (-ftree-check-verbose): Renamed
7483 -ftree-checks-verbose.
7484 * common.opt (flag_tree_check_verbose): Renamed
7485 flag_tree_checks_verbose.
7486 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7488 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7490 * configure: Regenerated.
7491 * config.in: Regenerated.
7492 * tree-ssa-loop.c (graphite_transforms): Execute
7493 graphite_transform_loops only when HAVE_cloog.
7494 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7495 * graphite.c: Include polylibgmp.h and cloog.h.
7496 (graphite_transform_loops): Removed loops parameter.
7497 * tree-flow.h (graphite_transform_loops): Update declaration.
7498 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7499 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7500 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7501 (OBJS-common): Remove dependence on graphite.o.
7502 (BACKEND): Depend on @GRAPHITE@.
7504 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7506 * doc/invoke.texi (-ftree-check-verbose): Documented.
7507 * gcc.dg/tree-checker/tree-checks-1.c: New.
7508 * gcc.dg/tree-checker/tree-checks-2.c: New.
7509 * gcc.dg/tree-checker/tree-checks-3.c: New.
7510 * gcc.dg/tree-checker/tree-checks-4.c: New.
7511 * gcc.dg/tree-checker/tree-checks.exp: New.
7512 * gcc.dg/tree-checker/condates.crp: New.
7513 * common.opt (ftree-checks-verbose): New.
7514 * tree-check.c (tree_check_warning): Move extra stderr output
7515 under control of flag_tree_check_verbose.
7517 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7519 * tree-match.c: Fix comments formatting.
7520 * tree-match.h: Fix comments formatting.
7521 * tree-check.c: Fix comments formatting.
7522 (tree_check_init): Restructure.
7524 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7526 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7528 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7530 * Merge from mainline (r120733:123693).
7532 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7534 * condate.y: New file.
7535 * tree-match.h (struct patt_info_s): New field sign.
7536 (struct condate_s): New field msg.
7537 (normalize_condate, name_condate, add_condate): New.
7538 (conds[], condate_parse): Made extern.
7539 * tree-check.c (tree_check_warning): First arg changed to cond;
7540 warning reformatted.
7541 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
7543 (tree_check): Process trivial condates.
7544 (read_delimited_string): Removed.
7545 (print_cond): Print name and msg.
7546 (conds[]): Made extern.
7547 (parse_tree_check_file_once): Rewritten to use the parser in
7549 Processing of option --tree_check_string moved to tree_scan().
7550 * Makefile.in: Added condate.y
7552 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
7554 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
7555 Use VECs instead of varrays.
7556 * diagnostic.h (lazy_dump_generic_node): Update declaration.
7557 * Makefile.in (pretty-print.o): Depend on vec.h.
7558 * pretty-print.c: Include tree.h and vec.h.
7559 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
7560 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
7561 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
7562 pp_free_list): Use VECs instead of varrays.
7563 * pretty-print.h: Do not include varray.h.
7564 (struct tree_chunk_s): Declaration moved before its use.
7565 (output_buffer): Rename varray field to chunks.
7566 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
7567 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
7568 save_global_holes): Use VECs instead of varrays.
7569 * tree-match.h: Declare VECs of cfg_node, and hole_p.
7570 * tree-check.c (scan_cfg_stmts, push_node,
7571 print_matching_stmt): Removed.
7572 (tree_check_instance, push_global_holes_if_new, tree_check,
7573 execute_tree_check): Use VECs instead of varrays.
7574 (gate_tree_check): Don't execute the CFG check when basic_block_info
7577 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7579 * Merge from mainline (r115016:120733).
7581 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7583 * Merge from mainline (r117632:117661).
7585 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7587 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
7588 * tree-pass.h (TDF_DEBUG, debug_p): New.
7589 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
7590 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
7591 get_loop_exit_condition, analyze_evolution_in_loop,
7592 analyze_initial_condition, analyze_scalar_evolution,
7593 instantiate_parameters, number_of_latch_executions): Use debug_p.
7594 * tree-chrec.c (chrec_apply): Use debug_p.
7595 * tree-data-ref.c: Include graphite.h.
7596 (dump_data_reference): Print also the access matrix.
7597 (analyze_array, analyze_indirect_ref, init_data_ref,
7598 analyze_offset_expr, address_analysis, object_analysis,
7599 create_data_ref, finalize_ddr_dependent,
7600 non_affine_dependence_relation, analyze_ziv_subscript,
7601 analyze_siv_subscript_cst_affine,
7602 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
7603 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
7604 analyze_miv_subscript, analyze_overlapping_iterations,
7605 build_classic_dist_vector, subscript_dependence_tester,
7606 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
7607 (build_access_matrix_with_af): No longer static.
7608 * tree-data-ref.h (scop_p): ... declaration here.
7609 (data_reference.scop): New field.
7610 (DR_SCOP, DR_ACCESS_MATRIX): New.
7611 (build_access_matrix_with_af, dr_num_subscripts): Declared.
7612 * graphite.c (print_graphite_bb): Call dump_data_references.
7613 (print_scop): Use scop_nb_loops and scop_dim_domain.
7614 (test_for_scop_bound): Use debug_p.
7615 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
7617 (scop_loop_index): Moved...
7618 (scop_record_loop): New.
7619 (build_scop_loop_nests): Use scop_record_loop.
7620 (build_scop_domain): Use scop_dim_domain.
7621 (build_access_matrix): Implemented.
7622 (build_scop_canonical_schedules): Use scop_nb_loops.
7623 (build_graphite_bb): Initialize GBB_SCOP.
7624 * graphite.h (scop_p): Moved...
7625 (graphite_bb.scop): New field.
7626 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
7627 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
7628 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
7629 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
7630 scop_loop_index): New.
7631 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
7633 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
7635 * Merge from mainline (r117661:120450).
7637 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
7639 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
7640 at the first declaration outside the varying loop, instantiate as
7642 * tree-chrec.c (for_each_scev_op): New.
7643 * tree-chrec.h (for_each_scev_op): Declared.
7644 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
7645 * tree-data-ref.c (get_references_in_stmt,
7646 find_data_references_in_stmt): New, from trunk.
7647 (find_data_references_in_loop): Use get_references_in_stmt
7648 and find_data_references_in_loop, modified as in trunk.
7649 (build_access_matrix_with_af): New.
7650 * tree-data-ref.h (data_reference): Add a field access_matrix.
7651 (data_ref_loc): New, as in trunk.
7652 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
7653 invariant_in_scop_p, param_index, scan_tree_for_params,
7654 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
7655 idx_record_param, idx_record_params, build_access_matrix,
7656 build_scop_data_accesses, build_scop_canonical_schedules,
7657 build_graphite_bb, build_scop_bbs, find_params_in_bb,
7658 build_scop_params): New.
7659 * graphite.h (graphite_bb): New.
7660 (scop): Add fields static_schedule, params, loop_nest,
7662 * lambda.h: Declare vecs of lambda_matrix.
7663 * tree-flow.h (print_loop_ir_bb): Declared.
7664 * tree-cfg.c (print_loop_ir_bb): New.
7665 (print_loop): Use print_loop_ir_bb.
7667 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
7669 * Merge from mainline (r115016:117632).
7671 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
7673 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
7674 break due to a warning.
7676 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
7678 * graphite.c (print_scops, debug_scops): New.
7679 (graphite_transform): Renamed graphite_find_transform.
7680 * graphite.h (debug_scops): Declared.
7682 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
7684 * tree-match.c: Reformat following the GNU style.
7685 * tree-match.h: Reformat following the GNU style.
7686 * tree-pattern.h: Removed empty file.
7687 * Makefile.in: Remove references to tree-pattern.h.
7688 * tree-check.c: Reformat following the GNU style.
7689 (execute_tree_check): Move gate condition code to...
7690 (gate_tree_check): ...here. New function.
7691 (pass_check): Use the gate function.
7693 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
7695 * tree-pattern.h: New. Tree pattern matching and checking using
7697 * tree-check.c: New. Tree/CFG checking pass.
7698 * tree-match.c: New. Library for tree pattern matching.
7699 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
7700 * toplev.c, flags.h: Add globals for tree-check pass.
7701 * Makefile.in: Integrate the files in tree-check pass.
7702 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
7703 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
7704 Introduce a "lazy" pretty-print mode.
7705 * tree.c, tree.h: Add tree_name.
7707 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
7709 * doc/invoke.texi (-fgraphite): Correct typo.
7710 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
7711 use of print_loop_ir.
7712 * gcc.dg/graphite/scop-1.c: New.
7713 * gcc.dg/graphite/scop-2.c: New.
7714 * gcc.dg/graphite/graphite.exp: New.
7715 * graphite.c: Include domwalk.h.
7716 (print_scop): Print only the entry and exit blocks.
7717 (debug_scop): No longer static.
7718 (affine_expr): Fix formating. Return also true when the expression is
7720 (stmt_simple_for_scop_p): Fix formating.
7721 (build_scops): Use domwalk.
7722 (get_loop_start, end_scop, test_for_scop_bound): New.
7723 (graphite_transform_loops): Avoid printing on stderr.
7724 * graphite.h (debug_scop): Declared.
7725 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
7726 * Makefile.in (graphite.o): Depend on domwalk.h.
7727 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
7728 declarations for static functions.
7729 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
7730 controlling output verbosity.
7732 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
7733 Plesco Alexandru <shurikx@gmail.com>
7735 * doc/invoke.texi (-fgraphite): Document.
7736 * tree-pass.h (pass_graphite_transforms): Declared.
7737 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
7738 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
7739 (pass_graphite_transforms): Defined.
7740 * tree-data-ref.c (free_data_ref, data_reference): Extern.
7741 * tree-data-ref.h (free_data_ref, data_reference): Declared.
7742 * graphite.c, graphite.h: New.
7743 * common.opt (fgraphite): Declared.
7744 * tree-flow.h (graphite_transform_loops): Declared.
7745 * Makefile.in (OBJS-common): Add graphite.o.
7746 (graphite.o): New rule.
7747 * passes.c (pass_graphite_transforms): Scheduled.