make FOR_EACH_IMM_USE_STMT safe for early exits

Richard Biener richard.guenther@gmail.com
Thu Jan 7 08:41:59 GMT 2021


On Wed, Jan 6, 2021 at 12:34 PM Alexandre Oliva <oliva@adacore.com> wrote:
>
> On Jan  4, 2021, Richard Biener <richard.guenther@gmail.com> wrote:
>
> > Hmm - while the change looks good, doesn't it end up
> > calling end_imm_use_stmt_tranverse twice for those
> > uses still calling BREAK_FROM_IMM_USE_STMT?
>
> It does.  I'd considered introducing a separate method to call
> end_imm_use_stmt_traverse if imm is not NULL, and then set it to NULL,
> but calling the function multiple times is not a problem: delink_imm_use
> just returns immediately the second time.
>
> > Thus, please remove uses of BREAK_FROM_IMM_USE_STMT
> > together with this patch.
>
> And RETURN_FROM_IMM_USE_STMT, I suppose?

Sure.

> I wasn't sure whether to remove them and their users.
>
> --
> Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
>    Free Software Activist         GNU Toolchain Engineer
>         Vim, Vi, Voltei pro Emacs -- GNUlius Caesar


More information about the Gcc-patches mailing list