[PATCH] D134490: [NFC] check for UnreachableInst first as it is cheaper compared to getTerminatingDeoptimizeCall
Aditya Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 15:34:08 PDT 2022
hiraditya created this revision.
hiraditya added a reviewer: craig.topper.
Herald added a subscriber: StephenFan.
Herald added a project: All.
hiraditya requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
https://reviews.llvm.org/D134490
Files:
llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
Index: llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
===================================================================
--- llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -501,8 +501,8 @@
unsigned Depth = 0;
while (BB && Depth++ < MaxDeoptOrUnreachableSuccessorCheckDepth &&
VisitedBlocks.insert(BB).second) {
- if (BB->getTerminatingDeoptimizeCall() ||
- isa<UnreachableInst>(BB->getTerminator()))
+ if (isa<UnreachableInst>(BB->getTerminator() ||
+ BB->getTerminatingDeoptimizeCall()))
return true;
BB = BB->getUniqueSuccessor();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134490.462326.patch
Type: text/x-patch
Size: 638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220922/8e1f89db/attachment.bin>
More information about the llvm-commits
mailing list