From fc412d85c46a8656361fe1e9197ea85922e2cd61 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Fri, 13 Aug 2010 21:18:48 +0000 Subject: Implement splitting inside a single block. When a live range is contained a single block, we can split it around instruction clusters. The current approach is very primitive, splitting before and after the largest gap between uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111043 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SplitKit.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/SplitKit.h') diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h index 08f7c56b47..ad9b92f5ae 100644 --- a/lib/CodeGen/SplitKit.h +++ b/lib/CodeGen/SplitKit.h @@ -127,6 +127,12 @@ public: /// having curli split to a new live interval. Return true if Blocks can be /// passed to SplitEditor::splitSingleBlocks. bool getMultiUseBlocks(BlockPtrSet &Blocks); + + /// getBlockForInsideSplit - If curli is contained inside a single basic block, + /// and it wou pay to subdivide the interval inside that block, return it. + /// Otherwise return NULL. The returned block can be passed to + /// SplitEditor::splitInsideBlock. + const MachineBasicBlock *getBlockForInsideSplit(); }; /// SplitEditor - Edit machine code and LiveIntervals for live range @@ -242,7 +248,11 @@ public: /// basic block in Blocks. Return true if curli has been completely replaced, /// false if curli is still intact, and needs to be spilled or split further. bool splitSingleBlocks(const SplitAnalysis::BlockPtrSet &Blocks); -}; + /// splitInsideBlock - Split curli into multiple intervals inside MBB. Return + /// true if curli has been completely replaced, false if curli is still + /// intact, and needs to be spilled or split further. + bool splitInsideBlock(const MachineBasicBlock *); +}; } -- cgit v1.2.3-70-g09d2