diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-12 12:50:42 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-12 12:50:42 +0000 |
commit | e75781d3758b5acb0072d16510571797c8cd4849 (patch) | |
tree | e80d601c577378ca09b95d7b7afd1ead0b4caaa0 | |
parent | 8cb228ad88db91e7ab9e58ef4c29a6290a328d47 (diff) | |
download | gcc-e75781d3758b5acb0072d16510571797c8cd4849.tar.gz |
* rtl.h (MEM_P, NONJUMP_INSN_P, CALL_INSN_P): New predicates.
(INSN_P): Don't look at the rtx code class, just explicitly
check for one of the tree RTX_INSN codes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83023 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/rtl.h | 20 |
2 files changed, 20 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b86d6ebedad..820e20721f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-06-12 Steven Bosscher <stevenb@suse.de> + + * rtl.h (MEM_P, NONJUMP_INSN_P, CALL_INSN_P): New predicates. + (INSN_P): Don't look at the rtx code class, just explicitly + check for one of the tree RTX_INSN codes. + 2004-06-11 Zack Weinberg <zack@codesourcery.com> * c-typeck.c (default_function_array_conversion): Use diff --git a/gcc/rtl.h b/gcc/rtl.h index 06f298fefe7..edd750bb99d 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -311,15 +311,28 @@ struct rtvec_def GTY(()) { #define GET_NUM_ELEM(RTVEC) ((RTVEC)->num_elem) #define PUT_NUM_ELEM(RTVEC, NUM) ((RTVEC)->num_elem = (NUM)) -/* Predicate yielding nonzero iff X is an rtl for a register. */ +/* Predicate yielding nonzero iff X is an rtx for a register. */ #define REG_P(X) (GET_CODE (X) == REG) +/* Predicate yielding nonzero iff X is an rtx for a memory location. */ +#define MEM_P(X) (GET_CODE (X) == MEM) + /* Predicate yielding nonzero iff X is a label insn. */ #define LABEL_P(X) (GET_CODE (X) == CODE_LABEL) /* Predicate yielding nonzero iff X is a jump insn. */ #define JUMP_P(X) (GET_CODE (X) == JUMP_INSN) +/* Predicate yielding nonzero iff X is a call insn. */ +#define CALL_P(X) (GET_CODE (X) == CALL_INSN) + +/* Predicate yielding nonzero iff X is an insn that cannot jump. */ +#define NONJUMP_INSN_P(X) (GET_CODE (X) == INSN) + +/* Predicate yielding nonzero iff X is a real insn. */ +#define INSN_P(X) \ + (NONJUMP_INSN_P (X) || JUMP_P (X) || CALL_P (X)) + /* Predicate yielding nonzero iff X is a note insn. */ #define NOTE_P(X) (GET_CODE (X) == NOTE) @@ -331,11 +344,6 @@ struct rtvec_def GTY(()) { (JUMP_P (INSN) && (GET_CODE (PATTERN (INSN)) == ADDR_VEC || \ GET_CODE (PATTERN (INSN)) == ADDR_DIFF_VEC)) - -/* 1 if X is an insn. */ -#define INSN_P(X) \ - (GET_RTX_CLASS (GET_CODE(X)) == RTX_INSN) - /* 1 if X is a unary operator. */ #define UNARY_P(X) \ |