diff options
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. */ |