aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-19 06:26:50 +0000
committerChris Lattner <sabre@nondot.org>2004-07-19 06:26:50 +0000
commit73d4adfb1e5d6c0ce834b331e6099b14d3341dd7 (patch)
treef129b109d86d41050e15a7bf8ccf054f06a9195c /lib/CodeGen/LiveVariables.cpp
parente312e156c3fd39481460f97b666e8fb5eca13346 (diff)
Remove the DefBlock element of VarInfo. DefBlock is always DefInst->getParent()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveVariables.cpp')
-rw-r--r--lib/CodeGen/LiveVariables.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp
index d26848cb1c..883b7813e7 100644
--- a/lib/CodeGen/LiveVariables.cpp
+++ b/lib/CodeGen/LiveVariables.cpp
@@ -64,7 +64,7 @@ void LiveVariables::MarkVirtRegAliveInBlock(VarInfo &VRInfo,
break;
}
- if (MBB == VRInfo.DefBlock) return; // Terminate recursion
+ if (MBB == VRInfo.DefInst->getParent()) return; // Terminate recursion
if (VRInfo.AliveBlocks.size() <= BBNum)
VRInfo.AliveBlocks.resize(BBNum+1); // Make space...
@@ -95,7 +95,8 @@ void LiveVariables::HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB,
assert(VRInfo.Kills[i].first != MBB && "entry should be at end!");
#endif
- assert(MBB != VRInfo.DefBlock && "Should have kill for defblock!");
+ assert(MBB != VRInfo.DefInst->getParent() &&
+ "Should have kill for defblock!");
// Add a new kill entry for this basic block.
VRInfo.Kills.push_back(std::make_pair(MBB, MI));
@@ -230,8 +231,7 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
if (MRegisterInfo::isVirtualRegister(MO.getReg())) {
VarInfo &VRInfo = getVarInfo(MO.getReg());
- assert(VRInfo.DefBlock == 0 && "Variable multiply defined!");
- VRInfo.DefBlock = MBB; // Created here...
+ assert(VRInfo.DefInst == 0 && "Variable multiply defined!");
VRInfo.DefInst = MI;
VRInfo.Kills.push_back(std::make_pair(MBB, MI)); // Defaults to dead
} else if (MRegisterInfo::isPhysicalRegister(MO.getReg()) &&