diff options
author | Jim Wilson <wilson@cygnus.com> | 1997-12-24 22:54:37 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-12-24 15:54:37 -0700 |
commit | 556c714b3d1e4350f9b5e747f879cef4775adb93 (patch) | |
tree | 02187c7018503772746f089b073241f1d04c5b8e /gcc | |
parent | d9a4ee007b9041817143d1fa761d5f2528818dd0 (diff) | |
download | gcc-556c714b3d1e4350f9b5e747f879cef4775adb93.zip gcc-556c714b3d1e4350f9b5e747f879cef4775adb93.tar.gz gcc-556c714b3d1e4350f9b5e747f879cef4775adb93.tar.bz2 |
cse.c (max_insn_uid): New variable.
* cse.c (max_insn_uid): New variable.
(invalidate): Remove CYGNUS LOCAL patch.
(cse_around_loop): Use max_insn_uid.
(cse_main): Set max_insn_uid.
From-SVN: r17231
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cse.c | 15 |
2 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 575f9a5..1926629 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -4,6 +4,11 @@ Wed Dec 24 23:33:17 1997 Jeffrey A Law (law@cygnus.com) Wed Dec 24 23:12:14 1997 Jim Wilson <wilson@cygnus.com> + * cse.c (max_insn_uid): New variable. + (invalidate): Remove CYGNUS LOCAL patch. + (cse_around_loop): Use max_insn_uid. + (cse_main): Set max_insn_uid. + * abi64.h (LONG_MAX_SPEC): Check MIPS_ABI_DEFAULT and TARGET_DEFAULT, and define __LONG_MAX__ appropriately. Add support for -mabi=X, -mlong64, and -mgp{32,64} options. @@ -193,6 +193,11 @@ Related expressions: static int max_reg; +/* One plus largest instruction UID used in this function at time of + cse_main call. */ + +static int max_insn_uid; + /* Length of vectors indexed by quantity number. We know in advance we will not need a quantity number this big. */ @@ -7798,10 +7803,16 @@ cse_around_loop (loop_start) The only thing we do with SET_DEST is invalidate entries, so we can safely process each SET in order. It is slightly less efficient - to do so, but we only want to handle the most common cases. */ + to do so, but we only want to handle the most common cases. + + The gen_move_insn call in cse_set_around_loop may create new pseudos. + These pseudos won't have valid entries in any of the tables indexed + by register number, such as reg_qty. We avoid out-of-range array + accesses by not processing any instructions created after cse started. */ for (insn = NEXT_INSN (loop_start); GET_CODE (insn) != CALL_INSN && GET_CODE (insn) != CODE_LABEL + && INSN_UID (insn) < max_insn_uid && ! (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END); insn = NEXT_INSN (insn)) @@ -8248,6 +8259,8 @@ cse_main (f, nregs, after_loop, file) max_reg = nregs; + max_insn_uid = get_max_uid (); + all_minus_one = (int *) alloca (nregs * sizeof (int)); consec_ints = (int *) alloca (nregs * sizeof (int)); |