diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-15 07:47:49 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-15 07:47:49 +0000 |
commit | 5effb5c6a161c1bdbdd9585dfdc97a6105e3df66 (patch) | |
tree | 6441ce5f8a25ef18b4a8082f3cc834f7c8556f61 /lib/CodeGen/LiveVariables.cpp | |
parent | cd749a9c07f1de2fb8affde90537efa4bc3e7c54 (diff) | |
download | FreeBSD-src-5effb5c6a161c1bdbdd9585dfdc97a6105e3df66.zip FreeBSD-src-5effb5c6a161c1bdbdd9585dfdc97a6105e3df66.tar.gz |
Update llvm to r84175.
Diffstat (limited to 'lib/CodeGen/LiveVariables.cpp')
-rw-r--r-- | lib/CodeGen/LiveVariables.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index 139e029..96c655c 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/lib/CodeGen/LiveVariables.cpp @@ -323,10 +323,21 @@ bool LiveVariables::HandlePhysRegKill(unsigned Reg, MachineInstr *MI) { // The last partial def kills the register. LastPartDef->addOperand(MachineOperand::CreateReg(Reg, false/*IsDef*/, true/*IsImp*/, true/*IsKill*/)); - else + else { + MachineOperand *MO = + LastRefOrPartRef->findRegisterDefOperand(Reg, false, TRI); + bool NeedEC = MO->isEarlyClobber() && MO->getReg() != Reg; // If the last reference is the last def, then it's not used at all. // That is, unless we are currently processing the last reference itself. LastRefOrPartRef->addRegisterDead(Reg, TRI, true); + if (NeedEC) { + // If we are adding a subreg def and the superreg def is marked early + // clobber, add an early clobber marker to the subreg def. + MO = LastRefOrPartRef->findRegisterDefOperand(Reg); + if (MO) + MO->setIsEarlyClobber(); + } + } } else if (!PhysRegUse[Reg]) { // Partial uses. Mark register def dead and add implicit def of // sub-registers which are used. |