[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH
Heejin Ahn via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 5 18:17:33 PDT 2019
aheejin added a comment.
In D67208#1660041 <https://reviews.llvm.org/D67208#1660041>, @sbc100 wrote:
> `-pthreads` enabling `-matomics` and `-mbulk-memory`make some sense because each of those low level flags might make sense on its own. But if `-fwasm-exceptions` only going to enable `-mexception-handling` then I'm not sure I see the point in adding it. Or is there something else it will enable?
We also needs to enable `-exception-model=wasm` in the backend... but we want to enable that if `-mexception-handling` is given, as you said.
The more important reason is I'm not sure if using architectural flags to control features is a good idea. They are pretty low-level, and they only exist because we develop wasm features are developed one by one; if we were able to put everything into MVP they wouldn't exist. Wouldn't we someday turn on all these architectural flags on by default? And it's possible that we want to use the current emscripten-based exception even if we have all architectural features turned on.
The other reason is for consistency with other exception model flags: All exception handling options here <https://github.com/llvm/llvm-project/blob/bee0f7ddd70120a05605682487bb34f0a074167b/llvm/include/llvm/MC/MCTargetOptions.h#L17-L24> except ARM has its own `-f***-exceptions` option.
Anyway, that's my reasoning, but people might disagree. What do you think? @dschuff @tlively
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67208/new/
https://reviews.llvm.org/D67208
More information about the cfe-commits
mailing list