From 472405e0dc05f6fb8c09af00713ff893fff25b94 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 19 Jul 2004 06:55:21 +0000 Subject: 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 --- lib/CodeGen/LiveVariables.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/LiveVariables.cpp') 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); -- cgit v1.2.3-70-g09d2