summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-01 17:18:03 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-01 17:18:03 +0000
commitce4469fac1ceab921d48ec409e3f4d0d9f81247e (patch)
tree219b94e14e50ec61d3797a74d100f7b56eb8d994 /gcc/emit-rtl.c
parent8e4c4d3bf16fd401c7b2715d13f5bbc3505da172 (diff)
downloadgcc-ce4469fac1ceab921d48ec409e3f4d0d9f81247e.tar.gz
* c-common.c (const_strip_array_types): Delete.
* c-common.h (const_strip_array_types): Likewise. * emit-rtl.c (const_next_insn, const_previous_insn, const_next_nonnote_insn, const_prev_nonnote_insn, const_next_real_insn, const_prev_real_insn, const_next_active_insn, const_prev_active_insn, const_next_label, const_prev_label): Delete. * gimple-low.c (block_may_fallthru): Use expr_last. * jump.c (reversed_comparison_code_parts): Use prev_nonnote_insn. * rtl.h (const_previous_insn, const_next_insn, const_prev_nonnote_insn, const_next_nonnote_insn, const_prev_real_insn, const_next_real_insn, const_prev_active_insn, const_next_active_insn, const_prev_label, const_next_label): Delete. * rtlanal.c (keep_with_call_p): Use next_nonnote_insn. * system.h (CONST_CAST): Update comment. * tree-cfg.c (tree_can_merge_blocks_p): Use last_stmt. (const_first_stmt, const_last_stmt): Delete. (tree_block_ends_with_condjump_p): Use last_stmt. * tree-flow.h (const_first_stmt, const_last_stmt): Delete. * tree-iterator.c (const_expr_first, const_expr_last, const_expr_only): Delete. * tree.c (const_lookup_attribute): Likewise. (attribute_list_contained): Use lookup_attribute. * tree.h (const_lookup_attribute, const_expr_first, const_expr_last, const_expr_only): Delete. cp: * tree.c (pod_type_p, zero_init_p): Use strip_array_types. * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128014 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c254
1 files changed, 72 insertions, 182 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 6a4604d40e9..cf6b2f3ccd7 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -2865,169 +2865,103 @@ get_max_uid (void)
/* Return the next insn. If it is a SEQUENCE, return the first insn
of the sequence. */
-#define NEXT_INSN_BODY do { \
- if (insn) \
- { \
- insn = NEXT_INSN (insn); \
- if (insn && NONJUMP_INSN_P (insn) \
- && GET_CODE (PATTERN (insn)) == SEQUENCE) \
- insn = XVECEXP (PATTERN (insn), 0, 0); \
- } \
- return insn; \
-} while (0)
-
rtx
next_insn (rtx insn)
{
- NEXT_INSN_BODY;
-}
+ if (insn)
+ {
+ insn = NEXT_INSN (insn);
+ if (insn && NONJUMP_INSN_P (insn)
+ && GET_CODE (PATTERN (insn)) == SEQUENCE)
+ insn = XVECEXP (PATTERN (insn), 0, 0);
+ }
-const_rtx
-const_next_insn (const_rtx insn)
-{
- NEXT_INSN_BODY;
+ return insn;
}
-#undef NEXT_INSN_BODY
-
/* Return the previous insn. If it is a SEQUENCE, return the last insn
of the sequence. */
-#define PREVIOUS_INSN_BODY do { \
- if (insn) \
- { \
- insn = PREV_INSN (insn); \
- if (insn && NONJUMP_INSN_P (insn) \
- && GET_CODE (PATTERN (insn)) == SEQUENCE) \
- insn = XVECEXP (PATTERN (insn), 0, XVECLEN (PATTERN (insn), 0) - 1); \
- } \
- return insn; \
-} while (0)
-
rtx
previous_insn (rtx insn)
{
- PREVIOUS_INSN_BODY;
-}
+ if (insn)
+ {
+ insn = PREV_INSN (insn);
+ if (insn && NONJUMP_INSN_P (insn)
+ && GET_CODE (PATTERN (insn)) == SEQUENCE)
+ insn = XVECEXP (PATTERN (insn), 0, XVECLEN (PATTERN (insn), 0) - 1);
+ }
-const_rtx
-const_previous_insn (const_rtx insn)
-{
- PREVIOUS_INSN_BODY;
+ return insn;
}
-#undef PREVIOUS_INSN_BODY
-
/* Return the next insn after INSN that is not a NOTE. This routine does not
look inside SEQUENCEs. */
-#define NEXT_NONNOTE_INSN_BODY do { \
- while (insn) \
- { \
- insn = NEXT_INSN (insn); \
- if (insn == 0 || !NOTE_P (insn)) \
- break; \
- } \
- return insn; \
-} while (0)
-
rtx
next_nonnote_insn (rtx insn)
{
- NEXT_NONNOTE_INSN_BODY;
-}
+ while (insn)
+ {
+ insn = NEXT_INSN (insn);
+ if (insn == 0 || !NOTE_P (insn))
+ break;
+ }
-const_rtx
-const_next_nonnote_insn (const_rtx insn)
-{
- NEXT_NONNOTE_INSN_BODY;
+ return insn;
}
-#undef NEXT_NONNOTE_INSN_BODY
-
/* Return the previous insn before INSN that is not a NOTE. This routine does
not look inside SEQUENCEs. */
-#define PREV_NONNOTE_INSN_BODY do { \
- while (insn) \
- { \
- insn = PREV_INSN (insn); \
- if (insn == 0 || !NOTE_P (insn)) \
- break; \
- } \
- return insn; \
-} while (0)
-
rtx
prev_nonnote_insn (rtx insn)
{
- PREV_NONNOTE_INSN_BODY;
-}
+ while (insn)
+ {
+ insn = PREV_INSN (insn);
+ if (insn == 0 || !NOTE_P (insn))
+ break;
+ }
-const_rtx
-const_prev_nonnote_insn (const_rtx insn)
-{
- PREV_NONNOTE_INSN_BODY;
+ return insn;
}
-#undef PREV_NONNOTE_INSN_BODY
-
/* Return the next INSN, CALL_INSN or JUMP_INSN after INSN;
or 0, if there is none. This routine does not look inside
SEQUENCEs. */
-#define NEXT_REAL_INSN_BODY do { \
- while (insn) \
- { \
- insn = NEXT_INSN (insn); \
- if (insn == 0 || INSN_P (insn)) \
- break; \
- } \
- return insn; \
-} while (0)
-
rtx
next_real_insn (rtx insn)
{
- NEXT_REAL_INSN_BODY;
-}
+ while (insn)
+ {
+ insn = NEXT_INSN (insn);
+ if (insn == 0 || INSN_P (insn))
+ break;
+ }
-const_rtx
-const_next_real_insn (const_rtx insn)
-{
- NEXT_REAL_INSN_BODY;
+ return insn;
}
-#undef NEXT_REAL_INSN_BODY
-
/* Return the last INSN, CALL_INSN or JUMP_INSN before INSN;
or 0, if there is none. This routine does not look inside
SEQUENCEs. */
-#define PREV_REAL_INSN_BODY do { \
- while (insn) \
- { \
- insn = PREV_INSN (insn); \
- if (insn == 0 || INSN_P (insn)) \
- break; \
- } \
- return insn; \
-} while (0)
-
rtx
prev_real_insn (rtx insn)
{
- PREV_REAL_INSN_BODY;
-}
+ while (insn)
+ {
+ insn = PREV_INSN (insn);
+ if (insn == 0 || INSN_P (insn))
+ break;
+ }
-const_rtx
-const_prev_real_insn (const_rtx insn)
-{
- PREV_REAL_INSN_BODY;
+ return insn;
}
-#undef PREV_REAL_INSN_BODY
-
/* Return the last CALL_INSN in the current list, or 0 if there is none.
This routine does not look inside SEQUENCEs. */
@@ -3058,110 +2992,66 @@ active_insn_p (const_rtx insn)
&& GET_CODE (PATTERN (insn)) != CLOBBER))));
}
-#define NEXT_ACTIVE_INSN_BODY do { \
- while (insn) \
- { \
- insn = NEXT_INSN (insn); \
- if (insn == 0 || active_insn_p (insn)) \
- break; \
- } \
- return insn;\
-} while (0)
-
rtx
next_active_insn (rtx insn)
{
- NEXT_ACTIVE_INSN_BODY;
-}
+ while (insn)
+ {
+ insn = NEXT_INSN (insn);
+ if (insn == 0 || active_insn_p (insn))
+ break;
+ }
-const_rtx
-const_next_active_insn (const_rtx insn)
-{
- NEXT_ACTIVE_INSN_BODY;
+ return insn;
}
-#undef NEXT_ACTIVE_INSN_BODY
-
/* Find the last insn before INSN that really does something. This routine
does not look inside SEQUENCEs. Until reload has completed, this is the
same as prev_real_insn. */
-#define PREV_ACTIVE_INSN_BODY do { \
- while (insn) \
- { \
- insn = PREV_INSN (insn);\
- if (insn == 0 || active_insn_p (insn)) \
- break; \
- } \
- return insn; \
-} while (0)
-
rtx
prev_active_insn (rtx insn)
{
- PREV_ACTIVE_INSN_BODY;
-}
+ while (insn)
+ {
+ insn = PREV_INSN (insn);
+ if (insn == 0 || active_insn_p (insn))
+ break;
+ }
-const_rtx
-const_prev_active_insn (const_rtx insn)
-{
- PREV_ACTIVE_INSN_BODY;
+ return insn;
}
-#undef PREV_ACTIVE_INSN_BODY
-
/* Return the next CODE_LABEL after the insn INSN, or 0 if there is none. */
-#define NEXT_LABEL_BODY do { \
- while (insn) \
- { \
- insn = NEXT_INSN (insn); \
- if (insn == 0 || LABEL_P (insn)) \
- break; \
- } \
- return insn; \
-} while (0)
-
rtx
next_label (rtx insn)
{
- NEXT_LABEL_BODY;
-}
+ while (insn)
+ {
+ insn = NEXT_INSN (insn);
+ if (insn == 0 || LABEL_P (insn))
+ break;
+ }
-const_rtx
-const_next_label (const_rtx insn)
-{
- NEXT_LABEL_BODY;
+ return insn;
}
-#undef NEXT_LABEL_BODY
-
/* Return the last CODE_LABEL before the insn INSN, or 0 if there is none. */
-#define PREV_LABEL_BODY do { \
- while (insn) \
- { \
- insn = PREV_INSN (insn); \
- if (insn == 0 || LABEL_P (insn)) \
- break; \
- } \
- return insn; \
-} while (0)
-
rtx
prev_label (rtx insn)
{
- PREV_LABEL_BODY;
-}
+ while (insn)
+ {
+ insn = PREV_INSN (insn);
+ if (insn == 0 || LABEL_P (insn))
+ break;
+ }
-const_rtx
-const_prev_label (const_rtx insn)
-{
- PREV_LABEL_BODY;
+ return insn;
}
-#undef PREV_LABEL_BODY
-
/* Return the last label to mark the same position as LABEL. Return null
if LABEL itself is null. */