[PATCH] D150803: Add a new `wasm_custom` clang attribute for marking functions.

2023-06-13 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. This revision is now accepted and ready to land. Nice! Comment at: lld/test/wasm/merge-custom-attr-section.ll:47 +} + +attributes #0 = { "wasm-custom"="custom0" } Is there some reason we can't use assembly

[PATCH] D150803: Add a new `wasm_custom` clang attribute for marking functions.

2023-06-13 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D150803#4419370 , @sunfish wrote: > Would it make sense to call this "jspi" in practice, rather than "async"? > Even though this isn't clang's decision per se anymore, it seems like the > reasoning earlier in this review would

[PATCH] D41966: [WebAssembly] Add -lc++-abi when linking C++ programs

2018-01-11 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: cfe-commits, sunfish, aheejin, jgravelle-google, dschuff, jfb. Repository: rC Clang https://reviews.llvm.org/D41966 Files: lib/Driver/ToolChains/WebAssembly.cpp lib/Driver/ToolChains/WebAssembly.h Index: lib/Driver/ToolChains/WebAs

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-11 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. This revision is now accepted and ready to land. Nice. I happened to just upload a similar (but orthogonal) patch: https://reviews.llvm.org/D41966 Repository: rC Clang https://reviews.llvm.org/D41937 _

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-11 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: lib/Driver/ToolChains/WebAssembly.cpp:151 + case ToolChain::CST_Libcxx: +CmdArgs.push_back("-lc++"); +break; Can you add -lc++abi too? Then I can drop D41966 Repository: rC Clang https://reviews.llvm.org/D41

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-12 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. lgtm https://reviews.llvm.org/D41937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections by default

2018-01-30 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 132098. sbc100 added a comment. Herald added subscribers: cfe-commits, sunfish. - update tests Repository: rC Clang https://reviews.llvm.org/D37831 Files: lib/Driver/ToolChains/CommonArgs.cpp test/Driver/wasm-toolchain.c test/Driver/wasm-toolchain.c

[PATCH] D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections

2018-01-30 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. After a little discussion about this and the -gc-sections linker flag, the augments for the tools having sensible defaults seem to be winning. This means we don't need the driver to pass these options, which makes our commands lines shorter, and it also means that people

[PATCH] D117888: [clang][driver][wasm] Support -stdlib=libstdc++ for WebAssembly

2022-01-28 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:448 +addSystemInclude(DriverArgs, CC1Args, + getDriver().SysRoot + "/include/c++/11"); +break; Where does `11` come from here? Do other drivers hard

[PATCH] D118571: [clang][WebAssembly] Imply -fno-threadsafe-static when threading is disabled

2022-01-30 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, dschuff. sbc100 requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. When we don't enable atomics we completely disabled threading in wh

[PATCH] D118571: [clang][WebAssembly] Imply -fno-threadsafe-static when threading is disabled

2022-01-30 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 404402. sbc100 added a comment. - revert unrelated line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118571/new/ https://reviews.llvm.org/D118571 Files: clang/lib/Basic/Targets/WebAssembly.cpp clang/test/C

[PATCH] D118573: [clang][WebAssemmbly]: Call TargetInfo::adjust in derived method.

2022-01-30 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: wingo, jgravelle-google, dschuff. sbc100 requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. The superclass method handles a bunch of useful things. For example it applies flags su

[PATCH] D117888: [clang][driver][wasm] Support -stdlib=libstdc++ for WebAssembly

2022-01-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:448 +addSystemInclude(DriverArgs, CC1Args, + getDriver().SysRoot + "/include/c++/11"); +break; tbaeder wrote: > sbc100 wrote: > > Where does `11` com

[PATCH] D118571: [clang][WebAssembly] Imply -fno-threadsafe-static when threading is disabled

2022-01-31 Thread Sam Clegg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG45ad3467b708: [clang][WebAssembly] Imply -fno-threadsafe-static when threading is disabled (authored by sbc100). Repository: rG LLVM Github Monore

[PATCH] D117888: [clang][driver][wasm] Support -stdlib=libstdc++ for WebAssembly

2022-02-01 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:445 addSystemInclude(DriverArgs, CC1Args, - getDriver().SysRoot + "/include/c++/v1"); + getDriver().SysRoot + "/include/c++/11"); +break; ---

[PATCH] D117888: [clang][driver][wasm] Support -stdlib=libstdc++ for WebAssembly

