On Fri, Jun 6, 2025 at 2:08 AM Vineet Gupta <vine...@rivosinc.com> wrote:
>
> gcc/ChangeLog:
>
>         * emit-rtl.cc (next_nonnote_nondebug_insn): Update comments.
>
> Signed-off-by: Vineet Gupta <vine...@rivosinc.com>
> ---
>  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 3f453cda67ed..65e0f1e6d8d6 100644
> --- a/gcc/emit-rtl.cc
> +++ b/gcc/emit-rtl.cc
> @@ -3689,7 +3689,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.  */

To me this shows while a nice try, the abstraction this function provides
is not too useful?

>  rtx_insn *
>  next_nonnote_nondebug_insn_bb (rtx_insn *insn)
> --
> 2.43.0
>

Reply via email to