[llvm] 41ca605 - Revert "[NFC][DwarfDebug] Avoid default capturing when using lambdas"
Djordje Todorovic via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 00:37:52 PDT 2020
Author: Djordje Todorovic
Date: 2020-05-12T09:37:28+02:00
New Revision: 41ca6058132f554033db0bbdd12032e20237fe0d
URL: https://github.com/llvm/llvm-project/commit/41ca6058132f554033db0bbdd12032e20237fe0d
DIFF: https://github.com/llvm/llvm-project/commit/41ca6058132f554033db0bbdd12032e20237fe0d.diff
LOG: Revert "[NFC][DwarfDebug] Avoid default capturing when using lambdas"
Reverting this because we found it isn't that useful.
Please see https://reviews.llvm.org/D79616.
This reverts commit rG45e5a32a8bd3.
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index bd033947cc7a..f53fd3010672 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -706,21 +706,20 @@ static void collectCallSiteParameters(const MachineInstr *CallMI,
// If the MI is an instruction defining one or more parameters' forwarding
// registers, add those defines.
- auto getForwardingRegsDefinedByMI =
- [&TRI](const MachineInstr &MI, SmallSetVector<unsigned, 4> &Defs,
- const FwdRegWorklist &ForwardedRegWorklist) {
- 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);
- }
- }
- };
+ 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) {
@@ -739,7 +738,7 @@ static void collectCallSiteParameters(const MachineInstr *CallMI,
// Set of worklist registers that are defined by this instruction.
SmallSetVector<unsigned, 4> FwdRegDefs;
- getForwardingRegsDefinedByMI(*I, FwdRegDefs, ForwardedRegWorklist);
+ getForwardingRegsDefinedByMI(*I, FwdRegDefs);
if (FwdRegDefs.empty())
continue;
More information about the llvm-commits
mailing list