[llvm-commits] [llvm] r130996 - /llvm/trunk/lib/CodeGen/VirtRegMap.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri May 6 10:59:57 PDT 2011


Author: stoklund
Date: Fri May  6 12:59:57 2011
New Revision: 130996

URL: http://llvm.org/viewvc/llvm-project?rev=130996&view=rev
Log:
Also count identity copies.

Modified:
    llvm/trunk/lib/CodeGen/VirtRegMap.cpp

Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=130996&r1=130995&r2=130996&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original)
+++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Fri May  6 12:59:57 2011
@@ -42,6 +42,7 @@
 using namespace llvm;
 
 STATISTIC(NumSpills  , "Number of register spills");
+STATISTIC(NumIdCopies, "Number of identity moves eliminated after rewriting");
 
 //===----------------------------------------------------------------------===//
 //  VirtRegMap implementation
@@ -318,6 +319,7 @@
 
       // Finally, remove any identity copies.
       if (MI->isIdentityCopy()) {
+        ++NumIdCopies;
         if (MI->getNumOperands() == 2) {
           DEBUG(dbgs() << "Deleting identity copy.\n");
           RemoveMachineInstrFromMaps(MI);





More information about the llvm-commits mailing list