[PATCH] D96001: [WebAssembly][lld] Preassign table number 0 to indirect function table for MVP inputs

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 09:00:52 PST 2021


sbc100 added inline comments.


================
Comment at: lld/wasm/Driver.cpp:804
+  if (existing && existing->hasPreassignedTableNumberZero())
+    sym->preassignTableNumberZero();
   return sym;
----------------
Can these two lines be moved into `SymbolTable::addSyntheticTable` (which already has a check for an existing symbol).   Then you don't need to pass the extra `existing` arg here, and you don't need to extra `existingTable` table below?

hmm.. maybe that would make addSyntheticTable a little less tidy, but it seems like logical place... either that or replaceSymbol itself. 

In general this notion of preassigned index seems to complicate things in a way that I'm not a fan of.    I wish we could find a simpler way to force the indirect table to always have index 0.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96001



More information about the llvm-commits mailing list