From 9f4b893b84d9c2b56aa2abc3c96ce1e5ccc465e5 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Tue, 26 Apr 2011 22:33:12 +0000 Subject: 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 --- lib/CodeGen/SplitKit.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/CodeGen/SplitKit.h') 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 BlockPtrSet; /// getMultiUseBlocks - Add basic blocks to Blocks that may benefit from -- cgit v1.2.3