summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-12-18 20:25:31 +0000
committerChris Lattner <sabre@nondot.org>2003-12-18 20:25:31 +0000
commit8f88cdfa22506aa296c97df2b8afa1be9ba6079c (patch)
tree42b121cd0a1ce7c7509ff4188cf7182b4196359d /llvm/lib/CodeGen/RegAllocLinearScan.cpp
parentb22e9b4b350b99a09560fec122bc7cb880209d9e (diff)
downloadbcm5719-llvm-8f88cdfa22506aa296c97df2b8afa1be9ba6079c.tar.gz
bcm5719-llvm-8f88cdfa22506aa296c97df2b8afa1be9ba6079c.zip
Prune some #includes
Add a statistic for # reloads llvm-svn: 10518
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocLinearScan.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
index 89c239678ef..9deb3267b17 100644
--- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud