[PATCH] D116411: Add DW_TAG_call_site_parameter for via-stack-param

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 4 00:44:08 PST 2022


dstenb added a comment.

Interesting patch series! Just adding some stylistic comments whilst reading through the code.



================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:893
+  if (CallMIMO.isGlobal()) {
+    F = dyn_cast<Function>(CallMIMO.getGlobal());
+    Offset = F->CallSiteInfoStackFwdGlobalOffset;
----------------
Since the value is used unconditionally, this should perhaps be a cast<>?


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:897-899
+    if (CallFwdStackInfo != CalleesStackMap.end()) {
+      CollectStackFwdParams = true;
+    }
----------------
Nit: Can be reduced to:

`CollectStackFwdParams = CallFwdStackInfo != CalleesStackMap.end()`


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:930-931
+    return;
+
   for (auto Param : IRParams) {
+    DICallSiteParam *DICSParam = cast<DICallSiteParam>(Param);
----------------
Perhaps worth considering merging this with the register loop if we only think that the only difference will be the produced DbgCallSiteParam? Or do we foresee larger differences?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116411



More information about the llvm-commits mailing list