[PATCH] D104870: [SimplifyCFG] Tail-merging all blocks with `unreachable` terminator
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 25 03:12:25 PDT 2021
aheejin added a comment.
In D104870#2839468 <https://reviews.llvm.org/D104870#2839468>, @rnk wrote:
> This change deserves some discussion. To address the issues with regions, we shouldn't rely on my hazily remembered understandings, we should consult the experts.
>
> - For wasm, let's try @aheejin and @dschuff
> - For GPUs, let's try @nhaehnle and @arsenm
> - WinEH isn't an issue, we future proofed it against this transform
> - For debug info, let's try @aprantl and @jmorse
>
> To those I just added to the review, the question is, will tail merging calls to noreturn functions in IR (BranchFolding already does it in codegen) be an issue for the subsystems you contribute to.
Thanks for letting me know! I guess WinEH is fine because WinEH makes sure to clone <https://github.com/llvm/llvm-project/blob/0646e3625499b08a3ac9efd48396f3b463a19139/llvm/lib/CodeGen/WinEHPrepare.cpp#L744-L947> blocks that belong to multiple funclets, right? I think Wasm should be OK as well as WinEH works, because we use <https://github.com/llvm/llvm-project/blob/79c98279b6cdab6f208043865ab7b4ac4612cec5/llvm/lib/CodeGen/TargetPassConfig.cpp#L925> WinEHPrepare, so we benefit from this transformation as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104870/new/
https://reviews.llvm.org/D104870
More information about the llvm-commits
mailing list