aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2004-05-28 06:27:31 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2004-05-28 06:27:31 +0000
commit6c2511d34e54923dd7c2195dff882ffcffaa9631 (patch)
tree01cb54144d0b7a3428f399cddba1a9e459851788 /gcc/emit-rtl.c
parent4fbf3498e4c9f43d7143d22f7a0b0f0ce9a067bf (diff)
downloadgcc-6c2511d34e54923dd7c2195dff882ffcffaa9631.zip
gcc-6c2511d34e54923dd7c2195dff882ffcffaa9631.tar.gz
gcc-6c2511d34e54923dd7c2195dff882ffcffaa9631.tar.bz2
rtl.h (skip_consecutive_labels): Declare.
* rtl.h (skip_consecutive_labels): Declare. * emit-rtl.c (skip_consecutive_labels): New function. * reorg.c (relax_delay_slots, dbr_schedule): Use it. * jump.c (follow_jumps): Say what null return values mean. From-SVN: r82357
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index bc23bb7..c3503ee 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -3109,6 +3109,21 @@ prev_label (rtx insn)
return insn;
}
+
+/* Return the last label to mark the same position as LABEL. Return null
+ if LABEL itself is null. */
+
+rtx
+skip_consecutive_labels (rtx label)
+{
+ rtx insn;
+
+ for (insn = label; insn != 0 && !INSN_P (insn); insn = NEXT_INSN (insn))
+ if (LABEL_P (insn))
+ label = insn;
+
+ return label;
+}
#ifdef HAVE_cc0
/* INSN uses CC0 and is being moved into a delay slot. Set up REG_CC_SETTER