[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-11 Thread Heejin Ahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371708: [WebAssembly] Add -fwasm-exceptions for wasm EH (authored by aheejin, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-06 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 219203. aheejin added a comment. - Error out when -fwasm-exceptions is specified with -enable-emscripten-cxx-exceptions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67208/new/ https://reviews.llvm.org/D67208

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-06 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D67208#1661694 , @tlively wrote: > What happens when users have exceptions in their code but don't pass Do they > get the old SJLJ emulated exception handling? The current emscripten EH is enabled by `-mllvm -enable-emscrip

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. Thanks for the clarification. It makes sense to me that `-mexception-handling` only enables the architectural feature and a separate flag enables the behavior change. This is indeed consistent with how `-pthread` works. What happens when users have exceptions in their c

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In 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

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In 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

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Oh, you're right, I'm conflating `-mexception-handling` with `-fexceptions`. And also `-fno-exceptions` with `noexcept`. So... just forget I was here Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Derek, are you saying that `-mexception-handling` is somehow related to `-fno-exceptions`. What is the relationship?I wasn't aware this change was related to `-fno-exceptions`. `-pthreads` enabling `-matomics` and `-mbulk-memory`make some sense because each of t

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D67208#1659972 , @dschuff wrote: > If this is to be like `-fdwarf-exceptions` I assume the idea is that > eventually it will default on when targeting wasm, and become one of those > flags that most users never set. In that ca

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. In D67208#1659941 , @sbc100 wrote: > But why not make -mexception-handling be the option that enabled everything? > I mean -mexception-handling is a flag we have today.. if you add > -fwasm-exceptions what does -mexception-han

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. If this is to be like `-fdwarf-exceptions` I assume the idea is that eventually it will default on when targeting wasm, and become one of those flags that most users never set. In that case it really just selects the default exception model, and thus it should be compat

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. But why not make -mexception-handling be the option that enabled everything? I mean -mexception-handling is a flag we have today.. if you add -fwasm-exceptions what does -mexception-handling meaning? Is it still useful? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added a comment. @tlively @sbc100 What I wanted was to make `-fwasm-exceptions` as something like `-pthreads`, which serves as the only flag that needs to be turned on and turns on all other necessary flags, such as `+matomics`, `+mbulk-memory`, and `--shared-memory`. I think all those

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Is there some reason why clang can't pass the -exception-model=wasm flag programatically to llc when -mmexception-handling is set? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67208/new/ https://reviews.llvm.org/D67208

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I don't really see why we can't just have the existing `-mexception-handling` take on this new meaning? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67208/new/ https://reviews.llvm.org/D67208 ___

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. Is there a plan to turn this on by default at some point, or will users always have to opt-in to using exceptions? Also, would it make sense to automatically turn this feature on if the user instead supplies `-mexception-handling` to turn on the target feature? Reposi

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-04 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 218834. aheejin added a comment. - Remove a blank line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67208/new/ https://reviews.llvm.org/D67208 Files: clang/include/clang/Basic/LangOptions.def clang/includ

[PATCH] D67208: [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-04 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin created this revision. aheejin added reviewers: dschuff, tlively. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100, aprantl. Herald added a project: clang. This adds `-fwasm-exceptions` (in similar fashion with `-fdwarf-exceptions` or `-fsjlj-exceptions`) that turn