summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-27 07:51:59 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-27 07:51:59 +0000
commitcb56012690ae1b8f203a61decdcb5d281db2431c (patch)
tree58bc341cb04d6000b923fc1d7edb78289d9f2938 /gcc/emit-rtl.c
parent84836637fcb8e7c3aea3b25f4cbf17a59cfca553 (diff)
downloadgcc-cb56012690ae1b8f203a61decdcb5d281db2431c.tar.gz
2009-07-27 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 150103 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@150104 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 5b42f4a8778..21d8434d457 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -2998,6 +2998,25 @@ next_nonnote_insn (rtx insn)
return insn;
}
+/* Return the next insn after INSN that is not a NOTE, but stop the
+ search before we enter another basic block. This routine does not
+ look inside SEQUENCEs. */
+
+rtx
+next_nonnote_insn_bb (rtx insn)
+{
+ while (insn)
+ {
+ insn = NEXT_INSN (insn);
+ if (insn == 0 || !NOTE_P (insn))
+ break;
+ if (NOTE_INSN_BASIC_BLOCK_P (insn))
+ return NULL_RTX;
+ }
+
+ return insn;
+}
+
/* Return the previous insn before INSN that is not a NOTE. This routine does
not look inside SEQUENCEs. */