[llvm-commits] [llvm] r65498 - in /llvm/trunk: lib/CodeGen/VirtRegMap.cpp test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll

Evan Cheng evan.cheng at apple.com
Wed Feb 25 19:02:21 PST 2009


Author: evancheng
Date: Wed Feb 25 21:02:21 2009
New Revision: 65498

URL: http://llvm.org/viewvc/llvm-project?rev=65498&view=rev
Log:
The last commit was overly conservative. It's ok to reuse value that's already marked livein.

Modified:
    llvm/trunk/lib/CodeGen/VirtRegMap.cpp
    llvm/trunk/test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll

Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=65498&r1=65497&r2=65498&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original)
+++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Wed Feb 25 21:02:21 2009
@@ -516,18 +516,11 @@
          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 {

Modified: llvm/trunk/test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll?rev=65498&r1=65497&r2=65498&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/2008-11-19-ScavengerAssert.ll Wed Feb 25 21:02:21 2009
@@ -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 }





More information about the llvm-commits mailing list