This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[08/32] Remove global call sets: cfgcleanup.c
- From: Richard Sandiford <richard dot sandiford at arm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 11 Sep 2019 20:07:29 +0100
- Subject: [08/32] Remove global call sets: cfgcleanup.c
- References: <mptimpyzmf1.fsf@arm.com>
old_insns_match_p just tests whether two instructions are
similar enough to merge. With call_insn_abi it makes more
sense to compare the ABIs directly.
2019-09-11 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* cfgcleanup.c (old_insns_match_p): Compare the ABIs of calls
instead of the call-clobbered sets.
Index: gcc/cfgcleanup.c
===================================================================
--- gcc/cfgcleanup.c 2019-09-11 19:47:24.402262786 +0100
+++ gcc/cfgcleanup.c 2019-09-11 19:47:50.610078102 +0100
@@ -1227,13 +1227,7 @@ old_insns_match_p (int mode ATTRIBUTE_UN
}
}
- HARD_REG_SET i1_used = call_insn_abi (i1).full_reg_clobbers ();
- HARD_REG_SET i2_used = call_insn_abi (i2).full_reg_clobbers ();
- /* ??? This preserves traditional behavior; it might not be needed. */
- i1_used |= fixed_reg_set;
- i2_used |= fixed_reg_set;
-
- if (i1_used != i2_used)
+ if (call_insn_abi (i1) != call_insn_abi (i2))
return dir_none;
}