aboutsummaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-05-06 17:52:34 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-05-06 17:52:34 -0400
commitf88b0a82c36eefd3b89399ce2b8f8ce1968da8c5 (patch)
treeced48240285a99923b67918a0e126bdad1334976 /gcc/reorg.c
parente3c69b8a5d4085bf6ce58d0d5244d6f8c51165ea (diff)
downloadgcc-f88b0a82c36eefd3b89399ce2b8f8ce1968da8c5.zip
gcc-f88b0a82c36eefd3b89399ce2b8f8ce1968da8c5.tar.gz
gcc-f88b0a82c36eefd3b89399ce2b8f8ce1968da8c5.tar.bz2
(mark_referenced_resources, mark_set_resources): Change from USE and
CLOBBER insns to using CALL_INSN_FUNCTION_USAGE. From-SVN: r7247
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index b44bcfc..d537839 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -403,25 +403,27 @@ mark_referenced_resources (x, res, include_delayed_effects)
if (global_regs[i])
SET_HARD_REG_BIT (res->regs, i);
- /* Skip any labels between the CALL_INSN and possible USE insns. */
- while (GET_CODE (insn) == CODE_LABEL)
- insn = PREV_INSN (insn);
-
- for ( ; (insn && GET_CODE (insn) == INSN
- && GET_CODE (PATTERN (insn)) == USE);
- insn = PREV_INSN (insn))
- {
- for (i = 1; i < seq_size; i++)
- {
- rtx slot_pat = PATTERN (XVECEXP (sequence, 0, i));
- if (GET_CODE (slot_pat) == SET
- && rtx_equal_p (SET_DEST (slot_pat),
- XEXP (PATTERN (insn), 0)))
- break;
- }
- if (i >= seq_size)
- mark_referenced_resources (XEXP (PATTERN (insn), 0), res, 0);
- }
+ {
+ rtx link;
+
+ for (link = CALL_INSN_FUNCTION_USAGE (insn);
+ link;
+ link = XEXP (link, 1))
+ if (GET_CODE (XEXP (link, 0)) == USE)
+ {
+ for (i = 1; i < seq_size; i++)
+ {
+ rtx slot_pat = PATTERN (XVECEXP (sequence, 0, i));
+ if (GET_CODE (slot_pat) == SET
+ && rtx_equal_p (SET_DEST (slot_pat),
+ SET_DEST (XEXP (link, 0)))
+ break;
+ }
+ if (i >= seq_size)
+ mark_referenced_resources (SET_DEST (XEXP (link, 0)),
+ res, 0);
+ }
+ }
}
/* ... fall through to other INSN processing ... */
@@ -525,14 +527,13 @@ mark_set_resources (x, res, in_dest, include_delayed_effects)
if (NEXT_INSN (prev) != x)
next = NEXT_INSN (NEXT_INSN (prev));
- /* Skip any possible labels between the CALL_INSN and CLOBBERs. */
- while (GET_CODE (next) == CODE_LABEL)
- next = NEXT_INSN (next);
-
- for (; (next && GET_CODE (next) == INSN
- && GET_CODE (PATTERN (next)) == CLOBBER);
- next = NEXT_INSN (next))
- mark_set_resources (XEXP (PATTERN (next), 0), res, 1, 0);
+ { rtx link;
+ for (link = CALL_INSN_FUNCTION_USAGE (insn);
+ link;
+ link = XEXP (link, 1))
+ if (GET_CODE (XEXP (link, 0)) == CLOBBER)
+ mark_set_resources (SET_DEST (XEXP (link, 0)), res, 1, 0);
+ }
/* Check for a NOTE_INSN_SETJMP. If it exists, then we must
assume that this call can clobber any register. */