Count coalesced copies
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 14 May 2010 21:55:50 +0000 (21:55 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 14 May 2010 21:55:50 +0000 (21:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103821 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocFast.cpp

index c7f60ccea305a32513e8f036465874109ae9021e..0e92996d9498ff52d39cae459dde9ce3676254b4 100644 (file)
@@ -40,6 +40,7 @@ static cl::opt<bool> VerifyFastRegalloc("verify-fast-regalloc", cl::Hidden,
 
 STATISTIC(NumStores, "Number of stores added");
 STATISTIC(NumLoads , "Number of loads added");
+STATISTIC(NumCopies, "Number of copies coalesced");
 
 static RegisterRegAlloc
   fastRegAlloc("fast", "fast register allocator", createFastRegisterAllocator);
@@ -771,6 +772,7 @@ void RAFast::AllocateBasicBlock(MachineBasicBlock &MBB) {
   // LiveVirtsRegs might refer to the instrs.
   for (unsigned i = 0, e = Coalesced.size(); i != e; ++i)
     MBB.erase(Coalesced[i]);
+  NumCopies += Coalesced.size();
 
   DEBUG(MBB.dump());
 }