diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-01 06:15:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-01 06:15:32 +0000 |
commit | c85535c8bed444502b6b266b590bb735cfd06aeb (patch) | |
tree | 6927ca073a0437ed101c394b59fd290a6f17b2d3 /llvm/lib/CodeGen/LiveVariables.cpp | |
parent | 0c26b9cbbb052ff977d07fa342742449619ce74d (diff) | |
download | bcm5719-llvm-c85535c8bed444502b6b266b590bb735cfd06aeb.tar.gz bcm5719-llvm-c85535c8bed444502b6b266b590bb735cfd06aeb.zip |
Now that MachineFunction/MachineBasicBlock keep a mapping of blocks to ID #'s
use them instead of a local LiveVariables numbering
llvm-svn: 14523
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveVariables.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp index 0edb307b903..cc924c3cc44 100644 --- a/llvm/lib/CodeGen/LiveVariables.cpp +++ b/llvm/lib/CodeGen/LiveVariables.cpp @@ -37,22 +37,6 @@ using namespace llvm; static RegisterAnalysis<LiveVariables> X("livevars", "Live Variable Analysis"); -/// getIndexMachineBasicBlock() - Given a block index, return the -/// MachineBasicBlock corresponding to it. -MachineBasicBlock *LiveVariables::getIndexMachineBasicBlock(unsigned Idx) { - if (BBIdxMap.empty()) { - BBIdxMap.resize(BBMap.size()); - for (std::map<MachineBasicBlock*, unsigned>::iterator I = BBMap.begin(), - E = BBMap.end(); I != E; ++I) { - assert(BBIdxMap.size() > I->second && "Indices are not sequential"); - assert(BBIdxMap[I->second] == 0 && "Multiple idx collision!"); - BBIdxMap[I->second] = I->first; - } - } - assert(Idx < BBIdxMap.size() && "BB Index out of range!"); - return BBIdxMap[Idx]; -} - LiveVariables::VarInfo &LiveVariables::getVarInfo(unsigned RegIdx) { assert(MRegisterInfo::isVirtualRegister(RegIdx) && "getVarInfo: not a virtual register!"); @@ -177,10 +161,6 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) { AllocatablePhysicalRegisters[*I] = true; // The reg is allocatable! } - // Build BBMap... - for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) - BBMap[I] = I->getNumber(); - // PhysRegInfo - Keep track of which instruction was the last use of a // physical register. This is a purely local property, because all physical // register references as presumed dead across basic blocks. |