summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.h
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-26 19:20:16 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-26 19:20:16 +0000
commitb644802a73197f5dc1297137e58715b8b153984b (patch)
tree58b485026a928d9acd78535ac23a2ccb7b7078c2 /gcc/emit-rtl.h
parent3e75e92b20bd87818b4eb9916acfab125f6dbb47 (diff)
downloadgcc-b644802a73197f5dc1297137e58715b8b153984b.tar.gz
Strengthen fields in struct sequence_stack and struct emit_status
gcc/ 2014-08-26 David Malcolm <dmalcolm@redhat.com> * function.h (struct sequence_stack): Strengthen fields "first" and "last" from rtx to rtx_insn *. (struct emit_status): Likewise for fields "x_first_insn" and "x_last_insn". * emit-rtl.h (get_insns): Remove now-redundant checked cast. (set_first_insn): Add checked cast. (get_last_insn): Remove now-redundant checked cast. (set_last_insn): Add checked cast. * config/m32c/m32c.c (m32c_leaf_function_p): Strengthen locals "saved_first" and "saved_last" from rtx to rtx_insn *. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214537 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.h')
-rw-r--r--gcc/emit-rtl.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/emit-rtl.h b/gcc/emit-rtl.h
index e0deaffcdaa..e2e64a213d3 100644
--- a/gcc/emit-rtl.h
+++ b/gcc/emit-rtl.h
@@ -80,8 +80,7 @@ extern bool need_atomic_barrier_p (enum memmodel, bool);
static inline rtx_insn *
get_insns (void)
{
- rtx insn = crtl->emit.x_first_insn;
- return safe_as_a <rtx_insn *> (insn);
+ return crtl->emit.x_first_insn;
}
/* Specify a new insn as the first in the chain. */
@@ -90,7 +89,7 @@ static inline void
set_first_insn (rtx insn)
{
gcc_checking_assert (!insn || !PREV_INSN (insn));
- crtl->emit.x_first_insn = insn;
+ crtl->emit.x_first_insn = safe_as_a <rtx_insn *> (insn);
}
/* Return the last insn emitted in current sequence or current function. */
@@ -98,8 +97,7 @@ set_first_insn (rtx insn)
static inline rtx_insn *
get_last_insn (void)
{
- rtx insn = crtl->emit.x_last_insn;
- return safe_as_a <rtx_insn *> (insn);
+ return crtl->emit.x_last_insn;
}
/* Specify a new insn as the last in the chain. */
@@ -108,7 +106,7 @@ static inline void
set_last_insn (rtx insn)
{
gcc_checking_assert (!insn || !NEXT_INSN (insn));
- crtl->emit.x_last_insn = insn;
+ crtl->emit.x_last_insn = safe_as_a <rtx_insn *> (insn);
}
/* Return a number larger than any instruction's uid in this function. */