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 | 8490f9c92e354fd9cd242bae89b24e6c59e5c794 (patch) | |
tree | 85a9894afd0c6142c67a78c9975ebf9adb9d7b86 /lib/CodeGen/LiveVariables.cpp | |
parent | 61e4cb3605b9a7c0ef2b720c8dc5a2e7b880e3a9 (diff) |
Now that MachineFunction/MachineBasicBlock keep a mapping of blocks to ID #'s
use them instead of a local LiveVariables numbering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14523 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveVariables.cpp')
-rw-r--r-- | lib/CodeGen/LiveVariables.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index 0edb307b90..cc924c3cc4 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/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. |