diff options
author | Richard Stallman <rms@gnu.org> | 1992-10-06 21:30:51 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-10-06 21:30:51 +0000 |
commit | 5378192b096dff2f61a4ca9900aae7d877d21987 (patch) | |
tree | a5d673dc9f95bd64369c34114f08e18ef8c0f5de | |
parent | 6204c24f34166b48c213cc1e5d1ba853f48142e0 (diff) | |
download | gcc-5378192b096dff2f61a4ca9900aae7d877d21987.zip gcc-5378192b096dff2f61a4ca9900aae7d877d21987.tar.gz gcc-5378192b096dff2f61a4ca9900aae7d877d21987.tar.bz2 |
(get_first_block_beg): New function.
From-SVN: r2345
-rw-r--r-- | gcc/function.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c index 6cde316..f79ebd0 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2518,6 +2518,24 @@ get_first_nonparm_insn () return get_insns (); } +/* Return the first NOTE_INSN_BLOCK_BEG note in the function. + Crash if there is none. */ + +rtx +get_first_block_beg () +{ + register rtx searcher; + register rtx insn = get_first_nonparm_insn (); + + for (searcher = insn; searcher; searcher = NEXT_INSN (searcher)) + if (GET_CODE (searcher) == NOTE + && NOTE_LINE_NUMBER (searcher) == NOTE_INSN_BLOCK_BEG) + return searcher; + + abort (); /* Invalid call to this function. (See comments above.) */ + return NULL_RTX; +} + /* Return 1 if EXP returns an aggregate value, for which an address must be passed to the function or returned by the function. */ |