[llvm] r346287 - RegAllocFast: Rename statistic from NumCopies to NumCoalesced

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 6 18:04:08 PST 2018


Author: matze
Date: Tue Nov  6 18:04:07 2018
New Revision: 346287

URL: http://llvm.org/viewvc/llvm-project?rev=346287&view=rev
Log:
RegAllocFast: Rename statistic from NumCopies to NumCoalesced

The metric does not return the number of remaining (or inserted) copies
but the number of copies that were coalesced. Pick a more descriptive
name.

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

Modified: llvm/trunk/lib/CodeGen/RegAllocFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocFast.cpp?rev=346287&r1=346286&r2=346287&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocFast.cpp Tue Nov  6 18:04:07 2018
@@ -54,7 +54,7 @@ using namespace llvm;
 
 STATISTIC(NumStores, "Number of stores added");
 STATISTIC(NumLoads , "Number of loads added");
-STATISTIC(NumCopies, "Number of copies coalesced");
+STATISTIC(NumCoalesced, "Number of copies coalesced");
 
 static RegisterRegAlloc
   fastRegAlloc("fast", "fast register allocator", createFastRegisterAllocator);
@@ -1079,7 +1079,7 @@ void RegAllocFast::allocateBasicBlock(Ma
   // LiveVirtRegs might refer to the instrs.
   for (MachineInstr *MI : Coalesced)
     MBB.erase(MI);
-  NumCopies += Coalesced.size();
+  NumCoalesced += Coalesced.size();
 
   LLVM_DEBUG(MBB.dump());
 }




More information about the llvm-commits mailing list