2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-03-21 10:20:29 +08:00

Additional ENABLE_CHECKING code.

From-SVN: r35136
This commit is contained in:
Bernd Schmidt 2000-07-19 17:22:01 +00:00 committed by Bernd Schmidt
parent 5cc80caa27
commit b86db3ebc2
2 changed files with 13 additions and 2 deletions

@ -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. */