[PATCH] D84118: [Debuginfo][Salvaging] (5/7) Support for DW_OP_implicit_pointer for named and unnamed variables (second strategy).

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 02:32:29 PST 2020


djtodoro added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Utils/Local.h:312
-/// cannot be salvaged changes its debug uses to undef.
-void salvageDebugInfo(Instruction &I);
-
----------------
Can we leave this here in Local ?


================
Comment at: llvm/lib/IR/Instruction.cpp:797
+
+  // preserve the information we may need later when called function from
+  // current function is inlined. We need this information for
----------------
nit: Preserve


================
Comment at: llvm/lib/IR/Instruction.cpp:822
+
+  if (getModule()->getDwarfVersion() >= 5) {
+    if (isa<AllocaInst>(*this)) {
----------------
why only for DWARF 5?
There is dw_op_gnu_implicit_pointer for the later version ?


================
Comment at: llvm/lib/IR/Instruction.cpp:822
+
+  if (getModule()->getDwarfVersion() >= 5) {
+    if (isa<AllocaInst>(*this)) {
----------------
djtodoro wrote:
> why only for DWARF 5?
> There is dw_op_gnu_implicit_pointer for the later version ?
Please add a comment describing what we are doing here.


================
Comment at: llvm/lib/IR/Instruction.cpp:825
+      for (auto *DII : DbgUsers) {
+        if (DII->isAddressOfVariable()) {
+          if (const llvm::MetadataAsValue *MDV =
----------------
Please use early continue here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84118/new/

https://reviews.llvm.org/D84118



More information about the llvm-commits mailing list