1 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
4 Split out of rewrite_reductions_out_of_ssa.
5 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
7 * graphite.c (graphite_transform_loops): Call it.
9 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
11 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
13 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
15 * passes.c (init_optimization_passes): Add pass_graphite.
16 Schedule a pass_copy_prop before pass_graphite_transforms.
17 * timevar.def (TV_GRAPHITE): Declared.
18 * tree-pass.h (pass_graphite): Declared.
19 * tree-ssa-loop.c (pass_graphite): New.
21 * gcc.dg/graphite/id-20.c: New.
23 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
25 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
26 Remove calls to rename_nb_iterations and rename_sese_parameters.
27 * graphite-clast-to-gimple.h (gloog): Update declaration.
28 * graphite.c (graphite_transform_loops): Update call to gloog.
29 * sese.c (rename_variables_in_expr): Removed.
30 (rename_nb_iterations): Removed.
31 (rename_sese_parameters): Removed.
32 * sese.h (rename_nb_iterations): Removed.
33 (rename_sese_parameters): Removed.
35 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
37 * graphite-clast-to-gimple.c (gloog): Remove call to
38 sese_adjust_liveout_phis.
39 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
40 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
41 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
42 rewrite_phi_out_of_ssa.
43 * sese.c (get_vdef_before_sese): Removed.
44 (sese_adjust_vphi): Removed.
45 (sese_adjust_liveout_phis): Removed.
46 * sese.h (sese_adjust_liveout_phis): Removed.
48 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
50 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
51 argument for the place after which to insert the out of SSA copy.
52 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
53 (rewrite_phi_out_of_ssa): Same.
54 (rewrite_cross_bb_scalar_deps): Same.
55 (insert_copyout): Removed.
56 (insert_copyin): Removed.
57 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
58 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
61 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
63 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
64 (rewrite_reductions_out_of_ssa): Same.
65 (rewrite_commutative_reductions_out_of_ssa): Same.
66 (build_poly_scop): Do not call these functions.
67 * graphite-sese-to-poly.h (build_poly_scop): Declared.
68 (rewrite_reductions_out_of_ssa): Declared.
69 (rewrite_commutative_reductions_out_of_ssa): Declared.
70 * graphite.c (graphite_transform_loops): Call on every scop
71 rewrite_commutative_reductions_out_of_ssa before calling
72 rewrite_reductions_out_of_ssa and build_scop_bbs.
74 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
76 * graphite-dependences.c (dot_deps): Make system call to dotty run
78 (dot_deps_stmt): Same.
79 * graphite-poly.c (dot_lst): Same.
81 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
83 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
84 old_type in parameter.
85 (gcc_type_for_value): Update call to gcc_type_for_interval.
86 (compute_type_for_level_1): Renamed compute_type_for_level.
87 Update call to gcc_type_for_interval.
89 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
91 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
92 the scev analysis when the variable is not used outside the loop
93 in a close phi node: call compute_overall_effect_of_inner_loop.
95 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
97 * graphite-sese-to-poly.c (single_pred_cond): Renamed
98 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
99 (build_sese_conditions_before): Renamed call to single_pred_cond.
100 (build_sese_conditions_after): Same.
102 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
104 * graphite-poly.h: Fix comments and indentation.
105 * graphite-sese-to-poly.c: Same.
106 (build_sese_conditions_before): Compute stmt and gbb only when needed.
107 * tree-chrec.c: Fix comments and indentation.
108 (tree-ssa-loop-niter.c): Same.
110 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
112 * refined-regions.c (create_region): Only initialize the region.
113 (find_regions_with_entry): Initialize parent relation and bbmap
115 (build_regions_tree): Set outermost_region to region instead of
117 (calculate_region_tree): Remove unneeded parameters.
119 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
121 * graphite-scop-detection.c (is_scop_p): New.
122 (build_scops_new): New. A skeleton for the new scop detection.
123 (build_scops_old): Renamed from build_scops.
124 (build_scops): New version. Call the new and the old scop
127 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
128 Antoniu Pop <antoniu.pop@gmail.com>
130 * Makefile.in (OBJS-common): Add refined-regions.o.
131 (refined-regions.o): New.
132 (graphite-scop-detection.o): Use refined-regions.h.
133 * graphite-scop-detection.c: Include refined-regions.h
134 (build_scops): Also build the refined region tree.
135 * refined-regions.c: New. Adds an algorithm to detect refined
137 (print_refined_region): New.
138 (debug_refined_region): New.
139 (refined_region_contains_bb_p): New.
140 (refined_region_contains_region_p): New.
142 (struct find_regions_global_data): New.
144 (typedef struct bb_bb_def): New.
145 (new_bb_bb_def): New.
146 (bb_bb_map_hash): New.
150 (new_bb_reg_def): New.
151 (bb_reg_map_hash): New.
152 (eq_bb_reg_map): New.
153 (find_new_region): New.
154 (insert_new_reg): New.
155 (insert_new_bb): New.
156 (insert_shortcut): New.
157 (get_next_postdom): New.
158 (create_region): New.
159 (find_regions_with_entry): New.
160 (find_regions_adc): New.
162 (get_topmost_parent): New.
163 (build_regions_tree): New.
164 (calculate_region_tree): New.
165 (free_region_tree): New.
166 * refined-regions.h: New.
167 (struct refined_region): New.
168 (calculate_region_tree): New.
169 (free_region_tree): New.
170 (refined_region_contains_bb_p): New.
171 (refined_region_contains_region_p): New.
172 (print_refined_region): New.
173 (debug_refined_region): New.
175 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
177 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
180 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
182 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
183 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
185 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
187 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
188 phi_arg_in_outermost_loop.
189 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
190 (remove_invariant_phi): Same.
192 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
194 * graphite-blocking.c
195 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
196 * graphite-clast-to-gimple.c
197 (clast_to_gcc_expression): Same.
198 (precision_for_value): Same.
199 (precision_for_interval): Same.
200 (gcc_type_for_interval): Same.
201 (graphite_create_new_guard): Same.
202 (compute_bounds_for_level): Same.
203 (graphite_create_new_loop_guard): Same.
204 * graphite-interchange.c
205 (build_linearized_memory_access): Same.
206 (pdr_stride_in_loop): Same.
207 (memory_strides_in_loop_1): Same.
208 (memory_strides_in_loop): Same.
209 (extend_scattering): Same.
210 (psct_scattering_dim_for_loop_depth): Same.
211 (pbb_number_of_iterations): Same.
213 (debug_iteration_domains): Same.
215 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
216 (ppl_set_inhomogeneous_gmp): Same.
217 (ppl_strip_loop): Same.
218 (ppl_lexico_compare_linear_expressions): Same.
219 (ppl_read_polyhedron_matrix): Same.
220 (ppl_max_for_le_pointset): Same.
222 (ppl_read_polyhedron_matrix): Same.
223 (tree_int_to_gmp): Same.
224 (gmp_cst_to_tree): Same.
225 (ppl_set_inhomogeneous): Same.
226 (ppl_set_inhomogeneous_tree): Same.
227 (ppl_set_coef): Same.
228 (ppl_set_coef_tree): Same.
229 * graphite-sese-to-poly.c
230 (build_pbb_scattering_polyhedrons): Same.
231 (build_scop_scattering): Same.
232 (scan_tree_for_params_right_scev): Same.
233 (scan_tree_for_params): Same.
234 (find_params_in_bb): Same.
235 (find_scop_parameters): Same.
236 (add_upper_bounds_from_estimated_nit): Same.
237 (build_loop_iteration_domains): Same.
238 (add_condition_to_domain): Same.
239 (pdr_add_memory_accesses): Same.
241 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
243 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
244 CLooG's value_* macros to their respective mpz_* counterparts.
245 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
246 (graphite_create_new_loop_guard): Same.
247 * graphite-interchange.c (build_linearized_memory_access): Same.
248 (pdr_stride_in_loop): Same.
249 (memory_strides_in_loop_1): Same.
250 (1st_interchange_profitable_p): Same.
251 * graphite-poly.c (extend_scattering): Same.
252 (psct_scattering_dim_for_loop_depth): Same.
253 (pbb_number_of_iterations): Same.
254 (pbb_number_of_iterations_at_time): Same.
255 * graphite-poly.h (new_1st_loop): Same.
256 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
257 (oppose_constraint): Same.
258 (insert_constraint_into_matrix): Same.
259 (ppl_set_inhomogeneous_gmp): Same.
260 (ppl_set_coef_gmp): Same.
261 (ppl_strip_loop): Same.
262 (ppl_lexico_compare_linear_expressions): Same.
263 (ppl_max_for_le_pointset): Same.
264 (ppl_min_for_le_pointset): Same.
265 (ppl_build_realtion): Same.
266 * graphite-ppl.h (gmp_cst_to_tree): Same.
267 (ppl_set_inhomogeneous): Same.
268 (ppl_set_inhomogeneous_tree): Same.
269 (ppl_set_coef): Same.
270 (ppl_set_coef_tree): Same.
271 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
272 (build_scop_scattering): Same.
273 (add_value_to_dim): Same.
274 (scan_tree_for_params_right_scev): Same.
275 (scan_tree_for_params_int): Same.
276 (scan_tree_for_params): Same.
277 (find_params_in_bb): Same.
278 (find_scop_parameters): Same.
279 (add_upper_bounds_from_estimated_nit): Same.
280 (build_loop_iteration_domains): Same.
281 (create_linear_expr_from_tree): Same.
282 (add_condition_to_domain): Same.
283 (pdr_add_memory_accesses): Same.
285 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
288 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
289 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
290 When converting an unsigned type to signed, double its precision.
291 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
292 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
293 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
295 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
298 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
299 build_nonstandard_integer_type.
300 (gcc_type_for_interval): Same.
302 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
305 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
306 POINTER_PLUS_EXPR for pointer types.
308 * gcc.dg/graphite/id-19.c: New.
310 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
313 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
314 * graphite-clast-to-gimple.c: Include langhooks.h.
315 (max_signed_precision_type): New.
316 (max_precision_type): Takes two types as arguments.
317 (precision_for_value): New.
318 (precision_for_interval): New.
319 (gcc_type_for_interval): New.
320 (gcc_type_for_value): New.
321 (gcc_type_for_clast_term): New.
322 (gcc_type_for_clast_red): New.
323 (gcc_type_for_clast_bin): New.
324 (gcc_type_for_clast_expr): Split up into several functions.
325 (gcc_type_for_clast_eq): Rewritten.
326 (compute_bounds_for_level): New.
327 (compute_type_for_level_1): New.
328 (compute_type_for_level): New.
329 (gcc_type_for_cloog_iv): Removed.
330 (gcc_type_for_iv_of_clast_loop): Rewritten.
331 (graphite_create_new_loop): Compute the lower and upper bound types
332 with gcc_type_for_clast_expr.
333 (graphite_create_new_loop_guard): Same.
334 (find_cloog_iv_in_expr): Removed.
335 (compute_cloog_iv_types_1): Removed.
336 (compute_cloog_iv_types): Removed.
337 (gloog): Do not call compute_cloog_iv_types.
338 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
340 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
341 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
342 (GBB_CLOOG_IV_TYPES): Removed.
344 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
346 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
348 Reverted this commit: as at this point the loop closed SSA form
349 is under a canonical form respecting the single argument condition.
350 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
351 close phi nodes may have more than one argument.
353 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
355 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
356 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
357 (detect_commutative_reduction): Same.
359 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
361 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
362 close phi nodes may have more than one argument.
364 2010-03-30 Richard Guenther <rguenther@suse.de>
365 Zdenek Dvorak <ook@ucw.cz>
366 Sebastian Pop <sebastian.pop@amd.com>
369 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
370 with multiple arguments.
371 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
373 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
375 * graphite-dependences.c (print_pddr): Call print_pdr with an
377 * graphite-poly.c (debug_pdr): Add an extra argument for the
380 (print_pbb_domain): Same.
382 (print_scop_context): Same.
385 (debug_pbb_domain): Same.
389 (debug_scop_context): Same.
392 (print_scop_params): Same.
393 (debug_scop_params): Same.
394 (print_iteration_domain): Same.
395 (print_iteration_domains): Same.
396 (debug_iteration_domain): Same.
397 (debug_iteration_domains): Same.
398 (print_scattering_function): Same.
399 (print_scattering_functions): Same.
400 (debug_scattering_function): Same.
401 (debug_scattering_functions): Same.
402 * graphite-poly.h (debug_pdr): Update declaration.
404 (print_pbb_domain): Same.
406 (print_scop_context): Same.
409 (debug_pbb_domain): Same.
413 (debug_scop_context): Same.
416 (print_scop_params): Same.
417 (debug_scop_params): Same.
418 (print_iteration_domain): Same.
419 (print_iteration_domains): Same.
420 (debug_iteration_domain): Same.
421 (debug_iteration_domains): Same.
422 (print_scattering_function): Same.
423 (print_scattering_functions): Same.
424 (debug_scattering_function): Same.
425 (debug_scattering_functions): Same.
427 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
429 * graphite-poly.c (print_scattering_function_1): New.
430 (print_scattering_function): Call it.
431 (print_scop_params): Remove spaces at the end of lines.
434 * graphite-poly.h (print_cloog): Declared.
435 (debug_cloog): Declared.
437 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
439 * tree-ssa-copy.c: Revert this previous change:
440 (init_copy_prop): Loop closed phi nodes cancontain more than one
442 (execute_copy_prop): Revert the previous change: do not call
443 rewrite_into_loop_closed_ssa.
445 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
446 Richard Guenther <rguenther@suse.de>
449 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
450 contain more than one argument.
451 (execute_copy_prop): Revert the previous change: do not call
452 rewrite_into_loop_closed_ssa.
454 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
455 * gcc.dg/graphite/id-pr43464-1.c: New.
457 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
460 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
461 and verify_loop_closed_ssa when copy prop is executed in the LNO.
463 * gcc.dg/graphite/id-pr43464.c: New.
465 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
467 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
469 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
470 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
471 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
472 to switch between adding the IV bump in loop->latch or in loop->header.
474 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
476 * passes.c (init_optimization_passes): Add pass_copy_prop
479 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
481 * graphite-poly.c (print_scattering_function): Pretty print following
484 (print_pbb_domain): Same.
485 (dump_gbb_cases): Same.
486 (dump_gbb_conditions): Same.
489 (print_scop_params): Same.
490 (print_scop_context): Same.
492 (print_pbb_body): New.
493 (lst_indent_to): New.
494 (print_lst): Start new lines with a #.
495 * graphite-poly.h (pbb_bb): New.
496 (pbb_index): Use pbb_bb.
497 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
499 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
501 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
504 * gcc.dg/graphite/id-pr43351.c
506 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
509 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
510 call insert_out_of_ssa_copy for default definitions.
511 * gfortran.dg/graphite/id-pr43354.f: New.
513 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
516 * gfortran.dg/graphite/pr43349.f: New.
518 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
520 * graphite-clast-to-gimple.c (my_long_long): Defined.
521 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
522 * graphite-sese-to-poly.c (my_long_long): Defined.
523 (scop_ivs_can_be_represented): Use it.
525 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
527 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
528 graphite-max-bbs-per-function, and loop-block-tile-size.
529 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
531 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
533 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
535 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
537 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
538 (add_upper_bounds_from_estimated_nit): New.
539 (build_loop_iteration_domains): Use it.
541 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
543 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
545 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
548 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
549 should be an INTEGER_CST. Also handle CASE_CONVERT.
550 * gcc.dg/graphite/pr43306.c: New.
552 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
554 * graphite.c (graphite_initialize): To bound the number of bbs per
555 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
556 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
557 * doc/invoke.texi: Document it.
559 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
561 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
562 * graphite-sese-to-poly.h (build_poly_scop): Same.
564 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
566 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
567 the number of parameters in the scop. Use as an upper bound
568 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
569 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
570 * doc/invoke.texi: Document it.
572 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
574 * graphite-sese-to-poly.c (add_param_constraints): Use
575 lower_bound_in_type and upper_bound_in_type.
577 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
579 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
580 instead of unsigned_type_node.
582 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
583 Reza Yazdani <reza.yazdani@amd.com>
586 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
587 on pointer type parameters.
589 * gcc.dg/graphite/run-id-4.c: New.
591 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
594 * gcc.dg/graphite/run-id-3.c: New.
596 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
597 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
599 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
600 handle conversions from pointer to integers.
601 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
602 induction variable, to be able to work with code generated by CLooG.
603 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
604 (build_poly_scop): Bail out if we cannot codegen a loop.
606 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
608 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
609 code generation with gloog_error.
611 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
613 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
614 Call fold_convert on all the returned values.
615 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
616 the type of the resulting expression.
618 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
620 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
621 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
622 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
624 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
626 * graphite-dependences.c (map_into_dep_poly): Removed.
627 (dependence_polyhedron_1): Use combine_context_id_scat.
629 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
631 * graphite-poly.h (struct poly_scattering): Add layout documentation.
632 (struct poly_bb): Same.
633 (combine_context_id_scat): New.
635 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
638 * sese.c (name_defined_in_loop_p): Return false for default
641 * gcc.dg/graphite/pr42326.c: New.
643 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
645 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
646 and clean up the logic.
648 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
650 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
653 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
656 * graphite-scop-detection.c (create_single_exit_edge): Move
657 the call to find_single_exit_edge to....
658 (create_sese_edges): ...here. Don't handle multiple edges
659 exiting the function.
660 (build_graphite_scops): Don't handle multiple edges
661 exiting the function.
663 * gcc.dg/graphite/pr43083.c: New.
665 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
668 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
669 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
671 * gfortran.dg/graphite/pr43097.f: New.
673 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
674 Manuel López-Ibáñez <manu@gcc.gnu.org>
677 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
679 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
682 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
684 * g++.dg/graphite/pr43026.C: New.
686 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
688 * Merge from mainline (154736:156693).
690 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
693 * gcc.dg/graphite/pr43012.c: New.
695 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
697 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
698 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
700 * g++.dg/graphite/pr42930.C: New.
702 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
705 * graphite-scop-detection.c (graphite_can_represent_scev): Call
706 graphite_can_represent_init for MULT_EXPR.
708 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
712 * graphite-sese-to-poly.c (remove_phi): New.
713 (translate_scalar_reduction_to_array): Call remove_phi.
715 * gcc.dg/graphite/pr42530.c: New.
716 * gcc.dg/graphite/pr42914.c: New.
718 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
721 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
722 * graphite-clast-to-gimple.h (gloog): Update declaration.
723 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
724 * graphite-poly.h (struct poly_bb): Add missing comments.
725 (struct scop): Add poly_scop_p field.
727 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
728 * graphite.c (graphite_transform_loops): Build the polyhedral
729 representation for each scop before code generation.
730 * sese.c (rename_variables_in_operand): Removed.
731 (rename_variables_in_expr): Return the renamed expression.
732 (rename_sese_parameters): New.
733 * sese.h (rename_sese_parameters): Declared.
735 * gcc.dg/graphite/pr42771.c: New.
737 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
739 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
741 * gcc.dg/graphite/block-1.c: Same.
742 * gcc.dg/graphite/block-3.c: Same.
743 * gcc.dg/graphite/block-4.c: Same.
744 * gcc.dg/graphite/block-5.c: Same.
745 * gcc.dg/graphite/block-6.c: Same.
746 * gcc.dg/graphite/block-7.c: Same.
747 * gcc.dg/graphite/interchange-0.c: Same.
748 * gcc.dg/graphite/interchange-1.c: Same.
749 * gcc.dg/graphite/interchange-10.c: Same.
750 * gcc.dg/graphite/interchange-11.c: Same.
751 * gcc.dg/graphite/interchange-12.c: Same.
752 * gcc.dg/graphite/interchange-2.c: Same.
753 * gcc.dg/graphite/interchange-3.c: Same.
754 * gcc.dg/graphite/interchange-4.c: Same.
755 * gcc.dg/graphite/interchange-5.c: Same.
756 * gcc.dg/graphite/interchange-6.c: Same.
757 * gcc.dg/graphite/interchange-7.c: Same.
758 * gcc.dg/graphite/interchange-8.c: Same.
759 * gcc.dg/graphite/interchange-9.c: Same.
760 * gcc.dg/graphite/interchange-mvt.c: Same.
762 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
764 * gfortran.dg/graphite/id-19.f: New.
765 * gfortran.dg/graphite/pr14741.f90: New.
766 * gfortran.dg/graphite/pr41924.f90: New.
767 * gfortran.dg/graphite/run-id-2.f90: New.
769 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
772 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
773 to unknown_dependence.
774 (graphite_legal_transform_dr): Handle the unknown_dependence.
775 (graphite_carried_dependence_level_k): Same.
777 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
779 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
781 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
782 Konrad Trifunovic <konrad.trifunovic@inria.fr>
785 * graphite-dependences.c (build_lexicographical_constraint): Return
786 a union of dependence polyhedra.
787 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
789 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
790 * gcc.dg/graphite/block-4.c: Same.
791 * gcc.dg/graphite/block-7.c: Same.
792 * gcc.dg/graphite/interchange-12.c: Same.
793 * gcc.dg/graphite/interchange-mvt.c: Same.
794 * gfortran.dg/graphite/interchange-1.f: XFAILed.
795 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
796 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
798 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
800 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
801 the execution check to FAIL. This testcase is miscompiled by Graphite
802 and the check should be re-enabled.
803 * gcc.dg/graphite/interchange-mvt.c: Same.
804 * gcc.dg/graphite/block-0.c: Same.
805 * gcc.dg/graphite/block-4.c: Same.
806 * gcc.dg/graphite/block-7.c: Same.
808 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
810 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
811 * gcc.dg/graphite/scop-0.c: Fix spaces.
812 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
813 * gfortran.dg/graphite/block-2.f: Same.
814 * gfortran.dg/graphite/block-3.f90: Same.
815 * gfortran.dg/graphite/block-4.f90: Same.
816 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
817 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
819 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
821 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
822 PDDR_ORIGINAL_SCATTERING_P.
823 (pddr_is_empty): Rewritten.
824 (print_dependence_polyhedron_layout): New.
827 (build_alias_set_powerset): Moved up.
828 (poly_drs_may_alias_p): Moved up.
829 (lexicographically_gt_p): Removed.
830 (build_lexicographically_gt_constraint): Renamed
831 build_lexicographical_constraint, reimplemented.
832 (dependence_polyhedron_1): Simplified parameters.
833 (dependence_polyhedron): Same. Keep along empty PDDRs
834 to make efficient use of the cache.
835 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
836 (graphite_legal_transform_dr): Rewritten.
837 (graphite_legal_transform_bb): Pass fewer arguments to
838 graphite_legal_transform_dr.
839 (graphite_carried_dependence_level_k): Simplified implementation.
840 (dot_original_deps_stmt_1): Call dependence_polyhedron.
841 (dot_transformed_deps_stmt_1): Same.
842 (dot_original_deps): Same.
843 (dot_transformed_deps): Same.
844 * graphite-dependences.h (struct poly_ddr): Added a new field
845 original_scattering_p.
846 (PDDR_ORIGINAL_SCATTERING_P): New.
847 (print_pddr): Declared.
848 (debug_pddr): Declared.
849 * graphite-ppl.c: Clarify comment.
850 * sese.h (print_gimple_bb): Removed unused declaration.
853 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
855 * g++.dg/graphite/graphite.exp: Rewritten.
856 * gcc.dg/graphite/graphite.exp: Rewritten.
857 * gfortran.dg/graphite/graphite.exp: Rewritten.
858 * gcc.dg/graphite/block-0.c: Added runtime test.
859 * gcc.dg/graphite/block-1.c: Same.
860 * gcc.dg/graphite/block-3.c: Same.
861 * gcc.dg/graphite/block-4.c: Same.
862 * gcc.dg/graphite/block-5.c: Same.
863 * gcc.dg/graphite/block-6.c: Same.
864 * gcc.dg/graphite/block-7.c: Same.
865 * gcc.dg/graphite/interchange-0.c: Same.
866 * gcc.dg/graphite/interchange-1.c: Same.
867 * gcc.dg/graphite/interchange-10.c: Same.
868 * gcc.dg/graphite/interchange-11.c: Same.
869 * gcc.dg/graphite/interchange-12.c: Same.
870 * gcc.dg/graphite/interchange-2.c: Same.
871 * gcc.dg/graphite/interchange-3.c: Same.
872 * gcc.dg/graphite/interchange-4.c: Same.
873 * gcc.dg/graphite/interchange-5.c: Same.
874 * gcc.dg/graphite/interchange-6.c: Same.
875 * gcc.dg/graphite/interchange-7.c: Same.
876 * gcc.dg/graphite/interchange-8.c: Same.
877 * gcc.dg/graphite/interchange-9.c: Same.
878 * gcc.dg/graphite/interchange-mvt.c: Same.
879 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
881 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
883 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
886 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
888 * common.opt: Add -fgraphite-cloog-opts.
889 * graphite-clast-to-gimple.c (set_cloog_options): Same.
890 * opts.c (decode_options): Same.
892 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
894 * gcc.dg/graphite/id-17.c: New.
895 * gcc.dg/graphite/pr41888.c: New.
896 * gcc.dg/graphite/scop-22.c: New.
897 * gfortran.dg/graphite/pr40982.f90: New.
899 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
901 * graphite-dependences.c: Clarify comments.
902 (build_pddr): Add an extra parameter direction.
903 (graphite_legal_transform_dr): Use build_pddr.
904 (dot_original_deps_stmt_1): Update use of build_pddr.
905 (dot_transformed_deps_stmt_1): Same.
906 (dot_original_deps): Same.
907 (dot_transformed_deps): Same.
909 * gcc.dg/graphite/interchange-12.c: New.
910 * gcc.dg/graphite/block-7.c: New.
912 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
914 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
915 (pddr_transformed_scattering): Removed.
916 (graphite_legal_transform_dr): Use build_pddr.
917 (dot_original_deps_stmt_1): Same.
918 (dot_transformed_deps_stmt_1): Same.
919 (dot_original_deps): Same.
920 (dot_transformed_deps): Same.
922 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
924 * graphite-dependences.c (lexicographically_gt_p): Add comments.
925 (build_lexicographically_gt_constraint): Same.
926 (dependence_polyhedron_1): Same.
927 (dependence_polyhedron): Same.
929 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
931 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
932 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
933 (lexicographically_gt_p): Change type of direction to int.
934 (build_lexicographically_gt_constraint): Same.
935 (dependence_polyhedron_1): Same.
936 (dependence_polyhedron): Same.
937 (pddr_original_scattering): Use integers for direction.
938 (pddr_transformed_scattering): Same.
939 (graphite_legal_transform_dr): Same.
940 (graphite_carried_dependence_level_k): Same.
942 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
944 * graphite-dependences.c (build_pairwise_constraint): Renamed
945 ppl_build_relation. Moved...
946 (dr_equality_constraints): Use ppl_build_relation.
947 (build_pairwise_scheduling_equality): Same.
948 (build_pairwise_scheduling_inequality): Same.
949 * graphite-ppl.c (ppl_build_relation): ...here.
950 * graphite-ppl.h (ppl_build_relation): Declared.
952 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
955 * graphite-clast-to-gimple.c (gloog_error): New static variable.
956 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
957 Set gloog_error when such an expression failed to be built.
958 (translate_clast): Early return when gloog_error is set.
959 (gloog): Clear gloog_error. When gloog_error is set, call
960 set_ifsese_condition to enable the original code. Return the status
961 of the code generation based on gloog_error.
962 * sese.c (set_ifsese_condition): New.
963 * sese.h (set_ifsese_condition): Declared.
965 * g++.dg/graphite/pr42681.C: New.
967 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
970 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
971 rename_nb_iterations.
972 * sese.c (rename_variables_in_operand): New.
973 (rename_variables_in_expr): New.
974 (rename_nb_iterations): New.
975 (sese_adjust_liveout_phis): Update the rename_map.
976 * sese.h (rename_nb_iterations): Declared.
977 * tree-scalar-evolution.c (scev_reset_htab): New.
978 (scev_reset): Call scev_reset_htab.
979 * tree-scalar-evolution.h (scev_reset_htab): Declared.
981 * gfortran.dg/graphite/pr42732.f: New.
983 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
986 * graphite-clast-to-gimple.c: Fix formatting.
987 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
988 (expr_defined_in_loop_p): New.
989 (add_loop_exit_phis): Also handle full expressions: remove from
990 the rename_map the expressions defined in the loop that we're closing.
992 * gfortran.dg/graphite/pr42393-1.f90: New.
993 * gfortran.dg/graphite/pr42393.f90: Add new flags
994 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
995 make this testcase useful in the Graphite branch.
997 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
999 * graphite-scop-detection.c (exclude_component_ref): Removed.
1000 (is_simple_operand): Removed.
1001 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1003 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1006 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1007 the array indexing of ADDR_EXPRs.
1009 * gcc.dg/graphite/pr42221.c: New.
1011 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1014 * graphite.c (graphite_finalize): Call scev_reset.
1015 (graphite_transform_loops): Do not call scev_reset between the code
1016 generation of scops.
1018 * gcc.dg/graphite/pr42521.c: New.
1020 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1022 * graphite-interchange.c (memory_stride_in_loop): Renamed
1024 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1025 (memory_strides_in_loop): Memoize the memory strides per loop.
1026 (lst_interchange_profitable_p): Do not initialize to zero the memory
1028 * graphite-poly.h (struct lst): Add a field memory_strides.
1029 (LST_LOOP_MEMORY_STRIDES): New.
1030 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1031 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1033 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1035 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1036 memory_strides_in_loop. Gather memory strides on a whole loop.
1037 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1038 (lst_interchange_profitable_p): Removed.
1039 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1041 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1043 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1044 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1045 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1046 Remove context_loop and level.
1048 2010-01-07 Richard Guenther <rguenther@suse.de>
1050 PR tree-optimization/42641
1051 * sese.c (rename_map_elt_info): Use the SSA name version, do
1054 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1056 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1057 blocked" only when both the strip mine and the interchange have
1060 * gcc.dg/graphite/block-2.c: Removed.
1061 * gcc.dg/graphite/block-3.c: Add scan pattern.
1062 * gcc.dg/graphite/block-4.c: Same.
1063 * gcc.dg/graphite/block-5.c: Same.
1064 * gcc.dg/graphite/block-6.c: Same.
1066 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1068 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1069 before allocating a new one.
1070 (copy_renames): Check that slot is not NULL.
1071 (mark_bb_with_pbb): Same.
1072 (compute_cloog_iv_types_1): Same.
1073 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1074 nest, and after LSTs.
1075 (lst_try_interchange_loops): Same.
1077 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1080 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1081 the before, nest, and after LSTs.
1082 (lst_try_interchange): Removed.
1083 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1085 (lst_interchange_select_outer): Apply interchange on the outer loop
1086 until there are no more changes in the inner loops.
1088 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1090 Revert patch fixing PR middle-end/42221.
1092 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1095 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1098 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1100 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1103 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1104 that contain only one statement.
1106 * gfortran.dg/graphite/pr42180.f90: New.
1108 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1111 * gfortran.dg/graphite/pr42393.f90: New.
1113 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1116 * gfortran.dg/graphite/pr42186.f90: New.
1118 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1121 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1122 Insert the reduction copy in the same block as the phi node.
1123 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1125 * gcc.dg/graphite/pr42205-1.c: New.
1126 * gcc.dg/graphite/pr42205-2.c: New.
1128 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1131 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1132 the array indexing of ADDR_EXPRs.
1134 * gcc.dg/graphite/pr42221.c: New.
1136 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1140 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1141 index. Call lst_interchange_select_inner only once.
1142 (lst_interchange_select_inner): Update use of lst_try_interchange.
1143 (lst_interchange_select_outer): Update.
1145 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1149 * graphite-interchange.c (lst_try_interchange): Do not increment the
1150 the OUTER index when there is no AFTER kernel. Do not increment the
1151 OUTER index for after processing the AFTER kernel.
1152 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1153 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1154 index. Do not pass to lst_interchange_select_inner the OUTER index.
1155 (scop_do_interchange): Update use of lst_interchange_select_outer.
1157 * gfortran.dg/graphite/graphite.exp
1158 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1159 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1160 the graphite dump file.
1161 * gfortran.dg/graphite/interchange-2.f: Same.
1162 * gfortran.dg/graphite/pr42334-1.f: New.
1164 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1168 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1170 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1171 (lst_try_interchange): Reimplemented.
1172 (lst_interchange_select_inner): Same.
1173 (lst_do_interchange): Renamed lst_interchange_select_outer.
1175 (scop_do_interchange): Update use of lst_interchange_select_outer.
1177 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1178 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1179 * gcc.dg/graphite/pr42211.c: New.
1180 * gfortran.dg/graphite/pr42334.f90: New.
1182 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1185 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1186 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1188 * gfortran.dg/graphite/pr42181.f90: New.
1190 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1193 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1194 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1195 (detect_commutative_reduction_arg): Simplified.
1196 (detect_commutative_reduction): Early return when the argument of
1197 the close phi is not of an SSA_NAME.
1199 * gcc.dg/graphite/pr42284.c: New.
1201 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1203 * dbgcnt.def (graphite_scop): New counter.
1204 * graphite.c: Include dbgcnt.h
1205 (graphite_transform_loops): Use new counter to limit transformations.
1207 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1210 * graphite-scop-detection.c (graphite_can_represent_init): Also
1211 handle more complex MULT_EXPRs containing parameters by recursion
1214 * gfortran.dg/graphite/pr42285.f90: New.
1216 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1218 * g++.dg/graphite/pr42130.C: Fix type.
1220 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1222 * g++.dg/graphite/pr42130.C: Correct testcase.
1224 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1226 * Merge from mainline (154493:154734).
1228 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1230 * Merge from mainline (151362:154491).
1232 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1234 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1235 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1237 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1240 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1241 translate_clast_for_loop): New.
1242 (translate_clast_for): Add a condition around the loop, to do not
1243 execute loops with zero iterations.
1244 * g++.dg/graphite/pr42130.C: New.
1245 * gcc.dg/graphite/pr35356-2.c: Adapt.
1247 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1249 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1250 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1251 Remove context_loop and level.
1253 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1255 * graphite-clast-to-gimple.c (translate_clast_user,
1256 translate_clast_for, translate_clast_guard): Simplify and move common
1257 elements to translate_clast().
1258 (translate_clast): Simplify and get common elements.
1260 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1262 * graphite-clast-to-gimple.c (translate_clast_user,
1263 translate_clast_for, translate_clast_guard): Split out of
1266 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1268 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1269 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1270 debug_clast_name_indexes_1, debug_clast_name_indexes,
1271 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1272 (clast_name_to_gcc, clast_to_gcc_expression,
1273 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1274 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1275 graphite_create_guard_cond_expr, graphite_create_new_loop,
1276 translate_clast): Add params_index.
1277 (initialize_cloog_names): Create parameter strings from scratch, do
1278 not reference other strings.
1279 (create_params_index): New.
1280 (gloog): Initialize params_index.
1281 * graphite-scop-detection (free_scops_1): Removed.
1282 (limit_scops): Use normal free_scops.
1283 * graphite-sese-to-poly.c (save_var_names): Removed.
1284 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1285 and SESE_PARAMS_INDEX.
1286 * sese.c (new_sese, free_sese): Dito.
1287 * sese.h (struct sese): Remove params_index, params_names.
1288 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1290 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1292 Revert the following patch from 2009-09-14:
1293 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1294 tree-scalar-evolution.h, and then tree-data-ref.h.
1295 * graphite-clast-to-gimple.c: Same.
1296 * graphite-dependences.c: Same.
1297 * graphite-interchange.c: Same.
1298 * graphite-poly.c: Same.
1299 * graphite-scop-detection.c: Same.
1300 * graphite-sese-to-poly.c: Same.
1302 * lambda-code.c: Same.
1303 * matrix-reorg.c: Same.
1304 * tree-data-ref.c: Same.
1305 * tree-if-conv.c: Same.
1306 * tree-loop-distribu: Same.: Same.
1307 * tree-loop-linear.c: Same.
1308 * tree-parloops.c: Same.
1309 * tree-predcom.c: Same.
1310 * tree-vect-patterns.c: Same.
1312 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1314 Revert patch from 2009-09-14.
1315 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1316 passes at -O1 and below.
1318 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1321 * gcc.dg/graphite/pr40281.c: New.
1323 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1324 evolutions should not variate in inner loops.
1326 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1329 * gfortran.dg/graphite/pr42050.f90: New.
1331 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1333 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1334 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1336 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1338 * graphite-blocking.c (scop_do_block): New.
1339 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1340 * graphite-poly.h (scop_do_block): Declared.
1342 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1344 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1345 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1346 to transform depth into the time_depth before calling
1347 pbb_number_of_iterations_at_time.
1348 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1351 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1353 Reverted the patch for "scattering permutations" from 2009-10-28.
1355 * graphite-poly.c (print_permutation): New.
1356 (debug_permutation): New.
1357 (new_poly_bb): Initialize PBB_PERMUTATION.
1358 (free_poly_bb): Free PBB_PERMUTATION.
1359 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1360 (struct pbb_permutation_elt): New.
1361 (PBB_PERMUTATION_ELT_STRIDE): New.
1362 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1363 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1364 (new_pbb_permutation_elt): New.
1365 (pbb_permutation_elt_free): New.
1366 (struct poly_bb): Add field permutation.
1367 (PBB_PERMUTATION): New.
1368 (print_permutation): Declared.
1369 (debug_permutation): Declared.
1371 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1373 * graphite-interchange.c (build_partial_difference): New.
1374 (memory_stride_in_loop): Refactored the computation of
1375 equality constraints into build_partial_difference function.
1376 Added support for debugging stride computations.
1378 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1380 * graphite-clast-to-gimple.c (gloog): Free if_region,
1381 if_region->true_region, and if_region->region.
1382 * sese.c (if_region_set_false_region): Free if_region->false_region.
1383 (create_if_region_on_edge): Do not use GGC_NEW.
1384 (move_sese_in_condition): Remove useless initialization.
1386 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1388 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1389 for the loops created by the loop distribution. Do not modify the
1391 (lst_try_interchange_loops): Same. Use a temporary LST for the
1392 transformed schedule. Call lst_update_scattering before data
1393 dependence analysis.
1394 (lst_try_interchange): Pass an extra parameter INDEX.
1395 (lst_do_interchange_1): New.
1396 (lst_do_interchange): Call lst_do_interchange_1.
1397 (scop_do_interchange): Call lst_update_scattering.
1398 * graphite-poly.c (apply_poly_transforms): Do not call
1399 lst_update_scattering.
1400 * graphite-poly.h (lst_pred): New.
1402 (lst_find_first_pbb): Return NULL when not found.
1404 (lst_insert_in_sequence): Allow LST1 to be NULL.
1406 (lst_substitute_3): New.
1407 * gcc.dg/graphite/interchange-1.c: XFail.
1408 * gcc.dg/graphite/interchange-8.c: XFail.
1409 * gcc.dg/graphite/interchange-11.c: XFail.
1411 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1413 * graphite-interchange.c (lst_perfectly_nested_p): New.
1414 (lst_perfect_nestify): New.
1415 (lst_try_interchange_loops): Call store_lst_schedule,
1416 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1417 (scop_do_interchange): Avoid redundant legality test.
1418 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1419 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1420 * graphite-poly.h (psct_static_dim): New.
1421 (lst_dewey_number_at_depth): New.
1422 (lst_find_pbb): Restructured.
1423 (lst_find_first_pbb): Restructured.
1424 (lst_find_last_pbb): New.
1425 (lst_contains_p): New.
1426 (lst_contains_pbb): New.
1427 (lst_create_nest): New.
1428 (lst_remove_from_sequence): New.
1429 (pbb_update_scattering): New.
1430 (lst_update_scattering_under): New.
1431 (lst_update_scattering_seq): New.
1432 (lst_update_scattering): New.
1433 (lst_insert_in_sequence): New.
1434 (lst_distribute_lst): New.
1435 (lst_remove_all_before_including_pbb): New.
1436 (lst_remove_all_before_excluding_pbb): New.
1438 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1440 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1441 get_loop_exit_edges.
1443 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1445 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1447 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1449 * graphite-poly.c (print_permutation): New.
1450 (debug_permutation): New.
1451 (new_poly_bb): Initialize PBB_PERMUTATION.
1452 (free_poly_bb): Free PBB_PERMUTATION.
1453 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1454 (struct pbb_permutation_elt): New.
1455 (PBB_PERMUTATION_ELT_STRIDE): New.
1456 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1457 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1458 (new_pbb_permutation_elt): New.
1459 (pbb_permutation_elt_free): New.
1460 (struct poly_bb): Add field permutation.
1461 (PBB_PERMUTATION): New.
1462 (print_permutation): Declared.
1463 (debug_permutation): Declared.
1465 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1467 * graphite-clast-to-gimple.c (gloog): Do not call
1468 sese_reset_aux_in_loops.
1469 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
1470 extra argument for domains. Do not use loop->aux.
1471 (build_scop_iteration_domain): Initialize and free domains, pass it
1472 to build_loop_iteration_domains and extract the information from
1473 domains. Do not use loop->aux.
1474 * sese.c (sese_reset_aux_in_loops): Removed.
1475 * sese.h (sese_reset_aux_in_loops): Removed.
1477 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1479 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
1480 (dependency_in_loop_p): Same.
1481 (translate_clast): Do not use loop->aux. Initialize
1482 loop->can_be_parallel.
1483 (mark_loops_parallel): Removed.
1484 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
1485 * graphite.c (free_aux_in_new_loops): Removed.
1486 (graphite_finalize): Do not call free_aux_in_new_loops.
1487 (graphite_transform_loops): Do not call mark_loops_parallel.
1489 2009-10-26 Li Feng <nemokingdom@gmail.com>
1491 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
1492 (translate_clast): Pass an extra parameter LEVEL.
1493 Call get_scattering_level.
1494 * graphite-clast-to-gimple.h (get_scattering_level): New.
1496 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1498 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
1499 * cfgloop.h (struct loop): New field single_iv.
1501 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
1502 loop->aux anymore: use loop->single_iv.
1503 (graphite_loop_normal_form): Moved...
1504 (build_graphite_loop_normal_form): Removed.
1505 (gloog): Do not call build_graphite_loop_normal_form.
1506 (free_aux_in_new_loops): Moved...
1507 (mark_loops_parallel): Restructure.
1508 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
1509 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
1510 (scop_canonicalize_loops): New.
1511 (build_poly_scop): Call scop_canonicalize_loops.
1512 * graphite.c (free_aux_in_new_loops): ...here.
1514 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1516 * g++.dg/graphite/graphite.exp: Add the same rules as in
1517 gcc.dg/graphite/graphite.exp.
1519 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1521 * g++.dg/graphite/id-1.C: New.
1523 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1525 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
1527 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
1528 (rewrite_phi_out_of_ssa): Same.
1529 (rewrite_cross_bb_scalar_deps): Same.
1530 (translate_scalar_reduction_to_array): Same.
1532 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1534 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
1537 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1539 * graphite-sese-to-poly.c (dump_alias_graphs): New.
1540 (build_scop_drs): Call dump_alias_graphs.
1542 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1544 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
1545 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1546 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
1547 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1548 * graphite-poly.h (free_lst): New.
1549 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
1550 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
1552 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1554 * graphite-poly.h (struct scop): Add a field saved_schedule.
1555 (SCOP_SAVED_SCHEDULE): New.
1556 (store_lst_schedule): New.
1557 (restore_lst_schedule): New.
1558 (store_scattering): Call store_lst_schedule.
1559 (restore_scattering): Call restore_lst_schedule.
1561 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1563 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
1564 (pdr_add_alias_set): Same.
1565 (build_poly_dr): Same.
1566 (build_alias_set_optimal_p): Same.
1567 (build_base_obj_set_for_drs): Same. Do not store the result of
1570 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1572 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
1573 all_components_are_cliques to 1.
1575 2009-10-20 Li Feng <nemokingdom@gmail.com>
1577 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
1579 (pdr_add_alias_set): Update retrieving alias_set_num.
1580 (build_poly_dr): Update retrieving dr_base_object_set.
1581 (partition_drs_to_sets): Remove.
1582 (build_alias_set_optimal_p): New.
1583 (build_alias_set_for_drs): Rename.
1584 (build_scop_drs): Update.
1585 * graphite-sese-to-poly.h (struct base_alias_pair): New.
1586 (ALIAS_SET_INDEX): Remove.
1587 (BASE_OBJECT_SET_INDEX): Remove.
1589 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1591 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
1593 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1595 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
1596 loop upper bounds for 1-element arrays at end of structures.
1597 * tree-flow.h (array_at_struct_end_p): Declared.
1598 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
1600 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1602 * g++.dg/graphite/pr41305.C: New.
1604 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
1606 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
1607 construction of parameter constraints from loop iteration analysis.
1608 * gcc.dg/graphite/run-id-2.c: New test.
1610 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1612 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
1615 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1617 * graphite-dependences.c (dependence_polyhedron_1): Remove
1618 unused gdim dimensions from the DDR polyhedron.
1620 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1622 * graphite-dependences.c (pddr_transformed_scattering): New.
1623 (dot_original_deps_stmt_1): New.
1624 (dot_transformed_deps_stmt_1): New.
1625 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
1626 dot_transformed_deps_stmt_1.
1627 (dot_original_deps): New.
1628 (dot_transformed_deps): New.
1629 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
1631 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1633 * graphite-dependences.c (reduction_dr_1): Remove wrong
1634 assert: reduction BBs can have multiple reduction writes
1635 to memory. interchange-3.f90 is an example.
1637 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1639 * gfortran.dg/graphite/interchange-3.f90: New.
1641 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1643 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
1645 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1647 * graphite-dependences.c (dependence_polyhedron_1): Add the
1648 context to the dependence polyhedron.
1650 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1652 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
1653 PBB_PDR_DUPLICATES_REMOVED.
1654 (new_poly_bb): Same.
1656 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1658 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
1660 (build_loop_iteration_domains): Extract bounds on parameters
1661 based on the data size.
1662 (build_scop_context): Do not initialize SCOP_CONTEXT;
1663 add new constraints.
1665 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1667 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
1668 * graphite-ppl.h (graphite-ppl.h): Declared.
1670 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1672 * graphite-ppl.c (ppl_print_linear_expr): New.
1673 (debug_ppl_linear_expr): New.
1674 * graphite-ppl.h (ppl_print_linear_expr): Declared.
1675 (debug_ppl_linear_expr): Declared.
1677 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1679 * graphite-interchange.c: Fix comments.
1680 * gcc.dg/graphite/block-1.c: Fix comments.
1682 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1684 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
1685 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
1687 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1689 Reapply the patch from Alexander Monakov that disappeared during
1690 the last merges from trunk.
1692 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
1694 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1695 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
1697 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1699 * graphite-interchange.c (memory_stride_in_loop): The depth
1700 argument corresponds to a dynamic time dimension, so use
1701 psct_dynamic_dim to refer to the transformed scattering dimension.
1703 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1705 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
1707 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1709 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
1711 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
1712 the root of the LST.
1713 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
1715 (print_lst): Print the root of LST in a different format.
1716 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
1718 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1720 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
1722 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1724 * doc/passes.texi: Document the Graphite infrastructure.
1726 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1728 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
1729 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
1730 and check the SSA representation.
1732 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
1734 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1736 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
1738 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1740 * gcc.dg/graphite/interchange-11.c: New.
1742 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1744 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
1746 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1748 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1749 Add -fno-loop-strip-mine and -fno-loop-interchange.
1750 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
1751 -fno-loop-strip-mine.
1752 * gfortran.dg/graphite/graphite.exp: Same.
1754 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1756 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1757 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
1758 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
1759 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
1760 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
1761 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
1762 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
1763 DEFAULT_FLAGS_GRAPHITE_SCOP.
1764 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
1765 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
1767 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1769 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
1771 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1772 Sebastian Pop <sebastian.pop@amd.com>
1774 * graphite-interchange.c (build_linearized_memory_access): Pass an
1775 offset as parameter.
1776 (memory_stride_in_loop): Include transform scattering in the
1777 access functions to be able to querry the strides in the
1779 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
1780 not the psct_iterator_dim.
1782 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1784 * graphite-blocking.c (pbb_do_strip_mine): Removed.
1785 (lst_do_strip_mine_loop): New.
1786 (lst_do_strip_mine): New.
1787 (scop_do_strip_mine): Call lst_do_strip_mine.
1788 * graphite-poly.h (lst_add_loop_under_loop): New.
1789 (lst_find_first_pbb): New.
1791 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1793 * graphite-poly.c (loop_to_lst): Fix LST creation.
1795 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
1797 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
1798 sizeof(unsigned long) to make it run on 32bit systems.
1800 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
1802 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
1805 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1807 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
1809 (write_alias_graph_to_ascii_dot): New.
1810 (write_alias_graph_to_ascii_ecc): Ditto.
1811 (partition_drs_to_sets): Add testing of optimality of current method
1812 which assigns alias numbers according to DFS Comopnent number. used
1813 as heuristic for the upcoming ECC algorithm.
1814 (build_scop_drs): Write to file also with the ecc and dot format.
1816 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1818 * gfortran.dg/graphite/interchange-1.f: XFail.
1820 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1822 * graphite.c (graphite_initialize): Do not handle functions with
1823 more than 100 basic blocks.
1825 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1827 * graphite-blocking.c (pbb_do_strip_mine): Use
1828 PARAM_LOOP_BLOCK_TILE_SIZE.
1830 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1832 * graphite-poly.c (dot_lst_1): New.
1834 * graphite-poly.h (dot_lst): Declared.
1836 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1838 * graphite-dependences.c (dot_deps_stmt_1): New.
1839 (dot_deps_stmt): New.
1840 * graphite-dependences.h (dot_deps_stmt): Declared.
1842 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1844 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
1845 not replace cross BB scalar dependences ending on PHI nodes.
1846 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
1848 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1850 * graphite-poly.c (apply_poly_transforms): Implement the high
1851 level driver for flag_loop_block.
1852 * opts.c (decode_options): Enable flag_loop_block at -O2.
1853 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
1856 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
1858 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1861 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1863 * graphite-poly.h (lst_find_pbb): New.
1864 (find_lst_loop): New.
1866 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1868 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
1869 * graphite-poly.h (struct scop): Remove dep_graph field.
1870 (SCOP_DEP_GRAPH): Removed.
1872 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1874 * graphite-poly.h (copy_lst): Do full copy of LST.
1876 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
1878 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
1879 when the loop stride is zero.
1881 * gcc.dg/graphite/id-16.c: New.
1883 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1885 * graphite-dependences.c (reduction_dr_1): New.
1886 (reduction_dr_p): New.
1887 (graphite_legal_transform_dr): Call reduction_dr_p.
1888 (reduction_ddr): Renamed reduction_ddr_p.
1889 * graphite-poly.h (same_pdr_p): New.
1890 (number_of_write_pdrs): New.
1891 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
1892 (split_reduction_stmt): Do not split reduction statements
1893 when there are no writes to memory.
1894 (translate_scalar_reduction_to_array_for_stmt): Insert the
1895 memory reduction statement just after the scalar reduction statement.
1897 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
1899 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
1900 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
1902 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1904 * graphite-interchange.c (lst_apply_interchange): New.
1905 (lst_interchange_profitable_p): New.
1906 (lst_try_interchange_loops): New.
1907 (lst_try_interchange): New.
1908 (lst_do_interchange): New.
1909 (pbb_do_interchange): Removed.
1910 (scop_do_interchange): Call lst_do_interchange.
1912 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1914 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
1915 SCOP_TRANSFORMED_SCHEDULE.
1920 * graphite-poly.h (lst_p): New.
1923 (LST_LOOP_FATHER): New.
1926 (scop_to_lst): Declared.
1927 (print_lst): Declared.
1928 (debug_lst): Declared.
1929 (new_lst_loop): New.
1930 (new_lst_stmt): New.
1933 (lst_dewey_number): New.
1934 (struct scop): Add original_schedule and transformed_schedule fields.
1935 (SCOP_ORIGINAL_SCHEDULE): New.
1936 (SCOP_TRANSFORMED_SCHEDULE): New.
1937 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
1939 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1941 * graphite-dependences.c (reduction_ddr): New.
1942 (graphite_legal_transform_bb): Call reduction_ddr.
1943 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
1944 Initialize PBB_IS_REDUCTION.
1945 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
1946 (PBB_IS_REDUCTION): New.
1947 (new_poly_bb): Update declaration.
1948 * graphite-scop-detection.h (build_scop_bbs): Removed.
1949 (nb_reductions_in_loop): Removed.
1950 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
1951 parameter for reductions.
1952 (try_generate_gimple_bb): Update call to new_poly_bb.
1953 (build_scop_bbs_1): Same.
1954 (build_scop_bbs): Same.
1955 (gsi_for_phi_node): New.
1956 (scalar_close_phi_node_p): Remove gcc_assert.
1957 (split_reduction_stmt): New.
1958 (is_reduction_operation_p): New.
1959 (phi_contains_arg): New.
1960 (follow_ssa_with_commutative_ops): New.
1961 (detect_commutative_reduction_arg): New.
1962 (detect_commutative_reduction_assign): New.
1963 (follow_inital_value_to_phi): New.
1964 (edge_initial_value_for_loop_phi): New.
1965 (initial_value_for_loop_phi): New.
1966 (detect_commutative_reduction): New.
1967 (translate_scalar_reduction_to_array_for_stmt): New.
1968 (insert_copyout): New.
1969 (insert_copyin): New.
1970 (translate_scalar_reduction_to_array): New.
1971 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
1972 (rewrite_commutative_reductions_out_of_ssa_loop): New.
1973 (rewrite_commutative_reductions_out_of_ssa): New.
1974 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
1975 * sese.h (split_region_for_bb): New.
1977 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
1978 * gcc.dg/graphite/interchange-1.c: Fix format.
1979 * gcc.dg/graphite/interchange-10.c: New.
1981 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1983 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
1986 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1988 * graphite-sese-to-poly.c (scev_analyzable_p): New.
1989 (rewrite_cross_bb_scalar_dependence): New.
1990 (rewrite_cross_bb_scalar_deps): New.
1991 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
1992 Call rewrite_cross_bb_scalar_deps.
1994 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1996 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
1997 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2000 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2002 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2003 * graphite-interchange.c (pbb_do_interchange): Same.
2004 * graphite-poly.c (print_scattering_function): Same.
2006 * graphite-poly.h (pbb_loop): New.
2007 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2009 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2011 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2013 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2015 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2016 so don't pass a pointer to it.
2017 (build_alias_set_for_drs): Same.
2018 (build_base_obj_set_for_drs): Same.
2019 (build_scop_drs): Same.
2021 2009-09-26 Li Feng <nemokingdom@gmail.com>
2023 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2024 the alias graph of data references.
2026 2009-09-25 Li Feng <nemokingdom@gmail.com>
2028 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2029 (build_scop_drs): When debugging, write the alias graph to file,
2030 otherwise, should be disabled.
2032 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2034 * Merge from mainline (151310:151361).
2036 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2038 * Merge from mainline (151171:151310).
2040 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2042 * Merge from mainline (151171:151806).
2044 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2046 * Revert the last commit.
2048 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2050 * Merge from mainline (151171:151819).
2052 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2054 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2055 (is_simple_operand): Remove call to stmt_simple_memref_p.
2056 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2058 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2060 * gcc.dg/graphite/interchange-mvt.c: New File.
2061 * gcc.dg/graphite/scop-dsyrk.c: New File.
2062 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2063 * gcc.dg/graphite/scop-mvt.c: New File.
2064 * gcc.dg/graphite/scop-sor.c: New File.
2066 2009-09-17 Li Feng <nemokingdom@gmail.com>
2068 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2069 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2070 (graphite_carried_dependence_level_k): Ditto.
2071 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2072 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2073 (new_poly_dr): Adjust declaration.
2074 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2075 (free_gimple_bb): Added free_data_refs_aux.
2076 (build_poly_dr): Add dr_base_object_set.
2077 (partition_drs_to_sets): New.
2078 (dr_same_base_object_p): New.
2079 (build_alias_set_for_drs): New.
2080 (build_base_object_set_for_drs): New.
2081 (build_scop_drs): Add build_base_obj_set_for_drs.
2082 * graphite-sese-to-poly.h: Added #define for alias set number index and
2083 base object set index.
2084 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2085 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2087 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2089 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2090 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2092 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2094 * graphite-sese-to-poly.c (struct irp_data): Removed.
2095 (idx_record_params): Removed.
2096 (find_params_in_bb): Scan for parameters the access functions; don't
2097 parse the tree representation.
2099 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2101 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2102 passes at -O1 and below.
2104 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2106 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2107 tree-scalar-evolution.h, and then tree-data-ref.h.
2108 * graphite-clast-to-gimple.c: Same.
2109 * graphite-dependences.c: Same.
2110 * graphite-interchange.c: Same.
2111 * graphite-poly.c: Same.
2112 * graphite-scop-detection.c: Same.
2113 * graphite-sese-to-poly.c: Same.
2115 * lambda-code.c: Same.
2116 * matrix-reorg.c: Same.
2117 * tree-data-ref.c: Same.
2118 * tree-if-conv.c: Same.
2119 * tree-loop-distribu: Same.: Same.
2120 * tree-loop-linear.c: Same.
2121 * tree-parloops.c: Same.
2122 * tree-predcom.c: Same.
2123 * tree-vect-patterns.c: Same.
2125 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2127 Partially revert the previous patch, except the following.
2128 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2129 as parameters the operands of the not expression.
2131 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2133 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2134 Do not call analyze_scalar_evolution on assignments.
2135 (instantiate_scev_phi): Call analyze_scalar_evolution.
2136 (instantiate_scev_name): Call instantiate_scev_assign and
2137 instantiate_scev_phi.
2138 (instantiate_scev_not): Adapted to pass as parameters the operands
2139 of the not expression.
2141 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2143 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2144 to pass as parameters the operands of the binary expression.
2146 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2148 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2149 instantiate_scev_not. Handle NEGATE_EXPR.
2150 (instantiate_scev_r): Handle NEGATE_EXPR.
2152 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2154 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2156 (instantiate_scev_r): Move code in instantiate_scev_2
2157 and instantiate_scev_1.
2159 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2161 * tree-scalar-evolution.c (instantiate_scev_3): New.
2162 (instantiate_scev_1): Move code in instantiate_scev_3.
2164 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2166 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2167 (instantiate_scev_1): Move code in instantiate_scev_poly.
2169 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2171 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2172 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2174 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2176 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2177 (instantiate_scev_1): Move code in instantiate_scev_convert.
2179 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2181 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2182 (instantiate_scev_1): Move code in instantiate_scev_binary.
2184 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2186 * tree-scalar-evolution.c (instantiate_scev_name): New.
2187 (instantiate_scev_1): Move code in instantiate_scev_name.
2189 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2191 * Merge from mainline (150992:151171).
2193 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2195 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2197 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2199 * graphite-dependences.c (graphite_legal_transform_bb): Call
2200 pbb_remove_duplicate_pdrs.
2201 * graphite-poly.c (can_collapse_pdr): Removed.
2202 (pdr_find_duplicate): Removed.
2203 (can_collapse_pdrs): New.
2204 (pbb_remove_duplicate_pdrs): New.
2205 (new_poly_dr): Do not look for duplicates.
2206 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2207 (PBB_PDR_DUPLICATES_REMOVED): New.
2208 (pbb_remove_duplicate_pdrs): Declared.
2210 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2212 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2213 the strides by multiplying by PDR_NB_REFS.
2214 * graphite-poly.c (can_collapse_pdr): New.
2215 (pdr_find_duplicate): New.
2216 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2217 Initialize PDR_NB_REFS.
2218 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2220 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2222 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2224 Revert one of the previous commits:
2225 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2226 the computation of symmetric data dependence relations.
2227 (dependency_between_pbbs_p): Same.
2229 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2232 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2235 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2237 * graphite-dependences.c (pddr_original_scattering): Return NULL
2238 for read-read dependence relations.
2239 * graphite-poly.h (enum poly_dr_type): Fix comment.
2242 (pdr_may_write_p): New.
2244 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2246 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2247 (struct poly_dr): Same.
2248 (new_poly_dr): Same.
2249 * graphite-poly.c (new_poly_dr): Same.
2251 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2252 Sebastian Pop <sebastian.pop@amd.com>
2254 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2255 pbb_strip_mine_time_depth. Changed the implementation so that
2256 transformation is expressed as a transformation on
2257 time (scatttering) dimensions. Also, ensures that the 2d+1
2258 scheduling format is preserved.
2259 (pbb_strip_mine_profitable_p): Profitability is based on the
2260 iteration number of a given time (scattering) dimension,
2261 and not on a original loop depth dimension.
2262 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2263 (pbb_do_strip_mine): Call psct_dynamic_dim.
2264 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2265 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2266 (pbb_nb_dynamic_scattering_transform): New.
2267 (psct_dynamic_dim): New.
2269 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2271 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2272 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2273 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2274 * graphite-interchange.c (build_linearized_memory_access): Same.
2275 (memory_stride_in_loop): Same.
2277 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2279 * graphite-dependences.c (pddr_original_scattering): New.
2280 (graphite_legal_transform_dr): Call pddr_original_scattering.
2283 * graphite-dependences.h (dot_deps): Declared.
2284 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2285 (print_pdr): Print PDR_ID.
2286 * graphite-poly.h (struct poly_dr): Add field id.
2289 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2291 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2293 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2294 not delete the original dependence relation.
2296 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
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-21 Sebastian Pop <sebastian.pop@amd.com>
2304 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2305 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2306 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2307 (free_poly_ddr): New.
2308 (pddr_is_empty): New.
2309 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2310 (dependence_polyhedron): Same. Remove useless gcc_assert.
2312 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2313 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2314 * graphite-dependences.h (enum poly_dependence_kind): New.
2315 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2316 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2317 (PDRP_SINK): Renamed PDDR_SINK.
2318 (PDRP_DDP): Renamed PDDR_DDP.
2320 (free_poly_ddr): Declared.
2321 * graphite-poly.c (new_scop): Use the new hash function names.
2322 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2323 into original_pddrs.
2324 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2326 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2328 * Merge from mainline (150764:150992).
2330 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2332 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2333 bounds with LT_EXPR to make niter analysis more precise on code
2334 generated by Graphite.
2336 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2338 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2339 (graphite_legal_transform_bb): Same.
2340 (poly_drs_may_alias_p): Same.
2342 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2345 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2346 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2348 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2350 * graphite-poly.c (print_pbb): Print PBB index.
2352 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2354 * Merge from mainline (r150672:150764).
2356 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2358 * graphite-interchange.c (ppl_max_for_le): Moved...
2359 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2360 * graphite-ppl.c (ppl_max_for_le): ... here.
2361 * graphite-ppl.h (ppl_max_for_le): Declared.
2363 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2365 * Merge from mainline (r150372:150672).
2367 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2370 * sese.c (convert_for_phi_arg): New.
2371 (add_guard_exit_phis): Use convert_for_phi_arg.
2373 * gfortran.dg/graphite/id-17.f: New.
2375 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2377 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2378 unknown subscript upper bounds.
2380 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2382 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2383 Pranav Garg <pranav.garg2107@gmail.com>
2385 * graphite-interchange.c (gather_access_strides): Removed.
2386 (ppl_max_for_le): New.
2387 (build_linearized_memory_access): New.
2388 (memory_stride_in_loop): New.
2389 (pbb_interchange_profitable_p): Reimplemented.
2390 * graphite-ppl.h (ppl_new_id_map): New.
2391 (ppl_interchange): New.
2393 * gcc.dg/graphite/interchange-6.c: XFAILed.
2395 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2397 * graphite-interchange.c (compute_subscript): Removed.
2398 (compute_array_size_cstr): Removed.
2399 (compute_array_size_poly): Removed.
2400 (compute_array_size): Removed.
2401 (gather_access_strides_poly): Removed.
2402 (gather_access_strides): Empty.
2404 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2406 * graphite-dependences.c (dependence_polyhedron_1): Replace
2407 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2408 (graphite_legal_transform_dr): Same.
2409 (graphite_carried_dependence_level_k): Same.
2410 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2411 Initialize PDR_NB_SUBSCRIPTS.
2412 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2414 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2415 (PDR_NB_SUBSCRIPTS): New.
2416 (pdr_nb_subscripts): Removed.
2417 (pdr_dim): Simplified.
2418 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2419 with PDR_NB_SUBSCRIPTS.
2421 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2423 * graphite-interchange.c (compute_array_size): Remove use of
2425 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2426 Do not initialize PDR_DATA_CONTAINER.
2427 (print_pdr): Do not print PDR_DATA_CONTAINER.
2428 * graphite-poly.h (struct poly_dr): Remove data_container field.
2429 (PDR_DATA_CONTAINER): Removed.
2430 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2432 (build_poly_dr): Same.
2434 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2436 * gcc.dg/graphite/interchange-9.c: New.
2438 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2439 Sebastian Pop <sebastian.pop@amd.com>
2441 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2442 copy of the dependence polyhedron. Free the temporary objects.
2443 (graphite_carried_dependence_level_k): Free unused objects before
2446 * gcc.dg/graphite/interchange-1.c: XFAILed.
2447 * gcc.dg/graphite/interchange-2.c: XFAILed.
2448 * gcc.dg/graphite/interchange-3.c: XFAILed.
2449 * gcc.dg/graphite/interchange-4.c: XFAILed.
2450 * gcc.dg/graphite/interchange-7.c: XFAILed.
2452 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2454 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2455 Early return without analyzing the data dependences if no
2456 transform has been done. Call restore_scattering if the transform
2458 (graphite-interchange.c): Same.
2459 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2460 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2461 (apply_poly_transforms): Do not gcc_assert that
2462 the transform is legal.
2463 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2464 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
2465 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
2466 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2467 * graphite-poly.h (struct poly_scattering): New.
2468 (struct poly_bb): Add original, transformed, and saved fields.
2469 Remove transformed_scattering, original_scattering, nb_local_variables,
2470 and nb_scattering_transform fields.
2471 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
2472 (poly_scattering_new): New.
2473 (poly_scattering_free): New.
2474 (poly_scattering_copy): New.
2475 (store_scattering_pbb): New.
2476 (store_scattering): New.
2477 (restore_scattering_pbb): New.
2478 (restore_scattering): New.
2479 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2480 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
2482 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2484 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
2487 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2489 * Makefile.in (graphite.o): Depends on PREDICT_H.
2490 * graphite.c: Include predict.h.
2491 (graphite_finalize): Call tree_estimate_probability.
2492 * predict.c (predict_loops): Do not call scev_initialize and
2494 (tree_estimate_probability_bb): New.
2495 (tree_estimate_probability): Do not initialize loops: move that
2496 code to the driver. Call tree_estimate_probability_bb.
2497 (tree_estimate_probability_driver): New.
2498 (pass_profile): Use tree_estimate_probability_driver.
2499 * predict.h (tree_estimate_probability): Declared.
2501 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2503 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
2504 * graphite-dependences.c (graphite_legal_transform): Add time to
2505 TV_GRAPHITE_DATA_DEPS.
2506 (dependency_between_pbbs_p): Same.
2507 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2509 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
2511 * Merge from mainline (r149952:150372).
2513 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2515 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
2516 * graphite-blocking.c: Same.
2517 * graphite-clast-to-gimple.c: Same.
2518 * graphite-dependences.c: Same.
2519 * graphite-poly.c: Same.
2520 * graphite-poly.h: Same.
2521 * graphite-ppl.c: Same.
2522 * graphite-scop-detection.c: Same.
2523 * graphite-sese-to-poly.c: Same.
2526 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2528 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
2529 (remove_simple_copy_phi): New.
2530 (remove_invariant_phi): New.
2531 (simple_copy_phi_p): New.
2532 (reduction_phi_p): New.
2533 (gsi_for_ssa_name_def): New.
2534 (insert_out_of_ssa_copy): New.
2535 (insert_out_of_ssa_copy_on_edge): New.
2536 (create_zero_dim_array): New.
2537 (scalar_close_phi_node_p): New.
2538 (rewrite_close_phi_out_of_ssa): New.
2539 (rewrite_phi_out_of_ssa): New.
2540 (rewrite_reductions_out_of_ssa): New.
2541 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
2543 * gcc.dg/graphite/id-11.c: New.
2544 * gcc.dg/graphite/id-15.c: New.
2545 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
2546 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
2547 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
2548 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
2549 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
2550 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
2551 * gfortran.dg/graphite/id-13.f: New.
2552 * gfortran.dg/graphite/id-5.f: New.
2554 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2556 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
2557 check that nb_reductions_in_loop is zero.
2558 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
2559 reduction phi nodes.
2560 (nb_reductions_in_loop): Removed.
2561 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
2562 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
2563 (bb_contains_non_iv_scalar_phi_nodes): Removed.
2564 (scop_contains_non_iv_scalar_phi_nodes): Removed.
2565 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
2567 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2569 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
2570 statements that have an empty iteration domain.
2571 * gfortran.dg/graphite/id-16.f: New.
2573 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2575 * tree-scalar-evolution.c (instantiate_scev_1): Return
2576 chrec_dont_know when the result is not above instantiate_below.
2577 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
2578 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
2579 the tree has a known scalar evolution.
2580 * gfortran.dg/graphite/id-14.f: New.
2581 * gfortran.dg/graphite/id-15.f: New.
2583 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2585 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
2587 (rename_variables): Keep inserting renames after the ones already
2590 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2592 * graphite-sese-to-poly.c (compare_bb_depths): New.
2593 (graphite_sort_dominated_info): New.
2594 (build_scop_bbs_1): Call graphite_sort_dominated_info.
2595 (build_scop_scattering): Fix comment.
2597 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2599 * graphite.c (graphite_finalize): Call print_loops instead of
2600 dump_function_to_file.
2601 * gcc.dg/graphite/graphite.exp: Fix formatting.
2602 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
2603 loops generated in the graphite output file.
2604 * gcc.dg/graphite/pr35356-2.c: New.
2605 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
2606 * gfortran.dg/graphite/id-12.f: New.
2608 2009-07-24 Li Feng <nemokingdom@gmail.com>
2610 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
2613 2009-07-24 Li Feng <nemokingdom@gmail.com>
2614 Tobias Grosser <grosser@fim.uni-passau.de>
2616 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
2617 alias set number build alias in ACCESSES polyhedron.
2618 (build_alias_set_for_drs): New.
2619 (build_pbb_drs): Added build_alias_set_for_drs.
2620 * graphite-dependences.c (poly_drs_may_alias_p): New.
2621 (graphite_carried_dependence_level_k): Check alias information
2622 before building polyhedron.
2624 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2626 * Makefile.in (lambda-code.o): Fix formatting.
2628 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2630 * Merge from mainline (r149350-149952)
2632 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2634 * graphite-poly.c (apply_poly_transforms): Move strip_mine
2635 before interchange to prepare for loop blocking.
2637 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2639 * graphite-poly.c (apply_poly_transforms): Add checks after every
2641 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
2642 done in apply_poly_transforms.
2644 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2646 * graphite-dependences.c (build_lexicographically_gt_constraint):
2647 Replace RES parameter with *RES.
2648 (dependence_polyhedron_1): Pass an address of the parameter RES
2649 instead of value of RES.
2651 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2653 * graphite.c (graphite_finalize): Fix comment.
2654 (graphite_transform_loops): Reset scev info after code generation
2657 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2659 * graphite.c (graphite_finalize): Call scev_reset.
2661 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2663 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
2664 GBB_CLOOG_IV_TYPES hash table twice.
2665 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
2666 (add_condition_to_domain): Clear GMP values.
2668 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2670 * graphite-dependences.c: Fix formatting.
2671 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
2672 (pbb_number_of_iterations): Free ppl_Linear_Expression.
2673 * graphite-sese-to-poly.c: Fix formatting.
2674 * graphite.c (graphite_transform_loops): Create the hash table
2675 after the early return.
2677 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2679 * gcc.dg/graphite/id-14.c: New.
2680 * gcc.dg/graphite/pr40157.c: New.
2681 * gfortran.dg/graphite/id-11.f: New.
2683 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2685 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
2686 (build_poly_scop): Return false when there are no pbbs within
2687 loops to avoid to pass to cloog scops with no loops.
2689 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2691 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
2692 useless test "i % 2".
2693 (build_pbb_scattering_polyhedrons): Fix formatting.
2694 (build_poly_dr): Same.
2695 * graphite.c (graphite_transform_loops): Restructure.
2697 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
2699 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
2700 reduction_list parameter.
2701 (rewrite_all_phi_nodes_with_iv): Same.
2702 (canonicalize_loop_ivs): Same.
2703 * tree-parloops.c (struct brli): Removed.
2704 (build_reduction_list_info): Removed.
2705 (build_new_reduction): New.
2706 (analyze_reduction_list): Removed.
2707 (gather_scalar_reductions): Find reductions instead of phi
2708 nodes that can't be canonicalized.
2709 (try_create_reduction_list): Remove reduction_list parameter.
2710 (gen_parallel_loop): Same.
2711 (parallelize_loops): Remove analyze_reductions variable,
2712 initialization and free.
2713 Change reduction_list htab initialization to reduction_info
2714 elements instead of ssa names.
2715 Call try_create_reduction_list and gen_parallel_loop without
2716 analyzed_reduction argument.
2717 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
2718 canonicalize_loop_ivs with one less argument.
2719 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
2721 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2723 * graphite-dependences.c (new_poly_dr_pair): New.
2724 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
2725 (new_poly_dr_pair): New.
2726 (eq_poly_dr_pair_p): New.
2727 (hash_poly_dr_pair_p): New.
2728 * graphite-dependences.h (struct poly_dr_pair): New.
2729 (eq_poly_dr_pair_p): Declared.
2730 (hash_poly_dr_pair_p): Declared.
2731 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
2732 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
2733 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
2734 * Makefile.in (graphite-poly.o): Add dependence on
2735 graphite-dependences.h.
2737 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2739 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
2740 polynomials of degree > 1 pass to Graphite.
2741 * tree-chrec.c (scev_is_linear_expression): Call
2742 evolution_function_is_affine_multivariate_p.
2743 * gfortran.dg/graphite/id-10.f90: New.
2745 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2747 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
2748 Instantiate scevs varying in outer loops.
2749 * gfortran.dg/graphite/id-9.f: Correct testcase.
2751 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2753 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
2754 redundant constraint.
2756 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2758 * gcc.dg/graphite/graphite.exp: Fix comments.
2759 * gfortran.dg/graphite/graphite.exp: Trigger actions
2760 based on the file names as in the C testsuite.
2761 * gfortran.dg/graphite/block-1.f90: Fix patterns.
2762 * gfortran.dg/graphite/block-2.f: Same.
2763 * gfortran.dg/graphite/block-3.f90: Same.
2764 * gfortran.dg/graphite/block-4.f90: Same.
2765 * gfortran.dg/graphite/id-1.f90: Same.
2766 * gfortran.dg/graphite/id-2.f90: Same.
2767 * gfortran.dg/graphite/id-3.f90: Same.
2768 * gfortran.dg/graphite/id-4.f90: Same.
2769 * gfortran.dg/graphite/id-6.f: Same.
2770 * gfortran.dg/graphite/id-9.f: Same.
2771 * gfortran.dg/graphite/interchange-1.f: Same.
2772 * gfortran.dg/graphite/interchange-2.f: Same.
2773 * gfortran.dg/graphite/scop-1.f: Same.
2775 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2777 * sese.c (expand_scalar_variables_call): New.
2778 (expand_scalar_variables_ssa_name): Handle calls in expander.
2780 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2782 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
2783 Expect to see the pattern twice.
2784 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
2785 * gcc.dg/graphite/interchange-5.c: Same.
2786 * gcc.dg/graphite/interchange-6.c: Same.
2788 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2790 * gcc.dg/graphite/id-10.c: New.
2791 * gcc.dg/graphite/id-12.c: New.
2792 * gfortran.dg/graphite/id-7.f: New.
2793 * gfortran.dg/graphite/id-8.f: New.
2795 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2797 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
2800 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2802 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
2804 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2806 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
2808 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2810 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
2811 building PDR subscripts.
2813 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2815 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
2816 computation of array sizes.
2818 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2820 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
2822 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
2824 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
2825 build_pairwise_constraint, dr_equality_constraints,
2826 build_pairwise_scheduling_equality,
2827 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2828 build_lexicographically_gt_constraint, dependence_polyhedron,
2829 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
2830 Move from NNC_Polyhedron to C_Polyhedron.
2831 * graphite-interchange.c (compute_array_size_poly,
2832 gather_access_strides): Dito.
2833 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
2834 free_scop, pbb_number_of_iterations): Dito.
2835 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
2836 pbb_dim_iter_domain, struct scop): Dito.
2837 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
2838 new_Cloog_Domain_from_ppl_Polyhedron,
2839 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
2840 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
2841 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
2842 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
2843 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
2844 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
2845 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
2846 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
2847 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
2848 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
2849 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
2850 build_scop_iteration_domain, build_poly_dr): Dito
2852 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2854 * gcc.dg/graphite/graphite.exp: Added a rule to execute
2856 * gcc.dg/graphite/run-id-1.c: New.
2858 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2860 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
2861 positivity constraint on the symbolic number of iterations.
2863 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2865 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
2867 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2868 Tobias Grosser <grosser@fim.uni-passau.de>
2870 * graphite-clast-to-gimple.c (build_scop_context): Removed.
2871 (build_cloog_prog): Directly use SCOP_CONTEXT.
2872 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
2873 (free_scop): Free SCOP_CONTEXT.
2874 (print_scop_context): New.
2875 (print_scop): Call print_scop_context.
2876 (debug_scop_context): New.
2877 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
2878 (struct scop): Added field context.
2879 (SCOP_CONTEXT): New.
2880 * graphite-sese-to-poly.c (add_param_constraints): New.
2881 (build_scop_context): New.
2882 (build_poly_scop): Call build_scop_context.
2884 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2886 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
2887 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
2888 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
2889 * graphite-ppl.h: Include double-int.h and tree.h.
2890 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
2891 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
2892 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
2893 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
2895 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2897 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
2898 POINTER_PLUS_EXPR for pointer types.
2899 (clast_to_gcc_expression): Same.
2901 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2903 * graphite-poly.c (print_scattering_function): Early return when
2904 PBB_TRANSFORMED_SCATTERING is not initialized.
2905 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
2907 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
2909 * tree-parloops.c (analyze_reduction_list): Remove unused variable
2912 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
2914 * tree-parloops.c (analyze_reduction_list): Change return
2916 (try_create_reduction_list): Move the call to
2917 analyze_reduction_list to the beginining.
2918 Call reduction_phi with analyzed_reductions as argument
2919 instead of reduction_list.
2921 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
2923 * Merge from mainline (r148296:149346)
2925 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2927 * graphite-scop-detection.c (graphite_can_represent_init): New.
2928 (graphite_can_represent_scev): Call graphite_can_represent_init:
2929 check that the initial value does not contain multiplications of
2931 (stmt_has_simple_data_refs_p): New.
2932 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
2933 (is_simple_operand): Fix formatting.
2934 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
2936 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2938 * gcc.dg/graphite/id-13.c: New.
2939 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
2940 analyze_scalar_evolution, use scalar_evolution_in_region.
2941 (scan_tree_for_params_right_scev): Add extra assert.
2942 (parameter_index_in_region_1): Split from parameter_index_in_region.
2943 (idx_record_params): Use scalar_evolution_in_region.
2944 (find_params_in_bb): Same.
2945 (find_scop_parameters): Same.
2946 (build_loop_iteration_domains): Same.
2947 (create_linear_expr_from_tree): Same.
2948 * sese.c (scalar_evolution_in_region): New.
2949 * sese.h (scalar_evolution_in_region): Declared.
2950 (defined_in_sese_p): New.
2951 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
2953 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
2956 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2958 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
2959 TREE_DATA_REF_H also implies SCEV_H.
2961 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2963 * graphite-poly.c (print_scop_params): New.
2964 (print_scop): Call print_scop_params.
2965 (debug_scop_params): New.
2966 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
2968 2009-07-07 Li Feng <nemokingdom@gmail.com>
2970 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
2971 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
2972 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
2973 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
2974 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
2975 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
2977 2009-07-07 Li Feng <nemokingdom@gmail.com>
2979 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
2980 for dependency checking part.
2981 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
2982 tests for dependency checking.
2983 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2984 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2985 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
2986 flag -fdump-tree-graphite-all for autopar testsuites.
2988 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
2990 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
2991 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
2992 canonicalize_loop_ivs): Moved...
2993 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
2995 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
2997 * tree-parloops.c (try_create_reduction_list): Pass an extra
2998 argument analyzed_reductions. Call analyze_reduction_list.
2999 (gen_parallel_loop): Do not call analyze_reduction_list.
3000 (parallelize_loops): Init and finalize analyzed_reductions.
3002 2009-07-06 Li Feng <nemokingdom@gmail.com>
3004 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3005 Added flag -fno-loop-strip-mine for autopar testcase.
3007 2009-07-04 Li Feng <nemokingdom@gmail.com>
3009 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3010 transformed scattering dimension instead of unmatch orignal when
3011 calling dependence_polyhedron.
3013 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3015 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3017 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3019 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3020 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3022 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3024 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3025 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3026 * graphite-poly.c (pbb_number_of_iterations): New.
3027 * graphite-poly.h (pbb_number_of_iterations): Declared.
3028 (pbb_iterator_dim, pbb_parameter_dim): New.
3030 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3032 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3033 last commit on type of lower and upper bound of loops.
3035 2009-06-29 Li Feng <nemokingdom@gmail.com>
3037 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3038 graphite-dependences.h.
3039 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3040 (mark_bb_with_pbb): New.
3041 (get_stmtfor_depth): New.
3042 (find_pbb_via_hash): New.
3043 (dependency_in_loop_p): New.
3044 (mark_loops_parallel): New.
3045 (free_aux_in_new_loops): New.
3046 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3047 bb with it's relevant pbb. Mark newly created loops. Remove mark
3048 innermost loop parallel without checking.
3049 (gloog): Add parameter BB_PBB_MAPPING.
3050 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3051 (gloog): Change declaration.
3052 (mark_loop_parallel): Make extern.
3053 (free_aux_in_new_loops): Declare.
3054 (bb_pbb_map_hash): New.
3055 (eq_bb_pbb_map): New.
3056 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3057 auto parallelization when flag_graphite_force_parallel is set.
3058 (graphite_finalize): Added free_aux_in_new_loops.
3059 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3060 the innermost loop that marked parallel. Use
3061 flag_graphite_force_parallel instead of loop->can_be_parallel.
3062 (loop_parallel_p): Move inner most checking out of function.
3064 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3066 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3067 type of lower and upper bound of loops signed long int.
3069 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3071 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3072 expression outside the loop.
3074 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3076 * gcc.dg/graphite/interchange-8.c: New.
3078 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3080 * gcc.dg/graphite/interchange-0.c: XFailed.
3081 * gcc.dg/graphite/interchange-5.c: XFailed.
3082 * gcc.dg/graphite/interchange-6.c: XFailed.
3084 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3086 * graphite-interchange.c (compute_array_size_poly): The end of the
3087 recursion should return 1.
3089 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3091 * graphite-interchange.c (compute_array_size_cstr): Allow the
3092 subscript multiplier to be -1.
3093 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3094 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3095 data_container. Initializes PDR_DATA_CONTAINER.
3096 (print_pdr_access_layout): New.
3097 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3098 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3100 (PDR_DATA_CONTAINER): New.
3101 (new_poly_dr): Update declaration.
3102 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3103 (build_poly_dr): Call pdr_add_data_dimensions.
3105 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3107 * graphite-poly.h (struct poly_dr): Fix comment.
3108 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3109 (pdr_add_memory_accesses): New.
3110 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3112 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3114 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3115 (print_pbb): Add call to print_pdrs.
3116 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3118 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3119 Li Feng <nemokingdom@gmail.com>
3121 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3122 (dependency_between_pbbs_p): New.
3123 (lexicographically_gt_p): Assure !empty_p before polyhedron
3124 intersection assign.
3125 (build_lexicographically_gt_constraint): Correct lexicographically
3127 * graphite-dependences.h: New.
3128 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3130 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3132 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3133 (gloog): Print to dump_file the generated clast.
3134 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3135 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3137 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3139 * graphite-poly.c (extend_scattering): Increment
3140 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3142 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3144 * graphite-interchange.c (compute_array_size_poly): Added exit of
3145 recursion condition. Continue iterating even after the first equality.
3146 (compute_array_size): Same.
3148 2009-06-24 Li Feng <nemokingdom@gmail.com>
3150 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3151 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3152 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3153 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3154 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3156 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3158 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3159 only when the use verifies is_gimple_reg.
3161 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3163 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3164 Allocate scaldims after call to unify_scattering_dimensions.
3166 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3168 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3170 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3171 Albert Cohen <albert.cohen@inria.fr>
3173 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3174 variables for the strip mining.
3176 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3177 Pranav Garg <pranav.garg2107@gmail.com>
3179 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3180 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3181 (graphite-blocking.o): New rule.
3182 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3183 * graphite-blocking.c: New.
3184 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3185 flag_loop_strip_mine.
3186 (psct_scattering_dim_for_loop_depth): New.
3187 * graphite-poly.h (scop_do_strip_mine): Declared.
3188 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3189 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3190 flag_loop_strip_mine.
3192 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3194 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3195 a GMP value and a PPL coefficient at each iteration of a loop.
3197 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3199 * graphite-dependences.c (dependence_polyhedron): Do not use
3200 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3201 pbb_nb_scattering_transform.
3202 (graphite_legal_transform_dr): Same.
3203 * graphite-poly.c (extend_scattering): Same.
3204 (unify_scattering_dimensions): Same.
3205 (print_scattering_function): Same.
3206 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3207 PBB_NB_LOCAL_VARIABLES.
3208 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3209 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3210 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3211 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3212 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3213 (pbb_nb_scattering_transform): New.
3214 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3215 (psco_scattering_dim): Add assert on parameters.
3216 (psct_scattering_dim): Same.
3217 (psct_scattering_dim_for_loop_depth): Declared.
3218 (psct_local_var_dim): New.
3219 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3220 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3221 correct layout, call pbb_nb_local_vars.
3222 (psct_add_local_variable, psct_add_scattering_dimension): New.
3223 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3224 Initialize PBB_NB_SCATTERING_TRANSFORM.
3226 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3228 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3229 (set_coef): Renamed ppl_set_coef.
3230 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3232 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3234 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3235 test a boolean against 1.
3236 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3237 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3238 (pbb_do_interchange): Returns true when a transform has been performed.
3239 (scop_do_interchange): Same.
3240 * graphite-poly.c (apply_poly_transforms): Use the return value of
3241 scop_do_interchange.
3242 * graphite-poly.h (scop_do_interchange): Update declaration.
3244 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3246 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3248 * sese.c (sese_reset_aux_in_loops): New.
3249 * sese.h (sese_reset_aux_in_loops): New.
3251 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3253 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3254 multiplier and multiply the constant by the multiplier.
3255 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3256 (build_poly_dr): Do not use the multiplier to define the subscript.
3258 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3260 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3261 compiler's data reference. Initialize PDR_CDR.
3262 (print_pdr): Call dump_data_reference.
3263 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3264 Add compiler_dr field.
3265 (PDR_BB): Renamed PDR_PBB.
3267 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3268 GCC's data reference representation.
3269 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3270 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3272 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3274 * graphite-poly.c (print_scattering_function): Also print the layout.
3275 * graphite-poly.h (pbb_nb_local_vars): New.
3277 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3279 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3281 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3283 * graphite-poly.c (print_pdr, debug_pdr): New.
3284 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3285 (PDR_BASE): Removed.
3287 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3289 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3292 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3294 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3295 subscript identification column.
3296 (pbb_do_interchange): Print to dump_file that some loops "will be
3297 interchanged". Rely on that chain of characters in the testcases.
3298 * gcc.dg/graphite/interchange-0.c: New.
3299 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3300 interchange-*.c files and compile them with -floop-interchange.
3302 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3304 * graphite-interchange.c (interchange_profitable_p): Renamed
3305 pbb_interchange_profitable_p.
3307 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3308 Harsha Jagasia <harsha.jagasia@amd.com>
3309 Pranav Garg <pranav.garg2107@gmail.com>
3311 * graphite-interchange.c (interchange_profitable_p): Make static.
3312 (pbb_interchange_loop_depths, pbb_do_interchange,
3313 scop_do_interchange): New.
3314 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3315 for flag_loop_interchange.
3316 * graphite-poly.h (scop_do_interchange): Declared.
3317 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3318 flag_loop_interchange is used.
3320 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3322 * graphite-dependences.c (dependence_polyhedron): Update use of
3323 pbb_nb_scattering_dims.
3324 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3325 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3326 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3327 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3329 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3331 * graphite.c: Cleanup foo.
3333 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3335 * Merge from mainline (r143684:148293).
3336 * Disabled libpcp until it gets fixed.
3338 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3339 Harsha Jagasia <harsha.jagasia@amd.com>
3341 * graphite-interchange.c: New.
3342 * Makefile.in (graphite-interchange.o): New.
3343 * graphite-poly.h (interchange_profitable_p): Declared.
3344 * graphite-ppl.h (value_max): New.
3346 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3348 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3349 * graphite-poly.h: Fix some comments.
3353 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3356 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3357 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3358 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3359 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3360 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3361 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3362 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3363 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3364 * graphite-clast-to-gimple.c: Same.
3365 * graphite-dependences.c: Same.
3366 * graphite-poly.c: Same.
3367 * graphite-sese-to-poly.c: Same.
3369 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3371 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3372 expressions for an IV rename, as returned by clast_to_gcc_expression.
3373 (copy_renames): Rename new_name to expr.
3374 * sese.c (debug_rename_elt): Same.
3377 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3378 the information from the rename map.
3379 (rename_variables_in_stmt): Same.
3380 (add_loop_exit_phis): Rename new_name to expr.
3381 (insert_loop_close_phis): Same.
3382 (add_guard_exit_phis): Same. Call force_gimple_operand.
3383 * sese.h (struct rename_map_elt): Rename new_name to expr.
3384 (new_rename_map_elt): Same.
3386 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3388 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3389 * sese.c (set_rename): Make it extern.
3390 * sese.h (set_rename): Declared.
3392 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3394 * graphite-poly.c (extend_scattering): Free values.
3395 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3397 (ppl_print_powerset_matrix): Same.
3398 * graphite-scop-detection.c (free_scops_1): New.
3399 (limit_scops): Call free_scops_1.
3400 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3401 (build_poly_dr): Free PPL coefficients.
3402 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3404 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3406 * graphite-dependences.c: New.
3407 * graphite-data-ref.c: Removed.
3408 * graphite-data-ref.h: Removed.
3409 * Makefile.in (graphite-data-ref.o): Removed.
3410 (graphite-dependences.o): Added.
3411 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3412 * graphite-poly.c: Same.
3413 Move the data dependence testing to graphite-dependences.c.
3415 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3417 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3418 from graphite_cannot_represent_loop. Code refactored.
3419 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3421 2009-05-17 Li Feng <nemokingdom@gmail.com>
3423 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3424 Cover all the testcases (not only the filtered ones).
3426 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3428 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3429 unnecessary check. Update comments. Move check for REAL_TYPE here.
3430 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3431 done in (stmt_simple_for_scop_p).
3433 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3435 * graphite.c (print_global_statistics): New.
3436 (print_graphite_scop_statistic): New.
3437 (print_graphite_statistics): New.
3438 (graphite_initialize, graphite_transform_loops): Print statistics.
3439 * graphite-scop-detection (build_scops): Print statistics.
3440 (print_graphite_scop_statistics): New.
3441 (print_graphite_statistics): New.
3443 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3445 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3446 (debug_clast_name_index): Removed.
3447 (debug_clast_name_indexes_1): Removed.
3448 (debug_clast_name_indexes): Removed.
3449 (clast_name_index_elt_info): Removed.
3450 (eq_clast_name_indexes): Removed.
3451 (clast_name_to_index): Removed.
3452 (new_clast_name_index): Removed.
3453 (save_clast_name_index): Removed.
3454 (save_var_name): Moved...
3455 (init_sese_params_index): Removed.
3456 (clast_name_to_gcc): Remove use of name_tree.
3457 (initialize_cloog_names): Same.
3458 (gloog): Do not call init_sese_params_index.
3459 * graphite-sese-to-poly.c (save_var_name): ...here.
3460 (parameter_index_in_region): New.
3461 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3462 (parameter_index_in_region): Removed.
3463 (is_parameter): Remove use of name_tree.
3464 * sese.h (struct name_tree): Removed.
3465 (struct sese): Remove use of name_tree. New field params_names.
3466 (SESE_PARAMS_NAMES): New.
3467 (SESE_PARAMS): Remove duplicate.
3468 (parameter_index_in_region): Removed.
3469 (sese_nb_params): Remove use of name_tree.
3470 (struct clast_name_index): New.
3471 (new_clast_name_index): New.
3472 (clast_name_to_index): New.
3473 (save_clast_name_index): New.
3474 (debug_clast_name_index): New.
3475 (debug_clast_name_indexes_1): New.
3476 (debug_clast_name_indexes): New.
3477 (clast_name_index_elt_info): New.
3478 (eq_clast_name_indexes): New.
3480 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3482 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
3483 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
3484 (graphite_loop_normal_form): Do not pass region. Do not
3485 initialize SESE_OLDIVS.
3486 (build_graphite_loop_normal_form): Update call to
3487 graphite_loop_normal_form.
3488 * sese.c (debug_oldivs): Removed.
3489 (new_sese): Do not initialize SESE_OLDIVS.
3490 (free_sese): Do not free SESE_OLDIVS.
3491 (oldiv_for_loop): Removed.
3492 * sese.h (struct sese): Remove old_ivs.
3493 (SESE_OLDIVS): Removed.
3494 (oldiv_for_loop): Removed.
3496 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3498 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
3499 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
3500 replaced by a call to newivs_to_depth_to_newiv.
3501 (clast_to_gcc_expression): Pass newivs, remove ivstack.
3502 (clast_to_gcc_expression_red): Same.
3503 (gcc_type_for_clast_expr): Same.
3504 (gcc_type_for_clast_eq): Same.
3505 (graphite_translate_clast_equation): Same.
3506 (graphite_create_guard_cond_expr): Same.
3507 (graphite_create_new_guard): Same.
3508 (graphite_create_new_loop): Same.
3509 (build_iv_mapping): Same.
3510 (translate_clast): Same.
3512 (loop_iv_stack_patch_for_consts): Removed. *
3513 sese.c (iv_stack_entry_is_constant): Removed.
3514 (iv_stack_entry_is_iv): Removed.
3515 (loop_iv_stack_push_iv): Removed.
3516 (loop_iv_stack_insert_constant): Removed.
3517 (loop_iv_stack_pop): Removed.
3518 (loop_iv_stack_get_iv): Removed.
3519 (loop_iv_stack_get_iv_from_name): Removed.
3520 (debug_loop_iv_stack): Removed.
3521 (free_loop_iv_stack): Removed.
3522 (loop_iv_stack_remove_constants): Removed. *
3523 sese.h (iv_stack_entry_kind): Removed.
3524 (iv_stack_entry_data_union): Removed.
3525 (iv_stack_entry_struct): Removed.
3526 (iv_stack_entry_p): Removed.
3527 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
3528 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
3529 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
3530 loop_iv_stack_pop, free_loop_iv_stack): Removed.
3531 (gbb_loop_at_index): Fix indenting.
3532 (gbb_loop_index): Removed.
3534 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3536 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
3537 Call clast_name_to_index.
3539 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3541 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
3542 do not pass params. Get params from SESE_PARAMS.
3543 (clast_to_gcc_expression): Same.
3544 (clast_to_gcc_expression_red): Same.
3545 (gcc_type_for_clast_eq): Same.
3546 (graphite_translate_clast_equation): Same.
3547 (graphite_create_new_loop): Same.
3548 * sese.c (rename_variables_in_stmt): Fix comment.
3550 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3552 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
3554 Call save_clast_name_index.
3555 (translate_clast): Pass newivs_index.
3556 (gloog): Create and free newivs_index.
3558 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3560 * graphite-clast-to-gimple.c (clast_name_index): New structure.
3561 (clast_name_index_p): New type.
3562 (debug_clast_name_index): New.
3563 (debug_clast_name_indexes_1): New.
3564 (debug_clast_name_indexes): New.
3565 (clast_name_index_elt_info): New.
3566 (eq_clast_name_indexes): New.
3567 (clast_name_to_index): New.
3568 (new_clast_name_index): New.
3569 (save_clast_name_index): New.
3570 (init_sese_params_index): New.
3571 (gloog): Call init_sese_params_index.
3572 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
3573 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
3574 (free_sese): Free SESE_PARAMS_INDEX.
3575 * sese.h (struct sese): Add params_index.
3576 (SESE_PARAMS_INDEX): New.
3578 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3580 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
3581 (graphite_create_new_loop): Pass the newivs vector. Push the
3582 newly created IV to newivs.
3583 (translate_clast): Pass the newivs vector.
3584 (gloog): Create and destroy the newivs vector.
3586 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3588 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
3589 (graphite_loop_normal_form): Initialize loop->aux with the unique
3590 IV that has been created.
3592 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
3594 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
3595 scev with parameters in the base part. They where forbidden
3598 2009-05-11 Li Feng <nemokingdom@gmail.com>
3600 * gcc.dg/graphite/graphite.exp: Set different default
3601 compile options by file names.
3602 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
3603 * gcc.dg/graphite/id-{1-9}.c: Ditto.
3604 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
3605 * gcc.dg/graphite/scop-matmult.c: Ditto.
3607 2009-05-08 Li Feng <nemokingdom@gmail.com>
3609 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
3610 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
3611 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
3612 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
3614 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3616 * graphite-scop-detection (build_scops_1): Fix little bug introduced
3619 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3621 * graphite-scop-detection.c (graphite_can_represent_scev): Only
3622 allow integer constant strides.
3623 (graphite_can_represent_expr): Depend on outermost_loop.
3624 (stmt_simple_memref_p, graphite_cannot_represent_loop,
3625 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
3626 build_scops_1): Same.
3627 (scopdet_basic_block_info): Same and insert layered SCoP
3629 (try_generate_gimple_bb): Cleanup.
3630 (build_scops): Enable data references.
3632 * gcc.dg/graphite/id-5.c: New.
3633 * gcc.dg/graphite/id-9.c: New.
3634 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
3635 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
3637 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3639 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
3640 that we have not yet built for this SCoP.
3642 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3644 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
3645 for complex numbers.
3647 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3649 * graphite-ppl.c: Fix build if cloog is not available.
3651 2009-05-04 Li Feng <nemokingdom@gmail.com>
3653 * tree-parloops.c (loop_parallel_p): Remove construction of
3654 NITER and REDUCTION_LIST.
3655 (try_get_loop_niter): New.
3656 (try_create_reduction_list): New.
3657 (parallelize_loops): Bypass the failed checkings in autopar
3658 when can_be_parallel in loop structure is set to true.
3660 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3662 * gcc.dg/graphite/id-6.c: Update testcase.
3663 * gcc.dg/graphite/scop-3.c: Dito.
3665 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3667 * graphite-scop-detection.c (stmt_simple_for_scop_p):
3668 Enable EQ_EXPR and NE_EXPR again.
3670 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3672 * graphite-scop-detection.c (graphite_can_represent_scev):
3673 Add check if scev is affine multivariate.
3674 (harmful_stmt_in_bb): Check if we can represent the conditions.
3675 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
3677 * gcc.dg/graphite/id-7.c: New.
3679 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3681 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
3682 Check all bbs in region, not only the bbs that are represented in
3684 (build_poly_scop): Add newline.
3685 * gcc.dg/graphite/id-8.c: New.
3687 2009-04-30 Li Feng <nemokingdom@gmail.com>
3689 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
3690 when loop initialize.
3691 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
3692 * common.opt: Declare flag_graphite_force_parallel.
3693 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
3695 * graphite-poly.c (apply_poly_transforms): Introduce
3696 flag_graphite_force_parallel.
3697 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
3698 * toplev.c (process_options): ditto and replace a not correctly
3701 2009-04-30 Li Feng <nemokingdom@gmail.com>
3703 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
3704 Change the call of gbb_loop_at_index and/or gbb_loop_index due
3705 to the redefinition.
3706 (compute_cloog_iv_types_1): ditto.
3707 (build_iv_mapping): ditto.
3708 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
3710 (free_gimple_bb): Removed GBB_LOOPS related free part.
3711 (build_bb_loops): Removed.
3712 * sese.h (struct gimple_bb): Removed loops.
3713 (GBB_LOOPS): Removed.
3714 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
3715 (gbb_loop_index): ditto.
3717 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3719 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
3720 allow non constant strides.
3721 * gcc.dg/graphite/scop-20.c: New.
3723 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3725 * graphite-scop-detection.c (dot_all_scops): Fix system call
3726 return value warning.
3729 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3731 * gcc.dg/graphite/id-6.c: Fix pattern.
3732 * gcc.dg/graphite/scop-3.c: Same.
3734 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3736 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
3737 build_pairwise_constraint, dr_equality_constraints,
3738 build_pairwise_scheduling_equality,
3739 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3740 build_lexicographically_gt_constraint, dependence_polyhedron,
3741 graphite_legal_transform_dr, graphite_legal_transform_bb,
3742 graphite_legal_transform): New.
3743 * graphite-poly.h (graphite_legal_transform): Declared.
3744 * graphite-sese-to-poly.c (build_poly_scop): Call to
3745 graphite_legal_transform is disabled for the moment.
3747 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3749 * graphite-poly.h (pbb_nb_scattering_dims): New.
3750 (pbb_nb_scattering): Use it.
3752 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3754 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
3755 Pointset_Powerset version of ppl_insert_dimensions.
3756 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
3758 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3760 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
3762 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3764 * graphite-poly.h: Fix comment.
3766 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3768 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
3770 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3772 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
3775 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3777 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
3778 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
3781 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
3783 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
3784 handle EQ_EXPR and NE_EXPR.
3786 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
3788 * graphite-poly.h (poly_dr): Fix comment.
3790 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
3791 Tobias Grosser <grosser@fim.uni-passau.de>
3793 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
3794 with a zero dimension polyhedron.
3795 (find_scop_parameters): Move the call to scop_set_nb_params here.
3796 (build_loop_iteration_domains): Store in loop->aux the iteration
3798 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
3799 by any loop in scop.
3800 (build_poly_scop): Do not call scop_set_nb_params.
3802 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
3803 Tobias Grosser <grosser@fim.uni-passau.de>
3805 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
3806 add_condition_to_domain not GT_EXPR.
3808 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3810 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
3811 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
3812 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
3813 upper_bound_assign to calculate unions.
3814 * gcc.dg/graphite/id-6.c: New.
3816 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3818 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
3819 handle abnormal edges.
3821 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3823 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
3824 (free_poly_bb): Also free poly_drs.
3825 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
3826 (poly_dr): Polyhedron to Pointset_Powerset.
3827 (pdr_accessp_nb_subscripts): Same.
3828 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
3831 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3833 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
3834 names into more meaningful names.
3836 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3838 * gfortran.dg/graphite/interchange-1.c: New.
3839 * gfortran.dg/graphite/interchange-2.c: New.
3841 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3843 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
3845 * tree-parloops.c (rewrite_phi_with_iv): New.
3846 (rewrite_all_phi_nodes_with_iv): New.
3847 (canonicalize_loop_ivs): Call them.
3849 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3851 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
3852 graphite_find_data_references_in_stmt.
3853 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
3854 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
3856 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3858 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
3860 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3862 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
3863 instead of bb_in_region.
3864 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
3865 (build_sese_conditions): Use flag_bb_in_sese.
3866 * sese.c (register_bb_in_sese): Removed.
3867 (new_sese): Remove initialization of SESE_REGION_BBS.
3868 (free_sese): Do not free SESE_REGION_BBS.
3869 * sese.h (struct sese): Remove field region_basic_blocks.
3870 (SESE_REGION_BBS): Removed.
3871 (bb_in_sese_p): Implement in function of bb_in_region.
3873 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3875 * graphite-scop-detection.c (limit_scops): Deal only with single exit
3878 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
3880 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
3882 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
3883 (add_condition_to_domain): New.
3884 (add_condition_to_pbb): New.
3885 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
3886 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
3888 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
3890 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
3891 ppl_Pointset_Powerset.
3892 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
3893 * graphite-poly.h (poly_bb): poly_bb.domain Same.
3894 (pbb_nb_loops): Same.
3895 * graphite-sese-to-poly.c (build_loop_iteration_domains,
3896 add_conditions_to_domain): Same.
3897 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
3898 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
3899 ppl_const_Polyhedron_t.
3900 (ppl_print_powerset_matrix): New.
3901 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
3902 ppl_print_powerset_matrix): New.
3903 (ppl_print_polyhedron_matrix): Updated.
3905 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
3907 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
3909 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
3911 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
3912 (print_iteration_domains, debug_iteration_domain,
3913 debug_iteration_domains): New.
3914 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
3915 debug_iteration_domains): Declared.
3916 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
3919 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
3920 Sebastian Pop <sebastian.pop@amd.com>
3922 * graphite-poly.h (print_iteration_domain): New.
3923 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
3924 (build_sese_conditions_1, build_sese_conditions_after,
3925 build_sese_conditions_before): New.
3926 (build_sese_conditions): Rewritten.
3928 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
3929 Tobias Grosser <grosser@fim.uni-passau.de>
3931 Cleanup of code generation liveouts.
3932 * graphite-clast-to-gimple.c (translate_clast): Use a single
3933 rename_map instead of one per translated statement.
3934 Do not use SESE_LIVEOUT_RENAMES.
3935 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
3936 (gloog): Do not use SESE_LIVEOUT_RENAMES.
3937 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
3938 phi node of a reduction: when a loop contains a reduction used outside
3939 the loop, there should be a scalar close phi node on the exit block.
3940 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
3941 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
3942 (free_sese): Do not free them.
3943 (sese_build_liveouts_use): Do not use them.
3944 (sese_build_liveouts_bb): Same.
3945 (sese_build_liveouts): Same.
3946 (sese_insert_phis_for_liveouts): Same.
3947 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
3948 (defined_in_loop_p): New.
3949 (alive_after_loop): New.
3950 (close_phi_not_yet_inserted_p): New.
3951 (struct alep, alep_p): New.
3952 (add_loop_exit_phis): Remove from the rename_map all the names defined
3953 in the code generated loop.
3954 (insert_loop_close_phis): Traverse the rename_map passed to it.
3955 Don't use SESE_LIVEOUT_RENAMES.
3956 (default_liveout_before_guard): Renamed default_before_guard.
3957 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
3958 (graphite_copy_stmts_from_block): Do not directly call set_rename.
3959 (register_sese_liveout_renames): Removed.
3960 (copy_bb_and_scalar_dependences): Do not call it.
3961 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
3963 (SESE_LIVEOUT): Removed.
3964 (SESE_LIVEOUT_RENAMES): Removed.
3965 (SESE_REDUCTION_LIST): Removed.
3966 (sese_build_liveouts): Removed.
3967 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
3968 (insert_loop_close_phis): Pass a htab_t instead of a sese.
3969 (insert_guard_phis): Same.
3970 (rename_map_elt): Declare a VEC of them.
3971 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3972 trees not pointers to trees.
3974 Rewrite in canonical close SSA form:
3975 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
3976 (limit_scops): Close the scop after the block containing the close phi
3978 (canonicalize_loop_closed_ssa): New.
3979 (canonicalize_loop_closed_ssa_form): New.
3980 (build_scops): Call canonicalize_loop_closed_ssa_form.
3982 * graphite-sese-to-poly.c: Fix typos.
3984 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
3986 * graphite-poly.c (print_scattering_function, print_pbb_domain):
3988 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
3989 (print_pbb): Add conditions.
3991 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
3992 Sebastian Pop <sebastian.pop@amd.com>
3994 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
3995 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
3996 (build_scop_bbs_1): New.
3997 (build_scop_bbs): Rewrite.
3998 * sese.h (bb_in_region): New.
4000 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4002 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4004 (print_scop): Style.
4005 * graphite-poly.h (poly_bb): Add drs vector.
4006 (PBB_DRS): Add accessor.
4007 * graphite-sese-to-poly.c (build_poly_dr): New.
4008 (build_pbb_drs, build_scop_drs): New.
4009 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4011 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4013 * tree-ssa-loop.c: Include forgotten toplev.h
4015 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4017 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4018 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4019 * gcc.dg/graphite/pr37928.c: Same
4020 * gcc.dg/graphite/pr38409.c: Same
4021 * gcc.dg/graphite/pr38498.c: Same
4022 * gcc.dg/graphite/pr38559.c: Same
4023 * gcc.dg/graphite/pr39335.c: Same
4024 * gcc.dg/graphite/pr39335_1.c: Same
4025 * gfortran.dg/graphite/block-2.f: Same
4026 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4029 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4031 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4032 build_access_matrix, build_scop_data_accesses): Remove access function
4033 building. (We get a new version soon).
4034 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4035 * sese.h (nb_loops_around_loop_in_sese): Remove.
4036 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4038 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4039 Sebastian Pop <sebastian.pop@amd.com>
4041 * graphite-scop-detection.c (struct scopdet_info): Rename last
4043 (scopdet_basic_block_info, build_scops_1): Don't use
4044 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4046 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4047 Sebastian Pop <sebastian.pop@amd.com>
4049 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4050 * sese.c (sese_build_liveouts_use): Renamed from
4051 sese_build_livein_liveouts_use. Remove liveins.
4052 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4053 Call sese_build_liveouts_use.
4054 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4055 Call sese_build_liveouts_bb.
4056 (new_sese, free_sese): Remove liveins.
4057 (sese_add_exit_phis_var): Deleted.
4058 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4060 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4062 * sese.h (sese): Remove num_ver and livein.
4063 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4065 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4067 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4069 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4071 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4072 (build_scop_scattering): Do not use compare_prefix_loops any more.
4073 (nb_common_loops): New.
4075 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4077 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4078 (register_old_and_new_names): Renamed set_rename.
4080 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4082 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4083 of the decl from the previous commit.
4085 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4087 * graphite-scop-detection.c (dot_scop): New.
4088 * graphite-scop-detection.h (dot_scop): Declared.
4090 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4092 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4094 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4096 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4097 condition at the end of the loop.
4098 * graphite.c (graphite_initialize, graphite_finalize): Print to
4099 dump_file the compiled function.
4100 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4101 of create_empty_loop_on_edge.
4102 (translate_clast): Update the code generation of loops for the new
4104 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4106 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4108 Reverted the patch from 2009-03-19.
4110 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4112 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4114 (print_scop): Style.
4115 * graphite-poly.h (poly_bb): Add drs vector.
4116 (PBB_DRS): Add accessor.
4117 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4118 (build_access_matrix_with_af, build_access_matrix,
4119 build_scop_data_accesses): Delete.
4120 (build_poly_dr): New.
4121 (build_pbb_drs, build_scop_drs): New.
4122 (build_poly_scop): call build_scop_drs.
4124 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4126 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4127 once per basic block.
4129 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4131 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4132 (graphite_can_represent_expr): Renamed from loop_affine_expr
4134 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4135 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4136 (scopdet_basic_block_info): Actually define entry_block.
4137 (stmt_simple_memref_p): Moved here from ...
4139 * tree-data-ref.c (stmt_simple_memref_p): here.
4140 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4142 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4144 * gcc.dg/graphite/id-4.c: New.
4146 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4148 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4149 (register_old_and_new_names): Update the content of the map.
4150 When there was already a rename_map_elt in the map at that
4152 (copy_bb_and_scalar_dependences): Do rename_variables after
4153 expand_scalar_variables.
4154 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4155 of the map. When there was already a rename_map_elt in the
4156 map at that location, free it.
4157 (translate_clast): Pass the rename_map. Do not initialize and free
4158 a rename_map per stmt_user.
4159 (gloog): Initialize and free one rename_map and pass it to
4162 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4164 * sese.c (expand_scalar_variables_stmt,
4165 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4167 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4168 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4169 the gimple_stmt_iterator of the statement to be expanded.
4170 * graphite-scop-detection.c (is_simple_operand): Do handle
4173 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4175 * graphite-scop-detection.c (is_simple_operand): Do not handle
4177 * gcc.dg/graphite/id-2.c: New.
4179 * graphite-sese-to-poly.c (build_bb_loops,
4180 add_value_to_dim, scan_tree_for_params_right_scev,
4181 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4182 find_params_in_bb, build_loop_iteration_domains,
4183 add_conditions_to_domain): Remove subtract.
4185 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4187 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4188 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4189 pbb_loop_at_index -> gbb_loop_at_index.
4190 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4191 (debug_loop_vec): Delete.
4192 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4193 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4194 (PBB_LOOPS): Removed.
4195 (PBB_BLACK_BOX): Insert cast.
4196 (pbb_set_black_box): New setter.
4197 (pbb_loop_at_index, pbb_loop_index): Removed.
4198 (scop_set_region, scop_set_nb_params): New.
4199 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4200 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4201 (build_poly_scop): Use scop_set_nb_params.
4202 * sese.h (gimple_bb): Add LOOPS.
4203 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4205 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4207 Revert previous commit.
4209 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4211 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4212 (register_old_and_new_names): Update the content of the map.
4213 When there was already a rename_map_elt in the map at that
4215 (copy_bb_and_scalar_dependences): Do rename_variables after
4216 expand_scalar_variables.
4217 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4218 of the map. When there was already a rename_map_elt in the
4219 map at that location, free it.
4220 (translate_clast): Pass the rename_map. Do not initialize and free
4221 a rename_map per stmt_user.
4222 (gloog): Initialize and free one rename_map and pass it to
4225 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4227 Remove forgotten line in revert.
4229 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4231 Revert previous commit.
4233 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4235 * sese.c (register_old_and_new_names): Update the content
4236 of the map. When there was already a rename_map_elt in the
4237 map at that location, free it.
4238 (copy_bb_and_scalar_dependences): Do rename_variables after
4239 expand_scalar_variables.
4240 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4241 of the map. When there was already a rename_map_elt in the
4242 map at that location, free it.
4243 (translate_clast): Pass the rename_map. Do not initialize and free
4244 a rename_map per stmt_user.
4245 (gloog): Initialize and free one rename_map and pass it to
4248 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4250 * graphite-clast-to-gimple.c (translate_clast): context_loop
4253 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4254 Sebastian Pop <sebastian.pop@amd.com>
4256 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4257 of the use of ppl_Polyhedron_map_space_dimensions.
4259 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4260 Sebastian Pop <sebastian.pop@amd.com>
4262 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4263 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4264 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4265 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4266 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4267 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4268 pbb_nb_params): New.
4269 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4270 nb_loops_around_pbb): Adapt return types.
4272 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4274 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4275 graphite-clast-to-gimple.o, graphite-data-ref.o,
4276 graphite-scop-detection.o, graphite-poly.o): Add
4279 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4281 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4282 graphite-clast-to-gimple.o, graphite-data-ref.o,
4283 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4285 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4287 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4288 * gcc.dg/graphite/pr37828.c: Same.
4289 * gcc.dg/graphite/pr37684.c: Same.
4290 * gcc.dg/graphite/block-0.c: Same.
4291 * gcc.dg/graphite/block-1.c: Same.
4292 * gcc.dg/graphite/block-2.c: Same.
4293 * gcc.dg/graphite/block-3.c: Same.
4294 * gcc.dg/graphite/block-4.c: Same.
4295 * gcc.dg/graphite/block-5.c: Same.
4296 * gcc.dg/graphite/block-6.c: Same.
4297 * gfortran.dg/graphite/pr38083.f90: Same.
4298 * gfortran.dg/graphite/block-1.f90: Same.
4299 * gfortran.dg/graphite/block-3.f90: Same.
4300 * gfortran.dg/graphite/pr37852.f90: Same.
4301 * gfortran.dg/graphite/block-4.f90: Same.
4302 * gfortran.dg/graphite/pr37980.f90: Same.
4303 * gfortran.dg/graphite/pr38953.f90: Same.
4304 * gfortran.dg/graphite/pr37857.f90: Same.
4305 * opts.c: Remove -floop-block from -O2.
4306 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4307 -floop-strip-mine are used.
4309 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4310 Sebastian Pop <sebastian.pop@amd.com>
4312 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4314 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4315 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4316 strip_mine_profitable_p, is_interchange_valid,
4317 graphite_trans_bb_block, graphite_trans_loop_block,
4318 graphite_trans_scop_block): Temporary removed.
4319 (extend_scattering, unify_scattering_dimensions): New.
4320 (print_scattering_function, graphite_read_transforms):
4321 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4322 (graphite_generate_scattering_fns): Removed.
4323 (apply_poly_transforms): Cleanup.
4324 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4325 (schedule_to_scattering): Moved.
4326 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4327 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4328 (pbb_nb_scattering): New.
4329 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4330 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4332 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4334 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4335 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4336 -> PBB_TRANSFORMED_SCATTERING.
4337 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4338 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4339 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4340 (check_poly_representation): Do not return bool.
4341 (graphite_transform_loops): Reformat.
4342 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4344 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4346 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4347 debug_pbb_domain, debug_pbb, debug_scop): New.
4348 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4349 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4351 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4354 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4355 when the type precision of the induction variable should be
4356 larger than the type precision of nit.
4357 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4358 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4359 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4361 * gcc.dg/graphite/pr39335_1.c: New.
4362 * gcc.dg/graphite/pr39335.c: New.
4364 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4366 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4367 SSA_NAMES not struct reduction_info.
4369 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4371 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4373 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4374 Tobias Grosser <grosser@fim.uni-passau.de>
4376 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4377 (free_sese): Free SESE_REDUCTION_LIST.
4378 * sese.h (struct sese): Add field reduction_list.
4379 (SESE_REDUCTION_LIST): New.
4380 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4381 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4383 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4384 Tobias Grosser <grosser@fim.uni-passau.de>
4386 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4389 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4390 Tobias Grosser <grosser@fim.uni-passau.de>
4392 * tree-parloops.c (struct brli, build_reduction_list_info,
4393 analyze_reduction_list, gather_scalar_reductions): New.
4394 (loop_parallel_p): Build a reduction list containing only
4395 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4396 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4397 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4398 * tree-flow.h (gather_scalar_reductions): Declared.
4400 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4403 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4404 number_of_iterations_exit from a gcc_assert.
4406 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4407 Jan Sjodin <jan.sjodin@amd.com>
4409 * output.h (graphite_out_file, graphite_in_file): Declared.
4410 * toplev.c (graphite_out_file, graphite_in_file): New.
4411 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4412 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4413 Don't call schedule_to_scattering.
4414 * common.opt (fgraphite-write, fgraphite-read): New.
4415 * graphite-poly.c: Include output.h.
4416 (print_scattering_function, print_scattering_functions,
4417 debug_scattering_function, debug_scattering_functions,
4418 graphite_write_transforms, graphite_read_transforms,
4419 graphite_generate_scattering_fns): New.
4420 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4421 Call graphite_generate_scattering_fns, graphite_write_transforms,
4422 graphite_read_transforms.
4423 (new_poly_bb): Initialize PBB_SCATTERING.
4424 (free_poly_bb): Free PBB_SCATTERING.
4425 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4426 * graphite-poly.h (struct poly_bb): Add field scattering.
4427 (PBB_SCATTERING): New.
4428 (print_scattering_function, print_scattering_functions,
4429 debug_scattering_function, debug_scattering_functions): Declared.
4430 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4431 GMP values, not integers!
4432 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4433 ppl_read_polyhedron_matrix): New.
4434 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4435 debug_ppl_polyhedron_matrix,
4436 ppl_read_polyhedron_matrix): Declared.
4437 * Makefile.in (graphite-poly.o): Depends on output.h.
4439 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4440 Tobias Grosser <grosser@fim.uni-passau.de>
4443 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4444 scalar evolutions in the scop_entry->loop_father.
4446 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4447 Tobias Grosser <grosser@fim.uni-passau.de>
4449 * graphite.h (ref_nb_loops): Remove declaration.
4450 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4451 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4452 debug_gbb): Moved to sese.h.
4455 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4456 Tobias Grosser <grosser@fim.uni-passau.de>
4458 * graphite-data-ref.[ch]: Disable.
4460 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4461 Tobias Grosser <grosser@fim.uni-passau.de>
4463 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4464 scalar evolutions in the scop_entry->loop_father.
4466 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4468 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
4469 (graphite_cannot_represent_loop_niter): Renamed
4470 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
4471 (limit_scops): build_sese_loop_nests does not return a bool.
4472 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
4473 * sese.c (nb_reductions_in_loop): ... from here.
4474 (graphite_loop_normal_form): ... from here.
4475 (sese_record_loop): Does not fail, so does not return a bool.
4476 (build_sese_loop_nests): Same.
4477 * sese.h (build_sese_loop_nests): Update declaration.
4478 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
4479 (build_graphite_loop_normal_form): New.
4480 (gloog): Call build_graphite_loop_normal_form.
4481 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
4482 build_sese_loop_nests.
4484 * gcc.dg/graphite/id-1.c: New.
4486 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4487 Tobias Grosser <grosser@fim.uni-passau.de>
4489 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
4490 The SCoP detection fix is sufficient.
4492 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4494 PR tree-optimization/39260
4495 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
4496 the basic block contains a condition with a real type.
4497 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
4499 * gcc.dg/graphite/pr39260.c: New.
4501 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4503 * graphite-poly.c: Inlcude params.h.
4504 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
4506 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
4507 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
4509 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4510 Tobias Grosser <grosser@fim.uni-passau.de>
4512 * graphite-scop-detection.c (dot_all_scops_1,
4513 dot_all_scops): Moved here.
4514 * graphite-scop-detection.h (dot_all_scops): Declared here.
4515 * graphite.c (graphite_initialize, graphite_finalize): New.
4516 (graphite_transform_loops): Cleaned up.
4517 * sese.c (debug_oldivs): Moved here.
4518 * graphite-poly.c (graphite_apply_transformations): Renamed
4519 apply_poly_transforms.
4520 (debug_loop_vec): Moved here.
4521 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
4522 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
4523 find_scop_parameters, build_scop_iteration_domain,
4524 add_conditions_to_constraints, build_scop_canonical_schedules,
4525 build_scop_data_accesses): Now static.
4526 (build_poly_scop, check_poly_representation): New.
4528 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4530 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
4531 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
4532 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
4533 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
4534 scan_tree_for_params_right_scev, scan_tree_for_params_int,
4535 scan_tree_for_params, struct irp_data, dx_record_params,
4536 find_params_in_bb, find_scop_parameters, gbb_from_bb,
4537 build_loop_iteration_domains, add_conditions_to_domain,
4538 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
4539 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
4540 build_sese_conditions, add_conditions_to_constraints,
4541 build_scop_iteration_domain, build_access_matrix_with_af,
4542 build_access_matrix,
4543 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
4545 * graphite-sese-to-poly.c: New.
4546 * graphite-sese-to-poly.h: New.
4548 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
4550 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4552 * graphite.c: Split graphite code generation to a new file.
4553 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
4554 max_precision_type, clast_to_gcc_expression_red,
4555 clast_to_gcc_expression, gcc_type_for_clast_expr,
4556 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
4557 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
4558 graphite_create_new_guard, clast_get_body_of_loop,
4559 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
4560 graphite_create_new_loop, build_iv_mapping, copy_renames,
4561 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4562 compute_cloog_iv_types, free_scattering, save_var_name,
4563 initialize_cloog_names, build_scop_context, build_cloog_prog,
4564 set_cloog_options, debug_clast_stmt, scop_to_clast,
4565 print_generated_program, debug_generated_program,
4566 gloog): Moved to graphite-clast-to-gimple.c.
4568 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
4570 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
4571 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
4572 loop_iv_stack_pop, loop_iv_stack_get_iv,
4573 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
4574 free_loop_iv_stack, loop_iv_stack_remove_constants,
4575 debug_rename_elt, debug_rename_map_1, debug_rename_map,
4576 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
4577 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
4578 eq_ivtype_map_elts, sese_add_exit_phis_edge,
4579 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
4580 get_vdef_before_sese, sese_adjust_vphi,
4581 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
4582 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
4583 is_iv, expand_scalar_variables_ssa_name,
4584 expand_scalar_variables_expr, expand_scalar_variables_stmt,
4585 expand_scalar_variables, rename_variables, remove_condition,
4586 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
4587 add_loop_exit_phis, insert_loop_close_phis, struct igp,
4588 default_liveout_before_guard, add_guard_exit_phis,
4589 insert_guard_phis, register_old_and_new_names,
4590 graphite_copy_stmts_from_block, register_sese_liveout_renames,
4591 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
4592 if_region_set_false_region, create_if_region_on_edge,
4593 move_sese_in_condition): Moved to sese.c.
4595 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
4596 if_region_exit, if_region_get_condition_block,
4597 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
4598 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
4599 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
4600 ivtype_map_elt, new_ivtype_map_elt,
4601 recompute_all_dominators): Moved to sese.h.
4603 * graphite-clast-to-gimple.c: New.
4604 * graphite-clast-to-gimple.h: New.
4605 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
4606 * sese.c: Modified as said above.
4609 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4611 * graphite.c: Split scop detection to a new file.
4612 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
4613 move_sd_regions, loop_affine_expr, exclude_component_ref,
4614 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
4615 graphite_cannot_represent_loop_niter, struct scopdet_info,
4616 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
4617 find_single_entry_edge, find_single_exit_edge,
4618 create_single_entry_edge, sd_region_without_exit,
4619 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
4620 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
4621 Moved to graphite-scop-detection.c.
4623 * graphite-scop-detection.c: New.
4624 * graphite-scop-detection.h: New.
4625 * Makefile.in: Add new rule for graphite-scop-detection.o.
4627 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
4628 tree-scalar-evolution.h.
4629 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
4630 build_sese_loop_nests): Moved here from graphite.c.
4631 (param_index): Renamed parameter_index_in_region.
4633 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4634 Sebastian Pop <sebastian.pop@amd.com>
4636 * gcc.dg/graphite/block-0.c: Expected to fail now.
4637 * gcc.dg/graphite/block-1.c: Same.
4638 * gcc.dg/graphite/block-5.c: Same.
4639 * gcc.dg/graphite/block-6.c: Same.
4641 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4642 Sebastian Pop <sebastian.pop@amd.com>
4644 * graphite.h: Separate from graphite_bb_p the polyhedral
4645 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
4646 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
4647 graphite-data-ref.h.
4648 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
4649 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
4650 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
4651 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4652 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
4653 scop_nb_params): Moved to graphite-poly.h.
4654 * graphite-data-ref.c: Same.
4655 * graphite-data-ref.h: New.
4657 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
4658 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
4659 is_interchange_valid, graphite_trans_bb_block,
4660 graphite_trans_loop_block, scop_max_loop_depth,
4661 graphite_trans_scop_block, graphite_apply_transformations,
4662 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
4664 * graphite-poly.h: New.
4665 * graphite-poly.c: New.
4666 * Makefile.in (OBJS-common): Add graphite-poly.o.
4667 (graphite-poly.o): New rule.
4668 * tree-data-ref.h (struct data_reference): Remove unused scop field.
4671 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4672 Tobias Grosser <grosser@fim.uni-passau.de>
4674 * graphite.c: Replace gb -> gbb.
4676 * graphite-data-ref.c: Same.
4678 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4679 Tobias Grosser <grosser@fim.uni-passau.de>
4681 * Makefile.in (OBJS-commmon): Add sese.o.
4683 (graphite.o): Add sese.h.
4684 * graphite.c (bb_in_ss_p, loop_in_sese_p,
4685 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
4686 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
4688 (block_before_scop): Add missing return.
4689 (new_scop, free_scop): Remove SESE data structures.
4690 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
4691 find_scop_parameters, build_loop_iteration_domains,
4692 add_conditions_to_domain, register_scop_liveout_renames,
4693 copy_bb_and_scalar_dependences): Scop -> SESE.
4695 (add_conditions_to_domain): SCoP -> SESE and remove check
4696 (scop_contains_non_iv_scalar_phi_nodes): New.
4697 (build_scop_conditions_1, build_scop_conditions): Remove check for
4698 non iv scalar phi nodes.
4699 (print_scop_statistics): New.
4700 (graphite_transform_loops): Cleanup.
4702 * graphite.h: Move to sese & cleanup.
4706 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4707 Tobias Grosser <grosser@fim.uni-passau.de>
4709 * graphite.c (build_scop_conditions_1): Conditions are only
4710 at the end of a basic block.
4712 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4713 Tobias Grosser <grosser@fim.uni-passau>
4715 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
4717 (GBB_ALPHA): Removed.
4719 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4720 Tobias Grosser <grosser@fim.uni-passau.de>
4722 * graphite-data-ref.c (graphite_test_dependence): Don't use
4723 GBB_DYNAMIC_SCHEDULE.
4724 * graphite.c (new_graphite_bb): Same.
4725 (free_graphite_bb): Same.
4726 (build_scop_dynamic_schedules): Removed.
4727 (graphite_transform_loops): Don't call it.
4728 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
4729 (GBB_DYNAMIC_SCHEDULE): Removed.
4731 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4732 Tobias Grosser <grosser@fim.uni-passau.de>
4734 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
4735 (print_graphite_bb): Same.
4736 (build_cloog_prog): Same.
4738 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4739 Tobias Grosser <grosser@fim.uni-passau.de>
4741 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
4743 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4744 Tobias Grosser <grosser@fim.uni-passau.de>
4746 * graphite.c (build_scop_context): Don't use CloogMatrix.
4747 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
4748 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
4750 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4751 Tobias Grosser <grosser@fim.uni-passau.de>
4753 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
4754 liveout_renames, add_params fields...
4755 (struct sese): ... here.
4756 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
4757 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
4759 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4760 Tobias Grosser <grosser@fim.uni-passau.de>
4762 * graphite.c (print_scop): Do not print the CLooG program.
4763 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
4764 build_cloog_prog, gloog): Don't use SCOP_PROG.
4765 (find_transform): Renamed scop_to_clast.
4766 (print_generated_program, debug_generated_program): New.
4767 (graphite_transform_loops): Adapt to new interface.
4768 * graphite.h (struct scop): Remove program field.
4769 (SCOP_PROG): Removed.
4770 (print_generated_program, debug_generated_program): Declared.
4772 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4774 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
4775 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
4776 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
4777 free_graphite_bb, build_scop_canonical_schedules,
4778 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
4779 schedules are now represented using a ppl_Linear_Expression_t.
4780 * graphite.h (struct graphite_bb): Same.
4781 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
4782 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
4784 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
4786 * graphite.c: Free local memory.
4787 * graphite-ppl.c: Same.
4789 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
4791 * graphite.c (const_column_index, get_first_matching_sign_row_index,
4792 get_lower_bound_row, get_upper_bound_row, copy_constraint,
4793 swap_constraint_variables, scale_constraint_variable): Removed.
4794 (graphite_trans_bb_strip_mine): Remove pong.
4795 * graphite-ppl.c: Include missing header files.
4796 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
4797 * graphite-ppl.h (ppl_strip_loop): Declared.
4798 * Makefile.in (graphite-ppl.o): Adjust dependences.
4800 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
4802 * graphite.c (build_loop_iteration_domains): Remove ping pong.
4803 (build_scop_iteration_domain): Same.
4805 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
4807 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
4809 (add_value_to_dim, scan_tree_for_params_right_scev,
4810 scan_tree_for_params_int): New.
4811 * graphite-ppl.c (oppose_constraint): New.
4812 (insert_constraint_into_matrix): Implement missing cases.
4813 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
4815 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
4817 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
4818 use ppl_move_dimension.
4820 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
4822 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
4825 * graphite-ppl.c: Same.
4826 * graphite-ppl.h: Same.
4828 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
4830 Revert last 3 commits.
4832 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4834 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
4836 (add_value_to_dim, scan_tree_for_params_right_scev,
4837 scan_tree_for_params_int): New.
4838 * graphite-ppl.c (oppose_constraint): New.
4839 (insert_constraint_into_matrix): Implement missing cases.
4840 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
4842 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4844 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
4846 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4847 Tobias Grosser <grosser@fim.uni-passau.de>
4849 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
4850 use ppl_move_dimension.
4851 * graphite-ppl.c (ppl_move_dimension): New.
4852 * graphite-ppl.h (ppl_move_dimension): Declared.
4854 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4856 * graphite.c: Do not include cloog/cloog.h.
4857 (print_graphite_bb): Remove ping pong, call PPL print function.
4859 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
4861 * Makefile.in (OBJS-common): Add graphite-ppl.o.
4862 (graphite.o): Add dependence on graphite-ppl.h.
4863 (graphite-ppl.o): New.
4864 (graphite-data-ref.c): Ping pong between PPL data structures
4866 * graphite-ppl.c: New.
4867 * graphite-ppl.h: New.
4868 * graphite.c: Include graphite-ppl.h.
4869 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
4870 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
4871 Ping pong between PPL data structures and matrices.
4872 (new_graphite_bb): Create a PPL constraint system.
4873 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
4874 (build_loop_iteration_domains): Use PPL functions.
4875 * graphite.h: Include graphite-ppl.h. Fix comments.
4876 (graphite_bb): Use a ppl_Constraint_System_t instead of
4877 CloogMatrix for representing the domain.
4878 (scop): Remove static_schedule.
4879 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
4881 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
4883 * graphite.c: Fix some comments.
4885 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
4888 * graphite.c (if_region_set_false_region): After moving a region
4889 in the false branch of a condition, remove the empty dummy
4891 (gloog): Remove wrong fix for PR38953.
4893 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
4895 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
4896 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
4897 register_bb_in_sese, new_sese, free_sese): Moved.
4898 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
4899 outermost_loop_in_scop, build_scop_iteration_domain,
4900 expand_scalar_variables_ssa_name, get_vdef_before_scop,
4901 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
4902 Use loop_in_sese_p instead of loop_in_scop_p.
4903 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
4904 (free_scop): Do not free SCOP_BBS_B.
4905 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
4906 ref_nb_loops): Moved here...
4907 * graphite.h (ref_nb_loops): ... from here.
4908 (struct scop): Remove bbs_b bitmap.
4909 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
4910 * gcc.dg/graphite/scop-19.c: New
4912 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
4914 * graphite.c (scopdet_basic_block_info): Fix bug in scop
4917 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
4919 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4920 eq_loop_to_cloog_loop): Remove.
4921 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
4922 * graphite.h (struct scop): Remove loop2cloog_loop.
4923 (loop_domain_dim, loop_iteration_vector_dim): Remove.
4925 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
4927 * opts.c (decode_options): Only add graphite options to O2
4928 if we compile with graphite enabled.
4930 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
4932 * Merge from mainline (r143163:143684).
4934 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
4936 * graphite.c (debug_value): Removed.
4937 * graphite.h (debug_value): Removed.
4939 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4941 * passes.c (init_optimization_passes): Do not call pass_copy_prop
4942 after graphite: pass_copy_prop does not maintain a proper loop closed
4943 SSA form. pass_copy_prop should be fixed.
4945 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4947 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
4949 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4951 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
4952 (gloog): Split the exit of the scop when the scop exit is a loop exit.
4953 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
4956 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
4958 * graphite.c (gloog): Return true when code gen succeeded.
4959 (graphite_transform_loops): Do not call cleanup_tree_cfg if
4960 the code of the function did not changed. After cleanup_tree_cfg
4961 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
4964 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
4966 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
4967 gimple_call_lhs is NULL.
4969 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
4970 Tobias Grosser <tobi.grosser@amd.com>
4972 * graphite.c (graphite_trans_scop_block): Do not block single
4975 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
4976 Tobias Grosser <tobi.grosser@amd.com>
4978 * graphite.c (build_scop_canonical_schedules): Start schedules at
4981 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
4982 Tobias Grosser <tobi.grosser@amd.com>
4984 * graphite.c (compare_prefix_loops): New.
4985 (build_scop_canonical_schedules): Rewritten.
4986 (graphite_transform_loops): Move build_scop_canonical_schedules
4987 after build_scop_iteration_domain.
4989 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4990 Tobias Grosser <tobi.grosser@amd.com>
4992 * graphite.c (add_conditions_to_domain): Add the loops to
4993 the dimension of the iteration domain. Do copy the domain
4994 only when it exists.
4995 (build_scop_conditions_1): Do not call add_conditions_to_domain.
4996 (add_conditions_to_constraints): New.
4997 (can_generate_code_stmt, can_generate_code): Removed.
4998 (gloog): Do not call can_generate_code.
4999 (graphite_transform_loops): Call add_conditions_to_constraints
5000 after building the iteration domain.
5002 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5003 Tobias Grosser <tobi.grosser@amd.com>
5004 Jan Sjodin <jan.sjodin@amd.com>
5006 * graphite.c (scan_tree_for_params): On substractions negate
5007 all the coefficients of the term.
5008 (clast_to_gcc_expression_red): New. Handle reduction expressions
5009 of more than two operands.
5010 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5011 (get_vdef_before_scop): Handle also the case of default definitions.
5013 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5016 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5017 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5018 (gloog): Do not call cleanup_tree_cfg.
5019 (graphite_transform_loops): Call cleanup_tree_cfg after all
5020 scops have been code generated.
5022 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5024 * passes.c (init_optimization_passes): Schedule after
5025 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5027 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5029 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5031 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5032 Set the type of an expression to the type of its assign statement.
5033 (expand_scalar_variables_expr): Do not pass loop_p.
5034 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5035 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5036 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5038 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5040 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5041 an expression to the gimple_expr_type of its assign statement.
5042 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5045 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5047 PR tree-optimization/38786
5048 * gcc.dg/graphite/pr38786.c: New.
5049 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5050 the SSA_NAME case of expand_scalar_variables_expr.
5051 (expand_scalar_variables_expr): Also gather the scalar computation
5052 used to index the memory access.
5053 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5054 the gimple_stmt_iterator where it inserts new code.
5056 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5058 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5060 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5062 * opts.c (decode_options): Enable flag_graphite_identity and
5063 flag_loop_block in -O2 and above.
5065 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5067 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5068 Fix merge problem: replace with the file from trunk.
5070 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5072 * Merge from mainline (r141727:143163).
5074 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5075 Jan Sjodin <jan.sjodin@amd.com>
5077 PR tree-optimization/38559
5078 * gcc.dg/graphite/pr38559.c: New.
5080 * graphite.c (debug_value, copy_constraint,
5081 swap_constraint_variables, scale_constraint_variable, ): New.
5082 (get_lower_bound, get_upper_bound): Removed.
5083 (graphite_trans_bb_strip_mine): Clean up this code that works
5084 only for constant number of iterations. Fully copy upper and
5085 lower bound constraints, not only the constant part of them.
5086 * graphite.h (debug_value): Declared.
5088 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5090 PR tree-optimization/38492
5091 PR tree-optimization/38498
5092 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5093 * tree-chrec.h (scev_is_linear_expression): Declared.
5094 * graphite.c (graphite_cannot_represent_loop_niter): New.
5095 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5096 (graphite_loop_normal_form): Use gcc_assert.
5097 (scan_tree_for_params): Use CASE_CONVERT.
5098 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5099 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5100 Use gcc_assert. Discard scops that contain unhandled cases.
5101 (build_scop_conditions): Return a boolean status for unhandled cases.
5102 (strip_mine_profitable_p): Print the loop number, not its depth.
5103 (is_interchange_valid): Pass the depth of the loop nest, don't
5104 recompute it wrongly.
5105 (graphite_trans_bb_block): Same.
5106 (graphite_trans_bb_block): Print tentative of loop blocking.
5107 (graphite_trans_scop_block): Do not print that the loop has been
5109 (graphite_transform_loops): Do not handle scops that contain condition
5112 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5114 * gcc.dg/graphite/block-0.c: Update test.
5115 * gcc.dg/graphite/block-1.c: Same.
5116 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5118 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5119 * gcc.dg/graphite/block-3.c: New.
5120 * gcc.dg/graphite/pr38498.c: New.
5122 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5124 PR tree-optimization/38510
5125 * gcc.dg/graphite/pr38510.c: New.
5126 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5127 (translate_clast): Call recompute_all_dominators before
5129 (gloog): Call recompute_all_dominators before graphite_verify.
5131 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5133 PR tree-optimization/38492
5134 * graphite.c (rename_map_elt, debug_rename_elt,
5135 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5136 rename_map_elt_info, eq_rename_map_elts,
5137 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5138 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5139 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5140 (sese_build_livein_liveouts): New.
5141 (new_sese, free_sese): New.
5142 (new_scop): Call new_sese.
5143 (free_scop): Call free_sese.
5144 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5145 (register_old_new_names): Renamed register_old_and_new_names.
5146 (register_scop_liveout_renames, add_loop_exit_phis,
5147 insert_loop_close_phis, struct igp,
5148 default_liveout_before_guard, add_guard_exit_phis,
5149 insert_guard_phis, copy_renames): New.
5150 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5151 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5152 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5153 (scop_adjust_phis_for_liveouts): New.
5154 (gloog): Call scop_adjust_phis_for_liveouts.
5156 * graphite.h (struct sese): Documented. Added fields liveout,
5158 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5159 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5160 (struct scop): Added field liveout_renames.
5161 (SCOP_LIVEOUT_RENAMES): New.
5163 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5165 PR tree-optimization/38409
5166 * gcc.dg/graphite/pr38409.c: New.
5167 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5169 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5171 * graphite.c (gcc_type_for_cloog_iv): By default return
5173 (graphite_create_new_loop): Don't fold_convert the already
5174 fold_convert-ed expression.
5176 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5178 PR tree-optimization/38446
5179 * gcc.dg/graphite/pr38446.c: New.
5180 * graphite.c (register_bb_in_sese): New.
5181 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5182 looking at the bbs in the region.
5183 * graphite.h (sese): Add region_basic_blocks pointer set to
5184 structure and initialize at the time of defining new scop.
5186 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5188 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5189 (find_params_in_bb): Do not free data refs.
5190 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5192 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5194 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5195 * gcc.dg/graphite/scop-17.c: Same.
5196 * gcc.dg/graphite/block-5.c: New.
5197 * gcc.dg/graphite/block-6.c: New.
5198 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5199 * gcc.dg/graphite/pr37684.c: Same.
5200 * gcc.dg/graphite/block-2.c: Same.
5202 * graphite.c (struct ivtype_map_elt): New.
5203 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5204 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5205 gcc_type_for_cloog_iv): New.
5206 (loop_iv_stack_patch_for_consts): Use the type of the induction
5207 variable from the original loop, except for the automatically
5208 generated loops, i.e., in the case of a strip-mined loop, in
5209 which case there is no original loop: in that case just use
5211 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5212 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5213 (clast_name_to_gcc): Accept params to be NULL.
5214 (clast_to_gcc_expression): Take an extra parameter for the type.
5215 Convert to that type all the expressions built by this function.
5216 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5217 (graphite_translate_clast_equation): Compute the type of the
5218 clast_equation before translating its LHS and RHS.
5219 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5220 (graphite_create_new_loop): Compute the type of the induction
5221 variable before translating the lower and upper bounds and before
5222 creating the induction variable.
5223 (rename_variables_from_edge, rename_phis_end_scop): New.
5224 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5225 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5226 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5227 compute_cloog_iv_types): New.
5228 (gloog): Call compute_cloog_iv_types before starting the
5229 translation of the clast.
5231 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5232 (GBB_CLOOG_IV_TYPES): New.
5233 (debug_ivtype_map): Declared.
5234 (oldiv_for_loop): New.
5236 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5239 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5240 (param_index): Assert if parameter is not know after parameter
5242 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5243 (find_scop_parameters): Mark, that we have finished parameter
5245 (graphite_transform_loops): Move condition detection before parameter
5247 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5248 * gfortran.dg/graphite/pr38459.f90: New.
5250 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5252 * graphite.c (graphite_transform_loops): Always call find_transform ()
5253 in ENABLE_CHECKING. So we test these code paths, even if we do not
5256 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5258 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5259 (print_scop): Ditto.
5261 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5264 Fix gfortran.dg/graphite/id-3.f90.
5265 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5266 regions more than once.
5268 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5270 Fix gfortran.dg/graphite/id-4.f90.
5271 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5274 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5276 Fix gfortran.dg/graphite/id-1.f90.
5277 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5278 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5279 (max_precision_type): New.
5280 (value_clast): Removed.
5281 (clast_to_gcc_expression): Be more careful to types of expressions.
5282 Use max_precision_type and update use of gmp_cst_to_tree.
5283 (graphite_translate_clast_equation): Use max_precision_type.
5284 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5285 use the type of the condition.
5286 (graphite_create_new_loop): Do not use integer_type_node, use the
5287 max_precision_type of lb and ub.
5289 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5291 * graphite.c (build_scops_1): Initialize open_scop.exit
5294 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5296 * gcc.dg/graphite/pr38084.c: New.
5297 * gfortran.dg/graphite/id-1.f90: New.
5298 * gfortran.dg/graphite/id-2.f90: New.
5299 * gfortran.dg/graphite/id-3.f90: New.
5300 * gfortran.dg/graphite/id-4.f90: New.
5301 * gfortran.dg/graphite/pr37857.f90: New.
5303 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5304 Jan Sjodin <jan.sjodin@amd.com>
5305 Harsha Jagasia <harsha.jagasia@amd.com>
5317 * gcc.dg/graphite/pr38073.c: New.
5318 * gcc.dg/graphite/pr37928.c: New.
5319 * gcc.dg/graphite/pr37883.c: New.
5320 * gcc.dg/graphite/pr38125.c: New.
5321 * gfortran.dg/graphite/pr38083.f90: New.
5322 * gfortran.dg/graphite/pr37852.f90: New.
5323 * gfortran.dg/graphite/pr37980.f90: New.
5325 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5326 the number of detected scops. Copy exact same test for loop
5328 * gcc.dg/graphite/block-1.c: Fix the number of expected
5329 loops to be blocked as reductions are not handled.
5330 * gcc.dg/graphite/block-4.c: ...here. New.
5332 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5333 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5335 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5336 * Makefile.in (graphite.o): Depend on value-prof.h.
5337 (graphite.o-warn): Removed -Wno-error.
5338 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5339 to be a NULL pointer. Call update_stmt. Return the newly created
5340 cannonical induction variable.
5342 * graphite.h (debug_rename_map): Declared. Fix some comments.
5344 * graphite.c: Reimplement the code generation from graphite to gimple.
5345 Include value-prof.h.
5346 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5347 (get_old_iv_from_ssa_name): Removed.
5348 (graphite_stmt_p): New.
5349 (new_graphite_bb): Test for useful statements before building a
5350 graphite statement for the basic block.
5351 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5352 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5354 (recompute_all_dominators, graphite_verify,
5355 nb_reductions_in_loop, graphite_loop_normal_form): New.
5356 (scop_record_loop): Call graphite_loop_normal_form.
5357 (build_scop_loop_nests): Iterate over all the blocks of the
5358 function instead of relying on the incomplete information from
5359 SCOP_BBS. Return the success of the operation.
5360 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5361 (add_bb_domains): Removed.
5362 (build_loop_iteration_domains): Don't call add_bb_domains.
5363 Add the iteration domain only to the basic blocks that have been
5364 translated to graphite.
5365 (build_scop_conditions_1): Add constraints only if the basic
5366 block have been translated to graphite.
5367 (build_scop_data_accesses): Completely disabled until data
5368 dependence is correctly implemented.
5369 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5370 (remove_all_edges_1, remove_all_edges): Removed.
5371 (get_new_name_from_old_name): New.
5372 (graphite_rename_variables_in_stmt): Renamed
5373 rename_variables_in_stmt. Call get_new_name_from_old_name.
5374 Use replace_exp and update_stmt.
5375 (is_old_iv): Renamed is_iv.
5376 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5377 Use replace_exp and update_stmt.
5378 (expand_scalar_variables_expr): Same. Use the map to get the
5379 new names for the renaming of induction variables and for the
5380 renaming of variables after a basic block has been copied.
5381 (expand_scalar_variables): Same.
5382 (graphite_rename_variables): Renamed rename_variables.
5383 (move_phi_nodes): Removed.
5384 (get_false_edge_from_guard_bb): New.
5385 (build_iv_mapping): Do not insert the induction variable of a
5386 loop in the renaming iv map if the basic block does not belong
5388 (register_old_new_names, graphite_copy_stmts_from_block,
5389 copy_bb_and_scalar_dependences): New.
5390 (translate_clast): Heavily reimplemented: copy basic blocks,
5391 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5392 At each translation step call graphite_verify ensuring the
5393 consistency of the SSA, loops and dominators information.
5394 (collect_virtual_phis, find_vdef_for_var_in_bb,
5395 find_vdef_for_var_1, find_vdef_for_var,
5396 patch_phis_for_virtual_defs): Removed huge hack.
5397 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5398 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5399 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5400 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5401 if_region_get_condition_block, if_region_set_false_region,
5402 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5403 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5404 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5405 rewrite_into_sese_closed_ssa): New.
5406 (gloog): Remove dead code. Early return if code cannot be
5407 generated. Call cleanup_tree_cfg once the scop has been code
5409 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5410 block loops with less than two loops.
5411 (graphite_apply_transformations): Remove the call to
5412 scop_remove_ignoreable_gbbs.
5413 (limit_scops): When build_scop_loop_nests fails, continue on
5414 the next scop. Fix open_scop.entry.
5415 (graphite_transform_loops): Call recompute_all_dominators: force the
5416 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5417 Call initialize_original_copy_tables and free_original_copy_tables
5418 to be able to copy basic blocks during code generation.
5419 When build_scop_loop_nests fails, continue on next scop.
5420 (value_clast): New union.
5421 (clast_to_gcc_expression): Fix type cast warning.
5423 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5425 * Merge from mainline (r140838:141727).
5427 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5431 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5433 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5437 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5438 exits and conditions.
5439 * gcc.dg/graphite/pr37943.c: New.
5441 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5444 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5446 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5448 * doc/invoke.texi: Fix spaces.
5450 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5452 PR tree-optimization/37891
5453 Reverted last commit.
5454 * graphite.c (create_single_entry_edge): Set
5455 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5457 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5458 Mitul Thakkar <mitul.thakkar@amd.com>
5460 * graphite.c (create_single_entry_edge): Set
5461 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5463 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
5465 * doc/invoke.texi: Add -fgraphite-identity.
5466 * graphite.c (graphite_apply_transformations): Check for
5467 -fgraphite-identity.
5468 * toplev.c (process_options): Add flag_graphite_identity.
5469 * tree-ssa-loop.c: Add flag_graphite_identity.
5471 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5473 Undo changes from 2008-10-02:
5474 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5475 operand type when copying the operand to a variable of different type.
5476 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5477 with the IV name after increment.
5479 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5480 Harsha Jagasia <harsha.jagasia@amd.com>
5482 PR tree-optimization/37828
5483 * gcc.dg/graphite/pr37828.c: New.
5484 * graphite.c (graphite_trans_loop_block): Do not loop block
5485 single nested loops.
5487 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
5488 Sebastian Pop <sebastian.pop@amd.com>
5490 * graphite.c (struct rename_map_elt, new_rename_map_elt,
5491 rename_map_elt_info, eq_rename_map_elts): New.
5492 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
5493 (expand_scalar_variables_expr): Change parameters.
5494 (expand_scalar_variables_stmt): Same.
5495 (expand_scalar_variables): Same.
5496 (graphite_rename_ivs): Rename graphite_rename_variables.
5497 (build_iv_mapping): New.
5498 (translate_clast): Call build_iv_mapping.
5499 * graphite.h (gbb_p): New name.
5501 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
5503 PR tree-optimization/37684
5504 * gcc.dg/graphite/pr37684.c: New.
5505 * graphite.c (exclude_component_ref): New.
5506 (is_simple_operand): Call exclude_component_ref.
5508 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
5509 Harsha Jagasia <harsha.jagasia@amd.com>
5511 PR tree-optimization/37485
5512 * gcc.dg/graphite/block-2.c: New
5513 * graphite.c (gmp_cst_to_tree): Moved.
5514 (iv_stack_entry_is_constant): New.
5515 (iv_stack_entry_is_iv): New.
5516 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
5517 (loop_iv_stack_insert_constant): New.
5518 (loop_iv_stack_pop): Use new datatpype.
5519 (loop_iv_stack_get_iv): Same.
5520 (loop_iv_stack_get_iv_from_name): Same.
5521 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
5522 (loop_iv_stack_patch_for_consts): New.
5523 (loop_iv_stack_remove_constants): New.
5524 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
5525 (translate_clast): Call loop_iv_stack_patch_for_consts and
5526 loop_iv_stack_remove_constants.
5527 (gloog): Use new datatype. Redirect construction edge to end
5528 block to avoid accidental deletion.
5529 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
5531 (union iv_stack_entry_data): New. Data in iv stack entry.
5532 (struct iv_stack_entry): New. Datatype for iv stack entries.
5534 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5536 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5537 operand type when copying the operand to a variable of different type.
5539 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5541 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5542 with the IV name after increment.
5544 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5546 * Merge from mainline (r140164:140838).
5548 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5550 * graphite-data-ref.c: New.
5551 * graphite.c (print_scop): Also dump the dependence graph.
5552 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
5553 (new_scop): Initialize SCOP_DEP_GRAPH.
5554 (build_scop_dynamic_schedules): New.
5555 (build_access_matrix_with_af): Fixed column numbering.
5556 (graphite_transform_loops): Call build_scop_dynamic_schedules.
5557 * graphite.h: Add ifndef/define guards against multiple inclusion.
5558 (struct scop): Add dep_graph field.
5559 (SCOP_DEP_GRAPH): Defined.
5560 (ref_nb_loops): Fixed and moved to other position.
5561 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
5562 (nb_loops_around_loop_in_scop): New.
5563 (graphite_dump_dependence_graph): Declared.
5564 (graphite_build_rdg_all_levels): Declared.
5565 (graphite_test_dependence): Declared.
5566 * Makefile.in (graphite-data-ref.o): New target.
5568 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
5570 * Merge from mainline (139870:140164).
5572 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5574 * Merge from mainline (138275:139870).
5575 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
5576 the commits from trunk broke the niter detection.
5578 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5580 * graphite.c: Add more documentation. Fix formatting.
5581 (debug_loop_vec, debug_oldivs, loop_iv_stack,
5582 loop_iv_stack_debug): Moved...
5583 (schedule_to_scattering): Move before use.
5584 (dot_all_scops): Include in "#if 0" the code for system
5587 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
5588 loop_iv_stack_debug): ...here.
5590 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
5592 * tree-phinodes.c (make_phi_node): Extern.
5593 (add_phi_node_to_bb): New.
5594 (create_phi_node): Call add_phi_node_to_bb.
5595 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
5596 (remove_statement): Handle case where stored phi was updated
5597 and is no longer the same.
5598 * graphite.c (is_parameter): New.
5600 (expand_scalar_variables_expr): New.
5601 (expand_scalar_variables_stmt): New.
5602 (expand_scalar_variables): New.
5603 (move_phi_nodes): Create new phi instead of moving old one.
5604 (translate_clast): Call expand_scalar_variables.
5605 (find_vdef_for_var_in_bb): Also scan regular definitions.
5606 (skip_phi_defs): New.
5607 (collect_scop_exit_phi_args): New.
5608 (patch_scop_exit_phi_args): New.
5609 (gloog): Patch phis after scop.
5610 * tree-flow.h: (add_phi_node_to_bb): Declared.
5611 (make_phi_node): Declared.
5613 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5615 * graphite.c (end_scop): Split the entry of the scop when it
5616 is the header of the loop in which the scop is ending.
5617 (build_scops_1, limit_scops): Update uses of end_scop.
5619 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5621 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
5622 SCOP_ENTRY or SCOP_EXIT.
5624 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5626 * graphite.c (get_construction_edge): Removed.
5627 (gloog): Construction edge is the scop entry edge.
5629 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5631 * graphite.c (can_generate_for_scop): Removed.
5632 (gloog): Do not call it.
5634 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5636 * graphite.c (new_scop): Entry of a scop is an edge.
5637 Initialize SESE region.
5638 (free_scop): Free SESE region.
5639 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
5640 (split_difficult_bb): New, split from end_scop.
5641 (end_scop): Exit of a scop is an edge.
5642 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
5643 not automatically updated and thus is always wrong.
5644 * graphite.h (struct sese): New.
5647 (struct scop): New field for a SESE region. Remove entry, exit.
5648 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
5649 semantics as before. Moved comment around.
5651 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5652 Sebastian Pop <sebastian.pop@amd.com>
5654 * graphite.c (graphite_transform_loops): Always enable gloog
5655 and find_transform when ENABLE_CHECKING.
5657 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5659 * graphite.c (graphite_transform_loops): Move pretty printer
5660 of SCOPs before doing any transform. Remove call to print_scops
5661 and dot_all_scops_1.
5663 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5665 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
5666 (print_graphite_bb): Same.
5668 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5670 * graphite.c (dot_all_scops_1): Cleanup.
5671 (move_scops): Fix comment.
5673 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5675 * graphite.c (build_scop_bbs): Revert commit 139355:
5677 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5678 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5680 * graphite.c (build_scop_bbs): Factor up code.
5682 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5684 * graphite.c (gloog): Update dominator info.
5686 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5688 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
5690 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5692 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
5694 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
5695 (translate_clast): Correct formatting.
5696 * graphite.h (struct num_map): Removed.
5697 (struct graphite_bb): Remove num_map field.
5698 (GBB_INDEX_TO_NUM_MAP): Removed.
5700 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5702 * graphite.c (build_access_matrix_with_af): Fix comments.
5703 (build_scop_data_accesses): Same.
5705 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5707 * graphite.c (build_scop_data_accesses): Don't construct
5708 access matrices. Add a FIXME and an assert condition that
5709 should pass when the access matrices will be needed.
5711 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5713 * tree-data-ref.c (stmt_simple_memref_p): Don't call
5715 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
5716 Moved close by free_graphite_bb.
5717 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
5718 (new_scop): Move close by free_scop.
5719 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
5721 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
5723 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
5724 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
5725 instead of recursive call.
5726 (graphite_translate_clast_equation): New.
5727 (graphite_create_guard_cond_expr): New.
5728 (graphite_create_new_guard): New.
5729 (get_stack_index_from_iv): Removed.
5730 (graphite_rename_ivs_stmt): Use gbb_loop_index.
5731 (get_true_edge_from_guard_bb): New.
5732 (translate_clast): Handle stmt_guard in clast.
5733 (get_construction_edge): Allow construction edge detection for
5734 a scope entry with multiple predecessors if one predecessor is
5735 the immediate dominator of scope entry.
5736 (can_generate_code_stmt): Enable code generation for clast_guard.
5737 (gloog): Use correct context loop. Removed check for post dominators.
5738 * cfgloop.h (create_empty_if_region_on_edge): Declared.
5740 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5742 * graphite.c (remove_dead_loops): Document better which
5745 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5747 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
5749 (graphite.o): Also depends on pointer-set.h.
5751 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5753 * graphite.c (scop_record_loop): Fix compile warning.
5755 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
5756 Sebastian Pop <sebastian.pop@amd.com>
5758 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
5760 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5762 * graphite.c (build_graphite_bb): Initialize bb->aux to
5763 point to the graphite_bb_p.
5764 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
5766 (add_bb_domains): Does not use the scop parameter.
5767 (graphite_transform_loops): Clean bb->aux at the end.
5769 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5770 Sebastian Pop <sebastian.pop@amd.com>
5772 * lib/target-supports.exp
5773 (check_effective_target_fgraphite): New.
5775 * gcc.dg/graphite/graphite.exp: Early exit when
5776 check_effective_target_fgraphite returns false.
5777 Set dg-do-what-default to compile.
5778 (scan-graphite-dump-times): Removed.
5779 * gfortran.dg/graphite/graphite.exp: Same.
5781 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
5782 Use scan-tree-dump-times instead of scan-graphite-dump-times.
5783 * gcc.dg/graphite/scop-1.c: Same.
5784 * gcc.dg/graphite/scop-2.c: Same.
5785 * gcc.dg/graphite/scop-3.c: Same.
5786 * gcc.dg/graphite/scop-4.c: Same.
5787 * gcc.dg/graphite/scop-5.c: Same.
5788 * gcc.dg/graphite/scop-6.c: Same.
5789 * gcc.dg/graphite/scop-7.c: Same.
5790 * gcc.dg/graphite/scop-8.c: Same.
5791 * gcc.dg/graphite/scop-9.c: Same.
5792 * gcc.dg/graphite/scop-10.c: Same.
5793 * gcc.dg/graphite/scop-11.c: Same.
5794 * gcc.dg/graphite/scop-12.c: Same.
5795 * gcc.dg/graphite/scop-13.c: Same.
5796 * gcc.dg/graphite/scop-matmult.c: Same.
5797 * gcc.dg/graphite/scop-14.c: Same.
5798 * gcc.dg/graphite/scop-15.c: Same.
5799 * gcc.dg/graphite/block-0.c: Same.
5800 * gcc.dg/graphite/scop-16.c: Same.
5801 * gcc.dg/graphite/block-1.c: Same.
5802 * gcc.dg/graphite/scop-17.c: Same.
5803 * gcc.dg/graphite/scop-18.c: Same.
5804 * gfortran.dg/graphite/block-1.f90: Same.
5805 * gfortran.dg/graphite/scop-1.f: Same.
5806 * gfortran.dg/graphite/block-2.f: Same.
5808 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5810 * graphite.c: Fix some XXX comments.
5811 (build_scop_dynamic_schedules): Removed.
5813 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5815 * graphite.h (scop_max_loop_depth): Moved...
5816 * graphite.c (scop_max_loop_depth): ...here.
5817 (remove_all_edges_1): New.
5818 (remove_all_edges): Factored code.
5819 (remove_cond_exprs): Check only the last statement for
5820 a GIMPLE_COND expression.
5822 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5824 * graphite.c (scan_tree_for_params): Early return when the
5825 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
5826 (find_scop_parameters): Factor out code.
5827 (graphite_trans_bb_strip_mine): Remove dead code.
5829 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5831 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
5832 graphite_trans_bb_move_loop): Factor asserts.
5833 (gloog): Perform sanity checks only for ENABLE_CHECKING.
5834 Do not call calculate_dominance_info and estimate_bb_frequencies.
5836 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
5838 * graphite.c (create_loops_mapping, free_loops_mapping,
5839 create_loops_mapping_num, debug_loop_mapping_1,
5840 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
5841 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
5842 graphite_loops_mapping_add_child_num,
5843 graphite_loops_mapping_insert_child,
5844 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
5845 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
5846 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
5847 create_num_from_index, get_num_from_index,
5848 swap_loop_mapped_depth): Removed.
5849 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
5850 (free_scop): Do not call free_loops_mapping.
5851 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
5852 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
5853 get_loop_mapped_depth.
5854 (graphite_trans_bb_move_loop): Do not update the loop mapping.
5855 (graphite_trans_bb_strip_mine): Same.
5856 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
5857 (struct scop): Remove field loops_mapping.
5859 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5860 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5862 * graphite.c (scop_record_loop): Factor out one level of the
5863 condition by early return.
5864 (build_scop_loop_nests): Format following FSF coding style.
5865 (build_scop_dynamic_schedules): Factor out code.
5866 (scopdet_bb_info): Reindent. Default case should not be reachable.
5868 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5869 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5871 * graphite.c (loop_affine_expr): Check for DECL_P or struct
5872 assignments that are not handled as simple operands for now.
5874 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5875 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5877 * graphite.c (build_scop_bbs): Factor up code.
5879 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5880 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5882 * graphite.c (stmt_simple_for_scop_p): Factor code out
5884 (enum gbb_type): New. Group all the GBB_* types under it.
5885 (is_loop_exit): Moved...
5886 (end_scop): Enable BB spliting.
5887 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
5888 * cfgloop.h (is_loop_exit): Declared.
5890 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5892 * doc/invoke.texi: Remove strides from examples containing
5893 DO loops when the strides are equal to 1.
5895 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
5896 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5898 * graphite.c (graphite_trans_scop_block): Or the result with
5899 the result from graphite_trans_loop_block.
5900 * gcc.dg/graphite/block-1.c: New.
5901 * gfortran.dg/graphite/block-1.f90: New.
5902 * gfortran.dg/graphite/block-2.f: New.
5904 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5906 * graphite.c (graphite_transform_loops): Call cloog_initialize
5909 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5911 * tree-data-ref.c) (stmt_simple_memref_p): New.
5912 * tree-data-ref.h (stmt_simple_memref_p): Declared.
5913 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
5914 (is_simple_operand): Call stmt_simple_memref_p.
5916 * gcc.dg/graphite/scop-matmult.c: Updated for not
5917 using pointer arithmetic, as this is optimized by PRE and
5918 makes the code too difficult to analyze.
5920 * gcc.dg/graphite/scop-18.c: Same.
5922 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5924 * gdbinit.in (pgg): New.
5926 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5928 * graphite.c (graphite_trans_loop_block): Fix warning.
5930 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5932 * graphite.c (graphite_trans_loop_block): Fix my merge error.
5934 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5936 * graphite.c (graphite_trans_bb_block): Remove check for
5937 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
5938 Check if loop blocking is profitable for every loop, before applying
5940 (graphite_apply_transformations): Call graphite_trans_bb_block only,
5941 if flag_loop_block is set.
5943 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5945 * graphite.c: Add some more documentation for the loop
5948 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5950 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
5951 * graphite.c: Format on less than 80 columns.
5954 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5956 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
5958 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5960 * doc/invoke.texi (floop-block, floop-strip-mine,
5961 floop-interchange): Update documentation with examples.
5963 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
5965 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
5967 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
5969 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
5971 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
5972 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
5973 * tree-scalar-evolution.c: Revert useless changes.
5974 * tree-phinodes.c: Same.
5977 * tree-vectorizer.h: Same.
5978 * tree-flow.h: Same.
5980 * common.opt (fgraphite): Update documentation.
5982 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
5984 * doc/invoke.texi (-floop-block, -floop-strip-mine,
5985 -floop-interchange): Add more text for explaining what each of these
5987 * tree-into-ssa.c (gimple_vec): Moved to...
5988 * graphite.c: Include gimple.h.
5989 (gimple_vec): Moved to...
5990 (del_loop_to_cloog_loop): Removed.
5991 (loop_affine_expr): Do not call create_data_ref when the
5992 operand is a constant.
5993 (new_scop): Use free instead of del_loop_to_cloog_loop.
5994 * Makefile.in (graphite.o): Depend on GIMPLE_H.
5995 * gimple.h (gimple_vec): ... here.
5997 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5999 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6001 (build_loop_iteration_domains): Fail, if latch executions unknown.
6003 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6005 * graphite.c (add_conditions_to_domain): New.
6006 (build_scop_conditions_1): Call add_conditions_to_domain.
6007 (set_cloog_options): Allow to disable optimizations.
6009 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6011 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6012 Do not use walk_dominator_tree.
6013 (find_scop_parameters): Do not use walk_dominator_tree.
6015 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6017 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6018 (idx_record_params): Adapt.
6019 * graphite.h (scop_gimple_loop_depth): New.
6021 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6023 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6024 (scan_tree_for_params): Remove value_init.
6025 (build_scop_context): Remove value_init.
6026 (build_loop_iteration_domains): Remove value_init.
6027 (schedule_to_scattering): Remove value_init.
6028 (graphite_trans_bb_strip_mine): Remove value_init.
6030 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6032 * gcc/graphite.c (limit_scops): New.
6033 (graphite_transform_loops): Add limit SCoPs.
6034 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6035 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6036 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6037 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6038 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6039 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6040 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6041 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6042 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6043 Change loop numbers.
6044 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6045 Change loop numbers.
6046 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6047 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6048 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6049 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6050 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6051 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6052 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6053 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6054 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6055 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6057 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6059 * graphite.c (graphite_transform_loops): Call always find_transform.
6061 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6063 * graphite.c (free_loops_mapping): New.
6064 (stmt_simple_for_scop_p): Fix typo.
6065 (stmt_simple_for_scop_p): Fix tuples functions, that
6067 (free_graphite_bb): Fix some memleaks.
6068 (free_scop): Fix some memleaks.
6069 (scopdet_bb_info): Do not forget some tmp SCoPs.
6070 (find_params_in_bb): Fix some memleaks.
6071 (clast_to_gcc_expression): Fix warning.
6073 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6075 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6076 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6078 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6080 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6081 Move code ifdef-ed HAVE_cloog...
6082 * graphite.c: Include toplev.h.
6084 * Makefile.in (OBJS-common): Always build graphite.o.
6085 (BACKEND): Remove @GRAPHITE@.
6086 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6087 (graphite.o): Depend on TOPLEV_H.
6089 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6091 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6092 Remove typo left from polylib to ppl conversion.
6093 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6095 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6097 * toplev.c (process_options): Move the graphite loop optimization
6099 * tree-ssa-loop.c (graphite_transforms): ... here.
6100 When not configured with CLooG, print to dump_file that
6101 Graphite transforms were not performed.
6102 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6104 * gcc.dg/graphite/*.c: Updated all testcases to use
6105 scan-graphite-dump-times.
6107 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6109 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6110 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6112 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6113 Jan Sjodin <jan.sjodin@amd.com>
6115 * configure: Regenerated.
6116 * omp-low.c (expand_omp_sections): Remove now unused code.
6117 * config.in (HAVE_polylib): Removed.
6118 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6119 (PPLLIBS, PPLINC): Added.
6120 * graphite.c: Replace unsigned with int wherever possible.
6121 Don't access Cloog's data structures, but use accessor functions.
6122 Clast's stmt->type is now implemented as a vtable: change the
6123 switches of stmt->type into ifs.
6124 (polylib/polylibgmp.h): Don't include.
6125 (initialize_dependence_polyhedron,
6126 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6127 statement_precedes_p, test_dependence, build_rdg_all_levels,
6128 dump_dependence_graph): Removed until this code is cleaned up
6130 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6131 (POLYLIBINC): Renamed PPLINC.
6133 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6134 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6135 Jan Sjodin <jan.sjodin@amd.com>
6137 Finish the merge and tuplification of graphite.
6139 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6140 Jan Sjodin <jan.sjodin@amd.com>
6142 Partial merge from mainline (138072:138275).
6143 * graphite.c still has to be tuplified.
6145 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6147 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6148 (create_num_from_index): New.
6149 (get_num_from_index): Also pass in the graphite BB.
6150 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6151 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6152 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6153 (is_interchange_valid): Return false when failing.
6154 * graphite.h (struct num_map): New.
6155 (struct graphite_bb): New field num_map.
6156 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6158 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6160 * graphite.c (dump_gbb_conditions): Print also conditions like
6161 "if (a)". Remove dublicated code and use print_generic_expr ().
6162 (stmt_simple_for_scop_p): Only allow conditions we can handle
6165 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6167 * graphite.h (struct scop): Removed new_ivs field.
6168 (SCOP_NEWIVS): Deleted.
6169 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6170 clast_to_gcc_expression, graphite_create_new_loop):
6171 Removed use of new_ivs.
6173 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6175 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6176 create_loops_mapping_num, debug_loop_mapping_1): New.
6177 (debug_loop_mapping): Call debug_loop_mapping_1.
6178 (get_loop_mapping_for_num,
6179 graphite_loops_mapping_add_child,
6180 graphite_loops_mapping_add_child_num,
6181 graphite_loops_mapping_insert_child,
6182 graphite_loops_mapping_parent,
6183 split_loop_mapped_depth_for_num,
6184 loop_mapped_depth_split_loop): New.
6185 (increment_loop_mapped_depths): Removed.
6186 (swap_loop_mapped_depth_for_num): Reimplemented.
6187 (new_scop): Call create_loops_mapping.
6188 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6189 (translate_clast): Pass the old loop father in parameter, and pass
6190 it to get_old_iv_from_ssa_name.
6191 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6192 can_generate_code, can_generate_for_scop): New.
6193 (graphite_trans_bb_block): Returns false when it fails to transform.
6194 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6196 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6198 Reverted all the changes related to the streamization and
6200 These changes are now tracked in the streamization branch.
6202 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6203 Jan Sjodin <jan.sjodin@amd.com>
6205 * graphite.c (gbb_compare): Correctly constify.
6206 (gbb_can_be_ignored): Indent.
6207 (graphite_trans_scop_swap_1and2): Add legality check.
6210 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6212 Remove fallouts from "Reverted the Condate changes".
6213 * tree.h: Remove unused decl.
6214 * gcc.dg/tree-checker: Same.
6215 * timevar.def: Remove counter.
6217 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6219 * Merge from mainline (135673:138072).
6221 Reverted the MIRO changes (from 2008-04-05) that are now
6222 tracked in the miro branch.
6223 * tree-bounds.c: Removed.
6224 * tree-bounds.h: Removed.
6226 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6227 are now tracked in the condate branch.
6228 * tree-check.c: Removed.
6229 * tree-match.c: Removed.
6230 * condate.y: Removed.
6232 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6234 * common.opt: New user flag -floop-block, -floop-strip-mine
6235 and -floop-interchange.
6236 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6237 graphite loop optimization flags is turned on.
6238 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6239 flag_loop_strip_mine and flag_loop_interchange checks before
6241 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6242 -floop-strip-mine and -floop-interchange.
6243 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6245 * gcc.dg/graphite/scop-16.c: Ditto.
6246 * gcc.dg/graphite/scop-17.c: Ditto.
6247 * gcc.dg/graphite/scop-18.c: Ditto.
6249 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6250 Sebastian Pop <sebastian.pop@amd.com>
6252 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6253 (create_empty_loop_on_edge): More fixes.
6254 * tree-phinodes.c (resize_phi_node): Extern.
6255 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6256 * cfghooks.c (update_dominator_information): New split from
6258 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6259 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6260 successor of the function entry block.
6262 * graphite.c: Include pointer-set.h.
6263 (debug_loop_mapping, increment_loop_mapped_depths,
6264 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6265 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6266 swap_loop_mapped_depth_for_num, get_num_from_index,
6267 swap_loop_mapped_depth, loop_iv_stack_debug,
6268 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6269 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6270 get_old_iv_from_ssa_name): New.
6271 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6272 (free_scop): Free SCOP_LOOPS_MAPPING.
6273 (scop_record_loop): Record old ivs.
6274 (create_var_name): Removed.
6275 (initialize_cloog_names): Allocate double space in case strip mine
6276 applies to all loops once.
6277 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6278 (clast_to_gcc_expression): Same. Implement more clast to gimple
6280 (graphite_create_new_loop): Pass in ivstack.
6281 (remove_all_edges): Pass in the construction_edge.
6282 (graphite_remove_iv): Removed.
6283 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6284 remove_cond_exprs): Rewritten.
6285 (move_phi_nodes): New.
6286 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6287 (translate_clast): Pass in ivstack. Rewrite some cases.
6288 (set_cloog_options, debug_clast_stmt): New.
6289 (find_transform): Use set_cloog_options.
6290 (outermost_loop_layer): Removed.
6291 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6292 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6293 mark_old_loops, remove_dead_loops): New.
6295 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6296 (const_column_index, get_first_matching_sign_row_index,
6297 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6298 get_upper_bound): New.
6299 (graphite_trans_bb_strip_mine): Also update the iv map.
6301 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6302 (struct name_tree): Add a loop field.
6303 (struct scop): Add a graphite_loops_mapping field.
6304 (SCOP_LOOPS_MAPPING): New.
6305 (debug_clast_stmt): Declare.
6306 * lambda.h (find_induction_var_from_exit_cond): Declare.
6307 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6308 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6309 (create_empty_loop_on_edge): Updated.
6310 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6311 rename_variables_in_bb): Declare.
6312 * tree-cfg.c (remove_bb): Extern.
6314 * gcc.dg/graphite/block-0.c: New.
6316 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6317 Sebastian Pop <sebastian.pop@amd.com>
6319 * graphite.c (strip_mine_profitable_p): New.
6320 (graphite_trans_bb_block): Disable strip mining if not profitable.
6322 * gcc.dg/graphite/scop-18.c: New.
6323 * gcc.dg/graphite/scop-17.c: Fixed.
6324 * gcc.dg/graphite/scop-16.c: Fixed.
6326 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6327 Jan Sjodin <jan.sjodin@amd.com>
6328 Sebastian Pop <sebastian.pop@amd.com>
6330 * graphite.c (is_interchange_valid): New.
6331 (graphite_trans_bb_block): Check loop nest of basic block for legality
6334 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6335 outer_most_loop, gbb_outer_most_loop_index): New.
6337 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6338 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6339 * gcc.dg/graphite/scop-16.c: New.
6340 * gcc.dg/graphite/scop-17.c: New.
6342 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6344 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6345 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6347 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6349 * graphite.c (new_scop): Initialize SCOP_EXIT.
6350 (scopdet_info): Add.
6351 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6352 (build_scops_1): Cleanup, bugfixes.
6353 (build_scops): Cleanup.
6355 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6356 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6358 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6360 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6362 * gfortran.dg/graphite/graphite.exp: Use
6363 DEFAULT_GRAPHITE_FLAGS.
6365 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6367 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6369 * graphite.c (scan_tree_for_params): Do not assert any more if
6370 MULT_EXPR parameter is negative.
6372 * gfortran.dg/graphite/scop-1.f: New.
6374 * gfortran.dg/graphite/graphite.exp: New.
6376 * gcc.dg/graphite/scop-15.c: New.
6378 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6380 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6382 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6384 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6385 graphite_swap_loops.
6386 (graphite_trans_bb_move_loop): New.
6387 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6388 (graphite_trans_bb_block): New.
6389 (graphite_trans_loop_block): New.
6390 (graphite_trans_scop_swap_1and2): Rename from
6391 graphite_trans_swap_1and2.
6392 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6393 (graphite_trans_scop_block): New.
6394 (graphite_apply_transformations): Rename from
6395 graphite_transformations.
6397 * gcc.dg/graphite/scop-matmult.c: New.
6399 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6401 * graphite.c (gbb_compare): New.
6402 (graphite_sort_gbbs): New.
6403 (gbb_can_be_ignored): New.
6404 (scop_remove_ignoreable_gbbs): New.
6405 (graphite_transformations): Cleanup and add
6406 scop_remove_ignoreable_gbbs.
6407 * lambda.h (lambda_vector_compare): New.
6409 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6411 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6412 (graphite_swap_loops): int -> unsigned
6413 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6414 (graphite_transformations): New.
6415 (graphite_transform_loops): Move to graphite_transformations.
6416 * graphite.h (gbb_nb_loops): Return unsigned.
6418 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6420 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6421 the domain matrix. This makes scop-0.c work again.
6423 2008-06-20 Richard Guenther <rguenther@suse.de>
6425 * graphite.h: Adjust copyright to GPLv3.
6426 * graphite.c: Likewise.
6427 (stmt_simple_memref_for_scop_p): Split out from ...
6428 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6430 (get_bb_type): Optimize.
6432 (is_bb_addable): Fix memleak, replace is_pred call with
6434 (build_scops): Use current_loops.
6435 (param_index): Fix memleak.
6437 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6439 * graphite.c: Fix formatting.
6441 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6443 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6444 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6445 (create_var_name, save_var_name): Newly defined functions.
6446 (initialize_cloog_names): Part of the code factored out to
6448 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6449 in clast_reduction statement.
6450 (graphite_create_new_loop): Now takes a new parameter
6452 (translate_clast): Now also takes the context_loop and bb_exit
6453 parameters. Rewritten the code so that it creates a gimple code
6454 inside the given context.
6455 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6456 remove_cond_expr, disconnect_cond_expr,
6457 disconnect_virtual_phi_nodes): Newly defined functions.
6458 * graphite.h (struct scop): added old_ivs vector.
6459 SCOP_OLDIVS: New macro.
6461 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6463 * cfgloopmanip.c: Add missing function comments, fix formatting.
6465 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6467 * cfgloopmanip.c (update_dominators_in_loop): Defined.
6468 (create_empty_loop_on_edge): Defined.
6469 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
6471 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
6472 (update_dominators_in_loop): Declared as extern
6473 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
6475 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
6477 * graphite.c (print_graphite_bb): Allow changing number of loops
6479 (initialize_cloog_names): Allow changing number of loops.
6480 (build_cloog_prog): Simplify.
6481 (find_transform): Enable cloog option --strides.
6482 (graphite_swap_loops): New.
6483 (graphite_strip_mine_loop): New.
6484 (graphite_trans_swap_1and2): New.
6485 (graphite_trans_strip): New.
6486 (graphite_transform_loops): Add graphite_trans_strip.
6487 * graphite.h (scop_max_loop_depth): New.
6489 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6491 * graphite.c (build_scop_iteration_domain): Remove forgotten
6492 line. (Fixes compile)
6494 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6496 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
6497 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
6498 (build_bb_loops): New.
6499 (graphite_transform_loops): Add build_bb_loops.
6500 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
6502 * graphite.h (graphite_bb): Add loops.
6503 (gbb_nb_loops): New.
6504 (gbb_loop_at_index): New.
6505 (gbb_loop_index): New.
6506 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
6507 using nb_params_in_scop.
6509 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6511 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
6512 (build_scop_canonical_schedules): Build minimized schedule.
6513 (schedule_to_scattering): Adapt to minimized schedule.
6514 * graphite.h (graphite_bb): Add/Update descriptions.
6516 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
6517 Tobias Grosser <grosser@fim.uni-passau.de>
6519 * graphite.c (print_graphite_bb): Add condition printing.
6521 (dump_gbb_conditions): New.
6522 (build_scop_conditions_1): New.
6523 (build_scop_conditions): New.
6524 * graphite.h (graphite_bb): Add conditions.
6526 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6528 * graphite.c (print_graphite_bb):
6529 (free_graphite_bb): New.
6530 (free_scop): Free bbs.
6531 (get_bb_type): Free doms.
6532 (build_scop_context): Free context matrix.
6533 (build_loop_iteration_domains): Remove unused code.
6534 (build_cloog_prog): Free scattering function and blocklist.
6535 (find_transform): Free options.
6537 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
6539 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
6540 Remove unnecessery cloog data structures. Make a copy of the domain
6541 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
6542 unnecessary cloog data structures. Fix memory leaks. Remove insert
6543 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
6545 (build_scop_iteration_domain): Remove unnecessary cloog
6546 data structures. Fix memory leaks.
6547 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
6548 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
6550 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6552 * graphite.c (find_scop_params): Remove initialize_cloog_names.
6554 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6556 * graphite.c (end_scop): Style fix.
6557 (schedule_to_scattering): Style and comment fix.
6559 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6560 * graphite.c (print_graphite_bb): Fix definiton of
6561 schedule_to_scattering.
6562 (initialize_cloog_names): Change nb_scattdims to max loop
6564 (schedule_to_scattering): Take parameter for number of scattering
6566 (build_cloog_prog): Only build as much scattering dimensions as
6569 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6571 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
6572 in polyhedron/aermod.f90.
6574 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
6575 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6576 Harsha Jagasia <harsha.jagasia@amd.com>
6578 * graphite.c (is_bb_addable): Fix segfault.
6580 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
6582 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
6583 with multiple exits and conditional handling in edge cases.
6584 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
6586 * gcc.dg/graphite/scop-14.c: New.
6588 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
6589 Adrien Eliche <aeliche@isty.uvsq.fr>
6591 * graphite.c (is_bb_addable): Add more comments and enhance
6592 readablity of the source code. Fix memory leak.
6593 (is_loop_exit): Fix memory leak.
6595 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6597 * graphite.c (first_loop_in_scop): Deleted.
6598 (setup_cloog_loop): Only walk the loop chain for inner loops.
6599 (build_scop_iteration_domain): Execute setup_cloog_loop for
6600 all loops in the first layer.
6602 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6604 * graphite.c (scan_tree_for_params): Change the way params are
6605 added to be indepenent of the number of loops.
6606 (setup_cloog_loop): Revert to short matrix format. Fix parameter
6608 (build_cloog_prog): Revert to short matrix format.
6610 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6611 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6613 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
6616 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6618 * graphite.c (nb_data_refs_in_scop): New.
6619 (graphite_transform_loops): Print more stats: number of
6620 loops, basic blocks and data references per scop.
6622 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6623 Jan Sjodin <jan.sjodin@amd.com>
6625 * graphite.c (loop_affine_expr, idx_record_params,
6626 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
6627 instead of instantiate_parameters.
6629 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6631 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
6632 add support for parameters, add STATIC_SCHEDULE at the right places,
6635 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6637 * graphite.c (build_scop_loop_nests): Only add the loops, that
6638 are contained completely in the SCoP.
6639 (build_cloog_prog): Disable scattering, until schedule_to_scattering
6640 and the domains are fixed.
6641 (build_scop_canonical_schedules): Add support for bbs not contained
6644 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6646 * graphite.h (scop_contains_loop): Update comments to match
6647 the actual behavior.
6648 (scop_contains_loop): New.
6649 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
6651 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6653 * graphite.c (get_bb_type): On function body, i.e. loop_0,
6654 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
6657 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6658 Tobias Grosser <grosser@fim.uni-passau.de>
6660 * graphite.c (graphite_transform_loops): Early return when
6661 there are no loops in the function.
6663 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6664 Jan Sjodin <jan.sjodin@amd.com>
6666 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
6667 offset of the last loop.
6668 (setup_cloog_loop): Copy the entire outer constraint matrix.
6670 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6671 Jan Sjodin <jan.sjodin@amd.com>
6673 * graphite.c (stmt_in_scop_p, function_parameter_p,
6674 invariant_in_scop_p): Removed.
6675 (scan_tree_for_params): Can be used with no constraint
6676 matrix for gathering parameters.
6677 (idx_record_params): Don't use idx_record_param, instead use
6678 scan_tree_for_params.
6679 (find_scop_parameters): Same.
6680 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
6681 Fix the size of loop domains.
6682 (schedule_to_scattering): Exit when the outer loop is not in scop.
6683 (find_transform): Enable build_cloog_prog.
6685 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6686 Jan Sjodin <jan.sjodin@amd.com>
6688 * graphite.c (schedule_to_scattering): Make scattering domains
6689 uniformly of the same size, as required by CLooG 0.14.0 and before.
6691 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6692 Jan Sjodin <jan.sjodin@amd.com>
6694 * graphite.c (schedule_to_scattering): Rewrite, correct the
6695 translation of the scheduling function to scattering.
6696 (build_cloog_prog): Call schedule_to_scattering only once.
6697 * graphite.h (scop_loop_index): Do not fail for loops not
6698 in the scop: return -1.
6700 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
6702 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
6703 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
6704 (setup_cloog_loop): Export GBB_DOMAIN.
6705 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
6706 able to rebuild the original control flow.
6707 * graphite.h (graphite_bb): Add domain field and access macro.
6710 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6712 * graphite.c (debug_gbb): New.
6713 (print_scop, build_graphite_bb): Use SCOP_BBS.
6714 (build_scop_bbs): Reimplemented.
6715 (dfs_bb_in_scop_p): Removed.
6716 (build_scop_loop_nests): Reorder loops inserted in
6717 SCOP_LOOP_NEST: outer loops should come first.
6718 (build_scop_canonical_schedules): Reinitialize at zero
6719 the components of the SCOP_STATIC_SCHEDULE for the loops
6720 that have already been parsed.
6722 * graphite.h (debug_gbb): Declared.
6724 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6725 Jan Sjodin <jan.sjodin@amd.com>
6727 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
6728 (graphite_loop_to_gcc_loop): Removed.
6729 (remove_all_edges): New.
6730 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
6731 (gloog): Remove useless code.
6733 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6735 * graphite.c (get_bb_type): Reworked. We distinguish between
6736 loops with one or multiple exits.
6737 (is_loop_exit): New.
6739 (is_bb_addable): Rework condition handling, now support for case
6740 case statements and loops with multiple exits.
6742 * gcc.dg/graphite/scop-11.c: New.
6743 * gcc.dg/graphite/scop-12.c: New.
6744 * gcc.dg/graphite/scop-13.c: New.
6746 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6748 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
6749 we have too many colors.
6751 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
6753 * doc/invoke.texi (-ftree-loop-fusion): Document.
6754 * tree-pass.h (pass_loop_fusion): Declared.
6755 * tree-loop-fusion.c: New.
6756 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
6757 * tree-data-ref.c (find_data_references_in_loop): Make extern.
6758 * tree-data-ref.h (find_data_references_in_loop): Declared.
6759 * common.opt (ftree-loop-fusion): Declared.
6760 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
6762 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
6764 * graphite.c (build_access_matrix): Fix typo from the merge.
6766 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
6768 * Merge from mainline (130800:135673).
6770 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6772 * graphite.c (end_scop): The exit of the scop is not part of the scop.
6773 Update dominators after splitting.
6775 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6777 * graphite.c (is_bb_addable): Return the harmful statement.
6778 Factor up some code.
6779 (end_scop): New. Splits end of scope bbs on a harmful statement.
6780 (build_scops_1): Call end_scop.
6782 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6784 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
6785 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
6786 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
6787 build_scops_1): Removed.
6788 (build_scops_2): Renamed build_scops_1.
6790 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
6792 * graphite.c: Fix formatting.
6794 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6796 * graphite.c (get_bb_type): New.
6798 (build_scops_2): New.
6799 (is_bb_addable): New.
6800 (build_scops): Switch the scop detection.
6801 (build_scop_bbs): Add entry bb to scop.
6802 * graphite.h (struct scop): Update comment.
6804 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6806 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
6809 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6811 * gcc.dg/graphite/scop-1.c: Update.
6812 * gcc.dg/graphite/scop-2.c: Update.
6813 * gcc.dg/graphite/scop-4.c: Update.
6814 * gcc.dg/graphite/scop-5.c: Add.
6815 * gcc.dg/graphite/scop-6.c: Add.
6817 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
6819 * gcc.dg/graphite/scop-0.c: Add.
6820 * gcc.dg/graphite/scop-7.c: Add.
6821 * gcc.dg/graphite/scop-8.c: Add.
6822 * gcc.dg/graphite/scop-9.c: Add.
6823 * gcc.dg/graphite/scop-10.c: Add.
6825 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6827 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
6828 Check affine expressions depending on the outermost loop
6830 (stmt_simple_for_scop_p): Same.
6831 (harmfule_stmt_in_scop): Same.
6833 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
6835 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
6836 mark entry and exit, that are not part of the SCoP and update HTML
6839 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
6841 * graphite.c (basic_block_simple_for_scop_p): Renamed
6843 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
6844 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
6845 (all_preds_visited_p, all_succs_visited_p,
6846 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
6847 scop_end_loop): New.
6848 (build_scops): Do not use dfs_enumerate_from.
6850 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
6852 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
6854 * graphite.c: Add comments to functions that are missing a
6856 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
6858 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
6860 * graphite.c (nb_params_in_scop): Moved...
6861 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
6862 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
6863 (clast_to_gcc_expression): Reduce column size to less than 80.
6864 (graphite_create_iv): Return the new name of the IV.
6865 (find_transform): Set options->esp and options->cpp.
6866 (gloog): Comment out the invalidation of the old loop code.
6867 (initialize_dependence_polyhedron): Replace scop_nb_params with
6870 * graphite.h (nb_params_in_scop): ... here.
6871 (scop_nb_params): Removed.
6872 (loop_domain_dim): Return something even when the loop was not
6873 found in the hash table: avoid ICEing on all the graphite.exp
6876 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6878 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
6880 * graphite.c (build_scop_dynamic_schedules): Schedule is built
6881 according to nesting level.
6882 (find_scop_parameters): Call instantiate_parameters.
6883 (scan_tree_for_params): Extend it to handle general affine bounds.
6884 Inner loop bound can depend on outer loop induction variable.
6885 (setup_cloog_loop): tmp variable is allocated on stack. Call
6886 instantiate_parameters with respect to outermost_loop_in_scop.
6887 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
6889 (create_empty_loop): Function loopify should be given edge
6890 probability, instead of edge frequency. Dominance relation from
6891 switch_bb to loop_header.
6892 (clast_to_gcc_expression): Added handling of clast_reduction node.
6893 (gloog): New functionality for removing old loop.
6894 (test_dependence): Factored out from build_rdg_all_levels.
6895 (build_rdg_all_levels): Dependence testing factored out to
6896 test_dependence function.
6898 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
6899 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
6902 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
6904 * graphite.c (free_scop, param_index, initialize_cloog_names,
6905 nb_params_in_scop): Use name_tree map instead of just a tree
6906 for keeping track of the variable name associated to that tree.
6907 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
6908 clast_to_gcc_expression, graphite_create_iv,
6909 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
6910 graphite_stmt_to_gcc_stmt): New.
6911 (gloog): Call these.
6912 * graphite.h (struct name_tree): New.
6913 (struct scop): Use name_tree instead of tree for params.
6914 Store a vector of name_tree for new_ivs.
6916 (scop_nb_params): Use name_tree instead of tree.
6918 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
6919 Sebastian Pop <sebastian.pop@amd.com>
6921 * tree-bounds.c: New.
6922 * tree-bounds.h: New.
6923 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
6924 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
6925 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
6929 * c-cppbuiltin.c: Same.
6933 * tree-outof-ssa.c: Same.
6935 * Makefile.in: Same.
6937 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
6938 Sebastian Pop <sebastian.pop@amd.com>
6940 * tree-loop-distribution.c (remaining_stmts,
6941 upstream_mem_writes): Removed static variables.
6942 (copy_loop_before, create_bb_after_loop,
6943 mark_nodes_having_upstream_mem_writes, free_rdg_components,
6944 rdg_build_components, rdg_build_partitions,
6945 dump_rdg_partitions): Extern.
6946 (generate_loops_for_partition, generate_code_for_partition): Do not
6948 (already_processed_vertex_p, predecessor_has_mem_write,
6949 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
6950 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
6951 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
6952 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
6953 Pass remaining_stmts and upstream_mem_writes as parameters.
6954 (rdg_component): Moved...
6955 (build_rdg_partition_for_component): Do not aggregate components when
6956 flag_streamize_loops is set.
6957 (gen_sequential_loops): New.
6958 (ldist_gen): Call gen_sequential_loops.
6960 * tree-pass.h (pass_loop_streamization): Declared.
6962 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
6963 basic blocks when loops structures exist.
6965 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
6967 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
6969 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
6970 eliminate_local_variables_stmt, eliminate_local_variables,
6971 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
6972 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
6973 of code delimited by two edges in the CFG.
6974 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
6975 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
6976 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
6977 the case of parallelisation of reductions.
6978 (create_loop_fn): Extern.
6979 (create_omp_parallel_region): New.
6981 * tree-data-ref.c (dump_data_dependence_relation): Don't call
6982 dump_data_reference for printing dra and drb.
6983 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
6985 (build_rdg): Don't call free_dependence_relations for the moment, as
6986 we attach dependence relations on each edge of the RDG.
6989 * tree-data-ref.h (rdg_component): ...here.
6990 (struct rdg_edge): New field ddr_p relation.
6991 (RDGE_RELATION): New.
6992 (create_bb_after_loop, copy_loop_before,
6993 mark_nodes_having_upstream_mem_writes, rdg_build_components,
6994 rdg_build_partitions, dump_rdg_partitions,
6995 free_rdg_components): Declared.
6997 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
6998 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7000 * tree-loop-streamization.c: New.
7002 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7003 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7005 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7007 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7009 * passes.c: Schedule pass_loop_streamization.
7011 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7013 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7016 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7018 * graphite.c (dot_all_scops): Update formatting.
7019 Bbs can now be part of more than one SCoP.
7021 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7023 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7025 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7026 * graphite.h (loop_to_cloog_loop): New.
7028 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7030 * graphite.c (loop_domain_dim, ref_nb_loops,
7031 loop_iteration_vector_dim): New.
7032 (build_access_matrix_with_af, build_access_matrix,
7033 initialize_dependence_polyhedron): Fixed for new matrix layout.
7034 No longer assume that all iteration domains are of the same
7037 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7039 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7040 defined in a loop at depth 0 is invariant.
7041 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7042 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7043 be called at loop depth 0.
7045 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7047 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7048 (down_open_scop): Removed.
7049 (loop_in_scop_p): Redefined.
7050 (scop_affine_expr): New argument: scop.
7051 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7052 a harmful statement ending a scop.
7053 (basic_block_simple_for_scop_p): New argument: scop.
7054 (get_loop_start): Removed.
7055 (new_scop): Initialize SCOP_LOOPS.
7056 (free_scop): Free SCOP_LOOPS.
7057 (succs_at_same_depth, preds_at_same_depth): New.
7058 (end_scop): Test the validity of a scop.
7059 (add_dominators_to_open_scops): New.
7060 (test_for_scop_bound): Call add_dominators_to_open_scops.
7061 Add cases for opening and closing multiple scops.
7062 (build_scops, build_scop_bbs): Iterate over basic blocks in
7064 (build_graphite_bb): Pass scop directly.
7065 (dfs_bb_in_scop_p): New.
7066 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7068 (nb_loops_around_gb): Use loop_in_scop_p.
7069 (schedule_to_scattering): Disabled for the moment the code computing
7070 the "textual order for outer loop".
7072 * graphite.h (struct scop): New field loops.
7074 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7076 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7078 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7079 Sebastian Pop <sebastian.pop@amd.com>
7081 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7082 * common.opt (fstreamize-loops): New.
7083 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7084 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7085 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7086 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7088 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7090 * tree-data-ref.c (build_empty_rdg): New.
7091 (build_rdg): Use it.
7092 * tree-data-ref.h (build_empty_rdg): Declared.
7093 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7094 (find_vertex_for_stmt): Removed.
7095 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7097 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7099 * tree-loop-distribution.c (generate_builtin): After cancelling the
7100 loop tree, also delete basic blocks.
7101 (rdg_flag_uses): Stop recursion when a vertex has already been
7104 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7106 * graphite.c (build_scop_alpha): Removed.
7107 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7108 and dump_dependence_graph to avoid compiler warnings.
7110 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7112 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7113 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7114 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7115 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7116 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7117 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7118 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7119 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7120 dump_dependence_graph): New.
7121 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7123 (struct scop): New field loop2cloog_loop.
7124 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7125 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7127 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7129 * graphite.c (build_graphite_bb): Fix initialization
7130 of the graphite basic block.
7132 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7134 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7135 loop domain matrix. Pass in the number of loops contained in the
7137 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7138 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7139 loops that are not surrounding the current loop are not represented
7140 in the domain constraint matrix.
7141 (build_scop_iteration_domain): Initial domain constraint matrix
7142 contains only the eq/ineq, cst, and scop parameters columns.
7144 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7146 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7147 (print_graphite_bb): Print scattering.
7149 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7151 * graphite.c (initialize_cloog_names): Initialize names of
7152 scattering variables.
7154 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7156 * graphite.c (dot_all_scops_1): Disable debug output while
7159 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7161 * graphite.c (find_transform): Change cloog output language to C.
7163 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7165 * tree-loop-distribution.c (generate_memset_zero,
7166 generate_builtin, generate_code_for_partition,
7167 rdg_flag_all_uses): New.
7168 (rdg_flag_uses): Gather in the same partition the statements defining
7169 the VUSES of the current statement.
7170 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7171 Gather in the same partition not only the stores to the same memory
7172 access, but also the reads.
7173 (ldist_generate_loops): Renamed ldist_gen.
7175 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7176 Tobias Grosser <grosser@fmi.uni-passau.de>
7178 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7179 next pointer, don't use the inner pointer.
7181 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7183 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7184 (find_transform): Call dot_all_1.
7185 * graphite.h (dot_all_scops): Declared.
7187 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7189 * tree-loop-distribution.c: Fix apsi.f ICE.
7190 (create_bb_after_loop): New.
7191 (generate_loops_for_partition): Use it.
7192 * gfortran.dg/ldist-1.f90: New.
7194 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7195 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7197 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7199 * graphite.c (find_transform): Dump cloog program sent to cloog.
7201 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7203 * graphite.c (initialize_cloog_names): Initialize cloog
7206 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7208 * graphite.c (build_scop_context): Fix typo, for the matrix
7209 format: insert '0 >= 0' instead of '-1 >= 0'.
7211 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7213 * Fix merge problems.
7215 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7217 * graphite.c (setup_cloog_loop): Fix typo.
7219 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7221 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7222 * tree-loop-distribution.c: Reimplemented.
7223 * tree-pass.h (pass_loop_distribution): New.
7224 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7226 * graphds.h (struct graph): New field indexes.
7227 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7229 * tree-vect-analyze.c: Remove declaration of static functions when not
7231 * tree-vectorizer.c: Same.
7232 (rename_variables_in_loop): Now extern.
7233 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7234 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7235 calling redirect_edge_and_branch_force.
7237 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7239 * tree-data-ref.c: Don't include tree-chrec.h.
7240 (debug_data_dependence_relations): New.
7241 (dump_data_dependence_relation): Call dump_data_reference on data refs
7243 (same_access_functions): Moved...
7244 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7245 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7246 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7247 struct rdg_vertex_info, ): New.
7248 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7250 (create_rdg_vertices): Initialize the htab of graph->indexes.
7251 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7252 (stmts_from_loop): Don't save LABEL_EXPR.
7253 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7254 hash_stmt_vertex_del): New.
7255 (build_rdg): Initialize rdg->indexes.
7256 (free_rdg, stores_from_loop, ref_base_address,
7257 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7258 have_similar_memory_accesses_1, ref_base_address_1,
7259 remove_similar_memory_refs): New.
7261 * tree-data-ref.h: Include tree-chrec.h.
7262 (debug_data_dependence_relations): Declared.
7263 (same_access_functions): ...here. Now static inline.
7264 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7265 ddr_dependence_level): New.
7266 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7267 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7268 RDG_MEM_READS_STMT): New.
7269 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7270 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7271 rdg_vertex_for_stmt): Declared.
7272 (struct rdg_edge): New field level.
7273 (RDGE_LEVEL, free_rdg): New.
7274 (stores_from_loop, remove_similar_memory_refs,
7275 rdg_defs_used_in_other_loops_p,
7276 have_similar_memory_accesses): Declared.
7277 (rdg_has_similar_memory_accesses): New.
7279 * lambda.h (dependence_level): New.
7280 * common.opt (ftree-loop-distribution): New.
7281 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7282 (print_loop_ir): Renamed print_loops.
7283 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7284 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7285 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7286 (tree-loop-distribution.o): Added.
7287 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7288 (mark_virtual_ops_in_bb): New.
7289 (print_loops_bb, debug_loop_num, debug_loop): New.
7290 * passes.c: Scheduled pass_loop_distribution.
7292 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7294 * graphite.c (scan_tree_for_params): Correct the number of columns
7296 (nb_flat_iterator): New.
7297 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7298 (build_scop_iteration_domain): Correct the number of columns for
7301 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7303 * Merge from mainline (129697:130800).
7305 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7307 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7308 dominated by SCoP's exit.
7309 (graphite_transform_loops): Compute post dominators.
7311 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7313 * Merge from mainline (127169:129697).
7315 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7317 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7318 parameter for the basic block that contains the expression. Use
7319 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7320 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7322 * graphite.h (gbb_loop): New.
7323 (GBB_LOOP): Removed.
7325 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7327 * Makefile.in: Fix merge problem.
7329 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7331 * Merge from mainline (125309:127169).
7332 * tree-loop-distribution.c: Disabled.
7334 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7336 * Merge from mainline (r123693:125309).
7338 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7340 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7342 (correct_modify_p, check_statements, number_of_lvalue_uses,
7343 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7344 instead of MODIFY_EXPR.
7345 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7348 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7350 * tree-loop-distribution.c (struct rdg): Replace arrays by
7351 VECs for edges and vertices.
7352 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7353 (RDGV_NB_PARTITIONS): New.
7354 (PRDG_NBV, PRDG_NBE): Removed.
7355 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7356 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7357 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7359 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7360 Sebastian Pop <sebpop@gmail.com>
7362 * doc/invoke.texi (-ftree-loop-distribution): Document.
7363 * tree-loop-distribution.c: New file.
7364 * tree-pass.h (pass_loop_distribution): Declared.
7365 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7366 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7368 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7369 (DDR_REVERSED_P): New.
7370 * common.opt (-ftree-loop-distribution): New.
7371 * tree-flow.h (distribute_loops): Declared.
7372 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7373 * passes.c (init_optimization_passes): Schedule loop distribution.
7375 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7377 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7378 (print_scop): Don't print when scop is NULL.
7379 (build_scop_context, find_transform): Don't output to stderr.
7381 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7383 * tree-data-ref.c: Don't include graphite.h.
7384 Comment out the code for printing data reference's scop.
7385 (build_access_matrix_with_af): Moved...
7386 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7387 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7388 (print_graphite_bb): Print basic block's schedule.
7389 (print_scop): Don't print the schedule, call cloog's pretty printer.
7390 (bb_in_scop_p): A basic block is in a scop only if it is both
7391 dominated and postdominated by the scop's entry and exit basic blocks.
7392 (function_parameter_p): New.
7393 (invariant_in_scop_p): Use function_parameter_p.
7394 (new_scop, save_scop): New.
7395 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7397 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7398 (loop_in_scop_p): New.
7399 (scop_record_loop): Use loop_in_scop_p.
7400 (build_scop_domain): Renamed build_scop_iteration_domain.
7401 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7402 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7403 setup_cloog_loop, dot_scop_1, dot_scop): New.
7404 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7405 (struct scop): Add a pointer to cloog's representation of a program.
7407 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7409 * doc/invoke.texi (-ftree-check-verbose): Renamed
7410 -ftree-checks-verbose.
7411 * common.opt (flag_tree_check_verbose): Renamed
7412 flag_tree_checks_verbose.
7413 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7415 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7417 * configure: Regenerated.
7418 * config.in: Regenerated.
7419 * tree-ssa-loop.c (graphite_transforms): Execute
7420 graphite_transform_loops only when HAVE_cloog.
7421 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7422 * graphite.c: Include polylibgmp.h and cloog.h.
7423 (graphite_transform_loops): Removed loops parameter.
7424 * tree-flow.h (graphite_transform_loops): Update declaration.
7425 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7426 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7427 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7428 (OBJS-common): Remove dependence on graphite.o.
7429 (BACKEND): Depend on @GRAPHITE@.
7431 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7433 * doc/invoke.texi (-ftree-check-verbose): Documented.
7434 * gcc.dg/tree-checker/tree-checks-1.c: New.
7435 * gcc.dg/tree-checker/tree-checks-2.c: New.
7436 * gcc.dg/tree-checker/tree-checks-3.c: New.
7437 * gcc.dg/tree-checker/tree-checks-4.c: New.
7438 * gcc.dg/tree-checker/tree-checks.exp: New.
7439 * gcc.dg/tree-checker/condates.crp: New.
7440 * common.opt (ftree-checks-verbose): New.
7441 * tree-check.c (tree_check_warning): Move extra stderr output
7442 under control of flag_tree_check_verbose.
7444 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7446 * tree-match.c: Fix comments formatting.
7447 * tree-match.h: Fix comments formatting.
7448 * tree-check.c: Fix comments formatting.
7449 (tree_check_init): Restructure.
7451 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7453 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7455 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7457 * Merge from mainline (r120733:123693).
7459 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7461 * condate.y: New file.
7462 * tree-match.h (struct patt_info_s): New field sign.
7463 (struct condate_s): New field msg.
7464 (normalize_condate, name_condate, add_condate): New.
7465 (conds[], condate_parse): Made extern.
7466 * tree-check.c (tree_check_warning): First arg changed to cond;
7467 warning reformatted.
7468 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
7470 (tree_check): Process trivial condates.
7471 (read_delimited_string): Removed.
7472 (print_cond): Print name and msg.
7473 (conds[]): Made extern.
7474 (parse_tree_check_file_once): Rewritten to use the parser in
7476 Processing of option --tree_check_string moved to tree_scan().
7477 * Makefile.in: Added condate.y
7479 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
7481 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
7482 Use VECs instead of varrays.
7483 * diagnostic.h (lazy_dump_generic_node): Update declaration.
7484 * Makefile.in (pretty-print.o): Depend on vec.h.
7485 * pretty-print.c: Include tree.h and vec.h.
7486 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
7487 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
7488 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
7489 pp_free_list): Use VECs instead of varrays.
7490 * pretty-print.h: Do not include varray.h.
7491 (struct tree_chunk_s): Declaration moved before its use.
7492 (output_buffer): Rename varray field to chunks.
7493 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
7494 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
7495 save_global_holes): Use VECs instead of varrays.
7496 * tree-match.h: Declare VECs of cfg_node, and hole_p.
7497 * tree-check.c (scan_cfg_stmts, push_node,
7498 print_matching_stmt): Removed.
7499 (tree_check_instance, push_global_holes_if_new, tree_check,
7500 execute_tree_check): Use VECs instead of varrays.
7501 (gate_tree_check): Don't execute the CFG check when basic_block_info
7504 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7506 * Merge from mainline (r115016:120733).
7508 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7510 * Merge from mainline (r117632:117661).
7512 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7514 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
7515 * tree-pass.h (TDF_DEBUG, debug_p): New.
7516 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
7517 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
7518 get_loop_exit_condition, analyze_evolution_in_loop,
7519 analyze_initial_condition, analyze_scalar_evolution,
7520 instantiate_parameters, number_of_latch_executions): Use debug_p.
7521 * tree-chrec.c (chrec_apply): Use debug_p.
7522 * tree-data-ref.c: Include graphite.h.
7523 (dump_data_reference): Print also the access matrix.
7524 (analyze_array, analyze_indirect_ref, init_data_ref,
7525 analyze_offset_expr, address_analysis, object_analysis,
7526 create_data_ref, finalize_ddr_dependent,
7527 non_affine_dependence_relation, analyze_ziv_subscript,
7528 analyze_siv_subscript_cst_affine,
7529 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
7530 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
7531 analyze_miv_subscript, analyze_overlapping_iterations,
7532 build_classic_dist_vector, subscript_dependence_tester,
7533 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
7534 (build_access_matrix_with_af): No longer static.
7535 * tree-data-ref.h (scop_p): ... declaration here.
7536 (data_reference.scop): New field.
7537 (DR_SCOP, DR_ACCESS_MATRIX): New.
7538 (build_access_matrix_with_af, dr_num_subscripts): Declared.
7539 * graphite.c (print_graphite_bb): Call dump_data_references.
7540 (print_scop): Use scop_nb_loops and scop_dim_domain.
7541 (test_for_scop_bound): Use debug_p.
7542 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
7544 (scop_loop_index): Moved...
7545 (scop_record_loop): New.
7546 (build_scop_loop_nests): Use scop_record_loop.
7547 (build_scop_domain): Use scop_dim_domain.
7548 (build_access_matrix): Implemented.
7549 (build_scop_canonical_schedules): Use scop_nb_loops.
7550 (build_graphite_bb): Initialize GBB_SCOP.
7551 * graphite.h (scop_p): Moved...
7552 (graphite_bb.scop): New field.
7553 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
7554 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
7555 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
7556 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
7557 scop_loop_index): New.
7558 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
7560 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
7562 * Merge from mainline (r117661:120450).
7564 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
7566 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
7567 at the first declaration outside the varying loop, instantiate as
7569 * tree-chrec.c (for_each_scev_op): New.
7570 * tree-chrec.h (for_each_scev_op): Declared.
7571 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
7572 * tree-data-ref.c (get_references_in_stmt,
7573 find_data_references_in_stmt): New, from trunk.
7574 (find_data_references_in_loop): Use get_references_in_stmt
7575 and find_data_references_in_loop, modified as in trunk.
7576 (build_access_matrix_with_af): New.
7577 * tree-data-ref.h (data_reference): Add a field access_matrix.
7578 (data_ref_loc): New, as in trunk.
7579 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
7580 invariant_in_scop_p, param_index, scan_tree_for_params,
7581 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
7582 idx_record_param, idx_record_params, build_access_matrix,
7583 build_scop_data_accesses, build_scop_canonical_schedules,
7584 build_graphite_bb, build_scop_bbs, find_params_in_bb,
7585 build_scop_params): New.
7586 * graphite.h (graphite_bb): New.
7587 (scop): Add fields static_schedule, params, loop_nest,
7589 * lambda.h: Declare vecs of lambda_matrix.
7590 * tree-flow.h (print_loop_ir_bb): Declared.
7591 * tree-cfg.c (print_loop_ir_bb): New.
7592 (print_loop): Use print_loop_ir_bb.
7594 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
7596 * Merge from mainline (r115016:117632).
7598 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
7600 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
7601 break due to a warning.
7603 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
7605 * graphite.c (print_scops, debug_scops): New.
7606 (graphite_transform): Renamed graphite_find_transform.
7607 * graphite.h (debug_scops): Declared.
7609 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
7611 * tree-match.c: Reformat following the GNU style.
7612 * tree-match.h: Reformat following the GNU style.
7613 * tree-pattern.h: Removed empty file.
7614 * Makefile.in: Remove references to tree-pattern.h.
7615 * tree-check.c: Reformat following the GNU style.
7616 (execute_tree_check): Move gate condition code to...
7617 (gate_tree_check): ...here. New function.
7618 (pass_check): Use the gate function.
7620 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
7622 * tree-pattern.h: New. Tree pattern matching and checking using
7624 * tree-check.c: New. Tree/CFG checking pass.
7625 * tree-match.c: New. Library for tree pattern matching.
7626 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
7627 * toplev.c, flags.h: Add globals for tree-check pass.
7628 * Makefile.in: Integrate the files in tree-check pass.
7629 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
7630 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
7631 Introduce a "lazy" pretty-print mode.
7632 * tree.c, tree.h: Add tree_name.
7634 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
7636 * doc/invoke.texi (-fgraphite): Correct typo.
7637 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
7638 use of print_loop_ir.
7639 * gcc.dg/graphite/scop-1.c: New.
7640 * gcc.dg/graphite/scop-2.c: New.
7641 * gcc.dg/graphite/graphite.exp: New.
7642 * graphite.c: Include domwalk.h.
7643 (print_scop): Print only the entry and exit blocks.
7644 (debug_scop): No longer static.
7645 (affine_expr): Fix formating. Return also true when the expression is
7647 (stmt_simple_for_scop_p): Fix formating.
7648 (build_scops): Use domwalk.
7649 (get_loop_start, end_scop, test_for_scop_bound): New.
7650 (graphite_transform_loops): Avoid printing on stderr.
7651 * graphite.h (debug_scop): Declared.
7652 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
7653 * Makefile.in (graphite.o): Depend on domwalk.h.
7654 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
7655 declarations for static functions.
7656 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
7657 controlling output verbosity.
7659 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
7660 Plesco Alexandru <shurikx@gmail.com>
7662 * doc/invoke.texi (-fgraphite): Document.
7663 * tree-pass.h (pass_graphite_transforms): Declared.
7664 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
7665 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
7666 (pass_graphite_transforms): Defined.
7667 * tree-data-ref.c (free_data_ref, data_reference): Extern.
7668 * tree-data-ref.h (free_data_ref, data_reference): Declared.
7669 * graphite.c, graphite.h: New.
7670 * common.opt (fgraphite): Declared.
7671 * tree-flow.h (graphite_transform_loops): Declared.
7672 * Makefile.in (OBJS-common): Add graphite.o.
7673 (graphite.o): New rule.
7674 * passes.c (pass_graphite_transforms): Scheduled.