summaryrefslogtreecommitdiff
path: root/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
commitc70f687dce99ea48ca779e6767006f6663781132 (patch)
tree442e3f2f2f57860809f0d0712cf242b0980e7e13 /lib/CodeGen/SplitKit.cpp
parent292f62e06f15eb45008c6965a5d9f7e9713431e9 (diff)
downloadllvm-c70f687dce99ea48ca779e6767006f6663781132.tar.gz
llvm-c70f687dce99ea48ca779e6767006f6663781132.tar.bz2
llvm-c70f687dce99ea48ca779e6767006f6663781132.tar.xz
It is safe to ignore LastSplitPoint when the variable is not live out.
No code will be inserted after the split point anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.cpp')
-rw-r--r--lib/CodeGen/SplitKit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp
index a97d890c25..fd5d50b7ec 100644
--- a/lib/CodeGen/SplitKit.cpp
+++ b/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);