[PATCH] D85111: [NOT FOR COMMIT] Avoid entry_val ops with callee clobbered regs in call_value
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 01:27:21 PDT 2020
djtodoro created this revision.
djtodoro added reviewers: vsk, dstenb, aprantl.
djtodoro added projects: debug-info, LLVM.
Herald added subscribers: llvm-commits, hiraditya.
djtodoro requested review of this revision.
Addresses wrong call_value generated within case from PR39716.
(not sure this is valid patch ...)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85111
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
@@ -826,9 +826,12 @@
// Create an expression where the register's entry value is used.
DIExpression *EntryExpr = DIExpression::get(
MF->getFunction().getContext(), {dwarf::DW_OP_LLVM_entry_value, 1});
+ const auto &TRI = *MF->getSubtarget().getRegisterInfo();
for (auto RegEntry : ForwardedRegWorklist) {
- MachineLocation MLoc(RegEntry.first);
- finishCallSiteParams(MLoc, EntryExpr, RegEntry.second, Params);
+ if (TRI.isCalleeSavedPhysReg(RegEntry.first, *MF)) {
+ MachineLocation MLoc(RegEntry.first);
+ finishCallSiteParams(MLoc, EntryExpr, RegEntry.second, Params);
+ }
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85111.282526.patch
Type: text/x-patch
Size: 864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200803/30a09585/attachment-0001.bin>
More information about the llvm-commits
mailing list