+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
#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
{
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))