summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SplitKit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-26 22:33:12 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-26 22:33:12 +0000
commit9f4b893b84d9c2b56aa2abc3c96ce1e5ccc465e5 (patch)
treec5bf2921106ae502b478c1373c07131d93d855c1 /lib/CodeGen/SplitKit.h
parentd5c7f7cb5e15a7382cd163cb191db898510226c8 (diff)
downloadllvm-9f4b893b84d9c2b56aa2abc3c96ce1e5ccc465e5.tar.gz
llvm-9f4b893b84d9c2b56aa2abc3c96ce1e5ccc465e5.tar.bz2
llvm-9f4b893b84d9c2b56aa2abc3c96ce1e5ccc465e5.tar.xz
Add a safe-guard against repeated splitting for some rare cases.
The number of blocks covered by a live range must be strictly decreasing when splitting, otherwise we can't allow repeated splitting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r--lib/CodeGen/SplitKit.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index cccaace6f9..2ae760a58d 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -150,6 +150,11 @@ public:
/// getThroughBlocks - Return the set of through blocks.
const BitVector &getThroughBlocks() const { return ThroughBlocks; }
+ /// countLiveBlocks - Return the number of blocks where li is live.
+ /// This is guaranteed to return the same number as getNumThroughBlocks() +
+ /// getUseBlocks().size() after calling analyze(li).
+ unsigned countLiveBlocks(const LiveInterval *li) const;
+
typedef SmallPtrSet<const MachineBasicBlock*, 16> BlockPtrSet;
/// getMultiUseBlocks - Add basic blocks to Blocks that may benefit from