Page MenuHomePhabricator

[WebAssembly] Implement "Reactor" mode
Needs ReviewPublic

Authored by sunfish on Jun 5 2019, 11:01 AM.
This revision needs review, but there are no reviewers specified.



This is an experimental patch which adds a -mexec-model= command-line flag. The default value is "command" which is no change from the current behavior. The other option is "reactor" which enables an experimental Reactor ABI.

By default, clang/LLVM don't do much differently for Reactors -- it just picks a different crt1.o and entry point name -- so I won't go into detail here. I'll open a PR for wasi-libc to add the libc side of this, and I'll describe the ABI in detail there, and I expect most of the discussion will happen there.

Diff Detail


Event Timeline

sunfish created this revision.Jun 5 2019, 11:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2019, 11:01 AM

The wasi-libc PR is here.

sbc100 added a comment.Jun 5 2019, 3:40 PM

Add a test case to clang/test/Driver/wasm-toolchain.c?


Maybe call this Crt1 so it doesn't looks so much like crtZero?


I have a slight preference for crt1-foo.o over foo-crt1.o. But I've tell where that preference comes from :)


Shouldn't this be nullptr?

Also, maybe move the if Entry block inside this condition so this line can declare entry avoid the extra declaration above?


I assume that all he users -Wl args come after.. so its still possible to set --entry on the command line?

sbc100 added a comment.Jun 5 2019, 3:41 PM

lgtm with some comments