[PATCH] D102978: [WebAssembly] Add TargetInstrInfo::getCalleeOperand

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 25 00:09:46 PDT 2021


djtodoro added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.cpp:94
   case WebAssembly::RET_CALL_INDIRECT_S:
-    return MI.getOperand(MI.getNumOperands() - 1);
+    return MI.getOperand(MI.getNumExplicitOperands() - 1);
   default:
----------------
aheejin wrote:
> djtodoro wrote:
> > By doing this, the patch does a bit more then described in the summary. I think this is should be a separate change.
> I thought about making it a separate change, but it is hard.
> - If we land `DwarfDebug` fix first, it will break all programs with indirect calls and debug info without this `getCalleeOp` fix.
> - If we land `getCalleeOp` fix first, there is no way to test that change because `DwarfDebug` is currently the only place we use `getCalleeOp` for indirect calls.
> 
> By the way, I fixed the summary to include this fix.
OK, thanks


================
Comment at: llvm/test/DebugInfo/WebAssembly/call-site.ll:23
+; CHECK:                 DW_AT_name  ("call_indirect")
+; CHECK: 0x00000065:     DW_TAG_GNU_call_site
+
----------------
why don't we have here an additional CHECK for the register that holds the indirect call (`DW_AT_GNU_call_site_target`)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102978



More information about the llvm-commits mailing list