[LLVMdev] [RFC] WebAssembly Backend

Tom Stellard tom at stellard.net
Thu Jun 18 06:30:51 PDT 2015


On Wed, Jun 17, 2015 at 09:16:21AM -0700, Dan Gohman wrote:
> Hello all,
> 
> WebAssembly [0] its a new virtual ISA being designed to efficiently
> run compiled code in web browsers and other things, starting with
> C/C++, and eventually many other languages [1]. WebAssembly
> distinguishes itself from other virtual ISAs with optimizations to
> reduce download size and decode time, strong portability and
> predictability invariants (for example, the base has no undefined
> behavior in the C/C++ sense), and participation from several browser
> vendors.
> 
> We're interested in developing and contributing an LLVM backend to
> target this new ISA. There are many interesting technical aspects that
> we’re excited to discuss with the LLVM community. Before we get
> started though, we need to figure out how to do our development. Most
> backends in LLVM were initially submitted in monolithic form and
> developed incrementally thereafter. However, we have contributors from
> multiple organizations, and a monolithic patch wouldn’t accurately
> reflect the separate contributions.
> 

> Would the LLVM community be willing to let us start a new target from
> scratch within the LLVM tree, following normal LLVM
> incremental-development practices? The target would naturally start as
> "experimental", excluded from the default build. The code organization
> would look like any other backend, with everything under
> lib/Target/WebAssembly except for various bits of configury that any
> backend needs. We have need of the functionality provided by
> SelectionDAG, MI and others, so this will pretty clearly be a backend,
> rather than a specialized serialization. Also, the people leading the
> project are JF Bastien and Dan Gohman, existing LLVM contributors
> familiar with various relevant areas of LLVM.
> 
> Additionally, there are opportunities to refactor generic
> infrastructure in LLVM to better support the needs of virtual ISAs,
> including those in LLVM already and possibly more in the future.
> Working in LLVM from the start would make collaboration with the rest
> of the community easier.
> 
> We look forward to your feedback and questions. Thanks!
> 

Hi,

This seems interesting, I have a few questions:


Has the ISA been finalized yet or is it still a work in progress?  Will
there be a fixed number of registers?

How will the ISA be transformed to machine code?

Why do you want to develop a full backend as opposed to a simple LLVM
IR translation pass that converts IR directly to WebAssembly?

-Tom

>         - The WebAssembly Community Group
> 
> [0] https://github.com/WebAssembly/design/blob/master/README.md
> [1] https://github.com/WebAssembly/design/blob/master/HighLevelGoals.md
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list