From: Vineet Gupta Date: Sun, 8 Jun 2025 21:44:23 +0000 (-0700) Subject: emit-rtl: document next_nonnote_nondebug_insn_bb () can breach into next BB X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=893549330dee0281902138428929585a83899c51;p=thirdparty%2Fgcc.git emit-rtl: document next_nonnote_nondebug_insn_bb () can breach into next BB gcc/ChangeLog: * emit-rtl.cc (next_nonnote_nondebug_insn): Update comments. Signed-off-by: Vineet Gupta --- diff --git a/gcc/emit-rtl.cc b/gcc/emit-rtl.cc index 50e3bfcb777..e64032970d0 100644 --- a/gcc/emit-rtl.cc +++ b/gcc/emit-rtl.cc @@ -3690,7 +3690,11 @@ next_nonnote_nondebug_insn (rtx_insn *insn) /* Return the next insn after INSN that is not a NOTE nor DEBUG_INSN, but stop the search before we enter another basic block. This - routine does not look inside SEQUENCEs. */ + routine does not look inside SEQUENCEs. + NOTE: This can potentially bleed into next BB. If current insn is + last insn of BB, followed by a code_label before the start of + the next BB, code_label will be returned. But this is the + behavior rest of gcc assumes/relies on e.g. get_last_bb_insn. */ rtx_insn * next_nonnote_nondebug_insn_bb (rtx_insn *insn)