[PATCH] D104202: [NFC] Calculate getTerminator only when necessary
Aditya Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 13 20:16:40 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdcbbc69cc582: Calculate getTerminator only when necessary (authored by hiraditya).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104202/new/
https://reviews.llvm.org/D104202
Files:
llvm/lib/Transforms/IPO/HotColdSplitting.cpp
Index: llvm/lib/Transforms/IPO/HotColdSplitting.cpp
===================================================================
--- llvm/lib/Transforms/IPO/HotColdSplitting.cpp
+++ llvm/lib/Transforms/IPO/HotColdSplitting.cpp
@@ -150,9 +150,10 @@
//
// Resumes that are not reachable from a cleanup landing pad are considered to
// be unreachable. It’s not safe to split them out either.
+ if (BB.hasAddressTaken() || BB.isEHPad())
+ return false;
auto Term = BB.getTerminator();
- return !BB.hasAddressTaken() && !BB.isEHPad() && !isa<InvokeInst>(Term) &&
- !isa<ResumeInst>(Term);
+ return !isa<InvokeInst>(Term) && !isa<ResumeInst>(Term);
}
/// Mark \p F cold. Based on this assumption, also optimize it for minimum size.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104202.351766.patch
Type: text/x-patch
Size: 749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210614/4438a7f0/attachment.bin>
More information about the llvm-commits
mailing list