aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SplitKit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-13 21:18:48 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-13 21:18:48 +0000
commitfc412d85c46a8656361fe1e9197ea85922e2cd61 (patch)
treeaf11c71252b8c0e10c3d5516f021688fbc26d23b /lib/CodeGen/SplitKit.h
parente62d58884ad83d0351b9511d58eed4b21ff6e0b1 (diff)
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
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r--lib/CodeGen/SplitKit.h12
1 files changed, 11 insertions, 1 deletions
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 *);
+};
}