diff options
author | Vedant Kumar <vsk@apple.com> | 2018-12-11 18:05:31 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2018-12-11 18:05:31 +0000 |
commit | b3a7cae045020674f40adfec2d1e3a7a7581031c (patch) | |
tree | a25d5ce3c4d9754efa4757c36caf4efad047ea81 /llvm/lib/Transforms | |
parent | 9569523ab27162b87113a3fc1b227413a4a8a98e (diff) | |
download | bcm5719-llvm-b3a7cae045020674f40adfec2d1e3a7a7581031c.tar.gz bcm5719-llvm-b3a7cae045020674f40adfec2d1e3a7a7581031c.zip |
[HotColdSplitting] Disable outlining landingpad instructions (PR39917)
It's currently not safe to outline landingpad instructions (see
llvm.org/PR39917). Like @llvm.eh.typeid.for, the order and content of
previous landingpad instructions in a function alters the lowering of
subsequent landingpads by renumbering type info ID's. Outlining a
landingpad therefore breaks exception handling & unwinding.
llvm-svn: 348870
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/IPO/HotColdSplitting.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp index 704ddbe6110..5d989a40f65 100644 --- a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp +++ b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp @@ -125,7 +125,7 @@ bool unlikelyExecuted(BasicBlock &BB) { /// Check whether it's safe to outline \p BB. static bool mayExtractBlock(const BasicBlock &BB) { - return !BB.hasAddressTaken(); + return !BB.hasAddressTaken() && !BB.isEHPad(); } /// Check whether \p Region is profitable to outline. |