aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-12-15 18:15:24 +0000
committerChris Lattner <sabre@nondot.org>2002-12-15 18:15:24 +0000
commitad44bd99ff32d996c7b1598129f069437d5bfc61 (patch)
tree96c6361eb1922b37761ce7a1579824e62e02e295 /lib/CodeGen
parente3912ee3abb3b659c475d9711aff6573254c8aaa (diff)
downloadexternal_llvm-ad44bd99ff32d996c7b1598129f069437d5bfc61.zip
external_llvm-ad44bd99ff32d996c7b1598129f069437d5bfc61.tar.gz
external_llvm-ad44bd99ff32d996c7b1598129f069437d5bfc61.tar.bz2
Remove extraneous #includes, perform FIXME
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/RegAllocSimple.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/CodeGen/RegAllocSimple.cpp b/lib/CodeGen/RegAllocSimple.cpp
index c255bda..b84d2b8 100644
--- a/lib/CodeGen/RegAllocSimple.cpp
+++ b/lib/CodeGen/RegAllocSimple.cpp
@@ -9,16 +9,13 @@
#include "llvm/Type.h"
#include "llvm/Constants.h"
#include "llvm/Pass.h"
-#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/Target/MachineInstrInfo.h"
#include "llvm/Target/MRegisterInfo.h"
-#include "llvm/Target/MachineRegInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/InstVisitor.h"
#include "Support/Statistic.h"
-#include <map>
namespace {
struct RegAllocSimple : public FunctionPass {
@@ -30,8 +27,7 @@ namespace {
unsigned NumBytesAllocated, ByteAlignment;
// Maps SSA Regs => offsets on the stack where these values are stored
- // FIXME: change name to VirtReg2OffsetMap
- std::map<unsigned, unsigned> RegMap;
+ std::map<unsigned, unsigned> VirtReg2OffsetMap;
// Maps SSA Regs => physical regs
std::map<unsigned, unsigned> SSA2PhysRegMap;
@@ -95,7 +91,7 @@ namespace {
}
void cleanupAfterFunction() {
- RegMap.clear();
+ VirtReg2OffsetMap.clear();
SSA2PhysRegMap.clear();
NumBytesAllocated = ByteAlignment;
}
@@ -131,7 +127,7 @@ namespace {
unsigned RegAllocSimple::allocateStackSpaceFor(unsigned VirtReg,
const TargetRegisterClass *regClass)
{
- if (RegMap.find(VirtReg) == RegMap.end()) {
+ if (VirtReg2OffsetMap.find(VirtReg) == VirtReg2OffsetMap.end()) {
#if 0
unsigned size = regClass->getDataSize();
unsigned over = NumBytesAllocated - (NumBytesAllocated % ByteAlignment);
@@ -139,14 +135,14 @@ unsigned RegAllocSimple::allocateStackSpaceFor(unsigned VirtReg,
// need to pad by (ByteAlignment - over)
NumBytesAllocated += ByteAlignment - over;
}
- RegMap[VirtReg] = NumBytesAllocated;
+ VirtReg2OffsetMap[VirtReg] = NumBytesAllocated;
NumBytesAllocated += size;
#endif
// FIXME: forcing each arg to take 4 bytes on the stack
- RegMap[VirtReg] = NumBytesAllocated;
+ VirtReg2OffsetMap[VirtReg] = NumBytesAllocated;
NumBytesAllocated += ByteAlignment;
}
- return RegMap[VirtReg];
+ return VirtReg2OffsetMap[VirtReg];
}
unsigned RegAllocSimple::getFreeReg(unsigned virtualReg) {