aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/InlineSpiller.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-04 22:08:39 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-04 22:08:39 +0000
commit7536f72a97ad25c3652fdfe26d392fd78b6ea7b9 (patch)
tree744cae7952248c183792ce8b92333cc0b24e1ae8 /lib/CodeGen/InlineSpiller.cpp
parent40e0bad33193112eab0cc40a556ed347e6568cfe (diff)
downloadexternal_llvm-7536f72a97ad25c3652fdfe26d392fd78b6ea7b9.tar.gz
external_llvm-7536f72a97ad25c3652fdfe26d392fd78b6ea7b9.tar.bz2
external_llvm-7536f72a97ad25c3652fdfe26d392fd78b6ea7b9.zip
Checkpoint SplitKit progress.
We are now at a point where we can split around simple single-entry, single-exit loops, although still with some bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InlineSpiller.cpp')
-rw-r--r--lib/CodeGen/InlineSpiller.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp
index d8616fd8fb..d9dcbc0fdd 100644
--- a/lib/CodeGen/InlineSpiller.cpp
+++ b/lib/CodeGen/InlineSpiller.cpp
@@ -110,7 +110,8 @@ bool InlineSpiller::split() {
splitAnalysis_.analyze(li_);
if (const MachineLoop *loop = splitAnalysis_.getBestSplitLoop()) {
- SplitEditor(splitAnalysis_, lis_, vrm_).splitAroundLoop(loop);
+ SplitEditor(splitAnalysis_, lis_, vrm_, *newIntervals_)
+ .splitAroundLoop(loop);
return true;
}
return false;
@@ -372,7 +373,9 @@ void InlineSpiller::spill(LiveInterval *li,
if (li_->empty())
return;
- stackSlot_ = vrm_.assignVirt2StackSlot(li->reg);
+ stackSlot_ = vrm_.getStackSlot(li->reg);
+ if (stackSlot_ == VirtRegMap::NO_STACK_SLOT)
+ stackSlot_ = vrm_.assignVirt2StackSlot(li->reg);
// Iterate over instructions using register.
for (MachineRegisterInfo::reg_iterator RI = mri_.reg_begin(li->reg);