From: Richard Kenner Date: Tue, 8 Dec 1992 11:21:29 +0000 (-0500) Subject: (max_uid): New variable. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=164c8956a0bc23d8bfc8532baa32b9a8b1adc08e;p=gcc.git (max_uid): New variable. (cse_end_of_basic_block): Use it to ignore insns made by CSE. (cse_main): Set it. From-SVN: r2846 --- diff --git a/gcc/cse.c b/gcc/cse.c index 98b509dbfdb..2fc7ca6583c 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -328,6 +328,9 @@ static int cse_basic_block_end; static int *uid_cuid; +/* Highest UID in UID_CUID. */ +static int max_uid; + /* Get the cuid of an insn. */ #define INSN_CUID(INSN) (uid_cuid[INSN_UID (INSN)]) @@ -7382,10 +7385,13 @@ cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks) else if (GET_CODE (p) != NOTE) nsets += 1; - if (INSN_CUID (p) > high_cuid) + /* Ignore insns made by CSE; they cannot affect the boundaries of + the basic block. */ + + if (INSN_UID (p) <= max_uid && INSN_CUID (p) > high_cuid) high_cuid = INSN_CUID (p); - if (INSN_CUID (p) < low_cuid) - low_cuid = INSN_CUID(p); + if (INSN_UID (p) <= max_uid && INSN_CUID (p) < low_cuid) + low_cuid = INSN_CUID (p); /* See if this insn is in our branch path. If it is and we are to take it, do so. */ @@ -7569,9 +7575,9 @@ cse_main (f, nregs, after_loop, file) /* Find the largest uid. */ - i = get_max_uid (); - uid_cuid = (int *) alloca ((i + 1) * sizeof (int)); - bzero (uid_cuid, (i + 1) * sizeof (int)); + max_uid = get_max_uid (); + uid_cuid = (int *) alloca ((max_uid + 1) * sizeof (int)); + bzero (uid_cuid, (max_uid + 1) * sizeof (int)); /* Compute the mapping from uids to cuids. CUIDs are numbers assigned to insns, like uids,