diff options
| author | Arthur Eubanks <aeubanks@google.com> | 2024-06-27 16:32:27 -0700 |
|---|---|---|
| committer | shawbyoung <shawbyoung@gmail.com> | 2024-06-27 16:32:27 -0700 |
| commit | f5c7df12cacdb84552b36a7ac598a8db41acc680 (patch) | |
| tree | 3b33e941b9bfb88c40c64fd18ee32a633423cbed /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
| parent | 608880c3a7a59c86db82728067e553a8d4665a45 (diff) | |
| parent | 804415825b97e974c96a92580bcbeaf4c7ff0a04 (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/shawbyoung/spr/main.boltnfc-refactoring-callgraph
Created using spr 1.3.4
[skip ci]
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); } } |
