diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-12-24 22:54:37 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-12-24 22:54:37 +0000 |
commit | 65fc4db1238d8036691b7df7b7a78fc6a527a359 (patch) | |
tree | 02187c7018503772746f089b073241f1d04c5b8e | |
parent | 04144be4f759035f9c3e781861881429e16d888f (diff) | |
download | gcc-65fc4db1238d8036691b7df7b7a78fc6a527a359.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17231 138bc75d-0d04-0410-961f-82ee72b054a4
-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 575f9a569a1..1926629f190 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. diff --git a/gcc/cse.c b/gcc/cse.c index 247a3d8c40c..ca1b6489445 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -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)); |