mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 06:31:18 +00:00
Add number of spilled registers statistic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
11d1f21e1d
commit
575649322f
@ -34,6 +34,7 @@ using namespace llvm;
|
|||||||
namespace {
|
namespace {
|
||||||
Statistic<> numStores("ra-linearscan", "Number of stores added");
|
Statistic<> numStores("ra-linearscan", "Number of stores added");
|
||||||
Statistic<> numLoads ("ra-linearscan", "Number of loads added");
|
Statistic<> numLoads ("ra-linearscan", "Number of loads added");
|
||||||
|
Statistic<> numSpills("ra-linearscan", "Number of register spills");
|
||||||
|
|
||||||
class RA : public MachineFunctionPass {
|
class RA : public MachineFunctionPass {
|
||||||
private:
|
private:
|
||||||
@ -737,6 +738,7 @@ int RA::assignVirt2StackSlot(unsigned virtReg)
|
|||||||
|
|
||||||
bool inserted = v2ssMap_.insert(std::make_pair(virtReg, frameIndex)).second;
|
bool inserted = v2ssMap_.insert(std::make_pair(virtReg, frameIndex)).second;
|
||||||
assert(inserted && "attempt to assign stack slot to spilled register!");
|
assert(inserted && "attempt to assign stack slot to spilled register!");
|
||||||
|
++numSpills;
|
||||||
return frameIndex;
|
return frameIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user