[PATCH] D79624: [NFC][DwarfDebug] Prefer explicit to auto type deduction
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 11 00:29:45 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2552dc5317e0: [NFC][DwarfDebug] Prefer explicit to auto type deduction (authored by djtodoro).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79624/new/
https://reviews.llvm.org/D79624
Files:
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Index: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -652,9 +652,9 @@
return;
auto *MBB = CallMI->getParent();
- const auto &TRI = MF->getSubtarget().getRegisterInfo();
- const auto &TII = MF->getSubtarget().getInstrInfo();
- const auto &TLI = MF->getSubtarget().getTargetLowering();
+ const TargetRegisterInfo &TRI = *MF->getSubtarget().getRegisterInfo();
+ const TargetInstrInfo &TII = *MF->getSubtarget().getInstrInfo();
+ const TargetLowering &TLI = *MF->getSubtarget().getTargetLowering();
// Skip the call instruction.
auto I = std::next(CallMI->getReverseIterator());
@@ -715,7 +715,7 @@
if (MO.isReg() && MO.isDef() &&
Register::isPhysicalRegister(MO.getReg())) {
for (auto FwdReg : ForwardedRegWorklist)
- if (TRI->regsOverlap(FwdReg.first, MO.getReg()))
+ if (TRI.regsOverlap(FwdReg.first, MO.getReg()))
Defs.insert(FwdReg.first);
}
}
@@ -743,17 +743,17 @@
continue;
for (auto ParamFwdReg : FwdRegDefs) {
- if (auto ParamValue = TII->describeLoadedValue(*I, ParamFwdReg)) {
+ if (auto ParamValue = TII.describeLoadedValue(*I, ParamFwdReg)) {
if (ParamValue->first.isImm()) {
int64_t Val = ParamValue->first.getImm();
finishCallSiteParams(Val, ParamValue->second,
ForwardedRegWorklist[ParamFwdReg], Params);
} else if (ParamValue->first.isReg()) {
Register RegLoc = ParamValue->first.getReg();
- unsigned SP = TLI->getStackPointerRegisterToSaveRestore();
- Register FP = TRI->getFrameRegister(*MF);
+ unsigned SP = TLI.getStackPointerRegisterToSaveRestore();
+ Register FP = TRI.getFrameRegister(*MF);
bool IsSPorFP = (RegLoc == SP) || (RegLoc == FP);
- if (TRI->isCalleeSavedPhysReg(RegLoc, *MF) || IsSPorFP) {
+ if (TRI.isCalleeSavedPhysReg(RegLoc, *MF) || IsSPorFP) {
MachineLocation MLoc(RegLoc, /*IsIndirect=*/IsSPorFP);
finishCallSiteParams(MLoc, ParamValue->second,
ForwardedRegWorklist[ParamFwdReg], Params);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79624.263109.patch
Type: text/x-patch
Size: 2314 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200511/c61cc75b/attachment.bin>
More information about the llvm-commits
mailing list