1 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-dependences.c (dot_deps): Make system call to dotty run
6 * graphite-poly.c (dot_lst): Same.
8 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
10 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
11 old_type in parameter.
12 (gcc_type_for_value): Update call to gcc_type_for_interval.
13 (compute_type_for_level_1): Renamed compute_type_for_level.
14 Update call to gcc_type_for_interval.
16 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
18 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
19 the scev analysis when the variable is not used outside the loop
20 in a close phi node: call compute_overall_effect_of_inner_loop.
22 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
24 * graphite-sese-to-poly.c (single_pred_cond): Renamed
25 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
26 (build_sese_conditions_before): Renamed call to single_pred_cond.
27 (build_sese_conditions_after): Same.
29 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
31 * graphite-poly.h: Fix comments and indentation.
32 * graphite-sese-to-poly.c: Same.
33 (build_sese_conditions_before): Compute stmt and gbb only when needed.
34 * tree-chrec.c: Fix comments and indentation.
35 (tree-ssa-loop-niter.c): Same.
37 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
39 * refined-regions.c (create_region): Only initialize the region.
40 (find_regions_with_entry): Initialize parent relation and bbmap
42 (build_regions_tree): Set outermost_region to region instead of
44 (calculate_region_tree): Remove unneeded parameters.
46 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
48 * graphite-scop-detection.c (is_scop_p): New.
49 (build_scops_new): New. A skeleton for the new scop detection.
50 (build_scops_old): Renamed from build_scops.
51 (build_scops): New version. Call the new and the old scop
54 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
55 Antoniu Pop <antoniu.pop@gmail.com>
57 * Makefile.in (OBJS-common): Add refined-regions.o.
58 (refined-regions.o): New.
59 (graphite-scop-detection.o): Use refined-regions.h.
60 * graphite-scop-detection.c: Include refined-regions.h
61 (build_scops): Also build the refined region tree.
62 * refined-regions.c: New. Adds an algorithm to detect refined
64 (print_refined_region): New.
65 (debug_refined_region): New.
66 (refined_region_contains_bb_p): New.
67 (refined_region_contains_region_p): New.
69 (struct find_regions_global_data): New.
71 (typedef struct bb_bb_def): New.
73 (bb_bb_map_hash): New.
77 (new_bb_reg_def): New.
78 (bb_reg_map_hash): New.
80 (find_new_region): New.
81 (insert_new_reg): New.
83 (insert_shortcut): New.
84 (get_next_postdom): New.
86 (find_regions_with_entry): New.
87 (find_regions_adc): New.
89 (get_topmost_parent): New.
90 (build_regions_tree): New.
91 (calculate_region_tree): New.
92 (free_region_tree): New.
93 * refined-regions.h: New.
94 (struct refined_region): New.
95 (calculate_region_tree): New.
96 (free_region_tree): New.
97 (refined_region_contains_bb_p): New.
98 (refined_region_contains_region_p): New.
99 (print_refined_region): New.
100 (debug_refined_region): New.
102 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
104 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
107 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
109 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
110 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
112 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
114 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
115 phi_arg_in_outermost_loop.
116 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
117 (remove_invariant_phi): Same.
119 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
121 * graphite-blocking.c
122 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
123 * graphite-clast-to-gimple.c
124 (clast_to_gcc_expression): Same.
125 (precision_for_value): Same.
126 (precision_for_interval): Same.
127 (gcc_type_for_interval): Same.
128 (graphite_create_new_guard): Same.
129 (compute_bounds_for_level): Same.
130 (graphite_create_new_loop_guard): Same.
131 * graphite-interchange.c
132 (build_linearized_memory_access): Same.
133 (pdr_stride_in_loop): Same.
134 (memory_strides_in_loop_1): Same.
135 (memory_strides_in_loop): Same.
136 (extend_scattering): Same.
137 (psct_scattering_dim_for_loop_depth): Same.
138 (pbb_number_of_iterations): Same.
140 (debug_iteration_domains): Same.
142 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
143 (ppl_set_inhomogeneous_gmp): Same.
144 (ppl_strip_loop): Same.
145 (ppl_lexico_compare_linear_expressions): Same.
146 (ppl_read_polyhedron_matrix): Same.
147 (ppl_max_for_le_pointset): Same.
149 (ppl_read_polyhedron_matrix): Same.
150 (tree_int_to_gmp): Same.
151 (gmp_cst_to_tree): Same.
152 (ppl_set_inhomogeneous): Same.
153 (ppl_set_inhomogeneous_tree): Same.
154 (ppl_set_coef): Same.
155 (ppl_set_coef_tree): Same.
156 * graphite-sese-to-poly.c
157 (build_pbb_scattering_polyhedrons): Same.
158 (build_scop_scattering): Same.
159 (scan_tree_for_params_right_scev): Same.
160 (scan_tree_for_params): Same.
161 (find_params_in_bb): Same.
162 (find_scop_parameters): Same.
163 (add_upper_bounds_from_estimated_nit): Same.
164 (build_loop_iteration_domains): Same.
165 (add_condition_to_domain): Same.
166 (pdr_add_memory_accesses): Same.
168 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
170 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
171 CLooG's value_* macros to their respective mpz_* counterparts.
172 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
173 (graphite_create_new_loop_guard): Same.
174 * graphite-interchange.c (build_linearized_memory_access): Same.
175 (pdr_stride_in_loop): Same.
176 (memory_strides_in_loop_1): Same.
177 (1st_interchange_profitable_p): Same.
178 * graphite-poly.c (extend_scattering): Same.
179 (psct_scattering_dim_for_loop_depth): Same.
180 (pbb_number_of_iterations): Same.
181 (pbb_number_of_iterations_at_time): Same.
182 * graphite-poly.h (new_1st_loop): Same.
183 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
184 (oppose_constraint): Same.
185 (insert_constraint_into_matrix): Same.
186 (ppl_set_inhomogeneous_gmp): Same.
187 (ppl_set_coef_gmp): Same.
188 (ppl_strip_loop): Same.
189 (ppl_lexico_compare_linear_expressions): Same.
190 (ppl_max_for_le_pointset): Same.
191 (ppl_min_for_le_pointset): Same.
192 (ppl_build_realtion): Same.
193 * graphite-ppl.h (gmp_cst_to_tree): Same.
194 (ppl_set_inhomogeneous): Same.
195 (ppl_set_inhomogeneous_tree): Same.
196 (ppl_set_coef): Same.
197 (ppl_set_coef_tree): Same.
198 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
199 (build_scop_scattering): Same.
200 (add_value_to_dim): Same.
201 (scan_tree_for_params_right_scev): Same.
202 (scan_tree_for_params_int): Same.
203 (scan_tree_for_params): Same.
204 (find_params_in_bb): Same.
205 (find_scop_parameters): Same.
206 (add_upper_bounds_from_estimated_nit): Same.
207 (build_loop_iteration_domains): Same.
208 (create_linear_expr_from_tree): Same.
209 (add_condition_to_domain): Same.
210 (pdr_add_memory_accesses): Same.
212 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
215 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
216 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
217 When converting an unsigned type to signed, double its precision.
218 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
219 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
220 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
222 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
225 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
226 build_nonstandard_integer_type.
227 (gcc_type_for_interval): Same.
229 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
232 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
233 POINTER_PLUS_EXPR for pointer types.
235 * gcc.dg/graphite/id-19.c: New.
237 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
240 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
241 * graphite-clast-to-gimple.c: Include langhooks.h.
242 (max_signed_precision_type): New.
243 (max_precision_type): Takes two types as arguments.
244 (precision_for_value): New.
245 (precision_for_interval): New.
246 (gcc_type_for_interval): New.
247 (gcc_type_for_value): New.
248 (gcc_type_for_clast_term): New.
249 (gcc_type_for_clast_red): New.
250 (gcc_type_for_clast_bin): New.
251 (gcc_type_for_clast_expr): Split up into several functions.
252 (gcc_type_for_clast_eq): Rewritten.
253 (compute_bounds_for_level): New.
254 (compute_type_for_level_1): New.
255 (compute_type_for_level): New.
256 (gcc_type_for_cloog_iv): Removed.
257 (gcc_type_for_iv_of_clast_loop): Rewritten.
258 (graphite_create_new_loop): Compute the lower and upper bound types
259 with gcc_type_for_clast_expr.
260 (graphite_create_new_loop_guard): Same.
261 (find_cloog_iv_in_expr): Removed.
262 (compute_cloog_iv_types_1): Removed.
263 (compute_cloog_iv_types): Removed.
264 (gloog): Do not call compute_cloog_iv_types.
265 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
267 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
268 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
269 (GBB_CLOOG_IV_TYPES): Removed.
271 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
273 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
275 Reverted this commit: as at this point the loop closed SSA form
276 is under a canonical form respecting the single argument condition.
277 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
278 close phi nodes may have more than one argument.
280 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
282 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
283 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
284 (detect_commutative_reduction): Same.
286 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
288 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
289 close phi nodes may have more than one argument.
291 2010-03-30 Richard Guenther <rguenther@suse.de>
292 Zdenek Dvorak <ook@ucw.cz>
293 Sebastian Pop <sebastian.pop@amd.com>
296 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
297 with multiple arguments.
298 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
300 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
302 * graphite-dependences.c (print_pddr): Call print_pdr with an
304 * graphite-poly.c (debug_pdr): Add an extra argument for the
307 (print_pbb_domain): Same.
309 (print_scop_context): Same.
312 (debug_pbb_domain): Same.
316 (debug_scop_context): Same.
319 (print_scop_params): Same.
320 (debug_scop_params): Same.
321 (print_iteration_domain): Same.
322 (print_iteration_domains): Same.
323 (debug_iteration_domain): Same.
324 (debug_iteration_domains): Same.
325 (print_scattering_function): Same.
326 (print_scattering_functions): Same.
327 (debug_scattering_function): Same.
328 (debug_scattering_functions): Same.
329 * graphite-poly.h (debug_pdr): Update declaration.
331 (print_pbb_domain): Same.
333 (print_scop_context): Same.
336 (debug_pbb_domain): Same.
340 (debug_scop_context): Same.
343 (print_scop_params): Same.
344 (debug_scop_params): Same.
345 (print_iteration_domain): Same.
346 (print_iteration_domains): Same.
347 (debug_iteration_domain): Same.
348 (debug_iteration_domains): Same.
349 (print_scattering_function): Same.
350 (print_scattering_functions): Same.
351 (debug_scattering_function): Same.
352 (debug_scattering_functions): Same.
354 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
356 * graphite-poly.c (print_scattering_function_1): New.
357 (print_scattering_function): Call it.
358 (print_scop_params): Remove spaces at the end of lines.
361 * graphite-poly.h (print_cloog): Declared.
362 (debug_cloog): Declared.
364 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
366 * tree-ssa-copy.c: Revert this previous change:
367 (init_copy_prop): Loop closed phi nodes cancontain more than one
369 (execute_copy_prop): Revert the previous change: do not call
370 rewrite_into_loop_closed_ssa.
372 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
373 Richard Guenther <rguenther@suse.de>
376 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
377 contain more than one argument.
378 (execute_copy_prop): Revert the previous change: do not call
379 rewrite_into_loop_closed_ssa.
381 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
382 * gcc.dg/graphite/id-pr43464-1.c: New.
384 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
387 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
388 and verify_loop_closed_ssa when copy prop is executed in the LNO.
390 * gcc.dg/graphite/id-pr43464.c: New.
392 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
394 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
396 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
397 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
398 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
399 to switch between adding the IV bump in loop->latch or in loop->header.
401 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
403 * passes.c (init_optimization_passes): Add pass_copy_prop
406 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
408 * graphite-poly.c (print_scattering_function): Pretty print following
411 (print_pbb_domain): Same.
412 (dump_gbb_cases): Same.
413 (dump_gbb_conditions): Same.
416 (print_scop_params): Same.
417 (print_scop_context): Same.
419 (print_pbb_body): New.
420 (lst_indent_to): New.
421 (print_lst): Start new lines with a #.
422 * graphite-poly.h (pbb_bb): New.
423 (pbb_index): Use pbb_bb.
424 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
426 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
428 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
431 * gcc.dg/graphite/id-pr43351.c
433 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
436 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
437 call insert_out_of_ssa_copy for default definitions.
438 * gfortran.dg/graphite/id-pr43354.f: New.
440 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
443 * gfortran.dg/graphite/pr43349.f: New.
445 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
447 * graphite-clast-to-gimple.c (my_long_long): Defined.
448 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
449 * graphite-sese-to-poly.c (my_long_long): Defined.
450 (scop_ivs_can_be_represented): Use it.
452 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
454 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
455 graphite-max-bbs-per-function, and loop-block-tile-size.
456 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
458 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
460 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
462 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
464 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
465 (add_upper_bounds_from_estimated_nit): New.
466 (build_loop_iteration_domains): Use it.
468 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
470 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
472 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
475 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
476 should be an INTEGER_CST. Also handle CASE_CONVERT.
477 * gcc.dg/graphite/pr43306.c: New.
479 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
481 * graphite.c (graphite_initialize): To bound the number of bbs per
482 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
483 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
484 * doc/invoke.texi: Document it.
486 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
488 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
489 * graphite-sese-to-poly.h (build_poly_scop): Same.
491 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
493 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
494 the number of parameters in the scop. Use as an upper bound
495 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
496 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
497 * doc/invoke.texi: Document it.
499 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
501 * graphite-sese-to-poly.c (add_param_constraints): Use
502 lower_bound_in_type and upper_bound_in_type.
504 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
506 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
507 instead of unsigned_type_node.
509 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
510 Reza Yazdani <reza.yazdani@amd.com>
513 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
514 on pointer type parameters.
516 * gcc.dg/graphite/run-id-4.c: New.
518 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
521 * gcc.dg/graphite/run-id-3.c: New.
523 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
524 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
526 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
527 handle conversions from pointer to integers.
528 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
529 induction variable, to be able to work with code generated by CLooG.
530 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
531 (build_poly_scop): Bail out if we cannot codegen a loop.
533 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
535 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
536 code generation with gloog_error.
538 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
540 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
541 Call fold_convert on all the returned values.
542 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
543 the type of the resulting expression.
545 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
547 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
548 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
549 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
551 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
553 * graphite-dependences.c (map_into_dep_poly): Removed.
554 (dependence_polyhedron_1): Use combine_context_id_scat.
556 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
558 * graphite-poly.h (struct poly_scattering): Add layout documentation.
559 (struct poly_bb): Same.
560 (combine_context_id_scat): New.
562 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
565 * sese.c (name_defined_in_loop_p): Return false for default
568 * gcc.dg/graphite/pr42326.c: New.
570 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
572 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
573 and clean up the logic.
575 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
577 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
580 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
583 * graphite-scop-detection.c (create_single_exit_edge): Move
584 the call to find_single_exit_edge to....
585 (create_sese_edges): ...here. Don't handle multiple edges
586 exiting the function.
587 (build_graphite_scops): Don't handle multiple edges
588 exiting the function.
590 * gcc.dg/graphite/pr43083.c: New.
592 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
595 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
596 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
598 * gfortran.dg/graphite/pr43097.f: New.
600 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
601 Manuel López-Ibáñez <manu@gcc.gnu.org>
604 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
606 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
609 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
611 * g++.dg/graphite/pr43026.C: New.
613 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
615 * Merge from mainline (154736:156693).
617 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
620 * gcc.dg/graphite/pr43012.c: New.
622 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
624 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
625 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
627 * g++.dg/graphite/pr42930.C: New.
629 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
632 * graphite-scop-detection.c (graphite_can_represent_scev): Call
633 graphite_can_represent_init for MULT_EXPR.
635 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
639 * graphite-sese-to-poly.c (remove_phi): New.
640 (translate_scalar_reduction_to_array): Call remove_phi.
642 * gcc.dg/graphite/pr42530.c: New.
643 * gcc.dg/graphite/pr42914.c: New.
645 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
648 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
649 * graphite-clast-to-gimple.h (gloog): Update declaration.
650 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
651 * graphite-poly.h (struct poly_bb): Add missing comments.
652 (struct scop): Add poly_scop_p field.
654 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
655 * graphite.c (graphite_transform_loops): Build the polyhedral
656 representation for each scop before code generation.
657 * sese.c (rename_variables_in_operand): Removed.
658 (rename_variables_in_expr): Return the renamed expression.
659 (rename_sese_parameters): New.
660 * sese.h (rename_sese_parameters): Declared.
662 * gcc.dg/graphite/pr42771.c: New.
664 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
666 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
668 * gcc.dg/graphite/block-1.c: Same.
669 * gcc.dg/graphite/block-3.c: Same.
670 * gcc.dg/graphite/block-4.c: Same.
671 * gcc.dg/graphite/block-5.c: Same.
672 * gcc.dg/graphite/block-6.c: Same.
673 * gcc.dg/graphite/block-7.c: Same.
674 * gcc.dg/graphite/interchange-0.c: Same.
675 * gcc.dg/graphite/interchange-1.c: Same.
676 * gcc.dg/graphite/interchange-10.c: Same.
677 * gcc.dg/graphite/interchange-11.c: Same.
678 * gcc.dg/graphite/interchange-12.c: Same.
679 * gcc.dg/graphite/interchange-2.c: Same.
680 * gcc.dg/graphite/interchange-3.c: Same.
681 * gcc.dg/graphite/interchange-4.c: Same.
682 * gcc.dg/graphite/interchange-5.c: Same.
683 * gcc.dg/graphite/interchange-6.c: Same.
684 * gcc.dg/graphite/interchange-7.c: Same.
685 * gcc.dg/graphite/interchange-8.c: Same.
686 * gcc.dg/graphite/interchange-9.c: Same.
687 * gcc.dg/graphite/interchange-mvt.c: Same.
689 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
691 * gfortran.dg/graphite/id-19.f: New.
692 * gfortran.dg/graphite/pr14741.f90: New.
693 * gfortran.dg/graphite/pr41924.f90: New.
694 * gfortran.dg/graphite/run-id-2.f90: New.
696 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
699 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
700 to unknown_dependence.
701 (graphite_legal_transform_dr): Handle the unknown_dependence.
702 (graphite_carried_dependence_level_k): Same.
704 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
706 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
708 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
709 Konrad Trifunovic <konrad.trifunovic@inria.fr>
712 * graphite-dependences.c (build_lexicographical_constraint): Return
713 a union of dependence polyhedra.
714 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
716 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
717 * gcc.dg/graphite/block-4.c: Same.
718 * gcc.dg/graphite/block-7.c: Same.
719 * gcc.dg/graphite/interchange-12.c: Same.
720 * gcc.dg/graphite/interchange-mvt.c: Same.
721 * gfortran.dg/graphite/interchange-1.f: XFAILed.
722 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
723 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
725 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
727 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
728 the execution check to FAIL. This testcase is miscompiled by Graphite
729 and the check should be re-enabled.
730 * gcc.dg/graphite/interchange-mvt.c: Same.
731 * gcc.dg/graphite/block-0.c: Same.
732 * gcc.dg/graphite/block-4.c: Same.
733 * gcc.dg/graphite/block-7.c: Same.
735 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
737 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
738 * gcc.dg/graphite/scop-0.c: Fix spaces.
739 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
740 * gfortran.dg/graphite/block-2.f: Same.
741 * gfortran.dg/graphite/block-3.f90: Same.
742 * gfortran.dg/graphite/block-4.f90: Same.
743 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
744 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
746 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
748 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
749 PDDR_ORIGINAL_SCATTERING_P.
750 (pddr_is_empty): Rewritten.
751 (print_dependence_polyhedron_layout): New.
754 (build_alias_set_powerset): Moved up.
755 (poly_drs_may_alias_p): Moved up.
756 (lexicographically_gt_p): Removed.
757 (build_lexicographically_gt_constraint): Renamed
758 build_lexicographical_constraint, reimplemented.
759 (dependence_polyhedron_1): Simplified parameters.
760 (dependence_polyhedron): Same. Keep along empty PDDRs
761 to make efficient use of the cache.
762 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
763 (graphite_legal_transform_dr): Rewritten.
764 (graphite_legal_transform_bb): Pass fewer arguments to
765 graphite_legal_transform_dr.
766 (graphite_carried_dependence_level_k): Simplified implementation.
767 (dot_original_deps_stmt_1): Call dependence_polyhedron.
768 (dot_transformed_deps_stmt_1): Same.
769 (dot_original_deps): Same.
770 (dot_transformed_deps): Same.
771 * graphite-dependences.h (struct poly_ddr): Added a new field
772 original_scattering_p.
773 (PDDR_ORIGINAL_SCATTERING_P): New.
774 (print_pddr): Declared.
775 (debug_pddr): Declared.
776 * graphite-ppl.c: Clarify comment.
777 * sese.h (print_gimple_bb): Removed unused declaration.
780 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
782 * g++.dg/graphite/graphite.exp: Rewritten.
783 * gcc.dg/graphite/graphite.exp: Rewritten.
784 * gfortran.dg/graphite/graphite.exp: Rewritten.
785 * gcc.dg/graphite/block-0.c: Added runtime test.
786 * gcc.dg/graphite/block-1.c: Same.
787 * gcc.dg/graphite/block-3.c: Same.
788 * gcc.dg/graphite/block-4.c: Same.
789 * gcc.dg/graphite/block-5.c: Same.
790 * gcc.dg/graphite/block-6.c: Same.
791 * gcc.dg/graphite/block-7.c: Same.
792 * gcc.dg/graphite/interchange-0.c: Same.
793 * gcc.dg/graphite/interchange-1.c: Same.
794 * gcc.dg/graphite/interchange-10.c: Same.
795 * gcc.dg/graphite/interchange-11.c: Same.
796 * gcc.dg/graphite/interchange-12.c: Same.
797 * gcc.dg/graphite/interchange-2.c: Same.
798 * gcc.dg/graphite/interchange-3.c: Same.
799 * gcc.dg/graphite/interchange-4.c: Same.
800 * gcc.dg/graphite/interchange-5.c: Same.
801 * gcc.dg/graphite/interchange-6.c: Same.
802 * gcc.dg/graphite/interchange-7.c: Same.
803 * gcc.dg/graphite/interchange-8.c: Same.
804 * gcc.dg/graphite/interchange-9.c: Same.
805 * gcc.dg/graphite/interchange-mvt.c: Same.
806 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
808 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
810 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
813 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
815 * common.opt: Add -fgraphite-cloog-opts.
816 * graphite-clast-to-gimple.c (set_cloog_options): Same.
817 * opts.c (decode_options): Same.
819 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
821 * gcc.dg/graphite/id-17.c: New.
822 * gcc.dg/graphite/pr41888.c: New.
823 * gcc.dg/graphite/scop-22.c: New.
824 * gfortran.dg/graphite/pr40982.f90: New.
826 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
828 * graphite-dependences.c: Clarify comments.
829 (build_pddr): Add an extra parameter direction.
830 (graphite_legal_transform_dr): Use build_pddr.
831 (dot_original_deps_stmt_1): Update use of build_pddr.
832 (dot_transformed_deps_stmt_1): Same.
833 (dot_original_deps): Same.
834 (dot_transformed_deps): Same.
836 * gcc.dg/graphite/interchange-12.c: New.
837 * gcc.dg/graphite/block-7.c: New.
839 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
841 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
842 (pddr_transformed_scattering): Removed.
843 (graphite_legal_transform_dr): Use build_pddr.
844 (dot_original_deps_stmt_1): Same.
845 (dot_transformed_deps_stmt_1): Same.
846 (dot_original_deps): Same.
847 (dot_transformed_deps): Same.
849 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
851 * graphite-dependences.c (lexicographically_gt_p): Add comments.
852 (build_lexicographically_gt_constraint): Same.
853 (dependence_polyhedron_1): Same.
854 (dependence_polyhedron): Same.
856 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
858 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
859 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
860 (lexicographically_gt_p): Change type of direction to int.
861 (build_lexicographically_gt_constraint): Same.
862 (dependence_polyhedron_1): Same.
863 (dependence_polyhedron): Same.
864 (pddr_original_scattering): Use integers for direction.
865 (pddr_transformed_scattering): Same.
866 (graphite_legal_transform_dr): Same.
867 (graphite_carried_dependence_level_k): Same.
869 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
871 * graphite-dependences.c (build_pairwise_constraint): Renamed
872 ppl_build_relation. Moved...
873 (dr_equality_constraints): Use ppl_build_relation.
874 (build_pairwise_scheduling_equality): Same.
875 (build_pairwise_scheduling_inequality): Same.
876 * graphite-ppl.c (ppl_build_relation): ...here.
877 * graphite-ppl.h (ppl_build_relation): Declared.
879 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
882 * graphite-clast-to-gimple.c (gloog_error): New static variable.
883 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
884 Set gloog_error when such an expression failed to be built.
885 (translate_clast): Early return when gloog_error is set.
886 (gloog): Clear gloog_error. When gloog_error is set, call
887 set_ifsese_condition to enable the original code. Return the status
888 of the code generation based on gloog_error.
889 * sese.c (set_ifsese_condition): New.
890 * sese.h (set_ifsese_condition): Declared.
892 * g++.dg/graphite/pr42681.C: New.
894 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
897 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
898 rename_nb_iterations.
899 * sese.c (rename_variables_in_operand): New.
900 (rename_variables_in_expr): New.
901 (rename_nb_iterations): New.
902 (sese_adjust_liveout_phis): Update the rename_map.
903 * sese.h (rename_nb_iterations): Declared.
904 * tree-scalar-evolution.c (scev_reset_htab): New.
905 (scev_reset): Call scev_reset_htab.
906 * tree-scalar-evolution.h (scev_reset_htab): Declared.
908 * gfortran.dg/graphite/pr42732.f: New.
910 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
913 * graphite-clast-to-gimple.c: Fix formatting.
914 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
915 (expr_defined_in_loop_p): New.
916 (add_loop_exit_phis): Also handle full expressions: remove from
917 the rename_map the expressions defined in the loop that we're closing.
919 * gfortran.dg/graphite/pr42393-1.f90: New.
920 * gfortran.dg/graphite/pr42393.f90: Add new flags
921 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
922 make this testcase useful in the Graphite branch.
924 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
926 * graphite-scop-detection.c (exclude_component_ref): Removed.
927 (is_simple_operand): Removed.
928 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
930 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
933 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
934 the array indexing of ADDR_EXPRs.
936 * gcc.dg/graphite/pr42221.c: New.
938 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
941 * graphite.c (graphite_finalize): Call scev_reset.
942 (graphite_transform_loops): Do not call scev_reset between the code
945 * gcc.dg/graphite/pr42521.c: New.
947 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
949 * graphite-interchange.c (memory_stride_in_loop): Renamed
951 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
952 (memory_strides_in_loop): Memoize the memory strides per loop.
953 (lst_interchange_profitable_p): Do not initialize to zero the memory
955 * graphite-poly.h (struct lst): Add a field memory_strides.
956 (LST_LOOP_MEMORY_STRIDES): New.
957 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
958 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
960 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
962 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
963 memory_strides_in_loop. Gather memory strides on a whole loop.
964 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
965 (lst_interchange_profitable_p): Removed.
966 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
968 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
970 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
971 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
972 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
973 Remove context_loop and level.
975 2010-01-07 Richard Guenther <rguenther@suse.de>
977 PR tree-optimization/42641
978 * sese.c (rename_map_elt_info): Use the SSA name version, do
981 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
983 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
984 blocked" only when both the strip mine and the interchange have
987 * gcc.dg/graphite/block-2.c: Removed.
988 * gcc.dg/graphite/block-3.c: Add scan pattern.
989 * gcc.dg/graphite/block-4.c: Same.
990 * gcc.dg/graphite/block-5.c: Same.
991 * gcc.dg/graphite/block-6.c: Same.
993 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
995 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
996 before allocating a new one.
997 (copy_renames): Check that slot is not NULL.
998 (mark_bb_with_pbb): Same.
999 (compute_cloog_iv_types_1): Same.
1000 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1001 nest, and after LSTs.
1002 (lst_try_interchange_loops): Same.
1004 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1007 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1008 the before, nest, and after LSTs.
1009 (lst_try_interchange): Removed.
1010 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1012 (lst_interchange_select_outer): Apply interchange on the outer loop
1013 until there are no more changes in the inner loops.
1015 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1017 Revert patch fixing PR middle-end/42221.
1019 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1022 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1025 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1027 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1030 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1031 that contain only one statement.
1033 * gfortran.dg/graphite/pr42180.f90: New.
1035 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1038 * gfortran.dg/graphite/pr42393.f90: New.
1040 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1043 * gfortran.dg/graphite/pr42186.f90: New.
1045 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1048 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1049 Insert the reduction copy in the same block as the phi node.
1050 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1052 * gcc.dg/graphite/pr42205-1.c: New.
1053 * gcc.dg/graphite/pr42205-2.c: New.
1055 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1058 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1059 the array indexing of ADDR_EXPRs.
1061 * gcc.dg/graphite/pr42221.c: New.
1063 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1067 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1068 index. Call lst_interchange_select_inner only once.
1069 (lst_interchange_select_inner): Update use of lst_try_interchange.
1070 (lst_interchange_select_outer): Update.
1072 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1076 * graphite-interchange.c (lst_try_interchange): Do not increment the
1077 the OUTER index when there is no AFTER kernel. Do not increment the
1078 OUTER index for after processing the AFTER kernel.
1079 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1080 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1081 index. Do not pass to lst_interchange_select_inner the OUTER index.
1082 (scop_do_interchange): Update use of lst_interchange_select_outer.
1084 * gfortran.dg/graphite/graphite.exp
1085 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1086 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
1087 the graphite dump file.
1088 * gfortran.dg/graphite/interchange-2.f: Same.
1089 * gfortran.dg/graphite/pr42334-1.f: New.
1091 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1095 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1097 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1098 (lst_try_interchange): Reimplemented.
1099 (lst_interchange_select_inner): Same.
1100 (lst_do_interchange): Renamed lst_interchange_select_outer.
1102 (scop_do_interchange): Update use of lst_interchange_select_outer.
1104 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1105 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1106 * gcc.dg/graphite/pr42211.c: New.
1107 * gfortran.dg/graphite/pr42334.f90: New.
1109 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1112 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1113 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1115 * gfortran.dg/graphite/pr42181.f90: New.
1117 2009-12-12 Sebastian Pop <sebpop@gmail.com>
1120 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1121 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1122 (detect_commutative_reduction_arg): Simplified.
1123 (detect_commutative_reduction): Early return when the argument of
1124 the close phi is not of an SSA_NAME.
1126 * gcc.dg/graphite/pr42284.c: New.
1128 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
1130 * dbgcnt.def (graphite_scop): New counter.
1131 * graphite.c: Include dbgcnt.h
1132 (graphite_transform_loops): Use new counter to limit transformations.
1134 2009-12-08 Sebastian Pop <sebpop@gmail.com>
1137 * graphite-scop-detection.c (graphite_can_represent_init): Also
1138 handle more complex MULT_EXPRs containing parameters by recursion
1141 * gfortran.dg/graphite/pr42285.f90: New.
1143 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1145 * g++.dg/graphite/pr42130.C: Fix type.
1147 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1149 * g++.dg/graphite/pr42130.C: Correct testcase.
1151 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1153 * Merge from mainline (154493:154734).
1155 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1157 * Merge from mainline (151362:154491).
1159 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1161 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1162 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1164 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1167 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1168 translate_clast_for_loop): New.
1169 (translate_clast_for): Add a condition around the loop, to do not
1170 execute loops with zero iterations.
1171 * g++.dg/graphite/pr42130.C: New.
1172 * gcc.dg/graphite/pr35356-2.c: Adapt.
1174 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1176 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1177 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1178 Remove context_loop and level.
1180 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1182 * graphite-clast-to-gimple.c (translate_clast_user,
1183 translate_clast_for, translate_clast_guard): Simplify and move common
1184 elements to translate_clast().
1185 (translate_clast): Simplify and get common elements.
1187 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1189 * graphite-clast-to-gimple.c (translate_clast_user,
1190 translate_clast_for, translate_clast_guard): Split out of
1193 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1195 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1196 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1197 debug_clast_name_indexes_1, debug_clast_name_indexes,
1198 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1199 (clast_name_to_gcc, clast_to_gcc_expression,
1200 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1201 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1202 graphite_create_guard_cond_expr, graphite_create_new_loop,
1203 translate_clast): Add params_index.
1204 (initialize_cloog_names): Create parameter strings from scratch, do
1205 not reference other strings.
1206 (create_params_index): New.
1207 (gloog): Initialize params_index.
1208 * graphite-scop-detection (free_scops_1): Removed.
1209 (limit_scops): Use normal free_scops.
1210 * graphite-sese-to-poly.c (save_var_names): Removed.
1211 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1212 and SESE_PARAMS_INDEX.
1213 * sese.c (new_sese, free_sese): Dito.
1214 * sese.h (struct sese): Remove params_index, params_names.
1215 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1217 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1219 Revert the following patch from 2009-09-14:
1220 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1221 tree-scalar-evolution.h, and then tree-data-ref.h.
1222 * graphite-clast-to-gimple.c: Same.
1223 * graphite-dependences.c: Same.
1224 * graphite-interchange.c: Same.
1225 * graphite-poly.c: Same.
1226 * graphite-scop-detection.c: Same.
1227 * graphite-sese-to-poly.c: Same.
1229 * lambda-code.c: Same.
1230 * matrix-reorg.c: Same.
1231 * tree-data-ref.c: Same.
1232 * tree-if-conv.c: Same.
1233 * tree-loop-distribu: Same.: Same.
1234 * tree-loop-linear.c: Same.
1235 * tree-parloops.c: Same.
1236 * tree-predcom.c: Same.
1237 * tree-vect-patterns.c: Same.
1239 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1241 Revert patch from 2009-09-14.
1242 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1243 passes at -O1 and below.
1245 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1248 * gcc.dg/graphite/pr40281.c: New.
1250 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1251 evolutions should not variate in inner loops.
1253 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1256 * gfortran.dg/graphite/pr42050.f90: New.
1258 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1260 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1261 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1263 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1265 * graphite-blocking.c (scop_do_block): New.
1266 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1267 * graphite-poly.h (scop_do_block): Declared.
1269 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1271 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1272 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1273 to transform depth into the time_depth before calling
1274 pbb_number_of_iterations_at_time.
1275 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1278 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1280 Reverted the patch for "scattering permutations" from 2009-10-28.
1282 * graphite-poly.c (print_permutation): New.
1283 (debug_permutation): New.
1284 (new_poly_bb): Initialize PBB_PERMUTATION.
1285 (free_poly_bb): Free PBB_PERMUTATION.
1286 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1287 (struct pbb_permutation_elt): New.
1288 (PBB_PERMUTATION_ELT_STRIDE): New.
1289 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1290 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1291 (new_pbb_permutation_elt): New.
1292 (pbb_permutation_elt_free): New.
1293 (struct poly_bb): Add field permutation.
1294 (PBB_PERMUTATION): New.
1295 (print_permutation): Declared.
1296 (debug_permutation): Declared.
1298 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1300 * graphite-interchange.c (build_partial_difference): New.
1301 (memory_stride_in_loop): Refactored the computation of
1302 equality constraints into build_partial_difference function.
1303 Added support for debugging stride computations.
1305 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1307 * graphite-clast-to-gimple.c (gloog): Free if_region,
1308 if_region->true_region, and if_region->region.
1309 * sese.c (if_region_set_false_region): Free if_region->false_region.
1310 (create_if_region_on_edge): Do not use GGC_NEW.
1311 (move_sese_in_condition): Remove useless initialization.
1313 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
1315 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
1316 for the loops created by the loop distribution. Do not modify the
1318 (lst_try_interchange_loops): Same. Use a temporary LST for the
1319 transformed schedule. Call lst_update_scattering before data
1320 dependence analysis.
1321 (lst_try_interchange): Pass an extra parameter INDEX.
1322 (lst_do_interchange_1): New.
1323 (lst_do_interchange): Call lst_do_interchange_1.
1324 (scop_do_interchange): Call lst_update_scattering.
1325 * graphite-poly.c (apply_poly_transforms): Do not call
1326 lst_update_scattering.
1327 * graphite-poly.h (lst_pred): New.
1329 (lst_find_first_pbb): Return NULL when not found.
1331 (lst_insert_in_sequence): Allow LST1 to be NULL.
1333 (lst_substitute_3): New.
1334 * gcc.dg/graphite/interchange-1.c: XFail.
1335 * gcc.dg/graphite/interchange-8.c: XFail.
1336 * gcc.dg/graphite/interchange-11.c: XFail.
1338 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1340 * graphite-interchange.c (lst_perfectly_nested_p): New.
1341 (lst_perfect_nestify): New.
1342 (lst_try_interchange_loops): Call store_lst_schedule,
1343 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
1344 (scop_do_interchange): Avoid redundant legality test.
1345 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
1346 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
1347 * graphite-poly.h (psct_static_dim): New.
1348 (lst_dewey_number_at_depth): New.
1349 (lst_find_pbb): Restructured.
1350 (lst_find_first_pbb): Restructured.
1351 (lst_find_last_pbb): New.
1352 (lst_contains_p): New.
1353 (lst_contains_pbb): New.
1354 (lst_create_nest): New.
1355 (lst_remove_from_sequence): New.
1356 (pbb_update_scattering): New.
1357 (lst_update_scattering_under): New.
1358 (lst_update_scattering_seq): New.
1359 (lst_update_scattering): New.
1360 (lst_insert_in_sequence): New.
1361 (lst_distribute_lst): New.
1362 (lst_remove_all_before_including_pbb): New.
1363 (lst_remove_all_before_excluding_pbb): New.
1365 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1367 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
1368 get_loop_exit_edges.
1370 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
1372 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
1374 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1376 * graphite-poly.c (print_permutation): New.
1377 (debug_permutation): New.
1378 (new_poly_bb): Initialize PBB_PERMUTATION.
1379 (free_poly_bb): Free PBB_PERMUTATION.
1380 * graphite-poly.h (pbb_permutation_elt_p): Declared.
1381 (struct pbb_permutation_elt): New.
1382 (PBB_PERMUTATION_ELT_STRIDE): New.
1383 (PBB_PERMUTATION_ELT_STRIDED_P): New.
1384 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
1385 (new_pbb_permutation_elt): New.
1386 (pbb_permutation_elt_free): New.
1387 (struct poly_bb): Add field permutation.
1388 (PBB_PERMUTATION): New.
1389 (print_permutation): Declared.
1390 (debug_permutation): Declared.
1392 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1394 * graphite-clast-to-gimple.c (gloog): Do not call
1395 sese_reset_aux_in_loops.
1396 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
1397 extra argument for domains. Do not use loop->aux.
1398 (build_scop_iteration_domain): Initialize and free domains, pass it
1399 to build_loop_iteration_domains and extract the information from
1400 domains. Do not use loop->aux.
1401 * sese.c (sese_reset_aux_in_loops): Removed.
1402 * sese.h (sese_reset_aux_in_loops): Removed.
1404 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
1406 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
1407 (dependency_in_loop_p): Same.
1408 (translate_clast): Do not use loop->aux. Initialize
1409 loop->can_be_parallel.
1410 (mark_loops_parallel): Removed.
1411 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
1412 * graphite.c (free_aux_in_new_loops): Removed.
1413 (graphite_finalize): Do not call free_aux_in_new_loops.
1414 (graphite_transform_loops): Do not call mark_loops_parallel.
1416 2009-10-26 Li Feng <nemokingdom@gmail.com>
1418 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
1419 (translate_clast): Pass an extra parameter LEVEL.
1420 Call get_scattering_level.
1421 * graphite-clast-to-gimple.h (get_scattering_level): New.
1423 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1425 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
1426 * cfgloop.h (struct loop): New field single_iv.
1428 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
1429 loop->aux anymore: use loop->single_iv.
1430 (graphite_loop_normal_form): Moved...
1431 (build_graphite_loop_normal_form): Removed.
1432 (gloog): Do not call build_graphite_loop_normal_form.
1433 (free_aux_in_new_loops): Moved...
1434 (mark_loops_parallel): Restructure.
1435 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
1436 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
1437 (scop_canonicalize_loops): New.
1438 (build_poly_scop): Call scop_canonicalize_loops.
1439 * graphite.c (free_aux_in_new_loops): ...here.
1441 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1443 * g++.dg/graphite/graphite.exp: Add the same rules as in
1444 gcc.dg/graphite/graphite.exp.
1446 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1448 * g++.dg/graphite/id-1.C: New.
1450 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1452 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
1454 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
1455 (rewrite_phi_out_of_ssa): Same.
1456 (rewrite_cross_bb_scalar_deps): Same.
1457 (translate_scalar_reduction_to_array): Same.
1459 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1461 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
1464 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1466 * graphite-sese-to-poly.c (dump_alias_graphs): New.
1467 (build_scop_drs): Call dump_alias_graphs.
1469 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1471 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
1472 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1473 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
1474 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
1475 * graphite-poly.h (free_lst): New.
1476 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
1477 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
1479 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
1481 * graphite-poly.h (struct scop): Add a field saved_schedule.
1482 (SCOP_SAVED_SCHEDULE): New.
1483 (store_lst_schedule): New.
1484 (restore_lst_schedule): New.
1485 (store_scattering): Call store_lst_schedule.
1486 (restore_scattering): Call restore_lst_schedule.
1488 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1490 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
1491 (pdr_add_alias_set): Same.
1492 (build_poly_dr): Same.
1493 (build_alias_set_optimal_p): Same.
1494 (build_base_obj_set_for_drs): Same. Do not store the result of
1497 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1499 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
1500 all_components_are_cliques to 1.
1502 2009-10-20 Li Feng <nemokingdom@gmail.com>
1504 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
1506 (pdr_add_alias_set): Update retrieving alias_set_num.
1507 (build_poly_dr): Update retrieving dr_base_object_set.
1508 (partition_drs_to_sets): Remove.
1509 (build_alias_set_optimal_p): New.
1510 (build_alias_set_for_drs): Rename.
1511 (build_scop_drs): Update.
1512 * graphite-sese-to-poly.h (struct base_alias_pair): New.
1513 (ALIAS_SET_INDEX): Remove.
1514 (BASE_OBJECT_SET_INDEX): Remove.
1516 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1518 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
1520 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1522 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
1523 loop upper bounds for 1-element arrays at end of structures.
1524 * tree-flow.h (array_at_struct_end_p): Declared.
1525 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
1527 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
1529 * g++.dg/graphite/pr41305.C: New.
1531 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
1533 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
1534 construction of parameter constraints from loop iteration analysis.
1535 * gcc.dg/graphite/run-id-2.c: New test.
1537 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1539 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
1542 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1544 * graphite-dependences.c (dependence_polyhedron_1): Remove
1545 unused gdim dimensions from the DDR polyhedron.
1547 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1549 * graphite-dependences.c (pddr_transformed_scattering): New.
1550 (dot_original_deps_stmt_1): New.
1551 (dot_transformed_deps_stmt_1): New.
1552 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
1553 dot_transformed_deps_stmt_1.
1554 (dot_original_deps): New.
1555 (dot_transformed_deps): New.
1556 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
1558 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1560 * graphite-dependences.c (reduction_dr_1): Remove wrong
1561 assert: reduction BBs can have multiple reduction writes
1562 to memory. interchange-3.f90 is an example.
1564 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1566 * gfortran.dg/graphite/interchange-3.f90: New.
1568 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1570 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
1572 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1574 * graphite-dependences.c (dependence_polyhedron_1): Add the
1575 context to the dependence polyhedron.
1577 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1579 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
1580 PBB_PDR_DUPLICATES_REMOVED.
1581 (new_poly_bb): Same.
1583 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1585 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
1587 (build_loop_iteration_domains): Extract bounds on parameters
1588 based on the data size.
1589 (build_scop_context): Do not initialize SCOP_CONTEXT;
1590 add new constraints.
1592 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1594 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
1595 * graphite-ppl.h (graphite-ppl.h): Declared.
1597 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
1599 * graphite-ppl.c (ppl_print_linear_expr): New.
1600 (debug_ppl_linear_expr): New.
1601 * graphite-ppl.h (ppl_print_linear_expr): Declared.
1602 (debug_ppl_linear_expr): Declared.
1604 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1606 * graphite-interchange.c: Fix comments.
1607 * gcc.dg/graphite/block-1.c: Fix comments.
1609 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1611 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
1612 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
1614 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
1616 Reapply the patch from Alexander Monakov that disappeared during
1617 the last merges from trunk.
1619 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
1621 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
1622 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
1624 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1626 * graphite-interchange.c (memory_stride_in_loop): The depth
1627 argument corresponds to a dynamic time dimension, so use
1628 psct_dynamic_dim to refer to the transformed scattering dimension.
1630 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1632 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
1634 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1636 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
1638 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
1639 the root of the LST.
1640 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
1642 (print_lst): Print the root of LST in a different format.
1643 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
1645 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1647 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
1649 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1651 * doc/passes.texi: Document the Graphite infrastructure.
1653 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1655 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
1656 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
1657 and check the SSA representation.
1659 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
1661 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
1663 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
1665 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1667 * gcc.dg/graphite/interchange-11.c: New.
1669 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1671 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
1673 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1675 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1676 Add -fno-loop-strip-mine and -fno-loop-interchange.
1677 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
1678 -fno-loop-strip-mine.
1679 * gfortran.dg/graphite/graphite.exp: Same.
1681 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1683 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1684 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
1685 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
1686 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
1687 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
1688 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
1689 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
1690 DEFAULT_FLAGS_GRAPHITE_SCOP.
1691 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
1692 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
1694 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1696 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
1698 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1699 Sebastian Pop <sebastian.pop@amd.com>
1701 * graphite-interchange.c (build_linearized_memory_access): Pass an
1702 offset as parameter.
1703 (memory_stride_in_loop): Include transform scattering in the
1704 access functions to be able to querry the strides in the
1706 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
1707 not the psct_iterator_dim.
1709 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1711 * graphite-blocking.c (pbb_do_strip_mine): Removed.
1712 (lst_do_strip_mine_loop): New.
1713 (lst_do_strip_mine): New.
1714 (scop_do_strip_mine): Call lst_do_strip_mine.
1715 * graphite-poly.h (lst_add_loop_under_loop): New.
1716 (lst_find_first_pbb): New.
1718 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
1720 * graphite-poly.c (loop_to_lst): Fix LST creation.
1722 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
1724 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
1725 sizeof(unsigned long) to make it run on 32bit systems.
1727 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
1729 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
1732 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1734 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
1736 (write_alias_graph_to_ascii_dot): New.
1737 (write_alias_graph_to_ascii_ecc): Ditto.
1738 (partition_drs_to_sets): Add testing of optimality of current method
1739 which assigns alias numbers according to DFS Comopnent number. used
1740 as heuristic for the upcoming ECC algorithm.
1741 (build_scop_drs): Write to file also with the ecc and dot format.
1743 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1745 * gfortran.dg/graphite/interchange-1.f: XFail.
1747 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1749 * graphite.c (graphite_initialize): Do not handle functions with
1750 more than 100 basic blocks.
1752 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1754 * graphite-blocking.c (pbb_do_strip_mine): Use
1755 PARAM_LOOP_BLOCK_TILE_SIZE.
1757 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1759 * graphite-poly.c (dot_lst_1): New.
1761 * graphite-poly.h (dot_lst): Declared.
1763 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
1765 * graphite-dependences.c (dot_deps_stmt_1): New.
1766 (dot_deps_stmt): New.
1767 * graphite-dependences.h (dot_deps_stmt): Declared.
1769 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1771 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
1772 not replace cross BB scalar dependences ending on PHI nodes.
1773 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
1775 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1777 * graphite-poly.c (apply_poly_transforms): Implement the high
1778 level driver for flag_loop_block.
1779 * opts.c (decode_options): Enable flag_loop_block at -O2.
1780 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
1783 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
1785 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
1788 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1790 * graphite-poly.h (lst_find_pbb): New.
1791 (find_lst_loop): New.
1793 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1795 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
1796 * graphite-poly.h (struct scop): Remove dep_graph field.
1797 (SCOP_DEP_GRAPH): Removed.
1799 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
1801 * graphite-poly.h (copy_lst): Do full copy of LST.
1803 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
1805 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
1806 when the loop stride is zero.
1808 * gcc.dg/graphite/id-16.c: New.
1810 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1812 * graphite-dependences.c (reduction_dr_1): New.
1813 (reduction_dr_p): New.
1814 (graphite_legal_transform_dr): Call reduction_dr_p.
1815 (reduction_ddr): Renamed reduction_ddr_p.
1816 * graphite-poly.h (same_pdr_p): New.
1817 (number_of_write_pdrs): New.
1818 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
1819 (split_reduction_stmt): Do not split reduction statements
1820 when there are no writes to memory.
1821 (translate_scalar_reduction_to_array_for_stmt): Insert the
1822 memory reduction statement just after the scalar reduction statement.
1824 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
1826 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
1827 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
1829 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1831 * graphite-interchange.c (lst_apply_interchange): New.
1832 (lst_interchange_profitable_p): New.
1833 (lst_try_interchange_loops): New.
1834 (lst_try_interchange): New.
1835 (lst_do_interchange): New.
1836 (pbb_do_interchange): Removed.
1837 (scop_do_interchange): Call lst_do_interchange.
1839 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
1841 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
1842 SCOP_TRANSFORMED_SCHEDULE.
1847 * graphite-poly.h (lst_p): New.
1850 (LST_LOOP_FATHER): New.
1853 (scop_to_lst): Declared.
1854 (print_lst): Declared.
1855 (debug_lst): Declared.
1856 (new_lst_loop): New.
1857 (new_lst_stmt): New.
1860 (lst_dewey_number): New.
1861 (struct scop): Add original_schedule and transformed_schedule fields.
1862 (SCOP_ORIGINAL_SCHEDULE): New.
1863 (SCOP_TRANSFORMED_SCHEDULE): New.
1864 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
1866 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1868 * graphite-dependences.c (reduction_ddr): New.
1869 (graphite_legal_transform_bb): Call reduction_ddr.
1870 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
1871 Initialize PBB_IS_REDUCTION.
1872 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
1873 (PBB_IS_REDUCTION): New.
1874 (new_poly_bb): Update declaration.
1875 * graphite-scop-detection.h (build_scop_bbs): Removed.
1876 (nb_reductions_in_loop): Removed.
1877 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
1878 parameter for reductions.
1879 (try_generate_gimple_bb): Update call to new_poly_bb.
1880 (build_scop_bbs_1): Same.
1881 (build_scop_bbs): Same.
1882 (gsi_for_phi_node): New.
1883 (scalar_close_phi_node_p): Remove gcc_assert.
1884 (split_reduction_stmt): New.
1885 (is_reduction_operation_p): New.
1886 (phi_contains_arg): New.
1887 (follow_ssa_with_commutative_ops): New.
1888 (detect_commutative_reduction_arg): New.
1889 (detect_commutative_reduction_assign): New.
1890 (follow_inital_value_to_phi): New.
1891 (edge_initial_value_for_loop_phi): New.
1892 (initial_value_for_loop_phi): New.
1893 (detect_commutative_reduction): New.
1894 (translate_scalar_reduction_to_array_for_stmt): New.
1895 (insert_copyout): New.
1896 (insert_copyin): New.
1897 (translate_scalar_reduction_to_array): New.
1898 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
1899 (rewrite_commutative_reductions_out_of_ssa_loop): New.
1900 (rewrite_commutative_reductions_out_of_ssa): New.
1901 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
1902 * sese.h (split_region_for_bb): New.
1904 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
1905 * gcc.dg/graphite/interchange-1.c: Fix format.
1906 * gcc.dg/graphite/interchange-10.c: New.
1908 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1910 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
1913 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1915 * graphite-sese-to-poly.c (scev_analyzable_p): New.
1916 (rewrite_cross_bb_scalar_dependence): New.
1917 (rewrite_cross_bb_scalar_deps): New.
1918 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
1919 Call rewrite_cross_bb_scalar_deps.
1921 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1923 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
1924 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
1927 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
1929 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
1930 * graphite-interchange.c (pbb_do_interchange): Same.
1931 * graphite-poly.c (print_scattering_function): Same.
1933 * graphite-poly.h (pbb_loop): New.
1934 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
1936 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
1938 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
1940 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
1942 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
1943 so don't pass a pointer to it.
1944 (build_alias_set_for_drs): Same.
1945 (build_base_obj_set_for_drs): Same.
1946 (build_scop_drs): Same.
1948 2009-09-26 Li Feng <nemokingdom@gmail.com>
1950 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
1951 the alias graph of data references.
1953 2009-09-25 Li Feng <nemokingdom@gmail.com>
1955 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
1956 (build_scop_drs): When debugging, write the alias graph to file,
1957 otherwise, should be disabled.
1959 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1961 * Merge from mainline (151310:151361).
1963 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1965 * Merge from mainline (151171:151310).
1967 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1969 * Merge from mainline (151171:151806).
1971 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1973 * Revert the last commit.
1975 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1977 * Merge from mainline (151171:151819).
1979 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
1981 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
1982 (is_simple_operand): Remove call to stmt_simple_memref_p.
1983 (stmt_simple_for_scop_p): Update call to is_simple_operand.
1985 2009-09-17 David Edelsohn <edelsohn@gnu.org>
1987 * gcc.dg/graphite/interchange-mvt.c: New File.
1988 * gcc.dg/graphite/scop-dsyrk.c: New File.
1989 * gcc.dg/graphite/scop-dsyr2k.c: New File.
1990 * gcc.dg/graphite/scop-mvt.c: New File.
1991 * gcc.dg/graphite/scop-sor.c: New File.
1993 2009-09-17 Li Feng <nemokingdom@gmail.com>
1995 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
1996 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
1997 (graphite_carried_dependence_level_k): Ditto.
1998 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
1999 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2000 (new_poly_dr): Adjust declaration.
2001 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2002 (free_gimple_bb): Added free_data_refs_aux.
2003 (build_poly_dr): Add dr_base_object_set.
2004 (partition_drs_to_sets): New.
2005 (dr_same_base_object_p): New.
2006 (build_alias_set_for_drs): New.
2007 (build_base_object_set_for_drs): New.
2008 (build_scop_drs): Add build_base_obj_set_for_drs.
2009 * graphite-sese-to-poly.h: Added #define for alias set number index and
2010 base object set index.
2011 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2012 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2014 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2016 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2017 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2019 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2021 * graphite-sese-to-poly.c (struct irp_data): Removed.
2022 (idx_record_params): Removed.
2023 (find_params_in_bb): Scan for parameters the access functions; don't
2024 parse the tree representation.
2026 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2028 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2029 passes at -O1 and below.
2031 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2033 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2034 tree-scalar-evolution.h, and then tree-data-ref.h.
2035 * graphite-clast-to-gimple.c: Same.
2036 * graphite-dependences.c: Same.
2037 * graphite-interchange.c: Same.
2038 * graphite-poly.c: Same.
2039 * graphite-scop-detection.c: Same.
2040 * graphite-sese-to-poly.c: Same.
2042 * lambda-code.c: Same.
2043 * matrix-reorg.c: Same.
2044 * tree-data-ref.c: Same.
2045 * tree-if-conv.c: Same.
2046 * tree-loop-distribu: Same.: Same.
2047 * tree-loop-linear.c: Same.
2048 * tree-parloops.c: Same.
2049 * tree-predcom.c: Same.
2050 * tree-vect-patterns.c: Same.
2052 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2054 Partially revert the previous patch, except the following.
2055 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2056 as parameters the operands of the not expression.
2058 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2060 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2061 Do not call analyze_scalar_evolution on assignments.
2062 (instantiate_scev_phi): Call analyze_scalar_evolution.
2063 (instantiate_scev_name): Call instantiate_scev_assign and
2064 instantiate_scev_phi.
2065 (instantiate_scev_not): Adapted to pass as parameters the operands
2066 of the not expression.
2068 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2070 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2071 to pass as parameters the operands of the binary expression.
2073 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2075 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2076 instantiate_scev_not. Handle NEGATE_EXPR.
2077 (instantiate_scev_r): Handle NEGATE_EXPR.
2079 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2081 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2083 (instantiate_scev_r): Move code in instantiate_scev_2
2084 and instantiate_scev_1.
2086 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2088 * tree-scalar-evolution.c (instantiate_scev_3): New.
2089 (instantiate_scev_1): Move code in instantiate_scev_3.
2091 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2093 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2094 (instantiate_scev_1): Move code in instantiate_scev_poly.
2096 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2098 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2099 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2101 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2103 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2104 (instantiate_scev_1): Move code in instantiate_scev_convert.
2106 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2108 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2109 (instantiate_scev_1): Move code in instantiate_scev_binary.
2111 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2113 * tree-scalar-evolution.c (instantiate_scev_name): New.
2114 (instantiate_scev_1): Move code in instantiate_scev_name.
2116 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2118 * Merge from mainline (150992:151171).
2120 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2122 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2124 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2126 * graphite-dependences.c (graphite_legal_transform_bb): Call
2127 pbb_remove_duplicate_pdrs.
2128 * graphite-poly.c (can_collapse_pdr): Removed.
2129 (pdr_find_duplicate): Removed.
2130 (can_collapse_pdrs): New.
2131 (pbb_remove_duplicate_pdrs): New.
2132 (new_poly_dr): Do not look for duplicates.
2133 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2134 (PBB_PDR_DUPLICATES_REMOVED): New.
2135 (pbb_remove_duplicate_pdrs): Declared.
2137 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2139 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2140 the strides by multiplying by PDR_NB_REFS.
2141 * graphite-poly.c (can_collapse_pdr): New.
2142 (pdr_find_duplicate): New.
2143 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2144 Initialize PDR_NB_REFS.
2145 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2147 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2149 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2151 Revert one of the previous commits:
2152 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2153 the computation of symmetric data dependence relations.
2154 (dependency_between_pbbs_p): Same.
2156 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2159 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2162 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2164 * graphite-dependences.c (pddr_original_scattering): Return NULL
2165 for read-read dependence relations.
2166 * graphite-poly.h (enum poly_dr_type): Fix comment.
2169 (pdr_may_write_p): New.
2171 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2173 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2174 (struct poly_dr): Same.
2175 (new_poly_dr): Same.
2176 * graphite-poly.c (new_poly_dr): Same.
2178 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2179 Sebastian Pop <sebastian.pop@amd.com>
2181 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2182 pbb_strip_mine_time_depth. Changed the implementation so that
2183 transformation is expressed as a transformation on
2184 time (scatttering) dimensions. Also, ensures that the 2d+1
2185 scheduling format is preserved.
2186 (pbb_strip_mine_profitable_p): Profitability is based on the
2187 iteration number of a given time (scattering) dimension,
2188 and not on a original loop depth dimension.
2189 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2190 (pbb_do_strip_mine): Call psct_dynamic_dim.
2191 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2192 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2193 (pbb_nb_dynamic_scattering_transform): New.
2194 (psct_dynamic_dim): New.
2196 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2198 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2199 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2200 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2201 * graphite-interchange.c (build_linearized_memory_access): Same.
2202 (memory_stride_in_loop): Same.
2204 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2206 * graphite-dependences.c (pddr_original_scattering): New.
2207 (graphite_legal_transform_dr): Call pddr_original_scattering.
2210 * graphite-dependences.h (dot_deps): Declared.
2211 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2212 (print_pdr): Print PDR_ID.
2213 * graphite-poly.h (struct poly_dr): Add field id.
2216 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2218 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2220 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2221 not delete the original dependence relation.
2223 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
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-21 Sebastian Pop <sebastian.pop@amd.com>
2231 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2232 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2233 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2234 (free_poly_ddr): New.
2235 (pddr_is_empty): New.
2236 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2237 (dependence_polyhedron): Same. Remove useless gcc_assert.
2239 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2240 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2241 * graphite-dependences.h (enum poly_dependence_kind): New.
2242 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2243 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2244 (PDRP_SINK): Renamed PDDR_SINK.
2245 (PDRP_DDP): Renamed PDDR_DDP.
2247 (free_poly_ddr): Declared.
2248 * graphite-poly.c (new_scop): Use the new hash function names.
2249 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2250 into original_pddrs.
2251 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2253 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2255 * Merge from mainline (150764:150992).
2257 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2259 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2260 bounds with LT_EXPR to make niter analysis more precise on code
2261 generated by Graphite.
2263 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2265 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2266 (graphite_legal_transform_bb): Same.
2267 (poly_drs_may_alias_p): Same.
2269 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2272 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2273 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2275 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2277 * graphite-poly.c (print_pbb): Print PBB index.
2279 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2281 * Merge from mainline (r150672:150764).
2283 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2285 * graphite-interchange.c (ppl_max_for_le): Moved...
2286 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
2287 * graphite-ppl.c (ppl_max_for_le): ... here.
2288 * graphite-ppl.h (ppl_max_for_le): Declared.
2290 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
2292 * Merge from mainline (r150372:150672).
2294 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2297 * sese.c (convert_for_phi_arg): New.
2298 (add_guard_exit_phis): Use convert_for_phi_arg.
2300 * gfortran.dg/graphite/id-17.f: New.
2302 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2304 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
2305 unknown subscript upper bounds.
2307 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2309 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2310 Pranav Garg <pranav.garg2107@gmail.com>
2312 * graphite-interchange.c (gather_access_strides): Removed.
2313 (ppl_max_for_le): New.
2314 (build_linearized_memory_access): New.
2315 (memory_stride_in_loop): New.
2316 (pbb_interchange_profitable_p): Reimplemented.
2317 * graphite-ppl.h (ppl_new_id_map): New.
2318 (ppl_interchange): New.
2320 * gcc.dg/graphite/interchange-6.c: XFAILed.
2322 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2324 * graphite-interchange.c (compute_subscript): Removed.
2325 (compute_array_size_cstr): Removed.
2326 (compute_array_size_poly): Removed.
2327 (compute_array_size): Removed.
2328 (gather_access_strides_poly): Removed.
2329 (gather_access_strides): Empty.
2331 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2333 * graphite-dependences.c (dependence_polyhedron_1): Replace
2334 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
2335 (graphite_legal_transform_dr): Same.
2336 (graphite_carried_dependence_level_k): Same.
2337 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
2338 Initialize PDR_NB_SUBSCRIPTS.
2339 (print_pdr_access_layout): Replace pdr_nb_subscripts with
2341 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
2342 (PDR_NB_SUBSCRIPTS): New.
2343 (pdr_nb_subscripts): Removed.
2344 (pdr_dim): Simplified.
2345 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
2346 with PDR_NB_SUBSCRIPTS.
2348 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2350 * graphite-interchange.c (compute_array_size): Remove use of
2352 * graphite-poly.c (new_poly_dr): Remove argument data_container.
2353 Do not initialize PDR_DATA_CONTAINER.
2354 (print_pdr): Do not print PDR_DATA_CONTAINER.
2355 * graphite-poly.h (struct poly_dr): Remove data_container field.
2356 (PDR_DATA_CONTAINER): Removed.
2357 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
2359 (build_poly_dr): Same.
2361 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
2363 * gcc.dg/graphite/interchange-9.c: New.
2365 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2366 Sebastian Pop <sebastian.pop@amd.com>
2368 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
2369 copy of the dependence polyhedron. Free the temporary objects.
2370 (graphite_carried_dependence_level_k): Free unused objects before
2373 * gcc.dg/graphite/interchange-1.c: XFAILed.
2374 * gcc.dg/graphite/interchange-2.c: XFAILed.
2375 * gcc.dg/graphite/interchange-3.c: XFAILed.
2376 * gcc.dg/graphite/interchange-4.c: XFAILed.
2377 * gcc.dg/graphite/interchange-7.c: XFAILed.
2379 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2381 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
2382 Early return without analyzing the data dependences if no
2383 transform has been done. Call restore_scattering if the transform
2385 (graphite-interchange.c): Same.
2386 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
2387 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
2388 (apply_poly_transforms): Do not gcc_assert that
2389 the transform is legal.
2390 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2391 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
2392 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
2393 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
2394 * graphite-poly.h (struct poly_scattering): New.
2395 (struct poly_bb): Add original, transformed, and saved fields.
2396 Remove transformed_scattering, original_scattering, nb_local_variables,
2397 and nb_scattering_transform fields.
2398 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
2399 (poly_scattering_new): New.
2400 (poly_scattering_free): New.
2401 (poly_scattering_copy): New.
2402 (store_scattering_pbb): New.
2403 (store_scattering): New.
2404 (restore_scattering_pbb): New.
2405 (restore_scattering): New.
2406 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2407 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
2409 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2411 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
2414 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2416 * Makefile.in (graphite.o): Depends on PREDICT_H.
2417 * graphite.c: Include predict.h.
2418 (graphite_finalize): Call tree_estimate_probability.
2419 * predict.c (predict_loops): Do not call scev_initialize and
2421 (tree_estimate_probability_bb): New.
2422 (tree_estimate_probability): Do not initialize loops: move that
2423 code to the driver. Call tree_estimate_probability_bb.
2424 (tree_estimate_probability_driver): New.
2425 (pass_profile): Use tree_estimate_probability_driver.
2426 * predict.h (tree_estimate_probability): Declared.
2428 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
2430 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
2431 * graphite-dependences.c (graphite_legal_transform): Add time to
2432 TV_GRAPHITE_DATA_DEPS.
2433 (dependency_between_pbbs_p): Same.
2434 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2436 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
2438 * Merge from mainline (r149952:150372).
2440 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2442 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
2443 * graphite-blocking.c: Same.
2444 * graphite-clast-to-gimple.c: Same.
2445 * graphite-dependences.c: Same.
2446 * graphite-poly.c: Same.
2447 * graphite-poly.h: Same.
2448 * graphite-ppl.c: Same.
2449 * graphite-scop-detection.c: Same.
2450 * graphite-sese-to-poly.c: Same.
2453 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2455 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
2456 (remove_simple_copy_phi): New.
2457 (remove_invariant_phi): New.
2458 (simple_copy_phi_p): New.
2459 (reduction_phi_p): New.
2460 (gsi_for_ssa_name_def): New.
2461 (insert_out_of_ssa_copy): New.
2462 (insert_out_of_ssa_copy_on_edge): New.
2463 (create_zero_dim_array): New.
2464 (scalar_close_phi_node_p): New.
2465 (rewrite_close_phi_out_of_ssa): New.
2466 (rewrite_phi_out_of_ssa): New.
2467 (rewrite_reductions_out_of_ssa): New.
2468 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
2470 * gcc.dg/graphite/id-11.c: New.
2471 * gcc.dg/graphite/id-15.c: New.
2472 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
2473 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
2474 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
2475 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
2476 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
2477 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
2478 * gfortran.dg/graphite/id-13.f: New.
2479 * gfortran.dg/graphite/id-5.f: New.
2481 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2483 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
2484 check that nb_reductions_in_loop is zero.
2485 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
2486 reduction phi nodes.
2487 (nb_reductions_in_loop): Removed.
2488 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
2489 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
2490 (bb_contains_non_iv_scalar_phi_nodes): Removed.
2491 (scop_contains_non_iv_scalar_phi_nodes): Removed.
2492 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
2494 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2496 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
2497 statements that have an empty iteration domain.
2498 * gfortran.dg/graphite/id-16.f: New.
2500 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2502 * tree-scalar-evolution.c (instantiate_scev_1): Return
2503 chrec_dont_know when the result is not above instantiate_below.
2504 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
2505 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
2506 the tree has a known scalar evolution.
2507 * gfortran.dg/graphite/id-14.f: New.
2508 * gfortran.dg/graphite/id-15.f: New.
2510 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2512 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
2514 (rename_variables): Keep inserting renames after the ones already
2517 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2519 * graphite-sese-to-poly.c (compare_bb_depths): New.
2520 (graphite_sort_dominated_info): New.
2521 (build_scop_bbs_1): Call graphite_sort_dominated_info.
2522 (build_scop_scattering): Fix comment.
2524 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
2526 * graphite.c (graphite_finalize): Call print_loops instead of
2527 dump_function_to_file.
2528 * gcc.dg/graphite/graphite.exp: Fix formatting.
2529 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
2530 loops generated in the graphite output file.
2531 * gcc.dg/graphite/pr35356-2.c: New.
2532 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
2533 * gfortran.dg/graphite/id-12.f: New.
2535 2009-07-24 Li Feng <nemokingdom@gmail.com>
2537 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
2540 2009-07-24 Li Feng <nemokingdom@gmail.com>
2541 Tobias Grosser <grosser@fim.uni-passau.de>
2543 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
2544 alias set number build alias in ACCESSES polyhedron.
2545 (build_alias_set_for_drs): New.
2546 (build_pbb_drs): Added build_alias_set_for_drs.
2547 * graphite-dependences.c (poly_drs_may_alias_p): New.
2548 (graphite_carried_dependence_level_k): Check alias information
2549 before building polyhedron.
2551 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2553 * Makefile.in (lambda-code.o): Fix formatting.
2555 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
2557 * Merge from mainline (r149350-149952)
2559 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2561 * graphite-poly.c (apply_poly_transforms): Move strip_mine
2562 before interchange to prepare for loop blocking.
2564 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
2566 * graphite-poly.c (apply_poly_transforms): Add checks after every
2568 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
2569 done in apply_poly_transforms.
2571 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2573 * graphite-dependences.c (build_lexicographically_gt_constraint):
2574 Replace RES parameter with *RES.
2575 (dependence_polyhedron_1): Pass an address of the parameter RES
2576 instead of value of RES.
2578 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2580 * graphite.c (graphite_finalize): Fix comment.
2581 (graphite_transform_loops): Reset scev info after code generation
2584 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2586 * graphite.c (graphite_finalize): Call scev_reset.
2588 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2590 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
2591 GBB_CLOOG_IV_TYPES hash table twice.
2592 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
2593 (add_condition_to_domain): Clear GMP values.
2595 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2597 * graphite-dependences.c: Fix formatting.
2598 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
2599 (pbb_number_of_iterations): Free ppl_Linear_Expression.
2600 * graphite-sese-to-poly.c: Fix formatting.
2601 * graphite.c (graphite_transform_loops): Create the hash table
2602 after the early return.
2604 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2606 * gcc.dg/graphite/id-14.c: New.
2607 * gcc.dg/graphite/pr40157.c: New.
2608 * gfortran.dg/graphite/id-11.f: New.
2610 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2612 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
2613 (build_poly_scop): Return false when there are no pbbs within
2614 loops to avoid to pass to cloog scops with no loops.
2616 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
2618 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
2619 useless test "i % 2".
2620 (build_pbb_scattering_polyhedrons): Fix formatting.
2621 (build_poly_dr): Same.
2622 * graphite.c (graphite_transform_loops): Restructure.
2624 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
2626 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
2627 reduction_list parameter.
2628 (rewrite_all_phi_nodes_with_iv): Same.
2629 (canonicalize_loop_ivs): Same.
2630 * tree-parloops.c (struct brli): Removed.
2631 (build_reduction_list_info): Removed.
2632 (build_new_reduction): New.
2633 (analyze_reduction_list): Removed.
2634 (gather_scalar_reductions): Find reductions instead of phi
2635 nodes that can't be canonicalized.
2636 (try_create_reduction_list): Remove reduction_list parameter.
2637 (gen_parallel_loop): Same.
2638 (parallelize_loops): Remove analyze_reductions variable,
2639 initialization and free.
2640 Change reduction_list htab initialization to reduction_info
2641 elements instead of ssa names.
2642 Call try_create_reduction_list and gen_parallel_loop without
2643 analyzed_reduction argument.
2644 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
2645 canonicalize_loop_ivs with one less argument.
2646 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
2648 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2650 * graphite-dependences.c (new_poly_dr_pair): New.
2651 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
2652 (new_poly_dr_pair): New.
2653 (eq_poly_dr_pair_p): New.
2654 (hash_poly_dr_pair_p): New.
2655 * graphite-dependences.h (struct poly_dr_pair): New.
2656 (eq_poly_dr_pair_p): Declared.
2657 (hash_poly_dr_pair_p): Declared.
2658 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
2659 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
2660 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
2661 * Makefile.in (graphite-poly.o): Add dependence on
2662 graphite-dependences.h.
2664 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2666 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
2667 polynomials of degree > 1 pass to Graphite.
2668 * tree-chrec.c (scev_is_linear_expression): Call
2669 evolution_function_is_affine_multivariate_p.
2670 * gfortran.dg/graphite/id-10.f90: New.
2672 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2674 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
2675 Instantiate scevs varying in outer loops.
2676 * gfortran.dg/graphite/id-9.f: Correct testcase.
2678 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2680 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
2681 redundant constraint.
2683 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2685 * gcc.dg/graphite/graphite.exp: Fix comments.
2686 * gfortran.dg/graphite/graphite.exp: Trigger actions
2687 based on the file names as in the C testsuite.
2688 * gfortran.dg/graphite/block-1.f90: Fix patterns.
2689 * gfortran.dg/graphite/block-2.f: Same.
2690 * gfortran.dg/graphite/block-3.f90: Same.
2691 * gfortran.dg/graphite/block-4.f90: Same.
2692 * gfortran.dg/graphite/id-1.f90: Same.
2693 * gfortran.dg/graphite/id-2.f90: Same.
2694 * gfortran.dg/graphite/id-3.f90: Same.
2695 * gfortran.dg/graphite/id-4.f90: Same.
2696 * gfortran.dg/graphite/id-6.f: Same.
2697 * gfortran.dg/graphite/id-9.f: Same.
2698 * gfortran.dg/graphite/interchange-1.f: Same.
2699 * gfortran.dg/graphite/interchange-2.f: Same.
2700 * gfortran.dg/graphite/scop-1.f: Same.
2702 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
2704 * sese.c (expand_scalar_variables_call): New.
2705 (expand_scalar_variables_ssa_name): Handle calls in expander.
2707 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2709 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
2710 Expect to see the pattern twice.
2711 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
2712 * gcc.dg/graphite/interchange-5.c: Same.
2713 * gcc.dg/graphite/interchange-6.c: Same.
2715 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2717 * gcc.dg/graphite/id-10.c: New.
2718 * gcc.dg/graphite/id-12.c: New.
2719 * gfortran.dg/graphite/id-7.f: New.
2720 * gfortran.dg/graphite/id-8.f: New.
2722 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2724 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
2727 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2729 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
2731 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
2733 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
2735 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2737 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
2738 building PDR subscripts.
2740 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2742 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
2743 computation of array sizes.
2745 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
2747 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
2749 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
2751 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
2752 build_pairwise_constraint, dr_equality_constraints,
2753 build_pairwise_scheduling_equality,
2754 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2755 build_lexicographically_gt_constraint, dependence_polyhedron,
2756 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
2757 Move from NNC_Polyhedron to C_Polyhedron.
2758 * graphite-interchange.c (compute_array_size_poly,
2759 gather_access_strides): Dito.
2760 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
2761 free_scop, pbb_number_of_iterations): Dito.
2762 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
2763 pbb_dim_iter_domain, struct scop): Dito.
2764 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
2765 new_Cloog_Domain_from_ppl_Polyhedron,
2766 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
2767 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
2768 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
2769 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
2770 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
2771 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
2772 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
2773 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
2774 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
2775 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
2776 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
2777 build_scop_iteration_domain, build_poly_dr): Dito
2779 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2781 * gcc.dg/graphite/graphite.exp: Added a rule to execute
2783 * gcc.dg/graphite/run-id-1.c: New.
2785 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2787 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
2788 positivity constraint on the symbolic number of iterations.
2790 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2792 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
2794 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2795 Tobias Grosser <grosser@fim.uni-passau.de>
2797 * graphite-clast-to-gimple.c (build_scop_context): Removed.
2798 (build_cloog_prog): Directly use SCOP_CONTEXT.
2799 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
2800 (free_scop): Free SCOP_CONTEXT.
2801 (print_scop_context): New.
2802 (print_scop): Call print_scop_context.
2803 (debug_scop_context): New.
2804 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
2805 (struct scop): Added field context.
2806 (SCOP_CONTEXT): New.
2807 * graphite-sese-to-poly.c (add_param_constraints): New.
2808 (build_scop_context): New.
2809 (build_poly_scop): Call build_scop_context.
2811 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2813 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
2814 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
2815 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
2816 * graphite-ppl.h: Include double-int.h and tree.h.
2817 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
2818 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
2819 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
2820 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
2822 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2824 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
2825 POINTER_PLUS_EXPR for pointer types.
2826 (clast_to_gcc_expression): Same.
2828 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
2830 * graphite-poly.c (print_scattering_function): Early return when
2831 PBB_TRANSFORMED_SCATTERING is not initialized.
2832 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
2834 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
2836 * tree-parloops.c (analyze_reduction_list): Remove unused variable
2839 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
2841 * tree-parloops.c (analyze_reduction_list): Change return
2843 (try_create_reduction_list): Move the call to
2844 analyze_reduction_list to the beginining.
2845 Call reduction_phi with analyzed_reductions as argument
2846 instead of reduction_list.
2848 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
2850 * Merge from mainline (r148296:149346)
2852 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2854 * graphite-scop-detection.c (graphite_can_represent_init): New.
2855 (graphite_can_represent_scev): Call graphite_can_represent_init:
2856 check that the initial value does not contain multiplications of
2858 (stmt_has_simple_data_refs_p): New.
2859 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
2860 (is_simple_operand): Fix formatting.
2861 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
2863 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2865 * gcc.dg/graphite/id-13.c: New.
2866 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
2867 analyze_scalar_evolution, use scalar_evolution_in_region.
2868 (scan_tree_for_params_right_scev): Add extra assert.
2869 (parameter_index_in_region_1): Split from parameter_index_in_region.
2870 (idx_record_params): Use scalar_evolution_in_region.
2871 (find_params_in_bb): Same.
2872 (find_scop_parameters): Same.
2873 (build_loop_iteration_domains): Same.
2874 (create_linear_expr_from_tree): Same.
2875 * sese.c (scalar_evolution_in_region): New.
2876 * sese.h (scalar_evolution_in_region): Declared.
2877 (defined_in_sese_p): New.
2878 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
2880 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
2883 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2885 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
2886 TREE_DATA_REF_H also implies SCEV_H.
2888 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
2890 * graphite-poly.c (print_scop_params): New.
2891 (print_scop): Call print_scop_params.
2892 (debug_scop_params): New.
2893 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
2895 2009-07-07 Li Feng <nemokingdom@gmail.com>
2897 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
2898 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
2899 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
2900 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
2901 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
2902 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
2904 2009-07-07 Li Feng <nemokingdom@gmail.com>
2906 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
2907 for dependency checking part.
2908 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
2909 tests for dependency checking.
2910 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2911 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2912 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
2913 flag -fdump-tree-graphite-all for autopar testsuites.
2915 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
2917 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
2918 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
2919 canonicalize_loop_ivs): Moved...
2920 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
2922 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
2924 * tree-parloops.c (try_create_reduction_list): Pass an extra
2925 argument analyzed_reductions. Call analyze_reduction_list.
2926 (gen_parallel_loop): Do not call analyze_reduction_list.
2927 (parallelize_loops): Init and finalize analyzed_reductions.
2929 2009-07-06 Li Feng <nemokingdom@gmail.com>
2931 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2932 Added flag -fno-loop-strip-mine for autopar testcase.
2934 2009-07-04 Li Feng <nemokingdom@gmail.com>
2936 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
2937 transformed scattering dimension instead of unmatch orignal when
2938 calling dependence_polyhedron.
2940 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2942 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
2944 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2946 * graphite-poly.c (pbb_number_of_iterations): Check for returned
2947 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
2949 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
2951 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
2952 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
2953 * graphite-poly.c (pbb_number_of_iterations): New.
2954 * graphite-poly.h (pbb_number_of_iterations): Declared.
2955 (pbb_iterator_dim, pbb_parameter_dim): New.
2957 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
2959 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
2960 last commit on type of lower and upper bound of loops.
2962 2009-06-29 Li Feng <nemokingdom@gmail.com>
2964 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
2965 graphite-dependences.h.
2966 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
2967 (mark_bb_with_pbb): New.
2968 (get_stmtfor_depth): New.
2969 (find_pbb_via_hash): New.
2970 (dependency_in_loop_p): New.
2971 (mark_loops_parallel): New.
2972 (free_aux_in_new_loops): New.
2973 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
2974 bb with it's relevant pbb. Mark newly created loops. Remove mark
2975 innermost loop parallel without checking.
2976 (gloog): Add parameter BB_PBB_MAPPING.
2977 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
2978 (gloog): Change declaration.
2979 (mark_loop_parallel): Make extern.
2980 (free_aux_in_new_loops): Declare.
2981 (bb_pbb_map_hash): New.
2982 (eq_bb_pbb_map): New.
2983 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
2984 auto parallelization when flag_graphite_force_parallel is set.
2985 (graphite_finalize): Added free_aux_in_new_loops.
2986 * tree-parloops.c (parallelize_loops): Only generate parallel code for
2987 the innermost loop that marked parallel. Use
2988 flag_graphite_force_parallel instead of loop->can_be_parallel.
2989 (loop_parallel_p): Move inner most checking out of function.
2991 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2993 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
2994 type of lower and upper bound of loops signed long int.
2996 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
2998 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
2999 expression outside the loop.
3001 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3003 * gcc.dg/graphite/interchange-8.c: New.
3005 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3007 * gcc.dg/graphite/interchange-0.c: XFailed.
3008 * gcc.dg/graphite/interchange-5.c: XFailed.
3009 * gcc.dg/graphite/interchange-6.c: XFailed.
3011 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3013 * graphite-interchange.c (compute_array_size_poly): The end of the
3014 recursion should return 1.
3016 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3018 * graphite-interchange.c (compute_array_size_cstr): Allow the
3019 subscript multiplier to be -1.
3020 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3021 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3022 data_container. Initializes PDR_DATA_CONTAINER.
3023 (print_pdr_access_layout): New.
3024 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3025 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3027 (PDR_DATA_CONTAINER): New.
3028 (new_poly_dr): Update declaration.
3029 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3030 (build_poly_dr): Call pdr_add_data_dimensions.
3032 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3034 * graphite-poly.h (struct poly_dr): Fix comment.
3035 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3036 (pdr_add_memory_accesses): New.
3037 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3039 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3041 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3042 (print_pbb): Add call to print_pdrs.
3043 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3045 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3046 Li Feng <nemokingdom@gmail.com>
3048 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3049 (dependency_between_pbbs_p): New.
3050 (lexicographically_gt_p): Assure !empty_p before polyhedron
3051 intersection assign.
3052 (build_lexicographically_gt_constraint): Correct lexicographically
3054 * graphite-dependences.h: New.
3055 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3057 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3059 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3060 (gloog): Print to dump_file the generated clast.
3061 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3062 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3064 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3066 * graphite-poly.c (extend_scattering): Increment
3067 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3069 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3071 * graphite-interchange.c (compute_array_size_poly): Added exit of
3072 recursion condition. Continue iterating even after the first equality.
3073 (compute_array_size): Same.
3075 2009-06-24 Li Feng <nemokingdom@gmail.com>
3077 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3078 -fdump-tree-final_cleanup to -fdump-tree-optimized.
3079 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3080 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3081 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3083 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3085 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3086 only when the use verifies is_gimple_reg.
3088 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3090 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3091 Allocate scaldims after call to unify_scattering_dimensions.
3093 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3095 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3097 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3098 Albert Cohen <albert.cohen@inria.fr>
3100 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3101 variables for the strip mining.
3103 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3104 Pranav Garg <pranav.garg2107@gmail.com>
3106 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3107 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3108 (graphite-blocking.o): New rule.
3109 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3110 * graphite-blocking.c: New.
3111 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3112 flag_loop_strip_mine.
3113 (psct_scattering_dim_for_loop_depth): New.
3114 * graphite-poly.h (scop_do_strip_mine): Declared.
3115 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3116 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3117 flag_loop_strip_mine.
3119 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3121 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3122 a GMP value and a PPL coefficient at each iteration of a loop.
3124 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3126 * graphite-dependences.c (dependence_polyhedron): Do not use
3127 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3128 pbb_nb_scattering_transform.
3129 (graphite_legal_transform_dr): Same.
3130 * graphite-poly.c (extend_scattering): Same.
3131 (unify_scattering_dimensions): Same.
3132 (print_scattering_function): Same.
3133 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3134 PBB_NB_LOCAL_VARIABLES.
3135 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3136 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3137 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3138 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3139 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3140 (pbb_nb_scattering_transform): New.
3141 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3142 (psco_scattering_dim): Add assert on parameters.
3143 (psct_scattering_dim): Same.
3144 (psct_scattering_dim_for_loop_depth): Declared.
3145 (psct_local_var_dim): New.
3146 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3147 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3148 correct layout, call pbb_nb_local_vars.
3149 (psct_add_local_variable, psct_add_scattering_dimension): New.
3150 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3151 Initialize PBB_NB_SCATTERING_TRANSFORM.
3153 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3155 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3156 (set_coef): Renamed ppl_set_coef.
3157 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3159 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3161 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3162 test a boolean against 1.
3163 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3164 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3165 (pbb_do_interchange): Returns true when a transform has been performed.
3166 (scop_do_interchange): Same.
3167 * graphite-poly.c (apply_poly_transforms): Use the return value of
3168 scop_do_interchange.
3169 * graphite-poly.h (scop_do_interchange): Update declaration.
3171 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3173 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3175 * sese.c (sese_reset_aux_in_loops): New.
3176 * sese.h (sese_reset_aux_in_loops): New.
3178 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3180 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3181 multiplier and multiply the constant by the multiplier.
3182 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3183 (build_poly_dr): Do not use the multiplier to define the subscript.
3185 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3187 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3188 compiler's data reference. Initialize PDR_CDR.
3189 (print_pdr): Call dump_data_reference.
3190 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3191 Add compiler_dr field.
3192 (PDR_BB): Renamed PDR_PBB.
3194 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3195 GCC's data reference representation.
3196 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3197 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3199 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3201 * graphite-poly.c (print_scattering_function): Also print the layout.
3202 * graphite-poly.h (pbb_nb_local_vars): New.
3204 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3206 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3208 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3210 * graphite-poly.c (print_pdr, debug_pdr): New.
3211 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3212 (PDR_BASE): Removed.
3214 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3216 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
3219 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3221 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3222 subscript identification column.
3223 (pbb_do_interchange): Print to dump_file that some loops "will be
3224 interchanged". Rely on that chain of characters in the testcases.
3225 * gcc.dg/graphite/interchange-0.c: New.
3226 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3227 interchange-*.c files and compile them with -floop-interchange.
3229 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3231 * graphite-interchange.c (interchange_profitable_p): Renamed
3232 pbb_interchange_profitable_p.
3234 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3235 Harsha Jagasia <harsha.jagasia@amd.com>
3236 Pranav Garg <pranav.garg2107@gmail.com>
3238 * graphite-interchange.c (interchange_profitable_p): Make static.
3239 (pbb_interchange_loop_depths, pbb_do_interchange,
3240 scop_do_interchange): New.
3241 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3242 for flag_loop_interchange.
3243 * graphite-poly.h (scop_do_interchange): Declared.
3244 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3245 flag_loop_interchange is used.
3247 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3249 * graphite-dependences.c (dependence_polyhedron): Update use of
3250 pbb_nb_scattering_dims.
3251 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3252 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3253 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3254 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3256 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3258 * graphite.c: Cleanup foo.
3260 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3262 * Merge from mainline (r143684:148293).
3263 * Disabled libpcp until it gets fixed.
3265 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3266 Harsha Jagasia <harsha.jagasia@amd.com>
3268 * graphite-interchange.c: New.
3269 * Makefile.in (graphite-interchange.o): New.
3270 * graphite-poly.h (interchange_profitable_p): Declared.
3271 * graphite-ppl.h (value_max): New.
3273 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3275 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3276 * graphite-poly.h: Fix some comments.
3280 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3283 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3284 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3285 (pdr_accessp_nb_params): Renamed pdr_nb_params.
3286 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
3287 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
3288 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
3289 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
3290 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
3291 * graphite-clast-to-gimple.c: Same.
3292 * graphite-dependences.c: Same.
3293 * graphite-poly.c: Same.
3294 * graphite-sese-to-poly.c: Same.
3296 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3298 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
3299 expressions for an IV rename, as returned by clast_to_gcc_expression.
3300 (copy_renames): Rename new_name to expr.
3301 * sese.c (debug_rename_elt): Same.
3304 (sese_adjust_liveout_phis): Call force_gimple_operand before using
3305 the information from the rename map.
3306 (rename_variables_in_stmt): Same.
3307 (add_loop_exit_phis): Rename new_name to expr.
3308 (insert_loop_close_phis): Same.
3309 (add_guard_exit_phis): Same. Call force_gimple_operand.
3310 * sese.h (struct rename_map_elt): Rename new_name to expr.
3311 (new_rename_map_elt): Same.
3313 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3315 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
3316 * sese.c (set_rename): Make it extern.
3317 * sese.h (set_rename): Declared.
3319 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
3321 * graphite-poly.c (extend_scattering): Free values.
3322 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
3324 (ppl_print_powerset_matrix): Same.
3325 * graphite-scop-detection.c (free_scops_1): New.
3326 (limit_scops): Call free_scops_1.
3327 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
3328 (build_poly_dr): Free PPL coefficients.
3329 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
3331 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
3333 * graphite-dependences.c: New.
3334 * graphite-data-ref.c: Removed.
3335 * graphite-data-ref.h: Removed.
3336 * Makefile.in (graphite-data-ref.o): Removed.
3337 (graphite-dependences.o): Added.
3338 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
3339 * graphite-poly.c: Same.
3340 Move the data dependence testing to graphite-dependences.c.
3342 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
3344 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
3345 from graphite_cannot_represent_loop. Code refactored.
3346 (scopdet_basic_block_info): Call graphite_can_represent_loop.
3348 2009-05-17 Li Feng <nemokingdom@gmail.com>
3350 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3351 Cover all the testcases (not only the filtered ones).
3353 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
3355 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
3356 unnecessary check. Update comments. Move check for REAL_TYPE here.
3357 (harmful_stmt_in_bb): Remove checks for conditions. This is already
3358 done in (stmt_simple_for_scop_p).
3360 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
3362 * graphite.c (print_global_statistics): New.
3363 (print_graphite_scop_statistic): New.
3364 (print_graphite_statistics): New.
3365 (graphite_initialize, graphite_transform_loops): Print statistics.
3366 * graphite-scop-detection (build_scops): Print statistics.
3367 (print_graphite_scop_statistics): New.
3368 (print_graphite_statistics): New.
3370 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3372 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
3373 (debug_clast_name_index): Removed.
3374 (debug_clast_name_indexes_1): Removed.
3375 (debug_clast_name_indexes): Removed.
3376 (clast_name_index_elt_info): Removed.
3377 (eq_clast_name_indexes): Removed.
3378 (clast_name_to_index): Removed.
3379 (new_clast_name_index): Removed.
3380 (save_clast_name_index): Removed.
3381 (save_var_name): Moved...
3382 (init_sese_params_index): Removed.
3383 (clast_name_to_gcc): Remove use of name_tree.
3384 (initialize_cloog_names): Same.
3385 (gloog): Do not call init_sese_params_index.
3386 * graphite-sese-to-poly.c (save_var_name): ...here.
3387 (parameter_index_in_region): New.
3388 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
3389 (parameter_index_in_region): Removed.
3390 (is_parameter): Remove use of name_tree.
3391 * sese.h (struct name_tree): Removed.
3392 (struct sese): Remove use of name_tree. New field params_names.
3393 (SESE_PARAMS_NAMES): New.
3394 (SESE_PARAMS): Remove duplicate.
3395 (parameter_index_in_region): Removed.
3396 (sese_nb_params): Remove use of name_tree.
3397 (struct clast_name_index): New.
3398 (new_clast_name_index): New.
3399 (clast_name_to_index): New.
3400 (save_clast_name_index): New.
3401 (debug_clast_name_index): New.
3402 (debug_clast_name_indexes_1): New.
3403 (debug_clast_name_indexes): New.
3404 (clast_name_index_elt_info): New.
3405 (eq_clast_name_indexes): New.
3407 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3409 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
3410 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
3411 (graphite_loop_normal_form): Do not pass region. Do not
3412 initialize SESE_OLDIVS.
3413 (build_graphite_loop_normal_form): Update call to
3414 graphite_loop_normal_form.
3415 * sese.c (debug_oldivs): Removed.
3416 (new_sese): Do not initialize SESE_OLDIVS.
3417 (free_sese): Do not free SESE_OLDIVS.
3418 (oldiv_for_loop): Removed.
3419 * sese.h (struct sese): Remove old_ivs.
3420 (SESE_OLDIVS): Removed.
3421 (oldiv_for_loop): Removed.
3423 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3425 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
3426 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
3427 replaced by a call to newivs_to_depth_to_newiv.
3428 (clast_to_gcc_expression): Pass newivs, remove ivstack.
3429 (clast_to_gcc_expression_red): Same.
3430 (gcc_type_for_clast_expr): Same.
3431 (gcc_type_for_clast_eq): Same.
3432 (graphite_translate_clast_equation): Same.
3433 (graphite_create_guard_cond_expr): Same.
3434 (graphite_create_new_guard): Same.
3435 (graphite_create_new_loop): Same.
3436 (build_iv_mapping): Same.
3437 (translate_clast): Same.
3439 (loop_iv_stack_patch_for_consts): Removed. *
3440 sese.c (iv_stack_entry_is_constant): Removed.
3441 (iv_stack_entry_is_iv): Removed.
3442 (loop_iv_stack_push_iv): Removed.
3443 (loop_iv_stack_insert_constant): Removed.
3444 (loop_iv_stack_pop): Removed.
3445 (loop_iv_stack_get_iv): Removed.
3446 (loop_iv_stack_get_iv_from_name): Removed.
3447 (debug_loop_iv_stack): Removed.
3448 (free_loop_iv_stack): Removed.
3449 (loop_iv_stack_remove_constants): Removed. *
3450 sese.h (iv_stack_entry_kind): Removed.
3451 (iv_stack_entry_data_union): Removed.
3452 (iv_stack_entry_struct): Removed.
3453 (iv_stack_entry_p): Removed.
3454 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
3455 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
3456 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
3457 loop_iv_stack_pop, free_loop_iv_stack): Removed.
3458 (gbb_loop_at_index): Fix indenting.
3459 (gbb_loop_index): Removed.
3461 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3463 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
3464 Call clast_name_to_index.
3466 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3468 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
3469 do not pass params. Get params from SESE_PARAMS.
3470 (clast_to_gcc_expression): Same.
3471 (clast_to_gcc_expression_red): Same.
3472 (gcc_type_for_clast_eq): Same.
3473 (graphite_translate_clast_equation): Same.
3474 (graphite_create_new_loop): Same.
3475 * sese.c (rename_variables_in_stmt): Fix comment.
3477 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3479 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
3481 Call save_clast_name_index.
3482 (translate_clast): Pass newivs_index.
3483 (gloog): Create and free newivs_index.
3485 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3487 * graphite-clast-to-gimple.c (clast_name_index): New structure.
3488 (clast_name_index_p): New type.
3489 (debug_clast_name_index): New.
3490 (debug_clast_name_indexes_1): New.
3491 (debug_clast_name_indexes): New.
3492 (clast_name_index_elt_info): New.
3493 (eq_clast_name_indexes): New.
3494 (clast_name_to_index): New.
3495 (new_clast_name_index): New.
3496 (save_clast_name_index): New.
3497 (init_sese_params_index): New.
3498 (gloog): Call init_sese_params_index.
3499 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
3500 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
3501 (free_sese): Free SESE_PARAMS_INDEX.
3502 * sese.h (struct sese): Add params_index.
3503 (SESE_PARAMS_INDEX): New.
3505 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3507 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
3508 (graphite_create_new_loop): Pass the newivs vector. Push the
3509 newly created IV to newivs.
3510 (translate_clast): Pass the newivs vector.
3511 (gloog): Create and destroy the newivs vector.
3513 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
3515 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
3516 (graphite_loop_normal_form): Initialize loop->aux with the unique
3517 IV that has been created.
3519 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
3521 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
3522 scev with parameters in the base part. They where forbidden
3525 2009-05-11 Li Feng <nemokingdom@gmail.com>
3527 * gcc.dg/graphite/graphite.exp: Set different default
3528 compile options by file names.
3529 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
3530 * gcc.dg/graphite/id-{1-9}.c: Ditto.
3531 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
3532 * gcc.dg/graphite/scop-matmult.c: Ditto.
3534 2009-05-08 Li Feng <nemokingdom@gmail.com>
3536 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
3537 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
3538 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
3539 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
3541 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3543 * graphite-scop-detection (build_scops_1): Fix little bug introduced
3546 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
3548 * graphite-scop-detection.c (graphite_can_represent_scev): Only
3549 allow integer constant strides.
3550 (graphite_can_represent_expr): Depend on outermost_loop.
3551 (stmt_simple_memref_p, graphite_cannot_represent_loop,
3552 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
3553 build_scops_1): Same.
3554 (scopdet_basic_block_info): Same and insert layered SCoP
3556 (try_generate_gimple_bb): Cleanup.
3557 (build_scops): Enable data references.
3559 * gcc.dg/graphite/id-5.c: New.
3560 * gcc.dg/graphite/id-9.c: New.
3561 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
3562 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
3564 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3566 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
3567 that we have not yet built for this SCoP.
3569 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3571 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
3572 for complex numbers.
3574 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
3576 * graphite-ppl.c: Fix build if cloog is not available.
3578 2009-05-04 Li Feng <nemokingdom@gmail.com>
3580 * tree-parloops.c (loop_parallel_p): Remove construction of
3581 NITER and REDUCTION_LIST.
3582 (try_get_loop_niter): New.
3583 (try_create_reduction_list): New.
3584 (parallelize_loops): Bypass the failed checkings in autopar
3585 when can_be_parallel in loop structure is set to true.
3587 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3589 * gcc.dg/graphite/id-6.c: Update testcase.
3590 * gcc.dg/graphite/scop-3.c: Dito.
3592 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
3594 * graphite-scop-detection.c (stmt_simple_for_scop_p):
3595 Enable EQ_EXPR and NE_EXPR again.
3597 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3599 * graphite-scop-detection.c (graphite_can_represent_scev):
3600 Add check if scev is affine multivariate.
3601 (harmful_stmt_in_bb): Check if we can represent the conditions.
3602 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
3604 * gcc.dg/graphite/id-7.c: New.
3606 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
3608 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
3609 Check all bbs in region, not only the bbs that are represented in
3611 (build_poly_scop): Add newline.
3612 * gcc.dg/graphite/id-8.c: New.
3614 2009-04-30 Li Feng <nemokingdom@gmail.com>
3616 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
3617 when loop initialize.
3618 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
3619 * common.opt: Declare flag_graphite_force_parallel.
3620 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
3622 * graphite-poly.c (apply_poly_transforms): Introduce
3623 flag_graphite_force_parallel.
3624 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
3625 * toplev.c (process_options): ditto and replace a not correctly
3628 2009-04-30 Li Feng <nemokingdom@gmail.com>
3630 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
3631 Change the call of gbb_loop_at_index and/or gbb_loop_index due
3632 to the redefinition.
3633 (compute_cloog_iv_types_1): ditto.
3634 (build_iv_mapping): ditto.
3635 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
3637 (free_gimple_bb): Removed GBB_LOOPS related free part.
3638 (build_bb_loops): Removed.
3639 * sese.h (struct gimple_bb): Removed loops.
3640 (GBB_LOOPS): Removed.
3641 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
3642 (gbb_loop_index): ditto.
3644 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3646 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
3647 allow non constant strides.
3648 * gcc.dg/graphite/scop-20.c: New.
3650 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3652 * graphite-scop-detection.c (dot_all_scops): Fix system call
3653 return value warning.
3656 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3658 * gcc.dg/graphite/id-6.c: Fix pattern.
3659 * gcc.dg/graphite/scop-3.c: Same.
3661 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3663 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
3664 build_pairwise_constraint, dr_equality_constraints,
3665 build_pairwise_scheduling_equality,
3666 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3667 build_lexicographically_gt_constraint, dependence_polyhedron,
3668 graphite_legal_transform_dr, graphite_legal_transform_bb,
3669 graphite_legal_transform): New.
3670 * graphite-poly.h (graphite_legal_transform): Declared.
3671 * graphite-sese-to-poly.c (build_poly_scop): Call to
3672 graphite_legal_transform is disabled for the moment.
3674 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3676 * graphite-poly.h (pbb_nb_scattering_dims): New.
3677 (pbb_nb_scattering): Use it.
3679 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3681 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
3682 Pointset_Powerset version of ppl_insert_dimensions.
3683 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
3685 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3687 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
3689 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3691 * graphite-poly.h: Fix comment.
3693 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
3695 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
3697 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3699 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
3702 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
3704 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
3705 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
3708 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
3710 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
3711 handle EQ_EXPR and NE_EXPR.
3713 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
3715 * graphite-poly.h (poly_dr): Fix comment.
3717 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
3718 Tobias Grosser <grosser@fim.uni-passau.de>
3720 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
3721 with a zero dimension polyhedron.
3722 (find_scop_parameters): Move the call to scop_set_nb_params here.
3723 (build_loop_iteration_domains): Store in loop->aux the iteration
3725 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
3726 by any loop in scop.
3727 (build_poly_scop): Do not call scop_set_nb_params.
3729 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
3730 Tobias Grosser <grosser@fim.uni-passau.de>
3732 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
3733 add_condition_to_domain not GT_EXPR.
3735 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3737 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
3738 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
3739 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
3740 upper_bound_assign to calculate unions.
3741 * gcc.dg/graphite/id-6.c: New.
3743 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3745 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
3746 handle abnormal edges.
3748 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
3750 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
3751 (free_poly_bb): Also free poly_drs.
3752 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
3753 (poly_dr): Polyhedron to Pointset_Powerset.
3754 (pdr_accessp_nb_subscripts): Same.
3755 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
3758 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3760 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
3761 names into more meaningful names.
3763 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3765 * gfortran.dg/graphite/interchange-1.c: New.
3766 * gfortran.dg/graphite/interchange-2.c: New.
3768 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3770 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
3772 * tree-parloops.c (rewrite_phi_with_iv): New.
3773 (rewrite_all_phi_nodes_with_iv): New.
3774 (canonicalize_loop_ivs): Call them.
3776 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3778 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
3779 graphite_find_data_references_in_stmt.
3780 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
3781 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
3783 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3785 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
3787 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3789 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
3790 instead of bb_in_region.
3791 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
3792 (build_sese_conditions): Use flag_bb_in_sese.
3793 * sese.c (register_bb_in_sese): Removed.
3794 (new_sese): Remove initialization of SESE_REGION_BBS.
3795 (free_sese): Do not free SESE_REGION_BBS.
3796 * sese.h (struct sese): Remove field region_basic_blocks.
3797 (SESE_REGION_BBS): Removed.
3798 (bb_in_sese_p): Implement in function of bb_in_region.
3800 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
3802 * graphite-scop-detection.c (limit_scops): Deal only with single exit
3805 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
3807 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
3809 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
3810 (add_condition_to_domain): New.
3811 (add_condition_to_pbb): New.
3812 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
3813 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
3815 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
3817 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
3818 ppl_Pointset_Powerset.
3819 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
3820 * graphite-poly.h (poly_bb): poly_bb.domain Same.
3821 (pbb_nb_loops): Same.
3822 * graphite-sese-to-poly.c (build_loop_iteration_domains,
3823 add_conditions_to_domain): Same.
3824 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
3825 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
3826 ppl_const_Polyhedron_t.
3827 (ppl_print_powerset_matrix): New.
3828 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
3829 ppl_print_powerset_matrix): New.
3830 (ppl_print_polyhedron_matrix): Updated.
3832 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
3834 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
3836 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
3838 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
3839 (print_iteration_domains, debug_iteration_domain,
3840 debug_iteration_domains): New.
3841 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
3842 debug_iteration_domains): Declared.
3843 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
3846 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
3847 Sebastian Pop <sebastian.pop@amd.com>
3849 * graphite-poly.h (print_iteration_domain): New.
3850 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
3851 (build_sese_conditions_1, build_sese_conditions_after,
3852 build_sese_conditions_before): New.
3853 (build_sese_conditions): Rewritten.
3855 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
3856 Tobias Grosser <grosser@fim.uni-passau.de>
3858 Cleanup of code generation liveouts.
3859 * graphite-clast-to-gimple.c (translate_clast): Use a single
3860 rename_map instead of one per translated statement.
3861 Do not use SESE_LIVEOUT_RENAMES.
3862 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
3863 (gloog): Do not use SESE_LIVEOUT_RENAMES.
3864 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
3865 phi node of a reduction: when a loop contains a reduction used outside
3866 the loop, there should be a scalar close phi node on the exit block.
3867 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
3868 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
3869 (free_sese): Do not free them.
3870 (sese_build_liveouts_use): Do not use them.
3871 (sese_build_liveouts_bb): Same.
3872 (sese_build_liveouts): Same.
3873 (sese_insert_phis_for_liveouts): Same.
3874 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
3875 (defined_in_loop_p): New.
3876 (alive_after_loop): New.
3877 (close_phi_not_yet_inserted_p): New.
3878 (struct alep, alep_p): New.
3879 (add_loop_exit_phis): Remove from the rename_map all the names defined
3880 in the code generated loop.
3881 (insert_loop_close_phis): Traverse the rename_map passed to it.
3882 Don't use SESE_LIVEOUT_RENAMES.
3883 (default_liveout_before_guard): Renamed default_before_guard.
3884 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
3885 (graphite_copy_stmts_from_block): Do not directly call set_rename.
3886 (register_sese_liveout_renames): Removed.
3887 (copy_bb_and_scalar_dependences): Do not call it.
3888 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
3890 (SESE_LIVEOUT): Removed.
3891 (SESE_LIVEOUT_RENAMES): Removed.
3892 (SESE_REDUCTION_LIST): Removed.
3893 (sese_build_liveouts): Removed.
3894 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
3895 (insert_loop_close_phis): Pass a htab_t instead of a sese.
3896 (insert_guard_phis): Same.
3897 (rename_map_elt): Declare a VEC of them.
3898 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3899 trees not pointers to trees.
3901 Rewrite in canonical close SSA form:
3902 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
3903 (limit_scops): Close the scop after the block containing the close phi
3905 (canonicalize_loop_closed_ssa): New.
3906 (canonicalize_loop_closed_ssa_form): New.
3907 (build_scops): Call canonicalize_loop_closed_ssa_form.
3909 * graphite-sese-to-poly.c: Fix typos.
3911 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
3913 * graphite-poly.c (print_scattering_function, print_pbb_domain):
3915 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
3916 (print_pbb): Add conditions.
3918 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
3919 Sebastian Pop <sebastian.pop@amd.com>
3921 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
3922 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
3923 (build_scop_bbs_1): New.
3924 (build_scop_bbs): Rewrite.
3925 * sese.h (bb_in_region): New.
3927 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3929 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
3931 (print_scop): Style.
3932 * graphite-poly.h (poly_bb): Add drs vector.
3933 (PBB_DRS): Add accessor.
3934 * graphite-sese-to-poly.c (build_poly_dr): New.
3935 (build_pbb_drs, build_scop_drs): New.
3936 (build_poly_scop): call build_scop_drs (Disabled at the moment).
3938 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3940 * tree-ssa-loop.c: Include forgotten toplev.h
3942 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
3944 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
3945 * gcc.dg/graphite/pr37883.c: Remove -floop-*
3946 * gcc.dg/graphite/pr37928.c: Same
3947 * gcc.dg/graphite/pr38409.c: Same
3948 * gcc.dg/graphite/pr38498.c: Same
3949 * gcc.dg/graphite/pr38559.c: Same
3950 * gcc.dg/graphite/pr39335.c: Same
3951 * gcc.dg/graphite/pr39335_1.c: Same
3952 * gfortran.dg/graphite/block-2.f: Same
3953 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
3956 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
3958 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
3959 build_access_matrix, build_scop_data_accesses): Remove access function
3960 building. (We get a new version soon).
3961 (build_bb_loops, scan_tree_for_params_right_scev): Update.
3962 * sese.h (nb_loops_around_loop_in_sese): Remove.
3963 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
3965 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
3966 Sebastian Pop <sebastian.pop@amd.com>
3968 * graphite-scop-detection.c (struct scopdet_info): Rename last
3970 (scopdet_basic_block_info, build_scops_1): Don't use
3971 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
3973 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
3974 Sebastian Pop <sebastian.pop@amd.com>
3976 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
3977 * sese.c (sese_build_liveouts_use): Renamed from
3978 sese_build_livein_liveouts_use. Remove liveins.
3979 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
3980 Call sese_build_liveouts_use.
3981 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
3982 Call sese_build_liveouts_bb.
3983 (new_sese, free_sese): Remove liveins.
3984 (sese_add_exit_phis_var): Deleted.
3985 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
3987 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
3989 * sese.h (sese): Remove num_ver and livein.
3990 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
3992 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
3994 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
3996 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
3998 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
3999 (build_scop_scattering): Do not use compare_prefix_loops any more.
4000 (nb_common_loops): New.
4002 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4004 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4005 (register_old_and_new_names): Renamed set_rename.
4007 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4009 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4010 of the decl from the previous commit.
4012 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4014 * graphite-scop-detection.c (dot_scop): New.
4015 * graphite-scop-detection.h (dot_scop): Declared.
4017 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4019 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4021 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4023 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4024 condition at the end of the loop.
4025 * graphite.c (graphite_initialize, graphite_finalize): Print to
4026 dump_file the compiled function.
4027 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4028 of create_empty_loop_on_edge.
4029 (translate_clast): Update the code generation of loops for the new
4031 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4033 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4035 Reverted the patch from 2009-03-19.
4037 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4039 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4041 (print_scop): Style.
4042 * graphite-poly.h (poly_bb): Add drs vector.
4043 (PBB_DRS): Add accessor.
4044 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4045 (build_access_matrix_with_af, build_access_matrix,
4046 build_scop_data_accesses): Delete.
4047 (build_poly_dr): New.
4048 (build_pbb_drs, build_scop_drs): New.
4049 (build_poly_scop): call build_scop_drs.
4051 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4053 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4054 once per basic block.
4056 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4058 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4059 (graphite_can_represent_expr): Renamed from loop_affine_expr
4061 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4062 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4063 (scopdet_basic_block_info): Actually define entry_block.
4064 (stmt_simple_memref_p): Moved here from ...
4066 * tree-data-ref.c (stmt_simple_memref_p): here.
4067 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4069 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4071 * gcc.dg/graphite/id-4.c: New.
4073 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4075 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4076 (register_old_and_new_names): Update the content of the map.
4077 When there was already a rename_map_elt in the map at that
4079 (copy_bb_and_scalar_dependences): Do rename_variables after
4080 expand_scalar_variables.
4081 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4082 of the map. When there was already a rename_map_elt in the
4083 map at that location, free it.
4084 (translate_clast): Pass the rename_map. Do not initialize and free
4085 a rename_map per stmt_user.
4086 (gloog): Initialize and free one rename_map and pass it to
4089 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4091 * sese.c (expand_scalar_variables_stmt,
4092 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4094 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4095 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4096 the gimple_stmt_iterator of the statement to be expanded.
4097 * graphite-scop-detection.c (is_simple_operand): Do handle
4100 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4102 * graphite-scop-detection.c (is_simple_operand): Do not handle
4104 * gcc.dg/graphite/id-2.c: New.
4106 * graphite-sese-to-poly.c (build_bb_loops,
4107 add_value_to_dim, scan_tree_for_params_right_scev,
4108 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4109 find_params_in_bb, build_loop_iteration_domains,
4110 add_conditions_to_domain): Remove subtract.
4112 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4114 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4115 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4116 pbb_loop_at_index -> gbb_loop_at_index.
4117 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4118 (debug_loop_vec): Delete.
4119 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4120 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4121 (PBB_LOOPS): Removed.
4122 (PBB_BLACK_BOX): Insert cast.
4123 (pbb_set_black_box): New setter.
4124 (pbb_loop_at_index, pbb_loop_index): Removed.
4125 (scop_set_region, scop_set_nb_params): New.
4126 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4127 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4128 (build_poly_scop): Use scop_set_nb_params.
4129 * sese.h (gimple_bb): Add LOOPS.
4130 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4132 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4134 Revert previous commit.
4136 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4138 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4139 (register_old_and_new_names): Update the content of the map.
4140 When there was already a rename_map_elt in the map at that
4142 (copy_bb_and_scalar_dependences): Do rename_variables after
4143 expand_scalar_variables.
4144 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4145 of the map. When there was already a rename_map_elt in the
4146 map at that location, free it.
4147 (translate_clast): Pass the rename_map. Do not initialize and free
4148 a rename_map per stmt_user.
4149 (gloog): Initialize and free one rename_map and pass it to
4152 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4154 Remove forgotten line in revert.
4156 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4158 Revert previous commit.
4160 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4162 * sese.c (register_old_and_new_names): Update the content
4163 of the map. When there was already a rename_map_elt in the
4164 map at that location, free it.
4165 (copy_bb_and_scalar_dependences): Do rename_variables after
4166 expand_scalar_variables.
4167 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4168 of the map. When there was already a rename_map_elt in the
4169 map at that location, free it.
4170 (translate_clast): Pass the rename_map. Do not initialize and free
4171 a rename_map per stmt_user.
4172 (gloog): Initialize and free one rename_map and pass it to
4175 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4177 * graphite-clast-to-gimple.c (translate_clast): context_loop
4180 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4181 Sebastian Pop <sebastian.pop@amd.com>
4183 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4184 of the use of ppl_Polyhedron_map_space_dimensions.
4186 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4187 Sebastian Pop <sebastian.pop@amd.com>
4189 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4190 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4191 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4192 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4193 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4194 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4195 pbb_nb_params): New.
4196 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4197 nb_loops_around_pbb): Adapt return types.
4199 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4201 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4202 graphite-clast-to-gimple.o, graphite-data-ref.o,
4203 graphite-scop-detection.o, graphite-poly.o): Add
4206 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4208 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4209 graphite-clast-to-gimple.o, graphite-data-ref.o,
4210 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4212 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4214 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4215 * gcc.dg/graphite/pr37828.c: Same.
4216 * gcc.dg/graphite/pr37684.c: Same.
4217 * gcc.dg/graphite/block-0.c: Same.
4218 * gcc.dg/graphite/block-1.c: Same.
4219 * gcc.dg/graphite/block-2.c: Same.
4220 * gcc.dg/graphite/block-3.c: Same.
4221 * gcc.dg/graphite/block-4.c: Same.
4222 * gcc.dg/graphite/block-5.c: Same.
4223 * gcc.dg/graphite/block-6.c: Same.
4224 * gfortran.dg/graphite/pr38083.f90: Same.
4225 * gfortran.dg/graphite/block-1.f90: Same.
4226 * gfortran.dg/graphite/block-3.f90: Same.
4227 * gfortran.dg/graphite/pr37852.f90: Same.
4228 * gfortran.dg/graphite/block-4.f90: Same.
4229 * gfortran.dg/graphite/pr37980.f90: Same.
4230 * gfortran.dg/graphite/pr38953.f90: Same.
4231 * gfortran.dg/graphite/pr37857.f90: Same.
4232 * opts.c: Remove -floop-block from -O2.
4233 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4234 -floop-strip-mine are used.
4236 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4237 Sebastian Pop <sebastian.pop@amd.com>
4239 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4241 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4242 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4243 strip_mine_profitable_p, is_interchange_valid,
4244 graphite_trans_bb_block, graphite_trans_loop_block,
4245 graphite_trans_scop_block): Temporary removed.
4246 (extend_scattering, unify_scattering_dimensions): New.
4247 (print_scattering_function, graphite_read_transforms):
4248 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4249 (graphite_generate_scattering_fns): Removed.
4250 (apply_poly_transforms): Cleanup.
4251 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4252 (schedule_to_scattering): Moved.
4253 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4254 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4255 (pbb_nb_scattering): New.
4256 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4257 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4259 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4261 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4262 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4263 -> PBB_TRANSFORMED_SCATTERING.
4264 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4265 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4266 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4267 (check_poly_representation): Do not return bool.
4268 (graphite_transform_loops): Reformat.
4269 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4271 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4273 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4274 debug_pbb_domain, debug_pbb, debug_scop): New.
4275 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4276 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4278 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4281 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4282 when the type precision of the induction variable should be
4283 larger than the type precision of nit.
4284 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4285 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
4286 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
4288 * gcc.dg/graphite/pr39335_1.c: New.
4289 * gcc.dg/graphite/pr39335.c: New.
4291 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4293 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4294 SSA_NAMES not struct reduction_info.
4296 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4298 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
4300 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4301 Tobias Grosser <grosser@fim.uni-passau.de>
4303 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
4304 (free_sese): Free SESE_REDUCTION_LIST.
4305 * sese.h (struct sese): Add field reduction_list.
4306 (SESE_REDUCTION_LIST): New.
4307 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
4308 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
4310 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4311 Tobias Grosser <grosser@fim.uni-passau.de>
4313 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
4316 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
4317 Tobias Grosser <grosser@fim.uni-passau.de>
4319 * tree-parloops.c (struct brli, build_reduction_list_info,
4320 analyze_reduction_list, gather_scalar_reductions): New.
4321 (loop_parallel_p): Build a reduction list containing only
4322 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
4323 (gen_parallel_loop): Call the analysis analyze_reduction_list.
4324 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
4325 * tree-flow.h (gather_scalar_reductions): Declared.
4327 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
4330 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
4331 number_of_iterations_exit from a gcc_assert.
4333 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
4334 Jan Sjodin <jan.sjodin@amd.com>
4336 * output.h (graphite_out_file, graphite_in_file): Declared.
4337 * toplev.c (graphite_out_file, graphite_in_file): New.
4338 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
4339 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
4340 Don't call schedule_to_scattering.
4341 * common.opt (fgraphite-write, fgraphite-read): New.
4342 * graphite-poly.c: Include output.h.
4343 (print_scattering_function, print_scattering_functions,
4344 debug_scattering_function, debug_scattering_functions,
4345 graphite_write_transforms, graphite_read_transforms,
4346 graphite_generate_scattering_fns): New.
4347 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
4348 Call graphite_generate_scattering_fns, graphite_write_transforms,
4349 graphite_read_transforms.
4350 (new_poly_bb): Initialize PBB_SCATTERING.
4351 (free_poly_bb): Free PBB_SCATTERING.
4352 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
4353 * graphite-poly.h (struct poly_bb): Add field scattering.
4354 (PBB_SCATTERING): New.
4355 (print_scattering_function, print_scattering_functions,
4356 debug_scattering_function, debug_scattering_functions): Declared.
4357 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
4358 GMP values, not integers!
4359 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
4360 ppl_read_polyhedron_matrix): New.
4361 * graphite-ppl.h (ppl_print_polyhedron_matrix,
4362 debug_ppl_polyhedron_matrix,
4363 ppl_read_polyhedron_matrix): Declared.
4364 * Makefile.in (graphite-poly.o): Depends on output.h.
4366 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4367 Tobias Grosser <grosser@fim.uni-passau.de>
4370 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4371 scalar evolutions in the scop_entry->loop_father.
4373 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4374 Tobias Grosser <grosser@fim.uni-passau.de>
4376 * graphite.h (ref_nb_loops): Remove declaration.
4377 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
4378 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
4379 debug_gbb): Moved to sese.h.
4382 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4383 Tobias Grosser <grosser@fim.uni-passau.de>
4385 * graphite-data-ref.[ch]: Disable.
4387 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4388 Tobias Grosser <grosser@fim.uni-passau.de>
4390 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
4391 scalar evolutions in the scop_entry->loop_father.
4393 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4395 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
4396 (graphite_cannot_represent_loop_niter): Renamed
4397 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
4398 (limit_scops): build_sese_loop_nests does not return a bool.
4399 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
4400 * sese.c (nb_reductions_in_loop): ... from here.
4401 (graphite_loop_normal_form): ... from here.
4402 (sese_record_loop): Does not fail, so does not return a bool.
4403 (build_sese_loop_nests): Same.
4404 * sese.h (build_sese_loop_nests): Update declaration.
4405 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
4406 (build_graphite_loop_normal_form): New.
4407 (gloog): Call build_graphite_loop_normal_form.
4408 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
4409 build_sese_loop_nests.
4411 * gcc.dg/graphite/id-1.c: New.
4413 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
4414 Tobias Grosser <grosser@fim.uni-passau.de>
4416 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
4417 The SCoP detection fix is sufficient.
4419 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4421 PR tree-optimization/39260
4422 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
4423 the basic block contains a condition with a real type.
4424 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
4426 * gcc.dg/graphite/pr39260.c: New.
4428 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
4430 * graphite-poly.c: Inlcude params.h.
4431 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
4433 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
4434 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
4436 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4437 Tobias Grosser <grosser@fim.uni-passau.de>
4439 * graphite-scop-detection.c (dot_all_scops_1,
4440 dot_all_scops): Moved here.
4441 * graphite-scop-detection.h (dot_all_scops): Declared here.
4442 * graphite.c (graphite_initialize, graphite_finalize): New.
4443 (graphite_transform_loops): Cleaned up.
4444 * sese.c (debug_oldivs): Moved here.
4445 * graphite-poly.c (graphite_apply_transformations): Renamed
4446 apply_poly_transforms.
4447 (debug_loop_vec): Moved here.
4448 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
4449 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
4450 find_scop_parameters, build_scop_iteration_domain,
4451 add_conditions_to_constraints, build_scop_canonical_schedules,
4452 build_scop_data_accesses): Now static.
4453 (build_poly_scop, check_poly_representation): New.
4455 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4457 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
4458 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
4459 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
4460 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
4461 scan_tree_for_params_right_scev, scan_tree_for_params_int,
4462 scan_tree_for_params, struct irp_data, dx_record_params,
4463 find_params_in_bb, find_scop_parameters, gbb_from_bb,
4464 build_loop_iteration_domains, add_conditions_to_domain,
4465 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
4466 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
4467 build_sese_conditions, add_conditions_to_constraints,
4468 build_scop_iteration_domain, build_access_matrix_with_af,
4469 build_access_matrix,
4470 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
4472 * graphite-sese-to-poly.c: New.
4473 * graphite-sese-to-poly.h: New.
4475 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
4477 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4479 * graphite.c: Split graphite code generation to a new file.
4480 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
4481 max_precision_type, clast_to_gcc_expression_red,
4482 clast_to_gcc_expression, gcc_type_for_clast_expr,
4483 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
4484 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
4485 graphite_create_new_guard, clast_get_body_of_loop,
4486 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
4487 graphite_create_new_loop, build_iv_mapping, copy_renames,
4488 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4489 compute_cloog_iv_types, free_scattering, save_var_name,
4490 initialize_cloog_names, build_scop_context, build_cloog_prog,
4491 set_cloog_options, debug_clast_stmt, scop_to_clast,
4492 print_generated_program, debug_generated_program,
4493 gloog): Moved to graphite-clast-to-gimple.c.
4495 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
4497 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
4498 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
4499 loop_iv_stack_pop, loop_iv_stack_get_iv,
4500 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
4501 free_loop_iv_stack, loop_iv_stack_remove_constants,
4502 debug_rename_elt, debug_rename_map_1, debug_rename_map,
4503 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
4504 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
4505 eq_ivtype_map_elts, sese_add_exit_phis_edge,
4506 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
4507 get_vdef_before_sese, sese_adjust_vphi,
4508 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
4509 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
4510 is_iv, expand_scalar_variables_ssa_name,
4511 expand_scalar_variables_expr, expand_scalar_variables_stmt,
4512 expand_scalar_variables, rename_variables, remove_condition,
4513 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
4514 add_loop_exit_phis, insert_loop_close_phis, struct igp,
4515 default_liveout_before_guard, add_guard_exit_phis,
4516 insert_guard_phis, register_old_and_new_names,
4517 graphite_copy_stmts_from_block, register_sese_liveout_renames,
4518 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
4519 if_region_set_false_region, create_if_region_on_edge,
4520 move_sese_in_condition): Moved to sese.c.
4522 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
4523 if_region_exit, if_region_get_condition_block,
4524 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
4525 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
4526 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
4527 ivtype_map_elt, new_ivtype_map_elt,
4528 recompute_all_dominators): Moved to sese.h.
4530 * graphite-clast-to-gimple.c: New.
4531 * graphite-clast-to-gimple.h: New.
4532 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
4533 * sese.c: Modified as said above.
4536 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
4538 * graphite.c: Split scop detection to a new file.
4539 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
4540 move_sd_regions, loop_affine_expr, exclude_component_ref,
4541 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
4542 graphite_cannot_represent_loop_niter, struct scopdet_info,
4543 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
4544 find_single_entry_edge, find_single_exit_edge,
4545 create_single_entry_edge, sd_region_without_exit,
4546 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
4547 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
4548 Moved to graphite-scop-detection.c.
4550 * graphite-scop-detection.c: New.
4551 * graphite-scop-detection.h: New.
4552 * Makefile.in: Add new rule for graphite-scop-detection.o.
4554 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
4555 tree-scalar-evolution.h.
4556 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
4557 build_sese_loop_nests): Moved here from graphite.c.
4558 (param_index): Renamed parameter_index_in_region.
4560 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4561 Sebastian Pop <sebastian.pop@amd.com>
4563 * gcc.dg/graphite/block-0.c: Expected to fail now.
4564 * gcc.dg/graphite/block-1.c: Same.
4565 * gcc.dg/graphite/block-5.c: Same.
4566 * gcc.dg/graphite/block-6.c: Same.
4568 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
4569 Sebastian Pop <sebastian.pop@amd.com>
4571 * graphite.h: Separate from graphite_bb_p the polyhedral
4572 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
4573 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
4574 graphite-data-ref.h.
4575 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
4576 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
4577 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
4578 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4579 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
4580 scop_nb_params): Moved to graphite-poly.h.
4581 * graphite-data-ref.c: Same.
4582 * graphite-data-ref.h: New.
4584 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
4585 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
4586 is_interchange_valid, graphite_trans_bb_block,
4587 graphite_trans_loop_block, scop_max_loop_depth,
4588 graphite_trans_scop_block, graphite_apply_transformations,
4589 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
4591 * graphite-poly.h: New.
4592 * graphite-poly.c: New.
4593 * Makefile.in (OBJS-common): Add graphite-poly.o.
4594 (graphite-poly.o): New rule.
4595 * tree-data-ref.h (struct data_reference): Remove unused scop field.
4598 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4599 Tobias Grosser <grosser@fim.uni-passau.de>
4601 * graphite.c: Replace gb -> gbb.
4603 * graphite-data-ref.c: Same.
4605 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
4606 Tobias Grosser <grosser@fim.uni-passau.de>
4608 * Makefile.in (OBJS-commmon): Add sese.o.
4610 (graphite.o): Add sese.h.
4611 * graphite.c (bb_in_ss_p, loop_in_sese_p,
4612 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
4613 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
4615 (block_before_scop): Add missing return.
4616 (new_scop, free_scop): Remove SESE data structures.
4617 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
4618 find_scop_parameters, build_loop_iteration_domains,
4619 add_conditions_to_domain, register_scop_liveout_renames,
4620 copy_bb_and_scalar_dependences): Scop -> SESE.
4622 (add_conditions_to_domain): SCoP -> SESE and remove check
4623 (scop_contains_non_iv_scalar_phi_nodes): New.
4624 (build_scop_conditions_1, build_scop_conditions): Remove check for
4625 non iv scalar phi nodes.
4626 (print_scop_statistics): New.
4627 (graphite_transform_loops): Cleanup.
4629 * graphite.h: Move to sese & cleanup.
4633 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4634 Tobias Grosser <grosser@fim.uni-passau.de>
4636 * graphite.c (build_scop_conditions_1): Conditions are only
4637 at the end of a basic block.
4639 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4640 Tobias Grosser <grosser@fim.uni-passau>
4642 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
4644 (GBB_ALPHA): Removed.
4646 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4647 Tobias Grosser <grosser@fim.uni-passau.de>
4649 * graphite-data-ref.c (graphite_test_dependence): Don't use
4650 GBB_DYNAMIC_SCHEDULE.
4651 * graphite.c (new_graphite_bb): Same.
4652 (free_graphite_bb): Same.
4653 (build_scop_dynamic_schedules): Removed.
4654 (graphite_transform_loops): Don't call it.
4655 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
4656 (GBB_DYNAMIC_SCHEDULE): Removed.
4658 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4659 Tobias Grosser <grosser@fim.uni-passau.de>
4661 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
4662 (print_graphite_bb): Same.
4663 (build_cloog_prog): Same.
4665 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4666 Tobias Grosser <grosser@fim.uni-passau.de>
4668 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
4670 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4671 Tobias Grosser <grosser@fim.uni-passau.de>
4673 * graphite.c (build_scop_context): Don't use CloogMatrix.
4674 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
4675 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
4677 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4678 Tobias Grosser <grosser@fim.uni-passau.de>
4680 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
4681 liveout_renames, add_params fields...
4682 (struct sese): ... here.
4683 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
4684 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
4686 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4687 Tobias Grosser <grosser@fim.uni-passau.de>
4689 * graphite.c (print_scop): Do not print the CLooG program.
4690 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
4691 build_cloog_prog, gloog): Don't use SCOP_PROG.
4692 (find_transform): Renamed scop_to_clast.
4693 (print_generated_program, debug_generated_program): New.
4694 (graphite_transform_loops): Adapt to new interface.
4695 * graphite.h (struct scop): Remove program field.
4696 (SCOP_PROG): Removed.
4697 (print_generated_program, debug_generated_program): Declared.
4699 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
4701 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
4702 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
4703 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
4704 free_graphite_bb, build_scop_canonical_schedules,
4705 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
4706 schedules are now represented using a ppl_Linear_Expression_t.
4707 * graphite.h (struct graphite_bb): Same.
4708 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
4709 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
4711 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
4713 * graphite.c: Free local memory.
4714 * graphite-ppl.c: Same.
4716 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
4718 * graphite.c (const_column_index, get_first_matching_sign_row_index,
4719 get_lower_bound_row, get_upper_bound_row, copy_constraint,
4720 swap_constraint_variables, scale_constraint_variable): Removed.
4721 (graphite_trans_bb_strip_mine): Remove pong.
4722 * graphite-ppl.c: Include missing header files.
4723 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
4724 * graphite-ppl.h (ppl_strip_loop): Declared.
4725 * Makefile.in (graphite-ppl.o): Adjust dependences.
4727 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
4729 * graphite.c (build_loop_iteration_domains): Remove ping pong.
4730 (build_scop_iteration_domain): Same.
4732 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
4734 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
4736 (add_value_to_dim, scan_tree_for_params_right_scev,
4737 scan_tree_for_params_int): New.
4738 * graphite-ppl.c (oppose_constraint): New.
4739 (insert_constraint_into_matrix): Implement missing cases.
4740 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
4742 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
4744 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
4745 use ppl_move_dimension.
4747 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
4749 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
4752 * graphite-ppl.c: Same.
4753 * graphite-ppl.h: Same.
4755 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
4757 Revert last 3 commits.
4759 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4761 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
4763 (add_value_to_dim, scan_tree_for_params_right_scev,
4764 scan_tree_for_params_int): New.
4765 * graphite-ppl.c (oppose_constraint): New.
4766 (insert_constraint_into_matrix): Implement missing cases.
4767 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
4769 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4771 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
4773 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4774 Tobias Grosser <grosser@fim.uni-passau.de>
4776 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
4777 use ppl_move_dimension.
4778 * graphite-ppl.c (ppl_move_dimension): New.
4779 * graphite-ppl.h (ppl_move_dimension): Declared.
4781 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
4783 * graphite.c: Do not include cloog/cloog.h.
4784 (print_graphite_bb): Remove ping pong, call PPL print function.
4786 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
4788 * Makefile.in (OBJS-common): Add graphite-ppl.o.
4789 (graphite.o): Add dependence on graphite-ppl.h.
4790 (graphite-ppl.o): New.
4791 (graphite-data-ref.c): Ping pong between PPL data structures
4793 * graphite-ppl.c: New.
4794 * graphite-ppl.h: New.
4795 * graphite.c: Include graphite-ppl.h.
4796 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
4797 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
4798 Ping pong between PPL data structures and matrices.
4799 (new_graphite_bb): Create a PPL constraint system.
4800 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
4801 (build_loop_iteration_domains): Use PPL functions.
4802 * graphite.h: Include graphite-ppl.h. Fix comments.
4803 (graphite_bb): Use a ppl_Constraint_System_t instead of
4804 CloogMatrix for representing the domain.
4805 (scop): Remove static_schedule.
4806 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
4808 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
4810 * graphite.c: Fix some comments.
4812 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
4815 * graphite.c (if_region_set_false_region): After moving a region
4816 in the false branch of a condition, remove the empty dummy
4818 (gloog): Remove wrong fix for PR38953.
4820 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
4822 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
4823 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
4824 register_bb_in_sese, new_sese, free_sese): Moved.
4825 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
4826 outermost_loop_in_scop, build_scop_iteration_domain,
4827 expand_scalar_variables_ssa_name, get_vdef_before_scop,
4828 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
4829 Use loop_in_sese_p instead of loop_in_scop_p.
4830 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
4831 (free_scop): Do not free SCOP_BBS_B.
4832 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
4833 ref_nb_loops): Moved here...
4834 * graphite.h (ref_nb_loops): ... from here.
4835 (struct scop): Remove bbs_b bitmap.
4836 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
4837 * gcc.dg/graphite/scop-19.c: New
4839 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
4841 * graphite.c (scopdet_basic_block_info): Fix bug in scop
4844 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
4846 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4847 eq_loop_to_cloog_loop): Remove.
4848 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
4849 * graphite.h (struct scop): Remove loop2cloog_loop.
4850 (loop_domain_dim, loop_iteration_vector_dim): Remove.
4852 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
4854 * opts.c (decode_options): Only add graphite options to O2
4855 if we compile with graphite enabled.
4857 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
4859 * Merge from mainline (r143163:143684).
4861 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
4863 * graphite.c (debug_value): Removed.
4864 * graphite.h (debug_value): Removed.
4866 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4868 * passes.c (init_optimization_passes): Do not call pass_copy_prop
4869 after graphite: pass_copy_prop does not maintain a proper loop closed
4870 SSA form. pass_copy_prop should be fixed.
4872 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4874 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
4876 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
4878 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
4879 (gloog): Split the exit of the scop when the scop exit is a loop exit.
4880 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
4883 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
4885 * graphite.c (gloog): Return true when code gen succeeded.
4886 (graphite_transform_loops): Do not call cleanup_tree_cfg if
4887 the code of the function did not changed. After cleanup_tree_cfg
4888 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
4891 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
4893 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
4894 gimple_call_lhs is NULL.
4896 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
4897 Tobias Grosser <tobi.grosser@amd.com>
4899 * graphite.c (graphite_trans_scop_block): Do not block single
4902 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
4903 Tobias Grosser <tobi.grosser@amd.com>
4905 * graphite.c (build_scop_canonical_schedules): Start schedules at
4908 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
4909 Tobias Grosser <tobi.grosser@amd.com>
4911 * graphite.c (compare_prefix_loops): New.
4912 (build_scop_canonical_schedules): Rewritten.
4913 (graphite_transform_loops): Move build_scop_canonical_schedules
4914 after build_scop_iteration_domain.
4916 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4917 Tobias Grosser <tobi.grosser@amd.com>
4919 * graphite.c (add_conditions_to_domain): Add the loops to
4920 the dimension of the iteration domain. Do copy the domain
4921 only when it exists.
4922 (build_scop_conditions_1): Do not call add_conditions_to_domain.
4923 (add_conditions_to_constraints): New.
4924 (can_generate_code_stmt, can_generate_code): Removed.
4925 (gloog): Do not call can_generate_code.
4926 (graphite_transform_loops): Call add_conditions_to_constraints
4927 after building the iteration domain.
4929 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4930 Tobias Grosser <tobi.grosser@amd.com>
4931 Jan Sjodin <jan.sjodin@amd.com>
4933 * graphite.c (scan_tree_for_params): On substractions negate
4934 all the coefficients of the term.
4935 (clast_to_gcc_expression_red): New. Handle reduction expressions
4936 of more than two operands.
4937 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
4938 (get_vdef_before_scop): Handle also the case of default definitions.
4940 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
4943 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
4944 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
4945 (gloog): Do not call cleanup_tree_cfg.
4946 (graphite_transform_loops): Call cleanup_tree_cfg after all
4947 scops have been code generated.
4949 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
4951 * passes.c (init_optimization_passes): Schedule after
4952 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
4954 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
4956 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
4958 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
4959 Set the type of an expression to the type of its assign statement.
4960 (expand_scalar_variables_expr): Do not pass loop_p.
4961 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
4962 (copy_bb_and_scalar_dependences): Do not pass loop_p.
4963 (translate_clast): Update call to copy_bb_and_scalar_dependences.
4965 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
4967 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
4968 an expression to the gimple_expr_type of its assign statement.
4969 (expand_scalar_variables_expr): Stop recursion on tcc_constant
4972 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
4974 PR tree-optimization/38786
4975 * gcc.dg/graphite/pr38786.c: New.
4976 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
4977 the SSA_NAME case of expand_scalar_variables_expr.
4978 (expand_scalar_variables_expr): Also gather the scalar computation
4979 used to index the memory access.
4980 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
4981 the gimple_stmt_iterator where it inserts new code.
4983 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
4985 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
4987 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
4989 * opts.c (decode_options): Enable flag_graphite_identity and
4990 flag_loop_block in -O2 and above.
4992 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
4994 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
4995 Fix merge problem: replace with the file from trunk.
4997 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
4999 * Merge from mainline (r141727:143163).
5001 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5002 Jan Sjodin <jan.sjodin@amd.com>
5004 PR tree-optimization/38559
5005 * gcc.dg/graphite/pr38559.c: New.
5007 * graphite.c (debug_value, copy_constraint,
5008 swap_constraint_variables, scale_constraint_variable, ): New.
5009 (get_lower_bound, get_upper_bound): Removed.
5010 (graphite_trans_bb_strip_mine): Clean up this code that works
5011 only for constant number of iterations. Fully copy upper and
5012 lower bound constraints, not only the constant part of them.
5013 * graphite.h (debug_value): Declared.
5015 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5017 PR tree-optimization/38492
5018 PR tree-optimization/38498
5019 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5020 * tree-chrec.h (scev_is_linear_expression): Declared.
5021 * graphite.c (graphite_cannot_represent_loop_niter): New.
5022 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5023 (graphite_loop_normal_form): Use gcc_assert.
5024 (scan_tree_for_params): Use CASE_CONVERT.
5025 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5026 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5027 Use gcc_assert. Discard scops that contain unhandled cases.
5028 (build_scop_conditions): Return a boolean status for unhandled cases.
5029 (strip_mine_profitable_p): Print the loop number, not its depth.
5030 (is_interchange_valid): Pass the depth of the loop nest, don't
5031 recompute it wrongly.
5032 (graphite_trans_bb_block): Same.
5033 (graphite_trans_bb_block): Print tentative of loop blocking.
5034 (graphite_trans_scop_block): Do not print that the loop has been
5036 (graphite_transform_loops): Do not handle scops that contain condition
5039 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5041 * gcc.dg/graphite/block-0.c: Update test.
5042 * gcc.dg/graphite/block-1.c: Same.
5043 * gcc.dg/graphite/block-2.c: Remove xfail and test for
5045 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5046 * gcc.dg/graphite/block-3.c: New.
5047 * gcc.dg/graphite/pr38498.c: New.
5049 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5051 PR tree-optimization/38510
5052 * gcc.dg/graphite/pr38510.c: New.
5053 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5054 (translate_clast): Call recompute_all_dominators before
5056 (gloog): Call recompute_all_dominators before graphite_verify.
5058 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5060 PR tree-optimization/38492
5061 * graphite.c (rename_map_elt, debug_rename_elt,
5062 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5063 rename_map_elt_info, eq_rename_map_elts,
5064 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5065 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5066 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5067 (sese_build_livein_liveouts): New.
5068 (new_sese, free_sese): New.
5069 (new_scop): Call new_sese.
5070 (free_scop): Call free_sese.
5071 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5072 (register_old_new_names): Renamed register_old_and_new_names.
5073 (register_scop_liveout_renames, add_loop_exit_phis,
5074 insert_loop_close_phis, struct igp,
5075 default_liveout_before_guard, add_guard_exit_phis,
5076 insert_guard_phis, copy_renames): New.
5077 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5078 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5079 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5080 (scop_adjust_phis_for_liveouts): New.
5081 (gloog): Call scop_adjust_phis_for_liveouts.
5083 * graphite.h (struct sese): Documented. Added fields liveout,
5085 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5086 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5087 (struct scop): Added field liveout_renames.
5088 (SCOP_LIVEOUT_RENAMES): New.
5090 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5092 PR tree-optimization/38409
5093 * gcc.dg/graphite/pr38409.c: New.
5094 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5096 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5098 * graphite.c (gcc_type_for_cloog_iv): By default return
5100 (graphite_create_new_loop): Don't fold_convert the already
5101 fold_convert-ed expression.
5103 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5105 PR tree-optimization/38446
5106 * gcc.dg/graphite/pr38446.c: New.
5107 * graphite.c (register_bb_in_sese): New.
5108 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5109 looking at the bbs in the region.
5110 * graphite.h (sese): Add region_basic_blocks pointer set to
5111 structure and initialize at the time of defining new scop.
5113 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5115 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5116 (find_params_in_bb): Do not free data refs.
5117 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5119 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5121 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5122 * gcc.dg/graphite/scop-17.c: Same.
5123 * gcc.dg/graphite/block-5.c: New.
5124 * gcc.dg/graphite/block-6.c: New.
5125 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5126 * gcc.dg/graphite/pr37684.c: Same.
5127 * gcc.dg/graphite/block-2.c: Same.
5129 * graphite.c (struct ivtype_map_elt): New.
5130 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5131 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5132 gcc_type_for_cloog_iv): New.
5133 (loop_iv_stack_patch_for_consts): Use the type of the induction
5134 variable from the original loop, except for the automatically
5135 generated loops, i.e., in the case of a strip-mined loop, in
5136 which case there is no original loop: in that case just use
5138 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5139 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5140 (clast_name_to_gcc): Accept params to be NULL.
5141 (clast_to_gcc_expression): Take an extra parameter for the type.
5142 Convert to that type all the expressions built by this function.
5143 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5144 (graphite_translate_clast_equation): Compute the type of the
5145 clast_equation before translating its LHS and RHS.
5146 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5147 (graphite_create_new_loop): Compute the type of the induction
5148 variable before translating the lower and upper bounds and before
5149 creating the induction variable.
5150 (rename_variables_from_edge, rename_phis_end_scop): New.
5151 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5152 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5153 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5154 compute_cloog_iv_types): New.
5155 (gloog): Call compute_cloog_iv_types before starting the
5156 translation of the clast.
5158 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5159 (GBB_CLOOG_IV_TYPES): New.
5160 (debug_ivtype_map): Declared.
5161 (oldiv_for_loop): New.
5163 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5166 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5167 (param_index): Assert if parameter is not know after parameter
5169 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5170 (find_scop_parameters): Mark, that we have finished parameter
5172 (graphite_transform_loops): Move condition detection before parameter
5174 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
5175 * gfortran.dg/graphite/pr38459.f90: New.
5177 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5179 * graphite.c (graphite_transform_loops): Always call find_transform ()
5180 in ENABLE_CHECKING. So we test these code paths, even if we do not
5183 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5185 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5186 (print_scop): Ditto.
5188 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5191 Fix gfortran.dg/graphite/id-3.f90.
5192 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5193 regions more than once.
5195 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5197 Fix gfortran.dg/graphite/id-4.f90.
5198 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5201 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5203 Fix gfortran.dg/graphite/id-1.f90.
5204 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5205 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5206 (max_precision_type): New.
5207 (value_clast): Removed.
5208 (clast_to_gcc_expression): Be more careful to types of expressions.
5209 Use max_precision_type and update use of gmp_cst_to_tree.
5210 (graphite_translate_clast_equation): Use max_precision_type.
5211 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5212 use the type of the condition.
5213 (graphite_create_new_loop): Do not use integer_type_node, use the
5214 max_precision_type of lb and ub.
5216 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5218 * graphite.c (build_scops_1): Initialize open_scop.exit
5221 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5223 * gcc.dg/graphite/pr38084.c: New.
5224 * gfortran.dg/graphite/id-1.f90: New.
5225 * gfortran.dg/graphite/id-2.f90: New.
5226 * gfortran.dg/graphite/id-3.f90: New.
5227 * gfortran.dg/graphite/id-4.f90: New.
5228 * gfortran.dg/graphite/pr37857.f90: New.
5230 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5231 Jan Sjodin <jan.sjodin@amd.com>
5232 Harsha Jagasia <harsha.jagasia@amd.com>
5244 * gcc.dg/graphite/pr38073.c: New.
5245 * gcc.dg/graphite/pr37928.c: New.
5246 * gcc.dg/graphite/pr37883.c: New.
5247 * gcc.dg/graphite/pr38125.c: New.
5248 * gfortran.dg/graphite/pr38083.f90: New.
5249 * gfortran.dg/graphite/pr37852.f90: New.
5250 * gfortran.dg/graphite/pr37980.f90: New.
5252 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
5253 the number of detected scops. Copy exact same test for loop
5255 * gcc.dg/graphite/block-1.c: Fix the number of expected
5256 loops to be blocked as reductions are not handled.
5257 * gcc.dg/graphite/block-4.c: ...here. New.
5259 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5260 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5262 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5263 * Makefile.in (graphite.o): Depend on value-prof.h.
5264 (graphite.o-warn): Removed -Wno-error.
5265 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5266 to be a NULL pointer. Call update_stmt. Return the newly created
5267 cannonical induction variable.
5269 * graphite.h (debug_rename_map): Declared. Fix some comments.
5271 * graphite.c: Reimplement the code generation from graphite to gimple.
5272 Include value-prof.h.
5273 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5274 (get_old_iv_from_ssa_name): Removed.
5275 (graphite_stmt_p): New.
5276 (new_graphite_bb): Test for useful statements before building a
5277 graphite statement for the basic block.
5278 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5279 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5281 (recompute_all_dominators, graphite_verify,
5282 nb_reductions_in_loop, graphite_loop_normal_form): New.
5283 (scop_record_loop): Call graphite_loop_normal_form.
5284 (build_scop_loop_nests): Iterate over all the blocks of the
5285 function instead of relying on the incomplete information from
5286 SCOP_BBS. Return the success of the operation.
5287 (find_params_in_bb): Use the data from GBB_DATA_REFS.
5288 (add_bb_domains): Removed.
5289 (build_loop_iteration_domains): Don't call add_bb_domains.
5290 Add the iteration domain only to the basic blocks that have been
5291 translated to graphite.
5292 (build_scop_conditions_1): Add constraints only if the basic
5293 block have been translated to graphite.
5294 (build_scop_data_accesses): Completely disabled until data
5295 dependence is correctly implemented.
5296 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
5297 (remove_all_edges_1, remove_all_edges): Removed.
5298 (get_new_name_from_old_name): New.
5299 (graphite_rename_variables_in_stmt): Renamed
5300 rename_variables_in_stmt. Call get_new_name_from_old_name.
5301 Use replace_exp and update_stmt.
5302 (is_old_iv): Renamed is_iv.
5303 (expand_scalar_variables_stmt): Extra parameter for renaming map.
5304 Use replace_exp and update_stmt.
5305 (expand_scalar_variables_expr): Same. Use the map to get the
5306 new names for the renaming of induction variables and for the
5307 renaming of variables after a basic block has been copied.
5308 (expand_scalar_variables): Same.
5309 (graphite_rename_variables): Renamed rename_variables.
5310 (move_phi_nodes): Removed.
5311 (get_false_edge_from_guard_bb): New.
5312 (build_iv_mapping): Do not insert the induction variable of a
5313 loop in the renaming iv map if the basic block does not belong
5315 (register_old_new_names, graphite_copy_stmts_from_block,
5316 copy_bb_and_scalar_dependences): New.
5317 (translate_clast): Heavily reimplemented: copy basic blocks,
5318 do not move them. Finally, in call cleanup_tree_cfg in gloog.
5319 At each translation step call graphite_verify ensuring the
5320 consistency of the SSA, loops and dominators information.
5321 (collect_virtual_phis, find_vdef_for_var_in_bb,
5322 find_vdef_for_var_1, find_vdef_for_var,
5323 patch_phis_for_virtual_defs): Removed huge hack.
5324 (mark_old_loops, remove_dead_loops, skip_phi_defs,
5325 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
5326 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
5327 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
5328 if_region_get_condition_block, if_region_set_false_region,
5329 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
5330 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
5331 sese_add_exit_phis_edge, sese_add_exit_phis_var,
5332 rewrite_into_sese_closed_ssa): New.
5333 (gloog): Remove dead code. Early return if code cannot be
5334 generated. Call cleanup_tree_cfg once the scop has been code
5336 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
5337 block loops with less than two loops.
5338 (graphite_apply_transformations): Remove the call to
5339 scop_remove_ignoreable_gbbs.
5340 (limit_scops): When build_scop_loop_nests fails, continue on
5341 the next scop. Fix open_scop.entry.
5342 (graphite_transform_loops): Call recompute_all_dominators: force the
5343 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
5344 Call initialize_original_copy_tables and free_original_copy_tables
5345 to be able to copy basic blocks during code generation.
5346 When build_scop_loop_nests fails, continue on next scop.
5347 (value_clast): New union.
5348 (clast_to_gcc_expression): Fix type cast warning.
5350 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
5352 * Merge from mainline (r140838:141727).
5354 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5358 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
5360 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
5364 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
5365 exits and conditions.
5366 * gcc.dg/graphite/pr37943.c: New.
5368 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5371 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
5373 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
5375 * doc/invoke.texi: Fix spaces.
5377 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
5379 PR tree-optimization/37891
5380 Reverted last commit.
5381 * graphite.c (create_single_entry_edge): Set
5382 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5384 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
5385 Mitul Thakkar <mitul.thakkar@amd.com>
5387 * graphite.c (create_single_entry_edge): Set
5388 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
5390 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
5392 * doc/invoke.texi: Add -fgraphite-identity.
5393 * graphite.c (graphite_apply_transformations): Check for
5394 -fgraphite-identity.
5395 * toplev.c (process_options): Add flag_graphite_identity.
5396 * tree-ssa-loop.c: Add flag_graphite_identity.
5398 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5400 Undo changes from 2008-10-02:
5401 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5402 operand type when copying the operand to a variable of different type.
5403 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5404 with the IV name after increment.
5406 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
5407 Harsha Jagasia <harsha.jagasia@amd.com>
5409 PR tree-optimization/37828
5410 * gcc.dg/graphite/pr37828.c: New.
5411 * graphite.c (graphite_trans_loop_block): Do not loop block
5412 single nested loops.
5414 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
5415 Sebastian Pop <sebastian.pop@amd.com>
5417 * graphite.c (struct rename_map_elt, new_rename_map_elt,
5418 rename_map_elt_info, eq_rename_map_elts): New.
5419 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
5420 (expand_scalar_variables_expr): Change parameters.
5421 (expand_scalar_variables_stmt): Same.
5422 (expand_scalar_variables): Same.
5423 (graphite_rename_ivs): Rename graphite_rename_variables.
5424 (build_iv_mapping): New.
5425 (translate_clast): Call build_iv_mapping.
5426 * graphite.h (gbb_p): New name.
5428 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
5430 PR tree-optimization/37684
5431 * gcc.dg/graphite/pr37684.c: New.
5432 * graphite.c (exclude_component_ref): New.
5433 (is_simple_operand): Call exclude_component_ref.
5435 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
5436 Harsha Jagasia <harsha.jagasia@amd.com>
5438 PR tree-optimization/37485
5439 * gcc.dg/graphite/block-2.c: New
5440 * graphite.c (gmp_cst_to_tree): Moved.
5441 (iv_stack_entry_is_constant): New.
5442 (iv_stack_entry_is_iv): New.
5443 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
5444 (loop_iv_stack_insert_constant): New.
5445 (loop_iv_stack_pop): Use new datatpype.
5446 (loop_iv_stack_get_iv): Same.
5447 (loop_iv_stack_get_iv_from_name): Same.
5448 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
5449 (loop_iv_stack_patch_for_consts): New.
5450 (loop_iv_stack_remove_constants): New.
5451 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
5452 (translate_clast): Call loop_iv_stack_patch_for_consts and
5453 loop_iv_stack_remove_constants.
5454 (gloog): Use new datatype. Redirect construction edge to end
5455 block to avoid accidental deletion.
5456 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
5458 (union iv_stack_entry_data): New. Data in iv stack entry.
5459 (struct iv_stack_entry): New. Datatype for iv stack entries.
5461 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5463 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
5464 operand type when copying the operand to a variable of different type.
5466 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5468 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
5469 with the IV name after increment.
5471 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
5473 * Merge from mainline (r140164:140838).
5475 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5477 * graphite-data-ref.c: New.
5478 * graphite.c (print_scop): Also dump the dependence graph.
5479 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
5480 (new_scop): Initialize SCOP_DEP_GRAPH.
5481 (build_scop_dynamic_schedules): New.
5482 (build_access_matrix_with_af): Fixed column numbering.
5483 (graphite_transform_loops): Call build_scop_dynamic_schedules.
5484 * graphite.h: Add ifndef/define guards against multiple inclusion.
5485 (struct scop): Add dep_graph field.
5486 (SCOP_DEP_GRAPH): Defined.
5487 (ref_nb_loops): Fixed and moved to other position.
5488 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
5489 (nb_loops_around_loop_in_scop): New.
5490 (graphite_dump_dependence_graph): Declared.
5491 (graphite_build_rdg_all_levels): Declared.
5492 (graphite_test_dependence): Declared.
5493 * Makefile.in (graphite-data-ref.o): New target.
5495 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
5497 * Merge from mainline (139870:140164).
5499 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5501 * Merge from mainline (138275:139870).
5502 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
5503 the commits from trunk broke the niter detection.
5505 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
5507 * graphite.c: Add more documentation. Fix formatting.
5508 (debug_loop_vec, debug_oldivs, loop_iv_stack,
5509 loop_iv_stack_debug): Moved...
5510 (schedule_to_scattering): Move before use.
5511 (dot_all_scops): Include in "#if 0" the code for system
5514 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
5515 loop_iv_stack_debug): ...here.
5517 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
5519 * tree-phinodes.c (make_phi_node): Extern.
5520 (add_phi_node_to_bb): New.
5521 (create_phi_node): Call add_phi_node_to_bb.
5522 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
5523 (remove_statement): Handle case where stored phi was updated
5524 and is no longer the same.
5525 * graphite.c (is_parameter): New.
5527 (expand_scalar_variables_expr): New.
5528 (expand_scalar_variables_stmt): New.
5529 (expand_scalar_variables): New.
5530 (move_phi_nodes): Create new phi instead of moving old one.
5531 (translate_clast): Call expand_scalar_variables.
5532 (find_vdef_for_var_in_bb): Also scan regular definitions.
5533 (skip_phi_defs): New.
5534 (collect_scop_exit_phi_args): New.
5535 (patch_scop_exit_phi_args): New.
5536 (gloog): Patch phis after scop.
5537 * tree-flow.h: (add_phi_node_to_bb): Declared.
5538 (make_phi_node): Declared.
5540 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5542 * graphite.c (end_scop): Split the entry of the scop when it
5543 is the header of the loop in which the scop is ending.
5544 (build_scops_1, limit_scops): Update uses of end_scop.
5546 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
5548 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
5549 SCOP_ENTRY or SCOP_EXIT.
5551 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5553 * graphite.c (get_construction_edge): Removed.
5554 (gloog): Construction edge is the scop entry edge.
5556 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5558 * graphite.c (can_generate_for_scop): Removed.
5559 (gloog): Do not call it.
5561 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5563 * graphite.c (new_scop): Entry of a scop is an edge.
5564 Initialize SESE region.
5565 (free_scop): Free SESE region.
5566 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
5567 (split_difficult_bb): New, split from end_scop.
5568 (end_scop): Exit of a scop is an edge.
5569 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
5570 not automatically updated and thus is always wrong.
5571 * graphite.h (struct sese): New.
5574 (struct scop): New field for a SESE region. Remove entry, exit.
5575 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
5576 semantics as before. Moved comment around.
5578 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5579 Sebastian Pop <sebastian.pop@amd.com>
5581 * graphite.c (graphite_transform_loops): Always enable gloog
5582 and find_transform when ENABLE_CHECKING.
5584 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5586 * graphite.c (graphite_transform_loops): Move pretty printer
5587 of SCOPs before doing any transform. Remove call to print_scops
5588 and dot_all_scops_1.
5590 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5592 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
5593 (print_graphite_bb): Same.
5595 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5597 * graphite.c (dot_all_scops_1): Cleanup.
5598 (move_scops): Fix comment.
5600 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
5602 * graphite.c (build_scop_bbs): Revert commit 139355:
5604 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5605 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5607 * graphite.c (build_scop_bbs): Factor up code.
5609 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5611 * graphite.c (gloog): Update dominator info.
5613 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
5615 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
5617 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5619 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
5621 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
5622 (translate_clast): Correct formatting.
5623 * graphite.h (struct num_map): Removed.
5624 (struct graphite_bb): Remove num_map field.
5625 (GBB_INDEX_TO_NUM_MAP): Removed.
5627 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5629 * graphite.c (build_access_matrix_with_af): Fix comments.
5630 (build_scop_data_accesses): Same.
5632 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5634 * graphite.c (build_scop_data_accesses): Don't construct
5635 access matrices. Add a FIXME and an assert condition that
5636 should pass when the access matrices will be needed.
5638 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
5640 * tree-data-ref.c (stmt_simple_memref_p): Don't call
5642 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
5643 Moved close by free_graphite_bb.
5644 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
5645 (new_scop): Move close by free_scop.
5646 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
5648 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
5650 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
5651 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
5652 instead of recursive call.
5653 (graphite_translate_clast_equation): New.
5654 (graphite_create_guard_cond_expr): New.
5655 (graphite_create_new_guard): New.
5656 (get_stack_index_from_iv): Removed.
5657 (graphite_rename_ivs_stmt): Use gbb_loop_index.
5658 (get_true_edge_from_guard_bb): New.
5659 (translate_clast): Handle stmt_guard in clast.
5660 (get_construction_edge): Allow construction edge detection for
5661 a scope entry with multiple predecessors if one predecessor is
5662 the immediate dominator of scope entry.
5663 (can_generate_code_stmt): Enable code generation for clast_guard.
5664 (gloog): Use correct context loop. Removed check for post dominators.
5665 * cfgloop.h (create_empty_if_region_on_edge): Declared.
5667 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5669 * graphite.c (remove_dead_loops): Document better which
5672 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5674 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
5676 (graphite.o): Also depends on pointer-set.h.
5678 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5680 * graphite.c (scop_record_loop): Fix compile warning.
5682 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
5683 Sebastian Pop <sebastian.pop@amd.com>
5685 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
5687 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
5689 * graphite.c (build_graphite_bb): Initialize bb->aux to
5690 point to the graphite_bb_p.
5691 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
5693 (add_bb_domains): Does not use the scop parameter.
5694 (graphite_transform_loops): Clean bb->aux at the end.
5696 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5697 Sebastian Pop <sebastian.pop@amd.com>
5699 * lib/target-supports.exp
5700 (check_effective_target_fgraphite): New.
5702 * gcc.dg/graphite/graphite.exp: Early exit when
5703 check_effective_target_fgraphite returns false.
5704 Set dg-do-what-default to compile.
5705 (scan-graphite-dump-times): Removed.
5706 * gfortran.dg/graphite/graphite.exp: Same.
5708 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
5709 Use scan-tree-dump-times instead of scan-graphite-dump-times.
5710 * gcc.dg/graphite/scop-1.c: Same.
5711 * gcc.dg/graphite/scop-2.c: Same.
5712 * gcc.dg/graphite/scop-3.c: Same.
5713 * gcc.dg/graphite/scop-4.c: Same.
5714 * gcc.dg/graphite/scop-5.c: Same.
5715 * gcc.dg/graphite/scop-6.c: Same.
5716 * gcc.dg/graphite/scop-7.c: Same.
5717 * gcc.dg/graphite/scop-8.c: Same.
5718 * gcc.dg/graphite/scop-9.c: Same.
5719 * gcc.dg/graphite/scop-10.c: Same.
5720 * gcc.dg/graphite/scop-11.c: Same.
5721 * gcc.dg/graphite/scop-12.c: Same.
5722 * gcc.dg/graphite/scop-13.c: Same.
5723 * gcc.dg/graphite/scop-matmult.c: Same.
5724 * gcc.dg/graphite/scop-14.c: Same.
5725 * gcc.dg/graphite/scop-15.c: Same.
5726 * gcc.dg/graphite/block-0.c: Same.
5727 * gcc.dg/graphite/scop-16.c: Same.
5728 * gcc.dg/graphite/block-1.c: Same.
5729 * gcc.dg/graphite/scop-17.c: Same.
5730 * gcc.dg/graphite/scop-18.c: Same.
5731 * gfortran.dg/graphite/block-1.f90: Same.
5732 * gfortran.dg/graphite/scop-1.f: Same.
5733 * gfortran.dg/graphite/block-2.f: Same.
5735 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5737 * graphite.c: Fix some XXX comments.
5738 (build_scop_dynamic_schedules): Removed.
5740 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5742 * graphite.h (scop_max_loop_depth): Moved...
5743 * graphite.c (scop_max_loop_depth): ...here.
5744 (remove_all_edges_1): New.
5745 (remove_all_edges): Factored code.
5746 (remove_cond_exprs): Check only the last statement for
5747 a GIMPLE_COND expression.
5749 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5751 * graphite.c (scan_tree_for_params): Early return when the
5752 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
5753 (find_scop_parameters): Factor out code.
5754 (graphite_trans_bb_strip_mine): Remove dead code.
5756 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5758 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
5759 graphite_trans_bb_move_loop): Factor asserts.
5760 (gloog): Perform sanity checks only for ENABLE_CHECKING.
5761 Do not call calculate_dominance_info and estimate_bb_frequencies.
5763 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
5765 * graphite.c (create_loops_mapping, free_loops_mapping,
5766 create_loops_mapping_num, debug_loop_mapping_1,
5767 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
5768 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
5769 graphite_loops_mapping_add_child_num,
5770 graphite_loops_mapping_insert_child,
5771 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
5772 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
5773 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
5774 create_num_from_index, get_num_from_index,
5775 swap_loop_mapped_depth): Removed.
5776 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
5777 (free_scop): Do not call free_loops_mapping.
5778 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
5779 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
5780 get_loop_mapped_depth.
5781 (graphite_trans_bb_move_loop): Do not update the loop mapping.
5782 (graphite_trans_bb_strip_mine): Same.
5783 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
5784 (struct scop): Remove field loops_mapping.
5786 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5787 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5789 * graphite.c (scop_record_loop): Factor out one level of the
5790 condition by early return.
5791 (build_scop_loop_nests): Format following FSF coding style.
5792 (build_scop_dynamic_schedules): Factor out code.
5793 (scopdet_bb_info): Reindent. Default case should not be reachable.
5795 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5796 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5798 * graphite.c (loop_affine_expr): Check for DECL_P or struct
5799 assignments that are not handled as simple operands for now.
5801 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5802 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5804 * graphite.c (build_scop_bbs): Factor up code.
5806 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5807 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5809 * graphite.c (stmt_simple_for_scop_p): Factor code out
5811 (enum gbb_type): New. Group all the GBB_* types under it.
5812 (is_loop_exit): Moved...
5813 (end_scop): Enable BB spliting.
5814 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
5815 * cfgloop.h (is_loop_exit): Declared.
5817 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5819 * doc/invoke.texi: Remove strides from examples containing
5820 DO loops when the strides are equal to 1.
5822 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
5823 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5825 * graphite.c (graphite_trans_scop_block): Or the result with
5826 the result from graphite_trans_loop_block.
5827 * gcc.dg/graphite/block-1.c: New.
5828 * gfortran.dg/graphite/block-1.f90: New.
5829 * gfortran.dg/graphite/block-2.f: New.
5831 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5833 * graphite.c (graphite_transform_loops): Call cloog_initialize
5836 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5838 * tree-data-ref.c) (stmt_simple_memref_p): New.
5839 * tree-data-ref.h (stmt_simple_memref_p): Declared.
5840 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
5841 (is_simple_operand): Call stmt_simple_memref_p.
5843 * gcc.dg/graphite/scop-matmult.c: Updated for not
5844 using pointer arithmetic, as this is optimized by PRE and
5845 makes the code too difficult to analyze.
5847 * gcc.dg/graphite/scop-18.c: Same.
5849 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
5851 * gdbinit.in (pgg): New.
5853 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5855 * graphite.c (graphite_trans_loop_block): Fix warning.
5857 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5859 * graphite.c (graphite_trans_loop_block): Fix my merge error.
5861 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
5863 * graphite.c (graphite_trans_bb_block): Remove check for
5864 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
5865 Check if loop blocking is profitable for every loop, before applying
5867 (graphite_apply_transformations): Call graphite_trans_bb_block only,
5868 if flag_loop_block is set.
5870 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5872 * graphite.c: Add some more documentation for the loop
5875 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5877 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
5878 * graphite.c: Format on less than 80 columns.
5881 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5883 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
5885 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
5887 * doc/invoke.texi (floop-block, floop-strip-mine,
5888 floop-interchange): Update documentation with examples.
5890 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
5892 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
5894 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
5896 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
5898 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
5899 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
5900 * tree-scalar-evolution.c: Revert useless changes.
5901 * tree-phinodes.c: Same.
5904 * tree-vectorizer.h: Same.
5905 * tree-flow.h: Same.
5907 * common.opt (fgraphite): Update documentation.
5909 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
5911 * doc/invoke.texi (-floop-block, -floop-strip-mine,
5912 -floop-interchange): Add more text for explaining what each of these
5914 * tree-into-ssa.c (gimple_vec): Moved to...
5915 * graphite.c: Include gimple.h.
5916 (gimple_vec): Moved to...
5917 (del_loop_to_cloog_loop): Removed.
5918 (loop_affine_expr): Do not call create_data_ref when the
5919 operand is a constant.
5920 (new_scop): Use free instead of del_loop_to_cloog_loop.
5921 * Makefile.in (graphite.o): Depend on GIMPLE_H.
5922 * gimple.h (gimple_vec): ... here.
5924 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5926 * graphite.c (scopdet_bb_info): Only allow loops with known number of
5928 (build_loop_iteration_domains): Fail, if latch executions unknown.
5930 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5932 * graphite.c (add_conditions_to_domain): New.
5933 (build_scop_conditions_1): Call add_conditions_to_domain.
5934 (set_cloog_options): Allow to disable optimizations.
5936 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5938 * graphite.c (find_params_in_bb): Look for parameters in conditions.
5939 Do not use walk_dominator_tree.
5940 (find_scop_parameters): Do not use walk_dominator_tree.
5942 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5944 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
5945 (idx_record_params): Adapt.
5946 * graphite.h (scop_gimple_loop_depth): New.
5948 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5950 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
5951 (scan_tree_for_params): Remove value_init.
5952 (build_scop_context): Remove value_init.
5953 (build_loop_iteration_domains): Remove value_init.
5954 (schedule_to_scattering): Remove value_init.
5955 (graphite_trans_bb_strip_mine): Remove value_init.
5957 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5959 * gcc/graphite.c (limit_scops): New.
5960 (graphite_transform_loops): Add limit SCoPs.
5961 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
5962 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
5963 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
5964 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
5965 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
5966 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
5967 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
5968 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
5969 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
5970 Change loop numbers.
5971 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
5972 Change loop numbers.
5973 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
5974 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
5975 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
5976 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
5977 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
5978 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
5979 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
5980 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
5981 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
5982 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
5984 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
5986 * graphite.c (graphite_transform_loops): Call always find_transform.
5988 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
5990 * graphite.c (free_loops_mapping): New.
5991 (stmt_simple_for_scop_p): Fix typo.
5992 (stmt_simple_for_scop_p): Fix tuples functions, that
5994 (free_graphite_bb): Fix some memleaks.
5995 (free_scop): Fix some memleaks.
5996 (scopdet_bb_info): Do not forget some tmp SCoPs.
5997 (find_params_in_bb): Fix some memleaks.
5998 (clast_to_gcc_expression): Fix warning.
6000 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6002 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6003 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6005 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6007 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6008 Move code ifdef-ed HAVE_cloog...
6009 * graphite.c: Include toplev.h.
6011 * Makefile.in (OBJS-common): Always build graphite.o.
6012 (BACKEND): Remove @GRAPHITE@.
6013 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6014 (graphite.o): Depend on TOPLEV_H.
6016 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6018 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6019 Remove typo left from polylib to ppl conversion.
6020 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6022 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6024 * toplev.c (process_options): Move the graphite loop optimization
6026 * tree-ssa-loop.c (graphite_transforms): ... here.
6027 When not configured with CLooG, print to dump_file that
6028 Graphite transforms were not performed.
6029 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6031 * gcc.dg/graphite/*.c: Updated all testcases to use
6032 scan-graphite-dump-times.
6034 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6036 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6037 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6039 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6040 Jan Sjodin <jan.sjodin@amd.com>
6042 * configure: Regenerated.
6043 * omp-low.c (expand_omp_sections): Remove now unused code.
6044 * config.in (HAVE_polylib): Removed.
6045 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6046 (PPLLIBS, PPLINC): Added.
6047 * graphite.c: Replace unsigned with int wherever possible.
6048 Don't access Cloog's data structures, but use accessor functions.
6049 Clast's stmt->type is now implemented as a vtable: change the
6050 switches of stmt->type into ifs.
6051 (polylib/polylibgmp.h): Don't include.
6052 (initialize_dependence_polyhedron,
6053 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6054 statement_precedes_p, test_dependence, build_rdg_all_levels,
6055 dump_dependence_graph): Removed until this code is cleaned up
6057 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6058 (POLYLIBINC): Renamed PPLINC.
6060 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6061 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6062 Jan Sjodin <jan.sjodin@amd.com>
6064 Finish the merge and tuplification of graphite.
6066 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6067 Jan Sjodin <jan.sjodin@amd.com>
6069 Partial merge from mainline (138072:138275).
6070 * graphite.c still has to be tuplified.
6072 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6074 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6075 (create_num_from_index): New.
6076 (get_num_from_index): Also pass in the graphite BB.
6077 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6078 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6079 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6080 (is_interchange_valid): Return false when failing.
6081 * graphite.h (struct num_map): New.
6082 (struct graphite_bb): New field num_map.
6083 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6085 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6087 * graphite.c (dump_gbb_conditions): Print also conditions like
6088 "if (a)". Remove dublicated code and use print_generic_expr ().
6089 (stmt_simple_for_scop_p): Only allow conditions we can handle
6092 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6094 * graphite.h (struct scop): Removed new_ivs field.
6095 (SCOP_NEWIVS): Deleted.
6096 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6097 clast_to_gcc_expression, graphite_create_new_loop):
6098 Removed use of new_ivs.
6100 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6102 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6103 create_loops_mapping_num, debug_loop_mapping_1): New.
6104 (debug_loop_mapping): Call debug_loop_mapping_1.
6105 (get_loop_mapping_for_num,
6106 graphite_loops_mapping_add_child,
6107 graphite_loops_mapping_add_child_num,
6108 graphite_loops_mapping_insert_child,
6109 graphite_loops_mapping_parent,
6110 split_loop_mapped_depth_for_num,
6111 loop_mapped_depth_split_loop): New.
6112 (increment_loop_mapped_depths): Removed.
6113 (swap_loop_mapped_depth_for_num): Reimplemented.
6114 (new_scop): Call create_loops_mapping.
6115 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6116 (translate_clast): Pass the old loop father in parameter, and pass
6117 it to get_old_iv_from_ssa_name.
6118 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6119 can_generate_code, can_generate_for_scop): New.
6120 (graphite_trans_bb_block): Returns false when it fails to transform.
6121 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6123 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6125 Reverted all the changes related to the streamization and
6127 These changes are now tracked in the streamization branch.
6129 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6130 Jan Sjodin <jan.sjodin@amd.com>
6132 * graphite.c (gbb_compare): Correctly constify.
6133 (gbb_can_be_ignored): Indent.
6134 (graphite_trans_scop_swap_1and2): Add legality check.
6137 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6139 Remove fallouts from "Reverted the Condate changes".
6140 * tree.h: Remove unused decl.
6141 * gcc.dg/tree-checker: Same.
6142 * timevar.def: Remove counter.
6144 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6146 * Merge from mainline (135673:138072).
6148 Reverted the MIRO changes (from 2008-04-05) that are now
6149 tracked in the miro branch.
6150 * tree-bounds.c: Removed.
6151 * tree-bounds.h: Removed.
6153 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6154 are now tracked in the condate branch.
6155 * tree-check.c: Removed.
6156 * tree-match.c: Removed.
6157 * condate.y: Removed.
6159 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6161 * common.opt: New user flag -floop-block, -floop-strip-mine
6162 and -floop-interchange.
6163 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6164 graphite loop optimization flags is turned on.
6165 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6166 flag_loop_strip_mine and flag_loop_interchange checks before
6168 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6169 -floop-strip-mine and -floop-interchange.
6170 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
6172 * gcc.dg/graphite/scop-16.c: Ditto.
6173 * gcc.dg/graphite/scop-17.c: Ditto.
6174 * gcc.dg/graphite/scop-18.c: Ditto.
6176 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6177 Sebastian Pop <sebastian.pop@amd.com>
6179 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6180 (create_empty_loop_on_edge): More fixes.
6181 * tree-phinodes.c (resize_phi_node): Extern.
6182 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6183 * cfghooks.c (update_dominator_information): New split from
6185 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6186 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6187 successor of the function entry block.
6189 * graphite.c: Include pointer-set.h.
6190 (debug_loop_mapping, increment_loop_mapped_depths,
6191 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6192 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6193 swap_loop_mapped_depth_for_num, get_num_from_index,
6194 swap_loop_mapped_depth, loop_iv_stack_debug,
6195 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6196 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6197 get_old_iv_from_ssa_name): New.
6198 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6199 (free_scop): Free SCOP_LOOPS_MAPPING.
6200 (scop_record_loop): Record old ivs.
6201 (create_var_name): Removed.
6202 (initialize_cloog_names): Allocate double space in case strip mine
6203 applies to all loops once.
6204 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6205 (clast_to_gcc_expression): Same. Implement more clast to gimple
6207 (graphite_create_new_loop): Pass in ivstack.
6208 (remove_all_edges): Pass in the construction_edge.
6209 (graphite_remove_iv): Removed.
6210 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6211 remove_cond_exprs): Rewritten.
6212 (move_phi_nodes): New.
6213 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6214 (translate_clast): Pass in ivstack. Rewrite some cases.
6215 (set_cloog_options, debug_clast_stmt): New.
6216 (find_transform): Use set_cloog_options.
6217 (outermost_loop_layer): Removed.
6218 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6219 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6220 mark_old_loops, remove_dead_loops): New.
6222 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6223 (const_column_index, get_first_matching_sign_row_index,
6224 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6225 get_upper_bound): New.
6226 (graphite_trans_bb_strip_mine): Also update the iv map.
6228 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6229 (struct name_tree): Add a loop field.
6230 (struct scop): Add a graphite_loops_mapping field.
6231 (SCOP_LOOPS_MAPPING): New.
6232 (debug_clast_stmt): Declare.
6233 * lambda.h (find_induction_var_from_exit_cond): Declare.
6234 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6235 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6236 (create_empty_loop_on_edge): Updated.
6237 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6238 rename_variables_in_bb): Declare.
6239 * tree-cfg.c (remove_bb): Extern.
6241 * gcc.dg/graphite/block-0.c: New.
6243 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6244 Sebastian Pop <sebastian.pop@amd.com>
6246 * graphite.c (strip_mine_profitable_p): New.
6247 (graphite_trans_bb_block): Disable strip mining if not profitable.
6249 * gcc.dg/graphite/scop-18.c: New.
6250 * gcc.dg/graphite/scop-17.c: Fixed.
6251 * gcc.dg/graphite/scop-16.c: Fixed.
6253 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6254 Jan Sjodin <jan.sjodin@amd.com>
6255 Sebastian Pop <sebastian.pop@amd.com>
6257 * graphite.c (is_interchange_valid): New.
6258 (graphite_trans_bb_block): Check loop nest of basic block for legality
6261 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6262 outer_most_loop, gbb_outer_most_loop_index): New.
6264 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6265 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6266 * gcc.dg/graphite/scop-16.c: New.
6267 * gcc.dg/graphite/scop-17.c: New.
6269 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6271 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6272 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6274 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6276 * graphite.c (new_scop): Initialize SCOP_EXIT.
6277 (scopdet_info): Add.
6278 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6279 (build_scops_1): Cleanup, bugfixes.
6280 (build_scops): Cleanup.
6282 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6283 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
6285 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6287 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
6289 * gfortran.dg/graphite/graphite.exp: Use
6290 DEFAULT_GRAPHITE_FLAGS.
6292 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
6294 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6296 * graphite.c (scan_tree_for_params): Do not assert any more if
6297 MULT_EXPR parameter is negative.
6299 * gfortran.dg/graphite/scop-1.f: New.
6301 * gfortran.dg/graphite/graphite.exp: New.
6303 * gcc.dg/graphite/scop-15.c: New.
6305 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
6307 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
6309 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6311 * graphite.c (graphite_trans_bb_swap_loops): Rename from
6312 graphite_swap_loops.
6313 (graphite_trans_bb_move_loop): New.
6314 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
6315 (graphite_trans_bb_block): New.
6316 (graphite_trans_loop_block): New.
6317 (graphite_trans_scop_swap_1and2): Rename from
6318 graphite_trans_swap_1and2.
6319 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
6320 (graphite_trans_scop_block): New.
6321 (graphite_apply_transformations): Rename from
6322 graphite_transformations.
6324 * gcc.dg/graphite/scop-matmult.c: New.
6326 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
6328 * graphite.c (gbb_compare): New.
6329 (graphite_sort_gbbs): New.
6330 (gbb_can_be_ignored): New.
6331 (scop_remove_ignoreable_gbbs): New.
6332 (graphite_transformations): Cleanup and add
6333 scop_remove_ignoreable_gbbs.
6334 * lambda.h (lambda_vector_compare): New.
6336 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
6338 * graphite.c (print_graphite_bb): Correct printing of static schedule.
6339 (graphite_swap_loops): int -> unsigned
6340 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
6341 (graphite_transformations): New.
6342 (graphite_transform_loops): Move to graphite_transformations.
6343 * graphite.h (gbb_nb_loops): Return unsigned.
6345 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
6347 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
6348 the domain matrix. This makes scop-0.c work again.
6350 2008-06-20 Richard Guenther <rguenther@suse.de>
6352 * graphite.h: Adjust copyright to GPLv3.
6353 * graphite.c: Likewise.
6354 (stmt_simple_memref_for_scop_p): Split out from ...
6355 (stmt_simple_for_scop_p): ... here. Fix handling of calls
6357 (get_bb_type): Optimize.
6359 (is_bb_addable): Fix memleak, replace is_pred call with
6361 (build_scops): Use current_loops.
6362 (param_index): Fix memleak.
6364 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6366 * graphite.c: Fix formatting.
6368 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6370 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
6371 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
6372 (create_var_name, save_var_name): Newly defined functions.
6373 (initialize_cloog_names): Part of the code factored out to
6375 (clast_to_gcc_expression): Now handles the case of clast_red_sum
6376 in clast_reduction statement.
6377 (graphite_create_new_loop): Now takes a new parameter
6379 (translate_clast): Now also takes the context_loop and bb_exit
6380 parameters. Rewritten the code so that it creates a gimple code
6381 inside the given context.
6382 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
6383 remove_cond_expr, disconnect_cond_expr,
6384 disconnect_virtual_phi_nodes): Newly defined functions.
6385 * graphite.h (struct scop): added old_ivs vector.
6386 SCOP_OLDIVS: New macro.
6388 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
6390 * cfgloopmanip.c: Add missing function comments, fix formatting.
6392 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6394 * cfgloopmanip.c (update_dominators_in_loop): Defined.
6395 (create_empty_loop_on_edge): Defined.
6396 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
6398 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
6399 (update_dominators_in_loop): Declared as extern
6400 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
6402 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
6404 * graphite.c (print_graphite_bb): Allow changing number of loops
6406 (initialize_cloog_names): Allow changing number of loops.
6407 (build_cloog_prog): Simplify.
6408 (find_transform): Enable cloog option --strides.
6409 (graphite_swap_loops): New.
6410 (graphite_strip_mine_loop): New.
6411 (graphite_trans_swap_1and2): New.
6412 (graphite_trans_strip): New.
6413 (graphite_transform_loops): Add graphite_trans_strip.
6414 * graphite.h (scop_max_loop_depth): New.
6416 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6418 * graphite.c (build_scop_iteration_domain): Remove forgotten
6419 line. (Fixes compile)
6421 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
6423 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
6424 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
6425 (build_bb_loops): New.
6426 (graphite_transform_loops): Add build_bb_loops.
6427 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
6429 * graphite.h (graphite_bb): Add loops.
6430 (gbb_nb_loops): New.
6431 (gbb_loop_at_index): New.
6432 (gbb_loop_index): New.
6433 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
6434 using nb_params_in_scop.
6436 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6438 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
6439 (build_scop_canonical_schedules): Build minimized schedule.
6440 (schedule_to_scattering): Adapt to minimized schedule.
6441 * graphite.h (graphite_bb): Add/Update descriptions.
6443 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
6444 Tobias Grosser <grosser@fim.uni-passau.de>
6446 * graphite.c (print_graphite_bb): Add condition printing.
6448 (dump_gbb_conditions): New.
6449 (build_scop_conditions_1): New.
6450 (build_scop_conditions): New.
6451 * graphite.h (graphite_bb): Add conditions.
6453 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
6455 * graphite.c (print_graphite_bb):
6456 (free_graphite_bb): New.
6457 (free_scop): Free bbs.
6458 (get_bb_type): Free doms.
6459 (build_scop_context): Free context matrix.
6460 (build_loop_iteration_domains): Remove unused code.
6461 (build_cloog_prog): Free scattering function and blocklist.
6462 (find_transform): Free options.
6464 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
6466 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
6467 Remove unnecessery cloog data structures. Make a copy of the domain
6468 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
6469 unnecessary cloog data structures. Fix memory leaks. Remove insert
6470 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
6472 (build_scop_iteration_domain): Remove unnecessary cloog
6473 data structures. Fix memory leaks.
6474 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
6475 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
6477 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6479 * graphite.c (find_scop_params): Remove initialize_cloog_names.
6481 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6483 * graphite.c (end_scop): Style fix.
6484 (schedule_to_scattering): Style and comment fix.
6486 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6487 * graphite.c (print_graphite_bb): Fix definiton of
6488 schedule_to_scattering.
6489 (initialize_cloog_names): Change nb_scattdims to max loop
6491 (schedule_to_scattering): Take parameter for number of scattering
6493 (build_cloog_prog): Only build as much scattering dimensions as
6496 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
6498 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
6499 in polyhedron/aermod.f90.
6501 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
6502 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6503 Harsha Jagasia <harsha.jagasia@amd.com>
6505 * graphite.c (is_bb_addable): Fix segfault.
6507 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
6509 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
6510 with multiple exits and conditional handling in edge cases.
6511 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
6513 * gcc.dg/graphite/scop-14.c: New.
6515 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
6516 Adrien Eliche <aeliche@isty.uvsq.fr>
6518 * graphite.c (is_bb_addable): Add more comments and enhance
6519 readablity of the source code. Fix memory leak.
6520 (is_loop_exit): Fix memory leak.
6522 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6524 * graphite.c (first_loop_in_scop): Deleted.
6525 (setup_cloog_loop): Only walk the loop chain for inner loops.
6526 (build_scop_iteration_domain): Execute setup_cloog_loop for
6527 all loops in the first layer.
6529 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
6531 * graphite.c (scan_tree_for_params): Change the way params are
6532 added to be indepenent of the number of loops.
6533 (setup_cloog_loop): Revert to short matrix format. Fix parameter
6535 (build_cloog_prog): Revert to short matrix format.
6537 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6538 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
6540 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
6543 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
6545 * graphite.c (nb_data_refs_in_scop): New.
6546 (graphite_transform_loops): Print more stats: number of
6547 loops, basic blocks and data references per scop.
6549 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6550 Jan Sjodin <jan.sjodin@amd.com>
6552 * graphite.c (loop_affine_expr, idx_record_params,
6553 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
6554 instead of instantiate_parameters.
6556 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6558 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
6559 add support for parameters, add STATIC_SCHEDULE at the right places,
6562 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6564 * graphite.c (build_scop_loop_nests): Only add the loops, that
6565 are contained completely in the SCoP.
6566 (build_cloog_prog): Disable scattering, until schedule_to_scattering
6567 and the domains are fixed.
6568 (build_scop_canonical_schedules): Add support for bbs not contained
6571 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
6573 * graphite.h (scop_contains_loop): Update comments to match
6574 the actual behavior.
6575 (scop_contains_loop): New.
6576 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
6578 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6580 * graphite.c (get_bb_type): On function body, i.e. loop_0,
6581 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
6584 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
6585 Tobias Grosser <grosser@fim.uni-passau.de>
6587 * graphite.c (graphite_transform_loops): Early return when
6588 there are no loops in the function.
6590 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6591 Jan Sjodin <jan.sjodin@amd.com>
6593 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
6594 offset of the last loop.
6595 (setup_cloog_loop): Copy the entire outer constraint matrix.
6597 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6598 Jan Sjodin <jan.sjodin@amd.com>
6600 * graphite.c (stmt_in_scop_p, function_parameter_p,
6601 invariant_in_scop_p): Removed.
6602 (scan_tree_for_params): Can be used with no constraint
6603 matrix for gathering parameters.
6604 (idx_record_params): Don't use idx_record_param, instead use
6605 scan_tree_for_params.
6606 (find_scop_parameters): Same.
6607 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
6608 Fix the size of loop domains.
6609 (schedule_to_scattering): Exit when the outer loop is not in scop.
6610 (find_transform): Enable build_cloog_prog.
6612 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6613 Jan Sjodin <jan.sjodin@amd.com>
6615 * graphite.c (schedule_to_scattering): Make scattering domains
6616 uniformly of the same size, as required by CLooG 0.14.0 and before.
6618 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
6619 Jan Sjodin <jan.sjodin@amd.com>
6621 * graphite.c (schedule_to_scattering): Rewrite, correct the
6622 translation of the scheduling function to scattering.
6623 (build_cloog_prog): Call schedule_to_scattering only once.
6624 * graphite.h (scop_loop_index): Do not fail for loops not
6625 in the scop: return -1.
6627 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
6629 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
6630 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
6631 (setup_cloog_loop): Export GBB_DOMAIN.
6632 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
6633 able to rebuild the original control flow.
6634 * graphite.h (graphite_bb): Add domain field and access macro.
6637 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6639 * graphite.c (debug_gbb): New.
6640 (print_scop, build_graphite_bb): Use SCOP_BBS.
6641 (build_scop_bbs): Reimplemented.
6642 (dfs_bb_in_scop_p): Removed.
6643 (build_scop_loop_nests): Reorder loops inserted in
6644 SCOP_LOOP_NEST: outer loops should come first.
6645 (build_scop_canonical_schedules): Reinitialize at zero
6646 the components of the SCOP_STATIC_SCHEDULE for the loops
6647 that have already been parsed.
6649 * graphite.h (debug_gbb): Declared.
6651 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
6652 Jan Sjodin <jan.sjodin@amd.com>
6654 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
6655 (graphite_loop_to_gcc_loop): Removed.
6656 (remove_all_edges): New.
6657 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
6658 (gloog): Remove useless code.
6660 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6662 * graphite.c (get_bb_type): Reworked. We distinguish between
6663 loops with one or multiple exits.
6664 (is_loop_exit): New.
6666 (is_bb_addable): Rework condition handling, now support for case
6667 case statements and loops with multiple exits.
6669 * gcc.dg/graphite/scop-11.c: New.
6670 * gcc.dg/graphite/scop-12.c: New.
6671 * gcc.dg/graphite/scop-13.c: New.
6673 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
6675 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
6676 we have too many colors.
6678 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
6680 * doc/invoke.texi (-ftree-loop-fusion): Document.
6681 * tree-pass.h (pass_loop_fusion): Declared.
6682 * tree-loop-fusion.c: New.
6683 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
6684 * tree-data-ref.c (find_data_references_in_loop): Make extern.
6685 * tree-data-ref.h (find_data_references_in_loop): Declared.
6686 * common.opt (ftree-loop-fusion): Declared.
6687 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
6689 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
6691 * graphite.c (build_access_matrix): Fix typo from the merge.
6693 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
6695 * Merge from mainline (130800:135673).
6697 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6699 * graphite.c (end_scop): The exit of the scop is not part of the scop.
6700 Update dominators after splitting.
6702 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6704 * graphite.c (is_bb_addable): Return the harmful statement.
6705 Factor up some code.
6706 (end_scop): New. Splits end of scope bbs on a harmful statement.
6707 (build_scops_1): Call end_scop.
6709 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
6711 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
6712 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
6713 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
6714 build_scops_1): Removed.
6715 (build_scops_2): Renamed build_scops_1.
6717 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
6719 * graphite.c: Fix formatting.
6721 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6723 * graphite.c (get_bb_type): New.
6725 (build_scops_2): New.
6726 (is_bb_addable): New.
6727 (build_scops): Switch the scop detection.
6728 (build_scop_bbs): Add entry bb to scop.
6729 * graphite.h (struct scop): Update comment.
6731 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6733 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
6736 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6738 * gcc.dg/graphite/scop-1.c: Update.
6739 * gcc.dg/graphite/scop-2.c: Update.
6740 * gcc.dg/graphite/scop-4.c: Update.
6741 * gcc.dg/graphite/scop-5.c: Add.
6742 * gcc.dg/graphite/scop-6.c: Add.
6744 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
6746 * gcc.dg/graphite/scop-0.c: Add.
6747 * gcc.dg/graphite/scop-7.c: Add.
6748 * gcc.dg/graphite/scop-8.c: Add.
6749 * gcc.dg/graphite/scop-9.c: Add.
6750 * gcc.dg/graphite/scop-10.c: Add.
6752 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
6754 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
6755 Check affine expressions depending on the outermost loop
6757 (stmt_simple_for_scop_p): Same.
6758 (harmfule_stmt_in_scop): Same.
6760 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
6762 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
6763 mark entry and exit, that are not part of the SCoP and update HTML
6766 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
6768 * graphite.c (basic_block_simple_for_scop_p): Renamed
6770 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
6771 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
6772 (all_preds_visited_p, all_succs_visited_p,
6773 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
6774 scop_end_loop): New.
6775 (build_scops): Do not use dfs_enumerate_from.
6777 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
6779 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
6781 * graphite.c: Add comments to functions that are missing a
6783 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
6785 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
6787 * graphite.c (nb_params_in_scop): Moved...
6788 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
6789 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
6790 (clast_to_gcc_expression): Reduce column size to less than 80.
6791 (graphite_create_iv): Return the new name of the IV.
6792 (find_transform): Set options->esp and options->cpp.
6793 (gloog): Comment out the invalidation of the old loop code.
6794 (initialize_dependence_polyhedron): Replace scop_nb_params with
6797 * graphite.h (nb_params_in_scop): ... here.
6798 (scop_nb_params): Removed.
6799 (loop_domain_dim): Return something even when the loop was not
6800 found in the hash table: avoid ICEing on all the graphite.exp
6803 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6805 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
6807 * graphite.c (build_scop_dynamic_schedules): Schedule is built
6808 according to nesting level.
6809 (find_scop_parameters): Call instantiate_parameters.
6810 (scan_tree_for_params): Extend it to handle general affine bounds.
6811 Inner loop bound can depend on outer loop induction variable.
6812 (setup_cloog_loop): tmp variable is allocated on stack. Call
6813 instantiate_parameters with respect to outermost_loop_in_scop.
6814 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
6816 (create_empty_loop): Function loopify should be given edge
6817 probability, instead of edge frequency. Dominance relation from
6818 switch_bb to loop_header.
6819 (clast_to_gcc_expression): Added handling of clast_reduction node.
6820 (gloog): New functionality for removing old loop.
6821 (test_dependence): Factored out from build_rdg_all_levels.
6822 (build_rdg_all_levels): Dependence testing factored out to
6823 test_dependence function.
6825 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
6826 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
6829 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
6831 * graphite.c (free_scop, param_index, initialize_cloog_names,
6832 nb_params_in_scop): Use name_tree map instead of just a tree
6833 for keeping track of the variable name associated to that tree.
6834 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
6835 clast_to_gcc_expression, graphite_create_iv,
6836 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
6837 graphite_stmt_to_gcc_stmt): New.
6838 (gloog): Call these.
6839 * graphite.h (struct name_tree): New.
6840 (struct scop): Use name_tree instead of tree for params.
6841 Store a vector of name_tree for new_ivs.
6843 (scop_nb_params): Use name_tree instead of tree.
6845 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
6846 Sebastian Pop <sebastian.pop@amd.com>
6848 * tree-bounds.c: New.
6849 * tree-bounds.h: New.
6850 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
6851 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
6852 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
6856 * c-cppbuiltin.c: Same.
6860 * tree-outof-ssa.c: Same.
6862 * Makefile.in: Same.
6864 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
6865 Sebastian Pop <sebastian.pop@amd.com>
6867 * tree-loop-distribution.c (remaining_stmts,
6868 upstream_mem_writes): Removed static variables.
6869 (copy_loop_before, create_bb_after_loop,
6870 mark_nodes_having_upstream_mem_writes, free_rdg_components,
6871 rdg_build_components, rdg_build_partitions,
6872 dump_rdg_partitions): Extern.
6873 (generate_loops_for_partition, generate_code_for_partition): Do not
6875 (already_processed_vertex_p, predecessor_has_mem_write,
6876 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
6877 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
6878 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
6879 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
6880 Pass remaining_stmts and upstream_mem_writes as parameters.
6881 (rdg_component): Moved...
6882 (build_rdg_partition_for_component): Do not aggregate components when
6883 flag_streamize_loops is set.
6884 (gen_sequential_loops): New.
6885 (ldist_gen): Call gen_sequential_loops.
6887 * tree-pass.h (pass_loop_streamization): Declared.
6889 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
6890 basic blocks when loops structures exist.
6892 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
6894 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
6896 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
6897 eliminate_local_variables_stmt, eliminate_local_variables,
6898 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
6899 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
6900 of code delimited by two edges in the CFG.
6901 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
6902 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
6903 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
6904 the case of parallelisation of reductions.
6905 (create_loop_fn): Extern.
6906 (create_omp_parallel_region): New.
6908 * tree-data-ref.c (dump_data_dependence_relation): Don't call
6909 dump_data_reference for printing dra and drb.
6910 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
6912 (build_rdg): Don't call free_dependence_relations for the moment, as
6913 we attach dependence relations on each edge of the RDG.
6916 * tree-data-ref.h (rdg_component): ...here.
6917 (struct rdg_edge): New field ddr_p relation.
6918 (RDGE_RELATION): New.
6919 (create_bb_after_loop, copy_loop_before,
6920 mark_nodes_having_upstream_mem_writes, rdg_build_components,
6921 rdg_build_partitions, dump_rdg_partitions,
6922 free_rdg_components): Declared.
6924 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
6925 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
6927 * tree-loop-streamization.c: New.
6929 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
6930 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
6932 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
6934 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
6936 * passes.c: Schedule pass_loop_streamization.
6938 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
6940 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
6943 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
6945 * graphite.c (dot_all_scops): Update formatting.
6946 Bbs can now be part of more than one SCoP.
6948 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
6950 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
6952 (loop_domain_dim): Check for unregistered toplev SCOP loop.
6953 * graphite.h (loop_to_cloog_loop): New.
6955 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6957 * graphite.c (loop_domain_dim, ref_nb_loops,
6958 loop_iteration_vector_dim): New.
6959 (build_access_matrix_with_af, build_access_matrix,
6960 initialize_dependence_polyhedron): Fixed for new matrix layout.
6961 No longer assume that all iteration domains are of the same
6964 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
6966 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
6967 defined in a loop at depth 0 is invariant.
6968 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
6969 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
6970 be called at loop depth 0.
6972 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
6974 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
6975 (down_open_scop): Removed.
6976 (loop_in_scop_p): Redefined.
6977 (scop_affine_expr): New argument: scop.
6978 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
6979 a harmful statement ending a scop.
6980 (basic_block_simple_for_scop_p): New argument: scop.
6981 (get_loop_start): Removed.
6982 (new_scop): Initialize SCOP_LOOPS.
6983 (free_scop): Free SCOP_LOOPS.
6984 (succs_at_same_depth, preds_at_same_depth): New.
6985 (end_scop): Test the validity of a scop.
6986 (add_dominators_to_open_scops): New.
6987 (test_for_scop_bound): Call add_dominators_to_open_scops.
6988 Add cases for opening and closing multiple scops.
6989 (build_scops, build_scop_bbs): Iterate over basic blocks in
6991 (build_graphite_bb): Pass scop directly.
6992 (dfs_bb_in_scop_p): New.
6993 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
6995 (nb_loops_around_gb): Use loop_in_scop_p.
6996 (schedule_to_scattering): Disabled for the moment the code computing
6997 the "textual order for outer loop".
6999 * graphite.h (struct scop): New field loops.
7001 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7003 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7005 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7006 Sebastian Pop <sebastian.pop@amd.com>
7008 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7009 * common.opt (fstreamize-loops): New.
7010 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7011 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7012 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7013 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7015 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7017 * tree-data-ref.c (build_empty_rdg): New.
7018 (build_rdg): Use it.
7019 * tree-data-ref.h (build_empty_rdg): Declared.
7020 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7021 (find_vertex_for_stmt): Removed.
7022 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7024 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7026 * tree-loop-distribution.c (generate_builtin): After cancelling the
7027 loop tree, also delete basic blocks.
7028 (rdg_flag_uses): Stop recursion when a vertex has already been
7031 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7033 * graphite.c (build_scop_alpha): Removed.
7034 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7035 and dump_dependence_graph to avoid compiler warnings.
7037 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7039 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7040 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7041 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7042 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7043 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7044 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7045 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7046 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7047 dump_dependence_graph): New.
7048 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7050 (struct scop): New field loop2cloog_loop.
7051 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7052 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7054 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7056 * graphite.c (build_graphite_bb): Fix initialization
7057 of the graphite basic block.
7059 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7061 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7062 loop domain matrix. Pass in the number of loops contained in the
7064 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7065 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7066 loops that are not surrounding the current loop are not represented
7067 in the domain constraint matrix.
7068 (build_scop_iteration_domain): Initial domain constraint matrix
7069 contains only the eq/ineq, cst, and scop parameters columns.
7071 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7073 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7074 (print_graphite_bb): Print scattering.
7076 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7078 * graphite.c (initialize_cloog_names): Initialize names of
7079 scattering variables.
7081 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7083 * graphite.c (dot_all_scops_1): Disable debug output while
7086 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7088 * graphite.c (find_transform): Change cloog output language to C.
7090 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7092 * tree-loop-distribution.c (generate_memset_zero,
7093 generate_builtin, generate_code_for_partition,
7094 rdg_flag_all_uses): New.
7095 (rdg_flag_uses): Gather in the same partition the statements defining
7096 the VUSES of the current statement.
7097 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7098 Gather in the same partition not only the stores to the same memory
7099 access, but also the reads.
7100 (ldist_generate_loops): Renamed ldist_gen.
7102 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7103 Tobias Grosser <grosser@fmi.uni-passau.de>
7105 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7106 next pointer, don't use the inner pointer.
7108 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7110 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7111 (find_transform): Call dot_all_1.
7112 * graphite.h (dot_all_scops): Declared.
7114 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7116 * tree-loop-distribution.c: Fix apsi.f ICE.
7117 (create_bb_after_loop): New.
7118 (generate_loops_for_partition): Use it.
7119 * gfortran.dg/ldist-1.f90: New.
7121 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7122 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7124 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7126 * graphite.c (find_transform): Dump cloog program sent to cloog.
7128 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7130 * graphite.c (initialize_cloog_names): Initialize cloog
7133 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7135 * graphite.c (build_scop_context): Fix typo, for the matrix
7136 format: insert '0 >= 0' instead of '-1 >= 0'.
7138 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7140 * Fix merge problems.
7142 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7144 * graphite.c (setup_cloog_loop): Fix typo.
7146 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7148 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7149 * tree-loop-distribution.c: Reimplemented.
7150 * tree-pass.h (pass_loop_distribution): New.
7151 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7153 * graphds.h (struct graph): New field indexes.
7154 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7156 * tree-vect-analyze.c: Remove declaration of static functions when not
7158 * tree-vectorizer.c: Same.
7159 (rename_variables_in_loop): Now extern.
7160 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7161 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7162 calling redirect_edge_and_branch_force.
7164 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7166 * tree-data-ref.c: Don't include tree-chrec.h.
7167 (debug_data_dependence_relations): New.
7168 (dump_data_dependence_relation): Call dump_data_reference on data refs
7170 (same_access_functions): Moved...
7171 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7172 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7173 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7174 struct rdg_vertex_info, ): New.
7175 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7177 (create_rdg_vertices): Initialize the htab of graph->indexes.
7178 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7179 (stmts_from_loop): Don't save LABEL_EXPR.
7180 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7181 hash_stmt_vertex_del): New.
7182 (build_rdg): Initialize rdg->indexes.
7183 (free_rdg, stores_from_loop, ref_base_address,
7184 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7185 have_similar_memory_accesses_1, ref_base_address_1,
7186 remove_similar_memory_refs): New.
7188 * tree-data-ref.h: Include tree-chrec.h.
7189 (debug_data_dependence_relations): Declared.
7190 (same_access_functions): ...here. Now static inline.
7191 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7192 ddr_dependence_level): New.
7193 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7194 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7195 RDG_MEM_READS_STMT): New.
7196 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7197 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7198 rdg_vertex_for_stmt): Declared.
7199 (struct rdg_edge): New field level.
7200 (RDGE_LEVEL, free_rdg): New.
7201 (stores_from_loop, remove_similar_memory_refs,
7202 rdg_defs_used_in_other_loops_p,
7203 have_similar_memory_accesses): Declared.
7204 (rdg_has_similar_memory_accesses): New.
7206 * lambda.h (dependence_level): New.
7207 * common.opt (ftree-loop-distribution): New.
7208 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7209 (print_loop_ir): Renamed print_loops.
7210 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7211 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7212 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7213 (tree-loop-distribution.o): Added.
7214 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7215 (mark_virtual_ops_in_bb): New.
7216 (print_loops_bb, debug_loop_num, debug_loop): New.
7217 * passes.c: Scheduled pass_loop_distribution.
7219 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7221 * graphite.c (scan_tree_for_params): Correct the number of columns
7223 (nb_flat_iterator): New.
7224 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7225 (build_scop_iteration_domain): Correct the number of columns for
7228 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7230 * Merge from mainline (129697:130800).
7232 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7234 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7235 dominated by SCoP's exit.
7236 (graphite_transform_loops): Compute post dominators.
7238 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7240 * Merge from mainline (127169:129697).
7242 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7244 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7245 parameter for the basic block that contains the expression. Use
7246 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7247 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7249 * graphite.h (gbb_loop): New.
7250 (GBB_LOOP): Removed.
7252 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7254 * Makefile.in: Fix merge problem.
7256 2007-08-03 Sebastian Pop <sebpop@gmail.com>
7258 * Merge from mainline (125309:127169).
7259 * tree-loop-distribution.c: Disabled.
7261 2007-06-05 Sebastian Pop <sebpop@gmail.com>
7263 * Merge from mainline (r123693:125309).
7265 2007-05-30 Sebastian Pop <sebpop@gmail.com>
7267 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7269 (correct_modify_p, check_statements, number_of_lvalue_uses,
7270 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7271 instead of MODIFY_EXPR.
7272 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7275 2007-05-24 Sebastian Pop <sebpop@gmail.com>
7277 * tree-loop-distribution.c (struct rdg): Replace arrays by
7278 VECs for edges and vertices.
7279 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7280 (RDGV_NB_PARTITIONS): New.
7281 (PRDG_NBV, PRDG_NBE): Removed.
7282 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7283 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7284 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7286 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
7287 Sebastian Pop <sebpop@gmail.com>
7289 * doc/invoke.texi (-ftree-loop-distribution): Document.
7290 * tree-loop-distribution.c: New file.
7291 * tree-pass.h (pass_loop_distribution): Declared.
7292 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7293 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
7295 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
7296 (DDR_REVERSED_P): New.
7297 * common.opt (-ftree-loop-distribution): New.
7298 * tree-flow.h (distribute_loops): Declared.
7299 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
7300 * passes.c (init_optimization_passes): Schedule loop distribution.
7302 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
7304 * graphite.c (print_graphite_bb): Don't call dump_data_references.
7305 (print_scop): Don't print when scop is NULL.
7306 (build_scop_context, find_transform): Don't output to stderr.
7308 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
7310 * tree-data-ref.c: Don't include graphite.h.
7311 Comment out the code for printing data reference's scop.
7312 (build_access_matrix_with_af): Moved...
7313 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
7314 * graphite.c (build_access_matrix_with_af): ... here. Now static.
7315 (print_graphite_bb): Print basic block's schedule.
7316 (print_scop): Don't print the schedule, call cloog's pretty printer.
7317 (bb_in_scop_p): A basic block is in a scop only if it is both
7318 dominated and postdominated by the scop's entry and exit basic blocks.
7319 (function_parameter_p): New.
7320 (invariant_in_scop_p): Use function_parameter_p.
7321 (new_scop, save_scop): New.
7322 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
7324 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
7325 (loop_in_scop_p): New.
7326 (scop_record_loop): Use loop_in_scop_p.
7327 (build_scop_domain): Renamed build_scop_iteration_domain.
7328 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
7329 nb_params_in_scop, build_scop_context, first_loop_in_scop,
7330 setup_cloog_loop, dot_scop_1, dot_scop): New.
7331 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
7332 (struct scop): Add a pointer to cloog's representation of a program.
7334 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7336 * doc/invoke.texi (-ftree-check-verbose): Renamed
7337 -ftree-checks-verbose.
7338 * common.opt (flag_tree_check_verbose): Renamed
7339 flag_tree_checks_verbose.
7340 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
7342 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
7344 * configure: Regenerated.
7345 * config.in: Regenerated.
7346 * tree-ssa-loop.c (graphite_transforms): Execute
7347 graphite_transform_loops only when HAVE_cloog.
7348 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
7349 * graphite.c: Include polylibgmp.h and cloog.h.
7350 (graphite_transform_loops): Removed loops parameter.
7351 * tree-flow.h (graphite_transform_loops): Update declaration.
7352 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
7353 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
7354 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
7355 (OBJS-common): Remove dependence on graphite.o.
7356 (BACKEND): Depend on @GRAPHITE@.
7358 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
7360 * doc/invoke.texi (-ftree-check-verbose): Documented.
7361 * gcc.dg/tree-checker/tree-checks-1.c: New.
7362 * gcc.dg/tree-checker/tree-checks-2.c: New.
7363 * gcc.dg/tree-checker/tree-checks-3.c: New.
7364 * gcc.dg/tree-checker/tree-checks-4.c: New.
7365 * gcc.dg/tree-checker/tree-checks.exp: New.
7366 * gcc.dg/tree-checker/condates.crp: New.
7367 * common.opt (ftree-checks-verbose): New.
7368 * tree-check.c (tree_check_warning): Move extra stderr output
7369 under control of flag_tree_check_verbose.
7371 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
7373 * tree-match.c: Fix comments formatting.
7374 * tree-match.h: Fix comments formatting.
7375 * tree-check.c: Fix comments formatting.
7376 (tree_check_init): Restructure.
7378 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
7380 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
7382 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
7384 * Merge from mainline (r120733:123693).
7386 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
7388 * condate.y: New file.
7389 * tree-match.h (struct patt_info_s): New field sign.
7390 (struct condate_s): New field msg.
7391 (normalize_condate, name_condate, add_condate): New.
7392 (conds[], condate_parse): Made extern.
7393 * tree-check.c (tree_check_warning): First arg changed to cond;
7394 warning reformatted.
7395 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
7397 (tree_check): Process trivial condates.
7398 (read_delimited_string): Removed.
7399 (print_cond): Print name and msg.
7400 (conds[]): Made extern.
7401 (parse_tree_check_file_once): Rewritten to use the parser in
7403 Processing of option --tree_check_string moved to tree_scan().
7404 * Makefile.in: Added condate.y
7406 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
7408 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
7409 Use VECs instead of varrays.
7410 * diagnostic.h (lazy_dump_generic_node): Update declaration.
7411 * Makefile.in (pretty-print.o): Depend on vec.h.
7412 * pretty-print.c: Include tree.h and vec.h.
7413 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
7414 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
7415 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
7416 pp_free_list): Use VECs instead of varrays.
7417 * pretty-print.h: Do not include varray.h.
7418 (struct tree_chunk_s): Declaration moved before its use.
7419 (output_buffer): Rename varray field to chunks.
7420 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
7421 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
7422 save_global_holes): Use VECs instead of varrays.
7423 * tree-match.h: Declare VECs of cfg_node, and hole_p.
7424 * tree-check.c (scan_cfg_stmts, push_node,
7425 print_matching_stmt): Removed.
7426 (tree_check_instance, push_global_holes_if_new, tree_check,
7427 execute_tree_check): Use VECs instead of varrays.
7428 (gate_tree_check): Don't execute the CFG check when basic_block_info
7431 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7433 * Merge from mainline (r115016:120733).
7435 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7437 * Merge from mainline (r117632:117661).
7439 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
7441 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
7442 * tree-pass.h (TDF_DEBUG, debug_p): New.
7443 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
7444 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
7445 get_loop_exit_condition, analyze_evolution_in_loop,
7446 analyze_initial_condition, analyze_scalar_evolution,
7447 instantiate_parameters, number_of_latch_executions): Use debug_p.
7448 * tree-chrec.c (chrec_apply): Use debug_p.
7449 * tree-data-ref.c: Include graphite.h.
7450 (dump_data_reference): Print also the access matrix.
7451 (analyze_array, analyze_indirect_ref, init_data_ref,
7452 analyze_offset_expr, address_analysis, object_analysis,
7453 create_data_ref, finalize_ddr_dependent,
7454 non_affine_dependence_relation, analyze_ziv_subscript,
7455 analyze_siv_subscript_cst_affine,
7456 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
7457 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
7458 analyze_miv_subscript, analyze_overlapping_iterations,
7459 build_classic_dist_vector, subscript_dependence_tester,
7460 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
7461 (build_access_matrix_with_af): No longer static.
7462 * tree-data-ref.h (scop_p): ... declaration here.
7463 (data_reference.scop): New field.
7464 (DR_SCOP, DR_ACCESS_MATRIX): New.
7465 (build_access_matrix_with_af, dr_num_subscripts): Declared.
7466 * graphite.c (print_graphite_bb): Call dump_data_references.
7467 (print_scop): Use scop_nb_loops and scop_dim_domain.
7468 (test_for_scop_bound): Use debug_p.
7469 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
7471 (scop_loop_index): Moved...
7472 (scop_record_loop): New.
7473 (build_scop_loop_nests): Use scop_record_loop.
7474 (build_scop_domain): Use scop_dim_domain.
7475 (build_access_matrix): Implemented.
7476 (build_scop_canonical_schedules): Use scop_nb_loops.
7477 (build_graphite_bb): Initialize GBB_SCOP.
7478 * graphite.h (scop_p): Moved...
7479 (graphite_bb.scop): New field.
7480 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
7481 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
7482 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
7483 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
7484 scop_loop_index): New.
7485 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
7487 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
7489 * Merge from mainline (r117661:120450).
7491 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
7493 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
7494 at the first declaration outside the varying loop, instantiate as
7496 * tree-chrec.c (for_each_scev_op): New.
7497 * tree-chrec.h (for_each_scev_op): Declared.
7498 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
7499 * tree-data-ref.c (get_references_in_stmt,
7500 find_data_references_in_stmt): New, from trunk.
7501 (find_data_references_in_loop): Use get_references_in_stmt
7502 and find_data_references_in_loop, modified as in trunk.
7503 (build_access_matrix_with_af): New.
7504 * tree-data-ref.h (data_reference): Add a field access_matrix.
7505 (data_ref_loc): New, as in trunk.
7506 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
7507 invariant_in_scop_p, param_index, scan_tree_for_params,
7508 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
7509 idx_record_param, idx_record_params, build_access_matrix,
7510 build_scop_data_accesses, build_scop_canonical_schedules,
7511 build_graphite_bb, build_scop_bbs, find_params_in_bb,
7512 build_scop_params): New.
7513 * graphite.h (graphite_bb): New.
7514 (scop): Add fields static_schedule, params, loop_nest,
7516 * lambda.h: Declare vecs of lambda_matrix.
7517 * tree-flow.h (print_loop_ir_bb): Declared.
7518 * tree-cfg.c (print_loop_ir_bb): New.
7519 (print_loop): Use print_loop_ir_bb.
7521 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
7523 * Merge from mainline (r115016:117632).
7525 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
7527 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
7528 break due to a warning.
7530 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
7532 * graphite.c (print_scops, debug_scops): New.
7533 (graphite_transform): Renamed graphite_find_transform.
7534 * graphite.h (debug_scops): Declared.
7536 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
7538 * tree-match.c: Reformat following the GNU style.
7539 * tree-match.h: Reformat following the GNU style.
7540 * tree-pattern.h: Removed empty file.
7541 * Makefile.in: Remove references to tree-pattern.h.
7542 * tree-check.c: Reformat following the GNU style.
7543 (execute_tree_check): Move gate condition code to...
7544 (gate_tree_check): ...here. New function.
7545 (pass_check): Use the gate function.
7547 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
7549 * tree-pattern.h: New. Tree pattern matching and checking using
7551 * tree-check.c: New. Tree/CFG checking pass.
7552 * tree-match.c: New. Library for tree pattern matching.
7553 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
7554 * toplev.c, flags.h: Add globals for tree-check pass.
7555 * Makefile.in: Integrate the files in tree-check pass.
7556 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
7557 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
7558 Introduce a "lazy" pretty-print mode.
7559 * tree.c, tree.h: Add tree_name.
7561 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
7563 * doc/invoke.texi (-fgraphite): Correct typo.
7564 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
7565 use of print_loop_ir.
7566 * gcc.dg/graphite/scop-1.c: New.
7567 * gcc.dg/graphite/scop-2.c: New.
7568 * gcc.dg/graphite/graphite.exp: New.
7569 * graphite.c: Include domwalk.h.
7570 (print_scop): Print only the entry and exit blocks.
7571 (debug_scop): No longer static.
7572 (affine_expr): Fix formating. Return also true when the expression is
7574 (stmt_simple_for_scop_p): Fix formating.
7575 (build_scops): Use domwalk.
7576 (get_loop_start, end_scop, test_for_scop_bound): New.
7577 (graphite_transform_loops): Avoid printing on stderr.
7578 * graphite.h (debug_scop): Declared.
7579 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
7580 * Makefile.in (graphite.o): Depend on domwalk.h.
7581 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
7582 declarations for static functions.
7583 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
7584 controlling output verbosity.
7586 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
7587 Plesco Alexandru <shurikx@gmail.com>
7589 * doc/invoke.texi (-fgraphite): Document.
7590 * tree-pass.h (pass_graphite_transforms): Declared.
7591 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
7592 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
7593 (pass_graphite_transforms): Defined.
7594 * tree-data-ref.c (free_data_ref, data_reference): Extern.
7595 * tree-data-ref.h (free_data_ref, data_reference): Declared.
7596 * graphite.c, graphite.h: New.
7597 * common.opt (fgraphite): Declared.
7598 * tree-flow.h (graphite_transform_loops): Declared.
7599 * Makefile.in (OBJS-common): Add graphite.o.
7600 (graphite.o): New rule.
7601 * passes.c (pass_graphite_transforms): Scheduled.