diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-26 03:02:21 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-26 03:02:21 +0000 |
commit | 04cf3e39f3895434c75dd9fbe9070cd33fe6cbc0 (patch) | |
tree | a4cfc73755ccd864b9302e61d36c51937448cf99 | |
parent | f792352c25880ee0c61b2da2d03927b9356b77e8 (diff) |
The last commit was overly conservative. It's ok to reuse value that's already marked livein.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65498 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/VirtRegMap.cpp | 7 | ||||
-rw-r--r-- | test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index e768e1c204..0103e2042f 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -516,18 +516,11 @@ void AvailableSpills::AddAvailableRegsToLiveIn(MachineBasicBlock &MBB, I = PhysRegsAvailable.begin(), E = PhysRegsAvailable.end(); I != E; ++I) { unsigned Reg = I->first; - bool MakeAvail = true; const TargetRegisterClass* RC = TRI->getPhysicalRegisterRegClass(Reg); // FIXME: A temporary workaround. We can't reuse available value if it's // not safe to move the def of the virtual register's class. e.g. // X86::RFP* register classes. Do not add it as a live-in. if (!TII->isSafeToMoveRegClassDefs(RC)) - MakeAvail = false; - if (MBB.isLiveIn(Reg)) - // It's already livein somehow. Be conservative, do not make it available. - MakeAvail = false; - - if (!MakeAvail) // This is no longer available. NotAvailable.insert(Reg); else { diff --git a/test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll b/test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll index bb16a94f48..0a73b3fc25 100644 --- a/test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll +++ b/test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin9 -; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin9 -stats |& grep asm-printer | grep 185 +; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin9 -stats |& grep asm-printer | grep 186 %"struct.Adv5::Ekin<3>" = type <{ i8 }> %"struct.Adv5::X::Energyflux<3>" = type { double } |