diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-19 22:33:38 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-19 22:33:38 +0000 |
commit | a4070a91bc2aeb7a73de0deaacd5b08abd27f88f (patch) | |
tree | 7d2c04e895a06940acfa67236fcbdb23966207b9 /gcc/rtl.h | |
parent | 87d2d17e592c60ecc18c7c6dcea0325ceebf39db (diff) | |
download | gcc-a4070a91bc2aeb7a73de0deaacd5b08abd27f88f.tar.gz |
1999-08-19 14:44 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.def (NOTE): Change format to "iuu0n".
(ADDR_DIFF_VEC): Change format to "eEee0".
(ADDRESSOF): Change format to "eit".
* rtl.h (rtvec): Make "elem" an array of rtx, not rtunion.
(RTVEC_ELT): Change to match.
(XVECEXP): Use XVEC and RTVEC_ELT.
(INSN_UID, INSN_CODE, CODE_LABEL_NUMBER, NOTE_LINE_NUMBER,
ADDRESSOF_REGNO, REGNO, SUBREG_WORD): Use XINT.
(PREV_INSN, NEXT_INSN, PATTERN, REG_NOTES,
CALL_INSN_FUNCTION_USAGE, SUBREG_REG, SET_SRC, SET_DEST,
TRAP_CONDITION, TRAP_CODE): Use XEXP.
(INTVAL): Use XWINT.
(ADDRESSOF_DECL): Use XTREE.
(SET_ADDRESSOF_DECL): Delete.
(NOTE_DECL_NAME, NOTE_DECL_CODE, NOTE_DECL_RTL,
NOTE_DECL_IDENTIFIER, NOTE_DECL_TYPE): Kill. These have been
ifdefed out since 2.6 at least.
(gen_rtvec_vv): Delete prototype.
* rtl.h (rtvec_alloc): rt->elem is now an array of rtx,
not rtunion.
(copy_most_rtx): Handle 't' format letter.
* emit-rtl.c (gen_rtvec_v): rt_val->elem is an array of rtx.
(gen_rtvec_vv): Delete function. All callers changed to use
gen_rtvec_v instead.
* print-rtl.c (print_rtx): Move special casing of NOTEs to
the '0' format letter.
* function.c (gen_mem_addressof): Don't use
SET_ADDRESSOF_DECL; provide `decl' to gen_rtx_ADDRESSOF
instead.
* integrate.c (copy_rtx_and_substitute): Likewise.
Copy 't' slots with XTREE.
(subst_constants): Treat 't' slots like '[swi]' slots.
* cse.c (canon_hash, exp_equiv_p): Treat 't' slots like '0' slots.
* jump.c (rtx_equal_for_thread_p): Likewise.
* rtlanal.c (rtx_equal_p): Likewise.
* stmt.c (expand_end_case): gen_rtx_ADDR_DIFF_VEC now takes
only four arguments.
* gengenrtl.c (type_from_format): Provide correct types for
'b' and 't' slots.
* tree.h [ENABLE_CHECKING] (TREE_CHECK, TREE_CLASS_CHECK):
If a recent gcc is in use (always in stage2 and beyond), use
statement expressions, so we don't make a function call unless
the check fails. Evaluate arguments exactly once.
(CHAIN_CHECK, DO_CHECK, DO_CHECK1, TREE_CHECK1,
TREE_CLASS_CHECK1, TYPE_CHECK1, DECL_CHECK1, CST_CHECK1):
Delete.
(CST_OR_CONSTRUCTOR_CHECK, EXPR_CHECK): Redefine such that
they evaluate their arguments exactly once, irrespective of
the compiler in use.
* tree.c [ENABLE_CHECKING]: Define whichever set of functions
is used by the currently-enabled check macros. This is:
(tree_check_failed, tree_class_check_failed): For gcc.
(tree_check, tree_class_check, cst_or_constructor_check,
expr_check): For other compilers.
* gencheck.c: Do not define any *_CHECK1 macros.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28769 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r-- | gcc/rtl.h | 78 |
1 files changed, 35 insertions, 43 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h index 8f0ff59904a..00abb021f82 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -200,7 +200,7 @@ typedef struct rtx_def typedef struct rtvec_def{ int num_elem; /* number of elements */ - rtunion elem[1]; + struct rtx_def *elem[1]; } *rtvec; #define NULL_RTVEC (rtvec) 0 @@ -208,8 +208,6 @@ typedef struct rtvec_def{ #define GET_NUM_ELEM(RTVEC) ((RTVEC)->num_elem) #define PUT_NUM_ELEM(RTVEC, NUM) ((RTVEC)->num_elem = (NUM)) -#define RTVEC_ELT(RTVEC, I) ((RTVEC)->elem[(I)].rtx) - /* 1 if X is a REG. */ #define REG_P(X) (GET_CODE (X) == REG) @@ -224,40 +222,44 @@ typedef struct rtvec_def{ /* General accessor macros for accessing the fields of an rtx. */ -#define XEXP(RTX, N) ((RTX)->fld[N].rtx) -#define XINT(RTX, N) ((RTX)->fld[N].rtint) -#define XWINT(RTX, N) ((RTX)->fld[N].rtwint) -#define XSTR(RTX, N) ((RTX)->fld[N].rtstr) -#define XVEC(RTX, N) ((RTX)->fld[N].rtvec) -#define XVECLEN(RTX, N) ((RTX)->fld[N].rtvec->num_elem) -#define XVECEXP(RTX,N,M)((RTX)->fld[N].rtvec->elem[M].rtx) -#define XBITMAP(RTX, N) ((RTX)->fld[N].rtbit) -#define XTREE(RTX, N) ((RTX)->fld[N].rttree) +#define XWINT(RTX, N) ((RTX)->fld[N].rtwint) /* w */ +#define XINT(RTX, N) ((RTX)->fld[N].rtint) /* i,n */ +#define XSTR(RTX, N) ((RTX)->fld[N].rtstr) /* s,S */ +#define XEXP(RTX, N) ((RTX)->fld[N].rtx) /* e,u */ +#define XVEC(RTX, N) ((RTX)->fld[N].rtvec) /* E,V */ +#define XVECLEN(RTX, N) ((RTX)->fld[N].rtvec->num_elem) /* E,V */ +#define XMODE(RTX, N) ((RTX)->fld[N].rttype) /* M */ +#define XBITMAP(RTX, N) ((RTX)->fld[N].rtbit) /* b */ +#define XTREE(RTX, N) ((RTX)->fld[N].rttree) /* t */ +#define XBBDEF(RTX, N) ((RTX)->fld[N].bb) /* B */ + +#define RTVEC_ELT(RTVEC, I) ((RTVEC)->elem[I]) +#define XVECEXP(RTX,N,M) RTVEC_ELT (XVEC (RTX, N), M) /* ACCESS MACROS for particular fields of insns. */ /* Holds a unique number for each insn. These are not necessarily sequentially increasing. */ -#define INSN_UID(INSN) ((INSN)->fld[0].rtint) +#define INSN_UID(INSN) XINT(INSN, 0) /* Chain insns together in sequence. */ -#define PREV_INSN(INSN) ((INSN)->fld[1].rtx) -#define NEXT_INSN(INSN) ((INSN)->fld[2].rtx) +#define PREV_INSN(INSN) XEXP(INSN, 1) +#define NEXT_INSN(INSN) XEXP(INSN, 2) /* The body of an insn. */ -#define PATTERN(INSN) ((INSN)->fld[3].rtx) +#define PATTERN(INSN) XEXP(INSN, 3) /* Code number of instruction, from when it was recognized. -1 means this instruction has not been recognized yet. */ -#define INSN_CODE(INSN) ((INSN)->fld[4].rtint) +#define INSN_CODE(INSN) XINT(INSN, 4) /* Set up in flow.c; empty before then. Holds a chain of INSN_LIST rtx's whose first operands point at previous insns with direct data-flow connections to this one. That means that those insns set variables whose next use is in this insn. They are always in the same basic block as this insn. */ -#define LOG_LINKS(INSN) ((INSN)->fld[5].rtx) +#define LOG_LINKS(INSN) XEXP(INSN, 5) /* 1 if insn has been deleted. */ #define INSN_DELETED_P(INSN) ((INSN)->volatil) @@ -353,7 +355,7 @@ typedef struct rtvec_def{ non standard flow edges required for a rethrow. */ -#define REG_NOTES(INSN) ((INSN)->fld[6].rtx) +#define REG_NOTES(INSN) XEXP(INSN, 6) #define ADDR_DIFF_VEC_FLAGS(RTX) ((RTX)->fld[4].rt_addr_diff_vec_flags) @@ -386,12 +388,12 @@ extern char *reg_note_name[]; CLOBBER expressions document the registers explicitly clobbered by this CALL_INSN. Pseudo registers can not be mentioned in this list. */ -#define CALL_INSN_FUNCTION_USAGE(INSN) ((INSN)->fld[7].rtx) +#define CALL_INSN_FUNCTION_USAGE(INSN) XEXP(INSN, 7) /* The label-number of a code-label. The assembler label is made from `L' and the label-number printed in decimal. Label numbers are unique in a compilation. */ -#define CODE_LABEL_NUMBER(INSN) ((INSN)->fld[3].rtint) +#define CODE_LABEL_NUMBER(INSN) XINT(INSN, 3) #define LINE_NUMBER NOTE @@ -414,7 +416,7 @@ extern char *reg_note_name[]; /* In a NOTE that is a line number, this is the line number. Other kinds of NOTEs are identified by negative numbers here. */ -#define NOTE_LINE_NUMBER(INSN) ((INSN)->fld[4].rtint) +#define NOTE_LINE_NUMBER(INSN) XINT(INSN, 4) /* Codes that appear in the NOTE_LINE_NUMBER field for kinds of notes that are not line numbers. @@ -475,14 +477,6 @@ extern char *reg_note_name[]; /* Record the struct for the following basic block. */ #define NOTE_INSN_BASIC_BLOCK -20 -#if 0 /* These are not used, and I don't know what they were for. --rms. */ -#define NOTE_DECL_NAME(INSN) ((INSN)->fld[3].rtstr) -#define NOTE_DECL_CODE(INSN) ((INSN)->fld[4].rtint) -#define NOTE_DECL_RTL(INSN) ((INSN)->fld[5].rtx) -#define NOTE_DECL_IDENTIFIER(INSN) ((INSN)->fld[6].rtint) -#define NOTE_DECL_TYPE(INSN) ((INSN)->fld[7].rtint) -#endif /* 0 */ - /* Names for NOTE insn's other than line numbers. */ extern char *note_insn_name[]; @@ -490,18 +484,17 @@ extern char *note_insn_name[]; /* The name of a label, in case it corresponds to an explicit label in the input source code. */ -#define LABEL_NAME(LABEL) ((LABEL)->fld[4].rtstr) +#define LABEL_NAME(LABEL) XSTR(LABEL, 4) /* In jump.c, each label contains a count of the number of LABEL_REFs that point at it, so unused labels can be deleted. */ #define LABEL_NUSES(LABEL) ((LABEL)->fld[5].rtint) /* The original regno this ADDRESSOF was built for. */ -#define ADDRESSOF_REGNO(RTX) ((RTX)->fld[1].rtint) +#define ADDRESSOF_REGNO(RTX) XINT(RTX, 1) /* The variable in the register we took the address of. */ -#define ADDRESSOF_DECL(X) ((tree) XEXP ((X), 2)) -#define SET_ADDRESSOF_DECL(X, T) (XEXP ((X), 2) = (rtx) (T)) +#define ADDRESSOF_DECL(RTX) XTREE(RTX, 2) /* In jump.c, each JUMP_INSN can point to a label that it can jump to, so that if the JUMP_INSN is deleted, the label's LABEL_NUSES can @@ -527,7 +520,7 @@ extern char *note_insn_name[]; /* For a REG rtx, REGNO extracts the register number. */ -#define REGNO(RTX) ((RTX)->fld[0].rtint) +#define REGNO(RTX) XINT(RTX, 0) /* For a REG rtx, REG_FUNCTION_VALUE_P is nonzero if the reg is the current function's return value. */ @@ -539,13 +532,13 @@ extern char *note_insn_name[]; /* For a CONST_INT rtx, INTVAL extracts the integer. */ -#define INTVAL(RTX) ((RTX)->fld[0].rtwint) +#define INTVAL(RTX) XWINT(RTX, 0) /* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of. SUBREG_WORD extracts the word-number. */ -#define SUBREG_REG(RTX) ((RTX)->fld[0].rtx) -#define SUBREG_WORD(RTX) ((RTX)->fld[1].rtint) +#define SUBREG_REG(RTX) XEXP(RTX, 0) +#define SUBREG_WORD(RTX) XINT(RTX, 1) /* 1 if the REG contained in SUBREG_REG is already known to be sign- or zero-extended from the mode of the SUBREG to the mode of @@ -640,12 +633,12 @@ extern char *note_insn_name[]; /* For a SET rtx, SET_DEST is the place that is set and SET_SRC is the value it is set to. */ -#define SET_DEST(RTX) ((RTX)->fld[0].rtx) -#define SET_SRC(RTX) ((RTX)->fld[1].rtx) +#define SET_DEST(RTX) XEXP(RTX, 0) +#define SET_SRC(RTX) XEXP(RTX, 1) /* For a TRAP_IF rtx, TRAP_CONDITION is an expression. */ -#define TRAP_CONDITION(RTX) ((RTX)->fld[0].rtx) -#define TRAP_CODE(RTX) (RTX)->fld[1].rtx +#define TRAP_CONDITION(RTX) XEXP(RTX, 0) +#define TRAP_CODE(RTX) XEXP(RTX, 1) /* 1 in a SYMBOL_REF if it addresses this function's constants pool. */ #define CONSTANT_POOL_ADDRESS_P(RTX) ((RTX)->unchanging) @@ -870,7 +863,6 @@ extern rtx copy_rtx_if_shared PROTO((rtx)); extern rtx copy_most_rtx PROTO((rtx, rtx)); extern rtx shallow_copy_rtx PROTO((rtx)); extern rtvec gen_rtvec_v PROTO((int, rtx *)); -extern rtvec gen_rtvec_vv PROTO((int, rtunion *)); extern rtx gen_reg_rtx PROTO((enum machine_mode)); extern rtx gen_label_rtx PROTO((void)); extern rtx gen_lowpart_common PROTO((enum machine_mode, rtx)); |