1 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-sese-to-poly.c (analyze_drs_in_stmts): Fix set but
5 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
7 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
9 * graphite-sese-to-poly.c (analyze_drs): Removed.
10 (build_scop_drs): Do not call analyze_drs.
11 (analyze_drs_in_stmts): New.
13 (insert_out_of_ssa_copy): Call analyze_drs_in_stmts.
14 (insert_out_of_ssa_copy_on_edge): Same.
15 (rewrite_close_phi_out_of_ssa): Call insert_stmts.
16 (rewrite_phi_out_of_ssa): Same.
17 (rewrite_cross_bb_scalar_dependence): Same.
18 (split_reduction_stmt): Move data references in the new basic blocks.
19 (translate_scalar_reduction_to_array_for_stmt): Call insert_stmts.
21 2010-11-26 Sebastian Pop <sebastian.pop@amd.com>
23 * sese.c (rename_uses): Do not handle ADDR_EXPR in LHS of assignments.
25 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
28 * graphite-poly.c (new_poly_bb): Returns a poly_bb_p. Do not take
29 the reduction bool in parameter. Clear PBB_IS_REDUCTION. Set GBB_PBB.
30 * graphite-poly.h (new_poly_bb): Update declaration.
31 (gbb_from_bb): Moved here...
33 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
35 (graphite_stmt_p): Removed.
36 (try_generate_gimple_bb): Returns a gimple_bb_p. Do not pass in
37 sbitmap reductions. Always build a gimple_bb_p. Do not call
39 (build_scop_bbs_1): Do not pass in sbitmap reductions.
40 (build_scop_bbs): Same.
41 (gbb_from_bb): ... from here.
42 (add_conditions_to_constraints): Moved up.
44 (build_scop_drs): Call analyze_drs. Remove all the PBBs that do
45 not contain data references.
46 (new_pbb_from_pbb): New.
47 (insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
49 (rewrite_close_phi_out_of_ssa): Update call to
50 insert_out_of_ssa_copy_on_edge.
51 (rewrite_reductions_out_of_ssa): Now static.
52 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
54 (split_reduction_stmt): Call split_pbb.
55 (translate_scalar_reduction_to_array): Pass in the scop, do not
56 pass in the sbitmap reductions.
57 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
58 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
59 (rewrite_commutative_reductions_out_of_ssa): Same.
60 (build_poly_scop): Call build_scop_bbs,
61 rewrite_commutative_reductions_out_of_ssa,
62 rewrite_reductions_out_of_ssa, and
63 rewrite_cross_bb_scalar_deps_out_of_ssa. Move build_scop_drs
65 * graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
67 (rewrite_reductions_out_of_ssa): Same.
68 (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
69 (build_scop_bbs): Same.
70 * graphite.c (graphite_transform_loops): Do not initialize reductions.
71 Do not call build_scop_bbs,
72 rewrite_commutative_reductions_out_of_ssa,
73 rewrite_reductions_out_of_ssa, and
74 rewrite_cross_bb_scalar_deps_out_of_ssa.
75 * sese.h (struct gimple_bb): Add field pbb.
78 * gcc.dg/graphite/pr45297.c: New.
80 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
82 * graphite-sese-to-poly.c (handle_scalar_deps_crossing_scop_limits):
84 (rewrite_cross_bb_scalar_deps): Pass in the scop. Call
85 handle_scalar_deps_crossing_scop_limits.
86 (rewrite_cross_bb_scalar_deps_out_of_ssa): Create an empty BB
87 after the scop. Update call to rewrite_cross_bb_scalar_deps.
89 2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
91 * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
92 when replacing a constant in an ADDR_EXPR.
94 2010-10-20 Sebastian Pop <sebastian.pop@amd.com>
96 * graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
98 (lst_do_strip_mine): Same.
99 (scop_do_strip_mine): Same.
100 * graphite-poly.c (apply_poly_transforms): Update call to
102 * graphite-poly.h (scop_do_strip_mine): Update declaration.
104 2010-09-24 Sebastian Pop <sebastian.pop@amd.com>
107 * graphite.c (graphite_initialize): Call scev_reset.
109 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
111 * sese.h (scev_analyzable_p): Return false for real or floating
112 point. Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
114 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
117 * gfortran.dg/graphite/pr45758.f90: New.
119 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
121 * graphite-scop-detection.c (is_scop_p): Free bblist.
123 2010-09-23 Sebastian Pop <sebastian.pop@amd.com>
125 * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
127 * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
129 * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
130 Do not allocate ub_expr, it is passed in initialized.
132 2010-09-21 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
134 * common.opt (fgraphite-dump-cloog): New flag.
135 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
136 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
137 (build_cloog_prog): Dump CLooG input file when
138 flag_graphite_dump_cloog is set.
139 * graphite-cloog-compat.h (cloog_program_dump_cloog): New.
141 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
143 Revert previous patch "New flag: -fgraphite-dump-cloog."
145 2010-09-20 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
147 * common.opt (fgraphite-dump-cloog): New flag.
148 * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
149 * graphite-clast-to-gimple.c (init_cloog_input_file): New.
150 (build_cloog_prog): Dump CLooG input file when
151 flag_graphite_dump_cloog is set.
153 2010-09-20 Sebastian Pop <sebastian.pop@amd.com>
155 * graphite-clast-to-gimple.c (graphite_verify): Remove call to
156 verify_dominators for CDI_POST_DOMINATORS.
157 * sese.h: Remove comment about CDI_POST_DOMINATORS.
158 (recompute_all_dominators): Remove call to free_dominance_info
159 for CDI_POST_DOMINATORS. Remove call to calculate_dominance_info
160 for CDI_POST_DOMINATORS.
162 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
164 * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
165 over pbb_dim_iter_domain.
167 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
169 * graphite-flattening.c: Fix comments.
171 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
173 * Makefile.in (OBJS-common): Add graphite-flattening.o.
174 (graphite-flattening.o): New rule.
175 * common.opt (floop-flatten): New flag.
176 * doc/invoke.texi (-floop-flatten): Documented.
177 * graphite-flattening.c: New.
178 * graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
179 * graphite-poly.h (flatten_all_loops): Declared.
180 (lst_remove_loop_and_inline_stmts_in_loop_father): New.
181 * tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
182 is set, also set flag_graphite.
184 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
186 * graphite-poly.c (cloog_checksum): New.
187 * graphite-poly.h (cloog_checksum): Declared.
189 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
191 * graphite-poly.c (pbb_number_of_iterations): Removed.
192 (pbb_number_of_iterations_at_time): Correctly compute the number
193 of iterations in the transformed loop.
194 * graphite-poly.h (pbb_number_of_iterations): Removed.
196 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
198 * graphite-poly.h (lst_update_scattering_seq): Removed.
199 (lst_update_scattering): Correctly handle outermost loop dewey
202 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
204 * graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
205 lst_strip_mine_profitable_p. Call lst_niter_for_loop.
206 * graphite-poly.h (lst_niter_for_loop): New.
208 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
210 * graphite-poly.c (apply_poly_transforms): Do not abort when the
211 transform read from disk is not legal. Call fatal_error instead.
213 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
215 * graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
216 (print_scop_header): Removed. Inlined in the only call place...
217 (print_scop): ... here.
219 2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
221 * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
223 2010-09-02 Vladimir Kargov <kargov@gmail.com>
225 * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
226 (is_valid_stmt_p): Add data reference and operation-specific checks.
227 (is_valid_bb_p): Change structure, add loop validity check.
228 (is_scop_p): Move the TODO list
229 (find_scops_new): New.
230 (build_scops_new): Move part of functionality to find_scops_new and
231 build_scops. Add necessary steps for successful SCoP construction.
232 (build_scops): Compute SCoP sets for both detection algorithms, choose
233 the resulting one depending on static condition.
235 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
237 * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
239 2010-08-24 Sebastian Pop <sebastian.pop@amd.com>
241 * graphite-dependences.c (dot_deps): Avoid set but not used warning.
242 (dot_deps_stmt): Same.
243 * graphite-poly.c (dot_lst): Same.
245 2010-08-23 Sebastian Pop <sebastian.pop@amd.com>
247 * graphite-blocking.c (scop_do_strip_mine): Do not call
248 graphite_legal_transform.
249 (scop_do_block): Same.
251 2010-08-20 Vladimir Kargov <kargov@gmail.com>
253 * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
256 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
259 * gcc.dg/graphite/id-pr45230.c: New.
261 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
263 * tree-scalar-evolution.c (instantiate_array_ref): New.
264 (instantiate_scev_r): Also handle ARRAY_REFs.
266 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
268 * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
269 Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
270 RESULT_DECL, and FIELD_DECL. Return false for an
271 SSA_NAME_IS_DEFAULT_DEF.
272 (compute_scalar_evolution_in_loop): Do not further analyze the
273 scalar evolution when no_evolution_in_loop_p returns true.
275 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
277 * tree-chrec.h (evolution_function_is_affine_p): Do not check
278 whether CHREC_LEFT is invariant. A function is affine when
279 CHREC_RIGHT is invariant.
281 2010-08-20 Sebastian Pop <sebastian.pop@amd.com>
283 * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
285 (rewrite_degenerate_phi): Same.
286 (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
288 2010-08-18 Vladimir Kargov <kargov@gmail.com>
290 * graphite-scop-detection.c (graphite_can_represent_scev,
291 graphite_can_represent_expr, stmt_has_simple_data_refs_p,
292 graphite_can_represent_loop): Remove outermost_loop.
294 2010-08-17 Sebastian Pop <sebastian.pop@amd.com>
297 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
298 handle GIMPLE_CALLs with no LHS.
300 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
301 Sebastian Pop <sebastian.pop@amd.com>
303 * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
304 Call remove-build-file to clean up the generated *.graphite files.
306 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
308 * doc/invoke.texi (debugging options): Update documentation.
309 (-floop-interchange): Same.
310 (-flopp-strip-mine): Same.
311 (-floop-block): Same.
312 (-fgraphite-read): Add documentation.
313 (-fgraphite-write): Same.
315 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
317 * toplev.c (process_options): Disable graphite loop optimization
318 options when -fgraphite-read flag is used.
320 2010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
322 * graphite-poly.c (init_graphite_out_file): New.
323 (init_graphite_in_file): New.
324 (apply_poly_transforms): Updated to enable reading and writing of
326 * toplev.c (init_asm_output): Remove graphite in/out file initialization.
328 2010-08-17 Tobias Grosser <grosser@fim.uni-passau.de>
330 * graphite-scop-detection.c (graphite_can_represent_scev): Remove
333 2010-08-12 Sebastian Pop <sebastian.pop@amd.com>
335 * graphite-clast-to-gimple.c (precision_for_value): Adjust
336 computation of precision by 1.
338 2010-08-12 Riyadh Baghdadi <baghdadi.mr@gmail.com>
340 * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
341 (openscop_read_polyhedron_matrix): New.
342 * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
343 (openscop_read_N_int): Same.
344 * graphite-poly.c (openscop_read_N_int): New.
345 (openscop_read_one_int): New.
346 (openscop_read_N_string): New.
347 (openscop_read_one_string): New.
348 (openscop_read_powerset_matrix): New.
349 (graphite_read_transforms): Remove.
350 (graphite_read_scatt): New.
351 (graphite_read_scop_file): New.
352 (apply_poly_transforms): Updated to call graphite_read_scop_file.
354 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
356 * graphite-poly.c: Change include order.
358 2010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
360 * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
361 (cloog_matrix_nrows): New.
363 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
365 * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
367 * graphite-poly.c (openscop_print_scattering_function_1): Same.
368 (print_scattering_function_1): Same.
369 (openscop_print_pbb_domain): Same.
370 (openscop_print_scop_context): Same.
371 (print_scop_context): Same.
373 2010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
375 * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
376 (openscop_print_pdr_polyhedron): Print pph.
378 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
380 * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
381 * gfortran.dg/graphite/graphite.exp: Same.
382 * gcc.dg/graphite/vect-pr43423.c: New.
384 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
386 * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
387 priority signed types.
389 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
391 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
392 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
394 2010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
396 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
397 (openscop_print_polyhedron_matrix): New.
398 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
399 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
400 (openscop_print_pdr_powerset): New.
401 (openscop_print_powerset_matrix): New.
402 (openscop_print_scattering_function_1): New.
403 (print_scattering_function): Add support for scattering names and
405 (graphite_write_transforms): Remove.
406 (apply_poly_transforms): Updated to call print_scop.
407 (print_pdr_access_layout): Updated to support OpenScop format.
409 (openscop_print_pbb_domain): New.
410 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
412 (print_pbb): Updated to call the new print_pbb_body.
413 (openscop_print_scop_context): New.
414 (print_scop_header): New.
415 (print_scop): Updated to call print_scop_header.
416 * graphite-poly.h: Document OpenScop format.
418 2010-07-29 Sebastian Pop <sebastian.pop@amd.com>
420 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
421 the case removed in the previous patch, when the only phi argument
422 is defined in the same loop as the phi node itself. Handle it
423 separately from the invariant case by both propagating it outside
424 the region and replacing the phi node with an assign.
426 2010-07-28 Sebastian Pop <sebastian.pop@amd.com>
428 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
429 constant phi nodes with one argument are is_gimple_min_invariant
430 and SSA_NAME_IS_DEFAULT_DEF.
432 * gfortran.dg/graphite/id-22.f: New.
434 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
436 * graphite.c (graphite_initialize): Do not initialize
437 CLooG and initialize the Parma Polyhedra Library
438 manually when using CLOOG_ORG.
439 (graphite_finalize): Do not finalize CLooG and finalize
440 the Parma Polyhedra Library manually when using CLOOG_ORG.
441 * graphite-cloog-compat.h (cloog_initialize): Hide function
442 when using CLOOG_ORG.
443 (cloog_finalize): Same.
445 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
447 * graphite-clast-to-gimple.c (free_scattering): Change
448 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
450 (build_cloog_prog): Same.
451 * graphite-cloog-compat.h (cloog_domain): Removed.
452 (cloog_scattering): New.
453 (cloog_set_domain): Removed.
454 (cloog_set_scattering): New.
455 (cloog_next_domain): Removed.
456 (cloog_next_scattering): New.
457 (cloog_set_next_domain): Removed.
458 (cloog_set_next_scattering): New.
459 (CloogScatteringList): New.
460 (CloogScattering): New.
461 (cloog_scattering_free): New.
462 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
463 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
466 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
468 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
470 (set_cloog_options): Same.
471 (print_clast_stmt): Same.
472 (scop_to_clast): Same.
473 (print_generated_program): Same.
475 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
476 (scop_to_clast): Extend with CloogState.
477 * graphite-cloog-util.c: Include graphite-cloog-compat.h
478 (new_Cloog_Domain_from_ppl_Polyhedron):
479 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
480 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
481 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
482 * graphite-cloog-util.h (build_cloog_prog): Same.
483 * graphite-cloog-copat.h (build_cloog_prog): New.
485 (cloog_state_malloc): New.
486 (cloog_state_free): New.
487 (cloog_loop_malloc): New.
488 (cloog_options_malloc): New.
489 (cloog_statement_alloc): New.
490 (cloog_domain_from_cloog_matrix): New.
491 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
492 (new_Cloog_Domain_from_ppl_Polyhedron): New.
494 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
496 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
497 type of NAME now depends on used CLooG version.
498 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
499 (gcc_type_for_clast_expr): Same.
500 (print_clast_stmt): Replace pprint with clast_pprint.
501 * graphite-cloog-compat.h: Provide compatibility macros for
504 (clast_expr_term): New.
505 (clast_expr_red): New.
506 (clast_expr_bin): New.
509 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
511 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
512 compatible to newer CLooG releases (CLOOG_ORG).
513 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
514 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
515 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
516 (build_cloog_prog) : New.
517 (cloog_program_extract_scalars): New.
518 (cloog_program_scatter): New.
520 2010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
522 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
523 conditionally (CLOOG_ORG).
524 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
525 (cloog_statement_usr): New.
526 (cloog_domain): Same.
527 (cloog_set_domain): Same.
528 (cloog_next_domain): Same.
529 (cloog_set_next_domain): Same.
530 (cloog_program_nb_scattdims): Same.
531 (cloog_program_set_nb_scattdims): Same.
532 (cloog_program_names): Same.
533 (cloog_program_set_names): Same.
534 (cloog_program_set_context): Same.
535 (cloog_program_set_loop): Same.
536 (cloog_program_blocklist): Same.
537 (cloog_program_set_blocklist): Same.
538 (cloog_program_scaldims): Same.
539 (cloog_program_set_scaldims): Same.
540 (cloog_names_nb_parameters): Same.
541 (cloog_names_set_nb_parameters): Same.
542 (cloog_names_parameters): Same.
543 (cloog_names_set_parameters): Same.
544 (cloog_names_set_nb_iterators): Same.
545 (cloog_names_set_iterators): Same.
546 (cloog_names_set_nb_scattering): Same.
547 (cloog_names_set_scattering): Same.
548 (cloog_statement_set_usr): Same.
549 (cloog_loop_set_next): Same.
550 (cloog_loop_set_domain): Same.
551 (cloog_loop_set_block): Same.
552 (cloog_block_list_next): Same.
553 (cloog_block_list_set_next):
554 (cloog_block_list_set_block): Same.
556 2010-07-27 Sebastian Pop <sebastian.pop@amd.com>
558 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
560 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
561 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
562 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
563 when something has been changed.
564 (rewrite_commutative_reductions_out_of_ssa): Same.
566 * gcc.dg/graphite/id-26.c: New.
568 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
570 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
571 handle the case when def is in the sese region.
572 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
573 for invariant expressions.
574 (rewrite_cross_bb_phi_deps): Removed.
575 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
576 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
577 rewrite_cross_bb_phi_deps.
579 2010-07-26 Sebastian Pop <sebastian.pop@amd.com>
581 * graphite-sese-to-poly.c
582 (rewrite_commutative_reductions_out_of_ssa_loop): Call
583 scev_analyzable_p only on is_gimple_reg
585 * gcc.dg/graphite/id-25.c: New.
587 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
589 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
590 (rewrite_close_phi_out_of_ssa): Propagate constant values or
591 parametric expressions outside the scop region.
592 (rewrite_cross_bb_scalar_deps): Same.
593 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
595 * gcc.dg/graphite/run-id-5.c: New.
596 * gcc.dg/graphite/run-id-6.c: New.
597 * gfortran.dg/graphite/id-21.f: New.
599 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
601 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
602 SSA_NAME_DEF_STMT only on SSA_NAMEs.
604 * gcc.dg/graphite/id-24.c: New.
606 2010-07-22 Sebastian Pop <sebastian.pop@amd.com>
608 * tree-scalar-evolution.c (instantiate_scev_name): Do not
609 instantiate default definitions.
611 2010-07-20 Vladimir Kargov <kargov@gmail.com>
613 * graphite-scop-detection.c (is_valid_stmt_p): New.
614 (is_valid_bb_p): New.
616 2010-07-20 Vladimir Kargov <kargov@gmail.com>
617 Sebastian Pop <sebastian.pop@amd.com>
619 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
620 (loop_exits_from_bb_p): New.
621 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
622 (loop_exits_from_bb_p): Declared.
623 * graphite-scop-detection.c (scopdet_basic_block_info): Call
626 2010-07-20 Vladimir Kargov <kargov@gmail.com>
628 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
630 (dot_regions_1): New.
632 * refined-regions.h (dot_regions): Declared.
633 * Makefile.in (refined-regions.o): Update dependences.
635 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
637 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
638 extra parameter for the region. Call scev_analyzable_p.
639 (rewrite_reductions_out_of_ssa): Update call to
640 rewrite_close_phi_out_of_ssa.
641 (rewrite_cross_bb_phi_deps): Same.
642 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
643 parameter for the region. Call scev_analyzable_p.
644 (rewrite_commutative_reductions_out_of_ssa): Update call to
645 rewrite_commutative_reductions_out_of_ssa_loop.
647 2010-07-20 Sebastian Pop <sebastian.pop@amd.com>
649 * gcc.dg/tree-ssa/pr20742.c: New.
651 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
653 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
655 * gcc.dg/graphite/id-23.c: New.
657 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
659 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
660 SSA scalar phi nodes that can be scev_analyzable_p.
662 * gfortran.dg/graphite/id-20.f: Adjust testcase.
664 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
666 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
667 handle SSA_NAME_IS_DEFAULT_DEF.
669 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
671 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
673 * gcc.dg/graphite/pr42729.c: New.
675 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
677 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
678 case non close-phi nodes with one argument.
680 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
682 * sese.h (scev_analyzable_p): Scevs could be expressions without
683 chrecs and still be scev_analyzable_p.
685 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
687 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
689 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
691 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
692 * cfgloop.h (struct loop): Remove single_iv field.
693 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
694 (scop_canonicalize_loops): Removed.
695 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
696 over all the loop phi nodes in loop->header.
697 (build_poly_scop): Remove use of scop_canonicalize_loops.
699 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
701 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
704 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
706 * tree-chrec.c (chrec_apply): Should only apply to the specified
707 variable. Also handle multivariate chains of recurrences that
708 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
710 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
712 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
713 (debug_clast_name_indexes_1): Removed.
714 (debug_clast_name_indexes): Removed.
715 (pbb_to_depth_to_oldiv): Removed.
716 (build_iv_mapping): Replace the use of rename_map with iv_map.
717 (translate_clast_user): Remove uses of rename_map. Allocate and
719 (translate_clast_for_loop): Remove uses of rename_map.
720 (translate_clast_for): Same.
721 (translate_clast_guard): Same.
722 (translate_clast): Same.
724 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
725 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
726 * sese.c (set_rename): Now static.
727 (rename_variables_in_stmt): Removed.
729 (is_parameter): Removed.
731 (expand_scalar_variables_call): Removed.
732 (expand_scalar_variables_ssa_name): Removed.
733 (expand_scalar_variables_expr): Removed.
734 (expand_scalar_variables_stmt): Removed.
735 (expand_scalar_variables): Removed.
736 (rename_variables): Removed.
737 (remove_condition): Removed.
738 (get_true_edge_from_guard_bb): Removed.
739 (get_false_edge_from_guard_bb): Removed.
740 (struct igp): Removed.
741 (default_before_guard): Removed.
742 (convert_for_phi_arg): Removed.
743 (add_guard_exit_phis): Removed.
744 (insert_guard_phis): Removed.
745 (graphite_copy_stmts_from_block): Now also uses iv_map and a
746 region. Do not copy conditions. Do not copy induction variables.
748 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
749 the translated statement. Use the iv_map for the induction
751 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
752 (set_rename): Removed declaration.
753 (scev_analyzable_p): ...here.
754 * tree-chrec.c (chrec_apply_map): New.
755 * tree-chrec.h (chrec_apply_map): Declared.
757 2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
759 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
760 insert_loop_close_phis.
761 * sese.c (name_defined_in_loop_p): Removed.
762 (expr_defined_in_loop_p): Removed.
763 (alive_after_loop): Removed.
764 (close_phi_not_yet_inserted_p): Removed.
765 (struct alep): Removed.
766 (add_loop_exit_phis): Removed.
767 (insert_loop_close_phis): Removed.
769 2010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
771 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
773 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
775 2010-07-07 Sebastian Pop <sebastian.pop@amd.com>
777 * gfortran.dg/graphite/id-20.f: New.
779 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
781 * graphite-cloog-util.h: Added cloog.h.
782 * graphite-blocking.c: Removed cloog.h.
783 * graphite-dependences.c: Same.
784 * graphite-interchange.c: Same.
785 * graphite-poly.c: Same.
786 * graphite-ppl.c: Same.
787 * graphite-scop-detection.c: Same.
788 * graphite-sese-to-poly.c:
790 Removed graphite-clast-to-gimple.h.
791 (check_poly_representation): Removed (unused).
792 * graphite-sese-to-poly.h
793 (check_poly_representation): Removed (unused).
795 2010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
798 (OBJS-common): Added graphite-cloog-util.o.
799 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
800 (graphite-cloog-util.o): New.
801 (graphite-ppl.o): Added graphite-cloog-util.h.
802 * graphite-clast-to-gimple.c:
803 Added graphite-cloog-util.h to include statements.
804 * graphite-cloog-util.c: New.
805 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
806 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
807 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
808 (new_C_Polyhedron_from_Cloog_Matrix): Same.
809 (ppl_Constrain_System_number_of_constraints): Same.
810 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
811 (oppose_constraint): Same.
812 (cloog_matrix_to_ppl_constraint): Same.
813 (new_Constraint_System_from_Cloog_Matrix): Same.
814 (insert_constraint_into_matrix): Same. Declared static.
815 * graphite-cloog-util.h: New.
816 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
817 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
818 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
819 (new_C_Polyhedron_from_Cloog_Matrix): Same.
820 (insert_constraint_into_matrix): Same.
822 Added graphite-cloog-util.h to include statements.
823 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
824 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
825 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
826 (new_C_Polyhedron_from_Cloog_Matrix): Same.
827 (insert_constraint_into_matrix): Same.
828 (ppl_Constrain_System_number_of_constraints): Same.
829 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
830 (oppose_constraint): Same.
831 (cloog_matrix_to_ppl_constraint): Same.
832 (new_Constraint_System_from_Cloog_Matrix): Same.
834 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
835 graphite-cloog-util.h.
836 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
837 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
838 (new_C_Polyhedron_from_Cloog_Matrix): Same.
839 (insert_constraint_into_matrix): Removed.
841 2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
843 * graphite-clast-to-gimple.c
844 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
845 (precision_for_interval): Same.
846 (gcc_type_for_interval): Same.
847 (compute_type_for_level): Same.
848 * graphite-interchange.c
849 (lst_interchange_profitable_p): Same.
851 (psct_scattering_dim_for_loop_depth): Same.
853 (ppl_max_for_le_pointset): Same.
854 (ppl_min_for_le_pointset): Same.
856 2010-06-25 Vladimir Kargov <kargov@gmail.com>
858 * refined-regions.c (bb_index_compare): New.
859 (get_bbs_in_region): New.
860 (print_bbs_in_region): New.
861 (print_refined_region): Add an argument that allows to print
862 all basic blocks contained in regions.
863 (debug_refined_region): Update call to print_refined_region.
864 * refined-regions.h (print_refined_region): Update declaration.
865 (get_bbs_in_region): Declared.
866 * graphite-scop-detection.c (build_scops_new): Print the refined
867 region tree into the Grahite dump file.
869 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
871 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
872 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
874 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
876 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
877 rewrite_close_phi_out_of_ssa.
879 * gcc.dg/graphite/id-22.c: New.
881 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
883 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
885 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
887 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
889 * sese.c (debug_rename_map): Same.
892 (rename_variables_in_stmt): Same.
893 (expand_scalar_variables_call): Same.
894 (expand_scalar_variables_ssa_name): Same.
895 (expand_scalar_variables_expr): Same.
896 (expand_scalar_variables_stmt): Same.
897 (expand_scalar_variables): Same.
898 (rename_variables): Same.
899 (graphite_copy_stmts_from_block): Same.
900 (copy_bb_and_scalar_dependences): Same.
902 2010-06-24 Sebastian Pop <sebastian.pop@amd.com>
904 * graphite-clast-to-gimple.c (copy_renames): Removed.
905 (translate_clast_for): Do not call copy_renames.
906 (translate_clast_guard): Same.
908 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
910 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
911 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
912 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
913 before rewrite_cross_bb_scalar_deps.
915 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
917 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
918 Early return in when flag_associative_math is not set.
920 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
922 * gcc.dg/graphite/run-id-2.c: Call abort.
924 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
926 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
927 of SSA copies on edges except for loop->latch.
929 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
931 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
932 Split out of rewrite_reductions_out_of_ssa.
933 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
935 * graphite.c (graphite_transform_loops): Call it.
937 2010-06-23 Sebastian Pop <sebastian.pop@amd.com>
939 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
941 2010-06-15 Sebastian Pop <sebastian.pop@amd.com>
943 * passes.c (init_optimization_passes): Add pass_graphite.
944 Schedule a pass_copy_prop before pass_graphite_transforms.
945 * timevar.def (TV_GRAPHITE): Declared.
946 * tree-pass.h (pass_graphite): Declared.
947 * tree-ssa-loop.c (pass_graphite): New.
949 * gcc.dg/graphite/id-20.c: New.
951 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
953 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
954 Remove calls to rename_nb_iterations and rename_sese_parameters.
955 * graphite-clast-to-gimple.h (gloog): Update declaration.
956 * graphite.c (graphite_transform_loops): Update call to gloog.
957 * sese.c (rename_variables_in_expr): Removed.
958 (rename_nb_iterations): Removed.
959 (rename_sese_parameters): Removed.
960 * sese.h (rename_nb_iterations): Removed.
961 (rename_sese_parameters): Removed.
963 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
965 * graphite-clast-to-gimple.c (gloog): Remove call to
966 sese_adjust_liveout_phis.
967 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
968 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
969 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
970 rewrite_phi_out_of_ssa.
971 * sese.c (get_vdef_before_sese): Removed.
972 (sese_adjust_vphi): Removed.
973 (sese_adjust_liveout_phis): Removed.
974 * sese.h (sese_adjust_liveout_phis): Removed.
976 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
978 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
979 argument for the place after which to insert the out of SSA copy.
980 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
981 (rewrite_phi_out_of_ssa): Same.
982 (rewrite_cross_bb_scalar_deps): Same.
983 (insert_copyout): Removed.
984 (insert_copyin): Removed.
985 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
986 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
989 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
991 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
992 (rewrite_reductions_out_of_ssa): Same.
993 (rewrite_commutative_reductions_out_of_ssa): Same.
994 (build_poly_scop): Do not call these functions.
995 * graphite-sese-to-poly.h (build_poly_scop): Declared.
996 (rewrite_reductions_out_of_ssa): Declared.
997 (rewrite_commutative_reductions_out_of_ssa): Declared.
998 * graphite.c (graphite_transform_loops): Call on every scop
999 rewrite_commutative_reductions_out_of_ssa before calling
1000 rewrite_reductions_out_of_ssa and build_scop_bbs.
1002 2010-06-12 Sebastian Pop <sebastian.pop@amd.com>
1004 * graphite-dependences.c (dot_deps): Make system call to dotty run
1006 (dot_deps_stmt): Same.
1007 * graphite-poly.c (dot_lst): Same.
1009 2010-06-11 Sebastian Pop <sebastian.pop@amd.com>
1011 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
1012 old_type in parameter.
1013 (gcc_type_for_value): Update call to gcc_type_for_interval.
1014 (compute_type_for_level_1): Renamed compute_type_for_level.
1015 Update call to gcc_type_for_interval.
1017 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1019 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
1020 the scev analysis when the variable is not used outside the loop
1021 in a close phi node: call compute_overall_effect_of_inner_loop.
1023 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1025 * graphite-sese-to-poly.c (single_pred_cond): Renamed
1026 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
1027 (build_sese_conditions_before): Renamed call to single_pred_cond.
1028 (build_sese_conditions_after): Same.
1030 2010-06-09 Sebastian Pop <sebastian.pop@amd.com>
1032 * graphite-poly.h: Fix comments and indentation.
1033 * graphite-sese-to-poly.c: Same.
1034 (build_sese_conditions_before): Compute stmt and gbb only when needed.
1035 * tree-chrec.c: Fix comments and indentation.
1036 (tree-ssa-loop-niter.c): Same.
1038 2010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
1040 * refined-regions.c (create_region): Only initialize the region.
1041 (find_regions_with_entry): Initialize parent relation and bbmap
1043 (build_regions_tree): Set outermost_region to region instead of
1045 (calculate_region_tree): Remove unneeded parameters.
1047 2010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
1049 * graphite-scop-detection.c (is_scop_p): New.
1050 (build_scops_new): New. A skeleton for the new scop detection.
1051 (build_scops_old): Renamed from build_scops.
1052 (build_scops): New version. Call the new and the old scop
1055 2010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
1056 Antoniu Pop <antoniu.pop@gmail.com>
1058 * Makefile.in (OBJS-common): Add refined-regions.o.
1059 (refined-regions.o): New.
1060 (graphite-scop-detection.o): Use refined-regions.h.
1061 * graphite-scop-detection.c: Include refined-regions.h
1062 (build_scops): Also build the refined region tree.
1063 * refined-regions.c: New. Adds an algorithm to detect refined
1065 (print_refined_region): New.
1066 (debug_refined_region): New.
1067 (refined_region_contains_bb_p): New.
1068 (refined_region_contains_region_p): New.
1069 (is_common_df): New.
1070 (struct find_regions_global_data): New.
1072 (typedef struct bb_bb_def): New.
1073 (new_bb_bb_def): New.
1074 (bb_bb_map_hash): New.
1075 (eq_bb_bb_map): New.
1078 (new_bb_reg_def): New.
1079 (bb_reg_map_hash): New.
1080 (eq_bb_reg_map): New.
1081 (find_new_region): New.
1082 (insert_new_reg): New.
1083 (insert_new_bb): New.
1084 (insert_shortcut): New.
1085 (get_next_postdom): New.
1086 (create_region): New.
1087 (find_regions_with_entry): New.
1088 (find_regions_adc): New.
1089 (find_regions): New.
1090 (get_topmost_parent): New.
1091 (build_regions_tree): New.
1092 (calculate_region_tree): New.
1093 (free_region_tree): New.
1094 * refined-regions.h: New.
1095 (struct refined_region): New.
1096 (calculate_region_tree): New.
1097 (free_region_tree): New.
1098 (refined_region_contains_bb_p): New.
1099 (refined_region_contains_region_p): New.
1100 (print_refined_region): New.
1101 (debug_refined_region): New.
1103 2010-05-26 Sebastian Pop <sebastian.pop@amd.com>
1105 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1108 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1110 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
1111 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
1113 2010-05-07 Sebastian Pop <sebastian.pop@amd.com>
1115 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
1116 phi_arg_in_outermost_loop.
1117 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
1118 (remove_invariant_phi): Same.
1120 2010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1122 * graphite-blocking.c
1123 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
1124 * graphite-clast-to-gimple.c
1125 (clast_to_gcc_expression): Same.
1126 (precision_for_value): Same.
1127 (precision_for_interval): Same.
1128 (gcc_type_for_interval): Same.
1129 (graphite_create_new_guard): Same.
1130 (compute_bounds_for_level): Same.
1131 (graphite_create_new_loop_guard): Same.
1132 * graphite-interchange.c
1133 (build_linearized_memory_access): Same.
1134 (pdr_stride_in_loop): Same.
1135 (memory_strides_in_loop_1): Same.
1136 (memory_strides_in_loop): Same.
1137 (extend_scattering): Same.
1138 (psct_scattering_dim_for_loop_depth): Same.
1139 (pbb_number_of_iterations): Same.
1141 (debug_iteration_domains): Same.
1143 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1144 (ppl_set_inhomogeneous_gmp): Same.
1145 (ppl_strip_loop): Same.
1146 (ppl_lexico_compare_linear_expressions): Same.
1147 (ppl_read_polyhedron_matrix): Same.
1148 (ppl_max_for_le_pointset): Same.
1150 (ppl_read_polyhedron_matrix): Same.
1151 (tree_int_to_gmp): Same.
1152 (gmp_cst_to_tree): Same.
1153 (ppl_set_inhomogeneous): Same.
1154 (ppl_set_inhomogeneous_tree): Same.
1155 (ppl_set_coef): Same.
1156 (ppl_set_coef_tree): Same.
1157 * graphite-sese-to-poly.c
1158 (build_pbb_scattering_polyhedrons): Same.
1159 (build_scop_scattering): Same.
1160 (scan_tree_for_params_right_scev): Same.
1161 (scan_tree_for_params): Same.
1162 (find_params_in_bb): Same.
1163 (find_scop_parameters): Same.
1164 (add_upper_bounds_from_estimated_nit): Same.
1165 (build_loop_iteration_domains): Same.
1166 (add_condition_to_domain): Same.
1167 (pdr_add_memory_accesses): Same.
1169 2010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
1171 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
1172 CLooG's value_* macros to their respective mpz_* counterparts.
1173 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
1174 (graphite_create_new_loop_guard): Same.
1175 * graphite-interchange.c (build_linearized_memory_access): Same.
1176 (pdr_stride_in_loop): Same.
1177 (memory_strides_in_loop_1): Same.
1178 (1st_interchange_profitable_p): Same.
1179 * graphite-poly.c (extend_scattering): Same.
1180 (psct_scattering_dim_for_loop_depth): Same.
1181 (pbb_number_of_iterations): Same.
1182 (pbb_number_of_iterations_at_time): Same.
1183 * graphite-poly.h (new_1st_loop): Same.
1184 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
1185 (oppose_constraint): Same.
1186 (insert_constraint_into_matrix): Same.
1187 (ppl_set_inhomogeneous_gmp): Same.
1188 (ppl_set_coef_gmp): Same.
1189 (ppl_strip_loop): Same.
1190 (ppl_lexico_compare_linear_expressions): Same.
1191 (ppl_max_for_le_pointset): Same.
1192 (ppl_min_for_le_pointset): Same.
1193 (ppl_build_realtion): Same.
1194 * graphite-ppl.h (gmp_cst_to_tree): Same.
1195 (ppl_set_inhomogeneous): Same.
1196 (ppl_set_inhomogeneous_tree): Same.
1197 (ppl_set_coef): Same.
1198 (ppl_set_coef_tree): Same.
1199 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
1200 (build_scop_scattering): Same.
1201 (add_value_to_dim): Same.
1202 (scan_tree_for_params_right_scev): Same.
1203 (scan_tree_for_params_int): Same.
1204 (scan_tree_for_params): Same.
1205 (find_params_in_bb): Same.
1206 (find_scop_parameters): Same.
1207 (add_upper_bounds_from_estimated_nit): Same.
1208 (build_loop_iteration_domains): Same.
1209 (create_linear_expr_from_tree): Same.
1210 (add_condition_to_domain): Same.
1211 (pdr_add_memory_accesses): Same.
1213 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1216 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1217 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1218 When converting an unsigned type to signed, double its precision.
1219 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1220 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1221 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1223 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1226 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1227 build_nonstandard_integer_type.
1228 (gcc_type_for_interval): Same.
1230 2010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1233 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1234 POINTER_PLUS_EXPR for pointer types.
1236 * gcc.dg/graphite/id-19.c: New.
1238 2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
1241 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1242 * graphite-clast-to-gimple.c: Include langhooks.h.
1243 (max_signed_precision_type): New.
1244 (max_precision_type): Takes two types as arguments.
1245 (precision_for_value): New.
1246 (precision_for_interval): New.
1247 (gcc_type_for_interval): New.
1248 (gcc_type_for_value): New.
1249 (gcc_type_for_clast_term): New.
1250 (gcc_type_for_clast_red): New.
1251 (gcc_type_for_clast_bin): New.
1252 (gcc_type_for_clast_expr): Split up into several functions.
1253 (gcc_type_for_clast_eq): Rewritten.
1254 (compute_bounds_for_level): New.
1255 (compute_type_for_level_1): New.
1256 (compute_type_for_level): New.
1257 (gcc_type_for_cloog_iv): Removed.
1258 (gcc_type_for_iv_of_clast_loop): Rewritten.
1259 (graphite_create_new_loop): Compute the lower and upper bound types
1260 with gcc_type_for_clast_expr.
1261 (graphite_create_new_loop_guard): Same.
1262 (find_cloog_iv_in_expr): Removed.
1263 (compute_cloog_iv_types_1): Removed.
1264 (compute_cloog_iv_types): Removed.
1265 (gloog): Do not call compute_cloog_iv_types.
1266 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1268 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1269 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1270 (GBB_CLOOG_IV_TYPES): Removed.
1272 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1274 2010-04-02 Sebastian Pop <sebastian.pop@amd.com>
1276 Reverted this commit: as at this point the loop closed SSA form
1277 is under a canonical form respecting the single argument condition.
1278 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1279 close phi nodes may have more than one argument.
1281 2010-04-01 Sebastian Pop <sebastian.pop@amd.com>
1283 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1284 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1285 (detect_commutative_reduction): Same.
1287 2010-03-31 Sebastian Pop <sebastian.pop@amd.com>
1289 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1290 close phi nodes may have more than one argument.
1292 2010-03-30 Richard Guenther <rguenther@suse.de>
1293 Zdenek Dvorak <ook@ucw.cz>
1294 Sebastian Pop <sebastian.pop@amd.com>
1297 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1298 with multiple arguments.
1299 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1301 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1303 * graphite-dependences.c (print_pddr): Call print_pdr with an
1305 * graphite-poly.c (debug_pdr): Add an extra argument for the
1308 (print_pbb_domain): Same.
1310 (print_scop_context): Same.
1312 (print_cloog): Same.
1313 (debug_pbb_domain): Same.
1317 (debug_scop_context): Same.
1319 (debug_cloog): Same.
1320 (print_scop_params): Same.
1321 (debug_scop_params): Same.
1322 (print_iteration_domain): Same.
1323 (print_iteration_domains): Same.
1324 (debug_iteration_domain): Same.
1325 (debug_iteration_domains): Same.
1326 (print_scattering_function): Same.
1327 (print_scattering_functions): Same.
1328 (debug_scattering_function): Same.
1329 (debug_scattering_functions): Same.
1330 * graphite-poly.h (debug_pdr): Update declaration.
1332 (print_pbb_domain): Same.
1334 (print_scop_context): Same.
1336 (print_cloog): Same.
1337 (debug_pbb_domain): Same.
1341 (debug_scop_context): Same.
1343 (debug_cloog): Same.
1344 (print_scop_params): Same.
1345 (debug_scop_params): Same.
1346 (print_iteration_domain): Same.
1347 (print_iteration_domains): Same.
1348 (debug_iteration_domain): Same.
1349 (debug_iteration_domains): Same.
1350 (print_scattering_function): Same.
1351 (print_scattering_functions): Same.
1352 (debug_scattering_function): Same.
1353 (debug_scattering_functions): Same.
1355 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1357 * graphite-poly.c (print_scattering_function_1): New.
1358 (print_scattering_function): Call it.
1359 (print_scop_params): Remove spaces at the end of lines.
1362 * graphite-poly.h (print_cloog): Declared.
1363 (debug_cloog): Declared.
1365 2010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1367 * tree-ssa-copy.c: Revert this previous change:
1368 (init_copy_prop): Loop closed phi nodes cancontain more than one
1370 (execute_copy_prop): Revert the previous change: do not call
1371 rewrite_into_loop_closed_ssa.
1373 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1374 Richard Guenther <rguenther@suse.de>
1377 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1378 contain more than one argument.
1379 (execute_copy_prop): Revert the previous change: do not call
1380 rewrite_into_loop_closed_ssa.
1382 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1383 * gcc.dg/graphite/id-pr43464-1.c: New.
1385 2010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1388 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1389 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1391 * gcc.dg/graphite/id-pr43464.c: New.
1393 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1395 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1397 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1398 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1399 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1400 to switch between adding the IV bump in loop->latch or in loop->header.
1402 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1404 * passes.c (init_optimization_passes): Add pass_copy_prop
1407 2010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1409 * graphite-poly.c (print_scattering_function): Pretty print following
1412 (print_pbb_domain): Same.
1413 (dump_gbb_cases): Same.
1414 (dump_gbb_conditions): Same.
1417 (print_scop_params): Same.
1418 (print_scop_context): Same.
1420 (print_pbb_body): New.
1421 (lst_indent_to): New.
1422 (print_lst): Start new lines with a #.
1423 * graphite-poly.h (pbb_bb): New.
1424 (pbb_index): Use pbb_bb.
1425 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1427 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1429 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1432 * gcc.dg/graphite/id-pr43351.c
1434 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1437 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1438 call insert_out_of_ssa_copy for default definitions.
1439 * gfortran.dg/graphite/id-pr43354.f: New.
1441 2010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1444 * gfortran.dg/graphite/pr43349.f: New.
1446 2010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1448 * graphite-clast-to-gimple.c (my_long_long): Defined.
1449 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1450 * graphite-sese-to-poly.c (my_long_long): Defined.
1451 (scop_ivs_can_be_represented): Use it.
1453 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1455 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1456 graphite-max-bbs-per-function, and loop-block-tile-size.
1457 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1459 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1461 2010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1463 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1464 forward declaration.
1465 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1466 (add_upper_bounds_from_estimated_nit): New.
1467 (build_loop_iteration_domains): Use it.
1469 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1471 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1473 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1476 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1477 should be an INTEGER_CST. Also handle CASE_CONVERT.
1478 * gcc.dg/graphite/pr43306.c: New.
1480 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1482 * graphite.c (graphite_initialize): To bound the number of bbs per
1483 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1484 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1485 * doc/invoke.texi: Document it.
1487 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1489 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1490 * graphite-sese-to-poly.h (build_poly_scop): Same.
1492 2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1494 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1495 the number of parameters in the scop. Use as an upper bound
1496 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1497 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1498 * doc/invoke.texi: Document it.
1500 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1502 * graphite-sese-to-poly.c (add_param_constraints): Use
1503 lower_bound_in_type and upper_bound_in_type.
1505 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1507 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1508 instead of unsigned_type_node.
1510 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1511 Reza Yazdani <reza.yazdani@amd.com>
1514 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1515 on pointer type parameters.
1517 * gcc.dg/graphite/run-id-4.c: New.
1519 2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1522 * gcc.dg/graphite/run-id-3.c: New.
1524 2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1525 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1527 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1528 handle conversions from pointer to integers.
1529 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1530 induction variable, to be able to work with code generated by CLooG.
1531 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1532 (build_poly_scop): Bail out if we cannot codegen a loop.
1534 2010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1536 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1537 code generation with gloog_error.
1539 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1541 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1542 Call fold_convert on all the returned values.
1543 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1544 the type of the resulting expression.
1546 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1548 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1549 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1550 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1552 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1554 * graphite-dependences.c (map_into_dep_poly): Removed.
1555 (dependence_polyhedron_1): Use combine_context_id_scat.
1557 2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1559 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1560 (struct poly_bb): Same.
1561 (combine_context_id_scat): New.
1563 2010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1566 * sese.c (name_defined_in_loop_p): Return false for default
1569 * gcc.dg/graphite/pr42326.c: New.
1571 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1573 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1574 and clean up the logic.
1576 2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1578 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1581 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1584 * graphite-scop-detection.c (create_single_exit_edge): Move
1585 the call to find_single_exit_edge to....
1586 (create_sese_edges): ...here. Don't handle multiple edges
1587 exiting the function.
1588 (build_graphite_scops): Don't handle multiple edges
1589 exiting the function.
1591 * gcc.dg/graphite/pr43083.c: New.
1593 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1596 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1597 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1599 * gfortran.dg/graphite/pr43097.f: New.
1601 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1602 Manuel López-Ibáñez <manu@gcc.gnu.org>
1605 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1607 2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1610 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1612 * g++.dg/graphite/pr43026.C: New.
1614 2010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1616 * Merge from mainline (154736:156693).
1618 2010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1621 * gcc.dg/graphite/pr43012.c: New.
1623 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1625 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1626 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1628 * g++.dg/graphite/pr42930.C: New.
1630 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1633 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1634 graphite_can_represent_init for MULT_EXPR.
1636 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1640 * graphite-sese-to-poly.c (remove_phi): New.
1641 (translate_scalar_reduction_to_array): Call remove_phi.
1643 * gcc.dg/graphite/pr42530.c: New.
1644 * gcc.dg/graphite/pr42914.c: New.
1646 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1649 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1650 * graphite-clast-to-gimple.h (gloog): Update declaration.
1651 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1652 * graphite-poly.h (struct poly_bb): Add missing comments.
1653 (struct scop): Add poly_scop_p field.
1655 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1656 * graphite.c (graphite_transform_loops): Build the polyhedral
1657 representation for each scop before code generation.
1658 * sese.c (rename_variables_in_operand): Removed.
1659 (rename_variables_in_expr): Return the renamed expression.
1660 (rename_sese_parameters): New.
1661 * sese.h (rename_sese_parameters): Declared.
1663 * gcc.dg/graphite/pr42771.c: New.
1665 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1667 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1669 * gcc.dg/graphite/block-1.c: Same.
1670 * gcc.dg/graphite/block-3.c: Same.
1671 * gcc.dg/graphite/block-4.c: Same.
1672 * gcc.dg/graphite/block-5.c: Same.
1673 * gcc.dg/graphite/block-6.c: Same.
1674 * gcc.dg/graphite/block-7.c: Same.
1675 * gcc.dg/graphite/interchange-0.c: Same.
1676 * gcc.dg/graphite/interchange-1.c: Same.
1677 * gcc.dg/graphite/interchange-10.c: Same.
1678 * gcc.dg/graphite/interchange-11.c: Same.
1679 * gcc.dg/graphite/interchange-12.c: Same.
1680 * gcc.dg/graphite/interchange-2.c: Same.
1681 * gcc.dg/graphite/interchange-3.c: Same.
1682 * gcc.dg/graphite/interchange-4.c: Same.
1683 * gcc.dg/graphite/interchange-5.c: Same.
1684 * gcc.dg/graphite/interchange-6.c: Same.
1685 * gcc.dg/graphite/interchange-7.c: Same.
1686 * gcc.dg/graphite/interchange-8.c: Same.
1687 * gcc.dg/graphite/interchange-9.c: Same.
1688 * gcc.dg/graphite/interchange-mvt.c: Same.
1690 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1692 * gfortran.dg/graphite/id-19.f: New.
1693 * gfortran.dg/graphite/pr14741.f90: New.
1694 * gfortran.dg/graphite/pr41924.f90: New.
1695 * gfortran.dg/graphite/run-id-2.f90: New.
1697 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1700 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1701 to unknown_dependence.
1702 (graphite_legal_transform_dr): Handle the unknown_dependence.
1703 (graphite_carried_dependence_level_k): Same.
1705 2010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1707 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1709 2010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1710 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1713 * graphite-dependences.c (build_lexicographical_constraint): Return
1714 a union of dependence polyhedra.
1715 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1717 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1718 * gcc.dg/graphite/block-4.c: Same.
1719 * gcc.dg/graphite/block-7.c: Same.
1720 * gcc.dg/graphite/interchange-12.c: Same.
1721 * gcc.dg/graphite/interchange-mvt.c: Same.
1722 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1723 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1724 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1726 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1728 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1729 the execution check to FAIL. This testcase is miscompiled by Graphite
1730 and the check should be re-enabled.
1731 * gcc.dg/graphite/interchange-mvt.c: Same.
1732 * gcc.dg/graphite/block-0.c: Same.
1733 * gcc.dg/graphite/block-4.c: Same.
1734 * gcc.dg/graphite/block-7.c: Same.
1736 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1738 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1739 * gcc.dg/graphite/scop-0.c: Fix spaces.
1740 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1741 * gfortran.dg/graphite/block-2.f: Same.
1742 * gfortran.dg/graphite/block-3.f90: Same.
1743 * gfortran.dg/graphite/block-4.f90: Same.
1744 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1745 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1747 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1749 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1750 PDDR_ORIGINAL_SCATTERING_P.
1751 (pddr_is_empty): Rewritten.
1752 (print_dependence_polyhedron_layout): New.
1755 (build_alias_set_powerset): Moved up.
1756 (poly_drs_may_alias_p): Moved up.
1757 (lexicographically_gt_p): Removed.
1758 (build_lexicographically_gt_constraint): Renamed
1759 build_lexicographical_constraint, reimplemented.
1760 (dependence_polyhedron_1): Simplified parameters.
1761 (dependence_polyhedron): Same. Keep along empty PDDRs
1762 to make efficient use of the cache.
1763 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1764 (graphite_legal_transform_dr): Rewritten.
1765 (graphite_legal_transform_bb): Pass fewer arguments to
1766 graphite_legal_transform_dr.
1767 (graphite_carried_dependence_level_k): Simplified implementation.
1768 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1769 (dot_transformed_deps_stmt_1): Same.
1770 (dot_original_deps): Same.
1771 (dot_transformed_deps): Same.
1772 * graphite-dependences.h (struct poly_ddr): Added a new field
1773 original_scattering_p.
1774 (PDDR_ORIGINAL_SCATTERING_P): New.
1775 (print_pddr): Declared.
1776 (debug_pddr): Declared.
1777 * graphite-ppl.c: Clarify comment.
1778 * sese.h (print_gimple_bb): Removed unused declaration.
1781 2010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1783 * g++.dg/graphite/graphite.exp: Rewritten.
1784 * gcc.dg/graphite/graphite.exp: Rewritten.
1785 * gfortran.dg/graphite/graphite.exp: Rewritten.
1786 * gcc.dg/graphite/block-0.c: Added runtime test.
1787 * gcc.dg/graphite/block-1.c: Same.
1788 * gcc.dg/graphite/block-3.c: Same.
1789 * gcc.dg/graphite/block-4.c: Same.
1790 * gcc.dg/graphite/block-5.c: Same.
1791 * gcc.dg/graphite/block-6.c: Same.
1792 * gcc.dg/graphite/block-7.c: Same.
1793 * gcc.dg/graphite/interchange-0.c: Same.
1794 * gcc.dg/graphite/interchange-1.c: Same.
1795 * gcc.dg/graphite/interchange-10.c: Same.
1796 * gcc.dg/graphite/interchange-11.c: Same.
1797 * gcc.dg/graphite/interchange-12.c: Same.
1798 * gcc.dg/graphite/interchange-2.c: Same.
1799 * gcc.dg/graphite/interchange-3.c: Same.
1800 * gcc.dg/graphite/interchange-4.c: Same.
1801 * gcc.dg/graphite/interchange-5.c: Same.
1802 * gcc.dg/graphite/interchange-6.c: Same.
1803 * gcc.dg/graphite/interchange-7.c: Same.
1804 * gcc.dg/graphite/interchange-8.c: Same.
1805 * gcc.dg/graphite/interchange-9.c: Same.
1806 * gcc.dg/graphite/interchange-mvt.c: Same.
1807 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1809 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1811 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1814 2010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1816 * common.opt: Add -fgraphite-cloog-opts.
1817 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1818 * opts.c (decode_options): Same.
1820 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1822 * gcc.dg/graphite/id-17.c: New.
1823 * gcc.dg/graphite/pr41888.c: New.
1824 * gcc.dg/graphite/scop-22.c: New.
1825 * gfortran.dg/graphite/pr40982.f90: New.
1827 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1829 * graphite-dependences.c: Clarify comments.
1830 (build_pddr): Add an extra parameter direction.
1831 (graphite_legal_transform_dr): Use build_pddr.
1832 (dot_original_deps_stmt_1): Update use of build_pddr.
1833 (dot_transformed_deps_stmt_1): Same.
1834 (dot_original_deps): Same.
1835 (dot_transformed_deps): Same.
1837 * gcc.dg/graphite/interchange-12.c: New.
1838 * gcc.dg/graphite/block-7.c: New.
1840 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1842 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1843 (pddr_transformed_scattering): Removed.
1844 (graphite_legal_transform_dr): Use build_pddr.
1845 (dot_original_deps_stmt_1): Same.
1846 (dot_transformed_deps_stmt_1): Same.
1847 (dot_original_deps): Same.
1848 (dot_transformed_deps): Same.
1850 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1852 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1853 (build_lexicographically_gt_constraint): Same.
1854 (dependence_polyhedron_1): Same.
1855 (dependence_polyhedron): Same.
1857 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1859 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1860 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1861 (lexicographically_gt_p): Change type of direction to int.
1862 (build_lexicographically_gt_constraint): Same.
1863 (dependence_polyhedron_1): Same.
1864 (dependence_polyhedron): Same.
1865 (pddr_original_scattering): Use integers for direction.
1866 (pddr_transformed_scattering): Same.
1867 (graphite_legal_transform_dr): Same.
1868 (graphite_carried_dependence_level_k): Same.
1870 2010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1872 * graphite-dependences.c (build_pairwise_constraint): Renamed
1873 ppl_build_relation. Moved...
1874 (dr_equality_constraints): Use ppl_build_relation.
1875 (build_pairwise_scheduling_equality): Same.
1876 (build_pairwise_scheduling_inequality): Same.
1877 * graphite-ppl.c (ppl_build_relation): ...here.
1878 * graphite-ppl.h (ppl_build_relation): Declared.
1880 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1883 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1884 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1885 Set gloog_error when such an expression failed to be built.
1886 (translate_clast): Early return when gloog_error is set.
1887 (gloog): Clear gloog_error. When gloog_error is set, call
1888 set_ifsese_condition to enable the original code. Return the status
1889 of the code generation based on gloog_error.
1890 * sese.c (set_ifsese_condition): New.
1891 * sese.h (set_ifsese_condition): Declared.
1893 * g++.dg/graphite/pr42681.C: New.
1895 2010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1898 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1899 rename_nb_iterations.
1900 * sese.c (rename_variables_in_operand): New.
1901 (rename_variables_in_expr): New.
1902 (rename_nb_iterations): New.
1903 (sese_adjust_liveout_phis): Update the rename_map.
1904 * sese.h (rename_nb_iterations): Declared.
1905 * tree-scalar-evolution.c (scev_reset_htab): New.
1906 (scev_reset): Call scev_reset_htab.
1907 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1909 * gfortran.dg/graphite/pr42732.f: New.
1911 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1914 * graphite-clast-to-gimple.c: Fix formatting.
1915 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1916 (expr_defined_in_loop_p): New.
1917 (add_loop_exit_phis): Also handle full expressions: remove from
1918 the rename_map the expressions defined in the loop that we're closing.
1920 * gfortran.dg/graphite/pr42393-1.f90: New.
1921 * gfortran.dg/graphite/pr42393.f90: Add new flags
1922 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1923 make this testcase useful in the Graphite branch.
1925 2010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1927 * graphite-scop-detection.c (exclude_component_ref): Removed.
1928 (is_simple_operand): Removed.
1929 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1931 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1934 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1935 the array indexing of ADDR_EXPRs.
1937 * gcc.dg/graphite/pr42221.c: New.
1939 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1942 * graphite.c (graphite_finalize): Call scev_reset.
1943 (graphite_transform_loops): Do not call scev_reset between the code
1944 generation of scops.
1946 * gcc.dg/graphite/pr42521.c: New.
1948 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1950 * graphite-interchange.c (memory_stride_in_loop): Renamed
1952 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1953 (memory_strides_in_loop): Memoize the memory strides per loop.
1954 (lst_interchange_profitable_p): Do not initialize to zero the memory
1956 * graphite-poly.h (struct lst): Add a field memory_strides.
1957 (LST_LOOP_MEMORY_STRIDES): New.
1958 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1959 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1961 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1963 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1964 memory_strides_in_loop. Gather memory strides on a whole loop.
1965 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1966 (lst_interchange_profitable_p): Removed.
1967 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1969 2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1971 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1972 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1973 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1974 Remove context_loop and level.
1976 2010-01-07 Richard Guenther <rguenther@suse.de>
1978 PR tree-optimization/42641
1979 * sese.c (rename_map_elt_info): Use the SSA name version, do
1982 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1984 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1985 blocked" only when both the strip mine and the interchange have
1988 * gcc.dg/graphite/block-2.c: Removed.
1989 * gcc.dg/graphite/block-3.c: Add scan pattern.
1990 * gcc.dg/graphite/block-4.c: Same.
1991 * gcc.dg/graphite/block-5.c: Same.
1992 * gcc.dg/graphite/block-6.c: Same.
1994 2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1996 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1997 before allocating a new one.
1998 (copy_renames): Check that slot is not NULL.
1999 (mark_bb_with_pbb): Same.
2000 (compute_cloog_iv_types_1): Same.
2001 * graphite-interchange.c (lst_perfect_nestify): Free the before,
2002 nest, and after LSTs.
2003 (lst_try_interchange_loops): Same.
2005 2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
2008 * graphite-interchange.c (lst_try_interchange_loops): Do not return
2009 the before, nest, and after LSTs.
2010 (lst_try_interchange): Removed.
2011 (lst_interchange_select_inner): Do not iterate over the LSTs if they
2013 (lst_interchange_select_outer): Apply interchange on the outer loop
2014 until there are no more changes in the inner loops.
2016 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2018 Revert patch fixing PR middle-end/42221.
2020 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2023 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
2026 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
2028 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2031 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
2032 that contain only one statement.
2034 * gfortran.dg/graphite/pr42180.f90: New.
2036 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2039 * gfortran.dg/graphite/pr42393.f90: New.
2041 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2044 * gfortran.dg/graphite/pr42186.f90: New.
2046 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2049 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
2050 Insert the reduction copy in the same block as the phi node.
2051 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
2053 * gcc.dg/graphite/pr42205-1.c: New.
2054 * gcc.dg/graphite/pr42205-2.c: New.
2056 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2059 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2060 the array indexing of ADDR_EXPRs.
2062 * gcc.dg/graphite/pr42221.c: New.
2064 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
2068 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
2069 index. Call lst_interchange_select_inner only once.
2070 (lst_interchange_select_inner): Update use of lst_try_interchange.
2071 (lst_interchange_select_outer): Update.
2073 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2077 * graphite-interchange.c (lst_try_interchange): Do not increment the
2078 the OUTER index when there is no AFTER kernel. Do not increment the
2079 OUTER index for after processing the AFTER kernel.
2080 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
2081 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
2082 index. Do not pass to lst_interchange_select_inner the OUTER index.
2083 (scop_do_interchange): Update use of lst_interchange_select_outer.
2085 * gfortran.dg/graphite/graphite.exp
2086 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
2087 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
2088 the graphite dump file.
2089 * gfortran.dg/graphite/interchange-2.f: Same.
2090 * gfortran.dg/graphite/pr42334-1.f: New.
2092 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
2096 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2098 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2099 (lst_try_interchange): Reimplemented.
2100 (lst_interchange_select_inner): Same.
2101 (lst_do_interchange): Renamed lst_interchange_select_outer.
2103 (scop_do_interchange): Update use of lst_interchange_select_outer.
2105 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2106 * gcc.dg/graphite/block-0.c: Un-XFAILed.
2107 * gcc.dg/graphite/pr42211.c: New.
2108 * gfortran.dg/graphite/pr42334.f90: New.
2110 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
2113 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2114 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2116 * gfortran.dg/graphite/pr42181.f90: New.
2118 2009-12-12 Sebastian Pop <sebpop@gmail.com>
2121 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2122 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2123 (detect_commutative_reduction_arg): Simplified.
2124 (detect_commutative_reduction): Early return when the argument of
2125 the close phi is not of an SSA_NAME.
2127 * gcc.dg/graphite/pr42284.c: New.
2129 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
2131 * dbgcnt.def (graphite_scop): New counter.
2132 * graphite.c: Include dbgcnt.h
2133 (graphite_transform_loops): Use new counter to limit transformations.
2135 2009-12-08 Sebastian Pop <sebpop@gmail.com>
2138 * graphite-scop-detection.c (graphite_can_represent_init): Also
2139 handle more complex MULT_EXPRs containing parameters by recursion
2142 * gfortran.dg/graphite/pr42285.f90: New.
2144 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
2146 * g++.dg/graphite/pr42130.C: Fix type.
2148 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
2150 * g++.dg/graphite/pr42130.C: Correct testcase.
2152 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2154 * Merge from mainline (154493:154734).
2156 2009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
2158 * Merge from mainline (151362:154491).
2160 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
2162 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2163 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2165 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2168 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2169 translate_clast_for_loop): New.
2170 (translate_clast_for): Add a condition around the loop, to do not
2171 execute loops with zero iterations.
2172 * g++.dg/graphite/pr42130.C: New.
2173 * gcc.dg/graphite/pr35356-2.c: Adapt.
2175 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2177 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2178 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2179 Remove context_loop and level.
2181 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2183 * graphite-clast-to-gimple.c (translate_clast_user,
2184 translate_clast_for, translate_clast_guard): Simplify and move common
2185 elements to translate_clast().
2186 (translate_clast): Simplify and get common elements.
2188 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
2190 * graphite-clast-to-gimple.c (translate_clast_user,
2191 translate_clast_for, translate_clast_guard): Split out of
2194 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
2196 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2197 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2198 debug_clast_name_indexes_1, debug_clast_name_indexes,
2199 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2200 (clast_name_to_gcc, clast_to_gcc_expression,
2201 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2202 gcc_type_for_clast_eq, graphite_translate_clast_equation,
2203 graphite_create_guard_cond_expr, graphite_create_new_loop,
2204 translate_clast): Add params_index.
2205 (initialize_cloog_names): Create parameter strings from scratch, do
2206 not reference other strings.
2207 (create_params_index): New.
2208 (gloog): Initialize params_index.
2209 * graphite-scop-detection (free_scops_1): Removed.
2210 (limit_scops): Use normal free_scops.
2211 * graphite-sese-to-poly.c (save_var_names): Removed.
2212 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2213 and SESE_PARAMS_INDEX.
2214 * sese.c (new_sese, free_sese): Dito.
2215 * sese.h (struct sese): Remove params_index, params_names.
2216 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2218 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2220 Revert the following patch from 2009-09-14:
2221 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2222 tree-scalar-evolution.h, and then tree-data-ref.h.
2223 * graphite-clast-to-gimple.c: Same.
2224 * graphite-dependences.c: Same.
2225 * graphite-interchange.c: Same.
2226 * graphite-poly.c: Same.
2227 * graphite-scop-detection.c: Same.
2228 * graphite-sese-to-poly.c: Same.
2230 * lambda-code.c: Same.
2231 * matrix-reorg.c: Same.
2232 * tree-data-ref.c: Same.
2233 * tree-if-conv.c: Same.
2234 * tree-loop-distribu: Same.: Same.
2235 * tree-loop-linear.c: Same.
2236 * tree-parloops.c: Same.
2237 * tree-predcom.c: Same.
2238 * tree-vect-patterns.c: Same.
2240 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2242 Revert patch from 2009-09-14.
2243 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2244 passes at -O1 and below.
2246 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2249 * gcc.dg/graphite/pr40281.c: New.
2251 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2252 evolutions should not variate in inner loops.
2254 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2257 * gfortran.dg/graphite/pr42050.f90: New.
2259 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2261 * graphite-interchange.c (memory_strides_in_loop_depth): New.
2262 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2264 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2266 * graphite-blocking.c (scop_do_block): New.
2267 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2268 * graphite-poly.h (scop_do_block): Declared.
2270 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2272 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2273 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
2274 to transform depth into the time_depth before calling
2275 pbb_number_of_iterations_at_time.
2276 (lst_do_strip_mine): Use a scalar variable instead of recomputing
2279 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2281 Reverted the patch for "scattering permutations" from 2009-10-28.
2283 * graphite-poly.c (print_permutation): New.
2284 (debug_permutation): New.
2285 (new_poly_bb): Initialize PBB_PERMUTATION.
2286 (free_poly_bb): Free PBB_PERMUTATION.
2287 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2288 (struct pbb_permutation_elt): New.
2289 (PBB_PERMUTATION_ELT_STRIDE): New.
2290 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2291 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2292 (new_pbb_permutation_elt): New.
2293 (pbb_permutation_elt_free): New.
2294 (struct poly_bb): Add field permutation.
2295 (PBB_PERMUTATION): New.
2296 (print_permutation): Declared.
2297 (debug_permutation): Declared.
2299 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
2301 * graphite-interchange.c (build_partial_difference): New.
2302 (memory_stride_in_loop): Refactored the computation of
2303 equality constraints into build_partial_difference function.
2304 Added support for debugging stride computations.
2306 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2308 * graphite-clast-to-gimple.c (gloog): Free if_region,
2309 if_region->true_region, and if_region->region.
2310 * sese.c (if_region_set_false_region): Free if_region->false_region.
2311 (create_if_region_on_edge): Do not use GGC_NEW.
2312 (move_sese_in_condition): Remove useless initialization.
2314 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2316 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2317 for the loops created by the loop distribution. Do not modify the
2319 (lst_try_interchange_loops): Same. Use a temporary LST for the
2320 transformed schedule. Call lst_update_scattering before data
2321 dependence analysis.
2322 (lst_try_interchange): Pass an extra parameter INDEX.
2323 (lst_do_interchange_1): New.
2324 (lst_do_interchange): Call lst_do_interchange_1.
2325 (scop_do_interchange): Call lst_update_scattering.
2326 * graphite-poly.c (apply_poly_transforms): Do not call
2327 lst_update_scattering.
2328 * graphite-poly.h (lst_pred): New.
2330 (lst_find_first_pbb): Return NULL when not found.
2332 (lst_insert_in_sequence): Allow LST1 to be NULL.
2334 (lst_substitute_3): New.
2335 * gcc.dg/graphite/interchange-1.c: XFail.
2336 * gcc.dg/graphite/interchange-8.c: XFail.
2337 * gcc.dg/graphite/interchange-11.c: XFail.
2339 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2341 * graphite-interchange.c (lst_perfectly_nested_p): New.
2342 (lst_perfect_nestify): New.
2343 (lst_try_interchange_loops): Call store_lst_schedule,
2344 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2345 (scop_do_interchange): Avoid redundant legality test.
2346 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2347 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2348 * graphite-poly.h (psct_static_dim): New.
2349 (lst_dewey_number_at_depth): New.
2350 (lst_find_pbb): Restructured.
2351 (lst_find_first_pbb): Restructured.
2352 (lst_find_last_pbb): New.
2353 (lst_contains_p): New.
2354 (lst_contains_pbb): New.
2355 (lst_create_nest): New.
2356 (lst_remove_from_sequence): New.
2357 (pbb_update_scattering): New.
2358 (lst_update_scattering_under): New.
2359 (lst_update_scattering_seq): New.
2360 (lst_update_scattering): New.
2361 (lst_insert_in_sequence): New.
2362 (lst_distribute_lst): New.
2363 (lst_remove_all_before_including_pbb): New.
2364 (lst_remove_all_before_excluding_pbb): New.
2366 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2368 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2369 get_loop_exit_edges.
2371 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2373 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2375 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2377 * graphite-poly.c (print_permutation): New.
2378 (debug_permutation): New.
2379 (new_poly_bb): Initialize PBB_PERMUTATION.
2380 (free_poly_bb): Free PBB_PERMUTATION.
2381 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2382 (struct pbb_permutation_elt): New.
2383 (PBB_PERMUTATION_ELT_STRIDE): New.
2384 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2385 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2386 (new_pbb_permutation_elt): New.
2387 (pbb_permutation_elt_free): New.
2388 (struct poly_bb): Add field permutation.
2389 (PBB_PERMUTATION): New.
2390 (print_permutation): Declared.
2391 (debug_permutation): Declared.
2393 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2395 * graphite-clast-to-gimple.c (gloog): Do not call
2396 sese_reset_aux_in_loops.
2397 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2398 extra argument for domains. Do not use loop->aux.
2399 (build_scop_iteration_domain): Initialize and free domains, pass it
2400 to build_loop_iteration_domains and extract the information from
2401 domains. Do not use loop->aux.
2402 * sese.c (sese_reset_aux_in_loops): Removed.
2403 * sese.h (sese_reset_aux_in_loops): Removed.
2405 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2407 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2408 (dependency_in_loop_p): Same.
2409 (translate_clast): Do not use loop->aux. Initialize
2410 loop->can_be_parallel.
2411 (mark_loops_parallel): Removed.
2412 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2413 * graphite.c (free_aux_in_new_loops): Removed.
2414 (graphite_finalize): Do not call free_aux_in_new_loops.
2415 (graphite_transform_loops): Do not call mark_loops_parallel.
2417 2009-10-26 Li Feng <nemokingdom@gmail.com>
2419 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2420 (translate_clast): Pass an extra parameter LEVEL.
2421 Call get_scattering_level.
2422 * graphite-clast-to-gimple.h (get_scattering_level): New.
2424 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2426 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2427 * cfgloop.h (struct loop): New field single_iv.
2429 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2430 loop->aux anymore: use loop->single_iv.
2431 (graphite_loop_normal_form): Moved...
2432 (build_graphite_loop_normal_form): Removed.
2433 (gloog): Do not call build_graphite_loop_normal_form.
2434 (free_aux_in_new_loops): Moved...
2435 (mark_loops_parallel): Restructure.
2436 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2437 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2438 (scop_canonicalize_loops): New.
2439 (build_poly_scop): Call scop_canonicalize_loops.
2440 * graphite.c (free_aux_in_new_loops): ...here.
2442 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2444 * g++.dg/graphite/graphite.exp: Add the same rules as in
2445 gcc.dg/graphite/graphite.exp.
2447 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2449 * g++.dg/graphite/id-1.C: New.
2451 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2453 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2455 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2456 (rewrite_phi_out_of_ssa): Same.
2457 (rewrite_cross_bb_scalar_deps): Same.
2458 (translate_scalar_reduction_to_array): Same.
2460 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2462 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2465 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2467 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2468 (build_scop_drs): Call dump_alias_graphs.
2470 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2472 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2473 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2474 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2475 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2476 * graphite-poly.h (free_lst): New.
2477 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2478 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2480 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2482 * graphite-poly.h (struct scop): Add a field saved_schedule.
2483 (SCOP_SAVED_SCHEDULE): New.
2484 (store_lst_schedule): New.
2485 (restore_lst_schedule): New.
2486 (store_scattering): Call store_lst_schedule.
2487 (restore_scattering): Call restore_lst_schedule.
2489 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2491 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2492 (pdr_add_alias_set): Same.
2493 (build_poly_dr): Same.
2494 (build_alias_set_optimal_p): Same.
2495 (build_base_obj_set_for_drs): Same. Do not store the result of
2498 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2500 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2501 all_components_are_cliques to 1.
2503 2009-10-20 Li Feng <nemokingdom@gmail.com>
2505 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2507 (pdr_add_alias_set): Update retrieving alias_set_num.
2508 (build_poly_dr): Update retrieving dr_base_object_set.
2509 (partition_drs_to_sets): Remove.
2510 (build_alias_set_optimal_p): New.
2511 (build_alias_set_for_drs): Rename.
2512 (build_scop_drs): Update.
2513 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2514 (ALIAS_SET_INDEX): Remove.
2515 (BASE_OBJECT_SET_INDEX): Remove.
2517 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2519 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2521 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2523 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2524 loop upper bounds for 1-element arrays at end of structures.
2525 * tree-flow.h (array_at_struct_end_p): Declared.
2526 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2528 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2530 * g++.dg/graphite/pr41305.C: New.
2532 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
2534 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2535 construction of parameter constraints from loop iteration analysis.
2536 * gcc.dg/graphite/run-id-2.c: New test.
2538 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2540 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2543 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2545 * graphite-dependences.c (dependence_polyhedron_1): Remove
2546 unused gdim dimensions from the DDR polyhedron.
2548 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2550 * graphite-dependences.c (pddr_transformed_scattering): New.
2551 (dot_original_deps_stmt_1): New.
2552 (dot_transformed_deps_stmt_1): New.
2553 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2554 dot_transformed_deps_stmt_1.
2555 (dot_original_deps): New.
2556 (dot_transformed_deps): New.
2557 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2559 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2561 * graphite-dependences.c (reduction_dr_1): Remove wrong
2562 assert: reduction BBs can have multiple reduction writes
2563 to memory. interchange-3.f90 is an example.
2565 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2567 * gfortran.dg/graphite/interchange-3.f90: New.
2569 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2571 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2573 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2575 * graphite-dependences.c (dependence_polyhedron_1): Add the
2576 context to the dependence polyhedron.
2578 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2580 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2581 PBB_PDR_DUPLICATES_REMOVED.
2582 (new_poly_bb): Same.
2584 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2586 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2588 (build_loop_iteration_domains): Extract bounds on parameters
2589 based on the data size.
2590 (build_scop_context): Do not initialize SCOP_CONTEXT;
2591 add new constraints.
2593 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2595 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2596 * graphite-ppl.h (graphite-ppl.h): Declared.
2598 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2600 * graphite-ppl.c (ppl_print_linear_expr): New.
2601 (debug_ppl_linear_expr): New.
2602 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2603 (debug_ppl_linear_expr): Declared.
2605 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2607 * graphite-interchange.c: Fix comments.
2608 * gcc.dg/graphite/block-1.c: Fix comments.
2610 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2612 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2613 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2615 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2617 Reapply the patch from Alexander Monakov that disappeared during
2618 the last merges from trunk.
2620 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2622 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2623 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2625 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2627 * graphite-interchange.c (memory_stride_in_loop): The depth
2628 argument corresponds to a dynamic time dimension, so use
2629 psct_dynamic_dim to refer to the transformed scattering dimension.
2631 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2633 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2635 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2637 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2639 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2640 the root of the LST.
2641 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2643 (print_lst): Print the root of LST in a different format.
2644 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2646 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2648 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2650 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2652 * doc/passes.texi: Document the Graphite infrastructure.
2654 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2656 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2657 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2658 and check the SSA representation.
2660 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2662 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2664 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2666 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2668 * gcc.dg/graphite/interchange-11.c: New.
2670 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2672 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2674 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2676 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2677 Add -fno-loop-strip-mine and -fno-loop-interchange.
2678 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2679 -fno-loop-strip-mine.
2680 * gfortran.dg/graphite/graphite.exp: Same.
2682 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2684 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2685 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2686 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2687 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2688 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2689 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2690 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2691 DEFAULT_FLAGS_GRAPHITE_SCOP.
2692 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2693 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2695 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2697 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2699 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2700 Sebastian Pop <sebastian.pop@amd.com>
2702 * graphite-interchange.c (build_linearized_memory_access): Pass an
2703 offset as parameter.
2704 (memory_stride_in_loop): Include transform scattering in the
2705 access functions to be able to querry the strides in the
2707 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2708 not the psct_iterator_dim.
2710 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2712 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2713 (lst_do_strip_mine_loop): New.
2714 (lst_do_strip_mine): New.
2715 (scop_do_strip_mine): Call lst_do_strip_mine.
2716 * graphite-poly.h (lst_add_loop_under_loop): New.
2717 (lst_find_first_pbb): New.
2719 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2721 * graphite-poly.c (loop_to_lst): Fix LST creation.
2723 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2725 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2726 sizeof(unsigned long) to make it run on 32bit systems.
2728 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2730 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2733 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2735 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2737 (write_alias_graph_to_ascii_dot): New.
2738 (write_alias_graph_to_ascii_ecc): Ditto.
2739 (partition_drs_to_sets): Add testing of optimality of current method
2740 which assigns alias numbers according to DFS Comopnent number. used
2741 as heuristic for the upcoming ECC algorithm.
2742 (build_scop_drs): Write to file also with the ecc and dot format.
2744 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2746 * gfortran.dg/graphite/interchange-1.f: XFail.
2748 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2750 * graphite.c (graphite_initialize): Do not handle functions with
2751 more than 100 basic blocks.
2753 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2755 * graphite-blocking.c (pbb_do_strip_mine): Use
2756 PARAM_LOOP_BLOCK_TILE_SIZE.
2758 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2760 * graphite-poly.c (dot_lst_1): New.
2762 * graphite-poly.h (dot_lst): Declared.
2764 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2766 * graphite-dependences.c (dot_deps_stmt_1): New.
2767 (dot_deps_stmt): New.
2768 * graphite-dependences.h (dot_deps_stmt): Declared.
2770 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2772 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2773 not replace cross BB scalar dependences ending on PHI nodes.
2774 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2776 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2778 * graphite-poly.c (apply_poly_transforms): Implement the high
2779 level driver for flag_loop_block.
2780 * opts.c (decode_options): Enable flag_loop_block at -O2.
2781 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2784 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2786 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2789 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2791 * graphite-poly.h (lst_find_pbb): New.
2792 (find_lst_loop): New.
2794 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2796 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2797 * graphite-poly.h (struct scop): Remove dep_graph field.
2798 (SCOP_DEP_GRAPH): Removed.
2800 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2802 * graphite-poly.h (copy_lst): Do full copy of LST.
2804 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2806 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2807 when the loop stride is zero.
2809 * gcc.dg/graphite/id-16.c: New.
2811 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2813 * graphite-dependences.c (reduction_dr_1): New.
2814 (reduction_dr_p): New.
2815 (graphite_legal_transform_dr): Call reduction_dr_p.
2816 (reduction_ddr): Renamed reduction_ddr_p.
2817 * graphite-poly.h (same_pdr_p): New.
2818 (number_of_write_pdrs): New.
2819 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2820 (split_reduction_stmt): Do not split reduction statements
2821 when there are no writes to memory.
2822 (translate_scalar_reduction_to_array_for_stmt): Insert the
2823 memory reduction statement just after the scalar reduction statement.
2825 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2827 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2828 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2830 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2832 * graphite-interchange.c (lst_apply_interchange): New.
2833 (lst_interchange_profitable_p): New.
2834 (lst_try_interchange_loops): New.
2835 (lst_try_interchange): New.
2836 (lst_do_interchange): New.
2837 (pbb_do_interchange): Removed.
2838 (scop_do_interchange): Call lst_do_interchange.
2840 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2842 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2843 SCOP_TRANSFORMED_SCHEDULE.
2848 * graphite-poly.h (lst_p): New.
2851 (LST_LOOP_FATHER): New.
2854 (scop_to_lst): Declared.
2855 (print_lst): Declared.
2856 (debug_lst): Declared.
2857 (new_lst_loop): New.
2858 (new_lst_stmt): New.
2861 (lst_dewey_number): New.
2862 (struct scop): Add original_schedule and transformed_schedule fields.
2863 (SCOP_ORIGINAL_SCHEDULE): New.
2864 (SCOP_TRANSFORMED_SCHEDULE): New.
2865 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2867 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2869 * graphite-dependences.c (reduction_ddr): New.
2870 (graphite_legal_transform_bb): Call reduction_ddr.
2871 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2872 Initialize PBB_IS_REDUCTION.
2873 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2874 (PBB_IS_REDUCTION): New.
2875 (new_poly_bb): Update declaration.
2876 * graphite-scop-detection.h (build_scop_bbs): Removed.
2877 (nb_reductions_in_loop): Removed.
2878 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2879 parameter for reductions.
2880 (try_generate_gimple_bb): Update call to new_poly_bb.
2881 (build_scop_bbs_1): Same.
2882 (build_scop_bbs): Same.
2883 (gsi_for_phi_node): New.
2884 (scalar_close_phi_node_p): Remove gcc_assert.
2885 (split_reduction_stmt): New.
2886 (is_reduction_operation_p): New.
2887 (phi_contains_arg): New.
2888 (follow_ssa_with_commutative_ops): New.
2889 (detect_commutative_reduction_arg): New.
2890 (detect_commutative_reduction_assign): New.
2891 (follow_inital_value_to_phi): New.
2892 (edge_initial_value_for_loop_phi): New.
2893 (initial_value_for_loop_phi): New.
2894 (detect_commutative_reduction): New.
2895 (translate_scalar_reduction_to_array_for_stmt): New.
2896 (insert_copyout): New.
2897 (insert_copyin): New.
2898 (translate_scalar_reduction_to_array): New.
2899 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2900 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2901 (rewrite_commutative_reductions_out_of_ssa): New.
2902 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2903 * sese.h (split_region_for_bb): New.
2905 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2906 * gcc.dg/graphite/interchange-1.c: Fix format.
2907 * gcc.dg/graphite/interchange-10.c: New.
2909 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2911 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2914 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2916 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2917 (rewrite_cross_bb_scalar_dependence): New.
2918 (rewrite_cross_bb_scalar_deps): New.
2919 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2920 Call rewrite_cross_bb_scalar_deps.
2922 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2924 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2925 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2928 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2930 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2931 * graphite-interchange.c (pbb_do_interchange): Same.
2932 * graphite-poly.c (print_scattering_function): Same.
2934 * graphite-poly.h (pbb_loop): New.
2935 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2937 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2939 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2941 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2943 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2944 so don't pass a pointer to it.
2945 (build_alias_set_for_drs): Same.
2946 (build_base_obj_set_for_drs): Same.
2947 (build_scop_drs): Same.
2949 2009-09-26 Li Feng <nemokingdom@gmail.com>
2951 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2952 the alias graph of data references.
2954 2009-09-25 Li Feng <nemokingdom@gmail.com>
2956 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2957 (build_scop_drs): When debugging, write the alias graph to file,
2958 otherwise, should be disabled.
2960 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2962 * Merge from mainline (151310:151361).
2964 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2966 * Merge from mainline (151171:151310).
2968 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2970 * Merge from mainline (151171:151806).
2972 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2974 * Revert the last commit.
2976 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2978 * Merge from mainline (151171:151819).
2980 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2982 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2983 (is_simple_operand): Remove call to stmt_simple_memref_p.
2984 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2986 2009-09-17 David Edelsohn <edelsohn@gnu.org>
2988 * gcc.dg/graphite/interchange-mvt.c: New File.
2989 * gcc.dg/graphite/scop-dsyrk.c: New File.
2990 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2991 * gcc.dg/graphite/scop-mvt.c: New File.
2992 * gcc.dg/graphite/scop-sor.c: New File.
2994 2009-09-17 Li Feng <nemokingdom@gmail.com>
2996 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2997 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2998 (graphite_carried_dependence_level_k): Ditto.
2999 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
3000 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
3001 (new_poly_dr): Adjust declaration.
3002 * graphite-sese-to-poly.c (free_data_refs_aux): New.
3003 (free_gimple_bb): Added free_data_refs_aux.
3004 (build_poly_dr): Add dr_base_object_set.
3005 (partition_drs_to_sets): New.
3006 (dr_same_base_object_p): New.
3007 (build_alias_set_for_drs): New.
3008 (build_base_object_set_for_drs): New.
3009 (build_scop_drs): Add build_base_obj_set_for_drs.
3010 * graphite-sese-to-poly.h: Added #define for alias set number index and
3011 base object set index.
3012 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
3013 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
3015 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
3017 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3018 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
3020 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3022 * graphite-sese-to-poly.c (struct irp_data): Removed.
3023 (idx_record_params): Removed.
3024 (find_params_in_bb): Scan for parameters the access functions; don't
3025 parse the tree representation.
3027 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3029 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
3030 passes at -O1 and below.
3032 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3034 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
3035 tree-scalar-evolution.h, and then tree-data-ref.h.
3036 * graphite-clast-to-gimple.c: Same.
3037 * graphite-dependences.c: Same.
3038 * graphite-interchange.c: Same.
3039 * graphite-poly.c: Same.
3040 * graphite-scop-detection.c: Same.
3041 * graphite-sese-to-poly.c: Same.
3043 * lambda-code.c: Same.
3044 * matrix-reorg.c: Same.
3045 * tree-data-ref.c: Same.
3046 * tree-if-conv.c: Same.
3047 * tree-loop-distribu: Same.: Same.
3048 * tree-loop-linear.c: Same.
3049 * tree-parloops.c: Same.
3050 * tree-predcom.c: Same.
3051 * tree-vect-patterns.c: Same.
3053 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
3055 Partially revert the previous patch, except the following.
3056 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
3057 as parameters the operands of the not expression.
3059 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3061 * tree-scalar-evolution.c (instantiate_scev_assign): New.
3062 Do not call analyze_scalar_evolution on assignments.
3063 (instantiate_scev_phi): Call analyze_scalar_evolution.
3064 (instantiate_scev_name): Call instantiate_scev_assign and
3065 instantiate_scev_phi.
3066 (instantiate_scev_not): Adapted to pass as parameters the operands
3067 of the not expression.
3069 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3071 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
3072 to pass as parameters the operands of the binary expression.
3074 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3076 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
3077 instantiate_scev_not. Handle NEGATE_EXPR.
3078 (instantiate_scev_r): Handle NEGATE_EXPR.
3080 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3082 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
3084 (instantiate_scev_r): Move code in instantiate_scev_2
3085 and instantiate_scev_1.
3087 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3089 * tree-scalar-evolution.c (instantiate_scev_3): New.
3090 (instantiate_scev_1): Move code in instantiate_scev_3.
3092 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3094 * tree-scalar-evolution.c (instantiate_scev_poly): New.
3095 (instantiate_scev_1): Move code in instantiate_scev_poly.
3097 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3099 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3100 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3102 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3104 * tree-scalar-evolution.c (instantiate_scev_convert): New.
3105 (instantiate_scev_1): Move code in instantiate_scev_convert.
3107 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3109 * tree-scalar-evolution.c (instantiate_scev_binary): New.
3110 (instantiate_scev_1): Move code in instantiate_scev_binary.
3112 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3114 * tree-scalar-evolution.c (instantiate_scev_name): New.
3115 (instantiate_scev_1): Move code in instantiate_scev_name.
3117 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
3119 * Merge from mainline (150992:151171).
3121 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3123 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3125 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3127 * graphite-dependences.c (graphite_legal_transform_bb): Call
3128 pbb_remove_duplicate_pdrs.
3129 * graphite-poly.c (can_collapse_pdr): Removed.
3130 (pdr_find_duplicate): Removed.
3131 (can_collapse_pdrs): New.
3132 (pbb_remove_duplicate_pdrs): New.
3133 (new_poly_dr): Do not look for duplicates.
3134 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3135 (PBB_PDR_DUPLICATES_REMOVED): New.
3136 (pbb_remove_duplicate_pdrs): Declared.
3138 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3140 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3141 the strides by multiplying by PDR_NB_REFS.
3142 * graphite-poly.c (can_collapse_pdr): New.
3143 (pdr_find_duplicate): New.
3144 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
3145 Initialize PDR_NB_REFS.
3146 * graphite-poly.h (struct poly_dr): Add field nb_refs.
3148 (new_poly_dr): Number of subscripts is a graphite_dim_t.
3150 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3152 Revert one of the previous commits:
3153 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3154 the computation of symmetric data dependence relations.
3155 (dependency_between_pbbs_p): Same.
3157 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3160 * graphite-poly.c (apply_poly_transforms): Remove legality test before
3163 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3165 * graphite-dependences.c (pddr_original_scattering): Return NULL
3166 for read-read dependence relations.
3167 * graphite-poly.h (enum poly_dr_type): Fix comment.
3170 (pdr_may_write_p): New.
3172 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3174 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3175 (struct poly_dr): Same.
3176 (new_poly_dr): Same.
3177 * graphite-poly.c (new_poly_dr): Same.
3179 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3180 Sebastian Pop <sebastian.pop@amd.com>
3182 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3183 pbb_strip_mine_time_depth. Changed the implementation so that
3184 transformation is expressed as a transformation on
3185 time (scatttering) dimensions. Also, ensures that the 2d+1
3186 scheduling format is preserved.
3187 (pbb_strip_mine_profitable_p): Profitability is based on the
3188 iteration number of a given time (scattering) dimension,
3189 and not on a original loop depth dimension.
3190 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3191 (pbb_do_strip_mine): Call psct_dynamic_dim.
3192 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3193 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3194 (pbb_nb_dynamic_scattering_transform): New.
3195 (psct_dynamic_dim): New.
3197 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3199 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3200 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3201 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3202 * graphite-interchange.c (build_linearized_memory_access): Same.
3203 (memory_stride_in_loop): Same.
3205 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
3207 * graphite-dependences.c (pddr_original_scattering): New.
3208 (graphite_legal_transform_dr): Call pddr_original_scattering.
3211 * graphite-dependences.h (dot_deps): Declared.
3212 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3213 (print_pdr): Print PDR_ID.
3214 * graphite-poly.h (struct poly_dr): Add field id.
3217 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3219 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
3221 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3222 not delete the original dependence relation.
3224 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3226 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3227 the computation of symmetric data dependence relations.
3228 (dependency_between_pbbs_p): Same.
3230 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3232 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3233 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3234 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3235 (free_poly_ddr): New.
3236 (pddr_is_empty): New.
3237 (dependence_polyhedron_1): Now returns a poly_ddr_p.
3238 (dependence_polyhedron): Same. Remove useless gcc_assert.
3240 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3241 (graphite_carried_dependence_level_k): Call pddr_is_empty.
3242 * graphite-dependences.h (enum poly_dependence_kind): New.
3243 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
3244 (PDRP_SOURCE): Renamed PDDR_SOURCE.
3245 (PDRP_SINK): Renamed PDDR_SINK.
3246 (PDRP_DDP): Renamed PDDR_DDP.
3248 (free_poly_ddr): Declared.
3249 * graphite-poly.c (new_scop): Use the new hash function names.
3250 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3251 into original_pddrs.
3252 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3254 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3256 * Merge from mainline (150764:150992).
3258 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3260 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3261 bounds with LT_EXPR to make niter analysis more precise on code
3262 generated by Graphite.
3264 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3266 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3267 (graphite_legal_transform_bb): Same.
3268 (poly_drs_may_alias_p): Same.
3270 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
3273 * graphite-ppl.c (ppl_max_for_le): Correct the use of
3274 ppl_Pointset_Powerset_C_Polyhedron_maximize.
3276 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3278 * graphite-poly.c (print_pbb): Print PBB index.
3280 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3282 * Merge from mainline (r150672:150764).
3284 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3286 * graphite-interchange.c (ppl_max_for_le): Moved...
3287 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3288 * graphite-ppl.c (ppl_max_for_le): ... here.
3289 * graphite-ppl.h (ppl_max_for_le): Declared.
3291 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
3293 * Merge from mainline (r150372:150672).
3295 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3298 * sese.c (convert_for_phi_arg): New.
3299 (add_guard_exit_phis): Use convert_for_phi_arg.
3301 * gfortran.dg/graphite/id-17.f: New.
3303 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3305 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3306 unknown subscript upper bounds.
3308 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3310 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3311 Pranav Garg <pranav.garg2107@gmail.com>
3313 * graphite-interchange.c (gather_access_strides): Removed.
3314 (ppl_max_for_le): New.
3315 (build_linearized_memory_access): New.
3316 (memory_stride_in_loop): New.
3317 (pbb_interchange_profitable_p): Reimplemented.
3318 * graphite-ppl.h (ppl_new_id_map): New.
3319 (ppl_interchange): New.
3321 * gcc.dg/graphite/interchange-6.c: XFAILed.
3323 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3325 * graphite-interchange.c (compute_subscript): Removed.
3326 (compute_array_size_cstr): Removed.
3327 (compute_array_size_poly): Removed.
3328 (compute_array_size): Removed.
3329 (gather_access_strides_poly): Removed.
3330 (gather_access_strides): Empty.
3332 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3334 * graphite-dependences.c (dependence_polyhedron_1): Replace
3335 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3336 (graphite_legal_transform_dr): Same.
3337 (graphite_carried_dependence_level_k): Same.
3338 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3339 Initialize PDR_NB_SUBSCRIPTS.
3340 (print_pdr_access_layout): Replace pdr_nb_subscripts with
3342 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3343 (PDR_NB_SUBSCRIPTS): New.
3344 (pdr_nb_subscripts): Removed.
3345 (pdr_dim): Simplified.
3346 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3347 with PDR_NB_SUBSCRIPTS.
3349 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3351 * graphite-interchange.c (compute_array_size): Remove use of
3353 * graphite-poly.c (new_poly_dr): Remove argument data_container.
3354 Do not initialize PDR_DATA_CONTAINER.
3355 (print_pdr): Do not print PDR_DATA_CONTAINER.
3356 * graphite-poly.h (struct poly_dr): Remove data_container field.
3357 (PDR_DATA_CONTAINER): Removed.
3358 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3360 (build_poly_dr): Same.
3362 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3364 * gcc.dg/graphite/interchange-9.c: New.
3366 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3367 Sebastian Pop <sebastian.pop@amd.com>
3369 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3370 copy of the dependence polyhedron. Free the temporary objects.
3371 (graphite_carried_dependence_level_k): Free unused objects before
3374 * gcc.dg/graphite/interchange-1.c: XFAILed.
3375 * gcc.dg/graphite/interchange-2.c: XFAILed.
3376 * gcc.dg/graphite/interchange-3.c: XFAILed.
3377 * gcc.dg/graphite/interchange-4.c: XFAILed.
3378 * gcc.dg/graphite/interchange-7.c: XFAILed.
3380 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3382 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3383 Early return without analyzing the data dependences if no
3384 transform has been done. Call restore_scattering if the transform
3386 (graphite-interchange.c): Same.
3387 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3388 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3389 (apply_poly_transforms): Do not gcc_assert that
3390 the transform is legal.
3391 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3392 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3393 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3394 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3395 * graphite-poly.h (struct poly_scattering): New.
3396 (struct poly_bb): Add original, transformed, and saved fields.
3397 Remove transformed_scattering, original_scattering, nb_local_variables,
3398 and nb_scattering_transform fields.
3399 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3400 (poly_scattering_new): New.
3401 (poly_scattering_free): New.
3402 (poly_scattering_copy): New.
3403 (store_scattering_pbb): New.
3404 (store_scattering): New.
3405 (restore_scattering_pbb): New.
3406 (restore_scattering): New.
3407 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3408 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3410 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3412 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3415 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3417 * Makefile.in (graphite.o): Depends on PREDICT_H.
3418 * graphite.c: Include predict.h.
3419 (graphite_finalize): Call tree_estimate_probability.
3420 * predict.c (predict_loops): Do not call scev_initialize and
3422 (tree_estimate_probability_bb): New.
3423 (tree_estimate_probability): Do not initialize loops: move that
3424 code to the driver. Call tree_estimate_probability_bb.
3425 (tree_estimate_probability_driver): New.
3426 (pass_profile): Use tree_estimate_probability_driver.
3427 * predict.h (tree_estimate_probability): Declared.
3429 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3431 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3432 * graphite-dependences.c (graphite_legal_transform): Add time to
3433 TV_GRAPHITE_DATA_DEPS.
3434 (dependency_between_pbbs_p): Same.
3435 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3437 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3439 * Merge from mainline (r149952:150372).
3441 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3443 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3444 * graphite-blocking.c: Same.
3445 * graphite-clast-to-gimple.c: Same.
3446 * graphite-dependences.c: Same.
3447 * graphite-poly.c: Same.
3448 * graphite-poly.h: Same.
3449 * graphite-ppl.c: Same.
3450 * graphite-scop-detection.c: Same.
3451 * graphite-sese-to-poly.c: Same.
3454 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3456 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3457 (remove_simple_copy_phi): New.
3458 (remove_invariant_phi): New.
3459 (simple_copy_phi_p): New.
3460 (reduction_phi_p): New.
3461 (gsi_for_ssa_name_def): New.
3462 (insert_out_of_ssa_copy): New.
3463 (insert_out_of_ssa_copy_on_edge): New.
3464 (create_zero_dim_array): New.
3465 (scalar_close_phi_node_p): New.
3466 (rewrite_close_phi_out_of_ssa): New.
3467 (rewrite_phi_out_of_ssa): New.
3468 (rewrite_reductions_out_of_ssa): New.
3469 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3471 * gcc.dg/graphite/id-11.c: New.
3472 * gcc.dg/graphite/id-15.c: New.
3473 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3474 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3475 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3476 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3477 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3478 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3479 * gfortran.dg/graphite/id-13.f: New.
3480 * gfortran.dg/graphite/id-5.f: New.
3482 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3484 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3485 check that nb_reductions_in_loop is zero.
3486 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3487 reduction phi nodes.
3488 (nb_reductions_in_loop): Removed.
3489 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3490 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3491 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3492 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3493 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3495 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3497 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3498 statements that have an empty iteration domain.
3499 * gfortran.dg/graphite/id-16.f: New.
3501 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3503 * tree-scalar-evolution.c (instantiate_scev_1): Return
3504 chrec_dont_know when the result is not above instantiate_below.
3505 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3506 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3507 the tree has a known scalar evolution.
3508 * gfortran.dg/graphite/id-14.f: New.
3509 * gfortran.dg/graphite/id-15.f: New.
3511 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3513 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3515 (rename_variables): Keep inserting renames after the ones already
3518 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3520 * graphite-sese-to-poly.c (compare_bb_depths): New.
3521 (graphite_sort_dominated_info): New.
3522 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3523 (build_scop_scattering): Fix comment.
3525 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3527 * graphite.c (graphite_finalize): Call print_loops instead of
3528 dump_function_to_file.
3529 * gcc.dg/graphite/graphite.exp: Fix formatting.
3530 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
3531 loops generated in the graphite output file.
3532 * gcc.dg/graphite/pr35356-2.c: New.
3533 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3534 * gfortran.dg/graphite/id-12.f: New.
3536 2009-07-24 Li Feng <nemokingdom@gmail.com>
3538 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3541 2009-07-24 Li Feng <nemokingdom@gmail.com>
3542 Tobias Grosser <grosser@fim.uni-passau.de>
3544 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3545 alias set number build alias in ACCESSES polyhedron.
3546 (build_alias_set_for_drs): New.
3547 (build_pbb_drs): Added build_alias_set_for_drs.
3548 * graphite-dependences.c (poly_drs_may_alias_p): New.
3549 (graphite_carried_dependence_level_k): Check alias information
3550 before building polyhedron.
3552 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3554 * Makefile.in (lambda-code.o): Fix formatting.
3556 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3558 * Merge from mainline (r149350-149952)
3560 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3562 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3563 before interchange to prepare for loop blocking.
3565 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3567 * graphite-poly.c (apply_poly_transforms): Add checks after every
3569 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3570 done in apply_poly_transforms.
3572 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3574 * graphite-dependences.c (build_lexicographically_gt_constraint):
3575 Replace RES parameter with *RES.
3576 (dependence_polyhedron_1): Pass an address of the parameter RES
3577 instead of value of RES.
3579 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3581 * graphite.c (graphite_finalize): Fix comment.
3582 (graphite_transform_loops): Reset scev info after code generation
3585 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3587 * graphite.c (graphite_finalize): Call scev_reset.
3589 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3591 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3592 GBB_CLOOG_IV_TYPES hash table twice.
3593 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3594 (add_condition_to_domain): Clear GMP values.
3596 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3598 * graphite-dependences.c: Fix formatting.
3599 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3600 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3601 * graphite-sese-to-poly.c: Fix formatting.
3602 * graphite.c (graphite_transform_loops): Create the hash table
3603 after the early return.
3605 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3607 * gcc.dg/graphite/id-14.c: New.
3608 * gcc.dg/graphite/pr40157.c: New.
3609 * gfortran.dg/graphite/id-11.f: New.
3611 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3613 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3614 (build_poly_scop): Return false when there are no pbbs within
3615 loops to avoid to pass to cloog scops with no loops.
3617 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3619 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3620 useless test "i % 2".
3621 (build_pbb_scattering_polyhedrons): Fix formatting.
3622 (build_poly_dr): Same.
3623 * graphite.c (graphite_transform_loops): Restructure.
3625 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
3627 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3628 reduction_list parameter.
3629 (rewrite_all_phi_nodes_with_iv): Same.
3630 (canonicalize_loop_ivs): Same.
3631 * tree-parloops.c (struct brli): Removed.
3632 (build_reduction_list_info): Removed.
3633 (build_new_reduction): New.
3634 (analyze_reduction_list): Removed.
3635 (gather_scalar_reductions): Find reductions instead of phi
3636 nodes that can't be canonicalized.
3637 (try_create_reduction_list): Remove reduction_list parameter.
3638 (gen_parallel_loop): Same.
3639 (parallelize_loops): Remove analyze_reductions variable,
3640 initialization and free.
3641 Change reduction_list htab initialization to reduction_info
3642 elements instead of ssa names.
3643 Call try_create_reduction_list and gen_parallel_loop without
3644 analyzed_reduction argument.
3645 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3646 canonicalize_loop_ivs with one less argument.
3647 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3649 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3651 * graphite-dependences.c (new_poly_dr_pair): New.
3652 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3653 (new_poly_dr_pair): New.
3654 (eq_poly_dr_pair_p): New.
3655 (hash_poly_dr_pair_p): New.
3656 * graphite-dependences.h (struct poly_dr_pair): New.
3657 (eq_poly_dr_pair_p): Declared.
3658 (hash_poly_dr_pair_p): Declared.
3659 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3660 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3661 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3662 * Makefile.in (graphite-poly.o): Add dependence on
3663 graphite-dependences.h.
3665 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3667 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3668 polynomials of degree > 1 pass to Graphite.
3669 * tree-chrec.c (scev_is_linear_expression): Call
3670 evolution_function_is_affine_multivariate_p.
3671 * gfortran.dg/graphite/id-10.f90: New.
3673 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3675 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3676 Instantiate scevs varying in outer loops.
3677 * gfortran.dg/graphite/id-9.f: Correct testcase.
3679 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3681 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3682 redundant constraint.
3684 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3686 * gcc.dg/graphite/graphite.exp: Fix comments.
3687 * gfortran.dg/graphite/graphite.exp: Trigger actions
3688 based on the file names as in the C testsuite.
3689 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3690 * gfortran.dg/graphite/block-2.f: Same.
3691 * gfortran.dg/graphite/block-3.f90: Same.
3692 * gfortran.dg/graphite/block-4.f90: Same.
3693 * gfortran.dg/graphite/id-1.f90: Same.
3694 * gfortran.dg/graphite/id-2.f90: Same.
3695 * gfortran.dg/graphite/id-3.f90: Same.
3696 * gfortran.dg/graphite/id-4.f90: Same.
3697 * gfortran.dg/graphite/id-6.f: Same.
3698 * gfortran.dg/graphite/id-9.f: Same.
3699 * gfortran.dg/graphite/interchange-1.f: Same.
3700 * gfortran.dg/graphite/interchange-2.f: Same.
3701 * gfortran.dg/graphite/scop-1.f: Same.
3703 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3705 * sese.c (expand_scalar_variables_call): New.
3706 (expand_scalar_variables_ssa_name): Handle calls in expander.
3708 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3710 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3711 Expect to see the pattern twice.
3712 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3713 * gcc.dg/graphite/interchange-5.c: Same.
3714 * gcc.dg/graphite/interchange-6.c: Same.
3716 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3718 * gcc.dg/graphite/id-10.c: New.
3719 * gcc.dg/graphite/id-12.c: New.
3720 * gfortran.dg/graphite/id-7.f: New.
3721 * gfortran.dg/graphite/id-8.f: New.
3723 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3725 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3728 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3730 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3732 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3734 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3736 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3738 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3739 building PDR subscripts.
3741 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3743 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3744 computation of array sizes.
3746 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3748 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3750 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3752 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3753 build_pairwise_constraint, dr_equality_constraints,
3754 build_pairwise_scheduling_equality,
3755 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3756 build_lexicographically_gt_constraint, dependence_polyhedron,
3757 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3758 Move from NNC_Polyhedron to C_Polyhedron.
3759 * graphite-interchange.c (compute_array_size_poly,
3760 gather_access_strides): Dito.
3761 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3762 free_scop, pbb_number_of_iterations): Dito.
3763 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3764 pbb_dim_iter_domain, struct scop): Dito.
3765 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3766 new_Cloog_Domain_from_ppl_Polyhedron,
3767 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3768 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3769 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3770 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3771 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3772 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3773 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3774 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3775 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3776 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3777 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3778 build_scop_iteration_domain, build_poly_dr): Dito
3780 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3782 * gcc.dg/graphite/graphite.exp: Added a rule to execute
3784 * gcc.dg/graphite/run-id-1.c: New.
3786 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3788 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3789 positivity constraint on the symbolic number of iterations.
3791 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3793 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3795 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3796 Tobias Grosser <grosser@fim.uni-passau.de>
3798 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3799 (build_cloog_prog): Directly use SCOP_CONTEXT.
3800 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3801 (free_scop): Free SCOP_CONTEXT.
3802 (print_scop_context): New.
3803 (print_scop): Call print_scop_context.
3804 (debug_scop_context): New.
3805 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3806 (struct scop): Added field context.
3807 (SCOP_CONTEXT): New.
3808 * graphite-sese-to-poly.c (add_param_constraints): New.
3809 (build_scop_context): New.
3810 (build_poly_scop): Call build_scop_context.
3812 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3814 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3815 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3816 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3817 * graphite-ppl.h: Include double-int.h and tree.h.
3818 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3819 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3820 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3821 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3823 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3825 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3826 POINTER_PLUS_EXPR for pointer types.
3827 (clast_to_gcc_expression): Same.
3829 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3831 * graphite-poly.c (print_scattering_function): Early return when
3832 PBB_TRANSFORMED_SCATTERING is not initialized.
3833 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3835 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3837 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3840 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
3842 * tree-parloops.c (analyze_reduction_list): Change return
3844 (try_create_reduction_list): Move the call to
3845 analyze_reduction_list to the beginining.
3846 Call reduction_phi with analyzed_reductions as argument
3847 instead of reduction_list.
3849 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3851 * Merge from mainline (r148296:149346)
3853 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3855 * graphite-scop-detection.c (graphite_can_represent_init): New.
3856 (graphite_can_represent_scev): Call graphite_can_represent_init:
3857 check that the initial value does not contain multiplications of
3859 (stmt_has_simple_data_refs_p): New.
3860 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3861 (is_simple_operand): Fix formatting.
3862 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3864 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3866 * gcc.dg/graphite/id-13.c: New.
3867 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3868 analyze_scalar_evolution, use scalar_evolution_in_region.
3869 (scan_tree_for_params_right_scev): Add extra assert.
3870 (parameter_index_in_region_1): Split from parameter_index_in_region.
3871 (idx_record_params): Use scalar_evolution_in_region.
3872 (find_params_in_bb): Same.
3873 (find_scop_parameters): Same.
3874 (build_loop_iteration_domains): Same.
3875 (create_linear_expr_from_tree): Same.
3876 * sese.c (scalar_evolution_in_region): New.
3877 * sese.h (scalar_evolution_in_region): Declared.
3878 (defined_in_sese_p): New.
3879 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3881 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3884 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3886 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3887 TREE_DATA_REF_H also implies SCEV_H.
3889 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3891 * graphite-poly.c (print_scop_params): New.
3892 (print_scop): Call print_scop_params.
3893 (debug_scop_params): New.
3894 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3896 2009-07-07 Li Feng <nemokingdom@gmail.com>
3898 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3899 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3900 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3901 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3902 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3903 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3905 2009-07-07 Li Feng <nemokingdom@gmail.com>
3907 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3908 for dependency checking part.
3909 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3910 tests for dependency checking.
3911 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3912 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3913 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3914 flag -fdump-tree-graphite-all for autopar testsuites.
3916 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3918 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3919 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3920 canonicalize_loop_ivs): Moved...
3921 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3923 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3925 * tree-parloops.c (try_create_reduction_list): Pass an extra
3926 argument analyzed_reductions. Call analyze_reduction_list.
3927 (gen_parallel_loop): Do not call analyze_reduction_list.
3928 (parallelize_loops): Init and finalize analyzed_reductions.
3930 2009-07-06 Li Feng <nemokingdom@gmail.com>
3932 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3933 Added flag -fno-loop-strip-mine for autopar testcase.
3935 2009-07-04 Li Feng <nemokingdom@gmail.com>
3937 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3938 transformed scattering dimension instead of unmatch orignal when
3939 calling dependence_polyhedron.
3941 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3943 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3945 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3947 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3948 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3950 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3952 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3953 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3954 * graphite-poly.c (pbb_number_of_iterations): New.
3955 * graphite-poly.h (pbb_number_of_iterations): Declared.
3956 (pbb_iterator_dim, pbb_parameter_dim): New.
3958 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3960 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3961 last commit on type of lower and upper bound of loops.
3963 2009-06-29 Li Feng <nemokingdom@gmail.com>
3965 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3966 graphite-dependences.h.
3967 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3968 (mark_bb_with_pbb): New.
3969 (get_stmtfor_depth): New.
3970 (find_pbb_via_hash): New.
3971 (dependency_in_loop_p): New.
3972 (mark_loops_parallel): New.
3973 (free_aux_in_new_loops): New.
3974 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3975 bb with it's relevant pbb. Mark newly created loops. Remove mark
3976 innermost loop parallel without checking.
3977 (gloog): Add parameter BB_PBB_MAPPING.
3978 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3979 (gloog): Change declaration.
3980 (mark_loop_parallel): Make extern.
3981 (free_aux_in_new_loops): Declare.
3982 (bb_pbb_map_hash): New.
3983 (eq_bb_pbb_map): New.
3984 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3985 auto parallelization when flag_graphite_force_parallel is set.
3986 (graphite_finalize): Added free_aux_in_new_loops.
3987 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3988 the innermost loop that marked parallel. Use
3989 flag_graphite_force_parallel instead of loop->can_be_parallel.
3990 (loop_parallel_p): Move inner most checking out of function.
3992 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3994 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3995 type of lower and upper bound of loops signed long int.
3997 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3999 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
4000 expression outside the loop.
4002 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4004 * gcc.dg/graphite/interchange-8.c: New.
4006 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4008 * gcc.dg/graphite/interchange-0.c: XFailed.
4009 * gcc.dg/graphite/interchange-5.c: XFailed.
4010 * gcc.dg/graphite/interchange-6.c: XFailed.
4012 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4014 * graphite-interchange.c (compute_array_size_poly): The end of the
4015 recursion should return 1.
4017 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4019 * graphite-interchange.c (compute_array_size_cstr): Allow the
4020 subscript multiplier to be -1.
4021 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
4022 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
4023 data_container. Initializes PDR_DATA_CONTAINER.
4024 (print_pdr_access_layout): New.
4025 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
4026 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
4028 (PDR_DATA_CONTAINER): New.
4029 (new_poly_dr): Update declaration.
4030 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
4031 (build_poly_dr): Call pdr_add_data_dimensions.
4033 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4035 * graphite-poly.h (struct poly_dr): Fix comment.
4036 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
4037 (pdr_add_memory_accesses): New.
4038 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
4040 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
4042 * graphite-poly.c (print_pdrs, debug_pdrs): New.
4043 (print_pbb): Add call to print_pdrs.
4044 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
4046 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
4047 Li Feng <nemokingdom@gmail.com>
4049 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
4050 (dependency_between_pbbs_p): New.
4051 (lexicographically_gt_p): Assure !empty_p before polyhedron
4052 intersection assign.
4053 (build_lexicographically_gt_constraint): Correct lexicographically
4055 * graphite-dependences.h: New.
4056 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
4058 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4060 * graphite-clast-to-gimple.c (print_clast_stmt): New.
4061 (gloog): Print to dump_file the generated clast.
4062 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
4063 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
4065 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4067 * graphite-poly.c (extend_scattering): Increment
4068 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
4070 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
4072 * graphite-interchange.c (compute_array_size_poly): Added exit of
4073 recursion condition. Continue iterating even after the first equality.
4074 (compute_array_size): Same.
4076 2009-06-24 Li Feng <nemokingdom@gmail.com>
4078 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
4079 -fdump-tree-final_cleanup to -fdump-tree-optimized.
4080 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4081 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4082 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
4084 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4086 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
4087 only when the use verifies is_gimple_reg.
4089 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4091 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
4092 Allocate scaldims after call to unify_scattering_dimensions.
4094 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4096 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4098 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4099 Albert Cohen <albert.cohen@inria.fr>
4101 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4102 variables for the strip mining.
4104 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4105 Pranav Garg <pranav.garg2107@gmail.com>
4107 * Makefile.in (OBJS-common): Added graphite-blocking.o.
4108 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4109 (graphite-blocking.o): New rule.
4110 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4111 * graphite-blocking.c: New.
4112 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4113 flag_loop_strip_mine.
4114 (psct_scattering_dim_for_loop_depth): New.
4115 * graphite-poly.h (scop_do_strip_mine): Declared.
4116 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4117 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4118 flag_loop_strip_mine.
4120 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4122 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4123 a GMP value and a PPL coefficient at each iteration of a loop.
4125 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4127 * graphite-dependences.c (dependence_polyhedron): Do not use
4128 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
4129 pbb_nb_scattering_transform.
4130 (graphite_legal_transform_dr): Same.
4131 * graphite-poly.c (extend_scattering): Same.
4132 (unify_scattering_dimensions): Same.
4133 (print_scattering_function): Same.
4134 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4135 PBB_NB_LOCAL_VARIABLES.
4136 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4137 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4138 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4139 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4140 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4141 (pbb_nb_scattering_transform): New.
4142 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4143 (psco_scattering_dim): Add assert on parameters.
4144 (psct_scattering_dim): Same.
4145 (psct_scattering_dim_for_loop_depth): Declared.
4146 (psct_local_var_dim): New.
4147 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4148 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
4149 correct layout, call pbb_nb_local_vars.
4150 (psct_add_local_variable, psct_add_scattering_dimension): New.
4151 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4152 Initialize PBB_NB_SCATTERING_TRANSFORM.
4154 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4156 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4157 (set_coef): Renamed ppl_set_coef.
4158 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4160 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
4162 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4163 test a boolean against 1.
4164 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4165 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4166 (pbb_do_interchange): Returns true when a transform has been performed.
4167 (scop_do_interchange): Same.
4168 * graphite-poly.c (apply_poly_transforms): Use the return value of
4169 scop_do_interchange.
4170 * graphite-poly.h (scop_do_interchange): Update declaration.
4172 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
4174 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4176 * sese.c (sese_reset_aux_in_loops): New.
4177 * sese.h (sese_reset_aux_in_loops): New.
4179 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4181 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4182 multiplier and multiply the constant by the multiplier.
4183 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4184 (build_poly_dr): Do not use the multiplier to define the subscript.
4186 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4188 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4189 compiler's data reference. Initialize PDR_CDR.
4190 (print_pdr): Call dump_data_reference.
4191 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4192 Add compiler_dr field.
4193 (PDR_BB): Renamed PDR_PBB.
4195 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4196 GCC's data reference representation.
4197 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4198 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4200 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4202 * graphite-poly.c (print_scattering_function): Also print the layout.
4203 * graphite-poly.h (pbb_nb_local_vars): New.
4205 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4207 * graphite-poly.c (print_pbb_domain): Also print the layout names.
4209 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
4211 * graphite-poly.c (print_pdr, debug_pdr): New.
4212 * graphite-poly.h (print_pdr, debug_pdr): Declared.
4213 (PDR_BASE): Removed.
4215 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4217 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4220 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4222 * graphite-interchange.c (compute_subscript): Allow also -1 in the
4223 subscript identification column.
4224 (pbb_do_interchange): Print to dump_file that some loops "will be
4225 interchanged". Rely on that chain of characters in the testcases.
4226 * gcc.dg/graphite/interchange-0.c: New.
4227 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4228 interchange-*.c files and compile them with -floop-interchange.
4230 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
4232 * graphite-interchange.c (interchange_profitable_p): Renamed
4233 pbb_interchange_profitable_p.
4235 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4236 Harsha Jagasia <harsha.jagasia@amd.com>
4237 Pranav Garg <pranav.garg2107@gmail.com>
4239 * graphite-interchange.c (interchange_profitable_p): Make static.
4240 (pbb_interchange_loop_depths, pbb_do_interchange,
4241 scop_do_interchange): New.
4242 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4243 for flag_loop_interchange.
4244 * graphite-poly.h (scop_do_interchange): Declared.
4245 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4246 flag_loop_interchange is used.
4248 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4250 * graphite-dependences.c (dependence_polyhedron): Update use of
4251 pbb_nb_scattering_dims.
4252 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4253 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4254 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4255 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4257 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4259 * graphite.c: Cleanup foo.
4261 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4263 * Merge from mainline (r143684:148293).
4264 * Disabled libpcp until it gets fixed.
4266 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
4267 Harsha Jagasia <harsha.jagasia@amd.com>
4269 * graphite-interchange.c: New.
4270 * Makefile.in (graphite-interchange.o): New.
4271 * graphite-poly.h (interchange_profitable_p): Declared.
4272 * graphite-ppl.h (value_max): New.
4274 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4276 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4277 * graphite-poly.h: Fix some comments.
4281 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4284 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4285 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4286 (pdr_accessp_nb_params): Renamed pdr_nb_params.
4287 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4288 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4289 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4290 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4291 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4292 * graphite-clast-to-gimple.c: Same.
4293 * graphite-dependences.c: Same.
4294 * graphite-poly.c: Same.
4295 * graphite-sese-to-poly.c: Same.
4297 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4299 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4300 expressions for an IV rename, as returned by clast_to_gcc_expression.
4301 (copy_renames): Rename new_name to expr.
4302 * sese.c (debug_rename_elt): Same.
4305 (sese_adjust_liveout_phis): Call force_gimple_operand before using
4306 the information from the rename map.
4307 (rename_variables_in_stmt): Same.
4308 (add_loop_exit_phis): Rename new_name to expr.
4309 (insert_loop_close_phis): Same.
4310 (add_guard_exit_phis): Same. Call force_gimple_operand.
4311 * sese.h (struct rename_map_elt): Rename new_name to expr.
4312 (new_rename_map_elt): Same.
4314 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4316 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4317 * sese.c (set_rename): Make it extern.
4318 * sese.h (set_rename): Declared.
4320 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4322 * graphite-poly.c (extend_scattering): Free values.
4323 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4325 (ppl_print_powerset_matrix): Same.
4326 * graphite-scop-detection.c (free_scops_1): New.
4327 (limit_scops): Call free_scops_1.
4328 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4329 (build_poly_dr): Free PPL coefficients.
4330 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4332 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
4334 * graphite-dependences.c: New.
4335 * graphite-data-ref.c: Removed.
4336 * graphite-data-ref.h: Removed.
4337 * Makefile.in (graphite-data-ref.o): Removed.
4338 (graphite-dependences.o): Added.
4339 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4340 * graphite-poly.c: Same.
4341 Move the data dependence testing to graphite-dependences.c.
4343 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
4345 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4346 from graphite_cannot_represent_loop. Code refactored.
4347 (scopdet_basic_block_info): Call graphite_can_represent_loop.
4349 2009-05-17 Li Feng <nemokingdom@gmail.com>
4351 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4352 Cover all the testcases (not only the filtered ones).
4354 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
4356 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4357 unnecessary check. Update comments. Move check for REAL_TYPE here.
4358 (harmful_stmt_in_bb): Remove checks for conditions. This is already
4359 done in (stmt_simple_for_scop_p).
4361 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
4363 * graphite.c (print_global_statistics): New.
4364 (print_graphite_scop_statistic): New.
4365 (print_graphite_statistics): New.
4366 (graphite_initialize, graphite_transform_loops): Print statistics.
4367 * graphite-scop-detection (build_scops): Print statistics.
4368 (print_graphite_scop_statistics): New.
4369 (print_graphite_statistics): New.
4371 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4373 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4374 (debug_clast_name_index): Removed.
4375 (debug_clast_name_indexes_1): Removed.
4376 (debug_clast_name_indexes): Removed.
4377 (clast_name_index_elt_info): Removed.
4378 (eq_clast_name_indexes): Removed.
4379 (clast_name_to_index): Removed.
4380 (new_clast_name_index): Removed.
4381 (save_clast_name_index): Removed.
4382 (save_var_name): Moved...
4383 (init_sese_params_index): Removed.
4384 (clast_name_to_gcc): Remove use of name_tree.
4385 (initialize_cloog_names): Same.
4386 (gloog): Do not call init_sese_params_index.
4387 * graphite-sese-to-poly.c (save_var_name): ...here.
4388 (parameter_index_in_region): New.
4389 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4390 (parameter_index_in_region): Removed.
4391 (is_parameter): Remove use of name_tree.
4392 * sese.h (struct name_tree): Removed.
4393 (struct sese): Remove use of name_tree. New field params_names.
4394 (SESE_PARAMS_NAMES): New.
4395 (SESE_PARAMS): Remove duplicate.
4396 (parameter_index_in_region): Removed.
4397 (sese_nb_params): Remove use of name_tree.
4398 (struct clast_name_index): New.
4399 (new_clast_name_index): New.
4400 (clast_name_to_index): New.
4401 (save_clast_name_index): New.
4402 (debug_clast_name_index): New.
4403 (debug_clast_name_indexes_1): New.
4404 (debug_clast_name_indexes): New.
4405 (clast_name_index_elt_info): New.
4406 (eq_clast_name_indexes): New.
4408 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4410 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4411 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4412 (graphite_loop_normal_form): Do not pass region. Do not
4413 initialize SESE_OLDIVS.
4414 (build_graphite_loop_normal_form): Update call to
4415 graphite_loop_normal_form.
4416 * sese.c (debug_oldivs): Removed.
4417 (new_sese): Do not initialize SESE_OLDIVS.
4418 (free_sese): Do not free SESE_OLDIVS.
4419 (oldiv_for_loop): Removed.
4420 * sese.h (struct sese): Remove old_ivs.
4421 (SESE_OLDIVS): Removed.
4422 (oldiv_for_loop): Removed.
4424 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4426 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4427 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4428 replaced by a call to newivs_to_depth_to_newiv.
4429 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4430 (clast_to_gcc_expression_red): Same.
4431 (gcc_type_for_clast_expr): Same.
4432 (gcc_type_for_clast_eq): Same.
4433 (graphite_translate_clast_equation): Same.
4434 (graphite_create_guard_cond_expr): Same.
4435 (graphite_create_new_guard): Same.
4436 (graphite_create_new_loop): Same.
4437 (build_iv_mapping): Same.
4438 (translate_clast): Same.
4440 (loop_iv_stack_patch_for_consts): Removed. *
4441 sese.c (iv_stack_entry_is_constant): Removed.
4442 (iv_stack_entry_is_iv): Removed.
4443 (loop_iv_stack_push_iv): Removed.
4444 (loop_iv_stack_insert_constant): Removed.
4445 (loop_iv_stack_pop): Removed.
4446 (loop_iv_stack_get_iv): Removed.
4447 (loop_iv_stack_get_iv_from_name): Removed.
4448 (debug_loop_iv_stack): Removed.
4449 (free_loop_iv_stack): Removed.
4450 (loop_iv_stack_remove_constants): Removed. *
4451 sese.h (iv_stack_entry_kind): Removed.
4452 (iv_stack_entry_data_union): Removed.
4453 (iv_stack_entry_struct): Removed.
4454 (iv_stack_entry_p): Removed.
4455 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4456 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4457 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4458 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4459 (gbb_loop_at_index): Fix indenting.
4460 (gbb_loop_index): Removed.
4462 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4464 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4465 Call clast_name_to_index.
4467 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4469 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4470 do not pass params. Get params from SESE_PARAMS.
4471 (clast_to_gcc_expression): Same.
4472 (clast_to_gcc_expression_red): Same.
4473 (gcc_type_for_clast_eq): Same.
4474 (graphite_translate_clast_equation): Same.
4475 (graphite_create_new_loop): Same.
4476 * sese.c (rename_variables_in_stmt): Fix comment.
4478 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4480 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4482 Call save_clast_name_index.
4483 (translate_clast): Pass newivs_index.
4484 (gloog): Create and free newivs_index.
4486 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4488 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4489 (clast_name_index_p): New type.
4490 (debug_clast_name_index): New.
4491 (debug_clast_name_indexes_1): New.
4492 (debug_clast_name_indexes): New.
4493 (clast_name_index_elt_info): New.
4494 (eq_clast_name_indexes): New.
4495 (clast_name_to_index): New.
4496 (new_clast_name_index): New.
4497 (save_clast_name_index): New.
4498 (init_sese_params_index): New.
4499 (gloog): Call init_sese_params_index.
4500 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4501 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4502 (free_sese): Free SESE_PARAMS_INDEX.
4503 * sese.h (struct sese): Add params_index.
4504 (SESE_PARAMS_INDEX): New.
4506 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4508 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4509 (graphite_create_new_loop): Pass the newivs vector. Push the
4510 newly created IV to newivs.
4511 (translate_clast): Pass the newivs vector.
4512 (gloog): Create and destroy the newivs vector.
4514 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4516 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4517 (graphite_loop_normal_form): Initialize loop->aux with the unique
4518 IV that has been created.
4520 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4522 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4523 scev with parameters in the base part. They where forbidden
4526 2009-05-11 Li Feng <nemokingdom@gmail.com>
4528 * gcc.dg/graphite/graphite.exp: Set different default
4529 compile options by file names.
4530 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4531 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4532 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4533 * gcc.dg/graphite/scop-matmult.c: Ditto.
4535 2009-05-08 Li Feng <nemokingdom@gmail.com>
4537 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4538 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4539 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4540 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4542 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4544 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4547 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4549 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4550 allow integer constant strides.
4551 (graphite_can_represent_expr): Depend on outermost_loop.
4552 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4553 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4554 build_scops_1): Same.
4555 (scopdet_basic_block_info): Same and insert layered SCoP
4557 (try_generate_gimple_bb): Cleanup.
4558 (build_scops): Enable data references.
4560 * gcc.dg/graphite/id-5.c: New.
4561 * gcc.dg/graphite/id-9.c: New.
4562 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4563 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4565 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4567 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4568 that we have not yet built for this SCoP.
4570 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4572 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4573 for complex numbers.
4575 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4577 * graphite-ppl.c: Fix build if cloog is not available.
4579 2009-05-04 Li Feng <nemokingdom@gmail.com>
4581 * tree-parloops.c (loop_parallel_p): Remove construction of
4582 NITER and REDUCTION_LIST.
4583 (try_get_loop_niter): New.
4584 (try_create_reduction_list): New.
4585 (parallelize_loops): Bypass the failed checkings in autopar
4586 when can_be_parallel in loop structure is set to true.
4588 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4590 * gcc.dg/graphite/id-6.c: Update testcase.
4591 * gcc.dg/graphite/scop-3.c: Dito.
4593 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4595 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4596 Enable EQ_EXPR and NE_EXPR again.
4598 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4600 * graphite-scop-detection.c (graphite_can_represent_scev):
4601 Add check if scev is affine multivariate.
4602 (harmful_stmt_in_bb): Check if we can represent the conditions.
4603 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4605 * gcc.dg/graphite/id-7.c: New.
4607 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4609 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4610 Check all bbs in region, not only the bbs that are represented in
4612 (build_poly_scop): Add newline.
4613 * gcc.dg/graphite/id-8.c: New.
4615 2009-04-30 Li Feng <nemokingdom@gmail.com>
4617 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4618 when loop initialize.
4619 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4620 * common.opt: Declare flag_graphite_force_parallel.
4621 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4623 * graphite-poly.c (apply_poly_transforms): Introduce
4624 flag_graphite_force_parallel.
4625 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4626 * toplev.c (process_options): ditto and replace a not correctly
4629 2009-04-30 Li Feng <nemokingdom@gmail.com>
4631 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4632 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4633 to the redefinition.
4634 (compute_cloog_iv_types_1): ditto.
4635 (build_iv_mapping): ditto.
4636 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4638 (free_gimple_bb): Removed GBB_LOOPS related free part.
4639 (build_bb_loops): Removed.
4640 * sese.h (struct gimple_bb): Removed loops.
4641 (GBB_LOOPS): Removed.
4642 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4643 (gbb_loop_index): ditto.
4645 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4647 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4648 allow non constant strides.
4649 * gcc.dg/graphite/scop-20.c: New.
4651 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4653 * graphite-scop-detection.c (dot_all_scops): Fix system call
4654 return value warning.
4657 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4659 * gcc.dg/graphite/id-6.c: Fix pattern.
4660 * gcc.dg/graphite/scop-3.c: Same.
4662 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4664 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4665 build_pairwise_constraint, dr_equality_constraints,
4666 build_pairwise_scheduling_equality,
4667 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4668 build_lexicographically_gt_constraint, dependence_polyhedron,
4669 graphite_legal_transform_dr, graphite_legal_transform_bb,
4670 graphite_legal_transform): New.
4671 * graphite-poly.h (graphite_legal_transform): Declared.
4672 * graphite-sese-to-poly.c (build_poly_scop): Call to
4673 graphite_legal_transform is disabled for the moment.
4675 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4677 * graphite-poly.h (pbb_nb_scattering_dims): New.
4678 (pbb_nb_scattering): Use it.
4680 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4682 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4683 Pointset_Powerset version of ppl_insert_dimensions.
4684 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4686 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4688 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4690 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4692 * graphite-poly.h: Fix comment.
4694 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4696 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4698 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4700 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4703 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4705 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4706 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4709 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4711 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4712 handle EQ_EXPR and NE_EXPR.
4714 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4716 * graphite-poly.h (poly_dr): Fix comment.
4718 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4719 Tobias Grosser <grosser@fim.uni-passau.de>
4721 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4722 with a zero dimension polyhedron.
4723 (find_scop_parameters): Move the call to scop_set_nb_params here.
4724 (build_loop_iteration_domains): Store in loop->aux the iteration
4726 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4727 by any loop in scop.
4728 (build_poly_scop): Do not call scop_set_nb_params.
4730 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4731 Tobias Grosser <grosser@fim.uni-passau.de>
4733 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4734 add_condition_to_domain not GT_EXPR.
4736 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4738 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4739 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4740 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4741 upper_bound_assign to calculate unions.
4742 * gcc.dg/graphite/id-6.c: New.
4744 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4746 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4747 handle abnormal edges.
4749 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4751 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4752 (free_poly_bb): Also free poly_drs.
4753 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4754 (poly_dr): Polyhedron to Pointset_Powerset.
4755 (pdr_accessp_nb_subscripts): Same.
4756 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4759 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4761 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4762 names into more meaningful names.
4764 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4766 * gfortran.dg/graphite/interchange-1.c: New.
4767 * gfortran.dg/graphite/interchange-2.c: New.
4769 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4771 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4773 * tree-parloops.c (rewrite_phi_with_iv): New.
4774 (rewrite_all_phi_nodes_with_iv): New.
4775 (canonicalize_loop_ivs): Call them.
4777 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4779 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4780 graphite_find_data_references_in_stmt.
4781 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4782 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4784 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4786 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4788 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4790 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4791 instead of bb_in_region.
4792 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4793 (build_sese_conditions): Use flag_bb_in_sese.
4794 * sese.c (register_bb_in_sese): Removed.
4795 (new_sese): Remove initialization of SESE_REGION_BBS.
4796 (free_sese): Do not free SESE_REGION_BBS.
4797 * sese.h (struct sese): Remove field region_basic_blocks.
4798 (SESE_REGION_BBS): Removed.
4799 (bb_in_sese_p): Implement in function of bb_in_region.
4801 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4803 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4806 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4808 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4810 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4811 (add_condition_to_domain): New.
4812 (add_condition_to_pbb): New.
4813 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4814 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4816 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4818 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4819 ppl_Pointset_Powerset.
4820 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4821 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4822 (pbb_nb_loops): Same.
4823 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4824 add_conditions_to_domain): Same.
4825 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4826 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4827 ppl_const_Polyhedron_t.
4828 (ppl_print_powerset_matrix): New.
4829 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4830 ppl_print_powerset_matrix): New.
4831 (ppl_print_polyhedron_matrix): Updated.
4833 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4835 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4837 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4839 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4840 (print_iteration_domains, debug_iteration_domain,
4841 debug_iteration_domains): New.
4842 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4843 debug_iteration_domains): Declared.
4844 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4847 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4848 Sebastian Pop <sebastian.pop@amd.com>
4850 * graphite-poly.h (print_iteration_domain): New.
4851 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4852 (build_sese_conditions_1, build_sese_conditions_after,
4853 build_sese_conditions_before): New.
4854 (build_sese_conditions): Rewritten.
4856 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4857 Tobias Grosser <grosser@fim.uni-passau.de>
4859 Cleanup of code generation liveouts.
4860 * graphite-clast-to-gimple.c (translate_clast): Use a single
4861 rename_map instead of one per translated statement.
4862 Do not use SESE_LIVEOUT_RENAMES.
4863 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4864 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4865 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4866 phi node of a reduction: when a loop contains a reduction used outside
4867 the loop, there should be a scalar close phi node on the exit block.
4868 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4869 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4870 (free_sese): Do not free them.
4871 (sese_build_liveouts_use): Do not use them.
4872 (sese_build_liveouts_bb): Same.
4873 (sese_build_liveouts): Same.
4874 (sese_insert_phis_for_liveouts): Same.
4875 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4876 (defined_in_loop_p): New.
4877 (alive_after_loop): New.
4878 (close_phi_not_yet_inserted_p): New.
4879 (struct alep, alep_p): New.
4880 (add_loop_exit_phis): Remove from the rename_map all the names defined
4881 in the code generated loop.
4882 (insert_loop_close_phis): Traverse the rename_map passed to it.
4883 Don't use SESE_LIVEOUT_RENAMES.
4884 (default_liveout_before_guard): Renamed default_before_guard.
4885 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4886 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4887 (register_sese_liveout_renames): Removed.
4888 (copy_bb_and_scalar_dependences): Do not call it.
4889 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4891 (SESE_LIVEOUT): Removed.
4892 (SESE_LIVEOUT_RENAMES): Removed.
4893 (SESE_REDUCTION_LIST): Removed.
4894 (sese_build_liveouts): Removed.
4895 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4896 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4897 (insert_guard_phis): Same.
4898 (rename_map_elt): Declare a VEC of them.
4899 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4900 trees not pointers to trees.
4902 Rewrite in canonical close SSA form:
4903 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4904 (limit_scops): Close the scop after the block containing the close phi
4906 (canonicalize_loop_closed_ssa): New.
4907 (canonicalize_loop_closed_ssa_form): New.
4908 (build_scops): Call canonicalize_loop_closed_ssa_form.
4910 * graphite-sese-to-poly.c: Fix typos.
4912 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4914 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4916 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4917 (print_pbb): Add conditions.
4919 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4920 Sebastian Pop <sebastian.pop@amd.com>
4922 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4923 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4924 (build_scop_bbs_1): New.
4925 (build_scop_bbs): Rewrite.
4926 * sese.h (bb_in_region): New.
4928 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4930 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4932 (print_scop): Style.
4933 * graphite-poly.h (poly_bb): Add drs vector.
4934 (PBB_DRS): Add accessor.
4935 * graphite-sese-to-poly.c (build_poly_dr): New.
4936 (build_pbb_drs, build_scop_drs): New.
4937 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4939 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4941 * tree-ssa-loop.c: Include forgotten toplev.h
4943 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4945 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4946 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4947 * gcc.dg/graphite/pr37928.c: Same
4948 * gcc.dg/graphite/pr38409.c: Same
4949 * gcc.dg/graphite/pr38498.c: Same
4950 * gcc.dg/graphite/pr38559.c: Same
4951 * gcc.dg/graphite/pr39335.c: Same
4952 * gcc.dg/graphite/pr39335_1.c: Same
4953 * gfortran.dg/graphite/block-2.f: Same
4954 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4957 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4959 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4960 build_access_matrix, build_scop_data_accesses): Remove access function
4961 building. (We get a new version soon).
4962 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4963 * sese.h (nb_loops_around_loop_in_sese): Remove.
4964 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4966 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4967 Sebastian Pop <sebastian.pop@amd.com>
4969 * graphite-scop-detection.c (struct scopdet_info): Rename last
4971 (scopdet_basic_block_info, build_scops_1): Don't use
4972 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4974 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4975 Sebastian Pop <sebastian.pop@amd.com>
4977 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4978 * sese.c (sese_build_liveouts_use): Renamed from
4979 sese_build_livein_liveouts_use. Remove liveins.
4980 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4981 Call sese_build_liveouts_use.
4982 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4983 Call sese_build_liveouts_bb.
4984 (new_sese, free_sese): Remove liveins.
4985 (sese_add_exit_phis_var): Deleted.
4986 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4988 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4990 * sese.h (sese): Remove num_ver and livein.
4991 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4993 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4995 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4997 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4999 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
5000 (build_scop_scattering): Do not use compare_prefix_loops any more.
5001 (nb_common_loops): New.
5003 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5005 * sese.c (get_new_name_from_old_name): Renamed get_rename.
5006 (register_old_and_new_names): Renamed set_rename.
5008 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5010 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
5011 of the decl from the previous commit.
5013 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5015 * graphite-scop-detection.c (dot_scop): New.
5016 * graphite-scop-detection.h (dot_scop): Declared.
5018 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5020 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
5022 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5024 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
5025 condition at the end of the loop.
5026 * graphite.c (graphite_initialize, graphite_finalize): Print to
5027 dump_file the compiled function.
5028 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
5029 of create_empty_loop_on_edge.
5030 (translate_clast): Update the code generation of loops for the new
5032 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
5034 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
5036 Reverted the patch from 2009-03-19.
5038 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
5040 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5042 (print_scop): Style.
5043 * graphite-poly.h (poly_bb): Add drs vector.
5044 (PBB_DRS): Add accessor.
5045 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
5046 (build_access_matrix_with_af, build_access_matrix,
5047 build_scop_data_accesses): Delete.
5048 (build_poly_dr): New.
5049 (build_pbb_drs, build_scop_drs): New.
5050 (build_poly_scop): call build_scop_drs.
5052 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
5054 * graphite-scop-detection.c (dot_all_scops_1): Close the table
5055 once per basic block.
5057 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5059 * graphite-scop-detection.c (graphite_can_represent_scev): New.
5060 (graphite_can_represent_expr): Renamed from loop_affine_expr
5062 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
5063 (graphite_cannot_represent_loop): Add scop_entry to parameters.
5064 (scopdet_basic_block_info): Actually define entry_block.
5065 (stmt_simple_memref_p): Moved here from ...
5067 * tree-data-ref.c (stmt_simple_memref_p): here.
5068 * tree-data-ref.h (stmt_simple_memref_p): Removed.
5070 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
5072 * gcc.dg/graphite/id-4.c: New.
5074 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5076 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5077 (register_old_and_new_names): Update the content of the map.
5078 When there was already a rename_map_elt in the map at that
5080 (copy_bb_and_scalar_dependences): Do rename_variables after
5081 expand_scalar_variables.
5082 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5083 of the map. When there was already a rename_map_elt in the
5084 map at that location, free it.
5085 (translate_clast): Pass the rename_map. Do not initialize and free
5086 a rename_map per stmt_user.
5087 (gloog): Initialize and free one rename_map and pass it to
5090 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
5092 * sese.c (expand_scalar_variables_stmt,
5093 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5095 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5096 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5097 the gimple_stmt_iterator of the statement to be expanded.
5098 * graphite-scop-detection.c (is_simple_operand): Do handle
5101 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5103 * graphite-scop-detection.c (is_simple_operand): Do not handle
5105 * gcc.dg/graphite/id-2.c: New.
5107 * graphite-sese-to-poly.c (build_bb_loops,
5108 add_value_to_dim, scan_tree_for_params_right_scev,
5109 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5110 find_params_in_bb, build_loop_iteration_domains,
5111 add_conditions_to_domain): Remove subtract.
5113 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5115 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5116 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5117 pbb_loop_at_index -> gbb_loop_at_index.
5118 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5119 (debug_loop_vec): Delete.
5120 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5121 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
5122 (PBB_LOOPS): Removed.
5123 (PBB_BLACK_BOX): Insert cast.
5124 (pbb_set_black_box): New setter.
5125 (pbb_loop_at_index, pbb_loop_index): Removed.
5126 (scop_set_region, scop_set_nb_params): New.
5127 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5128 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5129 (build_poly_scop): Use scop_set_nb_params.
5130 * sese.h (gimple_bb): Add LOOPS.
5131 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5133 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5135 Revert previous commit.
5137 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5139 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5140 (register_old_and_new_names): Update the content of the map.
5141 When there was already a rename_map_elt in the map at that
5143 (copy_bb_and_scalar_dependences): Do rename_variables after
5144 expand_scalar_variables.
5145 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5146 of the map. When there was already a rename_map_elt in the
5147 map at that location, free it.
5148 (translate_clast): Pass the rename_map. Do not initialize and free
5149 a rename_map per stmt_user.
5150 (gloog): Initialize and free one rename_map and pass it to
5153 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
5155 Remove forgotten line in revert.
5157 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
5159 Revert previous commit.
5161 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5163 * sese.c (register_old_and_new_names): Update the content
5164 of the map. When there was already a rename_map_elt in the
5165 map at that location, free it.
5166 (copy_bb_and_scalar_dependences): Do rename_variables after
5167 expand_scalar_variables.
5168 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5169 of the map. When there was already a rename_map_elt in the
5170 map at that location, free it.
5171 (translate_clast): Pass the rename_map. Do not initialize and free
5172 a rename_map per stmt_user.
5173 (gloog): Initialize and free one rename_map and pass it to
5176 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
5178 * graphite-clast-to-gimple.c (translate_clast): context_loop
5181 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5182 Sebastian Pop <sebastian.pop@amd.com>
5184 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5185 of the use of ppl_Polyhedron_map_space_dimensions.
5187 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
5188 Sebastian Pop <sebastian.pop@amd.com>
5190 * graphite-poly.c (unify_scattering_dimensions): Fix types.
5191 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5192 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5193 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5194 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5195 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5196 pbb_nb_params): New.
5197 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5198 nb_loops_around_pbb): Adapt return types.
5200 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
5202 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5203 graphite-clast-to-gimple.o, graphite-data-ref.o,
5204 graphite-scop-detection.o, graphite-poly.o): Add
5207 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
5209 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5210 graphite-clast-to-gimple.o, graphite-data-ref.o,
5211 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5213 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5215 * gcc.dg/graphite/pr37485.c: Remove -floop-block
5216 * gcc.dg/graphite/pr37828.c: Same.
5217 * gcc.dg/graphite/pr37684.c: Same.
5218 * gcc.dg/graphite/block-0.c: Same.
5219 * gcc.dg/graphite/block-1.c: Same.
5220 * gcc.dg/graphite/block-2.c: Same.
5221 * gcc.dg/graphite/block-3.c: Same.
5222 * gcc.dg/graphite/block-4.c: Same.
5223 * gcc.dg/graphite/block-5.c: Same.
5224 * gcc.dg/graphite/block-6.c: Same.
5225 * gfortran.dg/graphite/pr38083.f90: Same.
5226 * gfortran.dg/graphite/block-1.f90: Same.
5227 * gfortran.dg/graphite/block-3.f90: Same.
5228 * gfortran.dg/graphite/pr37852.f90: Same.
5229 * gfortran.dg/graphite/block-4.f90: Same.
5230 * gfortran.dg/graphite/pr37980.f90: Same.
5231 * gfortran.dg/graphite/pr38953.f90: Same.
5232 * gfortran.dg/graphite/pr37857.f90: Same.
5233 * opts.c: Remove -floop-block from -O2.
5234 * graphite-poly.c: Fail if -floop-block -floop-interchange or
5235 -floop-strip-mine are used.
5237 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5238 Sebastian Pop <sebastian.pop@amd.com>
5240 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5242 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5243 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5244 strip_mine_profitable_p, is_interchange_valid,
5245 graphite_trans_bb_block, graphite_trans_loop_block,
5246 graphite_trans_scop_block): Temporary removed.
5247 (extend_scattering, unify_scattering_dimensions): New.
5248 (print_scattering_function, graphite_read_transforms):
5249 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5250 (graphite_generate_scattering_fns): Removed.
5251 (apply_poly_transforms): Cleanup.
5252 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5253 (schedule_to_scattering): Moved.
5254 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5255 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5256 (pbb_nb_scattering): New.
5257 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5258 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5260 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5262 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5263 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
5264 -> PBB_TRANSFORMED_SCATTERING.
5265 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5266 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5267 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5268 (check_poly_representation): Do not return bool.
5269 (graphite_transform_loops): Reformat.
5270 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5272 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
5274 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5275 debug_pbb_domain, debug_pbb, debug_scop): New.
5276 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5277 debug_pbb_domain, debug_pbb, debug_scop): Declared.
5279 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5282 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5283 when the type precision of the induction variable should be
5284 larger than the type precision of nit.
5285 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5286 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5287 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5289 * gcc.dg/graphite/pr39335_1.c: New.
5290 * gcc.dg/graphite/pr39335.c: New.
5292 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5294 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5295 SSA_NAMES not struct reduction_info.
5297 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5299 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5301 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5302 Tobias Grosser <grosser@fim.uni-passau.de>
5304 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5305 (free_sese): Free SESE_REDUCTION_LIST.
5306 * sese.h (struct sese): Add field reduction_list.
5307 (SESE_REDUCTION_LIST): New.
5308 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5309 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5311 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5312 Tobias Grosser <grosser@fim.uni-passau.de>
5314 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5317 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5318 Tobias Grosser <grosser@fim.uni-passau.de>
5320 * tree-parloops.c (struct brli, build_reduction_list_info,
5321 analyze_reduction_list, gather_scalar_reductions): New.
5322 (loop_parallel_p): Build a reduction list containing only
5323 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5324 (gen_parallel_loop): Call the analysis analyze_reduction_list.
5325 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5326 * tree-flow.h (gather_scalar_reductions): Declared.
5328 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
5331 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5332 number_of_iterations_exit from a gcc_assert.
5334 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
5335 Jan Sjodin <jan.sjodin@amd.com>
5337 * output.h (graphite_out_file, graphite_in_file): Declared.
5338 * toplev.c (graphite_out_file, graphite_in_file): New.
5339 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5340 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5341 Don't call schedule_to_scattering.
5342 * common.opt (fgraphite-write, fgraphite-read): New.
5343 * graphite-poly.c: Include output.h.
5344 (print_scattering_function, print_scattering_functions,
5345 debug_scattering_function, debug_scattering_functions,
5346 graphite_write_transforms, graphite_read_transforms,
5347 graphite_generate_scattering_fns): New.
5348 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5349 Call graphite_generate_scattering_fns, graphite_write_transforms,
5350 graphite_read_transforms.
5351 (new_poly_bb): Initialize PBB_SCATTERING.
5352 (free_poly_bb): Free PBB_SCATTERING.
5353 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5354 * graphite-poly.h (struct poly_bb): Add field scattering.
5355 (PBB_SCATTERING): New.
5356 (print_scattering_function, print_scattering_functions,
5357 debug_scattering_function, debug_scattering_functions): Declared.
5358 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5359 GMP values, not integers!
5360 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5361 ppl_read_polyhedron_matrix): New.
5362 * graphite-ppl.h (ppl_print_polyhedron_matrix,
5363 debug_ppl_polyhedron_matrix,
5364 ppl_read_polyhedron_matrix): Declared.
5365 * Makefile.in (graphite-poly.o): Depends on output.h.
5367 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5368 Tobias Grosser <grosser@fim.uni-passau.de>
5371 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5372 scalar evolutions in the scop_entry->loop_father.
5374 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5375 Tobias Grosser <grosser@fim.uni-passau.de>
5377 * graphite.h (ref_nb_loops): Remove declaration.
5378 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5379 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5380 debug_gbb): Moved to sese.h.
5383 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5384 Tobias Grosser <grosser@fim.uni-passau.de>
5386 * graphite-data-ref.[ch]: Disable.
5388 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5389 Tobias Grosser <grosser@fim.uni-passau.de>
5391 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5392 scalar evolutions in the scop_entry->loop_father.
5394 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5396 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5397 (graphite_cannot_represent_loop_niter): Renamed
5398 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5399 (limit_scops): build_sese_loop_nests does not return a bool.
5400 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5401 * sese.c (nb_reductions_in_loop): ... from here.
5402 (graphite_loop_normal_form): ... from here.
5403 (sese_record_loop): Does not fail, so does not return a bool.
5404 (build_sese_loop_nests): Same.
5405 * sese.h (build_sese_loop_nests): Update declaration.
5406 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5407 (build_graphite_loop_normal_form): New.
5408 (gloog): Call build_graphite_loop_normal_form.
5409 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5410 build_sese_loop_nests.
5412 * gcc.dg/graphite/id-1.c: New.
5414 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5415 Tobias Grosser <grosser@fim.uni-passau.de>
5417 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5418 The SCoP detection fix is sufficient.
5420 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5422 PR tree-optimization/39260
5423 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5424 the basic block contains a condition with a real type.
5425 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5427 * gcc.dg/graphite/pr39260.c: New.
5429 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5431 * graphite-poly.c: Inlcude params.h.
5432 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5434 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5435 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5437 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5438 Tobias Grosser <grosser@fim.uni-passau.de>
5440 * graphite-scop-detection.c (dot_all_scops_1,
5441 dot_all_scops): Moved here.
5442 * graphite-scop-detection.h (dot_all_scops): Declared here.
5443 * graphite.c (graphite_initialize, graphite_finalize): New.
5444 (graphite_transform_loops): Cleaned up.
5445 * sese.c (debug_oldivs): Moved here.
5446 * graphite-poly.c (graphite_apply_transformations): Renamed
5447 apply_poly_transforms.
5448 (debug_loop_vec): Moved here.
5449 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5450 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5451 find_scop_parameters, build_scop_iteration_domain,
5452 add_conditions_to_constraints, build_scop_canonical_schedules,
5453 build_scop_data_accesses): Now static.
5454 (build_poly_scop, check_poly_representation): New.
5456 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5458 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5459 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5460 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5461 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5462 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5463 scan_tree_for_params, struct irp_data, dx_record_params,
5464 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5465 build_loop_iteration_domains, add_conditions_to_domain,
5466 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5467 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5468 build_sese_conditions, add_conditions_to_constraints,
5469 build_scop_iteration_domain, build_access_matrix_with_af,
5470 build_access_matrix,
5471 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5473 * graphite-sese-to-poly.c: New.
5474 * graphite-sese-to-poly.h: New.
5476 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5478 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5480 * graphite.c: Split graphite code generation to a new file.
5481 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5482 max_precision_type, clast_to_gcc_expression_red,
5483 clast_to_gcc_expression, gcc_type_for_clast_expr,
5484 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5485 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5486 graphite_create_new_guard, clast_get_body_of_loop,
5487 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5488 graphite_create_new_loop, build_iv_mapping, copy_renames,
5489 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5490 compute_cloog_iv_types, free_scattering, save_var_name,
5491 initialize_cloog_names, build_scop_context, build_cloog_prog,
5492 set_cloog_options, debug_clast_stmt, scop_to_clast,
5493 print_generated_program, debug_generated_program,
5494 gloog): Moved to graphite-clast-to-gimple.c.
5496 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5498 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5499 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5500 loop_iv_stack_pop, loop_iv_stack_get_iv,
5501 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5502 free_loop_iv_stack, loop_iv_stack_remove_constants,
5503 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5504 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5505 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5506 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5507 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5508 get_vdef_before_sese, sese_adjust_vphi,
5509 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5510 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5511 is_iv, expand_scalar_variables_ssa_name,
5512 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5513 expand_scalar_variables, rename_variables, remove_condition,
5514 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5515 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5516 default_liveout_before_guard, add_guard_exit_phis,
5517 insert_guard_phis, register_old_and_new_names,
5518 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5519 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5520 if_region_set_false_region, create_if_region_on_edge,
5521 move_sese_in_condition): Moved to sese.c.
5523 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5524 if_region_exit, if_region_get_condition_block,
5525 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5526 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5527 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5528 ivtype_map_elt, new_ivtype_map_elt,
5529 recompute_all_dominators): Moved to sese.h.
5531 * graphite-clast-to-gimple.c: New.
5532 * graphite-clast-to-gimple.h: New.
5533 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5534 * sese.c: Modified as said above.
5537 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5539 * graphite.c: Split scop detection to a new file.
5540 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5541 move_sd_regions, loop_affine_expr, exclude_component_ref,
5542 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5543 graphite_cannot_represent_loop_niter, struct scopdet_info,
5544 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5545 find_single_entry_edge, find_single_exit_edge,
5546 create_single_entry_edge, sd_region_without_exit,
5547 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5548 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5549 Moved to graphite-scop-detection.c.
5551 * graphite-scop-detection.c: New.
5552 * graphite-scop-detection.h: New.
5553 * Makefile.in: Add new rule for graphite-scop-detection.o.
5555 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5556 tree-scalar-evolution.h.
5557 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5558 build_sese_loop_nests): Moved here from graphite.c.
5559 (param_index): Renamed parameter_index_in_region.
5561 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5562 Sebastian Pop <sebastian.pop@amd.com>
5564 * gcc.dg/graphite/block-0.c: Expected to fail now.
5565 * gcc.dg/graphite/block-1.c: Same.
5566 * gcc.dg/graphite/block-5.c: Same.
5567 * gcc.dg/graphite/block-6.c: Same.
5569 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5570 Sebastian Pop <sebastian.pop@amd.com>
5572 * graphite.h: Separate from graphite_bb_p the polyhedral
5573 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5574 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5575 graphite-data-ref.h.
5576 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5577 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5578 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5579 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5580 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5581 scop_nb_params): Moved to graphite-poly.h.
5582 * graphite-data-ref.c: Same.
5583 * graphite-data-ref.h: New.
5585 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5586 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5587 is_interchange_valid, graphite_trans_bb_block,
5588 graphite_trans_loop_block, scop_max_loop_depth,
5589 graphite_trans_scop_block, graphite_apply_transformations,
5590 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5592 * graphite-poly.h: New.
5593 * graphite-poly.c: New.
5594 * Makefile.in (OBJS-common): Add graphite-poly.o.
5595 (graphite-poly.o): New rule.
5596 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5599 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5600 Tobias Grosser <grosser@fim.uni-passau.de>
5602 * graphite.c: Replace gb -> gbb.
5604 * graphite-data-ref.c: Same.
5606 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5607 Tobias Grosser <grosser@fim.uni-passau.de>
5609 * Makefile.in (OBJS-commmon): Add sese.o.
5611 (graphite.o): Add sese.h.
5612 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5613 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5614 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5616 (block_before_scop): Add missing return.
5617 (new_scop, free_scop): Remove SESE data structures.
5618 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5619 find_scop_parameters, build_loop_iteration_domains,
5620 add_conditions_to_domain, register_scop_liveout_renames,
5621 copy_bb_and_scalar_dependences): Scop -> SESE.
5623 (add_conditions_to_domain): SCoP -> SESE and remove check
5624 (scop_contains_non_iv_scalar_phi_nodes): New.
5625 (build_scop_conditions_1, build_scop_conditions): Remove check for
5626 non iv scalar phi nodes.
5627 (print_scop_statistics): New.
5628 (graphite_transform_loops): Cleanup.
5630 * graphite.h: Move to sese & cleanup.
5634 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5635 Tobias Grosser <grosser@fim.uni-passau.de>
5637 * graphite.c (build_scop_conditions_1): Conditions are only
5638 at the end of a basic block.
5640 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5641 Tobias Grosser <grosser@fim.uni-passau>
5643 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5645 (GBB_ALPHA): Removed.
5647 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5648 Tobias Grosser <grosser@fim.uni-passau.de>
5650 * graphite-data-ref.c (graphite_test_dependence): Don't use
5651 GBB_DYNAMIC_SCHEDULE.
5652 * graphite.c (new_graphite_bb): Same.
5653 (free_graphite_bb): Same.
5654 (build_scop_dynamic_schedules): Removed.
5655 (graphite_transform_loops): Don't call it.
5656 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5657 (GBB_DYNAMIC_SCHEDULE): Removed.
5659 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5660 Tobias Grosser <grosser@fim.uni-passau.de>
5662 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5663 (print_graphite_bb): Same.
5664 (build_cloog_prog): Same.
5666 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5667 Tobias Grosser <grosser@fim.uni-passau.de>
5669 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5671 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5672 Tobias Grosser <grosser@fim.uni-passau.de>
5674 * graphite.c (build_scop_context): Don't use CloogMatrix.
5675 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5676 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5678 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5679 Tobias Grosser <grosser@fim.uni-passau.de>
5681 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5682 liveout_renames, add_params fields...
5683 (struct sese): ... here.
5684 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5685 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5687 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5688 Tobias Grosser <grosser@fim.uni-passau.de>
5690 * graphite.c (print_scop): Do not print the CLooG program.
5691 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5692 build_cloog_prog, gloog): Don't use SCOP_PROG.
5693 (find_transform): Renamed scop_to_clast.
5694 (print_generated_program, debug_generated_program): New.
5695 (graphite_transform_loops): Adapt to new interface.
5696 * graphite.h (struct scop): Remove program field.
5697 (SCOP_PROG): Removed.
5698 (print_generated_program, debug_generated_program): Declared.
5700 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5702 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5703 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5704 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5705 free_graphite_bb, build_scop_canonical_schedules,
5706 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5707 schedules are now represented using a ppl_Linear_Expression_t.
5708 * graphite.h (struct graphite_bb): Same.
5709 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5710 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5712 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5714 * graphite.c: Free local memory.
5715 * graphite-ppl.c: Same.
5717 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5719 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5720 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5721 swap_constraint_variables, scale_constraint_variable): Removed.
5722 (graphite_trans_bb_strip_mine): Remove pong.
5723 * graphite-ppl.c: Include missing header files.
5724 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5725 * graphite-ppl.h (ppl_strip_loop): Declared.
5726 * Makefile.in (graphite-ppl.o): Adjust dependences.
5728 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5730 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5731 (build_scop_iteration_domain): Same.
5733 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5735 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5737 (add_value_to_dim, scan_tree_for_params_right_scev,
5738 scan_tree_for_params_int): New.
5739 * graphite-ppl.c (oppose_constraint): New.
5740 (insert_constraint_into_matrix): Implement missing cases.
5741 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5743 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5745 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5746 use ppl_move_dimension.
5748 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5750 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5753 * graphite-ppl.c: Same.
5754 * graphite-ppl.h: Same.
5756 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5758 Revert last 3 commits.
5760 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5762 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5764 (add_value_to_dim, scan_tree_for_params_right_scev,
5765 scan_tree_for_params_int): New.
5766 * graphite-ppl.c (oppose_constraint): New.
5767 (insert_constraint_into_matrix): Implement missing cases.
5768 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5770 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5772 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5774 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5775 Tobias Grosser <grosser@fim.uni-passau.de>
5777 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5778 use ppl_move_dimension.
5779 * graphite-ppl.c (ppl_move_dimension): New.
5780 * graphite-ppl.h (ppl_move_dimension): Declared.
5782 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5784 * graphite.c: Do not include cloog/cloog.h.
5785 (print_graphite_bb): Remove ping pong, call PPL print function.
5787 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5789 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5790 (graphite.o): Add dependence on graphite-ppl.h.
5791 (graphite-ppl.o): New.
5792 (graphite-data-ref.c): Ping pong between PPL data structures
5794 * graphite-ppl.c: New.
5795 * graphite-ppl.h: New.
5796 * graphite.c: Include graphite-ppl.h.
5797 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5798 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5799 Ping pong between PPL data structures and matrices.
5800 (new_graphite_bb): Create a PPL constraint system.
5801 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5802 (build_loop_iteration_domains): Use PPL functions.
5803 * graphite.h: Include graphite-ppl.h. Fix comments.
5804 (graphite_bb): Use a ppl_Constraint_System_t instead of
5805 CloogMatrix for representing the domain.
5806 (scop): Remove static_schedule.
5807 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5809 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5811 * graphite.c: Fix some comments.
5813 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5816 * graphite.c (if_region_set_false_region): After moving a region
5817 in the false branch of a condition, remove the empty dummy
5819 (gloog): Remove wrong fix for PR38953.
5821 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5823 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5824 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5825 register_bb_in_sese, new_sese, free_sese): Moved.
5826 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5827 outermost_loop_in_scop, build_scop_iteration_domain,
5828 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5829 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5830 Use loop_in_sese_p instead of loop_in_scop_p.
5831 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5832 (free_scop): Do not free SCOP_BBS_B.
5833 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5834 ref_nb_loops): Moved here...
5835 * graphite.h (ref_nb_loops): ... from here.
5836 (struct scop): Remove bbs_b bitmap.
5837 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5838 * gcc.dg/graphite/scop-19.c: New
5840 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5842 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5845 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5847 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5848 eq_loop_to_cloog_loop): Remove.
5849 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5850 * graphite.h (struct scop): Remove loop2cloog_loop.
5851 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5853 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5855 * opts.c (decode_options): Only add graphite options to O2
5856 if we compile with graphite enabled.
5858 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5860 * Merge from mainline (r143163:143684).
5862 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5864 * graphite.c (debug_value): Removed.
5865 * graphite.h (debug_value): Removed.
5867 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5869 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5870 after graphite: pass_copy_prop does not maintain a proper loop closed
5871 SSA form. pass_copy_prop should be fixed.
5873 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5875 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5877 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5879 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5880 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5881 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5884 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5886 * graphite.c (gloog): Return true when code gen succeeded.
5887 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5888 the code of the function did not changed. After cleanup_tree_cfg
5889 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5892 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5894 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5895 gimple_call_lhs is NULL.
5897 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5898 Tobias Grosser <tobi.grosser@amd.com>
5900 * graphite.c (graphite_trans_scop_block): Do not block single
5903 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5904 Tobias Grosser <tobi.grosser@amd.com>
5906 * graphite.c (build_scop_canonical_schedules): Start schedules at
5909 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5910 Tobias Grosser <tobi.grosser@amd.com>
5912 * graphite.c (compare_prefix_loops): New.
5913 (build_scop_canonical_schedules): Rewritten.
5914 (graphite_transform_loops): Move build_scop_canonical_schedules
5915 after build_scop_iteration_domain.
5917 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5918 Tobias Grosser <tobi.grosser@amd.com>
5920 * graphite.c (add_conditions_to_domain): Add the loops to
5921 the dimension of the iteration domain. Do copy the domain
5922 only when it exists.
5923 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5924 (add_conditions_to_constraints): New.
5925 (can_generate_code_stmt, can_generate_code): Removed.
5926 (gloog): Do not call can_generate_code.
5927 (graphite_transform_loops): Call add_conditions_to_constraints
5928 after building the iteration domain.
5930 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5931 Tobias Grosser <tobi.grosser@amd.com>
5932 Jan Sjodin <jan.sjodin@amd.com>
5934 * graphite.c (scan_tree_for_params): On substractions negate
5935 all the coefficients of the term.
5936 (clast_to_gcc_expression_red): New. Handle reduction expressions
5937 of more than two operands.
5938 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5939 (get_vdef_before_scop): Handle also the case of default definitions.
5941 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5944 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5945 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5946 (gloog): Do not call cleanup_tree_cfg.
5947 (graphite_transform_loops): Call cleanup_tree_cfg after all
5948 scops have been code generated.
5950 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5952 * passes.c (init_optimization_passes): Schedule after
5953 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5955 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5957 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5959 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5960 Set the type of an expression to the type of its assign statement.
5961 (expand_scalar_variables_expr): Do not pass loop_p.
5962 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5963 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5964 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5966 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5968 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5969 an expression to the gimple_expr_type of its assign statement.
5970 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5973 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5975 PR tree-optimization/38786
5976 * gcc.dg/graphite/pr38786.c: New.
5977 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5978 the SSA_NAME case of expand_scalar_variables_expr.
5979 (expand_scalar_variables_expr): Also gather the scalar computation
5980 used to index the memory access.
5981 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5982 the gimple_stmt_iterator where it inserts new code.
5984 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5986 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5988 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5990 * opts.c (decode_options): Enable flag_graphite_identity and
5991 flag_loop_block in -O2 and above.
5993 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5995 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5996 Fix merge problem: replace with the file from trunk.
5998 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
6000 * Merge from mainline (r141727:143163).
6002 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
6003 Jan Sjodin <jan.sjodin@amd.com>
6005 PR tree-optimization/38559
6006 * gcc.dg/graphite/pr38559.c: New.
6008 * graphite.c (debug_value, copy_constraint,
6009 swap_constraint_variables, scale_constraint_variable, ): New.
6010 (get_lower_bound, get_upper_bound): Removed.
6011 (graphite_trans_bb_strip_mine): Clean up this code that works
6012 only for constant number of iterations. Fully copy upper and
6013 lower bound constraints, not only the constant part of them.
6014 * graphite.h (debug_value): Declared.
6016 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
6018 PR tree-optimization/38492
6019 PR tree-optimization/38498
6020 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
6021 * tree-chrec.h (scev_is_linear_expression): Declared.
6022 * graphite.c (graphite_cannot_represent_loop_niter): New.
6023 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
6024 (graphite_loop_normal_form): Use gcc_assert.
6025 (scan_tree_for_params): Use CASE_CONVERT.
6026 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
6027 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
6028 Use gcc_assert. Discard scops that contain unhandled cases.
6029 (build_scop_conditions): Return a boolean status for unhandled cases.
6030 (strip_mine_profitable_p): Print the loop number, not its depth.
6031 (is_interchange_valid): Pass the depth of the loop nest, don't
6032 recompute it wrongly.
6033 (graphite_trans_bb_block): Same.
6034 (graphite_trans_bb_block): Print tentative of loop blocking.
6035 (graphite_trans_scop_block): Do not print that the loop has been
6037 (graphite_transform_loops): Do not handle scops that contain condition
6040 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
6042 * gcc.dg/graphite/block-0.c: Update test.
6043 * gcc.dg/graphite/block-1.c: Same.
6044 * gcc.dg/graphite/block-2.c: Remove xfail and test for
6046 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
6047 * gcc.dg/graphite/block-3.c: New.
6048 * gcc.dg/graphite/pr38498.c: New.
6050 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
6052 PR tree-optimization/38510
6053 * gcc.dg/graphite/pr38510.c: New.
6054 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
6055 (translate_clast): Call recompute_all_dominators before
6057 (gloog): Call recompute_all_dominators before graphite_verify.
6059 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
6061 PR tree-optimization/38492
6062 * graphite.c (rename_map_elt, debug_rename_elt,
6063 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
6064 rename_map_elt_info, eq_rename_map_elts,
6065 get_new_name_from_old_name, bb_in_sese_p): Moved around.
6066 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
6067 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
6068 (sese_build_livein_liveouts): New.
6069 (new_sese, free_sese): New.
6070 (new_scop): Call new_sese.
6071 (free_scop): Call free_sese.
6072 (rename_variables_from_edge, rename_phis_end_scop): Removed.
6073 (register_old_new_names): Renamed register_old_and_new_names.
6074 (register_scop_liveout_renames, add_loop_exit_phis,
6075 insert_loop_close_phis, struct igp,
6076 default_liveout_before_guard, add_guard_exit_phis,
6077 insert_guard_phis, copy_renames): New.
6078 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
6079 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
6080 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
6081 (scop_adjust_phis_for_liveouts): New.
6082 (gloog): Call scop_adjust_phis_for_liveouts.
6084 * graphite.h (struct sese): Documented. Added fields liveout,
6086 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
6087 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
6088 (struct scop): Added field liveout_renames.
6089 (SCOP_LIVEOUT_RENAMES): New.
6091 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6093 PR tree-optimization/38409
6094 * gcc.dg/graphite/pr38409.c: New.
6095 * graphite.c (nb_reductions_in_loop): Use simple_iv.
6097 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6099 * graphite.c (gcc_type_for_cloog_iv): By default return
6101 (graphite_create_new_loop): Don't fold_convert the already
6102 fold_convert-ed expression.
6104 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
6106 PR tree-optimization/38446
6107 * gcc.dg/graphite/pr38446.c: New.
6108 * graphite.c (register_bb_in_sese): New.
6109 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6110 looking at the bbs in the region.
6111 * graphite.h (sese): Add region_basic_blocks pointer set to
6112 structure and initialize at the time of defining new scop.
6114 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
6116 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6117 (find_params_in_bb): Do not free data refs.
6118 (free_graphite_bb): Add FIXME on disabled free_data_refs.
6120 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
6122 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6123 * gcc.dg/graphite/scop-17.c: Same.
6124 * gcc.dg/graphite/block-5.c: New.
6125 * gcc.dg/graphite/block-6.c: New.
6126 * gcc.dg/graphite/pr37485.c: Clean dump file after.
6127 * gcc.dg/graphite/pr37684.c: Same.
6128 * gcc.dg/graphite/block-2.c: Same.
6130 * graphite.c (struct ivtype_map_elt): New.
6131 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6132 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6133 gcc_type_for_cloog_iv): New.
6134 (loop_iv_stack_patch_for_consts): Use the type of the induction
6135 variable from the original loop, except for the automatically
6136 generated loops, i.e., in the case of a strip-mined loop, in
6137 which case there is no original loop: in that case just use
6139 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6140 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6141 (clast_name_to_gcc): Accept params to be NULL.
6142 (clast_to_gcc_expression): Take an extra parameter for the type.
6143 Convert to that type all the expressions built by this function.
6144 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6145 (graphite_translate_clast_equation): Compute the type of the
6146 clast_equation before translating its LHS and RHS.
6147 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6148 (graphite_create_new_loop): Compute the type of the induction
6149 variable before translating the lower and upper bounds and before
6150 creating the induction variable.
6151 (rename_variables_from_edge, rename_phis_end_scop): New.
6152 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6153 (sese_add_exit_phis_edge): Do not use integer_zero_node.
6154 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6155 compute_cloog_iv_types): New.
6156 (gloog): Call compute_cloog_iv_types before starting the
6157 translation of the clast.
6159 * graphite.h (struct graphite_bb): New field cloog_iv_types.
6160 (GBB_CLOOG_IV_TYPES): New.
6161 (debug_ivtype_map): Declared.
6162 (oldiv_for_loop): New.
6164 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
6167 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6168 (param_index): Assert if parameter is not know after parameter
6170 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6171 (find_scop_parameters): Mark, that we have finished parameter
6173 (graphite_transform_loops): Move condition detection before parameter
6175 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6176 * gfortran.dg/graphite/pr38459.f90: New.
6178 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6180 * graphite.c (graphite_transform_loops): Always call find_transform ()
6181 in ENABLE_CHECKING. So we test these code paths, even if we do not
6184 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
6186 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6187 (print_scop): Ditto.
6189 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
6192 Fix gfortran.dg/graphite/id-3.f90.
6193 * graphite.c (scopdet_basic_block_info): Fix bug that found some
6194 regions more than once.
6196 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6198 Fix gfortran.dg/graphite/id-4.f90.
6199 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6202 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6204 Fix gfortran.dg/graphite/id-1.f90.
6205 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6206 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6207 (max_precision_type): New.
6208 (value_clast): Removed.
6209 (clast_to_gcc_expression): Be more careful to types of expressions.
6210 Use max_precision_type and update use of gmp_cst_to_tree.
6211 (graphite_translate_clast_equation): Use max_precision_type.
6212 (graphite_create_guard_cond_expr): Do not use integer_type_node,
6213 use the type of the condition.
6214 (graphite_create_new_loop): Do not use integer_type_node, use the
6215 max_precision_type of lb and ub.
6217 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6219 * graphite.c (build_scops_1): Initialize open_scop.exit
6222 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6224 * gcc.dg/graphite/pr38084.c: New.
6225 * gfortran.dg/graphite/id-1.f90: New.
6226 * gfortran.dg/graphite/id-2.f90: New.
6227 * gfortran.dg/graphite/id-3.f90: New.
6228 * gfortran.dg/graphite/id-4.f90: New.
6229 * gfortran.dg/graphite/pr37857.f90: New.
6231 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6232 Jan Sjodin <jan.sjodin@amd.com>
6233 Harsha Jagasia <harsha.jagasia@amd.com>
6245 * gcc.dg/graphite/pr38073.c: New.
6246 * gcc.dg/graphite/pr37928.c: New.
6247 * gcc.dg/graphite/pr37883.c: New.
6248 * gcc.dg/graphite/pr38125.c: New.
6249 * gfortran.dg/graphite/pr38083.f90: New.
6250 * gfortran.dg/graphite/pr37852.f90: New.
6251 * gfortran.dg/graphite/pr37980.f90: New.
6253 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6254 the number of detected scops. Copy exact same test for loop
6256 * gcc.dg/graphite/block-1.c: Fix the number of expected
6257 loops to be blocked as reductions are not handled.
6258 * gcc.dg/graphite/block-4.c: ...here. New.
6260 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6261 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6263 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6264 * Makefile.in (graphite.o): Depend on value-prof.h.
6265 (graphite.o-warn): Removed -Wno-error.
6266 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6267 to be a NULL pointer. Call update_stmt. Return the newly created
6268 cannonical induction variable.
6270 * graphite.h (debug_rename_map): Declared. Fix some comments.
6272 * graphite.c: Reimplement the code generation from graphite to gimple.
6273 Include value-prof.h.
6274 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6275 (get_old_iv_from_ssa_name): Removed.
6276 (graphite_stmt_p): New.
6277 (new_graphite_bb): Test for useful statements before building a
6278 graphite statement for the basic block.
6279 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6280 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6282 (recompute_all_dominators, graphite_verify,
6283 nb_reductions_in_loop, graphite_loop_normal_form): New.
6284 (scop_record_loop): Call graphite_loop_normal_form.
6285 (build_scop_loop_nests): Iterate over all the blocks of the
6286 function instead of relying on the incomplete information from
6287 SCOP_BBS. Return the success of the operation.
6288 (find_params_in_bb): Use the data from GBB_DATA_REFS.
6289 (add_bb_domains): Removed.
6290 (build_loop_iteration_domains): Don't call add_bb_domains.
6291 Add the iteration domain only to the basic blocks that have been
6292 translated to graphite.
6293 (build_scop_conditions_1): Add constraints only if the basic
6294 block have been translated to graphite.
6295 (build_scop_data_accesses): Completely disabled until data
6296 dependence is correctly implemented.
6297 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6298 (remove_all_edges_1, remove_all_edges): Removed.
6299 (get_new_name_from_old_name): New.
6300 (graphite_rename_variables_in_stmt): Renamed
6301 rename_variables_in_stmt. Call get_new_name_from_old_name.
6302 Use replace_exp and update_stmt.
6303 (is_old_iv): Renamed is_iv.
6304 (expand_scalar_variables_stmt): Extra parameter for renaming map.
6305 Use replace_exp and update_stmt.
6306 (expand_scalar_variables_expr): Same. Use the map to get the
6307 new names for the renaming of induction variables and for the
6308 renaming of variables after a basic block has been copied.
6309 (expand_scalar_variables): Same.
6310 (graphite_rename_variables): Renamed rename_variables.
6311 (move_phi_nodes): Removed.
6312 (get_false_edge_from_guard_bb): New.
6313 (build_iv_mapping): Do not insert the induction variable of a
6314 loop in the renaming iv map if the basic block does not belong
6316 (register_old_new_names, graphite_copy_stmts_from_block,
6317 copy_bb_and_scalar_dependences): New.
6318 (translate_clast): Heavily reimplemented: copy basic blocks,
6319 do not move them. Finally, in call cleanup_tree_cfg in gloog.
6320 At each translation step call graphite_verify ensuring the
6321 consistency of the SSA, loops and dominators information.
6322 (collect_virtual_phis, find_vdef_for_var_in_bb,
6323 find_vdef_for_var_1, find_vdef_for_var,
6324 patch_phis_for_virtual_defs): Removed huge hack.
6325 (mark_old_loops, remove_dead_loops, skip_phi_defs,
6326 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6327 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6328 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6329 if_region_get_condition_block, if_region_set_false_region,
6330 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6331 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6332 sese_add_exit_phis_edge, sese_add_exit_phis_var,
6333 rewrite_into_sese_closed_ssa): New.
6334 (gloog): Remove dead code. Early return if code cannot be
6335 generated. Call cleanup_tree_cfg once the scop has been code
6337 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6338 block loops with less than two loops.
6339 (graphite_apply_transformations): Remove the call to
6340 scop_remove_ignoreable_gbbs.
6341 (limit_scops): When build_scop_loop_nests fails, continue on
6342 the next scop. Fix open_scop.entry.
6343 (graphite_transform_loops): Call recompute_all_dominators: force the
6344 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6345 Call initialize_original_copy_tables and free_original_copy_tables
6346 to be able to copy basic blocks during code generation.
6347 When build_scop_loop_nests fails, continue on next scop.
6348 (value_clast): New union.
6349 (clast_to_gcc_expression): Fix type cast warning.
6351 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
6353 * Merge from mainline (r140838:141727).
6355 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6359 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6361 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6365 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6366 exits and conditions.
6367 * gcc.dg/graphite/pr37943.c: New.
6369 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6372 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6374 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6376 * doc/invoke.texi: Fix spaces.
6378 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
6380 PR tree-optimization/37891
6381 Reverted last commit.
6382 * graphite.c (create_single_entry_edge): Set
6383 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6385 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
6386 Mitul Thakkar <mitul.thakkar@amd.com>
6388 * graphite.c (create_single_entry_edge): Set
6389 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6391 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6393 * doc/invoke.texi: Add -fgraphite-identity.
6394 * graphite.c (graphite_apply_transformations): Check for
6395 -fgraphite-identity.
6396 * toplev.c (process_options): Add flag_graphite_identity.
6397 * tree-ssa-loop.c: Add flag_graphite_identity.
6399 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6401 Undo changes from 2008-10-02:
6402 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6403 operand type when copying the operand to a variable of different type.
6404 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6405 with the IV name after increment.
6407 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6408 Harsha Jagasia <harsha.jagasia@amd.com>
6410 PR tree-optimization/37828
6411 * gcc.dg/graphite/pr37828.c: New.
6412 * graphite.c (graphite_trans_loop_block): Do not loop block
6413 single nested loops.
6415 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6416 Sebastian Pop <sebastian.pop@amd.com>
6418 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6419 rename_map_elt_info, eq_rename_map_elts): New.
6420 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6421 (expand_scalar_variables_expr): Change parameters.
6422 (expand_scalar_variables_stmt): Same.
6423 (expand_scalar_variables): Same.
6424 (graphite_rename_ivs): Rename graphite_rename_variables.
6425 (build_iv_mapping): New.
6426 (translate_clast): Call build_iv_mapping.
6427 * graphite.h (gbb_p): New name.
6429 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6431 PR tree-optimization/37684
6432 * gcc.dg/graphite/pr37684.c: New.
6433 * graphite.c (exclude_component_ref): New.
6434 (is_simple_operand): Call exclude_component_ref.
6436 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6437 Harsha Jagasia <harsha.jagasia@amd.com>
6439 PR tree-optimization/37485
6440 * gcc.dg/graphite/block-2.c: New
6441 * graphite.c (gmp_cst_to_tree): Moved.
6442 (iv_stack_entry_is_constant): New.
6443 (iv_stack_entry_is_iv): New.
6444 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6445 (loop_iv_stack_insert_constant): New.
6446 (loop_iv_stack_pop): Use new datatpype.
6447 (loop_iv_stack_get_iv): Same.
6448 (loop_iv_stack_get_iv_from_name): Same.
6449 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6450 (loop_iv_stack_patch_for_consts): New.
6451 (loop_iv_stack_remove_constants): New.
6452 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6453 (translate_clast): Call loop_iv_stack_patch_for_consts and
6454 loop_iv_stack_remove_constants.
6455 (gloog): Use new datatype. Redirect construction edge to end
6456 block to avoid accidental deletion.
6457 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6459 (union iv_stack_entry_data): New. Data in iv stack entry.
6460 (struct iv_stack_entry): New. Datatype for iv stack entries.
6462 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6464 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6465 operand type when copying the operand to a variable of different type.
6467 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6469 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6470 with the IV name after increment.
6472 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6474 * Merge from mainline (r140164:140838).
6476 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6478 * graphite-data-ref.c: New.
6479 * graphite.c (print_scop): Also dump the dependence graph.
6480 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6481 (new_scop): Initialize SCOP_DEP_GRAPH.
6482 (build_scop_dynamic_schedules): New.
6483 (build_access_matrix_with_af): Fixed column numbering.
6484 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6485 * graphite.h: Add ifndef/define guards against multiple inclusion.
6486 (struct scop): Add dep_graph field.
6487 (SCOP_DEP_GRAPH): Defined.
6488 (ref_nb_loops): Fixed and moved to other position.
6489 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6490 (nb_loops_around_loop_in_scop): New.
6491 (graphite_dump_dependence_graph): Declared.
6492 (graphite_build_rdg_all_levels): Declared.
6493 (graphite_test_dependence): Declared.
6494 * Makefile.in (graphite-data-ref.o): New target.
6496 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6498 * Merge from mainline (139870:140164).
6500 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6502 * Merge from mainline (138275:139870).
6503 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6504 the commits from trunk broke the niter detection.
6506 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6508 * graphite.c: Add more documentation. Fix formatting.
6509 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6510 loop_iv_stack_debug): Moved...
6511 (schedule_to_scattering): Move before use.
6512 (dot_all_scops): Include in "#if 0" the code for system
6515 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6516 loop_iv_stack_debug): ...here.
6518 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6520 * tree-phinodes.c (make_phi_node): Extern.
6521 (add_phi_node_to_bb): New.
6522 (create_phi_node): Call add_phi_node_to_bb.
6523 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6524 (remove_statement): Handle case where stored phi was updated
6525 and is no longer the same.
6526 * graphite.c (is_parameter): New.
6528 (expand_scalar_variables_expr): New.
6529 (expand_scalar_variables_stmt): New.
6530 (expand_scalar_variables): New.
6531 (move_phi_nodes): Create new phi instead of moving old one.
6532 (translate_clast): Call expand_scalar_variables.
6533 (find_vdef_for_var_in_bb): Also scan regular definitions.
6534 (skip_phi_defs): New.
6535 (collect_scop_exit_phi_args): New.
6536 (patch_scop_exit_phi_args): New.
6537 (gloog): Patch phis after scop.
6538 * tree-flow.h: (add_phi_node_to_bb): Declared.
6539 (make_phi_node): Declared.
6541 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6543 * graphite.c (end_scop): Split the entry of the scop when it
6544 is the header of the loop in which the scop is ending.
6545 (build_scops_1, limit_scops): Update uses of end_scop.
6547 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6549 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6550 SCOP_ENTRY or SCOP_EXIT.
6552 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6554 * graphite.c (get_construction_edge): Removed.
6555 (gloog): Construction edge is the scop entry edge.
6557 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6559 * graphite.c (can_generate_for_scop): Removed.
6560 (gloog): Do not call it.
6562 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6564 * graphite.c (new_scop): Entry of a scop is an edge.
6565 Initialize SESE region.
6566 (free_scop): Free SESE region.
6567 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6568 (split_difficult_bb): New, split from end_scop.
6569 (end_scop): Exit of a scop is an edge.
6570 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6571 not automatically updated and thus is always wrong.
6572 * graphite.h (struct sese): New.
6575 (struct scop): New field for a SESE region. Remove entry, exit.
6576 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6577 semantics as before. Moved comment around.
6579 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6580 Sebastian Pop <sebastian.pop@amd.com>
6582 * graphite.c (graphite_transform_loops): Always enable gloog
6583 and find_transform when ENABLE_CHECKING.
6585 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6587 * graphite.c (graphite_transform_loops): Move pretty printer
6588 of SCOPs before doing any transform. Remove call to print_scops
6589 and dot_all_scops_1.
6591 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6593 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6594 (print_graphite_bb): Same.
6596 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6598 * graphite.c (dot_all_scops_1): Cleanup.
6599 (move_scops): Fix comment.
6601 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6603 * graphite.c (build_scop_bbs): Revert commit 139355:
6605 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6606 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6608 * graphite.c (build_scop_bbs): Factor up code.
6610 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6612 * graphite.c (gloog): Update dominator info.
6614 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6616 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6618 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6620 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6622 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6623 (translate_clast): Correct formatting.
6624 * graphite.h (struct num_map): Removed.
6625 (struct graphite_bb): Remove num_map field.
6626 (GBB_INDEX_TO_NUM_MAP): Removed.
6628 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6630 * graphite.c (build_access_matrix_with_af): Fix comments.
6631 (build_scop_data_accesses): Same.
6633 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6635 * graphite.c (build_scop_data_accesses): Don't construct
6636 access matrices. Add a FIXME and an assert condition that
6637 should pass when the access matrices will be needed.
6639 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6641 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6643 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6644 Moved close by free_graphite_bb.
6645 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6646 (new_scop): Move close by free_scop.
6647 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6649 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6651 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6652 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6653 instead of recursive call.
6654 (graphite_translate_clast_equation): New.
6655 (graphite_create_guard_cond_expr): New.
6656 (graphite_create_new_guard): New.
6657 (get_stack_index_from_iv): Removed.
6658 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6659 (get_true_edge_from_guard_bb): New.
6660 (translate_clast): Handle stmt_guard in clast.
6661 (get_construction_edge): Allow construction edge detection for
6662 a scope entry with multiple predecessors if one predecessor is
6663 the immediate dominator of scope entry.
6664 (can_generate_code_stmt): Enable code generation for clast_guard.
6665 (gloog): Use correct context loop. Removed check for post dominators.
6666 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6668 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6670 * graphite.c (remove_dead_loops): Document better which
6673 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6675 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6677 (graphite.o): Also depends on pointer-set.h.
6679 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6681 * graphite.c (scop_record_loop): Fix compile warning.
6683 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6684 Sebastian Pop <sebastian.pop@amd.com>
6686 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6688 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6690 * graphite.c (build_graphite_bb): Initialize bb->aux to
6691 point to the graphite_bb_p.
6692 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6694 (add_bb_domains): Does not use the scop parameter.
6695 (graphite_transform_loops): Clean bb->aux at the end.
6697 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6698 Sebastian Pop <sebastian.pop@amd.com>
6700 * lib/target-supports.exp
6701 (check_effective_target_fgraphite): New.
6703 * gcc.dg/graphite/graphite.exp: Early exit when
6704 check_effective_target_fgraphite returns false.
6705 Set dg-do-what-default to compile.
6706 (scan-graphite-dump-times): Removed.
6707 * gfortran.dg/graphite/graphite.exp: Same.
6709 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6710 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6711 * gcc.dg/graphite/scop-1.c: Same.
6712 * gcc.dg/graphite/scop-2.c: Same.
6713 * gcc.dg/graphite/scop-3.c: Same.
6714 * gcc.dg/graphite/scop-4.c: Same.
6715 * gcc.dg/graphite/scop-5.c: Same.
6716 * gcc.dg/graphite/scop-6.c: Same.
6717 * gcc.dg/graphite/scop-7.c: Same.
6718 * gcc.dg/graphite/scop-8.c: Same.
6719 * gcc.dg/graphite/scop-9.c: Same.
6720 * gcc.dg/graphite/scop-10.c: Same.
6721 * gcc.dg/graphite/scop-11.c: Same.
6722 * gcc.dg/graphite/scop-12.c: Same.
6723 * gcc.dg/graphite/scop-13.c: Same.
6724 * gcc.dg/graphite/scop-matmult.c: Same.
6725 * gcc.dg/graphite/scop-14.c: Same.
6726 * gcc.dg/graphite/scop-15.c: Same.
6727 * gcc.dg/graphite/block-0.c: Same.
6728 * gcc.dg/graphite/scop-16.c: Same.
6729 * gcc.dg/graphite/block-1.c: Same.
6730 * gcc.dg/graphite/scop-17.c: Same.
6731 * gcc.dg/graphite/scop-18.c: Same.
6732 * gfortran.dg/graphite/block-1.f90: Same.
6733 * gfortran.dg/graphite/scop-1.f: Same.
6734 * gfortran.dg/graphite/block-2.f: Same.
6736 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6738 * graphite.c: Fix some XXX comments.
6739 (build_scop_dynamic_schedules): Removed.
6741 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6743 * graphite.h (scop_max_loop_depth): Moved...
6744 * graphite.c (scop_max_loop_depth): ...here.
6745 (remove_all_edges_1): New.
6746 (remove_all_edges): Factored code.
6747 (remove_cond_exprs): Check only the last statement for
6748 a GIMPLE_COND expression.
6750 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6752 * graphite.c (scan_tree_for_params): Early return when the
6753 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6754 (find_scop_parameters): Factor out code.
6755 (graphite_trans_bb_strip_mine): Remove dead code.
6757 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6759 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6760 graphite_trans_bb_move_loop): Factor asserts.
6761 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6762 Do not call calculate_dominance_info and estimate_bb_frequencies.
6764 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6766 * graphite.c (create_loops_mapping, free_loops_mapping,
6767 create_loops_mapping_num, debug_loop_mapping_1,
6768 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6769 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6770 graphite_loops_mapping_add_child_num,
6771 graphite_loops_mapping_insert_child,
6772 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6773 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6774 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6775 create_num_from_index, get_num_from_index,
6776 swap_loop_mapped_depth): Removed.
6777 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6778 (free_scop): Do not call free_loops_mapping.
6779 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6780 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6781 get_loop_mapped_depth.
6782 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6783 (graphite_trans_bb_strip_mine): Same.
6784 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6785 (struct scop): Remove field loops_mapping.
6787 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6788 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6790 * graphite.c (scop_record_loop): Factor out one level of the
6791 condition by early return.
6792 (build_scop_loop_nests): Format following FSF coding style.
6793 (build_scop_dynamic_schedules): Factor out code.
6794 (scopdet_bb_info): Reindent. Default case should not be reachable.
6796 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6797 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6799 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6800 assignments that are not handled as simple operands for now.
6802 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6803 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6805 * graphite.c (build_scop_bbs): Factor up code.
6807 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6808 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6810 * graphite.c (stmt_simple_for_scop_p): Factor code out
6812 (enum gbb_type): New. Group all the GBB_* types under it.
6813 (is_loop_exit): Moved...
6814 (end_scop): Enable BB spliting.
6815 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6816 * cfgloop.h (is_loop_exit): Declared.
6818 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6820 * doc/invoke.texi: Remove strides from examples containing
6821 DO loops when the strides are equal to 1.
6823 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6824 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6826 * graphite.c (graphite_trans_scop_block): Or the result with
6827 the result from graphite_trans_loop_block.
6828 * gcc.dg/graphite/block-1.c: New.
6829 * gfortran.dg/graphite/block-1.f90: New.
6830 * gfortran.dg/graphite/block-2.f: New.
6832 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6834 * graphite.c (graphite_transform_loops): Call cloog_initialize
6837 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6839 * tree-data-ref.c) (stmt_simple_memref_p): New.
6840 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6841 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6842 (is_simple_operand): Call stmt_simple_memref_p.
6844 * gcc.dg/graphite/scop-matmult.c: Updated for not
6845 using pointer arithmetic, as this is optimized by PRE and
6846 makes the code too difficult to analyze.
6848 * gcc.dg/graphite/scop-18.c: Same.
6850 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6852 * gdbinit.in (pgg): New.
6854 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6856 * graphite.c (graphite_trans_loop_block): Fix warning.
6858 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6860 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6862 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6864 * graphite.c (graphite_trans_bb_block): Remove check for
6865 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6866 Check if loop blocking is profitable for every loop, before applying
6868 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6869 if flag_loop_block is set.
6871 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6873 * graphite.c: Add some more documentation for the loop
6876 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6878 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6879 * graphite.c: Format on less than 80 columns.
6882 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6884 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6886 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6888 * doc/invoke.texi (floop-block, floop-strip-mine,
6889 floop-interchange): Update documentation with examples.
6891 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6893 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6895 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6897 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6899 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6900 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6901 * tree-scalar-evolution.c: Revert useless changes.
6902 * tree-phinodes.c: Same.
6905 * tree-vectorizer.h: Same.
6906 * tree-flow.h: Same.
6908 * common.opt (fgraphite): Update documentation.
6910 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6912 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6913 -floop-interchange): Add more text for explaining what each of these
6915 * tree-into-ssa.c (gimple_vec): Moved to...
6916 * graphite.c: Include gimple.h.
6917 (gimple_vec): Moved to...
6918 (del_loop_to_cloog_loop): Removed.
6919 (loop_affine_expr): Do not call create_data_ref when the
6920 operand is a constant.
6921 (new_scop): Use free instead of del_loop_to_cloog_loop.
6922 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6923 * gimple.h (gimple_vec): ... here.
6925 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6927 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6929 (build_loop_iteration_domains): Fail, if latch executions unknown.
6931 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6933 * graphite.c (add_conditions_to_domain): New.
6934 (build_scop_conditions_1): Call add_conditions_to_domain.
6935 (set_cloog_options): Allow to disable optimizations.
6937 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6939 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6940 Do not use walk_dominator_tree.
6941 (find_scop_parameters): Do not use walk_dominator_tree.
6943 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6945 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6946 (idx_record_params): Adapt.
6947 * graphite.h (scop_gimple_loop_depth): New.
6949 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6951 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6952 (scan_tree_for_params): Remove value_init.
6953 (build_scop_context): Remove value_init.
6954 (build_loop_iteration_domains): Remove value_init.
6955 (schedule_to_scattering): Remove value_init.
6956 (graphite_trans_bb_strip_mine): Remove value_init.
6958 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6960 * gcc/graphite.c (limit_scops): New.
6961 (graphite_transform_loops): Add limit SCoPs.
6962 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6963 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6964 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6965 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6966 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6967 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6968 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6969 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6970 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6971 Change loop numbers.
6972 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6973 Change loop numbers.
6974 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6975 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6976 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6977 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6978 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6979 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6980 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6981 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6982 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6983 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6985 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6987 * graphite.c (graphite_transform_loops): Call always find_transform.
6989 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6991 * graphite.c (free_loops_mapping): New.
6992 (stmt_simple_for_scop_p): Fix typo.
6993 (stmt_simple_for_scop_p): Fix tuples functions, that
6995 (free_graphite_bb): Fix some memleaks.
6996 (free_scop): Fix some memleaks.
6997 (scopdet_bb_info): Do not forget some tmp SCoPs.
6998 (find_params_in_bb): Fix some memleaks.
6999 (clast_to_gcc_expression): Fix warning.
7001 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
7003 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
7004 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
7006 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7008 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
7009 Move code ifdef-ed HAVE_cloog...
7010 * graphite.c: Include toplev.h.
7012 * Makefile.in (OBJS-common): Always build graphite.o.
7013 (BACKEND): Remove @GRAPHITE@.
7014 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
7015 (graphite.o): Depend on TOPLEV_H.
7017 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
7019 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
7020 Remove typo left from polylib to ppl conversion.
7021 * graphite.c (graphite_transforms): Use sorry instead of fatal.
7023 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7025 * toplev.c (process_options): Move the graphite loop optimization
7027 * tree-ssa-loop.c (graphite_transforms): ... here.
7028 When not configured with CLooG, print to dump_file that
7029 Graphite transforms were not performed.
7030 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
7032 * gcc.dg/graphite/*.c: Updated all testcases to use
7033 scan-graphite-dump-times.
7035 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
7037 * graphite.c (dot_scop, dot_all_scops): Do not call system.
7038 Do not open /tmp/scop.dot and /tmp/allscops.dot.
7040 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
7041 Jan Sjodin <jan.sjodin@amd.com>
7043 * configure: Regenerated.
7044 * omp-low.c (expand_omp_sections): Remove now unused code.
7045 * config.in (HAVE_polylib): Removed.
7046 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
7047 (PPLLIBS, PPLINC): Added.
7048 * graphite.c: Replace unsigned with int wherever possible.
7049 Don't access Cloog's data structures, but use accessor functions.
7050 Clast's stmt->type is now implemented as a vtable: change the
7051 switches of stmt->type into ifs.
7052 (polylib/polylibgmp.h): Don't include.
7053 (initialize_dependence_polyhedron,
7054 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7055 statement_precedes_p, test_dependence, build_rdg_all_levels,
7056 dump_dependence_graph): Removed until this code is cleaned up
7058 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
7059 (POLYLIBINC): Renamed PPLINC.
7061 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
7062 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7063 Jan Sjodin <jan.sjodin@amd.com>
7065 Finish the merge and tuplification of graphite.
7067 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7068 Jan Sjodin <jan.sjodin@amd.com>
7070 Partial merge from mainline (138072:138275).
7071 * graphite.c still has to be tuplified.
7073 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
7075 * graphite.c (graphite_loops_mapping_max_loop_num): New.
7076 (create_num_from_index): New.
7077 (get_num_from_index): Also pass in the graphite BB.
7078 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
7079 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
7080 (graphite_trans_bb_strip_mine): Call create_num_from_index.
7081 (is_interchange_valid): Return false when failing.
7082 * graphite.h (struct num_map): New.
7083 (struct graphite_bb): New field num_map.
7084 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
7086 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
7088 * graphite.c (dump_gbb_conditions): Print also conditions like
7089 "if (a)". Remove dublicated code and use print_generic_expr ().
7090 (stmt_simple_for_scop_p): Only allow conditions we can handle
7093 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7095 * graphite.h (struct scop): Removed new_ivs field.
7096 (SCOP_NEWIVS): Deleted.
7097 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7098 clast_to_gcc_expression, graphite_create_new_loop):
7099 Removed use of new_ivs.
7101 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
7103 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7104 create_loops_mapping_num, debug_loop_mapping_1): New.
7105 (debug_loop_mapping): Call debug_loop_mapping_1.
7106 (get_loop_mapping_for_num,
7107 graphite_loops_mapping_add_child,
7108 graphite_loops_mapping_add_child_num,
7109 graphite_loops_mapping_insert_child,
7110 graphite_loops_mapping_parent,
7111 split_loop_mapped_depth_for_num,
7112 loop_mapped_depth_split_loop): New.
7113 (increment_loop_mapped_depths): Removed.
7114 (swap_loop_mapped_depth_for_num): Reimplemented.
7115 (new_scop): Call create_loops_mapping.
7116 (scop_record_loop): Call graphite_loops_mapping_insert_child.
7117 (translate_clast): Pass the old loop father in parameter, and pass
7118 it to get_old_iv_from_ssa_name.
7119 (remove_edges_around_useless_blocks, can_generate_code_stmt,
7120 can_generate_code, can_generate_for_scop): New.
7121 (graphite_trans_bb_block): Returns false when it fails to transform.
7122 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7124 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7126 Reverted all the changes related to the streamization and
7128 These changes are now tracked in the streamization branch.
7130 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7131 Jan Sjodin <jan.sjodin@amd.com>
7133 * graphite.c (gbb_compare): Correctly constify.
7134 (gbb_can_be_ignored): Indent.
7135 (graphite_trans_scop_swap_1and2): Add legality check.
7138 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
7140 Remove fallouts from "Reverted the Condate changes".
7141 * tree.h: Remove unused decl.
7142 * gcc.dg/tree-checker: Same.
7143 * timevar.def: Remove counter.
7145 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
7147 * Merge from mainline (135673:138072).
7149 Reverted the MIRO changes (from 2008-04-05) that are now
7150 tracked in the miro branch.
7151 * tree-bounds.c: Removed.
7152 * tree-bounds.h: Removed.
7154 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7155 are now tracked in the condate branch.
7156 * tree-check.c: Removed.
7157 * tree-match.c: Removed.
7158 * condate.y: Removed.
7160 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7162 * common.opt: New user flag -floop-block, -floop-strip-mine
7163 and -floop-interchange.
7164 * toplev.c (process_options): Enable -fgraphite pass if any one of the
7165 graphite loop optimization flags is turned on.
7166 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7167 flag_loop_strip_mine and flag_loop_interchange checks before
7169 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7170 -floop-strip-mine and -floop-interchange.
7171 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7173 * gcc.dg/graphite/scop-16.c: Ditto.
7174 * gcc.dg/graphite/scop-17.c: Ditto.
7175 * gcc.dg/graphite/scop-18.c: Ditto.
7177 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
7178 Sebastian Pop <sebastian.pop@amd.com>
7180 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7181 (create_empty_loop_on_edge): More fixes.
7182 * tree-phinodes.c (resize_phi_node): Extern.
7183 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7184 * cfghooks.c (update_dominator_information): New split from
7186 * tree-vectorizer.c (rename_variables_in_bb): Extern.
7187 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7188 successor of the function entry block.
7190 * graphite.c: Include pointer-set.h.
7191 (debug_loop_mapping, increment_loop_mapped_depths,
7192 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7193 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7194 swap_loop_mapped_depth_for_num, get_num_from_index,
7195 swap_loop_mapped_depth, loop_iv_stack_debug,
7196 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7197 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7198 get_old_iv_from_ssa_name): New.
7199 (new_scop): Initialize SCOP_LOOPS_MAPPING.
7200 (free_scop): Free SCOP_LOOPS_MAPPING.
7201 (scop_record_loop): Record old ivs.
7202 (create_var_name): Removed.
7203 (initialize_cloog_names): Allocate double space in case strip mine
7204 applies to all loops once.
7205 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7206 (clast_to_gcc_expression): Same. Implement more clast to gimple
7208 (graphite_create_new_loop): Pass in ivstack.
7209 (remove_all_edges): Pass in the construction_edge.
7210 (graphite_remove_iv): Removed.
7211 (graphite_rename_ivs, graphite_rename_ivs_stmt,
7212 remove_cond_exprs): Rewritten.
7213 (move_phi_nodes): New.
7214 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7215 (translate_clast): Pass in ivstack. Rewrite some cases.
7216 (set_cloog_options, debug_clast_stmt): New.
7217 (find_transform): Use set_cloog_options.
7218 (outermost_loop_layer): Removed.
7219 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7220 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7221 mark_old_loops, remove_dead_loops): New.
7223 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7224 (const_column_index, get_first_matching_sign_row_index,
7225 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7226 get_upper_bound): New.
7227 (graphite_trans_bb_strip_mine): Also update the iv map.
7229 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7230 (struct name_tree): Add a loop field.
7231 (struct scop): Add a graphite_loops_mapping field.
7232 (SCOP_LOOPS_MAPPING): New.
7233 (debug_clast_stmt): Declare.
7234 * lambda.h (find_induction_var_from_exit_cond): Declare.
7235 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7236 * cfgloop.h (update_dominators_in_loop): Removed declaration.
7237 (create_empty_loop_on_edge): Updated.
7238 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7239 rename_variables_in_bb): Declare.
7240 * tree-cfg.c (remove_bb): Extern.
7242 * gcc.dg/graphite/block-0.c: New.
7244 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7245 Sebastian Pop <sebastian.pop@amd.com>
7247 * graphite.c (strip_mine_profitable_p): New.
7248 (graphite_trans_bb_block): Disable strip mining if not profitable.
7250 * gcc.dg/graphite/scop-18.c: New.
7251 * gcc.dg/graphite/scop-17.c: Fixed.
7252 * gcc.dg/graphite/scop-16.c: Fixed.
7254 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
7255 Jan Sjodin <jan.sjodin@amd.com>
7256 Sebastian Pop <sebastian.pop@amd.com>
7258 * graphite.c (is_interchange_valid): New.
7259 (graphite_trans_bb_block): Check loop nest of basic block for legality
7262 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7263 outer_most_loop, gbb_outer_most_loop_index): New.
7265 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7266 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7267 * gcc.dg/graphite/scop-16.c: New.
7268 * gcc.dg/graphite/scop-17.c: New.
7270 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7272 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7273 (graphite_trans_scop_block): Ignore SCoPs without bbs.
7275 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7277 * graphite.c (new_scop): Initialize SCOP_EXIT.
7278 (scopdet_info): Add.
7279 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7280 (build_scops_1): Cleanup, bugfixes.
7281 (build_scops): Cleanup.
7283 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7284 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7286 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7288 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7290 * gfortran.dg/graphite/graphite.exp: Use
7291 DEFAULT_GRAPHITE_FLAGS.
7293 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7295 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7297 * graphite.c (scan_tree_for_params): Do not assert any more if
7298 MULT_EXPR parameter is negative.
7300 * gfortran.dg/graphite/scop-1.f: New.
7302 * gfortran.dg/graphite/graphite.exp: New.
7304 * gcc.dg/graphite/scop-15.c: New.
7306 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7308 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7310 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7312 * graphite.c (graphite_trans_bb_swap_loops): Rename from
7313 graphite_swap_loops.
7314 (graphite_trans_bb_move_loop): New.
7315 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7316 (graphite_trans_bb_block): New.
7317 (graphite_trans_loop_block): New.
7318 (graphite_trans_scop_swap_1and2): Rename from
7319 graphite_trans_swap_1and2.
7320 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7321 (graphite_trans_scop_block): New.
7322 (graphite_apply_transformations): Rename from
7323 graphite_transformations.
7325 * gcc.dg/graphite/scop-matmult.c: New.
7327 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7329 * graphite.c (gbb_compare): New.
7330 (graphite_sort_gbbs): New.
7331 (gbb_can_be_ignored): New.
7332 (scop_remove_ignoreable_gbbs): New.
7333 (graphite_transformations): Cleanup and add
7334 scop_remove_ignoreable_gbbs.
7335 * lambda.h (lambda_vector_compare): New.
7337 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
7339 * graphite.c (print_graphite_bb): Correct printing of static schedule.
7340 (graphite_swap_loops): int -> unsigned
7341 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7342 (graphite_transformations): New.
7343 (graphite_transform_loops): Move to graphite_transformations.
7344 * graphite.h (gbb_nb_loops): Return unsigned.
7346 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
7348 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7349 the domain matrix. This makes scop-0.c work again.
7351 2008-06-20 Richard Guenther <rguenther@suse.de>
7353 * graphite.h: Adjust copyright to GPLv3.
7354 * graphite.c: Likewise.
7355 (stmt_simple_memref_for_scop_p): Split out from ...
7356 (stmt_simple_for_scop_p): ... here. Fix handling of calls
7358 (get_bb_type): Optimize.
7360 (is_bb_addable): Fix memleak, replace is_pred call with
7362 (build_scops): Use current_loops.
7363 (param_index): Fix memleak.
7365 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7367 * graphite.c: Fix formatting.
7369 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7371 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7372 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7373 (create_var_name, save_var_name): Newly defined functions.
7374 (initialize_cloog_names): Part of the code factored out to
7376 (clast_to_gcc_expression): Now handles the case of clast_red_sum
7377 in clast_reduction statement.
7378 (graphite_create_new_loop): Now takes a new parameter
7380 (translate_clast): Now also takes the context_loop and bb_exit
7381 parameters. Rewritten the code so that it creates a gimple code
7382 inside the given context.
7383 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7384 remove_cond_expr, disconnect_cond_expr,
7385 disconnect_virtual_phi_nodes): Newly defined functions.
7386 * graphite.h (struct scop): added old_ivs vector.
7387 SCOP_OLDIVS: New macro.
7389 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7391 * cfgloopmanip.c: Add missing function comments, fix formatting.
7393 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7395 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7396 (create_empty_loop_on_edge): Defined.
7397 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7399 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7400 (update_dominators_in_loop): Declared as extern
7401 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7403 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7405 * graphite.c (print_graphite_bb): Allow changing number of loops
7407 (initialize_cloog_names): Allow changing number of loops.
7408 (build_cloog_prog): Simplify.
7409 (find_transform): Enable cloog option --strides.
7410 (graphite_swap_loops): New.
7411 (graphite_strip_mine_loop): New.
7412 (graphite_trans_swap_1and2): New.
7413 (graphite_trans_strip): New.
7414 (graphite_transform_loops): Add graphite_trans_strip.
7415 * graphite.h (scop_max_loop_depth): New.
7417 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7419 * graphite.c (build_scop_iteration_domain): Remove forgotten
7420 line. (Fixes compile)
7422 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7424 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7425 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7426 (build_bb_loops): New.
7427 (graphite_transform_loops): Add build_bb_loops.
7428 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7430 * graphite.h (graphite_bb): Add loops.
7431 (gbb_nb_loops): New.
7432 (gbb_loop_at_index): New.
7433 (gbb_loop_index): New.
7434 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7435 using nb_params_in_scop.
7437 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7439 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7440 (build_scop_canonical_schedules): Build minimized schedule.
7441 (schedule_to_scattering): Adapt to minimized schedule.
7442 * graphite.h (graphite_bb): Add/Update descriptions.
7444 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7445 Tobias Grosser <grosser@fim.uni-passau.de>
7447 * graphite.c (print_graphite_bb): Add condition printing.
7449 (dump_gbb_conditions): New.
7450 (build_scop_conditions_1): New.
7451 (build_scop_conditions): New.
7452 * graphite.h (graphite_bb): Add conditions.
7454 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7456 * graphite.c (print_graphite_bb):
7457 (free_graphite_bb): New.
7458 (free_scop): Free bbs.
7459 (get_bb_type): Free doms.
7460 (build_scop_context): Free context matrix.
7461 (build_loop_iteration_domains): Remove unused code.
7462 (build_cloog_prog): Free scattering function and blocklist.
7463 (find_transform): Free options.
7465 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7467 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7468 Remove unnecessery cloog data structures. Make a copy of the domain
7469 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7470 unnecessary cloog data structures. Fix memory leaks. Remove insert
7471 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7473 (build_scop_iteration_domain): Remove unnecessary cloog
7474 data structures. Fix memory leaks.
7475 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7476 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7478 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7480 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7482 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7484 * graphite.c (end_scop): Style fix.
7485 (schedule_to_scattering): Style and comment fix.
7487 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7488 * graphite.c (print_graphite_bb): Fix definiton of
7489 schedule_to_scattering.
7490 (initialize_cloog_names): Change nb_scattdims to max loop
7492 (schedule_to_scattering): Take parameter for number of scattering
7494 (build_cloog_prog): Only build as much scattering dimensions as
7497 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7499 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7500 in polyhedron/aermod.f90.
7502 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7503 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7504 Harsha Jagasia <harsha.jagasia@amd.com>
7506 * graphite.c (is_bb_addable): Fix segfault.
7508 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7510 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7511 with multiple exits and conditional handling in edge cases.
7512 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7514 * gcc.dg/graphite/scop-14.c: New.
7516 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7517 Adrien Eliche <aeliche@isty.uvsq.fr>
7519 * graphite.c (is_bb_addable): Add more comments and enhance
7520 readablity of the source code. Fix memory leak.
7521 (is_loop_exit): Fix memory leak.
7523 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7525 * graphite.c (first_loop_in_scop): Deleted.
7526 (setup_cloog_loop): Only walk the loop chain for inner loops.
7527 (build_scop_iteration_domain): Execute setup_cloog_loop for
7528 all loops in the first layer.
7530 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7532 * graphite.c (scan_tree_for_params): Change the way params are
7533 added to be indepenent of the number of loops.
7534 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7536 (build_cloog_prog): Revert to short matrix format.
7538 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7539 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7541 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7544 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7546 * graphite.c (nb_data_refs_in_scop): New.
7547 (graphite_transform_loops): Print more stats: number of
7548 loops, basic blocks and data references per scop.
7550 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7551 Jan Sjodin <jan.sjodin@amd.com>
7553 * graphite.c (loop_affine_expr, idx_record_params,
7554 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7555 instead of instantiate_parameters.
7557 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7559 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7560 add support for parameters, add STATIC_SCHEDULE at the right places,
7563 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7565 * graphite.c (build_scop_loop_nests): Only add the loops, that
7566 are contained completely in the SCoP.
7567 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7568 and the domains are fixed.
7569 (build_scop_canonical_schedules): Add support for bbs not contained
7572 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7574 * graphite.h (scop_contains_loop): Update comments to match
7575 the actual behavior.
7576 (scop_contains_loop): New.
7577 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7579 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7581 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7582 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7585 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7586 Tobias Grosser <grosser@fim.uni-passau.de>
7588 * graphite.c (graphite_transform_loops): Early return when
7589 there are no loops in the function.
7591 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7592 Jan Sjodin <jan.sjodin@amd.com>
7594 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7595 offset of the last loop.
7596 (setup_cloog_loop): Copy the entire outer constraint matrix.
7598 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7599 Jan Sjodin <jan.sjodin@amd.com>
7601 * graphite.c (stmt_in_scop_p, function_parameter_p,
7602 invariant_in_scop_p): Removed.
7603 (scan_tree_for_params): Can be used with no constraint
7604 matrix for gathering parameters.
7605 (idx_record_params): Don't use idx_record_param, instead use
7606 scan_tree_for_params.
7607 (find_scop_parameters): Same.
7608 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7609 Fix the size of loop domains.
7610 (schedule_to_scattering): Exit when the outer loop is not in scop.
7611 (find_transform): Enable build_cloog_prog.
7613 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7614 Jan Sjodin <jan.sjodin@amd.com>
7616 * graphite.c (schedule_to_scattering): Make scattering domains
7617 uniformly of the same size, as required by CLooG 0.14.0 and before.
7619 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7620 Jan Sjodin <jan.sjodin@amd.com>
7622 * graphite.c (schedule_to_scattering): Rewrite, correct the
7623 translation of the scheduling function to scattering.
7624 (build_cloog_prog): Call schedule_to_scattering only once.
7625 * graphite.h (scop_loop_index): Do not fail for loops not
7626 in the scop: return -1.
7628 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7630 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7631 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7632 (setup_cloog_loop): Export GBB_DOMAIN.
7633 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7634 able to rebuild the original control flow.
7635 * graphite.h (graphite_bb): Add domain field and access macro.
7638 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7640 * graphite.c (debug_gbb): New.
7641 (print_scop, build_graphite_bb): Use SCOP_BBS.
7642 (build_scop_bbs): Reimplemented.
7643 (dfs_bb_in_scop_p): Removed.
7644 (build_scop_loop_nests): Reorder loops inserted in
7645 SCOP_LOOP_NEST: outer loops should come first.
7646 (build_scop_canonical_schedules): Reinitialize at zero
7647 the components of the SCOP_STATIC_SCHEDULE for the loops
7648 that have already been parsed.
7650 * graphite.h (debug_gbb): Declared.
7652 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7653 Jan Sjodin <jan.sjodin@amd.com>
7655 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7656 (graphite_loop_to_gcc_loop): Removed.
7657 (remove_all_edges): New.
7658 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7659 (gloog): Remove useless code.
7661 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7663 * graphite.c (get_bb_type): Reworked. We distinguish between
7664 loops with one or multiple exits.
7665 (is_loop_exit): New.
7667 (is_bb_addable): Rework condition handling, now support for case
7668 case statements and loops with multiple exits.
7670 * gcc.dg/graphite/scop-11.c: New.
7671 * gcc.dg/graphite/scop-12.c: New.
7672 * gcc.dg/graphite/scop-13.c: New.
7674 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7676 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7677 we have too many colors.
7679 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7681 * doc/invoke.texi (-ftree-loop-fusion): Document.
7682 * tree-pass.h (pass_loop_fusion): Declared.
7683 * tree-loop-fusion.c: New.
7684 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7685 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7686 * tree-data-ref.h (find_data_references_in_loop): Declared.
7687 * common.opt (ftree-loop-fusion): Declared.
7688 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7690 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7692 * graphite.c (build_access_matrix): Fix typo from the merge.
7694 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7696 * Merge from mainline (130800:135673).
7698 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7700 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7701 Update dominators after splitting.
7703 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7705 * graphite.c (is_bb_addable): Return the harmful statement.
7706 Factor up some code.
7707 (end_scop): New. Splits end of scope bbs on a harmful statement.
7708 (build_scops_1): Call end_scop.
7710 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7712 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7713 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7714 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7715 build_scops_1): Removed.
7716 (build_scops_2): Renamed build_scops_1.
7718 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7720 * graphite.c: Fix formatting.
7722 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7724 * graphite.c (get_bb_type): New.
7726 (build_scops_2): New.
7727 (is_bb_addable): New.
7728 (build_scops): Switch the scop detection.
7729 (build_scop_bbs): Add entry bb to scop.
7730 * graphite.h (struct scop): Update comment.
7732 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7734 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7737 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7739 * gcc.dg/graphite/scop-1.c: Update.
7740 * gcc.dg/graphite/scop-2.c: Update.
7741 * gcc.dg/graphite/scop-4.c: Update.
7742 * gcc.dg/graphite/scop-5.c: Add.
7743 * gcc.dg/graphite/scop-6.c: Add.
7745 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7747 * gcc.dg/graphite/scop-0.c: Add.
7748 * gcc.dg/graphite/scop-7.c: Add.
7749 * gcc.dg/graphite/scop-8.c: Add.
7750 * gcc.dg/graphite/scop-9.c: Add.
7751 * gcc.dg/graphite/scop-10.c: Add.
7753 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7755 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7756 Check affine expressions depending on the outermost loop
7758 (stmt_simple_for_scop_p): Same.
7759 (harmfule_stmt_in_scop): Same.
7761 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7763 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7764 mark entry and exit, that are not part of the SCoP and update HTML
7767 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7769 * graphite.c (basic_block_simple_for_scop_p): Renamed
7771 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7772 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7773 (all_preds_visited_p, all_succs_visited_p,
7774 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7775 scop_end_loop): New.
7776 (build_scops): Do not use dfs_enumerate_from.
7778 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7780 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7782 * graphite.c: Add comments to functions that are missing a
7784 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7786 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7788 * graphite.c (nb_params_in_scop): Moved...
7789 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7790 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7791 (clast_to_gcc_expression): Reduce column size to less than 80.
7792 (graphite_create_iv): Return the new name of the IV.
7793 (find_transform): Set options->esp and options->cpp.
7794 (gloog): Comment out the invalidation of the old loop code.
7795 (initialize_dependence_polyhedron): Replace scop_nb_params with
7798 * graphite.h (nb_params_in_scop): ... here.
7799 (scop_nb_params): Removed.
7800 (loop_domain_dim): Return something even when the loop was not
7801 found in the hash table: avoid ICEing on all the graphite.exp
7804 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7806 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7808 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7809 according to nesting level.
7810 (find_scop_parameters): Call instantiate_parameters.
7811 (scan_tree_for_params): Extend it to handle general affine bounds.
7812 Inner loop bound can depend on outer loop induction variable.
7813 (setup_cloog_loop): tmp variable is allocated on stack. Call
7814 instantiate_parameters with respect to outermost_loop_in_scop.
7815 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7817 (create_empty_loop): Function loopify should be given edge
7818 probability, instead of edge frequency. Dominance relation from
7819 switch_bb to loop_header.
7820 (clast_to_gcc_expression): Added handling of clast_reduction node.
7821 (gloog): New functionality for removing old loop.
7822 (test_dependence): Factored out from build_rdg_all_levels.
7823 (build_rdg_all_levels): Dependence testing factored out to
7824 test_dependence function.
7826 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7827 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7830 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7832 * graphite.c (free_scop, param_index, initialize_cloog_names,
7833 nb_params_in_scop): Use name_tree map instead of just a tree
7834 for keeping track of the variable name associated to that tree.
7835 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7836 clast_to_gcc_expression, graphite_create_iv,
7837 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7838 graphite_stmt_to_gcc_stmt): New.
7839 (gloog): Call these.
7840 * graphite.h (struct name_tree): New.
7841 (struct scop): Use name_tree instead of tree for params.
7842 Store a vector of name_tree for new_ivs.
7844 (scop_nb_params): Use name_tree instead of tree.
7846 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7847 Sebastian Pop <sebastian.pop@amd.com>
7849 * tree-bounds.c: New.
7850 * tree-bounds.h: New.
7851 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7852 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7853 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7857 * c-cppbuiltin.c: Same.
7861 * tree-outof-ssa.c: Same.
7863 * Makefile.in: Same.
7865 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7866 Sebastian Pop <sebastian.pop@amd.com>
7868 * tree-loop-distribution.c (remaining_stmts,
7869 upstream_mem_writes): Removed static variables.
7870 (copy_loop_before, create_bb_after_loop,
7871 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7872 rdg_build_components, rdg_build_partitions,
7873 dump_rdg_partitions): Extern.
7874 (generate_loops_for_partition, generate_code_for_partition): Do not
7876 (already_processed_vertex_p, predecessor_has_mem_write,
7877 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7878 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7879 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7880 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7881 Pass remaining_stmts and upstream_mem_writes as parameters.
7882 (rdg_component): Moved...
7883 (build_rdg_partition_for_component): Do not aggregate components when
7884 flag_streamize_loops is set.
7885 (gen_sequential_loops): New.
7886 (ldist_gen): Call gen_sequential_loops.
7888 * tree-pass.h (pass_loop_streamization): Declared.
7890 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7891 basic blocks when loops structures exist.
7893 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7895 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7897 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7898 eliminate_local_variables_stmt, eliminate_local_variables,
7899 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7900 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7901 of code delimited by two edges in the CFG.
7902 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7903 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7904 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7905 the case of parallelisation of reductions.
7906 (create_loop_fn): Extern.
7907 (create_omp_parallel_region): New.
7909 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7910 dump_data_reference for printing dra and drb.
7911 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7913 (build_rdg): Don't call free_dependence_relations for the moment, as
7914 we attach dependence relations on each edge of the RDG.
7917 * tree-data-ref.h (rdg_component): ...here.
7918 (struct rdg_edge): New field ddr_p relation.
7919 (RDGE_RELATION): New.
7920 (create_bb_after_loop, copy_loop_before,
7921 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7922 rdg_build_partitions, dump_rdg_partitions,
7923 free_rdg_components): Declared.
7925 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7926 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7928 * tree-loop-streamization.c: New.
7930 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7931 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7933 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7935 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7937 * passes.c: Schedule pass_loop_streamization.
7939 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7941 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7944 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7946 * graphite.c (dot_all_scops): Update formatting.
7947 Bbs can now be part of more than one SCoP.
7949 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7951 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7953 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7954 * graphite.h (loop_to_cloog_loop): New.
7956 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7958 * graphite.c (loop_domain_dim, ref_nb_loops,
7959 loop_iteration_vector_dim): New.
7960 (build_access_matrix_with_af, build_access_matrix,
7961 initialize_dependence_polyhedron): Fixed for new matrix layout.
7962 No longer assume that all iteration domains are of the same
7965 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7967 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7968 defined in a loop at depth 0 is invariant.
7969 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7970 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7971 be called at loop depth 0.
7973 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7975 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7976 (down_open_scop): Removed.
7977 (loop_in_scop_p): Redefined.
7978 (scop_affine_expr): New argument: scop.
7979 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7980 a harmful statement ending a scop.
7981 (basic_block_simple_for_scop_p): New argument: scop.
7982 (get_loop_start): Removed.
7983 (new_scop): Initialize SCOP_LOOPS.
7984 (free_scop): Free SCOP_LOOPS.
7985 (succs_at_same_depth, preds_at_same_depth): New.
7986 (end_scop): Test the validity of a scop.
7987 (add_dominators_to_open_scops): New.
7988 (test_for_scop_bound): Call add_dominators_to_open_scops.
7989 Add cases for opening and closing multiple scops.
7990 (build_scops, build_scop_bbs): Iterate over basic blocks in
7992 (build_graphite_bb): Pass scop directly.
7993 (dfs_bb_in_scop_p): New.
7994 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7996 (nb_loops_around_gb): Use loop_in_scop_p.
7997 (schedule_to_scattering): Disabled for the moment the code computing
7998 the "textual order for outer loop".
8000 * graphite.h (struct scop): New field loops.
8002 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
8004 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
8006 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
8007 Sebastian Pop <sebastian.pop@amd.com>
8009 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
8010 * common.opt (fstreamize-loops): New.
8011 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
8012 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
8013 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
8014 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
8016 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8018 * tree-data-ref.c (build_empty_rdg): New.
8019 (build_rdg): Use it.
8020 * tree-data-ref.h (build_empty_rdg): Declared.
8021 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
8022 (find_vertex_for_stmt): Removed.
8023 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
8025 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
8027 * tree-loop-distribution.c (generate_builtin): After cancelling the
8028 loop tree, also delete basic blocks.
8029 (rdg_flag_uses): Stop recursion when a vertex has already been
8032 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8034 * graphite.c (build_scop_alpha): Removed.
8035 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
8036 and dump_dependence_graph to avoid compiler warnings.
8038 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8040 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
8041 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
8042 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
8043 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
8044 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
8045 (initialize_dependence_polyhedron, find_vertex_for_stmt,
8046 initialize_data_dependence_polyhedron, is_empty_polyhedron,
8047 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
8048 dump_dependence_graph): New.
8049 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
8051 (struct scop): New field loop2cloog_loop.
8052 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
8053 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
8055 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8057 * graphite.c (build_graphite_bb): Fix initialization
8058 of the graphite basic block.
8060 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
8062 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
8063 loop domain matrix. Pass in the number of loops contained in the
8065 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
8066 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
8067 loops that are not surrounding the current loop are not represented
8068 in the domain constraint matrix.
8069 (build_scop_iteration_domain): Initial domain constraint matrix
8070 contains only the eq/ineq, cst, and scop parameters columns.
8072 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8074 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
8075 (print_graphite_bb): Print scattering.
8077 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8079 * graphite.c (initialize_cloog_names): Initialize names of
8080 scattering variables.
8082 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8084 * graphite.c (dot_all_scops_1): Disable debug output while
8087 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
8089 * graphite.c (find_transform): Change cloog output language to C.
8091 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
8093 * tree-loop-distribution.c (generate_memset_zero,
8094 generate_builtin, generate_code_for_partition,
8095 rdg_flag_all_uses): New.
8096 (rdg_flag_uses): Gather in the same partition the statements defining
8097 the VUSES of the current statement.
8098 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8099 Gather in the same partition not only the stores to the same memory
8100 access, but also the reads.
8101 (ldist_generate_loops): Renamed ldist_gen.
8103 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
8104 Tobias Grosser <grosser@fmi.uni-passau.de>
8106 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8107 next pointer, don't use the inner pointer.
8109 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
8111 * graphite.c (dot_all_scops, dot_all_scops_1): New.
8112 (find_transform): Call dot_all_1.
8113 * graphite.h (dot_all_scops): Declared.
8115 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
8117 * tree-loop-distribution.c: Fix apsi.f ICE.
8118 (create_bb_after_loop): New.
8119 (generate_loops_for_partition): Use it.
8120 * gfortran.dg/ldist-1.f90: New.
8122 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8123 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8125 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8127 * graphite.c (find_transform): Dump cloog program sent to cloog.
8129 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8131 * graphite.c (initialize_cloog_names): Initialize cloog
8134 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
8136 * graphite.c (build_scop_context): Fix typo, for the matrix
8137 format: insert '0 >= 0' instead of '-1 >= 0'.
8139 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8141 * Fix merge problems.
8143 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
8145 * graphite.c (setup_cloog_loop): Fix typo.
8147 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8149 * doc/invoke.texi (-ftree-loop-distribution): Documented.
8150 * tree-loop-distribution.c: Reimplemented.
8151 * tree-pass.h (pass_loop_distribution): New.
8152 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8154 * graphds.h (struct graph): New field indexes.
8155 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8157 * tree-vect-analyze.c: Remove declaration of static functions when not
8159 * tree-vectorizer.c: Same.
8160 (rename_variables_in_loop): Now extern.
8161 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8162 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
8163 calling redirect_edge_and_branch_force.
8165 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8167 * tree-data-ref.c: Don't include tree-chrec.h.
8168 (debug_data_dependence_relations): New.
8169 (dump_data_dependence_relation): Call dump_data_reference on data refs
8171 (same_access_functions): Moved...
8172 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8173 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8174 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8175 struct rdg_vertex_info, ): New.
8176 (create_rdg_edge_for_ddr): Compute the dependence level before looking
8178 (create_rdg_vertices): Initialize the htab of graph->indexes.
8179 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8180 (stmts_from_loop): Don't save LABEL_EXPR.
8181 (hash_stmt_vertex_info, eq_stmt_vertex_info,
8182 hash_stmt_vertex_del): New.
8183 (build_rdg): Initialize rdg->indexes.
8184 (free_rdg, stores_from_loop, ref_base_address,
8185 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8186 have_similar_memory_accesses_1, ref_base_address_1,
8187 remove_similar_memory_refs): New.
8189 * tree-data-ref.h: Include tree-chrec.h.
8190 (debug_data_dependence_relations): Declared.
8191 (same_access_functions): ...here. Now static inline.
8192 (ddr_is_anti_dependent, ddrs_have_anti_deps,
8193 ddr_dependence_level): New.
8194 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8195 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8196 RDG_MEM_READS_STMT): New.
8197 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8198 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8199 rdg_vertex_for_stmt): Declared.
8200 (struct rdg_edge): New field level.
8201 (RDGE_LEVEL, free_rdg): New.
8202 (stores_from_loop, remove_similar_memory_refs,
8203 rdg_defs_used_in_other_loops_p,
8204 have_similar_memory_accesses): Declared.
8205 (rdg_has_similar_memory_accesses): New.
8207 * lambda.h (dependence_level): New.
8208 * common.opt (ftree-loop-distribution): New.
8209 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8210 (print_loop_ir): Renamed print_loops.
8211 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8212 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8213 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8214 (tree-loop-distribution.o): Added.
8215 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8216 (mark_virtual_ops_in_bb): New.
8217 (print_loops_bb, debug_loop_num, debug_loop): New.
8218 * passes.c: Scheduled pass_loop_distribution.
8220 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8222 * graphite.c (scan_tree_for_params): Correct the number of columns
8224 (nb_flat_iterator): New.
8225 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8226 (build_scop_iteration_domain): Correct the number of columns for
8229 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8231 * Merge from mainline (129697:130800).
8233 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
8235 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8236 dominated by SCoP's exit.
8237 (graphite_transform_loops): Compute post dominators.
8239 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8241 * Merge from mainline (127169:129697).
8243 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8245 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
8246 parameter for the basic block that contains the expression. Use
8247 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8248 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8250 * graphite.h (gbb_loop): New.
8251 (GBB_LOOP): Removed.
8253 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8255 * Makefile.in: Fix merge problem.
8257 2007-08-03 Sebastian Pop <sebpop@gmail.com>
8259 * Merge from mainline (125309:127169).
8260 * tree-loop-distribution.c: Disabled.
8262 2007-06-05 Sebastian Pop <sebpop@gmail.com>
8264 * Merge from mainline (r123693:125309).
8266 2007-05-30 Sebastian Pop <sebpop@gmail.com>
8268 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8270 (correct_modify_p, check_statements, number_of_lvalue_uses,
8271 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8272 instead of MODIFY_EXPR.
8273 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
8276 2007-05-24 Sebastian Pop <sebpop@gmail.com>
8278 * tree-loop-distribution.c (struct rdg): Replace arrays by
8279 VECs for edges and vertices.
8280 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8281 (RDGV_NB_PARTITIONS): New.
8282 (PRDG_NBV, PRDG_NBE): Removed.
8283 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8284 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8285 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8287 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
8288 Sebastian Pop <sebpop@gmail.com>
8290 * doc/invoke.texi (-ftree-loop-distribution): Document.
8291 * tree-loop-distribution.c: New file.
8292 * tree-pass.h (pass_loop_distribution): Declared.
8293 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8294 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8296 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8297 (DDR_REVERSED_P): New.
8298 * common.opt (-ftree-loop-distribution): New.
8299 * tree-flow.h (distribute_loops): Declared.
8300 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8301 * passes.c (init_optimization_passes): Schedule loop distribution.
8303 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
8305 * graphite.c (print_graphite_bb): Don't call dump_data_references.
8306 (print_scop): Don't print when scop is NULL.
8307 (build_scop_context, find_transform): Don't output to stderr.
8309 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
8311 * tree-data-ref.c: Don't include graphite.h.
8312 Comment out the code for printing data reference's scop.
8313 (build_access_matrix_with_af): Moved...
8314 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8315 * graphite.c (build_access_matrix_with_af): ... here. Now static.
8316 (print_graphite_bb): Print basic block's schedule.
8317 (print_scop): Don't print the schedule, call cloog's pretty printer.
8318 (bb_in_scop_p): A basic block is in a scop only if it is both
8319 dominated and postdominated by the scop's entry and exit basic blocks.
8320 (function_parameter_p): New.
8321 (invariant_in_scop_p): Use function_parameter_p.
8322 (new_scop, save_scop): New.
8323 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8325 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8326 (loop_in_scop_p): New.
8327 (scop_record_loop): Use loop_in_scop_p.
8328 (build_scop_domain): Renamed build_scop_iteration_domain.
8329 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8330 nb_params_in_scop, build_scop_context, first_loop_in_scop,
8331 setup_cloog_loop, dot_scop_1, dot_scop): New.
8332 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8333 (struct scop): Add a pointer to cloog's representation of a program.
8335 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8337 * doc/invoke.texi (-ftree-check-verbose): Renamed
8338 -ftree-checks-verbose.
8339 * common.opt (flag_tree_check_verbose): Renamed
8340 flag_tree_checks_verbose.
8341 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8343 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8345 * configure: Regenerated.
8346 * config.in: Regenerated.
8347 * tree-ssa-loop.c (graphite_transforms): Execute
8348 graphite_transform_loops only when HAVE_cloog.
8349 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8350 * graphite.c: Include polylibgmp.h and cloog.h.
8351 (graphite_transform_loops): Removed loops parameter.
8352 * tree-flow.h (graphite_transform_loops): Update declaration.
8353 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8354 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8355 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8356 (OBJS-common): Remove dependence on graphite.o.
8357 (BACKEND): Depend on @GRAPHITE@.
8359 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
8361 * doc/invoke.texi (-ftree-check-verbose): Documented.
8362 * gcc.dg/tree-checker/tree-checks-1.c: New.
8363 * gcc.dg/tree-checker/tree-checks-2.c: New.
8364 * gcc.dg/tree-checker/tree-checks-3.c: New.
8365 * gcc.dg/tree-checker/tree-checks-4.c: New.
8366 * gcc.dg/tree-checker/tree-checks.exp: New.
8367 * gcc.dg/tree-checker/condates.crp: New.
8368 * common.opt (ftree-checks-verbose): New.
8369 * tree-check.c (tree_check_warning): Move extra stderr output
8370 under control of flag_tree_check_verbose.
8372 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
8374 * tree-match.c: Fix comments formatting.
8375 * tree-match.h: Fix comments formatting.
8376 * tree-check.c: Fix comments formatting.
8377 (tree_check_init): Restructure.
8379 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
8381 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8383 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
8385 * Merge from mainline (r120733:123693).
8387 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8389 * condate.y: New file.
8390 * tree-match.h (struct patt_info_s): New field sign.
8391 (struct condate_s): New field msg.
8392 (normalize_condate, name_condate, add_condate): New.
8393 (conds[], condate_parse): Made extern.
8394 * tree-check.c (tree_check_warning): First arg changed to cond;
8395 warning reformatted.
8396 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8398 (tree_check): Process trivial condates.
8399 (read_delimited_string): Removed.
8400 (print_cond): Print name and msg.
8401 (conds[]): Made extern.
8402 (parse_tree_check_file_once): Rewritten to use the parser in
8404 Processing of option --tree_check_string moved to tree_scan().
8405 * Makefile.in: Added condate.y
8407 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8409 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8410 Use VECs instead of varrays.
8411 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8412 * Makefile.in (pretty-print.o): Depend on vec.h.
8413 * pretty-print.c: Include tree.h and vec.h.
8414 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8415 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8416 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8417 pp_free_list): Use VECs instead of varrays.
8418 * pretty-print.h: Do not include varray.h.
8419 (struct tree_chunk_s): Declaration moved before its use.
8420 (output_buffer): Rename varray field to chunks.
8421 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8422 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8423 save_global_holes): Use VECs instead of varrays.
8424 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8425 * tree-check.c (scan_cfg_stmts, push_node,
8426 print_matching_stmt): Removed.
8427 (tree_check_instance, push_global_holes_if_new, tree_check,
8428 execute_tree_check): Use VECs instead of varrays.
8429 (gate_tree_check): Don't execute the CFG check when basic_block_info
8432 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8434 * Merge from mainline (r115016:120733).
8436 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8438 * Merge from mainline (r117632:117661).
8440 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8442 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8443 * tree-pass.h (TDF_DEBUG, debug_p): New.
8444 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8445 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8446 get_loop_exit_condition, analyze_evolution_in_loop,
8447 analyze_initial_condition, analyze_scalar_evolution,
8448 instantiate_parameters, number_of_latch_executions): Use debug_p.
8449 * tree-chrec.c (chrec_apply): Use debug_p.
8450 * tree-data-ref.c: Include graphite.h.
8451 (dump_data_reference): Print also the access matrix.
8452 (analyze_array, analyze_indirect_ref, init_data_ref,
8453 analyze_offset_expr, address_analysis, object_analysis,
8454 create_data_ref, finalize_ddr_dependent,
8455 non_affine_dependence_relation, analyze_ziv_subscript,
8456 analyze_siv_subscript_cst_affine,
8457 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8458 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8459 analyze_miv_subscript, analyze_overlapping_iterations,
8460 build_classic_dist_vector, subscript_dependence_tester,
8461 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8462 (build_access_matrix_with_af): No longer static.
8463 * tree-data-ref.h (scop_p): ... declaration here.
8464 (data_reference.scop): New field.
8465 (DR_SCOP, DR_ACCESS_MATRIX): New.
8466 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8467 * graphite.c (print_graphite_bb): Call dump_data_references.
8468 (print_scop): Use scop_nb_loops and scop_dim_domain.
8469 (test_for_scop_bound): Use debug_p.
8470 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8472 (scop_loop_index): Moved...
8473 (scop_record_loop): New.
8474 (build_scop_loop_nests): Use scop_record_loop.
8475 (build_scop_domain): Use scop_dim_domain.
8476 (build_access_matrix): Implemented.
8477 (build_scop_canonical_schedules): Use scop_nb_loops.
8478 (build_graphite_bb): Initialize GBB_SCOP.
8479 * graphite.h (scop_p): Moved...
8480 (graphite_bb.scop): New field.
8481 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8482 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8483 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8484 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8485 scop_loop_index): New.
8486 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8488 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8490 * Merge from mainline (r117661:120450).
8492 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8494 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8495 at the first declaration outside the varying loop, instantiate as
8497 * tree-chrec.c (for_each_scev_op): New.
8498 * tree-chrec.h (for_each_scev_op): Declared.
8499 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8500 * tree-data-ref.c (get_references_in_stmt,
8501 find_data_references_in_stmt): New, from trunk.
8502 (find_data_references_in_loop): Use get_references_in_stmt
8503 and find_data_references_in_loop, modified as in trunk.
8504 (build_access_matrix_with_af): New.
8505 * tree-data-ref.h (data_reference): Add a field access_matrix.
8506 (data_ref_loc): New, as in trunk.
8507 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8508 invariant_in_scop_p, param_index, scan_tree_for_params,
8509 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8510 idx_record_param, idx_record_params, build_access_matrix,
8511 build_scop_data_accesses, build_scop_canonical_schedules,
8512 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8513 build_scop_params): New.
8514 * graphite.h (graphite_bb): New.
8515 (scop): Add fields static_schedule, params, loop_nest,
8517 * lambda.h: Declare vecs of lambda_matrix.
8518 * tree-flow.h (print_loop_ir_bb): Declared.
8519 * tree-cfg.c (print_loop_ir_bb): New.
8520 (print_loop): Use print_loop_ir_bb.
8522 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8524 * Merge from mainline (r115016:117632).
8526 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8528 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8529 break due to a warning.
8531 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8533 * graphite.c (print_scops, debug_scops): New.
8534 (graphite_transform): Renamed graphite_find_transform.
8535 * graphite.h (debug_scops): Declared.
8537 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8539 * tree-match.c: Reformat following the GNU style.
8540 * tree-match.h: Reformat following the GNU style.
8541 * tree-pattern.h: Removed empty file.
8542 * Makefile.in: Remove references to tree-pattern.h.
8543 * tree-check.c: Reformat following the GNU style.
8544 (execute_tree_check): Move gate condition code to...
8545 (gate_tree_check): ...here. New function.
8546 (pass_check): Use the gate function.
8548 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8550 * tree-pattern.h: New. Tree pattern matching and checking using
8552 * tree-check.c: New. Tree/CFG checking pass.
8553 * tree-match.c: New. Library for tree pattern matching.
8554 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8555 * toplev.c, flags.h: Add globals for tree-check pass.
8556 * Makefile.in: Integrate the files in tree-check pass.
8557 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8558 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8559 Introduce a "lazy" pretty-print mode.
8560 * tree.c, tree.h: Add tree_name.
8562 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8564 * doc/invoke.texi (-fgraphite): Correct typo.
8565 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8566 use of print_loop_ir.
8567 * gcc.dg/graphite/scop-1.c: New.
8568 * gcc.dg/graphite/scop-2.c: New.
8569 * gcc.dg/graphite/graphite.exp: New.
8570 * graphite.c: Include domwalk.h.
8571 (print_scop): Print only the entry and exit blocks.
8572 (debug_scop): No longer static.
8573 (affine_expr): Fix formating. Return also true when the expression is
8575 (stmt_simple_for_scop_p): Fix formating.
8576 (build_scops): Use domwalk.
8577 (get_loop_start, end_scop, test_for_scop_bound): New.
8578 (graphite_transform_loops): Avoid printing on stderr.
8579 * graphite.h (debug_scop): Declared.
8580 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8581 * Makefile.in (graphite.o): Depend on domwalk.h.
8582 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8583 declarations for static functions.
8584 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8585 controlling output verbosity.
8587 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8588 Plesco Alexandru <shurikx@gmail.com>
8590 * doc/invoke.texi (-fgraphite): Document.
8591 * tree-pass.h (pass_graphite_transforms): Declared.
8592 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8593 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8594 (pass_graphite_transforms): Defined.
8595 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8596 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8597 * graphite.c, graphite.h: New.
8598 * common.opt (fgraphite): Declared.
8599 * tree-flow.h (graphite_transform_loops): Declared.
8600 * Makefile.in (OBJS-common): Add graphite.o.
8601 (graphite.o): New rule.
8602 * passes.c (pass_graphite_transforms): Scheduled.