aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-09-30 16:21:07 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-09-30 16:21:07 +0000
commit7187286ef3381ebde6377015fe776d6d11329a32 (patch)
treeb8883782b4098fb88d3045da443e50e98c141046 /gcc
parent3df28f006a7ceaf958a9ce9d100dd1e266e18f26 (diff)
downloadgcc-7187286ef3381ebde6377015fe776d6d11329a32.zip
gcc-7187286ef3381ebde6377015fe776d6d11329a32.tar.gz
gcc-7187286ef3381ebde6377015fe776d6d11329a32.tar.bz2
Remove global call sets: postreload-gcse.c
This is another case in which we should conservatively treat partial kills as full kills. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * postreload-gcse.c: Include regs.h and function-abi.h. (record_opr_changes): Use insn_callee_abi to get the ABI of the call insn target. Conservatively assume that partially-clobbered registers are altered. From-SVN: r276329
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/postreload-gcse.c8
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 208d32f..a30c38d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
+ * postreload-gcse.c: Include regs.h and function-abi.h.
+ (record_opr_changes): Use insn_callee_abi to get the ABI of the
+ call insn target. Conservatively assume that partially-clobbered
+ registers are altered.
+
+2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
+
* postreload.c (reload_combine_recognize_pattern): Use crtl->abi
when deciding whether a register is free for use after RA.
(reload_combine): Remove unnecessary use of fixed_reg_set.
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c
index a709838..0c12b38 100644
--- a/gcc/postreload-gcse.c
+++ b/gcc/postreload-gcse.c
@@ -41,6 +41,8 @@ along with GCC; see the file COPYING3. If not see
#include "intl.h"
#include "gcse-common.h"
#include "gcse.h"
+#include "regs.h"
+#include "function-abi.h"
/* The following code implements gcse after reload, the purpose of this
pass is to cleanup redundant loads generated by reload and other
@@ -772,7 +774,11 @@ record_opr_changes (rtx_insn *insn)
{
unsigned int regno;
hard_reg_set_iterator hrsi;
- EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, regno, hrsi)
+ /* We don't track modes of hard registers, so we need to be
+ conservative and assume that partial kills are full kills. */
+ HARD_REG_SET callee_clobbers
+ = insn_callee_abi (insn).full_and_partial_reg_clobbers ();
+ EXECUTE_IF_SET_IN_HARD_REG_SET (callee_clobbers, 0, regno, hrsi)
record_last_reg_set_info_regno (insn, regno);
if (! RTL_CONST_OR_PURE_CALL_P (insn))