[PATCH] D92840: [WebAssembly] call_indirect causes indirect function table import

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 09:52:02 PST 2020


aardappel added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt:7
   MCParser
+  WebAssemblyCodeGen
   WebAssemblyInfo
----------------
wingo wrote:
> aheejin wrote:
> > sbc100 wrote:
> > > It could be that MC may be designed to specifically not include CodeGen stuff?  Separation of concerns and all that.
> > > 
> > > Perhaps this oversteps some boundary?  I'm not familiar enough the design goals of llvm WRT compartmentalization to know if this is some kind of violation.  Does anyone know if this is problem?
> > > 
> > I don't know; I just discovered the linking works that way, but I'm not sure whether it violates some LLVM convention or something. Other AsmParser directories don't seem to make use of their corresponding CodeGen libraries though.
> I am both heartened and disheartened to see that you all share my ignorance in this regard :)  I am happy to do whatever you all think best.  The possibilities I see are:
> 
>  1. method on MCContext (discussion: https://reviews.llvm.org/D90948?id=305170#inline-851687)
>  2. WebAssemblyUtilities, and link to codegen
>  3. just copy-paste the functionality
>  4. make a new utils library including just this one function.
> 
> Let me know your preference please :)
Yes, this doesn't seem like a good idea. The MC code is used by quite a few utilities and is intended to be separate from CodeGen. We've had to jump thru hoops a few times before to keep the two separate. I believe there is already a header that contains shared utility functions (either in the WebAssemblyInfo target, or a header like WebAssemblyMCTargetDesc.h)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92840



More information about the llvm-commits mailing list