diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-08-19 21:22:25 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-08-19 21:22:25 +0000 |
commit | a90c614ae3ac7493224bdbdbea8b6fb396e6105e (patch) | |
tree | f2f7bbfbf30255a19c41934caa81c9000b00c2a1 /gcc/cfgrtl.c | |
parent | 75b46023e7782781e63d0aca3c5b5f5ddd6cf816 (diff) | |
download | gcc-a90c614ae3ac7493224bdbdbea8b6fb396e6105e.zip gcc-a90c614ae3ac7493224bdbdbea8b6fb396e6105e.tar.gz gcc-a90c614ae3ac7493224bdbdbea8b6fb396e6105e.tar.bz2 |
Return types of unlink_insn_chain and duplicate_insn_chain
2014-08-19 David Malcolm <dmalcolm@redhat.com>
* rtl.h (unlink_insn_chain): Strengthen return type from rtx to
rtx_insn *.
(duplicate_insn_chain): Likewise.
* cfgrtl.c (unlink_insn_chain): Strengthen return type from rtx to
rtx_insn *, also for locals "prevfirst" and "nextlast". Add a
checked cast for now (until we can strengthen the params in the
same way).
(duplicate_insn_chain): Likewise.
From-SVN: r214197
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 902de13..9c115ba 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -3303,11 +3303,11 @@ fixup_abnormal_edges (void) /* Cut the insns from FIRST to LAST out of the insns stream. */ -rtx +rtx_insn * unlink_insn_chain (rtx first, rtx last) { - rtx prevfirst = PREV_INSN (first); - rtx nextlast = NEXT_INSN (last); + rtx_insn *prevfirst = PREV_INSN (first); + rtx_insn *nextlast = NEXT_INSN (last); SET_PREV_INSN (first) = NULL; SET_NEXT_INSN (last) = NULL; @@ -3319,7 +3319,7 @@ unlink_insn_chain (rtx first, rtx last) set_last_insn (prevfirst); if (!prevfirst) set_first_insn (nextlast); - return first; + return as_a <rtx_insn *> (first); } /* Skip over inter-block insns occurring after BB which are typically @@ -4080,7 +4080,7 @@ cfg_layout_can_duplicate_bb_p (const_basic_block bb) return true; } -rtx +rtx_insn * duplicate_insn_chain (rtx from, rtx to) { rtx insn, next, copy; @@ -4166,7 +4166,7 @@ duplicate_insn_chain (rtx from, rtx to) } insn = NEXT_INSN (last); delete_insn (last); - return insn; + return as_a <rtx_insn *> (insn); } /* Create a duplicate of the basic block BB. */ |