diff options
author | crux <crux@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-19 17:22:01 +0000 |
---|---|---|
committer | crux <crux@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-19 17:22:01 +0000 |
commit | 91d4291d407bed3bc47e9dca4af564a601e1c0b2 (patch) | |
tree | 95a10224816d97c4b2ae85cbce9503250e47208c /gcc/gcse.c | |
parent | f5f5e275e866de0407a5ddeb892b5287e078ab13 (diff) | |
download | gcc-91d4291d407bed3bc47e9dca4af564a601e1c0b2.tar.gz |
Additional ENABLE_CHECKING code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35136 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c index 635975caf72..aa3f7a711ce 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -386,7 +386,11 @@ static int *uid_cuid; static int max_uid; /* Get the cuid of an insn. */ +#ifdef ENABLE_CHECKING +#define INSN_CUID(INSN) (INSN_UID (INSN) > max_uid ? (abort (), 0) : uid_cuid[INSN_UID (INSN)]) +#else #define INSN_CUID(INSN) (uid_cuid[INSN_UID (INSN)]) +#endif /* Number of cuids. */ static int max_cuid; @@ -896,9 +900,9 @@ alloc_gcse_mem (f) for (insn = f, i = 0; insn; insn = NEXT_INSN (insn)) { if (GET_RTX_CLASS (GET_CODE (insn)) == 'i') - INSN_CUID (insn) = i++; + uid_cuid[INSN_UID (insn)] = i++; else - INSN_CUID (insn) = i; + uid_cuid[INSN_UID (insn)] = i; } /* Create a table mapping cuids to insns. */ |