aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-03-11 23:43:44 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1992-03-11 23:43:44 -0500
commitaa2c50d6b341f534d56526bc330f9bd7e15baf4d (patch)
tree817850060157e676561d99129da67d650ef7a10a /gcc
parent4e4b555d33d1df5259f13dc13dec59361920b9f2 (diff)
downloadgcc-aa2c50d6b341f534d56526bc330f9bd7e15baf4d.zip
gcc-aa2c50d6b341f534d56526bc330f9bd7e15baf4d.tar.gz
gcc-aa2c50d6b341f534d56526bc330f9bd7e15baf4d.tar.bz2
*** empty log message ***
From-SVN: r452
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reload1.c2
-rw-r--r--gcc/reorg.c62
2 files changed, 14 insertions, 50 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 3d568d9..2f2ccc3 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -3231,7 +3231,7 @@ reload_as_needed (first, live_known)
register rtx next = NEXT_INSN (insn);
/* Notice when we move to a new basic block. */
- if (live_known && basic_block_needs && this_block + 1 < n_basic_blocks
+ if (live_known && this_block + 1 < n_basic_blocks
&& insn == basic_block_head[this_block+1])
++this_block;
diff --git a/gcc/reorg.c b/gcc/reorg.c
index c9f3346..6147be9 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -1758,71 +1758,35 @@ find_basic_block (insn)
return -1;
}
-/* Used for communication between the following two routines, contains
- the block number that insn was in. */
-
-static int current_block_number;
-
-/* Called via note_stores from update_block_status. It marks the
- registers set in this insn as live at the start of the block whose
- number is in current_block_number. */
-
-static void
-update_block_from_store (dest, x)
- rtx dest;
- rtx x;
-{
- int first_regno, last_regno;
- int offset = 0;
- int i;
-
- if (GET_CODE (x) != SET
- || (GET_CODE (dest) != REG && (GET_CODE (dest) != SUBREG
- || GET_CODE (SUBREG_REG (dest)) != REG)))
- return;
-
- if (GET_CODE (dest) == SUBREG)
- first_regno = REGNO (SUBREG_REG (dest)) + SUBREG_WORD (dest);
- else
- first_regno = REGNO (dest);
-
- last_regno = first_regno + HARD_REGNO_NREGS (first_regno, GET_MODE (dest));
- for (i = first_regno; i < last_regno; i++)
- basic_block_live_at_start[current_block_number][i / HOST_BITS_PER_INT]
- |= (1 << (i % HOST_BITS_PER_INT));
-}
-
/* Called when INSN is being moved from a location near the target of a jump.
- If WHERE is the first active insn at the start of its basic block, we can
- just mark the registers set in INSN as live at the start of the basic block
- that starts immediately before INSN.
-
- Otherwise, we leave a marker of the form (use (INSN)) immediately in front
+ We leave a marker of the form (use (INSN)) immediately in front
of WHERE for mark_target_live_regs. These markers will be deleted when
- reorg finishes. */
+ reorg finishes.
+
+ We used to try to update the live status of registers if WHERE is at
+ the start of a basic block, but that can't work since we may remove a
+ BARRIER in relax_delay_slots. */
static void
update_block (insn, where)
rtx insn;
rtx where;
{
+ int b;
+
/* Ignore if this was in a delay slot and it came from the target of
a branch. */
if (INSN_FROM_TARGET_P (insn))
return;
- current_block_number = find_basic_block (insn);
- if (current_block_number == -1)
- return;
-
- if (where == next_active_insn (basic_block_head[current_block_number]))
- note_stores (PATTERN (insn), update_block_from_store);
- else
- emit_insn_before (gen_rtx (USE, VOIDmode, insn), where);
+ emit_insn_before (gen_rtx (USE, VOIDmode, insn), where);
/* INSN might be making a value live in a block where it didn't use to
be. So recompute liveness information for this block. */
- bb_ticks[current_block_number]++;
+
+ b = find_basic_block (insn);
+ if (b != -1)
+ bb_ticks[b]++;
}
/* Marks registers possibly live at the current place being scanned by