]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Make get_call_rtx_from take a const rtx_insn *
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 10 Sep 2019 16:19:23 +0000 (16:19 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 10 Sep 2019 16:19:23 +0000 (16:19 +0000)
Only one caller (in dwarf2out.c) was preventing get_call_rtx_from
from taking an rtx_insn *.  Since that caller just passes a PATTERN,
it's a trivial change to make.

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

gcc/
* rtl.h (get_call_rtx_from): Take a const rtx_insn * instead of an rtx.
* rtlanal.c (get_call_rtx_from): Likewise.
* dwarf2out.c (dwarf2out_var_location): Pass the insn rather
than the pattern to get_call_rtx_from.
* config/i386/i386-expand.h (ix86_notrack_prefixed_insn_p): Take
an rtx_insn * instead of an rtx.
* config/i386/i386-expand.c (ix86_notrack_prefixed_insn_p): Likewise.

From-SVN: r275593

gcc/ChangeLog
gcc/config/i386/i386-expand.c
gcc/config/i386/i386-expand.h
gcc/dwarf2out.c
gcc/rtl.h
gcc/rtlanal.c

index 1bd7fa29f1b4003fd3e1863ea21259f5ac1315c5..0ec847ca9d8db2071df2173472bf84bf85d8e2db 100644 (file)
@@ -1,3 +1,13 @@
+2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * rtl.h (get_call_rtx_from): Take a const rtx_insn * instead of an rtx.
+       * rtlanal.c (get_call_rtx_from): Likewise.
+       * dwarf2out.c (dwarf2out_var_location): Pass the insn rather
+       than the pattern to get_call_rtx_from.
+       * config/i386/i386-expand.h (ix86_notrack_prefixed_insn_p): Take
+       an rtx_insn * instead of an rtx.
+       * config/i386/i386-expand.c (ix86_notrack_prefixed_insn_p): Likewise.
+
 2019-09-10  Martin Liska  <mliska@suse.cz>
 
        * common.opt: Use newly added WarnRemoved.
index 862cd81da4d14fbce30ab3c3b4a6caea5ed0469d..22c2823c549f7b0f5644c80536b0576228b09d11 100644 (file)
@@ -19969,7 +19969,7 @@ ix86_expand_sse2_mulvxdi3 (rtx op0, rtx op1, rtx op2)
    should be encoded with notrack prefix.  */
 
 bool
-ix86_notrack_prefixed_insn_p (rtx insn)
+ix86_notrack_prefixed_insn_p (rtx_insn *insn)
 {
   if (!insn || !((flag_cf_protection & CF_BRANCH)))
     return false;
index 9271bb85ac5d4c02539523afc41e0dffc5cf13e4..70b6b280ebae01daf13a9b49fcc34c52cf315a27 100644 (file)
@@ -50,7 +50,7 @@ rtx ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
                         machine_mode mode, int ignore);
 bool ix86_vectorize_vec_perm_const (machine_mode vmode, rtx target, rtx op0,
                                    rtx op1, const vec_perm_indices &sel);
-bool ix86_notrack_prefixed_insn_p (rtx insn);
+bool ix86_notrack_prefixed_insn_p (rtx_insn *);
 machine_mode ix86_split_reduction (machine_mode mode);
 void ix86_expand_divmod_libfunc (rtx libfunc, machine_mode mode, rtx op0,
                                 rtx op1, rtx *quot_p, rtx *rem_p);
index 279c6b752ad076d3ef3bbeafda75977db68fbc9d..c359c2d4af981c930246f335fb5d8dcc05725abd 100644 (file)
@@ -27505,7 +27505,7 @@ create_label:
       ca_loc->tail_call_p = SIBLING_CALL_P (prev);
 
       /* Look for a SYMBOL_REF in the "prev" instruction.  */
-      rtx x = get_call_rtx_from (PATTERN (prev));
+      rtx x = get_call_rtx_from (prev);
       if (x)
        {
          /* Try to get the call symbol, if any.  */
index 911b563a6dc5c749a4d7a392b728766cb707de9e..c054861f896efc2d6165af958f006e8408c50178 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -3419,7 +3419,7 @@ extern bool nonzero_address_p (const_rtx);
 extern int rtx_unstable_p (const_rtx);
 extern bool rtx_varies_p (const_rtx, bool);
 extern bool rtx_addr_varies_p (const_rtx, bool);
-extern rtx get_call_rtx_from (rtx);
+extern rtx get_call_rtx_from (const rtx_insn *);
 extern HOST_WIDE_INT get_integer_term (const_rtx);
 extern rtx get_related_value (const_rtx);
 extern bool offset_within_block_p (const_rtx, HOST_WIDE_INT);
index 3dcdc846cbefd8992f6acfdeb41e56af963dcfdf..dfc6fe2aec8841d8b002163b449ef3bc39072914 100644 (file)
@@ -811,10 +811,9 @@ rtx_addr_varies_p (const_rtx x, bool for_alias)
 /* Return the CALL in X if there is one.  */
 
 rtx
-get_call_rtx_from (rtx x)
+get_call_rtx_from (const rtx_insn *insn)
 {
-  if (INSN_P (x))
-    x = PATTERN (x);
+  rtx x = PATTERN (insn);
   if (GET_CODE (x) == PARALLEL)
     x = XVECEXP (x, 0, 0);
   if (GET_CODE (x) == SET)