diff options
author | Tom de Vries <tom@codesourcery.com> | 2014-10-17 06:36:45 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2014-10-17 06:36:45 +0000 |
commit | 8d696651ab2212b79adb86abd2bdde4b88d56a8f (patch) | |
tree | 12ea390a5209af9b33f61090776f5ef97a5c1394 /gcc/regcprop.c | |
parent | 8c8fe66309a90e2fffd1515650321ca934857357 (diff) | |
download | gcc-8d696651ab2212b79adb86abd2bdde4b88d56a8f.zip gcc-8d696651ab2212b79adb86abd2bdde4b88d56a8f.tar.gz gcc-8d696651ab2212b79adb86abd2bdde4b88d56a8f.tar.bz2 |
Use fuse-caller-save info in cprop-hardreg
2014-10-17 Tom de Vries <tom@codesourcery.com>
PR rtl-optimization/61605
* regcprop.c (copyprop_hardreg_forward_1): Use
regs_invalidated_by_this_call instead of regs_invalidated_by_call.
* gcc.target/i386/fuse-caller-save.c: Update addition check. Add movl
absence check.
From-SVN: r216365
Diffstat (limited to 'gcc/regcprop.c')
-rw-r--r-- | gcc/regcprop.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/regcprop.c b/gcc/regcprop.c index 015366b..262de1b 100644 --- a/gcc/regcprop.c +++ b/gcc/regcprop.c @@ -1005,6 +1005,7 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) unsigned int set_nregs = 0; unsigned int regno; rtx exp; + HARD_REG_SET regs_invalidated_by_this_call; for (exp = CALL_INSN_FUNCTION_USAGE (insn); exp; exp = XEXP (exp, 1)) { @@ -1023,8 +1024,11 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) } } + get_call_reg_set_usage (insn, + ®s_invalidated_by_this_call, + regs_invalidated_by_call); for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) - if ((TEST_HARD_REG_BIT (regs_invalidated_by_call, regno) + if ((TEST_HARD_REG_BIT (regs_invalidated_by_this_call, regno) || HARD_REGNO_CALL_PART_CLOBBERED (regno, vd->e[regno].mode)) && (regno < set_regno || regno >= set_regno + set_nregs)) kill_value_regno (regno, 1, vd); |