[PATCH] D49887: [DebugInfo] Add support for DWARF5 call site-related attributes

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 10 03:06:33 PDT 2021


djtodoro added inline comments.


================
Comment at: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:536
+      // If this is a direct call, find the callee's subprogram.
+      const MachineOperand &CalleeOp = MI.getOperand(0);
+      if (!CalleeOp.isGlobal())
----------------
aheejin wrote:
> Sorry for the late question, but is the first operand always the callee in a call instruction? That's not true for WebAssembly, but I'm wondering if WebAssembly is an exception and this holds for all other targets.
>Sorry for the late question, but is the first operand always the callee in a call instruction?
AFAIK, it is true for Intel, Arm, MIPS...

>That's not true for WebAssembly, but I'm wondering if WebAssembly is an exception and this holds for all other targets.

If that is the case, we can make a `TargetInstr` method, e.g. `getCallee()`, that returns the first operand in general, and override it in the WebAssembly case, right?



Repository:
  rL LLVM

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

https://reviews.llvm.org/D49887



More information about the llvm-commits mailing list