diff options
author | Vedant Kumar <vsk@apple.com> | 2019-01-17 21:42:36 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2019-01-17 21:42:36 +0000 |
commit | 4541be0686e682ea6e30933d9893fd2701b0e27f (patch) | |
tree | 37bf006b765992c635ac7b7073752bf5dbeb6491 /llvm/lib | |
parent | b2d6c298af3dd8230d2be0cd8e40dcddbd9beecf (diff) | |
download | bcm5719-llvm-4541be0686e682ea6e30933d9893fd2701b0e27f.tar.gz bcm5719-llvm-4541be0686e682ea6e30933d9893fd2701b0e27f.zip |
[HotColdSplit] Relax requirement that the cold sink block be extractable
Relaxing this requirement creates opportunities to split code dominated
by an EH pad.
Tested on LNT+externals.
llvm-svn: 351483
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/IPO/HotColdSplitting.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp index d0f3fdf0c60..2cf8af35401 100644 --- a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp +++ b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp @@ -391,7 +391,8 @@ public: // Add SinkBB to the cold region. It's considered as an entry point before // any sink-successor blocks. - addBlockToRegion(&SinkBB, SinkScore); + if (mayExtractBlock(SinkBB)) + addBlockToRegion(&SinkBB, SinkScore); // Find all successors of SinkBB dominated by SinkBB using DFS. auto SuccIt = ++df_begin(&SinkBB); @@ -486,10 +487,6 @@ bool HotColdSplitting::outlineColdRegions(Function &F, ProfileSummaryInfo &PSI, // Find all cold regions. for (BasicBlock *BB : RPOT) { - // Skip blocks which can't be outlined. - if (!mayExtractBlock(*BB)) - continue; - // This block is already part of some outlining region. if (ColdBlocks.count(BB)) continue; |