diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-31 04:13:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-31 04:13:23 +0000 |
commit | 84bc5427d6883f73cfeae3da640acd011d35c006 (patch) | |
tree | 5686c82a5bfacdb56c5e7dabbf24990d70aac8d3 /lib/CodeGen/MachineFunction.cpp | |
parent | 8164a33856f35763bd6f0956dd74a26ef19e11b0 (diff) |
Rename SSARegMap -> MachineRegisterInfo in keeping with the idea
that "machine" classes are used to represent the current state of
the code being compiled. Given this expanded name, we can start
moving other stuff into it. For now, move the UsedPhysRegs and
LiveIn/LoveOuts vectors from MachineFunction into it.
Update all the clients to match.
This also reduces some needless #includes, such as MachineModuleInfo
from MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 037e3e483f..595159b15f 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -14,12 +14,12 @@ //===----------------------------------------------------------------------===// #include "llvm/DerivedTypes.h" +#include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineInstr.h" -#include "llvm/CodeGen/SSARegMap.h" #include "llvm/CodeGen/MachineFrameInfo.h" -#include "llvm/CodeGen/MachineConstantPool.h" +#include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineJumpTableInfo.h" +#include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/Passes.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetLowering.h" @@ -122,11 +122,10 @@ void ilist_traits<MachineBasicBlock>::transferNodesFromList( MachineFunction::MachineFunction(const Function *F, const TargetMachine &TM) : Annotation(MF_AID), Fn(F), Target(TM) { - SSARegMapping = new SSARegMap(); + RegInfo = new MachineRegisterInfo(*TM.getRegisterInfo()); MFInfo = 0; FrameInfo = new MachineFrameInfo(); ConstantPool = new MachineConstantPool(TM.getTargetData()); - UsedPhysRegs.resize(TM.getRegisterInfo()->getNumRegs()); // Set up jump table. const TargetData &TD = *TM.getTargetData(); @@ -141,7 +140,7 @@ MachineFunction::MachineFunction(const Function *F, MachineFunction::~MachineFunction() { BasicBlocks.clear(); - delete SSARegMapping; + delete RegInfo; delete MFInfo; delete FrameInfo; delete ConstantPool; @@ -208,9 +207,10 @@ void MachineFunction::print(std::ostream &OS) const { const MRegisterInfo *MRI = getTarget().getRegisterInfo(); - if (!livein_empty()) { + if (!RegInfo->livein_empty()) { OS << "Live Ins:"; - for (livein_iterator I = livein_begin(), E = livein_end(); I != E; ++I) { + for (MachineRegisterInfo::livein_iterator + I = RegInfo->livein_begin(), E = RegInfo->livein_end(); I != E; ++I) { if (MRI) OS << " " << MRI->getName(I->first); else @@ -221,9 +221,10 @@ void MachineFunction::print(std::ostream &OS) const { } OS << "\n"; } - if (!liveout_empty()) { + if (!RegInfo->liveout_empty()) { OS << "Live Outs:"; - for (liveout_iterator I = liveout_begin(), E = liveout_end(); I != E; ++I) + for (MachineRegisterInfo::liveout_iterator + I = RegInfo->liveout_begin(), E = RegInfo->liveout_end(); I != E; ++I) if (MRI) OS << " " << MRI->getName(*I); else @@ -324,11 +325,6 @@ MachineFunction& MachineFunction::get(const Function *F) return *mc; } -void MachineFunction::clearSSARegMap() { - delete SSARegMapping; - SSARegMapping = 0; -} - //===----------------------------------------------------------------------===// // MachineFrameInfo implementation //===----------------------------------------------------------------------===// |