diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2010-05-07 01:45:38 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2010-05-07 01:45:38 +0000 |
| commit | 45f530db393d9b3735f75c59f058ed938120bbee (patch) | |
| tree | 3db0ee13fb5c5a1c7ea7e5b6d1ff865fcfc4389f /llvm/lib/CodeGen/RegAllocLocal.cpp | |
| parent | 90c600d6d2cc5f06eba8a7f75e4742e86de9982f (diff) | |
| download | bcm5719-llvm-45f530db393d9b3735f75c59f058ed938120bbee.tar.gz bcm5719-llvm-45f530db393d9b3735f75c59f058ed938120bbee.zip | |
Revert r103133 and add testcase from PR7066.
llvm-svn: 103233
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLocal.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocLocal.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp index f20708681b1..398fc97307b 100644 --- a/llvm/lib/CodeGen/RegAllocLocal.cpp +++ b/llvm/lib/CodeGen/RegAllocLocal.cpp @@ -843,18 +843,8 @@ void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) { SmallVector<unsigned, 8> Kills; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { MachineOperand &MO = MI->getOperand(i); - if (!MO.isReg()) continue; - unsigned Reg = MO.getReg(); - if (!Reg) continue; - - // Avoid allocating assigned early clobbers below. - if (MO.isEarlyClobber() && TargetRegisterInfo::isPhysicalRegister(Reg)) { - spillPhysReg(MBB, MI, Reg, true); // Spill any existing value in reg - PhysRegsUsed[Reg] = 0; // It is free and reserved now - AddToPhysRegsUseOrder(Reg); - } - - if (!MO.isKill()) continue; + if (!MO.isReg() || !MO.isKill()) continue; + if (!MO.isImplicit()) Kills.push_back(MO.getReg()); else if (!isReadModWriteImplicitKill(MI, MO.getReg())) |

