diff options
| author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-23 18:45:32 +0000 |
|---|---|---|
| committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-23 18:45:32 +0000 |
| commit | 575649322f390f20d08c5f2577820091d120dfd9 (patch) | |
| tree | 5936780716c9864c8e267d2969cb2c700c956663 /lib/CodeGen/RegAllocLinearScan.cpp | |
| parent | 11d1f21e1d400826ccc3cae5702d6a626baa906b (diff) | |
Add number of spilled registers statistic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLinearScan.cpp')
| -rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index d4b258d1fc..fb78020669 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -34,6 +34,7 @@ using namespace llvm; namespace { Statistic<> numStores("ra-linearscan", "Number of stores added"); Statistic<> numLoads ("ra-linearscan", "Number of loads added"); + Statistic<> numSpills("ra-linearscan", "Number of register spills"); class RA : public MachineFunctionPass { private: @@ -737,6 +738,7 @@ int RA::assignVirt2StackSlot(unsigned virtReg) bool inserted = v2ssMap_.insert(std::make_pair(virtReg, frameIndex)).second; assert(inserted && "attempt to assign stack slot to spilled register!"); + ++numSpills; return frameIndex; } |
