From: Richard Stallman Date: Tue, 6 Oct 1992 21:30:51 +0000 (+0000) Subject: (get_first_block_beg): New function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5378192b096dff2f61a4ca9900aae7d877d21987;p=gcc.git (get_first_block_beg): New function. From-SVN: r2345 --- diff --git a/gcc/function.c b/gcc/function.c index 6cde316d273..f79ebd0f05e 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. */