[PATCH] D115749: [WebAssembly] Emit symbol labels for table global symbols

Paulo Matos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 21 03:34:00 PST 2021


pmatos added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/externref-tableset.ll:97
 
-; CHECK: .tabletype externref_table, externref
+; CHECK-LABEL: externref_table:
+;  CHECK-NEXT: .tabletype externref_table, externref
----------------
sbc100 wrote:
> pmatos wrote:
> > sbc100 wrote:
> > > Wouldn't this line be declaring a defined table rather than an external/undefined one?
> > But we are defining a table, right? In line 6 with `@externref_table = local_unnamed_addr addrspace(1) global [0 x %externref] undef`.
> > 
> > You are right, I think in that `.tabletype` is enough to access an external table, which is why we don't need one for the `__funcref_call_table` in `funcref-table_call.ll`.
> Oh I see, in that case that makes sense.   I was thrown off by the `undef` on that line.. what does that signal?
That just makes the initial table as undefined. Although I think it could be null as well. Unsure in practical terms what the different is though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115749



More information about the llvm-commits mailing list