summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/InlineSpiller.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-09 01:02:44 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-09 01:02:44 +0000
commit780db902f70f3085832348f16efd7f2a2afa5dd5 (patch)
treecbadc6eb59b360d9e7701cdcb2047944d842eb32 /llvm/lib/CodeGen/InlineSpiller.cpp
parent3f60bca9e90da3805d82a7651d4b26596c475959 (diff)
downloadbcm5719-llvm-780db902f70f3085832348f16efd7f2a2afa5dd5.tar.gz
bcm5719-llvm-780db902f70f3085832348f16efd7f2a2afa5dd5.zip
Oops, didn't mean to commit that.
Spills should be hoisted out of loops, but we don't want to hoist them to dominating blocks at the same loop depth. That could cause the spills to be executed more often. llvm-svn: 134782
Diffstat (limited to 'llvm/lib/CodeGen/InlineSpiller.cpp')
-rw-r--r--llvm/lib/CodeGen/InlineSpiller.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp
index 44e87ae9723..5547f735ba5 100644
--- a/llvm/lib/CodeGen/InlineSpiller.cpp
+++ b/llvm/lib/CodeGen/InlineSpiller.cpp
@@ -344,7 +344,7 @@ MachineInstr *InlineSpiller::traceSiblingValue(unsigned UseReg, VNInfo *UseVNI,
// This is a valid spill location dominating UseVNI.
// Prefer to spill at a smaller loop depth.
unsigned Depth = Loops.getLoopDepth(MBB);
- if (Depth <= SpillDepth) {
+ if (Depth < SpillDepth) {
DEBUG(dbgs() << " spill depth " << Depth << ": " << PrintReg(Reg)
<< ':' << VNI->id << '@' << VNI->def << '\n');
SVI.SpillReg = Reg;
OpenPOWER on IntegriCloud