[PATCH] D116692: [SimplifyCFG] Tail-merging all blocks with `unreachable` terminator, final take
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 5 13:13:43 PST 2022
lebedev.ri created this revision.
lebedev.ri added a reviewer: rnk.
lebedev.ri added a project: LLVM.
Herald added a subscriber: hiraditya.
lebedev.ri requested review of this revision.
This implements the approach disscussed in D104870 <https://reviews.llvm.org/D104870>:
instead of simply alaways tail-merging all `unreachable` blocks,
do so, then immediately try to sink from predecessors,
and if that fails, backtrack to before this tail-merging,
and do so losslessly, so that we can claim
that we haven't actually done any changes.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116692
Files:
llvm/include/llvm/Transforms/Utils/Local.h
llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/CodeGen/Thumb2/setjmp_longjmp.ll
llvm/test/Transforms/PhaseOrdering/AArch64/peel-multiple-unreachable-exits-for-vectorization.ll
llvm/test/Transforms/SimplifyCFG/tail-merge-noreturn.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116692.397688.patch
Type: text/x-patch
Size: 37695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220105/e2daca06/attachment.bin>
More information about the llvm-commits
mailing list