aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/RegAllocLocal.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-05-07 01:45:38 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-05-07 01:45:38 +0000
commit9eb9de5c77aaafc88c3aba563e5e27043747a8b9 (patch)
treebea6de76cd619e7b706775da54d887e0a9dea024 /lib/CodeGen/RegAllocLocal.cpp
parent6bf788cc0143d36e6947bfcd715aa50a6460e2de (diff)
downloadexternal_llvm-9eb9de5c77aaafc88c3aba563e5e27043747a8b9.zip
external_llvm-9eb9de5c77aaafc88c3aba563e5e27043747a8b9.tar.gz
external_llvm-9eb9de5c77aaafc88c3aba563e5e27043747a8b9.tar.bz2
Revert r103133 and add testcase from PR7066.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r--lib/CodeGen/RegAllocLocal.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp
index f207086..398fc97 100644
--- a/lib/CodeGen/RegAllocLocal.cpp
+++ b/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()))