diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-09-16 12:38:04 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-09-16 12:38:04 +0000 |
commit | 26db0da854249bfa8badf848a608cbf215ec553a (patch) | |
tree | 95ed3ea29cdf9b77bb9efa5f60c431baf2aa6535 /gcc/cse.c | |
parent | 969c62c62f432a68066b3500932435b9e54de935 (diff) | |
download | gcc-26db0da854249bfa8badf848a608cbf215ec553a.tar.gz |
(recorded_label_ref): New variable.
(insert): Set instead of cse_jumps_altered.
(cse_main): Initialize it and return 1 if nonzero at end.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index 863a338e7fe..6aa0fad1458 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -343,6 +343,11 @@ static int max_uid; static int cse_jumps_altered; +/* Nonzero if we put a LABEL_REF into the hash table. Since we may have put + it into an INSN without a REG_LABEL, we have to rerun jump after CSE + to put in the note. */ +static int recorded_label_ref; + /* canon_hash stores 1 in do_not_record if it notices a reference to CC0, PC, or some other volatile subexpression. */ @@ -1287,14 +1292,11 @@ insert (x, classp, hash, mode) SET_HARD_REG_BIT (hard_regs_in_table, i); } - /* If X is a label, show we are altering jumps. We don't KNOW - we are, but we might be putting it into a insn which would - then need a new REG_LABEL note. Be conservative and say - we alter jumps here; we usually will in this case anyway. */ + /* If X is a label, show we recorded it. */ if (GET_CODE (x) == LABEL_REF || (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS && GET_CODE (XEXP (XEXP (x, 0), 0)) == LABEL_REF)) - cse_jumps_altered = 1; + recorded_label_ref = 1; /* Put an element for X into the right hash bucket. */ @@ -8215,6 +8217,7 @@ cse_main (f, nregs, after_loop, file) register int i; cse_jumps_altered = 0; + recorded_label_ref = 0; constant_pool_entries_cost = 0; val.path_size = 0; @@ -8370,7 +8373,7 @@ cse_main (f, nregs, after_loop, file) if (max_elements_made < n_elements_made) max_elements_made = n_elements_made; - return cse_jumps_altered; + return cse_jumps_altered || recorded_label_ref; } /* Process a single basic block. FROM and TO and the limits of the basic |