aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-05-01 21:23:35 +0000
committerChris Lattner <sabre@nondot.org>2004-05-01 21:23:35 +0000
commit96362e9cac4fbb7f7a9eacf19efea55a8d38bd79 (patch)
tree05ce9aa7e886b17d1863c56c80f2d72addfa7d4e
parent0aef12a7a96968a80c38144dfc0a7ae6a9152db9 (diff)
Stop LiveVariables from using BasicBlocks as part of the mapping, instead
use MachineBasicBlocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13300 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/LiveVariables.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h
index b0d11cc4d9..a547a78c0e 100644
--- a/include/llvm/CodeGen/LiveVariables.h
+++ b/include/llvm/CodeGen/LiveVariables.h
@@ -100,10 +100,9 @@ private:
private: // Intermediate data structures
- /// BBMap - Maps LLVM basic blocks to their corresponding machine basic block.
- /// This also provides a numbering of the basic blocks in the function.
- std::map<const BasicBlock*, std::pair<MachineBasicBlock*, unsigned> > BBMap;
-
+ /// BBMap - This provides a numbering of the basic blocks in the function.
+ ///
+ std::map<MachineBasicBlock*, unsigned> BBMap;
/// BBIdxMap - This contains the inverse mapping of BBMap, going from block ID
/// numbers to the corresponding MachineBasicBlock. This is lazily computed
@@ -125,11 +124,8 @@ public:
/// getMachineBasicBlockIndex - Turn a MachineBasicBlock into an index number
/// suitable for use with VarInfo's.
///
- const std::pair<MachineBasicBlock*, unsigned>
- &getMachineBasicBlockInfo(MachineBasicBlock *MBB) const;
- const std::pair<MachineBasicBlock*, unsigned>
- &getBasicBlockInfo(const BasicBlock *BB) const {
- return BBMap.find(BB)->second;
+ unsigned getMachineBasicBlockIndex(MachineBasicBlock *MBB) const {
+ return BBMap.find(MBB)->second;
}
/// getIndexMachineBasicBlock() - Given a block index, return the
@@ -269,7 +265,7 @@ public:
return AllocatablePhysicalRegisters;
}
- void MarkVirtRegAliveInBlock(VarInfo &VRInfo, const BasicBlock *BB);
+ void MarkVirtRegAliveInBlock(VarInfo &VRInfo, MachineBasicBlock *BB);
void HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB,
MachineInstr *MI);
};