Added statistic to count number of spills.
authorTanya Lattner <tonic@nondot.org>
Fri, 17 Jun 2005 04:01:34 +0000 (04:01 +0000)
committerTanya Lattner <tonic@nondot.org>
Fri, 17 Jun 2005 04:01:34 +0000 (04:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22240 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp

index ff57437bdcc4408877bb8a9bcfe6621633e7a1fc..cc2695c1ac3eeca477eb7753070c6f8a34de50a6 100644 (file)
 #include "llvm/Support/CommandLine.h"
 #include "llvm/ADT/SetOperations.h"
 #include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/Statistic.h"
 #include <cmath>
 #include <iostream>
 
 namespace llvm {
+ Statistic<> RASpills("regalloc-spills", "Number of registers spilled");
 
 RegAllocDebugLevel_t DEBUG_RA;
 
@@ -703,6 +705,7 @@ void PhyRegAlloc::insertCode4SpilledLR(const V9LiveRange *LR,
   // Finally, insert the entire spill code sequences before/after MInst
   AI.InstrnsBefore.insert(AI.InstrnsBefore.end(), MIBef.begin(), MIBef.end());
   AI.InstrnsAfter.insert(AI.InstrnsAfter.begin(), MIAft.begin(), MIAft.end());
+  ++RASpills;
 
   if (DEBUG_RA) {
     std::cerr << "\nFor Inst:\n  " << *MInst;