aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/emit-rtl.c12
-rw-r--r--gcc/rtl.h4
3 files changed, 18 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c089c77..ee05582 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,15 @@
2014-08-19 David Malcolm <dmalcolm@redhat.com>
+ * rtl.h (next_cc0_user): Strengthen return type from rtx to
+ rtx_insn *.
+ (prev_cc0_setter): Likewise.
+
+ * emit-rtl.c (next_cc0_user): Strengthen return type from rtx to
+ rtx_insn *, adding checked casts for now as necessary.
+ (prev_cc0_setter): Likewise.
+
+2014-08-19 David Malcolm <dmalcolm@redhat.com>
+
* expr.h (emit_move_insn): Strengthen return type from rtx to
rtx_insn *.
(emit_move_insn_1): Likewise.
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index ccfa22a..0ca59ad 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -3450,20 +3450,20 @@ prev_active_insn (rtx insn)
Return 0 if we can't find the insn. */
-rtx
+rtx_insn *
next_cc0_user (rtx insn)
{
rtx note = find_reg_note (insn, REG_CC_USER, NULL_RTX);
if (note)
- return XEXP (note, 0);
+ return safe_as_a <rtx_insn *> (XEXP (note, 0));
insn = next_nonnote_insn (insn);
if (insn && NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
insn = XVECEXP (PATTERN (insn), 0, 0);
if (insn && INSN_P (insn) && reg_mentioned_p (cc0_rtx, PATTERN (insn)))
- return insn;
+ return safe_as_a <rtx_insn *> (insn);
return 0;
}
@@ -3471,18 +3471,18 @@ next_cc0_user (rtx insn)
/* Find the insn that set CC0 for INSN. Unless INSN has a REG_CC_SETTER
note, it is the previous insn. */
-rtx
+rtx_insn *
prev_cc0_setter (rtx insn)
{
rtx note = find_reg_note (insn, REG_CC_SETTER, NULL_RTX);
if (note)
- return XEXP (note, 0);
+ return safe_as_a <rtx_insn *> (XEXP (note, 0));
insn = prev_nonnote_insn (insn);
gcc_assert (sets_cc0_p (PATTERN (insn)));
- return insn;
+ return safe_as_a <rtx_insn *> (insn);
}
#endif
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 64b9732..a47efd8 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -2440,8 +2440,8 @@ extern rtx_insn *next_real_insn (rtx);
extern rtx_insn *prev_active_insn (rtx);
extern rtx_insn *next_active_insn (rtx);
extern int active_insn_p (const_rtx);
-extern rtx next_cc0_user (rtx);
-extern rtx prev_cc0_setter (rtx);
+extern rtx_insn *next_cc0_user (rtx);
+extern rtx_insn *prev_cc0_setter (rtx);
/* In emit-rtl.c */
extern int insn_line (const_rtx);