diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-17 02:31:56 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-17 02:31:56 +0000 |
commit | b3d6de8978fd2208885e98b19a91c9d29c170af5 (patch) | |
tree | 94c8895c6dde3b282518d4c9951067cd0ac517fd /gcc/regmove.c | |
parent | 5e7d465f337d9d419b2528ad819390067caeca95 (diff) | |
download | gcc-b3d6de8978fd2208885e98b19a91c9d29c170af5.tar.gz |
Revert "Basic block renumbering removal", and two followup patches.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53537 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r-- | gcc/regmove.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c index 4188ce6ee97..7b073f29e73 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -223,7 +223,7 @@ mark_flags_life_zones (flags) { int flags_regno; int flags_nregs; - basic_block block; + int block; #ifdef HAVE_cc0 /* If we found a flags register on a cc0 host, bail. */ @@ -254,13 +254,13 @@ mark_flags_life_zones (flags) flags_set_1_rtx = flags; /* Process each basic block. */ - FOR_ALL_BB_REVERSE (block) + for (block = n_basic_blocks - 1; block >= 0; block--) { rtx insn, end; int live; - insn = block->head; - end = block->end; + insn = BLOCK_HEAD (block); + end = BLOCK_END (block); /* Look out for the (unlikely) case of flags being live across basic block boundaries. */ @@ -269,7 +269,7 @@ mark_flags_life_zones (flags) { int i; for (i = 0; i < flags_nregs; ++i) - live |= REGNO_REG_SET_P (block->global_live_at_start, + live |= REGNO_REG_SET_P (BASIC_BLOCK (block)->global_live_at_start, flags_regno + i); } #endif @@ -1061,7 +1061,6 @@ regmove_optimize (f, nregs, regmove_dump_file) int pass; int i; rtx copy_src, copy_dst; - basic_block bb; /* ??? Hack. Regmove doesn't examine the CFG, and gets mightily confused by non-call exceptions ending blocks. */ @@ -1077,8 +1076,8 @@ regmove_optimize (f, nregs, regmove_dump_file) regmove_bb_head = (int *) xmalloc (sizeof (int) * (old_max_uid + 1)); for (i = old_max_uid; i >= 0; i--) regmove_bb_head[i] = -1; - FOR_ALL_BB (bb) - regmove_bb_head[INSN_UID (bb->head)] = bb->sindex; + for (i = 0; i < n_basic_blocks; i++) + regmove_bb_head[INSN_UID (BLOCK_HEAD (i))] = i; /* A forward/backward pass. Replace output operands with input operands. */ @@ -1505,15 +1504,15 @@ regmove_optimize (f, nregs, regmove_dump_file) /* In fixup_match_1, some insns may have been inserted after basic block ends. Fix that here. */ - FOR_ALL_BB (bb) + for (i = 0; i < n_basic_blocks; i++) { - rtx end = bb->end; + rtx end = BLOCK_END (i); rtx new = end; rtx next = NEXT_INSN (new); while (next != 0 && INSN_UID (next) >= old_max_uid - && (bb->next_bb == EXIT_BLOCK_PTR || bb->next_bb->head != next)) + && (i == n_basic_blocks - 1 || BLOCK_HEAD (i + 1) != next)) new = next, next = NEXT_INSN (new); - bb->end = new; + BLOCK_END (i) = new; } done: @@ -2139,10 +2138,10 @@ static int record_stack_memrefs PARAMS ((rtx *, void *)); void combine_stack_adjustments () { - basic_block bb; + int i; - FOR_ALL_BB (bb) - combine_stack_adjustments_for_block (bb); + for (i = 0; i < n_basic_blocks; ++i) + combine_stack_adjustments_for_block (BASIC_BLOCK (i)); } /* Recognize a MEM of the form (sp) or (plus sp const). */ |