summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-21 08:53:25 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-21 08:53:25 +0000
commitbffa1357423dca55bafcc4761ba7bae8e421edde (patch)
tree0b6d1e063ada11b8ec1e68c6ab780ad80727d3a1 /gcc/emit-rtl.c
parent3352ba195741e487e8c8831c9688534eaa79e38b (diff)
downloadgcc-bffa1357423dca55bafcc4761ba7bae8e421edde.tar.gz
try_split returns an rtx_insn
2014-08-21 David Malcolm <dmalcolm@redhat.com> * rtl.h (try_split): Strengthen return type from rtx to rtx_insn *. * emit-rtl.c (try_split): Likewise, also for locals "before" and "after". For now, don't strengthen param "trial", which requires adding checked casts when returning it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214260 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 0ca59adc4ae..2d7d8540959 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -3551,11 +3551,11 @@ mark_label_nuses (rtx x)
replacement insn depending on the value of LAST. Otherwise, it
returns TRIAL. If the insn to be returned can be split, it will be. */
-rtx
+rtx_insn *
try_split (rtx pat, rtx trial, int last)
{
- rtx before = PREV_INSN (trial);
- rtx after = NEXT_INSN (trial);
+ rtx_insn *before = PREV_INSN (trial);
+ rtx_insn *after = NEXT_INSN (trial);
int has_barrier = 0;
rtx note, seq, tem;
int probability;
@@ -3565,7 +3565,7 @@ try_split (rtx pat, rtx trial, int last)
/* We're not good at redistributing frame information. */
if (RTX_FRAME_RELATED_P (trial))
- return trial;
+ return as_a <rtx_insn *> (trial);
if (any_condjump_p (trial)
&& (note = find_reg_note (trial, REG_BR_PROB, 0)))
@@ -3585,7 +3585,7 @@ try_split (rtx pat, rtx trial, int last)
}
if (!seq)
- return trial;
+ return as_a <rtx_insn *> (trial);
/* Avoid infinite loop if any insn of the result matches
the original pattern. */
@@ -3594,7 +3594,7 @@ try_split (rtx pat, rtx trial, int last)
{
if (INSN_P (insn_last)
&& rtx_equal_p (PATTERN (insn_last), pat))
- return trial;
+ return as_a <rtx_insn *> (trial);
if (!NEXT_INSN (insn_last))
break;
insn_last = NEXT_INSN (insn_last);