[PATCH] D104870: [SimplifyCFG] Tail-merging all blocks with `unreachable` terminator
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 24 11:42:41 PDT 2021
lebedev.ri created this revision.
lebedev.ri added reviewers: rnk, dmgreen, fhahn, nikic, hans.
lebedev.ri added a project: LLVM.
Herald added a subscriber: hiraditya.
lebedev.ri requested review of this revision.
Unlike `ret`/`resume`, for `unreachable` currently no such tail-merging is being performed.
There has been at least one previous attempt at this - D29428 <https://reviews.llvm.org/D29428>.
As @rnk notes in D104445 <https://reviews.llvm.org/D104445>, this may be somewhat problematic for certain backends
that "form regions later in the backend". But then, surely they already have to
deal with such IR, because even if transforms don't create it,
can it not have been created by the user?
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D104870
Files:
llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
llvm/test/CodeGen/Thumb2/setjmp_longjmp.ll
llvm/test/Transforms/SimplifyCFG/tail-merge-noreturn.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104870.354321.patch
Type: text/x-patch
Size: 15802 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210624/9ac5a068/attachment.bin>
More information about the llvm-commits
mailing list