summaryrefslogtreecommitdiff
path: root/gcc/loop-unroll.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-15 23:05:23 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-15 23:05:23 +0000
commit01020a5ffd648963482b27b4b24f4c7719274bf7 (patch)
tree1d0023517e2f2d1588dbafdad22f8ee98e9d9ce8 /gcc/loop-unroll.c
parenta7f34305907b12eaa45effbd59048efcf5d651cb (diff)
downloadgcc-01020a5ffd648963482b27b4b24f4c7719274bf7.tar.gz
* Makefile.in (cfg.o): Add new dependencies.
* basic-block.h (reorder_block_def): Kill original/copy/duplicated/copy_number fields. (BB_DUPLICATED): New flag. (initialize_original_copy_tables, free_original_copy_tables, set_bb_original, get_bb_original, set_bb_copy, get_bb_copy): New. * cfg.c: Include hashtab.h and alloc-pool.h (bb_original, bb_copy, original_copy_bb_pool): New static vars. (htab_bb_copy_original_entry): New struct. (bb_copy_original_hash, bb_copy_original_eq): New static functions. (initialize_original_copy_tables, free_original_copy_tables, set_bb_original, get_bb_original, set_bb_copy, get_bb_copy): New global functions. * cfghooks.c (duplicate_block): Update original/copy handling. * cfglayout.c (fixup_reorder_chain): Likewise. (cfg_layout_initialize): Initialize orignal_copy tables. (cfg_layout_finalize): FInalize original_copy tables. (can_copy_bbs_p): Use BB_DUPLICATED flag. (copy_bbs): Likewise. * cfgloopmanip.c (update-single_exits_after_duplication): Likewise. (duplicate_loop_to_header_edge): Likewise; update handling of copy_number. (loop_version): Likewise. * dominance.c (get_dominated_by_region): Use BB_DUPLICATED_FLAG. * except.c (expand_resx_expr): Check that reg->resume is not set. * loop-unroll.c (unroll_loop_constant_iterations, unroll_loop_runtime_iterations, apply_opt_in_copies): Update copy/original handling. * loop-unwitch.c (unswitch_loop): Likewise. * tree-cfg.c (create_bb): Do not initialize RBI. (disband_implicit_edges): Do not kill RBI. (add_phi_args_after_copy_bb): Use new original/copy mapping. (add_phi_args_after_copy): Use BB_DUPLICATED flag. (tree_duplicate_sese_region): Update original/copy handling. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise. * tree-ssa-loop-manip.c (copy_phi_node_args): Likewise. * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101000 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r--gcc/loop-unroll.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 68512d02a5a..72fda46e391 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -790,7 +790,7 @@ unroll_loop_constant_iterations (struct loops *loops, struct loop *loop)
if (exit_at_end)
{
- basic_block exit_block = desc->in_edge->src->rbi->copy;
+ basic_block exit_block = get_bb_copy (desc->in_edge->src);
/* Find a new in and out edge; they are in the last copy we have made. */
if (EDGE_SUCC (exit_block, 0)->dest == desc->out_edge->dest)
@@ -1110,7 +1110,7 @@ unroll_loop_runtime_iterations (struct loops *loops, struct loop *loop)
if (exit_at_end)
{
- basic_block exit_block = desc->in_edge->src->rbi->copy;
+ basic_block exit_block = get_bb_copy (desc->in_edge->src);
/* Find a new in and out edge; they are in the last copy we have
made. */
@@ -2058,9 +2058,11 @@ apply_opt_in_copies (struct opt_info *opt_info,
for (i = opt_info->first_new_block; i < (unsigned) last_basic_block; i++)
{
bb = BASIC_BLOCK (i);
- orig_bb = bb->rbi->original;
+ orig_bb = get_bb_original (bb);
- delta = determine_split_iv_delta (bb->rbi->copy_number, n_copies,
+ /* bb->aux holds position in copy sequence initialized by
+ duplicate_loop_to_header_edge. */
+ delta = determine_split_iv_delta ((size_t)bb->aux, n_copies,
unrolling);
orig_insn = BB_HEAD (orig_bb);
for (insn = BB_HEAD (bb); insn != NEXT_INSN (BB_END (bb)); insn = next)
@@ -2124,12 +2126,12 @@ apply_opt_in_copies (struct opt_info *opt_info,
/* Rewrite also the original loop body. Find them as originals of the blocks
in the last copied iteration, i.e. those that have
- bb->rbi->original->copy == bb. */
+ get_bb_copy (get_bb_original (bb)) == bb. */
for (i = opt_info->first_new_block; i < (unsigned) last_basic_block; i++)
{
bb = BASIC_BLOCK (i);
- orig_bb = bb->rbi->original;
- if (orig_bb->rbi->copy != bb)
+ orig_bb = get_bb_original (bb);
+ if (get_bb_copy (orig_bb) != bb)
continue;
delta = determine_split_iv_delta (0, n_copies, unrolling);