2022-02-01 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:544 + + if (Version.empty()) { +// FIXME: Fallback correct? tbaeder wrote: > sbc100 wrote: > > Just early return here if no headers can be found? Looking at Gnu.cpp it >

[PATCH] D117888: [clang][driver][wasm] Support -stdlib=libstdc++ for WebAssembly

2022-02-02 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. This revision is now accepted and ready to land. Great! Thanks for working on this.I'm curious what toolchain you are working that uses GNU libstdc++? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117888/new/ https://reviews.

[PATCH] D120251: [clang][driver][wasm] Fix libstdc++ target-dependent include dir

2022-02-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D120251#3336981 , @tbaeder wrote: > @sbc100 Do you think we should add `/backward` as well? `Gnu.cpp` does that > it seems: > https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Gnu.cpp#L2959-L2960 I do

[PATCH] D121151: [WebAssembly] Add new target feature in support of 'extended-const' proposal

2022-03-07 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: wingo, dang, ecnelises, sunfish, hiraditya, jgravelle-google, dschuff. Herald added a project: All. sbc100 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, aheejin. Herald added projects: clang, LLVM. W

[PATCH] D121151: [WebAssembly] Add new target feature in support of 'extended-const' proposal

2022-03-07 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Surprising amount of boilerplate here.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121151/new/ https://reviews.llvm.org/D121151 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D121151: [WebAssembly] Add new target feature in support of 'extended-const' proposal

2022-03-07 Thread Sam Clegg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc832edfd3fbc: [WebAssembly] Add new target feature in support of 'extended-const' proposal (authored by sbc100). Repository: rG LLVM Github Monore

[PATCH] D52524: Add -Wpoison-system-directories warning

2021-04-27 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Would it make sense to have this apply to system library paths too? i.e. `-L/usr/local/lib`. We have a bespoke mechanism in emscripten right now that is a bit more flexible but I'd love to simple replace it with `-Wpoison-system-directories`. The name "system director

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Does this mean that the magic `__stack_pointer` global can be referenced at the IR level? I wonder if there are some hacks around handling of `__stack_pointer` that could be removed after this lands? Comment at: llvm/lib/Target/WebAssembly/Utils/WebA

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1378 - if (GA->getAddressSpace() != 0) -fail(DL, DAG, "WebAssembly only expects the 0 address space"); Is it worth checking this is within `WasmAddressSpace`

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h:40 + // appropriate. + WASM_ADDRESS_SPACE_OBJECT = 1 +}; tlively wrote: > sbc100 wrote: > > What does "object" mean here? Are we just talking about reference ty

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h:40 + // appropriate. + WASM_ADDRESS_SPACE_OBJECT = 1 +}; tlively wrote: > sbc100 wrote: > > tlively wrote: > > > sbc100 wrote: > > > > What does "object" mean her

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h:40 + // appropriate. + WASM_ADDRESS_SPACE_OBJECT = 1 +}; tlively wrote: > sbc100 wrote: > > tlively wrote: > > > sbc100 wrote: > > > > tlively wrote: > > > > > sb

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. How about `WASM_ADDRESS_SPACE_NON_INTEGRAL` or `WASM_ADDRESS_SPACE_OPAQUE` ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101608/new/ https://reviews.llvm.org/D101608 ___ cfe-com

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-06 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. managed seems reasonable yes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101608/new/ https://reviews.llvm.org/D101608 ___ cfe-commits mailing lis

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-06 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1279 + if (const GlobalAddressSDNode *GA = dyn_cast(Op)) +return WebAssembly::isManagedAddressSpace(GA->getAddressSpace()); + sunfish wrote: > tlively wrote: >

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-06 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1279 + if (const GlobalAddressSDNode *GA = dyn_cast(Op)) +return WebAssembly::isManagedAddressSpace(GA->getAddressSpace()); + sunfish wrote: > sbc100 wrote: > >

[PATCH] D99259: [WebAssembly] Don't inline -emscripten-cxx-exceptions-allowed functions

2021-03-24 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. This revision is now accepted and ready to land. Nice! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99259/new/ https://reviews.llvm.org/D99259 ___

[PATCH] D74531: [WebAssembly] Emit clangast in custom section aligned by 4 bytes

2021-10-18 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/lib/MC/WasmObjectWriter.cpp:374 + // Custom sections in wasm also have a string identifier with extra paddings + // for alignment for special sections. + // TODO: support section alignment at asm and llvm level? I

[PATCH] D74531: [WebAssembly] Emit clangast in custom section aligned by 4 bytes

2021-10-19 Thread Sam Clegg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1813fde9cc0b: [WebAssembly] Emit clangast in custom section aligned by 4 bytes (authored by kateinoigakukun, committed by sbc100). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D108735: [clang][Emscripten] Define __unix family of macros

2021-08-25 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: wingo, dschuff. sbc100 requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. This will allow us to remove these from the downstream driver: https://github.com/emscripten-core/emscrip

[PATCH] D108735: [clang][Emscripten] Define __unix family of macros

2021-08-25 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Landing this will allow us to land https://github.com/emscripten-core/emscripten/pull/14953 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108735/new/ https://reviews.llvm.org/D108735 ___

[PATCH] D108735: [clang][Emscripten] Define __unix family of macros

2021-08-25 Thread Sam Clegg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc05d30e444a1: [clang][Emscripten] Define __unix family of macros (authored by sbc100). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

<    1   2   3   4