aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SplitKit.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-23 18:26:31 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-23 18:26:31 +0000
commited172998a6bcf52755e67f50e472eb50cbbbc071 (patch)
tree491e0e75c0b4ceb85997ac27aaeb022e5a326385 /llvm/lib/CodeGen/SplitKit.cpp
parent4a4e0eb782109e83734a52c923ceb595d3c2d3ee (diff)
downloadllvm-ed172998a6bcf52755e67f50e472eb50cbbbc071.zip
llvm-ed172998a6bcf52755e67f50e472eb50cbbbc071.tar.gz
llvm-ed172998a6bcf52755e67f50e472eb50cbbbc071.tar.bz2
It is safe to ignore LastSplitPoint when the variable is not live out.
No code will be inserted after the split point anyway. llvm-svn: 126319
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.cpp')
-rw-r--r--llvm/lib/CodeGen/SplitKit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp
index a97d890..fd5d50b 100644
--- a/llvm/lib/CodeGen/SplitKit.cpp
+++ b/llvm/lib/CodeGen/SplitKit.cpp
@@ -961,10 +961,10 @@ void SplitEditor::splitSingleBlocks(const SplitAnalysis::BlockPtrSet &Blocks) {
openIntv();
SlotIndex SegStart = enterIntvBefore(BI.FirstUse);
- if (BI.LastUse < BI.LastSplitPoint) {
+ if (!BI.LiveOut || BI.LastUse < BI.LastSplitPoint) {
useIntv(SegStart, leaveIntvAfter(BI.LastUse));
} else {
- // THe last use os after tha last valid split point.
+ // The last use is after the last valid split point.
SlotIndex SegStop = leaveIntvBefore(BI.LastSplitPoint);
useIntv(SegStart, SegStop);
overlapIntv(SegStop, BI.LastUse);