1 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-dependences.c (build_pairwise_scheduling): Correctly compute
4 the "a followed by b" relation and document it.
6 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
8 * graphite-dependences.c (build_lexicographical_constraint): Stop the
9 iteration when the bag of constraints is empty.
11 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
13 * graphite-poly.c (pbb_remove_duplicate_pdrs): Make it work.
15 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
17 * graphite-interchange.c (lst_interchange_profitable_p): Takes a loop
18 nest and two loop depths as parameters.
19 (lst_try_interchange_loops): Call lst_interchange_profitable_p after
22 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
24 * graphite-dependences.c (print_pddr): Call
25 ppl_io_fprint_Pointset_Powerset_C_Polyhedron.
27 2011-01-15 Sebastian Pop <sebastian.pop@amd.com>
29 * graphite-ppl.c (debug_gmp_value): New.
30 * graphite-ppl.h (debug_gmp_value): Declared.
32 2011-01-13 Tobias Grosser <grosser@fim.uni-passau.de>
34 * doc/install.texi: Document availability of cloog-0.16
36 2011-01-05 Vladimir Kargov <kargov@gmail.com>
38 * graphite-scop-detection.c (is_valid_stmt_p): Pass the entry basic
39 block instead of region start to the instantiation.
40 (is_valid_bb_p): Add support for basic blocks with conditional
42 (find_scops_new): Recalculate dominance info before SCOP
45 2011-01-05 Vladimir Kargov <kargov@gmail.com>
47 * graphite-scop-detection.c (get_outermost_loop_in_region): New.
48 (is_valid_loop_p): Correct loop passed to stmt_has_simple_data_refs_p
50 2011-01-05 Vladimir Kargov <kargov@gmail.com>
52 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Free
53 invalid postdominance info
55 2010-12-29 Sebastian Pop <sebastian.pop@amd.com>
57 * Makefile.in (graphite-opencl-codegen.o): Update dependences.
58 (graphite-opencl-meta-clast.o): Same.
59 (graphite-opencl.o): Same.
60 (refined-regions.o): Same.
61 * graphite-opencl-codegen.c: Do not include unnecessary .h files.
62 * graphite-opencl-meta-clast.c: Same.
63 * graphite-opencl.c: Same.
64 * refined-regions.c: Same.
66 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
68 * graphite-opencl-codegen.c: Use FOR_EACH_VEC_ELT.
69 * graphite-opencl-meta-clast.c: Same.
70 * graphite-opencl.c: Same.
72 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
74 * graphite-opencl-codegen.c: Do not include sys/time.h.
75 * graphite-opencl.c: Same.
77 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
79 * graphite-opencl.c (h_context, h_cmd_queue, h_program): Moved
80 out of ifdef HAVE_cloog section.
82 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
84 * Makefile.in (graphite-opencl.o): Depends on
85 graphite-opencl-functions.def.
86 * graphite-opencl-functions.def: New.
87 * graphite-opencl.c (enum OPENCL_FUNCTIONS): Read data from
88 graphite-opencl-functions.def.
89 (opencl_function_names): Same.
90 (opencl_create_function_decl): Use the enum OPENCL_FUNCTIONS
91 as indices of opencl_function_names.
93 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
95 * graphite-opencl-codegen.c: Fix formatting.
96 * graphite-opencl-meta-clast.c: Same.
97 * graphite-opencl.c: Same.
99 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
101 * graphite-opencl-codegen.c: Fix formating problems.
102 * graphite-opencl-meta-clast.c: Same.
103 * graphite-opencl.c: Same.
104 * graphite-opencl.h: Same.
106 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
108 * graphite-opencl-codegen.c: Sort topologically static functions.
109 * graphite-opencl.c: Same.
111 2010-12-25 Sebastian Pop <sebastian.pop@amd.com>
113 * graphite-cloog-compat.h (cloog_names_nb_scattering): New.
114 (cloog_names_scattering): New.
115 * graphite-opencl-codegen.c (opencl_constant_expression_p): Use
116 clast_expr_* instead of expr_*. Call clast_name_to_str.
117 (opencl_clast_name_to_tree): Now takes a clast_name_p in parameter.
118 (opencl_get_scat_real_name): Same. Call clast_name_to_str.
119 (opencl_add_scat_as_arg): Same.
120 (opencl_print_local_vars): Call cloog_names_scattering and
121 cloog_names_nb_scattering.
122 (opencl_print_for): Do not call value_*.
123 (opencl_print_term): Same.
124 (opencl_print_expr): Use clast_expr_* instead of expr_*.
125 (opencl_print_sum): Same.
126 (opencl_print_binary): Same.
128 2010-12-25 Alexey Kravets <kayrick@ispras.ru>
130 * Makefile.in (OBJS-common): Add graphite-opencl-codegen.o,
131 graphite-opencl-meta-clast.o and graphite-opencl.o.
132 (graphite-opencl-codegen.o): New.
133 (graphite-opencl-meta-clast.o): New.
134 (graphite-opencl.o): New.
135 (GTFILES): Add graphite-opencl.c.
136 * common.opt (fgraphite-opencl): New.
137 (fgraphite-opencl-cpu): New.
138 (fgraphite-opencl-ignore-depth-heuristic): New.
139 (fgraphite-opencl-ignore-mem-heuristic): New.
140 (fgraphite-opencl-ignore-dep): New.
141 (fgraphite-opencl-ignore-types): New.
142 (fgraphite-opencl-depth-base): New.
143 (fgraphite-opencl-debug): New.
144 * graphite-opencl-codegen.c: New file.
145 * graphite-opencl-meta-clast.c: New file.
146 * graphite-opencl.c: New file.
147 * graphite-opencl.h: New file.
148 * graphite.c (graphite_transform_loops): Call graphite_opencl_init and
149 graphite_opencl_finalize.
150 * tree-ssa-loop.c (gate_graphite_transforms): Handle
151 flag_graphite_opencl.
152 * graphite-clast-to-gimple.c (gloog): Call opencl_transform_clast.
153 * dbgcnt.def (opencl_scop_cnt): New counter.
155 2010-12-25 Alexander Monakov <amonakov@ispras.ru>
157 * graphite-dependences.c (graphite_outer_subscript_bound): New.
158 (graphite_carried_dependence_level_k): Export.
159 * graphite-dependences.h (graphite_outer_subscript_bound): Declare.
160 (graphite_carried_dependence_level_k): Ditto.
162 2010-12-25 Alexey Kravets <kayrick@ispras.ru>
164 * graphite-clast-to-gimple.c (struct clast_name_index): Move
165 definition to graphite-clast-to-gimple.h.
166 (clast_name_to_index): Ditto.
167 (clast_name_index_elt_info): Ditto.
168 (eq_clast_name_indexes): Ditto.
169 (save_clast_name_index): Export.
170 (clast_name_to_gcc): Ditto.
171 (clast_to_gcc_expression): Ditto.
172 (gcc_type_for_clast_expr): Ditto.
173 (graphite_create_new_guard): Ditto.
174 (gcc_type_for_iv_of_clast_loop): Ditto.
175 (graphite_create_new_loop): Ditto.
176 (build_iv_mapping): Ditto.
177 (graphite_create_new_loop_guard): Ditto.
178 (debug_clast_name_index): New.
179 (debug_clast_name_indices): New debug function.
181 2010-12-21 Sebastian Pop <sebastian.pop@amd.com>
183 PR tree-optimization/47021
184 * graphite-sese-to-poly.c (scan_tree_for_params): Handle ADDR_EXPR.
186 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
188 * graphite-sese-to-poly.c (analyze_drs_in_stmts): Fix set but
190 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
192 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
194 * graphite-sese-to-poly.c (analyze_drs): Removed.
195 (build_scop_drs): Do not call analyze_drs.
196 (analyze_drs_in_stmts): New.
198 (insert_out_of_ssa_copy): Call analyze_drs_in_stmts.
199 (insert_out_of_ssa_copy_on_edge): Same.
200 (rewrite_close_phi_out_of_ssa): Call insert_stmts.
201 (rewrite_phi_out_of_ssa): Same.
202 (rewrite_cross_bb_scalar_dependence): Same.
203 (split_reduction_stmt): Move data references in the new basic blocks.
204 (translate_scalar_reduction_to_array_for_stmt): Call insert_stmts.
206 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
208 * sese.c (rename_uses): Do not handle ADDR_EXPR in LHS of assignments.
210 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
213 * graphite-poly.c (new_poly_bb): Returns a poly_bb_p. Do not take
214 the reduction bool in parameter. Clear PBB_IS_REDUCTION. Set GBB_PBB.
215 * graphite-poly.h (new_poly_bb): Update declaration.
216 (gbb_from_bb): Moved here...
218 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
220 (graphite_stmt_p): Removed.
221 (try_generate_gimple_bb): Returns a gimple_bb_p. Do not pass in
222 sbitmap reductions. Always build a gimple_bb_p. Do not call
224 (build_scop_bbs_1): Do not pass in sbitmap reductions.
225 (build_scop_bbs): Same.
226 (gbb_from_bb): ... from here.
227 (add_conditions_to_constraints): Moved up.
229 (build_scop_drs): Call analyze_drs. Remove all the PBBs that do
230 not contain data references.
231 (new_pbb_from_pbb): New.
232 (insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
234 (rewrite_close_phi_out_of_ssa): Update call to
235 insert_out_of_ssa_copy_on_edge.
236 (rewrite_reductions_out_of_ssa): Now static.
237 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
239 (split_reduction_stmt): Call split_pbb.
240 (translate_scalar_reduction_to_array): Pass in the scop, do not
241 pass in the sbitmap reductions.
242 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
243 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
244 (rewrite_commutative_reductions_out_of_ssa): Same.
245 (build_poly_scop): Call build_scop_bbs,
246 rewrite_commutative_reductions_out_of_ssa,
247 rewrite_reductions_out_of_ssa, and
248 rewrite_cross_bb_scalar_deps_out_of_ssa. Move build_scop_drs
250 * graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
252 (rewrite_reductions_out_of_ssa): Same.
253 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
254 (build_scop_bbs): Same.
255 * graphite.c (graphite_transform_loops): Do not initialize reductions.
256 Do not call build_scop_bbs,
257 rewrite_commutative_reductions_out_of_ssa,
258 rewrite_reductions_out_of_ssa, and
259 rewrite_cross_bb_scalar_deps_out_of_ssa.
260 * sese.h (struct gimple_bb): Add field pbb.
263 * gcc.dg/graphite/pr45297.c: New.
265 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
267 * graphite-sese-to-poly.c (handle_scalar_deps_crossing_scop_limits):
269 (rewrite_cross_bb_scalar_deps): Pass in the scop. Call
270 handle_scalar_deps_crossing_scop_limits.
271 (rewrite_cross_bb_scalar_deps_out_of_ssa): Create an empty BB
272 after the scop. Update call to rewrite_cross_bb_scalar_deps.
274 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
276 * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
277 when replacing a constant in an ADDR_EXPR.
279 2010-10-20 Sebastian Pop <sebastian.pop@amd.com>
281 * graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
283 (lst_do_strip_mine): Same.
284 (scop_do_strip_mine): Same.
285 * graphite-poly.c (apply_poly_transforms): Update call to
287 * graphite-poly.h (scop_do_strip_mine): Update declaration.
289 2010-09-24 Sebastian Pop <sebastian.pop@amd.com>
292 * graphite.c (graphite_initialize): Call scev_reset.
294 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
296 * sese.h (scev_analyzable_p): Return false for real or floating
297 point. Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
299 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
302 * gfortran.dg/graphite/pr45758.f90: New.
304 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
306 * graphite-scop-detection.c (is_scop_p): Free bblist.
308 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
310 * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
312 * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
314 * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
315 Do not allocate ub_expr, it is passed in initialized.
317 2010-09-21 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
319 * common.opt (fgraphite-dump-cloog): New flag.
320 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
321 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
322 (build_cloog_prog): Dump CLooG input file when
323 flag_graphite_dump_cloog is set.
324 * graphite-cloog-compat.h (cloog_program_dump_cloog): New.
326 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
328 Revert previous patch "New flag: -fgraphite-dump-cloog."
330 2010-09-20 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
332 * common.opt (fgraphite-dump-cloog): New flag.
333 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
334 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
335 (build_cloog_prog): Dump CLooG input file when
336 flag_graphite_dump_cloog is set.
338 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
340 * graphite-clast-to-gimple.c (graphite_verify): Remove call to
341 verify_dominators for CDI_POST_DOMINATORS.
342 * sese.h: Remove comment about CDI_POST_DOMINATORS.
343 (recompute_all_dominators): Remove call to free_dominance_info
344 for CDI_POST_DOMINATORS. Remove call to calculate_dominance_info
345 for CDI_POST_DOMINATORS.
347 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
349 * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
350 over pbb_dim_iter_domain.
352 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
354 * graphite-flattening.c: Fix comments.
356 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
358 * Makefile.in (OBJS-common): Add graphite-flattening.o.
359 (graphite-flattening.o): New rule.
360 * common.opt (floop-flatten): New flag.
361 * doc/invoke.texi (-floop-flatten): Documented.
362 * graphite-flattening.c: New.
363 * graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
364 * graphite-poly.h (flatten_all_loops): Declared.
365 (lst_remove_loop_and_inline_stmts_in_loop_father): New.
366 * tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
367 is set, also set flag_graphite.
369 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
371 * graphite-poly.c (cloog_checksum): New.
372 * graphite-poly.h (cloog_checksum): Declared.
374 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
376 * graphite-poly.c (pbb_number_of_iterations): Removed.
377 (pbb_number_of_iterations_at_time): Correctly compute the number
378 of iterations in the transformed loop.
379 * graphite-poly.h (pbb_number_of_iterations): Removed.
381 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
383 * graphite-poly.h (lst_update_scattering_seq): Removed.
384 (lst_update_scattering): Correctly handle outermost loop dewey
387 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
389 * graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
390 lst_strip_mine_profitable_p. Call lst_niter_for_loop.
391 * graphite-poly.h (lst_niter_for_loop): New.
393 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
395 * graphite-poly.c (apply_poly_transforms): Do not abort when the
396 transform read from disk is not legal. Call fatal_error instead.
398 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
400 * graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
401 (print_scop_header): Removed. Inlined in the only call place...
402 (print_scop): ... here.
404 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
406 * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
408 2010-09-02 Vladimir Kargov <kargov@gmail.com>
410 * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
411 (is_valid_stmt_p): Add data reference and operation-specific checks.
412 (is_valid_bb_p): Change structure, add loop validity check.
413 (is_scop_p): Move the TODO list
414 (find_scops_new): New.
415 (build_scops_new): Move part of functionality to find_scops_new and
416 build_scops. Add necessary steps for successful SCoP construction.
417 (build_scops): Compute SCoP sets for both detection algorithms, choose
418 the resulting one depending on static condition.
420 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
422 * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
424 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
426 * graphite-dependences.c (dot_deps): Avoid set but not used warning.
427 (dot_deps_stmt): Same.
428 * graphite-poly.c (dot_lst): Same.
430 2010-08-23 Sebastian Pop <sebastian.pop@amd.com>
432 * graphite-blocking.c (scop_do_strip_mine): Do not call
433 graphite_legal_transform.
434 (scop_do_block): Same.
436 2010-08-20 Vladimir Kargov <kargov@gmail.com>
438 * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
441 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
444 * gcc.dg/graphite/id-pr45230.c: New.
446 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
448 * tree-scalar-evolution.c (instantiate_array_ref): New.
449 (instantiate_scev_r): Also handle ARRAY_REFs.
451 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
453 * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
454 Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
455 RESULT_DECL, and FIELD_DECL. Return false for an
456 SSA_NAME_IS_DEFAULT_DEF.
457 (compute_scalar_evolution_in_loop): Do not further analyze the
458 scalar evolution when no_evolution_in_loop_p returns true.
460 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
462 * tree-chrec.h (evolution_function_is_affine_p): Do not check
463 whether CHREC_LEFT is invariant. A function is affine when
464 CHREC_RIGHT is invariant.
466 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
468 * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
470 (rewrite_degenerate_phi): Same.
471 (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
473 2010-08-18 Vladimir Kargov <kargov@gmail.com>
475 * graphite-scop-detection.c (graphite_can_represent_scev,
476 graphite_can_represent_expr, stmt_has_simple_data_refs_p,
477 graphite_can_represent_loop): Remove outermost_loop.
479 2010-08-17 Sebastian Pop <sebastian.pop@amd.com>
482 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
483 handle GIMPLE_CALLs with no LHS.
485 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
486 Sebastian Pop <sebastian.pop@amd.com>
488 * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
489 Call remove-build-file to clean up the generated *.graphite files.
491 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
493 * doc/invoke.texi (debugging options): Update documentation.
494 (-floop-interchange): Same.
495 (-flopp-strip-mine): Same.
496 (-floop-block): Same.
497 (-fgraphite-read): Add documentation.
498 (-fgraphite-write): Same.
500 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
502 * toplev.c (process_options): Disable graphite loop optimization
503 options when -fgraphite-read flag is used.
505 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
507 * graphite-poly.c (init_graphite_out_file): New.
508 (init_graphite_in_file): New.
509 (apply_poly_transforms): Updated to enable reading and writing of
511 * toplev.c (init_asm_output): Remove graphite in/out file initialization.
513 2010-08-17 Tobias Grosser <grosser@fim.uni-passau.de>
515 * graphite-scop-detection.c (graphite_can_represent_scev): Remove
518 2010-08-12 Sebastian Pop <sebastian.pop@amd.com>
520 * graphite-clast-to-gimple.c (precision_for_value): Adjust
521 computation of precision by 1.
523 2010-08-12 Riyadh Baghdadi <baghdadi.mr@gmail.com>
525 * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
526 (openscop_read_polyhedron_matrix): New.
527 * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
528 (openscop_read_N_int): Same.
529 * graphite-poly.c (openscop_read_N_int): New.
530 (openscop_read_one_int): New.
531 (openscop_read_N_string): New.
532 (openscop_read_one_string): New.
533 (openscop_read_powerset_matrix): New.
534 (graphite_read_transforms): Remove.
535 (graphite_read_scatt): New.
536 (graphite_read_scop_file): New.
537 (apply_poly_transforms): Updated to call graphite_read_scop_file.
539 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
541 * graphite-poly.c: Change include order.
543 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
545 * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
546 (cloog_matrix_nrows): New.
548 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
550 * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
552 * graphite-poly.c (openscop_print_scattering_function_1): Same.
553 (print_scattering_function_1): Same.
554 (openscop_print_pbb_domain): Same.
555 (openscop_print_scop_context): Same.
556 (print_scop_context): Same.
558 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
560 * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
561 (openscop_print_pdr_polyhedron): Print pph.
563 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
565 * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
566 * gfortran.dg/graphite/graphite.exp: Same.
567 * gcc.dg/graphite/vect-pr43423.c: New.
569 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
571 * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
572 priority signed types.
574 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
576 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
577 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
579 2010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
581 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
582 (openscop_print_polyhedron_matrix): New.
583 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
584 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
585 (openscop_print_pdr_powerset): New.
586 (openscop_print_powerset_matrix): New.
587 (openscop_print_scattering_function_1): New.
588 (print_scattering_function): Add support for scattering names and
590 (graphite_write_transforms): Remove.
591 (apply_poly_transforms): Updated to call print_scop.
592 (print_pdr_access_layout): Updated to support OpenScop format.
594 (openscop_print_pbb_domain): New.
595 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
597 (print_pbb): Updated to call the new print_pbb_body.
598 (openscop_print_scop_context): New.
599 (print_scop_header): New.
600 (print_scop): Updated to call print_scop_header.
601 * graphite-poly.h: Document OpenScop format.
603 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
605 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
606 the case removed in the previous patch, when the only phi argument
607 is defined in the same loop as the phi node itself. Handle it
608 separately from the invariant case by both propagating it outside
609 the region and replacing the phi node with an assign.
611 2010-07-28 Sebastian Pop <sebastian.pop@amd.com>
613 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
614 constant phi nodes with one argument are is_gimple_min_invariant
615 and SSA_NAME_IS_DEFAULT_DEF.
617 * gfortran.dg/graphite/id-22.f: New.
619 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
621 * graphite.c (graphite_initialize): Do not initialize
622 CLooG and initialize the Parma Polyhedra Library
623 manually when using CLOOG_ORG.
624 (graphite_finalize): Do not finalize CLooG and finalize
625 the Parma Polyhedra Library manually when using CLOOG_ORG.
626 * graphite-cloog-compat.h (cloog_initialize): Hide function
627 when using CLOOG_ORG.
628 (cloog_finalize): Same.
630 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
632 * graphite-clast-to-gimple.c (free_scattering): Change
633 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
635 (build_cloog_prog): Same.
636 * graphite-cloog-compat.h (cloog_domain): Removed.
637 (cloog_scattering): New.
638 (cloog_set_domain): Removed.
639 (cloog_set_scattering): New.
640 (cloog_next_domain): Removed.
641 (cloog_next_scattering): New.
642 (cloog_set_next_domain): Removed.
643 (cloog_set_next_scattering): New.
644 (CloogScatteringList): New.
645 (CloogScattering): New.
646 (cloog_scattering_free): New.
647 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
648 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
651 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
653 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
655 (set_cloog_options): Same.
656 (print_clast_stmt): Same.
657 (scop_to_clast): Same.
658 (print_generated_program): Same.
660 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
661 (scop_to_clast): Extend with CloogState.
662 * graphite-cloog-util.c: Include graphite-cloog-compat.h
663 (new_Cloog_Domain_from_ppl_Polyhedron):
664 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
665 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
666 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
667 * graphite-cloog-util.h (build_cloog_prog): Same.
668 * graphite-cloog-copat.h (build_cloog_prog): New.
670 (cloog_state_malloc): New.
671 (cloog_state_free): New.
672 (cloog_loop_malloc): New.
673 (cloog_options_malloc): New.
674 (cloog_statement_alloc): New.
675 (cloog_domain_from_cloog_matrix): New.
676 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
677 (new_Cloog_Domain_from_ppl_Polyhedron): New.
679 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
681 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
682 type of NAME now depends on used CLooG version.
683 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
684 (gcc_type_for_clast_expr): Same.
685 (print_clast_stmt): Replace pprint with clast_pprint.
686 * graphite-cloog-compat.h: Provide compatibility macros for
689 (clast_expr_term): New.
690 (clast_expr_red): New.
691 (clast_expr_bin): New.
694 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
696 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
697 compatible to newer CLooG releases (CLOOG_ORG).
698 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
699 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
700 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
701 (build_cloog_prog) : New.
702 (cloog_program_extract_scalars): New.
703 (cloog_program_scatter): New.
705 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
707 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
708 conditionally (CLOOG_ORG).
709 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
710 (cloog_statement_usr): New.
711 (cloog_domain): Same.
712 (cloog_set_domain): Same.
713 (cloog_next_domain): Same.
714 (cloog_set_next_domain): Same.
715 (cloog_program_nb_scattdims): Same.
716 (cloog_program_set_nb_scattdims): Same.
717 (cloog_program_names): Same.
718 (cloog_program_set_names): Same.
719 (cloog_program_set_context): Same.
720 (cloog_program_set_loop): Same.
721 (cloog_program_blocklist): Same.
722 (cloog_program_set_blocklist): Same.
723 (cloog_program_scaldims): Same.
724 (cloog_program_set_scaldims): Same.
725 (cloog_names_nb_parameters): Same.
726 (cloog_names_set_nb_parameters): Same.
727 (cloog_names_parameters): Same.
728 (cloog_names_set_parameters): Same.
729 (cloog_names_set_nb_iterators): Same.
730 (cloog_names_set_iterators): Same.
731 (cloog_names_set_nb_scattering): Same.
732 (cloog_names_set_scattering): Same.
733 (cloog_statement_set_usr): Same.
734 (cloog_loop_set_next): Same.
735 (cloog_loop_set_domain): Same.
736 (cloog_loop_set_block): Same.
737 (cloog_block_list_next): Same.
738 (cloog_block_list_set_next):
739 (cloog_block_list_set_block): Same.
741 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
743 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
745 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
746 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
747 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
748 when something has been changed.
749 (rewrite_commutative_reductions_out_of_ssa): Same.
751 * gcc.dg/graphite/id-26.c: New.
753 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
755 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
756 handle the case when def is in the sese region.
757 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
758 for invariant expressions.
759 (rewrite_cross_bb_phi_deps): Removed.
760 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
761 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
762 rewrite_cross_bb_phi_deps.
764 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
766 * graphite-sese-to-poly.c
767 (rewrite_commutative_reductions_out_of_ssa_loop): Call
768 scev_analyzable_p only on is_gimple_reg
770 * gcc.dg/graphite/id-25.c: New.
772 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
774 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
775 (rewrite_close_phi_out_of_ssa): Propagate constant values or
776 parametric expressions outside the scop region.
777 (rewrite_cross_bb_scalar_deps): Same.
778 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
780 * gcc.dg/graphite/run-id-5.c: New.
781 * gcc.dg/graphite/run-id-6.c: New.
782 * gfortran.dg/graphite/id-21.f: New.
784 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
786 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
787 SSA_NAME_DEF_STMT only on SSA_NAMEs.
789 * gcc.dg/graphite/id-24.c: New.
791 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
793 * tree-scalar-evolution.c (instantiate_scev_name): Do not
794 instantiate default definitions.
796 2010-07-20 Vladimir Kargov <kargov@gmail.com>
798 * graphite-scop-detection.c (is_valid_stmt_p): New.
799 (is_valid_bb_p): New.
801 2010-07-20 Vladimir Kargov <kargov@gmail.com>
802 Sebastian Pop <sebastian.pop@amd.com>
804 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
805 (loop_exits_from_bb_p): New.
806 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
807 (loop_exits_from_bb_p): Declared.
808 * graphite-scop-detection.c (scopdet_basic_block_info): Call
811 2010-07-20 Vladimir Kargov <kargov@gmail.com>
813 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
815 (dot_regions_1): New.
817 * refined-regions.h (dot_regions): Declared.
818 * Makefile.in (refined-regions.o): Update dependences.
820 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
822 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
823 extra parameter for the region. Call scev_analyzable_p.
824 (rewrite_reductions_out_of_ssa): Update call to
825 rewrite_close_phi_out_of_ssa.
826 (rewrite_cross_bb_phi_deps): Same.
827 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
828 parameter for the region. Call scev_analyzable_p.
829 (rewrite_commutative_reductions_out_of_ssa): Update call to
830 rewrite_commutative_reductions_out_of_ssa_loop.
832 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
834 * gcc.dg/tree-ssa/pr20742.c: New.
836 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
838 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
840 * gcc.dg/graphite/id-23.c: New.
842 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
844 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
845 SSA scalar phi nodes that can be scev_analyzable_p.
847 * gfortran.dg/graphite/id-20.f: Adjust testcase.
849 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
851 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
852 handle SSA_NAME_IS_DEFAULT_DEF.
854 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
856 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
858 * gcc.dg/graphite/pr42729.c: New.
860 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
862 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
863 case non close-phi nodes with one argument.
865 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
867 * sese.h (scev_analyzable_p): Scevs could be expressions without
868 chrecs and still be scev_analyzable_p.
870 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
872 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
874 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
876 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
877 * cfgloop.h (struct loop): Remove single_iv field.
878 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
879 (scop_canonicalize_loops): Removed.
880 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
881 over all the loop phi nodes in loop->header.
882 (build_poly_scop): Remove use of scop_canonicalize_loops.
884 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
886 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
889 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
891 * tree-chrec.c (chrec_apply): Should only apply to the specified
892 variable. Also handle multivariate chains of recurrences that
893 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
895 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
897 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
898 (debug_clast_name_indexes_1): Removed.
899 (debug_clast_name_indexes): Removed.
900 (pbb_to_depth_to_oldiv): Removed.
901 (build_iv_mapping): Replace the use of rename_map with iv_map.
902 (translate_clast_user): Remove uses of rename_map. Allocate and
904 (translate_clast_for_loop): Remove uses of rename_map.
905 (translate_clast_for): Same.
906 (translate_clast_guard): Same.
907 (translate_clast): Same.
909 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
910 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
911 * sese.c (set_rename): Now static.
912 (rename_variables_in_stmt): Removed.
914 (is_parameter): Removed.
916 (expand_scalar_variables_call): Removed.
917 (expand_scalar_variables_ssa_name): Removed.
918 (expand_scalar_variables_expr): Removed.
919 (expand_scalar_variables_stmt): Removed.
920 (expand_scalar_variables): Removed.
921 (rename_variables): Removed.
922 (remove_condition): Removed.
923 (get_true_edge_from_guard_bb): Removed.
924 (get_false_edge_from_guard_bb): Removed.
925 (struct igp): Removed.
926 (default_before_guard): Removed.
927 (convert_for_phi_arg): Removed.
928 (add_guard_exit_phis): Removed.
929 (insert_guard_phis): Removed.
930 (graphite_copy_stmts_from_block): Now also uses iv_map and a
931 region. Do not copy conditions. Do not copy induction variables.
933 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
934 the translated statement. Use the iv_map for the induction
936 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
937 (set_rename): Removed declaration.
938 (scev_analyzable_p): ...here.
939 * tree-chrec.c (chrec_apply_map): New.
940 * tree-chrec.h (chrec_apply_map): Declared.
942 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
944 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
945 insert_loop_close_phis.
946 * sese.c (name_defined_in_loop_p): Removed.
947 (expr_defined_in_loop_p): Removed.
948 (alive_after_loop): Removed.
949 (close_phi_not_yet_inserted_p): Removed.
950 (struct alep): Removed.
951 (add_loop_exit_phis): Removed.
952 (insert_loop_close_phis): Removed.
954 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
956 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
958 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
960 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
962 * gfortran.dg/graphite/id-20.f: New.
964 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
966 * graphite-cloog-util.h: Added cloog.h.
967 * graphite-blocking.c: Removed cloog.h.
968 * graphite-dependences.c: Same.
969 * graphite-interchange.c: Same.
970 * graphite-poly.c: Same.
971 * graphite-ppl.c: Same.
972 * graphite-scop-detection.c: Same.
973 * graphite-sese-to-poly.c:
975 Removed graphite-clast-to-gimple.h.
976 (check_poly_representation): Removed (unused).
977 * graphite-sese-to-poly.h
978 (check_poly_representation): Removed (unused).
980 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
983 (OBJS-common): Added graphite-cloog-util.o.
984 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
985 (graphite-cloog-util.o): New.
986 (graphite-ppl.o): Added graphite-cloog-util.h.
987 * graphite-clast-to-gimple.c:
988 Added graphite-cloog-util.h to include statements.
989 * graphite-cloog-util.c: New.
990 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
991 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
992 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
993 (new_C_Polyhedron_from_Cloog_Matrix): Same.
994 (ppl_Constrain_System_number_of_constraints): Same.
995 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
996 (oppose_constraint): Same.
997 (cloog_matrix_to_ppl_constraint): Same.
998 (new_Constraint_System_from_Cloog_Matrix): Same.
999 (insert_constraint_into_matrix): Same. Declared static.
1000 * graphite-cloog-util.h: New.
1001 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
1002 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1003 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1004 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1005 (insert_constraint_into_matrix): Same.
1007 Added graphite-cloog-util.h to include statements.
1008 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
1009 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1010 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1011 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1012 (insert_constraint_into_matrix): Same.
1013 (ppl_Constrain_System_number_of_constraints): Same.
1014 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
1015 (oppose_constraint): Same.
1016 (cloog_matrix_to_ppl_constraint): Same.
1017 (new_Constraint_System_from_Cloog_Matrix): Same.
1019 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
1020 graphite-cloog-util.h.
1021 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1022 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1023 (new_C_Polyhedron_from_Cloog_Matrix): Same.
1024 (insert_constraint_into_matrix): Removed.
1026 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1028 * graphite-clast-to-gimple.c
1029 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
1030 (precision_for_interval): Same.
1031 (gcc_type_for_interval): Same.
1032 (compute_type_for_level): Same.
1033 * graphite-interchange.c
1034 (lst_interchange_profitable_p): Same.
1036 (psct_scattering_dim_for_loop_depth): Same.
1038 (ppl_max_for_le_pointset): Same.
1039 (ppl_min_for_le_pointset): Same.
1041 2010-06-25 Vladimir Kargov <kargov@gmail.com>
1043 * refined-regions.c (bb_index_compare): New.
1044 (get_bbs_in_region): New.
1045 (print_bbs_in_region): New.
1046 (print_refined_region): Add an argument that allows to print
1047 all basic blocks contained in regions.
1048 (debug_refined_region): Update call to print_refined_region.
1049 * refined-regions.h (print_refined_region): Update declaration.
1050 (get_bbs_in_region): Declared.
1051 * graphite-scop-detection.c (build_scops_new): Print the refined
1052 region tree into the Grahite dump file.
1054 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1056 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
1057 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
1059 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1061 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
1062 rewrite_close_phi_out_of_ssa.
1064 * gcc.dg/graphite/id-22.c: New.
1066 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1068 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
1070 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1072 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
1074 * sese.c (debug_rename_map): Same.
1077 (rename_variables_in_stmt): Same.
1078 (expand_scalar_variables_call): Same.
1079 (expand_scalar_variables_ssa_name): Same.
1080 (expand_scalar_variables_expr): Same.
1081 (expand_scalar_variables_stmt): Same.
1082 (expand_scalar_variables): Same.
1083 (rename_variables): Same.
1084 (graphite_copy_stmts_from_block): Same.
1085 (copy_bb_and_scalar_dependences): Same.
1087 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1089 * graphite-clast-to-gimple.c (copy_renames): Removed.
1090 (translate_clast_for): Do not call copy_renames.
1091 (translate_clast_guard): Same.
1093 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1095 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
1096 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
1097 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
1098 before rewrite_cross_bb_scalar_deps.
1100 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1102 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
1103 Early return in when flag_associative_math is not set.
1105 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1107 * gcc.dg/graphite/run-id-2.c: Call abort.
1109 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1111 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
1112 of SSA copies on edges except for loop->latch.
1114 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1116 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
1117 Split out of rewrite_reductions_out_of_ssa.
1118 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
1120 * graphite.c (graphite_transform_loops): Call it.
1122 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1124 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
1126 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
1128 * passes.c (init_optimization_passes): Add pass_graphite.
1129 Schedule a pass_copy_prop before pass_graphite_transforms.
1130 * timevar.def (TV_GRAPHITE): Declared.
1131 * tree-pass.h (pass_graphite): Declared.
1132 * tree-ssa-loop.c (pass_graphite): New.
1134 * gcc.dg/graphite/id-20.c: New.
1136 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1138 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
1139 Remove calls to rename_nb_iterations and rename_sese_parameters.
1140 * graphite-clast-to-gimple.h (gloog): Update declaration.
1141 * graphite.c (graphite_transform_loops): Update call to gloog.
1142 * sese.c (rename_variables_in_expr): Removed.
1143 (rename_nb_iterations): Removed.
1144 (rename_sese_parameters): Removed.
1145 * sese.h (rename_nb_iterations): Removed.
1146 (rename_sese_parameters): Removed.
1148 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1150 * graphite-clast-to-gimple.c (gloog): Remove call to
1151 sese_adjust_liveout_phis.
1152 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
1153 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
1154 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
1155 rewrite_phi_out_of_ssa.
1156 * sese.c (get_vdef_before_sese): Removed.
1157 (sese_adjust_vphi): Removed.
1158 (sese_adjust_liveout_phis): Removed.
1159 * sese.h (sese_adjust_liveout_phis): Removed.
1161 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1163 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
1164 argument for the place after which to insert the out of SSA copy.
1165 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
1166 (rewrite_phi_out_of_ssa): Same.
1167 (rewrite_cross_bb_scalar_deps): Same.
1168 (insert_copyout): Removed.
1169 (insert_copyin): Removed.
1170 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
1171 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
1174 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1176 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
1177 (rewrite_reductions_out_of_ssa): Same.
1178 (rewrite_commutative_reductions_out_of_ssa): Same.
1179 (build_poly_scop): Do not call these functions.
1180 * graphite-sese-to-poly.h (build_poly_scop): Declared.
1181 (rewrite_reductions_out_of_ssa): Declared.
1182 (rewrite_commutative_reductions_out_of_ssa): Declared.
1183 * graphite.c (graphite_transform_loops): Call on every scop
1184 rewrite_commutative_reductions_out_of_ssa before calling
1185 rewrite_reductions_out_of_ssa and build_scop_bbs.
1187 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1189 * graphite-dependences.c (dot_deps): Make system call to dotty run
1191 (dot_deps_stmt): Same.
1192 * graphite-poly.c (dot_lst): Same.
1194 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
1196 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
1197 old_type in parameter.
1198 (gcc_type_for_value): Update call to gcc_type_for_interval.
1199 (compute_type_for_level_1): Renamed compute_type_for_level.
1200 Update call to gcc_type_for_interval.
1202 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1204 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
1205 the scev analysis when the variable is not used outside the loop
1206 in a close phi node: call compute_overall_effect_of_inner_loop.
1208 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1210 * graphite-sese-to-poly.c (single_pred_cond): Renamed
1211 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
1212 (build_sese_conditions_before): Renamed call to single_pred_cond.
1213 (build_sese_conditions_after): Same.
1215 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1217 * graphite-poly.h: Fix comments and indentation.
1218 * graphite-sese-to-poly.c: Same.
1219 (build_sese_conditions_before): Compute stmt and gbb only when needed.
1220 * tree-chrec.c: Fix comments and indentation.
1221 (tree-ssa-loop-niter.c): Same.
1223 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
1225 * refined-regions.c (create_region): Only initialize the region.
1226 (find_regions_with_entry): Initialize parent relation and bbmap
1228 (build_regions_tree): Set outermost_region to region instead of
1230 (calculate_region_tree): Remove unneeded parameters.
1232 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
1234 * graphite-scop-detection.c (is_scop_p): New.
1235 (build_scops_new): New. A skeleton for the new scop detection.
1236 (build_scops_old): Renamed from build_scops.
1237 (build_scops): New version. Call the new and the old scop
1240 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
1241 Antoniu Pop <antoniu.pop@gmail.com>
1243 * Makefile.in (OBJS-common): Add refined-regions.o.
1244 (refined-regions.o): New.
1245 (graphite-scop-detection.o): Use refined-regions.h.
1246 * graphite-scop-detection.c: Include refined-regions.h
1247 (build_scops): Also build the refined region tree.
1248 * refined-regions.c: New. Adds an algorithm to detect refined
1250 (print_refined_region): New.
1251 (debug_refined_region): New.
1252 (refined_region_contains_bb_p): New.
1253 (refined_region_contains_region_p): New.
1254 (is_common_df): New.
1255 (struct find_regions_global_data): New.
1257 (typedef struct bb_bb_def): New.
1258 (new_bb_bb_def): New.
1259 (bb_bb_map_hash): New.
1260 (eq_bb_bb_map): New.
1263 (new_bb_reg_def): New.
1264 (bb_reg_map_hash): New.
1265 (eq_bb_reg_map): New.
1266 (find_new_region): New.
1267 (insert_new_reg): New.
1268 (insert_new_bb): New.
1269 (insert_shortcut): New.
1270 (get_next_postdom): New.
1271 (create_region): New.
1272 (find_regions_with_entry): New.
1273 (find_regions_adc): New.
1274 (find_regions): New.
1275 (get_topmost_parent): New.
1276 (build_regions_tree): New.
1277 (calculate_region_tree): New.
1278 (free_region_tree): New.
1279 * refined-regions.h: New.
1280 (struct refined_region): New.
1281 (calculate_region_tree): New.
1282 (free_region_tree): New.
1283 (refined_region_contains_bb_p): New.
1284 (refined_region_contains_region_p): New.
1285 (print_refined_region): New.
1286 (debug_refined_region): New.
1288 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
1290 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1293 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1295 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
1296 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
1298 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1300 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
1301 phi_arg_in_outermost_loop.
1302 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
1303 (remove_invariant_phi): Same.
1305 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1307 * graphite-blocking.c
1308 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
1309 * graphite-clast-to-gimple.c
1310 (clast_to_gcc_expression): Same.
1311 (precision_for_value): Same.
1312 (precision_for_interval): Same.
1313 (gcc_type_for_interval): Same.
1314 (graphite_create_new_guard): Same.
1315 (compute_bounds_for_level): Same.
1316 (graphite_create_new_loop_guard): Same.
1317 * graphite-interchange.c
1318 (build_linearized_memory_access): Same.
1319 (pdr_stride_in_loop): Same.
1320 (memory_strides_in_loop_1): Same.
1321 (memory_strides_in_loop): Same.
1322 (extend_scattering): Same.
1323 (psct_scattering_dim_for_loop_depth): Same.
1324 (pbb_number_of_iterations): Same.
1326 (debug_iteration_domains): Same.
1328 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1329 (ppl_set_inhomogeneous_gmp): Same.
1330 (ppl_strip_loop): Same.
1331 (ppl_lexico_compare_linear_expressions): Same.
1332 (ppl_read_polyhedron_matrix): Same.
1333 (ppl_max_for_le_pointset): Same.
1335 (ppl_read_polyhedron_matrix): Same.
1336 (tree_int_to_gmp): Same.
1337 (gmp_cst_to_tree): Same.
1338 (ppl_set_inhomogeneous): Same.
1339 (ppl_set_inhomogeneous_tree): Same.
1340 (ppl_set_coef): Same.
1341 (ppl_set_coef_tree): Same.
1342 * graphite-sese-to-poly.c
1343 (build_pbb_scattering_polyhedrons): Same.
1344 (build_scop_scattering): Same.
1345 (scan_tree_for_params_right_scev): Same.
1346 (scan_tree_for_params): Same.
1347 (find_params_in_bb): Same.
1348 (find_scop_parameters): Same.
1349 (add_upper_bounds_from_estimated_nit): Same.
1350 (build_loop_iteration_domains): Same.
1351 (add_condition_to_domain): Same.
1352 (pdr_add_memory_accesses): Same.
1354 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1356 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
1357 CLooG's value_* macros to their respective mpz_* counterparts.
1358 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
1359 (graphite_create_new_loop_guard): Same.
1360 * graphite-interchange.c (build_linearized_memory_access): Same.
1361 (pdr_stride_in_loop): Same.
1362 (memory_strides_in_loop_1): Same.
1363 (1st_interchange_profitable_p): Same.
1364 * graphite-poly.c (extend_scattering): Same.
1365 (psct_scattering_dim_for_loop_depth): Same.
1366 (pbb_number_of_iterations): Same.
1367 (pbb_number_of_iterations_at_time): Same.
1368 * graphite-poly.h (new_1st_loop): Same.
1369 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
1370 (oppose_constraint): Same.
1371 (insert_constraint_into_matrix): Same.
1372 (ppl_set_inhomogeneous_gmp): Same.
1373 (ppl_set_coef_gmp): Same.
1374 (ppl_strip_loop): Same.
1375 (ppl_lexico_compare_linear_expressions): Same.
1376 (ppl_max_for_le_pointset): Same.
1377 (ppl_min_for_le_pointset): Same.
1378 (ppl_build_realtion): Same.
1379 * graphite-ppl.h (gmp_cst_to_tree): Same.
1380 (ppl_set_inhomogeneous): Same.
1381 (ppl_set_inhomogeneous_tree): Same.
1382 (ppl_set_coef): Same.
1383 (ppl_set_coef_tree): Same.
1384 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
1385 (build_scop_scattering): Same.
1386 (add_value_to_dim): Same.
1387 (scan_tree_for_params_right_scev): Same.
1388 (scan_tree_for_params_int): Same.
1389 (scan_tree_for_params): Same.
1390 (find_params_in_bb): Same.
1391 (find_scop_parameters): Same.
1392 (add_upper_bounds_from_estimated_nit): Same.
1393 (build_loop_iteration_domains): Same.
1394 (create_linear_expr_from_tree): Same.
1395 (add_condition_to_domain): Same.
1396 (pdr_add_memory_accesses): Same.
1398 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1401 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1402 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1403 When converting an unsigned type to signed, double its precision.
1404 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1405 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1406 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1408 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1411 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1412 build_nonstandard_integer_type.
1413 (gcc_type_for_interval): Same.
1415 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1418 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1419 POINTER_PLUS_EXPR for pointer types.
1421 * gcc.dg/graphite/id-19.c: New.
1423 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
1426 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1427 * graphite-clast-to-gimple.c: Include langhooks.h.
1428 (max_signed_precision_type): New.
1429 (max_precision_type): Takes two types as arguments.
1430 (precision_for_value): New.
1431 (precision_for_interval): New.
1432 (gcc_type_for_interval): New.
1433 (gcc_type_for_value): New.
1434 (gcc_type_for_clast_term): New.
1435 (gcc_type_for_clast_red): New.
1436 (gcc_type_for_clast_bin): New.
1437 (gcc_type_for_clast_expr): Split up into several functions.
1438 (gcc_type_for_clast_eq): Rewritten.
1439 (compute_bounds_for_level): New.
1440 (compute_type_for_level_1): New.
1441 (compute_type_for_level): New.
1442 (gcc_type_for_cloog_iv): Removed.
1443 (gcc_type_for_iv_of_clast_loop): Rewritten.
1444 (graphite_create_new_loop): Compute the lower and upper bound types
1445 with gcc_type_for_clast_expr.
1446 (graphite_create_new_loop_guard): Same.
1447 (find_cloog_iv_in_expr): Removed.
1448 (compute_cloog_iv_types_1): Removed.
1449 (compute_cloog_iv_types): Removed.
1450 (gloog): Do not call compute_cloog_iv_types.
1451 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1453 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1454 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1455 (GBB_CLOOG_IV_TYPES): Removed.
1457 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1459 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
1461 Reverted this commit: as at this point the loop closed SSA form
1462 is under a canonical form respecting the single argument condition.
1463 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1464 close phi nodes may have more than one argument.
1466 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
1468 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1469 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1470 (detect_commutative_reduction): Same.
1472 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
1474 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1475 close phi nodes may have more than one argument.
1477 2010-03-30 Richard Guenther <rguenther@suse.de>
1478 Zdenek Dvorak <ook@ucw.cz>
1479 Sebastian Pop <sebastian.pop@amd.com>
1482 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1483 with multiple arguments.
1484 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1486 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1488 * graphite-dependences.c (print_pddr): Call print_pdr with an
1490 * graphite-poly.c (debug_pdr): Add an extra argument for the
1493 (print_pbb_domain): Same.
1495 (print_scop_context): Same.
1497 (print_cloog): Same.
1498 (debug_pbb_domain): Same.
1502 (debug_scop_context): Same.
1504 (debug_cloog): Same.
1505 (print_scop_params): Same.
1506 (debug_scop_params): Same.
1507 (print_iteration_domain): Same.
1508 (print_iteration_domains): Same.
1509 (debug_iteration_domain): Same.
1510 (debug_iteration_domains): Same.
1511 (print_scattering_function): Same.
1512 (print_scattering_functions): Same.
1513 (debug_scattering_function): Same.
1514 (debug_scattering_functions): Same.
1515 * graphite-poly.h (debug_pdr): Update declaration.
1517 (print_pbb_domain): Same.
1519 (print_scop_context): Same.
1521 (print_cloog): Same.
1522 (debug_pbb_domain): Same.
1526 (debug_scop_context): Same.
1528 (debug_cloog): Same.
1529 (print_scop_params): Same.
1530 (debug_scop_params): Same.
1531 (print_iteration_domain): Same.
1532 (print_iteration_domains): Same.
1533 (debug_iteration_domain): Same.
1534 (debug_iteration_domains): Same.
1535 (print_scattering_function): Same.
1536 (print_scattering_functions): Same.
1537 (debug_scattering_function): Same.
1538 (debug_scattering_functions): Same.
1540 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1542 * graphite-poly.c (print_scattering_function_1): New.
1543 (print_scattering_function): Call it.
1544 (print_scop_params): Remove spaces at the end of lines.
1547 * graphite-poly.h (print_cloog): Declared.
1548 (debug_cloog): Declared.
1550 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1552 * tree-ssa-copy.c: Revert this previous change:
1553 (init_copy_prop): Loop closed phi nodes cancontain more than one
1555 (execute_copy_prop): Revert the previous change: do not call
1556 rewrite_into_loop_closed_ssa.
1558 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1559 Richard Guenther <rguenther@suse.de>
1562 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1563 contain more than one argument.
1564 (execute_copy_prop): Revert the previous change: do not call
1565 rewrite_into_loop_closed_ssa.
1567 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1568 * gcc.dg/graphite/id-pr43464-1.c: New.
1570 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1573 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1574 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1576 * gcc.dg/graphite/id-pr43464.c: New.
1578 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1580 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1582 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1583 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1584 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1585 to switch between adding the IV bump in loop->latch or in loop->header.
1587 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1589 * passes.c (init_optimization_passes): Add pass_copy_prop
1592 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1594 * graphite-poly.c (print_scattering_function): Pretty print following
1597 (print_pbb_domain): Same.
1598 (dump_gbb_cases): Same.
1599 (dump_gbb_conditions): Same.
1602 (print_scop_params): Same.
1603 (print_scop_context): Same.
1605 (print_pbb_body): New.
1606 (lst_indent_to): New.
1607 (print_lst): Start new lines with a #.
1608 * graphite-poly.h (pbb_bb): New.
1609 (pbb_index): Use pbb_bb.
1610 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1612 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1614 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1617 * gcc.dg/graphite/id-pr43351.c
1619 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1622 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1623 call insert_out_of_ssa_copy for default definitions.
1624 * gfortran.dg/graphite/id-pr43354.f: New.
1626 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1629 * gfortran.dg/graphite/pr43349.f: New.
1631 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1633 * graphite-clast-to-gimple.c (my_long_long): Defined.
1634 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1635 * graphite-sese-to-poly.c (my_long_long): Defined.
1636 (scop_ivs_can_be_represented): Use it.
1638 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1640 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1641 graphite-max-bbs-per-function, and loop-block-tile-size.
1642 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1644 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1646 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1648 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1649 forward declaration.
1650 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1651 (add_upper_bounds_from_estimated_nit): New.
1652 (build_loop_iteration_domains): Use it.
1654 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1656 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1658 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1661 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1662 should be an INTEGER_CST. Also handle CASE_CONVERT.
1663 * gcc.dg/graphite/pr43306.c: New.
1665 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1667 * graphite.c (graphite_initialize): To bound the number of bbs per
1668 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1669 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1670 * doc/invoke.texi: Document it.
1672 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1674 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1675 * graphite-sese-to-poly.h (build_poly_scop): Same.
1677 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1679 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1680 the number of parameters in the scop. Use as an upper bound
1681 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1682 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1683 * doc/invoke.texi: Document it.
1685 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1687 * graphite-sese-to-poly.c (add_param_constraints): Use
1688 lower_bound_in_type and upper_bound_in_type.
1690 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1692 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1693 instead of unsigned_type_node.
1695 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1696 Reza Yazdani <reza.yazdani@amd.com>
1699 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1700 on pointer type parameters.
1702 * gcc.dg/graphite/run-id-4.c: New.
1704 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1707 * gcc.dg/graphite/run-id-3.c: New.
1709 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1710 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1712 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1713 handle conversions from pointer to integers.
1714 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1715 induction variable, to be able to work with code generated by CLooG.
1716 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1717 (build_poly_scop): Bail out if we cannot codegen a loop.
1719 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1721 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1722 code generation with gloog_error.
1724 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1726 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1727 Call fold_convert on all the returned values.
1728 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1729 the type of the resulting expression.
1731 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1733 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1734 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1735 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1737 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1739 * graphite-dependences.c (map_into_dep_poly): Removed.
1740 (dependence_polyhedron_1): Use combine_context_id_scat.
1742 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1744 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1745 (struct poly_bb): Same.
1746 (combine_context_id_scat): New.
1748 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1751 * sese.c (name_defined_in_loop_p): Return false for default
1754 * gcc.dg/graphite/pr42326.c: New.
1756 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1758 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1759 and clean up the logic.
1761 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1763 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1766 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1769 * graphite-scop-detection.c (create_single_exit_edge): Move
1770 the call to find_single_exit_edge to....
1771 (create_sese_edges): ...here. Don't handle multiple edges
1772 exiting the function.
1773 (build_graphite_scops): Don't handle multiple edges
1774 exiting the function.
1776 * gcc.dg/graphite/pr43083.c: New.
1778 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1781 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1782 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1784 * gfortran.dg/graphite/pr43097.f: New.
1786 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1787 Manuel López-Ibáñez <manu@gcc.gnu.org>
1790 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1792 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1795 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1797 * g++.dg/graphite/pr43026.C: New.
1799 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1801 * Merge from mainline (154736:156693).
1803 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1806 * gcc.dg/graphite/pr43012.c: New.
1808 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1810 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1811 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1813 * g++.dg/graphite/pr42930.C: New.
1815 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1818 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1819 graphite_can_represent_init for MULT_EXPR.
1821 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1825 * graphite-sese-to-poly.c (remove_phi): New.
1826 (translate_scalar_reduction_to_array): Call remove_phi.
1828 * gcc.dg/graphite/pr42530.c: New.
1829 * gcc.dg/graphite/pr42914.c: New.
1831 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1834 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1835 * graphite-clast-to-gimple.h (gloog): Update declaration.
1836 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1837 * graphite-poly.h (struct poly_bb): Add missing comments.
1838 (struct scop): Add poly_scop_p field.
1840 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1841 * graphite.c (graphite_transform_loops): Build the polyhedral
1842 representation for each scop before code generation.
1843 * sese.c (rename_variables_in_operand): Removed.
1844 (rename_variables_in_expr): Return the renamed expression.
1845 (rename_sese_parameters): New.
1846 * sese.h (rename_sese_parameters): Declared.
1848 * gcc.dg/graphite/pr42771.c: New.
1850 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1852 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1854 * gcc.dg/graphite/block-1.c: Same.
1855 * gcc.dg/graphite/block-3.c: Same.
1856 * gcc.dg/graphite/block-4.c: Same.
1857 * gcc.dg/graphite/block-5.c: Same.
1858 * gcc.dg/graphite/block-6.c: Same.
1859 * gcc.dg/graphite/block-7.c: Same.
1860 * gcc.dg/graphite/interchange-0.c: Same.
1861 * gcc.dg/graphite/interchange-1.c: Same.
1862 * gcc.dg/graphite/interchange-10.c: Same.
1863 * gcc.dg/graphite/interchange-11.c: Same.
1864 * gcc.dg/graphite/interchange-12.c: Same.
1865 * gcc.dg/graphite/interchange-2.c: Same.
1866 * gcc.dg/graphite/interchange-3.c: Same.
1867 * gcc.dg/graphite/interchange-4.c: Same.
1868 * gcc.dg/graphite/interchange-5.c: Same.
1869 * gcc.dg/graphite/interchange-6.c: Same.
1870 * gcc.dg/graphite/interchange-7.c: Same.
1871 * gcc.dg/graphite/interchange-8.c: Same.
1872 * gcc.dg/graphite/interchange-9.c: Same.
1873 * gcc.dg/graphite/interchange-mvt.c: Same.
1875 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1877 * gfortran.dg/graphite/id-19.f: New.
1878 * gfortran.dg/graphite/pr14741.f90: New.
1879 * gfortran.dg/graphite/pr41924.f90: New.
1880 * gfortran.dg/graphite/run-id-2.f90: New.
1882 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1885 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1886 to unknown_dependence.
1887 (graphite_legal_transform_dr): Handle the unknown_dependence.
1888 (graphite_carried_dependence_level_k): Same.
1890 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1892 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1894 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1895 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1898 * graphite-dependences.c (build_lexicographical_constraint): Return
1899 a union of dependence polyhedra.
1900 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1902 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1903 * gcc.dg/graphite/block-4.c: Same.
1904 * gcc.dg/graphite/block-7.c: Same.
1905 * gcc.dg/graphite/interchange-12.c: Same.
1906 * gcc.dg/graphite/interchange-mvt.c: Same.
1907 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1908 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1909 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1911 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1913 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1914 the execution check to FAIL. This testcase is miscompiled by Graphite
1915 and the check should be re-enabled.
1916 * gcc.dg/graphite/interchange-mvt.c: Same.
1917 * gcc.dg/graphite/block-0.c: Same.
1918 * gcc.dg/graphite/block-4.c: Same.
1919 * gcc.dg/graphite/block-7.c: Same.
1921 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1923 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1924 * gcc.dg/graphite/scop-0.c: Fix spaces.
1925 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1926 * gfortran.dg/graphite/block-2.f: Same.
1927 * gfortran.dg/graphite/block-3.f90: Same.
1928 * gfortran.dg/graphite/block-4.f90: Same.
1929 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1930 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1932 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1934 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1935 PDDR_ORIGINAL_SCATTERING_P.
1936 (pddr_is_empty): Rewritten.
1937 (print_dependence_polyhedron_layout): New.
1940 (build_alias_set_powerset): Moved up.
1941 (poly_drs_may_alias_p): Moved up.
1942 (lexicographically_gt_p): Removed.
1943 (build_lexicographically_gt_constraint): Renamed
1944 build_lexicographical_constraint, reimplemented.
1945 (dependence_polyhedron_1): Simplified parameters.
1946 (dependence_polyhedron): Same. Keep along empty PDDRs
1947 to make efficient use of the cache.
1948 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1949 (graphite_legal_transform_dr): Rewritten.
1950 (graphite_legal_transform_bb): Pass fewer arguments to
1951 graphite_legal_transform_dr.
1952 (graphite_carried_dependence_level_k): Simplified implementation.
1953 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1954 (dot_transformed_deps_stmt_1): Same.
1955 (dot_original_deps): Same.
1956 (dot_transformed_deps): Same.
1957 * graphite-dependences.h (struct poly_ddr): Added a new field
1958 original_scattering_p.
1959 (PDDR_ORIGINAL_SCATTERING_P): New.
1960 (print_pddr): Declared.
1961 (debug_pddr): Declared.
1962 * graphite-ppl.c: Clarify comment.
1963 * sese.h (print_gimple_bb): Removed unused declaration.
1966 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1968 * g++.dg/graphite/graphite.exp: Rewritten.
1969 * gcc.dg/graphite/graphite.exp: Rewritten.
1970 * gfortran.dg/graphite/graphite.exp: Rewritten.
1971 * gcc.dg/graphite/block-0.c: Added runtime test.
1972 * gcc.dg/graphite/block-1.c: Same.
1973 * gcc.dg/graphite/block-3.c: Same.
1974 * gcc.dg/graphite/block-4.c: Same.
1975 * gcc.dg/graphite/block-5.c: Same.
1976 * gcc.dg/graphite/block-6.c: Same.
1977 * gcc.dg/graphite/block-7.c: Same.
1978 * gcc.dg/graphite/interchange-0.c: Same.
1979 * gcc.dg/graphite/interchange-1.c: Same.
1980 * gcc.dg/graphite/interchange-10.c: Same.
1981 * gcc.dg/graphite/interchange-11.c: Same.
1982 * gcc.dg/graphite/interchange-12.c: Same.
1983 * gcc.dg/graphite/interchange-2.c: Same.
1984 * gcc.dg/graphite/interchange-3.c: Same.
1985 * gcc.dg/graphite/interchange-4.c: Same.
1986 * gcc.dg/graphite/interchange-5.c: Same.
1987 * gcc.dg/graphite/interchange-6.c: Same.
1988 * gcc.dg/graphite/interchange-7.c: Same.
1989 * gcc.dg/graphite/interchange-8.c: Same.
1990 * gcc.dg/graphite/interchange-9.c: Same.
1991 * gcc.dg/graphite/interchange-mvt.c: Same.
1992 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1994 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1996 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1999 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2001 * common.opt: Add -fgraphite-cloog-opts.
2002 * graphite-clast-to-gimple.c (set_cloog_options): Same.
2003 * opts.c (decode_options): Same.
2005 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2007 * gcc.dg/graphite/id-17.c: New.
2008 * gcc.dg/graphite/pr41888.c: New.
2009 * gcc.dg/graphite/scop-22.c: New.
2010 * gfortran.dg/graphite/pr40982.f90: New.
2012 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2014 * graphite-dependences.c: Clarify comments.
2015 (build_pddr): Add an extra parameter direction.
2016 (graphite_legal_transform_dr): Use build_pddr.
2017 (dot_original_deps_stmt_1): Update use of build_pddr.
2018 (dot_transformed_deps_stmt_1): Same.
2019 (dot_original_deps): Same.
2020 (dot_transformed_deps): Same.
2022 * gcc.dg/graphite/interchange-12.c: New.
2023 * gcc.dg/graphite/block-7.c: New.
2025 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2027 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
2028 (pddr_transformed_scattering): Removed.
2029 (graphite_legal_transform_dr): Use build_pddr.
2030 (dot_original_deps_stmt_1): Same.
2031 (dot_transformed_deps_stmt_1): Same.
2032 (dot_original_deps): Same.
2033 (dot_transformed_deps): Same.
2035 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2037 * graphite-dependences.c (lexicographically_gt_p): Add comments.
2038 (build_lexicographically_gt_constraint): Same.
2039 (dependence_polyhedron_1): Same.
2040 (dependence_polyhedron): Same.
2042 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2044 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
2045 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
2046 (lexicographically_gt_p): Change type of direction to int.
2047 (build_lexicographically_gt_constraint): Same.
2048 (dependence_polyhedron_1): Same.
2049 (dependence_polyhedron): Same.
2050 (pddr_original_scattering): Use integers for direction.
2051 (pddr_transformed_scattering): Same.
2052 (graphite_legal_transform_dr): Same.
2053 (graphite_carried_dependence_level_k): Same.
2055 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2057 * graphite-dependences.c (build_pairwise_constraint): Renamed
2058 ppl_build_relation. Moved...
2059 (dr_equality_constraints): Use ppl_build_relation.
2060 (build_pairwise_scheduling_equality): Same.
2061 (build_pairwise_scheduling_inequality): Same.
2062 * graphite-ppl.c (ppl_build_relation): ...here.
2063 * graphite-ppl.h (ppl_build_relation): Declared.
2065 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
2068 * graphite-clast-to-gimple.c (gloog_error): New static variable.
2069 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
2070 Set gloog_error when such an expression failed to be built.
2071 (translate_clast): Early return when gloog_error is set.
2072 (gloog): Clear gloog_error. When gloog_error is set, call
2073 set_ifsese_condition to enable the original code. Return the status
2074 of the code generation based on gloog_error.
2075 * sese.c (set_ifsese_condition): New.
2076 * sese.h (set_ifsese_condition): Declared.
2078 * g++.dg/graphite/pr42681.C: New.
2080 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
2083 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
2084 rename_nb_iterations.
2085 * sese.c (rename_variables_in_operand): New.
2086 (rename_variables_in_expr): New.
2087 (rename_nb_iterations): New.
2088 (sese_adjust_liveout_phis): Update the rename_map.
2089 * sese.h (rename_nb_iterations): Declared.
2090 * tree-scalar-evolution.c (scev_reset_htab): New.
2091 (scev_reset): Call scev_reset_htab.
2092 * tree-scalar-evolution.h (scev_reset_htab): Declared.
2094 * gfortran.dg/graphite/pr42732.f: New.
2096 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
2099 * graphite-clast-to-gimple.c: Fix formatting.
2100 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
2101 (expr_defined_in_loop_p): New.
2102 (add_loop_exit_phis): Also handle full expressions: remove from
2103 the rename_map the expressions defined in the loop that we're closing.
2105 * gfortran.dg/graphite/pr42393-1.f90: New.
2106 * gfortran.dg/graphite/pr42393.f90: Add new flags
2107 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
2108 make this testcase useful in the Graphite branch.
2110 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
2112 * graphite-scop-detection.c (exclude_component_ref): Removed.
2113 (is_simple_operand): Removed.
2114 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
2116 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2119 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2120 the array indexing of ADDR_EXPRs.
2122 * gcc.dg/graphite/pr42221.c: New.
2124 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2127 * graphite.c (graphite_finalize): Call scev_reset.
2128 (graphite_transform_loops): Do not call scev_reset between the code
2129 generation of scops.
2131 * gcc.dg/graphite/pr42521.c: New.
2133 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2135 * graphite-interchange.c (memory_stride_in_loop): Renamed
2137 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
2138 (memory_strides_in_loop): Memoize the memory strides per loop.
2139 (lst_interchange_profitable_p): Do not initialize to zero the memory
2141 * graphite-poly.h (struct lst): Add a field memory_strides.
2142 (LST_LOOP_MEMORY_STRIDES): New.
2143 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
2144 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
2146 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2148 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
2149 memory_strides_in_loop. Gather memory strides on a whole loop.
2150 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
2151 (lst_interchange_profitable_p): Removed.
2152 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
2154 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2156 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2157 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2158 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2159 Remove context_loop and level.
2161 2010-01-07 Richard Guenther <rguenther@suse.de>
2163 PR tree-optimization/42641
2164 * sese.c (rename_map_elt_info): Use the SSA name version, do
2167 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
2169 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
2170 blocked" only when both the strip mine and the interchange have
2173 * gcc.dg/graphite/block-2.c: Removed.
2174 * gcc.dg/graphite/block-3.c: Add scan pattern.
2175 * gcc.dg/graphite/block-4.c: Same.
2176 * gcc.dg/graphite/block-5.c: Same.
2177 * gcc.dg/graphite/block-6.c: Same.
2179 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
2181 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
2182 before allocating a new one.
2183 (copy_renames): Check that slot is not NULL.
2184 (mark_bb_with_pbb): Same.
2185 (compute_cloog_iv_types_1): Same.
2186 * graphite-interchange.c (lst_perfect_nestify): Free the before,
2187 nest, and after LSTs.
2188 (lst_try_interchange_loops): Same.
2190 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
2193 * graphite-interchange.c (lst_try_interchange_loops): Do not return
2194 the before, nest, and after LSTs.
2195 (lst_try_interchange): Removed.
2196 (lst_interchange_select_inner): Do not iterate over the LSTs if they
2198 (lst_interchange_select_outer): Apply interchange on the outer loop
2199 until there are no more changes in the inner loops.
2201 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2203 Revert patch fixing PR middle-end/42221.
2205 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2208 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
2211 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
2213 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2216 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
2217 that contain only one statement.
2219 * gfortran.dg/graphite/pr42180.f90: New.
2221 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2224 * gfortran.dg/graphite/pr42393.f90: New.
2226 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2229 * gfortran.dg/graphite/pr42186.f90: New.
2231 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2234 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
2235 Insert the reduction copy in the same block as the phi node.
2236 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
2238 * gcc.dg/graphite/pr42205-1.c: New.
2239 * gcc.dg/graphite/pr42205-2.c: New.
2241 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2244 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2245 the array indexing of ADDR_EXPRs.
2247 * gcc.dg/graphite/pr42221.c: New.
2249 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2253 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
2254 index. Call lst_interchange_select_inner only once.
2255 (lst_interchange_select_inner): Update use of lst_try_interchange.
2256 (lst_interchange_select_outer): Update.
2258 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2262 * graphite-interchange.c (lst_try_interchange): Do not increment the
2263 the OUTER index when there is no AFTER kernel. Do not increment the
2264 OUTER index for after processing the AFTER kernel.
2265 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
2266 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
2267 index. Do not pass to lst_interchange_select_inner the OUTER index.
2268 (scop_do_interchange): Update use of lst_interchange_select_outer.
2270 * gfortran.dg/graphite/graphite.exp
2271 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
2272 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
2273 the graphite dump file.
2274 * gfortran.dg/graphite/interchange-2.f: Same.
2275 * gfortran.dg/graphite/pr42334-1.f: New.
2277 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2281 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2283 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2284 (lst_try_interchange): Reimplemented.
2285 (lst_interchange_select_inner): Same.
2286 (lst_do_interchange): Renamed lst_interchange_select_outer.
2288 (scop_do_interchange): Update use of lst_interchange_select_outer.
2290 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2291 * gcc.dg/graphite/block-0.c: Un-XFAILed.
2292 * gcc.dg/graphite/pr42211.c: New.
2293 * gfortran.dg/graphite/pr42334.f90: New.
2295 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
2298 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2299 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2301 * gfortran.dg/graphite/pr42181.f90: New.
2303 2009-12-12 Sebastian Pop <sebpop@gmail.com>
2306 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2307 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2308 (detect_commutative_reduction_arg): Simplified.
2309 (detect_commutative_reduction): Early return when the argument of
2310 the close phi is not of an SSA_NAME.
2312 * gcc.dg/graphite/pr42284.c: New.
2314 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
2316 * dbgcnt.def (graphite_scop): New counter.
2317 * graphite.c: Include dbgcnt.h
2318 (graphite_transform_loops): Use new counter to limit transformations.
2320 2009-12-08 Sebastian Pop <sebpop@gmail.com>
2323 * graphite-scop-detection.c (graphite_can_represent_init): Also
2324 handle more complex MULT_EXPRs containing parameters by recursion
2327 * gfortran.dg/graphite/pr42285.f90: New.
2329 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
2331 * g++.dg/graphite/pr42130.C: Fix type.
2333 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
2335 * g++.dg/graphite/pr42130.C: Correct testcase.
2337 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2339 * Merge from mainline (154493:154734).
2341 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2343 * Merge from mainline (151362:154491).
2345 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
2347 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2348 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2350 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2353 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2354 translate_clast_for_loop): New.
2355 (translate_clast_for): Add a condition around the loop, to do not
2356 execute loops with zero iterations.
2357 * g++.dg/graphite/pr42130.C: New.
2358 * gcc.dg/graphite/pr35356-2.c: Adapt.
2360 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2362 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2363 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2364 Remove context_loop and level.
2366 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2368 * graphite-clast-to-gimple.c (translate_clast_user,
2369 translate_clast_for, translate_clast_guard): Simplify and move common
2370 elements to translate_clast().
2371 (translate_clast): Simplify and get common elements.
2373 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2375 * graphite-clast-to-gimple.c (translate_clast_user,
2376 translate_clast_for, translate_clast_guard): Split out of
2379 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
2381 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2382 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2383 debug_clast_name_indexes_1, debug_clast_name_indexes,
2384 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2385 (clast_name_to_gcc, clast_to_gcc_expression,
2386 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2387 gcc_type_for_clast_eq, graphite_translate_clast_equation,
2388 graphite_create_guard_cond_expr, graphite_create_new_loop,
2389 translate_clast): Add params_index.
2390 (initialize_cloog_names): Create parameter strings from scratch, do
2391 not reference other strings.
2392 (create_params_index): New.
2393 (gloog): Initialize params_index.
2394 * graphite-scop-detection (free_scops_1): Removed.
2395 (limit_scops): Use normal free_scops.
2396 * graphite-sese-to-poly.c (save_var_names): Removed.
2397 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2398 and SESE_PARAMS_INDEX.
2399 * sese.c (new_sese, free_sese): Dito.
2400 * sese.h (struct sese): Remove params_index, params_names.
2401 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2403 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2405 Revert the following patch from 2009-09-14:
2406 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2407 tree-scalar-evolution.h, and then tree-data-ref.h.
2408 * graphite-clast-to-gimple.c: Same.
2409 * graphite-dependences.c: Same.
2410 * graphite-interchange.c: Same.
2411 * graphite-poly.c: Same.
2412 * graphite-scop-detection.c: Same.
2413 * graphite-sese-to-poly.c: Same.
2415 * lambda-code.c: Same.
2416 * matrix-reorg.c: Same.
2417 * tree-data-ref.c: Same.
2418 * tree-if-conv.c: Same.
2419 * tree-loop-distribu: Same.: Same.
2420 * tree-loop-linear.c: Same.
2421 * tree-parloops.c: Same.
2422 * tree-predcom.c: Same.
2423 * tree-vect-patterns.c: Same.
2425 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2427 Revert patch from 2009-09-14.
2428 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2429 passes at -O1 and below.
2431 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2434 * gcc.dg/graphite/pr40281.c: New.
2436 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2437 evolutions should not variate in inner loops.
2439 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2442 * gfortran.dg/graphite/pr42050.f90: New.
2444 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2446 * graphite-interchange.c (memory_strides_in_loop_depth): New.
2447 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2449 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2451 * graphite-blocking.c (scop_do_block): New.
2452 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2453 * graphite-poly.h (scop_do_block): Declared.
2455 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2457 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2458 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
2459 to transform depth into the time_depth before calling
2460 pbb_number_of_iterations_at_time.
2461 (lst_do_strip_mine): Use a scalar variable instead of recomputing
2464 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2466 Reverted the patch for "scattering permutations" from 2009-10-28.
2468 * graphite-poly.c (print_permutation): New.
2469 (debug_permutation): New.
2470 (new_poly_bb): Initialize PBB_PERMUTATION.
2471 (free_poly_bb): Free PBB_PERMUTATION.
2472 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2473 (struct pbb_permutation_elt): New.
2474 (PBB_PERMUTATION_ELT_STRIDE): New.
2475 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2476 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2477 (new_pbb_permutation_elt): New.
2478 (pbb_permutation_elt_free): New.
2479 (struct poly_bb): Add field permutation.
2480 (PBB_PERMUTATION): New.
2481 (print_permutation): Declared.
2482 (debug_permutation): Declared.
2484 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
2486 * graphite-interchange.c (build_partial_difference): New.
2487 (memory_stride_in_loop): Refactored the computation of
2488 equality constraints into build_partial_difference function.
2489 Added support for debugging stride computations.
2491 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2493 * graphite-clast-to-gimple.c (gloog): Free if_region,
2494 if_region->true_region, and if_region->region.
2495 * sese.c (if_region_set_false_region): Free if_region->false_region.
2496 (create_if_region_on_edge): Do not use GGC_NEW.
2497 (move_sese_in_condition): Remove useless initialization.
2499 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2501 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2502 for the loops created by the loop distribution. Do not modify the
2504 (lst_try_interchange_loops): Same. Use a temporary LST for the
2505 transformed schedule. Call lst_update_scattering before data
2506 dependence analysis.
2507 (lst_try_interchange): Pass an extra parameter INDEX.
2508 (lst_do_interchange_1): New.
2509 (lst_do_interchange): Call lst_do_interchange_1.
2510 (scop_do_interchange): Call lst_update_scattering.
2511 * graphite-poly.c (apply_poly_transforms): Do not call
2512 lst_update_scattering.
2513 * graphite-poly.h (lst_pred): New.
2515 (lst_find_first_pbb): Return NULL when not found.
2517 (lst_insert_in_sequence): Allow LST1 to be NULL.
2519 (lst_substitute_3): New.
2520 * gcc.dg/graphite/interchange-1.c: XFail.
2521 * gcc.dg/graphite/interchange-8.c: XFail.
2522 * gcc.dg/graphite/interchange-11.c: XFail.
2524 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2526 * graphite-interchange.c (lst_perfectly_nested_p): New.
2527 (lst_perfect_nestify): New.
2528 (lst_try_interchange_loops): Call store_lst_schedule,
2529 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2530 (scop_do_interchange): Avoid redundant legality test.
2531 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2532 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2533 * graphite-poly.h (psct_static_dim): New.
2534 (lst_dewey_number_at_depth): New.
2535 (lst_find_pbb): Restructured.
2536 (lst_find_first_pbb): Restructured.
2537 (lst_find_last_pbb): New.
2538 (lst_contains_p): New.
2539 (lst_contains_pbb): New.
2540 (lst_create_nest): New.
2541 (lst_remove_from_sequence): New.
2542 (pbb_update_scattering): New.
2543 (lst_update_scattering_under): New.
2544 (lst_update_scattering_seq): New.
2545 (lst_update_scattering): New.
2546 (lst_insert_in_sequence): New.
2547 (lst_distribute_lst): New.
2548 (lst_remove_all_before_including_pbb): New.
2549 (lst_remove_all_before_excluding_pbb): New.
2551 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2553 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2554 get_loop_exit_edges.
2556 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2558 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2560 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2562 * graphite-poly.c (print_permutation): New.
2563 (debug_permutation): New.
2564 (new_poly_bb): Initialize PBB_PERMUTATION.
2565 (free_poly_bb): Free PBB_PERMUTATION.
2566 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2567 (struct pbb_permutation_elt): New.
2568 (PBB_PERMUTATION_ELT_STRIDE): New.
2569 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2570 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2571 (new_pbb_permutation_elt): New.
2572 (pbb_permutation_elt_free): New.
2573 (struct poly_bb): Add field permutation.
2574 (PBB_PERMUTATION): New.
2575 (print_permutation): Declared.
2576 (debug_permutation): Declared.
2578 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2580 * graphite-clast-to-gimple.c (gloog): Do not call
2581 sese_reset_aux_in_loops.
2582 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2583 extra argument for domains. Do not use loop->aux.
2584 (build_scop_iteration_domain): Initialize and free domains, pass it
2585 to build_loop_iteration_domains and extract the information from
2586 domains. Do not use loop->aux.
2587 * sese.c (sese_reset_aux_in_loops): Removed.
2588 * sese.h (sese_reset_aux_in_loops): Removed.
2590 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2592 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2593 (dependency_in_loop_p): Same.
2594 (translate_clast): Do not use loop->aux. Initialize
2595 loop->can_be_parallel.
2596 (mark_loops_parallel): Removed.
2597 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2598 * graphite.c (free_aux_in_new_loops): Removed.
2599 (graphite_finalize): Do not call free_aux_in_new_loops.
2600 (graphite_transform_loops): Do not call mark_loops_parallel.
2602 2009-10-26 Li Feng <nemokingdom@gmail.com>
2604 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2605 (translate_clast): Pass an extra parameter LEVEL.
2606 Call get_scattering_level.
2607 * graphite-clast-to-gimple.h (get_scattering_level): New.
2609 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2611 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2612 * cfgloop.h (struct loop): New field single_iv.
2614 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2615 loop->aux anymore: use loop->single_iv.
2616 (graphite_loop_normal_form): Moved...
2617 (build_graphite_loop_normal_form): Removed.
2618 (gloog): Do not call build_graphite_loop_normal_form.
2619 (free_aux_in_new_loops): Moved...
2620 (mark_loops_parallel): Restructure.
2621 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2622 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2623 (scop_canonicalize_loops): New.
2624 (build_poly_scop): Call scop_canonicalize_loops.
2625 * graphite.c (free_aux_in_new_loops): ...here.
2627 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2629 * g++.dg/graphite/graphite.exp: Add the same rules as in
2630 gcc.dg/graphite/graphite.exp.
2632 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2634 * g++.dg/graphite/id-1.C: New.
2636 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2638 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2640 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2641 (rewrite_phi_out_of_ssa): Same.
2642 (rewrite_cross_bb_scalar_deps): Same.
2643 (translate_scalar_reduction_to_array): Same.
2645 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2647 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2650 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2652 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2653 (build_scop_drs): Call dump_alias_graphs.
2655 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2657 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2658 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2659 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2660 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2661 * graphite-poly.h (free_lst): New.
2662 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2663 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2665 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2667 * graphite-poly.h (struct scop): Add a field saved_schedule.
2668 (SCOP_SAVED_SCHEDULE): New.
2669 (store_lst_schedule): New.
2670 (restore_lst_schedule): New.
2671 (store_scattering): Call store_lst_schedule.
2672 (restore_scattering): Call restore_lst_schedule.
2674 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2676 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2677 (pdr_add_alias_set): Same.
2678 (build_poly_dr): Same.
2679 (build_alias_set_optimal_p): Same.
2680 (build_base_obj_set_for_drs): Same. Do not store the result of
2683 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2685 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2686 all_components_are_cliques to 1.
2688 2009-10-20 Li Feng <nemokingdom@gmail.com>
2690 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2692 (pdr_add_alias_set): Update retrieving alias_set_num.
2693 (build_poly_dr): Update retrieving dr_base_object_set.
2694 (partition_drs_to_sets): Remove.
2695 (build_alias_set_optimal_p): New.
2696 (build_alias_set_for_drs): Rename.
2697 (build_scop_drs): Update.
2698 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2699 (ALIAS_SET_INDEX): Remove.
2700 (BASE_OBJECT_SET_INDEX): Remove.
2702 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2704 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2706 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2708 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2709 loop upper bounds for 1-element arrays at end of structures.
2710 * tree-flow.h (array_at_struct_end_p): Declared.
2711 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2713 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2715 * g++.dg/graphite/pr41305.C: New.
2717 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2719 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2720 construction of parameter constraints from loop iteration analysis.
2721 * gcc.dg/graphite/run-id-2.c: New test.
2723 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2725 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2728 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2730 * graphite-dependences.c (dependence_polyhedron_1): Remove
2731 unused gdim dimensions from the DDR polyhedron.
2733 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2735 * graphite-dependences.c (pddr_transformed_scattering): New.
2736 (dot_original_deps_stmt_1): New.
2737 (dot_transformed_deps_stmt_1): New.
2738 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2739 dot_transformed_deps_stmt_1.
2740 (dot_original_deps): New.
2741 (dot_transformed_deps): New.
2742 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2744 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2746 * graphite-dependences.c (reduction_dr_1): Remove wrong
2747 assert: reduction BBs can have multiple reduction writes
2748 to memory. interchange-3.f90 is an example.
2750 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2752 * gfortran.dg/graphite/interchange-3.f90: New.
2754 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2756 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2758 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2760 * graphite-dependences.c (dependence_polyhedron_1): Add the
2761 context to the dependence polyhedron.
2763 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2765 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2766 PBB_PDR_DUPLICATES_REMOVED.
2767 (new_poly_bb): Same.
2769 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2771 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2773 (build_loop_iteration_domains): Extract bounds on parameters
2774 based on the data size.
2775 (build_scop_context): Do not initialize SCOP_CONTEXT;
2776 add new constraints.
2778 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2780 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2781 * graphite-ppl.h (graphite-ppl.h): Declared.
2783 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2785 * graphite-ppl.c (ppl_print_linear_expr): New.
2786 (debug_ppl_linear_expr): New.
2787 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2788 (debug_ppl_linear_expr): Declared.
2790 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2792 * graphite-interchange.c: Fix comments.
2793 * gcc.dg/graphite/block-1.c: Fix comments.
2795 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2797 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2798 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2800 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2802 Reapply the patch from Alexander Monakov that disappeared during
2803 the last merges from trunk.
2805 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2807 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2808 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2810 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2812 * graphite-interchange.c (memory_stride_in_loop): The depth
2813 argument corresponds to a dynamic time dimension, so use
2814 psct_dynamic_dim to refer to the transformed scattering dimension.
2816 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2818 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2820 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2822 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2824 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2825 the root of the LST.
2826 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2828 (print_lst): Print the root of LST in a different format.
2829 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2831 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2833 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2835 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2837 * doc/passes.texi: Document the Graphite infrastructure.
2839 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2841 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2842 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2843 and check the SSA representation.
2845 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2847 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2849 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2851 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2853 * gcc.dg/graphite/interchange-11.c: New.
2855 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2857 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2859 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2861 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2862 Add -fno-loop-strip-mine and -fno-loop-interchange.
2863 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2864 -fno-loop-strip-mine.
2865 * gfortran.dg/graphite/graphite.exp: Same.
2867 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2869 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2870 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2871 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2872 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2873 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2874 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2875 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2876 DEFAULT_FLAGS_GRAPHITE_SCOP.
2877 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2878 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2880 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2882 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2884 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2885 Sebastian Pop <sebastian.pop@amd.com>
2887 * graphite-interchange.c (build_linearized_memory_access): Pass an
2888 offset as parameter.
2889 (memory_stride_in_loop): Include transform scattering in the
2890 access functions to be able to querry the strides in the
2892 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2893 not the psct_iterator_dim.
2895 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2897 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2898 (lst_do_strip_mine_loop): New.
2899 (lst_do_strip_mine): New.
2900 (scop_do_strip_mine): Call lst_do_strip_mine.
2901 * graphite-poly.h (lst_add_loop_under_loop): New.
2902 (lst_find_first_pbb): New.
2904 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2906 * graphite-poly.c (loop_to_lst): Fix LST creation.
2908 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2910 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2911 sizeof(unsigned long) to make it run on 32bit systems.
2913 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2915 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2918 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2920 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2922 (write_alias_graph_to_ascii_dot): New.
2923 (write_alias_graph_to_ascii_ecc): Ditto.
2924 (partition_drs_to_sets): Add testing of optimality of current method
2925 which assigns alias numbers according to DFS Comopnent number. used
2926 as heuristic for the upcoming ECC algorithm.
2927 (build_scop_drs): Write to file also with the ecc and dot format.
2929 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2931 * gfortran.dg/graphite/interchange-1.f: XFail.
2933 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2935 * graphite.c (graphite_initialize): Do not handle functions with
2936 more than 100 basic blocks.
2938 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2940 * graphite-blocking.c (pbb_do_strip_mine): Use
2941 PARAM_LOOP_BLOCK_TILE_SIZE.
2943 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2945 * graphite-poly.c (dot_lst_1): New.
2947 * graphite-poly.h (dot_lst): Declared.
2949 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2951 * graphite-dependences.c (dot_deps_stmt_1): New.
2952 (dot_deps_stmt): New.
2953 * graphite-dependences.h (dot_deps_stmt): Declared.
2955 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2957 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2958 not replace cross BB scalar dependences ending on PHI nodes.
2959 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2961 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2963 * graphite-poly.c (apply_poly_transforms): Implement the high
2964 level driver for flag_loop_block.
2965 * opts.c (decode_options): Enable flag_loop_block at -O2.
2966 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2969 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2971 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2974 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2976 * graphite-poly.h (lst_find_pbb): New.
2977 (find_lst_loop): New.
2979 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2981 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2982 * graphite-poly.h (struct scop): Remove dep_graph field.
2983 (SCOP_DEP_GRAPH): Removed.
2985 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2987 * graphite-poly.h (copy_lst): Do full copy of LST.
2989 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2991 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2992 when the loop stride is zero.
2994 * gcc.dg/graphite/id-16.c: New.
2996 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2998 * graphite-dependences.c (reduction_dr_1): New.
2999 (reduction_dr_p): New.
3000 (graphite_legal_transform_dr): Call reduction_dr_p.
3001 (reduction_ddr): Renamed reduction_ddr_p.
3002 * graphite-poly.h (same_pdr_p): New.
3003 (number_of_write_pdrs): New.
3004 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
3005 (split_reduction_stmt): Do not split reduction statements
3006 when there are no writes to memory.
3007 (translate_scalar_reduction_to_array_for_stmt): Insert the
3008 memory reduction statement just after the scalar reduction statement.
3010 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
3012 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
3013 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
3015 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
3017 * graphite-interchange.c (lst_apply_interchange): New.
3018 (lst_interchange_profitable_p): New.
3019 (lst_try_interchange_loops): New.
3020 (lst_try_interchange): New.
3021 (lst_do_interchange): New.
3022 (pbb_do_interchange): Removed.
3023 (scop_do_interchange): Call lst_do_interchange.
3025 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
3027 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
3028 SCOP_TRANSFORMED_SCHEDULE.
3033 * graphite-poly.h (lst_p): New.
3036 (LST_LOOP_FATHER): New.
3039 (scop_to_lst): Declared.
3040 (print_lst): Declared.
3041 (debug_lst): Declared.
3042 (new_lst_loop): New.
3043 (new_lst_stmt): New.
3046 (lst_dewey_number): New.
3047 (struct scop): Add original_schedule and transformed_schedule fields.
3048 (SCOP_ORIGINAL_SCHEDULE): New.
3049 (SCOP_TRANSFORMED_SCHEDULE): New.
3050 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
3052 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3054 * graphite-dependences.c (reduction_ddr): New.
3055 (graphite_legal_transform_bb): Call reduction_ddr.
3056 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
3057 Initialize PBB_IS_REDUCTION.
3058 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
3059 (PBB_IS_REDUCTION): New.
3060 (new_poly_bb): Update declaration.
3061 * graphite-scop-detection.h (build_scop_bbs): Removed.
3062 (nb_reductions_in_loop): Removed.
3063 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
3064 parameter for reductions.
3065 (try_generate_gimple_bb): Update call to new_poly_bb.
3066 (build_scop_bbs_1): Same.
3067 (build_scop_bbs): Same.
3068 (gsi_for_phi_node): New.
3069 (scalar_close_phi_node_p): Remove gcc_assert.
3070 (split_reduction_stmt): New.
3071 (is_reduction_operation_p): New.
3072 (phi_contains_arg): New.
3073 (follow_ssa_with_commutative_ops): New.
3074 (detect_commutative_reduction_arg): New.
3075 (detect_commutative_reduction_assign): New.
3076 (follow_inital_value_to_phi): New.
3077 (edge_initial_value_for_loop_phi): New.
3078 (initial_value_for_loop_phi): New.
3079 (detect_commutative_reduction): New.
3080 (translate_scalar_reduction_to_array_for_stmt): New.
3081 (insert_copyout): New.
3082 (insert_copyin): New.
3083 (translate_scalar_reduction_to_array): New.
3084 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
3085 (rewrite_commutative_reductions_out_of_ssa_loop): New.
3086 (rewrite_commutative_reductions_out_of_ssa): New.
3087 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
3088 * sese.h (split_region_for_bb): New.
3090 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
3091 * gcc.dg/graphite/interchange-1.c: Fix format.
3092 * gcc.dg/graphite/interchange-10.c: New.
3094 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3096 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
3099 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3101 * graphite-sese-to-poly.c (scev_analyzable_p): New.
3102 (rewrite_cross_bb_scalar_dependence): New.
3103 (rewrite_cross_bb_scalar_deps): New.
3104 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
3105 Call rewrite_cross_bb_scalar_deps.
3107 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3109 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
3110 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
3113 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3115 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
3116 * graphite-interchange.c (pbb_do_interchange): Same.
3117 * graphite-poly.c (print_scattering_function): Same.
3119 * graphite-poly.h (pbb_loop): New.
3120 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
3122 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3124 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
3126 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3128 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
3129 so don't pass a pointer to it.
3130 (build_alias_set_for_drs): Same.
3131 (build_base_obj_set_for_drs): Same.
3132 (build_scop_drs): Same.
3134 2009-09-26 Li Feng <nemokingdom@gmail.com>
3136 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
3137 the alias graph of data references.
3139 2009-09-25 Li Feng <nemokingdom@gmail.com>
3141 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
3142 (build_scop_drs): When debugging, write the alias graph to file,
3143 otherwise, should be disabled.
3145 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3147 * Merge from mainline (151310:151361).
3149 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3151 * Merge from mainline (151171:151310).
3153 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3155 * Merge from mainline (151171:151806).
3157 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3159 * Revert the last commit.
3161 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3163 * Merge from mainline (151171:151819).
3165 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3167 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
3168 (is_simple_operand): Remove call to stmt_simple_memref_p.
3169 (stmt_simple_for_scop_p): Update call to is_simple_operand.
3171 2009-09-17 David Edelsohn <edelsohn@gnu.org>
3173 * gcc.dg/graphite/interchange-mvt.c: New File.
3174 * gcc.dg/graphite/scop-dsyrk.c: New File.
3175 * gcc.dg/graphite/scop-dsyr2k.c: New File.
3176 * gcc.dg/graphite/scop-mvt.c: New File.
3177 * gcc.dg/graphite/scop-sor.c: New File.
3179 2009-09-17 Li Feng <nemokingdom@gmail.com>
3181 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
3182 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
3183 (graphite_carried_dependence_level_k): Ditto.
3184 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
3185 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
3186 (new_poly_dr): Adjust declaration.
3187 * graphite-sese-to-poly.c (free_data_refs_aux): New.
3188 (free_gimple_bb): Added free_data_refs_aux.
3189 (build_poly_dr): Add dr_base_object_set.
3190 (partition_drs_to_sets): New.
3191 (dr_same_base_object_p): New.
3192 (build_alias_set_for_drs): New.
3193 (build_base_object_set_for_drs): New.
3194 (build_scop_drs): Add build_base_obj_set_for_drs.
3195 * graphite-sese-to-poly.h: Added #define for alias set number index and
3196 base object set index.
3197 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
3198 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
3200 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
3202 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3203 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
3205 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3207 * graphite-sese-to-poly.c (struct irp_data): Removed.
3208 (idx_record_params): Removed.
3209 (find_params_in_bb): Scan for parameters the access functions; don't
3210 parse the tree representation.
3212 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3214 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
3215 passes at -O1 and below.
3217 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3219 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
3220 tree-scalar-evolution.h, and then tree-data-ref.h.
3221 * graphite-clast-to-gimple.c: Same.
3222 * graphite-dependences.c: Same.
3223 * graphite-interchange.c: Same.
3224 * graphite-poly.c: Same.
3225 * graphite-scop-detection.c: Same.
3226 * graphite-sese-to-poly.c: Same.
3228 * lambda-code.c: Same.
3229 * matrix-reorg.c: Same.
3230 * tree-data-ref.c: Same.
3231 * tree-if-conv.c: Same.
3232 * tree-loop-distribu: Same.: Same.
3233 * tree-loop-linear.c: Same.
3234 * tree-parloops.c: Same.
3235 * tree-predcom.c: Same.
3236 * tree-vect-patterns.c: Same.
3238 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
3240 Partially revert the previous patch, except the following.
3241 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
3242 as parameters the operands of the not expression.
3244 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3246 * tree-scalar-evolution.c (instantiate_scev_assign): New.
3247 Do not call analyze_scalar_evolution on assignments.
3248 (instantiate_scev_phi): Call analyze_scalar_evolution.
3249 (instantiate_scev_name): Call instantiate_scev_assign and
3250 instantiate_scev_phi.
3251 (instantiate_scev_not): Adapted to pass as parameters the operands
3252 of the not expression.
3254 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3256 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
3257 to pass as parameters the operands of the binary expression.
3259 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3261 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
3262 instantiate_scev_not. Handle NEGATE_EXPR.
3263 (instantiate_scev_r): Handle NEGATE_EXPR.
3265 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3267 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
3269 (instantiate_scev_r): Move code in instantiate_scev_2
3270 and instantiate_scev_1.
3272 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3274 * tree-scalar-evolution.c (instantiate_scev_3): New.
3275 (instantiate_scev_1): Move code in instantiate_scev_3.
3277 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3279 * tree-scalar-evolution.c (instantiate_scev_poly): New.
3280 (instantiate_scev_1): Move code in instantiate_scev_poly.
3282 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3284 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3285 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3287 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3289 * tree-scalar-evolution.c (instantiate_scev_convert): New.
3290 (instantiate_scev_1): Move code in instantiate_scev_convert.
3292 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3294 * tree-scalar-evolution.c (instantiate_scev_binary): New.
3295 (instantiate_scev_1): Move code in instantiate_scev_binary.
3297 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3299 * tree-scalar-evolution.c (instantiate_scev_name): New.
3300 (instantiate_scev_1): Move code in instantiate_scev_name.
3302 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3304 * Merge from mainline (150992:151171).
3306 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3308 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3310 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3312 * graphite-dependences.c (graphite_legal_transform_bb): Call
3313 pbb_remove_duplicate_pdrs.
3314 * graphite-poly.c (can_collapse_pdr): Removed.
3315 (pdr_find_duplicate): Removed.
3316 (can_collapse_pdrs): New.
3317 (pbb_remove_duplicate_pdrs): New.
3318 (new_poly_dr): Do not look for duplicates.
3319 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3320 (PBB_PDR_DUPLICATES_REMOVED): New.
3321 (pbb_remove_duplicate_pdrs): Declared.
3323 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3325 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3326 the strides by multiplying by PDR_NB_REFS.
3327 * graphite-poly.c (can_collapse_pdr): New.
3328 (pdr_find_duplicate): New.
3329 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
3330 Initialize PDR_NB_REFS.
3331 * graphite-poly.h (struct poly_dr): Add field nb_refs.
3333 (new_poly_dr): Number of subscripts is a graphite_dim_t.
3335 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3337 Revert one of the previous commits:
3338 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3339 the computation of symmetric data dependence relations.
3340 (dependency_between_pbbs_p): Same.
3342 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3345 * graphite-poly.c (apply_poly_transforms): Remove legality test before
3348 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3350 * graphite-dependences.c (pddr_original_scattering): Return NULL
3351 for read-read dependence relations.
3352 * graphite-poly.h (enum poly_dr_type): Fix comment.
3355 (pdr_may_write_p): New.
3357 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3359 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3360 (struct poly_dr): Same.
3361 (new_poly_dr): Same.
3362 * graphite-poly.c (new_poly_dr): Same.
3364 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3365 Sebastian Pop <sebastian.pop@amd.com>
3367 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3368 pbb_strip_mine_time_depth. Changed the implementation so that
3369 transformation is expressed as a transformation on
3370 time (scatttering) dimensions. Also, ensures that the 2d+1
3371 scheduling format is preserved.
3372 (pbb_strip_mine_profitable_p): Profitability is based on the
3373 iteration number of a given time (scattering) dimension,
3374 and not on a original loop depth dimension.
3375 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3376 (pbb_do_strip_mine): Call psct_dynamic_dim.
3377 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3378 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3379 (pbb_nb_dynamic_scattering_transform): New.
3380 (psct_dynamic_dim): New.
3382 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3384 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3385 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3386 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3387 * graphite-interchange.c (build_linearized_memory_access): Same.
3388 (memory_stride_in_loop): Same.
3390 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3392 * graphite-dependences.c (pddr_original_scattering): New.
3393 (graphite_legal_transform_dr): Call pddr_original_scattering.
3396 * graphite-dependences.h (dot_deps): Declared.
3397 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3398 (print_pdr): Print PDR_ID.
3399 * graphite-poly.h (struct poly_dr): Add field id.
3402 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3404 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
3406 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3407 not delete the original dependence relation.
3409 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3411 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3412 the computation of symmetric data dependence relations.
3413 (dependency_between_pbbs_p): Same.
3415 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3417 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3418 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3419 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3420 (free_poly_ddr): New.
3421 (pddr_is_empty): New.
3422 (dependence_polyhedron_1): Now returns a poly_ddr_p.
3423 (dependence_polyhedron): Same. Remove useless gcc_assert.
3425 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3426 (graphite_carried_dependence_level_k): Call pddr_is_empty.
3427 * graphite-dependences.h (enum poly_dependence_kind): New.
3428 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
3429 (PDRP_SOURCE): Renamed PDDR_SOURCE.
3430 (PDRP_SINK): Renamed PDDR_SINK.
3431 (PDRP_DDP): Renamed PDDR_DDP.
3433 (free_poly_ddr): Declared.
3434 * graphite-poly.c (new_scop): Use the new hash function names.
3435 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3436 into original_pddrs.
3437 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3439 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3441 * Merge from mainline (150764:150992).
3443 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3445 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3446 bounds with LT_EXPR to make niter analysis more precise on code
3447 generated by Graphite.
3449 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3451 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3452 (graphite_legal_transform_bb): Same.
3453 (poly_drs_may_alias_p): Same.
3455 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
3458 * graphite-ppl.c (ppl_max_for_le): Correct the use of
3459 ppl_Pointset_Powerset_C_Polyhedron_maximize.
3461 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3463 * graphite-poly.c (print_pbb): Print PBB index.
3465 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3467 * Merge from mainline (r150672:150764).
3469 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3471 * graphite-interchange.c (ppl_max_for_le): Moved...
3472 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3473 * graphite-ppl.c (ppl_max_for_le): ... here.
3474 * graphite-ppl.h (ppl_max_for_le): Declared.
3476 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
3478 * Merge from mainline (r150372:150672).
3480 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3483 * sese.c (convert_for_phi_arg): New.
3484 (add_guard_exit_phis): Use convert_for_phi_arg.
3486 * gfortran.dg/graphite/id-17.f: New.
3488 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3490 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3491 unknown subscript upper bounds.
3493 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3495 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3496 Pranav Garg <pranav.garg2107@gmail.com>
3498 * graphite-interchange.c (gather_access_strides): Removed.
3499 (ppl_max_for_le): New.
3500 (build_linearized_memory_access): New.
3501 (memory_stride_in_loop): New.
3502 (pbb_interchange_profitable_p): Reimplemented.
3503 * graphite-ppl.h (ppl_new_id_map): New.
3504 (ppl_interchange): New.
3506 * gcc.dg/graphite/interchange-6.c: XFAILed.
3508 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3510 * graphite-interchange.c (compute_subscript): Removed.
3511 (compute_array_size_cstr): Removed.
3512 (compute_array_size_poly): Removed.
3513 (compute_array_size): Removed.
3514 (gather_access_strides_poly): Removed.
3515 (gather_access_strides): Empty.
3517 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3519 * graphite-dependences.c (dependence_polyhedron_1): Replace
3520 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3521 (graphite_legal_transform_dr): Same.
3522 (graphite_carried_dependence_level_k): Same.
3523 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3524 Initialize PDR_NB_SUBSCRIPTS.
3525 (print_pdr_access_layout): Replace pdr_nb_subscripts with
3527 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3528 (PDR_NB_SUBSCRIPTS): New.
3529 (pdr_nb_subscripts): Removed.
3530 (pdr_dim): Simplified.
3531 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3532 with PDR_NB_SUBSCRIPTS.
3534 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3536 * graphite-interchange.c (compute_array_size): Remove use of
3538 * graphite-poly.c (new_poly_dr): Remove argument data_container.
3539 Do not initialize PDR_DATA_CONTAINER.
3540 (print_pdr): Do not print PDR_DATA_CONTAINER.
3541 * graphite-poly.h (struct poly_dr): Remove data_container field.
3542 (PDR_DATA_CONTAINER): Removed.
3543 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3545 (build_poly_dr): Same.
3547 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3549 * gcc.dg/graphite/interchange-9.c: New.
3551 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3552 Sebastian Pop <sebastian.pop@amd.com>
3554 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3555 copy of the dependence polyhedron. Free the temporary objects.
3556 (graphite_carried_dependence_level_k): Free unused objects before
3559 * gcc.dg/graphite/interchange-1.c: XFAILed.
3560 * gcc.dg/graphite/interchange-2.c: XFAILed.
3561 * gcc.dg/graphite/interchange-3.c: XFAILed.
3562 * gcc.dg/graphite/interchange-4.c: XFAILed.
3563 * gcc.dg/graphite/interchange-7.c: XFAILed.
3565 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3567 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3568 Early return without analyzing the data dependences if no
3569 transform has been done. Call restore_scattering if the transform
3571 (graphite-interchange.c): Same.
3572 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3573 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3574 (apply_poly_transforms): Do not gcc_assert that
3575 the transform is legal.
3576 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3577 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3578 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3579 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3580 * graphite-poly.h (struct poly_scattering): New.
3581 (struct poly_bb): Add original, transformed, and saved fields.
3582 Remove transformed_scattering, original_scattering, nb_local_variables,
3583 and nb_scattering_transform fields.
3584 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3585 (poly_scattering_new): New.
3586 (poly_scattering_free): New.
3587 (poly_scattering_copy): New.
3588 (store_scattering_pbb): New.
3589 (store_scattering): New.
3590 (restore_scattering_pbb): New.
3591 (restore_scattering): New.
3592 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3593 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3595 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3597 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3600 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3602 * Makefile.in (graphite.o): Depends on PREDICT_H.
3603 * graphite.c: Include predict.h.
3604 (graphite_finalize): Call tree_estimate_probability.
3605 * predict.c (predict_loops): Do not call scev_initialize and
3607 (tree_estimate_probability_bb): New.
3608 (tree_estimate_probability): Do not initialize loops: move that
3609 code to the driver. Call tree_estimate_probability_bb.
3610 (tree_estimate_probability_driver): New.
3611 (pass_profile): Use tree_estimate_probability_driver.
3612 * predict.h (tree_estimate_probability): Declared.
3614 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3616 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3617 * graphite-dependences.c (graphite_legal_transform): Add time to
3618 TV_GRAPHITE_DATA_DEPS.
3619 (dependency_between_pbbs_p): Same.
3620 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3622 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3624 * Merge from mainline (r149952:150372).
3626 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3628 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3629 * graphite-blocking.c: Same.
3630 * graphite-clast-to-gimple.c: Same.
3631 * graphite-dependences.c: Same.
3632 * graphite-poly.c: Same.
3633 * graphite-poly.h: Same.
3634 * graphite-ppl.c: Same.
3635 * graphite-scop-detection.c: Same.
3636 * graphite-sese-to-poly.c: Same.
3639 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3641 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3642 (remove_simple_copy_phi): New.
3643 (remove_invariant_phi): New.
3644 (simple_copy_phi_p): New.
3645 (reduction_phi_p): New.
3646 (gsi_for_ssa_name_def): New.
3647 (insert_out_of_ssa_copy): New.
3648 (insert_out_of_ssa_copy_on_edge): New.
3649 (create_zero_dim_array): New.
3650 (scalar_close_phi_node_p): New.
3651 (rewrite_close_phi_out_of_ssa): New.
3652 (rewrite_phi_out_of_ssa): New.
3653 (rewrite_reductions_out_of_ssa): New.
3654 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3656 * gcc.dg/graphite/id-11.c: New.
3657 * gcc.dg/graphite/id-15.c: New.
3658 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3659 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3660 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3661 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3662 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3663 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3664 * gfortran.dg/graphite/id-13.f: New.
3665 * gfortran.dg/graphite/id-5.f: New.
3667 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3669 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3670 check that nb_reductions_in_loop is zero.
3671 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3672 reduction phi nodes.
3673 (nb_reductions_in_loop): Removed.
3674 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3675 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3676 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3677 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3678 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3680 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3682 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3683 statements that have an empty iteration domain.
3684 * gfortran.dg/graphite/id-16.f: New.
3686 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3688 * tree-scalar-evolution.c (instantiate_scev_1): Return
3689 chrec_dont_know when the result is not above instantiate_below.
3690 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3691 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3692 the tree has a known scalar evolution.
3693 * gfortran.dg/graphite/id-14.f: New.
3694 * gfortran.dg/graphite/id-15.f: New.
3696 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3698 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3700 (rename_variables): Keep inserting renames after the ones already
3703 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3705 * graphite-sese-to-poly.c (compare_bb_depths): New.
3706 (graphite_sort_dominated_info): New.
3707 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3708 (build_scop_scattering): Fix comment.
3710 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3712 * graphite.c (graphite_finalize): Call print_loops instead of
3713 dump_function_to_file.
3714 * gcc.dg/graphite/graphite.exp: Fix formatting.
3715 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3716 loops generated in the graphite output file.
3717 * gcc.dg/graphite/pr35356-2.c: New.
3718 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3719 * gfortran.dg/graphite/id-12.f: New.
3721 2009-07-24 Li Feng <nemokingdom@gmail.com>
3723 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3726 2009-07-24 Li Feng <nemokingdom@gmail.com>
3727 Tobias Grosser <grosser@fim.uni-passau.de>
3729 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3730 alias set number build alias in ACCESSES polyhedron.
3731 (build_alias_set_for_drs): New.
3732 (build_pbb_drs): Added build_alias_set_for_drs.
3733 * graphite-dependences.c (poly_drs_may_alias_p): New.
3734 (graphite_carried_dependence_level_k): Check alias information
3735 before building polyhedron.
3737 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3739 * Makefile.in (lambda-code.o): Fix formatting.
3741 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3743 * Merge from mainline (r149350-149952)
3745 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3747 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3748 before interchange to prepare for loop blocking.
3750 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3752 * graphite-poly.c (apply_poly_transforms): Add checks after every
3754 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3755 done in apply_poly_transforms.
3757 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3759 * graphite-dependences.c (build_lexicographically_gt_constraint):
3760 Replace RES parameter with *RES.
3761 (dependence_polyhedron_1): Pass an address of the parameter RES
3762 instead of value of RES.
3764 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3766 * graphite.c (graphite_finalize): Fix comment.
3767 (graphite_transform_loops): Reset scev info after code generation
3770 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3772 * graphite.c (graphite_finalize): Call scev_reset.
3774 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3776 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3777 GBB_CLOOG_IV_TYPES hash table twice.
3778 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3779 (add_condition_to_domain): Clear GMP values.
3781 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3783 * graphite-dependences.c: Fix formatting.
3784 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3785 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3786 * graphite-sese-to-poly.c: Fix formatting.
3787 * graphite.c (graphite_transform_loops): Create the hash table
3788 after the early return.
3790 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3792 * gcc.dg/graphite/id-14.c: New.
3793 * gcc.dg/graphite/pr40157.c: New.
3794 * gfortran.dg/graphite/id-11.f: New.
3796 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3798 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3799 (build_poly_scop): Return false when there are no pbbs within
3800 loops to avoid to pass to cloog scops with no loops.
3802 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3804 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3805 useless test "i % 2".
3806 (build_pbb_scattering_polyhedrons): Fix formatting.
3807 (build_poly_dr): Same.
3808 * graphite.c (graphite_transform_loops): Restructure.
3810 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
3812 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3813 reduction_list parameter.
3814 (rewrite_all_phi_nodes_with_iv): Same.
3815 (canonicalize_loop_ivs): Same.
3816 * tree-parloops.c (struct brli): Removed.
3817 (build_reduction_list_info): Removed.
3818 (build_new_reduction): New.
3819 (analyze_reduction_list): Removed.
3820 (gather_scalar_reductions): Find reductions instead of phi
3821 nodes that can't be canonicalized.
3822 (try_create_reduction_list): Remove reduction_list parameter.
3823 (gen_parallel_loop): Same.
3824 (parallelize_loops): Remove analyze_reductions variable,
3825 initialization and free.
3826 Change reduction_list htab initialization to reduction_info
3827 elements instead of ssa names.
3828 Call try_create_reduction_list and gen_parallel_loop without
3829 analyzed_reduction argument.
3830 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3831 canonicalize_loop_ivs with one less argument.
3832 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3834 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3836 * graphite-dependences.c (new_poly_dr_pair): New.
3837 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3838 (new_poly_dr_pair): New.
3839 (eq_poly_dr_pair_p): New.
3840 (hash_poly_dr_pair_p): New.
3841 * graphite-dependences.h (struct poly_dr_pair): New.
3842 (eq_poly_dr_pair_p): Declared.
3843 (hash_poly_dr_pair_p): Declared.
3844 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3845 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3846 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3847 * Makefile.in (graphite-poly.o): Add dependence on
3848 graphite-dependences.h.
3850 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3852 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3853 polynomials of degree > 1 pass to Graphite.
3854 * tree-chrec.c (scev_is_linear_expression): Call
3855 evolution_function_is_affine_multivariate_p.
3856 * gfortran.dg/graphite/id-10.f90: New.
3858 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3860 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3861 Instantiate scevs varying in outer loops.
3862 * gfortran.dg/graphite/id-9.f: Correct testcase.
3864 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3866 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3867 redundant constraint.
3869 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3871 * gcc.dg/graphite/graphite.exp: Fix comments.
3872 * gfortran.dg/graphite/graphite.exp: Trigger actions
3873 based on the file names as in the C testsuite.
3874 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3875 * gfortran.dg/graphite/block-2.f: Same.
3876 * gfortran.dg/graphite/block-3.f90: Same.
3877 * gfortran.dg/graphite/block-4.f90: Same.
3878 * gfortran.dg/graphite/id-1.f90: Same.
3879 * gfortran.dg/graphite/id-2.f90: Same.
3880 * gfortran.dg/graphite/id-3.f90: Same.
3881 * gfortran.dg/graphite/id-4.f90: Same.
3882 * gfortran.dg/graphite/id-6.f: Same.
3883 * gfortran.dg/graphite/id-9.f: Same.
3884 * gfortran.dg/graphite/interchange-1.f: Same.
3885 * gfortran.dg/graphite/interchange-2.f: Same.
3886 * gfortran.dg/graphite/scop-1.f: Same.
3888 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3890 * sese.c (expand_scalar_variables_call): New.
3891 (expand_scalar_variables_ssa_name): Handle calls in expander.
3893 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3895 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3896 Expect to see the pattern twice.
3897 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3898 * gcc.dg/graphite/interchange-5.c: Same.
3899 * gcc.dg/graphite/interchange-6.c: Same.
3901 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3903 * gcc.dg/graphite/id-10.c: New.
3904 * gcc.dg/graphite/id-12.c: New.
3905 * gfortran.dg/graphite/id-7.f: New.
3906 * gfortran.dg/graphite/id-8.f: New.
3908 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3910 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3913 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3915 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3917 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3919 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3921 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3923 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3924 building PDR subscripts.
3926 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3928 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3929 computation of array sizes.
3931 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3933 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3935 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3937 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3938 build_pairwise_constraint, dr_equality_constraints,
3939 build_pairwise_scheduling_equality,
3940 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3941 build_lexicographically_gt_constraint, dependence_polyhedron,
3942 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3943 Move from NNC_Polyhedron to C_Polyhedron.
3944 * graphite-interchange.c (compute_array_size_poly,
3945 gather_access_strides): Dito.
3946 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3947 free_scop, pbb_number_of_iterations): Dito.
3948 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3949 pbb_dim_iter_domain, struct scop): Dito.
3950 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3951 new_Cloog_Domain_from_ppl_Polyhedron,
3952 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3953 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3954 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3955 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3956 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3957 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3958 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3959 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3960 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3961 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3962 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3963 build_scop_iteration_domain, build_poly_dr): Dito
3965 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3967 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3969 * gcc.dg/graphite/run-id-1.c: New.
3971 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3973 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3974 positivity constraint on the symbolic number of iterations.
3976 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3978 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3980 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3981 Tobias Grosser <grosser@fim.uni-passau.de>
3983 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3984 (build_cloog_prog): Directly use SCOP_CONTEXT.
3985 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3986 (free_scop): Free SCOP_CONTEXT.
3987 (print_scop_context): New.
3988 (print_scop): Call print_scop_context.
3989 (debug_scop_context): New.
3990 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3991 (struct scop): Added field context.
3992 (SCOP_CONTEXT): New.
3993 * graphite-sese-to-poly.c (add_param_constraints): New.
3994 (build_scop_context): New.
3995 (build_poly_scop): Call build_scop_context.
3997 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3999 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
4000 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
4001 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
4002 * graphite-ppl.h: Include double-int.h and tree.h.
4003 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
4004 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
4005 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
4006 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
4008 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4010 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
4011 POINTER_PLUS_EXPR for pointer types.
4012 (clast_to_gcc_expression): Same.
4014 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
4016 * graphite-poly.c (print_scattering_function): Early return when
4017 PBB_TRANSFORMED_SCATTERING is not initialized.
4018 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
4020 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
4022 * tree-parloops.c (analyze_reduction_list): Remove unused variable
4025 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
4027 * tree-parloops.c (analyze_reduction_list): Change return
4029 (try_create_reduction_list): Move the call to
4030 analyze_reduction_list to the beginining.
4031 Call reduction_phi with analyzed_reductions as argument
4032 instead of reduction_list.
4034 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
4036 * Merge from mainline (r148296:149346)
4038 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4040 * graphite-scop-detection.c (graphite_can_represent_init): New.
4041 (graphite_can_represent_scev): Call graphite_can_represent_init:
4042 check that the initial value does not contain multiplications of
4044 (stmt_has_simple_data_refs_p): New.
4045 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
4046 (is_simple_operand): Fix formatting.
4047 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
4049 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4051 * gcc.dg/graphite/id-13.c: New.
4052 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
4053 analyze_scalar_evolution, use scalar_evolution_in_region.
4054 (scan_tree_for_params_right_scev): Add extra assert.
4055 (parameter_index_in_region_1): Split from parameter_index_in_region.
4056 (idx_record_params): Use scalar_evolution_in_region.
4057 (find_params_in_bb): Same.
4058 (find_scop_parameters): Same.
4059 (build_loop_iteration_domains): Same.
4060 (create_linear_expr_from_tree): Same.
4061 * sese.c (scalar_evolution_in_region): New.
4062 * sese.h (scalar_evolution_in_region): Declared.
4063 (defined_in_sese_p): New.
4064 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
4066 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
4069 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4071 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
4072 TREE_DATA_REF_H also implies SCEV_H.
4074 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4076 * graphite-poly.c (print_scop_params): New.
4077 (print_scop): Call print_scop_params.
4078 (debug_scop_params): New.
4079 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
4081 2009-07-07 Li Feng <nemokingdom@gmail.com>
4083 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
4084 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
4085 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
4086 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
4087 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
4088 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
4090 2009-07-07 Li Feng <nemokingdom@gmail.com>
4092 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
4093 for dependency checking part.
4094 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
4095 tests for dependency checking.
4096 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4097 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4098 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
4099 flag -fdump-tree-graphite-all for autopar testsuites.
4101 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
4103 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
4104 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
4105 canonicalize_loop_ivs): Moved...
4106 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
4108 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
4110 * tree-parloops.c (try_create_reduction_list): Pass an extra
4111 argument analyzed_reductions. Call analyze_reduction_list.
4112 (gen_parallel_loop): Do not call analyze_reduction_list.
4113 (parallelize_loops): Init and finalize analyzed_reductions.
4115 2009-07-06 Li Feng <nemokingdom@gmail.com>
4117 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4118 Added flag -fno-loop-strip-mine for autopar testcase.
4120 2009-07-04 Li Feng <nemokingdom@gmail.com>
4122 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
4123 transformed scattering dimension instead of unmatch orignal when
4124 calling dependence_polyhedron.
4126 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4128 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
4130 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4132 * graphite-poly.c (pbb_number_of_iterations): Check for returned
4133 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
4135 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4137 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
4138 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
4139 * graphite-poly.c (pbb_number_of_iterations): New.
4140 * graphite-poly.h (pbb_number_of_iterations): Declared.
4141 (pbb_iterator_dim, pbb_parameter_dim): New.
4143 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
4145 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
4146 last commit on type of lower and upper bound of loops.
4148 2009-06-29 Li Feng <nemokingdom@gmail.com>
4150 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
4151 graphite-dependences.h.
4152 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
4153 (mark_bb_with_pbb): New.
4154 (get_stmtfor_depth): New.
4155 (find_pbb_via_hash): New.
4156 (dependency_in_loop_p): New.
4157 (mark_loops_parallel): New.
4158 (free_aux_in_new_loops): New.
4159 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
4160 bb with it's relevant pbb. Mark newly created loops. Remove mark
4161 innermost loop parallel without checking.
4162 (gloog): Add parameter BB_PBB_MAPPING.
4163 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
4164 (gloog): Change declaration.
4165 (mark_loop_parallel): Make extern.
4166 (free_aux_in_new_loops): Declare.
4167 (bb_pbb_map_hash): New.
4168 (eq_bb_pbb_map): New.
4169 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
4170 auto parallelization when flag_graphite_force_parallel is set.
4171 (graphite_finalize): Added free_aux_in_new_loops.
4172 * tree-parloops.c (parallelize_loops): Only generate parallel code for
4173 the innermost loop that marked parallel. Use
4174 flag_graphite_force_parallel instead of loop->can_be_parallel.
4175 (loop_parallel_p): Move inner most checking out of function.
4177 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4179 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
4180 type of lower and upper bound of loops signed long int.
4182 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4184 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
4185 expression outside the loop.
4187 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4189 * gcc.dg/graphite/interchange-8.c: New.
4191 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4193 * gcc.dg/graphite/interchange-0.c: XFailed.
4194 * gcc.dg/graphite/interchange-5.c: XFailed.
4195 * gcc.dg/graphite/interchange-6.c: XFailed.
4197 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4199 * graphite-interchange.c (compute_array_size_poly): The end of the
4200 recursion should return 1.
4202 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4204 * graphite-interchange.c (compute_array_size_cstr): Allow the
4205 subscript multiplier to be -1.
4206 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
4207 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
4208 data_container. Initializes PDR_DATA_CONTAINER.
4209 (print_pdr_access_layout): New.
4210 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
4211 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
4213 (PDR_DATA_CONTAINER): New.
4214 (new_poly_dr): Update declaration.
4215 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
4216 (build_poly_dr): Call pdr_add_data_dimensions.
4218 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4220 * graphite-poly.h (struct poly_dr): Fix comment.
4221 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
4222 (pdr_add_memory_accesses): New.
4223 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
4225 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4227 * graphite-poly.c (print_pdrs, debug_pdrs): New.
4228 (print_pbb): Add call to print_pdrs.
4229 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
4231 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
4232 Li Feng <nemokingdom@gmail.com>
4234 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
4235 (dependency_between_pbbs_p): New.
4236 (lexicographically_gt_p): Assure !empty_p before polyhedron
4237 intersection assign.
4238 (build_lexicographically_gt_constraint): Correct lexicographically
4240 * graphite-dependences.h: New.
4241 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
4243 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4245 * graphite-clast-to-gimple.c (print_clast_stmt): New.
4246 (gloog): Print to dump_file the generated clast.
4247 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
4248 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
4250 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4252 * graphite-poly.c (extend_scattering): Increment
4253 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
4255 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4257 * graphite-interchange.c (compute_array_size_poly): Added exit of
4258 recursion condition. Continue iterating even after the first equality.
4259 (compute_array_size): Same.
4261 2009-06-24 Li Feng <nemokingdom@gmail.com>
4263 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
4264 -fdump-tree-final_cleanup to -fdump-tree-optimized.
4265 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4266 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4267 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
4269 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4271 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
4272 only when the use verifies is_gimple_reg.
4274 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4276 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
4277 Allocate scaldims after call to unify_scattering_dimensions.
4279 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4281 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4283 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4284 Albert Cohen <albert.cohen@inria.fr>
4286 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4287 variables for the strip mining.
4289 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4290 Pranav Garg <pranav.garg2107@gmail.com>
4292 * Makefile.in (OBJS-common): Added graphite-blocking.o.
4293 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4294 (graphite-blocking.o): New rule.
4295 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4296 * graphite-blocking.c: New.
4297 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4298 flag_loop_strip_mine.
4299 (psct_scattering_dim_for_loop_depth): New.
4300 * graphite-poly.h (scop_do_strip_mine): Declared.
4301 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4302 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4303 flag_loop_strip_mine.
4305 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4307 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4308 a GMP value and a PPL coefficient at each iteration of a loop.
4310 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4312 * graphite-dependences.c (dependence_polyhedron): Do not use
4313 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
4314 pbb_nb_scattering_transform.
4315 (graphite_legal_transform_dr): Same.
4316 * graphite-poly.c (extend_scattering): Same.
4317 (unify_scattering_dimensions): Same.
4318 (print_scattering_function): Same.
4319 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4320 PBB_NB_LOCAL_VARIABLES.
4321 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4322 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4323 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4324 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4325 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4326 (pbb_nb_scattering_transform): New.
4327 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4328 (psco_scattering_dim): Add assert on parameters.
4329 (psct_scattering_dim): Same.
4330 (psct_scattering_dim_for_loop_depth): Declared.
4331 (psct_local_var_dim): New.
4332 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4333 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
4334 correct layout, call pbb_nb_local_vars.
4335 (psct_add_local_variable, psct_add_scattering_dimension): New.
4336 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4337 Initialize PBB_NB_SCATTERING_TRANSFORM.
4339 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4341 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4342 (set_coef): Renamed ppl_set_coef.
4343 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4345 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4347 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4348 test a boolean against 1.
4349 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4350 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4351 (pbb_do_interchange): Returns true when a transform has been performed.
4352 (scop_do_interchange): Same.
4353 * graphite-poly.c (apply_poly_transforms): Use the return value of
4354 scop_do_interchange.
4355 * graphite-poly.h (scop_do_interchange): Update declaration.
4357 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
4359 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4361 * sese.c (sese_reset_aux_in_loops): New.
4362 * sese.h (sese_reset_aux_in_loops): New.
4364 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4366 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4367 multiplier and multiply the constant by the multiplier.
4368 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4369 (build_poly_dr): Do not use the multiplier to define the subscript.
4371 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4373 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4374 compiler's data reference. Initialize PDR_CDR.
4375 (print_pdr): Call dump_data_reference.
4376 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4377 Add compiler_dr field.
4378 (PDR_BB): Renamed PDR_PBB.
4380 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4381 GCC's data reference representation.
4382 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4383 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4385 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4387 * graphite-poly.c (print_scattering_function): Also print the layout.
4388 * graphite-poly.h (pbb_nb_local_vars): New.
4390 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4392 * graphite-poly.c (print_pbb_domain): Also print the layout names.
4394 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4396 * graphite-poly.c (print_pdr, debug_pdr): New.
4397 * graphite-poly.h (print_pdr, debug_pdr): Declared.
4398 (PDR_BASE): Removed.
4400 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4402 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4405 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4407 * graphite-interchange.c (compute_subscript): Allow also -1 in the
4408 subscript identification column.
4409 (pbb_do_interchange): Print to dump_file that some loops "will be
4410 interchanged". Rely on that chain of characters in the testcases.
4411 * gcc.dg/graphite/interchange-0.c: New.
4412 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4413 interchange-*.c files and compile them with -floop-interchange.
4415 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
4417 * graphite-interchange.c (interchange_profitable_p): Renamed
4418 pbb_interchange_profitable_p.
4420 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4421 Harsha Jagasia <harsha.jagasia@amd.com>
4422 Pranav Garg <pranav.garg2107@gmail.com>
4424 * graphite-interchange.c (interchange_profitable_p): Make static.
4425 (pbb_interchange_loop_depths, pbb_do_interchange,
4426 scop_do_interchange): New.
4427 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4428 for flag_loop_interchange.
4429 * graphite-poly.h (scop_do_interchange): Declared.
4430 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4431 flag_loop_interchange is used.
4433 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4435 * graphite-dependences.c (dependence_polyhedron): Update use of
4436 pbb_nb_scattering_dims.
4437 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4438 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4439 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4440 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4442 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4444 * graphite.c: Cleanup foo.
4446 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4448 * Merge from mainline (r143684:148293).
4449 * Disabled libpcp until it gets fixed.
4451 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
4452 Harsha Jagasia <harsha.jagasia@amd.com>
4454 * graphite-interchange.c: New.
4455 * Makefile.in (graphite-interchange.o): New.
4456 * graphite-poly.h (interchange_profitable_p): Declared.
4457 * graphite-ppl.h (value_max): New.
4459 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4461 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4462 * graphite-poly.h: Fix some comments.
4466 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4469 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4470 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4471 (pdr_accessp_nb_params): Renamed pdr_nb_params.
4472 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4473 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4474 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4475 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4476 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4477 * graphite-clast-to-gimple.c: Same.
4478 * graphite-dependences.c: Same.
4479 * graphite-poly.c: Same.
4480 * graphite-sese-to-poly.c: Same.
4482 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4484 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4485 expressions for an IV rename, as returned by clast_to_gcc_expression.
4486 (copy_renames): Rename new_name to expr.
4487 * sese.c (debug_rename_elt): Same.
4490 (sese_adjust_liveout_phis): Call force_gimple_operand before using
4491 the information from the rename map.
4492 (rename_variables_in_stmt): Same.
4493 (add_loop_exit_phis): Rename new_name to expr.
4494 (insert_loop_close_phis): Same.
4495 (add_guard_exit_phis): Same. Call force_gimple_operand.
4496 * sese.h (struct rename_map_elt): Rename new_name to expr.
4497 (new_rename_map_elt): Same.
4499 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4501 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4502 * sese.c (set_rename): Make it extern.
4503 * sese.h (set_rename): Declared.
4505 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4507 * graphite-poly.c (extend_scattering): Free values.
4508 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4510 (ppl_print_powerset_matrix): Same.
4511 * graphite-scop-detection.c (free_scops_1): New.
4512 (limit_scops): Call free_scops_1.
4513 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4514 (build_poly_dr): Free PPL coefficients.
4515 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4517 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
4519 * graphite-dependences.c: New.
4520 * graphite-data-ref.c: Removed.
4521 * graphite-data-ref.h: Removed.
4522 * Makefile.in (graphite-data-ref.o): Removed.
4523 (graphite-dependences.o): Added.
4524 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4525 * graphite-poly.c: Same.
4526 Move the data dependence testing to graphite-dependences.c.
4528 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
4530 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4531 from graphite_cannot_represent_loop. Code refactored.
4532 (scopdet_basic_block_info): Call graphite_can_represent_loop.
4534 2009-05-17 Li Feng <nemokingdom@gmail.com>
4536 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4537 Cover all the testcases (not only the filtered ones).
4539 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
4541 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4542 unnecessary check. Update comments. Move check for REAL_TYPE here.
4543 (harmful_stmt_in_bb): Remove checks for conditions. This is already
4544 done in (stmt_simple_for_scop_p).
4546 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
4548 * graphite.c (print_global_statistics): New.
4549 (print_graphite_scop_statistic): New.
4550 (print_graphite_statistics): New.
4551 (graphite_initialize, graphite_transform_loops): Print statistics.
4552 * graphite-scop-detection (build_scops): Print statistics.
4553 (print_graphite_scop_statistics): New.
4554 (print_graphite_statistics): New.
4556 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4558 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4559 (debug_clast_name_index): Removed.
4560 (debug_clast_name_indexes_1): Removed.
4561 (debug_clast_name_indexes): Removed.
4562 (clast_name_index_elt_info): Removed.
4563 (eq_clast_name_indexes): Removed.
4564 (clast_name_to_index): Removed.
4565 (new_clast_name_index): Removed.
4566 (save_clast_name_index): Removed.
4567 (save_var_name): Moved...
4568 (init_sese_params_index): Removed.
4569 (clast_name_to_gcc): Remove use of name_tree.
4570 (initialize_cloog_names): Same.
4571 (gloog): Do not call init_sese_params_index.
4572 * graphite-sese-to-poly.c (save_var_name): ...here.
4573 (parameter_index_in_region): New.
4574 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4575 (parameter_index_in_region): Removed.
4576 (is_parameter): Remove use of name_tree.
4577 * sese.h (struct name_tree): Removed.
4578 (struct sese): Remove use of name_tree. New field params_names.
4579 (SESE_PARAMS_NAMES): New.
4580 (SESE_PARAMS): Remove duplicate.
4581 (parameter_index_in_region): Removed.
4582 (sese_nb_params): Remove use of name_tree.
4583 (struct clast_name_index): New.
4584 (new_clast_name_index): New.
4585 (clast_name_to_index): New.
4586 (save_clast_name_index): New.
4587 (debug_clast_name_index): New.
4588 (debug_clast_name_indexes_1): New.
4589 (debug_clast_name_indexes): New.
4590 (clast_name_index_elt_info): New.
4591 (eq_clast_name_indexes): New.
4593 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4595 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4596 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4597 (graphite_loop_normal_form): Do not pass region. Do not
4598 initialize SESE_OLDIVS.
4599 (build_graphite_loop_normal_form): Update call to
4600 graphite_loop_normal_form.
4601 * sese.c (debug_oldivs): Removed.
4602 (new_sese): Do not initialize SESE_OLDIVS.
4603 (free_sese): Do not free SESE_OLDIVS.
4604 (oldiv_for_loop): Removed.
4605 * sese.h (struct sese): Remove old_ivs.
4606 (SESE_OLDIVS): Removed.
4607 (oldiv_for_loop): Removed.
4609 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4611 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4612 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4613 replaced by a call to newivs_to_depth_to_newiv.
4614 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4615 (clast_to_gcc_expression_red): Same.
4616 (gcc_type_for_clast_expr): Same.
4617 (gcc_type_for_clast_eq): Same.
4618 (graphite_translate_clast_equation): Same.
4619 (graphite_create_guard_cond_expr): Same.
4620 (graphite_create_new_guard): Same.
4621 (graphite_create_new_loop): Same.
4622 (build_iv_mapping): Same.
4623 (translate_clast): Same.
4625 (loop_iv_stack_patch_for_consts): Removed. *
4626 sese.c (iv_stack_entry_is_constant): Removed.
4627 (iv_stack_entry_is_iv): Removed.
4628 (loop_iv_stack_push_iv): Removed.
4629 (loop_iv_stack_insert_constant): Removed.
4630 (loop_iv_stack_pop): Removed.
4631 (loop_iv_stack_get_iv): Removed.
4632 (loop_iv_stack_get_iv_from_name): Removed.
4633 (debug_loop_iv_stack): Removed.
4634 (free_loop_iv_stack): Removed.
4635 (loop_iv_stack_remove_constants): Removed. *
4636 sese.h (iv_stack_entry_kind): Removed.
4637 (iv_stack_entry_data_union): Removed.
4638 (iv_stack_entry_struct): Removed.
4639 (iv_stack_entry_p): Removed.
4640 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4641 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4642 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4643 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4644 (gbb_loop_at_index): Fix indenting.
4645 (gbb_loop_index): Removed.
4647 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4649 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4650 Call clast_name_to_index.
4652 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4654 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4655 do not pass params. Get params from SESE_PARAMS.
4656 (clast_to_gcc_expression): Same.
4657 (clast_to_gcc_expression_red): Same.
4658 (gcc_type_for_clast_eq): Same.
4659 (graphite_translate_clast_equation): Same.
4660 (graphite_create_new_loop): Same.
4661 * sese.c (rename_variables_in_stmt): Fix comment.
4663 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4665 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4667 Call save_clast_name_index.
4668 (translate_clast): Pass newivs_index.
4669 (gloog): Create and free newivs_index.
4671 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4673 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4674 (clast_name_index_p): New type.
4675 (debug_clast_name_index): New.
4676 (debug_clast_name_indexes_1): New.
4677 (debug_clast_name_indexes): New.
4678 (clast_name_index_elt_info): New.
4679 (eq_clast_name_indexes): New.
4680 (clast_name_to_index): New.
4681 (new_clast_name_index): New.
4682 (save_clast_name_index): New.
4683 (init_sese_params_index): New.
4684 (gloog): Call init_sese_params_index.
4685 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4686 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4687 (free_sese): Free SESE_PARAMS_INDEX.
4688 * sese.h (struct sese): Add params_index.
4689 (SESE_PARAMS_INDEX): New.
4691 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4693 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4694 (graphite_create_new_loop): Pass the newivs vector. Push the
4695 newly created IV to newivs.
4696 (translate_clast): Pass the newivs vector.
4697 (gloog): Create and destroy the newivs vector.
4699 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4701 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4702 (graphite_loop_normal_form): Initialize loop->aux with the unique
4703 IV that has been created.
4705 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4707 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4708 scev with parameters in the base part. They where forbidden
4711 2009-05-11 Li Feng <nemokingdom@gmail.com>
4713 * gcc.dg/graphite/graphite.exp: Set different default
4714 compile options by file names.
4715 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4716 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4717 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4718 * gcc.dg/graphite/scop-matmult.c: Ditto.
4720 2009-05-08 Li Feng <nemokingdom@gmail.com>
4722 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4723 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4724 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4725 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4727 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4729 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4732 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4734 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4735 allow integer constant strides.
4736 (graphite_can_represent_expr): Depend on outermost_loop.
4737 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4738 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4739 build_scops_1): Same.
4740 (scopdet_basic_block_info): Same and insert layered SCoP
4742 (try_generate_gimple_bb): Cleanup.
4743 (build_scops): Enable data references.
4745 * gcc.dg/graphite/id-5.c: New.
4746 * gcc.dg/graphite/id-9.c: New.
4747 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4748 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4750 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4752 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4753 that we have not yet built for this SCoP.
4755 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4757 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4758 for complex numbers.
4760 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4762 * graphite-ppl.c: Fix build if cloog is not available.
4764 2009-05-04 Li Feng <nemokingdom@gmail.com>
4766 * tree-parloops.c (loop_parallel_p): Remove construction of
4767 NITER and REDUCTION_LIST.
4768 (try_get_loop_niter): New.
4769 (try_create_reduction_list): New.
4770 (parallelize_loops): Bypass the failed checkings in autopar
4771 when can_be_parallel in loop structure is set to true.
4773 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4775 * gcc.dg/graphite/id-6.c: Update testcase.
4776 * gcc.dg/graphite/scop-3.c: Dito.
4778 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4780 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4781 Enable EQ_EXPR and NE_EXPR again.
4783 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4785 * graphite-scop-detection.c (graphite_can_represent_scev):
4786 Add check if scev is affine multivariate.
4787 (harmful_stmt_in_bb): Check if we can represent the conditions.
4788 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4790 * gcc.dg/graphite/id-7.c: New.
4792 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4794 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4795 Check all bbs in region, not only the bbs that are represented in
4797 (build_poly_scop): Add newline.
4798 * gcc.dg/graphite/id-8.c: New.
4800 2009-04-30 Li Feng <nemokingdom@gmail.com>
4802 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4803 when loop initialize.
4804 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4805 * common.opt: Declare flag_graphite_force_parallel.
4806 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4808 * graphite-poly.c (apply_poly_transforms): Introduce
4809 flag_graphite_force_parallel.
4810 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4811 * toplev.c (process_options): ditto and replace a not correctly
4814 2009-04-30 Li Feng <nemokingdom@gmail.com>
4816 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4817 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4818 to the redefinition.
4819 (compute_cloog_iv_types_1): ditto.
4820 (build_iv_mapping): ditto.
4821 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4823 (free_gimple_bb): Removed GBB_LOOPS related free part.
4824 (build_bb_loops): Removed.
4825 * sese.h (struct gimple_bb): Removed loops.
4826 (GBB_LOOPS): Removed.
4827 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4828 (gbb_loop_index): ditto.
4830 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4832 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4833 allow non constant strides.
4834 * gcc.dg/graphite/scop-20.c: New.
4836 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4838 * graphite-scop-detection.c (dot_all_scops): Fix system call
4839 return value warning.
4842 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4844 * gcc.dg/graphite/id-6.c: Fix pattern.
4845 * gcc.dg/graphite/scop-3.c: Same.
4847 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4849 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4850 build_pairwise_constraint, dr_equality_constraints,
4851 build_pairwise_scheduling_equality,
4852 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4853 build_lexicographically_gt_constraint, dependence_polyhedron,
4854 graphite_legal_transform_dr, graphite_legal_transform_bb,
4855 graphite_legal_transform): New.
4856 * graphite-poly.h (graphite_legal_transform): Declared.
4857 * graphite-sese-to-poly.c (build_poly_scop): Call to
4858 graphite_legal_transform is disabled for the moment.
4860 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4862 * graphite-poly.h (pbb_nb_scattering_dims): New.
4863 (pbb_nb_scattering): Use it.
4865 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4867 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4868 Pointset_Powerset version of ppl_insert_dimensions.
4869 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4871 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4873 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4875 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4877 * graphite-poly.h: Fix comment.
4879 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4881 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4883 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4885 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4888 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4890 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4891 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4894 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4896 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4897 handle EQ_EXPR and NE_EXPR.
4899 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4901 * graphite-poly.h (poly_dr): Fix comment.
4903 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4904 Tobias Grosser <grosser@fim.uni-passau.de>
4906 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4907 with a zero dimension polyhedron.
4908 (find_scop_parameters): Move the call to scop_set_nb_params here.
4909 (build_loop_iteration_domains): Store in loop->aux the iteration
4911 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4912 by any loop in scop.
4913 (build_poly_scop): Do not call scop_set_nb_params.
4915 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4916 Tobias Grosser <grosser@fim.uni-passau.de>
4918 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4919 add_condition_to_domain not GT_EXPR.
4921 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4923 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4924 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4925 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4926 upper_bound_assign to calculate unions.
4927 * gcc.dg/graphite/id-6.c: New.
4929 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4931 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4932 handle abnormal edges.
4934 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4936 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4937 (free_poly_bb): Also free poly_drs.
4938 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4939 (poly_dr): Polyhedron to Pointset_Powerset.
4940 (pdr_accessp_nb_subscripts): Same.
4941 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4944 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4946 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4947 names into more meaningful names.
4949 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4951 * gfortran.dg/graphite/interchange-1.c: New.
4952 * gfortran.dg/graphite/interchange-2.c: New.
4954 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4956 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4958 * tree-parloops.c (rewrite_phi_with_iv): New.
4959 (rewrite_all_phi_nodes_with_iv): New.
4960 (canonicalize_loop_ivs): Call them.
4962 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4964 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4965 graphite_find_data_references_in_stmt.
4966 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4967 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4969 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4971 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4973 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4975 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4976 instead of bb_in_region.
4977 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4978 (build_sese_conditions): Use flag_bb_in_sese.
4979 * sese.c (register_bb_in_sese): Removed.
4980 (new_sese): Remove initialization of SESE_REGION_BBS.
4981 (free_sese): Do not free SESE_REGION_BBS.
4982 * sese.h (struct sese): Remove field region_basic_blocks.
4983 (SESE_REGION_BBS): Removed.
4984 (bb_in_sese_p): Implement in function of bb_in_region.
4986 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4988 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4991 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4993 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4995 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4996 (add_condition_to_domain): New.
4997 (add_condition_to_pbb): New.
4998 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4999 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
5001 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
5003 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
5004 ppl_Pointset_Powerset.
5005 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
5006 * graphite-poly.h (poly_bb): poly_bb.domain Same.
5007 (pbb_nb_loops): Same.
5008 * graphite-sese-to-poly.c (build_loop_iteration_domains,
5009 add_conditions_to_domain): Same.
5010 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
5011 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
5012 ppl_const_Polyhedron_t.
5013 (ppl_print_powerset_matrix): New.
5014 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
5015 ppl_print_powerset_matrix): New.
5016 (ppl_print_polyhedron_matrix): Updated.
5018 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
5020 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
5022 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
5024 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
5025 (print_iteration_domains, debug_iteration_domain,
5026 debug_iteration_domains): New.
5027 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
5028 debug_iteration_domains): Declared.
5029 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
5032 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
5033 Sebastian Pop <sebastian.pop@amd.com>
5035 * graphite-poly.h (print_iteration_domain): New.
5036 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
5037 (build_sese_conditions_1, build_sese_conditions_after,
5038 build_sese_conditions_before): New.
5039 (build_sese_conditions): Rewritten.
5041 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
5042 Tobias Grosser <grosser@fim.uni-passau.de>
5044 Cleanup of code generation liveouts.
5045 * graphite-clast-to-gimple.c (translate_clast): Use a single
5046 rename_map instead of one per translated statement.
5047 Do not use SESE_LIVEOUT_RENAMES.
5048 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
5049 (gloog): Do not use SESE_LIVEOUT_RENAMES.
5050 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
5051 phi node of a reduction: when a loop contains a reduction used outside
5052 the loop, there should be a scalar close phi node on the exit block.
5053 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
5054 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
5055 (free_sese): Do not free them.
5056 (sese_build_liveouts_use): Do not use them.
5057 (sese_build_liveouts_bb): Same.
5058 (sese_build_liveouts): Same.
5059 (sese_insert_phis_for_liveouts): Same.
5060 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
5061 (defined_in_loop_p): New.
5062 (alive_after_loop): New.
5063 (close_phi_not_yet_inserted_p): New.
5064 (struct alep, alep_p): New.
5065 (add_loop_exit_phis): Remove from the rename_map all the names defined
5066 in the code generated loop.
5067 (insert_loop_close_phis): Traverse the rename_map passed to it.
5068 Don't use SESE_LIVEOUT_RENAMES.
5069 (default_liveout_before_guard): Renamed default_before_guard.
5070 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
5071 (graphite_copy_stmts_from_block): Do not directly call set_rename.
5072 (register_sese_liveout_renames): Removed.
5073 (copy_bb_and_scalar_dependences): Do not call it.
5074 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
5076 (SESE_LIVEOUT): Removed.
5077 (SESE_LIVEOUT_RENAMES): Removed.
5078 (SESE_REDUCTION_LIST): Removed.
5079 (sese_build_liveouts): Removed.
5080 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
5081 (insert_loop_close_phis): Pass a htab_t instead of a sese.
5082 (insert_guard_phis): Same.
5083 (rename_map_elt): Declare a VEC of them.
5084 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5085 trees not pointers to trees.
5087 Rewrite in canonical close SSA form:
5088 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
5089 (limit_scops): Close the scop after the block containing the close phi
5091 (canonicalize_loop_closed_ssa): New.
5092 (canonicalize_loop_closed_ssa_form): New.
5093 (build_scops): Call canonicalize_loop_closed_ssa_form.
5095 * graphite-sese-to-poly.c: Fix typos.
5097 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
5099 * graphite-poly.c (print_scattering_function, print_pbb_domain):
5101 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
5102 (print_pbb): Add conditions.
5104 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
5105 Sebastian Pop <sebastian.pop@amd.com>
5107 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
5108 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
5109 (build_scop_bbs_1): New.
5110 (build_scop_bbs): Rewrite.
5111 * sese.h (bb_in_region): New.
5113 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5115 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5117 (print_scop): Style.
5118 * graphite-poly.h (poly_bb): Add drs vector.
5119 (PBB_DRS): Add accessor.
5120 * graphite-sese-to-poly.c (build_poly_dr): New.
5121 (build_pbb_drs, build_scop_drs): New.
5122 (build_poly_scop): call build_scop_drs (Disabled at the moment).
5124 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5126 * tree-ssa-loop.c: Include forgotten toplev.h
5128 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5130 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
5131 * gcc.dg/graphite/pr37883.c: Remove -floop-*
5132 * gcc.dg/graphite/pr37928.c: Same
5133 * gcc.dg/graphite/pr38409.c: Same
5134 * gcc.dg/graphite/pr38498.c: Same
5135 * gcc.dg/graphite/pr38559.c: Same
5136 * gcc.dg/graphite/pr39335.c: Same
5137 * gcc.dg/graphite/pr39335_1.c: Same
5138 * gfortran.dg/graphite/block-2.f: Same
5139 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
5142 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
5144 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
5145 build_access_matrix, build_scop_data_accesses): Remove access function
5146 building. (We get a new version soon).
5147 (build_bb_loops, scan_tree_for_params_right_scev): Update.
5148 * sese.h (nb_loops_around_loop_in_sese): Remove.
5149 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
5151 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
5152 Sebastian Pop <sebastian.pop@amd.com>
5154 * graphite-scop-detection.c (struct scopdet_info): Rename last
5156 (scopdet_basic_block_info, build_scops_1): Don't use
5157 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
5159 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
5160 Sebastian Pop <sebastian.pop@amd.com>
5162 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
5163 * sese.c (sese_build_liveouts_use): Renamed from
5164 sese_build_livein_liveouts_use. Remove liveins.
5165 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
5166 Call sese_build_liveouts_use.
5167 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
5168 Call sese_build_liveouts_bb.
5169 (new_sese, free_sese): Remove liveins.
5170 (sese_add_exit_phis_var): Deleted.
5171 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
5173 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
5175 * sese.h (sese): Remove num_ver and livein.
5176 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
5178 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
5180 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
5182 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
5184 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
5185 (build_scop_scattering): Do not use compare_prefix_loops any more.
5186 (nb_common_loops): New.
5188 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5190 * sese.c (get_new_name_from_old_name): Renamed get_rename.
5191 (register_old_and_new_names): Renamed set_rename.
5193 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5195 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
5196 of the decl from the previous commit.
5198 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5200 * graphite-scop-detection.c (dot_scop): New.
5201 * graphite-scop-detection.h (dot_scop): Declared.
5203 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5205 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
5207 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5209 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
5210 condition at the end of the loop.
5211 * graphite.c (graphite_initialize, graphite_finalize): Print to
5212 dump_file the compiled function.
5213 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
5214 of create_empty_loop_on_edge.
5215 (translate_clast): Update the code generation of loops for the new
5217 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
5219 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5221 Reverted the patch from 2009-03-19.
5223 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
5225 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5227 (print_scop): Style.
5228 * graphite-poly.h (poly_bb): Add drs vector.
5229 (PBB_DRS): Add accessor.
5230 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
5231 (build_access_matrix_with_af, build_access_matrix,
5232 build_scop_data_accesses): Delete.
5233 (build_poly_dr): New.
5234 (build_pbb_drs, build_scop_drs): New.
5235 (build_poly_scop): call build_scop_drs.
5237 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
5239 * graphite-scop-detection.c (dot_all_scops_1): Close the table
5240 once per basic block.
5242 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5244 * graphite-scop-detection.c (graphite_can_represent_scev): New.
5245 (graphite_can_represent_expr): Renamed from loop_affine_expr
5247 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
5248 (graphite_cannot_represent_loop): Add scop_entry to parameters.
5249 (scopdet_basic_block_info): Actually define entry_block.
5250 (stmt_simple_memref_p): Moved here from ...
5252 * tree-data-ref.c (stmt_simple_memref_p): here.
5253 * tree-data-ref.h (stmt_simple_memref_p): Removed.
5255 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5257 * gcc.dg/graphite/id-4.c: New.
5259 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5261 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5262 (register_old_and_new_names): Update the content of the map.
5263 When there was already a rename_map_elt in the map at that
5265 (copy_bb_and_scalar_dependences): Do rename_variables after
5266 expand_scalar_variables.
5267 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5268 of the map. When there was already a rename_map_elt in the
5269 map at that location, free it.
5270 (translate_clast): Pass the rename_map. Do not initialize and free
5271 a rename_map per stmt_user.
5272 (gloog): Initialize and free one rename_map and pass it to
5275 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5277 * sese.c (expand_scalar_variables_stmt,
5278 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5280 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5281 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5282 the gimple_stmt_iterator of the statement to be expanded.
5283 * graphite-scop-detection.c (is_simple_operand): Do handle
5286 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5288 * graphite-scop-detection.c (is_simple_operand): Do not handle
5290 * gcc.dg/graphite/id-2.c: New.
5292 * graphite-sese-to-poly.c (build_bb_loops,
5293 add_value_to_dim, scan_tree_for_params_right_scev,
5294 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5295 find_params_in_bb, build_loop_iteration_domains,
5296 add_conditions_to_domain): Remove subtract.
5298 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5300 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5301 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5302 pbb_loop_at_index -> gbb_loop_at_index.
5303 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5304 (debug_loop_vec): Delete.
5305 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5306 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
5307 (PBB_LOOPS): Removed.
5308 (PBB_BLACK_BOX): Insert cast.
5309 (pbb_set_black_box): New setter.
5310 (pbb_loop_at_index, pbb_loop_index): Removed.
5311 (scop_set_region, scop_set_nb_params): New.
5312 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5313 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5314 (build_poly_scop): Use scop_set_nb_params.
5315 * sese.h (gimple_bb): Add LOOPS.
5316 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5318 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5320 Revert previous commit.
5322 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5324 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5325 (register_old_and_new_names): Update the content of the map.
5326 When there was already a rename_map_elt in the map at that
5328 (copy_bb_and_scalar_dependences): Do rename_variables after
5329 expand_scalar_variables.
5330 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5331 of the map. When there was already a rename_map_elt in the
5332 map at that location, free it.
5333 (translate_clast): Pass the rename_map. Do not initialize and free
5334 a rename_map per stmt_user.
5335 (gloog): Initialize and free one rename_map and pass it to
5338 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5340 Remove forgotten line in revert.
5342 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5344 Revert previous commit.
5346 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5348 * sese.c (register_old_and_new_names): Update the content
5349 of the map. When there was already a rename_map_elt in the
5350 map at that location, free it.
5351 (copy_bb_and_scalar_dependences): Do rename_variables after
5352 expand_scalar_variables.
5353 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5354 of the map. When there was already a rename_map_elt in the
5355 map at that location, free it.
5356 (translate_clast): Pass the rename_map. Do not initialize and free
5357 a rename_map per stmt_user.
5358 (gloog): Initialize and free one rename_map and pass it to
5361 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5363 * graphite-clast-to-gimple.c (translate_clast): context_loop
5366 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5367 Sebastian Pop <sebastian.pop@amd.com>
5369 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5370 of the use of ppl_Polyhedron_map_space_dimensions.
5372 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5373 Sebastian Pop <sebastian.pop@amd.com>
5375 * graphite-poly.c (unify_scattering_dimensions): Fix types.
5376 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5377 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5378 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5379 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5380 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5381 pbb_nb_params): New.
5382 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5383 nb_loops_around_pbb): Adapt return types.
5385 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
5387 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5388 graphite-clast-to-gimple.o, graphite-data-ref.o,
5389 graphite-scop-detection.o, graphite-poly.o): Add
5392 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
5394 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5395 graphite-clast-to-gimple.o, graphite-data-ref.o,
5396 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5398 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5400 * gcc.dg/graphite/pr37485.c: Remove -floop-block
5401 * gcc.dg/graphite/pr37828.c: Same.
5402 * gcc.dg/graphite/pr37684.c: Same.
5403 * gcc.dg/graphite/block-0.c: Same.
5404 * gcc.dg/graphite/block-1.c: Same.
5405 * gcc.dg/graphite/block-2.c: Same.
5406 * gcc.dg/graphite/block-3.c: Same.
5407 * gcc.dg/graphite/block-4.c: Same.
5408 * gcc.dg/graphite/block-5.c: Same.
5409 * gcc.dg/graphite/block-6.c: Same.
5410 * gfortran.dg/graphite/pr38083.f90: Same.
5411 * gfortran.dg/graphite/block-1.f90: Same.
5412 * gfortran.dg/graphite/block-3.f90: Same.
5413 * gfortran.dg/graphite/pr37852.f90: Same.
5414 * gfortran.dg/graphite/block-4.f90: Same.
5415 * gfortran.dg/graphite/pr37980.f90: Same.
5416 * gfortran.dg/graphite/pr38953.f90: Same.
5417 * gfortran.dg/graphite/pr37857.f90: Same.
5418 * opts.c: Remove -floop-block from -O2.
5419 * graphite-poly.c: Fail if -floop-block -floop-interchange or
5420 -floop-strip-mine are used.
5422 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5423 Sebastian Pop <sebastian.pop@amd.com>
5425 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5427 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5428 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5429 strip_mine_profitable_p, is_interchange_valid,
5430 graphite_trans_bb_block, graphite_trans_loop_block,
5431 graphite_trans_scop_block): Temporary removed.
5432 (extend_scattering, unify_scattering_dimensions): New.
5433 (print_scattering_function, graphite_read_transforms):
5434 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5435 (graphite_generate_scattering_fns): Removed.
5436 (apply_poly_transforms): Cleanup.
5437 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5438 (schedule_to_scattering): Moved.
5439 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5440 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5441 (pbb_nb_scattering): New.
5442 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5443 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5445 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5447 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5448 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
5449 -> PBB_TRANSFORMED_SCATTERING.
5450 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5451 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5452 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5453 (check_poly_representation): Do not return bool.
5454 (graphite_transform_loops): Reformat.
5455 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5457 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
5459 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5460 debug_pbb_domain, debug_pbb, debug_scop): New.
5461 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5462 debug_pbb_domain, debug_pbb, debug_scop): Declared.
5464 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5467 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5468 when the type precision of the induction variable should be
5469 larger than the type precision of nit.
5470 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5471 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5472 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5474 * gcc.dg/graphite/pr39335_1.c: New.
5475 * gcc.dg/graphite/pr39335.c: New.
5477 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5479 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5480 SSA_NAMES not struct reduction_info.
5482 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5484 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5486 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5487 Tobias Grosser <grosser@fim.uni-passau.de>
5489 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5490 (free_sese): Free SESE_REDUCTION_LIST.
5491 * sese.h (struct sese): Add field reduction_list.
5492 (SESE_REDUCTION_LIST): New.
5493 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5494 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5496 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5497 Tobias Grosser <grosser@fim.uni-passau.de>
5499 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5502 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5503 Tobias Grosser <grosser@fim.uni-passau.de>
5505 * tree-parloops.c (struct brli, build_reduction_list_info,
5506 analyze_reduction_list, gather_scalar_reductions): New.
5507 (loop_parallel_p): Build a reduction list containing only
5508 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5509 (gen_parallel_loop): Call the analysis analyze_reduction_list.
5510 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5511 * tree-flow.h (gather_scalar_reductions): Declared.
5513 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
5516 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5517 number_of_iterations_exit from a gcc_assert.
5519 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
5520 Jan Sjodin <jan.sjodin@amd.com>
5522 * output.h (graphite_out_file, graphite_in_file): Declared.
5523 * toplev.c (graphite_out_file, graphite_in_file): New.
5524 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5525 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5526 Don't call schedule_to_scattering.
5527 * common.opt (fgraphite-write, fgraphite-read): New.
5528 * graphite-poly.c: Include output.h.
5529 (print_scattering_function, print_scattering_functions,
5530 debug_scattering_function, debug_scattering_functions,
5531 graphite_write_transforms, graphite_read_transforms,
5532 graphite_generate_scattering_fns): New.
5533 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5534 Call graphite_generate_scattering_fns, graphite_write_transforms,
5535 graphite_read_transforms.
5536 (new_poly_bb): Initialize PBB_SCATTERING.
5537 (free_poly_bb): Free PBB_SCATTERING.
5538 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5539 * graphite-poly.h (struct poly_bb): Add field scattering.
5540 (PBB_SCATTERING): New.
5541 (print_scattering_function, print_scattering_functions,
5542 debug_scattering_function, debug_scattering_functions): Declared.
5543 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5544 GMP values, not integers!
5545 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5546 ppl_read_polyhedron_matrix): New.
5547 * graphite-ppl.h (ppl_print_polyhedron_matrix,
5548 debug_ppl_polyhedron_matrix,
5549 ppl_read_polyhedron_matrix): Declared.
5550 * Makefile.in (graphite-poly.o): Depends on output.h.
5552 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5553 Tobias Grosser <grosser@fim.uni-passau.de>
5556 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5557 scalar evolutions in the scop_entry->loop_father.
5559 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5560 Tobias Grosser <grosser@fim.uni-passau.de>
5562 * graphite.h (ref_nb_loops): Remove declaration.
5563 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5564 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5565 debug_gbb): Moved to sese.h.
5568 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5569 Tobias Grosser <grosser@fim.uni-passau.de>
5571 * graphite-data-ref.[ch]: Disable.
5573 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5574 Tobias Grosser <grosser@fim.uni-passau.de>
5576 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5577 scalar evolutions in the scop_entry->loop_father.
5579 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5581 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5582 (graphite_cannot_represent_loop_niter): Renamed
5583 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5584 (limit_scops): build_sese_loop_nests does not return a bool.
5585 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5586 * sese.c (nb_reductions_in_loop): ... from here.
5587 (graphite_loop_normal_form): ... from here.
5588 (sese_record_loop): Does not fail, so does not return a bool.
5589 (build_sese_loop_nests): Same.
5590 * sese.h (build_sese_loop_nests): Update declaration.
5591 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5592 (build_graphite_loop_normal_form): New.
5593 (gloog): Call build_graphite_loop_normal_form.
5594 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5595 build_sese_loop_nests.
5597 * gcc.dg/graphite/id-1.c: New.
5599 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5600 Tobias Grosser <grosser@fim.uni-passau.de>
5602 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5603 The SCoP detection fix is sufficient.
5605 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5607 PR tree-optimization/39260
5608 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5609 the basic block contains a condition with a real type.
5610 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5612 * gcc.dg/graphite/pr39260.c: New.
5614 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5616 * graphite-poly.c: Inlcude params.h.
5617 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5619 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5620 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5622 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5623 Tobias Grosser <grosser@fim.uni-passau.de>
5625 * graphite-scop-detection.c (dot_all_scops_1,
5626 dot_all_scops): Moved here.
5627 * graphite-scop-detection.h (dot_all_scops): Declared here.
5628 * graphite.c (graphite_initialize, graphite_finalize): New.
5629 (graphite_transform_loops): Cleaned up.
5630 * sese.c (debug_oldivs): Moved here.
5631 * graphite-poly.c (graphite_apply_transformations): Renamed
5632 apply_poly_transforms.
5633 (debug_loop_vec): Moved here.
5634 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5635 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5636 find_scop_parameters, build_scop_iteration_domain,
5637 add_conditions_to_constraints, build_scop_canonical_schedules,
5638 build_scop_data_accesses): Now static.
5639 (build_poly_scop, check_poly_representation): New.
5641 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5643 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5644 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5645 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5646 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5647 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5648 scan_tree_for_params, struct irp_data, dx_record_params,
5649 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5650 build_loop_iteration_domains, add_conditions_to_domain,
5651 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5652 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5653 build_sese_conditions, add_conditions_to_constraints,
5654 build_scop_iteration_domain, build_access_matrix_with_af,
5655 build_access_matrix,
5656 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5658 * graphite-sese-to-poly.c: New.
5659 * graphite-sese-to-poly.h: New.
5661 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5663 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5665 * graphite.c: Split graphite code generation to a new file.
5666 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5667 max_precision_type, clast_to_gcc_expression_red,
5668 clast_to_gcc_expression, gcc_type_for_clast_expr,
5669 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5670 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5671 graphite_create_new_guard, clast_get_body_of_loop,
5672 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5673 graphite_create_new_loop, build_iv_mapping, copy_renames,
5674 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5675 compute_cloog_iv_types, free_scattering, save_var_name,
5676 initialize_cloog_names, build_scop_context, build_cloog_prog,
5677 set_cloog_options, debug_clast_stmt, scop_to_clast,
5678 print_generated_program, debug_generated_program,
5679 gloog): Moved to graphite-clast-to-gimple.c.
5681 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5683 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5684 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5685 loop_iv_stack_pop, loop_iv_stack_get_iv,
5686 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5687 free_loop_iv_stack, loop_iv_stack_remove_constants,
5688 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5689 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5690 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5691 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5692 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5693 get_vdef_before_sese, sese_adjust_vphi,
5694 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5695 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5696 is_iv, expand_scalar_variables_ssa_name,
5697 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5698 expand_scalar_variables, rename_variables, remove_condition,
5699 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5700 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5701 default_liveout_before_guard, add_guard_exit_phis,
5702 insert_guard_phis, register_old_and_new_names,
5703 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5704 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5705 if_region_set_false_region, create_if_region_on_edge,
5706 move_sese_in_condition): Moved to sese.c.
5708 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5709 if_region_exit, if_region_get_condition_block,
5710 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5711 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5712 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5713 ivtype_map_elt, new_ivtype_map_elt,
5714 recompute_all_dominators): Moved to sese.h.
5716 * graphite-clast-to-gimple.c: New.
5717 * graphite-clast-to-gimple.h: New.
5718 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5719 * sese.c: Modified as said above.
5722 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5724 * graphite.c: Split scop detection to a new file.
5725 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5726 move_sd_regions, loop_affine_expr, exclude_component_ref,
5727 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5728 graphite_cannot_represent_loop_niter, struct scopdet_info,
5729 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5730 find_single_entry_edge, find_single_exit_edge,
5731 create_single_entry_edge, sd_region_without_exit,
5732 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5733 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5734 Moved to graphite-scop-detection.c.
5736 * graphite-scop-detection.c: New.
5737 * graphite-scop-detection.h: New.
5738 * Makefile.in: Add new rule for graphite-scop-detection.o.
5740 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5741 tree-scalar-evolution.h.
5742 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5743 build_sese_loop_nests): Moved here from graphite.c.
5744 (param_index): Renamed parameter_index_in_region.
5746 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5747 Sebastian Pop <sebastian.pop@amd.com>
5749 * gcc.dg/graphite/block-0.c: Expected to fail now.
5750 * gcc.dg/graphite/block-1.c: Same.
5751 * gcc.dg/graphite/block-5.c: Same.
5752 * gcc.dg/graphite/block-6.c: Same.
5754 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5755 Sebastian Pop <sebastian.pop@amd.com>
5757 * graphite.h: Separate from graphite_bb_p the polyhedral
5758 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5759 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5760 graphite-data-ref.h.
5761 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5762 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5763 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5764 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5765 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5766 scop_nb_params): Moved to graphite-poly.h.
5767 * graphite-data-ref.c: Same.
5768 * graphite-data-ref.h: New.
5770 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5771 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5772 is_interchange_valid, graphite_trans_bb_block,
5773 graphite_trans_loop_block, scop_max_loop_depth,
5774 graphite_trans_scop_block, graphite_apply_transformations,
5775 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5777 * graphite-poly.h: New.
5778 * graphite-poly.c: New.
5779 * Makefile.in (OBJS-common): Add graphite-poly.o.
5780 (graphite-poly.o): New rule.
5781 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5784 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5785 Tobias Grosser <grosser@fim.uni-passau.de>
5787 * graphite.c: Replace gb -> gbb.
5789 * graphite-data-ref.c: Same.
5791 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5792 Tobias Grosser <grosser@fim.uni-passau.de>
5794 * Makefile.in (OBJS-commmon): Add sese.o.
5796 (graphite.o): Add sese.h.
5797 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5798 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5799 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5801 (block_before_scop): Add missing return.
5802 (new_scop, free_scop): Remove SESE data structures.
5803 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5804 find_scop_parameters, build_loop_iteration_domains,
5805 add_conditions_to_domain, register_scop_liveout_renames,
5806 copy_bb_and_scalar_dependences): Scop -> SESE.
5808 (add_conditions_to_domain): SCoP -> SESE and remove check
5809 (scop_contains_non_iv_scalar_phi_nodes): New.
5810 (build_scop_conditions_1, build_scop_conditions): Remove check for
5811 non iv scalar phi nodes.
5812 (print_scop_statistics): New.
5813 (graphite_transform_loops): Cleanup.
5815 * graphite.h: Move to sese & cleanup.
5819 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5820 Tobias Grosser <grosser@fim.uni-passau.de>
5822 * graphite.c (build_scop_conditions_1): Conditions are only
5823 at the end of a basic block.
5825 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5826 Tobias Grosser <grosser@fim.uni-passau>
5828 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5830 (GBB_ALPHA): Removed.
5832 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5833 Tobias Grosser <grosser@fim.uni-passau.de>
5835 * graphite-data-ref.c (graphite_test_dependence): Don't use
5836 GBB_DYNAMIC_SCHEDULE.
5837 * graphite.c (new_graphite_bb): Same.
5838 (free_graphite_bb): Same.
5839 (build_scop_dynamic_schedules): Removed.
5840 (graphite_transform_loops): Don't call it.
5841 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5842 (GBB_DYNAMIC_SCHEDULE): Removed.
5844 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5845 Tobias Grosser <grosser@fim.uni-passau.de>
5847 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5848 (print_graphite_bb): Same.
5849 (build_cloog_prog): Same.
5851 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5852 Tobias Grosser <grosser@fim.uni-passau.de>
5854 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5856 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5857 Tobias Grosser <grosser@fim.uni-passau.de>
5859 * graphite.c (build_scop_context): Don't use CloogMatrix.
5860 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5861 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5863 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5864 Tobias Grosser <grosser@fim.uni-passau.de>
5866 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5867 liveout_renames, add_params fields...
5868 (struct sese): ... here.
5869 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5870 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5872 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5873 Tobias Grosser <grosser@fim.uni-passau.de>
5875 * graphite.c (print_scop): Do not print the CLooG program.
5876 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5877 build_cloog_prog, gloog): Don't use SCOP_PROG.
5878 (find_transform): Renamed scop_to_clast.
5879 (print_generated_program, debug_generated_program): New.
5880 (graphite_transform_loops): Adapt to new interface.
5881 * graphite.h (struct scop): Remove program field.
5882 (SCOP_PROG): Removed.
5883 (print_generated_program, debug_generated_program): Declared.
5885 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5887 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5888 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5889 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5890 free_graphite_bb, build_scop_canonical_schedules,
5891 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5892 schedules are now represented using a ppl_Linear_Expression_t.
5893 * graphite.h (struct graphite_bb): Same.
5894 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5895 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5897 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5899 * graphite.c: Free local memory.
5900 * graphite-ppl.c: Same.
5902 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5904 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5905 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5906 swap_constraint_variables, scale_constraint_variable): Removed.
5907 (graphite_trans_bb_strip_mine): Remove pong.
5908 * graphite-ppl.c: Include missing header files.
5909 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5910 * graphite-ppl.h (ppl_strip_loop): Declared.
5911 * Makefile.in (graphite-ppl.o): Adjust dependences.
5913 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5915 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5916 (build_scop_iteration_domain): Same.
5918 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5920 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5922 (add_value_to_dim, scan_tree_for_params_right_scev,
5923 scan_tree_for_params_int): New.
5924 * graphite-ppl.c (oppose_constraint): New.
5925 (insert_constraint_into_matrix): Implement missing cases.
5926 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5928 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5930 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5931 use ppl_move_dimension.
5933 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5935 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5938 * graphite-ppl.c: Same.
5939 * graphite-ppl.h: Same.
5941 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5943 Revert last 3 commits.
5945 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5947 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5949 (add_value_to_dim, scan_tree_for_params_right_scev,
5950 scan_tree_for_params_int): New.
5951 * graphite-ppl.c (oppose_constraint): New.
5952 (insert_constraint_into_matrix): Implement missing cases.
5953 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5955 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5957 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5959 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5960 Tobias Grosser <grosser@fim.uni-passau.de>
5962 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5963 use ppl_move_dimension.
5964 * graphite-ppl.c (ppl_move_dimension): New.
5965 * graphite-ppl.h (ppl_move_dimension): Declared.
5967 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5969 * graphite.c: Do not include cloog/cloog.h.
5970 (print_graphite_bb): Remove ping pong, call PPL print function.
5972 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5974 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5975 (graphite.o): Add dependence on graphite-ppl.h.
5976 (graphite-ppl.o): New.
5977 (graphite-data-ref.c): Ping pong between PPL data structures
5979 * graphite-ppl.c: New.
5980 * graphite-ppl.h: New.
5981 * graphite.c: Include graphite-ppl.h.
5982 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5983 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5984 Ping pong between PPL data structures and matrices.
5985 (new_graphite_bb): Create a PPL constraint system.
5986 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5987 (build_loop_iteration_domains): Use PPL functions.
5988 * graphite.h: Include graphite-ppl.h. Fix comments.
5989 (graphite_bb): Use a ppl_Constraint_System_t instead of
5990 CloogMatrix for representing the domain.
5991 (scop): Remove static_schedule.
5992 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5994 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5996 * graphite.c: Fix some comments.
5998 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
6001 * graphite.c (if_region_set_false_region): After moving a region
6002 in the false branch of a condition, remove the empty dummy
6004 (gloog): Remove wrong fix for PR38953.
6006 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
6008 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
6009 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
6010 register_bb_in_sese, new_sese, free_sese): Moved.
6011 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
6012 outermost_loop_in_scop, build_scop_iteration_domain,
6013 expand_scalar_variables_ssa_name, get_vdef_before_scop,
6014 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
6015 Use loop_in_sese_p instead of loop_in_scop_p.
6016 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
6017 (free_scop): Do not free SCOP_BBS_B.
6018 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
6019 ref_nb_loops): Moved here...
6020 * graphite.h (ref_nb_loops): ... from here.
6021 (struct scop): Remove bbs_b bitmap.
6022 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
6023 * gcc.dg/graphite/scop-19.c: New
6025 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
6027 * graphite.c (scopdet_basic_block_info): Fix bug in scop
6030 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
6032 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6033 eq_loop_to_cloog_loop): Remove.
6034 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
6035 * graphite.h (struct scop): Remove loop2cloog_loop.
6036 (loop_domain_dim, loop_iteration_vector_dim): Remove.
6038 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
6040 * opts.c (decode_options): Only add graphite options to O2
6041 if we compile with graphite enabled.
6043 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
6045 * Merge from mainline (r143163:143684).
6047 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
6049 * graphite.c (debug_value): Removed.
6050 * graphite.h (debug_value): Removed.
6052 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6054 * passes.c (init_optimization_passes): Do not call pass_copy_prop
6055 after graphite: pass_copy_prop does not maintain a proper loop closed
6056 SSA form. pass_copy_prop should be fixed.
6058 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6060 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
6062 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6064 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
6065 (gloog): Split the exit of the scop when the scop exit is a loop exit.
6066 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
6069 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
6071 * graphite.c (gloog): Return true when code gen succeeded.
6072 (graphite_transform_loops): Do not call cleanup_tree_cfg if
6073 the code of the function did not changed. After cleanup_tree_cfg
6074 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
6077 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
6079 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
6080 gimple_call_lhs is NULL.
6082 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
6083 Tobias Grosser <tobi.grosser@amd.com>
6085 * graphite.c (graphite_trans_scop_block): Do not block single
6088 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
6089 Tobias Grosser <tobi.grosser@amd.com>
6091 * graphite.c (build_scop_canonical_schedules): Start schedules at
6094 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
6095 Tobias Grosser <tobi.grosser@amd.com>
6097 * graphite.c (compare_prefix_loops): New.
6098 (build_scop_canonical_schedules): Rewritten.
6099 (graphite_transform_loops): Move build_scop_canonical_schedules
6100 after build_scop_iteration_domain.
6102 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6103 Tobias Grosser <tobi.grosser@amd.com>
6105 * graphite.c (add_conditions_to_domain): Add the loops to
6106 the dimension of the iteration domain. Do copy the domain
6107 only when it exists.
6108 (build_scop_conditions_1): Do not call add_conditions_to_domain.
6109 (add_conditions_to_constraints): New.
6110 (can_generate_code_stmt, can_generate_code): Removed.
6111 (gloog): Do not call can_generate_code.
6112 (graphite_transform_loops): Call add_conditions_to_constraints
6113 after building the iteration domain.
6115 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6116 Tobias Grosser <tobi.grosser@amd.com>
6117 Jan Sjodin <jan.sjodin@amd.com>
6119 * graphite.c (scan_tree_for_params): On substractions negate
6120 all the coefficients of the term.
6121 (clast_to_gcc_expression_red): New. Handle reduction expressions
6122 of more than two operands.
6123 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
6124 (get_vdef_before_scop): Handle also the case of default definitions.
6126 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6129 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
6130 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
6131 (gloog): Do not call cleanup_tree_cfg.
6132 (graphite_transform_loops): Call cleanup_tree_cfg after all
6133 scops have been code generated.
6135 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
6137 * passes.c (init_optimization_passes): Schedule after
6138 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
6140 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
6142 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
6144 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
6145 Set the type of an expression to the type of its assign statement.
6146 (expand_scalar_variables_expr): Do not pass loop_p.
6147 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
6148 (copy_bb_and_scalar_dependences): Do not pass loop_p.
6149 (translate_clast): Update call to copy_bb_and_scalar_dependences.
6151 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
6153 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
6154 an expression to the gimple_expr_type of its assign statement.
6155 (expand_scalar_variables_expr): Stop recursion on tcc_constant
6158 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
6160 PR tree-optimization/38786
6161 * gcc.dg/graphite/pr38786.c: New.
6162 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
6163 the SSA_NAME case of expand_scalar_variables_expr.
6164 (expand_scalar_variables_expr): Also gather the scalar computation
6165 used to index the memory access.
6166 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
6167 the gimple_stmt_iterator where it inserts new code.
6169 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
6171 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
6173 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
6175 * opts.c (decode_options): Enable flag_graphite_identity and
6176 flag_loop_block in -O2 and above.
6178 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6180 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
6181 Fix merge problem: replace with the file from trunk.
6183 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6185 * Merge from mainline (r141727:143163).
6187 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
6188 Jan Sjodin <jan.sjodin@amd.com>
6190 PR tree-optimization/38559
6191 * gcc.dg/graphite/pr38559.c: New.
6193 * graphite.c (debug_value, copy_constraint,
6194 swap_constraint_variables, scale_constraint_variable, ): New.
6195 (get_lower_bound, get_upper_bound): Removed.
6196 (graphite_trans_bb_strip_mine): Clean up this code that works
6197 only for constant number of iterations. Fully copy upper and
6198 lower bound constraints, not only the constant part of them.
6199 * graphite.h (debug_value): Declared.
6201 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
6203 PR tree-optimization/38492
6204 PR tree-optimization/38498
6205 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
6206 * tree-chrec.h (scev_is_linear_expression): Declared.
6207 * graphite.c (graphite_cannot_represent_loop_niter): New.
6208 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
6209 (graphite_loop_normal_form): Use gcc_assert.
6210 (scan_tree_for_params): Use CASE_CONVERT.
6211 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
6212 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
6213 Use gcc_assert. Discard scops that contain unhandled cases.
6214 (build_scop_conditions): Return a boolean status for unhandled cases.
6215 (strip_mine_profitable_p): Print the loop number, not its depth.
6216 (is_interchange_valid): Pass the depth of the loop nest, don't
6217 recompute it wrongly.
6218 (graphite_trans_bb_block): Same.
6219 (graphite_trans_bb_block): Print tentative of loop blocking.
6220 (graphite_trans_scop_block): Do not print that the loop has been
6222 (graphite_transform_loops): Do not handle scops that contain condition
6225 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
6227 * gcc.dg/graphite/block-0.c: Update test.
6228 * gcc.dg/graphite/block-1.c: Same.
6229 * gcc.dg/graphite/block-2.c: Remove xfail and test for
6231 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
6232 * gcc.dg/graphite/block-3.c: New.
6233 * gcc.dg/graphite/pr38498.c: New.
6235 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
6237 PR tree-optimization/38510
6238 * gcc.dg/graphite/pr38510.c: New.
6239 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
6240 (translate_clast): Call recompute_all_dominators before
6242 (gloog): Call recompute_all_dominators before graphite_verify.
6244 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
6246 PR tree-optimization/38492
6247 * graphite.c (rename_map_elt, debug_rename_elt,
6248 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
6249 rename_map_elt_info, eq_rename_map_elts,
6250 get_new_name_from_old_name, bb_in_sese_p): Moved around.
6251 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
6252 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
6253 (sese_build_livein_liveouts): New.
6254 (new_sese, free_sese): New.
6255 (new_scop): Call new_sese.
6256 (free_scop): Call free_sese.
6257 (rename_variables_from_edge, rename_phis_end_scop): Removed.
6258 (register_old_new_names): Renamed register_old_and_new_names.
6259 (register_scop_liveout_renames, add_loop_exit_phis,
6260 insert_loop_close_phis, struct igp,
6261 default_liveout_before_guard, add_guard_exit_phis,
6262 insert_guard_phis, copy_renames): New.
6263 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
6264 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
6265 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
6266 (scop_adjust_phis_for_liveouts): New.
6267 (gloog): Call scop_adjust_phis_for_liveouts.
6269 * graphite.h (struct sese): Documented. Added fields liveout,
6271 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
6272 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
6273 (struct scop): Added field liveout_renames.
6274 (SCOP_LIVEOUT_RENAMES): New.
6276 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6278 PR tree-optimization/38409
6279 * gcc.dg/graphite/pr38409.c: New.
6280 * graphite.c (nb_reductions_in_loop): Use simple_iv.
6282 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6284 * graphite.c (gcc_type_for_cloog_iv): By default return
6286 (graphite_create_new_loop): Don't fold_convert the already
6287 fold_convert-ed expression.
6289 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
6291 PR tree-optimization/38446
6292 * gcc.dg/graphite/pr38446.c: New.
6293 * graphite.c (register_bb_in_sese): New.
6294 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6295 looking at the bbs in the region.
6296 * graphite.h (sese): Add region_basic_blocks pointer set to
6297 structure and initialize at the time of defining new scop.
6299 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
6301 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6302 (find_params_in_bb): Do not free data refs.
6303 (free_graphite_bb): Add FIXME on disabled free_data_refs.
6305 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6307 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6308 * gcc.dg/graphite/scop-17.c: Same.
6309 * gcc.dg/graphite/block-5.c: New.
6310 * gcc.dg/graphite/block-6.c: New.
6311 * gcc.dg/graphite/pr37485.c: Clean dump file after.
6312 * gcc.dg/graphite/pr37684.c: Same.
6313 * gcc.dg/graphite/block-2.c: Same.
6315 * graphite.c (struct ivtype_map_elt): New.
6316 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6317 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6318 gcc_type_for_cloog_iv): New.
6319 (loop_iv_stack_patch_for_consts): Use the type of the induction
6320 variable from the original loop, except for the automatically
6321 generated loops, i.e., in the case of a strip-mined loop, in
6322 which case there is no original loop: in that case just use
6324 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6325 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6326 (clast_name_to_gcc): Accept params to be NULL.
6327 (clast_to_gcc_expression): Take an extra parameter for the type.
6328 Convert to that type all the expressions built by this function.
6329 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6330 (graphite_translate_clast_equation): Compute the type of the
6331 clast_equation before translating its LHS and RHS.
6332 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6333 (graphite_create_new_loop): Compute the type of the induction
6334 variable before translating the lower and upper bounds and before
6335 creating the induction variable.
6336 (rename_variables_from_edge, rename_phis_end_scop): New.
6337 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6338 (sese_add_exit_phis_edge): Do not use integer_zero_node.
6339 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6340 compute_cloog_iv_types): New.
6341 (gloog): Call compute_cloog_iv_types before starting the
6342 translation of the clast.
6344 * graphite.h (struct graphite_bb): New field cloog_iv_types.
6345 (GBB_CLOOG_IV_TYPES): New.
6346 (debug_ivtype_map): Declared.
6347 (oldiv_for_loop): New.
6349 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
6352 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6353 (param_index): Assert if parameter is not know after parameter
6355 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6356 (find_scop_parameters): Mark, that we have finished parameter
6358 (graphite_transform_loops): Move condition detection before parameter
6360 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6361 * gfortran.dg/graphite/pr38459.f90: New.
6363 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6365 * graphite.c (graphite_transform_loops): Always call find_transform ()
6366 in ENABLE_CHECKING. So we test these code paths, even if we do not
6369 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6371 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6372 (print_scop): Ditto.
6374 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
6377 Fix gfortran.dg/graphite/id-3.f90.
6378 * graphite.c (scopdet_basic_block_info): Fix bug that found some
6379 regions more than once.
6381 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6383 Fix gfortran.dg/graphite/id-4.f90.
6384 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6387 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6389 Fix gfortran.dg/graphite/id-1.f90.
6390 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6391 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6392 (max_precision_type): New.
6393 (value_clast): Removed.
6394 (clast_to_gcc_expression): Be more careful to types of expressions.
6395 Use max_precision_type and update use of gmp_cst_to_tree.
6396 (graphite_translate_clast_equation): Use max_precision_type.
6397 (graphite_create_guard_cond_expr): Do not use integer_type_node,
6398 use the type of the condition.
6399 (graphite_create_new_loop): Do not use integer_type_node, use the
6400 max_precision_type of lb and ub.
6402 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6404 * graphite.c (build_scops_1): Initialize open_scop.exit
6407 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6409 * gcc.dg/graphite/pr38084.c: New.
6410 * gfortran.dg/graphite/id-1.f90: New.
6411 * gfortran.dg/graphite/id-2.f90: New.
6412 * gfortran.dg/graphite/id-3.f90: New.
6413 * gfortran.dg/graphite/id-4.f90: New.
6414 * gfortran.dg/graphite/pr37857.f90: New.
6416 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6417 Jan Sjodin <jan.sjodin@amd.com>
6418 Harsha Jagasia <harsha.jagasia@amd.com>
6430 * gcc.dg/graphite/pr38073.c: New.
6431 * gcc.dg/graphite/pr37928.c: New.
6432 * gcc.dg/graphite/pr37883.c: New.
6433 * gcc.dg/graphite/pr38125.c: New.
6434 * gfortran.dg/graphite/pr38083.f90: New.
6435 * gfortran.dg/graphite/pr37852.f90: New.
6436 * gfortran.dg/graphite/pr37980.f90: New.
6438 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6439 the number of detected scops. Copy exact same test for loop
6441 * gcc.dg/graphite/block-1.c: Fix the number of expected
6442 loops to be blocked as reductions are not handled.
6443 * gcc.dg/graphite/block-4.c: ...here. New.
6445 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6446 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6448 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6449 * Makefile.in (graphite.o): Depend on value-prof.h.
6450 (graphite.o-warn): Removed -Wno-error.
6451 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6452 to be a NULL pointer. Call update_stmt. Return the newly created
6453 cannonical induction variable.
6455 * graphite.h (debug_rename_map): Declared. Fix some comments.
6457 * graphite.c: Reimplement the code generation from graphite to gimple.
6458 Include value-prof.h.
6459 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6460 (get_old_iv_from_ssa_name): Removed.
6461 (graphite_stmt_p): New.
6462 (new_graphite_bb): Test for useful statements before building a
6463 graphite statement for the basic block.
6464 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6465 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6467 (recompute_all_dominators, graphite_verify,
6468 nb_reductions_in_loop, graphite_loop_normal_form): New.
6469 (scop_record_loop): Call graphite_loop_normal_form.
6470 (build_scop_loop_nests): Iterate over all the blocks of the
6471 function instead of relying on the incomplete information from
6472 SCOP_BBS. Return the success of the operation.
6473 (find_params_in_bb): Use the data from GBB_DATA_REFS.
6474 (add_bb_domains): Removed.
6475 (build_loop_iteration_domains): Don't call add_bb_domains.
6476 Add the iteration domain only to the basic blocks that have been
6477 translated to graphite.
6478 (build_scop_conditions_1): Add constraints only if the basic
6479 block have been translated to graphite.
6480 (build_scop_data_accesses): Completely disabled until data
6481 dependence is correctly implemented.
6482 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6483 (remove_all_edges_1, remove_all_edges): Removed.
6484 (get_new_name_from_old_name): New.
6485 (graphite_rename_variables_in_stmt): Renamed
6486 rename_variables_in_stmt. Call get_new_name_from_old_name.
6487 Use replace_exp and update_stmt.
6488 (is_old_iv): Renamed is_iv.
6489 (expand_scalar_variables_stmt): Extra parameter for renaming map.
6490 Use replace_exp and update_stmt.
6491 (expand_scalar_variables_expr): Same. Use the map to get the
6492 new names for the renaming of induction variables and for the
6493 renaming of variables after a basic block has been copied.
6494 (expand_scalar_variables): Same.
6495 (graphite_rename_variables): Renamed rename_variables.
6496 (move_phi_nodes): Removed.
6497 (get_false_edge_from_guard_bb): New.
6498 (build_iv_mapping): Do not insert the induction variable of a
6499 loop in the renaming iv map if the basic block does not belong
6501 (register_old_new_names, graphite_copy_stmts_from_block,
6502 copy_bb_and_scalar_dependences): New.
6503 (translate_clast): Heavily reimplemented: copy basic blocks,
6504 do not move them. Finally, in call cleanup_tree_cfg in gloog.
6505 At each translation step call graphite_verify ensuring the
6506 consistency of the SSA, loops and dominators information.
6507 (collect_virtual_phis, find_vdef_for_var_in_bb,
6508 find_vdef_for_var_1, find_vdef_for_var,
6509 patch_phis_for_virtual_defs): Removed huge hack.
6510 (mark_old_loops, remove_dead_loops, skip_phi_defs,
6511 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6512 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6513 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6514 if_region_get_condition_block, if_region_set_false_region,
6515 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6516 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6517 sese_add_exit_phis_edge, sese_add_exit_phis_var,
6518 rewrite_into_sese_closed_ssa): New.
6519 (gloog): Remove dead code. Early return if code cannot be
6520 generated. Call cleanup_tree_cfg once the scop has been code
6522 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6523 block loops with less than two loops.
6524 (graphite_apply_transformations): Remove the call to
6525 scop_remove_ignoreable_gbbs.
6526 (limit_scops): When build_scop_loop_nests fails, continue on
6527 the next scop. Fix open_scop.entry.
6528 (graphite_transform_loops): Call recompute_all_dominators: force the
6529 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6530 Call initialize_original_copy_tables and free_original_copy_tables
6531 to be able to copy basic blocks during code generation.
6532 When build_scop_loop_nests fails, continue on next scop.
6533 (value_clast): New union.
6534 (clast_to_gcc_expression): Fix type cast warning.
6536 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
6538 * Merge from mainline (r140838:141727).
6540 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6544 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6546 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6550 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6551 exits and conditions.
6552 * gcc.dg/graphite/pr37943.c: New.
6554 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6557 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6559 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6561 * doc/invoke.texi: Fix spaces.
6563 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
6565 PR tree-optimization/37891
6566 Reverted last commit.
6567 * graphite.c (create_single_entry_edge): Set
6568 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6570 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
6571 Mitul Thakkar <mitul.thakkar@amd.com>
6573 * graphite.c (create_single_entry_edge): Set
6574 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6576 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6578 * doc/invoke.texi: Add -fgraphite-identity.
6579 * graphite.c (graphite_apply_transformations): Check for
6580 -fgraphite-identity.
6581 * toplev.c (process_options): Add flag_graphite_identity.
6582 * tree-ssa-loop.c: Add flag_graphite_identity.
6584 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6586 Undo changes from 2008-10-02:
6587 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6588 operand type when copying the operand to a variable of different type.
6589 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6590 with the IV name after increment.
6592 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6593 Harsha Jagasia <harsha.jagasia@amd.com>
6595 PR tree-optimization/37828
6596 * gcc.dg/graphite/pr37828.c: New.
6597 * graphite.c (graphite_trans_loop_block): Do not loop block
6598 single nested loops.
6600 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6601 Sebastian Pop <sebastian.pop@amd.com>
6603 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6604 rename_map_elt_info, eq_rename_map_elts): New.
6605 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6606 (expand_scalar_variables_expr): Change parameters.
6607 (expand_scalar_variables_stmt): Same.
6608 (expand_scalar_variables): Same.
6609 (graphite_rename_ivs): Rename graphite_rename_variables.
6610 (build_iv_mapping): New.
6611 (translate_clast): Call build_iv_mapping.
6612 * graphite.h (gbb_p): New name.
6614 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6616 PR tree-optimization/37684
6617 * gcc.dg/graphite/pr37684.c: New.
6618 * graphite.c (exclude_component_ref): New.
6619 (is_simple_operand): Call exclude_component_ref.
6621 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6622 Harsha Jagasia <harsha.jagasia@amd.com>
6624 PR tree-optimization/37485
6625 * gcc.dg/graphite/block-2.c: New
6626 * graphite.c (gmp_cst_to_tree): Moved.
6627 (iv_stack_entry_is_constant): New.
6628 (iv_stack_entry_is_iv): New.
6629 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6630 (loop_iv_stack_insert_constant): New.
6631 (loop_iv_stack_pop): Use new datatpype.
6632 (loop_iv_stack_get_iv): Same.
6633 (loop_iv_stack_get_iv_from_name): Same.
6634 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6635 (loop_iv_stack_patch_for_consts): New.
6636 (loop_iv_stack_remove_constants): New.
6637 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6638 (translate_clast): Call loop_iv_stack_patch_for_consts and
6639 loop_iv_stack_remove_constants.
6640 (gloog): Use new datatype. Redirect construction edge to end
6641 block to avoid accidental deletion.
6642 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6644 (union iv_stack_entry_data): New. Data in iv stack entry.
6645 (struct iv_stack_entry): New. Datatype for iv stack entries.
6647 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6649 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6650 operand type when copying the operand to a variable of different type.
6652 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6654 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6655 with the IV name after increment.
6657 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6659 * Merge from mainline (r140164:140838).
6661 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6663 * graphite-data-ref.c: New.
6664 * graphite.c (print_scop): Also dump the dependence graph.
6665 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6666 (new_scop): Initialize SCOP_DEP_GRAPH.
6667 (build_scop_dynamic_schedules): New.
6668 (build_access_matrix_with_af): Fixed column numbering.
6669 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6670 * graphite.h: Add ifndef/define guards against multiple inclusion.
6671 (struct scop): Add dep_graph field.
6672 (SCOP_DEP_GRAPH): Defined.
6673 (ref_nb_loops): Fixed and moved to other position.
6674 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6675 (nb_loops_around_loop_in_scop): New.
6676 (graphite_dump_dependence_graph): Declared.
6677 (graphite_build_rdg_all_levels): Declared.
6678 (graphite_test_dependence): Declared.
6679 * Makefile.in (graphite-data-ref.o): New target.
6681 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6683 * Merge from mainline (139870:140164).
6685 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6687 * Merge from mainline (138275:139870).
6688 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6689 the commits from trunk broke the niter detection.
6691 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6693 * graphite.c: Add more documentation. Fix formatting.
6694 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6695 loop_iv_stack_debug): Moved...
6696 (schedule_to_scattering): Move before use.
6697 (dot_all_scops): Include in "#if 0" the code for system
6700 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6701 loop_iv_stack_debug): ...here.
6703 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6705 * tree-phinodes.c (make_phi_node): Extern.
6706 (add_phi_node_to_bb): New.
6707 (create_phi_node): Call add_phi_node_to_bb.
6708 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6709 (remove_statement): Handle case where stored phi was updated
6710 and is no longer the same.
6711 * graphite.c (is_parameter): New.
6713 (expand_scalar_variables_expr): New.
6714 (expand_scalar_variables_stmt): New.
6715 (expand_scalar_variables): New.
6716 (move_phi_nodes): Create new phi instead of moving old one.
6717 (translate_clast): Call expand_scalar_variables.
6718 (find_vdef_for_var_in_bb): Also scan regular definitions.
6719 (skip_phi_defs): New.
6720 (collect_scop_exit_phi_args): New.
6721 (patch_scop_exit_phi_args): New.
6722 (gloog): Patch phis after scop.
6723 * tree-flow.h: (add_phi_node_to_bb): Declared.
6724 (make_phi_node): Declared.
6726 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6728 * graphite.c (end_scop): Split the entry of the scop when it
6729 is the header of the loop in which the scop is ending.
6730 (build_scops_1, limit_scops): Update uses of end_scop.
6732 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6734 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6735 SCOP_ENTRY or SCOP_EXIT.
6737 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6739 * graphite.c (get_construction_edge): Removed.
6740 (gloog): Construction edge is the scop entry edge.
6742 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6744 * graphite.c (can_generate_for_scop): Removed.
6745 (gloog): Do not call it.
6747 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6749 * graphite.c (new_scop): Entry of a scop is an edge.
6750 Initialize SESE region.
6751 (free_scop): Free SESE region.
6752 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6753 (split_difficult_bb): New, split from end_scop.
6754 (end_scop): Exit of a scop is an edge.
6755 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6756 not automatically updated and thus is always wrong.
6757 * graphite.h (struct sese): New.
6760 (struct scop): New field for a SESE region. Remove entry, exit.
6761 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6762 semantics as before. Moved comment around.
6764 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6765 Sebastian Pop <sebastian.pop@amd.com>
6767 * graphite.c (graphite_transform_loops): Always enable gloog
6768 and find_transform when ENABLE_CHECKING.
6770 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6772 * graphite.c (graphite_transform_loops): Move pretty printer
6773 of SCOPs before doing any transform. Remove call to print_scops
6774 and dot_all_scops_1.
6776 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6778 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6779 (print_graphite_bb): Same.
6781 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6783 * graphite.c (dot_all_scops_1): Cleanup.
6784 (move_scops): Fix comment.
6786 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6788 * graphite.c (build_scop_bbs): Revert commit 139355:
6790 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6791 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6793 * graphite.c (build_scop_bbs): Factor up code.
6795 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6797 * graphite.c (gloog): Update dominator info.
6799 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6801 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6803 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6805 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6807 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6808 (translate_clast): Correct formatting.
6809 * graphite.h (struct num_map): Removed.
6810 (struct graphite_bb): Remove num_map field.
6811 (GBB_INDEX_TO_NUM_MAP): Removed.
6813 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6815 * graphite.c (build_access_matrix_with_af): Fix comments.
6816 (build_scop_data_accesses): Same.
6818 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6820 * graphite.c (build_scop_data_accesses): Don't construct
6821 access matrices. Add a FIXME and an assert condition that
6822 should pass when the access matrices will be needed.
6824 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6826 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6828 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6829 Moved close by free_graphite_bb.
6830 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6831 (new_scop): Move close by free_scop.
6832 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6834 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6836 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6837 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6838 instead of recursive call.
6839 (graphite_translate_clast_equation): New.
6840 (graphite_create_guard_cond_expr): New.
6841 (graphite_create_new_guard): New.
6842 (get_stack_index_from_iv): Removed.
6843 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6844 (get_true_edge_from_guard_bb): New.
6845 (translate_clast): Handle stmt_guard in clast.
6846 (get_construction_edge): Allow construction edge detection for
6847 a scope entry with multiple predecessors if one predecessor is
6848 the immediate dominator of scope entry.
6849 (can_generate_code_stmt): Enable code generation for clast_guard.
6850 (gloog): Use correct context loop. Removed check for post dominators.
6851 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6853 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6855 * graphite.c (remove_dead_loops): Document better which
6858 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6860 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6862 (graphite.o): Also depends on pointer-set.h.
6864 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6866 * graphite.c (scop_record_loop): Fix compile warning.
6868 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6869 Sebastian Pop <sebastian.pop@amd.com>
6871 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6873 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6875 * graphite.c (build_graphite_bb): Initialize bb->aux to
6876 point to the graphite_bb_p.
6877 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6879 (add_bb_domains): Does not use the scop parameter.
6880 (graphite_transform_loops): Clean bb->aux at the end.
6882 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6883 Sebastian Pop <sebastian.pop@amd.com>
6885 * lib/target-supports.exp
6886 (check_effective_target_fgraphite): New.
6888 * gcc.dg/graphite/graphite.exp: Early exit when
6889 check_effective_target_fgraphite returns false.
6890 Set dg-do-what-default to compile.
6891 (scan-graphite-dump-times): Removed.
6892 * gfortran.dg/graphite/graphite.exp: Same.
6894 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6895 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6896 * gcc.dg/graphite/scop-1.c: Same.
6897 * gcc.dg/graphite/scop-2.c: Same.
6898 * gcc.dg/graphite/scop-3.c: Same.
6899 * gcc.dg/graphite/scop-4.c: Same.
6900 * gcc.dg/graphite/scop-5.c: Same.
6901 * gcc.dg/graphite/scop-6.c: Same.
6902 * gcc.dg/graphite/scop-7.c: Same.
6903 * gcc.dg/graphite/scop-8.c: Same.
6904 * gcc.dg/graphite/scop-9.c: Same.
6905 * gcc.dg/graphite/scop-10.c: Same.
6906 * gcc.dg/graphite/scop-11.c: Same.
6907 * gcc.dg/graphite/scop-12.c: Same.
6908 * gcc.dg/graphite/scop-13.c: Same.
6909 * gcc.dg/graphite/scop-matmult.c: Same.
6910 * gcc.dg/graphite/scop-14.c: Same.
6911 * gcc.dg/graphite/scop-15.c: Same.
6912 * gcc.dg/graphite/block-0.c: Same.
6913 * gcc.dg/graphite/scop-16.c: Same.
6914 * gcc.dg/graphite/block-1.c: Same.
6915 * gcc.dg/graphite/scop-17.c: Same.
6916 * gcc.dg/graphite/scop-18.c: Same.
6917 * gfortran.dg/graphite/block-1.f90: Same.
6918 * gfortran.dg/graphite/scop-1.f: Same.
6919 * gfortran.dg/graphite/block-2.f: Same.
6921 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6923 * graphite.c: Fix some XXX comments.
6924 (build_scop_dynamic_schedules): Removed.
6926 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6928 * graphite.h (scop_max_loop_depth): Moved...
6929 * graphite.c (scop_max_loop_depth): ...here.
6930 (remove_all_edges_1): New.
6931 (remove_all_edges): Factored code.
6932 (remove_cond_exprs): Check only the last statement for
6933 a GIMPLE_COND expression.
6935 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6937 * graphite.c (scan_tree_for_params): Early return when the
6938 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6939 (find_scop_parameters): Factor out code.
6940 (graphite_trans_bb_strip_mine): Remove dead code.
6942 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6944 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6945 graphite_trans_bb_move_loop): Factor asserts.
6946 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6947 Do not call calculate_dominance_info and estimate_bb_frequencies.
6949 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6951 * graphite.c (create_loops_mapping, free_loops_mapping,
6952 create_loops_mapping_num, debug_loop_mapping_1,
6953 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6954 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6955 graphite_loops_mapping_add_child_num,
6956 graphite_loops_mapping_insert_child,
6957 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6958 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6959 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6960 create_num_from_index, get_num_from_index,
6961 swap_loop_mapped_depth): Removed.
6962 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6963 (free_scop): Do not call free_loops_mapping.
6964 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6965 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6966 get_loop_mapped_depth.
6967 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6968 (graphite_trans_bb_strip_mine): Same.
6969 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6970 (struct scop): Remove field loops_mapping.
6972 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6973 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6975 * graphite.c (scop_record_loop): Factor out one level of the
6976 condition by early return.
6977 (build_scop_loop_nests): Format following FSF coding style.
6978 (build_scop_dynamic_schedules): Factor out code.
6979 (scopdet_bb_info): Reindent. Default case should not be reachable.
6981 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6982 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6984 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6985 assignments that are not handled as simple operands for now.
6987 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6988 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6990 * graphite.c (build_scop_bbs): Factor up code.
6992 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6993 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6995 * graphite.c (stmt_simple_for_scop_p): Factor code out
6997 (enum gbb_type): New. Group all the GBB_* types under it.
6998 (is_loop_exit): Moved...
6999 (end_scop): Enable BB spliting.
7000 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
7001 * cfgloop.h (is_loop_exit): Declared.
7003 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7005 * doc/invoke.texi: Remove strides from examples containing
7006 DO loops when the strides are equal to 1.
7008 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
7009 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7011 * graphite.c (graphite_trans_scop_block): Or the result with
7012 the result from graphite_trans_loop_block.
7013 * gcc.dg/graphite/block-1.c: New.
7014 * gfortran.dg/graphite/block-1.f90: New.
7015 * gfortran.dg/graphite/block-2.f: New.
7017 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7019 * graphite.c (graphite_transform_loops): Call cloog_initialize
7022 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7024 * tree-data-ref.c) (stmt_simple_memref_p): New.
7025 * tree-data-ref.h (stmt_simple_memref_p): Declared.
7026 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
7027 (is_simple_operand): Call stmt_simple_memref_p.
7029 * gcc.dg/graphite/scop-matmult.c: Updated for not
7030 using pointer arithmetic, as this is optimized by PRE and
7031 makes the code too difficult to analyze.
7033 * gcc.dg/graphite/scop-18.c: Same.
7035 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7037 * gdbinit.in (pgg): New.
7039 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7041 * graphite.c (graphite_trans_loop_block): Fix warning.
7043 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7045 * graphite.c (graphite_trans_loop_block): Fix my merge error.
7047 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7049 * graphite.c (graphite_trans_bb_block): Remove check for
7050 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
7051 Check if loop blocking is profitable for every loop, before applying
7053 (graphite_apply_transformations): Call graphite_trans_bb_block only,
7054 if flag_loop_block is set.
7056 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7058 * graphite.c: Add some more documentation for the loop
7061 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7063 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
7064 * graphite.c: Format on less than 80 columns.
7067 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7069 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
7071 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7073 * doc/invoke.texi (floop-block, floop-strip-mine,
7074 floop-interchange): Update documentation with examples.
7076 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
7078 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
7080 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
7082 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
7084 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
7085 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
7086 * tree-scalar-evolution.c: Revert useless changes.
7087 * tree-phinodes.c: Same.
7090 * tree-vectorizer.h: Same.
7091 * tree-flow.h: Same.
7093 * common.opt (fgraphite): Update documentation.
7095 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
7097 * doc/invoke.texi (-floop-block, -floop-strip-mine,
7098 -floop-interchange): Add more text for explaining what each of these
7100 * tree-into-ssa.c (gimple_vec): Moved to...
7101 * graphite.c: Include gimple.h.
7102 (gimple_vec): Moved to...
7103 (del_loop_to_cloog_loop): Removed.
7104 (loop_affine_expr): Do not call create_data_ref when the
7105 operand is a constant.
7106 (new_scop): Use free instead of del_loop_to_cloog_loop.
7107 * Makefile.in (graphite.o): Depend on GIMPLE_H.
7108 * gimple.h (gimple_vec): ... here.
7110 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7112 * graphite.c (scopdet_bb_info): Only allow loops with known number of
7114 (build_loop_iteration_domains): Fail, if latch executions unknown.
7116 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7118 * graphite.c (add_conditions_to_domain): New.
7119 (build_scop_conditions_1): Call add_conditions_to_domain.
7120 (set_cloog_options): Allow to disable optimizations.
7122 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7124 * graphite.c (find_params_in_bb): Look for parameters in conditions.
7125 Do not use walk_dominator_tree.
7126 (find_scop_parameters): Do not use walk_dominator_tree.
7128 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7130 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
7131 (idx_record_params): Adapt.
7132 * graphite.h (scop_gimple_loop_depth): New.
7134 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7136 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
7137 (scan_tree_for_params): Remove value_init.
7138 (build_scop_context): Remove value_init.
7139 (build_loop_iteration_domains): Remove value_init.
7140 (schedule_to_scattering): Remove value_init.
7141 (graphite_trans_bb_strip_mine): Remove value_init.
7143 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7145 * gcc/graphite.c (limit_scops): New.
7146 (graphite_transform_loops): Add limit SCoPs.
7147 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
7148 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
7149 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
7150 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
7151 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
7152 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
7153 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
7154 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
7155 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
7156 Change loop numbers.
7157 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
7158 Change loop numbers.
7159 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
7160 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
7161 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
7162 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
7163 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
7164 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
7165 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
7166 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
7167 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
7168 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
7170 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7172 * graphite.c (graphite_transform_loops): Call always find_transform.
7174 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
7176 * graphite.c (free_loops_mapping): New.
7177 (stmt_simple_for_scop_p): Fix typo.
7178 (stmt_simple_for_scop_p): Fix tuples functions, that
7180 (free_graphite_bb): Fix some memleaks.
7181 (free_scop): Fix some memleaks.
7182 (scopdet_bb_info): Do not forget some tmp SCoPs.
7183 (find_params_in_bb): Fix some memleaks.
7184 (clast_to_gcc_expression): Fix warning.
7186 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
7188 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
7189 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
7191 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7193 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
7194 Move code ifdef-ed HAVE_cloog...
7195 * graphite.c: Include toplev.h.
7197 * Makefile.in (OBJS-common): Always build graphite.o.
7198 (BACKEND): Remove @GRAPHITE@.
7199 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
7200 (graphite.o): Depend on TOPLEV_H.
7202 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7204 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
7205 Remove typo left from polylib to ppl conversion.
7206 * graphite.c (graphite_transforms): Use sorry instead of fatal.
7208 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7210 * toplev.c (process_options): Move the graphite loop optimization
7212 * tree-ssa-loop.c (graphite_transforms): ... here.
7213 When not configured with CLooG, print to dump_file that
7214 Graphite transforms were not performed.
7215 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
7217 * gcc.dg/graphite/*.c: Updated all testcases to use
7218 scan-graphite-dump-times.
7220 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7222 * graphite.c (dot_scop, dot_all_scops): Do not call system.
7223 Do not open /tmp/scop.dot and /tmp/allscops.dot.
7225 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
7226 Jan Sjodin <jan.sjodin@amd.com>
7228 * configure: Regenerated.
7229 * omp-low.c (expand_omp_sections): Remove now unused code.
7230 * config.in (HAVE_polylib): Removed.
7231 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
7232 (PPLLIBS, PPLINC): Added.
7233 * graphite.c: Replace unsigned with int wherever possible.
7234 Don't access Cloog's data structures, but use accessor functions.
7235 Clast's stmt->type is now implemented as a vtable: change the
7236 switches of stmt->type into ifs.
7237 (polylib/polylibgmp.h): Don't include.
7238 (initialize_dependence_polyhedron,
7239 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7240 statement_precedes_p, test_dependence, build_rdg_all_levels,
7241 dump_dependence_graph): Removed until this code is cleaned up
7243 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
7244 (POLYLIBINC): Renamed PPLINC.
7246 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
7247 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7248 Jan Sjodin <jan.sjodin@amd.com>
7250 Finish the merge and tuplification of graphite.
7252 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7253 Jan Sjodin <jan.sjodin@amd.com>
7255 Partial merge from mainline (138072:138275).
7256 * graphite.c still has to be tuplified.
7258 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
7260 * graphite.c (graphite_loops_mapping_max_loop_num): New.
7261 (create_num_from_index): New.
7262 (get_num_from_index): Also pass in the graphite BB.
7263 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
7264 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
7265 (graphite_trans_bb_strip_mine): Call create_num_from_index.
7266 (is_interchange_valid): Return false when failing.
7267 * graphite.h (struct num_map): New.
7268 (struct graphite_bb): New field num_map.
7269 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
7271 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
7273 * graphite.c (dump_gbb_conditions): Print also conditions like
7274 "if (a)". Remove dublicated code and use print_generic_expr ().
7275 (stmt_simple_for_scop_p): Only allow conditions we can handle
7278 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7280 * graphite.h (struct scop): Removed new_ivs field.
7281 (SCOP_NEWIVS): Deleted.
7282 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7283 clast_to_gcc_expression, graphite_create_new_loop):
7284 Removed use of new_ivs.
7286 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7288 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7289 create_loops_mapping_num, debug_loop_mapping_1): New.
7290 (debug_loop_mapping): Call debug_loop_mapping_1.
7291 (get_loop_mapping_for_num,
7292 graphite_loops_mapping_add_child,
7293 graphite_loops_mapping_add_child_num,
7294 graphite_loops_mapping_insert_child,
7295 graphite_loops_mapping_parent,
7296 split_loop_mapped_depth_for_num,
7297 loop_mapped_depth_split_loop): New.
7298 (increment_loop_mapped_depths): Removed.
7299 (swap_loop_mapped_depth_for_num): Reimplemented.
7300 (new_scop): Call create_loops_mapping.
7301 (scop_record_loop): Call graphite_loops_mapping_insert_child.
7302 (translate_clast): Pass the old loop father in parameter, and pass
7303 it to get_old_iv_from_ssa_name.
7304 (remove_edges_around_useless_blocks, can_generate_code_stmt,
7305 can_generate_code, can_generate_for_scop): New.
7306 (graphite_trans_bb_block): Returns false when it fails to transform.
7307 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7309 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7311 Reverted all the changes related to the streamization and
7313 These changes are now tracked in the streamization branch.
7315 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7316 Jan Sjodin <jan.sjodin@amd.com>
7318 * graphite.c (gbb_compare): Correctly constify.
7319 (gbb_can_be_ignored): Indent.
7320 (graphite_trans_scop_swap_1and2): Add legality check.
7323 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7325 Remove fallouts from "Reverted the Condate changes".
7326 * tree.h: Remove unused decl.
7327 * gcc.dg/tree-checker: Same.
7328 * timevar.def: Remove counter.
7330 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7332 * Merge from mainline (135673:138072).
7334 Reverted the MIRO changes (from 2008-04-05) that are now
7335 tracked in the miro branch.
7336 * tree-bounds.c: Removed.
7337 * tree-bounds.h: Removed.
7339 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7340 are now tracked in the condate branch.
7341 * tree-check.c: Removed.
7342 * tree-match.c: Removed.
7343 * condate.y: Removed.
7345 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7347 * common.opt: New user flag -floop-block, -floop-strip-mine
7348 and -floop-interchange.
7349 * toplev.c (process_options): Enable -fgraphite pass if any one of the
7350 graphite loop optimization flags is turned on.
7351 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7352 flag_loop_strip_mine and flag_loop_interchange checks before
7354 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7355 -floop-strip-mine and -floop-interchange.
7356 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7358 * gcc.dg/graphite/scop-16.c: Ditto.
7359 * gcc.dg/graphite/scop-17.c: Ditto.
7360 * gcc.dg/graphite/scop-18.c: Ditto.
7362 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
7363 Sebastian Pop <sebastian.pop@amd.com>
7365 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7366 (create_empty_loop_on_edge): More fixes.
7367 * tree-phinodes.c (resize_phi_node): Extern.
7368 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7369 * cfghooks.c (update_dominator_information): New split from
7371 * tree-vectorizer.c (rename_variables_in_bb): Extern.
7372 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7373 successor of the function entry block.
7375 * graphite.c: Include pointer-set.h.
7376 (debug_loop_mapping, increment_loop_mapped_depths,
7377 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7378 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7379 swap_loop_mapped_depth_for_num, get_num_from_index,
7380 swap_loop_mapped_depth, loop_iv_stack_debug,
7381 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7382 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7383 get_old_iv_from_ssa_name): New.
7384 (new_scop): Initialize SCOP_LOOPS_MAPPING.
7385 (free_scop): Free SCOP_LOOPS_MAPPING.
7386 (scop_record_loop): Record old ivs.
7387 (create_var_name): Removed.
7388 (initialize_cloog_names): Allocate double space in case strip mine
7389 applies to all loops once.
7390 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7391 (clast_to_gcc_expression): Same. Implement more clast to gimple
7393 (graphite_create_new_loop): Pass in ivstack.
7394 (remove_all_edges): Pass in the construction_edge.
7395 (graphite_remove_iv): Removed.
7396 (graphite_rename_ivs, graphite_rename_ivs_stmt,
7397 remove_cond_exprs): Rewritten.
7398 (move_phi_nodes): New.
7399 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7400 (translate_clast): Pass in ivstack. Rewrite some cases.
7401 (set_cloog_options, debug_clast_stmt): New.
7402 (find_transform): Use set_cloog_options.
7403 (outermost_loop_layer): Removed.
7404 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7405 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7406 mark_old_loops, remove_dead_loops): New.
7408 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7409 (const_column_index, get_first_matching_sign_row_index,
7410 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7411 get_upper_bound): New.
7412 (graphite_trans_bb_strip_mine): Also update the iv map.
7414 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7415 (struct name_tree): Add a loop field.
7416 (struct scop): Add a graphite_loops_mapping field.
7417 (SCOP_LOOPS_MAPPING): New.
7418 (debug_clast_stmt): Declare.
7419 * lambda.h (find_induction_var_from_exit_cond): Declare.
7420 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7421 * cfgloop.h (update_dominators_in_loop): Removed declaration.
7422 (create_empty_loop_on_edge): Updated.
7423 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7424 rename_variables_in_bb): Declare.
7425 * tree-cfg.c (remove_bb): Extern.
7427 * gcc.dg/graphite/block-0.c: New.
7429 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7430 Sebastian Pop <sebastian.pop@amd.com>
7432 * graphite.c (strip_mine_profitable_p): New.
7433 (graphite_trans_bb_block): Disable strip mining if not profitable.
7435 * gcc.dg/graphite/scop-18.c: New.
7436 * gcc.dg/graphite/scop-17.c: Fixed.
7437 * gcc.dg/graphite/scop-16.c: Fixed.
7439 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
7440 Jan Sjodin <jan.sjodin@amd.com>
7441 Sebastian Pop <sebastian.pop@amd.com>
7443 * graphite.c (is_interchange_valid): New.
7444 (graphite_trans_bb_block): Check loop nest of basic block for legality
7447 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7448 outer_most_loop, gbb_outer_most_loop_index): New.
7450 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7451 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7452 * gcc.dg/graphite/scop-16.c: New.
7453 * gcc.dg/graphite/scop-17.c: New.
7455 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7457 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7458 (graphite_trans_scop_block): Ignore SCoPs without bbs.
7460 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7462 * graphite.c (new_scop): Initialize SCOP_EXIT.
7463 (scopdet_info): Add.
7464 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7465 (build_scops_1): Cleanup, bugfixes.
7466 (build_scops): Cleanup.
7468 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7469 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7471 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7473 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7475 * gfortran.dg/graphite/graphite.exp: Use
7476 DEFAULT_GRAPHITE_FLAGS.
7478 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7480 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7482 * graphite.c (scan_tree_for_params): Do not assert any more if
7483 MULT_EXPR parameter is negative.
7485 * gfortran.dg/graphite/scop-1.f: New.
7487 * gfortran.dg/graphite/graphite.exp: New.
7489 * gcc.dg/graphite/scop-15.c: New.
7491 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7493 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7495 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7497 * graphite.c (graphite_trans_bb_swap_loops): Rename from
7498 graphite_swap_loops.
7499 (graphite_trans_bb_move_loop): New.
7500 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7501 (graphite_trans_bb_block): New.
7502 (graphite_trans_loop_block): New.
7503 (graphite_trans_scop_swap_1and2): Rename from
7504 graphite_trans_swap_1and2.
7505 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7506 (graphite_trans_scop_block): New.
7507 (graphite_apply_transformations): Rename from
7508 graphite_transformations.
7510 * gcc.dg/graphite/scop-matmult.c: New.
7512 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7514 * graphite.c (gbb_compare): New.
7515 (graphite_sort_gbbs): New.
7516 (gbb_can_be_ignored): New.
7517 (scop_remove_ignoreable_gbbs): New.
7518 (graphite_transformations): Cleanup and add
7519 scop_remove_ignoreable_gbbs.
7520 * lambda.h (lambda_vector_compare): New.
7522 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
7524 * graphite.c (print_graphite_bb): Correct printing of static schedule.
7525 (graphite_swap_loops): int -> unsigned
7526 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7527 (graphite_transformations): New.
7528 (graphite_transform_loops): Move to graphite_transformations.
7529 * graphite.h (gbb_nb_loops): Return unsigned.
7531 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
7533 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7534 the domain matrix. This makes scop-0.c work again.
7536 2008-06-20 Richard Guenther <rguenther@suse.de>
7538 * graphite.h: Adjust copyright to GPLv3.
7539 * graphite.c: Likewise.
7540 (stmt_simple_memref_for_scop_p): Split out from ...
7541 (stmt_simple_for_scop_p): ... here. Fix handling of calls
7543 (get_bb_type): Optimize.
7545 (is_bb_addable): Fix memleak, replace is_pred call with
7547 (build_scops): Use current_loops.
7548 (param_index): Fix memleak.
7550 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7552 * graphite.c: Fix formatting.
7554 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7556 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7557 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7558 (create_var_name, save_var_name): Newly defined functions.
7559 (initialize_cloog_names): Part of the code factored out to
7561 (clast_to_gcc_expression): Now handles the case of clast_red_sum
7562 in clast_reduction statement.
7563 (graphite_create_new_loop): Now takes a new parameter
7565 (translate_clast): Now also takes the context_loop and bb_exit
7566 parameters. Rewritten the code so that it creates a gimple code
7567 inside the given context.
7568 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7569 remove_cond_expr, disconnect_cond_expr,
7570 disconnect_virtual_phi_nodes): Newly defined functions.
7571 * graphite.h (struct scop): added old_ivs vector.
7572 SCOP_OLDIVS: New macro.
7574 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7576 * cfgloopmanip.c: Add missing function comments, fix formatting.
7578 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7580 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7581 (create_empty_loop_on_edge): Defined.
7582 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7584 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7585 (update_dominators_in_loop): Declared as extern
7586 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7588 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7590 * graphite.c (print_graphite_bb): Allow changing number of loops
7592 (initialize_cloog_names): Allow changing number of loops.
7593 (build_cloog_prog): Simplify.
7594 (find_transform): Enable cloog option --strides.
7595 (graphite_swap_loops): New.
7596 (graphite_strip_mine_loop): New.
7597 (graphite_trans_swap_1and2): New.
7598 (graphite_trans_strip): New.
7599 (graphite_transform_loops): Add graphite_trans_strip.
7600 * graphite.h (scop_max_loop_depth): New.
7602 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7604 * graphite.c (build_scop_iteration_domain): Remove forgotten
7605 line. (Fixes compile)
7607 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7609 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7610 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7611 (build_bb_loops): New.
7612 (graphite_transform_loops): Add build_bb_loops.
7613 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7615 * graphite.h (graphite_bb): Add loops.
7616 (gbb_nb_loops): New.
7617 (gbb_loop_at_index): New.
7618 (gbb_loop_index): New.
7619 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7620 using nb_params_in_scop.
7622 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7624 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7625 (build_scop_canonical_schedules): Build minimized schedule.
7626 (schedule_to_scattering): Adapt to minimized schedule.
7627 * graphite.h (graphite_bb): Add/Update descriptions.
7629 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7630 Tobias Grosser <grosser@fim.uni-passau.de>
7632 * graphite.c (print_graphite_bb): Add condition printing.
7634 (dump_gbb_conditions): New.
7635 (build_scop_conditions_1): New.
7636 (build_scop_conditions): New.
7637 * graphite.h (graphite_bb): Add conditions.
7639 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7641 * graphite.c (print_graphite_bb):
7642 (free_graphite_bb): New.
7643 (free_scop): Free bbs.
7644 (get_bb_type): Free doms.
7645 (build_scop_context): Free context matrix.
7646 (build_loop_iteration_domains): Remove unused code.
7647 (build_cloog_prog): Free scattering function and blocklist.
7648 (find_transform): Free options.
7650 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7652 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7653 Remove unnecessery cloog data structures. Make a copy of the domain
7654 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7655 unnecessary cloog data structures. Fix memory leaks. Remove insert
7656 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7658 (build_scop_iteration_domain): Remove unnecessary cloog
7659 data structures. Fix memory leaks.
7660 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7661 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7663 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7665 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7667 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7669 * graphite.c (end_scop): Style fix.
7670 (schedule_to_scattering): Style and comment fix.
7672 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7673 * graphite.c (print_graphite_bb): Fix definiton of
7674 schedule_to_scattering.
7675 (initialize_cloog_names): Change nb_scattdims to max loop
7677 (schedule_to_scattering): Take parameter for number of scattering
7679 (build_cloog_prog): Only build as much scattering dimensions as
7682 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7684 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7685 in polyhedron/aermod.f90.
7687 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7688 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7689 Harsha Jagasia <harsha.jagasia@amd.com>
7691 * graphite.c (is_bb_addable): Fix segfault.
7693 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7695 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7696 with multiple exits and conditional handling in edge cases.
7697 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7699 * gcc.dg/graphite/scop-14.c: New.
7701 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7702 Adrien Eliche <aeliche@isty.uvsq.fr>
7704 * graphite.c (is_bb_addable): Add more comments and enhance
7705 readablity of the source code. Fix memory leak.
7706 (is_loop_exit): Fix memory leak.
7708 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7710 * graphite.c (first_loop_in_scop): Deleted.
7711 (setup_cloog_loop): Only walk the loop chain for inner loops.
7712 (build_scop_iteration_domain): Execute setup_cloog_loop for
7713 all loops in the first layer.
7715 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7717 * graphite.c (scan_tree_for_params): Change the way params are
7718 added to be indepenent of the number of loops.
7719 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7721 (build_cloog_prog): Revert to short matrix format.
7723 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7724 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7726 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7729 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7731 * graphite.c (nb_data_refs_in_scop): New.
7732 (graphite_transform_loops): Print more stats: number of
7733 loops, basic blocks and data references per scop.
7735 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7736 Jan Sjodin <jan.sjodin@amd.com>
7738 * graphite.c (loop_affine_expr, idx_record_params,
7739 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7740 instead of instantiate_parameters.
7742 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7744 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7745 add support for parameters, add STATIC_SCHEDULE at the right places,
7748 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7750 * graphite.c (build_scop_loop_nests): Only add the loops, that
7751 are contained completely in the SCoP.
7752 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7753 and the domains are fixed.
7754 (build_scop_canonical_schedules): Add support for bbs not contained
7757 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7759 * graphite.h (scop_contains_loop): Update comments to match
7760 the actual behavior.
7761 (scop_contains_loop): New.
7762 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7764 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7766 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7767 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7770 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7771 Tobias Grosser <grosser@fim.uni-passau.de>
7773 * graphite.c (graphite_transform_loops): Early return when
7774 there are no loops in the function.
7776 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7777 Jan Sjodin <jan.sjodin@amd.com>
7779 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7780 offset of the last loop.
7781 (setup_cloog_loop): Copy the entire outer constraint matrix.
7783 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7784 Jan Sjodin <jan.sjodin@amd.com>
7786 * graphite.c (stmt_in_scop_p, function_parameter_p,
7787 invariant_in_scop_p): Removed.
7788 (scan_tree_for_params): Can be used with no constraint
7789 matrix for gathering parameters.
7790 (idx_record_params): Don't use idx_record_param, instead use
7791 scan_tree_for_params.
7792 (find_scop_parameters): Same.
7793 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7794 Fix the size of loop domains.
7795 (schedule_to_scattering): Exit when the outer loop is not in scop.
7796 (find_transform): Enable build_cloog_prog.
7798 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7799 Jan Sjodin <jan.sjodin@amd.com>
7801 * graphite.c (schedule_to_scattering): Make scattering domains
7802 uniformly of the same size, as required by CLooG 0.14.0 and before.
7804 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7805 Jan Sjodin <jan.sjodin@amd.com>
7807 * graphite.c (schedule_to_scattering): Rewrite, correct the
7808 translation of the scheduling function to scattering.
7809 (build_cloog_prog): Call schedule_to_scattering only once.
7810 * graphite.h (scop_loop_index): Do not fail for loops not
7811 in the scop: return -1.
7813 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7815 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7816 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7817 (setup_cloog_loop): Export GBB_DOMAIN.
7818 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7819 able to rebuild the original control flow.
7820 * graphite.h (graphite_bb): Add domain field and access macro.
7823 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7825 * graphite.c (debug_gbb): New.
7826 (print_scop, build_graphite_bb): Use SCOP_BBS.
7827 (build_scop_bbs): Reimplemented.
7828 (dfs_bb_in_scop_p): Removed.
7829 (build_scop_loop_nests): Reorder loops inserted in
7830 SCOP_LOOP_NEST: outer loops should come first.
7831 (build_scop_canonical_schedules): Reinitialize at zero
7832 the components of the SCOP_STATIC_SCHEDULE for the loops
7833 that have already been parsed.
7835 * graphite.h (debug_gbb): Declared.
7837 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7838 Jan Sjodin <jan.sjodin@amd.com>
7840 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7841 (graphite_loop_to_gcc_loop): Removed.
7842 (remove_all_edges): New.
7843 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7844 (gloog): Remove useless code.
7846 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7848 * graphite.c (get_bb_type): Reworked. We distinguish between
7849 loops with one or multiple exits.
7850 (is_loop_exit): New.
7852 (is_bb_addable): Rework condition handling, now support for case
7853 case statements and loops with multiple exits.
7855 * gcc.dg/graphite/scop-11.c: New.
7856 * gcc.dg/graphite/scop-12.c: New.
7857 * gcc.dg/graphite/scop-13.c: New.
7859 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7861 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7862 we have too many colors.
7864 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7866 * doc/invoke.texi (-ftree-loop-fusion): Document.
7867 * tree-pass.h (pass_loop_fusion): Declared.
7868 * tree-loop-fusion.c: New.
7869 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7870 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7871 * tree-data-ref.h (find_data_references_in_loop): Declared.
7872 * common.opt (ftree-loop-fusion): Declared.
7873 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7875 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7877 * graphite.c (build_access_matrix): Fix typo from the merge.
7879 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7881 * Merge from mainline (130800:135673).
7883 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7885 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7886 Update dominators after splitting.
7888 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7890 * graphite.c (is_bb_addable): Return the harmful statement.
7891 Factor up some code.
7892 (end_scop): New. Splits end of scope bbs on a harmful statement.
7893 (build_scops_1): Call end_scop.
7895 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7897 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7898 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7899 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7900 build_scops_1): Removed.
7901 (build_scops_2): Renamed build_scops_1.
7903 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7905 * graphite.c: Fix formatting.
7907 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7909 * graphite.c (get_bb_type): New.
7911 (build_scops_2): New.
7912 (is_bb_addable): New.
7913 (build_scops): Switch the scop detection.
7914 (build_scop_bbs): Add entry bb to scop.
7915 * graphite.h (struct scop): Update comment.
7917 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7919 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7922 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7924 * gcc.dg/graphite/scop-1.c: Update.
7925 * gcc.dg/graphite/scop-2.c: Update.
7926 * gcc.dg/graphite/scop-4.c: Update.
7927 * gcc.dg/graphite/scop-5.c: Add.
7928 * gcc.dg/graphite/scop-6.c: Add.
7930 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7932 * gcc.dg/graphite/scop-0.c: Add.
7933 * gcc.dg/graphite/scop-7.c: Add.
7934 * gcc.dg/graphite/scop-8.c: Add.
7935 * gcc.dg/graphite/scop-9.c: Add.
7936 * gcc.dg/graphite/scop-10.c: Add.
7938 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7940 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7941 Check affine expressions depending on the outermost loop
7943 (stmt_simple_for_scop_p): Same.
7944 (harmfule_stmt_in_scop): Same.
7946 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7948 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7949 mark entry and exit, that are not part of the SCoP and update HTML
7952 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7954 * graphite.c (basic_block_simple_for_scop_p): Renamed
7956 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7957 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7958 (all_preds_visited_p, all_succs_visited_p,
7959 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7960 scop_end_loop): New.
7961 (build_scops): Do not use dfs_enumerate_from.
7963 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7965 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7967 * graphite.c: Add comments to functions that are missing a
7969 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7971 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7973 * graphite.c (nb_params_in_scop): Moved...
7974 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7975 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7976 (clast_to_gcc_expression): Reduce column size to less than 80.
7977 (graphite_create_iv): Return the new name of the IV.
7978 (find_transform): Set options->esp and options->cpp.
7979 (gloog): Comment out the invalidation of the old loop code.
7980 (initialize_dependence_polyhedron): Replace scop_nb_params with
7983 * graphite.h (nb_params_in_scop): ... here.
7984 (scop_nb_params): Removed.
7985 (loop_domain_dim): Return something even when the loop was not
7986 found in the hash table: avoid ICEing on all the graphite.exp
7989 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7991 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7993 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7994 according to nesting level.
7995 (find_scop_parameters): Call instantiate_parameters.
7996 (scan_tree_for_params): Extend it to handle general affine bounds.
7997 Inner loop bound can depend on outer loop induction variable.
7998 (setup_cloog_loop): tmp variable is allocated on stack. Call
7999 instantiate_parameters with respect to outermost_loop_in_scop.
8000 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
8002 (create_empty_loop): Function loopify should be given edge
8003 probability, instead of edge frequency. Dominance relation from
8004 switch_bb to loop_header.
8005 (clast_to_gcc_expression): Added handling of clast_reduction node.
8006 (gloog): New functionality for removing old loop.
8007 (test_dependence): Factored out from build_rdg_all_levels.
8008 (build_rdg_all_levels): Dependence testing factored out to
8009 test_dependence function.
8011 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
8012 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
8015 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
8017 * graphite.c (free_scop, param_index, initialize_cloog_names,
8018 nb_params_in_scop): Use name_tree map instead of just a tree
8019 for keeping track of the variable name associated to that tree.
8020 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
8021 clast_to_gcc_expression, graphite_create_iv,
8022 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
8023 graphite_stmt_to_gcc_stmt): New.
8024 (gloog): Call these.
8025 * graphite.h (struct name_tree): New.
8026 (struct scop): Use name_tree instead of tree for params.
8027 Store a vector of name_tree for new_ivs.
8029 (scop_nb_params): Use name_tree instead of tree.
8031 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
8032 Sebastian Pop <sebastian.pop@amd.com>
8034 * tree-bounds.c: New.
8035 * tree-bounds.h: New.
8036 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
8037 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
8038 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
8042 * c-cppbuiltin.c: Same.
8046 * tree-outof-ssa.c: Same.
8048 * Makefile.in: Same.
8050 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
8051 Sebastian Pop <sebastian.pop@amd.com>
8053 * tree-loop-distribution.c (remaining_stmts,
8054 upstream_mem_writes): Removed static variables.
8055 (copy_loop_before, create_bb_after_loop,
8056 mark_nodes_having_upstream_mem_writes, free_rdg_components,
8057 rdg_build_components, rdg_build_partitions,
8058 dump_rdg_partitions): Extern.
8059 (generate_loops_for_partition, generate_code_for_partition): Do not
8061 (already_processed_vertex_p, predecessor_has_mem_write,
8062 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
8063 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
8064 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
8065 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
8066 Pass remaining_stmts and upstream_mem_writes as parameters.
8067 (rdg_component): Moved...
8068 (build_rdg_partition_for_component): Do not aggregate components when
8069 flag_streamize_loops is set.
8070 (gen_sequential_loops): New.
8071 (ldist_gen): Call gen_sequential_loops.
8073 * tree-pass.h (pass_loop_streamization): Declared.
8075 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
8076 basic blocks when loops structures exist.
8078 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
8080 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
8082 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
8083 eliminate_local_variables_stmt, eliminate_local_variables,
8084 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
8085 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
8086 of code delimited by two edges in the CFG.
8087 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
8088 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
8089 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
8090 the case of parallelisation of reductions.
8091 (create_loop_fn): Extern.
8092 (create_omp_parallel_region): New.
8094 * tree-data-ref.c (dump_data_dependence_relation): Don't call
8095 dump_data_reference for printing dra and drb.
8096 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
8098 (build_rdg): Don't call free_dependence_relations for the moment, as
8099 we attach dependence relations on each edge of the RDG.
8102 * tree-data-ref.h (rdg_component): ...here.
8103 (struct rdg_edge): New field ddr_p relation.
8104 (RDGE_RELATION): New.
8105 (create_bb_after_loop, copy_loop_before,
8106 mark_nodes_having_upstream_mem_writes, rdg_build_components,
8107 rdg_build_partitions, dump_rdg_partitions,
8108 free_rdg_components): Declared.
8110 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
8111 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
8113 * tree-loop-streamization.c: New.
8115 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
8116 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
8118 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
8120 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
8122 * passes.c: Schedule pass_loop_streamization.
8124 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
8126 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
8129 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
8131 * graphite.c (dot_all_scops): Update formatting.
8132 Bbs can now be part of more than one SCoP.
8134 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
8136 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
8138 (loop_domain_dim): Check for unregistered toplev SCOP loop.
8139 * graphite.h (loop_to_cloog_loop): New.
8141 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8143 * graphite.c (loop_domain_dim, ref_nb_loops,
8144 loop_iteration_vector_dim): New.
8145 (build_access_matrix_with_af, build_access_matrix,
8146 initialize_dependence_polyhedron): Fixed for new matrix layout.
8147 No longer assume that all iteration domains are of the same
8150 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
8152 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
8153 defined in a loop at depth 0 is invariant.
8154 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
8155 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
8156 be called at loop depth 0.
8158 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
8160 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
8161 (down_open_scop): Removed.
8162 (loop_in_scop_p): Redefined.
8163 (scop_affine_expr): New argument: scop.
8164 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
8165 a harmful statement ending a scop.
8166 (basic_block_simple_for_scop_p): New argument: scop.
8167 (get_loop_start): Removed.
8168 (new_scop): Initialize SCOP_LOOPS.
8169 (free_scop): Free SCOP_LOOPS.
8170 (succs_at_same_depth, preds_at_same_depth): New.
8171 (end_scop): Test the validity of a scop.
8172 (add_dominators_to_open_scops): New.
8173 (test_for_scop_bound): Call add_dominators_to_open_scops.
8174 Add cases for opening and closing multiple scops.
8175 (build_scops, build_scop_bbs): Iterate over basic blocks in
8177 (build_graphite_bb): Pass scop directly.
8178 (dfs_bb_in_scop_p): New.
8179 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
8181 (nb_loops_around_gb): Use loop_in_scop_p.
8182 (schedule_to_scattering): Disabled for the moment the code computing
8183 the "textual order for outer loop".
8185 * graphite.h (struct scop): New field loops.
8187 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
8189 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
8191 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
8192 Sebastian Pop <sebastian.pop@amd.com>
8194 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
8195 * common.opt (fstreamize-loops): New.
8196 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
8197 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
8198 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
8199 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
8201 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8203 * tree-data-ref.c (build_empty_rdg): New.
8204 (build_rdg): Use it.
8205 * tree-data-ref.h (build_empty_rdg): Declared.
8206 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
8207 (find_vertex_for_stmt): Removed.
8208 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
8210 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
8212 * tree-loop-distribution.c (generate_builtin): After cancelling the
8213 loop tree, also delete basic blocks.
8214 (rdg_flag_uses): Stop recursion when a vertex has already been
8217 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8219 * graphite.c (build_scop_alpha): Removed.
8220 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
8221 and dump_dependence_graph to avoid compiler warnings.
8223 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8225 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
8226 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
8227 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
8228 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
8229 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
8230 (initialize_dependence_polyhedron, find_vertex_for_stmt,
8231 initialize_data_dependence_polyhedron, is_empty_polyhedron,
8232 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
8233 dump_dependence_graph): New.
8234 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
8236 (struct scop): New field loop2cloog_loop.
8237 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
8238 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
8240 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8242 * graphite.c (build_graphite_bb): Fix initialization
8243 of the graphite basic block.
8245 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
8247 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
8248 loop domain matrix. Pass in the number of loops contained in the
8250 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
8251 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
8252 loops that are not surrounding the current loop are not represented
8253 in the domain constraint matrix.
8254 (build_scop_iteration_domain): Initial domain constraint matrix
8255 contains only the eq/ineq, cst, and scop parameters columns.
8257 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8259 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
8260 (print_graphite_bb): Print scattering.
8262 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8264 * graphite.c (initialize_cloog_names): Initialize names of
8265 scattering variables.
8267 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8269 * graphite.c (dot_all_scops_1): Disable debug output while
8272 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8274 * graphite.c (find_transform): Change cloog output language to C.
8276 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
8278 * tree-loop-distribution.c (generate_memset_zero,
8279 generate_builtin, generate_code_for_partition,
8280 rdg_flag_all_uses): New.
8281 (rdg_flag_uses): Gather in the same partition the statements defining
8282 the VUSES of the current statement.
8283 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8284 Gather in the same partition not only the stores to the same memory
8285 access, but also the reads.
8286 (ldist_generate_loops): Renamed ldist_gen.
8288 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
8289 Tobias Grosser <grosser@fmi.uni-passau.de>
8291 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8292 next pointer, don't use the inner pointer.
8294 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
8296 * graphite.c (dot_all_scops, dot_all_scops_1): New.
8297 (find_transform): Call dot_all_1.
8298 * graphite.h (dot_all_scops): Declared.
8300 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
8302 * tree-loop-distribution.c: Fix apsi.f ICE.
8303 (create_bb_after_loop): New.
8304 (generate_loops_for_partition): Use it.
8305 * gfortran.dg/ldist-1.f90: New.
8307 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8308 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8310 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8312 * graphite.c (find_transform): Dump cloog program sent to cloog.
8314 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8316 * graphite.c (initialize_cloog_names): Initialize cloog
8319 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8321 * graphite.c (build_scop_context): Fix typo, for the matrix
8322 format: insert '0 >= 0' instead of '-1 >= 0'.
8324 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8326 * Fix merge problems.
8328 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8330 * graphite.c (setup_cloog_loop): Fix typo.
8332 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8334 * doc/invoke.texi (-ftree-loop-distribution): Documented.
8335 * tree-loop-distribution.c: Reimplemented.
8336 * tree-pass.h (pass_loop_distribution): New.
8337 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8339 * graphds.h (struct graph): New field indexes.
8340 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8342 * tree-vect-analyze.c: Remove declaration of static functions when not
8344 * tree-vectorizer.c: Same.
8345 (rename_variables_in_loop): Now extern.
8346 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8347 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
8348 calling redirect_edge_and_branch_force.
8350 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8352 * tree-data-ref.c: Don't include tree-chrec.h.
8353 (debug_data_dependence_relations): New.
8354 (dump_data_dependence_relation): Call dump_data_reference on data refs
8356 (same_access_functions): Moved...
8357 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8358 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8359 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8360 struct rdg_vertex_info, ): New.
8361 (create_rdg_edge_for_ddr): Compute the dependence level before looking
8363 (create_rdg_vertices): Initialize the htab of graph->indexes.
8364 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8365 (stmts_from_loop): Don't save LABEL_EXPR.
8366 (hash_stmt_vertex_info, eq_stmt_vertex_info,
8367 hash_stmt_vertex_del): New.
8368 (build_rdg): Initialize rdg->indexes.
8369 (free_rdg, stores_from_loop, ref_base_address,
8370 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8371 have_similar_memory_accesses_1, ref_base_address_1,
8372 remove_similar_memory_refs): New.
8374 * tree-data-ref.h: Include tree-chrec.h.
8375 (debug_data_dependence_relations): Declared.
8376 (same_access_functions): ...here. Now static inline.
8377 (ddr_is_anti_dependent, ddrs_have_anti_deps,
8378 ddr_dependence_level): New.
8379 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8380 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8381 RDG_MEM_READS_STMT): New.
8382 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8383 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8384 rdg_vertex_for_stmt): Declared.
8385 (struct rdg_edge): New field level.
8386 (RDGE_LEVEL, free_rdg): New.
8387 (stores_from_loop, remove_similar_memory_refs,
8388 rdg_defs_used_in_other_loops_p,
8389 have_similar_memory_accesses): Declared.
8390 (rdg_has_similar_memory_accesses): New.
8392 * lambda.h (dependence_level): New.
8393 * common.opt (ftree-loop-distribution): New.
8394 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8395 (print_loop_ir): Renamed print_loops.
8396 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8397 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8398 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8399 (tree-loop-distribution.o): Added.
8400 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8401 (mark_virtual_ops_in_bb): New.
8402 (print_loops_bb, debug_loop_num, debug_loop): New.
8403 * passes.c: Scheduled pass_loop_distribution.
8405 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8407 * graphite.c (scan_tree_for_params): Correct the number of columns
8409 (nb_flat_iterator): New.
8410 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8411 (build_scop_iteration_domain): Correct the number of columns for
8414 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8416 * Merge from mainline (129697:130800).
8418 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
8420 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8421 dominated by SCoP's exit.
8422 (graphite_transform_loops): Compute post dominators.
8424 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8426 * Merge from mainline (127169:129697).
8428 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8430 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
8431 parameter for the basic block that contains the expression. Use
8432 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8433 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8435 * graphite.h (gbb_loop): New.
8436 (GBB_LOOP): Removed.
8438 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8440 * Makefile.in: Fix merge problem.
8442 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8444 * Merge from mainline (125309:127169).
8445 * tree-loop-distribution.c: Disabled.
8447 2007-06-05 Sebastian Pop <sebpop@gmail.com>
8449 * Merge from mainline (r123693:125309).
8451 2007-05-30 Sebastian Pop <sebpop@gmail.com>
8453 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8455 (correct_modify_p, check_statements, number_of_lvalue_uses,
8456 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8457 instead of MODIFY_EXPR.
8458 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
8461 2007-05-24 Sebastian Pop <sebpop@gmail.com>
8463 * tree-loop-distribution.c (struct rdg): Replace arrays by
8464 VECs for edges and vertices.
8465 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8466 (RDGV_NB_PARTITIONS): New.
8467 (PRDG_NBV, PRDG_NBE): Removed.
8468 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8469 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8470 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8472 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
8473 Sebastian Pop <sebpop@gmail.com>
8475 * doc/invoke.texi (-ftree-loop-distribution): Document.
8476 * tree-loop-distribution.c: New file.
8477 * tree-pass.h (pass_loop_distribution): Declared.
8478 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8479 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8481 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8482 (DDR_REVERSED_P): New.
8483 * common.opt (-ftree-loop-distribution): New.
8484 * tree-flow.h (distribute_loops): Declared.
8485 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8486 * passes.c (init_optimization_passes): Schedule loop distribution.
8488 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
8490 * graphite.c (print_graphite_bb): Don't call dump_data_references.
8491 (print_scop): Don't print when scop is NULL.
8492 (build_scop_context, find_transform): Don't output to stderr.
8494 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
8496 * tree-data-ref.c: Don't include graphite.h.
8497 Comment out the code for printing data reference's scop.
8498 (build_access_matrix_with_af): Moved...
8499 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8500 * graphite.c (build_access_matrix_with_af): ... here. Now static.
8501 (print_graphite_bb): Print basic block's schedule.
8502 (print_scop): Don't print the schedule, call cloog's pretty printer.
8503 (bb_in_scop_p): A basic block is in a scop only if it is both
8504 dominated and postdominated by the scop's entry and exit basic blocks.
8505 (function_parameter_p): New.
8506 (invariant_in_scop_p): Use function_parameter_p.
8507 (new_scop, save_scop): New.
8508 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8510 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8511 (loop_in_scop_p): New.
8512 (scop_record_loop): Use loop_in_scop_p.
8513 (build_scop_domain): Renamed build_scop_iteration_domain.
8514 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8515 nb_params_in_scop, build_scop_context, first_loop_in_scop,
8516 setup_cloog_loop, dot_scop_1, dot_scop): New.
8517 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8518 (struct scop): Add a pointer to cloog's representation of a program.
8520 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8522 * doc/invoke.texi (-ftree-check-verbose): Renamed
8523 -ftree-checks-verbose.
8524 * common.opt (flag_tree_check_verbose): Renamed
8525 flag_tree_checks_verbose.
8526 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8528 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8530 * configure: Regenerated.
8531 * config.in: Regenerated.
8532 * tree-ssa-loop.c (graphite_transforms): Execute
8533 graphite_transform_loops only when HAVE_cloog.
8534 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8535 * graphite.c: Include polylibgmp.h and cloog.h.
8536 (graphite_transform_loops): Removed loops parameter.
8537 * tree-flow.h (graphite_transform_loops): Update declaration.
8538 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8539 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8540 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8541 (OBJS-common): Remove dependence on graphite.o.
8542 (BACKEND): Depend on @GRAPHITE@.
8544 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
8546 * doc/invoke.texi (-ftree-check-verbose): Documented.
8547 * gcc.dg/tree-checker/tree-checks-1.c: New.
8548 * gcc.dg/tree-checker/tree-checks-2.c: New.
8549 * gcc.dg/tree-checker/tree-checks-3.c: New.
8550 * gcc.dg/tree-checker/tree-checks-4.c: New.
8551 * gcc.dg/tree-checker/tree-checks.exp: New.
8552 * gcc.dg/tree-checker/condates.crp: New.
8553 * common.opt (ftree-checks-verbose): New.
8554 * tree-check.c (tree_check_warning): Move extra stderr output
8555 under control of flag_tree_check_verbose.
8557 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
8559 * tree-match.c: Fix comments formatting.
8560 * tree-match.h: Fix comments formatting.
8561 * tree-check.c: Fix comments formatting.
8562 (tree_check_init): Restructure.
8564 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
8566 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8568 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
8570 * Merge from mainline (r120733:123693).
8572 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8574 * condate.y: New file.
8575 * tree-match.h (struct patt_info_s): New field sign.
8576 (struct condate_s): New field msg.
8577 (normalize_condate, name_condate, add_condate): New.
8578 (conds[], condate_parse): Made extern.
8579 * tree-check.c (tree_check_warning): First arg changed to cond;
8580 warning reformatted.
8581 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8583 (tree_check): Process trivial condates.
8584 (read_delimited_string): Removed.
8585 (print_cond): Print name and msg.
8586 (conds[]): Made extern.
8587 (parse_tree_check_file_once): Rewritten to use the parser in
8589 Processing of option --tree_check_string moved to tree_scan().
8590 * Makefile.in: Added condate.y
8592 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8594 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8595 Use VECs instead of varrays.
8596 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8597 * Makefile.in (pretty-print.o): Depend on vec.h.
8598 * pretty-print.c: Include tree.h and vec.h.
8599 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8600 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8601 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8602 pp_free_list): Use VECs instead of varrays.
8603 * pretty-print.h: Do not include varray.h.
8604 (struct tree_chunk_s): Declaration moved before its use.
8605 (output_buffer): Rename varray field to chunks.
8606 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8607 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8608 save_global_holes): Use VECs instead of varrays.
8609 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8610 * tree-check.c (scan_cfg_stmts, push_node,
8611 print_matching_stmt): Removed.
8612 (tree_check_instance, push_global_holes_if_new, tree_check,
8613 execute_tree_check): Use VECs instead of varrays.
8614 (gate_tree_check): Don't execute the CFG check when basic_block_info
8617 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8619 * Merge from mainline (r115016:120733).
8621 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8623 * Merge from mainline (r117632:117661).
8625 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8627 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8628 * tree-pass.h (TDF_DEBUG, debug_p): New.
8629 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8630 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8631 get_loop_exit_condition, analyze_evolution_in_loop,
8632 analyze_initial_condition, analyze_scalar_evolution,
8633 instantiate_parameters, number_of_latch_executions): Use debug_p.
8634 * tree-chrec.c (chrec_apply): Use debug_p.
8635 * tree-data-ref.c: Include graphite.h.
8636 (dump_data_reference): Print also the access matrix.
8637 (analyze_array, analyze_indirect_ref, init_data_ref,
8638 analyze_offset_expr, address_analysis, object_analysis,
8639 create_data_ref, finalize_ddr_dependent,
8640 non_affine_dependence_relation, analyze_ziv_subscript,
8641 analyze_siv_subscript_cst_affine,
8642 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8643 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8644 analyze_miv_subscript, analyze_overlapping_iterations,
8645 build_classic_dist_vector, subscript_dependence_tester,
8646 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8647 (build_access_matrix_with_af): No longer static.
8648 * tree-data-ref.h (scop_p): ... declaration here.
8649 (data_reference.scop): New field.
8650 (DR_SCOP, DR_ACCESS_MATRIX): New.
8651 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8652 * graphite.c (print_graphite_bb): Call dump_data_references.
8653 (print_scop): Use scop_nb_loops and scop_dim_domain.
8654 (test_for_scop_bound): Use debug_p.
8655 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8657 (scop_loop_index): Moved...
8658 (scop_record_loop): New.
8659 (build_scop_loop_nests): Use scop_record_loop.
8660 (build_scop_domain): Use scop_dim_domain.
8661 (build_access_matrix): Implemented.
8662 (build_scop_canonical_schedules): Use scop_nb_loops.
8663 (build_graphite_bb): Initialize GBB_SCOP.
8664 * graphite.h (scop_p): Moved...
8665 (graphite_bb.scop): New field.
8666 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8667 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8668 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8669 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8670 scop_loop_index): New.
8671 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8673 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8675 * Merge from mainline (r117661:120450).
8677 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8679 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8680 at the first declaration outside the varying loop, instantiate as
8682 * tree-chrec.c (for_each_scev_op): New.
8683 * tree-chrec.h (for_each_scev_op): Declared.
8684 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8685 * tree-data-ref.c (get_references_in_stmt,
8686 find_data_references_in_stmt): New, from trunk.
8687 (find_data_references_in_loop): Use get_references_in_stmt
8688 and find_data_references_in_loop, modified as in trunk.
8689 (build_access_matrix_with_af): New.
8690 * tree-data-ref.h (data_reference): Add a field access_matrix.
8691 (data_ref_loc): New, as in trunk.
8692 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8693 invariant_in_scop_p, param_index, scan_tree_for_params,
8694 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8695 idx_record_param, idx_record_params, build_access_matrix,
8696 build_scop_data_accesses, build_scop_canonical_schedules,
8697 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8698 build_scop_params): New.
8699 * graphite.h (graphite_bb): New.
8700 (scop): Add fields static_schedule, params, loop_nest,
8702 * lambda.h: Declare vecs of lambda_matrix.
8703 * tree-flow.h (print_loop_ir_bb): Declared.
8704 * tree-cfg.c (print_loop_ir_bb): New.
8705 (print_loop): Use print_loop_ir_bb.
8707 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8709 * Merge from mainline (r115016:117632).
8711 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8713 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8714 break due to a warning.
8716 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8718 * graphite.c (print_scops, debug_scops): New.
8719 (graphite_transform): Renamed graphite_find_transform.
8720 * graphite.h (debug_scops): Declared.
8722 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8724 * tree-match.c: Reformat following the GNU style.
8725 * tree-match.h: Reformat following the GNU style.
8726 * tree-pattern.h: Removed empty file.
8727 * Makefile.in: Remove references to tree-pattern.h.
8728 * tree-check.c: Reformat following the GNU style.
8729 (execute_tree_check): Move gate condition code to...
8730 (gate_tree_check): ...here. New function.
8731 (pass_check): Use the gate function.
8733 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8735 * tree-pattern.h: New. Tree pattern matching and checking using
8737 * tree-check.c: New. Tree/CFG checking pass.
8738 * tree-match.c: New. Library for tree pattern matching.
8739 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8740 * toplev.c, flags.h: Add globals for tree-check pass.
8741 * Makefile.in: Integrate the files in tree-check pass.
8742 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8743 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8744 Introduce a "lazy" pretty-print mode.
8745 * tree.c, tree.h: Add tree_name.
8747 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8749 * doc/invoke.texi (-fgraphite): Correct typo.
8750 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8751 use of print_loop_ir.
8752 * gcc.dg/graphite/scop-1.c: New.
8753 * gcc.dg/graphite/scop-2.c: New.
8754 * gcc.dg/graphite/graphite.exp: New.
8755 * graphite.c: Include domwalk.h.
8756 (print_scop): Print only the entry and exit blocks.
8757 (debug_scop): No longer static.
8758 (affine_expr): Fix formating. Return also true when the expression is
8760 (stmt_simple_for_scop_p): Fix formating.
8761 (build_scops): Use domwalk.
8762 (get_loop_start, end_scop, test_for_scop_bound): New.
8763 (graphite_transform_loops): Avoid printing on stderr.
8764 * graphite.h (debug_scop): Declared.
8765 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8766 * Makefile.in (graphite.o): Depend on domwalk.h.
8767 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8768 declarations for static functions.
8769 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8770 controlling output verbosity.
8772 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8773 Plesco Alexandru <shurikx@gmail.com>
8775 * doc/invoke.texi (-fgraphite): Document.
8776 * tree-pass.h (pass_graphite_transforms): Declared.
8777 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8778 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8779 (pass_graphite_transforms): Defined.
8780 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8781 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8782 * graphite.c, graphite.h: New.
8783 * common.opt (fgraphite): Declared.
8784 * tree-flow.h (graphite_transform_loops): Declared.
8785 * Makefile.in (OBJS-common): Add graphite.o.
8786 (graphite.o): New rule.
8787 * passes.c (pass_graphite_transforms): Scheduled.