[PATCH] D119571: [funcattrs] check reachability to improve noreturn
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 14:02:05 PST 2022
rnk accepted this revision.
rnk added a comment.
In D119571#3320553 <https://reviews.llvm.org/D119571#3320553>, @nickdesaulniers wrote:
> In D119571#3320199 <https://reviews.llvm.org/D119571#3320199>, @rnk wrote:
>
>> Do we know which pass introduces unreachable code without cleaning it up? That seems like a missed optimization, possibly a phase ordering issue, or we could tack on a `removeUnreachableBlocks` to whichever pass is modifying the CFG in the first place.
>
> In this particular case, there is no pass introducing an unreachable; the unreachable is explicit in the source.
It sounds like the phase ordering issue is that functionattrs runs before simplifycfg, and the frontend emits unreachable basic blocks. Of course, simplifycfg also benefits from functionattrs, so it's not trivial to fix. I think this is a known issue, no need to do anything about it now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119571/new/
https://reviews.llvm.org/D119571
More information about the llvm-commits
mailing list