aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-12-12 23:03:54 +0000
committerJeff Law <law@gcc.gnu.org>1998-12-12 16:03:54 -0700
commit941c63ac30be855420bc79b702355594712cff90 (patch)
tree8cb9f662656a67c7745f1ade226aa8d33838a4e0 /gcc/rtlanal.c
parent8d4c79be50f79381b6306600b304ea3182a8d63c (diff)
downloadgcc-941c63ac30be855420bc79b702355594712cff90.zip
gcc-941c63ac30be855420bc79b702355594712cff90.tar.gz
gcc-941c63ac30be855420bc79b702355594712cff90.tar.bz2
rtlanal.c (multiple_sets): New function.
* rtlanal.c (multiple_sets): New function. * rtl.h (multiple_sets): Declare it. * local-alloc.c (wipe_dead_reg): Use it. * global.c (global_conflicts): Likewise. Should fix the m68k bootstrap problems. From-SVN: r24283
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 0abe244..f298ab2 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -690,6 +690,38 @@ single_set (insn)
return 0;
}
+
+/* Given an INSN, return nonzero if it has more than one SET, else return
+ zero. */
+
+rtx
+multiple_sets (insn)
+ rtx insn;
+{
+ rtx found;
+ int i;
+
+ /* INSN must be an insn. */
+ if (GET_RTX_CLASS (GET_CODE (insn)) != 'i')
+ return 0;
+
+ /* Only a PARALLEL can have multiple SETs. */
+ if (GET_CODE (PATTERN (insn)) == PARALLEL)
+ {
+ for (i = 0, found = 0; i < XVECLEN (PATTERN (insn), 0); i++)
+ if (GET_CODE (XVECEXP (PATTERN (insn), 0, i)) == SET)
+ {
+ /* If we have already found a SET, then return now. */
+ if (found)
+ return 1;
+ else
+ found = 1;
+ }
+ }
+
+ /* Either zero or one SET. */
+ return 0;
+}
/* Return the last thing that X was assigned from before *PINSN. Verify that
the object is not modified up to VALID_TO. If it was, if we hit