diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-18 20:25:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-18 20:25:31 +0000 |
commit | 5e46b513f36d69ba280e16500089b3b6af0e3b5f (patch) | |
tree | cecfe3c2a65ea6c76fc9335528141467f8bc91e1 /lib/CodeGen | |
parent | 47df12d80db90e125e9f2ff764286ee11665476d (diff) |
Prune some #includes
Add a statistic for # reloads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 89c239678e..9deb3267b1 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -22,18 +22,16 @@ #include "llvm/Target/MRegisterInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetRegInfo.h" #include "llvm/Support/CFG.h" #include "Support/Debug.h" #include "Support/DepthFirstIterator.h" #include "Support/Statistic.h" #include "Support/STLExtras.h" -#include <iostream> - using namespace llvm; namespace { Statistic<> numSpilled ("ra-linearscan", "Number of registers spilled"); + Statistic<> numReloaded("ra-linearscan", "Number of registers reloaded"); class RA : public MachineFunctionPass { public: @@ -762,6 +760,7 @@ void RA::loadVirt2PhysReg(unsigned virtReg, unsigned physReg) const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(virtReg); int frameIndex = getStackSlot(virtReg); DEBUG(std::cerr << " from stack slot #" << frameIndex << '\n'); + ++numReloaded; instrAdded_ += mri_->loadRegFromStackSlot(*currentMbb_, currentInstr_, physReg, frameIndex, rc); assignVirt2PhysReg(virtReg, physReg); |