aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-10-18 07:44:13 +0000
committerJeff Law <law@gcc.gnu.org>1999-10-18 01:44:13 -0600
commitca4cd906cb7f2e95a6c8c514d2a3902700bb774e (patch)
treee5e3da686d35692bf81574149a7ae8cbffbdbe24 /gcc
parentd336e5046cf250cdf8a7a39cef1540287a07c8b9 (diff)
downloadgcc-ca4cd906cb7f2e95a6c8c514d2a3902700bb774e.zip
gcc-ca4cd906cb7f2e95a6c8c514d2a3902700bb774e.tar.gz
gcc-ca4cd906cb7f2e95a6c8c514d2a3902700bb774e.tar.bz2
combine.c (get_last_value): If the last set of a register is after subst_low_cuid...
* combine.c (get_last_value): If the last set of a register is after subst_low_cuid, then we can not use it to determine the register's last value. From-SVN: r30062
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/combine.c56
2 files changed, 8 insertions, 54 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 86a2743..4bbe8e9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Mon Oct 18 01:41:35 1999 Jeffrey A Law (law@cygnus.com)
+
+ * combine.c (get_last_value): If the last set of a register
+ is after subst_low_cuid, then we can not use it to determine
+ the register's last value.
+
Sun Oct 17 11:02:52 1999 Mark Mitchell <mark@codesourcery.com>
* Makefile.in: Back out previous change.
diff --git a/gcc/combine.c b/gcc/combine.c
index 7273e8f..4ed1124 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10952,61 +10952,9 @@ get_last_value (x)
return 0;
/* If the value was set in a later insn than the ones we are processing,
- we can't use it even if the register was only set once, but make a quick
- check to see if the previous insn set it to something. This is commonly
- the case when the same pseudo is used by repeated insns.
-
- This does not work if there exists an instruction which is temporarily
- not on the insn chain. */
-
+ we can't use it even if the register was only set once. */
if (INSN_CUID (reg_last_set[regno]) >= subst_low_cuid)
- {
- rtx insn, set;
-
- /* We can't do anything if the value is set in between the insns we are
- processing. */
- if (INSN_CUID (reg_last_set[regno]) <= INSN_CUID (subst_insn))
- return 0;
-
- /* We can not do anything useful in this case, because there is
- an instruction which is not on the insn chain. */
- if (subst_prev_insn)
- return 0;
-
- /* Skip over USE insns. They are not useful here, and they may have
- been made by combine, in which case they do not have a INSN_CUID
- value. We can't use prev_real_insn, because that would incorrectly
- take us backwards across labels. Skip over BARRIERs also, since
- they could have been made by combine. If we see one, we must be
- optimizing dead code, so it doesn't matter what we do. */
- for (insn = prev_nonnote_insn (subst_insn);
- insn && ((GET_CODE (insn) == INSN
- && GET_CODE (PATTERN (insn)) == USE)
- || GET_CODE (insn) == BARRIER
- || INSN_CUID (insn) >= subst_low_cuid);
- insn = prev_nonnote_insn (insn))
- ;
-
- if (insn
- && (set = single_set (insn)) != 0
- && rtx_equal_p (SET_DEST (set), x))
- {
- value = SET_SRC (set);
-
- /* Make sure that VALUE doesn't reference X. Replace any
- explicit references with a CLOBBER. If there are any remaining
- references (rare), don't use the value. */
-
- if (reg_mentioned_p (x, value))
- value = replace_rtx (copy_rtx (value), x,
- gen_rtx_CLOBBER (GET_MODE (x), const0_rtx));
-
- if (reg_overlap_mentioned_p (x, value))
- return 0;
- }
- else
- return 0;
- }
+ return 0;
/* If the value has all its registers valid, return it. */
if (get_last_value_validate (&value, reg_last_set[regno],