diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/gcse.c | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a77394e..6904f2b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2000-07-19 Bernd Schmidt <bernds@cygnus.co.uk> + + * gcse.c (INSN_CUID): If ENABLE_CHECKING, abort if the uid is + larger than the array of cuids. + (alloc_gcse_mem): Use uid_cuid rather than INSN_CUID when computing + cuids. + 2000-07-19 Bruce Korb <bkorb@gnu.org> * fixinc/fixincl.c: Convert to using a table of environment variables @@ -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. */ |