[PATCH] D115511: [WebAssembly] Lower global syms representing tables with .tabletype

Paulo Matos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 13 03:32:37 PST 2021


pmatos added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h:118
+  // The symbol declares a funcref table
+  MO_SYM_IS_FUNCREF_TABLE,
 };
----------------
sbc100 wrote:
> pmatos wrote:
> > sbc100 wrote:
> > > I'm not sure this enumeration is best place to declare that type of a symbols.  These other values all refer to how the symbol is used, but what type the symbol is.   For example that distinction between function and data symbols does not appear here.
> > > 
> > This is the place to set TargetFlags, and we cannot set the type of the symbol directly here because we don't have access to the MCSymbol, so as far as I can understand we need to set a TargetFlag and later on set the right MCSymbol type based on the address TargetFlags. Do you have a suggestion on where to set this information if not as a TargetFlag?
> I'm afraid its been a while since I touched this code.. so I'm not sure I have any useful suggestions other than looking at existing code and practices.
Thanks, I have been looking and didn't find a better place to tag a symbol with a property so that the MC layer can 'fix' the symbol type. I will keep looking, if you think this is an improper place for the symbol type tag.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115511



More information about the llvm-commits mailing list