1 2011-01-13 Tobias Grosser <grosser@fim.uni-passau.de>
3 * doc/install.texi: Document availability of cloog-0.16
5 2011-01-05 Vladimir Kargov <kargov@gmail.com>
7 * graphite-scop-detection.c (is_valid_stmt_p): Pass the entry basic
8 block instead of region start to the instantiation.
9 (is_valid_bb_p): Add support for basic blocks with conditional
11 (find_scops_new): Recalculate dominance info before SCOP
14 2011-01-05 Vladimir Kargov <kargov@gmail.com>
16 * graphite-scop-detection.c (get_outermost_loop_in_region): New.
17 (is_valid_loop_p): Correct loop passed to stmt_has_simple_data_refs_p
19 2011-01-05 Vladimir Kargov <kargov@gmail.com>
21 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Free
22 invalid postdominance info
24 2010-12-29 Sebastian Pop <sebastian.pop@amd.com>
26 * Makefile.in (graphite-opencl-codegen.o): Update dependences.
27 (graphite-opencl-meta-clast.o): Same.
28 (graphite-opencl.o): Same.
29 (refined-regions.o): Same.
30 * graphite-opencl-codegen.c: Do not include unnecessary .h files.
31 * graphite-opencl-meta-clast.c: Same.
32 * graphite-opencl.c: Same.
33 * refined-regions.c: Same.
35 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
37 * graphite-opencl-codegen.c: Use FOR_EACH_VEC_ELT.
38 * graphite-opencl-meta-clast.c: Same.
39 * graphite-opencl.c: Same.
41 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
43 * graphite-opencl-codegen.c: Do not include sys/time.h.
44 * graphite-opencl.c: Same.
46 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
48 * graphite-opencl.c (h_context, h_cmd_queue, h_program): Moved
49 out of ifdef HAVE_cloog section.
51 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
53 * Makefile.in (graphite-opencl.o): Depends on
54 graphite-opencl-functions.def.
55 * graphite-opencl-functions.def: New.
56 * graphite-opencl.c (enum OPENCL_FUNCTIONS): Read data from
57 graphite-opencl-functions.def.
58 (opencl_function_names): Same.
59 (opencl_create_function_decl): Use the enum OPENCL_FUNCTIONS
60 as indices of opencl_function_names.
62 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
64 * graphite-opencl-codegen.c: Fix formatting.
65 * graphite-opencl-meta-clast.c: Same.
66 * graphite-opencl.c: Same.
68 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
70 * graphite-opencl-codegen.c: Fix formating problems.
71 * graphite-opencl-meta-clast.c: Same.
72 * graphite-opencl.c: Same.
73 * graphite-opencl.h: Same.
75 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
77 * graphite-opencl-codegen.c: Sort topologically static functions.
78 * graphite-opencl.c: Same.
80 2010-12-25 Sebastian Pop <sebastian.pop@amd.com>
82 * graphite-cloog-compat.h (cloog_names_nb_scattering): New.
83 (cloog_names_scattering): New.
84 * graphite-opencl-codegen.c (opencl_constant_expression_p): Use
85 clast_expr_* instead of expr_*. Call clast_name_to_str.
86 (opencl_clast_name_to_tree): Now takes a clast_name_p in parameter.
87 (opencl_get_scat_real_name): Same. Call clast_name_to_str.
88 (opencl_add_scat_as_arg): Same.
89 (opencl_print_local_vars): Call cloog_names_scattering and
90 cloog_names_nb_scattering.
91 (opencl_print_for): Do not call value_*.
92 (opencl_print_term): Same.
93 (opencl_print_expr): Use clast_expr_* instead of expr_*.
94 (opencl_print_sum): Same.
95 (opencl_print_binary): Same.
97 2010-12-25 Alexey Kravets <kayrick@ispras.ru>
99 * Makefile.in (OBJS-common): Add graphite-opencl-codegen.o,
100 graphite-opencl-meta-clast.o and graphite-opencl.o.
101 (graphite-opencl-codegen.o): New.
102 (graphite-opencl-meta-clast.o): New.
103 (graphite-opencl.o): New.
104 (GTFILES): Add graphite-opencl.c.
105 * common.opt (fgraphite-opencl): New.
106 (fgraphite-opencl-cpu): New.
107 (fgraphite-opencl-ignore-depth-heuristic): New.
108 (fgraphite-opencl-ignore-mem-heuristic): New.
109 (fgraphite-opencl-ignore-dep): New.
110 (fgraphite-opencl-ignore-types): New.
111 (fgraphite-opencl-depth-base): New.
112 (fgraphite-opencl-debug): New.
113 * graphite-opencl-codegen.c: New file.
114 * graphite-opencl-meta-clast.c: New file.
115 * graphite-opencl.c: New file.
116 * graphite-opencl.h: New file.
117 * graphite.c (graphite_transform_loops): Call graphite_opencl_init and
118 graphite_opencl_finalize.
119 * tree-ssa-loop.c (gate_graphite_transforms): Handle
120 flag_graphite_opencl.
121 * graphite-clast-to-gimple.c (gloog): Call opencl_transform_clast.
122 * dbgcnt.def (opencl_scop_cnt): New counter.
124 2010-12-25 Alexander Monakov <amonakov@ispras.ru>
126 * graphite-dependences.c (graphite_outer_subscript_bound): New.
127 (graphite_carried_dependence_level_k): Export.
128 * graphite-dependences.h (graphite_outer_subscript_bound): Declare.
129 (graphite_carried_dependence_level_k): Ditto.
131 2010-12-25 Alexey Kravets <kayrick@ispras.ru>
133 * graphite-clast-to-gimple.c (struct clast_name_index): Move
134 definition to graphite-clast-to-gimple.h.
135 (clast_name_to_index): Ditto.
136 (clast_name_index_elt_info): Ditto.
137 (eq_clast_name_indexes): Ditto.
138 (save_clast_name_index): Export.
139 (clast_name_to_gcc): Ditto.
140 (clast_to_gcc_expression): Ditto.
141 (gcc_type_for_clast_expr): Ditto.
142 (graphite_create_new_guard): Ditto.
143 (gcc_type_for_iv_of_clast_loop): Ditto.
144 (graphite_create_new_loop): Ditto.
145 (build_iv_mapping): Ditto.
146 (graphite_create_new_loop_guard): Ditto.
147 (debug_clast_name_index): New.
148 (debug_clast_name_indices): New debug function.
150 2010-12-21 Sebastian Pop <sebastian.pop@amd.com>
152 PR tree-optimization/47021
153 * graphite-sese-to-poly.c (scan_tree_for_params): Handle ADDR_EXPR.
155 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
157 * graphite-sese-to-poly.c (analyze_drs_in_stmts): Fix set but
159 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
161 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
163 * graphite-sese-to-poly.c (analyze_drs): Removed.
164 (build_scop_drs): Do not call analyze_drs.
165 (analyze_drs_in_stmts): New.
167 (insert_out_of_ssa_copy): Call analyze_drs_in_stmts.
168 (insert_out_of_ssa_copy_on_edge): Same.
169 (rewrite_close_phi_out_of_ssa): Call insert_stmts.
170 (rewrite_phi_out_of_ssa): Same.
171 (rewrite_cross_bb_scalar_dependence): Same.
172 (split_reduction_stmt): Move data references in the new basic blocks.
173 (translate_scalar_reduction_to_array_for_stmt): Call insert_stmts.
175 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
177 * sese.c (rename_uses): Do not handle ADDR_EXPR in LHS of assignments.
179 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
182 * graphite-poly.c (new_poly_bb): Returns a poly_bb_p. Do not take
183 the reduction bool in parameter. Clear PBB_IS_REDUCTION. Set GBB_PBB.
184 * graphite-poly.h (new_poly_bb): Update declaration.
185 (gbb_from_bb): Moved here...
187 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
189 (graphite_stmt_p): Removed.
190 (try_generate_gimple_bb): Returns a gimple_bb_p. Do not pass in
191 sbitmap reductions. Always build a gimple_bb_p. Do not call
193 (build_scop_bbs_1): Do not pass in sbitmap reductions.
194 (build_scop_bbs): Same.
195 (gbb_from_bb): ... from here.
196 (add_conditions_to_constraints): Moved up.
198 (build_scop_drs): Call analyze_drs. Remove all the PBBs that do
199 not contain data references.
200 (new_pbb_from_pbb): New.
201 (insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
203 (rewrite_close_phi_out_of_ssa): Update call to
204 insert_out_of_ssa_copy_on_edge.
205 (rewrite_reductions_out_of_ssa): Now static.
206 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
208 (split_reduction_stmt): Call split_pbb.
209 (translate_scalar_reduction_to_array): Pass in the scop, do not
210 pass in the sbitmap reductions.
211 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
212 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
213 (rewrite_commutative_reductions_out_of_ssa): Same.
214 (build_poly_scop): Call build_scop_bbs,
215 rewrite_commutative_reductions_out_of_ssa,
216 rewrite_reductions_out_of_ssa, and
217 rewrite_cross_bb_scalar_deps_out_of_ssa. Move build_scop_drs
219 * graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
221 (rewrite_reductions_out_of_ssa): Same.
222 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
223 (build_scop_bbs): Same.
224 * graphite.c (graphite_transform_loops): Do not initialize reductions.
225 Do not call build_scop_bbs,
226 rewrite_commutative_reductions_out_of_ssa,
227 rewrite_reductions_out_of_ssa, and
228 rewrite_cross_bb_scalar_deps_out_of_ssa.
229 * sese.h (struct gimple_bb): Add field pbb.
232 * gcc.dg/graphite/pr45297.c: New.
234 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
236 * graphite-sese-to-poly.c (handle_scalar_deps_crossing_scop_limits):
238 (rewrite_cross_bb_scalar_deps): Pass in the scop. Call
239 handle_scalar_deps_crossing_scop_limits.
240 (rewrite_cross_bb_scalar_deps_out_of_ssa): Create an empty BB
241 after the scop. Update call to rewrite_cross_bb_scalar_deps.
243 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
245 * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
246 when replacing a constant in an ADDR_EXPR.
248 2010-10-20 Sebastian Pop <sebastian.pop@amd.com>
250 * graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
252 (lst_do_strip_mine): Same.
253 (scop_do_strip_mine): Same.
254 * graphite-poly.c (apply_poly_transforms): Update call to
256 * graphite-poly.h (scop_do_strip_mine): Update declaration.
258 2010-09-24 Sebastian Pop <sebastian.pop@amd.com>
261 * graphite.c (graphite_initialize): Call scev_reset.
263 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
265 * sese.h (scev_analyzable_p): Return false for real or floating
266 point. Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
268 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
271 * gfortran.dg/graphite/pr45758.f90: New.
273 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
275 * graphite-scop-detection.c (is_scop_p): Free bblist.
277 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
279 * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
281 * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
283 * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
284 Do not allocate ub_expr, it is passed in initialized.
286 2010-09-21 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
288 * common.opt (fgraphite-dump-cloog): New flag.
289 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
290 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
291 (build_cloog_prog): Dump CLooG input file when
292 flag_graphite_dump_cloog is set.
293 * graphite-cloog-compat.h (cloog_program_dump_cloog): New.
295 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
297 Revert previous patch "New flag: -fgraphite-dump-cloog."
299 2010-09-20 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
301 * common.opt (fgraphite-dump-cloog): New flag.
302 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
303 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
304 (build_cloog_prog): Dump CLooG input file when
305 flag_graphite_dump_cloog is set.
307 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
309 * graphite-clast-to-gimple.c (graphite_verify): Remove call to
310 verify_dominators for CDI_POST_DOMINATORS.
311 * sese.h: Remove comment about CDI_POST_DOMINATORS.
312 (recompute_all_dominators): Remove call to free_dominance_info
313 for CDI_POST_DOMINATORS. Remove call to calculate_dominance_info
314 for CDI_POST_DOMINATORS.
316 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
318 * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
319 over pbb_dim_iter_domain.
321 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
323 * graphite-flattening.c: Fix comments.
325 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
327 * Makefile.in (OBJS-common): Add graphite-flattening.o.
328 (graphite-flattening.o): New rule.
329 * common.opt (floop-flatten): New flag.
330 * doc/invoke.texi (-floop-flatten): Documented.
331 * graphite-flattening.c: New.
332 * graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
333 * graphite-poly.h (flatten_all_loops): Declared.
334 (lst_remove_loop_and_inline_stmts_in_loop_father): New.
335 * tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
336 is set, also set flag_graphite.
338 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
340 * graphite-poly.c (cloog_checksum): New.
341 * graphite-poly.h (cloog_checksum): Declared.
343 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
345 * graphite-poly.c (pbb_number_of_iterations): Removed.
346 (pbb_number_of_iterations_at_time): Correctly compute the number
347 of iterations in the transformed loop.
348 * graphite-poly.h (pbb_number_of_iterations): Removed.
350 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
352 * graphite-poly.h (lst_update_scattering_seq): Removed.
353 (lst_update_scattering): Correctly handle outermost loop dewey
356 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
358 * graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
359 lst_strip_mine_profitable_p. Call lst_niter_for_loop.
360 * graphite-poly.h (lst_niter_for_loop): New.
362 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
364 * graphite-poly.c (apply_poly_transforms): Do not abort when the
365 transform read from disk is not legal. Call fatal_error instead.
367 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
369 * graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
370 (print_scop_header): Removed. Inlined in the only call place...
371 (print_scop): ... here.
373 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
375 * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
377 2010-09-02 Vladimir Kargov <kargov@gmail.com>
379 * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
380 (is_valid_stmt_p): Add data reference and operation-specific checks.
381 (is_valid_bb_p): Change structure, add loop validity check.
382 (is_scop_p): Move the TODO list
383 (find_scops_new): New.
384 (build_scops_new): Move part of functionality to find_scops_new and
385 build_scops. Add necessary steps for successful SCoP construction.
386 (build_scops): Compute SCoP sets for both detection algorithms, choose
387 the resulting one depending on static condition.
389 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
391 * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
393 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
395 * graphite-dependences.c (dot_deps): Avoid set but not used warning.
396 (dot_deps_stmt): Same.
397 * graphite-poly.c (dot_lst): Same.
399 2010-08-23 Sebastian Pop <sebastian.pop@amd.com>
401 * graphite-blocking.c (scop_do_strip_mine): Do not call
402 graphite_legal_transform.
403 (scop_do_block): Same.
405 2010-08-20 Vladimir Kargov <kargov@gmail.com>
407 * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
410 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
413 * gcc.dg/graphite/id-pr45230.c: New.
415 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
417 * tree-scalar-evolution.c (instantiate_array_ref): New.
418 (instantiate_scev_r): Also handle ARRAY_REFs.
420 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
422 * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
423 Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
424 RESULT_DECL, and FIELD_DECL. Return false for an
425 SSA_NAME_IS_DEFAULT_DEF.
426 (compute_scalar_evolution_in_loop): Do not further analyze the
427 scalar evolution when no_evolution_in_loop_p returns true.
429 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
431 * tree-chrec.h (evolution_function_is_affine_p): Do not check
432 whether CHREC_LEFT is invariant. A function is affine when
433 CHREC_RIGHT is invariant.
435 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
437 * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
439 (rewrite_degenerate_phi): Same.
440 (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
442 2010-08-18 Vladimir Kargov <kargov@gmail.com>
444 * graphite-scop-detection.c (graphite_can_represent_scev,
445 graphite_can_represent_expr, stmt_has_simple_data_refs_p,
446 graphite_can_represent_loop): Remove outermost_loop.
448 2010-08-17 Sebastian Pop <sebastian.pop@amd.com>
451 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
452 handle GIMPLE_CALLs with no LHS.
454 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
455 Sebastian Pop <sebastian.pop@amd.com>
457 * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
458 Call remove-build-file to clean up the generated *.graphite files.
460 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
462 * doc/invoke.texi (debugging options): Update documentation.
463 (-floop-interchange): Same.
464 (-flopp-strip-mine): Same.
465 (-floop-block): Same.
466 (-fgraphite-read): Add documentation.
467 (-fgraphite-write): Same.
469 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
471 * toplev.c (process_options): Disable graphite loop optimization
472 options when -fgraphite-read flag is used.
474 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
476 * graphite-poly.c (init_graphite_out_file): New.
477 (init_graphite_in_file): New.
478 (apply_poly_transforms): Updated to enable reading and writing of
480 * toplev.c (init_asm_output): Remove graphite in/out file initialization.
482 2010-08-17 Tobias Grosser <grosser@fim.uni-passau.de>
484 * graphite-scop-detection.c (graphite_can_represent_scev): Remove
487 2010-08-12 Sebastian Pop <sebastian.pop@amd.com>
489 * graphite-clast-to-gimple.c (precision_for_value): Adjust
490 computation of precision by 1.
492 2010-08-12 Riyadh Baghdadi <baghdadi.mr@gmail.com>
494 * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
495 (openscop_read_polyhedron_matrix): New.
496 * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
497 (openscop_read_N_int): Same.
498 * graphite-poly.c (openscop_read_N_int): New.
499 (openscop_read_one_int): New.
500 (openscop_read_N_string): New.
501 (openscop_read_one_string): New.
502 (openscop_read_powerset_matrix): New.
503 (graphite_read_transforms): Remove.
504 (graphite_read_scatt): New.
505 (graphite_read_scop_file): New.
506 (apply_poly_transforms): Updated to call graphite_read_scop_file.
508 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
510 * graphite-poly.c: Change include order.
512 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
514 * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
515 (cloog_matrix_nrows): New.
517 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
519 * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
521 * graphite-poly.c (openscop_print_scattering_function_1): Same.
522 (print_scattering_function_1): Same.
523 (openscop_print_pbb_domain): Same.
524 (openscop_print_scop_context): Same.
525 (print_scop_context): Same.
527 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
529 * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
530 (openscop_print_pdr_polyhedron): Print pph.
532 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
534 * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
535 * gfortran.dg/graphite/graphite.exp: Same.
536 * gcc.dg/graphite/vect-pr43423.c: New.
538 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
540 * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
541 priority signed types.
543 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
545 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
546 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
548 2010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
550 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
551 (openscop_print_polyhedron_matrix): New.
552 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
553 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
554 (openscop_print_pdr_powerset): New.
555 (openscop_print_powerset_matrix): New.
556 (openscop_print_scattering_function_1): New.
557 (print_scattering_function): Add support for scattering names and
559 (graphite_write_transforms): Remove.
560 (apply_poly_transforms): Updated to call print_scop.
561 (print_pdr_access_layout): Updated to support OpenScop format.
563 (openscop_print_pbb_domain): New.
564 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
566 (print_pbb): Updated to call the new print_pbb_body.
567 (openscop_print_scop_context): New.
568 (print_scop_header): New.
569 (print_scop): Updated to call print_scop_header.
570 * graphite-poly.h: Document OpenScop format.
572 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
574 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
575 the case removed in the previous patch, when the only phi argument
576 is defined in the same loop as the phi node itself. Handle it
577 separately from the invariant case by both propagating it outside
578 the region and replacing the phi node with an assign.
580 2010-07-28 Sebastian Pop <sebastian.pop@amd.com>
582 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
583 constant phi nodes with one argument are is_gimple_min_invariant
584 and SSA_NAME_IS_DEFAULT_DEF.
586 * gfortran.dg/graphite/id-22.f: New.
588 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
590 * graphite.c (graphite_initialize): Do not initialize
591 CLooG and initialize the Parma Polyhedra Library
592 manually when using CLOOG_ORG.
593 (graphite_finalize): Do not finalize CLooG and finalize
594 the Parma Polyhedra Library manually when using CLOOG_ORG.
595 * graphite-cloog-compat.h (cloog_initialize): Hide function
596 when using CLOOG_ORG.
597 (cloog_finalize): Same.
599 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
601 * graphite-clast-to-gimple.c (free_scattering): Change
602 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
604 (build_cloog_prog): Same.
605 * graphite-cloog-compat.h (cloog_domain): Removed.
606 (cloog_scattering): New.
607 (cloog_set_domain): Removed.
608 (cloog_set_scattering): New.
609 (cloog_next_domain): Removed.
610 (cloog_next_scattering): New.
611 (cloog_set_next_domain): Removed.
612 (cloog_set_next_scattering): New.
613 (CloogScatteringList): New.
614 (CloogScattering): New.
615 (cloog_scattering_free): New.
616 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
617 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
620 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
622 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
624 (set_cloog_options): Same.
625 (print_clast_stmt): Same.
626 (scop_to_clast): Same.
627 (print_generated_program): Same.
629 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
630 (scop_to_clast): Extend with CloogState.
631 * graphite-cloog-util.c: Include graphite-cloog-compat.h
632 (new_Cloog_Domain_from_ppl_Polyhedron):
633 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
634 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
635 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
636 * graphite-cloog-util.h (build_cloog_prog): Same.
637 * graphite-cloog-copat.h (build_cloog_prog): New.
639 (cloog_state_malloc): New.
640 (cloog_state_free): New.
641 (cloog_loop_malloc): New.
642 (cloog_options_malloc): New.
643 (cloog_statement_alloc): New.
644 (cloog_domain_from_cloog_matrix): New.
645 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
646 (new_Cloog_Domain_from_ppl_Polyhedron): New.
648 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
650 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
651 type of NAME now depends on used CLooG version.
652 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
653 (gcc_type_for_clast_expr): Same.
654 (print_clast_stmt): Replace pprint with clast_pprint.
655 * graphite-cloog-compat.h: Provide compatibility macros for
658 (clast_expr_term): New.
659 (clast_expr_red): New.
660 (clast_expr_bin): New.
663 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
665 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
666 compatible to newer CLooG releases (CLOOG_ORG).
667 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
668 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
669 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
670 (build_cloog_prog) : New.
671 (cloog_program_extract_scalars): New.
672 (cloog_program_scatter): New.
674 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
676 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
677 conditionally (CLOOG_ORG).
678 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
679 (cloog_statement_usr): New.
680 (cloog_domain): Same.
681 (cloog_set_domain): Same.
682 (cloog_next_domain): Same.
683 (cloog_set_next_domain): Same.
684 (cloog_program_nb_scattdims): Same.
685 (cloog_program_set_nb_scattdims): Same.
686 (cloog_program_names): Same.
687 (cloog_program_set_names): Same.
688 (cloog_program_set_context): Same.
689 (cloog_program_set_loop): Same.
690 (cloog_program_blocklist): Same.
691 (cloog_program_set_blocklist): Same.
692 (cloog_program_scaldims): Same.
693 (cloog_program_set_scaldims): Same.
694 (cloog_names_nb_parameters): Same.
695 (cloog_names_set_nb_parameters): Same.
696 (cloog_names_parameters): Same.
697 (cloog_names_set_parameters): Same.
698 (cloog_names_set_nb_iterators): Same.
699 (cloog_names_set_iterators): Same.
700 (cloog_names_set_nb_scattering): Same.
701 (cloog_names_set_scattering): Same.
702 (cloog_statement_set_usr): Same.
703 (cloog_loop_set_next): Same.
704 (cloog_loop_set_domain): Same.
705 (cloog_loop_set_block): Same.
706 (cloog_block_list_next): Same.
707 (cloog_block_list_set_next):
708 (cloog_block_list_set_block): Same.
710 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
712 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
714 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
715 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
716 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
717 when something has been changed.
718 (rewrite_commutative_reductions_out_of_ssa): Same.
720 * gcc.dg/graphite/id-26.c: New.
722 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
724 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
725 handle the case when def is in the sese region.
726 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
727 for invariant expressions.
728 (rewrite_cross_bb_phi_deps): Removed.
729 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
730 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
731 rewrite_cross_bb_phi_deps.
733 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
735 * graphite-sese-to-poly.c
736 (rewrite_commutative_reductions_out_of_ssa_loop): Call
737 scev_analyzable_p only on is_gimple_reg
739 * gcc.dg/graphite/id-25.c: New.
741 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
743 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
744 (rewrite_close_phi_out_of_ssa): Propagate constant values or
745 parametric expressions outside the scop region.
746 (rewrite_cross_bb_scalar_deps): Same.
747 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
749 * gcc.dg/graphite/run-id-5.c: New.
750 * gcc.dg/graphite/run-id-6.c: New.
751 * gfortran.dg/graphite/id-21.f: New.
753 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
755 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
756 SSA_NAME_DEF_STMT only on SSA_NAMEs.
758 * gcc.dg/graphite/id-24.c: New.
760 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
762 * tree-scalar-evolution.c (instantiate_scev_name): Do not
763 instantiate default definitions.
765 2010-07-20 Vladimir Kargov <kargov@gmail.com>
767 * graphite-scop-detection.c (is_valid_stmt_p): New.
768 (is_valid_bb_p): New.
770 2010-07-20 Vladimir Kargov <kargov@gmail.com>
771 Sebastian Pop <sebastian.pop@amd.com>
773 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
774 (loop_exits_from_bb_p): New.
775 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
776 (loop_exits_from_bb_p): Declared.
777 * graphite-scop-detection.c (scopdet_basic_block_info): Call
780 2010-07-20 Vladimir Kargov <kargov@gmail.com>
782 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
784 (dot_regions_1): New.
786 * refined-regions.h (dot_regions): Declared.
787 * Makefile.in (refined-regions.o): Update dependences.
789 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
791 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
792 extra parameter for the region. Call scev_analyzable_p.
793 (rewrite_reductions_out_of_ssa): Update call to
794 rewrite_close_phi_out_of_ssa.
795 (rewrite_cross_bb_phi_deps): Same.
796 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
797 parameter for the region. Call scev_analyzable_p.
798 (rewrite_commutative_reductions_out_of_ssa): Update call to
799 rewrite_commutative_reductions_out_of_ssa_loop.
801 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
803 * gcc.dg/tree-ssa/pr20742.c: New.
805 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
807 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
809 * gcc.dg/graphite/id-23.c: New.
811 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
813 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
814 SSA scalar phi nodes that can be scev_analyzable_p.
816 * gfortran.dg/graphite/id-20.f: Adjust testcase.
818 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
820 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
821 handle SSA_NAME_IS_DEFAULT_DEF.
823 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
825 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
827 * gcc.dg/graphite/pr42729.c: New.
829 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
831 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
832 case non close-phi nodes with one argument.
834 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
836 * sese.h (scev_analyzable_p): Scevs could be expressions without
837 chrecs and still be scev_analyzable_p.
839 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
841 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
843 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
845 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
846 * cfgloop.h (struct loop): Remove single_iv field.
847 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
848 (scop_canonicalize_loops): Removed.
849 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
850 over all the loop phi nodes in loop->header.
851 (build_poly_scop): Remove use of scop_canonicalize_loops.
853 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
855 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
858 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
860 * tree-chrec.c (chrec_apply): Should only apply to the specified
861 variable. Also handle multivariate chains of recurrences that
862 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
864 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
866 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
867 (debug_clast_name_indexes_1): Removed.
868 (debug_clast_name_indexes): Removed.
869 (pbb_to_depth_to_oldiv): Removed.
870 (build_iv_mapping): Replace the use of rename_map with iv_map.
871 (translate_clast_user): Remove uses of rename_map. Allocate and
873 (translate_clast_for_loop): Remove uses of rename_map.
874 (translate_clast_for): Same.
875 (translate_clast_guard): Same.
876 (translate_clast): Same.
878 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
879 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
880 * sese.c (set_rename): Now static.
881 (rename_variables_in_stmt): Removed.
883 (is_parameter): Removed.
885 (expand_scalar_variables_call): Removed.
886 (expand_scalar_variables_ssa_name): Removed.
887 (expand_scalar_variables_expr): Removed.
888 (expand_scalar_variables_stmt): Removed.
889 (expand_scalar_variables): Removed.
890 (rename_variables): Removed.
891 (remove_condition): Removed.
892 (get_true_edge_from_guard_bb): Removed.
893 (get_false_edge_from_guard_bb): Removed.
894 (struct igp): Removed.
895 (default_before_guard): Removed.
896 (convert_for_phi_arg): Removed.
897 (add_guard_exit_phis): Removed.
898 (insert_guard_phis): Removed.
899 (graphite_copy_stmts_from_block): Now also uses iv_map and a
900 region. Do not copy conditions. Do not copy induction variables.
902 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
903 the translated statement. Use the iv_map for the induction
905 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
906 (set_rename): Removed declaration.
907 (scev_analyzable_p): ...here.
908 * tree-chrec.c (chrec_apply_map): New.
909 * tree-chrec.h (chrec_apply_map): Declared.
911 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
913 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
914 insert_loop_close_phis.
915 * sese.c (name_defined_in_loop_p): Removed.
916 (expr_defined_in_loop_p): Removed.
917 (alive_after_loop): Removed.
918 (close_phi_not_yet_inserted_p): Removed.
919 (struct alep): Removed.
920 (add_loop_exit_phis): Removed.
921 (insert_loop_close_phis): Removed.
923 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
925 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
927 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
929 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
931 * gfortran.dg/graphite/id-20.f: New.
933 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
935 * graphite-cloog-util.h: Added cloog.h.
936 * graphite-blocking.c: Removed cloog.h.
937 * graphite-dependences.c: Same.
938 * graphite-interchange.c: Same.
939 * graphite-poly.c: Same.
940 * graphite-ppl.c: Same.
941 * graphite-scop-detection.c: Same.
942 * graphite-sese-to-poly.c:
944 Removed graphite-clast-to-gimple.h.
945 (check_poly_representation): Removed (unused).
946 * graphite-sese-to-poly.h
947 (check_poly_representation): Removed (unused).
949 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
952 (OBJS-common): Added graphite-cloog-util.o.
953 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
954 (graphite-cloog-util.o): New.
955 (graphite-ppl.o): Added graphite-cloog-util.h.
956 * graphite-clast-to-gimple.c:
957 Added graphite-cloog-util.h to include statements.
958 * graphite-cloog-util.c: New.
959 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
960 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
961 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
962 (new_C_Polyhedron_from_Cloog_Matrix): Same.
963 (ppl_Constrain_System_number_of_constraints): Same.
964 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
965 (oppose_constraint): Same.
966 (cloog_matrix_to_ppl_constraint): Same.
967 (new_Constraint_System_from_Cloog_Matrix): Same.
968 (insert_constraint_into_matrix): Same. Declared static.
969 * graphite-cloog-util.h: New.
970 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
971 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
972 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
973 (new_C_Polyhedron_from_Cloog_Matrix): Same.
974 (insert_constraint_into_matrix): Same.
976 Added graphite-cloog-util.h to include statements.
977 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
978 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
979 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
980 (new_C_Polyhedron_from_Cloog_Matrix): Same.
981 (insert_constraint_into_matrix): Same.
982 (ppl_Constrain_System_number_of_constraints): Same.
983 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
984 (oppose_constraint): Same.
985 (cloog_matrix_to_ppl_constraint): Same.
986 (new_Constraint_System_from_Cloog_Matrix): Same.
988 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
989 graphite-cloog-util.h.
990 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
991 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
992 (new_C_Polyhedron_from_Cloog_Matrix): Same.
993 (insert_constraint_into_matrix): Removed.
995 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
997 * graphite-clast-to-gimple.c
998 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
999 (precision_for_interval): Same.
1000 (gcc_type_for_interval): Same.
1001 (compute_type_for_level): Same.
1002 * graphite-interchange.c
1003 (lst_interchange_profitable_p): Same.
1005 (psct_scattering_dim_for_loop_depth): Same.
1007 (ppl_max_for_le_pointset): Same.
1008 (ppl_min_for_le_pointset): Same.
1010 2010-06-25 Vladimir Kargov <kargov@gmail.com>
1012 * refined-regions.c (bb_index_compare): New.
1013 (get_bbs_in_region): New.
1014 (print_bbs_in_region): New.
1015 (print_refined_region): Add an argument that allows to print
1016 all basic blocks contained in regions.
1017 (debug_refined_region): Update call to print_refined_region.
1018 * refined-regions.h (print_refined_region): Update declaration.
1019 (get_bbs_in_region): Declared.
1020 * graphite-scop-detection.c (build_scops_new): Print the refined
1021 region tree into the Grahite dump file.
1023 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1025 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
1026 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
1028 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1030 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
1031 rewrite_close_phi_out_of_ssa.
1033 * gcc.dg/graphite/id-22.c: New.
1035 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1037 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
1039 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1041 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
1043 * sese.c (debug_rename_map): Same.
1046 (rename_variables_in_stmt): Same.
1047 (expand_scalar_variables_call): Same.
1048 (expand_scalar_variables_ssa_name): Same.
1049 (expand_scalar_variables_expr): Same.
1050 (expand_scalar_variables_stmt): Same.
1051 (expand_scalar_variables): Same.
1052 (rename_variables): Same.
1053 (graphite_copy_stmts_from_block): Same.
1054 (copy_bb_and_scalar_dependences): Same.
1056 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1058 * graphite-clast-to-gimple.c (copy_renames): Removed.
1059 (translate_clast_for): Do not call copy_renames.
1060 (translate_clast_guard): Same.
1062 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1064 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
1065 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
1066 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
1067 before rewrite_cross_bb_scalar_deps.
1069 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1071 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
1072 Early return in when flag_associative_math is not set.
1074 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1076 * gcc.dg/graphite/run-id-2.c: Call abort.
1078 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1080 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
1081 of SSA copies on edges except for loop->latch.
1083 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1085 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
1086 Split out of rewrite_reductions_out_of_ssa.
1087 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
1089 * graphite.c (graphite_transform_loops): Call it.
1091 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1093 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
1095 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
1097 * passes.c (init_optimization_passes): Add pass_graphite.
1098 Schedule a pass_copy_prop before pass_graphite_transforms.
1099 * timevar.def (TV_GRAPHITE): Declared.
1100 * tree-pass.h (pass_graphite): Declared.
1101 * tree-ssa-loop.c (pass_graphite): New.
1103 * gcc.dg/graphite/id-20.c: New.
1105 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1107 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
1108 Remove calls to rename_nb_iterations and rename_sese_parameters.
1109 * graphite-clast-to-gimple.h (gloog): Update declaration.
1110 * graphite.c (graphite_transform_loops): Update call to gloog.
1111 * sese.c (rename_variables_in_expr): Removed.
1112 (rename_nb_iterations): Removed.
1113 (rename_sese_parameters): Removed.
1114 * sese.h (rename_nb_iterations): Removed.
1115 (rename_sese_parameters): Removed.
1117 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1119 * graphite-clast-to-gimple.c (gloog): Remove call to
1120 sese_adjust_liveout_phis.
1121 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
1122 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
1123 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
1124 rewrite_phi_out_of_ssa.
1125 * sese.c (get_vdef_before_sese): Removed.
1126 (sese_adjust_vphi): Removed.
1127 (sese_adjust_liveout_phis): Removed.
1128 * sese.h (sese_adjust_liveout_phis): Removed.
1130 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1132 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
1133 argument for the place after which to insert the out of SSA copy.
1134 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
1135 (rewrite_phi_out_of_ssa): Same.
1136 (rewrite_cross_bb_scalar_deps): Same.
1137 (insert_copyout): Removed.
1138 (insert_copyin): Removed.
1139 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
1140 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
1143 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1145 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
1146 (rewrite_reductions_out_of_ssa): Same.
1147 (rewrite_commutative_reductions_out_of_ssa): Same.
1148 (build_poly_scop): Do not call these functions.
1149 * graphite-sese-to-poly.h (build_poly_scop): Declared.
1150 (rewrite_reductions_out_of_ssa): Declared.
1151 (rewrite_commutative_reductions_out_of_ssa): Declared.
1152 * graphite.c (graphite_transform_loops): Call on every scop
1153 rewrite_commutative_reductions_out_of_ssa before calling
1154 rewrite_reductions_out_of_ssa and build_scop_bbs.
1156 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1158 * graphite-dependences.c (dot_deps): Make system call to dotty run
1160 (dot_deps_stmt): Same.
1161 * graphite-poly.c (dot_lst): Same.
1163 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
1165 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
1166 old_type in parameter.
1167 (gcc_type_for_value): Update call to gcc_type_for_interval.
1168 (compute_type_for_level_1): Renamed compute_type_for_level.
1169 Update call to gcc_type_for_interval.
1171 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1173 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
1174 the scev analysis when the variable is not used outside the loop
1175 in a close phi node: call compute_overall_effect_of_inner_loop.
1177 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1179 * graphite-sese-to-poly.c (single_pred_cond): Renamed
1180 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
1181 (build_sese_conditions_before): Renamed call to single_pred_cond.
1182 (build_sese_conditions_after): Same.
1184 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1186 * graphite-poly.h: Fix comments and indentation.
1187 * graphite-sese-to-poly.c: Same.
1188 (build_sese_conditions_before): Compute stmt and gbb only when needed.
1189 * tree-chrec.c: Fix comments and indentation.
1190 (tree-ssa-loop-niter.c): Same.
1192 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
1194 * refined-regions.c (create_region): Only initialize the region.
1195 (find_regions_with_entry): Initialize parent relation and bbmap
1197 (build_regions_tree): Set outermost_region to region instead of
1199 (calculate_region_tree): Remove unneeded parameters.
1201 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
1203 * graphite-scop-detection.c (is_scop_p): New.
1204 (build_scops_new): New. A skeleton for the new scop detection.
1205 (build_scops_old): Renamed from build_scops.
1206 (build_scops): New version. Call the new and the old scop
1209 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
1210 Antoniu Pop <antoniu.pop@gmail.com>
1212 * Makefile.in (OBJS-common): Add refined-regions.o.
1213 (refined-regions.o): New.
1214 (graphite-scop-detection.o): Use refined-regions.h.
1215 * graphite-scop-detection.c: Include refined-regions.h
1216 (build_scops): Also build the refined region tree.
1217 * refined-regions.c: New. Adds an algorithm to detect refined
1219 (print_refined_region): New.
1220 (debug_refined_region): New.
1221 (refined_region_contains_bb_p): New.
1222 (refined_region_contains_region_p): New.
1223 (is_common_df): New.
1224 (struct find_regions_global_data): New.
1226 (typedef struct bb_bb_def): New.
1227 (new_bb_bb_def): New.
1228 (bb_bb_map_hash): New.
1229 (eq_bb_bb_map): New.
1232 (new_bb_reg_def): New.
1233 (bb_reg_map_hash): New.
1234 (eq_bb_reg_map): New.
1235 (find_new_region): New.
1236 (insert_new_reg): New.
1237 (insert_new_bb): New.
1238 (insert_shortcut): New.
1239 (get_next_postdom): New.
1240 (create_region): New.
1241 (find_regions_with_entry): New.
1242 (find_regions_adc): New.
1243 (find_regions): New.
1244 (get_topmost_parent): New.
1245 (build_regions_tree): New.
1246 (calculate_region_tree): New.
1247 (free_region_tree): New.
1248 * refined-regions.h: New.
1249 (struct refined_region): New.
1250 (calculate_region_tree): New.
1251 (free_region_tree): New.
1252 (refined_region_contains_bb_p): New.
1253 (refined_region_contains_region_p): New.
1254 (print_refined_region): New.
1255 (debug_refined_region): New.
1257 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
1259 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1262 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1264 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
1265 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
1267 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1269 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
1270 phi_arg_in_outermost_loop.
1271 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
1272 (remove_invariant_phi): Same.
1274 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1276 * graphite-blocking.c
1277 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
1278 * graphite-clast-to-gimple.c
1279 (clast_to_gcc_expression): Same.
1280 (precision_for_value): Same.
1281 (precision_for_interval): Same.
1282 (gcc_type_for_interval): Same.
1283 (graphite_create_new_guard): Same.
1284 (compute_bounds_for_level): Same.
1285 (graphite_create_new_loop_guard): Same.
1286 * graphite-interchange.c
1287 (build_linearized_memory_access): Same.
1288 (pdr_stride_in_loop): Same.
1289 (memory_strides_in_loop_1): Same.
1290 (memory_strides_in_loop): Same.
1291 (extend_scattering): Same.
1292 (psct_scattering_dim_for_loop_depth): Same.
1293 (pbb_number_of_iterations): Same.
1295 (debug_iteration_domains): Same.
1297 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1298 (ppl_set_inhomogeneous_gmp): Same.
1299 (ppl_strip_loop): Same.
1300 (ppl_lexico_compare_linear_expressions): Same.
1301 (ppl_read_polyhedron_matrix): Same.
1302 (ppl_max_for_le_pointset): Same.
1304 (ppl_read_polyhedron_matrix): Same.
1305 (tree_int_to_gmp): Same.
1306 (gmp_cst_to_tree): Same.
1307 (ppl_set_inhomogeneous): Same.
1308 (ppl_set_inhomogeneous_tree): Same.
1309 (ppl_set_coef): Same.
1310 (ppl_set_coef_tree): Same.
1311 * graphite-sese-to-poly.c
1312 (build_pbb_scattering_polyhedrons): Same.
1313 (build_scop_scattering): Same.
1314 (scan_tree_for_params_right_scev): Same.
1315 (scan_tree_for_params): Same.
1316 (find_params_in_bb): Same.
1317 (find_scop_parameters): Same.
1318 (add_upper_bounds_from_estimated_nit): Same.
1319 (build_loop_iteration_domains): Same.
1320 (add_condition_to_domain): Same.
1321 (pdr_add_memory_accesses): Same.
1323 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1325 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
1326 CLooG's value_* macros to their respective mpz_* counterparts.
1327 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
1328 (graphite_create_new_loop_guard): Same.
1329 * graphite-interchange.c (build_linearized_memory_access): Same.
1330 (pdr_stride_in_loop): Same.
1331 (memory_strides_in_loop_1): Same.
1332 (1st_interchange_profitable_p): Same.
1333 * graphite-poly.c (extend_scattering): Same.
1334 (psct_scattering_dim_for_loop_depth): Same.
1335 (pbb_number_of_iterations): Same.
1336 (pbb_number_of_iterations_at_time): Same.
1337 * graphite-poly.h (new_1st_loop): Same.
1338 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
1339 (oppose_constraint): Same.
1340 (insert_constraint_into_matrix): Same.
1341 (ppl_set_inhomogeneous_gmp): Same.
1342 (ppl_set_coef_gmp): Same.
1343 (ppl_strip_loop): Same.
1344 (ppl_lexico_compare_linear_expressions): Same.
1345 (ppl_max_for_le_pointset): Same.
1346 (ppl_min_for_le_pointset): Same.
1347 (ppl_build_realtion): Same.
1348 * graphite-ppl.h (gmp_cst_to_tree): Same.
1349 (ppl_set_inhomogeneous): Same.
1350 (ppl_set_inhomogeneous_tree): Same.
1351 (ppl_set_coef): Same.
1352 (ppl_set_coef_tree): Same.
1353 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
1354 (build_scop_scattering): Same.
1355 (add_value_to_dim): Same.
1356 (scan_tree_for_params_right_scev): Same.
1357 (scan_tree_for_params_int): Same.
1358 (scan_tree_for_params): Same.
1359 (find_params_in_bb): Same.
1360 (find_scop_parameters): Same.
1361 (add_upper_bounds_from_estimated_nit): Same.
1362 (build_loop_iteration_domains): Same.
1363 (create_linear_expr_from_tree): Same.
1364 (add_condition_to_domain): Same.
1365 (pdr_add_memory_accesses): Same.
1367 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1370 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1371 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1372 When converting an unsigned type to signed, double its precision.
1373 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1374 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1375 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1377 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1380 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1381 build_nonstandard_integer_type.
1382 (gcc_type_for_interval): Same.
1384 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1387 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1388 POINTER_PLUS_EXPR for pointer types.
1390 * gcc.dg/graphite/id-19.c: New.
1392 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
1395 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1396 * graphite-clast-to-gimple.c: Include langhooks.h.
1397 (max_signed_precision_type): New.
1398 (max_precision_type): Takes two types as arguments.
1399 (precision_for_value): New.
1400 (precision_for_interval): New.
1401 (gcc_type_for_interval): New.
1402 (gcc_type_for_value): New.
1403 (gcc_type_for_clast_term): New.
1404 (gcc_type_for_clast_red): New.
1405 (gcc_type_for_clast_bin): New.
1406 (gcc_type_for_clast_expr): Split up into several functions.
1407 (gcc_type_for_clast_eq): Rewritten.
1408 (compute_bounds_for_level): New.
1409 (compute_type_for_level_1): New.
1410 (compute_type_for_level): New.
1411 (gcc_type_for_cloog_iv): Removed.
1412 (gcc_type_for_iv_of_clast_loop): Rewritten.
1413 (graphite_create_new_loop): Compute the lower and upper bound types
1414 with gcc_type_for_clast_expr.
1415 (graphite_create_new_loop_guard): Same.
1416 (find_cloog_iv_in_expr): Removed.
1417 (compute_cloog_iv_types_1): Removed.
1418 (compute_cloog_iv_types): Removed.
1419 (gloog): Do not call compute_cloog_iv_types.
1420 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1422 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1423 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1424 (GBB_CLOOG_IV_TYPES): Removed.
1426 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1428 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
1430 Reverted this commit: as at this point the loop closed SSA form
1431 is under a canonical form respecting the single argument condition.
1432 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1433 close phi nodes may have more than one argument.
1435 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
1437 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1438 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1439 (detect_commutative_reduction): Same.
1441 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
1443 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1444 close phi nodes may have more than one argument.
1446 2010-03-30 Richard Guenther <rguenther@suse.de>
1447 Zdenek Dvorak <ook@ucw.cz>
1448 Sebastian Pop <sebastian.pop@amd.com>
1451 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1452 with multiple arguments.
1453 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1455 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1457 * graphite-dependences.c (print_pddr): Call print_pdr with an
1459 * graphite-poly.c (debug_pdr): Add an extra argument for the
1462 (print_pbb_domain): Same.
1464 (print_scop_context): Same.
1466 (print_cloog): Same.
1467 (debug_pbb_domain): Same.
1471 (debug_scop_context): Same.
1473 (debug_cloog): Same.
1474 (print_scop_params): Same.
1475 (debug_scop_params): Same.
1476 (print_iteration_domain): Same.
1477 (print_iteration_domains): Same.
1478 (debug_iteration_domain): Same.
1479 (debug_iteration_domains): Same.
1480 (print_scattering_function): Same.
1481 (print_scattering_functions): Same.
1482 (debug_scattering_function): Same.
1483 (debug_scattering_functions): Same.
1484 * graphite-poly.h (debug_pdr): Update declaration.
1486 (print_pbb_domain): Same.
1488 (print_scop_context): Same.
1490 (print_cloog): Same.
1491 (debug_pbb_domain): Same.
1495 (debug_scop_context): Same.
1497 (debug_cloog): Same.
1498 (print_scop_params): Same.
1499 (debug_scop_params): Same.
1500 (print_iteration_domain): Same.
1501 (print_iteration_domains): Same.
1502 (debug_iteration_domain): Same.
1503 (debug_iteration_domains): Same.
1504 (print_scattering_function): Same.
1505 (print_scattering_functions): Same.
1506 (debug_scattering_function): Same.
1507 (debug_scattering_functions): Same.
1509 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1511 * graphite-poly.c (print_scattering_function_1): New.
1512 (print_scattering_function): Call it.
1513 (print_scop_params): Remove spaces at the end of lines.
1516 * graphite-poly.h (print_cloog): Declared.
1517 (debug_cloog): Declared.
1519 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1521 * tree-ssa-copy.c: Revert this previous change:
1522 (init_copy_prop): Loop closed phi nodes cancontain more than one
1524 (execute_copy_prop): Revert the previous change: do not call
1525 rewrite_into_loop_closed_ssa.
1527 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1528 Richard Guenther <rguenther@suse.de>
1531 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1532 contain more than one argument.
1533 (execute_copy_prop): Revert the previous change: do not call
1534 rewrite_into_loop_closed_ssa.
1536 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1537 * gcc.dg/graphite/id-pr43464-1.c: New.
1539 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1542 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1543 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1545 * gcc.dg/graphite/id-pr43464.c: New.
1547 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1549 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1551 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1552 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1553 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1554 to switch between adding the IV bump in loop->latch or in loop->header.
1556 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1558 * passes.c (init_optimization_passes): Add pass_copy_prop
1561 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1563 * graphite-poly.c (print_scattering_function): Pretty print following
1566 (print_pbb_domain): Same.
1567 (dump_gbb_cases): Same.
1568 (dump_gbb_conditions): Same.
1571 (print_scop_params): Same.
1572 (print_scop_context): Same.
1574 (print_pbb_body): New.
1575 (lst_indent_to): New.
1576 (print_lst): Start new lines with a #.
1577 * graphite-poly.h (pbb_bb): New.
1578 (pbb_index): Use pbb_bb.
1579 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1581 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1583 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1586 * gcc.dg/graphite/id-pr43351.c
1588 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1591 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1592 call insert_out_of_ssa_copy for default definitions.
1593 * gfortran.dg/graphite/id-pr43354.f: New.
1595 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1598 * gfortran.dg/graphite/pr43349.f: New.
1600 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1602 * graphite-clast-to-gimple.c (my_long_long): Defined.
1603 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1604 * graphite-sese-to-poly.c (my_long_long): Defined.
1605 (scop_ivs_can_be_represented): Use it.
1607 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1609 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1610 graphite-max-bbs-per-function, and loop-block-tile-size.
1611 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1613 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1615 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1617 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1618 forward declaration.
1619 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1620 (add_upper_bounds_from_estimated_nit): New.
1621 (build_loop_iteration_domains): Use it.
1623 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1625 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1627 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1630 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1631 should be an INTEGER_CST. Also handle CASE_CONVERT.
1632 * gcc.dg/graphite/pr43306.c: New.
1634 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1636 * graphite.c (graphite_initialize): To bound the number of bbs per
1637 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1638 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1639 * doc/invoke.texi: Document it.
1641 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1643 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1644 * graphite-sese-to-poly.h (build_poly_scop): Same.
1646 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1648 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1649 the number of parameters in the scop. Use as an upper bound
1650 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1651 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1652 * doc/invoke.texi: Document it.
1654 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1656 * graphite-sese-to-poly.c (add_param_constraints): Use
1657 lower_bound_in_type and upper_bound_in_type.
1659 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1661 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1662 instead of unsigned_type_node.
1664 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1665 Reza Yazdani <reza.yazdani@amd.com>
1668 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1669 on pointer type parameters.
1671 * gcc.dg/graphite/run-id-4.c: New.
1673 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1676 * gcc.dg/graphite/run-id-3.c: New.
1678 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1679 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1681 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1682 handle conversions from pointer to integers.
1683 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1684 induction variable, to be able to work with code generated by CLooG.
1685 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1686 (build_poly_scop): Bail out if we cannot codegen a loop.
1688 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1690 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1691 code generation with gloog_error.
1693 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1695 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1696 Call fold_convert on all the returned values.
1697 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1698 the type of the resulting expression.
1700 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1702 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1703 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1704 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1706 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1708 * graphite-dependences.c (map_into_dep_poly): Removed.
1709 (dependence_polyhedron_1): Use combine_context_id_scat.
1711 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1713 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1714 (struct poly_bb): Same.
1715 (combine_context_id_scat): New.
1717 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1720 * sese.c (name_defined_in_loop_p): Return false for default
1723 * gcc.dg/graphite/pr42326.c: New.
1725 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1727 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1728 and clean up the logic.
1730 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1732 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1735 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1738 * graphite-scop-detection.c (create_single_exit_edge): Move
1739 the call to find_single_exit_edge to....
1740 (create_sese_edges): ...here. Don't handle multiple edges
1741 exiting the function.
1742 (build_graphite_scops): Don't handle multiple edges
1743 exiting the function.
1745 * gcc.dg/graphite/pr43083.c: New.
1747 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1750 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1751 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1753 * gfortran.dg/graphite/pr43097.f: New.
1755 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1756 Manuel López-Ibáñez <manu@gcc.gnu.org>
1759 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1761 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1764 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1766 * g++.dg/graphite/pr43026.C: New.
1768 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1770 * Merge from mainline (154736:156693).
1772 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1775 * gcc.dg/graphite/pr43012.c: New.
1777 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1779 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1780 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1782 * g++.dg/graphite/pr42930.C: New.
1784 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1787 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1788 graphite_can_represent_init for MULT_EXPR.
1790 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1794 * graphite-sese-to-poly.c (remove_phi): New.
1795 (translate_scalar_reduction_to_array): Call remove_phi.
1797 * gcc.dg/graphite/pr42530.c: New.
1798 * gcc.dg/graphite/pr42914.c: New.
1800 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1803 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1804 * graphite-clast-to-gimple.h (gloog): Update declaration.
1805 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1806 * graphite-poly.h (struct poly_bb): Add missing comments.
1807 (struct scop): Add poly_scop_p field.
1809 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1810 * graphite.c (graphite_transform_loops): Build the polyhedral
1811 representation for each scop before code generation.
1812 * sese.c (rename_variables_in_operand): Removed.
1813 (rename_variables_in_expr): Return the renamed expression.
1814 (rename_sese_parameters): New.
1815 * sese.h (rename_sese_parameters): Declared.
1817 * gcc.dg/graphite/pr42771.c: New.
1819 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1821 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1823 * gcc.dg/graphite/block-1.c: Same.
1824 * gcc.dg/graphite/block-3.c: Same.
1825 * gcc.dg/graphite/block-4.c: Same.
1826 * gcc.dg/graphite/block-5.c: Same.
1827 * gcc.dg/graphite/block-6.c: Same.
1828 * gcc.dg/graphite/block-7.c: Same.
1829 * gcc.dg/graphite/interchange-0.c: Same.
1830 * gcc.dg/graphite/interchange-1.c: Same.
1831 * gcc.dg/graphite/interchange-10.c: Same.
1832 * gcc.dg/graphite/interchange-11.c: Same.
1833 * gcc.dg/graphite/interchange-12.c: Same.
1834 * gcc.dg/graphite/interchange-2.c: Same.
1835 * gcc.dg/graphite/interchange-3.c: Same.
1836 * gcc.dg/graphite/interchange-4.c: Same.
1837 * gcc.dg/graphite/interchange-5.c: Same.
1838 * gcc.dg/graphite/interchange-6.c: Same.
1839 * gcc.dg/graphite/interchange-7.c: Same.
1840 * gcc.dg/graphite/interchange-8.c: Same.
1841 * gcc.dg/graphite/interchange-9.c: Same.
1842 * gcc.dg/graphite/interchange-mvt.c: Same.
1844 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1846 * gfortran.dg/graphite/id-19.f: New.
1847 * gfortran.dg/graphite/pr14741.f90: New.
1848 * gfortran.dg/graphite/pr41924.f90: New.
1849 * gfortran.dg/graphite/run-id-2.f90: New.
1851 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1854 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1855 to unknown_dependence.
1856 (graphite_legal_transform_dr): Handle the unknown_dependence.
1857 (graphite_carried_dependence_level_k): Same.
1859 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1861 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1863 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1864 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1867 * graphite-dependences.c (build_lexicographical_constraint): Return
1868 a union of dependence polyhedra.
1869 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1871 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1872 * gcc.dg/graphite/block-4.c: Same.
1873 * gcc.dg/graphite/block-7.c: Same.
1874 * gcc.dg/graphite/interchange-12.c: Same.
1875 * gcc.dg/graphite/interchange-mvt.c: Same.
1876 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1877 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1878 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1880 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1882 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1883 the execution check to FAIL. This testcase is miscompiled by Graphite
1884 and the check should be re-enabled.
1885 * gcc.dg/graphite/interchange-mvt.c: Same.
1886 * gcc.dg/graphite/block-0.c: Same.
1887 * gcc.dg/graphite/block-4.c: Same.
1888 * gcc.dg/graphite/block-7.c: Same.
1890 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1892 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1893 * gcc.dg/graphite/scop-0.c: Fix spaces.
1894 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1895 * gfortran.dg/graphite/block-2.f: Same.
1896 * gfortran.dg/graphite/block-3.f90: Same.
1897 * gfortran.dg/graphite/block-4.f90: Same.
1898 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1899 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1901 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1903 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1904 PDDR_ORIGINAL_SCATTERING_P.
1905 (pddr_is_empty): Rewritten.
1906 (print_dependence_polyhedron_layout): New.
1909 (build_alias_set_powerset): Moved up.
1910 (poly_drs_may_alias_p): Moved up.
1911 (lexicographically_gt_p): Removed.
1912 (build_lexicographically_gt_constraint): Renamed
1913 build_lexicographical_constraint, reimplemented.
1914 (dependence_polyhedron_1): Simplified parameters.
1915 (dependence_polyhedron): Same. Keep along empty PDDRs
1916 to make efficient use of the cache.
1917 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1918 (graphite_legal_transform_dr): Rewritten.
1919 (graphite_legal_transform_bb): Pass fewer arguments to
1920 graphite_legal_transform_dr.
1921 (graphite_carried_dependence_level_k): Simplified implementation.
1922 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1923 (dot_transformed_deps_stmt_1): Same.
1924 (dot_original_deps): Same.
1925 (dot_transformed_deps): Same.
1926 * graphite-dependences.h (struct poly_ddr): Added a new field
1927 original_scattering_p.
1928 (PDDR_ORIGINAL_SCATTERING_P): New.
1929 (print_pddr): Declared.
1930 (debug_pddr): Declared.
1931 * graphite-ppl.c: Clarify comment.
1932 * sese.h (print_gimple_bb): Removed unused declaration.
1935 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1937 * g++.dg/graphite/graphite.exp: Rewritten.
1938 * gcc.dg/graphite/graphite.exp: Rewritten.
1939 * gfortran.dg/graphite/graphite.exp: Rewritten.
1940 * gcc.dg/graphite/block-0.c: Added runtime test.
1941 * gcc.dg/graphite/block-1.c: Same.
1942 * gcc.dg/graphite/block-3.c: Same.
1943 * gcc.dg/graphite/block-4.c: Same.
1944 * gcc.dg/graphite/block-5.c: Same.
1945 * gcc.dg/graphite/block-6.c: Same.
1946 * gcc.dg/graphite/block-7.c: Same.
1947 * gcc.dg/graphite/interchange-0.c: Same.
1948 * gcc.dg/graphite/interchange-1.c: Same.
1949 * gcc.dg/graphite/interchange-10.c: Same.
1950 * gcc.dg/graphite/interchange-11.c: Same.
1951 * gcc.dg/graphite/interchange-12.c: Same.
1952 * gcc.dg/graphite/interchange-2.c: Same.
1953 * gcc.dg/graphite/interchange-3.c: Same.
1954 * gcc.dg/graphite/interchange-4.c: Same.
1955 * gcc.dg/graphite/interchange-5.c: Same.
1956 * gcc.dg/graphite/interchange-6.c: Same.
1957 * gcc.dg/graphite/interchange-7.c: Same.
1958 * gcc.dg/graphite/interchange-8.c: Same.
1959 * gcc.dg/graphite/interchange-9.c: Same.
1960 * gcc.dg/graphite/interchange-mvt.c: Same.
1961 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1963 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1965 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1968 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1970 * common.opt: Add -fgraphite-cloog-opts.
1971 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1972 * opts.c (decode_options): Same.
1974 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1976 * gcc.dg/graphite/id-17.c: New.
1977 * gcc.dg/graphite/pr41888.c: New.
1978 * gcc.dg/graphite/scop-22.c: New.
1979 * gfortran.dg/graphite/pr40982.f90: New.
1981 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1983 * graphite-dependences.c: Clarify comments.
1984 (build_pddr): Add an extra parameter direction.
1985 (graphite_legal_transform_dr): Use build_pddr.
1986 (dot_original_deps_stmt_1): Update use of build_pddr.
1987 (dot_transformed_deps_stmt_1): Same.
1988 (dot_original_deps): Same.
1989 (dot_transformed_deps): Same.
1991 * gcc.dg/graphite/interchange-12.c: New.
1992 * gcc.dg/graphite/block-7.c: New.
1994 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1996 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1997 (pddr_transformed_scattering): Removed.
1998 (graphite_legal_transform_dr): Use build_pddr.
1999 (dot_original_deps_stmt_1): Same.
2000 (dot_transformed_deps_stmt_1): Same.
2001 (dot_original_deps): Same.
2002 (dot_transformed_deps): Same.
2004 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2006 * graphite-dependences.c (lexicographically_gt_p): Add comments.
2007 (build_lexicographically_gt_constraint): Same.
2008 (dependence_polyhedron_1): Same.
2009 (dependence_polyhedron): Same.
2011 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2013 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
2014 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
2015 (lexicographically_gt_p): Change type of direction to int.
2016 (build_lexicographically_gt_constraint): Same.
2017 (dependence_polyhedron_1): Same.
2018 (dependence_polyhedron): Same.
2019 (pddr_original_scattering): Use integers for direction.
2020 (pddr_transformed_scattering): Same.
2021 (graphite_legal_transform_dr): Same.
2022 (graphite_carried_dependence_level_k): Same.
2024 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2026 * graphite-dependences.c (build_pairwise_constraint): Renamed
2027 ppl_build_relation. Moved...
2028 (dr_equality_constraints): Use ppl_build_relation.
2029 (build_pairwise_scheduling_equality): Same.
2030 (build_pairwise_scheduling_inequality): Same.
2031 * graphite-ppl.c (ppl_build_relation): ...here.
2032 * graphite-ppl.h (ppl_build_relation): Declared.
2034 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
2037 * graphite-clast-to-gimple.c (gloog_error): New static variable.
2038 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
2039 Set gloog_error when such an expression failed to be built.
2040 (translate_clast): Early return when gloog_error is set.
2041 (gloog): Clear gloog_error. When gloog_error is set, call
2042 set_ifsese_condition to enable the original code. Return the status
2043 of the code generation based on gloog_error.
2044 * sese.c (set_ifsese_condition): New.
2045 * sese.h (set_ifsese_condition): Declared.
2047 * g++.dg/graphite/pr42681.C: New.
2049 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
2052 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
2053 rename_nb_iterations.
2054 * sese.c (rename_variables_in_operand): New.
2055 (rename_variables_in_expr): New.
2056 (rename_nb_iterations): New.
2057 (sese_adjust_liveout_phis): Update the rename_map.
2058 * sese.h (rename_nb_iterations): Declared.
2059 * tree-scalar-evolution.c (scev_reset_htab): New.
2060 (scev_reset): Call scev_reset_htab.
2061 * tree-scalar-evolution.h (scev_reset_htab): Declared.
2063 * gfortran.dg/graphite/pr42732.f: New.
2065 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
2068 * graphite-clast-to-gimple.c: Fix formatting.
2069 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
2070 (expr_defined_in_loop_p): New.
2071 (add_loop_exit_phis): Also handle full expressions: remove from
2072 the rename_map the expressions defined in the loop that we're closing.
2074 * gfortran.dg/graphite/pr42393-1.f90: New.
2075 * gfortran.dg/graphite/pr42393.f90: Add new flags
2076 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
2077 make this testcase useful in the Graphite branch.
2079 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
2081 * graphite-scop-detection.c (exclude_component_ref): Removed.
2082 (is_simple_operand): Removed.
2083 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
2085 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2088 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2089 the array indexing of ADDR_EXPRs.
2091 * gcc.dg/graphite/pr42221.c: New.
2093 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2096 * graphite.c (graphite_finalize): Call scev_reset.
2097 (graphite_transform_loops): Do not call scev_reset between the code
2098 generation of scops.
2100 * gcc.dg/graphite/pr42521.c: New.
2102 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2104 * graphite-interchange.c (memory_stride_in_loop): Renamed
2106 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
2107 (memory_strides_in_loop): Memoize the memory strides per loop.
2108 (lst_interchange_profitable_p): Do not initialize to zero the memory
2110 * graphite-poly.h (struct lst): Add a field memory_strides.
2111 (LST_LOOP_MEMORY_STRIDES): New.
2112 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
2113 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
2115 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2117 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
2118 memory_strides_in_loop. Gather memory strides on a whole loop.
2119 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
2120 (lst_interchange_profitable_p): Removed.
2121 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
2123 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2125 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2126 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2127 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2128 Remove context_loop and level.
2130 2010-01-07 Richard Guenther <rguenther@suse.de>
2132 PR tree-optimization/42641
2133 * sese.c (rename_map_elt_info): Use the SSA name version, do
2136 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
2138 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
2139 blocked" only when both the strip mine and the interchange have
2142 * gcc.dg/graphite/block-2.c: Removed.
2143 * gcc.dg/graphite/block-3.c: Add scan pattern.
2144 * gcc.dg/graphite/block-4.c: Same.
2145 * gcc.dg/graphite/block-5.c: Same.
2146 * gcc.dg/graphite/block-6.c: Same.
2148 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
2150 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
2151 before allocating a new one.
2152 (copy_renames): Check that slot is not NULL.
2153 (mark_bb_with_pbb): Same.
2154 (compute_cloog_iv_types_1): Same.
2155 * graphite-interchange.c (lst_perfect_nestify): Free the before,
2156 nest, and after LSTs.
2157 (lst_try_interchange_loops): Same.
2159 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
2162 * graphite-interchange.c (lst_try_interchange_loops): Do not return
2163 the before, nest, and after LSTs.
2164 (lst_try_interchange): Removed.
2165 (lst_interchange_select_inner): Do not iterate over the LSTs if they
2167 (lst_interchange_select_outer): Apply interchange on the outer loop
2168 until there are no more changes in the inner loops.
2170 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2172 Revert patch fixing PR middle-end/42221.
2174 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2177 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
2180 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
2182 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2185 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
2186 that contain only one statement.
2188 * gfortran.dg/graphite/pr42180.f90: New.
2190 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2193 * gfortran.dg/graphite/pr42393.f90: New.
2195 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2198 * gfortran.dg/graphite/pr42186.f90: New.
2200 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2203 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
2204 Insert the reduction copy in the same block as the phi node.
2205 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
2207 * gcc.dg/graphite/pr42205-1.c: New.
2208 * gcc.dg/graphite/pr42205-2.c: New.
2210 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2213 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2214 the array indexing of ADDR_EXPRs.
2216 * gcc.dg/graphite/pr42221.c: New.
2218 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2222 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
2223 index. Call lst_interchange_select_inner only once.
2224 (lst_interchange_select_inner): Update use of lst_try_interchange.
2225 (lst_interchange_select_outer): Update.
2227 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2231 * graphite-interchange.c (lst_try_interchange): Do not increment the
2232 the OUTER index when there is no AFTER kernel. Do not increment the
2233 OUTER index for after processing the AFTER kernel.
2234 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
2235 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
2236 index. Do not pass to lst_interchange_select_inner the OUTER index.
2237 (scop_do_interchange): Update use of lst_interchange_select_outer.
2239 * gfortran.dg/graphite/graphite.exp
2240 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
2241 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
2242 the graphite dump file.
2243 * gfortran.dg/graphite/interchange-2.f: Same.
2244 * gfortran.dg/graphite/pr42334-1.f: New.
2246 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2250 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2252 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2253 (lst_try_interchange): Reimplemented.
2254 (lst_interchange_select_inner): Same.
2255 (lst_do_interchange): Renamed lst_interchange_select_outer.
2257 (scop_do_interchange): Update use of lst_interchange_select_outer.
2259 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2260 * gcc.dg/graphite/block-0.c: Un-XFAILed.
2261 * gcc.dg/graphite/pr42211.c: New.
2262 * gfortran.dg/graphite/pr42334.f90: New.
2264 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
2267 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2268 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2270 * gfortran.dg/graphite/pr42181.f90: New.
2272 2009-12-12 Sebastian Pop <sebpop@gmail.com>
2275 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2276 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2277 (detect_commutative_reduction_arg): Simplified.
2278 (detect_commutative_reduction): Early return when the argument of
2279 the close phi is not of an SSA_NAME.
2281 * gcc.dg/graphite/pr42284.c: New.
2283 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
2285 * dbgcnt.def (graphite_scop): New counter.
2286 * graphite.c: Include dbgcnt.h
2287 (graphite_transform_loops): Use new counter to limit transformations.
2289 2009-12-08 Sebastian Pop <sebpop@gmail.com>
2292 * graphite-scop-detection.c (graphite_can_represent_init): Also
2293 handle more complex MULT_EXPRs containing parameters by recursion
2296 * gfortran.dg/graphite/pr42285.f90: New.
2298 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
2300 * g++.dg/graphite/pr42130.C: Fix type.
2302 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
2304 * g++.dg/graphite/pr42130.C: Correct testcase.
2306 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2308 * Merge from mainline (154493:154734).
2310 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2312 * Merge from mainline (151362:154491).
2314 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
2316 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2317 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2319 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2322 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2323 translate_clast_for_loop): New.
2324 (translate_clast_for): Add a condition around the loop, to do not
2325 execute loops with zero iterations.
2326 * g++.dg/graphite/pr42130.C: New.
2327 * gcc.dg/graphite/pr35356-2.c: Adapt.
2329 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2331 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2332 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2333 Remove context_loop and level.
2335 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2337 * graphite-clast-to-gimple.c (translate_clast_user,
2338 translate_clast_for, translate_clast_guard): Simplify and move common
2339 elements to translate_clast().
2340 (translate_clast): Simplify and get common elements.
2342 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2344 * graphite-clast-to-gimple.c (translate_clast_user,
2345 translate_clast_for, translate_clast_guard): Split out of
2348 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
2350 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2351 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2352 debug_clast_name_indexes_1, debug_clast_name_indexes,
2353 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2354 (clast_name_to_gcc, clast_to_gcc_expression,
2355 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2356 gcc_type_for_clast_eq, graphite_translate_clast_equation,
2357 graphite_create_guard_cond_expr, graphite_create_new_loop,
2358 translate_clast): Add params_index.
2359 (initialize_cloog_names): Create parameter strings from scratch, do
2360 not reference other strings.
2361 (create_params_index): New.
2362 (gloog): Initialize params_index.
2363 * graphite-scop-detection (free_scops_1): Removed.
2364 (limit_scops): Use normal free_scops.
2365 * graphite-sese-to-poly.c (save_var_names): Removed.
2366 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2367 and SESE_PARAMS_INDEX.
2368 * sese.c (new_sese, free_sese): Dito.
2369 * sese.h (struct sese): Remove params_index, params_names.
2370 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2372 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2374 Revert the following patch from 2009-09-14:
2375 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2376 tree-scalar-evolution.h, and then tree-data-ref.h.
2377 * graphite-clast-to-gimple.c: Same.
2378 * graphite-dependences.c: Same.
2379 * graphite-interchange.c: Same.
2380 * graphite-poly.c: Same.
2381 * graphite-scop-detection.c: Same.
2382 * graphite-sese-to-poly.c: Same.
2384 * lambda-code.c: Same.
2385 * matrix-reorg.c: Same.
2386 * tree-data-ref.c: Same.
2387 * tree-if-conv.c: Same.
2388 * tree-loop-distribu: Same.: Same.
2389 * tree-loop-linear.c: Same.
2390 * tree-parloops.c: Same.
2391 * tree-predcom.c: Same.
2392 * tree-vect-patterns.c: Same.
2394 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2396 Revert patch from 2009-09-14.
2397 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2398 passes at -O1 and below.
2400 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2403 * gcc.dg/graphite/pr40281.c: New.
2405 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2406 evolutions should not variate in inner loops.
2408 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2411 * gfortran.dg/graphite/pr42050.f90: New.
2413 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2415 * graphite-interchange.c (memory_strides_in_loop_depth): New.
2416 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2418 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2420 * graphite-blocking.c (scop_do_block): New.
2421 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2422 * graphite-poly.h (scop_do_block): Declared.
2424 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2426 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2427 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
2428 to transform depth into the time_depth before calling
2429 pbb_number_of_iterations_at_time.
2430 (lst_do_strip_mine): Use a scalar variable instead of recomputing
2433 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2435 Reverted the patch for "scattering permutations" from 2009-10-28.
2437 * graphite-poly.c (print_permutation): New.
2438 (debug_permutation): New.
2439 (new_poly_bb): Initialize PBB_PERMUTATION.
2440 (free_poly_bb): Free PBB_PERMUTATION.
2441 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2442 (struct pbb_permutation_elt): New.
2443 (PBB_PERMUTATION_ELT_STRIDE): New.
2444 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2445 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2446 (new_pbb_permutation_elt): New.
2447 (pbb_permutation_elt_free): New.
2448 (struct poly_bb): Add field permutation.
2449 (PBB_PERMUTATION): New.
2450 (print_permutation): Declared.
2451 (debug_permutation): Declared.
2453 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
2455 * graphite-interchange.c (build_partial_difference): New.
2456 (memory_stride_in_loop): Refactored the computation of
2457 equality constraints into build_partial_difference function.
2458 Added support for debugging stride computations.
2460 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2462 * graphite-clast-to-gimple.c (gloog): Free if_region,
2463 if_region->true_region, and if_region->region.
2464 * sese.c (if_region_set_false_region): Free if_region->false_region.
2465 (create_if_region_on_edge): Do not use GGC_NEW.
2466 (move_sese_in_condition): Remove useless initialization.
2468 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2470 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2471 for the loops created by the loop distribution. Do not modify the
2473 (lst_try_interchange_loops): Same. Use a temporary LST for the
2474 transformed schedule. Call lst_update_scattering before data
2475 dependence analysis.
2476 (lst_try_interchange): Pass an extra parameter INDEX.
2477 (lst_do_interchange_1): New.
2478 (lst_do_interchange): Call lst_do_interchange_1.
2479 (scop_do_interchange): Call lst_update_scattering.
2480 * graphite-poly.c (apply_poly_transforms): Do not call
2481 lst_update_scattering.
2482 * graphite-poly.h (lst_pred): New.
2484 (lst_find_first_pbb): Return NULL when not found.
2486 (lst_insert_in_sequence): Allow LST1 to be NULL.
2488 (lst_substitute_3): New.
2489 * gcc.dg/graphite/interchange-1.c: XFail.
2490 * gcc.dg/graphite/interchange-8.c: XFail.
2491 * gcc.dg/graphite/interchange-11.c: XFail.
2493 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2495 * graphite-interchange.c (lst_perfectly_nested_p): New.
2496 (lst_perfect_nestify): New.
2497 (lst_try_interchange_loops): Call store_lst_schedule,
2498 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2499 (scop_do_interchange): Avoid redundant legality test.
2500 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2501 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2502 * graphite-poly.h (psct_static_dim): New.
2503 (lst_dewey_number_at_depth): New.
2504 (lst_find_pbb): Restructured.
2505 (lst_find_first_pbb): Restructured.
2506 (lst_find_last_pbb): New.
2507 (lst_contains_p): New.
2508 (lst_contains_pbb): New.
2509 (lst_create_nest): New.
2510 (lst_remove_from_sequence): New.
2511 (pbb_update_scattering): New.
2512 (lst_update_scattering_under): New.
2513 (lst_update_scattering_seq): New.
2514 (lst_update_scattering): New.
2515 (lst_insert_in_sequence): New.
2516 (lst_distribute_lst): New.
2517 (lst_remove_all_before_including_pbb): New.
2518 (lst_remove_all_before_excluding_pbb): New.
2520 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2522 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2523 get_loop_exit_edges.
2525 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2527 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2529 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2531 * graphite-poly.c (print_permutation): New.
2532 (debug_permutation): New.
2533 (new_poly_bb): Initialize PBB_PERMUTATION.
2534 (free_poly_bb): Free PBB_PERMUTATION.
2535 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2536 (struct pbb_permutation_elt): New.
2537 (PBB_PERMUTATION_ELT_STRIDE): New.
2538 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2539 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2540 (new_pbb_permutation_elt): New.
2541 (pbb_permutation_elt_free): New.
2542 (struct poly_bb): Add field permutation.
2543 (PBB_PERMUTATION): New.
2544 (print_permutation): Declared.
2545 (debug_permutation): Declared.
2547 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2549 * graphite-clast-to-gimple.c (gloog): Do not call
2550 sese_reset_aux_in_loops.
2551 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2552 extra argument for domains. Do not use loop->aux.
2553 (build_scop_iteration_domain): Initialize and free domains, pass it
2554 to build_loop_iteration_domains and extract the information from
2555 domains. Do not use loop->aux.
2556 * sese.c (sese_reset_aux_in_loops): Removed.
2557 * sese.h (sese_reset_aux_in_loops): Removed.
2559 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2561 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2562 (dependency_in_loop_p): Same.
2563 (translate_clast): Do not use loop->aux. Initialize
2564 loop->can_be_parallel.
2565 (mark_loops_parallel): Removed.
2566 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2567 * graphite.c (free_aux_in_new_loops): Removed.
2568 (graphite_finalize): Do not call free_aux_in_new_loops.
2569 (graphite_transform_loops): Do not call mark_loops_parallel.
2571 2009-10-26 Li Feng <nemokingdom@gmail.com>
2573 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2574 (translate_clast): Pass an extra parameter LEVEL.
2575 Call get_scattering_level.
2576 * graphite-clast-to-gimple.h (get_scattering_level): New.
2578 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2580 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2581 * cfgloop.h (struct loop): New field single_iv.
2583 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2584 loop->aux anymore: use loop->single_iv.
2585 (graphite_loop_normal_form): Moved...
2586 (build_graphite_loop_normal_form): Removed.
2587 (gloog): Do not call build_graphite_loop_normal_form.
2588 (free_aux_in_new_loops): Moved...
2589 (mark_loops_parallel): Restructure.
2590 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2591 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2592 (scop_canonicalize_loops): New.
2593 (build_poly_scop): Call scop_canonicalize_loops.
2594 * graphite.c (free_aux_in_new_loops): ...here.
2596 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2598 * g++.dg/graphite/graphite.exp: Add the same rules as in
2599 gcc.dg/graphite/graphite.exp.
2601 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2603 * g++.dg/graphite/id-1.C: New.
2605 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2607 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2609 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2610 (rewrite_phi_out_of_ssa): Same.
2611 (rewrite_cross_bb_scalar_deps): Same.
2612 (translate_scalar_reduction_to_array): Same.
2614 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2616 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2619 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2621 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2622 (build_scop_drs): Call dump_alias_graphs.
2624 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2626 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2627 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2628 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2629 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2630 * graphite-poly.h (free_lst): New.
2631 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2632 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2634 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2636 * graphite-poly.h (struct scop): Add a field saved_schedule.
2637 (SCOP_SAVED_SCHEDULE): New.
2638 (store_lst_schedule): New.
2639 (restore_lst_schedule): New.
2640 (store_scattering): Call store_lst_schedule.
2641 (restore_scattering): Call restore_lst_schedule.
2643 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2645 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2646 (pdr_add_alias_set): Same.
2647 (build_poly_dr): Same.
2648 (build_alias_set_optimal_p): Same.
2649 (build_base_obj_set_for_drs): Same. Do not store the result of
2652 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2654 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2655 all_components_are_cliques to 1.
2657 2009-10-20 Li Feng <nemokingdom@gmail.com>
2659 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2661 (pdr_add_alias_set): Update retrieving alias_set_num.
2662 (build_poly_dr): Update retrieving dr_base_object_set.
2663 (partition_drs_to_sets): Remove.
2664 (build_alias_set_optimal_p): New.
2665 (build_alias_set_for_drs): Rename.
2666 (build_scop_drs): Update.
2667 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2668 (ALIAS_SET_INDEX): Remove.
2669 (BASE_OBJECT_SET_INDEX): Remove.
2671 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2673 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2675 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2677 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2678 loop upper bounds for 1-element arrays at end of structures.
2679 * tree-flow.h (array_at_struct_end_p): Declared.
2680 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2682 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2684 * g++.dg/graphite/pr41305.C: New.
2686 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2688 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2689 construction of parameter constraints from loop iteration analysis.
2690 * gcc.dg/graphite/run-id-2.c: New test.
2692 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2694 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2697 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2699 * graphite-dependences.c (dependence_polyhedron_1): Remove
2700 unused gdim dimensions from the DDR polyhedron.
2702 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2704 * graphite-dependences.c (pddr_transformed_scattering): New.
2705 (dot_original_deps_stmt_1): New.
2706 (dot_transformed_deps_stmt_1): New.
2707 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2708 dot_transformed_deps_stmt_1.
2709 (dot_original_deps): New.
2710 (dot_transformed_deps): New.
2711 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2713 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2715 * graphite-dependences.c (reduction_dr_1): Remove wrong
2716 assert: reduction BBs can have multiple reduction writes
2717 to memory. interchange-3.f90 is an example.
2719 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2721 * gfortran.dg/graphite/interchange-3.f90: New.
2723 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2725 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2727 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2729 * graphite-dependences.c (dependence_polyhedron_1): Add the
2730 context to the dependence polyhedron.
2732 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2734 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2735 PBB_PDR_DUPLICATES_REMOVED.
2736 (new_poly_bb): Same.
2738 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2740 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2742 (build_loop_iteration_domains): Extract bounds on parameters
2743 based on the data size.
2744 (build_scop_context): Do not initialize SCOP_CONTEXT;
2745 add new constraints.
2747 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2749 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2750 * graphite-ppl.h (graphite-ppl.h): Declared.
2752 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2754 * graphite-ppl.c (ppl_print_linear_expr): New.
2755 (debug_ppl_linear_expr): New.
2756 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2757 (debug_ppl_linear_expr): Declared.
2759 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2761 * graphite-interchange.c: Fix comments.
2762 * gcc.dg/graphite/block-1.c: Fix comments.
2764 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2766 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2767 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2769 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2771 Reapply the patch from Alexander Monakov that disappeared during
2772 the last merges from trunk.
2774 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2776 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2777 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2779 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2781 * graphite-interchange.c (memory_stride_in_loop): The depth
2782 argument corresponds to a dynamic time dimension, so use
2783 psct_dynamic_dim to refer to the transformed scattering dimension.
2785 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2787 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2789 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2791 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2793 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2794 the root of the LST.
2795 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2797 (print_lst): Print the root of LST in a different format.
2798 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2800 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2802 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2804 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2806 * doc/passes.texi: Document the Graphite infrastructure.
2808 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2810 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2811 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2812 and check the SSA representation.
2814 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2816 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2818 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2820 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2822 * gcc.dg/graphite/interchange-11.c: New.
2824 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2826 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2828 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2830 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2831 Add -fno-loop-strip-mine and -fno-loop-interchange.
2832 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2833 -fno-loop-strip-mine.
2834 * gfortran.dg/graphite/graphite.exp: Same.
2836 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2838 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2839 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2840 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2841 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2842 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2843 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2844 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2845 DEFAULT_FLAGS_GRAPHITE_SCOP.
2846 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2847 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2849 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2851 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2853 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2854 Sebastian Pop <sebastian.pop@amd.com>
2856 * graphite-interchange.c (build_linearized_memory_access): Pass an
2857 offset as parameter.
2858 (memory_stride_in_loop): Include transform scattering in the
2859 access functions to be able to querry the strides in the
2861 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2862 not the psct_iterator_dim.
2864 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2866 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2867 (lst_do_strip_mine_loop): New.
2868 (lst_do_strip_mine): New.
2869 (scop_do_strip_mine): Call lst_do_strip_mine.
2870 * graphite-poly.h (lst_add_loop_under_loop): New.
2871 (lst_find_first_pbb): New.
2873 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2875 * graphite-poly.c (loop_to_lst): Fix LST creation.
2877 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2879 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2880 sizeof(unsigned long) to make it run on 32bit systems.
2882 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2884 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2887 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2889 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2891 (write_alias_graph_to_ascii_dot): New.
2892 (write_alias_graph_to_ascii_ecc): Ditto.
2893 (partition_drs_to_sets): Add testing of optimality of current method
2894 which assigns alias numbers according to DFS Comopnent number. used
2895 as heuristic for the upcoming ECC algorithm.
2896 (build_scop_drs): Write to file also with the ecc and dot format.
2898 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2900 * gfortran.dg/graphite/interchange-1.f: XFail.
2902 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2904 * graphite.c (graphite_initialize): Do not handle functions with
2905 more than 100 basic blocks.
2907 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2909 * graphite-blocking.c (pbb_do_strip_mine): Use
2910 PARAM_LOOP_BLOCK_TILE_SIZE.
2912 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2914 * graphite-poly.c (dot_lst_1): New.
2916 * graphite-poly.h (dot_lst): Declared.
2918 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2920 * graphite-dependences.c (dot_deps_stmt_1): New.
2921 (dot_deps_stmt): New.
2922 * graphite-dependences.h (dot_deps_stmt): Declared.
2924 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2926 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2927 not replace cross BB scalar dependences ending on PHI nodes.
2928 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2930 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2932 * graphite-poly.c (apply_poly_transforms): Implement the high
2933 level driver for flag_loop_block.
2934 * opts.c (decode_options): Enable flag_loop_block at -O2.
2935 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2938 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2940 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2943 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2945 * graphite-poly.h (lst_find_pbb): New.
2946 (find_lst_loop): New.
2948 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2950 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2951 * graphite-poly.h (struct scop): Remove dep_graph field.
2952 (SCOP_DEP_GRAPH): Removed.
2954 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2956 * graphite-poly.h (copy_lst): Do full copy of LST.
2958 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2960 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2961 when the loop stride is zero.
2963 * gcc.dg/graphite/id-16.c: New.
2965 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2967 * graphite-dependences.c (reduction_dr_1): New.
2968 (reduction_dr_p): New.
2969 (graphite_legal_transform_dr): Call reduction_dr_p.
2970 (reduction_ddr): Renamed reduction_ddr_p.
2971 * graphite-poly.h (same_pdr_p): New.
2972 (number_of_write_pdrs): New.
2973 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2974 (split_reduction_stmt): Do not split reduction statements
2975 when there are no writes to memory.
2976 (translate_scalar_reduction_to_array_for_stmt): Insert the
2977 memory reduction statement just after the scalar reduction statement.
2979 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2981 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2982 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2984 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2986 * graphite-interchange.c (lst_apply_interchange): New.
2987 (lst_interchange_profitable_p): New.
2988 (lst_try_interchange_loops): New.
2989 (lst_try_interchange): New.
2990 (lst_do_interchange): New.
2991 (pbb_do_interchange): Removed.
2992 (scop_do_interchange): Call lst_do_interchange.
2994 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2996 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2997 SCOP_TRANSFORMED_SCHEDULE.
3002 * graphite-poly.h (lst_p): New.
3005 (LST_LOOP_FATHER): New.
3008 (scop_to_lst): Declared.
3009 (print_lst): Declared.
3010 (debug_lst): Declared.
3011 (new_lst_loop): New.
3012 (new_lst_stmt): New.
3015 (lst_dewey_number): New.
3016 (struct scop): Add original_schedule and transformed_schedule fields.
3017 (SCOP_ORIGINAL_SCHEDULE): New.
3018 (SCOP_TRANSFORMED_SCHEDULE): New.
3019 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
3021 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3023 * graphite-dependences.c (reduction_ddr): New.
3024 (graphite_legal_transform_bb): Call reduction_ddr.
3025 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
3026 Initialize PBB_IS_REDUCTION.
3027 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
3028 (PBB_IS_REDUCTION): New.
3029 (new_poly_bb): Update declaration.
3030 * graphite-scop-detection.h (build_scop_bbs): Removed.
3031 (nb_reductions_in_loop): Removed.
3032 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
3033 parameter for reductions.
3034 (try_generate_gimple_bb): Update call to new_poly_bb.
3035 (build_scop_bbs_1): Same.
3036 (build_scop_bbs): Same.
3037 (gsi_for_phi_node): New.
3038 (scalar_close_phi_node_p): Remove gcc_assert.
3039 (split_reduction_stmt): New.
3040 (is_reduction_operation_p): New.
3041 (phi_contains_arg): New.
3042 (follow_ssa_with_commutative_ops): New.
3043 (detect_commutative_reduction_arg): New.
3044 (detect_commutative_reduction_assign): New.
3045 (follow_inital_value_to_phi): New.
3046 (edge_initial_value_for_loop_phi): New.
3047 (initial_value_for_loop_phi): New.
3048 (detect_commutative_reduction): New.
3049 (translate_scalar_reduction_to_array_for_stmt): New.
3050 (insert_copyout): New.
3051 (insert_copyin): New.
3052 (translate_scalar_reduction_to_array): New.
3053 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
3054 (rewrite_commutative_reductions_out_of_ssa_loop): New.
3055 (rewrite_commutative_reductions_out_of_ssa): New.
3056 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
3057 * sese.h (split_region_for_bb): New.
3059 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
3060 * gcc.dg/graphite/interchange-1.c: Fix format.
3061 * gcc.dg/graphite/interchange-10.c: New.
3063 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3065 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
3068 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3070 * graphite-sese-to-poly.c (scev_analyzable_p): New.
3071 (rewrite_cross_bb_scalar_dependence): New.
3072 (rewrite_cross_bb_scalar_deps): New.
3073 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
3074 Call rewrite_cross_bb_scalar_deps.
3076 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3078 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
3079 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
3082 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3084 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
3085 * graphite-interchange.c (pbb_do_interchange): Same.
3086 * graphite-poly.c (print_scattering_function): Same.
3088 * graphite-poly.h (pbb_loop): New.
3089 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
3091 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3093 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
3095 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3097 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
3098 so don't pass a pointer to it.
3099 (build_alias_set_for_drs): Same.
3100 (build_base_obj_set_for_drs): Same.
3101 (build_scop_drs): Same.
3103 2009-09-26 Li Feng <nemokingdom@gmail.com>
3105 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
3106 the alias graph of data references.
3108 2009-09-25 Li Feng <nemokingdom@gmail.com>
3110 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
3111 (build_scop_drs): When debugging, write the alias graph to file,
3112 otherwise, should be disabled.
3114 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3116 * Merge from mainline (151310:151361).
3118 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3120 * Merge from mainline (151171:151310).
3122 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3124 * Merge from mainline (151171:151806).
3126 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3128 * Revert the last commit.
3130 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3132 * Merge from mainline (151171:151819).
3134 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3136 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
3137 (is_simple_operand): Remove call to stmt_simple_memref_p.
3138 (stmt_simple_for_scop_p): Update call to is_simple_operand.
3140 2009-09-17 David Edelsohn <edelsohn@gnu.org>
3142 * gcc.dg/graphite/interchange-mvt.c: New File.
3143 * gcc.dg/graphite/scop-dsyrk.c: New File.
3144 * gcc.dg/graphite/scop-dsyr2k.c: New File.
3145 * gcc.dg/graphite/scop-mvt.c: New File.
3146 * gcc.dg/graphite/scop-sor.c: New File.
3148 2009-09-17 Li Feng <nemokingdom@gmail.com>
3150 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
3151 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
3152 (graphite_carried_dependence_level_k): Ditto.
3153 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
3154 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
3155 (new_poly_dr): Adjust declaration.
3156 * graphite-sese-to-poly.c (free_data_refs_aux): New.
3157 (free_gimple_bb): Added free_data_refs_aux.
3158 (build_poly_dr): Add dr_base_object_set.
3159 (partition_drs_to_sets): New.
3160 (dr_same_base_object_p): New.
3161 (build_alias_set_for_drs): New.
3162 (build_base_object_set_for_drs): New.
3163 (build_scop_drs): Add build_base_obj_set_for_drs.
3164 * graphite-sese-to-poly.h: Added #define for alias set number index and
3165 base object set index.
3166 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
3167 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
3169 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
3171 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3172 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
3174 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3176 * graphite-sese-to-poly.c (struct irp_data): Removed.
3177 (idx_record_params): Removed.
3178 (find_params_in_bb): Scan for parameters the access functions; don't
3179 parse the tree representation.
3181 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3183 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
3184 passes at -O1 and below.
3186 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3188 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
3189 tree-scalar-evolution.h, and then tree-data-ref.h.
3190 * graphite-clast-to-gimple.c: Same.
3191 * graphite-dependences.c: Same.
3192 * graphite-interchange.c: Same.
3193 * graphite-poly.c: Same.
3194 * graphite-scop-detection.c: Same.
3195 * graphite-sese-to-poly.c: Same.
3197 * lambda-code.c: Same.
3198 * matrix-reorg.c: Same.
3199 * tree-data-ref.c: Same.
3200 * tree-if-conv.c: Same.
3201 * tree-loop-distribu: Same.: Same.
3202 * tree-loop-linear.c: Same.
3203 * tree-parloops.c: Same.
3204 * tree-predcom.c: Same.
3205 * tree-vect-patterns.c: Same.
3207 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
3209 Partially revert the previous patch, except the following.
3210 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
3211 as parameters the operands of the not expression.
3213 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3215 * tree-scalar-evolution.c (instantiate_scev_assign): New.
3216 Do not call analyze_scalar_evolution on assignments.
3217 (instantiate_scev_phi): Call analyze_scalar_evolution.
3218 (instantiate_scev_name): Call instantiate_scev_assign and
3219 instantiate_scev_phi.
3220 (instantiate_scev_not): Adapted to pass as parameters the operands
3221 of the not expression.
3223 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3225 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
3226 to pass as parameters the operands of the binary expression.
3228 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3230 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
3231 instantiate_scev_not. Handle NEGATE_EXPR.
3232 (instantiate_scev_r): Handle NEGATE_EXPR.
3234 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3236 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
3238 (instantiate_scev_r): Move code in instantiate_scev_2
3239 and instantiate_scev_1.
3241 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3243 * tree-scalar-evolution.c (instantiate_scev_3): New.
3244 (instantiate_scev_1): Move code in instantiate_scev_3.
3246 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3248 * tree-scalar-evolution.c (instantiate_scev_poly): New.
3249 (instantiate_scev_1): Move code in instantiate_scev_poly.
3251 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3253 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3254 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3256 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3258 * tree-scalar-evolution.c (instantiate_scev_convert): New.
3259 (instantiate_scev_1): Move code in instantiate_scev_convert.
3261 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3263 * tree-scalar-evolution.c (instantiate_scev_binary): New.
3264 (instantiate_scev_1): Move code in instantiate_scev_binary.
3266 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3268 * tree-scalar-evolution.c (instantiate_scev_name): New.
3269 (instantiate_scev_1): Move code in instantiate_scev_name.
3271 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3273 * Merge from mainline (150992:151171).
3275 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3277 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3279 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3281 * graphite-dependences.c (graphite_legal_transform_bb): Call
3282 pbb_remove_duplicate_pdrs.
3283 * graphite-poly.c (can_collapse_pdr): Removed.
3284 (pdr_find_duplicate): Removed.
3285 (can_collapse_pdrs): New.
3286 (pbb_remove_duplicate_pdrs): New.
3287 (new_poly_dr): Do not look for duplicates.
3288 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3289 (PBB_PDR_DUPLICATES_REMOVED): New.
3290 (pbb_remove_duplicate_pdrs): Declared.
3292 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3294 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3295 the strides by multiplying by PDR_NB_REFS.
3296 * graphite-poly.c (can_collapse_pdr): New.
3297 (pdr_find_duplicate): New.
3298 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
3299 Initialize PDR_NB_REFS.
3300 * graphite-poly.h (struct poly_dr): Add field nb_refs.
3302 (new_poly_dr): Number of subscripts is a graphite_dim_t.
3304 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3306 Revert one of the previous commits:
3307 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3308 the computation of symmetric data dependence relations.
3309 (dependency_between_pbbs_p): Same.
3311 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3314 * graphite-poly.c (apply_poly_transforms): Remove legality test before
3317 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3319 * graphite-dependences.c (pddr_original_scattering): Return NULL
3320 for read-read dependence relations.
3321 * graphite-poly.h (enum poly_dr_type): Fix comment.
3324 (pdr_may_write_p): New.
3326 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3328 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3329 (struct poly_dr): Same.
3330 (new_poly_dr): Same.
3331 * graphite-poly.c (new_poly_dr): Same.
3333 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3334 Sebastian Pop <sebastian.pop@amd.com>
3336 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3337 pbb_strip_mine_time_depth. Changed the implementation so that
3338 transformation is expressed as a transformation on
3339 time (scatttering) dimensions. Also, ensures that the 2d+1
3340 scheduling format is preserved.
3341 (pbb_strip_mine_profitable_p): Profitability is based on the
3342 iteration number of a given time (scattering) dimension,
3343 and not on a original loop depth dimension.
3344 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3345 (pbb_do_strip_mine): Call psct_dynamic_dim.
3346 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3347 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3348 (pbb_nb_dynamic_scattering_transform): New.
3349 (psct_dynamic_dim): New.
3351 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3353 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3354 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3355 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3356 * graphite-interchange.c (build_linearized_memory_access): Same.
3357 (memory_stride_in_loop): Same.
3359 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3361 * graphite-dependences.c (pddr_original_scattering): New.
3362 (graphite_legal_transform_dr): Call pddr_original_scattering.
3365 * graphite-dependences.h (dot_deps): Declared.
3366 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3367 (print_pdr): Print PDR_ID.
3368 * graphite-poly.h (struct poly_dr): Add field id.
3371 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3373 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
3375 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3376 not delete the original dependence relation.
3378 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3380 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3381 the computation of symmetric data dependence relations.
3382 (dependency_between_pbbs_p): Same.
3384 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3386 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3387 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3388 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3389 (free_poly_ddr): New.
3390 (pddr_is_empty): New.
3391 (dependence_polyhedron_1): Now returns a poly_ddr_p.
3392 (dependence_polyhedron): Same. Remove useless gcc_assert.
3394 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3395 (graphite_carried_dependence_level_k): Call pddr_is_empty.
3396 * graphite-dependences.h (enum poly_dependence_kind): New.
3397 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
3398 (PDRP_SOURCE): Renamed PDDR_SOURCE.
3399 (PDRP_SINK): Renamed PDDR_SINK.
3400 (PDRP_DDP): Renamed PDDR_DDP.
3402 (free_poly_ddr): Declared.
3403 * graphite-poly.c (new_scop): Use the new hash function names.
3404 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3405 into original_pddrs.
3406 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3408 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3410 * Merge from mainline (150764:150992).
3412 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3414 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3415 bounds with LT_EXPR to make niter analysis more precise on code
3416 generated by Graphite.
3418 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3420 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3421 (graphite_legal_transform_bb): Same.
3422 (poly_drs_may_alias_p): Same.
3424 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
3427 * graphite-ppl.c (ppl_max_for_le): Correct the use of
3428 ppl_Pointset_Powerset_C_Polyhedron_maximize.
3430 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3432 * graphite-poly.c (print_pbb): Print PBB index.
3434 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3436 * Merge from mainline (r150672:150764).
3438 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3440 * graphite-interchange.c (ppl_max_for_le): Moved...
3441 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3442 * graphite-ppl.c (ppl_max_for_le): ... here.
3443 * graphite-ppl.h (ppl_max_for_le): Declared.
3445 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
3447 * Merge from mainline (r150372:150672).
3449 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3452 * sese.c (convert_for_phi_arg): New.
3453 (add_guard_exit_phis): Use convert_for_phi_arg.
3455 * gfortran.dg/graphite/id-17.f: New.
3457 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3459 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3460 unknown subscript upper bounds.
3462 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3464 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3465 Pranav Garg <pranav.garg2107@gmail.com>
3467 * graphite-interchange.c (gather_access_strides): Removed.
3468 (ppl_max_for_le): New.
3469 (build_linearized_memory_access): New.
3470 (memory_stride_in_loop): New.
3471 (pbb_interchange_profitable_p): Reimplemented.
3472 * graphite-ppl.h (ppl_new_id_map): New.
3473 (ppl_interchange): New.
3475 * gcc.dg/graphite/interchange-6.c: XFAILed.
3477 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3479 * graphite-interchange.c (compute_subscript): Removed.
3480 (compute_array_size_cstr): Removed.
3481 (compute_array_size_poly): Removed.
3482 (compute_array_size): Removed.
3483 (gather_access_strides_poly): Removed.
3484 (gather_access_strides): Empty.
3486 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3488 * graphite-dependences.c (dependence_polyhedron_1): Replace
3489 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3490 (graphite_legal_transform_dr): Same.
3491 (graphite_carried_dependence_level_k): Same.
3492 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3493 Initialize PDR_NB_SUBSCRIPTS.
3494 (print_pdr_access_layout): Replace pdr_nb_subscripts with
3496 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3497 (PDR_NB_SUBSCRIPTS): New.
3498 (pdr_nb_subscripts): Removed.
3499 (pdr_dim): Simplified.
3500 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3501 with PDR_NB_SUBSCRIPTS.
3503 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3505 * graphite-interchange.c (compute_array_size): Remove use of
3507 * graphite-poly.c (new_poly_dr): Remove argument data_container.
3508 Do not initialize PDR_DATA_CONTAINER.
3509 (print_pdr): Do not print PDR_DATA_CONTAINER.
3510 * graphite-poly.h (struct poly_dr): Remove data_container field.
3511 (PDR_DATA_CONTAINER): Removed.
3512 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3514 (build_poly_dr): Same.
3516 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3518 * gcc.dg/graphite/interchange-9.c: New.
3520 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3521 Sebastian Pop <sebastian.pop@amd.com>
3523 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3524 copy of the dependence polyhedron. Free the temporary objects.
3525 (graphite_carried_dependence_level_k): Free unused objects before
3528 * gcc.dg/graphite/interchange-1.c: XFAILed.
3529 * gcc.dg/graphite/interchange-2.c: XFAILed.
3530 * gcc.dg/graphite/interchange-3.c: XFAILed.
3531 * gcc.dg/graphite/interchange-4.c: XFAILed.
3532 * gcc.dg/graphite/interchange-7.c: XFAILed.
3534 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3536 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3537 Early return without analyzing the data dependences if no
3538 transform has been done. Call restore_scattering if the transform
3540 (graphite-interchange.c): Same.
3541 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3542 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3543 (apply_poly_transforms): Do not gcc_assert that
3544 the transform is legal.
3545 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3546 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3547 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3548 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3549 * graphite-poly.h (struct poly_scattering): New.
3550 (struct poly_bb): Add original, transformed, and saved fields.
3551 Remove transformed_scattering, original_scattering, nb_local_variables,
3552 and nb_scattering_transform fields.
3553 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3554 (poly_scattering_new): New.
3555 (poly_scattering_free): New.
3556 (poly_scattering_copy): New.
3557 (store_scattering_pbb): New.
3558 (store_scattering): New.
3559 (restore_scattering_pbb): New.
3560 (restore_scattering): New.
3561 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3562 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3564 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3566 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3569 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3571 * Makefile.in (graphite.o): Depends on PREDICT_H.
3572 * graphite.c: Include predict.h.
3573 (graphite_finalize): Call tree_estimate_probability.
3574 * predict.c (predict_loops): Do not call scev_initialize and
3576 (tree_estimate_probability_bb): New.
3577 (tree_estimate_probability): Do not initialize loops: move that
3578 code to the driver. Call tree_estimate_probability_bb.
3579 (tree_estimate_probability_driver): New.
3580 (pass_profile): Use tree_estimate_probability_driver.
3581 * predict.h (tree_estimate_probability): Declared.
3583 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3585 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3586 * graphite-dependences.c (graphite_legal_transform): Add time to
3587 TV_GRAPHITE_DATA_DEPS.
3588 (dependency_between_pbbs_p): Same.
3589 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3591 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3593 * Merge from mainline (r149952:150372).
3595 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3597 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3598 * graphite-blocking.c: Same.
3599 * graphite-clast-to-gimple.c: Same.
3600 * graphite-dependences.c: Same.
3601 * graphite-poly.c: Same.
3602 * graphite-poly.h: Same.
3603 * graphite-ppl.c: Same.
3604 * graphite-scop-detection.c: Same.
3605 * graphite-sese-to-poly.c: Same.
3608 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3610 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3611 (remove_simple_copy_phi): New.
3612 (remove_invariant_phi): New.
3613 (simple_copy_phi_p): New.
3614 (reduction_phi_p): New.
3615 (gsi_for_ssa_name_def): New.
3616 (insert_out_of_ssa_copy): New.
3617 (insert_out_of_ssa_copy_on_edge): New.
3618 (create_zero_dim_array): New.
3619 (scalar_close_phi_node_p): New.
3620 (rewrite_close_phi_out_of_ssa): New.
3621 (rewrite_phi_out_of_ssa): New.
3622 (rewrite_reductions_out_of_ssa): New.
3623 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3625 * gcc.dg/graphite/id-11.c: New.
3626 * gcc.dg/graphite/id-15.c: New.
3627 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3628 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3629 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3630 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3631 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3632 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3633 * gfortran.dg/graphite/id-13.f: New.
3634 * gfortran.dg/graphite/id-5.f: New.
3636 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3638 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3639 check that nb_reductions_in_loop is zero.
3640 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3641 reduction phi nodes.
3642 (nb_reductions_in_loop): Removed.
3643 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3644 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3645 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3646 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3647 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3649 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3651 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3652 statements that have an empty iteration domain.
3653 * gfortran.dg/graphite/id-16.f: New.
3655 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3657 * tree-scalar-evolution.c (instantiate_scev_1): Return
3658 chrec_dont_know when the result is not above instantiate_below.
3659 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3660 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3661 the tree has a known scalar evolution.
3662 * gfortran.dg/graphite/id-14.f: New.
3663 * gfortran.dg/graphite/id-15.f: New.
3665 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3667 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3669 (rename_variables): Keep inserting renames after the ones already
3672 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3674 * graphite-sese-to-poly.c (compare_bb_depths): New.
3675 (graphite_sort_dominated_info): New.
3676 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3677 (build_scop_scattering): Fix comment.
3679 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3681 * graphite.c (graphite_finalize): Call print_loops instead of
3682 dump_function_to_file.
3683 * gcc.dg/graphite/graphite.exp: Fix formatting.
3684 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3685 loops generated in the graphite output file.
3686 * gcc.dg/graphite/pr35356-2.c: New.
3687 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3688 * gfortran.dg/graphite/id-12.f: New.
3690 2009-07-24 Li Feng <nemokingdom@gmail.com>
3692 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3695 2009-07-24 Li Feng <nemokingdom@gmail.com>
3696 Tobias Grosser <grosser@fim.uni-passau.de>
3698 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3699 alias set number build alias in ACCESSES polyhedron.
3700 (build_alias_set_for_drs): New.
3701 (build_pbb_drs): Added build_alias_set_for_drs.
3702 * graphite-dependences.c (poly_drs_may_alias_p): New.
3703 (graphite_carried_dependence_level_k): Check alias information
3704 before building polyhedron.
3706 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3708 * Makefile.in (lambda-code.o): Fix formatting.
3710 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3712 * Merge from mainline (r149350-149952)
3714 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3716 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3717 before interchange to prepare for loop blocking.
3719 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3721 * graphite-poly.c (apply_poly_transforms): Add checks after every
3723 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3724 done in apply_poly_transforms.
3726 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3728 * graphite-dependences.c (build_lexicographically_gt_constraint):
3729 Replace RES parameter with *RES.
3730 (dependence_polyhedron_1): Pass an address of the parameter RES
3731 instead of value of RES.
3733 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3735 * graphite.c (graphite_finalize): Fix comment.
3736 (graphite_transform_loops): Reset scev info after code generation
3739 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3741 * graphite.c (graphite_finalize): Call scev_reset.
3743 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3745 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3746 GBB_CLOOG_IV_TYPES hash table twice.
3747 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3748 (add_condition_to_domain): Clear GMP values.
3750 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3752 * graphite-dependences.c: Fix formatting.
3753 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3754 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3755 * graphite-sese-to-poly.c: Fix formatting.
3756 * graphite.c (graphite_transform_loops): Create the hash table
3757 after the early return.
3759 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3761 * gcc.dg/graphite/id-14.c: New.
3762 * gcc.dg/graphite/pr40157.c: New.
3763 * gfortran.dg/graphite/id-11.f: New.
3765 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3767 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3768 (build_poly_scop): Return false when there are no pbbs within
3769 loops to avoid to pass to cloog scops with no loops.
3771 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3773 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3774 useless test "i % 2".
3775 (build_pbb_scattering_polyhedrons): Fix formatting.
3776 (build_poly_dr): Same.
3777 * graphite.c (graphite_transform_loops): Restructure.
3779 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
3781 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3782 reduction_list parameter.
3783 (rewrite_all_phi_nodes_with_iv): Same.
3784 (canonicalize_loop_ivs): Same.
3785 * tree-parloops.c (struct brli): Removed.
3786 (build_reduction_list_info): Removed.
3787 (build_new_reduction): New.
3788 (analyze_reduction_list): Removed.
3789 (gather_scalar_reductions): Find reductions instead of phi
3790 nodes that can't be canonicalized.
3791 (try_create_reduction_list): Remove reduction_list parameter.
3792 (gen_parallel_loop): Same.
3793 (parallelize_loops): Remove analyze_reductions variable,
3794 initialization and free.
3795 Change reduction_list htab initialization to reduction_info
3796 elements instead of ssa names.
3797 Call try_create_reduction_list and gen_parallel_loop without
3798 analyzed_reduction argument.
3799 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3800 canonicalize_loop_ivs with one less argument.
3801 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3803 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3805 * graphite-dependences.c (new_poly_dr_pair): New.
3806 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3807 (new_poly_dr_pair): New.
3808 (eq_poly_dr_pair_p): New.
3809 (hash_poly_dr_pair_p): New.
3810 * graphite-dependences.h (struct poly_dr_pair): New.
3811 (eq_poly_dr_pair_p): Declared.
3812 (hash_poly_dr_pair_p): Declared.
3813 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3814 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3815 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3816 * Makefile.in (graphite-poly.o): Add dependence on
3817 graphite-dependences.h.
3819 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3821 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3822 polynomials of degree > 1 pass to Graphite.
3823 * tree-chrec.c (scev_is_linear_expression): Call
3824 evolution_function_is_affine_multivariate_p.
3825 * gfortran.dg/graphite/id-10.f90: New.
3827 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3829 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3830 Instantiate scevs varying in outer loops.
3831 * gfortran.dg/graphite/id-9.f: Correct testcase.
3833 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3835 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3836 redundant constraint.
3838 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3840 * gcc.dg/graphite/graphite.exp: Fix comments.
3841 * gfortran.dg/graphite/graphite.exp: Trigger actions
3842 based on the file names as in the C testsuite.
3843 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3844 * gfortran.dg/graphite/block-2.f: Same.
3845 * gfortran.dg/graphite/block-3.f90: Same.
3846 * gfortran.dg/graphite/block-4.f90: Same.
3847 * gfortran.dg/graphite/id-1.f90: Same.
3848 * gfortran.dg/graphite/id-2.f90: Same.
3849 * gfortran.dg/graphite/id-3.f90: Same.
3850 * gfortran.dg/graphite/id-4.f90: Same.
3851 * gfortran.dg/graphite/id-6.f: Same.
3852 * gfortran.dg/graphite/id-9.f: Same.
3853 * gfortran.dg/graphite/interchange-1.f: Same.
3854 * gfortran.dg/graphite/interchange-2.f: Same.
3855 * gfortran.dg/graphite/scop-1.f: Same.
3857 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3859 * sese.c (expand_scalar_variables_call): New.
3860 (expand_scalar_variables_ssa_name): Handle calls in expander.
3862 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3864 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3865 Expect to see the pattern twice.
3866 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3867 * gcc.dg/graphite/interchange-5.c: Same.
3868 * gcc.dg/graphite/interchange-6.c: Same.
3870 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3872 * gcc.dg/graphite/id-10.c: New.
3873 * gcc.dg/graphite/id-12.c: New.
3874 * gfortran.dg/graphite/id-7.f: New.
3875 * gfortran.dg/graphite/id-8.f: New.
3877 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3879 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3882 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3884 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3886 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3888 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3890 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3892 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3893 building PDR subscripts.
3895 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3897 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3898 computation of array sizes.
3900 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3902 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3904 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3906 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3907 build_pairwise_constraint, dr_equality_constraints,
3908 build_pairwise_scheduling_equality,
3909 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3910 build_lexicographically_gt_constraint, dependence_polyhedron,
3911 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3912 Move from NNC_Polyhedron to C_Polyhedron.
3913 * graphite-interchange.c (compute_array_size_poly,
3914 gather_access_strides): Dito.
3915 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3916 free_scop, pbb_number_of_iterations): Dito.
3917 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3918 pbb_dim_iter_domain, struct scop): Dito.
3919 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3920 new_Cloog_Domain_from_ppl_Polyhedron,
3921 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3922 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3923 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3924 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3925 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3926 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3927 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3928 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3929 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3930 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3931 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3932 build_scop_iteration_domain, build_poly_dr): Dito
3934 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3936 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3938 * gcc.dg/graphite/run-id-1.c: New.
3940 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3942 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3943 positivity constraint on the symbolic number of iterations.
3945 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3947 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3949 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3950 Tobias Grosser <grosser@fim.uni-passau.de>
3952 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3953 (build_cloog_prog): Directly use SCOP_CONTEXT.
3954 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3955 (free_scop): Free SCOP_CONTEXT.
3956 (print_scop_context): New.
3957 (print_scop): Call print_scop_context.
3958 (debug_scop_context): New.
3959 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3960 (struct scop): Added field context.
3961 (SCOP_CONTEXT): New.
3962 * graphite-sese-to-poly.c (add_param_constraints): New.
3963 (build_scop_context): New.
3964 (build_poly_scop): Call build_scop_context.
3966 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3968 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3969 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3970 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3971 * graphite-ppl.h: Include double-int.h and tree.h.
3972 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3973 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3974 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3975 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3977 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3979 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3980 POINTER_PLUS_EXPR for pointer types.
3981 (clast_to_gcc_expression): Same.
3983 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3985 * graphite-poly.c (print_scattering_function): Early return when
3986 PBB_TRANSFORMED_SCATTERING is not initialized.
3987 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3989 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3991 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3994 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3996 * tree-parloops.c (analyze_reduction_list): Change return
3998 (try_create_reduction_list): Move the call to
3999 analyze_reduction_list to the beginining.
4000 Call reduction_phi with analyzed_reductions as argument
4001 instead of reduction_list.
4003 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
4005 * Merge from mainline (r148296:149346)
4007 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4009 * graphite-scop-detection.c (graphite_can_represent_init): New.
4010 (graphite_can_represent_scev): Call graphite_can_represent_init:
4011 check that the initial value does not contain multiplications of
4013 (stmt_has_simple_data_refs_p): New.
4014 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
4015 (is_simple_operand): Fix formatting.
4016 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
4018 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4020 * gcc.dg/graphite/id-13.c: New.
4021 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
4022 analyze_scalar_evolution, use scalar_evolution_in_region.
4023 (scan_tree_for_params_right_scev): Add extra assert.
4024 (parameter_index_in_region_1): Split from parameter_index_in_region.
4025 (idx_record_params): Use scalar_evolution_in_region.
4026 (find_params_in_bb): Same.
4027 (find_scop_parameters): Same.
4028 (build_loop_iteration_domains): Same.
4029 (create_linear_expr_from_tree): Same.
4030 * sese.c (scalar_evolution_in_region): New.
4031 * sese.h (scalar_evolution_in_region): Declared.
4032 (defined_in_sese_p): New.
4033 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
4035 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
4038 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4040 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
4041 TREE_DATA_REF_H also implies SCEV_H.
4043 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4045 * graphite-poly.c (print_scop_params): New.
4046 (print_scop): Call print_scop_params.
4047 (debug_scop_params): New.
4048 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
4050 2009-07-07 Li Feng <nemokingdom@gmail.com>
4052 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
4053 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
4054 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
4055 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
4056 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
4057 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
4059 2009-07-07 Li Feng <nemokingdom@gmail.com>
4061 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
4062 for dependency checking part.
4063 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
4064 tests for dependency checking.
4065 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4066 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4067 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
4068 flag -fdump-tree-graphite-all for autopar testsuites.
4070 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
4072 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
4073 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
4074 canonicalize_loop_ivs): Moved...
4075 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
4077 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
4079 * tree-parloops.c (try_create_reduction_list): Pass an extra
4080 argument analyzed_reductions. Call analyze_reduction_list.
4081 (gen_parallel_loop): Do not call analyze_reduction_list.
4082 (parallelize_loops): Init and finalize analyzed_reductions.
4084 2009-07-06 Li Feng <nemokingdom@gmail.com>
4086 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4087 Added flag -fno-loop-strip-mine for autopar testcase.
4089 2009-07-04 Li Feng <nemokingdom@gmail.com>
4091 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
4092 transformed scattering dimension instead of unmatch orignal when
4093 calling dependence_polyhedron.
4095 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4097 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
4099 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4101 * graphite-poly.c (pbb_number_of_iterations): Check for returned
4102 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
4104 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4106 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
4107 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
4108 * graphite-poly.c (pbb_number_of_iterations): New.
4109 * graphite-poly.h (pbb_number_of_iterations): Declared.
4110 (pbb_iterator_dim, pbb_parameter_dim): New.
4112 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
4114 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
4115 last commit on type of lower and upper bound of loops.
4117 2009-06-29 Li Feng <nemokingdom@gmail.com>
4119 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
4120 graphite-dependences.h.
4121 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
4122 (mark_bb_with_pbb): New.
4123 (get_stmtfor_depth): New.
4124 (find_pbb_via_hash): New.
4125 (dependency_in_loop_p): New.
4126 (mark_loops_parallel): New.
4127 (free_aux_in_new_loops): New.
4128 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
4129 bb with it's relevant pbb. Mark newly created loops. Remove mark
4130 innermost loop parallel without checking.
4131 (gloog): Add parameter BB_PBB_MAPPING.
4132 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
4133 (gloog): Change declaration.
4134 (mark_loop_parallel): Make extern.
4135 (free_aux_in_new_loops): Declare.
4136 (bb_pbb_map_hash): New.
4137 (eq_bb_pbb_map): New.
4138 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
4139 auto parallelization when flag_graphite_force_parallel is set.
4140 (graphite_finalize): Added free_aux_in_new_loops.
4141 * tree-parloops.c (parallelize_loops): Only generate parallel code for
4142 the innermost loop that marked parallel. Use
4143 flag_graphite_force_parallel instead of loop->can_be_parallel.
4144 (loop_parallel_p): Move inner most checking out of function.
4146 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4148 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
4149 type of lower and upper bound of loops signed long int.
4151 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4153 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
4154 expression outside the loop.
4156 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4158 * gcc.dg/graphite/interchange-8.c: New.
4160 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4162 * gcc.dg/graphite/interchange-0.c: XFailed.
4163 * gcc.dg/graphite/interchange-5.c: XFailed.
4164 * gcc.dg/graphite/interchange-6.c: XFailed.
4166 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4168 * graphite-interchange.c (compute_array_size_poly): The end of the
4169 recursion should return 1.
4171 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4173 * graphite-interchange.c (compute_array_size_cstr): Allow the
4174 subscript multiplier to be -1.
4175 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
4176 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
4177 data_container. Initializes PDR_DATA_CONTAINER.
4178 (print_pdr_access_layout): New.
4179 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
4180 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
4182 (PDR_DATA_CONTAINER): New.
4183 (new_poly_dr): Update declaration.
4184 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
4185 (build_poly_dr): Call pdr_add_data_dimensions.
4187 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4189 * graphite-poly.h (struct poly_dr): Fix comment.
4190 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
4191 (pdr_add_memory_accesses): New.
4192 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
4194 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4196 * graphite-poly.c (print_pdrs, debug_pdrs): New.
4197 (print_pbb): Add call to print_pdrs.
4198 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
4200 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
4201 Li Feng <nemokingdom@gmail.com>
4203 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
4204 (dependency_between_pbbs_p): New.
4205 (lexicographically_gt_p): Assure !empty_p before polyhedron
4206 intersection assign.
4207 (build_lexicographically_gt_constraint): Correct lexicographically
4209 * graphite-dependences.h: New.
4210 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
4212 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4214 * graphite-clast-to-gimple.c (print_clast_stmt): New.
4215 (gloog): Print to dump_file the generated clast.
4216 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
4217 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
4219 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4221 * graphite-poly.c (extend_scattering): Increment
4222 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
4224 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4226 * graphite-interchange.c (compute_array_size_poly): Added exit of
4227 recursion condition. Continue iterating even after the first equality.
4228 (compute_array_size): Same.
4230 2009-06-24 Li Feng <nemokingdom@gmail.com>
4232 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
4233 -fdump-tree-final_cleanup to -fdump-tree-optimized.
4234 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4235 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4236 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
4238 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4240 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
4241 only when the use verifies is_gimple_reg.
4243 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4245 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
4246 Allocate scaldims after call to unify_scattering_dimensions.
4248 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4250 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4252 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4253 Albert Cohen <albert.cohen@inria.fr>
4255 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4256 variables for the strip mining.
4258 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4259 Pranav Garg <pranav.garg2107@gmail.com>
4261 * Makefile.in (OBJS-common): Added graphite-blocking.o.
4262 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4263 (graphite-blocking.o): New rule.
4264 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4265 * graphite-blocking.c: New.
4266 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4267 flag_loop_strip_mine.
4268 (psct_scattering_dim_for_loop_depth): New.
4269 * graphite-poly.h (scop_do_strip_mine): Declared.
4270 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4271 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4272 flag_loop_strip_mine.
4274 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4276 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4277 a GMP value and a PPL coefficient at each iteration of a loop.
4279 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4281 * graphite-dependences.c (dependence_polyhedron): Do not use
4282 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
4283 pbb_nb_scattering_transform.
4284 (graphite_legal_transform_dr): Same.
4285 * graphite-poly.c (extend_scattering): Same.
4286 (unify_scattering_dimensions): Same.
4287 (print_scattering_function): Same.
4288 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4289 PBB_NB_LOCAL_VARIABLES.
4290 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4291 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4292 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4293 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4294 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4295 (pbb_nb_scattering_transform): New.
4296 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4297 (psco_scattering_dim): Add assert on parameters.
4298 (psct_scattering_dim): Same.
4299 (psct_scattering_dim_for_loop_depth): Declared.
4300 (psct_local_var_dim): New.
4301 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4302 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
4303 correct layout, call pbb_nb_local_vars.
4304 (psct_add_local_variable, psct_add_scattering_dimension): New.
4305 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4306 Initialize PBB_NB_SCATTERING_TRANSFORM.
4308 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4310 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4311 (set_coef): Renamed ppl_set_coef.
4312 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4314 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4316 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4317 test a boolean against 1.
4318 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4319 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4320 (pbb_do_interchange): Returns true when a transform has been performed.
4321 (scop_do_interchange): Same.
4322 * graphite-poly.c (apply_poly_transforms): Use the return value of
4323 scop_do_interchange.
4324 * graphite-poly.h (scop_do_interchange): Update declaration.
4326 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
4328 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4330 * sese.c (sese_reset_aux_in_loops): New.
4331 * sese.h (sese_reset_aux_in_loops): New.
4333 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4335 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4336 multiplier and multiply the constant by the multiplier.
4337 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4338 (build_poly_dr): Do not use the multiplier to define the subscript.
4340 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4342 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4343 compiler's data reference. Initialize PDR_CDR.
4344 (print_pdr): Call dump_data_reference.
4345 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4346 Add compiler_dr field.
4347 (PDR_BB): Renamed PDR_PBB.
4349 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4350 GCC's data reference representation.
4351 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4352 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4354 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4356 * graphite-poly.c (print_scattering_function): Also print the layout.
4357 * graphite-poly.h (pbb_nb_local_vars): New.
4359 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4361 * graphite-poly.c (print_pbb_domain): Also print the layout names.
4363 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4365 * graphite-poly.c (print_pdr, debug_pdr): New.
4366 * graphite-poly.h (print_pdr, debug_pdr): Declared.
4367 (PDR_BASE): Removed.
4369 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4371 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4374 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4376 * graphite-interchange.c (compute_subscript): Allow also -1 in the
4377 subscript identification column.
4378 (pbb_do_interchange): Print to dump_file that some loops "will be
4379 interchanged". Rely on that chain of characters in the testcases.
4380 * gcc.dg/graphite/interchange-0.c: New.
4381 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4382 interchange-*.c files and compile them with -floop-interchange.
4384 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
4386 * graphite-interchange.c (interchange_profitable_p): Renamed
4387 pbb_interchange_profitable_p.
4389 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4390 Harsha Jagasia <harsha.jagasia@amd.com>
4391 Pranav Garg <pranav.garg2107@gmail.com>
4393 * graphite-interchange.c (interchange_profitable_p): Make static.
4394 (pbb_interchange_loop_depths, pbb_do_interchange,
4395 scop_do_interchange): New.
4396 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4397 for flag_loop_interchange.
4398 * graphite-poly.h (scop_do_interchange): Declared.
4399 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4400 flag_loop_interchange is used.
4402 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4404 * graphite-dependences.c (dependence_polyhedron): Update use of
4405 pbb_nb_scattering_dims.
4406 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4407 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4408 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4409 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4411 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4413 * graphite.c: Cleanup foo.
4415 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4417 * Merge from mainline (r143684:148293).
4418 * Disabled libpcp until it gets fixed.
4420 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
4421 Harsha Jagasia <harsha.jagasia@amd.com>
4423 * graphite-interchange.c: New.
4424 * Makefile.in (graphite-interchange.o): New.
4425 * graphite-poly.h (interchange_profitable_p): Declared.
4426 * graphite-ppl.h (value_max): New.
4428 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4430 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4431 * graphite-poly.h: Fix some comments.
4435 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4438 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4439 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4440 (pdr_accessp_nb_params): Renamed pdr_nb_params.
4441 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4442 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4443 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4444 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4445 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4446 * graphite-clast-to-gimple.c: Same.
4447 * graphite-dependences.c: Same.
4448 * graphite-poly.c: Same.
4449 * graphite-sese-to-poly.c: Same.
4451 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4453 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4454 expressions for an IV rename, as returned by clast_to_gcc_expression.
4455 (copy_renames): Rename new_name to expr.
4456 * sese.c (debug_rename_elt): Same.
4459 (sese_adjust_liveout_phis): Call force_gimple_operand before using
4460 the information from the rename map.
4461 (rename_variables_in_stmt): Same.
4462 (add_loop_exit_phis): Rename new_name to expr.
4463 (insert_loop_close_phis): Same.
4464 (add_guard_exit_phis): Same. Call force_gimple_operand.
4465 * sese.h (struct rename_map_elt): Rename new_name to expr.
4466 (new_rename_map_elt): Same.
4468 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4470 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4471 * sese.c (set_rename): Make it extern.
4472 * sese.h (set_rename): Declared.
4474 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4476 * graphite-poly.c (extend_scattering): Free values.
4477 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4479 (ppl_print_powerset_matrix): Same.
4480 * graphite-scop-detection.c (free_scops_1): New.
4481 (limit_scops): Call free_scops_1.
4482 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4483 (build_poly_dr): Free PPL coefficients.
4484 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4486 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
4488 * graphite-dependences.c: New.
4489 * graphite-data-ref.c: Removed.
4490 * graphite-data-ref.h: Removed.
4491 * Makefile.in (graphite-data-ref.o): Removed.
4492 (graphite-dependences.o): Added.
4493 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4494 * graphite-poly.c: Same.
4495 Move the data dependence testing to graphite-dependences.c.
4497 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
4499 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4500 from graphite_cannot_represent_loop. Code refactored.
4501 (scopdet_basic_block_info): Call graphite_can_represent_loop.
4503 2009-05-17 Li Feng <nemokingdom@gmail.com>
4505 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4506 Cover all the testcases (not only the filtered ones).
4508 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
4510 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4511 unnecessary check. Update comments. Move check for REAL_TYPE here.
4512 (harmful_stmt_in_bb): Remove checks for conditions. This is already
4513 done in (stmt_simple_for_scop_p).
4515 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
4517 * graphite.c (print_global_statistics): New.
4518 (print_graphite_scop_statistic): New.
4519 (print_graphite_statistics): New.
4520 (graphite_initialize, graphite_transform_loops): Print statistics.
4521 * graphite-scop-detection (build_scops): Print statistics.
4522 (print_graphite_scop_statistics): New.
4523 (print_graphite_statistics): New.
4525 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4527 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4528 (debug_clast_name_index): Removed.
4529 (debug_clast_name_indexes_1): Removed.
4530 (debug_clast_name_indexes): Removed.
4531 (clast_name_index_elt_info): Removed.
4532 (eq_clast_name_indexes): Removed.
4533 (clast_name_to_index): Removed.
4534 (new_clast_name_index): Removed.
4535 (save_clast_name_index): Removed.
4536 (save_var_name): Moved...
4537 (init_sese_params_index): Removed.
4538 (clast_name_to_gcc): Remove use of name_tree.
4539 (initialize_cloog_names): Same.
4540 (gloog): Do not call init_sese_params_index.
4541 * graphite-sese-to-poly.c (save_var_name): ...here.
4542 (parameter_index_in_region): New.
4543 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4544 (parameter_index_in_region): Removed.
4545 (is_parameter): Remove use of name_tree.
4546 * sese.h (struct name_tree): Removed.
4547 (struct sese): Remove use of name_tree. New field params_names.
4548 (SESE_PARAMS_NAMES): New.
4549 (SESE_PARAMS): Remove duplicate.
4550 (parameter_index_in_region): Removed.
4551 (sese_nb_params): Remove use of name_tree.
4552 (struct clast_name_index): New.
4553 (new_clast_name_index): New.
4554 (clast_name_to_index): New.
4555 (save_clast_name_index): New.
4556 (debug_clast_name_index): New.
4557 (debug_clast_name_indexes_1): New.
4558 (debug_clast_name_indexes): New.
4559 (clast_name_index_elt_info): New.
4560 (eq_clast_name_indexes): New.
4562 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4564 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4565 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4566 (graphite_loop_normal_form): Do not pass region. Do not
4567 initialize SESE_OLDIVS.
4568 (build_graphite_loop_normal_form): Update call to
4569 graphite_loop_normal_form.
4570 * sese.c (debug_oldivs): Removed.
4571 (new_sese): Do not initialize SESE_OLDIVS.
4572 (free_sese): Do not free SESE_OLDIVS.
4573 (oldiv_for_loop): Removed.
4574 * sese.h (struct sese): Remove old_ivs.
4575 (SESE_OLDIVS): Removed.
4576 (oldiv_for_loop): Removed.
4578 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4580 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4581 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4582 replaced by a call to newivs_to_depth_to_newiv.
4583 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4584 (clast_to_gcc_expression_red): Same.
4585 (gcc_type_for_clast_expr): Same.
4586 (gcc_type_for_clast_eq): Same.
4587 (graphite_translate_clast_equation): Same.
4588 (graphite_create_guard_cond_expr): Same.
4589 (graphite_create_new_guard): Same.
4590 (graphite_create_new_loop): Same.
4591 (build_iv_mapping): Same.
4592 (translate_clast): Same.
4594 (loop_iv_stack_patch_for_consts): Removed. *
4595 sese.c (iv_stack_entry_is_constant): Removed.
4596 (iv_stack_entry_is_iv): Removed.
4597 (loop_iv_stack_push_iv): Removed.
4598 (loop_iv_stack_insert_constant): Removed.
4599 (loop_iv_stack_pop): Removed.
4600 (loop_iv_stack_get_iv): Removed.
4601 (loop_iv_stack_get_iv_from_name): Removed.
4602 (debug_loop_iv_stack): Removed.
4603 (free_loop_iv_stack): Removed.
4604 (loop_iv_stack_remove_constants): Removed. *
4605 sese.h (iv_stack_entry_kind): Removed.
4606 (iv_stack_entry_data_union): Removed.
4607 (iv_stack_entry_struct): Removed.
4608 (iv_stack_entry_p): Removed.
4609 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4610 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4611 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4612 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4613 (gbb_loop_at_index): Fix indenting.
4614 (gbb_loop_index): Removed.
4616 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4618 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4619 Call clast_name_to_index.
4621 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4623 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4624 do not pass params. Get params from SESE_PARAMS.
4625 (clast_to_gcc_expression): Same.
4626 (clast_to_gcc_expression_red): Same.
4627 (gcc_type_for_clast_eq): Same.
4628 (graphite_translate_clast_equation): Same.
4629 (graphite_create_new_loop): Same.
4630 * sese.c (rename_variables_in_stmt): Fix comment.
4632 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4634 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4636 Call save_clast_name_index.
4637 (translate_clast): Pass newivs_index.
4638 (gloog): Create and free newivs_index.
4640 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4642 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4643 (clast_name_index_p): New type.
4644 (debug_clast_name_index): New.
4645 (debug_clast_name_indexes_1): New.
4646 (debug_clast_name_indexes): New.
4647 (clast_name_index_elt_info): New.
4648 (eq_clast_name_indexes): New.
4649 (clast_name_to_index): New.
4650 (new_clast_name_index): New.
4651 (save_clast_name_index): New.
4652 (init_sese_params_index): New.
4653 (gloog): Call init_sese_params_index.
4654 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4655 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4656 (free_sese): Free SESE_PARAMS_INDEX.
4657 * sese.h (struct sese): Add params_index.
4658 (SESE_PARAMS_INDEX): New.
4660 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4662 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4663 (graphite_create_new_loop): Pass the newivs vector. Push the
4664 newly created IV to newivs.
4665 (translate_clast): Pass the newivs vector.
4666 (gloog): Create and destroy the newivs vector.
4668 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4670 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4671 (graphite_loop_normal_form): Initialize loop->aux with the unique
4672 IV that has been created.
4674 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4676 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4677 scev with parameters in the base part. They where forbidden
4680 2009-05-11 Li Feng <nemokingdom@gmail.com>
4682 * gcc.dg/graphite/graphite.exp: Set different default
4683 compile options by file names.
4684 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4685 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4686 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4687 * gcc.dg/graphite/scop-matmult.c: Ditto.
4689 2009-05-08 Li Feng <nemokingdom@gmail.com>
4691 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4692 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4693 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4694 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4696 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4698 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4701 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4703 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4704 allow integer constant strides.
4705 (graphite_can_represent_expr): Depend on outermost_loop.
4706 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4707 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4708 build_scops_1): Same.
4709 (scopdet_basic_block_info): Same and insert layered SCoP
4711 (try_generate_gimple_bb): Cleanup.
4712 (build_scops): Enable data references.
4714 * gcc.dg/graphite/id-5.c: New.
4715 * gcc.dg/graphite/id-9.c: New.
4716 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4717 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4719 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4721 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4722 that we have not yet built for this SCoP.
4724 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4726 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4727 for complex numbers.
4729 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4731 * graphite-ppl.c: Fix build if cloog is not available.
4733 2009-05-04 Li Feng <nemokingdom@gmail.com>
4735 * tree-parloops.c (loop_parallel_p): Remove construction of
4736 NITER and REDUCTION_LIST.
4737 (try_get_loop_niter): New.
4738 (try_create_reduction_list): New.
4739 (parallelize_loops): Bypass the failed checkings in autopar
4740 when can_be_parallel in loop structure is set to true.
4742 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4744 * gcc.dg/graphite/id-6.c: Update testcase.
4745 * gcc.dg/graphite/scop-3.c: Dito.
4747 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4749 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4750 Enable EQ_EXPR and NE_EXPR again.
4752 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4754 * graphite-scop-detection.c (graphite_can_represent_scev):
4755 Add check if scev is affine multivariate.
4756 (harmful_stmt_in_bb): Check if we can represent the conditions.
4757 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4759 * gcc.dg/graphite/id-7.c: New.
4761 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4763 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4764 Check all bbs in region, not only the bbs that are represented in
4766 (build_poly_scop): Add newline.
4767 * gcc.dg/graphite/id-8.c: New.
4769 2009-04-30 Li Feng <nemokingdom@gmail.com>
4771 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4772 when loop initialize.
4773 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4774 * common.opt: Declare flag_graphite_force_parallel.
4775 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4777 * graphite-poly.c (apply_poly_transforms): Introduce
4778 flag_graphite_force_parallel.
4779 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4780 * toplev.c (process_options): ditto and replace a not correctly
4783 2009-04-30 Li Feng <nemokingdom@gmail.com>
4785 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4786 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4787 to the redefinition.
4788 (compute_cloog_iv_types_1): ditto.
4789 (build_iv_mapping): ditto.
4790 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4792 (free_gimple_bb): Removed GBB_LOOPS related free part.
4793 (build_bb_loops): Removed.
4794 * sese.h (struct gimple_bb): Removed loops.
4795 (GBB_LOOPS): Removed.
4796 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4797 (gbb_loop_index): ditto.
4799 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4801 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4802 allow non constant strides.
4803 * gcc.dg/graphite/scop-20.c: New.
4805 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4807 * graphite-scop-detection.c (dot_all_scops): Fix system call
4808 return value warning.
4811 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4813 * gcc.dg/graphite/id-6.c: Fix pattern.
4814 * gcc.dg/graphite/scop-3.c: Same.
4816 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4818 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4819 build_pairwise_constraint, dr_equality_constraints,
4820 build_pairwise_scheduling_equality,
4821 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4822 build_lexicographically_gt_constraint, dependence_polyhedron,
4823 graphite_legal_transform_dr, graphite_legal_transform_bb,
4824 graphite_legal_transform): New.
4825 * graphite-poly.h (graphite_legal_transform): Declared.
4826 * graphite-sese-to-poly.c (build_poly_scop): Call to
4827 graphite_legal_transform is disabled for the moment.
4829 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4831 * graphite-poly.h (pbb_nb_scattering_dims): New.
4832 (pbb_nb_scattering): Use it.
4834 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4836 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4837 Pointset_Powerset version of ppl_insert_dimensions.
4838 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4840 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4842 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4844 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4846 * graphite-poly.h: Fix comment.
4848 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4850 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4852 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4854 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4857 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4859 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4860 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4863 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4865 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4866 handle EQ_EXPR and NE_EXPR.
4868 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4870 * graphite-poly.h (poly_dr): Fix comment.
4872 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4873 Tobias Grosser <grosser@fim.uni-passau.de>
4875 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4876 with a zero dimension polyhedron.
4877 (find_scop_parameters): Move the call to scop_set_nb_params here.
4878 (build_loop_iteration_domains): Store in loop->aux the iteration
4880 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4881 by any loop in scop.
4882 (build_poly_scop): Do not call scop_set_nb_params.
4884 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4885 Tobias Grosser <grosser@fim.uni-passau.de>
4887 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4888 add_condition_to_domain not GT_EXPR.
4890 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4892 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4893 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4894 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4895 upper_bound_assign to calculate unions.
4896 * gcc.dg/graphite/id-6.c: New.
4898 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4900 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4901 handle abnormal edges.
4903 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4905 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4906 (free_poly_bb): Also free poly_drs.
4907 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4908 (poly_dr): Polyhedron to Pointset_Powerset.
4909 (pdr_accessp_nb_subscripts): Same.
4910 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4913 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4915 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4916 names into more meaningful names.
4918 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4920 * gfortran.dg/graphite/interchange-1.c: New.
4921 * gfortran.dg/graphite/interchange-2.c: New.
4923 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4925 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4927 * tree-parloops.c (rewrite_phi_with_iv): New.
4928 (rewrite_all_phi_nodes_with_iv): New.
4929 (canonicalize_loop_ivs): Call them.
4931 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4933 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4934 graphite_find_data_references_in_stmt.
4935 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4936 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4938 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4940 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4942 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4944 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4945 instead of bb_in_region.
4946 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4947 (build_sese_conditions): Use flag_bb_in_sese.
4948 * sese.c (register_bb_in_sese): Removed.
4949 (new_sese): Remove initialization of SESE_REGION_BBS.
4950 (free_sese): Do not free SESE_REGION_BBS.
4951 * sese.h (struct sese): Remove field region_basic_blocks.
4952 (SESE_REGION_BBS): Removed.
4953 (bb_in_sese_p): Implement in function of bb_in_region.
4955 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4957 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4960 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4962 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4964 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4965 (add_condition_to_domain): New.
4966 (add_condition_to_pbb): New.
4967 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4968 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4970 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4972 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4973 ppl_Pointset_Powerset.
4974 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4975 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4976 (pbb_nb_loops): Same.
4977 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4978 add_conditions_to_domain): Same.
4979 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4980 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4981 ppl_const_Polyhedron_t.
4982 (ppl_print_powerset_matrix): New.
4983 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4984 ppl_print_powerset_matrix): New.
4985 (ppl_print_polyhedron_matrix): Updated.
4987 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4989 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4991 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4993 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4994 (print_iteration_domains, debug_iteration_domain,
4995 debug_iteration_domains): New.
4996 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4997 debug_iteration_domains): Declared.
4998 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
5001 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
5002 Sebastian Pop <sebastian.pop@amd.com>
5004 * graphite-poly.h (print_iteration_domain): New.
5005 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
5006 (build_sese_conditions_1, build_sese_conditions_after,
5007 build_sese_conditions_before): New.
5008 (build_sese_conditions): Rewritten.
5010 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
5011 Tobias Grosser <grosser@fim.uni-passau.de>
5013 Cleanup of code generation liveouts.
5014 * graphite-clast-to-gimple.c (translate_clast): Use a single
5015 rename_map instead of one per translated statement.
5016 Do not use SESE_LIVEOUT_RENAMES.
5017 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
5018 (gloog): Do not use SESE_LIVEOUT_RENAMES.
5019 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
5020 phi node of a reduction: when a loop contains a reduction used outside
5021 the loop, there should be a scalar close phi node on the exit block.
5022 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
5023 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
5024 (free_sese): Do not free them.
5025 (sese_build_liveouts_use): Do not use them.
5026 (sese_build_liveouts_bb): Same.
5027 (sese_build_liveouts): Same.
5028 (sese_insert_phis_for_liveouts): Same.
5029 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
5030 (defined_in_loop_p): New.
5031 (alive_after_loop): New.
5032 (close_phi_not_yet_inserted_p): New.
5033 (struct alep, alep_p): New.
5034 (add_loop_exit_phis): Remove from the rename_map all the names defined
5035 in the code generated loop.
5036 (insert_loop_close_phis): Traverse the rename_map passed to it.
5037 Don't use SESE_LIVEOUT_RENAMES.
5038 (default_liveout_before_guard): Renamed default_before_guard.
5039 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
5040 (graphite_copy_stmts_from_block): Do not directly call set_rename.
5041 (register_sese_liveout_renames): Removed.
5042 (copy_bb_and_scalar_dependences): Do not call it.
5043 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
5045 (SESE_LIVEOUT): Removed.
5046 (SESE_LIVEOUT_RENAMES): Removed.
5047 (SESE_REDUCTION_LIST): Removed.
5048 (sese_build_liveouts): Removed.
5049 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
5050 (insert_loop_close_phis): Pass a htab_t instead of a sese.
5051 (insert_guard_phis): Same.
5052 (rename_map_elt): Declare a VEC of them.
5053 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5054 trees not pointers to trees.
5056 Rewrite in canonical close SSA form:
5057 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
5058 (limit_scops): Close the scop after the block containing the close phi
5060 (canonicalize_loop_closed_ssa): New.
5061 (canonicalize_loop_closed_ssa_form): New.
5062 (build_scops): Call canonicalize_loop_closed_ssa_form.
5064 * graphite-sese-to-poly.c: Fix typos.
5066 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
5068 * graphite-poly.c (print_scattering_function, print_pbb_domain):
5070 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
5071 (print_pbb): Add conditions.
5073 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
5074 Sebastian Pop <sebastian.pop@amd.com>
5076 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
5077 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
5078 (build_scop_bbs_1): New.
5079 (build_scop_bbs): Rewrite.
5080 * sese.h (bb_in_region): New.
5082 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5084 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5086 (print_scop): Style.
5087 * graphite-poly.h (poly_bb): Add drs vector.
5088 (PBB_DRS): Add accessor.
5089 * graphite-sese-to-poly.c (build_poly_dr): New.
5090 (build_pbb_drs, build_scop_drs): New.
5091 (build_poly_scop): call build_scop_drs (Disabled at the moment).
5093 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5095 * tree-ssa-loop.c: Include forgotten toplev.h
5097 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5099 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
5100 * gcc.dg/graphite/pr37883.c: Remove -floop-*
5101 * gcc.dg/graphite/pr37928.c: Same
5102 * gcc.dg/graphite/pr38409.c: Same
5103 * gcc.dg/graphite/pr38498.c: Same
5104 * gcc.dg/graphite/pr38559.c: Same
5105 * gcc.dg/graphite/pr39335.c: Same
5106 * gcc.dg/graphite/pr39335_1.c: Same
5107 * gfortran.dg/graphite/block-2.f: Same
5108 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
5111 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
5113 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
5114 build_access_matrix, build_scop_data_accesses): Remove access function
5115 building. (We get a new version soon).
5116 (build_bb_loops, scan_tree_for_params_right_scev): Update.
5117 * sese.h (nb_loops_around_loop_in_sese): Remove.
5118 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
5120 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
5121 Sebastian Pop <sebastian.pop@amd.com>
5123 * graphite-scop-detection.c (struct scopdet_info): Rename last
5125 (scopdet_basic_block_info, build_scops_1): Don't use
5126 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
5128 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
5129 Sebastian Pop <sebastian.pop@amd.com>
5131 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
5132 * sese.c (sese_build_liveouts_use): Renamed from
5133 sese_build_livein_liveouts_use. Remove liveins.
5134 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
5135 Call sese_build_liveouts_use.
5136 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
5137 Call sese_build_liveouts_bb.
5138 (new_sese, free_sese): Remove liveins.
5139 (sese_add_exit_phis_var): Deleted.
5140 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
5142 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
5144 * sese.h (sese): Remove num_ver and livein.
5145 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
5147 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
5149 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
5151 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
5153 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
5154 (build_scop_scattering): Do not use compare_prefix_loops any more.
5155 (nb_common_loops): New.
5157 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5159 * sese.c (get_new_name_from_old_name): Renamed get_rename.
5160 (register_old_and_new_names): Renamed set_rename.
5162 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5164 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
5165 of the decl from the previous commit.
5167 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5169 * graphite-scop-detection.c (dot_scop): New.
5170 * graphite-scop-detection.h (dot_scop): Declared.
5172 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5174 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
5176 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5178 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
5179 condition at the end of the loop.
5180 * graphite.c (graphite_initialize, graphite_finalize): Print to
5181 dump_file the compiled function.
5182 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
5183 of create_empty_loop_on_edge.
5184 (translate_clast): Update the code generation of loops for the new
5186 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
5188 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5190 Reverted the patch from 2009-03-19.
5192 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
5194 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5196 (print_scop): Style.
5197 * graphite-poly.h (poly_bb): Add drs vector.
5198 (PBB_DRS): Add accessor.
5199 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
5200 (build_access_matrix_with_af, build_access_matrix,
5201 build_scop_data_accesses): Delete.
5202 (build_poly_dr): New.
5203 (build_pbb_drs, build_scop_drs): New.
5204 (build_poly_scop): call build_scop_drs.
5206 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
5208 * graphite-scop-detection.c (dot_all_scops_1): Close the table
5209 once per basic block.
5211 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5213 * graphite-scop-detection.c (graphite_can_represent_scev): New.
5214 (graphite_can_represent_expr): Renamed from loop_affine_expr
5216 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
5217 (graphite_cannot_represent_loop): Add scop_entry to parameters.
5218 (scopdet_basic_block_info): Actually define entry_block.
5219 (stmt_simple_memref_p): Moved here from ...
5221 * tree-data-ref.c (stmt_simple_memref_p): here.
5222 * tree-data-ref.h (stmt_simple_memref_p): Removed.
5224 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5226 * gcc.dg/graphite/id-4.c: New.
5228 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5230 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5231 (register_old_and_new_names): Update the content of the map.
5232 When there was already a rename_map_elt in the map at that
5234 (copy_bb_and_scalar_dependences): Do rename_variables after
5235 expand_scalar_variables.
5236 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5237 of the map. When there was already a rename_map_elt in the
5238 map at that location, free it.
5239 (translate_clast): Pass the rename_map. Do not initialize and free
5240 a rename_map per stmt_user.
5241 (gloog): Initialize and free one rename_map and pass it to
5244 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5246 * sese.c (expand_scalar_variables_stmt,
5247 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5249 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5250 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5251 the gimple_stmt_iterator of the statement to be expanded.
5252 * graphite-scop-detection.c (is_simple_operand): Do handle
5255 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5257 * graphite-scop-detection.c (is_simple_operand): Do not handle
5259 * gcc.dg/graphite/id-2.c: New.
5261 * graphite-sese-to-poly.c (build_bb_loops,
5262 add_value_to_dim, scan_tree_for_params_right_scev,
5263 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5264 find_params_in_bb, build_loop_iteration_domains,
5265 add_conditions_to_domain): Remove subtract.
5267 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5269 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5270 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5271 pbb_loop_at_index -> gbb_loop_at_index.
5272 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5273 (debug_loop_vec): Delete.
5274 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5275 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
5276 (PBB_LOOPS): Removed.
5277 (PBB_BLACK_BOX): Insert cast.
5278 (pbb_set_black_box): New setter.
5279 (pbb_loop_at_index, pbb_loop_index): Removed.
5280 (scop_set_region, scop_set_nb_params): New.
5281 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5282 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5283 (build_poly_scop): Use scop_set_nb_params.
5284 * sese.h (gimple_bb): Add LOOPS.
5285 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5287 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5289 Revert previous commit.
5291 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5293 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5294 (register_old_and_new_names): Update the content of the map.
5295 When there was already a rename_map_elt in the map at that
5297 (copy_bb_and_scalar_dependences): Do rename_variables after
5298 expand_scalar_variables.
5299 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5300 of the map. When there was already a rename_map_elt in the
5301 map at that location, free it.
5302 (translate_clast): Pass the rename_map. Do not initialize and free
5303 a rename_map per stmt_user.
5304 (gloog): Initialize and free one rename_map and pass it to
5307 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5309 Remove forgotten line in revert.
5311 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5313 Revert previous commit.
5315 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5317 * sese.c (register_old_and_new_names): Update the content
5318 of the map. When there was already a rename_map_elt in the
5319 map at that location, free it.
5320 (copy_bb_and_scalar_dependences): Do rename_variables after
5321 expand_scalar_variables.
5322 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5323 of the map. When there was already a rename_map_elt in the
5324 map at that location, free it.
5325 (translate_clast): Pass the rename_map. Do not initialize and free
5326 a rename_map per stmt_user.
5327 (gloog): Initialize and free one rename_map and pass it to
5330 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5332 * graphite-clast-to-gimple.c (translate_clast): context_loop
5335 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5336 Sebastian Pop <sebastian.pop@amd.com>
5338 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5339 of the use of ppl_Polyhedron_map_space_dimensions.
5341 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5342 Sebastian Pop <sebastian.pop@amd.com>
5344 * graphite-poly.c (unify_scattering_dimensions): Fix types.
5345 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5346 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5347 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5348 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5349 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5350 pbb_nb_params): New.
5351 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5352 nb_loops_around_pbb): Adapt return types.
5354 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
5356 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5357 graphite-clast-to-gimple.o, graphite-data-ref.o,
5358 graphite-scop-detection.o, graphite-poly.o): Add
5361 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
5363 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5364 graphite-clast-to-gimple.o, graphite-data-ref.o,
5365 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5367 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5369 * gcc.dg/graphite/pr37485.c: Remove -floop-block
5370 * gcc.dg/graphite/pr37828.c: Same.
5371 * gcc.dg/graphite/pr37684.c: Same.
5372 * gcc.dg/graphite/block-0.c: Same.
5373 * gcc.dg/graphite/block-1.c: Same.
5374 * gcc.dg/graphite/block-2.c: Same.
5375 * gcc.dg/graphite/block-3.c: Same.
5376 * gcc.dg/graphite/block-4.c: Same.
5377 * gcc.dg/graphite/block-5.c: Same.
5378 * gcc.dg/graphite/block-6.c: Same.
5379 * gfortran.dg/graphite/pr38083.f90: Same.
5380 * gfortran.dg/graphite/block-1.f90: Same.
5381 * gfortran.dg/graphite/block-3.f90: Same.
5382 * gfortran.dg/graphite/pr37852.f90: Same.
5383 * gfortran.dg/graphite/block-4.f90: Same.
5384 * gfortran.dg/graphite/pr37980.f90: Same.
5385 * gfortran.dg/graphite/pr38953.f90: Same.
5386 * gfortran.dg/graphite/pr37857.f90: Same.
5387 * opts.c: Remove -floop-block from -O2.
5388 * graphite-poly.c: Fail if -floop-block -floop-interchange or
5389 -floop-strip-mine are used.
5391 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5392 Sebastian Pop <sebastian.pop@amd.com>
5394 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5396 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5397 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5398 strip_mine_profitable_p, is_interchange_valid,
5399 graphite_trans_bb_block, graphite_trans_loop_block,
5400 graphite_trans_scop_block): Temporary removed.
5401 (extend_scattering, unify_scattering_dimensions): New.
5402 (print_scattering_function, graphite_read_transforms):
5403 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5404 (graphite_generate_scattering_fns): Removed.
5405 (apply_poly_transforms): Cleanup.
5406 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5407 (schedule_to_scattering): Moved.
5408 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5409 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5410 (pbb_nb_scattering): New.
5411 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5412 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5414 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5416 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5417 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
5418 -> PBB_TRANSFORMED_SCATTERING.
5419 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5420 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5421 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5422 (check_poly_representation): Do not return bool.
5423 (graphite_transform_loops): Reformat.
5424 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5426 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
5428 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5429 debug_pbb_domain, debug_pbb, debug_scop): New.
5430 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5431 debug_pbb_domain, debug_pbb, debug_scop): Declared.
5433 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5436 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5437 when the type precision of the induction variable should be
5438 larger than the type precision of nit.
5439 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5440 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5441 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5443 * gcc.dg/graphite/pr39335_1.c: New.
5444 * gcc.dg/graphite/pr39335.c: New.
5446 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5448 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5449 SSA_NAMES not struct reduction_info.
5451 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5453 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5455 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5456 Tobias Grosser <grosser@fim.uni-passau.de>
5458 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5459 (free_sese): Free SESE_REDUCTION_LIST.
5460 * sese.h (struct sese): Add field reduction_list.
5461 (SESE_REDUCTION_LIST): New.
5462 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5463 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5465 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5466 Tobias Grosser <grosser@fim.uni-passau.de>
5468 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5471 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5472 Tobias Grosser <grosser@fim.uni-passau.de>
5474 * tree-parloops.c (struct brli, build_reduction_list_info,
5475 analyze_reduction_list, gather_scalar_reductions): New.
5476 (loop_parallel_p): Build a reduction list containing only
5477 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5478 (gen_parallel_loop): Call the analysis analyze_reduction_list.
5479 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5480 * tree-flow.h (gather_scalar_reductions): Declared.
5482 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
5485 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5486 number_of_iterations_exit from a gcc_assert.
5488 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
5489 Jan Sjodin <jan.sjodin@amd.com>
5491 * output.h (graphite_out_file, graphite_in_file): Declared.
5492 * toplev.c (graphite_out_file, graphite_in_file): New.
5493 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5494 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5495 Don't call schedule_to_scattering.
5496 * common.opt (fgraphite-write, fgraphite-read): New.
5497 * graphite-poly.c: Include output.h.
5498 (print_scattering_function, print_scattering_functions,
5499 debug_scattering_function, debug_scattering_functions,
5500 graphite_write_transforms, graphite_read_transforms,
5501 graphite_generate_scattering_fns): New.
5502 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5503 Call graphite_generate_scattering_fns, graphite_write_transforms,
5504 graphite_read_transforms.
5505 (new_poly_bb): Initialize PBB_SCATTERING.
5506 (free_poly_bb): Free PBB_SCATTERING.
5507 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5508 * graphite-poly.h (struct poly_bb): Add field scattering.
5509 (PBB_SCATTERING): New.
5510 (print_scattering_function, print_scattering_functions,
5511 debug_scattering_function, debug_scattering_functions): Declared.
5512 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5513 GMP values, not integers!
5514 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5515 ppl_read_polyhedron_matrix): New.
5516 * graphite-ppl.h (ppl_print_polyhedron_matrix,
5517 debug_ppl_polyhedron_matrix,
5518 ppl_read_polyhedron_matrix): Declared.
5519 * Makefile.in (graphite-poly.o): Depends on output.h.
5521 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5522 Tobias Grosser <grosser@fim.uni-passau.de>
5525 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5526 scalar evolutions in the scop_entry->loop_father.
5528 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5529 Tobias Grosser <grosser@fim.uni-passau.de>
5531 * graphite.h (ref_nb_loops): Remove declaration.
5532 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5533 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5534 debug_gbb): Moved to sese.h.
5537 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5538 Tobias Grosser <grosser@fim.uni-passau.de>
5540 * graphite-data-ref.[ch]: Disable.
5542 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5543 Tobias Grosser <grosser@fim.uni-passau.de>
5545 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5546 scalar evolutions in the scop_entry->loop_father.
5548 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5550 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5551 (graphite_cannot_represent_loop_niter): Renamed
5552 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5553 (limit_scops): build_sese_loop_nests does not return a bool.
5554 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5555 * sese.c (nb_reductions_in_loop): ... from here.
5556 (graphite_loop_normal_form): ... from here.
5557 (sese_record_loop): Does not fail, so does not return a bool.
5558 (build_sese_loop_nests): Same.
5559 * sese.h (build_sese_loop_nests): Update declaration.
5560 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5561 (build_graphite_loop_normal_form): New.
5562 (gloog): Call build_graphite_loop_normal_form.
5563 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5564 build_sese_loop_nests.
5566 * gcc.dg/graphite/id-1.c: New.
5568 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5569 Tobias Grosser <grosser@fim.uni-passau.de>
5571 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5572 The SCoP detection fix is sufficient.
5574 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5576 PR tree-optimization/39260
5577 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5578 the basic block contains a condition with a real type.
5579 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5581 * gcc.dg/graphite/pr39260.c: New.
5583 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5585 * graphite-poly.c: Inlcude params.h.
5586 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5588 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5589 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5591 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5592 Tobias Grosser <grosser@fim.uni-passau.de>
5594 * graphite-scop-detection.c (dot_all_scops_1,
5595 dot_all_scops): Moved here.
5596 * graphite-scop-detection.h (dot_all_scops): Declared here.
5597 * graphite.c (graphite_initialize, graphite_finalize): New.
5598 (graphite_transform_loops): Cleaned up.
5599 * sese.c (debug_oldivs): Moved here.
5600 * graphite-poly.c (graphite_apply_transformations): Renamed
5601 apply_poly_transforms.
5602 (debug_loop_vec): Moved here.
5603 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5604 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5605 find_scop_parameters, build_scop_iteration_domain,
5606 add_conditions_to_constraints, build_scop_canonical_schedules,
5607 build_scop_data_accesses): Now static.
5608 (build_poly_scop, check_poly_representation): New.
5610 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5612 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5613 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5614 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5615 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5616 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5617 scan_tree_for_params, struct irp_data, dx_record_params,
5618 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5619 build_loop_iteration_domains, add_conditions_to_domain,
5620 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5621 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5622 build_sese_conditions, add_conditions_to_constraints,
5623 build_scop_iteration_domain, build_access_matrix_with_af,
5624 build_access_matrix,
5625 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5627 * graphite-sese-to-poly.c: New.
5628 * graphite-sese-to-poly.h: New.
5630 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5632 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5634 * graphite.c: Split graphite code generation to a new file.
5635 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5636 max_precision_type, clast_to_gcc_expression_red,
5637 clast_to_gcc_expression, gcc_type_for_clast_expr,
5638 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5639 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5640 graphite_create_new_guard, clast_get_body_of_loop,
5641 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5642 graphite_create_new_loop, build_iv_mapping, copy_renames,
5643 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5644 compute_cloog_iv_types, free_scattering, save_var_name,
5645 initialize_cloog_names, build_scop_context, build_cloog_prog,
5646 set_cloog_options, debug_clast_stmt, scop_to_clast,
5647 print_generated_program, debug_generated_program,
5648 gloog): Moved to graphite-clast-to-gimple.c.
5650 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5652 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5653 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5654 loop_iv_stack_pop, loop_iv_stack_get_iv,
5655 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5656 free_loop_iv_stack, loop_iv_stack_remove_constants,
5657 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5658 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5659 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5660 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5661 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5662 get_vdef_before_sese, sese_adjust_vphi,
5663 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5664 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5665 is_iv, expand_scalar_variables_ssa_name,
5666 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5667 expand_scalar_variables, rename_variables, remove_condition,
5668 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5669 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5670 default_liveout_before_guard, add_guard_exit_phis,
5671 insert_guard_phis, register_old_and_new_names,
5672 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5673 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5674 if_region_set_false_region, create_if_region_on_edge,
5675 move_sese_in_condition): Moved to sese.c.
5677 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5678 if_region_exit, if_region_get_condition_block,
5679 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5680 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5681 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5682 ivtype_map_elt, new_ivtype_map_elt,
5683 recompute_all_dominators): Moved to sese.h.
5685 * graphite-clast-to-gimple.c: New.
5686 * graphite-clast-to-gimple.h: New.
5687 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5688 * sese.c: Modified as said above.
5691 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5693 * graphite.c: Split scop detection to a new file.
5694 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5695 move_sd_regions, loop_affine_expr, exclude_component_ref,
5696 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5697 graphite_cannot_represent_loop_niter, struct scopdet_info,
5698 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5699 find_single_entry_edge, find_single_exit_edge,
5700 create_single_entry_edge, sd_region_without_exit,
5701 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5702 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5703 Moved to graphite-scop-detection.c.
5705 * graphite-scop-detection.c: New.
5706 * graphite-scop-detection.h: New.
5707 * Makefile.in: Add new rule for graphite-scop-detection.o.
5709 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5710 tree-scalar-evolution.h.
5711 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5712 build_sese_loop_nests): Moved here from graphite.c.
5713 (param_index): Renamed parameter_index_in_region.
5715 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5716 Sebastian Pop <sebastian.pop@amd.com>
5718 * gcc.dg/graphite/block-0.c: Expected to fail now.
5719 * gcc.dg/graphite/block-1.c: Same.
5720 * gcc.dg/graphite/block-5.c: Same.
5721 * gcc.dg/graphite/block-6.c: Same.
5723 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5724 Sebastian Pop <sebastian.pop@amd.com>
5726 * graphite.h: Separate from graphite_bb_p the polyhedral
5727 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5728 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5729 graphite-data-ref.h.
5730 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5731 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5732 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5733 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5734 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5735 scop_nb_params): Moved to graphite-poly.h.
5736 * graphite-data-ref.c: Same.
5737 * graphite-data-ref.h: New.
5739 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5740 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5741 is_interchange_valid, graphite_trans_bb_block,
5742 graphite_trans_loop_block, scop_max_loop_depth,
5743 graphite_trans_scop_block, graphite_apply_transformations,
5744 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5746 * graphite-poly.h: New.
5747 * graphite-poly.c: New.
5748 * Makefile.in (OBJS-common): Add graphite-poly.o.
5749 (graphite-poly.o): New rule.
5750 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5753 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5754 Tobias Grosser <grosser@fim.uni-passau.de>
5756 * graphite.c: Replace gb -> gbb.
5758 * graphite-data-ref.c: Same.
5760 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5761 Tobias Grosser <grosser@fim.uni-passau.de>
5763 * Makefile.in (OBJS-commmon): Add sese.o.
5765 (graphite.o): Add sese.h.
5766 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5767 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5768 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5770 (block_before_scop): Add missing return.
5771 (new_scop, free_scop): Remove SESE data structures.
5772 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5773 find_scop_parameters, build_loop_iteration_domains,
5774 add_conditions_to_domain, register_scop_liveout_renames,
5775 copy_bb_and_scalar_dependences): Scop -> SESE.
5777 (add_conditions_to_domain): SCoP -> SESE and remove check
5778 (scop_contains_non_iv_scalar_phi_nodes): New.
5779 (build_scop_conditions_1, build_scop_conditions): Remove check for
5780 non iv scalar phi nodes.
5781 (print_scop_statistics): New.
5782 (graphite_transform_loops): Cleanup.
5784 * graphite.h: Move to sese & cleanup.
5788 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5789 Tobias Grosser <grosser@fim.uni-passau.de>
5791 * graphite.c (build_scop_conditions_1): Conditions are only
5792 at the end of a basic block.
5794 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5795 Tobias Grosser <grosser@fim.uni-passau>
5797 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5799 (GBB_ALPHA): Removed.
5801 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5802 Tobias Grosser <grosser@fim.uni-passau.de>
5804 * graphite-data-ref.c (graphite_test_dependence): Don't use
5805 GBB_DYNAMIC_SCHEDULE.
5806 * graphite.c (new_graphite_bb): Same.
5807 (free_graphite_bb): Same.
5808 (build_scop_dynamic_schedules): Removed.
5809 (graphite_transform_loops): Don't call it.
5810 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5811 (GBB_DYNAMIC_SCHEDULE): Removed.
5813 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5814 Tobias Grosser <grosser@fim.uni-passau.de>
5816 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5817 (print_graphite_bb): Same.
5818 (build_cloog_prog): Same.
5820 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5821 Tobias Grosser <grosser@fim.uni-passau.de>
5823 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5825 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5826 Tobias Grosser <grosser@fim.uni-passau.de>
5828 * graphite.c (build_scop_context): Don't use CloogMatrix.
5829 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5830 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5832 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5833 Tobias Grosser <grosser@fim.uni-passau.de>
5835 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5836 liveout_renames, add_params fields...
5837 (struct sese): ... here.
5838 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5839 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5841 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5842 Tobias Grosser <grosser@fim.uni-passau.de>
5844 * graphite.c (print_scop): Do not print the CLooG program.
5845 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5846 build_cloog_prog, gloog): Don't use SCOP_PROG.
5847 (find_transform): Renamed scop_to_clast.
5848 (print_generated_program, debug_generated_program): New.
5849 (graphite_transform_loops): Adapt to new interface.
5850 * graphite.h (struct scop): Remove program field.
5851 (SCOP_PROG): Removed.
5852 (print_generated_program, debug_generated_program): Declared.
5854 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5856 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5857 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5858 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5859 free_graphite_bb, build_scop_canonical_schedules,
5860 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5861 schedules are now represented using a ppl_Linear_Expression_t.
5862 * graphite.h (struct graphite_bb): Same.
5863 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5864 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5866 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5868 * graphite.c: Free local memory.
5869 * graphite-ppl.c: Same.
5871 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5873 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5874 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5875 swap_constraint_variables, scale_constraint_variable): Removed.
5876 (graphite_trans_bb_strip_mine): Remove pong.
5877 * graphite-ppl.c: Include missing header files.
5878 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5879 * graphite-ppl.h (ppl_strip_loop): Declared.
5880 * Makefile.in (graphite-ppl.o): Adjust dependences.
5882 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5884 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5885 (build_scop_iteration_domain): Same.
5887 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5889 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5891 (add_value_to_dim, scan_tree_for_params_right_scev,
5892 scan_tree_for_params_int): New.
5893 * graphite-ppl.c (oppose_constraint): New.
5894 (insert_constraint_into_matrix): Implement missing cases.
5895 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5897 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5899 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5900 use ppl_move_dimension.
5902 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5904 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5907 * graphite-ppl.c: Same.
5908 * graphite-ppl.h: Same.
5910 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5912 Revert last 3 commits.
5914 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5916 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5918 (add_value_to_dim, scan_tree_for_params_right_scev,
5919 scan_tree_for_params_int): New.
5920 * graphite-ppl.c (oppose_constraint): New.
5921 (insert_constraint_into_matrix): Implement missing cases.
5922 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5924 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5926 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5928 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5929 Tobias Grosser <grosser@fim.uni-passau.de>
5931 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5932 use ppl_move_dimension.
5933 * graphite-ppl.c (ppl_move_dimension): New.
5934 * graphite-ppl.h (ppl_move_dimension): Declared.
5936 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5938 * graphite.c: Do not include cloog/cloog.h.
5939 (print_graphite_bb): Remove ping pong, call PPL print function.
5941 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5943 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5944 (graphite.o): Add dependence on graphite-ppl.h.
5945 (graphite-ppl.o): New.
5946 (graphite-data-ref.c): Ping pong between PPL data structures
5948 * graphite-ppl.c: New.
5949 * graphite-ppl.h: New.
5950 * graphite.c: Include graphite-ppl.h.
5951 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5952 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5953 Ping pong between PPL data structures and matrices.
5954 (new_graphite_bb): Create a PPL constraint system.
5955 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5956 (build_loop_iteration_domains): Use PPL functions.
5957 * graphite.h: Include graphite-ppl.h. Fix comments.
5958 (graphite_bb): Use a ppl_Constraint_System_t instead of
5959 CloogMatrix for representing the domain.
5960 (scop): Remove static_schedule.
5961 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5963 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5965 * graphite.c: Fix some comments.
5967 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5970 * graphite.c (if_region_set_false_region): After moving a region
5971 in the false branch of a condition, remove the empty dummy
5973 (gloog): Remove wrong fix for PR38953.
5975 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5977 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5978 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5979 register_bb_in_sese, new_sese, free_sese): Moved.
5980 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5981 outermost_loop_in_scop, build_scop_iteration_domain,
5982 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5983 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5984 Use loop_in_sese_p instead of loop_in_scop_p.
5985 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5986 (free_scop): Do not free SCOP_BBS_B.
5987 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5988 ref_nb_loops): Moved here...
5989 * graphite.h (ref_nb_loops): ... from here.
5990 (struct scop): Remove bbs_b bitmap.
5991 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5992 * gcc.dg/graphite/scop-19.c: New
5994 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5996 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5999 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
6001 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6002 eq_loop_to_cloog_loop): Remove.
6003 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
6004 * graphite.h (struct scop): Remove loop2cloog_loop.
6005 (loop_domain_dim, loop_iteration_vector_dim): Remove.
6007 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
6009 * opts.c (decode_options): Only add graphite options to O2
6010 if we compile with graphite enabled.
6012 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
6014 * Merge from mainline (r143163:143684).
6016 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
6018 * graphite.c (debug_value): Removed.
6019 * graphite.h (debug_value): Removed.
6021 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6023 * passes.c (init_optimization_passes): Do not call pass_copy_prop
6024 after graphite: pass_copy_prop does not maintain a proper loop closed
6025 SSA form. pass_copy_prop should be fixed.
6027 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6029 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
6031 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6033 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
6034 (gloog): Split the exit of the scop when the scop exit is a loop exit.
6035 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
6038 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
6040 * graphite.c (gloog): Return true when code gen succeeded.
6041 (graphite_transform_loops): Do not call cleanup_tree_cfg if
6042 the code of the function did not changed. After cleanup_tree_cfg
6043 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
6046 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
6048 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
6049 gimple_call_lhs is NULL.
6051 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
6052 Tobias Grosser <tobi.grosser@amd.com>
6054 * graphite.c (graphite_trans_scop_block): Do not block single
6057 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
6058 Tobias Grosser <tobi.grosser@amd.com>
6060 * graphite.c (build_scop_canonical_schedules): Start schedules at
6063 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
6064 Tobias Grosser <tobi.grosser@amd.com>
6066 * graphite.c (compare_prefix_loops): New.
6067 (build_scop_canonical_schedules): Rewritten.
6068 (graphite_transform_loops): Move build_scop_canonical_schedules
6069 after build_scop_iteration_domain.
6071 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6072 Tobias Grosser <tobi.grosser@amd.com>
6074 * graphite.c (add_conditions_to_domain): Add the loops to
6075 the dimension of the iteration domain. Do copy the domain
6076 only when it exists.
6077 (build_scop_conditions_1): Do not call add_conditions_to_domain.
6078 (add_conditions_to_constraints): New.
6079 (can_generate_code_stmt, can_generate_code): Removed.
6080 (gloog): Do not call can_generate_code.
6081 (graphite_transform_loops): Call add_conditions_to_constraints
6082 after building the iteration domain.
6084 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6085 Tobias Grosser <tobi.grosser@amd.com>
6086 Jan Sjodin <jan.sjodin@amd.com>
6088 * graphite.c (scan_tree_for_params): On substractions negate
6089 all the coefficients of the term.
6090 (clast_to_gcc_expression_red): New. Handle reduction expressions
6091 of more than two operands.
6092 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
6093 (get_vdef_before_scop): Handle also the case of default definitions.
6095 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6098 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
6099 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
6100 (gloog): Do not call cleanup_tree_cfg.
6101 (graphite_transform_loops): Call cleanup_tree_cfg after all
6102 scops have been code generated.
6104 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
6106 * passes.c (init_optimization_passes): Schedule after
6107 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
6109 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
6111 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
6113 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
6114 Set the type of an expression to the type of its assign statement.
6115 (expand_scalar_variables_expr): Do not pass loop_p.
6116 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
6117 (copy_bb_and_scalar_dependences): Do not pass loop_p.
6118 (translate_clast): Update call to copy_bb_and_scalar_dependences.
6120 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
6122 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
6123 an expression to the gimple_expr_type of its assign statement.
6124 (expand_scalar_variables_expr): Stop recursion on tcc_constant
6127 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
6129 PR tree-optimization/38786
6130 * gcc.dg/graphite/pr38786.c: New.
6131 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
6132 the SSA_NAME case of expand_scalar_variables_expr.
6133 (expand_scalar_variables_expr): Also gather the scalar computation
6134 used to index the memory access.
6135 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
6136 the gimple_stmt_iterator where it inserts new code.
6138 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
6140 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
6142 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
6144 * opts.c (decode_options): Enable flag_graphite_identity and
6145 flag_loop_block in -O2 and above.
6147 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6149 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
6150 Fix merge problem: replace with the file from trunk.
6152 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6154 * Merge from mainline (r141727:143163).
6156 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
6157 Jan Sjodin <jan.sjodin@amd.com>
6159 PR tree-optimization/38559
6160 * gcc.dg/graphite/pr38559.c: New.
6162 * graphite.c (debug_value, copy_constraint,
6163 swap_constraint_variables, scale_constraint_variable, ): New.
6164 (get_lower_bound, get_upper_bound): Removed.
6165 (graphite_trans_bb_strip_mine): Clean up this code that works
6166 only for constant number of iterations. Fully copy upper and
6167 lower bound constraints, not only the constant part of them.
6168 * graphite.h (debug_value): Declared.
6170 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
6172 PR tree-optimization/38492
6173 PR tree-optimization/38498
6174 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
6175 * tree-chrec.h (scev_is_linear_expression): Declared.
6176 * graphite.c (graphite_cannot_represent_loop_niter): New.
6177 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
6178 (graphite_loop_normal_form): Use gcc_assert.
6179 (scan_tree_for_params): Use CASE_CONVERT.
6180 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
6181 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
6182 Use gcc_assert. Discard scops that contain unhandled cases.
6183 (build_scop_conditions): Return a boolean status for unhandled cases.
6184 (strip_mine_profitable_p): Print the loop number, not its depth.
6185 (is_interchange_valid): Pass the depth of the loop nest, don't
6186 recompute it wrongly.
6187 (graphite_trans_bb_block): Same.
6188 (graphite_trans_bb_block): Print tentative of loop blocking.
6189 (graphite_trans_scop_block): Do not print that the loop has been
6191 (graphite_transform_loops): Do not handle scops that contain condition
6194 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
6196 * gcc.dg/graphite/block-0.c: Update test.
6197 * gcc.dg/graphite/block-1.c: Same.
6198 * gcc.dg/graphite/block-2.c: Remove xfail and test for
6200 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
6201 * gcc.dg/graphite/block-3.c: New.
6202 * gcc.dg/graphite/pr38498.c: New.
6204 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
6206 PR tree-optimization/38510
6207 * gcc.dg/graphite/pr38510.c: New.
6208 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
6209 (translate_clast): Call recompute_all_dominators before
6211 (gloog): Call recompute_all_dominators before graphite_verify.
6213 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
6215 PR tree-optimization/38492
6216 * graphite.c (rename_map_elt, debug_rename_elt,
6217 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
6218 rename_map_elt_info, eq_rename_map_elts,
6219 get_new_name_from_old_name, bb_in_sese_p): Moved around.
6220 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
6221 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
6222 (sese_build_livein_liveouts): New.
6223 (new_sese, free_sese): New.
6224 (new_scop): Call new_sese.
6225 (free_scop): Call free_sese.
6226 (rename_variables_from_edge, rename_phis_end_scop): Removed.
6227 (register_old_new_names): Renamed register_old_and_new_names.
6228 (register_scop_liveout_renames, add_loop_exit_phis,
6229 insert_loop_close_phis, struct igp,
6230 default_liveout_before_guard, add_guard_exit_phis,
6231 insert_guard_phis, copy_renames): New.
6232 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
6233 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
6234 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
6235 (scop_adjust_phis_for_liveouts): New.
6236 (gloog): Call scop_adjust_phis_for_liveouts.
6238 * graphite.h (struct sese): Documented. Added fields liveout,
6240 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
6241 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
6242 (struct scop): Added field liveout_renames.
6243 (SCOP_LIVEOUT_RENAMES): New.
6245 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6247 PR tree-optimization/38409
6248 * gcc.dg/graphite/pr38409.c: New.
6249 * graphite.c (nb_reductions_in_loop): Use simple_iv.
6251 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6253 * graphite.c (gcc_type_for_cloog_iv): By default return
6255 (graphite_create_new_loop): Don't fold_convert the already
6256 fold_convert-ed expression.
6258 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
6260 PR tree-optimization/38446
6261 * gcc.dg/graphite/pr38446.c: New.
6262 * graphite.c (register_bb_in_sese): New.
6263 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6264 looking at the bbs in the region.
6265 * graphite.h (sese): Add region_basic_blocks pointer set to
6266 structure and initialize at the time of defining new scop.
6268 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
6270 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6271 (find_params_in_bb): Do not free data refs.
6272 (free_graphite_bb): Add FIXME on disabled free_data_refs.
6274 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6276 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6277 * gcc.dg/graphite/scop-17.c: Same.
6278 * gcc.dg/graphite/block-5.c: New.
6279 * gcc.dg/graphite/block-6.c: New.
6280 * gcc.dg/graphite/pr37485.c: Clean dump file after.
6281 * gcc.dg/graphite/pr37684.c: Same.
6282 * gcc.dg/graphite/block-2.c: Same.
6284 * graphite.c (struct ivtype_map_elt): New.
6285 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6286 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6287 gcc_type_for_cloog_iv): New.
6288 (loop_iv_stack_patch_for_consts): Use the type of the induction
6289 variable from the original loop, except for the automatically
6290 generated loops, i.e., in the case of a strip-mined loop, in
6291 which case there is no original loop: in that case just use
6293 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6294 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6295 (clast_name_to_gcc): Accept params to be NULL.
6296 (clast_to_gcc_expression): Take an extra parameter for the type.
6297 Convert to that type all the expressions built by this function.
6298 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6299 (graphite_translate_clast_equation): Compute the type of the
6300 clast_equation before translating its LHS and RHS.
6301 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6302 (graphite_create_new_loop): Compute the type of the induction
6303 variable before translating the lower and upper bounds and before
6304 creating the induction variable.
6305 (rename_variables_from_edge, rename_phis_end_scop): New.
6306 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6307 (sese_add_exit_phis_edge): Do not use integer_zero_node.
6308 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6309 compute_cloog_iv_types): New.
6310 (gloog): Call compute_cloog_iv_types before starting the
6311 translation of the clast.
6313 * graphite.h (struct graphite_bb): New field cloog_iv_types.
6314 (GBB_CLOOG_IV_TYPES): New.
6315 (debug_ivtype_map): Declared.
6316 (oldiv_for_loop): New.
6318 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
6321 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6322 (param_index): Assert if parameter is not know after parameter
6324 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6325 (find_scop_parameters): Mark, that we have finished parameter
6327 (graphite_transform_loops): Move condition detection before parameter
6329 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6330 * gfortran.dg/graphite/pr38459.f90: New.
6332 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6334 * graphite.c (graphite_transform_loops): Always call find_transform ()
6335 in ENABLE_CHECKING. So we test these code paths, even if we do not
6338 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6340 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6341 (print_scop): Ditto.
6343 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
6346 Fix gfortran.dg/graphite/id-3.f90.
6347 * graphite.c (scopdet_basic_block_info): Fix bug that found some
6348 regions more than once.
6350 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6352 Fix gfortran.dg/graphite/id-4.f90.
6353 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6356 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6358 Fix gfortran.dg/graphite/id-1.f90.
6359 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6360 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6361 (max_precision_type): New.
6362 (value_clast): Removed.
6363 (clast_to_gcc_expression): Be more careful to types of expressions.
6364 Use max_precision_type and update use of gmp_cst_to_tree.
6365 (graphite_translate_clast_equation): Use max_precision_type.
6366 (graphite_create_guard_cond_expr): Do not use integer_type_node,
6367 use the type of the condition.
6368 (graphite_create_new_loop): Do not use integer_type_node, use the
6369 max_precision_type of lb and ub.
6371 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6373 * graphite.c (build_scops_1): Initialize open_scop.exit
6376 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6378 * gcc.dg/graphite/pr38084.c: New.
6379 * gfortran.dg/graphite/id-1.f90: New.
6380 * gfortran.dg/graphite/id-2.f90: New.
6381 * gfortran.dg/graphite/id-3.f90: New.
6382 * gfortran.dg/graphite/id-4.f90: New.
6383 * gfortran.dg/graphite/pr37857.f90: New.
6385 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6386 Jan Sjodin <jan.sjodin@amd.com>
6387 Harsha Jagasia <harsha.jagasia@amd.com>
6399 * gcc.dg/graphite/pr38073.c: New.
6400 * gcc.dg/graphite/pr37928.c: New.
6401 * gcc.dg/graphite/pr37883.c: New.
6402 * gcc.dg/graphite/pr38125.c: New.
6403 * gfortran.dg/graphite/pr38083.f90: New.
6404 * gfortran.dg/graphite/pr37852.f90: New.
6405 * gfortran.dg/graphite/pr37980.f90: New.
6407 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6408 the number of detected scops. Copy exact same test for loop
6410 * gcc.dg/graphite/block-1.c: Fix the number of expected
6411 loops to be blocked as reductions are not handled.
6412 * gcc.dg/graphite/block-4.c: ...here. New.
6414 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6415 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6417 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6418 * Makefile.in (graphite.o): Depend on value-prof.h.
6419 (graphite.o-warn): Removed -Wno-error.
6420 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6421 to be a NULL pointer. Call update_stmt. Return the newly created
6422 cannonical induction variable.
6424 * graphite.h (debug_rename_map): Declared. Fix some comments.
6426 * graphite.c: Reimplement the code generation from graphite to gimple.
6427 Include value-prof.h.
6428 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6429 (get_old_iv_from_ssa_name): Removed.
6430 (graphite_stmt_p): New.
6431 (new_graphite_bb): Test for useful statements before building a
6432 graphite statement for the basic block.
6433 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6434 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6436 (recompute_all_dominators, graphite_verify,
6437 nb_reductions_in_loop, graphite_loop_normal_form): New.
6438 (scop_record_loop): Call graphite_loop_normal_form.
6439 (build_scop_loop_nests): Iterate over all the blocks of the
6440 function instead of relying on the incomplete information from
6441 SCOP_BBS. Return the success of the operation.
6442 (find_params_in_bb): Use the data from GBB_DATA_REFS.
6443 (add_bb_domains): Removed.
6444 (build_loop_iteration_domains): Don't call add_bb_domains.
6445 Add the iteration domain only to the basic blocks that have been
6446 translated to graphite.
6447 (build_scop_conditions_1): Add constraints only if the basic
6448 block have been translated to graphite.
6449 (build_scop_data_accesses): Completely disabled until data
6450 dependence is correctly implemented.
6451 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6452 (remove_all_edges_1, remove_all_edges): Removed.
6453 (get_new_name_from_old_name): New.
6454 (graphite_rename_variables_in_stmt): Renamed
6455 rename_variables_in_stmt. Call get_new_name_from_old_name.
6456 Use replace_exp and update_stmt.
6457 (is_old_iv): Renamed is_iv.
6458 (expand_scalar_variables_stmt): Extra parameter for renaming map.
6459 Use replace_exp and update_stmt.
6460 (expand_scalar_variables_expr): Same. Use the map to get the
6461 new names for the renaming of induction variables and for the
6462 renaming of variables after a basic block has been copied.
6463 (expand_scalar_variables): Same.
6464 (graphite_rename_variables): Renamed rename_variables.
6465 (move_phi_nodes): Removed.
6466 (get_false_edge_from_guard_bb): New.
6467 (build_iv_mapping): Do not insert the induction variable of a
6468 loop in the renaming iv map if the basic block does not belong
6470 (register_old_new_names, graphite_copy_stmts_from_block,
6471 copy_bb_and_scalar_dependences): New.
6472 (translate_clast): Heavily reimplemented: copy basic blocks,
6473 do not move them. Finally, in call cleanup_tree_cfg in gloog.
6474 At each translation step call graphite_verify ensuring the
6475 consistency of the SSA, loops and dominators information.
6476 (collect_virtual_phis, find_vdef_for_var_in_bb,
6477 find_vdef_for_var_1, find_vdef_for_var,
6478 patch_phis_for_virtual_defs): Removed huge hack.
6479 (mark_old_loops, remove_dead_loops, skip_phi_defs,
6480 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6481 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6482 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6483 if_region_get_condition_block, if_region_set_false_region,
6484 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6485 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6486 sese_add_exit_phis_edge, sese_add_exit_phis_var,
6487 rewrite_into_sese_closed_ssa): New.
6488 (gloog): Remove dead code. Early return if code cannot be
6489 generated. Call cleanup_tree_cfg once the scop has been code
6491 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6492 block loops with less than two loops.
6493 (graphite_apply_transformations): Remove the call to
6494 scop_remove_ignoreable_gbbs.
6495 (limit_scops): When build_scop_loop_nests fails, continue on
6496 the next scop. Fix open_scop.entry.
6497 (graphite_transform_loops): Call recompute_all_dominators: force the
6498 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6499 Call initialize_original_copy_tables and free_original_copy_tables
6500 to be able to copy basic blocks during code generation.
6501 When build_scop_loop_nests fails, continue on next scop.
6502 (value_clast): New union.
6503 (clast_to_gcc_expression): Fix type cast warning.
6505 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
6507 * Merge from mainline (r140838:141727).
6509 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6513 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6515 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6519 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6520 exits and conditions.
6521 * gcc.dg/graphite/pr37943.c: New.
6523 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6526 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6528 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6530 * doc/invoke.texi: Fix spaces.
6532 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
6534 PR tree-optimization/37891
6535 Reverted last commit.
6536 * graphite.c (create_single_entry_edge): Set
6537 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6539 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
6540 Mitul Thakkar <mitul.thakkar@amd.com>
6542 * graphite.c (create_single_entry_edge): Set
6543 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6545 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6547 * doc/invoke.texi: Add -fgraphite-identity.
6548 * graphite.c (graphite_apply_transformations): Check for
6549 -fgraphite-identity.
6550 * toplev.c (process_options): Add flag_graphite_identity.
6551 * tree-ssa-loop.c: Add flag_graphite_identity.
6553 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6555 Undo changes from 2008-10-02:
6556 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6557 operand type when copying the operand to a variable of different type.
6558 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6559 with the IV name after increment.
6561 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6562 Harsha Jagasia <harsha.jagasia@amd.com>
6564 PR tree-optimization/37828
6565 * gcc.dg/graphite/pr37828.c: New.
6566 * graphite.c (graphite_trans_loop_block): Do not loop block
6567 single nested loops.
6569 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6570 Sebastian Pop <sebastian.pop@amd.com>
6572 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6573 rename_map_elt_info, eq_rename_map_elts): New.
6574 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6575 (expand_scalar_variables_expr): Change parameters.
6576 (expand_scalar_variables_stmt): Same.
6577 (expand_scalar_variables): Same.
6578 (graphite_rename_ivs): Rename graphite_rename_variables.
6579 (build_iv_mapping): New.
6580 (translate_clast): Call build_iv_mapping.
6581 * graphite.h (gbb_p): New name.
6583 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6585 PR tree-optimization/37684
6586 * gcc.dg/graphite/pr37684.c: New.
6587 * graphite.c (exclude_component_ref): New.
6588 (is_simple_operand): Call exclude_component_ref.
6590 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6591 Harsha Jagasia <harsha.jagasia@amd.com>
6593 PR tree-optimization/37485
6594 * gcc.dg/graphite/block-2.c: New
6595 * graphite.c (gmp_cst_to_tree): Moved.
6596 (iv_stack_entry_is_constant): New.
6597 (iv_stack_entry_is_iv): New.
6598 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6599 (loop_iv_stack_insert_constant): New.
6600 (loop_iv_stack_pop): Use new datatpype.
6601 (loop_iv_stack_get_iv): Same.
6602 (loop_iv_stack_get_iv_from_name): Same.
6603 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6604 (loop_iv_stack_patch_for_consts): New.
6605 (loop_iv_stack_remove_constants): New.
6606 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6607 (translate_clast): Call loop_iv_stack_patch_for_consts and
6608 loop_iv_stack_remove_constants.
6609 (gloog): Use new datatype. Redirect construction edge to end
6610 block to avoid accidental deletion.
6611 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6613 (union iv_stack_entry_data): New. Data in iv stack entry.
6614 (struct iv_stack_entry): New. Datatype for iv stack entries.
6616 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6618 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6619 operand type when copying the operand to a variable of different type.
6621 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6623 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6624 with the IV name after increment.
6626 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6628 * Merge from mainline (r140164:140838).
6630 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6632 * graphite-data-ref.c: New.
6633 * graphite.c (print_scop): Also dump the dependence graph.
6634 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6635 (new_scop): Initialize SCOP_DEP_GRAPH.
6636 (build_scop_dynamic_schedules): New.
6637 (build_access_matrix_with_af): Fixed column numbering.
6638 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6639 * graphite.h: Add ifndef/define guards against multiple inclusion.
6640 (struct scop): Add dep_graph field.
6641 (SCOP_DEP_GRAPH): Defined.
6642 (ref_nb_loops): Fixed and moved to other position.
6643 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6644 (nb_loops_around_loop_in_scop): New.
6645 (graphite_dump_dependence_graph): Declared.
6646 (graphite_build_rdg_all_levels): Declared.
6647 (graphite_test_dependence): Declared.
6648 * Makefile.in (graphite-data-ref.o): New target.
6650 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6652 * Merge from mainline (139870:140164).
6654 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6656 * Merge from mainline (138275:139870).
6657 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6658 the commits from trunk broke the niter detection.
6660 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6662 * graphite.c: Add more documentation. Fix formatting.
6663 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6664 loop_iv_stack_debug): Moved...
6665 (schedule_to_scattering): Move before use.
6666 (dot_all_scops): Include in "#if 0" the code for system
6669 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6670 loop_iv_stack_debug): ...here.
6672 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6674 * tree-phinodes.c (make_phi_node): Extern.
6675 (add_phi_node_to_bb): New.
6676 (create_phi_node): Call add_phi_node_to_bb.
6677 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6678 (remove_statement): Handle case where stored phi was updated
6679 and is no longer the same.
6680 * graphite.c (is_parameter): New.
6682 (expand_scalar_variables_expr): New.
6683 (expand_scalar_variables_stmt): New.
6684 (expand_scalar_variables): New.
6685 (move_phi_nodes): Create new phi instead of moving old one.
6686 (translate_clast): Call expand_scalar_variables.
6687 (find_vdef_for_var_in_bb): Also scan regular definitions.
6688 (skip_phi_defs): New.
6689 (collect_scop_exit_phi_args): New.
6690 (patch_scop_exit_phi_args): New.
6691 (gloog): Patch phis after scop.
6692 * tree-flow.h: (add_phi_node_to_bb): Declared.
6693 (make_phi_node): Declared.
6695 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6697 * graphite.c (end_scop): Split the entry of the scop when it
6698 is the header of the loop in which the scop is ending.
6699 (build_scops_1, limit_scops): Update uses of end_scop.
6701 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6703 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6704 SCOP_ENTRY or SCOP_EXIT.
6706 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6708 * graphite.c (get_construction_edge): Removed.
6709 (gloog): Construction edge is the scop entry edge.
6711 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6713 * graphite.c (can_generate_for_scop): Removed.
6714 (gloog): Do not call it.
6716 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6718 * graphite.c (new_scop): Entry of a scop is an edge.
6719 Initialize SESE region.
6720 (free_scop): Free SESE region.
6721 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6722 (split_difficult_bb): New, split from end_scop.
6723 (end_scop): Exit of a scop is an edge.
6724 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6725 not automatically updated and thus is always wrong.
6726 * graphite.h (struct sese): New.
6729 (struct scop): New field for a SESE region. Remove entry, exit.
6730 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6731 semantics as before. Moved comment around.
6733 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6734 Sebastian Pop <sebastian.pop@amd.com>
6736 * graphite.c (graphite_transform_loops): Always enable gloog
6737 and find_transform when ENABLE_CHECKING.
6739 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6741 * graphite.c (graphite_transform_loops): Move pretty printer
6742 of SCOPs before doing any transform. Remove call to print_scops
6743 and dot_all_scops_1.
6745 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6747 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6748 (print_graphite_bb): Same.
6750 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6752 * graphite.c (dot_all_scops_1): Cleanup.
6753 (move_scops): Fix comment.
6755 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6757 * graphite.c (build_scop_bbs): Revert commit 139355:
6759 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6760 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6762 * graphite.c (build_scop_bbs): Factor up code.
6764 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6766 * graphite.c (gloog): Update dominator info.
6768 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6770 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6772 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6774 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6776 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6777 (translate_clast): Correct formatting.
6778 * graphite.h (struct num_map): Removed.
6779 (struct graphite_bb): Remove num_map field.
6780 (GBB_INDEX_TO_NUM_MAP): Removed.
6782 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6784 * graphite.c (build_access_matrix_with_af): Fix comments.
6785 (build_scop_data_accesses): Same.
6787 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6789 * graphite.c (build_scop_data_accesses): Don't construct
6790 access matrices. Add a FIXME and an assert condition that
6791 should pass when the access matrices will be needed.
6793 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6795 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6797 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6798 Moved close by free_graphite_bb.
6799 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6800 (new_scop): Move close by free_scop.
6801 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6803 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6805 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6806 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6807 instead of recursive call.
6808 (graphite_translate_clast_equation): New.
6809 (graphite_create_guard_cond_expr): New.
6810 (graphite_create_new_guard): New.
6811 (get_stack_index_from_iv): Removed.
6812 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6813 (get_true_edge_from_guard_bb): New.
6814 (translate_clast): Handle stmt_guard in clast.
6815 (get_construction_edge): Allow construction edge detection for
6816 a scope entry with multiple predecessors if one predecessor is
6817 the immediate dominator of scope entry.
6818 (can_generate_code_stmt): Enable code generation for clast_guard.
6819 (gloog): Use correct context loop. Removed check for post dominators.
6820 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6822 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6824 * graphite.c (remove_dead_loops): Document better which
6827 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6829 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6831 (graphite.o): Also depends on pointer-set.h.
6833 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6835 * graphite.c (scop_record_loop): Fix compile warning.
6837 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6838 Sebastian Pop <sebastian.pop@amd.com>
6840 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6842 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6844 * graphite.c (build_graphite_bb): Initialize bb->aux to
6845 point to the graphite_bb_p.
6846 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6848 (add_bb_domains): Does not use the scop parameter.
6849 (graphite_transform_loops): Clean bb->aux at the end.
6851 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6852 Sebastian Pop <sebastian.pop@amd.com>
6854 * lib/target-supports.exp
6855 (check_effective_target_fgraphite): New.
6857 * gcc.dg/graphite/graphite.exp: Early exit when
6858 check_effective_target_fgraphite returns false.
6859 Set dg-do-what-default to compile.
6860 (scan-graphite-dump-times): Removed.
6861 * gfortran.dg/graphite/graphite.exp: Same.
6863 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6864 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6865 * gcc.dg/graphite/scop-1.c: Same.
6866 * gcc.dg/graphite/scop-2.c: Same.
6867 * gcc.dg/graphite/scop-3.c: Same.
6868 * gcc.dg/graphite/scop-4.c: Same.
6869 * gcc.dg/graphite/scop-5.c: Same.
6870 * gcc.dg/graphite/scop-6.c: Same.
6871 * gcc.dg/graphite/scop-7.c: Same.
6872 * gcc.dg/graphite/scop-8.c: Same.
6873 * gcc.dg/graphite/scop-9.c: Same.
6874 * gcc.dg/graphite/scop-10.c: Same.
6875 * gcc.dg/graphite/scop-11.c: Same.
6876 * gcc.dg/graphite/scop-12.c: Same.
6877 * gcc.dg/graphite/scop-13.c: Same.
6878 * gcc.dg/graphite/scop-matmult.c: Same.
6879 * gcc.dg/graphite/scop-14.c: Same.
6880 * gcc.dg/graphite/scop-15.c: Same.
6881 * gcc.dg/graphite/block-0.c: Same.
6882 * gcc.dg/graphite/scop-16.c: Same.
6883 * gcc.dg/graphite/block-1.c: Same.
6884 * gcc.dg/graphite/scop-17.c: Same.
6885 * gcc.dg/graphite/scop-18.c: Same.
6886 * gfortran.dg/graphite/block-1.f90: Same.
6887 * gfortran.dg/graphite/scop-1.f: Same.
6888 * gfortran.dg/graphite/block-2.f: Same.
6890 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6892 * graphite.c: Fix some XXX comments.
6893 (build_scop_dynamic_schedules): Removed.
6895 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6897 * graphite.h (scop_max_loop_depth): Moved...
6898 * graphite.c (scop_max_loop_depth): ...here.
6899 (remove_all_edges_1): New.
6900 (remove_all_edges): Factored code.
6901 (remove_cond_exprs): Check only the last statement for
6902 a GIMPLE_COND expression.
6904 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6906 * graphite.c (scan_tree_for_params): Early return when the
6907 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6908 (find_scop_parameters): Factor out code.
6909 (graphite_trans_bb_strip_mine): Remove dead code.
6911 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6913 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6914 graphite_trans_bb_move_loop): Factor asserts.
6915 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6916 Do not call calculate_dominance_info and estimate_bb_frequencies.
6918 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6920 * graphite.c (create_loops_mapping, free_loops_mapping,
6921 create_loops_mapping_num, debug_loop_mapping_1,
6922 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6923 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6924 graphite_loops_mapping_add_child_num,
6925 graphite_loops_mapping_insert_child,
6926 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6927 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6928 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6929 create_num_from_index, get_num_from_index,
6930 swap_loop_mapped_depth): Removed.
6931 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6932 (free_scop): Do not call free_loops_mapping.
6933 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6934 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6935 get_loop_mapped_depth.
6936 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6937 (graphite_trans_bb_strip_mine): Same.
6938 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6939 (struct scop): Remove field loops_mapping.
6941 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6942 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6944 * graphite.c (scop_record_loop): Factor out one level of the
6945 condition by early return.
6946 (build_scop_loop_nests): Format following FSF coding style.
6947 (build_scop_dynamic_schedules): Factor out code.
6948 (scopdet_bb_info): Reindent. Default case should not be reachable.
6950 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6951 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6953 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6954 assignments that are not handled as simple operands for now.
6956 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6957 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6959 * graphite.c (build_scop_bbs): Factor up code.
6961 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6962 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6964 * graphite.c (stmt_simple_for_scop_p): Factor code out
6966 (enum gbb_type): New. Group all the GBB_* types under it.
6967 (is_loop_exit): Moved...
6968 (end_scop): Enable BB spliting.
6969 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6970 * cfgloop.h (is_loop_exit): Declared.
6972 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6974 * doc/invoke.texi: Remove strides from examples containing
6975 DO loops when the strides are equal to 1.
6977 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6978 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6980 * graphite.c (graphite_trans_scop_block): Or the result with
6981 the result from graphite_trans_loop_block.
6982 * gcc.dg/graphite/block-1.c: New.
6983 * gfortran.dg/graphite/block-1.f90: New.
6984 * gfortran.dg/graphite/block-2.f: New.
6986 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6988 * graphite.c (graphite_transform_loops): Call cloog_initialize
6991 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6993 * tree-data-ref.c) (stmt_simple_memref_p): New.
6994 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6995 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6996 (is_simple_operand): Call stmt_simple_memref_p.
6998 * gcc.dg/graphite/scop-matmult.c: Updated for not
6999 using pointer arithmetic, as this is optimized by PRE and
7000 makes the code too difficult to analyze.
7002 * gcc.dg/graphite/scop-18.c: Same.
7004 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7006 * gdbinit.in (pgg): New.
7008 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7010 * graphite.c (graphite_trans_loop_block): Fix warning.
7012 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7014 * graphite.c (graphite_trans_loop_block): Fix my merge error.
7016 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7018 * graphite.c (graphite_trans_bb_block): Remove check for
7019 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
7020 Check if loop blocking is profitable for every loop, before applying
7022 (graphite_apply_transformations): Call graphite_trans_bb_block only,
7023 if flag_loop_block is set.
7025 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7027 * graphite.c: Add some more documentation for the loop
7030 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7032 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
7033 * graphite.c: Format on less than 80 columns.
7036 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7038 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
7040 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7042 * doc/invoke.texi (floop-block, floop-strip-mine,
7043 floop-interchange): Update documentation with examples.
7045 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
7047 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
7049 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
7051 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
7053 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
7054 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
7055 * tree-scalar-evolution.c: Revert useless changes.
7056 * tree-phinodes.c: Same.
7059 * tree-vectorizer.h: Same.
7060 * tree-flow.h: Same.
7062 * common.opt (fgraphite): Update documentation.
7064 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
7066 * doc/invoke.texi (-floop-block, -floop-strip-mine,
7067 -floop-interchange): Add more text for explaining what each of these
7069 * tree-into-ssa.c (gimple_vec): Moved to...
7070 * graphite.c: Include gimple.h.
7071 (gimple_vec): Moved to...
7072 (del_loop_to_cloog_loop): Removed.
7073 (loop_affine_expr): Do not call create_data_ref when the
7074 operand is a constant.
7075 (new_scop): Use free instead of del_loop_to_cloog_loop.
7076 * Makefile.in (graphite.o): Depend on GIMPLE_H.
7077 * gimple.h (gimple_vec): ... here.
7079 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7081 * graphite.c (scopdet_bb_info): Only allow loops with known number of
7083 (build_loop_iteration_domains): Fail, if latch executions unknown.
7085 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7087 * graphite.c (add_conditions_to_domain): New.
7088 (build_scop_conditions_1): Call add_conditions_to_domain.
7089 (set_cloog_options): Allow to disable optimizations.
7091 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7093 * graphite.c (find_params_in_bb): Look for parameters in conditions.
7094 Do not use walk_dominator_tree.
7095 (find_scop_parameters): Do not use walk_dominator_tree.
7097 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7099 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
7100 (idx_record_params): Adapt.
7101 * graphite.h (scop_gimple_loop_depth): New.
7103 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7105 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
7106 (scan_tree_for_params): Remove value_init.
7107 (build_scop_context): Remove value_init.
7108 (build_loop_iteration_domains): Remove value_init.
7109 (schedule_to_scattering): Remove value_init.
7110 (graphite_trans_bb_strip_mine): Remove value_init.
7112 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7114 * gcc/graphite.c (limit_scops): New.
7115 (graphite_transform_loops): Add limit SCoPs.
7116 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
7117 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
7118 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
7119 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
7120 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
7121 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
7122 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
7123 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
7124 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
7125 Change loop numbers.
7126 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
7127 Change loop numbers.
7128 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
7129 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
7130 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
7131 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
7132 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
7133 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
7134 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
7135 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
7136 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
7137 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
7139 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7141 * graphite.c (graphite_transform_loops): Call always find_transform.
7143 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
7145 * graphite.c (free_loops_mapping): New.
7146 (stmt_simple_for_scop_p): Fix typo.
7147 (stmt_simple_for_scop_p): Fix tuples functions, that
7149 (free_graphite_bb): Fix some memleaks.
7150 (free_scop): Fix some memleaks.
7151 (scopdet_bb_info): Do not forget some tmp SCoPs.
7152 (find_params_in_bb): Fix some memleaks.
7153 (clast_to_gcc_expression): Fix warning.
7155 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
7157 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
7158 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
7160 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7162 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
7163 Move code ifdef-ed HAVE_cloog...
7164 * graphite.c: Include toplev.h.
7166 * Makefile.in (OBJS-common): Always build graphite.o.
7167 (BACKEND): Remove @GRAPHITE@.
7168 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
7169 (graphite.o): Depend on TOPLEV_H.
7171 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7173 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
7174 Remove typo left from polylib to ppl conversion.
7175 * graphite.c (graphite_transforms): Use sorry instead of fatal.
7177 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7179 * toplev.c (process_options): Move the graphite loop optimization
7181 * tree-ssa-loop.c (graphite_transforms): ... here.
7182 When not configured with CLooG, print to dump_file that
7183 Graphite transforms were not performed.
7184 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
7186 * gcc.dg/graphite/*.c: Updated all testcases to use
7187 scan-graphite-dump-times.
7189 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7191 * graphite.c (dot_scop, dot_all_scops): Do not call system.
7192 Do not open /tmp/scop.dot and /tmp/allscops.dot.
7194 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
7195 Jan Sjodin <jan.sjodin@amd.com>
7197 * configure: Regenerated.
7198 * omp-low.c (expand_omp_sections): Remove now unused code.
7199 * config.in (HAVE_polylib): Removed.
7200 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
7201 (PPLLIBS, PPLINC): Added.
7202 * graphite.c: Replace unsigned with int wherever possible.
7203 Don't access Cloog's data structures, but use accessor functions.
7204 Clast's stmt->type is now implemented as a vtable: change the
7205 switches of stmt->type into ifs.
7206 (polylib/polylibgmp.h): Don't include.
7207 (initialize_dependence_polyhedron,
7208 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7209 statement_precedes_p, test_dependence, build_rdg_all_levels,
7210 dump_dependence_graph): Removed until this code is cleaned up
7212 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
7213 (POLYLIBINC): Renamed PPLINC.
7215 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
7216 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7217 Jan Sjodin <jan.sjodin@amd.com>
7219 Finish the merge and tuplification of graphite.
7221 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7222 Jan Sjodin <jan.sjodin@amd.com>
7224 Partial merge from mainline (138072:138275).
7225 * graphite.c still has to be tuplified.
7227 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
7229 * graphite.c (graphite_loops_mapping_max_loop_num): New.
7230 (create_num_from_index): New.
7231 (get_num_from_index): Also pass in the graphite BB.
7232 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
7233 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
7234 (graphite_trans_bb_strip_mine): Call create_num_from_index.
7235 (is_interchange_valid): Return false when failing.
7236 * graphite.h (struct num_map): New.
7237 (struct graphite_bb): New field num_map.
7238 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
7240 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
7242 * graphite.c (dump_gbb_conditions): Print also conditions like
7243 "if (a)". Remove dublicated code and use print_generic_expr ().
7244 (stmt_simple_for_scop_p): Only allow conditions we can handle
7247 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7249 * graphite.h (struct scop): Removed new_ivs field.
7250 (SCOP_NEWIVS): Deleted.
7251 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7252 clast_to_gcc_expression, graphite_create_new_loop):
7253 Removed use of new_ivs.
7255 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7257 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7258 create_loops_mapping_num, debug_loop_mapping_1): New.
7259 (debug_loop_mapping): Call debug_loop_mapping_1.
7260 (get_loop_mapping_for_num,
7261 graphite_loops_mapping_add_child,
7262 graphite_loops_mapping_add_child_num,
7263 graphite_loops_mapping_insert_child,
7264 graphite_loops_mapping_parent,
7265 split_loop_mapped_depth_for_num,
7266 loop_mapped_depth_split_loop): New.
7267 (increment_loop_mapped_depths): Removed.
7268 (swap_loop_mapped_depth_for_num): Reimplemented.
7269 (new_scop): Call create_loops_mapping.
7270 (scop_record_loop): Call graphite_loops_mapping_insert_child.
7271 (translate_clast): Pass the old loop father in parameter, and pass
7272 it to get_old_iv_from_ssa_name.
7273 (remove_edges_around_useless_blocks, can_generate_code_stmt,
7274 can_generate_code, can_generate_for_scop): New.
7275 (graphite_trans_bb_block): Returns false when it fails to transform.
7276 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7278 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7280 Reverted all the changes related to the streamization and
7282 These changes are now tracked in the streamization branch.
7284 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7285 Jan Sjodin <jan.sjodin@amd.com>
7287 * graphite.c (gbb_compare): Correctly constify.
7288 (gbb_can_be_ignored): Indent.
7289 (graphite_trans_scop_swap_1and2): Add legality check.
7292 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7294 Remove fallouts from "Reverted the Condate changes".
7295 * tree.h: Remove unused decl.
7296 * gcc.dg/tree-checker: Same.
7297 * timevar.def: Remove counter.
7299 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7301 * Merge from mainline (135673:138072).
7303 Reverted the MIRO changes (from 2008-04-05) that are now
7304 tracked in the miro branch.
7305 * tree-bounds.c: Removed.
7306 * tree-bounds.h: Removed.
7308 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7309 are now tracked in the condate branch.
7310 * tree-check.c: Removed.
7311 * tree-match.c: Removed.
7312 * condate.y: Removed.
7314 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7316 * common.opt: New user flag -floop-block, -floop-strip-mine
7317 and -floop-interchange.
7318 * toplev.c (process_options): Enable -fgraphite pass if any one of the
7319 graphite loop optimization flags is turned on.
7320 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7321 flag_loop_strip_mine and flag_loop_interchange checks before
7323 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7324 -floop-strip-mine and -floop-interchange.
7325 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7327 * gcc.dg/graphite/scop-16.c: Ditto.
7328 * gcc.dg/graphite/scop-17.c: Ditto.
7329 * gcc.dg/graphite/scop-18.c: Ditto.
7331 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
7332 Sebastian Pop <sebastian.pop@amd.com>
7334 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7335 (create_empty_loop_on_edge): More fixes.
7336 * tree-phinodes.c (resize_phi_node): Extern.
7337 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7338 * cfghooks.c (update_dominator_information): New split from
7340 * tree-vectorizer.c (rename_variables_in_bb): Extern.
7341 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7342 successor of the function entry block.
7344 * graphite.c: Include pointer-set.h.
7345 (debug_loop_mapping, increment_loop_mapped_depths,
7346 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7347 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7348 swap_loop_mapped_depth_for_num, get_num_from_index,
7349 swap_loop_mapped_depth, loop_iv_stack_debug,
7350 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7351 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7352 get_old_iv_from_ssa_name): New.
7353 (new_scop): Initialize SCOP_LOOPS_MAPPING.
7354 (free_scop): Free SCOP_LOOPS_MAPPING.
7355 (scop_record_loop): Record old ivs.
7356 (create_var_name): Removed.
7357 (initialize_cloog_names): Allocate double space in case strip mine
7358 applies to all loops once.
7359 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7360 (clast_to_gcc_expression): Same. Implement more clast to gimple
7362 (graphite_create_new_loop): Pass in ivstack.
7363 (remove_all_edges): Pass in the construction_edge.
7364 (graphite_remove_iv): Removed.
7365 (graphite_rename_ivs, graphite_rename_ivs_stmt,
7366 remove_cond_exprs): Rewritten.
7367 (move_phi_nodes): New.
7368 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7369 (translate_clast): Pass in ivstack. Rewrite some cases.
7370 (set_cloog_options, debug_clast_stmt): New.
7371 (find_transform): Use set_cloog_options.
7372 (outermost_loop_layer): Removed.
7373 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7374 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7375 mark_old_loops, remove_dead_loops): New.
7377 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7378 (const_column_index, get_first_matching_sign_row_index,
7379 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7380 get_upper_bound): New.
7381 (graphite_trans_bb_strip_mine): Also update the iv map.
7383 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7384 (struct name_tree): Add a loop field.
7385 (struct scop): Add a graphite_loops_mapping field.
7386 (SCOP_LOOPS_MAPPING): New.
7387 (debug_clast_stmt): Declare.
7388 * lambda.h (find_induction_var_from_exit_cond): Declare.
7389 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7390 * cfgloop.h (update_dominators_in_loop): Removed declaration.
7391 (create_empty_loop_on_edge): Updated.
7392 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7393 rename_variables_in_bb): Declare.
7394 * tree-cfg.c (remove_bb): Extern.
7396 * gcc.dg/graphite/block-0.c: New.
7398 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7399 Sebastian Pop <sebastian.pop@amd.com>
7401 * graphite.c (strip_mine_profitable_p): New.
7402 (graphite_trans_bb_block): Disable strip mining if not profitable.
7404 * gcc.dg/graphite/scop-18.c: New.
7405 * gcc.dg/graphite/scop-17.c: Fixed.
7406 * gcc.dg/graphite/scop-16.c: Fixed.
7408 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
7409 Jan Sjodin <jan.sjodin@amd.com>
7410 Sebastian Pop <sebastian.pop@amd.com>
7412 * graphite.c (is_interchange_valid): New.
7413 (graphite_trans_bb_block): Check loop nest of basic block for legality
7416 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7417 outer_most_loop, gbb_outer_most_loop_index): New.
7419 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7420 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7421 * gcc.dg/graphite/scop-16.c: New.
7422 * gcc.dg/graphite/scop-17.c: New.
7424 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7426 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7427 (graphite_trans_scop_block): Ignore SCoPs without bbs.
7429 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7431 * graphite.c (new_scop): Initialize SCOP_EXIT.
7432 (scopdet_info): Add.
7433 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7434 (build_scops_1): Cleanup, bugfixes.
7435 (build_scops): Cleanup.
7437 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7438 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7440 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7442 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7444 * gfortran.dg/graphite/graphite.exp: Use
7445 DEFAULT_GRAPHITE_FLAGS.
7447 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7449 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7451 * graphite.c (scan_tree_for_params): Do not assert any more if
7452 MULT_EXPR parameter is negative.
7454 * gfortran.dg/graphite/scop-1.f: New.
7456 * gfortran.dg/graphite/graphite.exp: New.
7458 * gcc.dg/graphite/scop-15.c: New.
7460 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7462 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7464 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7466 * graphite.c (graphite_trans_bb_swap_loops): Rename from
7467 graphite_swap_loops.
7468 (graphite_trans_bb_move_loop): New.
7469 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7470 (graphite_trans_bb_block): New.
7471 (graphite_trans_loop_block): New.
7472 (graphite_trans_scop_swap_1and2): Rename from
7473 graphite_trans_swap_1and2.
7474 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7475 (graphite_trans_scop_block): New.
7476 (graphite_apply_transformations): Rename from
7477 graphite_transformations.
7479 * gcc.dg/graphite/scop-matmult.c: New.
7481 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7483 * graphite.c (gbb_compare): New.
7484 (graphite_sort_gbbs): New.
7485 (gbb_can_be_ignored): New.
7486 (scop_remove_ignoreable_gbbs): New.
7487 (graphite_transformations): Cleanup and add
7488 scop_remove_ignoreable_gbbs.
7489 * lambda.h (lambda_vector_compare): New.
7491 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
7493 * graphite.c (print_graphite_bb): Correct printing of static schedule.
7494 (graphite_swap_loops): int -> unsigned
7495 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7496 (graphite_transformations): New.
7497 (graphite_transform_loops): Move to graphite_transformations.
7498 * graphite.h (gbb_nb_loops): Return unsigned.
7500 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
7502 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7503 the domain matrix. This makes scop-0.c work again.
7505 2008-06-20 Richard Guenther <rguenther@suse.de>
7507 * graphite.h: Adjust copyright to GPLv3.
7508 * graphite.c: Likewise.
7509 (stmt_simple_memref_for_scop_p): Split out from ...
7510 (stmt_simple_for_scop_p): ... here. Fix handling of calls
7512 (get_bb_type): Optimize.
7514 (is_bb_addable): Fix memleak, replace is_pred call with
7516 (build_scops): Use current_loops.
7517 (param_index): Fix memleak.
7519 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7521 * graphite.c: Fix formatting.
7523 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7525 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7526 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7527 (create_var_name, save_var_name): Newly defined functions.
7528 (initialize_cloog_names): Part of the code factored out to
7530 (clast_to_gcc_expression): Now handles the case of clast_red_sum
7531 in clast_reduction statement.
7532 (graphite_create_new_loop): Now takes a new parameter
7534 (translate_clast): Now also takes the context_loop and bb_exit
7535 parameters. Rewritten the code so that it creates a gimple code
7536 inside the given context.
7537 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7538 remove_cond_expr, disconnect_cond_expr,
7539 disconnect_virtual_phi_nodes): Newly defined functions.
7540 * graphite.h (struct scop): added old_ivs vector.
7541 SCOP_OLDIVS: New macro.
7543 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7545 * cfgloopmanip.c: Add missing function comments, fix formatting.
7547 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7549 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7550 (create_empty_loop_on_edge): Defined.
7551 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7553 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7554 (update_dominators_in_loop): Declared as extern
7555 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7557 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7559 * graphite.c (print_graphite_bb): Allow changing number of loops
7561 (initialize_cloog_names): Allow changing number of loops.
7562 (build_cloog_prog): Simplify.
7563 (find_transform): Enable cloog option --strides.
7564 (graphite_swap_loops): New.
7565 (graphite_strip_mine_loop): New.
7566 (graphite_trans_swap_1and2): New.
7567 (graphite_trans_strip): New.
7568 (graphite_transform_loops): Add graphite_trans_strip.
7569 * graphite.h (scop_max_loop_depth): New.
7571 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7573 * graphite.c (build_scop_iteration_domain): Remove forgotten
7574 line. (Fixes compile)
7576 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7578 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7579 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7580 (build_bb_loops): New.
7581 (graphite_transform_loops): Add build_bb_loops.
7582 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7584 * graphite.h (graphite_bb): Add loops.
7585 (gbb_nb_loops): New.
7586 (gbb_loop_at_index): New.
7587 (gbb_loop_index): New.
7588 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7589 using nb_params_in_scop.
7591 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7593 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7594 (build_scop_canonical_schedules): Build minimized schedule.
7595 (schedule_to_scattering): Adapt to minimized schedule.
7596 * graphite.h (graphite_bb): Add/Update descriptions.
7598 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7599 Tobias Grosser <grosser@fim.uni-passau.de>
7601 * graphite.c (print_graphite_bb): Add condition printing.
7603 (dump_gbb_conditions): New.
7604 (build_scop_conditions_1): New.
7605 (build_scop_conditions): New.
7606 * graphite.h (graphite_bb): Add conditions.
7608 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7610 * graphite.c (print_graphite_bb):
7611 (free_graphite_bb): New.
7612 (free_scop): Free bbs.
7613 (get_bb_type): Free doms.
7614 (build_scop_context): Free context matrix.
7615 (build_loop_iteration_domains): Remove unused code.
7616 (build_cloog_prog): Free scattering function and blocklist.
7617 (find_transform): Free options.
7619 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7621 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7622 Remove unnecessery cloog data structures. Make a copy of the domain
7623 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7624 unnecessary cloog data structures. Fix memory leaks. Remove insert
7625 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7627 (build_scop_iteration_domain): Remove unnecessary cloog
7628 data structures. Fix memory leaks.
7629 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7630 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7632 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7634 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7636 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7638 * graphite.c (end_scop): Style fix.
7639 (schedule_to_scattering): Style and comment fix.
7641 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7642 * graphite.c (print_graphite_bb): Fix definiton of
7643 schedule_to_scattering.
7644 (initialize_cloog_names): Change nb_scattdims to max loop
7646 (schedule_to_scattering): Take parameter for number of scattering
7648 (build_cloog_prog): Only build as much scattering dimensions as
7651 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7653 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7654 in polyhedron/aermod.f90.
7656 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7657 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7658 Harsha Jagasia <harsha.jagasia@amd.com>
7660 * graphite.c (is_bb_addable): Fix segfault.
7662 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7664 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7665 with multiple exits and conditional handling in edge cases.
7666 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7668 * gcc.dg/graphite/scop-14.c: New.
7670 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7671 Adrien Eliche <aeliche@isty.uvsq.fr>
7673 * graphite.c (is_bb_addable): Add more comments and enhance
7674 readablity of the source code. Fix memory leak.
7675 (is_loop_exit): Fix memory leak.
7677 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7679 * graphite.c (first_loop_in_scop): Deleted.
7680 (setup_cloog_loop): Only walk the loop chain for inner loops.
7681 (build_scop_iteration_domain): Execute setup_cloog_loop for
7682 all loops in the first layer.
7684 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7686 * graphite.c (scan_tree_for_params): Change the way params are
7687 added to be indepenent of the number of loops.
7688 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7690 (build_cloog_prog): Revert to short matrix format.
7692 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7693 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7695 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7698 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7700 * graphite.c (nb_data_refs_in_scop): New.
7701 (graphite_transform_loops): Print more stats: number of
7702 loops, basic blocks and data references per scop.
7704 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7705 Jan Sjodin <jan.sjodin@amd.com>
7707 * graphite.c (loop_affine_expr, idx_record_params,
7708 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7709 instead of instantiate_parameters.
7711 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7713 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7714 add support for parameters, add STATIC_SCHEDULE at the right places,
7717 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7719 * graphite.c (build_scop_loop_nests): Only add the loops, that
7720 are contained completely in the SCoP.
7721 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7722 and the domains are fixed.
7723 (build_scop_canonical_schedules): Add support for bbs not contained
7726 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7728 * graphite.h (scop_contains_loop): Update comments to match
7729 the actual behavior.
7730 (scop_contains_loop): New.
7731 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7733 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7735 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7736 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7739 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7740 Tobias Grosser <grosser@fim.uni-passau.de>
7742 * graphite.c (graphite_transform_loops): Early return when
7743 there are no loops in the function.
7745 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7746 Jan Sjodin <jan.sjodin@amd.com>
7748 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7749 offset of the last loop.
7750 (setup_cloog_loop): Copy the entire outer constraint matrix.
7752 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7753 Jan Sjodin <jan.sjodin@amd.com>
7755 * graphite.c (stmt_in_scop_p, function_parameter_p,
7756 invariant_in_scop_p): Removed.
7757 (scan_tree_for_params): Can be used with no constraint
7758 matrix for gathering parameters.
7759 (idx_record_params): Don't use idx_record_param, instead use
7760 scan_tree_for_params.
7761 (find_scop_parameters): Same.
7762 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7763 Fix the size of loop domains.
7764 (schedule_to_scattering): Exit when the outer loop is not in scop.
7765 (find_transform): Enable build_cloog_prog.
7767 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7768 Jan Sjodin <jan.sjodin@amd.com>
7770 * graphite.c (schedule_to_scattering): Make scattering domains
7771 uniformly of the same size, as required by CLooG 0.14.0 and before.
7773 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7774 Jan Sjodin <jan.sjodin@amd.com>
7776 * graphite.c (schedule_to_scattering): Rewrite, correct the
7777 translation of the scheduling function to scattering.
7778 (build_cloog_prog): Call schedule_to_scattering only once.
7779 * graphite.h (scop_loop_index): Do not fail for loops not
7780 in the scop: return -1.
7782 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7784 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7785 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7786 (setup_cloog_loop): Export GBB_DOMAIN.
7787 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7788 able to rebuild the original control flow.
7789 * graphite.h (graphite_bb): Add domain field and access macro.
7792 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7794 * graphite.c (debug_gbb): New.
7795 (print_scop, build_graphite_bb): Use SCOP_BBS.
7796 (build_scop_bbs): Reimplemented.
7797 (dfs_bb_in_scop_p): Removed.
7798 (build_scop_loop_nests): Reorder loops inserted in
7799 SCOP_LOOP_NEST: outer loops should come first.
7800 (build_scop_canonical_schedules): Reinitialize at zero
7801 the components of the SCOP_STATIC_SCHEDULE for the loops
7802 that have already been parsed.
7804 * graphite.h (debug_gbb): Declared.
7806 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7807 Jan Sjodin <jan.sjodin@amd.com>
7809 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7810 (graphite_loop_to_gcc_loop): Removed.
7811 (remove_all_edges): New.
7812 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7813 (gloog): Remove useless code.
7815 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7817 * graphite.c (get_bb_type): Reworked. We distinguish between
7818 loops with one or multiple exits.
7819 (is_loop_exit): New.
7821 (is_bb_addable): Rework condition handling, now support for case
7822 case statements and loops with multiple exits.
7824 * gcc.dg/graphite/scop-11.c: New.
7825 * gcc.dg/graphite/scop-12.c: New.
7826 * gcc.dg/graphite/scop-13.c: New.
7828 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7830 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7831 we have too many colors.
7833 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7835 * doc/invoke.texi (-ftree-loop-fusion): Document.
7836 * tree-pass.h (pass_loop_fusion): Declared.
7837 * tree-loop-fusion.c: New.
7838 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7839 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7840 * tree-data-ref.h (find_data_references_in_loop): Declared.
7841 * common.opt (ftree-loop-fusion): Declared.
7842 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7844 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7846 * graphite.c (build_access_matrix): Fix typo from the merge.
7848 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7850 * Merge from mainline (130800:135673).
7852 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7854 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7855 Update dominators after splitting.
7857 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7859 * graphite.c (is_bb_addable): Return the harmful statement.
7860 Factor up some code.
7861 (end_scop): New. Splits end of scope bbs on a harmful statement.
7862 (build_scops_1): Call end_scop.
7864 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7866 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7867 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7868 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7869 build_scops_1): Removed.
7870 (build_scops_2): Renamed build_scops_1.
7872 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7874 * graphite.c: Fix formatting.
7876 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7878 * graphite.c (get_bb_type): New.
7880 (build_scops_2): New.
7881 (is_bb_addable): New.
7882 (build_scops): Switch the scop detection.
7883 (build_scop_bbs): Add entry bb to scop.
7884 * graphite.h (struct scop): Update comment.
7886 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7888 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7891 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7893 * gcc.dg/graphite/scop-1.c: Update.
7894 * gcc.dg/graphite/scop-2.c: Update.
7895 * gcc.dg/graphite/scop-4.c: Update.
7896 * gcc.dg/graphite/scop-5.c: Add.
7897 * gcc.dg/graphite/scop-6.c: Add.
7899 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7901 * gcc.dg/graphite/scop-0.c: Add.
7902 * gcc.dg/graphite/scop-7.c: Add.
7903 * gcc.dg/graphite/scop-8.c: Add.
7904 * gcc.dg/graphite/scop-9.c: Add.
7905 * gcc.dg/graphite/scop-10.c: Add.
7907 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7909 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7910 Check affine expressions depending on the outermost loop
7912 (stmt_simple_for_scop_p): Same.
7913 (harmfule_stmt_in_scop): Same.
7915 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7917 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7918 mark entry and exit, that are not part of the SCoP and update HTML
7921 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7923 * graphite.c (basic_block_simple_for_scop_p): Renamed
7925 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7926 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7927 (all_preds_visited_p, all_succs_visited_p,
7928 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7929 scop_end_loop): New.
7930 (build_scops): Do not use dfs_enumerate_from.
7932 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7934 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7936 * graphite.c: Add comments to functions that are missing a
7938 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7940 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7942 * graphite.c (nb_params_in_scop): Moved...
7943 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7944 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7945 (clast_to_gcc_expression): Reduce column size to less than 80.
7946 (graphite_create_iv): Return the new name of the IV.
7947 (find_transform): Set options->esp and options->cpp.
7948 (gloog): Comment out the invalidation of the old loop code.
7949 (initialize_dependence_polyhedron): Replace scop_nb_params with
7952 * graphite.h (nb_params_in_scop): ... here.
7953 (scop_nb_params): Removed.
7954 (loop_domain_dim): Return something even when the loop was not
7955 found in the hash table: avoid ICEing on all the graphite.exp
7958 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7960 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7962 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7963 according to nesting level.
7964 (find_scop_parameters): Call instantiate_parameters.
7965 (scan_tree_for_params): Extend it to handle general affine bounds.
7966 Inner loop bound can depend on outer loop induction variable.
7967 (setup_cloog_loop): tmp variable is allocated on stack. Call
7968 instantiate_parameters with respect to outermost_loop_in_scop.
7969 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7971 (create_empty_loop): Function loopify should be given edge
7972 probability, instead of edge frequency. Dominance relation from
7973 switch_bb to loop_header.
7974 (clast_to_gcc_expression): Added handling of clast_reduction node.
7975 (gloog): New functionality for removing old loop.
7976 (test_dependence): Factored out from build_rdg_all_levels.
7977 (build_rdg_all_levels): Dependence testing factored out to
7978 test_dependence function.
7980 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7981 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7984 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7986 * graphite.c (free_scop, param_index, initialize_cloog_names,
7987 nb_params_in_scop): Use name_tree map instead of just a tree
7988 for keeping track of the variable name associated to that tree.
7989 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7990 clast_to_gcc_expression, graphite_create_iv,
7991 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7992 graphite_stmt_to_gcc_stmt): New.
7993 (gloog): Call these.
7994 * graphite.h (struct name_tree): New.
7995 (struct scop): Use name_tree instead of tree for params.
7996 Store a vector of name_tree for new_ivs.
7998 (scop_nb_params): Use name_tree instead of tree.
8000 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
8001 Sebastian Pop <sebastian.pop@amd.com>
8003 * tree-bounds.c: New.
8004 * tree-bounds.h: New.
8005 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
8006 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
8007 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
8011 * c-cppbuiltin.c: Same.
8015 * tree-outof-ssa.c: Same.
8017 * Makefile.in: Same.
8019 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
8020 Sebastian Pop <sebastian.pop@amd.com>
8022 * tree-loop-distribution.c (remaining_stmts,
8023 upstream_mem_writes): Removed static variables.
8024 (copy_loop_before, create_bb_after_loop,
8025 mark_nodes_having_upstream_mem_writes, free_rdg_components,
8026 rdg_build_components, rdg_build_partitions,
8027 dump_rdg_partitions): Extern.
8028 (generate_loops_for_partition, generate_code_for_partition): Do not
8030 (already_processed_vertex_p, predecessor_has_mem_write,
8031 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
8032 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
8033 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
8034 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
8035 Pass remaining_stmts and upstream_mem_writes as parameters.
8036 (rdg_component): Moved...
8037 (build_rdg_partition_for_component): Do not aggregate components when
8038 flag_streamize_loops is set.
8039 (gen_sequential_loops): New.
8040 (ldist_gen): Call gen_sequential_loops.
8042 * tree-pass.h (pass_loop_streamization): Declared.
8044 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
8045 basic blocks when loops structures exist.
8047 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
8049 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
8051 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
8052 eliminate_local_variables_stmt, eliminate_local_variables,
8053 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
8054 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
8055 of code delimited by two edges in the CFG.
8056 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
8057 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
8058 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
8059 the case of parallelisation of reductions.
8060 (create_loop_fn): Extern.
8061 (create_omp_parallel_region): New.
8063 * tree-data-ref.c (dump_data_dependence_relation): Don't call
8064 dump_data_reference for printing dra and drb.
8065 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
8067 (build_rdg): Don't call free_dependence_relations for the moment, as
8068 we attach dependence relations on each edge of the RDG.
8071 * tree-data-ref.h (rdg_component): ...here.
8072 (struct rdg_edge): New field ddr_p relation.
8073 (RDGE_RELATION): New.
8074 (create_bb_after_loop, copy_loop_before,
8075 mark_nodes_having_upstream_mem_writes, rdg_build_components,
8076 rdg_build_partitions, dump_rdg_partitions,
8077 free_rdg_components): Declared.
8079 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
8080 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
8082 * tree-loop-streamization.c: New.
8084 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
8085 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
8087 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
8089 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
8091 * passes.c: Schedule pass_loop_streamization.
8093 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
8095 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
8098 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
8100 * graphite.c (dot_all_scops): Update formatting.
8101 Bbs can now be part of more than one SCoP.
8103 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
8105 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
8107 (loop_domain_dim): Check for unregistered toplev SCOP loop.
8108 * graphite.h (loop_to_cloog_loop): New.
8110 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8112 * graphite.c (loop_domain_dim, ref_nb_loops,
8113 loop_iteration_vector_dim): New.
8114 (build_access_matrix_with_af, build_access_matrix,
8115 initialize_dependence_polyhedron): Fixed for new matrix layout.
8116 No longer assume that all iteration domains are of the same
8119 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
8121 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
8122 defined in a loop at depth 0 is invariant.
8123 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
8124 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
8125 be called at loop depth 0.
8127 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
8129 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
8130 (down_open_scop): Removed.
8131 (loop_in_scop_p): Redefined.
8132 (scop_affine_expr): New argument: scop.
8133 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
8134 a harmful statement ending a scop.
8135 (basic_block_simple_for_scop_p): New argument: scop.
8136 (get_loop_start): Removed.
8137 (new_scop): Initialize SCOP_LOOPS.
8138 (free_scop): Free SCOP_LOOPS.
8139 (succs_at_same_depth, preds_at_same_depth): New.
8140 (end_scop): Test the validity of a scop.
8141 (add_dominators_to_open_scops): New.
8142 (test_for_scop_bound): Call add_dominators_to_open_scops.
8143 Add cases for opening and closing multiple scops.
8144 (build_scops, build_scop_bbs): Iterate over basic blocks in
8146 (build_graphite_bb): Pass scop directly.
8147 (dfs_bb_in_scop_p): New.
8148 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
8150 (nb_loops_around_gb): Use loop_in_scop_p.
8151 (schedule_to_scattering): Disabled for the moment the code computing
8152 the "textual order for outer loop".
8154 * graphite.h (struct scop): New field loops.
8156 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
8158 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
8160 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
8161 Sebastian Pop <sebastian.pop@amd.com>
8163 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
8164 * common.opt (fstreamize-loops): New.
8165 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
8166 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
8167 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
8168 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
8170 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8172 * tree-data-ref.c (build_empty_rdg): New.
8173 (build_rdg): Use it.
8174 * tree-data-ref.h (build_empty_rdg): Declared.
8175 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
8176 (find_vertex_for_stmt): Removed.
8177 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
8179 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
8181 * tree-loop-distribution.c (generate_builtin): After cancelling the
8182 loop tree, also delete basic blocks.
8183 (rdg_flag_uses): Stop recursion when a vertex has already been
8186 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8188 * graphite.c (build_scop_alpha): Removed.
8189 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
8190 and dump_dependence_graph to avoid compiler warnings.
8192 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8194 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
8195 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
8196 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
8197 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
8198 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
8199 (initialize_dependence_polyhedron, find_vertex_for_stmt,
8200 initialize_data_dependence_polyhedron, is_empty_polyhedron,
8201 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
8202 dump_dependence_graph): New.
8203 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
8205 (struct scop): New field loop2cloog_loop.
8206 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
8207 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
8209 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8211 * graphite.c (build_graphite_bb): Fix initialization
8212 of the graphite basic block.
8214 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
8216 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
8217 loop domain matrix. Pass in the number of loops contained in the
8219 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
8220 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
8221 loops that are not surrounding the current loop are not represented
8222 in the domain constraint matrix.
8223 (build_scop_iteration_domain): Initial domain constraint matrix
8224 contains only the eq/ineq, cst, and scop parameters columns.
8226 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8228 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
8229 (print_graphite_bb): Print scattering.
8231 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8233 * graphite.c (initialize_cloog_names): Initialize names of
8234 scattering variables.
8236 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8238 * graphite.c (dot_all_scops_1): Disable debug output while
8241 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8243 * graphite.c (find_transform): Change cloog output language to C.
8245 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
8247 * tree-loop-distribution.c (generate_memset_zero,
8248 generate_builtin, generate_code_for_partition,
8249 rdg_flag_all_uses): New.
8250 (rdg_flag_uses): Gather in the same partition the statements defining
8251 the VUSES of the current statement.
8252 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8253 Gather in the same partition not only the stores to the same memory
8254 access, but also the reads.
8255 (ldist_generate_loops): Renamed ldist_gen.
8257 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
8258 Tobias Grosser <grosser@fmi.uni-passau.de>
8260 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8261 next pointer, don't use the inner pointer.
8263 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
8265 * graphite.c (dot_all_scops, dot_all_scops_1): New.
8266 (find_transform): Call dot_all_1.
8267 * graphite.h (dot_all_scops): Declared.
8269 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
8271 * tree-loop-distribution.c: Fix apsi.f ICE.
8272 (create_bb_after_loop): New.
8273 (generate_loops_for_partition): Use it.
8274 * gfortran.dg/ldist-1.f90: New.
8276 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8277 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8279 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8281 * graphite.c (find_transform): Dump cloog program sent to cloog.
8283 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8285 * graphite.c (initialize_cloog_names): Initialize cloog
8288 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8290 * graphite.c (build_scop_context): Fix typo, for the matrix
8291 format: insert '0 >= 0' instead of '-1 >= 0'.
8293 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8295 * Fix merge problems.
8297 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8299 * graphite.c (setup_cloog_loop): Fix typo.
8301 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8303 * doc/invoke.texi (-ftree-loop-distribution): Documented.
8304 * tree-loop-distribution.c: Reimplemented.
8305 * tree-pass.h (pass_loop_distribution): New.
8306 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8308 * graphds.h (struct graph): New field indexes.
8309 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8311 * tree-vect-analyze.c: Remove declaration of static functions when not
8313 * tree-vectorizer.c: Same.
8314 (rename_variables_in_loop): Now extern.
8315 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8316 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
8317 calling redirect_edge_and_branch_force.
8319 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8321 * tree-data-ref.c: Don't include tree-chrec.h.
8322 (debug_data_dependence_relations): New.
8323 (dump_data_dependence_relation): Call dump_data_reference on data refs
8325 (same_access_functions): Moved...
8326 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8327 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8328 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8329 struct rdg_vertex_info, ): New.
8330 (create_rdg_edge_for_ddr): Compute the dependence level before looking
8332 (create_rdg_vertices): Initialize the htab of graph->indexes.
8333 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8334 (stmts_from_loop): Don't save LABEL_EXPR.
8335 (hash_stmt_vertex_info, eq_stmt_vertex_info,
8336 hash_stmt_vertex_del): New.
8337 (build_rdg): Initialize rdg->indexes.
8338 (free_rdg, stores_from_loop, ref_base_address,
8339 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8340 have_similar_memory_accesses_1, ref_base_address_1,
8341 remove_similar_memory_refs): New.
8343 * tree-data-ref.h: Include tree-chrec.h.
8344 (debug_data_dependence_relations): Declared.
8345 (same_access_functions): ...here. Now static inline.
8346 (ddr_is_anti_dependent, ddrs_have_anti_deps,
8347 ddr_dependence_level): New.
8348 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8349 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8350 RDG_MEM_READS_STMT): New.
8351 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8352 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8353 rdg_vertex_for_stmt): Declared.
8354 (struct rdg_edge): New field level.
8355 (RDGE_LEVEL, free_rdg): New.
8356 (stores_from_loop, remove_similar_memory_refs,
8357 rdg_defs_used_in_other_loops_p,
8358 have_similar_memory_accesses): Declared.
8359 (rdg_has_similar_memory_accesses): New.
8361 * lambda.h (dependence_level): New.
8362 * common.opt (ftree-loop-distribution): New.
8363 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8364 (print_loop_ir): Renamed print_loops.
8365 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8366 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8367 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8368 (tree-loop-distribution.o): Added.
8369 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8370 (mark_virtual_ops_in_bb): New.
8371 (print_loops_bb, debug_loop_num, debug_loop): New.
8372 * passes.c: Scheduled pass_loop_distribution.
8374 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8376 * graphite.c (scan_tree_for_params): Correct the number of columns
8378 (nb_flat_iterator): New.
8379 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8380 (build_scop_iteration_domain): Correct the number of columns for
8383 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8385 * Merge from mainline (129697:130800).
8387 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
8389 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8390 dominated by SCoP's exit.
8391 (graphite_transform_loops): Compute post dominators.
8393 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8395 * Merge from mainline (127169:129697).
8397 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8399 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
8400 parameter for the basic block that contains the expression. Use
8401 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8402 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8404 * graphite.h (gbb_loop): New.
8405 (GBB_LOOP): Removed.
8407 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8409 * Makefile.in: Fix merge problem.
8411 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8413 * Merge from mainline (125309:127169).
8414 * tree-loop-distribution.c: Disabled.
8416 2007-06-05 Sebastian Pop <sebpop@gmail.com>
8418 * Merge from mainline (r123693:125309).
8420 2007-05-30 Sebastian Pop <sebpop@gmail.com>
8422 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8424 (correct_modify_p, check_statements, number_of_lvalue_uses,
8425 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8426 instead of MODIFY_EXPR.
8427 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
8430 2007-05-24 Sebastian Pop <sebpop@gmail.com>
8432 * tree-loop-distribution.c (struct rdg): Replace arrays by
8433 VECs for edges and vertices.
8434 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8435 (RDGV_NB_PARTITIONS): New.
8436 (PRDG_NBV, PRDG_NBE): Removed.
8437 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8438 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8439 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8441 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
8442 Sebastian Pop <sebpop@gmail.com>
8444 * doc/invoke.texi (-ftree-loop-distribution): Document.
8445 * tree-loop-distribution.c: New file.
8446 * tree-pass.h (pass_loop_distribution): Declared.
8447 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8448 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8450 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8451 (DDR_REVERSED_P): New.
8452 * common.opt (-ftree-loop-distribution): New.
8453 * tree-flow.h (distribute_loops): Declared.
8454 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8455 * passes.c (init_optimization_passes): Schedule loop distribution.
8457 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
8459 * graphite.c (print_graphite_bb): Don't call dump_data_references.
8460 (print_scop): Don't print when scop is NULL.
8461 (build_scop_context, find_transform): Don't output to stderr.
8463 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
8465 * tree-data-ref.c: Don't include graphite.h.
8466 Comment out the code for printing data reference's scop.
8467 (build_access_matrix_with_af): Moved...
8468 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8469 * graphite.c (build_access_matrix_with_af): ... here. Now static.
8470 (print_graphite_bb): Print basic block's schedule.
8471 (print_scop): Don't print the schedule, call cloog's pretty printer.
8472 (bb_in_scop_p): A basic block is in a scop only if it is both
8473 dominated and postdominated by the scop's entry and exit basic blocks.
8474 (function_parameter_p): New.
8475 (invariant_in_scop_p): Use function_parameter_p.
8476 (new_scop, save_scop): New.
8477 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8479 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8480 (loop_in_scop_p): New.
8481 (scop_record_loop): Use loop_in_scop_p.
8482 (build_scop_domain): Renamed build_scop_iteration_domain.
8483 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8484 nb_params_in_scop, build_scop_context, first_loop_in_scop,
8485 setup_cloog_loop, dot_scop_1, dot_scop): New.
8486 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8487 (struct scop): Add a pointer to cloog's representation of a program.
8489 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8491 * doc/invoke.texi (-ftree-check-verbose): Renamed
8492 -ftree-checks-verbose.
8493 * common.opt (flag_tree_check_verbose): Renamed
8494 flag_tree_checks_verbose.
8495 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8497 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8499 * configure: Regenerated.
8500 * config.in: Regenerated.
8501 * tree-ssa-loop.c (graphite_transforms): Execute
8502 graphite_transform_loops only when HAVE_cloog.
8503 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8504 * graphite.c: Include polylibgmp.h and cloog.h.
8505 (graphite_transform_loops): Removed loops parameter.
8506 * tree-flow.h (graphite_transform_loops): Update declaration.
8507 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8508 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8509 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8510 (OBJS-common): Remove dependence on graphite.o.
8511 (BACKEND): Depend on @GRAPHITE@.
8513 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
8515 * doc/invoke.texi (-ftree-check-verbose): Documented.
8516 * gcc.dg/tree-checker/tree-checks-1.c: New.
8517 * gcc.dg/tree-checker/tree-checks-2.c: New.
8518 * gcc.dg/tree-checker/tree-checks-3.c: New.
8519 * gcc.dg/tree-checker/tree-checks-4.c: New.
8520 * gcc.dg/tree-checker/tree-checks.exp: New.
8521 * gcc.dg/tree-checker/condates.crp: New.
8522 * common.opt (ftree-checks-verbose): New.
8523 * tree-check.c (tree_check_warning): Move extra stderr output
8524 under control of flag_tree_check_verbose.
8526 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
8528 * tree-match.c: Fix comments formatting.
8529 * tree-match.h: Fix comments formatting.
8530 * tree-check.c: Fix comments formatting.
8531 (tree_check_init): Restructure.
8533 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
8535 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8537 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
8539 * Merge from mainline (r120733:123693).
8541 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8543 * condate.y: New file.
8544 * tree-match.h (struct patt_info_s): New field sign.
8545 (struct condate_s): New field msg.
8546 (normalize_condate, name_condate, add_condate): New.
8547 (conds[], condate_parse): Made extern.
8548 * tree-check.c (tree_check_warning): First arg changed to cond;
8549 warning reformatted.
8550 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8552 (tree_check): Process trivial condates.
8553 (read_delimited_string): Removed.
8554 (print_cond): Print name and msg.
8555 (conds[]): Made extern.
8556 (parse_tree_check_file_once): Rewritten to use the parser in
8558 Processing of option --tree_check_string moved to tree_scan().
8559 * Makefile.in: Added condate.y
8561 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8563 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8564 Use VECs instead of varrays.
8565 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8566 * Makefile.in (pretty-print.o): Depend on vec.h.
8567 * pretty-print.c: Include tree.h and vec.h.
8568 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8569 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8570 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8571 pp_free_list): Use VECs instead of varrays.
8572 * pretty-print.h: Do not include varray.h.
8573 (struct tree_chunk_s): Declaration moved before its use.
8574 (output_buffer): Rename varray field to chunks.
8575 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8576 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8577 save_global_holes): Use VECs instead of varrays.
8578 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8579 * tree-check.c (scan_cfg_stmts, push_node,
8580 print_matching_stmt): Removed.
8581 (tree_check_instance, push_global_holes_if_new, tree_check,
8582 execute_tree_check): Use VECs instead of varrays.
8583 (gate_tree_check): Don't execute the CFG check when basic_block_info
8586 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8588 * Merge from mainline (r115016:120733).
8590 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8592 * Merge from mainline (r117632:117661).
8594 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8596 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8597 * tree-pass.h (TDF_DEBUG, debug_p): New.
8598 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8599 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8600 get_loop_exit_condition, analyze_evolution_in_loop,
8601 analyze_initial_condition, analyze_scalar_evolution,
8602 instantiate_parameters, number_of_latch_executions): Use debug_p.
8603 * tree-chrec.c (chrec_apply): Use debug_p.
8604 * tree-data-ref.c: Include graphite.h.
8605 (dump_data_reference): Print also the access matrix.
8606 (analyze_array, analyze_indirect_ref, init_data_ref,
8607 analyze_offset_expr, address_analysis, object_analysis,
8608 create_data_ref, finalize_ddr_dependent,
8609 non_affine_dependence_relation, analyze_ziv_subscript,
8610 analyze_siv_subscript_cst_affine,
8611 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8612 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8613 analyze_miv_subscript, analyze_overlapping_iterations,
8614 build_classic_dist_vector, subscript_dependence_tester,
8615 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8616 (build_access_matrix_with_af): No longer static.
8617 * tree-data-ref.h (scop_p): ... declaration here.
8618 (data_reference.scop): New field.
8619 (DR_SCOP, DR_ACCESS_MATRIX): New.
8620 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8621 * graphite.c (print_graphite_bb): Call dump_data_references.
8622 (print_scop): Use scop_nb_loops and scop_dim_domain.
8623 (test_for_scop_bound): Use debug_p.
8624 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8626 (scop_loop_index): Moved...
8627 (scop_record_loop): New.
8628 (build_scop_loop_nests): Use scop_record_loop.
8629 (build_scop_domain): Use scop_dim_domain.
8630 (build_access_matrix): Implemented.
8631 (build_scop_canonical_schedules): Use scop_nb_loops.
8632 (build_graphite_bb): Initialize GBB_SCOP.
8633 * graphite.h (scop_p): Moved...
8634 (graphite_bb.scop): New field.
8635 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8636 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8637 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8638 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8639 scop_loop_index): New.
8640 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8642 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8644 * Merge from mainline (r117661:120450).
8646 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8648 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8649 at the first declaration outside the varying loop, instantiate as
8651 * tree-chrec.c (for_each_scev_op): New.
8652 * tree-chrec.h (for_each_scev_op): Declared.
8653 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8654 * tree-data-ref.c (get_references_in_stmt,
8655 find_data_references_in_stmt): New, from trunk.
8656 (find_data_references_in_loop): Use get_references_in_stmt
8657 and find_data_references_in_loop, modified as in trunk.
8658 (build_access_matrix_with_af): New.
8659 * tree-data-ref.h (data_reference): Add a field access_matrix.
8660 (data_ref_loc): New, as in trunk.
8661 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8662 invariant_in_scop_p, param_index, scan_tree_for_params,
8663 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8664 idx_record_param, idx_record_params, build_access_matrix,
8665 build_scop_data_accesses, build_scop_canonical_schedules,
8666 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8667 build_scop_params): New.
8668 * graphite.h (graphite_bb): New.
8669 (scop): Add fields static_schedule, params, loop_nest,
8671 * lambda.h: Declare vecs of lambda_matrix.
8672 * tree-flow.h (print_loop_ir_bb): Declared.
8673 * tree-cfg.c (print_loop_ir_bb): New.
8674 (print_loop): Use print_loop_ir_bb.
8676 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8678 * Merge from mainline (r115016:117632).
8680 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8682 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8683 break due to a warning.
8685 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8687 * graphite.c (print_scops, debug_scops): New.
8688 (graphite_transform): Renamed graphite_find_transform.
8689 * graphite.h (debug_scops): Declared.
8691 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8693 * tree-match.c: Reformat following the GNU style.
8694 * tree-match.h: Reformat following the GNU style.
8695 * tree-pattern.h: Removed empty file.
8696 * Makefile.in: Remove references to tree-pattern.h.
8697 * tree-check.c: Reformat following the GNU style.
8698 (execute_tree_check): Move gate condition code to...
8699 (gate_tree_check): ...here. New function.
8700 (pass_check): Use the gate function.
8702 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8704 * tree-pattern.h: New. Tree pattern matching and checking using
8706 * tree-check.c: New. Tree/CFG checking pass.
8707 * tree-match.c: New. Library for tree pattern matching.
8708 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8709 * toplev.c, flags.h: Add globals for tree-check pass.
8710 * Makefile.in: Integrate the files in tree-check pass.
8711 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8712 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8713 Introduce a "lazy" pretty-print mode.
8714 * tree.c, tree.h: Add tree_name.
8716 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8718 * doc/invoke.texi (-fgraphite): Correct typo.
8719 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8720 use of print_loop_ir.
8721 * gcc.dg/graphite/scop-1.c: New.
8722 * gcc.dg/graphite/scop-2.c: New.
8723 * gcc.dg/graphite/graphite.exp: New.
8724 * graphite.c: Include domwalk.h.
8725 (print_scop): Print only the entry and exit blocks.
8726 (debug_scop): No longer static.
8727 (affine_expr): Fix formating. Return also true when the expression is
8729 (stmt_simple_for_scop_p): Fix formating.
8730 (build_scops): Use domwalk.
8731 (get_loop_start, end_scop, test_for_scop_bound): New.
8732 (graphite_transform_loops): Avoid printing on stderr.
8733 * graphite.h (debug_scop): Declared.
8734 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8735 * Makefile.in (graphite.o): Depend on domwalk.h.
8736 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8737 declarations for static functions.
8738 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8739 controlling output verbosity.
8741 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8742 Plesco Alexandru <shurikx@gmail.com>
8744 * doc/invoke.texi (-fgraphite): Document.
8745 * tree-pass.h (pass_graphite_transforms): Declared.
8746 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8747 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8748 (pass_graphite_transforms): Defined.
8749 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8750 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8751 * graphite.c, graphite.h: New.
8752 * common.opt (fgraphite): Declared.
8753 * tree-flow.h (graphite_transform_loops): Declared.
8754 * Makefile.in (OBJS-common): Add graphite.o.
8755 (graphite.o): New rule.
8756 * passes.c (pass_graphite_transforms): Scheduled.