summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-04 19:33:11 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-04 19:33:11 +0000
commitcb6404711b7fe6f583480adce8d7e9d5e4b99ae6 (patch)
tree29716725af4a8e0da2d14822dd1a6e572b63278a /include
parent9b3d24bf3d4663bfaf98eb97a94081e07a3f62da (diff)
downloadllvm-cb6404711b7fe6f583480adce8d7e9d5e4b99ae6.tar.gz
llvm-cb6404711b7fe6f583480adce8d7e9d5e4b99ae6.tar.bz2
llvm-cb6404711b7fe6f583480adce8d7e9d5e4b99ae6.tar.xz
Add LiveIntervals::getLastSplitPoint().
A live range cannot be split everywhere in a basic block. A split must go before the first terminator, and if the variable is live into a landing pad, the split must happen before the call that can throw. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/LiveIntervalAnalysis.h6
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h
index e4fc062dc7..70f570212a 100644
--- a/include/llvm/CodeGen/LiveIntervalAnalysis.h
+++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h
@@ -308,6 +308,12 @@ namespace llvm {
/// within a single basic block.
bool intervalIsInOneMBB(const LiveInterval &li) const;
+ /// getLastSplitPoint - Return the last possible insertion point in mbb for
+ /// spilling and splitting code. This is the first terminator, or the call
+ /// instruction if li is live into a landing pad successor.
+ MachineBasicBlock::iterator getLastSplitPoint(const LiveInterval &li,
+ MachineBasicBlock *mbb);
+
private:
/// computeIntervals - Compute live intervals.
void computeIntervals();
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index 16cb5c9ce8..1785451c7e 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -224,6 +224,10 @@ public:
/// this basic block is entered via an exception handler.
void setIsLandingPad() { IsLandingPad = true; }
+ /// getLandingPadSuccessor - If this block has a successor that is a landing
+ /// pad, return it. Otherwise return NULL.
+ const MachineBasicBlock *getLandingPadSuccessor() const;
+
// Code Layout methods.
/// moveBefore/moveAfter - move 'this' block before or after the specified