1 2011-01-05 Vladimir Kargov <kargov@gmail.com>
3 * graphite-scop-detection.c (is_valid_stmt_p): Pass the entry basic
4 block instead of region start to the instantiation.
5 (is_valid_bb_p): Add support for basic blocks with conditional
7 (find_scops_new): Recalculate dominance info before SCOP
10 2011-01-05 Vladimir Kargov <kargov@gmail.com>
12 * graphite-scop-detection.c (get_outermost_loop_in_region): New.
13 (is_valid_loop_p): Correct loop passed to stmt_has_simple_data_refs_p
15 2011-01-05 Vladimir Kargov <kargov@gmail.com>
17 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Free
18 invalid postdominance info
20 2010-12-29 Sebastian Pop <sebastian.pop@amd.com>
22 * Makefile.in (graphite-opencl-codegen.o): Update dependences.
23 (graphite-opencl-meta-clast.o): Same.
24 (graphite-opencl.o): Same.
25 (refined-regions.o): Same.
26 * graphite-opencl-codegen.c: Do not include unnecessary .h files.
27 * graphite-opencl-meta-clast.c: Same.
28 * graphite-opencl.c: Same.
29 * refined-regions.c: Same.
31 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
33 * graphite-opencl-codegen.c: Use FOR_EACH_VEC_ELT.
34 * graphite-opencl-meta-clast.c: Same.
35 * graphite-opencl.c: Same.
37 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
39 * graphite-opencl-codegen.c: Do not include sys/time.h.
40 * graphite-opencl.c: Same.
42 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
44 * graphite-opencl.c (h_context, h_cmd_queue, h_program): Moved
45 out of ifdef HAVE_cloog section.
47 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
49 * Makefile.in (graphite-opencl.o): Depends on
50 graphite-opencl-functions.def.
51 * graphite-opencl-functions.def: New.
52 * graphite-opencl.c (enum OPENCL_FUNCTIONS): Read data from
53 graphite-opencl-functions.def.
54 (opencl_function_names): Same.
55 (opencl_create_function_decl): Use the enum OPENCL_FUNCTIONS
56 as indices of opencl_function_names.
58 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
60 * graphite-opencl-codegen.c: Fix formatting.
61 * graphite-opencl-meta-clast.c: Same.
62 * graphite-opencl.c: Same.
64 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
66 * graphite-opencl-codegen.c: Fix formating problems.
67 * graphite-opencl-meta-clast.c: Same.
68 * graphite-opencl.c: Same.
69 * graphite-opencl.h: Same.
71 2010-12-27 Sebastian Pop <sebastian.pop@amd.com>
73 * graphite-opencl-codegen.c: Sort topologically static functions.
74 * graphite-opencl.c: Same.
76 2010-12-25 Sebastian Pop <sebastian.pop@amd.com>
78 * graphite-cloog-compat.h (cloog_names_nb_scattering): New.
79 (cloog_names_scattering): New.
80 * graphite-opencl-codegen.c (opencl_constant_expression_p): Use
81 clast_expr_* instead of expr_*. Call clast_name_to_str.
82 (opencl_clast_name_to_tree): Now takes a clast_name_p in parameter.
83 (opencl_get_scat_real_name): Same. Call clast_name_to_str.
84 (opencl_add_scat_as_arg): Same.
85 (opencl_print_local_vars): Call cloog_names_scattering and
86 cloog_names_nb_scattering.
87 (opencl_print_for): Do not call value_*.
88 (opencl_print_term): Same.
89 (opencl_print_expr): Use clast_expr_* instead of expr_*.
90 (opencl_print_sum): Same.
91 (opencl_print_binary): Same.
93 2010-12-25 Alexey Kravets <kayrick@ispras.ru>
95 * Makefile.in (OBJS-common): Add graphite-opencl-codegen.o,
96 graphite-opencl-meta-clast.o and graphite-opencl.o.
97 (graphite-opencl-codegen.o): New.
98 (graphite-opencl-meta-clast.o): New.
99 (graphite-opencl.o): New.
100 (GTFILES): Add graphite-opencl.c.
101 * common.opt (fgraphite-opencl): New.
102 (fgraphite-opencl-cpu): New.
103 (fgraphite-opencl-ignore-depth-heuristic): New.
104 (fgraphite-opencl-ignore-mem-heuristic): New.
105 (fgraphite-opencl-ignore-dep): New.
106 (fgraphite-opencl-ignore-types): New.
107 (fgraphite-opencl-depth-base): New.
108 (fgraphite-opencl-debug): New.
109 * graphite-opencl-codegen.c: New file.
110 * graphite-opencl-meta-clast.c: New file.
111 * graphite-opencl.c: New file.
112 * graphite-opencl.h: New file.
113 * graphite.c (graphite_transform_loops): Call graphite_opencl_init and
114 graphite_opencl_finalize.
115 * tree-ssa-loop.c (gate_graphite_transforms): Handle
116 flag_graphite_opencl.
117 * graphite-clast-to-gimple.c (gloog): Call opencl_transform_clast.
118 * dbgcnt.def (opencl_scop_cnt): New counter.
120 2010-12-25 Alexander Monakov <amonakov@ispras.ru>
122 * graphite-dependences.c (graphite_outer_subscript_bound): New.
123 (graphite_carried_dependence_level_k): Export.
124 * graphite-dependences.h (graphite_outer_subscript_bound): Declare.
125 (graphite_carried_dependence_level_k): Ditto.
127 2010-12-25 Alexey Kravets <kayrick@ispras.ru>
129 * graphite-clast-to-gimple.c (struct clast_name_index): Move
130 definition to graphite-clast-to-gimple.h.
131 (clast_name_to_index): Ditto.
132 (clast_name_index_elt_info): Ditto.
133 (eq_clast_name_indexes): Ditto.
134 (save_clast_name_index): Export.
135 (clast_name_to_gcc): Ditto.
136 (clast_to_gcc_expression): Ditto.
137 (gcc_type_for_clast_expr): Ditto.
138 (graphite_create_new_guard): Ditto.
139 (gcc_type_for_iv_of_clast_loop): Ditto.
140 (graphite_create_new_loop): Ditto.
141 (build_iv_mapping): Ditto.
142 (graphite_create_new_loop_guard): Ditto.
143 (debug_clast_name_index): New.
144 (debug_clast_name_indices): New debug function.
146 2010-12-21 Sebastian Pop <sebastian.pop@amd.com>
148 PR tree-optimization/47021
149 * graphite-sese-to-poly.c (scan_tree_for_params): Handle ADDR_EXPR.
151 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
153 * graphite-sese-to-poly.c (analyze_drs_in_stmts): Fix set but
155 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
157 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
159 * graphite-sese-to-poly.c (analyze_drs): Removed.
160 (build_scop_drs): Do not call analyze_drs.
161 (analyze_drs_in_stmts): New.
163 (insert_out_of_ssa_copy): Call analyze_drs_in_stmts.
164 (insert_out_of_ssa_copy_on_edge): Same.
165 (rewrite_close_phi_out_of_ssa): Call insert_stmts.
166 (rewrite_phi_out_of_ssa): Same.
167 (rewrite_cross_bb_scalar_dependence): Same.
168 (split_reduction_stmt): Move data references in the new basic blocks.
169 (translate_scalar_reduction_to_array_for_stmt): Call insert_stmts.
171 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
173 * sese.c (rename_uses): Do not handle ADDR_EXPR in LHS of assignments.
175 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
178 * graphite-poly.c (new_poly_bb): Returns a poly_bb_p. Do not take
179 the reduction bool in parameter. Clear PBB_IS_REDUCTION. Set GBB_PBB.
180 * graphite-poly.h (new_poly_bb): Update declaration.
181 (gbb_from_bb): Moved here...
183 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
185 (graphite_stmt_p): Removed.
186 (try_generate_gimple_bb): Returns a gimple_bb_p. Do not pass in
187 sbitmap reductions. Always build a gimple_bb_p. Do not call
189 (build_scop_bbs_1): Do not pass in sbitmap reductions.
190 (build_scop_bbs): Same.
191 (gbb_from_bb): ... from here.
192 (add_conditions_to_constraints): Moved up.
194 (build_scop_drs): Call analyze_drs. Remove all the PBBs that do
195 not contain data references.
196 (new_pbb_from_pbb): New.
197 (insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
199 (rewrite_close_phi_out_of_ssa): Update call to
200 insert_out_of_ssa_copy_on_edge.
201 (rewrite_reductions_out_of_ssa): Now static.
202 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
204 (split_reduction_stmt): Call split_pbb.
205 (translate_scalar_reduction_to_array): Pass in the scop, do not
206 pass in the sbitmap reductions.
207 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
208 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
209 (rewrite_commutative_reductions_out_of_ssa): Same.
210 (build_poly_scop): Call build_scop_bbs,
211 rewrite_commutative_reductions_out_of_ssa,
212 rewrite_reductions_out_of_ssa, and
213 rewrite_cross_bb_scalar_deps_out_of_ssa. Move build_scop_drs
215 * graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
217 (rewrite_reductions_out_of_ssa): Same.
218 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
219 (build_scop_bbs): Same.
220 * graphite.c (graphite_transform_loops): Do not initialize reductions.
221 Do not call build_scop_bbs,
222 rewrite_commutative_reductions_out_of_ssa,
223 rewrite_reductions_out_of_ssa, and
224 rewrite_cross_bb_scalar_deps_out_of_ssa.
225 * sese.h (struct gimple_bb): Add field pbb.
228 * gcc.dg/graphite/pr45297.c: New.
230 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
232 * graphite-sese-to-poly.c (handle_scalar_deps_crossing_scop_limits):
234 (rewrite_cross_bb_scalar_deps): Pass in the scop. Call
235 handle_scalar_deps_crossing_scop_limits.
236 (rewrite_cross_bb_scalar_deps_out_of_ssa): Create an empty BB
237 after the scop. Update call to rewrite_cross_bb_scalar_deps.
239 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
241 * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
242 when replacing a constant in an ADDR_EXPR.
244 2010-10-20 Sebastian Pop <sebastian.pop@amd.com>
246 * graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
248 (lst_do_strip_mine): Same.
249 (scop_do_strip_mine): Same.
250 * graphite-poly.c (apply_poly_transforms): Update call to
252 * graphite-poly.h (scop_do_strip_mine): Update declaration.
254 2010-09-24 Sebastian Pop <sebastian.pop@amd.com>
257 * graphite.c (graphite_initialize): Call scev_reset.
259 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
261 * sese.h (scev_analyzable_p): Return false for real or floating
262 point. Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
264 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
267 * gfortran.dg/graphite/pr45758.f90: New.
269 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
271 * graphite-scop-detection.c (is_scop_p): Free bblist.
273 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
275 * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
277 * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
279 * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
280 Do not allocate ub_expr, it is passed in initialized.
282 2010-09-21 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
284 * common.opt (fgraphite-dump-cloog): New flag.
285 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
286 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
287 (build_cloog_prog): Dump CLooG input file when
288 flag_graphite_dump_cloog is set.
289 * graphite-cloog-compat.h (cloog_program_dump_cloog): New.
291 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
293 Revert previous patch "New flag: -fgraphite-dump-cloog."
295 2010-09-20 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
297 * common.opt (fgraphite-dump-cloog): New flag.
298 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
299 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
300 (build_cloog_prog): Dump CLooG input file when
301 flag_graphite_dump_cloog is set.
303 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
305 * graphite-clast-to-gimple.c (graphite_verify): Remove call to
306 verify_dominators for CDI_POST_DOMINATORS.
307 * sese.h: Remove comment about CDI_POST_DOMINATORS.
308 (recompute_all_dominators): Remove call to free_dominance_info
309 for CDI_POST_DOMINATORS. Remove call to calculate_dominance_info
310 for CDI_POST_DOMINATORS.
312 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
314 * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
315 over pbb_dim_iter_domain.
317 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
319 * graphite-flattening.c: Fix comments.
321 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
323 * Makefile.in (OBJS-common): Add graphite-flattening.o.
324 (graphite-flattening.o): New rule.
325 * common.opt (floop-flatten): New flag.
326 * doc/invoke.texi (-floop-flatten): Documented.
327 * graphite-flattening.c: New.
328 * graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
329 * graphite-poly.h (flatten_all_loops): Declared.
330 (lst_remove_loop_and_inline_stmts_in_loop_father): New.
331 * tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
332 is set, also set flag_graphite.
334 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
336 * graphite-poly.c (cloog_checksum): New.
337 * graphite-poly.h (cloog_checksum): Declared.
339 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
341 * graphite-poly.c (pbb_number_of_iterations): Removed.
342 (pbb_number_of_iterations_at_time): Correctly compute the number
343 of iterations in the transformed loop.
344 * graphite-poly.h (pbb_number_of_iterations): Removed.
346 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
348 * graphite-poly.h (lst_update_scattering_seq): Removed.
349 (lst_update_scattering): Correctly handle outermost loop dewey
352 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
354 * graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
355 lst_strip_mine_profitable_p. Call lst_niter_for_loop.
356 * graphite-poly.h (lst_niter_for_loop): New.
358 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
360 * graphite-poly.c (apply_poly_transforms): Do not abort when the
361 transform read from disk is not legal. Call fatal_error instead.
363 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
365 * graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
366 (print_scop_header): Removed. Inlined in the only call place...
367 (print_scop): ... here.
369 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
371 * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
373 2010-09-02 Vladimir Kargov <kargov@gmail.com>
375 * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
376 (is_valid_stmt_p): Add data reference and operation-specific checks.
377 (is_valid_bb_p): Change structure, add loop validity check.
378 (is_scop_p): Move the TODO list
379 (find_scops_new): New.
380 (build_scops_new): Move part of functionality to find_scops_new and
381 build_scops. Add necessary steps for successful SCoP construction.
382 (build_scops): Compute SCoP sets for both detection algorithms, choose
383 the resulting one depending on static condition.
385 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
387 * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
389 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
391 * graphite-dependences.c (dot_deps): Avoid set but not used warning.
392 (dot_deps_stmt): Same.
393 * graphite-poly.c (dot_lst): Same.
395 2010-08-23 Sebastian Pop <sebastian.pop@amd.com>
397 * graphite-blocking.c (scop_do_strip_mine): Do not call
398 graphite_legal_transform.
399 (scop_do_block): Same.
401 2010-08-20 Vladimir Kargov <kargov@gmail.com>
403 * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
406 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
409 * gcc.dg/graphite/id-pr45230.c: New.
411 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
413 * tree-scalar-evolution.c (instantiate_array_ref): New.
414 (instantiate_scev_r): Also handle ARRAY_REFs.
416 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
418 * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
419 Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
420 RESULT_DECL, and FIELD_DECL. Return false for an
421 SSA_NAME_IS_DEFAULT_DEF.
422 (compute_scalar_evolution_in_loop): Do not further analyze the
423 scalar evolution when no_evolution_in_loop_p returns true.
425 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
427 * tree-chrec.h (evolution_function_is_affine_p): Do not check
428 whether CHREC_LEFT is invariant. A function is affine when
429 CHREC_RIGHT is invariant.
431 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
433 * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
435 (rewrite_degenerate_phi): Same.
436 (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
438 2010-08-18 Vladimir Kargov <kargov@gmail.com>
440 * graphite-scop-detection.c (graphite_can_represent_scev,
441 graphite_can_represent_expr, stmt_has_simple_data_refs_p,
442 graphite_can_represent_loop): Remove outermost_loop.
444 2010-08-17 Sebastian Pop <sebastian.pop@amd.com>
447 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
448 handle GIMPLE_CALLs with no LHS.
450 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
451 Sebastian Pop <sebastian.pop@amd.com>
453 * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
454 Call remove-build-file to clean up the generated *.graphite files.
456 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
458 * doc/invoke.texi (debugging options): Update documentation.
459 (-floop-interchange): Same.
460 (-flopp-strip-mine): Same.
461 (-floop-block): Same.
462 (-fgraphite-read): Add documentation.
463 (-fgraphite-write): Same.
465 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
467 * toplev.c (process_options): Disable graphite loop optimization
468 options when -fgraphite-read flag is used.
470 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
472 * graphite-poly.c (init_graphite_out_file): New.
473 (init_graphite_in_file): New.
474 (apply_poly_transforms): Updated to enable reading and writing of
476 * toplev.c (init_asm_output): Remove graphite in/out file initialization.
478 2010-08-17 Tobias Grosser <grosser@fim.uni-passau.de>
480 * graphite-scop-detection.c (graphite_can_represent_scev): Remove
483 2010-08-12 Sebastian Pop <sebastian.pop@amd.com>
485 * graphite-clast-to-gimple.c (precision_for_value): Adjust
486 computation of precision by 1.
488 2010-08-12 Riyadh Baghdadi <baghdadi.mr@gmail.com>
490 * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
491 (openscop_read_polyhedron_matrix): New.
492 * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
493 (openscop_read_N_int): Same.
494 * graphite-poly.c (openscop_read_N_int): New.
495 (openscop_read_one_int): New.
496 (openscop_read_N_string): New.
497 (openscop_read_one_string): New.
498 (openscop_read_powerset_matrix): New.
499 (graphite_read_transforms): Remove.
500 (graphite_read_scatt): New.
501 (graphite_read_scop_file): New.
502 (apply_poly_transforms): Updated to call graphite_read_scop_file.
504 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
506 * graphite-poly.c: Change include order.
508 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
510 * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
511 (cloog_matrix_nrows): New.
513 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
515 * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
517 * graphite-poly.c (openscop_print_scattering_function_1): Same.
518 (print_scattering_function_1): Same.
519 (openscop_print_pbb_domain): Same.
520 (openscop_print_scop_context): Same.
521 (print_scop_context): Same.
523 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
525 * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
526 (openscop_print_pdr_polyhedron): Print pph.
528 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
530 * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
531 * gfortran.dg/graphite/graphite.exp: Same.
532 * gcc.dg/graphite/vect-pr43423.c: New.
534 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
536 * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
537 priority signed types.
539 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
541 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
542 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
544 2010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
546 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
547 (openscop_print_polyhedron_matrix): New.
548 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
549 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
550 (openscop_print_pdr_powerset): New.
551 (openscop_print_powerset_matrix): New.
552 (openscop_print_scattering_function_1): New.
553 (print_scattering_function): Add support for scattering names and
555 (graphite_write_transforms): Remove.
556 (apply_poly_transforms): Updated to call print_scop.
557 (print_pdr_access_layout): Updated to support OpenScop format.
559 (openscop_print_pbb_domain): New.
560 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
562 (print_pbb): Updated to call the new print_pbb_body.
563 (openscop_print_scop_context): New.
564 (print_scop_header): New.
565 (print_scop): Updated to call print_scop_header.
566 * graphite-poly.h: Document OpenScop format.
568 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
570 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
571 the case removed in the previous patch, when the only phi argument
572 is defined in the same loop as the phi node itself. Handle it
573 separately from the invariant case by both propagating it outside
574 the region and replacing the phi node with an assign.
576 2010-07-28 Sebastian Pop <sebastian.pop@amd.com>
578 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
579 constant phi nodes with one argument are is_gimple_min_invariant
580 and SSA_NAME_IS_DEFAULT_DEF.
582 * gfortran.dg/graphite/id-22.f: New.
584 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
586 * graphite.c (graphite_initialize): Do not initialize
587 CLooG and initialize the Parma Polyhedra Library
588 manually when using CLOOG_ORG.
589 (graphite_finalize): Do not finalize CLooG and finalize
590 the Parma Polyhedra Library manually when using CLOOG_ORG.
591 * graphite-cloog-compat.h (cloog_initialize): Hide function
592 when using CLOOG_ORG.
593 (cloog_finalize): Same.
595 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
597 * graphite-clast-to-gimple.c (free_scattering): Change
598 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
600 (build_cloog_prog): Same.
601 * graphite-cloog-compat.h (cloog_domain): Removed.
602 (cloog_scattering): New.
603 (cloog_set_domain): Removed.
604 (cloog_set_scattering): New.
605 (cloog_next_domain): Removed.
606 (cloog_next_scattering): New.
607 (cloog_set_next_domain): Removed.
608 (cloog_set_next_scattering): New.
609 (CloogScatteringList): New.
610 (CloogScattering): New.
611 (cloog_scattering_free): New.
612 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
613 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
616 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
618 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
620 (set_cloog_options): Same.
621 (print_clast_stmt): Same.
622 (scop_to_clast): Same.
623 (print_generated_program): Same.
625 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
626 (scop_to_clast): Extend with CloogState.
627 * graphite-cloog-util.c: Include graphite-cloog-compat.h
628 (new_Cloog_Domain_from_ppl_Polyhedron):
629 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
630 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
631 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
632 * graphite-cloog-util.h (build_cloog_prog): Same.
633 * graphite-cloog-copat.h (build_cloog_prog): New.
635 (cloog_state_malloc): New.
636 (cloog_state_free): New.
637 (cloog_loop_malloc): New.
638 (cloog_options_malloc): New.
639 (cloog_statement_alloc): New.
640 (cloog_domain_from_cloog_matrix): New.
641 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
642 (new_Cloog_Domain_from_ppl_Polyhedron): New.
644 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
646 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
647 type of NAME now depends on used CLooG version.
648 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
649 (gcc_type_for_clast_expr): Same.
650 (print_clast_stmt): Replace pprint with clast_pprint.
651 * graphite-cloog-compat.h: Provide compatibility macros for
654 (clast_expr_term): New.
655 (clast_expr_red): New.
656 (clast_expr_bin): New.
659 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
661 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
662 compatible to newer CLooG releases (CLOOG_ORG).
663 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
664 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
665 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
666 (build_cloog_prog) : New.
667 (cloog_program_extract_scalars): New.
668 (cloog_program_scatter): New.
670 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
672 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
673 conditionally (CLOOG_ORG).
674 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
675 (cloog_statement_usr): New.
676 (cloog_domain): Same.
677 (cloog_set_domain): Same.
678 (cloog_next_domain): Same.
679 (cloog_set_next_domain): Same.
680 (cloog_program_nb_scattdims): Same.
681 (cloog_program_set_nb_scattdims): Same.
682 (cloog_program_names): Same.
683 (cloog_program_set_names): Same.
684 (cloog_program_set_context): Same.
685 (cloog_program_set_loop): Same.
686 (cloog_program_blocklist): Same.
687 (cloog_program_set_blocklist): Same.
688 (cloog_program_scaldims): Same.
689 (cloog_program_set_scaldims): Same.
690 (cloog_names_nb_parameters): Same.
691 (cloog_names_set_nb_parameters): Same.
692 (cloog_names_parameters): Same.
693 (cloog_names_set_parameters): Same.
694 (cloog_names_set_nb_iterators): Same.
695 (cloog_names_set_iterators): Same.
696 (cloog_names_set_nb_scattering): Same.
697 (cloog_names_set_scattering): Same.
698 (cloog_statement_set_usr): Same.
699 (cloog_loop_set_next): Same.
700 (cloog_loop_set_domain): Same.
701 (cloog_loop_set_block): Same.
702 (cloog_block_list_next): Same.
703 (cloog_block_list_set_next):
704 (cloog_block_list_set_block): Same.
706 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
708 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
710 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
711 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
712 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
713 when something has been changed.
714 (rewrite_commutative_reductions_out_of_ssa): Same.
716 * gcc.dg/graphite/id-26.c: New.
718 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
720 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
721 handle the case when def is in the sese region.
722 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
723 for invariant expressions.
724 (rewrite_cross_bb_phi_deps): Removed.
725 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
726 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
727 rewrite_cross_bb_phi_deps.
729 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
731 * graphite-sese-to-poly.c
732 (rewrite_commutative_reductions_out_of_ssa_loop): Call
733 scev_analyzable_p only on is_gimple_reg
735 * gcc.dg/graphite/id-25.c: New.
737 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
739 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
740 (rewrite_close_phi_out_of_ssa): Propagate constant values or
741 parametric expressions outside the scop region.
742 (rewrite_cross_bb_scalar_deps): Same.
743 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
745 * gcc.dg/graphite/run-id-5.c: New.
746 * gcc.dg/graphite/run-id-6.c: New.
747 * gfortran.dg/graphite/id-21.f: New.
749 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
751 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
752 SSA_NAME_DEF_STMT only on SSA_NAMEs.
754 * gcc.dg/graphite/id-24.c: New.
756 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
758 * tree-scalar-evolution.c (instantiate_scev_name): Do not
759 instantiate default definitions.
761 2010-07-20 Vladimir Kargov <kargov@gmail.com>
763 * graphite-scop-detection.c (is_valid_stmt_p): New.
764 (is_valid_bb_p): New.
766 2010-07-20 Vladimir Kargov <kargov@gmail.com>
767 Sebastian Pop <sebastian.pop@amd.com>
769 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
770 (loop_exits_from_bb_p): New.
771 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
772 (loop_exits_from_bb_p): Declared.
773 * graphite-scop-detection.c (scopdet_basic_block_info): Call
776 2010-07-20 Vladimir Kargov <kargov@gmail.com>
778 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
780 (dot_regions_1): New.
782 * refined-regions.h (dot_regions): Declared.
783 * Makefile.in (refined-regions.o): Update dependences.
785 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
787 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
788 extra parameter for the region. Call scev_analyzable_p.
789 (rewrite_reductions_out_of_ssa): Update call to
790 rewrite_close_phi_out_of_ssa.
791 (rewrite_cross_bb_phi_deps): Same.
792 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
793 parameter for the region. Call scev_analyzable_p.
794 (rewrite_commutative_reductions_out_of_ssa): Update call to
795 rewrite_commutative_reductions_out_of_ssa_loop.
797 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
799 * gcc.dg/tree-ssa/pr20742.c: New.
801 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
803 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
805 * gcc.dg/graphite/id-23.c: New.
807 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
809 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
810 SSA scalar phi nodes that can be scev_analyzable_p.
812 * gfortran.dg/graphite/id-20.f: Adjust testcase.
814 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
816 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
817 handle SSA_NAME_IS_DEFAULT_DEF.
819 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
821 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
823 * gcc.dg/graphite/pr42729.c: New.
825 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
827 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
828 case non close-phi nodes with one argument.
830 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
832 * sese.h (scev_analyzable_p): Scevs could be expressions without
833 chrecs and still be scev_analyzable_p.
835 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
837 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
839 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
841 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
842 * cfgloop.h (struct loop): Remove single_iv field.
843 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
844 (scop_canonicalize_loops): Removed.
845 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
846 over all the loop phi nodes in loop->header.
847 (build_poly_scop): Remove use of scop_canonicalize_loops.
849 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
851 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
854 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
856 * tree-chrec.c (chrec_apply): Should only apply to the specified
857 variable. Also handle multivariate chains of recurrences that
858 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
860 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
862 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
863 (debug_clast_name_indexes_1): Removed.
864 (debug_clast_name_indexes): Removed.
865 (pbb_to_depth_to_oldiv): Removed.
866 (build_iv_mapping): Replace the use of rename_map with iv_map.
867 (translate_clast_user): Remove uses of rename_map. Allocate and
869 (translate_clast_for_loop): Remove uses of rename_map.
870 (translate_clast_for): Same.
871 (translate_clast_guard): Same.
872 (translate_clast): Same.
874 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
875 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
876 * sese.c (set_rename): Now static.
877 (rename_variables_in_stmt): Removed.
879 (is_parameter): Removed.
881 (expand_scalar_variables_call): Removed.
882 (expand_scalar_variables_ssa_name): Removed.
883 (expand_scalar_variables_expr): Removed.
884 (expand_scalar_variables_stmt): Removed.
885 (expand_scalar_variables): Removed.
886 (rename_variables): Removed.
887 (remove_condition): Removed.
888 (get_true_edge_from_guard_bb): Removed.
889 (get_false_edge_from_guard_bb): Removed.
890 (struct igp): Removed.
891 (default_before_guard): Removed.
892 (convert_for_phi_arg): Removed.
893 (add_guard_exit_phis): Removed.
894 (insert_guard_phis): Removed.
895 (graphite_copy_stmts_from_block): Now also uses iv_map and a
896 region. Do not copy conditions. Do not copy induction variables.
898 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
899 the translated statement. Use the iv_map for the induction
901 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
902 (set_rename): Removed declaration.
903 (scev_analyzable_p): ...here.
904 * tree-chrec.c (chrec_apply_map): New.
905 * tree-chrec.h (chrec_apply_map): Declared.
907 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
909 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
910 insert_loop_close_phis.
911 * sese.c (name_defined_in_loop_p): Removed.
912 (expr_defined_in_loop_p): Removed.
913 (alive_after_loop): Removed.
914 (close_phi_not_yet_inserted_p): Removed.
915 (struct alep): Removed.
916 (add_loop_exit_phis): Removed.
917 (insert_loop_close_phis): Removed.
919 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
921 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
923 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
925 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
927 * gfortran.dg/graphite/id-20.f: New.
929 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
931 * graphite-cloog-util.h: Added cloog.h.
932 * graphite-blocking.c: Removed cloog.h.
933 * graphite-dependences.c: Same.
934 * graphite-interchange.c: Same.
935 * graphite-poly.c: Same.
936 * graphite-ppl.c: Same.
937 * graphite-scop-detection.c: Same.
938 * graphite-sese-to-poly.c:
940 Removed graphite-clast-to-gimple.h.
941 (check_poly_representation): Removed (unused).
942 * graphite-sese-to-poly.h
943 (check_poly_representation): Removed (unused).
945 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
948 (OBJS-common): Added graphite-cloog-util.o.
949 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
950 (graphite-cloog-util.o): New.
951 (graphite-ppl.o): Added graphite-cloog-util.h.
952 * graphite-clast-to-gimple.c:
953 Added graphite-cloog-util.h to include statements.
954 * graphite-cloog-util.c: New.
955 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
956 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
957 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
958 (new_C_Polyhedron_from_Cloog_Matrix): Same.
959 (ppl_Constrain_System_number_of_constraints): Same.
960 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
961 (oppose_constraint): Same.
962 (cloog_matrix_to_ppl_constraint): Same.
963 (new_Constraint_System_from_Cloog_Matrix): Same.
964 (insert_constraint_into_matrix): Same. Declared static.
965 * graphite-cloog-util.h: New.
966 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
967 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
968 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
969 (new_C_Polyhedron_from_Cloog_Matrix): Same.
970 (insert_constraint_into_matrix): Same.
972 Added graphite-cloog-util.h to include statements.
973 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
974 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
975 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
976 (new_C_Polyhedron_from_Cloog_Matrix): Same.
977 (insert_constraint_into_matrix): Same.
978 (ppl_Constrain_System_number_of_constraints): Same.
979 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
980 (oppose_constraint): Same.
981 (cloog_matrix_to_ppl_constraint): Same.
982 (new_Constraint_System_from_Cloog_Matrix): Same.
984 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
985 graphite-cloog-util.h.
986 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
987 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
988 (new_C_Polyhedron_from_Cloog_Matrix): Same.
989 (insert_constraint_into_matrix): Removed.
991 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
993 * graphite-clast-to-gimple.c
994 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
995 (precision_for_interval): Same.
996 (gcc_type_for_interval): Same.
997 (compute_type_for_level): Same.
998 * graphite-interchange.c
999 (lst_interchange_profitable_p): Same.
1001 (psct_scattering_dim_for_loop_depth): Same.
1003 (ppl_max_for_le_pointset): Same.
1004 (ppl_min_for_le_pointset): Same.
1006 2010-06-25 Vladimir Kargov <kargov@gmail.com>
1008 * refined-regions.c (bb_index_compare): New.
1009 (get_bbs_in_region): New.
1010 (print_bbs_in_region): New.
1011 (print_refined_region): Add an argument that allows to print
1012 all basic blocks contained in regions.
1013 (debug_refined_region): Update call to print_refined_region.
1014 * refined-regions.h (print_refined_region): Update declaration.
1015 (get_bbs_in_region): Declared.
1016 * graphite-scop-detection.c (build_scops_new): Print the refined
1017 region tree into the Grahite dump file.
1019 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1021 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
1022 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
1024 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1026 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
1027 rewrite_close_phi_out_of_ssa.
1029 * gcc.dg/graphite/id-22.c: New.
1031 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1033 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
1035 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1037 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
1039 * sese.c (debug_rename_map): Same.
1042 (rename_variables_in_stmt): Same.
1043 (expand_scalar_variables_call): Same.
1044 (expand_scalar_variables_ssa_name): Same.
1045 (expand_scalar_variables_expr): Same.
1046 (expand_scalar_variables_stmt): Same.
1047 (expand_scalar_variables): Same.
1048 (rename_variables): Same.
1049 (graphite_copy_stmts_from_block): Same.
1050 (copy_bb_and_scalar_dependences): Same.
1052 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
1054 * graphite-clast-to-gimple.c (copy_renames): Removed.
1055 (translate_clast_for): Do not call copy_renames.
1056 (translate_clast_guard): Same.
1058 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1060 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
1061 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
1062 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
1063 before rewrite_cross_bb_scalar_deps.
1065 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1067 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
1068 Early return in when flag_associative_math is not set.
1070 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1072 * gcc.dg/graphite/run-id-2.c: Call abort.
1074 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1076 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
1077 of SSA copies on edges except for loop->latch.
1079 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1081 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
1082 Split out of rewrite_reductions_out_of_ssa.
1083 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
1085 * graphite.c (graphite_transform_loops): Call it.
1087 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
1089 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
1091 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
1093 * passes.c (init_optimization_passes): Add pass_graphite.
1094 Schedule a pass_copy_prop before pass_graphite_transforms.
1095 * timevar.def (TV_GRAPHITE): Declared.
1096 * tree-pass.h (pass_graphite): Declared.
1097 * tree-ssa-loop.c (pass_graphite): New.
1099 * gcc.dg/graphite/id-20.c: New.
1101 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1103 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
1104 Remove calls to rename_nb_iterations and rename_sese_parameters.
1105 * graphite-clast-to-gimple.h (gloog): Update declaration.
1106 * graphite.c (graphite_transform_loops): Update call to gloog.
1107 * sese.c (rename_variables_in_expr): Removed.
1108 (rename_nb_iterations): Removed.
1109 (rename_sese_parameters): Removed.
1110 * sese.h (rename_nb_iterations): Removed.
1111 (rename_sese_parameters): Removed.
1113 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1115 * graphite-clast-to-gimple.c (gloog): Remove call to
1116 sese_adjust_liveout_phis.
1117 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
1118 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
1119 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
1120 rewrite_phi_out_of_ssa.
1121 * sese.c (get_vdef_before_sese): Removed.
1122 (sese_adjust_vphi): Removed.
1123 (sese_adjust_liveout_phis): Removed.
1124 * sese.h (sese_adjust_liveout_phis): Removed.
1126 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1128 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
1129 argument for the place after which to insert the out of SSA copy.
1130 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
1131 (rewrite_phi_out_of_ssa): Same.
1132 (rewrite_cross_bb_scalar_deps): Same.
1133 (insert_copyout): Removed.
1134 (insert_copyin): Removed.
1135 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
1136 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
1139 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1141 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
1142 (rewrite_reductions_out_of_ssa): Same.
1143 (rewrite_commutative_reductions_out_of_ssa): Same.
1144 (build_poly_scop): Do not call these functions.
1145 * graphite-sese-to-poly.h (build_poly_scop): Declared.
1146 (rewrite_reductions_out_of_ssa): Declared.
1147 (rewrite_commutative_reductions_out_of_ssa): Declared.
1148 * graphite.c (graphite_transform_loops): Call on every scop
1149 rewrite_commutative_reductions_out_of_ssa before calling
1150 rewrite_reductions_out_of_ssa and build_scop_bbs.
1152 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1154 * graphite-dependences.c (dot_deps): Make system call to dotty run
1156 (dot_deps_stmt): Same.
1157 * graphite-poly.c (dot_lst): Same.
1159 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
1161 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
1162 old_type in parameter.
1163 (gcc_type_for_value): Update call to gcc_type_for_interval.
1164 (compute_type_for_level_1): Renamed compute_type_for_level.
1165 Update call to gcc_type_for_interval.
1167 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1169 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
1170 the scev analysis when the variable is not used outside the loop
1171 in a close phi node: call compute_overall_effect_of_inner_loop.
1173 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1175 * graphite-sese-to-poly.c (single_pred_cond): Renamed
1176 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
1177 (build_sese_conditions_before): Renamed call to single_pred_cond.
1178 (build_sese_conditions_after): Same.
1180 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1182 * graphite-poly.h: Fix comments and indentation.
1183 * graphite-sese-to-poly.c: Same.
1184 (build_sese_conditions_before): Compute stmt and gbb only when needed.
1185 * tree-chrec.c: Fix comments and indentation.
1186 (tree-ssa-loop-niter.c): Same.
1188 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
1190 * refined-regions.c (create_region): Only initialize the region.
1191 (find_regions_with_entry): Initialize parent relation and bbmap
1193 (build_regions_tree): Set outermost_region to region instead of
1195 (calculate_region_tree): Remove unneeded parameters.
1197 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
1199 * graphite-scop-detection.c (is_scop_p): New.
1200 (build_scops_new): New. A skeleton for the new scop detection.
1201 (build_scops_old): Renamed from build_scops.
1202 (build_scops): New version. Call the new and the old scop
1205 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
1206 Antoniu Pop <antoniu.pop@gmail.com>
1208 * Makefile.in (OBJS-common): Add refined-regions.o.
1209 (refined-regions.o): New.
1210 (graphite-scop-detection.o): Use refined-regions.h.
1211 * graphite-scop-detection.c: Include refined-regions.h
1212 (build_scops): Also build the refined region tree.
1213 * refined-regions.c: New. Adds an algorithm to detect refined
1215 (print_refined_region): New.
1216 (debug_refined_region): New.
1217 (refined_region_contains_bb_p): New.
1218 (refined_region_contains_region_p): New.
1219 (is_common_df): New.
1220 (struct find_regions_global_data): New.
1222 (typedef struct bb_bb_def): New.
1223 (new_bb_bb_def): New.
1224 (bb_bb_map_hash): New.
1225 (eq_bb_bb_map): New.
1228 (new_bb_reg_def): New.
1229 (bb_reg_map_hash): New.
1230 (eq_bb_reg_map): New.
1231 (find_new_region): New.
1232 (insert_new_reg): New.
1233 (insert_new_bb): New.
1234 (insert_shortcut): New.
1235 (get_next_postdom): New.
1236 (create_region): New.
1237 (find_regions_with_entry): New.
1238 (find_regions_adc): New.
1239 (find_regions): New.
1240 (get_topmost_parent): New.
1241 (build_regions_tree): New.
1242 (calculate_region_tree): New.
1243 (free_region_tree): New.
1244 * refined-regions.h: New.
1245 (struct refined_region): New.
1246 (calculate_region_tree): New.
1247 (free_region_tree): New.
1248 (refined_region_contains_bb_p): New.
1249 (refined_region_contains_region_p): New.
1250 (print_refined_region): New.
1251 (debug_refined_region): New.
1253 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
1255 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1258 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1260 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
1261 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
1263 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1265 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
1266 phi_arg_in_outermost_loop.
1267 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
1268 (remove_invariant_phi): Same.
1270 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1272 * graphite-blocking.c
1273 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
1274 * graphite-clast-to-gimple.c
1275 (clast_to_gcc_expression): Same.
1276 (precision_for_value): Same.
1277 (precision_for_interval): Same.
1278 (gcc_type_for_interval): Same.
1279 (graphite_create_new_guard): Same.
1280 (compute_bounds_for_level): Same.
1281 (graphite_create_new_loop_guard): Same.
1282 * graphite-interchange.c
1283 (build_linearized_memory_access): Same.
1284 (pdr_stride_in_loop): Same.
1285 (memory_strides_in_loop_1): Same.
1286 (memory_strides_in_loop): Same.
1287 (extend_scattering): Same.
1288 (psct_scattering_dim_for_loop_depth): Same.
1289 (pbb_number_of_iterations): Same.
1291 (debug_iteration_domains): Same.
1293 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1294 (ppl_set_inhomogeneous_gmp): Same.
1295 (ppl_strip_loop): Same.
1296 (ppl_lexico_compare_linear_expressions): Same.
1297 (ppl_read_polyhedron_matrix): Same.
1298 (ppl_max_for_le_pointset): Same.
1300 (ppl_read_polyhedron_matrix): Same.
1301 (tree_int_to_gmp): Same.
1302 (gmp_cst_to_tree): Same.
1303 (ppl_set_inhomogeneous): Same.
1304 (ppl_set_inhomogeneous_tree): Same.
1305 (ppl_set_coef): Same.
1306 (ppl_set_coef_tree): Same.
1307 * graphite-sese-to-poly.c
1308 (build_pbb_scattering_polyhedrons): Same.
1309 (build_scop_scattering): Same.
1310 (scan_tree_for_params_right_scev): Same.
1311 (scan_tree_for_params): Same.
1312 (find_params_in_bb): Same.
1313 (find_scop_parameters): Same.
1314 (add_upper_bounds_from_estimated_nit): Same.
1315 (build_loop_iteration_domains): Same.
1316 (add_condition_to_domain): Same.
1317 (pdr_add_memory_accesses): Same.
1319 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1321 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
1322 CLooG's value_* macros to their respective mpz_* counterparts.
1323 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
1324 (graphite_create_new_loop_guard): Same.
1325 * graphite-interchange.c (build_linearized_memory_access): Same.
1326 (pdr_stride_in_loop): Same.
1327 (memory_strides_in_loop_1): Same.
1328 (1st_interchange_profitable_p): Same.
1329 * graphite-poly.c (extend_scattering): Same.
1330 (psct_scattering_dim_for_loop_depth): Same.
1331 (pbb_number_of_iterations): Same.
1332 (pbb_number_of_iterations_at_time): Same.
1333 * graphite-poly.h (new_1st_loop): Same.
1334 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
1335 (oppose_constraint): Same.
1336 (insert_constraint_into_matrix): Same.
1337 (ppl_set_inhomogeneous_gmp): Same.
1338 (ppl_set_coef_gmp): Same.
1339 (ppl_strip_loop): Same.
1340 (ppl_lexico_compare_linear_expressions): Same.
1341 (ppl_max_for_le_pointset): Same.
1342 (ppl_min_for_le_pointset): Same.
1343 (ppl_build_realtion): Same.
1344 * graphite-ppl.h (gmp_cst_to_tree): Same.
1345 (ppl_set_inhomogeneous): Same.
1346 (ppl_set_inhomogeneous_tree): Same.
1347 (ppl_set_coef): Same.
1348 (ppl_set_coef_tree): Same.
1349 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
1350 (build_scop_scattering): Same.
1351 (add_value_to_dim): Same.
1352 (scan_tree_for_params_right_scev): Same.
1353 (scan_tree_for_params_int): Same.
1354 (scan_tree_for_params): Same.
1355 (find_params_in_bb): Same.
1356 (find_scop_parameters): Same.
1357 (add_upper_bounds_from_estimated_nit): Same.
1358 (build_loop_iteration_domains): Same.
1359 (create_linear_expr_from_tree): Same.
1360 (add_condition_to_domain): Same.
1361 (pdr_add_memory_accesses): Same.
1363 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1366 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1367 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1368 When converting an unsigned type to signed, double its precision.
1369 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1370 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1371 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1373 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1376 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1377 build_nonstandard_integer_type.
1378 (gcc_type_for_interval): Same.
1380 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1383 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1384 POINTER_PLUS_EXPR for pointer types.
1386 * gcc.dg/graphite/id-19.c: New.
1388 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
1391 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1392 * graphite-clast-to-gimple.c: Include langhooks.h.
1393 (max_signed_precision_type): New.
1394 (max_precision_type): Takes two types as arguments.
1395 (precision_for_value): New.
1396 (precision_for_interval): New.
1397 (gcc_type_for_interval): New.
1398 (gcc_type_for_value): New.
1399 (gcc_type_for_clast_term): New.
1400 (gcc_type_for_clast_red): New.
1401 (gcc_type_for_clast_bin): New.
1402 (gcc_type_for_clast_expr): Split up into several functions.
1403 (gcc_type_for_clast_eq): Rewritten.
1404 (compute_bounds_for_level): New.
1405 (compute_type_for_level_1): New.
1406 (compute_type_for_level): New.
1407 (gcc_type_for_cloog_iv): Removed.
1408 (gcc_type_for_iv_of_clast_loop): Rewritten.
1409 (graphite_create_new_loop): Compute the lower and upper bound types
1410 with gcc_type_for_clast_expr.
1411 (graphite_create_new_loop_guard): Same.
1412 (find_cloog_iv_in_expr): Removed.
1413 (compute_cloog_iv_types_1): Removed.
1414 (compute_cloog_iv_types): Removed.
1415 (gloog): Do not call compute_cloog_iv_types.
1416 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1418 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1419 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1420 (GBB_CLOOG_IV_TYPES): Removed.
1422 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1424 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
1426 Reverted this commit: as at this point the loop closed SSA form
1427 is under a canonical form respecting the single argument condition.
1428 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1429 close phi nodes may have more than one argument.
1431 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
1433 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1434 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1435 (detect_commutative_reduction): Same.
1437 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
1439 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1440 close phi nodes may have more than one argument.
1442 2010-03-30 Richard Guenther <rguenther@suse.de>
1443 Zdenek Dvorak <ook@ucw.cz>
1444 Sebastian Pop <sebastian.pop@amd.com>
1447 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1448 with multiple arguments.
1449 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1451 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1453 * graphite-dependences.c (print_pddr): Call print_pdr with an
1455 * graphite-poly.c (debug_pdr): Add an extra argument for the
1458 (print_pbb_domain): Same.
1460 (print_scop_context): Same.
1462 (print_cloog): Same.
1463 (debug_pbb_domain): Same.
1467 (debug_scop_context): Same.
1469 (debug_cloog): Same.
1470 (print_scop_params): Same.
1471 (debug_scop_params): Same.
1472 (print_iteration_domain): Same.
1473 (print_iteration_domains): Same.
1474 (debug_iteration_domain): Same.
1475 (debug_iteration_domains): Same.
1476 (print_scattering_function): Same.
1477 (print_scattering_functions): Same.
1478 (debug_scattering_function): Same.
1479 (debug_scattering_functions): Same.
1480 * graphite-poly.h (debug_pdr): Update declaration.
1482 (print_pbb_domain): Same.
1484 (print_scop_context): Same.
1486 (print_cloog): Same.
1487 (debug_pbb_domain): Same.
1491 (debug_scop_context): Same.
1493 (debug_cloog): Same.
1494 (print_scop_params): Same.
1495 (debug_scop_params): Same.
1496 (print_iteration_domain): Same.
1497 (print_iteration_domains): Same.
1498 (debug_iteration_domain): Same.
1499 (debug_iteration_domains): Same.
1500 (print_scattering_function): Same.
1501 (print_scattering_functions): Same.
1502 (debug_scattering_function): Same.
1503 (debug_scattering_functions): Same.
1505 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1507 * graphite-poly.c (print_scattering_function_1): New.
1508 (print_scattering_function): Call it.
1509 (print_scop_params): Remove spaces at the end of lines.
1512 * graphite-poly.h (print_cloog): Declared.
1513 (debug_cloog): Declared.
1515 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1517 * tree-ssa-copy.c: Revert this previous change:
1518 (init_copy_prop): Loop closed phi nodes cancontain more than one
1520 (execute_copy_prop): Revert the previous change: do not call
1521 rewrite_into_loop_closed_ssa.
1523 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1524 Richard Guenther <rguenther@suse.de>
1527 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1528 contain more than one argument.
1529 (execute_copy_prop): Revert the previous change: do not call
1530 rewrite_into_loop_closed_ssa.
1532 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1533 * gcc.dg/graphite/id-pr43464-1.c: New.
1535 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1538 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1539 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1541 * gcc.dg/graphite/id-pr43464.c: New.
1543 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1545 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1547 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1548 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1549 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1550 to switch between adding the IV bump in loop->latch or in loop->header.
1552 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1554 * passes.c (init_optimization_passes): Add pass_copy_prop
1557 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1559 * graphite-poly.c (print_scattering_function): Pretty print following
1562 (print_pbb_domain): Same.
1563 (dump_gbb_cases): Same.
1564 (dump_gbb_conditions): Same.
1567 (print_scop_params): Same.
1568 (print_scop_context): Same.
1570 (print_pbb_body): New.
1571 (lst_indent_to): New.
1572 (print_lst): Start new lines with a #.
1573 * graphite-poly.h (pbb_bb): New.
1574 (pbb_index): Use pbb_bb.
1575 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1577 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1579 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1582 * gcc.dg/graphite/id-pr43351.c
1584 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1587 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1588 call insert_out_of_ssa_copy for default definitions.
1589 * gfortran.dg/graphite/id-pr43354.f: New.
1591 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1594 * gfortran.dg/graphite/pr43349.f: New.
1596 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1598 * graphite-clast-to-gimple.c (my_long_long): Defined.
1599 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1600 * graphite-sese-to-poly.c (my_long_long): Defined.
1601 (scop_ivs_can_be_represented): Use it.
1603 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1605 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1606 graphite-max-bbs-per-function, and loop-block-tile-size.
1607 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1609 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1611 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1613 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1614 forward declaration.
1615 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1616 (add_upper_bounds_from_estimated_nit): New.
1617 (build_loop_iteration_domains): Use it.
1619 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1621 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1623 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1626 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1627 should be an INTEGER_CST. Also handle CASE_CONVERT.
1628 * gcc.dg/graphite/pr43306.c: New.
1630 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1632 * graphite.c (graphite_initialize): To bound the number of bbs per
1633 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1634 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1635 * doc/invoke.texi: Document it.
1637 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1639 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1640 * graphite-sese-to-poly.h (build_poly_scop): Same.
1642 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1644 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1645 the number of parameters in the scop. Use as an upper bound
1646 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1647 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1648 * doc/invoke.texi: Document it.
1650 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1652 * graphite-sese-to-poly.c (add_param_constraints): Use
1653 lower_bound_in_type and upper_bound_in_type.
1655 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1657 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1658 instead of unsigned_type_node.
1660 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1661 Reza Yazdani <reza.yazdani@amd.com>
1664 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1665 on pointer type parameters.
1667 * gcc.dg/graphite/run-id-4.c: New.
1669 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1672 * gcc.dg/graphite/run-id-3.c: New.
1674 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1675 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1677 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1678 handle conversions from pointer to integers.
1679 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1680 induction variable, to be able to work with code generated by CLooG.
1681 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1682 (build_poly_scop): Bail out if we cannot codegen a loop.
1684 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1686 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1687 code generation with gloog_error.
1689 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1691 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1692 Call fold_convert on all the returned values.
1693 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1694 the type of the resulting expression.
1696 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1698 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1699 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1700 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1702 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1704 * graphite-dependences.c (map_into_dep_poly): Removed.
1705 (dependence_polyhedron_1): Use combine_context_id_scat.
1707 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1709 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1710 (struct poly_bb): Same.
1711 (combine_context_id_scat): New.
1713 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1716 * sese.c (name_defined_in_loop_p): Return false for default
1719 * gcc.dg/graphite/pr42326.c: New.
1721 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1723 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1724 and clean up the logic.
1726 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1728 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1731 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1734 * graphite-scop-detection.c (create_single_exit_edge): Move
1735 the call to find_single_exit_edge to....
1736 (create_sese_edges): ...here. Don't handle multiple edges
1737 exiting the function.
1738 (build_graphite_scops): Don't handle multiple edges
1739 exiting the function.
1741 * gcc.dg/graphite/pr43083.c: New.
1743 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1746 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1747 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1749 * gfortran.dg/graphite/pr43097.f: New.
1751 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1752 Manuel López-Ibáñez <manu@gcc.gnu.org>
1755 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1757 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1760 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1762 * g++.dg/graphite/pr43026.C: New.
1764 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1766 * Merge from mainline (154736:156693).
1768 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1771 * gcc.dg/graphite/pr43012.c: New.
1773 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1775 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1776 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1778 * g++.dg/graphite/pr42930.C: New.
1780 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1783 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1784 graphite_can_represent_init for MULT_EXPR.
1786 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1790 * graphite-sese-to-poly.c (remove_phi): New.
1791 (translate_scalar_reduction_to_array): Call remove_phi.
1793 * gcc.dg/graphite/pr42530.c: New.
1794 * gcc.dg/graphite/pr42914.c: New.
1796 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1799 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1800 * graphite-clast-to-gimple.h (gloog): Update declaration.
1801 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1802 * graphite-poly.h (struct poly_bb): Add missing comments.
1803 (struct scop): Add poly_scop_p field.
1805 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1806 * graphite.c (graphite_transform_loops): Build the polyhedral
1807 representation for each scop before code generation.
1808 * sese.c (rename_variables_in_operand): Removed.
1809 (rename_variables_in_expr): Return the renamed expression.
1810 (rename_sese_parameters): New.
1811 * sese.h (rename_sese_parameters): Declared.
1813 * gcc.dg/graphite/pr42771.c: New.
1815 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1817 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1819 * gcc.dg/graphite/block-1.c: Same.
1820 * gcc.dg/graphite/block-3.c: Same.
1821 * gcc.dg/graphite/block-4.c: Same.
1822 * gcc.dg/graphite/block-5.c: Same.
1823 * gcc.dg/graphite/block-6.c: Same.
1824 * gcc.dg/graphite/block-7.c: Same.
1825 * gcc.dg/graphite/interchange-0.c: Same.
1826 * gcc.dg/graphite/interchange-1.c: Same.
1827 * gcc.dg/graphite/interchange-10.c: Same.
1828 * gcc.dg/graphite/interchange-11.c: Same.
1829 * gcc.dg/graphite/interchange-12.c: Same.
1830 * gcc.dg/graphite/interchange-2.c: Same.
1831 * gcc.dg/graphite/interchange-3.c: Same.
1832 * gcc.dg/graphite/interchange-4.c: Same.
1833 * gcc.dg/graphite/interchange-5.c: Same.
1834 * gcc.dg/graphite/interchange-6.c: Same.
1835 * gcc.dg/graphite/interchange-7.c: Same.
1836 * gcc.dg/graphite/interchange-8.c: Same.
1837 * gcc.dg/graphite/interchange-9.c: Same.
1838 * gcc.dg/graphite/interchange-mvt.c: Same.
1840 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1842 * gfortran.dg/graphite/id-19.f: New.
1843 * gfortran.dg/graphite/pr14741.f90: New.
1844 * gfortran.dg/graphite/pr41924.f90: New.
1845 * gfortran.dg/graphite/run-id-2.f90: New.
1847 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1850 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1851 to unknown_dependence.
1852 (graphite_legal_transform_dr): Handle the unknown_dependence.
1853 (graphite_carried_dependence_level_k): Same.
1855 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1857 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1859 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1860 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1863 * graphite-dependences.c (build_lexicographical_constraint): Return
1864 a union of dependence polyhedra.
1865 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1867 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1868 * gcc.dg/graphite/block-4.c: Same.
1869 * gcc.dg/graphite/block-7.c: Same.
1870 * gcc.dg/graphite/interchange-12.c: Same.
1871 * gcc.dg/graphite/interchange-mvt.c: Same.
1872 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1873 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1874 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1876 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1878 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1879 the execution check to FAIL. This testcase is miscompiled by Graphite
1880 and the check should be re-enabled.
1881 * gcc.dg/graphite/interchange-mvt.c: Same.
1882 * gcc.dg/graphite/block-0.c: Same.
1883 * gcc.dg/graphite/block-4.c: Same.
1884 * gcc.dg/graphite/block-7.c: Same.
1886 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1888 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1889 * gcc.dg/graphite/scop-0.c: Fix spaces.
1890 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1891 * gfortran.dg/graphite/block-2.f: Same.
1892 * gfortran.dg/graphite/block-3.f90: Same.
1893 * gfortran.dg/graphite/block-4.f90: Same.
1894 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1895 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1897 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1899 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1900 PDDR_ORIGINAL_SCATTERING_P.
1901 (pddr_is_empty): Rewritten.
1902 (print_dependence_polyhedron_layout): New.
1905 (build_alias_set_powerset): Moved up.
1906 (poly_drs_may_alias_p): Moved up.
1907 (lexicographically_gt_p): Removed.
1908 (build_lexicographically_gt_constraint): Renamed
1909 build_lexicographical_constraint, reimplemented.
1910 (dependence_polyhedron_1): Simplified parameters.
1911 (dependence_polyhedron): Same. Keep along empty PDDRs
1912 to make efficient use of the cache.
1913 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1914 (graphite_legal_transform_dr): Rewritten.
1915 (graphite_legal_transform_bb): Pass fewer arguments to
1916 graphite_legal_transform_dr.
1917 (graphite_carried_dependence_level_k): Simplified implementation.
1918 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1919 (dot_transformed_deps_stmt_1): Same.
1920 (dot_original_deps): Same.
1921 (dot_transformed_deps): Same.
1922 * graphite-dependences.h (struct poly_ddr): Added a new field
1923 original_scattering_p.
1924 (PDDR_ORIGINAL_SCATTERING_P): New.
1925 (print_pddr): Declared.
1926 (debug_pddr): Declared.
1927 * graphite-ppl.c: Clarify comment.
1928 * sese.h (print_gimple_bb): Removed unused declaration.
1931 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1933 * g++.dg/graphite/graphite.exp: Rewritten.
1934 * gcc.dg/graphite/graphite.exp: Rewritten.
1935 * gfortran.dg/graphite/graphite.exp: Rewritten.
1936 * gcc.dg/graphite/block-0.c: Added runtime test.
1937 * gcc.dg/graphite/block-1.c: Same.
1938 * gcc.dg/graphite/block-3.c: Same.
1939 * gcc.dg/graphite/block-4.c: Same.
1940 * gcc.dg/graphite/block-5.c: Same.
1941 * gcc.dg/graphite/block-6.c: Same.
1942 * gcc.dg/graphite/block-7.c: Same.
1943 * gcc.dg/graphite/interchange-0.c: Same.
1944 * gcc.dg/graphite/interchange-1.c: Same.
1945 * gcc.dg/graphite/interchange-10.c: Same.
1946 * gcc.dg/graphite/interchange-11.c: Same.
1947 * gcc.dg/graphite/interchange-12.c: Same.
1948 * gcc.dg/graphite/interchange-2.c: Same.
1949 * gcc.dg/graphite/interchange-3.c: Same.
1950 * gcc.dg/graphite/interchange-4.c: Same.
1951 * gcc.dg/graphite/interchange-5.c: Same.
1952 * gcc.dg/graphite/interchange-6.c: Same.
1953 * gcc.dg/graphite/interchange-7.c: Same.
1954 * gcc.dg/graphite/interchange-8.c: Same.
1955 * gcc.dg/graphite/interchange-9.c: Same.
1956 * gcc.dg/graphite/interchange-mvt.c: Same.
1957 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1959 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1961 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1964 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1966 * common.opt: Add -fgraphite-cloog-opts.
1967 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1968 * opts.c (decode_options): Same.
1970 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1972 * gcc.dg/graphite/id-17.c: New.
1973 * gcc.dg/graphite/pr41888.c: New.
1974 * gcc.dg/graphite/scop-22.c: New.
1975 * gfortran.dg/graphite/pr40982.f90: New.
1977 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1979 * graphite-dependences.c: Clarify comments.
1980 (build_pddr): Add an extra parameter direction.
1981 (graphite_legal_transform_dr): Use build_pddr.
1982 (dot_original_deps_stmt_1): Update use of build_pddr.
1983 (dot_transformed_deps_stmt_1): Same.
1984 (dot_original_deps): Same.
1985 (dot_transformed_deps): Same.
1987 * gcc.dg/graphite/interchange-12.c: New.
1988 * gcc.dg/graphite/block-7.c: New.
1990 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1992 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1993 (pddr_transformed_scattering): Removed.
1994 (graphite_legal_transform_dr): Use build_pddr.
1995 (dot_original_deps_stmt_1): Same.
1996 (dot_transformed_deps_stmt_1): Same.
1997 (dot_original_deps): Same.
1998 (dot_transformed_deps): Same.
2000 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2002 * graphite-dependences.c (lexicographically_gt_p): Add comments.
2003 (build_lexicographically_gt_constraint): Same.
2004 (dependence_polyhedron_1): Same.
2005 (dependence_polyhedron): Same.
2007 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2009 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
2010 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
2011 (lexicographically_gt_p): Change type of direction to int.
2012 (build_lexicographically_gt_constraint): Same.
2013 (dependence_polyhedron_1): Same.
2014 (dependence_polyhedron): Same.
2015 (pddr_original_scattering): Use integers for direction.
2016 (pddr_transformed_scattering): Same.
2017 (graphite_legal_transform_dr): Same.
2018 (graphite_carried_dependence_level_k): Same.
2020 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
2022 * graphite-dependences.c (build_pairwise_constraint): Renamed
2023 ppl_build_relation. Moved...
2024 (dr_equality_constraints): Use ppl_build_relation.
2025 (build_pairwise_scheduling_equality): Same.
2026 (build_pairwise_scheduling_inequality): Same.
2027 * graphite-ppl.c (ppl_build_relation): ...here.
2028 * graphite-ppl.h (ppl_build_relation): Declared.
2030 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
2033 * graphite-clast-to-gimple.c (gloog_error): New static variable.
2034 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
2035 Set gloog_error when such an expression failed to be built.
2036 (translate_clast): Early return when gloog_error is set.
2037 (gloog): Clear gloog_error. When gloog_error is set, call
2038 set_ifsese_condition to enable the original code. Return the status
2039 of the code generation based on gloog_error.
2040 * sese.c (set_ifsese_condition): New.
2041 * sese.h (set_ifsese_condition): Declared.
2043 * g++.dg/graphite/pr42681.C: New.
2045 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
2048 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
2049 rename_nb_iterations.
2050 * sese.c (rename_variables_in_operand): New.
2051 (rename_variables_in_expr): New.
2052 (rename_nb_iterations): New.
2053 (sese_adjust_liveout_phis): Update the rename_map.
2054 * sese.h (rename_nb_iterations): Declared.
2055 * tree-scalar-evolution.c (scev_reset_htab): New.
2056 (scev_reset): Call scev_reset_htab.
2057 * tree-scalar-evolution.h (scev_reset_htab): Declared.
2059 * gfortran.dg/graphite/pr42732.f: New.
2061 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
2064 * graphite-clast-to-gimple.c: Fix formatting.
2065 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
2066 (expr_defined_in_loop_p): New.
2067 (add_loop_exit_phis): Also handle full expressions: remove from
2068 the rename_map the expressions defined in the loop that we're closing.
2070 * gfortran.dg/graphite/pr42393-1.f90: New.
2071 * gfortran.dg/graphite/pr42393.f90: Add new flags
2072 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
2073 make this testcase useful in the Graphite branch.
2075 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
2077 * graphite-scop-detection.c (exclude_component_ref): Removed.
2078 (is_simple_operand): Removed.
2079 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
2081 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2084 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2085 the array indexing of ADDR_EXPRs.
2087 * gcc.dg/graphite/pr42221.c: New.
2089 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2092 * graphite.c (graphite_finalize): Call scev_reset.
2093 (graphite_transform_loops): Do not call scev_reset between the code
2094 generation of scops.
2096 * gcc.dg/graphite/pr42521.c: New.
2098 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2100 * graphite-interchange.c (memory_stride_in_loop): Renamed
2102 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
2103 (memory_strides_in_loop): Memoize the memory strides per loop.
2104 (lst_interchange_profitable_p): Do not initialize to zero the memory
2106 * graphite-poly.h (struct lst): Add a field memory_strides.
2107 (LST_LOOP_MEMORY_STRIDES): New.
2108 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
2109 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
2111 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2113 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
2114 memory_strides_in_loop. Gather memory strides on a whole loop.
2115 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
2116 (lst_interchange_profitable_p): Removed.
2117 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
2119 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
2121 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2122 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2123 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2124 Remove context_loop and level.
2126 2010-01-07 Richard Guenther <rguenther@suse.de>
2128 PR tree-optimization/42641
2129 * sese.c (rename_map_elt_info): Use the SSA name version, do
2132 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
2134 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
2135 blocked" only when both the strip mine and the interchange have
2138 * gcc.dg/graphite/block-2.c: Removed.
2139 * gcc.dg/graphite/block-3.c: Add scan pattern.
2140 * gcc.dg/graphite/block-4.c: Same.
2141 * gcc.dg/graphite/block-5.c: Same.
2142 * gcc.dg/graphite/block-6.c: Same.
2144 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
2146 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
2147 before allocating a new one.
2148 (copy_renames): Check that slot is not NULL.
2149 (mark_bb_with_pbb): Same.
2150 (compute_cloog_iv_types_1): Same.
2151 * graphite-interchange.c (lst_perfect_nestify): Free the before,
2152 nest, and after LSTs.
2153 (lst_try_interchange_loops): Same.
2155 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
2158 * graphite-interchange.c (lst_try_interchange_loops): Do not return
2159 the before, nest, and after LSTs.
2160 (lst_try_interchange): Removed.
2161 (lst_interchange_select_inner): Do not iterate over the LSTs if they
2163 (lst_interchange_select_outer): Apply interchange on the outer loop
2164 until there are no more changes in the inner loops.
2166 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2168 Revert patch fixing PR middle-end/42221.
2170 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2173 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
2176 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
2178 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2181 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
2182 that contain only one statement.
2184 * gfortran.dg/graphite/pr42180.f90: New.
2186 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2189 * gfortran.dg/graphite/pr42393.f90: New.
2191 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2194 * gfortran.dg/graphite/pr42186.f90: New.
2196 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2199 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
2200 Insert the reduction copy in the same block as the phi node.
2201 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
2203 * gcc.dg/graphite/pr42205-1.c: New.
2204 * gcc.dg/graphite/pr42205-2.c: New.
2206 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2209 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2210 the array indexing of ADDR_EXPRs.
2212 * gcc.dg/graphite/pr42221.c: New.
2214 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2218 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
2219 index. Call lst_interchange_select_inner only once.
2220 (lst_interchange_select_inner): Update use of lst_try_interchange.
2221 (lst_interchange_select_outer): Update.
2223 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2227 * graphite-interchange.c (lst_try_interchange): Do not increment the
2228 the OUTER index when there is no AFTER kernel. Do not increment the
2229 OUTER index for after processing the AFTER kernel.
2230 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
2231 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
2232 index. Do not pass to lst_interchange_select_inner the OUTER index.
2233 (scop_do_interchange): Update use of lst_interchange_select_outer.
2235 * gfortran.dg/graphite/graphite.exp
2236 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
2237 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
2238 the graphite dump file.
2239 * gfortran.dg/graphite/interchange-2.f: Same.
2240 * gfortran.dg/graphite/pr42334-1.f: New.
2242 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2246 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2248 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2249 (lst_try_interchange): Reimplemented.
2250 (lst_interchange_select_inner): Same.
2251 (lst_do_interchange): Renamed lst_interchange_select_outer.
2253 (scop_do_interchange): Update use of lst_interchange_select_outer.
2255 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2256 * gcc.dg/graphite/block-0.c: Un-XFAILed.
2257 * gcc.dg/graphite/pr42211.c: New.
2258 * gfortran.dg/graphite/pr42334.f90: New.
2260 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
2263 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2264 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2266 * gfortran.dg/graphite/pr42181.f90: New.
2268 2009-12-12 Sebastian Pop <sebpop@gmail.com>
2271 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2272 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2273 (detect_commutative_reduction_arg): Simplified.
2274 (detect_commutative_reduction): Early return when the argument of
2275 the close phi is not of an SSA_NAME.
2277 * gcc.dg/graphite/pr42284.c: New.
2279 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
2281 * dbgcnt.def (graphite_scop): New counter.
2282 * graphite.c: Include dbgcnt.h
2283 (graphite_transform_loops): Use new counter to limit transformations.
2285 2009-12-08 Sebastian Pop <sebpop@gmail.com>
2288 * graphite-scop-detection.c (graphite_can_represent_init): Also
2289 handle more complex MULT_EXPRs containing parameters by recursion
2292 * gfortran.dg/graphite/pr42285.f90: New.
2294 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
2296 * g++.dg/graphite/pr42130.C: Fix type.
2298 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
2300 * g++.dg/graphite/pr42130.C: Correct testcase.
2302 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2304 * Merge from mainline (154493:154734).
2306 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2308 * Merge from mainline (151362:154491).
2310 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
2312 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2313 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2315 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2318 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2319 translate_clast_for_loop): New.
2320 (translate_clast_for): Add a condition around the loop, to do not
2321 execute loops with zero iterations.
2322 * g++.dg/graphite/pr42130.C: New.
2323 * gcc.dg/graphite/pr35356-2.c: Adapt.
2325 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2327 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2328 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2329 Remove context_loop and level.
2331 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2333 * graphite-clast-to-gimple.c (translate_clast_user,
2334 translate_clast_for, translate_clast_guard): Simplify and move common
2335 elements to translate_clast().
2336 (translate_clast): Simplify and get common elements.
2338 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2340 * graphite-clast-to-gimple.c (translate_clast_user,
2341 translate_clast_for, translate_clast_guard): Split out of
2344 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
2346 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2347 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2348 debug_clast_name_indexes_1, debug_clast_name_indexes,
2349 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2350 (clast_name_to_gcc, clast_to_gcc_expression,
2351 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2352 gcc_type_for_clast_eq, graphite_translate_clast_equation,
2353 graphite_create_guard_cond_expr, graphite_create_new_loop,
2354 translate_clast): Add params_index.
2355 (initialize_cloog_names): Create parameter strings from scratch, do
2356 not reference other strings.
2357 (create_params_index): New.
2358 (gloog): Initialize params_index.
2359 * graphite-scop-detection (free_scops_1): Removed.
2360 (limit_scops): Use normal free_scops.
2361 * graphite-sese-to-poly.c (save_var_names): Removed.
2362 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2363 and SESE_PARAMS_INDEX.
2364 * sese.c (new_sese, free_sese): Dito.
2365 * sese.h (struct sese): Remove params_index, params_names.
2366 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2368 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2370 Revert the following patch from 2009-09-14:
2371 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2372 tree-scalar-evolution.h, and then tree-data-ref.h.
2373 * graphite-clast-to-gimple.c: Same.
2374 * graphite-dependences.c: Same.
2375 * graphite-interchange.c: Same.
2376 * graphite-poly.c: Same.
2377 * graphite-scop-detection.c: Same.
2378 * graphite-sese-to-poly.c: Same.
2380 * lambda-code.c: Same.
2381 * matrix-reorg.c: Same.
2382 * tree-data-ref.c: Same.
2383 * tree-if-conv.c: Same.
2384 * tree-loop-distribu: Same.: Same.
2385 * tree-loop-linear.c: Same.
2386 * tree-parloops.c: Same.
2387 * tree-predcom.c: Same.
2388 * tree-vect-patterns.c: Same.
2390 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2392 Revert patch from 2009-09-14.
2393 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2394 passes at -O1 and below.
2396 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2399 * gcc.dg/graphite/pr40281.c: New.
2401 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2402 evolutions should not variate in inner loops.
2404 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2407 * gfortran.dg/graphite/pr42050.f90: New.
2409 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2411 * graphite-interchange.c (memory_strides_in_loop_depth): New.
2412 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2414 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2416 * graphite-blocking.c (scop_do_block): New.
2417 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2418 * graphite-poly.h (scop_do_block): Declared.
2420 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2422 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2423 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
2424 to transform depth into the time_depth before calling
2425 pbb_number_of_iterations_at_time.
2426 (lst_do_strip_mine): Use a scalar variable instead of recomputing
2429 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2431 Reverted the patch for "scattering permutations" from 2009-10-28.
2433 * graphite-poly.c (print_permutation): New.
2434 (debug_permutation): New.
2435 (new_poly_bb): Initialize PBB_PERMUTATION.
2436 (free_poly_bb): Free PBB_PERMUTATION.
2437 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2438 (struct pbb_permutation_elt): New.
2439 (PBB_PERMUTATION_ELT_STRIDE): New.
2440 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2441 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2442 (new_pbb_permutation_elt): New.
2443 (pbb_permutation_elt_free): New.
2444 (struct poly_bb): Add field permutation.
2445 (PBB_PERMUTATION): New.
2446 (print_permutation): Declared.
2447 (debug_permutation): Declared.
2449 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
2451 * graphite-interchange.c (build_partial_difference): New.
2452 (memory_stride_in_loop): Refactored the computation of
2453 equality constraints into build_partial_difference function.
2454 Added support for debugging stride computations.
2456 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2458 * graphite-clast-to-gimple.c (gloog): Free if_region,
2459 if_region->true_region, and if_region->region.
2460 * sese.c (if_region_set_false_region): Free if_region->false_region.
2461 (create_if_region_on_edge): Do not use GGC_NEW.
2462 (move_sese_in_condition): Remove useless initialization.
2464 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2466 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2467 for the loops created by the loop distribution. Do not modify the
2469 (lst_try_interchange_loops): Same. Use a temporary LST for the
2470 transformed schedule. Call lst_update_scattering before data
2471 dependence analysis.
2472 (lst_try_interchange): Pass an extra parameter INDEX.
2473 (lst_do_interchange_1): New.
2474 (lst_do_interchange): Call lst_do_interchange_1.
2475 (scop_do_interchange): Call lst_update_scattering.
2476 * graphite-poly.c (apply_poly_transforms): Do not call
2477 lst_update_scattering.
2478 * graphite-poly.h (lst_pred): New.
2480 (lst_find_first_pbb): Return NULL when not found.
2482 (lst_insert_in_sequence): Allow LST1 to be NULL.
2484 (lst_substitute_3): New.
2485 * gcc.dg/graphite/interchange-1.c: XFail.
2486 * gcc.dg/graphite/interchange-8.c: XFail.
2487 * gcc.dg/graphite/interchange-11.c: XFail.
2489 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2491 * graphite-interchange.c (lst_perfectly_nested_p): New.
2492 (lst_perfect_nestify): New.
2493 (lst_try_interchange_loops): Call store_lst_schedule,
2494 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2495 (scop_do_interchange): Avoid redundant legality test.
2496 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2497 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2498 * graphite-poly.h (psct_static_dim): New.
2499 (lst_dewey_number_at_depth): New.
2500 (lst_find_pbb): Restructured.
2501 (lst_find_first_pbb): Restructured.
2502 (lst_find_last_pbb): New.
2503 (lst_contains_p): New.
2504 (lst_contains_pbb): New.
2505 (lst_create_nest): New.
2506 (lst_remove_from_sequence): New.
2507 (pbb_update_scattering): New.
2508 (lst_update_scattering_under): New.
2509 (lst_update_scattering_seq): New.
2510 (lst_update_scattering): New.
2511 (lst_insert_in_sequence): New.
2512 (lst_distribute_lst): New.
2513 (lst_remove_all_before_including_pbb): New.
2514 (lst_remove_all_before_excluding_pbb): New.
2516 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2518 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2519 get_loop_exit_edges.
2521 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2523 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2525 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2527 * graphite-poly.c (print_permutation): New.
2528 (debug_permutation): New.
2529 (new_poly_bb): Initialize PBB_PERMUTATION.
2530 (free_poly_bb): Free PBB_PERMUTATION.
2531 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2532 (struct pbb_permutation_elt): New.
2533 (PBB_PERMUTATION_ELT_STRIDE): New.
2534 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2535 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2536 (new_pbb_permutation_elt): New.
2537 (pbb_permutation_elt_free): New.
2538 (struct poly_bb): Add field permutation.
2539 (PBB_PERMUTATION): New.
2540 (print_permutation): Declared.
2541 (debug_permutation): Declared.
2543 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2545 * graphite-clast-to-gimple.c (gloog): Do not call
2546 sese_reset_aux_in_loops.
2547 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2548 extra argument for domains. Do not use loop->aux.
2549 (build_scop_iteration_domain): Initialize and free domains, pass it
2550 to build_loop_iteration_domains and extract the information from
2551 domains. Do not use loop->aux.
2552 * sese.c (sese_reset_aux_in_loops): Removed.
2553 * sese.h (sese_reset_aux_in_loops): Removed.
2555 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2557 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2558 (dependency_in_loop_p): Same.
2559 (translate_clast): Do not use loop->aux. Initialize
2560 loop->can_be_parallel.
2561 (mark_loops_parallel): Removed.
2562 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2563 * graphite.c (free_aux_in_new_loops): Removed.
2564 (graphite_finalize): Do not call free_aux_in_new_loops.
2565 (graphite_transform_loops): Do not call mark_loops_parallel.
2567 2009-10-26 Li Feng <nemokingdom@gmail.com>
2569 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2570 (translate_clast): Pass an extra parameter LEVEL.
2571 Call get_scattering_level.
2572 * graphite-clast-to-gimple.h (get_scattering_level): New.
2574 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2576 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2577 * cfgloop.h (struct loop): New field single_iv.
2579 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2580 loop->aux anymore: use loop->single_iv.
2581 (graphite_loop_normal_form): Moved...
2582 (build_graphite_loop_normal_form): Removed.
2583 (gloog): Do not call build_graphite_loop_normal_form.
2584 (free_aux_in_new_loops): Moved...
2585 (mark_loops_parallel): Restructure.
2586 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2587 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2588 (scop_canonicalize_loops): New.
2589 (build_poly_scop): Call scop_canonicalize_loops.
2590 * graphite.c (free_aux_in_new_loops): ...here.
2592 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2594 * g++.dg/graphite/graphite.exp: Add the same rules as in
2595 gcc.dg/graphite/graphite.exp.
2597 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2599 * g++.dg/graphite/id-1.C: New.
2601 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2603 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2605 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2606 (rewrite_phi_out_of_ssa): Same.
2607 (rewrite_cross_bb_scalar_deps): Same.
2608 (translate_scalar_reduction_to_array): Same.
2610 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2612 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2615 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2617 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2618 (build_scop_drs): Call dump_alias_graphs.
2620 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2622 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2623 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2624 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2625 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2626 * graphite-poly.h (free_lst): New.
2627 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2628 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2630 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2632 * graphite-poly.h (struct scop): Add a field saved_schedule.
2633 (SCOP_SAVED_SCHEDULE): New.
2634 (store_lst_schedule): New.
2635 (restore_lst_schedule): New.
2636 (store_scattering): Call store_lst_schedule.
2637 (restore_scattering): Call restore_lst_schedule.
2639 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2641 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2642 (pdr_add_alias_set): Same.
2643 (build_poly_dr): Same.
2644 (build_alias_set_optimal_p): Same.
2645 (build_base_obj_set_for_drs): Same. Do not store the result of
2648 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2650 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2651 all_components_are_cliques to 1.
2653 2009-10-20 Li Feng <nemokingdom@gmail.com>
2655 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2657 (pdr_add_alias_set): Update retrieving alias_set_num.
2658 (build_poly_dr): Update retrieving dr_base_object_set.
2659 (partition_drs_to_sets): Remove.
2660 (build_alias_set_optimal_p): New.
2661 (build_alias_set_for_drs): Rename.
2662 (build_scop_drs): Update.
2663 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2664 (ALIAS_SET_INDEX): Remove.
2665 (BASE_OBJECT_SET_INDEX): Remove.
2667 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2669 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2671 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2673 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2674 loop upper bounds for 1-element arrays at end of structures.
2675 * tree-flow.h (array_at_struct_end_p): Declared.
2676 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2678 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2680 * g++.dg/graphite/pr41305.C: New.
2682 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2684 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2685 construction of parameter constraints from loop iteration analysis.
2686 * gcc.dg/graphite/run-id-2.c: New test.
2688 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2690 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2693 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2695 * graphite-dependences.c (dependence_polyhedron_1): Remove
2696 unused gdim dimensions from the DDR polyhedron.
2698 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2700 * graphite-dependences.c (pddr_transformed_scattering): New.
2701 (dot_original_deps_stmt_1): New.
2702 (dot_transformed_deps_stmt_1): New.
2703 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2704 dot_transformed_deps_stmt_1.
2705 (dot_original_deps): New.
2706 (dot_transformed_deps): New.
2707 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2709 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2711 * graphite-dependences.c (reduction_dr_1): Remove wrong
2712 assert: reduction BBs can have multiple reduction writes
2713 to memory. interchange-3.f90 is an example.
2715 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2717 * gfortran.dg/graphite/interchange-3.f90: New.
2719 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2721 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2723 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2725 * graphite-dependences.c (dependence_polyhedron_1): Add the
2726 context to the dependence polyhedron.
2728 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2730 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2731 PBB_PDR_DUPLICATES_REMOVED.
2732 (new_poly_bb): Same.
2734 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2736 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2738 (build_loop_iteration_domains): Extract bounds on parameters
2739 based on the data size.
2740 (build_scop_context): Do not initialize SCOP_CONTEXT;
2741 add new constraints.
2743 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2745 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2746 * graphite-ppl.h (graphite-ppl.h): Declared.
2748 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2750 * graphite-ppl.c (ppl_print_linear_expr): New.
2751 (debug_ppl_linear_expr): New.
2752 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2753 (debug_ppl_linear_expr): Declared.
2755 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2757 * graphite-interchange.c: Fix comments.
2758 * gcc.dg/graphite/block-1.c: Fix comments.
2760 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2762 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2763 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2765 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2767 Reapply the patch from Alexander Monakov that disappeared during
2768 the last merges from trunk.
2770 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2772 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2773 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2775 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2777 * graphite-interchange.c (memory_stride_in_loop): The depth
2778 argument corresponds to a dynamic time dimension, so use
2779 psct_dynamic_dim to refer to the transformed scattering dimension.
2781 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2783 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2785 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2787 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2789 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2790 the root of the LST.
2791 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2793 (print_lst): Print the root of LST in a different format.
2794 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2796 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2798 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2800 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2802 * doc/passes.texi: Document the Graphite infrastructure.
2804 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2806 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2807 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2808 and check the SSA representation.
2810 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2812 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2814 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2816 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2818 * gcc.dg/graphite/interchange-11.c: New.
2820 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2822 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2824 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2826 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2827 Add -fno-loop-strip-mine and -fno-loop-interchange.
2828 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2829 -fno-loop-strip-mine.
2830 * gfortran.dg/graphite/graphite.exp: Same.
2832 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2834 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2835 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2836 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2837 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2838 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2839 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2840 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2841 DEFAULT_FLAGS_GRAPHITE_SCOP.
2842 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2843 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2845 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2847 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2849 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2850 Sebastian Pop <sebastian.pop@amd.com>
2852 * graphite-interchange.c (build_linearized_memory_access): Pass an
2853 offset as parameter.
2854 (memory_stride_in_loop): Include transform scattering in the
2855 access functions to be able to querry the strides in the
2857 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2858 not the psct_iterator_dim.
2860 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2862 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2863 (lst_do_strip_mine_loop): New.
2864 (lst_do_strip_mine): New.
2865 (scop_do_strip_mine): Call lst_do_strip_mine.
2866 * graphite-poly.h (lst_add_loop_under_loop): New.
2867 (lst_find_first_pbb): New.
2869 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2871 * graphite-poly.c (loop_to_lst): Fix LST creation.
2873 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2875 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2876 sizeof(unsigned long) to make it run on 32bit systems.
2878 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2880 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2883 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2885 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2887 (write_alias_graph_to_ascii_dot): New.
2888 (write_alias_graph_to_ascii_ecc): Ditto.
2889 (partition_drs_to_sets): Add testing of optimality of current method
2890 which assigns alias numbers according to DFS Comopnent number. used
2891 as heuristic for the upcoming ECC algorithm.
2892 (build_scop_drs): Write to file also with the ecc and dot format.
2894 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2896 * gfortran.dg/graphite/interchange-1.f: XFail.
2898 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2900 * graphite.c (graphite_initialize): Do not handle functions with
2901 more than 100 basic blocks.
2903 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2905 * graphite-blocking.c (pbb_do_strip_mine): Use
2906 PARAM_LOOP_BLOCK_TILE_SIZE.
2908 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2910 * graphite-poly.c (dot_lst_1): New.
2912 * graphite-poly.h (dot_lst): Declared.
2914 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2916 * graphite-dependences.c (dot_deps_stmt_1): New.
2917 (dot_deps_stmt): New.
2918 * graphite-dependences.h (dot_deps_stmt): Declared.
2920 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2922 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2923 not replace cross BB scalar dependences ending on PHI nodes.
2924 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2926 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2928 * graphite-poly.c (apply_poly_transforms): Implement the high
2929 level driver for flag_loop_block.
2930 * opts.c (decode_options): Enable flag_loop_block at -O2.
2931 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2934 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2936 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2939 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2941 * graphite-poly.h (lst_find_pbb): New.
2942 (find_lst_loop): New.
2944 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2946 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2947 * graphite-poly.h (struct scop): Remove dep_graph field.
2948 (SCOP_DEP_GRAPH): Removed.
2950 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2952 * graphite-poly.h (copy_lst): Do full copy of LST.
2954 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2956 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2957 when the loop stride is zero.
2959 * gcc.dg/graphite/id-16.c: New.
2961 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2963 * graphite-dependences.c (reduction_dr_1): New.
2964 (reduction_dr_p): New.
2965 (graphite_legal_transform_dr): Call reduction_dr_p.
2966 (reduction_ddr): Renamed reduction_ddr_p.
2967 * graphite-poly.h (same_pdr_p): New.
2968 (number_of_write_pdrs): New.
2969 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2970 (split_reduction_stmt): Do not split reduction statements
2971 when there are no writes to memory.
2972 (translate_scalar_reduction_to_array_for_stmt): Insert the
2973 memory reduction statement just after the scalar reduction statement.
2975 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2977 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2978 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2980 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2982 * graphite-interchange.c (lst_apply_interchange): New.
2983 (lst_interchange_profitable_p): New.
2984 (lst_try_interchange_loops): New.
2985 (lst_try_interchange): New.
2986 (lst_do_interchange): New.
2987 (pbb_do_interchange): Removed.
2988 (scop_do_interchange): Call lst_do_interchange.
2990 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2992 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2993 SCOP_TRANSFORMED_SCHEDULE.
2998 * graphite-poly.h (lst_p): New.
3001 (LST_LOOP_FATHER): New.
3004 (scop_to_lst): Declared.
3005 (print_lst): Declared.
3006 (debug_lst): Declared.
3007 (new_lst_loop): New.
3008 (new_lst_stmt): New.
3011 (lst_dewey_number): New.
3012 (struct scop): Add original_schedule and transformed_schedule fields.
3013 (SCOP_ORIGINAL_SCHEDULE): New.
3014 (SCOP_TRANSFORMED_SCHEDULE): New.
3015 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
3017 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3019 * graphite-dependences.c (reduction_ddr): New.
3020 (graphite_legal_transform_bb): Call reduction_ddr.
3021 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
3022 Initialize PBB_IS_REDUCTION.
3023 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
3024 (PBB_IS_REDUCTION): New.
3025 (new_poly_bb): Update declaration.
3026 * graphite-scop-detection.h (build_scop_bbs): Removed.
3027 (nb_reductions_in_loop): Removed.
3028 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
3029 parameter for reductions.
3030 (try_generate_gimple_bb): Update call to new_poly_bb.
3031 (build_scop_bbs_1): Same.
3032 (build_scop_bbs): Same.
3033 (gsi_for_phi_node): New.
3034 (scalar_close_phi_node_p): Remove gcc_assert.
3035 (split_reduction_stmt): New.
3036 (is_reduction_operation_p): New.
3037 (phi_contains_arg): New.
3038 (follow_ssa_with_commutative_ops): New.
3039 (detect_commutative_reduction_arg): New.
3040 (detect_commutative_reduction_assign): New.
3041 (follow_inital_value_to_phi): New.
3042 (edge_initial_value_for_loop_phi): New.
3043 (initial_value_for_loop_phi): New.
3044 (detect_commutative_reduction): New.
3045 (translate_scalar_reduction_to_array_for_stmt): New.
3046 (insert_copyout): New.
3047 (insert_copyin): New.
3048 (translate_scalar_reduction_to_array): New.
3049 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
3050 (rewrite_commutative_reductions_out_of_ssa_loop): New.
3051 (rewrite_commutative_reductions_out_of_ssa): New.
3052 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
3053 * sese.h (split_region_for_bb): New.
3055 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
3056 * gcc.dg/graphite/interchange-1.c: Fix format.
3057 * gcc.dg/graphite/interchange-10.c: New.
3059 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3061 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
3064 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3066 * graphite-sese-to-poly.c (scev_analyzable_p): New.
3067 (rewrite_cross_bb_scalar_dependence): New.
3068 (rewrite_cross_bb_scalar_deps): New.
3069 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
3070 Call rewrite_cross_bb_scalar_deps.
3072 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3074 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
3075 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
3078 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3080 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
3081 * graphite-interchange.c (pbb_do_interchange): Same.
3082 * graphite-poly.c (print_scattering_function): Same.
3084 * graphite-poly.h (pbb_loop): New.
3085 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
3087 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3089 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
3091 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3093 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
3094 so don't pass a pointer to it.
3095 (build_alias_set_for_drs): Same.
3096 (build_base_obj_set_for_drs): Same.
3097 (build_scop_drs): Same.
3099 2009-09-26 Li Feng <nemokingdom@gmail.com>
3101 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
3102 the alias graph of data references.
3104 2009-09-25 Li Feng <nemokingdom@gmail.com>
3106 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
3107 (build_scop_drs): When debugging, write the alias graph to file,
3108 otherwise, should be disabled.
3110 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3112 * Merge from mainline (151310:151361).
3114 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3116 * Merge from mainline (151171:151310).
3118 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3120 * Merge from mainline (151171:151806).
3122 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3124 * Revert the last commit.
3126 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3128 * Merge from mainline (151171:151819).
3130 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
3132 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
3133 (is_simple_operand): Remove call to stmt_simple_memref_p.
3134 (stmt_simple_for_scop_p): Update call to is_simple_operand.
3136 2009-09-17 David Edelsohn <edelsohn@gnu.org>
3138 * gcc.dg/graphite/interchange-mvt.c: New File.
3139 * gcc.dg/graphite/scop-dsyrk.c: New File.
3140 * gcc.dg/graphite/scop-dsyr2k.c: New File.
3141 * gcc.dg/graphite/scop-mvt.c: New File.
3142 * gcc.dg/graphite/scop-sor.c: New File.
3144 2009-09-17 Li Feng <nemokingdom@gmail.com>
3146 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
3147 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
3148 (graphite_carried_dependence_level_k): Ditto.
3149 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
3150 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
3151 (new_poly_dr): Adjust declaration.
3152 * graphite-sese-to-poly.c (free_data_refs_aux): New.
3153 (free_gimple_bb): Added free_data_refs_aux.
3154 (build_poly_dr): Add dr_base_object_set.
3155 (partition_drs_to_sets): New.
3156 (dr_same_base_object_p): New.
3157 (build_alias_set_for_drs): New.
3158 (build_base_object_set_for_drs): New.
3159 (build_scop_drs): Add build_base_obj_set_for_drs.
3160 * graphite-sese-to-poly.h: Added #define for alias set number index and
3161 base object set index.
3162 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
3163 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
3165 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
3167 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3168 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
3170 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3172 * graphite-sese-to-poly.c (struct irp_data): Removed.
3173 (idx_record_params): Removed.
3174 (find_params_in_bb): Scan for parameters the access functions; don't
3175 parse the tree representation.
3177 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3179 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
3180 passes at -O1 and below.
3182 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3184 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
3185 tree-scalar-evolution.h, and then tree-data-ref.h.
3186 * graphite-clast-to-gimple.c: Same.
3187 * graphite-dependences.c: Same.
3188 * graphite-interchange.c: Same.
3189 * graphite-poly.c: Same.
3190 * graphite-scop-detection.c: Same.
3191 * graphite-sese-to-poly.c: Same.
3193 * lambda-code.c: Same.
3194 * matrix-reorg.c: Same.
3195 * tree-data-ref.c: Same.
3196 * tree-if-conv.c: Same.
3197 * tree-loop-distribu: Same.: Same.
3198 * tree-loop-linear.c: Same.
3199 * tree-parloops.c: Same.
3200 * tree-predcom.c: Same.
3201 * tree-vect-patterns.c: Same.
3203 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
3205 Partially revert the previous patch, except the following.
3206 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
3207 as parameters the operands of the not expression.
3209 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3211 * tree-scalar-evolution.c (instantiate_scev_assign): New.
3212 Do not call analyze_scalar_evolution on assignments.
3213 (instantiate_scev_phi): Call analyze_scalar_evolution.
3214 (instantiate_scev_name): Call instantiate_scev_assign and
3215 instantiate_scev_phi.
3216 (instantiate_scev_not): Adapted to pass as parameters the operands
3217 of the not expression.
3219 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3221 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
3222 to pass as parameters the operands of the binary expression.
3224 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3226 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
3227 instantiate_scev_not. Handle NEGATE_EXPR.
3228 (instantiate_scev_r): Handle NEGATE_EXPR.
3230 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3232 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
3234 (instantiate_scev_r): Move code in instantiate_scev_2
3235 and instantiate_scev_1.
3237 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3239 * tree-scalar-evolution.c (instantiate_scev_3): New.
3240 (instantiate_scev_1): Move code in instantiate_scev_3.
3242 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3244 * tree-scalar-evolution.c (instantiate_scev_poly): New.
3245 (instantiate_scev_1): Move code in instantiate_scev_poly.
3247 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3249 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3250 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3252 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3254 * tree-scalar-evolution.c (instantiate_scev_convert): New.
3255 (instantiate_scev_1): Move code in instantiate_scev_convert.
3257 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3259 * tree-scalar-evolution.c (instantiate_scev_binary): New.
3260 (instantiate_scev_1): Move code in instantiate_scev_binary.
3262 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3264 * tree-scalar-evolution.c (instantiate_scev_name): New.
3265 (instantiate_scev_1): Move code in instantiate_scev_name.
3267 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3269 * Merge from mainline (150992:151171).
3271 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3273 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3275 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3277 * graphite-dependences.c (graphite_legal_transform_bb): Call
3278 pbb_remove_duplicate_pdrs.
3279 * graphite-poly.c (can_collapse_pdr): Removed.
3280 (pdr_find_duplicate): Removed.
3281 (can_collapse_pdrs): New.
3282 (pbb_remove_duplicate_pdrs): New.
3283 (new_poly_dr): Do not look for duplicates.
3284 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3285 (PBB_PDR_DUPLICATES_REMOVED): New.
3286 (pbb_remove_duplicate_pdrs): Declared.
3288 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3290 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3291 the strides by multiplying by PDR_NB_REFS.
3292 * graphite-poly.c (can_collapse_pdr): New.
3293 (pdr_find_duplicate): New.
3294 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
3295 Initialize PDR_NB_REFS.
3296 * graphite-poly.h (struct poly_dr): Add field nb_refs.
3298 (new_poly_dr): Number of subscripts is a graphite_dim_t.
3300 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3302 Revert one of the previous commits:
3303 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3304 the computation of symmetric data dependence relations.
3305 (dependency_between_pbbs_p): Same.
3307 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3310 * graphite-poly.c (apply_poly_transforms): Remove legality test before
3313 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3315 * graphite-dependences.c (pddr_original_scattering): Return NULL
3316 for read-read dependence relations.
3317 * graphite-poly.h (enum poly_dr_type): Fix comment.
3320 (pdr_may_write_p): New.
3322 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3324 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3325 (struct poly_dr): Same.
3326 (new_poly_dr): Same.
3327 * graphite-poly.c (new_poly_dr): Same.
3329 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3330 Sebastian Pop <sebastian.pop@amd.com>
3332 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3333 pbb_strip_mine_time_depth. Changed the implementation so that
3334 transformation is expressed as a transformation on
3335 time (scatttering) dimensions. Also, ensures that the 2d+1
3336 scheduling format is preserved.
3337 (pbb_strip_mine_profitable_p): Profitability is based on the
3338 iteration number of a given time (scattering) dimension,
3339 and not on a original loop depth dimension.
3340 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3341 (pbb_do_strip_mine): Call psct_dynamic_dim.
3342 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3343 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3344 (pbb_nb_dynamic_scattering_transform): New.
3345 (psct_dynamic_dim): New.
3347 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3349 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3350 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3351 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3352 * graphite-interchange.c (build_linearized_memory_access): Same.
3353 (memory_stride_in_loop): Same.
3355 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3357 * graphite-dependences.c (pddr_original_scattering): New.
3358 (graphite_legal_transform_dr): Call pddr_original_scattering.
3361 * graphite-dependences.h (dot_deps): Declared.
3362 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3363 (print_pdr): Print PDR_ID.
3364 * graphite-poly.h (struct poly_dr): Add field id.
3367 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3369 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
3371 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3372 not delete the original dependence relation.
3374 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3376 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3377 the computation of symmetric data dependence relations.
3378 (dependency_between_pbbs_p): Same.
3380 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3382 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3383 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3384 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3385 (free_poly_ddr): New.
3386 (pddr_is_empty): New.
3387 (dependence_polyhedron_1): Now returns a poly_ddr_p.
3388 (dependence_polyhedron): Same. Remove useless gcc_assert.
3390 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3391 (graphite_carried_dependence_level_k): Call pddr_is_empty.
3392 * graphite-dependences.h (enum poly_dependence_kind): New.
3393 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
3394 (PDRP_SOURCE): Renamed PDDR_SOURCE.
3395 (PDRP_SINK): Renamed PDDR_SINK.
3396 (PDRP_DDP): Renamed PDDR_DDP.
3398 (free_poly_ddr): Declared.
3399 * graphite-poly.c (new_scop): Use the new hash function names.
3400 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3401 into original_pddrs.
3402 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3404 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3406 * Merge from mainline (150764:150992).
3408 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3410 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3411 bounds with LT_EXPR to make niter analysis more precise on code
3412 generated by Graphite.
3414 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3416 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3417 (graphite_legal_transform_bb): Same.
3418 (poly_drs_may_alias_p): Same.
3420 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
3423 * graphite-ppl.c (ppl_max_for_le): Correct the use of
3424 ppl_Pointset_Powerset_C_Polyhedron_maximize.
3426 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3428 * graphite-poly.c (print_pbb): Print PBB index.
3430 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3432 * Merge from mainline (r150672:150764).
3434 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3436 * graphite-interchange.c (ppl_max_for_le): Moved...
3437 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3438 * graphite-ppl.c (ppl_max_for_le): ... here.
3439 * graphite-ppl.h (ppl_max_for_le): Declared.
3441 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
3443 * Merge from mainline (r150372:150672).
3445 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3448 * sese.c (convert_for_phi_arg): New.
3449 (add_guard_exit_phis): Use convert_for_phi_arg.
3451 * gfortran.dg/graphite/id-17.f: New.
3453 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3455 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3456 unknown subscript upper bounds.
3458 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3460 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3461 Pranav Garg <pranav.garg2107@gmail.com>
3463 * graphite-interchange.c (gather_access_strides): Removed.
3464 (ppl_max_for_le): New.
3465 (build_linearized_memory_access): New.
3466 (memory_stride_in_loop): New.
3467 (pbb_interchange_profitable_p): Reimplemented.
3468 * graphite-ppl.h (ppl_new_id_map): New.
3469 (ppl_interchange): New.
3471 * gcc.dg/graphite/interchange-6.c: XFAILed.
3473 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3475 * graphite-interchange.c (compute_subscript): Removed.
3476 (compute_array_size_cstr): Removed.
3477 (compute_array_size_poly): Removed.
3478 (compute_array_size): Removed.
3479 (gather_access_strides_poly): Removed.
3480 (gather_access_strides): Empty.
3482 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3484 * graphite-dependences.c (dependence_polyhedron_1): Replace
3485 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3486 (graphite_legal_transform_dr): Same.
3487 (graphite_carried_dependence_level_k): Same.
3488 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3489 Initialize PDR_NB_SUBSCRIPTS.
3490 (print_pdr_access_layout): Replace pdr_nb_subscripts with
3492 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3493 (PDR_NB_SUBSCRIPTS): New.
3494 (pdr_nb_subscripts): Removed.
3495 (pdr_dim): Simplified.
3496 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3497 with PDR_NB_SUBSCRIPTS.
3499 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3501 * graphite-interchange.c (compute_array_size): Remove use of
3503 * graphite-poly.c (new_poly_dr): Remove argument data_container.
3504 Do not initialize PDR_DATA_CONTAINER.
3505 (print_pdr): Do not print PDR_DATA_CONTAINER.
3506 * graphite-poly.h (struct poly_dr): Remove data_container field.
3507 (PDR_DATA_CONTAINER): Removed.
3508 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3510 (build_poly_dr): Same.
3512 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3514 * gcc.dg/graphite/interchange-9.c: New.
3516 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3517 Sebastian Pop <sebastian.pop@amd.com>
3519 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3520 copy of the dependence polyhedron. Free the temporary objects.
3521 (graphite_carried_dependence_level_k): Free unused objects before
3524 * gcc.dg/graphite/interchange-1.c: XFAILed.
3525 * gcc.dg/graphite/interchange-2.c: XFAILed.
3526 * gcc.dg/graphite/interchange-3.c: XFAILed.
3527 * gcc.dg/graphite/interchange-4.c: XFAILed.
3528 * gcc.dg/graphite/interchange-7.c: XFAILed.
3530 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3532 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3533 Early return without analyzing the data dependences if no
3534 transform has been done. Call restore_scattering if the transform
3536 (graphite-interchange.c): Same.
3537 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3538 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3539 (apply_poly_transforms): Do not gcc_assert that
3540 the transform is legal.
3541 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3542 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3543 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3544 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3545 * graphite-poly.h (struct poly_scattering): New.
3546 (struct poly_bb): Add original, transformed, and saved fields.
3547 Remove transformed_scattering, original_scattering, nb_local_variables,
3548 and nb_scattering_transform fields.
3549 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3550 (poly_scattering_new): New.
3551 (poly_scattering_free): New.
3552 (poly_scattering_copy): New.
3553 (store_scattering_pbb): New.
3554 (store_scattering): New.
3555 (restore_scattering_pbb): New.
3556 (restore_scattering): New.
3557 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3558 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3560 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3562 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3565 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3567 * Makefile.in (graphite.o): Depends on PREDICT_H.
3568 * graphite.c: Include predict.h.
3569 (graphite_finalize): Call tree_estimate_probability.
3570 * predict.c (predict_loops): Do not call scev_initialize and
3572 (tree_estimate_probability_bb): New.
3573 (tree_estimate_probability): Do not initialize loops: move that
3574 code to the driver. Call tree_estimate_probability_bb.
3575 (tree_estimate_probability_driver): New.
3576 (pass_profile): Use tree_estimate_probability_driver.
3577 * predict.h (tree_estimate_probability): Declared.
3579 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3581 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3582 * graphite-dependences.c (graphite_legal_transform): Add time to
3583 TV_GRAPHITE_DATA_DEPS.
3584 (dependency_between_pbbs_p): Same.
3585 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3587 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3589 * Merge from mainline (r149952:150372).
3591 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3593 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3594 * graphite-blocking.c: Same.
3595 * graphite-clast-to-gimple.c: Same.
3596 * graphite-dependences.c: Same.
3597 * graphite-poly.c: Same.
3598 * graphite-poly.h: Same.
3599 * graphite-ppl.c: Same.
3600 * graphite-scop-detection.c: Same.
3601 * graphite-sese-to-poly.c: Same.
3604 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3606 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3607 (remove_simple_copy_phi): New.
3608 (remove_invariant_phi): New.
3609 (simple_copy_phi_p): New.
3610 (reduction_phi_p): New.
3611 (gsi_for_ssa_name_def): New.
3612 (insert_out_of_ssa_copy): New.
3613 (insert_out_of_ssa_copy_on_edge): New.
3614 (create_zero_dim_array): New.
3615 (scalar_close_phi_node_p): New.
3616 (rewrite_close_phi_out_of_ssa): New.
3617 (rewrite_phi_out_of_ssa): New.
3618 (rewrite_reductions_out_of_ssa): New.
3619 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3621 * gcc.dg/graphite/id-11.c: New.
3622 * gcc.dg/graphite/id-15.c: New.
3623 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3624 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3625 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3626 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3627 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3628 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3629 * gfortran.dg/graphite/id-13.f: New.
3630 * gfortran.dg/graphite/id-5.f: New.
3632 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3634 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3635 check that nb_reductions_in_loop is zero.
3636 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3637 reduction phi nodes.
3638 (nb_reductions_in_loop): Removed.
3639 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3640 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3641 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3642 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3643 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3645 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3647 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3648 statements that have an empty iteration domain.
3649 * gfortran.dg/graphite/id-16.f: New.
3651 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3653 * tree-scalar-evolution.c (instantiate_scev_1): Return
3654 chrec_dont_know when the result is not above instantiate_below.
3655 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3656 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3657 the tree has a known scalar evolution.
3658 * gfortran.dg/graphite/id-14.f: New.
3659 * gfortran.dg/graphite/id-15.f: New.
3661 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3663 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3665 (rename_variables): Keep inserting renames after the ones already
3668 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3670 * graphite-sese-to-poly.c (compare_bb_depths): New.
3671 (graphite_sort_dominated_info): New.
3672 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3673 (build_scop_scattering): Fix comment.
3675 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3677 * graphite.c (graphite_finalize): Call print_loops instead of
3678 dump_function_to_file.
3679 * gcc.dg/graphite/graphite.exp: Fix formatting.
3680 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3681 loops generated in the graphite output file.
3682 * gcc.dg/graphite/pr35356-2.c: New.
3683 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3684 * gfortran.dg/graphite/id-12.f: New.
3686 2009-07-24 Li Feng <nemokingdom@gmail.com>
3688 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3691 2009-07-24 Li Feng <nemokingdom@gmail.com>
3692 Tobias Grosser <grosser@fim.uni-passau.de>
3694 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3695 alias set number build alias in ACCESSES polyhedron.
3696 (build_alias_set_for_drs): New.
3697 (build_pbb_drs): Added build_alias_set_for_drs.
3698 * graphite-dependences.c (poly_drs_may_alias_p): New.
3699 (graphite_carried_dependence_level_k): Check alias information
3700 before building polyhedron.
3702 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3704 * Makefile.in (lambda-code.o): Fix formatting.
3706 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3708 * Merge from mainline (r149350-149952)
3710 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3712 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3713 before interchange to prepare for loop blocking.
3715 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3717 * graphite-poly.c (apply_poly_transforms): Add checks after every
3719 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3720 done in apply_poly_transforms.
3722 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3724 * graphite-dependences.c (build_lexicographically_gt_constraint):
3725 Replace RES parameter with *RES.
3726 (dependence_polyhedron_1): Pass an address of the parameter RES
3727 instead of value of RES.
3729 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3731 * graphite.c (graphite_finalize): Fix comment.
3732 (graphite_transform_loops): Reset scev info after code generation
3735 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3737 * graphite.c (graphite_finalize): Call scev_reset.
3739 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3741 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3742 GBB_CLOOG_IV_TYPES hash table twice.
3743 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3744 (add_condition_to_domain): Clear GMP values.
3746 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3748 * graphite-dependences.c: Fix formatting.
3749 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3750 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3751 * graphite-sese-to-poly.c: Fix formatting.
3752 * graphite.c (graphite_transform_loops): Create the hash table
3753 after the early return.
3755 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3757 * gcc.dg/graphite/id-14.c: New.
3758 * gcc.dg/graphite/pr40157.c: New.
3759 * gfortran.dg/graphite/id-11.f: New.
3761 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3763 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3764 (build_poly_scop): Return false when there are no pbbs within
3765 loops to avoid to pass to cloog scops with no loops.
3767 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3769 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3770 useless test "i % 2".
3771 (build_pbb_scattering_polyhedrons): Fix formatting.
3772 (build_poly_dr): Same.
3773 * graphite.c (graphite_transform_loops): Restructure.
3775 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
3777 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3778 reduction_list parameter.
3779 (rewrite_all_phi_nodes_with_iv): Same.
3780 (canonicalize_loop_ivs): Same.
3781 * tree-parloops.c (struct brli): Removed.
3782 (build_reduction_list_info): Removed.
3783 (build_new_reduction): New.
3784 (analyze_reduction_list): Removed.
3785 (gather_scalar_reductions): Find reductions instead of phi
3786 nodes that can't be canonicalized.
3787 (try_create_reduction_list): Remove reduction_list parameter.
3788 (gen_parallel_loop): Same.
3789 (parallelize_loops): Remove analyze_reductions variable,
3790 initialization and free.
3791 Change reduction_list htab initialization to reduction_info
3792 elements instead of ssa names.
3793 Call try_create_reduction_list and gen_parallel_loop without
3794 analyzed_reduction argument.
3795 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3796 canonicalize_loop_ivs with one less argument.
3797 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3799 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3801 * graphite-dependences.c (new_poly_dr_pair): New.
3802 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3803 (new_poly_dr_pair): New.
3804 (eq_poly_dr_pair_p): New.
3805 (hash_poly_dr_pair_p): New.
3806 * graphite-dependences.h (struct poly_dr_pair): New.
3807 (eq_poly_dr_pair_p): Declared.
3808 (hash_poly_dr_pair_p): Declared.
3809 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3810 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3811 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3812 * Makefile.in (graphite-poly.o): Add dependence on
3813 graphite-dependences.h.
3815 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3817 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3818 polynomials of degree > 1 pass to Graphite.
3819 * tree-chrec.c (scev_is_linear_expression): Call
3820 evolution_function_is_affine_multivariate_p.
3821 * gfortran.dg/graphite/id-10.f90: New.
3823 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3825 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3826 Instantiate scevs varying in outer loops.
3827 * gfortran.dg/graphite/id-9.f: Correct testcase.
3829 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3831 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3832 redundant constraint.
3834 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3836 * gcc.dg/graphite/graphite.exp: Fix comments.
3837 * gfortran.dg/graphite/graphite.exp: Trigger actions
3838 based on the file names as in the C testsuite.
3839 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3840 * gfortran.dg/graphite/block-2.f: Same.
3841 * gfortran.dg/graphite/block-3.f90: Same.
3842 * gfortran.dg/graphite/block-4.f90: Same.
3843 * gfortran.dg/graphite/id-1.f90: Same.
3844 * gfortran.dg/graphite/id-2.f90: Same.
3845 * gfortran.dg/graphite/id-3.f90: Same.
3846 * gfortran.dg/graphite/id-4.f90: Same.
3847 * gfortran.dg/graphite/id-6.f: Same.
3848 * gfortran.dg/graphite/id-9.f: Same.
3849 * gfortran.dg/graphite/interchange-1.f: Same.
3850 * gfortran.dg/graphite/interchange-2.f: Same.
3851 * gfortran.dg/graphite/scop-1.f: Same.
3853 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3855 * sese.c (expand_scalar_variables_call): New.
3856 (expand_scalar_variables_ssa_name): Handle calls in expander.
3858 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3860 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3861 Expect to see the pattern twice.
3862 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3863 * gcc.dg/graphite/interchange-5.c: Same.
3864 * gcc.dg/graphite/interchange-6.c: Same.
3866 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3868 * gcc.dg/graphite/id-10.c: New.
3869 * gcc.dg/graphite/id-12.c: New.
3870 * gfortran.dg/graphite/id-7.f: New.
3871 * gfortran.dg/graphite/id-8.f: New.
3873 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3875 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3878 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3880 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3882 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3884 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3886 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3888 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3889 building PDR subscripts.
3891 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3893 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3894 computation of array sizes.
3896 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3898 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3900 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3902 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3903 build_pairwise_constraint, dr_equality_constraints,
3904 build_pairwise_scheduling_equality,
3905 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3906 build_lexicographically_gt_constraint, dependence_polyhedron,
3907 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3908 Move from NNC_Polyhedron to C_Polyhedron.
3909 * graphite-interchange.c (compute_array_size_poly,
3910 gather_access_strides): Dito.
3911 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3912 free_scop, pbb_number_of_iterations): Dito.
3913 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3914 pbb_dim_iter_domain, struct scop): Dito.
3915 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3916 new_Cloog_Domain_from_ppl_Polyhedron,
3917 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3918 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3919 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3920 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3921 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3922 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3923 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3924 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3925 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3926 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3927 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3928 build_scop_iteration_domain, build_poly_dr): Dito
3930 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3932 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3934 * gcc.dg/graphite/run-id-1.c: New.
3936 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3938 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3939 positivity constraint on the symbolic number of iterations.
3941 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3943 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3945 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3946 Tobias Grosser <grosser@fim.uni-passau.de>
3948 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3949 (build_cloog_prog): Directly use SCOP_CONTEXT.
3950 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3951 (free_scop): Free SCOP_CONTEXT.
3952 (print_scop_context): New.
3953 (print_scop): Call print_scop_context.
3954 (debug_scop_context): New.
3955 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3956 (struct scop): Added field context.
3957 (SCOP_CONTEXT): New.
3958 * graphite-sese-to-poly.c (add_param_constraints): New.
3959 (build_scop_context): New.
3960 (build_poly_scop): Call build_scop_context.
3962 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3964 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3965 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3966 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3967 * graphite-ppl.h: Include double-int.h and tree.h.
3968 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3969 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3970 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3971 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3973 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3975 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3976 POINTER_PLUS_EXPR for pointer types.
3977 (clast_to_gcc_expression): Same.
3979 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3981 * graphite-poly.c (print_scattering_function): Early return when
3982 PBB_TRANSFORMED_SCATTERING is not initialized.
3983 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3985 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3987 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3990 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3992 * tree-parloops.c (analyze_reduction_list): Change return
3994 (try_create_reduction_list): Move the call to
3995 analyze_reduction_list to the beginining.
3996 Call reduction_phi with analyzed_reductions as argument
3997 instead of reduction_list.
3999 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
4001 * Merge from mainline (r148296:149346)
4003 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4005 * graphite-scop-detection.c (graphite_can_represent_init): New.
4006 (graphite_can_represent_scev): Call graphite_can_represent_init:
4007 check that the initial value does not contain multiplications of
4009 (stmt_has_simple_data_refs_p): New.
4010 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
4011 (is_simple_operand): Fix formatting.
4012 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
4014 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4016 * gcc.dg/graphite/id-13.c: New.
4017 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
4018 analyze_scalar_evolution, use scalar_evolution_in_region.
4019 (scan_tree_for_params_right_scev): Add extra assert.
4020 (parameter_index_in_region_1): Split from parameter_index_in_region.
4021 (idx_record_params): Use scalar_evolution_in_region.
4022 (find_params_in_bb): Same.
4023 (find_scop_parameters): Same.
4024 (build_loop_iteration_domains): Same.
4025 (create_linear_expr_from_tree): Same.
4026 * sese.c (scalar_evolution_in_region): New.
4027 * sese.h (scalar_evolution_in_region): Declared.
4028 (defined_in_sese_p): New.
4029 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
4031 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
4034 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4036 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
4037 TREE_DATA_REF_H also implies SCEV_H.
4039 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
4041 * graphite-poly.c (print_scop_params): New.
4042 (print_scop): Call print_scop_params.
4043 (debug_scop_params): New.
4044 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
4046 2009-07-07 Li Feng <nemokingdom@gmail.com>
4048 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
4049 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
4050 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
4051 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
4052 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
4053 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
4055 2009-07-07 Li Feng <nemokingdom@gmail.com>
4057 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
4058 for dependency checking part.
4059 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
4060 tests for dependency checking.
4061 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4062 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4063 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
4064 flag -fdump-tree-graphite-all for autopar testsuites.
4066 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
4068 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
4069 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
4070 canonicalize_loop_ivs): Moved...
4071 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
4073 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
4075 * tree-parloops.c (try_create_reduction_list): Pass an extra
4076 argument analyzed_reductions. Call analyze_reduction_list.
4077 (gen_parallel_loop): Do not call analyze_reduction_list.
4078 (parallelize_loops): Init and finalize analyzed_reductions.
4080 2009-07-06 Li Feng <nemokingdom@gmail.com>
4082 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4083 Added flag -fno-loop-strip-mine for autopar testcase.
4085 2009-07-04 Li Feng <nemokingdom@gmail.com>
4087 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
4088 transformed scattering dimension instead of unmatch orignal when
4089 calling dependence_polyhedron.
4091 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4093 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
4095 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4097 * graphite-poly.c (pbb_number_of_iterations): Check for returned
4098 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
4100 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
4102 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
4103 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
4104 * graphite-poly.c (pbb_number_of_iterations): New.
4105 * graphite-poly.h (pbb_number_of_iterations): Declared.
4106 (pbb_iterator_dim, pbb_parameter_dim): New.
4108 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
4110 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
4111 last commit on type of lower and upper bound of loops.
4113 2009-06-29 Li Feng <nemokingdom@gmail.com>
4115 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
4116 graphite-dependences.h.
4117 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
4118 (mark_bb_with_pbb): New.
4119 (get_stmtfor_depth): New.
4120 (find_pbb_via_hash): New.
4121 (dependency_in_loop_p): New.
4122 (mark_loops_parallel): New.
4123 (free_aux_in_new_loops): New.
4124 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
4125 bb with it's relevant pbb. Mark newly created loops. Remove mark
4126 innermost loop parallel without checking.
4127 (gloog): Add parameter BB_PBB_MAPPING.
4128 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
4129 (gloog): Change declaration.
4130 (mark_loop_parallel): Make extern.
4131 (free_aux_in_new_loops): Declare.
4132 (bb_pbb_map_hash): New.
4133 (eq_bb_pbb_map): New.
4134 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
4135 auto parallelization when flag_graphite_force_parallel is set.
4136 (graphite_finalize): Added free_aux_in_new_loops.
4137 * tree-parloops.c (parallelize_loops): Only generate parallel code for
4138 the innermost loop that marked parallel. Use
4139 flag_graphite_force_parallel instead of loop->can_be_parallel.
4140 (loop_parallel_p): Move inner most checking out of function.
4142 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4144 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
4145 type of lower and upper bound of loops signed long int.
4147 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4149 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
4150 expression outside the loop.
4152 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4154 * gcc.dg/graphite/interchange-8.c: New.
4156 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4158 * gcc.dg/graphite/interchange-0.c: XFailed.
4159 * gcc.dg/graphite/interchange-5.c: XFailed.
4160 * gcc.dg/graphite/interchange-6.c: XFailed.
4162 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4164 * graphite-interchange.c (compute_array_size_poly): The end of the
4165 recursion should return 1.
4167 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4169 * graphite-interchange.c (compute_array_size_cstr): Allow the
4170 subscript multiplier to be -1.
4171 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
4172 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
4173 data_container. Initializes PDR_DATA_CONTAINER.
4174 (print_pdr_access_layout): New.
4175 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
4176 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
4178 (PDR_DATA_CONTAINER): New.
4179 (new_poly_dr): Update declaration.
4180 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
4181 (build_poly_dr): Call pdr_add_data_dimensions.
4183 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4185 * graphite-poly.h (struct poly_dr): Fix comment.
4186 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
4187 (pdr_add_memory_accesses): New.
4188 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
4190 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4192 * graphite-poly.c (print_pdrs, debug_pdrs): New.
4193 (print_pbb): Add call to print_pdrs.
4194 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
4196 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
4197 Li Feng <nemokingdom@gmail.com>
4199 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
4200 (dependency_between_pbbs_p): New.
4201 (lexicographically_gt_p): Assure !empty_p before polyhedron
4202 intersection assign.
4203 (build_lexicographically_gt_constraint): Correct lexicographically
4205 * graphite-dependences.h: New.
4206 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
4208 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4210 * graphite-clast-to-gimple.c (print_clast_stmt): New.
4211 (gloog): Print to dump_file the generated clast.
4212 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
4213 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
4215 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4217 * graphite-poly.c (extend_scattering): Increment
4218 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
4220 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4222 * graphite-interchange.c (compute_array_size_poly): Added exit of
4223 recursion condition. Continue iterating even after the first equality.
4224 (compute_array_size): Same.
4226 2009-06-24 Li Feng <nemokingdom@gmail.com>
4228 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
4229 -fdump-tree-final_cleanup to -fdump-tree-optimized.
4230 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4231 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4232 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
4234 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4236 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
4237 only when the use verifies is_gimple_reg.
4239 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4241 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
4242 Allocate scaldims after call to unify_scattering_dimensions.
4244 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4246 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4248 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4249 Albert Cohen <albert.cohen@inria.fr>
4251 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4252 variables for the strip mining.
4254 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4255 Pranav Garg <pranav.garg2107@gmail.com>
4257 * Makefile.in (OBJS-common): Added graphite-blocking.o.
4258 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4259 (graphite-blocking.o): New rule.
4260 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4261 * graphite-blocking.c: New.
4262 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4263 flag_loop_strip_mine.
4264 (psct_scattering_dim_for_loop_depth): New.
4265 * graphite-poly.h (scop_do_strip_mine): Declared.
4266 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4267 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4268 flag_loop_strip_mine.
4270 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4272 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4273 a GMP value and a PPL coefficient at each iteration of a loop.
4275 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4277 * graphite-dependences.c (dependence_polyhedron): Do not use
4278 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
4279 pbb_nb_scattering_transform.
4280 (graphite_legal_transform_dr): Same.
4281 * graphite-poly.c (extend_scattering): Same.
4282 (unify_scattering_dimensions): Same.
4283 (print_scattering_function): Same.
4284 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4285 PBB_NB_LOCAL_VARIABLES.
4286 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4287 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4288 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4289 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4290 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4291 (pbb_nb_scattering_transform): New.
4292 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4293 (psco_scattering_dim): Add assert on parameters.
4294 (psct_scattering_dim): Same.
4295 (psct_scattering_dim_for_loop_depth): Declared.
4296 (psct_local_var_dim): New.
4297 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4298 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
4299 correct layout, call pbb_nb_local_vars.
4300 (psct_add_local_variable, psct_add_scattering_dimension): New.
4301 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4302 Initialize PBB_NB_SCATTERING_TRANSFORM.
4304 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4306 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4307 (set_coef): Renamed ppl_set_coef.
4308 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4310 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4312 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4313 test a boolean against 1.
4314 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4315 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4316 (pbb_do_interchange): Returns true when a transform has been performed.
4317 (scop_do_interchange): Same.
4318 * graphite-poly.c (apply_poly_transforms): Use the return value of
4319 scop_do_interchange.
4320 * graphite-poly.h (scop_do_interchange): Update declaration.
4322 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
4324 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4326 * sese.c (sese_reset_aux_in_loops): New.
4327 * sese.h (sese_reset_aux_in_loops): New.
4329 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4331 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4332 multiplier and multiply the constant by the multiplier.
4333 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4334 (build_poly_dr): Do not use the multiplier to define the subscript.
4336 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4338 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4339 compiler's data reference. Initialize PDR_CDR.
4340 (print_pdr): Call dump_data_reference.
4341 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4342 Add compiler_dr field.
4343 (PDR_BB): Renamed PDR_PBB.
4345 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4346 GCC's data reference representation.
4347 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4348 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4350 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4352 * graphite-poly.c (print_scattering_function): Also print the layout.
4353 * graphite-poly.h (pbb_nb_local_vars): New.
4355 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4357 * graphite-poly.c (print_pbb_domain): Also print the layout names.
4359 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4361 * graphite-poly.c (print_pdr, debug_pdr): New.
4362 * graphite-poly.h (print_pdr, debug_pdr): Declared.
4363 (PDR_BASE): Removed.
4365 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4367 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4370 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4372 * graphite-interchange.c (compute_subscript): Allow also -1 in the
4373 subscript identification column.
4374 (pbb_do_interchange): Print to dump_file that some loops "will be
4375 interchanged". Rely on that chain of characters in the testcases.
4376 * gcc.dg/graphite/interchange-0.c: New.
4377 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4378 interchange-*.c files and compile them with -floop-interchange.
4380 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
4382 * graphite-interchange.c (interchange_profitable_p): Renamed
4383 pbb_interchange_profitable_p.
4385 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4386 Harsha Jagasia <harsha.jagasia@amd.com>
4387 Pranav Garg <pranav.garg2107@gmail.com>
4389 * graphite-interchange.c (interchange_profitable_p): Make static.
4390 (pbb_interchange_loop_depths, pbb_do_interchange,
4391 scop_do_interchange): New.
4392 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4393 for flag_loop_interchange.
4394 * graphite-poly.h (scop_do_interchange): Declared.
4395 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4396 flag_loop_interchange is used.
4398 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4400 * graphite-dependences.c (dependence_polyhedron): Update use of
4401 pbb_nb_scattering_dims.
4402 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4403 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4404 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4405 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4407 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4409 * graphite.c: Cleanup foo.
4411 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4413 * Merge from mainline (r143684:148293).
4414 * Disabled libpcp until it gets fixed.
4416 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
4417 Harsha Jagasia <harsha.jagasia@amd.com>
4419 * graphite-interchange.c: New.
4420 * Makefile.in (graphite-interchange.o): New.
4421 * graphite-poly.h (interchange_profitable_p): Declared.
4422 * graphite-ppl.h (value_max): New.
4424 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4426 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4427 * graphite-poly.h: Fix some comments.
4431 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4434 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4435 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4436 (pdr_accessp_nb_params): Renamed pdr_nb_params.
4437 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4438 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4439 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4440 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4441 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4442 * graphite-clast-to-gimple.c: Same.
4443 * graphite-dependences.c: Same.
4444 * graphite-poly.c: Same.
4445 * graphite-sese-to-poly.c: Same.
4447 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4449 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4450 expressions for an IV rename, as returned by clast_to_gcc_expression.
4451 (copy_renames): Rename new_name to expr.
4452 * sese.c (debug_rename_elt): Same.
4455 (sese_adjust_liveout_phis): Call force_gimple_operand before using
4456 the information from the rename map.
4457 (rename_variables_in_stmt): Same.
4458 (add_loop_exit_phis): Rename new_name to expr.
4459 (insert_loop_close_phis): Same.
4460 (add_guard_exit_phis): Same. Call force_gimple_operand.
4461 * sese.h (struct rename_map_elt): Rename new_name to expr.
4462 (new_rename_map_elt): Same.
4464 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4466 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4467 * sese.c (set_rename): Make it extern.
4468 * sese.h (set_rename): Declared.
4470 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4472 * graphite-poly.c (extend_scattering): Free values.
4473 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4475 (ppl_print_powerset_matrix): Same.
4476 * graphite-scop-detection.c (free_scops_1): New.
4477 (limit_scops): Call free_scops_1.
4478 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4479 (build_poly_dr): Free PPL coefficients.
4480 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4482 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
4484 * graphite-dependences.c: New.
4485 * graphite-data-ref.c: Removed.
4486 * graphite-data-ref.h: Removed.
4487 * Makefile.in (graphite-data-ref.o): Removed.
4488 (graphite-dependences.o): Added.
4489 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4490 * graphite-poly.c: Same.
4491 Move the data dependence testing to graphite-dependences.c.
4493 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
4495 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4496 from graphite_cannot_represent_loop. Code refactored.
4497 (scopdet_basic_block_info): Call graphite_can_represent_loop.
4499 2009-05-17 Li Feng <nemokingdom@gmail.com>
4501 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4502 Cover all the testcases (not only the filtered ones).
4504 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
4506 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4507 unnecessary check. Update comments. Move check for REAL_TYPE here.
4508 (harmful_stmt_in_bb): Remove checks for conditions. This is already
4509 done in (stmt_simple_for_scop_p).
4511 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
4513 * graphite.c (print_global_statistics): New.
4514 (print_graphite_scop_statistic): New.
4515 (print_graphite_statistics): New.
4516 (graphite_initialize, graphite_transform_loops): Print statistics.
4517 * graphite-scop-detection (build_scops): Print statistics.
4518 (print_graphite_scop_statistics): New.
4519 (print_graphite_statistics): New.
4521 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4523 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4524 (debug_clast_name_index): Removed.
4525 (debug_clast_name_indexes_1): Removed.
4526 (debug_clast_name_indexes): Removed.
4527 (clast_name_index_elt_info): Removed.
4528 (eq_clast_name_indexes): Removed.
4529 (clast_name_to_index): Removed.
4530 (new_clast_name_index): Removed.
4531 (save_clast_name_index): Removed.
4532 (save_var_name): Moved...
4533 (init_sese_params_index): Removed.
4534 (clast_name_to_gcc): Remove use of name_tree.
4535 (initialize_cloog_names): Same.
4536 (gloog): Do not call init_sese_params_index.
4537 * graphite-sese-to-poly.c (save_var_name): ...here.
4538 (parameter_index_in_region): New.
4539 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4540 (parameter_index_in_region): Removed.
4541 (is_parameter): Remove use of name_tree.
4542 * sese.h (struct name_tree): Removed.
4543 (struct sese): Remove use of name_tree. New field params_names.
4544 (SESE_PARAMS_NAMES): New.
4545 (SESE_PARAMS): Remove duplicate.
4546 (parameter_index_in_region): Removed.
4547 (sese_nb_params): Remove use of name_tree.
4548 (struct clast_name_index): New.
4549 (new_clast_name_index): New.
4550 (clast_name_to_index): New.
4551 (save_clast_name_index): New.
4552 (debug_clast_name_index): New.
4553 (debug_clast_name_indexes_1): New.
4554 (debug_clast_name_indexes): New.
4555 (clast_name_index_elt_info): New.
4556 (eq_clast_name_indexes): New.
4558 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4560 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4561 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4562 (graphite_loop_normal_form): Do not pass region. Do not
4563 initialize SESE_OLDIVS.
4564 (build_graphite_loop_normal_form): Update call to
4565 graphite_loop_normal_form.
4566 * sese.c (debug_oldivs): Removed.
4567 (new_sese): Do not initialize SESE_OLDIVS.
4568 (free_sese): Do not free SESE_OLDIVS.
4569 (oldiv_for_loop): Removed.
4570 * sese.h (struct sese): Remove old_ivs.
4571 (SESE_OLDIVS): Removed.
4572 (oldiv_for_loop): Removed.
4574 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4576 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4577 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4578 replaced by a call to newivs_to_depth_to_newiv.
4579 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4580 (clast_to_gcc_expression_red): Same.
4581 (gcc_type_for_clast_expr): Same.
4582 (gcc_type_for_clast_eq): Same.
4583 (graphite_translate_clast_equation): Same.
4584 (graphite_create_guard_cond_expr): Same.
4585 (graphite_create_new_guard): Same.
4586 (graphite_create_new_loop): Same.
4587 (build_iv_mapping): Same.
4588 (translate_clast): Same.
4590 (loop_iv_stack_patch_for_consts): Removed. *
4591 sese.c (iv_stack_entry_is_constant): Removed.
4592 (iv_stack_entry_is_iv): Removed.
4593 (loop_iv_stack_push_iv): Removed.
4594 (loop_iv_stack_insert_constant): Removed.
4595 (loop_iv_stack_pop): Removed.
4596 (loop_iv_stack_get_iv): Removed.
4597 (loop_iv_stack_get_iv_from_name): Removed.
4598 (debug_loop_iv_stack): Removed.
4599 (free_loop_iv_stack): Removed.
4600 (loop_iv_stack_remove_constants): Removed. *
4601 sese.h (iv_stack_entry_kind): Removed.
4602 (iv_stack_entry_data_union): Removed.
4603 (iv_stack_entry_struct): Removed.
4604 (iv_stack_entry_p): Removed.
4605 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4606 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4607 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4608 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4609 (gbb_loop_at_index): Fix indenting.
4610 (gbb_loop_index): Removed.
4612 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4614 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4615 Call clast_name_to_index.
4617 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4619 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4620 do not pass params. Get params from SESE_PARAMS.
4621 (clast_to_gcc_expression): Same.
4622 (clast_to_gcc_expression_red): Same.
4623 (gcc_type_for_clast_eq): Same.
4624 (graphite_translate_clast_equation): Same.
4625 (graphite_create_new_loop): Same.
4626 * sese.c (rename_variables_in_stmt): Fix comment.
4628 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4630 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4632 Call save_clast_name_index.
4633 (translate_clast): Pass newivs_index.
4634 (gloog): Create and free newivs_index.
4636 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4638 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4639 (clast_name_index_p): New type.
4640 (debug_clast_name_index): New.
4641 (debug_clast_name_indexes_1): New.
4642 (debug_clast_name_indexes): New.
4643 (clast_name_index_elt_info): New.
4644 (eq_clast_name_indexes): New.
4645 (clast_name_to_index): New.
4646 (new_clast_name_index): New.
4647 (save_clast_name_index): New.
4648 (init_sese_params_index): New.
4649 (gloog): Call init_sese_params_index.
4650 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4651 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4652 (free_sese): Free SESE_PARAMS_INDEX.
4653 * sese.h (struct sese): Add params_index.
4654 (SESE_PARAMS_INDEX): New.
4656 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4658 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4659 (graphite_create_new_loop): Pass the newivs vector. Push the
4660 newly created IV to newivs.
4661 (translate_clast): Pass the newivs vector.
4662 (gloog): Create and destroy the newivs vector.
4664 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4666 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4667 (graphite_loop_normal_form): Initialize loop->aux with the unique
4668 IV that has been created.
4670 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4672 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4673 scev with parameters in the base part. They where forbidden
4676 2009-05-11 Li Feng <nemokingdom@gmail.com>
4678 * gcc.dg/graphite/graphite.exp: Set different default
4679 compile options by file names.
4680 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4681 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4682 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4683 * gcc.dg/graphite/scop-matmult.c: Ditto.
4685 2009-05-08 Li Feng <nemokingdom@gmail.com>
4687 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4688 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4689 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4690 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4692 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4694 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4697 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4699 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4700 allow integer constant strides.
4701 (graphite_can_represent_expr): Depend on outermost_loop.
4702 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4703 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4704 build_scops_1): Same.
4705 (scopdet_basic_block_info): Same and insert layered SCoP
4707 (try_generate_gimple_bb): Cleanup.
4708 (build_scops): Enable data references.
4710 * gcc.dg/graphite/id-5.c: New.
4711 * gcc.dg/graphite/id-9.c: New.
4712 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4713 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4715 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4717 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4718 that we have not yet built for this SCoP.
4720 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4722 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4723 for complex numbers.
4725 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4727 * graphite-ppl.c: Fix build if cloog is not available.
4729 2009-05-04 Li Feng <nemokingdom@gmail.com>
4731 * tree-parloops.c (loop_parallel_p): Remove construction of
4732 NITER and REDUCTION_LIST.
4733 (try_get_loop_niter): New.
4734 (try_create_reduction_list): New.
4735 (parallelize_loops): Bypass the failed checkings in autopar
4736 when can_be_parallel in loop structure is set to true.
4738 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4740 * gcc.dg/graphite/id-6.c: Update testcase.
4741 * gcc.dg/graphite/scop-3.c: Dito.
4743 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4745 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4746 Enable EQ_EXPR and NE_EXPR again.
4748 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4750 * graphite-scop-detection.c (graphite_can_represent_scev):
4751 Add check if scev is affine multivariate.
4752 (harmful_stmt_in_bb): Check if we can represent the conditions.
4753 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4755 * gcc.dg/graphite/id-7.c: New.
4757 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4759 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4760 Check all bbs in region, not only the bbs that are represented in
4762 (build_poly_scop): Add newline.
4763 * gcc.dg/graphite/id-8.c: New.
4765 2009-04-30 Li Feng <nemokingdom@gmail.com>
4767 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4768 when loop initialize.
4769 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4770 * common.opt: Declare flag_graphite_force_parallel.
4771 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4773 * graphite-poly.c (apply_poly_transforms): Introduce
4774 flag_graphite_force_parallel.
4775 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4776 * toplev.c (process_options): ditto and replace a not correctly
4779 2009-04-30 Li Feng <nemokingdom@gmail.com>
4781 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4782 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4783 to the redefinition.
4784 (compute_cloog_iv_types_1): ditto.
4785 (build_iv_mapping): ditto.
4786 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4788 (free_gimple_bb): Removed GBB_LOOPS related free part.
4789 (build_bb_loops): Removed.
4790 * sese.h (struct gimple_bb): Removed loops.
4791 (GBB_LOOPS): Removed.
4792 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4793 (gbb_loop_index): ditto.
4795 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4797 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4798 allow non constant strides.
4799 * gcc.dg/graphite/scop-20.c: New.
4801 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4803 * graphite-scop-detection.c (dot_all_scops): Fix system call
4804 return value warning.
4807 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4809 * gcc.dg/graphite/id-6.c: Fix pattern.
4810 * gcc.dg/graphite/scop-3.c: Same.
4812 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4814 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4815 build_pairwise_constraint, dr_equality_constraints,
4816 build_pairwise_scheduling_equality,
4817 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4818 build_lexicographically_gt_constraint, dependence_polyhedron,
4819 graphite_legal_transform_dr, graphite_legal_transform_bb,
4820 graphite_legal_transform): New.
4821 * graphite-poly.h (graphite_legal_transform): Declared.
4822 * graphite-sese-to-poly.c (build_poly_scop): Call to
4823 graphite_legal_transform is disabled for the moment.
4825 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4827 * graphite-poly.h (pbb_nb_scattering_dims): New.
4828 (pbb_nb_scattering): Use it.
4830 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4832 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4833 Pointset_Powerset version of ppl_insert_dimensions.
4834 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4836 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4838 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4840 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4842 * graphite-poly.h: Fix comment.
4844 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4846 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4848 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4850 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4853 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4855 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4856 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4859 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4861 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4862 handle EQ_EXPR and NE_EXPR.
4864 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4866 * graphite-poly.h (poly_dr): Fix comment.
4868 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4869 Tobias Grosser <grosser@fim.uni-passau.de>
4871 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4872 with a zero dimension polyhedron.
4873 (find_scop_parameters): Move the call to scop_set_nb_params here.
4874 (build_loop_iteration_domains): Store in loop->aux the iteration
4876 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4877 by any loop in scop.
4878 (build_poly_scop): Do not call scop_set_nb_params.
4880 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4881 Tobias Grosser <grosser@fim.uni-passau.de>
4883 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4884 add_condition_to_domain not GT_EXPR.
4886 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4888 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4889 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4890 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4891 upper_bound_assign to calculate unions.
4892 * gcc.dg/graphite/id-6.c: New.
4894 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4896 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4897 handle abnormal edges.
4899 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4901 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4902 (free_poly_bb): Also free poly_drs.
4903 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4904 (poly_dr): Polyhedron to Pointset_Powerset.
4905 (pdr_accessp_nb_subscripts): Same.
4906 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4909 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4911 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4912 names into more meaningful names.
4914 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4916 * gfortran.dg/graphite/interchange-1.c: New.
4917 * gfortran.dg/graphite/interchange-2.c: New.
4919 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4921 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4923 * tree-parloops.c (rewrite_phi_with_iv): New.
4924 (rewrite_all_phi_nodes_with_iv): New.
4925 (canonicalize_loop_ivs): Call them.
4927 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4929 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4930 graphite_find_data_references_in_stmt.
4931 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4932 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4934 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4936 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4938 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4940 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4941 instead of bb_in_region.
4942 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4943 (build_sese_conditions): Use flag_bb_in_sese.
4944 * sese.c (register_bb_in_sese): Removed.
4945 (new_sese): Remove initialization of SESE_REGION_BBS.
4946 (free_sese): Do not free SESE_REGION_BBS.
4947 * sese.h (struct sese): Remove field region_basic_blocks.
4948 (SESE_REGION_BBS): Removed.
4949 (bb_in_sese_p): Implement in function of bb_in_region.
4951 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4953 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4956 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4958 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4960 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4961 (add_condition_to_domain): New.
4962 (add_condition_to_pbb): New.
4963 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4964 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4966 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4968 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4969 ppl_Pointset_Powerset.
4970 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4971 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4972 (pbb_nb_loops): Same.
4973 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4974 add_conditions_to_domain): Same.
4975 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4976 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4977 ppl_const_Polyhedron_t.
4978 (ppl_print_powerset_matrix): New.
4979 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4980 ppl_print_powerset_matrix): New.
4981 (ppl_print_polyhedron_matrix): Updated.
4983 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4985 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4987 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4989 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4990 (print_iteration_domains, debug_iteration_domain,
4991 debug_iteration_domains): New.
4992 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4993 debug_iteration_domains): Declared.
4994 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4997 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4998 Sebastian Pop <sebastian.pop@amd.com>
5000 * graphite-poly.h (print_iteration_domain): New.
5001 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
5002 (build_sese_conditions_1, build_sese_conditions_after,
5003 build_sese_conditions_before): New.
5004 (build_sese_conditions): Rewritten.
5006 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
5007 Tobias Grosser <grosser@fim.uni-passau.de>
5009 Cleanup of code generation liveouts.
5010 * graphite-clast-to-gimple.c (translate_clast): Use a single
5011 rename_map instead of one per translated statement.
5012 Do not use SESE_LIVEOUT_RENAMES.
5013 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
5014 (gloog): Do not use SESE_LIVEOUT_RENAMES.
5015 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
5016 phi node of a reduction: when a loop contains a reduction used outside
5017 the loop, there should be a scalar close phi node on the exit block.
5018 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
5019 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
5020 (free_sese): Do not free them.
5021 (sese_build_liveouts_use): Do not use them.
5022 (sese_build_liveouts_bb): Same.
5023 (sese_build_liveouts): Same.
5024 (sese_insert_phis_for_liveouts): Same.
5025 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
5026 (defined_in_loop_p): New.
5027 (alive_after_loop): New.
5028 (close_phi_not_yet_inserted_p): New.
5029 (struct alep, alep_p): New.
5030 (add_loop_exit_phis): Remove from the rename_map all the names defined
5031 in the code generated loop.
5032 (insert_loop_close_phis): Traverse the rename_map passed to it.
5033 Don't use SESE_LIVEOUT_RENAMES.
5034 (default_liveout_before_guard): Renamed default_before_guard.
5035 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
5036 (graphite_copy_stmts_from_block): Do not directly call set_rename.
5037 (register_sese_liveout_renames): Removed.
5038 (copy_bb_and_scalar_dependences): Do not call it.
5039 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
5041 (SESE_LIVEOUT): Removed.
5042 (SESE_LIVEOUT_RENAMES): Removed.
5043 (SESE_REDUCTION_LIST): Removed.
5044 (sese_build_liveouts): Removed.
5045 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
5046 (insert_loop_close_phis): Pass a htab_t instead of a sese.
5047 (insert_guard_phis): Same.
5048 (rename_map_elt): Declare a VEC of them.
5049 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5050 trees not pointers to trees.
5052 Rewrite in canonical close SSA form:
5053 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
5054 (limit_scops): Close the scop after the block containing the close phi
5056 (canonicalize_loop_closed_ssa): New.
5057 (canonicalize_loop_closed_ssa_form): New.
5058 (build_scops): Call canonicalize_loop_closed_ssa_form.
5060 * graphite-sese-to-poly.c: Fix typos.
5062 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
5064 * graphite-poly.c (print_scattering_function, print_pbb_domain):
5066 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
5067 (print_pbb): Add conditions.
5069 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
5070 Sebastian Pop <sebastian.pop@amd.com>
5072 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
5073 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
5074 (build_scop_bbs_1): New.
5075 (build_scop_bbs): Rewrite.
5076 * sese.h (bb_in_region): New.
5078 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5080 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5082 (print_scop): Style.
5083 * graphite-poly.h (poly_bb): Add drs vector.
5084 (PBB_DRS): Add accessor.
5085 * graphite-sese-to-poly.c (build_poly_dr): New.
5086 (build_pbb_drs, build_scop_drs): New.
5087 (build_poly_scop): call build_scop_drs (Disabled at the moment).
5089 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5091 * tree-ssa-loop.c: Include forgotten toplev.h
5093 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
5095 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
5096 * gcc.dg/graphite/pr37883.c: Remove -floop-*
5097 * gcc.dg/graphite/pr37928.c: Same
5098 * gcc.dg/graphite/pr38409.c: Same
5099 * gcc.dg/graphite/pr38498.c: Same
5100 * gcc.dg/graphite/pr38559.c: Same
5101 * gcc.dg/graphite/pr39335.c: Same
5102 * gcc.dg/graphite/pr39335_1.c: Same
5103 * gfortran.dg/graphite/block-2.f: Same
5104 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
5107 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
5109 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
5110 build_access_matrix, build_scop_data_accesses): Remove access function
5111 building. (We get a new version soon).
5112 (build_bb_loops, scan_tree_for_params_right_scev): Update.
5113 * sese.h (nb_loops_around_loop_in_sese): Remove.
5114 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
5116 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
5117 Sebastian Pop <sebastian.pop@amd.com>
5119 * graphite-scop-detection.c (struct scopdet_info): Rename last
5121 (scopdet_basic_block_info, build_scops_1): Don't use
5122 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
5124 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
5125 Sebastian Pop <sebastian.pop@amd.com>
5127 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
5128 * sese.c (sese_build_liveouts_use): Renamed from
5129 sese_build_livein_liveouts_use. Remove liveins.
5130 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
5131 Call sese_build_liveouts_use.
5132 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
5133 Call sese_build_liveouts_bb.
5134 (new_sese, free_sese): Remove liveins.
5135 (sese_add_exit_phis_var): Deleted.
5136 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
5138 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
5140 * sese.h (sese): Remove num_ver and livein.
5141 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
5143 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
5145 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
5147 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
5149 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
5150 (build_scop_scattering): Do not use compare_prefix_loops any more.
5151 (nb_common_loops): New.
5153 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5155 * sese.c (get_new_name_from_old_name): Renamed get_rename.
5156 (register_old_and_new_names): Renamed set_rename.
5158 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5160 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
5161 of the decl from the previous commit.
5163 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5165 * graphite-scop-detection.c (dot_scop): New.
5166 * graphite-scop-detection.h (dot_scop): Declared.
5168 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5170 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
5172 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5174 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
5175 condition at the end of the loop.
5176 * graphite.c (graphite_initialize, graphite_finalize): Print to
5177 dump_file the compiled function.
5178 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
5179 of create_empty_loop_on_edge.
5180 (translate_clast): Update the code generation of loops for the new
5182 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
5184 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5186 Reverted the patch from 2009-03-19.
5188 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
5190 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5192 (print_scop): Style.
5193 * graphite-poly.h (poly_bb): Add drs vector.
5194 (PBB_DRS): Add accessor.
5195 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
5196 (build_access_matrix_with_af, build_access_matrix,
5197 build_scop_data_accesses): Delete.
5198 (build_poly_dr): New.
5199 (build_pbb_drs, build_scop_drs): New.
5200 (build_poly_scop): call build_scop_drs.
5202 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
5204 * graphite-scop-detection.c (dot_all_scops_1): Close the table
5205 once per basic block.
5207 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5209 * graphite-scop-detection.c (graphite_can_represent_scev): New.
5210 (graphite_can_represent_expr): Renamed from loop_affine_expr
5212 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
5213 (graphite_cannot_represent_loop): Add scop_entry to parameters.
5214 (scopdet_basic_block_info): Actually define entry_block.
5215 (stmt_simple_memref_p): Moved here from ...
5217 * tree-data-ref.c (stmt_simple_memref_p): here.
5218 * tree-data-ref.h (stmt_simple_memref_p): Removed.
5220 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5222 * gcc.dg/graphite/id-4.c: New.
5224 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5226 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5227 (register_old_and_new_names): Update the content of the map.
5228 When there was already a rename_map_elt in the map at that
5230 (copy_bb_and_scalar_dependences): Do rename_variables after
5231 expand_scalar_variables.
5232 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5233 of the map. When there was already a rename_map_elt in the
5234 map at that location, free it.
5235 (translate_clast): Pass the rename_map. Do not initialize and free
5236 a rename_map per stmt_user.
5237 (gloog): Initialize and free one rename_map and pass it to
5240 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5242 * sese.c (expand_scalar_variables_stmt,
5243 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5245 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5246 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5247 the gimple_stmt_iterator of the statement to be expanded.
5248 * graphite-scop-detection.c (is_simple_operand): Do handle
5251 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5253 * graphite-scop-detection.c (is_simple_operand): Do not handle
5255 * gcc.dg/graphite/id-2.c: New.
5257 * graphite-sese-to-poly.c (build_bb_loops,
5258 add_value_to_dim, scan_tree_for_params_right_scev,
5259 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5260 find_params_in_bb, build_loop_iteration_domains,
5261 add_conditions_to_domain): Remove subtract.
5263 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5265 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5266 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5267 pbb_loop_at_index -> gbb_loop_at_index.
5268 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5269 (debug_loop_vec): Delete.
5270 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5271 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
5272 (PBB_LOOPS): Removed.
5273 (PBB_BLACK_BOX): Insert cast.
5274 (pbb_set_black_box): New setter.
5275 (pbb_loop_at_index, pbb_loop_index): Removed.
5276 (scop_set_region, scop_set_nb_params): New.
5277 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5278 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5279 (build_poly_scop): Use scop_set_nb_params.
5280 * sese.h (gimple_bb): Add LOOPS.
5281 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5283 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5285 Revert previous commit.
5287 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5289 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5290 (register_old_and_new_names): Update the content of the map.
5291 When there was already a rename_map_elt in the map at that
5293 (copy_bb_and_scalar_dependences): Do rename_variables after
5294 expand_scalar_variables.
5295 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5296 of the map. When there was already a rename_map_elt in the
5297 map at that location, free it.
5298 (translate_clast): Pass the rename_map. Do not initialize and free
5299 a rename_map per stmt_user.
5300 (gloog): Initialize and free one rename_map and pass it to
5303 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5305 Remove forgotten line in revert.
5307 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5309 Revert previous commit.
5311 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5313 * sese.c (register_old_and_new_names): Update the content
5314 of the map. When there was already a rename_map_elt in the
5315 map at that location, free it.
5316 (copy_bb_and_scalar_dependences): Do rename_variables after
5317 expand_scalar_variables.
5318 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5319 of the map. When there was already a rename_map_elt in the
5320 map at that location, free it.
5321 (translate_clast): Pass the rename_map. Do not initialize and free
5322 a rename_map per stmt_user.
5323 (gloog): Initialize and free one rename_map and pass it to
5326 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5328 * graphite-clast-to-gimple.c (translate_clast): context_loop
5331 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5332 Sebastian Pop <sebastian.pop@amd.com>
5334 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5335 of the use of ppl_Polyhedron_map_space_dimensions.
5337 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5338 Sebastian Pop <sebastian.pop@amd.com>
5340 * graphite-poly.c (unify_scattering_dimensions): Fix types.
5341 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5342 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5343 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5344 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5345 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5346 pbb_nb_params): New.
5347 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5348 nb_loops_around_pbb): Adapt return types.
5350 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
5352 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5353 graphite-clast-to-gimple.o, graphite-data-ref.o,
5354 graphite-scop-detection.o, graphite-poly.o): Add
5357 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
5359 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5360 graphite-clast-to-gimple.o, graphite-data-ref.o,
5361 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5363 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5365 * gcc.dg/graphite/pr37485.c: Remove -floop-block
5366 * gcc.dg/graphite/pr37828.c: Same.
5367 * gcc.dg/graphite/pr37684.c: Same.
5368 * gcc.dg/graphite/block-0.c: Same.
5369 * gcc.dg/graphite/block-1.c: Same.
5370 * gcc.dg/graphite/block-2.c: Same.
5371 * gcc.dg/graphite/block-3.c: Same.
5372 * gcc.dg/graphite/block-4.c: Same.
5373 * gcc.dg/graphite/block-5.c: Same.
5374 * gcc.dg/graphite/block-6.c: Same.
5375 * gfortran.dg/graphite/pr38083.f90: Same.
5376 * gfortran.dg/graphite/block-1.f90: Same.
5377 * gfortran.dg/graphite/block-3.f90: Same.
5378 * gfortran.dg/graphite/pr37852.f90: Same.
5379 * gfortran.dg/graphite/block-4.f90: Same.
5380 * gfortran.dg/graphite/pr37980.f90: Same.
5381 * gfortran.dg/graphite/pr38953.f90: Same.
5382 * gfortran.dg/graphite/pr37857.f90: Same.
5383 * opts.c: Remove -floop-block from -O2.
5384 * graphite-poly.c: Fail if -floop-block -floop-interchange or
5385 -floop-strip-mine are used.
5387 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5388 Sebastian Pop <sebastian.pop@amd.com>
5390 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5392 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5393 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5394 strip_mine_profitable_p, is_interchange_valid,
5395 graphite_trans_bb_block, graphite_trans_loop_block,
5396 graphite_trans_scop_block): Temporary removed.
5397 (extend_scattering, unify_scattering_dimensions): New.
5398 (print_scattering_function, graphite_read_transforms):
5399 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5400 (graphite_generate_scattering_fns): Removed.
5401 (apply_poly_transforms): Cleanup.
5402 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5403 (schedule_to_scattering): Moved.
5404 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5405 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5406 (pbb_nb_scattering): New.
5407 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5408 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5410 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5412 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5413 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
5414 -> PBB_TRANSFORMED_SCATTERING.
5415 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5416 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5417 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5418 (check_poly_representation): Do not return bool.
5419 (graphite_transform_loops): Reformat.
5420 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5422 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
5424 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5425 debug_pbb_domain, debug_pbb, debug_scop): New.
5426 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5427 debug_pbb_domain, debug_pbb, debug_scop): Declared.
5429 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5432 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5433 when the type precision of the induction variable should be
5434 larger than the type precision of nit.
5435 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5436 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5437 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5439 * gcc.dg/graphite/pr39335_1.c: New.
5440 * gcc.dg/graphite/pr39335.c: New.
5442 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5444 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5445 SSA_NAMES not struct reduction_info.
5447 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5449 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5451 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5452 Tobias Grosser <grosser@fim.uni-passau.de>
5454 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5455 (free_sese): Free SESE_REDUCTION_LIST.
5456 * sese.h (struct sese): Add field reduction_list.
5457 (SESE_REDUCTION_LIST): New.
5458 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5459 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5461 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5462 Tobias Grosser <grosser@fim.uni-passau.de>
5464 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5467 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5468 Tobias Grosser <grosser@fim.uni-passau.de>
5470 * tree-parloops.c (struct brli, build_reduction_list_info,
5471 analyze_reduction_list, gather_scalar_reductions): New.
5472 (loop_parallel_p): Build a reduction list containing only
5473 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5474 (gen_parallel_loop): Call the analysis analyze_reduction_list.
5475 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5476 * tree-flow.h (gather_scalar_reductions): Declared.
5478 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
5481 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5482 number_of_iterations_exit from a gcc_assert.
5484 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
5485 Jan Sjodin <jan.sjodin@amd.com>
5487 * output.h (graphite_out_file, graphite_in_file): Declared.
5488 * toplev.c (graphite_out_file, graphite_in_file): New.
5489 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5490 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5491 Don't call schedule_to_scattering.
5492 * common.opt (fgraphite-write, fgraphite-read): New.
5493 * graphite-poly.c: Include output.h.
5494 (print_scattering_function, print_scattering_functions,
5495 debug_scattering_function, debug_scattering_functions,
5496 graphite_write_transforms, graphite_read_transforms,
5497 graphite_generate_scattering_fns): New.
5498 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5499 Call graphite_generate_scattering_fns, graphite_write_transforms,
5500 graphite_read_transforms.
5501 (new_poly_bb): Initialize PBB_SCATTERING.
5502 (free_poly_bb): Free PBB_SCATTERING.
5503 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5504 * graphite-poly.h (struct poly_bb): Add field scattering.
5505 (PBB_SCATTERING): New.
5506 (print_scattering_function, print_scattering_functions,
5507 debug_scattering_function, debug_scattering_functions): Declared.
5508 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5509 GMP values, not integers!
5510 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5511 ppl_read_polyhedron_matrix): New.
5512 * graphite-ppl.h (ppl_print_polyhedron_matrix,
5513 debug_ppl_polyhedron_matrix,
5514 ppl_read_polyhedron_matrix): Declared.
5515 * Makefile.in (graphite-poly.o): Depends on output.h.
5517 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5518 Tobias Grosser <grosser@fim.uni-passau.de>
5521 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5522 scalar evolutions in the scop_entry->loop_father.
5524 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5525 Tobias Grosser <grosser@fim.uni-passau.de>
5527 * graphite.h (ref_nb_loops): Remove declaration.
5528 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5529 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5530 debug_gbb): Moved to sese.h.
5533 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5534 Tobias Grosser <grosser@fim.uni-passau.de>
5536 * graphite-data-ref.[ch]: Disable.
5538 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5539 Tobias Grosser <grosser@fim.uni-passau.de>
5541 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5542 scalar evolutions in the scop_entry->loop_father.
5544 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5546 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5547 (graphite_cannot_represent_loop_niter): Renamed
5548 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5549 (limit_scops): build_sese_loop_nests does not return a bool.
5550 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5551 * sese.c (nb_reductions_in_loop): ... from here.
5552 (graphite_loop_normal_form): ... from here.
5553 (sese_record_loop): Does not fail, so does not return a bool.
5554 (build_sese_loop_nests): Same.
5555 * sese.h (build_sese_loop_nests): Update declaration.
5556 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5557 (build_graphite_loop_normal_form): New.
5558 (gloog): Call build_graphite_loop_normal_form.
5559 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5560 build_sese_loop_nests.
5562 * gcc.dg/graphite/id-1.c: New.
5564 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5565 Tobias Grosser <grosser@fim.uni-passau.de>
5567 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5568 The SCoP detection fix is sufficient.
5570 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5572 PR tree-optimization/39260
5573 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5574 the basic block contains a condition with a real type.
5575 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5577 * gcc.dg/graphite/pr39260.c: New.
5579 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5581 * graphite-poly.c: Inlcude params.h.
5582 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5584 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5585 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5587 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5588 Tobias Grosser <grosser@fim.uni-passau.de>
5590 * graphite-scop-detection.c (dot_all_scops_1,
5591 dot_all_scops): Moved here.
5592 * graphite-scop-detection.h (dot_all_scops): Declared here.
5593 * graphite.c (graphite_initialize, graphite_finalize): New.
5594 (graphite_transform_loops): Cleaned up.
5595 * sese.c (debug_oldivs): Moved here.
5596 * graphite-poly.c (graphite_apply_transformations): Renamed
5597 apply_poly_transforms.
5598 (debug_loop_vec): Moved here.
5599 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5600 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5601 find_scop_parameters, build_scop_iteration_domain,
5602 add_conditions_to_constraints, build_scop_canonical_schedules,
5603 build_scop_data_accesses): Now static.
5604 (build_poly_scop, check_poly_representation): New.
5606 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5608 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5609 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5610 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5611 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5612 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5613 scan_tree_for_params, struct irp_data, dx_record_params,
5614 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5615 build_loop_iteration_domains, add_conditions_to_domain,
5616 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5617 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5618 build_sese_conditions, add_conditions_to_constraints,
5619 build_scop_iteration_domain, build_access_matrix_with_af,
5620 build_access_matrix,
5621 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5623 * graphite-sese-to-poly.c: New.
5624 * graphite-sese-to-poly.h: New.
5626 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5628 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5630 * graphite.c: Split graphite code generation to a new file.
5631 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5632 max_precision_type, clast_to_gcc_expression_red,
5633 clast_to_gcc_expression, gcc_type_for_clast_expr,
5634 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5635 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5636 graphite_create_new_guard, clast_get_body_of_loop,
5637 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5638 graphite_create_new_loop, build_iv_mapping, copy_renames,
5639 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5640 compute_cloog_iv_types, free_scattering, save_var_name,
5641 initialize_cloog_names, build_scop_context, build_cloog_prog,
5642 set_cloog_options, debug_clast_stmt, scop_to_clast,
5643 print_generated_program, debug_generated_program,
5644 gloog): Moved to graphite-clast-to-gimple.c.
5646 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5648 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5649 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5650 loop_iv_stack_pop, loop_iv_stack_get_iv,
5651 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5652 free_loop_iv_stack, loop_iv_stack_remove_constants,
5653 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5654 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5655 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5656 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5657 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5658 get_vdef_before_sese, sese_adjust_vphi,
5659 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5660 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5661 is_iv, expand_scalar_variables_ssa_name,
5662 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5663 expand_scalar_variables, rename_variables, remove_condition,
5664 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5665 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5666 default_liveout_before_guard, add_guard_exit_phis,
5667 insert_guard_phis, register_old_and_new_names,
5668 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5669 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5670 if_region_set_false_region, create_if_region_on_edge,
5671 move_sese_in_condition): Moved to sese.c.
5673 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5674 if_region_exit, if_region_get_condition_block,
5675 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5676 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5677 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5678 ivtype_map_elt, new_ivtype_map_elt,
5679 recompute_all_dominators): Moved to sese.h.
5681 * graphite-clast-to-gimple.c: New.
5682 * graphite-clast-to-gimple.h: New.
5683 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5684 * sese.c: Modified as said above.
5687 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5689 * graphite.c: Split scop detection to a new file.
5690 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5691 move_sd_regions, loop_affine_expr, exclude_component_ref,
5692 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5693 graphite_cannot_represent_loop_niter, struct scopdet_info,
5694 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5695 find_single_entry_edge, find_single_exit_edge,
5696 create_single_entry_edge, sd_region_without_exit,
5697 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5698 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5699 Moved to graphite-scop-detection.c.
5701 * graphite-scop-detection.c: New.
5702 * graphite-scop-detection.h: New.
5703 * Makefile.in: Add new rule for graphite-scop-detection.o.
5705 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5706 tree-scalar-evolution.h.
5707 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5708 build_sese_loop_nests): Moved here from graphite.c.
5709 (param_index): Renamed parameter_index_in_region.
5711 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5712 Sebastian Pop <sebastian.pop@amd.com>
5714 * gcc.dg/graphite/block-0.c: Expected to fail now.
5715 * gcc.dg/graphite/block-1.c: Same.
5716 * gcc.dg/graphite/block-5.c: Same.
5717 * gcc.dg/graphite/block-6.c: Same.
5719 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5720 Sebastian Pop <sebastian.pop@amd.com>
5722 * graphite.h: Separate from graphite_bb_p the polyhedral
5723 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5724 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5725 graphite-data-ref.h.
5726 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5727 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5728 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5729 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5730 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5731 scop_nb_params): Moved to graphite-poly.h.
5732 * graphite-data-ref.c: Same.
5733 * graphite-data-ref.h: New.
5735 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5736 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5737 is_interchange_valid, graphite_trans_bb_block,
5738 graphite_trans_loop_block, scop_max_loop_depth,
5739 graphite_trans_scop_block, graphite_apply_transformations,
5740 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5742 * graphite-poly.h: New.
5743 * graphite-poly.c: New.
5744 * Makefile.in (OBJS-common): Add graphite-poly.o.
5745 (graphite-poly.o): New rule.
5746 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5749 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5750 Tobias Grosser <grosser@fim.uni-passau.de>
5752 * graphite.c: Replace gb -> gbb.
5754 * graphite-data-ref.c: Same.
5756 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5757 Tobias Grosser <grosser@fim.uni-passau.de>
5759 * Makefile.in (OBJS-commmon): Add sese.o.
5761 (graphite.o): Add sese.h.
5762 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5763 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5764 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5766 (block_before_scop): Add missing return.
5767 (new_scop, free_scop): Remove SESE data structures.
5768 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5769 find_scop_parameters, build_loop_iteration_domains,
5770 add_conditions_to_domain, register_scop_liveout_renames,
5771 copy_bb_and_scalar_dependences): Scop -> SESE.
5773 (add_conditions_to_domain): SCoP -> SESE and remove check
5774 (scop_contains_non_iv_scalar_phi_nodes): New.
5775 (build_scop_conditions_1, build_scop_conditions): Remove check for
5776 non iv scalar phi nodes.
5777 (print_scop_statistics): New.
5778 (graphite_transform_loops): Cleanup.
5780 * graphite.h: Move to sese & cleanup.
5784 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5785 Tobias Grosser <grosser@fim.uni-passau.de>
5787 * graphite.c (build_scop_conditions_1): Conditions are only
5788 at the end of a basic block.
5790 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5791 Tobias Grosser <grosser@fim.uni-passau>
5793 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5795 (GBB_ALPHA): Removed.
5797 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5798 Tobias Grosser <grosser@fim.uni-passau.de>
5800 * graphite-data-ref.c (graphite_test_dependence): Don't use
5801 GBB_DYNAMIC_SCHEDULE.
5802 * graphite.c (new_graphite_bb): Same.
5803 (free_graphite_bb): Same.
5804 (build_scop_dynamic_schedules): Removed.
5805 (graphite_transform_loops): Don't call it.
5806 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5807 (GBB_DYNAMIC_SCHEDULE): Removed.
5809 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5810 Tobias Grosser <grosser@fim.uni-passau.de>
5812 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5813 (print_graphite_bb): Same.
5814 (build_cloog_prog): Same.
5816 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5817 Tobias Grosser <grosser@fim.uni-passau.de>
5819 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5821 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5822 Tobias Grosser <grosser@fim.uni-passau.de>
5824 * graphite.c (build_scop_context): Don't use CloogMatrix.
5825 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5826 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5828 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5829 Tobias Grosser <grosser@fim.uni-passau.de>
5831 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5832 liveout_renames, add_params fields...
5833 (struct sese): ... here.
5834 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5835 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5837 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5838 Tobias Grosser <grosser@fim.uni-passau.de>
5840 * graphite.c (print_scop): Do not print the CLooG program.
5841 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5842 build_cloog_prog, gloog): Don't use SCOP_PROG.
5843 (find_transform): Renamed scop_to_clast.
5844 (print_generated_program, debug_generated_program): New.
5845 (graphite_transform_loops): Adapt to new interface.
5846 * graphite.h (struct scop): Remove program field.
5847 (SCOP_PROG): Removed.
5848 (print_generated_program, debug_generated_program): Declared.
5850 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5852 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5853 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5854 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5855 free_graphite_bb, build_scop_canonical_schedules,
5856 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5857 schedules are now represented using a ppl_Linear_Expression_t.
5858 * graphite.h (struct graphite_bb): Same.
5859 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5860 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5862 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5864 * graphite.c: Free local memory.
5865 * graphite-ppl.c: Same.
5867 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5869 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5870 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5871 swap_constraint_variables, scale_constraint_variable): Removed.
5872 (graphite_trans_bb_strip_mine): Remove pong.
5873 * graphite-ppl.c: Include missing header files.
5874 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5875 * graphite-ppl.h (ppl_strip_loop): Declared.
5876 * Makefile.in (graphite-ppl.o): Adjust dependences.
5878 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5880 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5881 (build_scop_iteration_domain): Same.
5883 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5885 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5887 (add_value_to_dim, scan_tree_for_params_right_scev,
5888 scan_tree_for_params_int): New.
5889 * graphite-ppl.c (oppose_constraint): New.
5890 (insert_constraint_into_matrix): Implement missing cases.
5891 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5893 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5895 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5896 use ppl_move_dimension.
5898 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5900 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5903 * graphite-ppl.c: Same.
5904 * graphite-ppl.h: Same.
5906 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5908 Revert last 3 commits.
5910 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5912 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5914 (add_value_to_dim, scan_tree_for_params_right_scev,
5915 scan_tree_for_params_int): New.
5916 * graphite-ppl.c (oppose_constraint): New.
5917 (insert_constraint_into_matrix): Implement missing cases.
5918 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5920 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5922 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5924 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5925 Tobias Grosser <grosser@fim.uni-passau.de>
5927 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5928 use ppl_move_dimension.
5929 * graphite-ppl.c (ppl_move_dimension): New.
5930 * graphite-ppl.h (ppl_move_dimension): Declared.
5932 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5934 * graphite.c: Do not include cloog/cloog.h.
5935 (print_graphite_bb): Remove ping pong, call PPL print function.
5937 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5939 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5940 (graphite.o): Add dependence on graphite-ppl.h.
5941 (graphite-ppl.o): New.
5942 (graphite-data-ref.c): Ping pong between PPL data structures
5944 * graphite-ppl.c: New.
5945 * graphite-ppl.h: New.
5946 * graphite.c: Include graphite-ppl.h.
5947 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5948 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5949 Ping pong between PPL data structures and matrices.
5950 (new_graphite_bb): Create a PPL constraint system.
5951 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5952 (build_loop_iteration_domains): Use PPL functions.
5953 * graphite.h: Include graphite-ppl.h. Fix comments.
5954 (graphite_bb): Use a ppl_Constraint_System_t instead of
5955 CloogMatrix for representing the domain.
5956 (scop): Remove static_schedule.
5957 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5959 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5961 * graphite.c: Fix some comments.
5963 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5966 * graphite.c (if_region_set_false_region): After moving a region
5967 in the false branch of a condition, remove the empty dummy
5969 (gloog): Remove wrong fix for PR38953.
5971 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5973 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5974 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5975 register_bb_in_sese, new_sese, free_sese): Moved.
5976 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5977 outermost_loop_in_scop, build_scop_iteration_domain,
5978 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5979 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5980 Use loop_in_sese_p instead of loop_in_scop_p.
5981 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5982 (free_scop): Do not free SCOP_BBS_B.
5983 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5984 ref_nb_loops): Moved here...
5985 * graphite.h (ref_nb_loops): ... from here.
5986 (struct scop): Remove bbs_b bitmap.
5987 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5988 * gcc.dg/graphite/scop-19.c: New
5990 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5992 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5995 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5997 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5998 eq_loop_to_cloog_loop): Remove.
5999 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
6000 * graphite.h (struct scop): Remove loop2cloog_loop.
6001 (loop_domain_dim, loop_iteration_vector_dim): Remove.
6003 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
6005 * opts.c (decode_options): Only add graphite options to O2
6006 if we compile with graphite enabled.
6008 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
6010 * Merge from mainline (r143163:143684).
6012 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
6014 * graphite.c (debug_value): Removed.
6015 * graphite.h (debug_value): Removed.
6017 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6019 * passes.c (init_optimization_passes): Do not call pass_copy_prop
6020 after graphite: pass_copy_prop does not maintain a proper loop closed
6021 SSA form. pass_copy_prop should be fixed.
6023 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6025 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
6027 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
6029 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
6030 (gloog): Split the exit of the scop when the scop exit is a loop exit.
6031 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
6034 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
6036 * graphite.c (gloog): Return true when code gen succeeded.
6037 (graphite_transform_loops): Do not call cleanup_tree_cfg if
6038 the code of the function did not changed. After cleanup_tree_cfg
6039 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
6042 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
6044 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
6045 gimple_call_lhs is NULL.
6047 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
6048 Tobias Grosser <tobi.grosser@amd.com>
6050 * graphite.c (graphite_trans_scop_block): Do not block single
6053 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
6054 Tobias Grosser <tobi.grosser@amd.com>
6056 * graphite.c (build_scop_canonical_schedules): Start schedules at
6059 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
6060 Tobias Grosser <tobi.grosser@amd.com>
6062 * graphite.c (compare_prefix_loops): New.
6063 (build_scop_canonical_schedules): Rewritten.
6064 (graphite_transform_loops): Move build_scop_canonical_schedules
6065 after build_scop_iteration_domain.
6067 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6068 Tobias Grosser <tobi.grosser@amd.com>
6070 * graphite.c (add_conditions_to_domain): Add the loops to
6071 the dimension of the iteration domain. Do copy the domain
6072 only when it exists.
6073 (build_scop_conditions_1): Do not call add_conditions_to_domain.
6074 (add_conditions_to_constraints): New.
6075 (can_generate_code_stmt, can_generate_code): Removed.
6076 (gloog): Do not call can_generate_code.
6077 (graphite_transform_loops): Call add_conditions_to_constraints
6078 after building the iteration domain.
6080 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6081 Tobias Grosser <tobi.grosser@amd.com>
6082 Jan Sjodin <jan.sjodin@amd.com>
6084 * graphite.c (scan_tree_for_params): On substractions negate
6085 all the coefficients of the term.
6086 (clast_to_gcc_expression_red): New. Handle reduction expressions
6087 of more than two operands.
6088 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
6089 (get_vdef_before_scop): Handle also the case of default definitions.
6091 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
6094 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
6095 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
6096 (gloog): Do not call cleanup_tree_cfg.
6097 (graphite_transform_loops): Call cleanup_tree_cfg after all
6098 scops have been code generated.
6100 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
6102 * passes.c (init_optimization_passes): Schedule after
6103 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
6105 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
6107 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
6109 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
6110 Set the type of an expression to the type of its assign statement.
6111 (expand_scalar_variables_expr): Do not pass loop_p.
6112 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
6113 (copy_bb_and_scalar_dependences): Do not pass loop_p.
6114 (translate_clast): Update call to copy_bb_and_scalar_dependences.
6116 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
6118 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
6119 an expression to the gimple_expr_type of its assign statement.
6120 (expand_scalar_variables_expr): Stop recursion on tcc_constant
6123 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
6125 PR tree-optimization/38786
6126 * gcc.dg/graphite/pr38786.c: New.
6127 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
6128 the SSA_NAME case of expand_scalar_variables_expr.
6129 (expand_scalar_variables_expr): Also gather the scalar computation
6130 used to index the memory access.
6131 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
6132 the gimple_stmt_iterator where it inserts new code.
6134 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
6136 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
6138 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
6140 * opts.c (decode_options): Enable flag_graphite_identity and
6141 flag_loop_block in -O2 and above.
6143 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6145 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
6146 Fix merge problem: replace with the file from trunk.
6148 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6150 * Merge from mainline (r141727:143163).
6152 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
6153 Jan Sjodin <jan.sjodin@amd.com>
6155 PR tree-optimization/38559
6156 * gcc.dg/graphite/pr38559.c: New.
6158 * graphite.c (debug_value, copy_constraint,
6159 swap_constraint_variables, scale_constraint_variable, ): New.
6160 (get_lower_bound, get_upper_bound): Removed.
6161 (graphite_trans_bb_strip_mine): Clean up this code that works
6162 only for constant number of iterations. Fully copy upper and
6163 lower bound constraints, not only the constant part of them.
6164 * graphite.h (debug_value): Declared.
6166 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
6168 PR tree-optimization/38492
6169 PR tree-optimization/38498
6170 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
6171 * tree-chrec.h (scev_is_linear_expression): Declared.
6172 * graphite.c (graphite_cannot_represent_loop_niter): New.
6173 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
6174 (graphite_loop_normal_form): Use gcc_assert.
6175 (scan_tree_for_params): Use CASE_CONVERT.
6176 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
6177 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
6178 Use gcc_assert. Discard scops that contain unhandled cases.
6179 (build_scop_conditions): Return a boolean status for unhandled cases.
6180 (strip_mine_profitable_p): Print the loop number, not its depth.
6181 (is_interchange_valid): Pass the depth of the loop nest, don't
6182 recompute it wrongly.
6183 (graphite_trans_bb_block): Same.
6184 (graphite_trans_bb_block): Print tentative of loop blocking.
6185 (graphite_trans_scop_block): Do not print that the loop has been
6187 (graphite_transform_loops): Do not handle scops that contain condition
6190 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
6192 * gcc.dg/graphite/block-0.c: Update test.
6193 * gcc.dg/graphite/block-1.c: Same.
6194 * gcc.dg/graphite/block-2.c: Remove xfail and test for
6196 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
6197 * gcc.dg/graphite/block-3.c: New.
6198 * gcc.dg/graphite/pr38498.c: New.
6200 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
6202 PR tree-optimization/38510
6203 * gcc.dg/graphite/pr38510.c: New.
6204 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
6205 (translate_clast): Call recompute_all_dominators before
6207 (gloog): Call recompute_all_dominators before graphite_verify.
6209 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
6211 PR tree-optimization/38492
6212 * graphite.c (rename_map_elt, debug_rename_elt,
6213 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
6214 rename_map_elt_info, eq_rename_map_elts,
6215 get_new_name_from_old_name, bb_in_sese_p): Moved around.
6216 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
6217 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
6218 (sese_build_livein_liveouts): New.
6219 (new_sese, free_sese): New.
6220 (new_scop): Call new_sese.
6221 (free_scop): Call free_sese.
6222 (rename_variables_from_edge, rename_phis_end_scop): Removed.
6223 (register_old_new_names): Renamed register_old_and_new_names.
6224 (register_scop_liveout_renames, add_loop_exit_phis,
6225 insert_loop_close_phis, struct igp,
6226 default_liveout_before_guard, add_guard_exit_phis,
6227 insert_guard_phis, copy_renames): New.
6228 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
6229 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
6230 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
6231 (scop_adjust_phis_for_liveouts): New.
6232 (gloog): Call scop_adjust_phis_for_liveouts.
6234 * graphite.h (struct sese): Documented. Added fields liveout,
6236 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
6237 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
6238 (struct scop): Added field liveout_renames.
6239 (SCOP_LIVEOUT_RENAMES): New.
6241 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6243 PR tree-optimization/38409
6244 * gcc.dg/graphite/pr38409.c: New.
6245 * graphite.c (nb_reductions_in_loop): Use simple_iv.
6247 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6249 * graphite.c (gcc_type_for_cloog_iv): By default return
6251 (graphite_create_new_loop): Don't fold_convert the already
6252 fold_convert-ed expression.
6254 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
6256 PR tree-optimization/38446
6257 * gcc.dg/graphite/pr38446.c: New.
6258 * graphite.c (register_bb_in_sese): New.
6259 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6260 looking at the bbs in the region.
6261 * graphite.h (sese): Add region_basic_blocks pointer set to
6262 structure and initialize at the time of defining new scop.
6264 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
6266 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6267 (find_params_in_bb): Do not free data refs.
6268 (free_graphite_bb): Add FIXME on disabled free_data_refs.
6270 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6272 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6273 * gcc.dg/graphite/scop-17.c: Same.
6274 * gcc.dg/graphite/block-5.c: New.
6275 * gcc.dg/graphite/block-6.c: New.
6276 * gcc.dg/graphite/pr37485.c: Clean dump file after.
6277 * gcc.dg/graphite/pr37684.c: Same.
6278 * gcc.dg/graphite/block-2.c: Same.
6280 * graphite.c (struct ivtype_map_elt): New.
6281 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6282 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6283 gcc_type_for_cloog_iv): New.
6284 (loop_iv_stack_patch_for_consts): Use the type of the induction
6285 variable from the original loop, except for the automatically
6286 generated loops, i.e., in the case of a strip-mined loop, in
6287 which case there is no original loop: in that case just use
6289 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6290 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6291 (clast_name_to_gcc): Accept params to be NULL.
6292 (clast_to_gcc_expression): Take an extra parameter for the type.
6293 Convert to that type all the expressions built by this function.
6294 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6295 (graphite_translate_clast_equation): Compute the type of the
6296 clast_equation before translating its LHS and RHS.
6297 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6298 (graphite_create_new_loop): Compute the type of the induction
6299 variable before translating the lower and upper bounds and before
6300 creating the induction variable.
6301 (rename_variables_from_edge, rename_phis_end_scop): New.
6302 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6303 (sese_add_exit_phis_edge): Do not use integer_zero_node.
6304 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6305 compute_cloog_iv_types): New.
6306 (gloog): Call compute_cloog_iv_types before starting the
6307 translation of the clast.
6309 * graphite.h (struct graphite_bb): New field cloog_iv_types.
6310 (GBB_CLOOG_IV_TYPES): New.
6311 (debug_ivtype_map): Declared.
6312 (oldiv_for_loop): New.
6314 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
6317 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6318 (param_index): Assert if parameter is not know after parameter
6320 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6321 (find_scop_parameters): Mark, that we have finished parameter
6323 (graphite_transform_loops): Move condition detection before parameter
6325 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6326 * gfortran.dg/graphite/pr38459.f90: New.
6328 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6330 * graphite.c (graphite_transform_loops): Always call find_transform ()
6331 in ENABLE_CHECKING. So we test these code paths, even if we do not
6334 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6336 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6337 (print_scop): Ditto.
6339 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
6342 Fix gfortran.dg/graphite/id-3.f90.
6343 * graphite.c (scopdet_basic_block_info): Fix bug that found some
6344 regions more than once.
6346 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6348 Fix gfortran.dg/graphite/id-4.f90.
6349 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6352 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6354 Fix gfortran.dg/graphite/id-1.f90.
6355 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6356 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6357 (max_precision_type): New.
6358 (value_clast): Removed.
6359 (clast_to_gcc_expression): Be more careful to types of expressions.
6360 Use max_precision_type and update use of gmp_cst_to_tree.
6361 (graphite_translate_clast_equation): Use max_precision_type.
6362 (graphite_create_guard_cond_expr): Do not use integer_type_node,
6363 use the type of the condition.
6364 (graphite_create_new_loop): Do not use integer_type_node, use the
6365 max_precision_type of lb and ub.
6367 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6369 * graphite.c (build_scops_1): Initialize open_scop.exit
6372 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6374 * gcc.dg/graphite/pr38084.c: New.
6375 * gfortran.dg/graphite/id-1.f90: New.
6376 * gfortran.dg/graphite/id-2.f90: New.
6377 * gfortran.dg/graphite/id-3.f90: New.
6378 * gfortran.dg/graphite/id-4.f90: New.
6379 * gfortran.dg/graphite/pr37857.f90: New.
6381 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6382 Jan Sjodin <jan.sjodin@amd.com>
6383 Harsha Jagasia <harsha.jagasia@amd.com>
6395 * gcc.dg/graphite/pr38073.c: New.
6396 * gcc.dg/graphite/pr37928.c: New.
6397 * gcc.dg/graphite/pr37883.c: New.
6398 * gcc.dg/graphite/pr38125.c: New.
6399 * gfortran.dg/graphite/pr38083.f90: New.
6400 * gfortran.dg/graphite/pr37852.f90: New.
6401 * gfortran.dg/graphite/pr37980.f90: New.
6403 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6404 the number of detected scops. Copy exact same test for loop
6406 * gcc.dg/graphite/block-1.c: Fix the number of expected
6407 loops to be blocked as reductions are not handled.
6408 * gcc.dg/graphite/block-4.c: ...here. New.
6410 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6411 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6413 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6414 * Makefile.in (graphite.o): Depend on value-prof.h.
6415 (graphite.o-warn): Removed -Wno-error.
6416 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6417 to be a NULL pointer. Call update_stmt. Return the newly created
6418 cannonical induction variable.
6420 * graphite.h (debug_rename_map): Declared. Fix some comments.
6422 * graphite.c: Reimplement the code generation from graphite to gimple.
6423 Include value-prof.h.
6424 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6425 (get_old_iv_from_ssa_name): Removed.
6426 (graphite_stmt_p): New.
6427 (new_graphite_bb): Test for useful statements before building a
6428 graphite statement for the basic block.
6429 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6430 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6432 (recompute_all_dominators, graphite_verify,
6433 nb_reductions_in_loop, graphite_loop_normal_form): New.
6434 (scop_record_loop): Call graphite_loop_normal_form.
6435 (build_scop_loop_nests): Iterate over all the blocks of the
6436 function instead of relying on the incomplete information from
6437 SCOP_BBS. Return the success of the operation.
6438 (find_params_in_bb): Use the data from GBB_DATA_REFS.
6439 (add_bb_domains): Removed.
6440 (build_loop_iteration_domains): Don't call add_bb_domains.
6441 Add the iteration domain only to the basic blocks that have been
6442 translated to graphite.
6443 (build_scop_conditions_1): Add constraints only if the basic
6444 block have been translated to graphite.
6445 (build_scop_data_accesses): Completely disabled until data
6446 dependence is correctly implemented.
6447 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6448 (remove_all_edges_1, remove_all_edges): Removed.
6449 (get_new_name_from_old_name): New.
6450 (graphite_rename_variables_in_stmt): Renamed
6451 rename_variables_in_stmt. Call get_new_name_from_old_name.
6452 Use replace_exp and update_stmt.
6453 (is_old_iv): Renamed is_iv.
6454 (expand_scalar_variables_stmt): Extra parameter for renaming map.
6455 Use replace_exp and update_stmt.
6456 (expand_scalar_variables_expr): Same. Use the map to get the
6457 new names for the renaming of induction variables and for the
6458 renaming of variables after a basic block has been copied.
6459 (expand_scalar_variables): Same.
6460 (graphite_rename_variables): Renamed rename_variables.
6461 (move_phi_nodes): Removed.
6462 (get_false_edge_from_guard_bb): New.
6463 (build_iv_mapping): Do not insert the induction variable of a
6464 loop in the renaming iv map if the basic block does not belong
6466 (register_old_new_names, graphite_copy_stmts_from_block,
6467 copy_bb_and_scalar_dependences): New.
6468 (translate_clast): Heavily reimplemented: copy basic blocks,
6469 do not move them. Finally, in call cleanup_tree_cfg in gloog.
6470 At each translation step call graphite_verify ensuring the
6471 consistency of the SSA, loops and dominators information.
6472 (collect_virtual_phis, find_vdef_for_var_in_bb,
6473 find_vdef_for_var_1, find_vdef_for_var,
6474 patch_phis_for_virtual_defs): Removed huge hack.
6475 (mark_old_loops, remove_dead_loops, skip_phi_defs,
6476 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6477 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6478 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6479 if_region_get_condition_block, if_region_set_false_region,
6480 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6481 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6482 sese_add_exit_phis_edge, sese_add_exit_phis_var,
6483 rewrite_into_sese_closed_ssa): New.
6484 (gloog): Remove dead code. Early return if code cannot be
6485 generated. Call cleanup_tree_cfg once the scop has been code
6487 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6488 block loops with less than two loops.
6489 (graphite_apply_transformations): Remove the call to
6490 scop_remove_ignoreable_gbbs.
6491 (limit_scops): When build_scop_loop_nests fails, continue on
6492 the next scop. Fix open_scop.entry.
6493 (graphite_transform_loops): Call recompute_all_dominators: force the
6494 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6495 Call initialize_original_copy_tables and free_original_copy_tables
6496 to be able to copy basic blocks during code generation.
6497 When build_scop_loop_nests fails, continue on next scop.
6498 (value_clast): New union.
6499 (clast_to_gcc_expression): Fix type cast warning.
6501 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
6503 * Merge from mainline (r140838:141727).
6505 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6509 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6511 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6515 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6516 exits and conditions.
6517 * gcc.dg/graphite/pr37943.c: New.
6519 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6522 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6524 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6526 * doc/invoke.texi: Fix spaces.
6528 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
6530 PR tree-optimization/37891
6531 Reverted last commit.
6532 * graphite.c (create_single_entry_edge): Set
6533 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6535 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
6536 Mitul Thakkar <mitul.thakkar@amd.com>
6538 * graphite.c (create_single_entry_edge): Set
6539 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6541 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6543 * doc/invoke.texi: Add -fgraphite-identity.
6544 * graphite.c (graphite_apply_transformations): Check for
6545 -fgraphite-identity.
6546 * toplev.c (process_options): Add flag_graphite_identity.
6547 * tree-ssa-loop.c: Add flag_graphite_identity.
6549 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6551 Undo changes from 2008-10-02:
6552 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6553 operand type when copying the operand to a variable of different type.
6554 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6555 with the IV name after increment.
6557 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6558 Harsha Jagasia <harsha.jagasia@amd.com>
6560 PR tree-optimization/37828
6561 * gcc.dg/graphite/pr37828.c: New.
6562 * graphite.c (graphite_trans_loop_block): Do not loop block
6563 single nested loops.
6565 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6566 Sebastian Pop <sebastian.pop@amd.com>
6568 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6569 rename_map_elt_info, eq_rename_map_elts): New.
6570 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6571 (expand_scalar_variables_expr): Change parameters.
6572 (expand_scalar_variables_stmt): Same.
6573 (expand_scalar_variables): Same.
6574 (graphite_rename_ivs): Rename graphite_rename_variables.
6575 (build_iv_mapping): New.
6576 (translate_clast): Call build_iv_mapping.
6577 * graphite.h (gbb_p): New name.
6579 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6581 PR tree-optimization/37684
6582 * gcc.dg/graphite/pr37684.c: New.
6583 * graphite.c (exclude_component_ref): New.
6584 (is_simple_operand): Call exclude_component_ref.
6586 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6587 Harsha Jagasia <harsha.jagasia@amd.com>
6589 PR tree-optimization/37485
6590 * gcc.dg/graphite/block-2.c: New
6591 * graphite.c (gmp_cst_to_tree): Moved.
6592 (iv_stack_entry_is_constant): New.
6593 (iv_stack_entry_is_iv): New.
6594 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6595 (loop_iv_stack_insert_constant): New.
6596 (loop_iv_stack_pop): Use new datatpype.
6597 (loop_iv_stack_get_iv): Same.
6598 (loop_iv_stack_get_iv_from_name): Same.
6599 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6600 (loop_iv_stack_patch_for_consts): New.
6601 (loop_iv_stack_remove_constants): New.
6602 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6603 (translate_clast): Call loop_iv_stack_patch_for_consts and
6604 loop_iv_stack_remove_constants.
6605 (gloog): Use new datatype. Redirect construction edge to end
6606 block to avoid accidental deletion.
6607 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6609 (union iv_stack_entry_data): New. Data in iv stack entry.
6610 (struct iv_stack_entry): New. Datatype for iv stack entries.
6612 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6614 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6615 operand type when copying the operand to a variable of different type.
6617 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6619 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6620 with the IV name after increment.
6622 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6624 * Merge from mainline (r140164:140838).
6626 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6628 * graphite-data-ref.c: New.
6629 * graphite.c (print_scop): Also dump the dependence graph.
6630 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6631 (new_scop): Initialize SCOP_DEP_GRAPH.
6632 (build_scop_dynamic_schedules): New.
6633 (build_access_matrix_with_af): Fixed column numbering.
6634 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6635 * graphite.h: Add ifndef/define guards against multiple inclusion.
6636 (struct scop): Add dep_graph field.
6637 (SCOP_DEP_GRAPH): Defined.
6638 (ref_nb_loops): Fixed and moved to other position.
6639 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6640 (nb_loops_around_loop_in_scop): New.
6641 (graphite_dump_dependence_graph): Declared.
6642 (graphite_build_rdg_all_levels): Declared.
6643 (graphite_test_dependence): Declared.
6644 * Makefile.in (graphite-data-ref.o): New target.
6646 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6648 * Merge from mainline (139870:140164).
6650 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6652 * Merge from mainline (138275:139870).
6653 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6654 the commits from trunk broke the niter detection.
6656 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6658 * graphite.c: Add more documentation. Fix formatting.
6659 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6660 loop_iv_stack_debug): Moved...
6661 (schedule_to_scattering): Move before use.
6662 (dot_all_scops): Include in "#if 0" the code for system
6665 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6666 loop_iv_stack_debug): ...here.
6668 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6670 * tree-phinodes.c (make_phi_node): Extern.
6671 (add_phi_node_to_bb): New.
6672 (create_phi_node): Call add_phi_node_to_bb.
6673 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6674 (remove_statement): Handle case where stored phi was updated
6675 and is no longer the same.
6676 * graphite.c (is_parameter): New.
6678 (expand_scalar_variables_expr): New.
6679 (expand_scalar_variables_stmt): New.
6680 (expand_scalar_variables): New.
6681 (move_phi_nodes): Create new phi instead of moving old one.
6682 (translate_clast): Call expand_scalar_variables.
6683 (find_vdef_for_var_in_bb): Also scan regular definitions.
6684 (skip_phi_defs): New.
6685 (collect_scop_exit_phi_args): New.
6686 (patch_scop_exit_phi_args): New.
6687 (gloog): Patch phis after scop.
6688 * tree-flow.h: (add_phi_node_to_bb): Declared.
6689 (make_phi_node): Declared.
6691 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6693 * graphite.c (end_scop): Split the entry of the scop when it
6694 is the header of the loop in which the scop is ending.
6695 (build_scops_1, limit_scops): Update uses of end_scop.
6697 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6699 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6700 SCOP_ENTRY or SCOP_EXIT.
6702 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6704 * graphite.c (get_construction_edge): Removed.
6705 (gloog): Construction edge is the scop entry edge.
6707 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6709 * graphite.c (can_generate_for_scop): Removed.
6710 (gloog): Do not call it.
6712 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6714 * graphite.c (new_scop): Entry of a scop is an edge.
6715 Initialize SESE region.
6716 (free_scop): Free SESE region.
6717 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6718 (split_difficult_bb): New, split from end_scop.
6719 (end_scop): Exit of a scop is an edge.
6720 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6721 not automatically updated and thus is always wrong.
6722 * graphite.h (struct sese): New.
6725 (struct scop): New field for a SESE region. Remove entry, exit.
6726 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6727 semantics as before. Moved comment around.
6729 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6730 Sebastian Pop <sebastian.pop@amd.com>
6732 * graphite.c (graphite_transform_loops): Always enable gloog
6733 and find_transform when ENABLE_CHECKING.
6735 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6737 * graphite.c (graphite_transform_loops): Move pretty printer
6738 of SCOPs before doing any transform. Remove call to print_scops
6739 and dot_all_scops_1.
6741 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6743 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6744 (print_graphite_bb): Same.
6746 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6748 * graphite.c (dot_all_scops_1): Cleanup.
6749 (move_scops): Fix comment.
6751 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6753 * graphite.c (build_scop_bbs): Revert commit 139355:
6755 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6756 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6758 * graphite.c (build_scop_bbs): Factor up code.
6760 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6762 * graphite.c (gloog): Update dominator info.
6764 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6766 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6768 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6770 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6772 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6773 (translate_clast): Correct formatting.
6774 * graphite.h (struct num_map): Removed.
6775 (struct graphite_bb): Remove num_map field.
6776 (GBB_INDEX_TO_NUM_MAP): Removed.
6778 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6780 * graphite.c (build_access_matrix_with_af): Fix comments.
6781 (build_scop_data_accesses): Same.
6783 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6785 * graphite.c (build_scop_data_accesses): Don't construct
6786 access matrices. Add a FIXME and an assert condition that
6787 should pass when the access matrices will be needed.
6789 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6791 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6793 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6794 Moved close by free_graphite_bb.
6795 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6796 (new_scop): Move close by free_scop.
6797 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6799 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6801 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6802 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6803 instead of recursive call.
6804 (graphite_translate_clast_equation): New.
6805 (graphite_create_guard_cond_expr): New.
6806 (graphite_create_new_guard): New.
6807 (get_stack_index_from_iv): Removed.
6808 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6809 (get_true_edge_from_guard_bb): New.
6810 (translate_clast): Handle stmt_guard in clast.
6811 (get_construction_edge): Allow construction edge detection for
6812 a scope entry with multiple predecessors if one predecessor is
6813 the immediate dominator of scope entry.
6814 (can_generate_code_stmt): Enable code generation for clast_guard.
6815 (gloog): Use correct context loop. Removed check for post dominators.
6816 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6818 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6820 * graphite.c (remove_dead_loops): Document better which
6823 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6825 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6827 (graphite.o): Also depends on pointer-set.h.
6829 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6831 * graphite.c (scop_record_loop): Fix compile warning.
6833 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6834 Sebastian Pop <sebastian.pop@amd.com>
6836 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6838 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6840 * graphite.c (build_graphite_bb): Initialize bb->aux to
6841 point to the graphite_bb_p.
6842 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6844 (add_bb_domains): Does not use the scop parameter.
6845 (graphite_transform_loops): Clean bb->aux at the end.
6847 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6848 Sebastian Pop <sebastian.pop@amd.com>
6850 * lib/target-supports.exp
6851 (check_effective_target_fgraphite): New.
6853 * gcc.dg/graphite/graphite.exp: Early exit when
6854 check_effective_target_fgraphite returns false.
6855 Set dg-do-what-default to compile.
6856 (scan-graphite-dump-times): Removed.
6857 * gfortran.dg/graphite/graphite.exp: Same.
6859 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6860 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6861 * gcc.dg/graphite/scop-1.c: Same.
6862 * gcc.dg/graphite/scop-2.c: Same.
6863 * gcc.dg/graphite/scop-3.c: Same.
6864 * gcc.dg/graphite/scop-4.c: Same.
6865 * gcc.dg/graphite/scop-5.c: Same.
6866 * gcc.dg/graphite/scop-6.c: Same.
6867 * gcc.dg/graphite/scop-7.c: Same.
6868 * gcc.dg/graphite/scop-8.c: Same.
6869 * gcc.dg/graphite/scop-9.c: Same.
6870 * gcc.dg/graphite/scop-10.c: Same.
6871 * gcc.dg/graphite/scop-11.c: Same.
6872 * gcc.dg/graphite/scop-12.c: Same.
6873 * gcc.dg/graphite/scop-13.c: Same.
6874 * gcc.dg/graphite/scop-matmult.c: Same.
6875 * gcc.dg/graphite/scop-14.c: Same.
6876 * gcc.dg/graphite/scop-15.c: Same.
6877 * gcc.dg/graphite/block-0.c: Same.
6878 * gcc.dg/graphite/scop-16.c: Same.
6879 * gcc.dg/graphite/block-1.c: Same.
6880 * gcc.dg/graphite/scop-17.c: Same.
6881 * gcc.dg/graphite/scop-18.c: Same.
6882 * gfortran.dg/graphite/block-1.f90: Same.
6883 * gfortran.dg/graphite/scop-1.f: Same.
6884 * gfortran.dg/graphite/block-2.f: Same.
6886 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6888 * graphite.c: Fix some XXX comments.
6889 (build_scop_dynamic_schedules): Removed.
6891 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6893 * graphite.h (scop_max_loop_depth): Moved...
6894 * graphite.c (scop_max_loop_depth): ...here.
6895 (remove_all_edges_1): New.
6896 (remove_all_edges): Factored code.
6897 (remove_cond_exprs): Check only the last statement for
6898 a GIMPLE_COND expression.
6900 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6902 * graphite.c (scan_tree_for_params): Early return when the
6903 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6904 (find_scop_parameters): Factor out code.
6905 (graphite_trans_bb_strip_mine): Remove dead code.
6907 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6909 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6910 graphite_trans_bb_move_loop): Factor asserts.
6911 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6912 Do not call calculate_dominance_info and estimate_bb_frequencies.
6914 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6916 * graphite.c (create_loops_mapping, free_loops_mapping,
6917 create_loops_mapping_num, debug_loop_mapping_1,
6918 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6919 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6920 graphite_loops_mapping_add_child_num,
6921 graphite_loops_mapping_insert_child,
6922 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6923 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6924 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6925 create_num_from_index, get_num_from_index,
6926 swap_loop_mapped_depth): Removed.
6927 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6928 (free_scop): Do not call free_loops_mapping.
6929 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6930 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6931 get_loop_mapped_depth.
6932 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6933 (graphite_trans_bb_strip_mine): Same.
6934 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6935 (struct scop): Remove field loops_mapping.
6937 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6938 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6940 * graphite.c (scop_record_loop): Factor out one level of the
6941 condition by early return.
6942 (build_scop_loop_nests): Format following FSF coding style.
6943 (build_scop_dynamic_schedules): Factor out code.
6944 (scopdet_bb_info): Reindent. Default case should not be reachable.
6946 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6947 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6949 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6950 assignments that are not handled as simple operands for now.
6952 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6953 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6955 * graphite.c (build_scop_bbs): Factor up code.
6957 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6958 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6960 * graphite.c (stmt_simple_for_scop_p): Factor code out
6962 (enum gbb_type): New. Group all the GBB_* types under it.
6963 (is_loop_exit): Moved...
6964 (end_scop): Enable BB spliting.
6965 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6966 * cfgloop.h (is_loop_exit): Declared.
6968 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6970 * doc/invoke.texi: Remove strides from examples containing
6971 DO loops when the strides are equal to 1.
6973 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6974 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6976 * graphite.c (graphite_trans_scop_block): Or the result with
6977 the result from graphite_trans_loop_block.
6978 * gcc.dg/graphite/block-1.c: New.
6979 * gfortran.dg/graphite/block-1.f90: New.
6980 * gfortran.dg/graphite/block-2.f: New.
6982 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6984 * graphite.c (graphite_transform_loops): Call cloog_initialize
6987 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6989 * tree-data-ref.c) (stmt_simple_memref_p): New.
6990 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6991 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6992 (is_simple_operand): Call stmt_simple_memref_p.
6994 * gcc.dg/graphite/scop-matmult.c: Updated for not
6995 using pointer arithmetic, as this is optimized by PRE and
6996 makes the code too difficult to analyze.
6998 * gcc.dg/graphite/scop-18.c: Same.
7000 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
7002 * gdbinit.in (pgg): New.
7004 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7006 * graphite.c (graphite_trans_loop_block): Fix warning.
7008 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7010 * graphite.c (graphite_trans_loop_block): Fix my merge error.
7012 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
7014 * graphite.c (graphite_trans_bb_block): Remove check for
7015 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
7016 Check if loop blocking is profitable for every loop, before applying
7018 (graphite_apply_transformations): Call graphite_trans_bb_block only,
7019 if flag_loop_block is set.
7021 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7023 * graphite.c: Add some more documentation for the loop
7026 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7028 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
7029 * graphite.c: Format on less than 80 columns.
7032 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7034 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
7036 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
7038 * doc/invoke.texi (floop-block, floop-strip-mine,
7039 floop-interchange): Update documentation with examples.
7041 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
7043 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
7045 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
7047 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
7049 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
7050 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
7051 * tree-scalar-evolution.c: Revert useless changes.
7052 * tree-phinodes.c: Same.
7055 * tree-vectorizer.h: Same.
7056 * tree-flow.h: Same.
7058 * common.opt (fgraphite): Update documentation.
7060 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
7062 * doc/invoke.texi (-floop-block, -floop-strip-mine,
7063 -floop-interchange): Add more text for explaining what each of these
7065 * tree-into-ssa.c (gimple_vec): Moved to...
7066 * graphite.c: Include gimple.h.
7067 (gimple_vec): Moved to...
7068 (del_loop_to_cloog_loop): Removed.
7069 (loop_affine_expr): Do not call create_data_ref when the
7070 operand is a constant.
7071 (new_scop): Use free instead of del_loop_to_cloog_loop.
7072 * Makefile.in (graphite.o): Depend on GIMPLE_H.
7073 * gimple.h (gimple_vec): ... here.
7075 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7077 * graphite.c (scopdet_bb_info): Only allow loops with known number of
7079 (build_loop_iteration_domains): Fail, if latch executions unknown.
7081 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7083 * graphite.c (add_conditions_to_domain): New.
7084 (build_scop_conditions_1): Call add_conditions_to_domain.
7085 (set_cloog_options): Allow to disable optimizations.
7087 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7089 * graphite.c (find_params_in_bb): Look for parameters in conditions.
7090 Do not use walk_dominator_tree.
7091 (find_scop_parameters): Do not use walk_dominator_tree.
7093 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7095 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
7096 (idx_record_params): Adapt.
7097 * graphite.h (scop_gimple_loop_depth): New.
7099 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7101 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
7102 (scan_tree_for_params): Remove value_init.
7103 (build_scop_context): Remove value_init.
7104 (build_loop_iteration_domains): Remove value_init.
7105 (schedule_to_scattering): Remove value_init.
7106 (graphite_trans_bb_strip_mine): Remove value_init.
7108 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7110 * gcc/graphite.c (limit_scops): New.
7111 (graphite_transform_loops): Add limit SCoPs.
7112 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
7113 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
7114 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
7115 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
7116 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
7117 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
7118 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
7119 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
7120 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
7121 Change loop numbers.
7122 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
7123 Change loop numbers.
7124 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
7125 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
7126 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
7127 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
7128 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
7129 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
7130 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
7131 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
7132 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
7133 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
7135 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
7137 * graphite.c (graphite_transform_loops): Call always find_transform.
7139 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
7141 * graphite.c (free_loops_mapping): New.
7142 (stmt_simple_for_scop_p): Fix typo.
7143 (stmt_simple_for_scop_p): Fix tuples functions, that
7145 (free_graphite_bb): Fix some memleaks.
7146 (free_scop): Fix some memleaks.
7147 (scopdet_bb_info): Do not forget some tmp SCoPs.
7148 (find_params_in_bb): Fix some memleaks.
7149 (clast_to_gcc_expression): Fix warning.
7151 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
7153 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
7154 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
7156 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7158 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
7159 Move code ifdef-ed HAVE_cloog...
7160 * graphite.c: Include toplev.h.
7162 * Makefile.in (OBJS-common): Always build graphite.o.
7163 (BACKEND): Remove @GRAPHITE@.
7164 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
7165 (graphite.o): Depend on TOPLEV_H.
7167 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7169 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
7170 Remove typo left from polylib to ppl conversion.
7171 * graphite.c (graphite_transforms): Use sorry instead of fatal.
7173 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7175 * toplev.c (process_options): Move the graphite loop optimization
7177 * tree-ssa-loop.c (graphite_transforms): ... here.
7178 When not configured with CLooG, print to dump_file that
7179 Graphite transforms were not performed.
7180 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
7182 * gcc.dg/graphite/*.c: Updated all testcases to use
7183 scan-graphite-dump-times.
7185 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7187 * graphite.c (dot_scop, dot_all_scops): Do not call system.
7188 Do not open /tmp/scop.dot and /tmp/allscops.dot.
7190 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
7191 Jan Sjodin <jan.sjodin@amd.com>
7193 * configure: Regenerated.
7194 * omp-low.c (expand_omp_sections): Remove now unused code.
7195 * config.in (HAVE_polylib): Removed.
7196 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
7197 (PPLLIBS, PPLINC): Added.
7198 * graphite.c: Replace unsigned with int wherever possible.
7199 Don't access Cloog's data structures, but use accessor functions.
7200 Clast's stmt->type is now implemented as a vtable: change the
7201 switches of stmt->type into ifs.
7202 (polylib/polylibgmp.h): Don't include.
7203 (initialize_dependence_polyhedron,
7204 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7205 statement_precedes_p, test_dependence, build_rdg_all_levels,
7206 dump_dependence_graph): Removed until this code is cleaned up
7208 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
7209 (POLYLIBINC): Renamed PPLINC.
7211 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
7212 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7213 Jan Sjodin <jan.sjodin@amd.com>
7215 Finish the merge and tuplification of graphite.
7217 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7218 Jan Sjodin <jan.sjodin@amd.com>
7220 Partial merge from mainline (138072:138275).
7221 * graphite.c still has to be tuplified.
7223 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
7225 * graphite.c (graphite_loops_mapping_max_loop_num): New.
7226 (create_num_from_index): New.
7227 (get_num_from_index): Also pass in the graphite BB.
7228 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
7229 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
7230 (graphite_trans_bb_strip_mine): Call create_num_from_index.
7231 (is_interchange_valid): Return false when failing.
7232 * graphite.h (struct num_map): New.
7233 (struct graphite_bb): New field num_map.
7234 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
7236 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
7238 * graphite.c (dump_gbb_conditions): Print also conditions like
7239 "if (a)". Remove dublicated code and use print_generic_expr ().
7240 (stmt_simple_for_scop_p): Only allow conditions we can handle
7243 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7245 * graphite.h (struct scop): Removed new_ivs field.
7246 (SCOP_NEWIVS): Deleted.
7247 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7248 clast_to_gcc_expression, graphite_create_new_loop):
7249 Removed use of new_ivs.
7251 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7253 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7254 create_loops_mapping_num, debug_loop_mapping_1): New.
7255 (debug_loop_mapping): Call debug_loop_mapping_1.
7256 (get_loop_mapping_for_num,
7257 graphite_loops_mapping_add_child,
7258 graphite_loops_mapping_add_child_num,
7259 graphite_loops_mapping_insert_child,
7260 graphite_loops_mapping_parent,
7261 split_loop_mapped_depth_for_num,
7262 loop_mapped_depth_split_loop): New.
7263 (increment_loop_mapped_depths): Removed.
7264 (swap_loop_mapped_depth_for_num): Reimplemented.
7265 (new_scop): Call create_loops_mapping.
7266 (scop_record_loop): Call graphite_loops_mapping_insert_child.
7267 (translate_clast): Pass the old loop father in parameter, and pass
7268 it to get_old_iv_from_ssa_name.
7269 (remove_edges_around_useless_blocks, can_generate_code_stmt,
7270 can_generate_code, can_generate_for_scop): New.
7271 (graphite_trans_bb_block): Returns false when it fails to transform.
7272 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7274 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7276 Reverted all the changes related to the streamization and
7278 These changes are now tracked in the streamization branch.
7280 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7281 Jan Sjodin <jan.sjodin@amd.com>
7283 * graphite.c (gbb_compare): Correctly constify.
7284 (gbb_can_be_ignored): Indent.
7285 (graphite_trans_scop_swap_1and2): Add legality check.
7288 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7290 Remove fallouts from "Reverted the Condate changes".
7291 * tree.h: Remove unused decl.
7292 * gcc.dg/tree-checker: Same.
7293 * timevar.def: Remove counter.
7295 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7297 * Merge from mainline (135673:138072).
7299 Reverted the MIRO changes (from 2008-04-05) that are now
7300 tracked in the miro branch.
7301 * tree-bounds.c: Removed.
7302 * tree-bounds.h: Removed.
7304 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7305 are now tracked in the condate branch.
7306 * tree-check.c: Removed.
7307 * tree-match.c: Removed.
7308 * condate.y: Removed.
7310 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7312 * common.opt: New user flag -floop-block, -floop-strip-mine
7313 and -floop-interchange.
7314 * toplev.c (process_options): Enable -fgraphite pass if any one of the
7315 graphite loop optimization flags is turned on.
7316 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7317 flag_loop_strip_mine and flag_loop_interchange checks before
7319 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7320 -floop-strip-mine and -floop-interchange.
7321 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7323 * gcc.dg/graphite/scop-16.c: Ditto.
7324 * gcc.dg/graphite/scop-17.c: Ditto.
7325 * gcc.dg/graphite/scop-18.c: Ditto.
7327 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
7328 Sebastian Pop <sebastian.pop@amd.com>
7330 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7331 (create_empty_loop_on_edge): More fixes.
7332 * tree-phinodes.c (resize_phi_node): Extern.
7333 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7334 * cfghooks.c (update_dominator_information): New split from
7336 * tree-vectorizer.c (rename_variables_in_bb): Extern.
7337 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7338 successor of the function entry block.
7340 * graphite.c: Include pointer-set.h.
7341 (debug_loop_mapping, increment_loop_mapped_depths,
7342 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7343 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7344 swap_loop_mapped_depth_for_num, get_num_from_index,
7345 swap_loop_mapped_depth, loop_iv_stack_debug,
7346 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7347 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7348 get_old_iv_from_ssa_name): New.
7349 (new_scop): Initialize SCOP_LOOPS_MAPPING.
7350 (free_scop): Free SCOP_LOOPS_MAPPING.
7351 (scop_record_loop): Record old ivs.
7352 (create_var_name): Removed.
7353 (initialize_cloog_names): Allocate double space in case strip mine
7354 applies to all loops once.
7355 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7356 (clast_to_gcc_expression): Same. Implement more clast to gimple
7358 (graphite_create_new_loop): Pass in ivstack.
7359 (remove_all_edges): Pass in the construction_edge.
7360 (graphite_remove_iv): Removed.
7361 (graphite_rename_ivs, graphite_rename_ivs_stmt,
7362 remove_cond_exprs): Rewritten.
7363 (move_phi_nodes): New.
7364 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7365 (translate_clast): Pass in ivstack. Rewrite some cases.
7366 (set_cloog_options, debug_clast_stmt): New.
7367 (find_transform): Use set_cloog_options.
7368 (outermost_loop_layer): Removed.
7369 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7370 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7371 mark_old_loops, remove_dead_loops): New.
7373 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7374 (const_column_index, get_first_matching_sign_row_index,
7375 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7376 get_upper_bound): New.
7377 (graphite_trans_bb_strip_mine): Also update the iv map.
7379 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7380 (struct name_tree): Add a loop field.
7381 (struct scop): Add a graphite_loops_mapping field.
7382 (SCOP_LOOPS_MAPPING): New.
7383 (debug_clast_stmt): Declare.
7384 * lambda.h (find_induction_var_from_exit_cond): Declare.
7385 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7386 * cfgloop.h (update_dominators_in_loop): Removed declaration.
7387 (create_empty_loop_on_edge): Updated.
7388 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7389 rename_variables_in_bb): Declare.
7390 * tree-cfg.c (remove_bb): Extern.
7392 * gcc.dg/graphite/block-0.c: New.
7394 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7395 Sebastian Pop <sebastian.pop@amd.com>
7397 * graphite.c (strip_mine_profitable_p): New.
7398 (graphite_trans_bb_block): Disable strip mining if not profitable.
7400 * gcc.dg/graphite/scop-18.c: New.
7401 * gcc.dg/graphite/scop-17.c: Fixed.
7402 * gcc.dg/graphite/scop-16.c: Fixed.
7404 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
7405 Jan Sjodin <jan.sjodin@amd.com>
7406 Sebastian Pop <sebastian.pop@amd.com>
7408 * graphite.c (is_interchange_valid): New.
7409 (graphite_trans_bb_block): Check loop nest of basic block for legality
7412 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7413 outer_most_loop, gbb_outer_most_loop_index): New.
7415 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7416 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7417 * gcc.dg/graphite/scop-16.c: New.
7418 * gcc.dg/graphite/scop-17.c: New.
7420 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7422 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7423 (graphite_trans_scop_block): Ignore SCoPs without bbs.
7425 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7427 * graphite.c (new_scop): Initialize SCOP_EXIT.
7428 (scopdet_info): Add.
7429 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7430 (build_scops_1): Cleanup, bugfixes.
7431 (build_scops): Cleanup.
7433 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7434 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7436 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7438 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7440 * gfortran.dg/graphite/graphite.exp: Use
7441 DEFAULT_GRAPHITE_FLAGS.
7443 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7445 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7447 * graphite.c (scan_tree_for_params): Do not assert any more if
7448 MULT_EXPR parameter is negative.
7450 * gfortran.dg/graphite/scop-1.f: New.
7452 * gfortran.dg/graphite/graphite.exp: New.
7454 * gcc.dg/graphite/scop-15.c: New.
7456 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7458 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7460 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7462 * graphite.c (graphite_trans_bb_swap_loops): Rename from
7463 graphite_swap_loops.
7464 (graphite_trans_bb_move_loop): New.
7465 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7466 (graphite_trans_bb_block): New.
7467 (graphite_trans_loop_block): New.
7468 (graphite_trans_scop_swap_1and2): Rename from
7469 graphite_trans_swap_1and2.
7470 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7471 (graphite_trans_scop_block): New.
7472 (graphite_apply_transformations): Rename from
7473 graphite_transformations.
7475 * gcc.dg/graphite/scop-matmult.c: New.
7477 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7479 * graphite.c (gbb_compare): New.
7480 (graphite_sort_gbbs): New.
7481 (gbb_can_be_ignored): New.
7482 (scop_remove_ignoreable_gbbs): New.
7483 (graphite_transformations): Cleanup and add
7484 scop_remove_ignoreable_gbbs.
7485 * lambda.h (lambda_vector_compare): New.
7487 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
7489 * graphite.c (print_graphite_bb): Correct printing of static schedule.
7490 (graphite_swap_loops): int -> unsigned
7491 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7492 (graphite_transformations): New.
7493 (graphite_transform_loops): Move to graphite_transformations.
7494 * graphite.h (gbb_nb_loops): Return unsigned.
7496 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
7498 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7499 the domain matrix. This makes scop-0.c work again.
7501 2008-06-20 Richard Guenther <rguenther@suse.de>
7503 * graphite.h: Adjust copyright to GPLv3.
7504 * graphite.c: Likewise.
7505 (stmt_simple_memref_for_scop_p): Split out from ...
7506 (stmt_simple_for_scop_p): ... here. Fix handling of calls
7508 (get_bb_type): Optimize.
7510 (is_bb_addable): Fix memleak, replace is_pred call with
7512 (build_scops): Use current_loops.
7513 (param_index): Fix memleak.
7515 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7517 * graphite.c: Fix formatting.
7519 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7521 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7522 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7523 (create_var_name, save_var_name): Newly defined functions.
7524 (initialize_cloog_names): Part of the code factored out to
7526 (clast_to_gcc_expression): Now handles the case of clast_red_sum
7527 in clast_reduction statement.
7528 (graphite_create_new_loop): Now takes a new parameter
7530 (translate_clast): Now also takes the context_loop and bb_exit
7531 parameters. Rewritten the code so that it creates a gimple code
7532 inside the given context.
7533 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7534 remove_cond_expr, disconnect_cond_expr,
7535 disconnect_virtual_phi_nodes): Newly defined functions.
7536 * graphite.h (struct scop): added old_ivs vector.
7537 SCOP_OLDIVS: New macro.
7539 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7541 * cfgloopmanip.c: Add missing function comments, fix formatting.
7543 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7545 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7546 (create_empty_loop_on_edge): Defined.
7547 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7549 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7550 (update_dominators_in_loop): Declared as extern
7551 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7553 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7555 * graphite.c (print_graphite_bb): Allow changing number of loops
7557 (initialize_cloog_names): Allow changing number of loops.
7558 (build_cloog_prog): Simplify.
7559 (find_transform): Enable cloog option --strides.
7560 (graphite_swap_loops): New.
7561 (graphite_strip_mine_loop): New.
7562 (graphite_trans_swap_1and2): New.
7563 (graphite_trans_strip): New.
7564 (graphite_transform_loops): Add graphite_trans_strip.
7565 * graphite.h (scop_max_loop_depth): New.
7567 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7569 * graphite.c (build_scop_iteration_domain): Remove forgotten
7570 line. (Fixes compile)
7572 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7574 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7575 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7576 (build_bb_loops): New.
7577 (graphite_transform_loops): Add build_bb_loops.
7578 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7580 * graphite.h (graphite_bb): Add loops.
7581 (gbb_nb_loops): New.
7582 (gbb_loop_at_index): New.
7583 (gbb_loop_index): New.
7584 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7585 using nb_params_in_scop.
7587 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7589 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7590 (build_scop_canonical_schedules): Build minimized schedule.
7591 (schedule_to_scattering): Adapt to minimized schedule.
7592 * graphite.h (graphite_bb): Add/Update descriptions.
7594 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7595 Tobias Grosser <grosser@fim.uni-passau.de>
7597 * graphite.c (print_graphite_bb): Add condition printing.
7599 (dump_gbb_conditions): New.
7600 (build_scop_conditions_1): New.
7601 (build_scop_conditions): New.
7602 * graphite.h (graphite_bb): Add conditions.
7604 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7606 * graphite.c (print_graphite_bb):
7607 (free_graphite_bb): New.
7608 (free_scop): Free bbs.
7609 (get_bb_type): Free doms.
7610 (build_scop_context): Free context matrix.
7611 (build_loop_iteration_domains): Remove unused code.
7612 (build_cloog_prog): Free scattering function and blocklist.
7613 (find_transform): Free options.
7615 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7617 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7618 Remove unnecessery cloog data structures. Make a copy of the domain
7619 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7620 unnecessary cloog data structures. Fix memory leaks. Remove insert
7621 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7623 (build_scop_iteration_domain): Remove unnecessary cloog
7624 data structures. Fix memory leaks.
7625 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7626 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7628 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7630 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7632 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7634 * graphite.c (end_scop): Style fix.
7635 (schedule_to_scattering): Style and comment fix.
7637 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7638 * graphite.c (print_graphite_bb): Fix definiton of
7639 schedule_to_scattering.
7640 (initialize_cloog_names): Change nb_scattdims to max loop
7642 (schedule_to_scattering): Take parameter for number of scattering
7644 (build_cloog_prog): Only build as much scattering dimensions as
7647 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7649 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7650 in polyhedron/aermod.f90.
7652 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7653 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7654 Harsha Jagasia <harsha.jagasia@amd.com>
7656 * graphite.c (is_bb_addable): Fix segfault.
7658 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7660 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7661 with multiple exits and conditional handling in edge cases.
7662 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7664 * gcc.dg/graphite/scop-14.c: New.
7666 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7667 Adrien Eliche <aeliche@isty.uvsq.fr>
7669 * graphite.c (is_bb_addable): Add more comments and enhance
7670 readablity of the source code. Fix memory leak.
7671 (is_loop_exit): Fix memory leak.
7673 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7675 * graphite.c (first_loop_in_scop): Deleted.
7676 (setup_cloog_loop): Only walk the loop chain for inner loops.
7677 (build_scop_iteration_domain): Execute setup_cloog_loop for
7678 all loops in the first layer.
7680 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7682 * graphite.c (scan_tree_for_params): Change the way params are
7683 added to be indepenent of the number of loops.
7684 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7686 (build_cloog_prog): Revert to short matrix format.
7688 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7689 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7691 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7694 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7696 * graphite.c (nb_data_refs_in_scop): New.
7697 (graphite_transform_loops): Print more stats: number of
7698 loops, basic blocks and data references per scop.
7700 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7701 Jan Sjodin <jan.sjodin@amd.com>
7703 * graphite.c (loop_affine_expr, idx_record_params,
7704 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7705 instead of instantiate_parameters.
7707 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7709 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7710 add support for parameters, add STATIC_SCHEDULE at the right places,
7713 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7715 * graphite.c (build_scop_loop_nests): Only add the loops, that
7716 are contained completely in the SCoP.
7717 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7718 and the domains are fixed.
7719 (build_scop_canonical_schedules): Add support for bbs not contained
7722 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7724 * graphite.h (scop_contains_loop): Update comments to match
7725 the actual behavior.
7726 (scop_contains_loop): New.
7727 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7729 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7731 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7732 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7735 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7736 Tobias Grosser <grosser@fim.uni-passau.de>
7738 * graphite.c (graphite_transform_loops): Early return when
7739 there are no loops in the function.
7741 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7742 Jan Sjodin <jan.sjodin@amd.com>
7744 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7745 offset of the last loop.
7746 (setup_cloog_loop): Copy the entire outer constraint matrix.
7748 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7749 Jan Sjodin <jan.sjodin@amd.com>
7751 * graphite.c (stmt_in_scop_p, function_parameter_p,
7752 invariant_in_scop_p): Removed.
7753 (scan_tree_for_params): Can be used with no constraint
7754 matrix for gathering parameters.
7755 (idx_record_params): Don't use idx_record_param, instead use
7756 scan_tree_for_params.
7757 (find_scop_parameters): Same.
7758 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7759 Fix the size of loop domains.
7760 (schedule_to_scattering): Exit when the outer loop is not in scop.
7761 (find_transform): Enable build_cloog_prog.
7763 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7764 Jan Sjodin <jan.sjodin@amd.com>
7766 * graphite.c (schedule_to_scattering): Make scattering domains
7767 uniformly of the same size, as required by CLooG 0.14.0 and before.
7769 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7770 Jan Sjodin <jan.sjodin@amd.com>
7772 * graphite.c (schedule_to_scattering): Rewrite, correct the
7773 translation of the scheduling function to scattering.
7774 (build_cloog_prog): Call schedule_to_scattering only once.
7775 * graphite.h (scop_loop_index): Do not fail for loops not
7776 in the scop: return -1.
7778 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7780 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7781 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7782 (setup_cloog_loop): Export GBB_DOMAIN.
7783 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7784 able to rebuild the original control flow.
7785 * graphite.h (graphite_bb): Add domain field and access macro.
7788 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7790 * graphite.c (debug_gbb): New.
7791 (print_scop, build_graphite_bb): Use SCOP_BBS.
7792 (build_scop_bbs): Reimplemented.
7793 (dfs_bb_in_scop_p): Removed.
7794 (build_scop_loop_nests): Reorder loops inserted in
7795 SCOP_LOOP_NEST: outer loops should come first.
7796 (build_scop_canonical_schedules): Reinitialize at zero
7797 the components of the SCOP_STATIC_SCHEDULE for the loops
7798 that have already been parsed.
7800 * graphite.h (debug_gbb): Declared.
7802 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7803 Jan Sjodin <jan.sjodin@amd.com>
7805 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7806 (graphite_loop_to_gcc_loop): Removed.
7807 (remove_all_edges): New.
7808 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7809 (gloog): Remove useless code.
7811 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7813 * graphite.c (get_bb_type): Reworked. We distinguish between
7814 loops with one or multiple exits.
7815 (is_loop_exit): New.
7817 (is_bb_addable): Rework condition handling, now support for case
7818 case statements and loops with multiple exits.
7820 * gcc.dg/graphite/scop-11.c: New.
7821 * gcc.dg/graphite/scop-12.c: New.
7822 * gcc.dg/graphite/scop-13.c: New.
7824 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7826 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7827 we have too many colors.
7829 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7831 * doc/invoke.texi (-ftree-loop-fusion): Document.
7832 * tree-pass.h (pass_loop_fusion): Declared.
7833 * tree-loop-fusion.c: New.
7834 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7835 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7836 * tree-data-ref.h (find_data_references_in_loop): Declared.
7837 * common.opt (ftree-loop-fusion): Declared.
7838 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7840 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7842 * graphite.c (build_access_matrix): Fix typo from the merge.
7844 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7846 * Merge from mainline (130800:135673).
7848 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7850 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7851 Update dominators after splitting.
7853 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7855 * graphite.c (is_bb_addable): Return the harmful statement.
7856 Factor up some code.
7857 (end_scop): New. Splits end of scope bbs on a harmful statement.
7858 (build_scops_1): Call end_scop.
7860 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7862 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7863 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7864 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7865 build_scops_1): Removed.
7866 (build_scops_2): Renamed build_scops_1.
7868 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7870 * graphite.c: Fix formatting.
7872 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7874 * graphite.c (get_bb_type): New.
7876 (build_scops_2): New.
7877 (is_bb_addable): New.
7878 (build_scops): Switch the scop detection.
7879 (build_scop_bbs): Add entry bb to scop.
7880 * graphite.h (struct scop): Update comment.
7882 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7884 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7887 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7889 * gcc.dg/graphite/scop-1.c: Update.
7890 * gcc.dg/graphite/scop-2.c: Update.
7891 * gcc.dg/graphite/scop-4.c: Update.
7892 * gcc.dg/graphite/scop-5.c: Add.
7893 * gcc.dg/graphite/scop-6.c: Add.
7895 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7897 * gcc.dg/graphite/scop-0.c: Add.
7898 * gcc.dg/graphite/scop-7.c: Add.
7899 * gcc.dg/graphite/scop-8.c: Add.
7900 * gcc.dg/graphite/scop-9.c: Add.
7901 * gcc.dg/graphite/scop-10.c: Add.
7903 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7905 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7906 Check affine expressions depending on the outermost loop
7908 (stmt_simple_for_scop_p): Same.
7909 (harmfule_stmt_in_scop): Same.
7911 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7913 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7914 mark entry and exit, that are not part of the SCoP and update HTML
7917 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7919 * graphite.c (basic_block_simple_for_scop_p): Renamed
7921 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7922 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7923 (all_preds_visited_p, all_succs_visited_p,
7924 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7925 scop_end_loop): New.
7926 (build_scops): Do not use dfs_enumerate_from.
7928 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7930 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7932 * graphite.c: Add comments to functions that are missing a
7934 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7936 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7938 * graphite.c (nb_params_in_scop): Moved...
7939 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7940 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7941 (clast_to_gcc_expression): Reduce column size to less than 80.
7942 (graphite_create_iv): Return the new name of the IV.
7943 (find_transform): Set options->esp and options->cpp.
7944 (gloog): Comment out the invalidation of the old loop code.
7945 (initialize_dependence_polyhedron): Replace scop_nb_params with
7948 * graphite.h (nb_params_in_scop): ... here.
7949 (scop_nb_params): Removed.
7950 (loop_domain_dim): Return something even when the loop was not
7951 found in the hash table: avoid ICEing on all the graphite.exp
7954 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7956 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7958 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7959 according to nesting level.
7960 (find_scop_parameters): Call instantiate_parameters.
7961 (scan_tree_for_params): Extend it to handle general affine bounds.
7962 Inner loop bound can depend on outer loop induction variable.
7963 (setup_cloog_loop): tmp variable is allocated on stack. Call
7964 instantiate_parameters with respect to outermost_loop_in_scop.
7965 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7967 (create_empty_loop): Function loopify should be given edge
7968 probability, instead of edge frequency. Dominance relation from
7969 switch_bb to loop_header.
7970 (clast_to_gcc_expression): Added handling of clast_reduction node.
7971 (gloog): New functionality for removing old loop.
7972 (test_dependence): Factored out from build_rdg_all_levels.
7973 (build_rdg_all_levels): Dependence testing factored out to
7974 test_dependence function.
7976 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7977 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7980 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7982 * graphite.c (free_scop, param_index, initialize_cloog_names,
7983 nb_params_in_scop): Use name_tree map instead of just a tree
7984 for keeping track of the variable name associated to that tree.
7985 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7986 clast_to_gcc_expression, graphite_create_iv,
7987 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7988 graphite_stmt_to_gcc_stmt): New.
7989 (gloog): Call these.
7990 * graphite.h (struct name_tree): New.
7991 (struct scop): Use name_tree instead of tree for params.
7992 Store a vector of name_tree for new_ivs.
7994 (scop_nb_params): Use name_tree instead of tree.
7996 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7997 Sebastian Pop <sebastian.pop@amd.com>
7999 * tree-bounds.c: New.
8000 * tree-bounds.h: New.
8001 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
8002 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
8003 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
8007 * c-cppbuiltin.c: Same.
8011 * tree-outof-ssa.c: Same.
8013 * Makefile.in: Same.
8015 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
8016 Sebastian Pop <sebastian.pop@amd.com>
8018 * tree-loop-distribution.c (remaining_stmts,
8019 upstream_mem_writes): Removed static variables.
8020 (copy_loop_before, create_bb_after_loop,
8021 mark_nodes_having_upstream_mem_writes, free_rdg_components,
8022 rdg_build_components, rdg_build_partitions,
8023 dump_rdg_partitions): Extern.
8024 (generate_loops_for_partition, generate_code_for_partition): Do not
8026 (already_processed_vertex_p, predecessor_has_mem_write,
8027 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
8028 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
8029 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
8030 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
8031 Pass remaining_stmts and upstream_mem_writes as parameters.
8032 (rdg_component): Moved...
8033 (build_rdg_partition_for_component): Do not aggregate components when
8034 flag_streamize_loops is set.
8035 (gen_sequential_loops): New.
8036 (ldist_gen): Call gen_sequential_loops.
8038 * tree-pass.h (pass_loop_streamization): Declared.
8040 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
8041 basic blocks when loops structures exist.
8043 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
8045 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
8047 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
8048 eliminate_local_variables_stmt, eliminate_local_variables,
8049 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
8050 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
8051 of code delimited by two edges in the CFG.
8052 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
8053 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
8054 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
8055 the case of parallelisation of reductions.
8056 (create_loop_fn): Extern.
8057 (create_omp_parallel_region): New.
8059 * tree-data-ref.c (dump_data_dependence_relation): Don't call
8060 dump_data_reference for printing dra and drb.
8061 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
8063 (build_rdg): Don't call free_dependence_relations for the moment, as
8064 we attach dependence relations on each edge of the RDG.
8067 * tree-data-ref.h (rdg_component): ...here.
8068 (struct rdg_edge): New field ddr_p relation.
8069 (RDGE_RELATION): New.
8070 (create_bb_after_loop, copy_loop_before,
8071 mark_nodes_having_upstream_mem_writes, rdg_build_components,
8072 rdg_build_partitions, dump_rdg_partitions,
8073 free_rdg_components): Declared.
8075 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
8076 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
8078 * tree-loop-streamization.c: New.
8080 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
8081 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
8083 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
8085 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
8087 * passes.c: Schedule pass_loop_streamization.
8089 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
8091 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
8094 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
8096 * graphite.c (dot_all_scops): Update formatting.
8097 Bbs can now be part of more than one SCoP.
8099 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
8101 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
8103 (loop_domain_dim): Check for unregistered toplev SCOP loop.
8104 * graphite.h (loop_to_cloog_loop): New.
8106 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8108 * graphite.c (loop_domain_dim, ref_nb_loops,
8109 loop_iteration_vector_dim): New.
8110 (build_access_matrix_with_af, build_access_matrix,
8111 initialize_dependence_polyhedron): Fixed for new matrix layout.
8112 No longer assume that all iteration domains are of the same
8115 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
8117 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
8118 defined in a loop at depth 0 is invariant.
8119 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
8120 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
8121 be called at loop depth 0.
8123 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
8125 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
8126 (down_open_scop): Removed.
8127 (loop_in_scop_p): Redefined.
8128 (scop_affine_expr): New argument: scop.
8129 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
8130 a harmful statement ending a scop.
8131 (basic_block_simple_for_scop_p): New argument: scop.
8132 (get_loop_start): Removed.
8133 (new_scop): Initialize SCOP_LOOPS.
8134 (free_scop): Free SCOP_LOOPS.
8135 (succs_at_same_depth, preds_at_same_depth): New.
8136 (end_scop): Test the validity of a scop.
8137 (add_dominators_to_open_scops): New.
8138 (test_for_scop_bound): Call add_dominators_to_open_scops.
8139 Add cases for opening and closing multiple scops.
8140 (build_scops, build_scop_bbs): Iterate over basic blocks in
8142 (build_graphite_bb): Pass scop directly.
8143 (dfs_bb_in_scop_p): New.
8144 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
8146 (nb_loops_around_gb): Use loop_in_scop_p.
8147 (schedule_to_scattering): Disabled for the moment the code computing
8148 the "textual order for outer loop".
8150 * graphite.h (struct scop): New field loops.
8152 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
8154 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
8156 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
8157 Sebastian Pop <sebastian.pop@amd.com>
8159 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
8160 * common.opt (fstreamize-loops): New.
8161 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
8162 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
8163 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
8164 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
8166 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8168 * tree-data-ref.c (build_empty_rdg): New.
8169 (build_rdg): Use it.
8170 * tree-data-ref.h (build_empty_rdg): Declared.
8171 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
8172 (find_vertex_for_stmt): Removed.
8173 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
8175 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
8177 * tree-loop-distribution.c (generate_builtin): After cancelling the
8178 loop tree, also delete basic blocks.
8179 (rdg_flag_uses): Stop recursion when a vertex has already been
8182 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8184 * graphite.c (build_scop_alpha): Removed.
8185 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
8186 and dump_dependence_graph to avoid compiler warnings.
8188 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8190 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
8191 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
8192 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
8193 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
8194 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
8195 (initialize_dependence_polyhedron, find_vertex_for_stmt,
8196 initialize_data_dependence_polyhedron, is_empty_polyhedron,
8197 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
8198 dump_dependence_graph): New.
8199 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
8201 (struct scop): New field loop2cloog_loop.
8202 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
8203 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
8205 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8207 * graphite.c (build_graphite_bb): Fix initialization
8208 of the graphite basic block.
8210 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
8212 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
8213 loop domain matrix. Pass in the number of loops contained in the
8215 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
8216 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
8217 loops that are not surrounding the current loop are not represented
8218 in the domain constraint matrix.
8219 (build_scop_iteration_domain): Initial domain constraint matrix
8220 contains only the eq/ineq, cst, and scop parameters columns.
8222 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8224 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
8225 (print_graphite_bb): Print scattering.
8227 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8229 * graphite.c (initialize_cloog_names): Initialize names of
8230 scattering variables.
8232 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8234 * graphite.c (dot_all_scops_1): Disable debug output while
8237 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8239 * graphite.c (find_transform): Change cloog output language to C.
8241 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
8243 * tree-loop-distribution.c (generate_memset_zero,
8244 generate_builtin, generate_code_for_partition,
8245 rdg_flag_all_uses): New.
8246 (rdg_flag_uses): Gather in the same partition the statements defining
8247 the VUSES of the current statement.
8248 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8249 Gather in the same partition not only the stores to the same memory
8250 access, but also the reads.
8251 (ldist_generate_loops): Renamed ldist_gen.
8253 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
8254 Tobias Grosser <grosser@fmi.uni-passau.de>
8256 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8257 next pointer, don't use the inner pointer.
8259 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
8261 * graphite.c (dot_all_scops, dot_all_scops_1): New.
8262 (find_transform): Call dot_all_1.
8263 * graphite.h (dot_all_scops): Declared.
8265 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
8267 * tree-loop-distribution.c: Fix apsi.f ICE.
8268 (create_bb_after_loop): New.
8269 (generate_loops_for_partition): Use it.
8270 * gfortran.dg/ldist-1.f90: New.
8272 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8273 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8275 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8277 * graphite.c (find_transform): Dump cloog program sent to cloog.
8279 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8281 * graphite.c (initialize_cloog_names): Initialize cloog
8284 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8286 * graphite.c (build_scop_context): Fix typo, for the matrix
8287 format: insert '0 >= 0' instead of '-1 >= 0'.
8289 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8291 * Fix merge problems.
8293 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8295 * graphite.c (setup_cloog_loop): Fix typo.
8297 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8299 * doc/invoke.texi (-ftree-loop-distribution): Documented.
8300 * tree-loop-distribution.c: Reimplemented.
8301 * tree-pass.h (pass_loop_distribution): New.
8302 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8304 * graphds.h (struct graph): New field indexes.
8305 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8307 * tree-vect-analyze.c: Remove declaration of static functions when not
8309 * tree-vectorizer.c: Same.
8310 (rename_variables_in_loop): Now extern.
8311 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8312 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
8313 calling redirect_edge_and_branch_force.
8315 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8317 * tree-data-ref.c: Don't include tree-chrec.h.
8318 (debug_data_dependence_relations): New.
8319 (dump_data_dependence_relation): Call dump_data_reference on data refs
8321 (same_access_functions): Moved...
8322 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8323 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8324 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8325 struct rdg_vertex_info, ): New.
8326 (create_rdg_edge_for_ddr): Compute the dependence level before looking
8328 (create_rdg_vertices): Initialize the htab of graph->indexes.
8329 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8330 (stmts_from_loop): Don't save LABEL_EXPR.
8331 (hash_stmt_vertex_info, eq_stmt_vertex_info,
8332 hash_stmt_vertex_del): New.
8333 (build_rdg): Initialize rdg->indexes.
8334 (free_rdg, stores_from_loop, ref_base_address,
8335 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8336 have_similar_memory_accesses_1, ref_base_address_1,
8337 remove_similar_memory_refs): New.
8339 * tree-data-ref.h: Include tree-chrec.h.
8340 (debug_data_dependence_relations): Declared.
8341 (same_access_functions): ...here. Now static inline.
8342 (ddr_is_anti_dependent, ddrs_have_anti_deps,
8343 ddr_dependence_level): New.
8344 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8345 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8346 RDG_MEM_READS_STMT): New.
8347 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8348 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8349 rdg_vertex_for_stmt): Declared.
8350 (struct rdg_edge): New field level.
8351 (RDGE_LEVEL, free_rdg): New.
8352 (stores_from_loop, remove_similar_memory_refs,
8353 rdg_defs_used_in_other_loops_p,
8354 have_similar_memory_accesses): Declared.
8355 (rdg_has_similar_memory_accesses): New.
8357 * lambda.h (dependence_level): New.
8358 * common.opt (ftree-loop-distribution): New.
8359 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8360 (print_loop_ir): Renamed print_loops.
8361 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8362 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8363 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8364 (tree-loop-distribution.o): Added.
8365 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8366 (mark_virtual_ops_in_bb): New.
8367 (print_loops_bb, debug_loop_num, debug_loop): New.
8368 * passes.c: Scheduled pass_loop_distribution.
8370 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8372 * graphite.c (scan_tree_for_params): Correct the number of columns
8374 (nb_flat_iterator): New.
8375 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8376 (build_scop_iteration_domain): Correct the number of columns for
8379 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8381 * Merge from mainline (129697:130800).
8383 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
8385 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8386 dominated by SCoP's exit.
8387 (graphite_transform_loops): Compute post dominators.
8389 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8391 * Merge from mainline (127169:129697).
8393 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8395 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
8396 parameter for the basic block that contains the expression. Use
8397 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8398 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8400 * graphite.h (gbb_loop): New.
8401 (GBB_LOOP): Removed.
8403 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8405 * Makefile.in: Fix merge problem.
8407 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8409 * Merge from mainline (125309:127169).
8410 * tree-loop-distribution.c: Disabled.
8412 2007-06-05 Sebastian Pop <sebpop@gmail.com>
8414 * Merge from mainline (r123693:125309).
8416 2007-05-30 Sebastian Pop <sebpop@gmail.com>
8418 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8420 (correct_modify_p, check_statements, number_of_lvalue_uses,
8421 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8422 instead of MODIFY_EXPR.
8423 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
8426 2007-05-24 Sebastian Pop <sebpop@gmail.com>
8428 * tree-loop-distribution.c (struct rdg): Replace arrays by
8429 VECs for edges and vertices.
8430 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8431 (RDGV_NB_PARTITIONS): New.
8432 (PRDG_NBV, PRDG_NBE): Removed.
8433 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8434 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8435 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8437 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
8438 Sebastian Pop <sebpop@gmail.com>
8440 * doc/invoke.texi (-ftree-loop-distribution): Document.
8441 * tree-loop-distribution.c: New file.
8442 * tree-pass.h (pass_loop_distribution): Declared.
8443 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8444 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8446 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8447 (DDR_REVERSED_P): New.
8448 * common.opt (-ftree-loop-distribution): New.
8449 * tree-flow.h (distribute_loops): Declared.
8450 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8451 * passes.c (init_optimization_passes): Schedule loop distribution.
8453 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
8455 * graphite.c (print_graphite_bb): Don't call dump_data_references.
8456 (print_scop): Don't print when scop is NULL.
8457 (build_scop_context, find_transform): Don't output to stderr.
8459 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
8461 * tree-data-ref.c: Don't include graphite.h.
8462 Comment out the code for printing data reference's scop.
8463 (build_access_matrix_with_af): Moved...
8464 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8465 * graphite.c (build_access_matrix_with_af): ... here. Now static.
8466 (print_graphite_bb): Print basic block's schedule.
8467 (print_scop): Don't print the schedule, call cloog's pretty printer.
8468 (bb_in_scop_p): A basic block is in a scop only if it is both
8469 dominated and postdominated by the scop's entry and exit basic blocks.
8470 (function_parameter_p): New.
8471 (invariant_in_scop_p): Use function_parameter_p.
8472 (new_scop, save_scop): New.
8473 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8475 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8476 (loop_in_scop_p): New.
8477 (scop_record_loop): Use loop_in_scop_p.
8478 (build_scop_domain): Renamed build_scop_iteration_domain.
8479 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8480 nb_params_in_scop, build_scop_context, first_loop_in_scop,
8481 setup_cloog_loop, dot_scop_1, dot_scop): New.
8482 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8483 (struct scop): Add a pointer to cloog's representation of a program.
8485 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8487 * doc/invoke.texi (-ftree-check-verbose): Renamed
8488 -ftree-checks-verbose.
8489 * common.opt (flag_tree_check_verbose): Renamed
8490 flag_tree_checks_verbose.
8491 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8493 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8495 * configure: Regenerated.
8496 * config.in: Regenerated.
8497 * tree-ssa-loop.c (graphite_transforms): Execute
8498 graphite_transform_loops only when HAVE_cloog.
8499 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8500 * graphite.c: Include polylibgmp.h and cloog.h.
8501 (graphite_transform_loops): Removed loops parameter.
8502 * tree-flow.h (graphite_transform_loops): Update declaration.
8503 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8504 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8505 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8506 (OBJS-common): Remove dependence on graphite.o.
8507 (BACKEND): Depend on @GRAPHITE@.
8509 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
8511 * doc/invoke.texi (-ftree-check-verbose): Documented.
8512 * gcc.dg/tree-checker/tree-checks-1.c: New.
8513 * gcc.dg/tree-checker/tree-checks-2.c: New.
8514 * gcc.dg/tree-checker/tree-checks-3.c: New.
8515 * gcc.dg/tree-checker/tree-checks-4.c: New.
8516 * gcc.dg/tree-checker/tree-checks.exp: New.
8517 * gcc.dg/tree-checker/condates.crp: New.
8518 * common.opt (ftree-checks-verbose): New.
8519 * tree-check.c (tree_check_warning): Move extra stderr output
8520 under control of flag_tree_check_verbose.
8522 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
8524 * tree-match.c: Fix comments formatting.
8525 * tree-match.h: Fix comments formatting.
8526 * tree-check.c: Fix comments formatting.
8527 (tree_check_init): Restructure.
8529 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
8531 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8533 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
8535 * Merge from mainline (r120733:123693).
8537 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8539 * condate.y: New file.
8540 * tree-match.h (struct patt_info_s): New field sign.
8541 (struct condate_s): New field msg.
8542 (normalize_condate, name_condate, add_condate): New.
8543 (conds[], condate_parse): Made extern.
8544 * tree-check.c (tree_check_warning): First arg changed to cond;
8545 warning reformatted.
8546 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8548 (tree_check): Process trivial condates.
8549 (read_delimited_string): Removed.
8550 (print_cond): Print name and msg.
8551 (conds[]): Made extern.
8552 (parse_tree_check_file_once): Rewritten to use the parser in
8554 Processing of option --tree_check_string moved to tree_scan().
8555 * Makefile.in: Added condate.y
8557 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8559 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8560 Use VECs instead of varrays.
8561 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8562 * Makefile.in (pretty-print.o): Depend on vec.h.
8563 * pretty-print.c: Include tree.h and vec.h.
8564 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8565 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8566 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8567 pp_free_list): Use VECs instead of varrays.
8568 * pretty-print.h: Do not include varray.h.
8569 (struct tree_chunk_s): Declaration moved before its use.
8570 (output_buffer): Rename varray field to chunks.
8571 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8572 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8573 save_global_holes): Use VECs instead of varrays.
8574 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8575 * tree-check.c (scan_cfg_stmts, push_node,
8576 print_matching_stmt): Removed.
8577 (tree_check_instance, push_global_holes_if_new, tree_check,
8578 execute_tree_check): Use VECs instead of varrays.
8579 (gate_tree_check): Don't execute the CFG check when basic_block_info
8582 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8584 * Merge from mainline (r115016:120733).
8586 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8588 * Merge from mainline (r117632:117661).
8590 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8592 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8593 * tree-pass.h (TDF_DEBUG, debug_p): New.
8594 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8595 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8596 get_loop_exit_condition, analyze_evolution_in_loop,
8597 analyze_initial_condition, analyze_scalar_evolution,
8598 instantiate_parameters, number_of_latch_executions): Use debug_p.
8599 * tree-chrec.c (chrec_apply): Use debug_p.
8600 * tree-data-ref.c: Include graphite.h.
8601 (dump_data_reference): Print also the access matrix.
8602 (analyze_array, analyze_indirect_ref, init_data_ref,
8603 analyze_offset_expr, address_analysis, object_analysis,
8604 create_data_ref, finalize_ddr_dependent,
8605 non_affine_dependence_relation, analyze_ziv_subscript,
8606 analyze_siv_subscript_cst_affine,
8607 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8608 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8609 analyze_miv_subscript, analyze_overlapping_iterations,
8610 build_classic_dist_vector, subscript_dependence_tester,
8611 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8612 (build_access_matrix_with_af): No longer static.
8613 * tree-data-ref.h (scop_p): ... declaration here.
8614 (data_reference.scop): New field.
8615 (DR_SCOP, DR_ACCESS_MATRIX): New.
8616 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8617 * graphite.c (print_graphite_bb): Call dump_data_references.
8618 (print_scop): Use scop_nb_loops and scop_dim_domain.
8619 (test_for_scop_bound): Use debug_p.
8620 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8622 (scop_loop_index): Moved...
8623 (scop_record_loop): New.
8624 (build_scop_loop_nests): Use scop_record_loop.
8625 (build_scop_domain): Use scop_dim_domain.
8626 (build_access_matrix): Implemented.
8627 (build_scop_canonical_schedules): Use scop_nb_loops.
8628 (build_graphite_bb): Initialize GBB_SCOP.
8629 * graphite.h (scop_p): Moved...
8630 (graphite_bb.scop): New field.
8631 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8632 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8633 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8634 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8635 scop_loop_index): New.
8636 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8638 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8640 * Merge from mainline (r117661:120450).
8642 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8644 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8645 at the first declaration outside the varying loop, instantiate as
8647 * tree-chrec.c (for_each_scev_op): New.
8648 * tree-chrec.h (for_each_scev_op): Declared.
8649 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8650 * tree-data-ref.c (get_references_in_stmt,
8651 find_data_references_in_stmt): New, from trunk.
8652 (find_data_references_in_loop): Use get_references_in_stmt
8653 and find_data_references_in_loop, modified as in trunk.
8654 (build_access_matrix_with_af): New.
8655 * tree-data-ref.h (data_reference): Add a field access_matrix.
8656 (data_ref_loc): New, as in trunk.
8657 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8658 invariant_in_scop_p, param_index, scan_tree_for_params,
8659 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8660 idx_record_param, idx_record_params, build_access_matrix,
8661 build_scop_data_accesses, build_scop_canonical_schedules,
8662 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8663 build_scop_params): New.
8664 * graphite.h (graphite_bb): New.
8665 (scop): Add fields static_schedule, params, loop_nest,
8667 * lambda.h: Declare vecs of lambda_matrix.
8668 * tree-flow.h (print_loop_ir_bb): Declared.
8669 * tree-cfg.c (print_loop_ir_bb): New.
8670 (print_loop): Use print_loop_ir_bb.
8672 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8674 * Merge from mainline (r115016:117632).
8676 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8678 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8679 break due to a warning.
8681 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8683 * graphite.c (print_scops, debug_scops): New.
8684 (graphite_transform): Renamed graphite_find_transform.
8685 * graphite.h (debug_scops): Declared.
8687 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8689 * tree-match.c: Reformat following the GNU style.
8690 * tree-match.h: Reformat following the GNU style.
8691 * tree-pattern.h: Removed empty file.
8692 * Makefile.in: Remove references to tree-pattern.h.
8693 * tree-check.c: Reformat following the GNU style.
8694 (execute_tree_check): Move gate condition code to...
8695 (gate_tree_check): ...here. New function.
8696 (pass_check): Use the gate function.
8698 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8700 * tree-pattern.h: New. Tree pattern matching and checking using
8702 * tree-check.c: New. Tree/CFG checking pass.
8703 * tree-match.c: New. Library for tree pattern matching.
8704 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8705 * toplev.c, flags.h: Add globals for tree-check pass.
8706 * Makefile.in: Integrate the files in tree-check pass.
8707 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8708 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8709 Introduce a "lazy" pretty-print mode.
8710 * tree.c, tree.h: Add tree_name.
8712 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8714 * doc/invoke.texi (-fgraphite): Correct typo.
8715 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8716 use of print_loop_ir.
8717 * gcc.dg/graphite/scop-1.c: New.
8718 * gcc.dg/graphite/scop-2.c: New.
8719 * gcc.dg/graphite/graphite.exp: New.
8720 * graphite.c: Include domwalk.h.
8721 (print_scop): Print only the entry and exit blocks.
8722 (debug_scop): No longer static.
8723 (affine_expr): Fix formating. Return also true when the expression is
8725 (stmt_simple_for_scop_p): Fix formating.
8726 (build_scops): Use domwalk.
8727 (get_loop_start, end_scop, test_for_scop_bound): New.
8728 (graphite_transform_loops): Avoid printing on stderr.
8729 * graphite.h (debug_scop): Declared.
8730 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8731 * Makefile.in (graphite.o): Depend on domwalk.h.
8732 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8733 declarations for static functions.
8734 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8735 controlling output verbosity.
8737 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8738 Plesco Alexandru <shurikx@gmail.com>
8740 * doc/invoke.texi (-fgraphite): Document.
8741 * tree-pass.h (pass_graphite_transforms): Declared.
8742 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8743 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8744 (pass_graphite_transforms): Defined.
8745 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8746 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8747 * graphite.c, graphite.h: New.
8748 * common.opt (fgraphite): Declared.
8749 * tree-flow.h (graphite_transform_loops): Declared.
8750 * Makefile.in (OBJS-common): Add graphite.o.
8751 (graphite.o): New rule.
8752 * passes.c (pass_graphite_transforms): Scheduled.