<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Jun 17, 2015 at 12:24 PM Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">----- Original Message -----<br>
> From: "Dan Gohman" <<a href="mailto:dan433584@gmail.com" target="_blank">dan433584@gmail.com</a>><br>
> To: <a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a><br>
> Sent: Wednesday, June 17, 2015 11:16:21 AM<br>
> Subject: [LLVMdev] [RFC] WebAssembly Backend<br>
><br>
> Hello all,<br>
><br>
> WebAssembly [0] its a new virtual ISA being designed to efficiently<br>
> run compiled code in web browsers and other things, starting with<br>
> C/C++, and eventually many other languages [1]. WebAssembly<br>
> distinguishes itself from other virtual ISAs with optimizations to<br>
> reduce download size and decode time, strong portability and<br>
> predictability invariants (for example, the base has no undefined<br>
> behavior in the C/C++ sense), and participation from several browser<br>
> vendors.<br>
><br>
> We're interested in developing and contributing an LLVM backend to<br>
> target this new ISA. There are many interesting technical aspects<br>
> that<br>
> we’re excited to discuss with the LLVM community. Before we get<br>
> started though, we need to figure out how to do our development. Most<br>
> backends in LLVM were initially submitted in monolithic form and<br>
> developed incrementally thereafter. However, we have contributors<br>
> from<br>
> multiple organizations, and a monolithic patch wouldn’t accurately<br>
> reflect the separate contributions.<br>
><br>
> Would the LLVM community be willing to let us start a new target from<br>
> scratch within the LLVM tree, following normal LLVM<br>
> incremental-development practices? The target would naturally start<br>
> as<br>
> "experimental", excluded from the default build. The code<br>
> organization<br>
> would look like any other backend, with everything under<br>
> lib/Target/WebAssembly except for various bits of configury that any<br>
> backend needs. We have need of the functionality provided by<br>
> SelectionDAG, MI and others, so this will pretty clearly be a<br>
> backend,<br>
> rather than a specialized serialization. Also, the people leading the<br>
> project are JF Bastien and Dan Gohman, existing LLVM contributors<br>
> familiar with various relevant areas of LLVM.<br>
><br>
> Additionally, there are opportunities to refactor generic<br>
> infrastructure in LLVM to better support the needs of virtual ISAs,<br>
> including those in LLVM already and possibly more in the future.<br>
> Working in LLVM from the start would make collaboration with the rest<br>
> of the community easier.<br>
<br>
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.<br></blockquote><div><br></div><div>FWIW, I agree.</div><div><br></div><div>However, I also suggested this approach, so I'm probably biased. ;] I just wanted to explicitly say that I think this is a great path forward and I'm cautiously optimistic about the entire effort.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
 -Hal<br>
<br>
><br>
> We look forward to your feedback and questions. Thanks!<br>
><br>
>         - The WebAssembly Community Group<br>
><br>
> [0] <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_WebAssembly_design_blob_master_README.md&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=VslOtVlKaxon_fbRWjwpWlBmhZudNVLFcoGN8auqOgc&s=OPF-uhYE1mWFKPDpvW3m7fjpae3KgKQ8DnbzJVnVi9I&e=" rel="noreferrer" target="_blank">https://github.com/WebAssembly/design/blob/master/README.md</a><br>
> [1]<br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_WebAssembly_design_blob_master_HighLevelGoals.md&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=VslOtVlKaxon_fbRWjwpWlBmhZudNVLFcoGN8auqOgc&s=FS75caNGjNOkStYcRj8hEpAflFA0WyoNj7DtrC9WD_E&e=" rel="noreferrer" target="_blank">https://github.com/WebAssembly/design/blob/master/HighLevelGoals.md</a><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
<br>
--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div></div>