aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-19 06:55:21 +0000
committerChris Lattner <sabre@nondot.org>2004-07-19 06:55:21 +0000
commit472405e0dc05f6fb8c09af00713ff893fff25b94 (patch)
treea4c839734683c4d85245220e65123f3a73f8b015 /lib/CodeGen/LiveVariables.cpp
parent73d4adfb1e5d6c0ce834b331e6099b14d3341dd7 (diff)
Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveVariables.cpp')
-rw-r--r--lib/CodeGen/LiveVariables.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp
index 883b7813e7..c82208acea 100644
--- a/lib/CodeGen/LiveVariables.cpp
+++ b/lib/CodeGen/LiveVariables.cpp
@@ -99,7 +99,7 @@ void LiveVariables::HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB,
"Should have kill for defblock!");
// Add a new kill entry for this basic block.
- VRInfo.Kills.push_back(std::make_pair(MBB, MI));
+ VRInfo.Kills.push_back(std::make_pair(MI->getParent(), MI));
// Update all dominating blocks to mark them known live.
const BasicBlock *BB = MBB->getBasicBlock();
@@ -233,7 +233,8 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
assert(VRInfo.DefInst == 0 && "Variable multiply defined!");
VRInfo.DefInst = MI;
- VRInfo.Kills.push_back(std::make_pair(MBB, MI)); // Defaults to dead
+ // Defaults to dead
+ VRInfo.Kills.push_back(std::make_pair(MI->getParent(), MI));
} else if (MRegisterInfo::isPhysicalRegister(MO.getReg()) &&
AllocatablePhysicalRegisters[MO.getReg()]) {
HandlePhysRegDef(MO.getReg(), MI);