[llvm-branch-commits] [llvm-branch] r116942 - /llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Oct 20 11:54:15 PDT 2010
Author: stoklund
Date: Wed Oct 20 13:54:15 2010
New Revision: 116942
URL: http://llvm.org/viewvc/llvm-project?rev=116942&view=rev
Log:
Merge r116940, fixing <rdar://problem/8441758>
Modified:
llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp
Modified: llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=116942&r1=116941&r2=116942&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp Wed Oct 20 13:54:15 2010
@@ -2819,8 +2819,19 @@
const LiveRange *LR = LI.getLiveRangeContaining(UseIdx);
if (!LR ||
(!LR->valno->isKill(UseIdx.getDefIndex()) &&
- LR->valno->def != UseIdx.getDefIndex()))
+ LR->valno->def != UseIdx.getDefIndex())) {
MO.setIsKill(false);
+ continue;
+ }
+ // When leaving a kill flag on a physreg, check if any subregs should
+ // remain alive.
+ if (!TargetRegisterInfo::isPhysicalRegister(reg))
+ continue;
+ for (const unsigned *SR = tri_->getSubRegisters(reg);
+ unsigned S = *SR; ++SR)
+ if (li_->hasInterval(S) &&
+ li_->getInterval(S).liveAt(UseIdx.getDefIndex()))
+ MI->addRegisterDefined(S, tri_);
}
}
}
More information about the llvm-branch-commits
mailing list