[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Dec 18 14:26:01 PST 2003
Changes in directory llvm/lib/CodeGen:
RegAllocLinearScan.cpp updated: 1.13 -> 1.14
---
Log message:
Prune some #includes
Add a statistic for # reloads
---
Diffs of the changes: (+2 -3)
Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.13 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.14
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.13 Thu Dec 18 07:15:02 2003
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp Thu Dec 18 14:25:31 2003
@@ -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 @@
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);
More information about the llvm-commits
mailing list