[clang] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-12-02 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 approved this pull request. https://github.com/llvm/llvm-project/pull/112035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement %llvm.thread.pointer intrinsic. NFC (PR #117817)

2024-11-26 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 updated https://github.com/llvm/llvm-project/pull/117817 >From 933be68425babeefba6415f5aebc31b0f2d34265 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 26 Nov 2024 16:38:00 -0800 Subject: [PATCH] [WebAssembly] Implement %llvm.thread.pointer intrinsic. NFC We can s

[clang] [llvm] [WebAssembly] Implement %llvm.thread.pointer intrinsic. NFC (PR #117817)

2024-11-26 Thread Sam Clegg via cfe-commits
sbc100 wrote: > > Generally LGTM; maybe we also want to add a test for > > `__builtin_thread_pointer` to clang/test/CodeGen/builtins-wasm.c > > I only see that testing in clang/test/CodeGen/builtins-arm64.c, most > platforms don't seem to test this. Done! https://github.com/llvm/llvm-project

[clang] [llvm] [WebAssembly] Implement %llvm.thread.pointer intrinsic. NFC (PR #117817)

2024-11-26 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 updated https://github.com/llvm/llvm-project/pull/117817 >From 9578cf12c95d2511975b9ede6edb3bddc5f5da74 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 26 Nov 2024 16:38:00 -0800 Subject: [PATCH] [WebAssembly] Implement %llvm.thread.pointer intrinsic. NFC We can s

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Sam Clegg via cfe-commits
sbc100 wrote: > I guessed that since the "generic" CPU is already out there forcing various > binary decoders to support this feature, it wouldn't be controversial for > "lime1" to do it too. I do think its reasonable for all those decoders to support overlong LEBs. But I think I don't see

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Sam Clegg via cfe-commits
sbc100 wrote: > The short answer is that's what the [Lime1 CPU calls > it](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#lime1) > 😄 . > > > Can you explain why you want call-indirect-overlong in lime1? Is it because > > you want to be able to link files compiles with multi

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Sam Clegg via cfe-commits
sbc100 wrote: Can you explain why you want `call-indirect-overlong` in lime1? Is it because you want to be able to link files compiles with multi-table? i.e. do you want/expect type relocations at every call_indirect site? If so then perhaps a better name might be `call-indirect-relocatabl

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-20 Thread Sam Clegg via cfe-commits
@@ -854,9 +854,15 @@ and `-mbulk-memory` flags, which correspond to the [Bulk Memory Operations] and [Non-trapping float-to-int Conversions] language features, which are [widely implemented in engines]. +A new Lime1 target CPU is added, -mcpu=lime1. This CPU follows the defin

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-11-18 Thread Sam Clegg via cfe-commits
sbc100 wrote: I used `wasm-reduce` on the `.ll` file and it looks like you were correct. The result was: ``` target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20" target triple = "wasm32-unknown-emscripten"

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-11-18 Thread Sam Clegg via cfe-commits
sbc100 wrote: Perhaps yes. Do you know of any way to reduce the input program into something we can try to inspect. The preprocessed C++ file is over 100,000 lines :-/ https://github.com/llvm/llvm-project/pull/107257 ___ cfe-commits mailing list cf

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-11-18 Thread Sam Clegg via cfe-commits
sbc100 wrote: I bisecting this emscripten (wasm32-unknown-emscripten) miscompile to this PR: https://github.com/emscripten-core/emscripten/issues/22794. It looks like llvm is generating a load with a negative office (which is not supported under wasm). There is a reproducer in that but and I

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Sam Clegg via cfe-commits
@@ -2,7 +2,7 @@ ; RUN: llvm-as -o %t.o %s ; RUN: llvm-as -o %t2.o %S/Inputs/libcall-archive.ll ; RUN: llvm-ar rcs %t.a %t2.o -; RUN: wasm-ld -o %t %t.o %t.a +; RUN: wasm-ld -mllvm -mattr=-bulk-memory -o %t %t.o %t.a sbc100 wrote: I was thinking that might make

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-14 Thread Sam Clegg via cfe-commits
@@ -2,7 +2,7 @@ ; RUN: llvm-as -o %t.o %s ; RUN: llvm-as -o %t2.o %S/Inputs/libcall-archive.ll ; RUN: llvm-ar rcs %t.a %t2.o -; RUN: wasm-ld -o %t %t.o %t.a +; RUN: wasm-ld -mllvm -mattr=-bulk-memory -o %t %t.o %t.a sbc100 wrote: Why is this needed? Should th

[clang] [compiler-rt] [lld] [llvm] [Coverage][WebAssembly] Add initial support for WebAssembly/WASI (PR #111332)

2024-10-07 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 commented: lld changes lgtm https://github.com/llvm/llvm-project/pull/111332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [lld] [llvm] [Coverage][WebAssembly] Add initial support for WebAssembly/WASI (PR #111332)

2024-10-07 Thread Sam Clegg via cfe-commits
@@ -451,6 +452,18 @@ void SharedFile::parse() { } } +/// Returns the alignment for a custom section. This is used to concatenate +/// custom sections with the same name into a single custom section. sbc100 wrote: We don't use the /// style comment anywhere

[clang] [compiler-rt] [lld] [llvm] [Coverage][WebAssembly] Add initial support for WebAssembly/WASI (PR #111332)

2024-10-07 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 edited https://github.com/llvm/llvm-project/pull/111332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 approved this pull request. https://github.com/llvm/llvm-project/pull/98373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Sam Clegg via cfe-commits
sbc100 wrote: I think the problem with creating a dummy shell script is that it would need to work on windows too.. I guess it would be better to have test that run on some platforms that no test at all. In any case, I'm OK with having this land as-is for now, since this is feature that is al

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 approved this pull request. Can we write a test for this? https://github.com/llvm/llvm-project/pull/98373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add flag to opt out of wasm-opt (PR #95208)

2024-07-10 Thread Sam Clegg via cfe-commits
sbc100 wrote: I think should never not be running wasm-opt when the linker is wasm-component-ld. Thats not going to work, at least not any time soon. How to integrate wasm-opt into wasm-component-ld is a good question. I imagine @alexcrichton has some ideas in that area. https://github.co

[clang] Add flag to opt out of wasm-opt (PR #95208)

2024-06-24 Thread Sam Clegg via cfe-commits
sbc100 wrote: I wonder if there is some why to avoiding adding this new option globally like this and instead limit it in scope the wasm target in some way? https://github.com/llvm/llvm-project/pull/95208 ___ cfe-commits mailing list cfe-commits@li

[libcxxabi] [libunwind] [WebAssembly] __USING_WASM_EXCEPTIONS__ -> __WASM_EXCEPTIONS__ (PR #92840)

2024-05-21 Thread Sam Clegg via cfe-commits
sbc100 wrote: > It is hard to fix the clang-format errors because the modified files > generally don't conform to the clang-format style anyway, so clang-format my > change currently affects hundreds of unrelated lines. > > ``` > aheejin@aheejin:~/llvm-project/libunwind$ git clang-format main

[libcxxabi] [libunwind] [WebAssembly] __USING_WASM_EXCEPTIONS__ -> __WASM_EXCEPTIONS__ (PR #92840)

2024-05-21 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 approved this pull request. https://github.com/llvm/llvm-project/pull/92840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Define __WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 approved this pull request. lgtm. @dschuff WDYT? https://github.com/llvm/llvm-project/pull/92604 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Sam Clegg via cfe-commits
@@ -1006,6 +1006,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, else if (LangOpts.hasDWARFExceptions() && (TI.getTriple().isThumb() || TI.getTriple().isARM())) Builder.defineMacro("__ARM_DWARF_EH__"); + else if (LangOpts.hasWasmExceptions()

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 edited https://github.com/llvm/llvm-project/pull/92604 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Sam Clegg via cfe-commits
@@ -1006,6 +1006,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, else if (LangOpts.hasDWARFExceptions() && (TI.getTriple().isThumb() || TI.getTriple().isARM())) Builder.defineMacro("__ARM_DWARF_EH__"); + else if (LangOpts.hasWasmExceptions()

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Sam Clegg via cfe-commits
@@ -1006,6 +1006,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, else if (LangOpts.hasDWARFExceptions() && (TI.getTriple().isThumb() || TI.getTriple().isARM())) Builder.defineMacro("__ARM_DWARF_EH__"); + else if (LangOpts.hasWasmExceptions()

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-02 Thread Sam Clegg via cfe-commits
sbc100 wrote: This change recently rolled into the emscripten SDK and seems to be breaking the build of regal. I've not invistigated this yet, and its not our code: ``` em++ -c /usr/local/google/home/sbc/dev/wasm/emscripten/cache/ports/regal/regal-version_7/src/regal/RegalIff.cpp -o /usr/lo

[clang] [llvm] [Pipelines][Coroutines] Tune coroutine passes only for ThinLTO pre-link pipeline (PR #90690)

2024-04-30 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 approved this pull request. I'm not very familiar with this code, but it looks reasonable on the surface. https://github.com/llvm/llvm-project/pull/90690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [llvm] [Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (PR #90310)

2024-04-30 Thread Sam Clegg via cfe-commits
sbc100 wrote: The function being compiled in the crash looks like this one: https://github.com/emscripten-core/emscripten/blob/56547157a37e25fb31f9193461a2c88bdaa44385/system/lib/embind/bind.cpp#L66-L68 https://github.com/llvm/llvm-project/pull/90310

[clang] [llvm] [Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (PR #90310)

2024-04-30 Thread Sam Clegg via cfe-commits
sbc100 wrote: This change seems to causing the auto-roller for emscripten to fail due to a crash in LTO. See https://ci.chromium.org/ui/p/emscripten-releases/builders/luci.emscripten-releases.ci/linux-test-suites ``` PromoteIntegerOperand Op #3: t22: i32,ch = llvm.coro.subfn.addr t26, Target

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

2024-04-26 Thread Sam Clegg via cfe-commits
sbc100 wrote: This change seems to have caused a test in emscripten to starting failing with `argument unused during compilation: '-O2'`: https://github.com/emscripten-core/emscripten/pull/21841. Is that an intended side effect of this change? The fix on our end seems reasonable but posting

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Sam Clegg via cfe-commits
@@ -147,19 +147,25 @@ void WebAssemblyTargetInfo::setFeatureEnabled(llvm::StringMap &Features, bool WebAssemblyTargetInfo::initFeatureMap( llvm::StringMap &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector &FeaturesVec) const { - if (CPU == "bleedin

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 Thread Sam Clegg via cfe-commits
sbc100 wrote: After this lands does that mean that all object files will have `multi-value` in the features section? Or only object files that actually use `mutli-value`? https://github.com/llvm/llvm-project/pull/80923 ___ cfe-commits mailing li

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-25 Thread Sam Clegg via cfe-commits
sbc100 wrote: Is this good to land now? @yamt do you have commit access or should @aheejin or myself land this? https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-18 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 approved this pull request. https://github.com/llvm/llvm-project/pull/84569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Sam Clegg via cfe-commits
@@ -198,9 +198,18 @@ /// /// If there are calls to setjmp() /// -/// 2) and 3): The same as 2) and 3) in Emscripten SjLj. -/// (setjmpTable/setjmpTableSize initialization + setjmp callsite -/// transformation) +/// 2) In the function entry that calls setjmp, initialize +///

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 commented: Let me know if you want some help testing alsongside the emscripten side. Alternatively myself or @aheejin could perform the emscripten tests. https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 edited https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Sam Clegg via cfe-commits
@@ -198,9 +198,18 @@ /// /// If there are calls to setjmp() /// -/// 2) and 3): The same as 2) and 3) in Emscripten SjLj. -/// (setjmpTable/setjmpTableSize initialization + setjmp callsite -/// transformation) +/// 2) In the function entry that calls setjmp, initialize +///

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-11 Thread Sam Clegg via cfe-commits
sbc100 wrote: > @aheejin @sbc100 let me confirm the plan on this PR. i can remove the option > `-mllvm -experimental-wasm-enable-alt-sjlj` by making it unconditionally > true, and update tests, right? That is my understanding yes. https://github.com/llvm/llvm-project/pull/84137 __

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-09 Thread Sam Clegg via cfe-commits
sbc100 wrote: > > In terms of getting this landed and tested, I wonder which path we should > > take: > > > > 1. Land this now, without tests, then update emscripten then come back and > > flip the default, at which point the existing tests will get updated. > > 2. Duplicate/update the the exi

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
sbc100 wrote: > Currently it accepts no extra inputs, but in the future I'd expect that it'll > grow an option or two of its own I was more asking about whether the file types is accepts are anything more than object files and libraries. i.e. can you pass other core modules and have wasm-com

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
sbc100 wrote: I see, so `wasm-ld` builds "core module + metadata" and then `wasm-component-ld` takes that metadata and uses it to wrap the core module into a component (with exactly that one core module inside of it). So the core module + metadata is kind of isomorphic with that single-core-

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
sbc100 wrote: Regarding WebAssembly/wasi-sdk and WebAssembly/wasi-libc, is there any reason why simple programs wouldn't be core modules? Won't most C/C++ programs still be build-able as just core modules? https://github.com/llvm/llvm-project/pull/84569

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 commented: Does wasm-component-ld accept any other input types other than the ones that wasm-ld accepts? Does wasm-component-ld call wasm-ld internally? Do we expect clang users to be building compound components using a single clang command? i.e. will they be someh

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 commented: In terms of getting this landed and tested, I wonder which path we should take: 1. Land this now, without tests, then update emscripten then come back and flip the default, at which point the existing tests will get updated. 2. Duplicate/update the the exis

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-07 Thread Sam Clegg via cfe-commits
@@ -999,25 +1002,42 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module &M) { // Register __wasm_longjmp function, which calls __builtin_wasm_longjmp. FunctionType *FTy = FunctionType::get( IRB.getVoidTy(), {Int8PtrTy, IRB.getInt32Ty()}, false);

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-07 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 edited https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-07 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 commented: Thanks for working on this! I'm excited to see this land and become less emscripten-specific. I'm hoping that once we get the emscripten side landed we can remove the new option very soon too. https://github.com/llvm/llvm-project/pull/84137 _

[clang] [WebAssembly] Add more features to generic CPU config (PR #80923)

2024-02-06 Thread Sam Clegg via cfe-commits
sbc100 wrote: > Tried running Emscripten tests, and some of them fail with reference-types or > bulk-memory. I haven't investigated the causes yet, but it could be better to > start with the other two (nontrapping-fptoint and multivalue). No need to block these on emscripten failures.. I'm sur

[clang] [WebAssembly] Add more features to generic CPU config (PR #80923)

2024-02-06 Thread Sam Clegg via cfe-commits
sbc100 wrote: @kripken https://github.com/llvm/llvm-project/pull/80923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [lld] [Object][Wasm] Allow parsing of GC types in type and table sections (PR #79235)

2024-01-24 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 approved this pull request. https://github.com/llvm/llvm-project/pull/79235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [llvm] [clang-tools-extra] [Object][Wasm] Allow parsing of GC types in type and table sections (PR #79235)

2024-01-24 Thread Sam Clegg via cfe-commits
@@ -259,10 +259,13 @@ class InputFunction : public InputChunk { file->codeSection->Content.slice(inputSectionOffset, function->Size); debugName = function->DebugName; comdat = function->Comdat; +assert(s.Kind != WasmSignature::Placeholder);

[lld] [clang] [llvm] Embed the command line arguments during LTO (PR #79390)

2024-01-24 Thread Sam Clegg via cfe-commits
@@ -40,6 +41,7 @@ using namespace llvm; namespace lld::wasm { static std::unique_ptr createLTO() { lto::Config c; + c.EmbedCmdArgs = commonContext().cmdArgs; sbc100 wrote: I think it might be the other way around. It looks like only COFF currently support

[llvm] [lld] [clang] Embed the command line arguments during LTO (PR #79390)

2024-01-24 Thread Sam Clegg via cfe-commits
@@ -40,6 +41,7 @@ using namespace llvm; namespace lld::wasm { static std::unique_ptr createLTO() { lto::Config c; + c.EmbedCmdArgs = commonContext().cmdArgs; sbc100 wrote: (I'm not sure why `context()` needs to take a template param, and it looks like its

[llvm] [lld] [clang] Embed the command line arguments during LTO (PR #79390)

2024-01-24 Thread Sam Clegg via cfe-commits
@@ -40,6 +41,7 @@ using namespace llvm; namespace lld::wasm { static std::unique_ptr createLTO() { lto::Config c; + c.EmbedCmdArgs = commonContext().cmdArgs; sbc100 wrote: How about adding a helper like the existing ones `CommonLinkerContext.h`: ``` inline

[lld] [clang] [llvm] Embed the command line arguments during LTO (PR #79390)

2024-01-24 Thread Sam Clegg via cfe-commits
@@ -40,6 +41,7 @@ using namespace llvm; namespace lld::wasm { static std::unique_ptr createLTO() { lto::Config c; + c.EmbedCmdArgs = commonContext().cmdArgs; sbc100 wrote: It looks like `commonContext()` is not actually used elsewhere in lld, and this shou

[clang] [llvm] [clang-tools-extra] [lld] [Object][Wasm] Allow parsing of GC types in type and table sections (PR #79235)

2024-01-24 Thread Sam Clegg via cfe-commits
@@ -259,10 +259,13 @@ class InputFunction : public InputChunk { file->codeSection->Content.slice(inputSectionOffset, function->Size); debugName = function->DebugName; comdat = function->Comdat; +assert(s.Kind != WasmSignature::Placeholder);

[clang] 89d5635 - [lld][WebAssembly] Add --keep-section flag

2023-11-02 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2023-11-02T14:23:45-07:00 New Revision: 89d5635f0a834e53ac5446c6d6ea38d9166b2a55 URL: https://github.com/llvm/llvm-project/commit/89d5635f0a834e53ac5446c6d6ea38d9166b2a55 DIFF: https://github.com/llvm/llvm-project/commit/89d5635f0a834e53ac5446c6d6ea38d9166b2a55.diff LOG

[clang-tools-extra] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)

2023-09-27 Thread Sam Clegg via cfe-commits
sbc100 wrote: > But `--no-trap-after-noreturn` didn't exist before, so there was no way to > specify that from the command line. You _created_ it, originally in this PR, > and then the split-off PR in #67051. If this is a bugfix, it sounds like you > are fixing a bug of your own making. I thi

[clang] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)

2023-09-27 Thread Sam Clegg via cfe-commits
sbc100 wrote: > But `--no-trap-after-noreturn` didn't exist before, so there was no way to > specify that from the command line. You _created_ it, originally in this PR, > and then the split-off PR in #67051. If this is a bugfix, it sounds like you > are fixing a bug of your own making. I thi

[clang] [WebAssembly] Update generic CPU configuration to include nontrapping-fptoint (PR #67459)

2023-09-26 Thread Sam Clegg via cfe-commits
sbc100 wrote: Oh I see I think the issue was Safari: https://webassembly.org/roadmap/. Looks like this requires Safari 15 :( https://github.com/llvm/llvm-project/pull/67459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [WebAssembly] Update generic CPU configuration to include nontrapping-fptoint (PR #67459)

2023-09-26 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 resolved https://github.com/llvm/llvm-project/pull/67459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Update generic CPU configuration to include nontrapping-fptoint (PR #67459)

2023-09-26 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 updated https://github.com/llvm/llvm-project/pull/67459 >From 64d9d8eb1da9f275cde47bd92c39e600e5a2f9b3 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 26 Sep 2023 09:55:59 -0700 Subject: [PATCH] [WebAssembly] Update generic CPU configuration to include nontrapping

[clang] [WebAssembly] Update generic CPU configuration to include nontrapping-fptoint (PR #67459)

2023-09-26 Thread Sam Clegg via cfe-commits
sbc100 wrote: @kripken @dschuff @sunfishcode, can you remember why we didn't include this is part of https://reviews.llvm.org/D125728 and https://reviews.llvm.org/D125729? Has the landscape changed enough since then that we can/should land this now? https://github.com/llvm/llvm-project/pull/

[clang] [WebAssembly] Update generic CPU configuration to include nontrapping-fptoint (PR #67459)

2023-09-26 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 created https://github.com/llvm/llvm-project/pull/67459 Enable nontrapping-fptoint in -mcpu=generic. This makes this feature enabled by default. This feature is part of [finished proposals], and all major wasm engines support it. [finished proposals]: https://githu

[clang] 989ce06 - [clang][WebAssembly] Link crt1 even in case of -shared

2023-08-14 Thread Sam Clegg via cfe-commits
Author: YAMAMOTO Takashi Date: 2023-08-14T09:36:44-07:00 New Revision: 989ce069a4638fd561bebc95f478ca9e45154fec URL: https://github.com/llvm/llvm-project/commit/989ce069a4638fd561bebc95f478ca9e45154fec DIFF: https://github.com/llvm/llvm-project/commit/989ce069a4638fd561bebc95f478ca9e45154fec.di

[clang] 55e199a - [clang][WebAssembly] Support wasm32-wasi shared libraries

2023-06-26 Thread Sam Clegg via cfe-commits
Author: Joel Dice Date: 2023-06-26T10:31:40-07:00 New Revision: 55e199a2c9f4b218499733d60129deffa0a025fe URL: https://github.com/llvm/llvm-project/commit/55e199a2c9f4b218499733d60129deffa0a025fe DIFF: https://github.com/llvm/llvm-project/commit/55e199a2c9f4b218499733d60129deffa0a025fe.diff LOG

[clang] 849df8f - [clang][WebAssembly] Pass `-Wa,--no-type-check` through to the MC layer

2022-09-01 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2022-09-01T02:56:58-07:00 New Revision: 849df8f6f0a6ded83e36aa52b6daa6b950289804 URL: https://github.com/llvm/llvm-project/commit/849df8f6f0a6ded83e36aa52b6daa6b950289804 DIFF: https://github.com/llvm/llvm-project/commit/849df8f6f0a6ded83e36aa52b6daa6b950289804.diff LOG

[clang] 78747bd - [clang][WebAssembly] Loosen restriction on `main` symbol mangling

2022-06-15 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2022-06-15T13:56:05-07:00 New Revision: 78747bd39af807eb6b56709b9713c303704c47ad URL: https://github.com/llvm/llvm-project/commit/78747bd39af807eb6b56709b9713c303704c47ad DIFF: https://github.com/llvm/llvm-project/commit/78747bd39af807eb6b56709b9713c303704c47ad.diff LOG

[clang] 47039a1 - [WebAssembly] Remove restriction on main name mangling

2022-06-06 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2022-06-06T14:04:27-07:00 New Revision: 47039a1a4b299c01dfa0ec531fbc0d24718bb8eb URL: https://github.com/llvm/llvm-project/commit/47039a1a4b299c01dfa0ec531fbc0d24718bb8eb DIFF: https://github.com/llvm/llvm-project/commit/47039a1a4b299c01dfa0ec531fbc0d24718bb8eb.diff LOG

[clang] c832edf - [WebAssembly] Add new target feature in support of 'extended-const' proposal

2022-03-07 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2022-03-07T16:45:42-08:00 New Revision: c832edfd3fbccfac6d5212d6495f0dde851dbdde URL: https://github.com/llvm/llvm-project/commit/c832edfd3fbccfac6d5212d6495f0dde851dbdde DIFF: https://github.com/llvm/llvm-project/commit/c832edfd3fbccfac6d5212d6495f0dde851dbdde.diff LOG

[clang] ecbcefd - [clang][WebAssemmbly] Call TargetInfo::adjust in derived method.

2022-02-10 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2022-02-10T16:04:06-08:00 New Revision: ecbcefd693dd62f9242618b3cf838565e829cc7f URL: https://github.com/llvm/llvm-project/commit/ecbcefd693dd62f9242618b3cf838565e829cc7f DIFF: https://github.com/llvm/llvm-project/commit/ecbcefd693dd62f9242618b3cf838565e829cc7f.diff LOG

[clang] 45ad346 - [clang][WebAssembly] Imply -fno-threadsafe-static when threading is disabled

2022-01-31 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2022-01-31T14:26:09-08:00 New Revision: 45ad3467b708618841869cb529a814001d2295f9 URL: https://github.com/llvm/llvm-project/commit/45ad3467b708618841869cb529a814001d2295f9 DIFF: https://github.com/llvm/llvm-project/commit/45ad3467b708618841869cb529a814001d2295f9.diff LOG

[clang] 1813fde - [WebAssembly] Emit clangast in custom section aligned by 4 bytes

2021-10-19 Thread Sam Clegg via cfe-commits
Author: Yuta Saito Date: 2021-10-19T15:50:08-07:00 New Revision: 1813fde9cc0b56cee42d9b82e6f22fa00a59cdf9 URL: https://github.com/llvm/llvm-project/commit/1813fde9cc0b56cee42d9b82e6f22fa00a59cdf9 DIFF: https://github.com/llvm/llvm-project/commit/1813fde9cc0b56cee42d9b82e6f22fa00a59cdf9.diff LO

[clang] c05d30e - [clang][Emscripten] Define __unix family of macros

2021-08-25 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2021-08-25T19:24:47-04:00 New Revision: c05d30e444a1208a8a872002d1146b5cf55e370a URL: https://github.com/llvm/llvm-project/commit/c05d30e444a1208a8a872002d1146b5cf55e370a DIFF: https://github.com/llvm/llvm-project/commit/c05d30e444a1208a8a872002d1146b5cf55e370a.diff LOG

[clang] d1a96e9 - [clang][emscripten] Reduce alignof long double from 16 to 8 bytes

2021-07-02 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2021-07-02T11:05:40-07:00 New Revision: d1a96e906cc03a95cfd41a1f22bdda92651250c7 URL: https://github.com/llvm/llvm-project/commit/d1a96e906cc03a95cfd41a1f22bdda92651250c7 DIFF: https://github.com/llvm/llvm-project/commit/d1a96e906cc03a95cfd41a1f22bdda92651250c7.diff LOG

[clang] 38a2858 - [clang][emscripten] Add builtin define for __EMSCRIPTEN_PTHREADS__

2021-02-05 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2021-02-05T13:53:05-08:00 New Revision: 38a285885dd5f3634d7824da2a6aefe5e39782a7 URL: https://github.com/llvm/llvm-project/commit/38a285885dd5f3634d7824da2a6aefe5e39782a7 DIFF: https://github.com/llvm/llvm-project/commit/38a285885dd5f3634d7824da2a6aefe5e39782a7.diff LOG

[clang] 04febd3 - [lld][WebAssembly] Error on import/export of mutable global without `mutable-globals` feature

2020-09-12 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2020-09-12T14:28:14-07:00 New Revision: 04febd30a8dab3ff4b6e6032f1a1a9f4725f8267 URL: https://github.com/llvm/llvm-project/commit/04febd30a8dab3ff4b6e6032f1a1a9f4725f8267 DIFF: https://github.com/llvm/llvm-project/commit/04febd30a8dab3ff4b6e6032f1a1a9f4725f8267.diff LOG

[clang] 5804a8b - [WebAssebmly] Fully disable 'protected' visibility

2020-06-23 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2020-06-23T17:50:05-07:00 New Revision: 5804a8b1228ba890d48f4085a3a192ef83c73e00 URL: https://github.com/llvm/llvm-project/commit/5804a8b1228ba890d48f4085a3a192ef83c73e00 DIFF: https://github.com/llvm/llvm-project/commit/5804a8b1228ba890d48f4085a3a192ef83c73e00.diff LOG

[clang] 0731372 - [clang] Allow -DDEFAULT_SYSROOT to be a relative path

2020-03-26 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2020-03-26T13:48:57-07:00 New Revision: 0731372ee25c8db93e0d976db4be4ffb7c7329c5 URL: https://github.com/llvm/llvm-project/commit/0731372ee25c8db93e0d976db4be4ffb7c7329c5 DIFF: https://github.com/llvm/llvm-project/commit/0731372ee25c8db93e0d976db4be4ffb7c7329c5.diff LOG

[clang] 0a1e349 - [WebAssembly] Setting export_name implies llvm.used

2019-12-16 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2019-12-16T14:48:38-08:00 New Revision: 0a1e349a7933f7880971533175e11b4bfd22bd53 URL: https://github.com/llvm/llvm-project/commit/0a1e349a7933f7880971533175e11b4bfd22bd53 DIFF: https://github.com/llvm/llvm-project/commit/0a1e349a7933f7880971533175e11b4bfd22bd53.diff LOG

[clang] 881d877 - [WebAssembly] Add new `export_name` clang attribute for controlling wasm export names

2019-12-11 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2019-12-11T11:54:57-08:00 New Revision: 881d877846e2904c731d616731969421ce8cc825 URL: https://github.com/llvm/llvm-project/commit/881d877846e2904c731d616731969421ce8cc825 DIFF: https://github.com/llvm/llvm-project/commit/881d877846e2904c731d616731969421ce8cc825.diff LOG

r366518 - Fix formatting of inline argument comments. NFC.

2019-07-18 Thread Sam Clegg via cfe-commits
Author: sbc Date: Thu Jul 18 17:30:23 2019 New Revision: 366518 URL: http://llvm.org/viewvc/llvm-project?rev=366518&view=rev Log: Fix formatting of inline argument comments. NFC. Also, remove the final arg from ItaniumCXXABI in the PNaCl case since its not needed. Differential Revision: https://

r363759 - git-clang-format: Remove trailing whitespace in docstring. NFC.

2019-06-18 Thread Sam Clegg via cfe-commits
Author: sbc Date: Tue Jun 18 18:52:41 2019 New Revision: 363759 URL: http://llvm.org/viewvc/llvm-project?rev=363759&view=rev Log: git-clang-format: Remove trailing whitespace in docstring. NFC. Differential Revision: https://reviews.llvm.org/D62915 Modified: cfe/trunk/tools/clang-format/git-

r363241 - [WebAssembly] Modernize include path handling

2019-06-13 Thread Sam Clegg via cfe-commits
Author: sbc Date: Thu Jun 13 02:42:43 2019 New Revision: 363241 URL: http://llvm.org/viewvc/llvm-project?rev=363241&view=rev Log: [WebAssembly] Modernize include path handling Move include path construction from InitHeaderSearch::AddDefaultIncludePaths in the Driver which appears to be the more m

r363238 - [clang-scan-deps] Fix -DBUILD_SHARED_LIBS=ON build

2019-06-13 Thread Sam Clegg via cfe-commits
Author: sbc Date: Thu Jun 13 01:58:46 2019 New Revision: 363238 URL: http://llvm.org/viewvc/llvm-project?rev=363238&view=rev Log: [clang-scan-deps] Fix -DBUILD_SHARED_LIBS=ON build The -DBUILD_SHARED_LIBS=ON build was broken in rL363204 Differential Revision: https://reviews.llvm.org/D63245 Mod

r362959 - [WebAssembly] Cleanup toolchain test files. NFC.

2019-06-10 Thread Sam Clegg via cfe-commits
Author: sbc Date: Mon Jun 10 09:18:04 2019 New Revision: 362959 URL: http://llvm.org/viewvc/llvm-project?rev=362959&view=rev Log: [WebAssembly] Cleanup toolchain test files. NFC. Summary: Split up long lines to improve test readability. Subscribers: dschuff, jgravelle-google, aheejin, sunfish, j

r362180 - Fix -DBUILD_SHARED_LIBS=ON build after rL362160

2019-05-30 Thread Sam Clegg via cfe-commits
Author: sbc Date: Thu May 30 18:04:00 2019 New Revision: 362180 URL: http://llvm.org/viewvc/llvm-project?rev=362180&view=rev Log: Fix -DBUILD_SHARED_LIBS=ON build after rL362160 Differential Revision: https://reviews.llvm.org/D62709 Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt Modified: c

r361651 - [WebAssembly] Use "linker" as linker shortname.

2019-05-24 Thread Sam Clegg via cfe-commits
Author: sbc Date: Fri May 24 10:36:07 2019 New Revision: 361651 URL: http://llvm.org/viewvc/llvm-project?rev=361651&view=rev Log: [WebAssembly] Use "linker" as linker shortname. This is in line with other platforms. Also, move the single statement methods into the header (also in line with other

r357195 - [WebAssembly] Reland of rL356953 (4dcf3acce6)

2019-03-28 Thread Sam Clegg via cfe-commits
Author: sbc Date: Thu Mar 28 10:45:18 2019 New Revision: 357195 URL: http://llvm.org/viewvc/llvm-project?rev=357195&view=rev Log: [WebAssembly] Reland of rL356953 (4dcf3acce6) The previous patch was missing GetProgramPath() in the return value of getLinkerPath(). See https://reviews.llvm.org/D59

r356953 - [WebAssembly] Don't use default GetLinkerPath

2019-03-25 Thread Sam Clegg via cfe-commits
Author: sbc Date: Mon Mar 25 14:14:26 2019 New Revision: 356953 URL: http://llvm.org/viewvc/llvm-project?rev=356953&view=rev Log: [WebAssembly] Don't use default GetLinkerPath We can't (don't want to) honor the same set of "-fuse-ld" flags with WebAssembly since the ELF linkers (ld.lld, ld.gnu, e

r356847 - [WebAssembly] Fix test/Driver/wasm-toolchain.c in the presence of CLANG_DEFAULT_LINKER

2019-03-23 Thread Sam Clegg via cfe-commits
Author: sbc Date: Sat Mar 23 17:03:41 2019 New Revision: 356847 URL: http://llvm.org/viewvc/llvm-project?rev=356847&view=rev Log: [WebAssembly] Fix test/Driver/wasm-toolchain.c in the presence of CLANG_DEFAULT_LINKER This was broken in rL356817 (See https://reviews.llvm.org/D59721) Modified:

Re: r339163 - [WebAssembly] Remove use of lld -flavor flag

2018-10-17 Thread Sam Clegg via cfe-commits
;ld.wasm-ld", but the wasm lld symlink is called > "wasm-ld". Does the driver need updating? Is the symlink name wrong? Am I > doing something wrong? > > On Tue, Aug 7, 2018 at 2:56 PM Sam Clegg via cfe-commits > wrote: >> >> Author: sbc >> Date: Tue Au

r339163 - [WebAssembly] Remove use of lld -flavor flag

2018-08-07 Thread Sam Clegg via cfe-commits
Author: sbc Date: Tue Aug 7 11:55:41 2018 New Revision: 339163 URL: http://llvm.org/viewvc/llvm-project?rev=339163&view=rev Log: [WebAssembly] Remove use of lld -flavor flag This flag is deprecated. The preferred way to select the lld flavor is by calling it by one of its aliases. Differential

[libcxxabi] r337982 - [CMake] Don't use LIBCXXABI_ENABLE_STATIC option before its declared

2018-07-25 Thread Sam Clegg via cfe-commits
Author: sbc Date: Wed Jul 25 16:13:00 2018 New Revision: 337982 URL: http://llvm.org/viewvc/llvm-project?rev=337982&view=rev Log: [CMake] Don't use LIBCXXABI_ENABLE_STATIC option before its declared Summary: rL337867 introduced two new cmake_dependent_option options: - LIBCXXABI_INSTALL_STATIC_LI

r335510 - [WebAssembly] Add no-prototype attribute to prototype-less C functions

2018-06-25 Thread Sam Clegg via cfe-commits
Author: sbc Date: Mon Jun 25 11:47:32 2018 New Revision: 335510 URL: http://llvm.org/viewvc/llvm-project?rev=335510&view=rev Log: [WebAssembly] Add no-prototype attribute to prototype-less C functions The WebAssembly backend in particular benefits from being able to distinguish between varargs fu

r335380 - Fix BUILD_SHARED_LIBS=1 build of libclangHandleLLVM

2018-06-22 Thread Sam Clegg via cfe-commits
Author: sbc Date: Fri Jun 22 12:44:48 2018 New Revision: 335380 URL: http://llvm.org/viewvc/llvm-project?rev=335380&view=rev Log: Fix BUILD_SHARED_LIBS=1 build of libclangHandleLLVM Differential Revision: https://reviews.llvm.org/D48503 Modified: cfe/trunk/tools/clang-fuzzer/handle-llvm/CMak

  1   2   >