summaryrefslogtreecommitdiff
path: root/gcc/resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/resource.c')
-rw-r--r--gcc/resource.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/gcc/resource.c b/gcc/resource.c
index 17f7d034d93..7a16e8bc442 100644
--- a/gcc/resource.c
+++ b/gcc/resource.c
@@ -326,13 +326,11 @@ mark_referenced_resources (x, res, include_delayed_effects)
rtx insn = PREV_INSN (x);
rtx sequence = 0;
int seq_size = 0;
- rtx next = NEXT_INSN (x);
int i;
/* If we are part of a delay slot sequence, point at the SEQUENCE. */
if (NEXT_INSN (insn) != x)
{
- next = NEXT_INSN (NEXT_INSN (insn));
sequence = PATTERN (NEXT_INSN (insn));
seq_size = XVECLEN (sequence, 0);
if (GET_CODE (sequence) != SEQUENCE)
@@ -353,7 +351,7 @@ mark_referenced_resources (x, res, include_delayed_effects)
if (global_regs[i])
SET_HARD_REG_BIT (res->regs, i);
- /* Check for a NOTE_INSN_SETJMP. If it exists, then we must
+ /* Check for a REG_SETJMP. If it exists, then we must
assume that this call can need any register.
This is done to be more conservative about how we handle setjmp.
@@ -361,8 +359,7 @@ mark_referenced_resources (x, res, include_delayed_effects)
registers ensures that a register will not be considered dead
just because it crosses a setjmp call. A register should be
considered dead only if the setjmp call returns non-zero. */
- if (next && GET_CODE (next) == NOTE
- && NOTE_LINE_NUMBER (next) == NOTE_INSN_SETJMP)
+ if (find_reg_note (x, REG_SETJMP, NULL))
SET_HARD_REG_SET (res->regs);
{
@@ -667,8 +664,6 @@ mark_set_resources (x, res, in_dest, mark_type)
if (mark_type == MARK_SRC_DEST_CALL)
{
- rtx next = NEXT_INSN (x);
- rtx prev = PREV_INSN (x);
rtx link;
res->cc = res->memory = 1;
@@ -676,21 +671,15 @@ mark_set_resources (x, res, in_dest, mark_type)
if (call_used_regs[r] || global_regs[r])
SET_HARD_REG_BIT (res->regs, r);
- /* If X is part of a delay slot sequence, then NEXT should be
- the first insn after the sequence. */
- if (NEXT_INSN (prev) != x)
- next = NEXT_INSN (NEXT_INSN (prev));
-
for (link = CALL_INSN_FUNCTION_USAGE (x);
link; link = XEXP (link, 1))
if (GET_CODE (XEXP (link, 0)) == CLOBBER)
mark_set_resources (SET_DEST (XEXP (link, 0)), res, 1,
MARK_SRC_DEST);
- /* Check for a NOTE_INSN_SETJMP. If it exists, then we must
+ /* Check for a REG_SETJMP. If it exists, then we must
assume that this call can clobber any register. */
- if (next && GET_CODE (next) == NOTE
- && NOTE_LINE_NUMBER (next) == NOTE_INSN_SETJMP)
+ if (find_reg_note (x, REG_SETJMP, NULL))
SET_HARD_REG_SET (res->regs);
}