[PATCH] D78106: [CSInfo][NFC] Interpret loaded parameter value separately
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 23:25:39 PDT 2020
djtodoro added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:780
- // If the MI is an instruction defining one or more parameters' forwarding
- // registers, add those defines.
- auto getForwardingRegsDefinedByMI = [&](const MachineInstr &MI,
- SmallSetVector<unsigned, 4> &Defs) {
- if (MI.isDebugInstr())
- return;
-
- for (const MachineOperand &MO : MI.operands()) {
- if (MO.isReg() && MO.isDef() &&
- Register::isPhysicalRegister(MO.getReg())) {
- for (auto FwdReg : ForwardedRegWorklist)
- if (TRI->regsOverlap(FwdReg.first, MO.getReg()))
- Defs.insert(FwdReg.first);
- }
- }
- };
-
- // Search for a loading value in forwarding registers.
- for (; I != MBB->rend(); ++I) {
+ auto nextInstrInterpret = [&](const MachineInstr *CurMI,
+ FwdRegWorklist &ForwardedRegWorklist,
----------------
vsk wrote:
> What does nextInstrInterpret need to capture via [&]?
Also the `getForwardingRegsDefinedByMI` does not need to capture via [&].
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78106/new/
https://reviews.llvm.org/D78106
More information about the llvm-commits
mailing list