[LLVMdev] [RFC] WebAssembly Backend

Hal Finkel hfinkel at anl.gov
Wed Jun 17 12:20:03 PDT 2015


----- Original Message -----
> From: "Dan Gohman" <dan433584 at gmail.com>
> To: llvmdev at cs.uiuc.edu
> Sent: Wednesday, June 17, 2015 11:16:21 AM
> Subject: [LLVMdev] [RFC] WebAssembly Backend
> 
> 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.

I agree, developing the backend in tree is the best path. Specifically, it is the best way for the community to monitor the development and ensure proper test coverage. Obviously, there are some number of files needed for a backend to be minimally functional, and I think that putting those together and submitting them for review as a new experimental backend is perfectly appropriate.

 -Hal

> 
> We look forward to your feedback and questions. Thanks!
> 
>         - 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
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-dev mailing list