diff options
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 3a59ae7ab066..3224bedcb58d 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -78,13 +78,13 @@ char LiveDebugVariables::ID = 0; INITIALIZE_PASS_BEGIN(LiveDebugVariables, DEBUG_TYPE, "Debug Variable Analysis", false, false) -INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree) +INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass) INITIALIZE_PASS_DEPENDENCY(LiveIntervals) INITIALIZE_PASS_END(LiveDebugVariables, DEBUG_TYPE, "Debug Variable Analysis", false, false) void LiveDebugVariables::getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired<MachineDominatorTree>(); + AU.addRequired<MachineDominatorTreeWrapperPass>(); AU.addRequiredTransitive<LiveIntervals>(); AU.setPreservesAll(); MachineFunctionPass::getAnalysisUsage(AU); @@ -764,9 +764,9 @@ void LDVImpl::print(raw_ostream &OS) { #endif void UserValue::mapVirtRegs(LDVImpl *LDV) { - for (unsigned i = 0, e = locations.size(); i != e; ++i) - if (locations[i].isReg() && locations[i].getReg().isVirtual()) - LDV->mapVirtReg(locations[i].getReg(), this); + for (const MachineOperand &MO : locations) + if (MO.isReg() && MO.getReg().isVirtual()) + LDV->mapVirtReg(MO.getReg(), this); } UserValue * @@ -1254,9 +1254,9 @@ void LDVImpl::computeIntervals() { LexicalScopes LS; LS.initialize(*MF); - for (unsigned i = 0, e = userValues.size(); i != e; ++i) { - userValues[i]->computeIntervals(MF->getRegInfo(), *TRI, *LIS, LS); - userValues[i]->mapVirtRegs(this); + for (const auto &UV : userValues) { + UV->computeIntervals(MF->getRegInfo(), *TRI, *LIS, LS); + UV->mapVirtRegs(this); } } |
