]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove global call sets: cfgcleanup.c
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Sep 2019 16:20:12 +0000 (16:20 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Sep 2019 16:20:12 +0000 (16:20 +0000)
old_insns_match_p just tests whether two instructions are
similar enough to merge.  With insn_callee_abi it makes more
sense to compare the ABIs directly.

2019-09-30  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* cfgcleanup.c (old_insns_match_p): Compare the ABIs of calls
instead of the call-clobbered sets.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276314 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cfgcleanup.c

index d912a87816120c659bfa41c121a17e1590f6f889..a3e4ff24c8d6c461c09f812a9f31b28588c7c5ed 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-30  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * cfgcleanup.c (old_insns_match_p): Compare the ABIs of calls
+       instead of the call-clobbered sets.
+
 2019-09-30  Richard Sandiford  <richard.sandiford@arm.com>
 
        * caller-save.c (setup_save_areas): Remove redundant |s of
index 329fa0cc901412e74d64807dac5776985f585738..ced7e0a4283c65b0e72008c14673623fe6310f64 100644 (file)
@@ -1227,13 +1227,7 @@ old_insns_match_p (int mode ATTRIBUTE_UNUSED, rtx_insn *i1, rtx_insn *i2)
            }
        }
 
-      HARD_REG_SET i1_used = insn_callee_abi (i1).full_reg_clobbers ();
-      HARD_REG_SET i2_used = insn_callee_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 (insn_callee_abi (i1) != insn_callee_abi (i2))
         return dir_none;
     }