diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-12-08 06:21:29 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-12-08 06:21:29 -0500 |
commit | 164c8956a0bc23d8bfc8532baa32b9a8b1adc08e (patch) | |
tree | 5ee040b6b9acef12374fffd9184303eb142bdd17 /gcc | |
parent | 7c791b139c5143cc357c0c48c14af5a962197503 (diff) | |
download | gcc-164c8956a0bc23d8bfc8532baa32b9a8b1adc08e.zip gcc-164c8956a0bc23d8bfc8532baa32b9a8b1adc08e.tar.gz gcc-164c8956a0bc23d8bfc8532baa32b9a8b1adc08e.tar.bz2 |
(max_uid): New variable.
(cse_end_of_basic_block): Use it to ignore insns made by CSE.
(cse_main): Set it.
From-SVN: r2846
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cse.c | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -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, |