diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-09-30 16:21:14 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-09-30 16:21:14 +0000 |
commit | 30503f4ea491b9d6b9da00889155ecaa5d15cfb9 (patch) | |
tree | 120247e7798e2e7298525223dc422afc36979c44 | |
parent | 35b81ea3f7412360d6f108c5b9b7a8a1b9f3b138 (diff) | |
download | gcc-30503f4ea491b9d6b9da00889155ecaa5d15cfb9.zip gcc-30503f4ea491b9d6b9da00889155ecaa5d15cfb9.tar.gz gcc-30503f4ea491b9d6b9da00889155ecaa5d15cfb9.tar.bz2 |
Remove global call sets: regcprop.c
This is a direct replacement of an existing test for fully and
partially clobbered registers.
2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* regcprop.c (copyprop_hardreg_forward_1): Use the recorded
mode of the register when deciding whether it is no longer
available after a call.
From-SVN: r276331
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/regcprop.c | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 24f73f8..d1534e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> + * regcprop.c (copyprop_hardreg_forward_1): Use the recorded + mode of the register when deciding whether it is no longer + available after a call. + +2019-09-30 Richard Sandiford <richard.sandiford@arm.com> + * recog.c: Include function-abi.h. (peep2_find_free_register): Use crtl->abi when deciding whether a register is free for use after RA. diff --git a/gcc/regcprop.c b/gcc/regcprop.c index 0bdd6b9..87cc394 100644 --- a/gcc/regcprop.c +++ b/gcc/regcprop.c @@ -1055,16 +1055,15 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) function_abi callee_abi = insn_callee_abi (insn); for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) - if ((callee_abi.clobbers_full_reg_p (regno) - || (targetm.hard_regno_call_part_clobbered - (callee_abi.id (), regno, vd->e[regno].mode))) + if (vd->e[regno].mode != VOIDmode + && callee_abi.clobbers_reg_p (vd->e[regno].mode, regno) && (regno < set_regno || regno >= set_regno + set_nregs)) kill_value_regno (regno, 1, vd); /* If SET was seen in CALL_INSN_FUNCTION_USAGE, and SET_SRC - of the SET isn't in regs_invalidated_by_call hard reg set, - but instead among CLOBBERs on the CALL_INSN, we could wrongly - assume the value in it is still live. */ + of the SET isn't clobbered by CALLEE_ABI, but instead among + CLOBBERs on the CALL_INSN, we could wrongly assume the + value in it is still live. */ if (ksvd.ignore_set_reg) kill_clobbered_values (insn, vd); } |