[PATCH] D85018: [WIP][POC][DebugInfo] Support for DW_AT_start_scope for scoped variables

Sourabh Singh Tomar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 09:18:38 PDT 2020


SouraVX added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1817-1818
+        ScopeBeginSym = getLabelBeforeInsn(R.first);
+      // FIXME: This causes loclist emission even at `-O0` is there way
+      // we can avoid this ?
+      RegVar = cast<DbgVariable>(
----------------
djtodoro wrote:
> we can avoid creating `.debug_loc` list by introducing new `DbgEntity`, e.g. called `DbgScopedVariable` which is handled in a special way (by always creating a single location for it)? Or to set `isSafeForSingleLocation`  (from `DwarfDebug::buildLocationList`) to true if `ScopeBeginSym != nullptr`?
Thank you for your inputs!, I think I've been to this route(or not). Let me give it one more shot.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85018



More information about the llvm-commits mailing list