[gcc r16-1287] emit-rtl: document next_nonnote_nondebug_insn_bb () can breach into next BB
Vineet Gupta
vineetg@gcc.gnu.org
Sun Jun 8 22:02:02 GMT 2025
https://gcc.gnu.org/g:893549330dee0281902138428929585a83899c51
commit r16-1287-g893549330dee0281902138428929585a83899c51
Author: Vineet Gupta <vineetg@rivosinc.com>
Date: Sun Jun 8 14:44:23 2025 -0700
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 <vineetg@rivosinc.com>
Diff:
---
gcc/emit-rtl.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/emit-rtl.cc b/gcc/emit-rtl.cc
index 50e3bfcb777a..e64032970d09 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)
More information about the Gcc-cvs
mailing list