[PATCH] [WebAssembly] Skeleton WebAssembly target

Dan Gohman dan433584 at gmail.com
Fri Jun 19 14:10:56 PDT 2015

On Fri, Jun 19, 2015 at 11:34 AM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
> I am really happy to see this!
> I just tried to build it with cmake and got some errors:
> WebAssemblyInstPrinter.cpp:28:10: fatal error:
> 'WebAssemblyGenAsmWriter.inc' file not found
> WebAssemblyISelDAGToDAG.cpp:60:10: fatal error:
> 'WebAssemblyGenDAGISel.inc' file not found

Fixed now.

> Do code models and relocation models have any meaning in webassembly?

Ah, oops. Yes, WebAssembly doesn't need this (at least for now). I've
now removed it.

> Is SIMD an optional feature?

Yes. There will be a few options, including using SIMD anyway, with
emulation on platforms that don't actually have it, and dynamically
querying whether SIMD is "fast" so that an application can decide what
it wants to do.

> Atomics? Is there a memory model? You mentioned that there is nothing
> like C's undefined behavior...

There will be full threading support with shared memory,
synchronization primitives, and atomics. My earlier remark referred to
undefined behavior in the C/C++ sense, in which the entire state of
the program enters into jeopardy. With threads there is naturally some
nondeterminsim, but the consequences of such nondeterminism have

> It is a bit funny that webassembly is an OS. Targeting web assembly
> always implies the same apis, no?

The meaning of the OS field in the target triple is usually about ABI
concerns, rather than actual system call functionality. We're
definitely planning for WebAssembly to have a common ABI when it comes


More information about the llvm-commits mailing list