aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2004-07-19 20:24:59 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2004-07-19 20:24:59 +0000
commit4f1605d2ca37c757a35b3157a55f7b9c5615ae31 (patch)
tree51f933aa805e1c5bda05c3519f2d0847aba99a4c /gcc/rtlanal.c
parentfab62285412aaafdfc4c81e9b581fb57f9d59c99 (diff)
downloadgcc-4f1605d2ca37c757a35b3157a55f7b9c5615ae31.zip
gcc-4f1605d2ca37c757a35b3157a55f7b9c5615ae31.tar.gz
gcc-4f1605d2ca37c757a35b3157a55f7b9c5615ae31.tar.bz2
* rtlanal.c (reg_set_p): Add check for regs_invalidated_by_call.
From-SVN: r84930
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index f3ce004..4cdcb63 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -941,14 +941,10 @@ reg_set_p (rtx reg, rtx insn)
if (INSN_P (insn)
&& (FIND_REG_INC_NOTE (insn, reg)
|| (CALL_P (insn)
- /* We'd like to test call_used_regs here, but rtlanal.c can't
- reference that variable due to its use in genattrtab. So
- we'll just be more conservative.
-
- ??? Unless we could ensure that the CALL_INSN_FUNCTION_USAGE
- information holds all clobbered registers. */
&& ((REG_P (reg)
- && REGNO (reg) < FIRST_PSEUDO_REGISTER)
+ && REGNO (reg) < FIRST_PSEUDO_REGISTER
+ && TEST_HARD_REG_BIT (regs_invalidated_by_call,
+ REGNO (reg)))
|| MEM_P (reg)
|| find_reg_fusage (insn, CLOBBER, reg)))))
return 1;