Page MenuHomePhabricator
Feed Advanced Search

Fri, Aug 21

sunfish committed rG50aae463315d: Update my email address. (authored by sunfish).
Update my email address.
Fri, Aug 21, 10:16 AM

Aug 5 2020

sunfish accepted D85347: [WebAssembly] Fix types in wasm_simd128.h and add tests.

Ah, it seems the reason I didn't see this is that I wasn't using -flax-vector-conversions=none. Thanks for fixing this!

Aug 5 2020, 12:54 PM · Restricted Project

Aug 4 2020

sunfish added a reviewer for D81689: [WebAssembly] New-style command support: sbc100.
Aug 4 2020, 4:19 PM · Restricted Project
sunfish added a comment to D76885: [lld][COFF][ELF][WebAssembly] Replace --[no-]threads /threads[:no] with --threads={1,2,...} /threads:{1,2,...}.

I've now opened https://github.com/WebAssembly/wasi-sdk/pull/151/ to remove the --no-threads from wasi-sdk, which was a workaround for an old bug that has long been fixed.

Aug 4 2020, 1:05 PM · Restricted Project

Aug 3 2020

sunfish updated the diff for D85074: [WebAssembly] Use "signed char" instead of "char" in SIMD intrinsics..
  • Update clang/test/CodeGen/builtins-wasm.c.
Aug 3 2020, 6:45 AM · Restricted Project

Aug 2 2020

sunfish updated the diff for D85062: [WebAssembly] GC constructor functions in otherwise unused archive objects.
  • Reorganize the code a little so that we don't have to call mark multiple times.
  • Fix a bug where we weren't considering calls from constructors as keeping other constructors live.
  • Add a few more tests.
Aug 2 2020, 7:34 AM · Restricted Project

Aug 1 2020

sunfish requested review of D85074: [WebAssembly] Use "signed char" instead of "char" in SIMD intrinsics..
Aug 1 2020, 7:53 AM · Restricted Project

Jul 31 2020

sunfish added inline comments to D85062: [WebAssembly] GC constructor functions in otherwise unused archive objects.
Jul 31 2020, 10:06 PM · Restricted Project
sunfish added a comment to D85062: [WebAssembly] GC constructor functions in otherwise unused archive objects.

To be clear this change only relates to object files at are part of ar archives and are not part of the link? Perhaps mention that in the PR title/description.

Jul 31 2020, 7:25 PM · Restricted Project
sunfish retitled D85062: [WebAssembly] GC constructor functions in otherwise unused archive objects from [WebAssembly] GC constructor functions in otherwise unused objects to [WebAssembly] GC constructor functions in otherwise unused archive objects.
Jul 31 2020, 7:24 PM · Restricted Project
sunfish requested review of D85062: [WebAssembly] GC constructor functions in otherwise unused archive objects.
Jul 31 2020, 5:23 PM · Restricted Project
sunfish added inline comments to D81689: [WebAssembly] New-style command support.
Jul 31 2020, 1:27 PM · Restricted Project
sunfish updated the diff for D81689: [WebAssembly] New-style command support.

Address review feedback.

Jul 31 2020, 1:27 PM · Restricted Project

Jun 25 2020

sunfish added inline comments to D81760: [WebAssembly] Add warnings for -shared and -pie.
Jun 25 2020, 12:28 PM · Restricted Project
sunfish updated the diff for D81760: [WebAssembly] Add warnings for -shared and -pie.
  • Rename -emscripten-pic to -experimental-pic
  • Change the warning text to say "not stable" rather than "not yet implemented"
Jun 25 2020, 12:28 PM · Restricted Project

Jun 16 2020

sunfish added a comment to D81962: [lld][WebAssembly] Allow ctors functions that return values.

This change looks fine to me, though if you wanted to minimize the amount of code being emitted by the linker, another option would be to look into whether LLVM's FixFunctionBitcasts could handle this -- there should be a bitcast in the llvm.global_ctors array.

Jun 16 2020, 4:28 PM · Restricted Project

Jun 12 2020

sunfish closed D81688: [WebAssembly] WebAssembly doesn't support "protected" visibility.

Landed in 66042959590d6db9d2a12803a16476d4e3508f3f.

Jun 12 2020, 7:55 PM · Restricted Project, Restricted Project
sunfish created D81760: [WebAssembly] Add warnings for -shared and -pie.
Jun 12 2020, 1:07 PM · Restricted Project
sunfish added inline comments to D81689: [WebAssembly] New-style command support.
Jun 12 2020, 1:07 PM · Restricted Project
sunfish updated the diff for D81689: [WebAssembly] New-style command support.
  • Address review feedback
  • Mark callCtors live in the MarkLive pass rather than in the Writer pass.
Jun 12 2020, 12:35 PM · Restricted Project
sunfish updated the diff for D81689: [WebAssembly] New-style command support.

Run clang-format and fix lint warnings.

Jun 12 2020, 8:39 AM · Restricted Project
sunfish updated the diff for D81689: [WebAssembly] New-style command support.

Use the return value of handleUndefined instead of doing a separate lookup, which avoids a redundant lookup and handles LazySymbols properly.

Jun 12 2020, 7:31 AM · Restricted Project

Jun 11 2020

sunfish created D81689: [WebAssembly] New-style command support.
Jun 11 2020, 1:48 PM · Restricted Project
sunfish created D81688: [WebAssembly] WebAssembly doesn't support "protected" visibility.
Jun 11 2020, 1:47 PM · Restricted Project, Restricted Project

Jun 4 2020

sunfish added inline comments to D62922: [WebAssembly] Implement "Reactor" mode.
Jun 4 2020, 5:09 PM · Restricted Project, Restricted Project
sunfish added inline comments to D62922: [WebAssembly] Implement "Reactor" mode.
Jun 4 2020, 8:11 AM · Restricted Project, Restricted Project

Jun 3 2020

sunfish added a comment to D59520: [WebAssembly] Address review comments on r352930.

I apologize again for the major delay. I've now updated the patch and addressed all of your comments.

Jun 3 2020, 4:35 PM · Restricted Project
sunfish updated the diff for D59520: [WebAssembly] Address review comments on r352930.
  • Add tests for redeclaration behavior
  • Remove disabled tests (previously marked with FIXMEs)
  • Made the mismatch warning more informative.
Jun 3 2020, 4:35 PM · Restricted Project

May 11 2020

sunfish accepted D77384: [WebAssembly] Support single-floating-point immediate value.

Looks good to me.

May 11 2020, 3:07 PM · Restricted Project

Apr 23 2020

sunfish added a comment to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.

It's for users who want smaller wasm binaries. It's not currently documented, though yes, it would be nice to document it.

But how would a user even end up with wasm-opt in the same directory of clang binaries?

Apr 23 2020, 11:21 AM · Restricted Project
sunfish added a comment to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.

Are there plans to offer a way to disable this behavior (or have it optional in the first place)?
We'd like to run some custom processing between wasm-ld and wasm-opt which can't happen after the latter due to some of its one-way destructive optimizations (i.e. memory-packing or simplify-globals passes).
The only way now is to tell our users to place wasm-opt somewhere where clang can't find it. Or instead of using one clang super-command to manually call -cc1 and wasm-ld separately which is disappointing.

Also, is it even common to place wasm-opt next to the clang executable? Who is this for? Is this documented?

Apr 23 2020, 7:32 AM · Restricted Project

Apr 13 2020

sunfish added a comment to D62922: [WebAssembly] Implement "Reactor" mode.

This addresses the review feedback from earlier. To answer this question:

Apr 13 2020, 5:57 PM · Restricted Project, Restricted Project
sunfish updated the diff for D62922: [WebAssembly] Implement "Reactor" mode.

Rebase, update, add a test, and add basic error reporting.

Apr 13 2020, 5:57 PM · Restricted Project, Restricted Project

Apr 11 2020

sunfish accepted D77084: [lld][WebAssembly] Add test for --export of empty string.
Apr 11 2020, 6:55 AM · Restricted Project
sunfish added a comment to D77908: [WebAssembly] Enable nontrapping-fptoint for `default` cpu.

Looks good! I don't have anything to add beyond Thomas' review comments.

Apr 11 2020, 6:55 AM · Restricted Project

Apr 7 2020

sunfish accepted D77627: [WebAssembly][MC] Fix leak of std::string members in MCSymbolWasm.
Apr 7 2020, 10:18 AM · Restricted Project

Apr 6 2020

sunfish added a comment to D77384: [WebAssembly] Support single-floating-point immediate value.

Is looks possible that the test failure was due to an unrelated commit 210f40fe9a30212396311d265904b2d73859c53d. If so, it's possible it's fixed as of 74ab5d98d07f0b0226f45ccca8df6a450d52fb7b.

Apr 6 2020, 8:06 AM · Restricted Project

Apr 4 2020

sunfish added a comment to D77384: [WebAssembly] Support single-floating-point immediate value.

On some 32-bit x86 hosts, particularly those that use x87 arithmetic, loading and storing with floating-point types can change the NaN bit pattern. To preserve the bit pattern reliably, MCOperand should represent floating-point immediates by representing the bits in int32_t for 32-bit and int64_t for 64-bit. Codegen and MC don't usually look at the value, but where they do need to interpret it as a floating-point value, they can reinterpret the bits on demand.

Apr 4 2020, 11:09 AM · Restricted Project

Mar 30 2020

sunfish accepted D76959: [WebAssembly] Import wasm_simd128.h from Emscripten.

Cool, LGTM, with optional suggestion for signed char below:

Mar 30 2020, 4:57 PM · Restricted Project

Mar 27 2020

sunfish added a comment to D76959: [WebAssembly] Import wasm_simd128.h from Emscripten.

Very cool, thanks for putting this together!

Mar 27 2020, 5:39 PM · Restricted Project

Mar 26 2020

sunfish added inline comments to D71793: [WebAssembly] Support wasm exports with zero-length names..
Mar 26 2020, 4:22 PM · Restricted Project
sunfish added a comment to D76547: [WebAssembly] Add wasm-exported function attribute.

Instead of creating a new LLVM-IR-level attribute here, could you have clang translate the attribute to "wasm-export-name", to keep the LLVM-IR level simpler?

Mar 26 2020, 3:14 PM · Restricted Project

Mar 18 2020

sunfish added a comment to D70685: [WebAssembly] Fix the order of destructors in the LowerGlobalDtors pass..

The commit description says "not ordered to group destructors with common associated objects" but it looks this patch is doing grouping by associated object. Is that intentional?

Mar 18 2020, 8:42 AM · Restricted Project
sunfish updated the diff for D70685: [WebAssembly] Fix the order of destructors in the LowerGlobalDtors pass..
  • Add a comment.
  • Add a test of two destructors with different priorities and the same associated object.
Mar 18 2020, 8:42 AM · Restricted Project

Feb 19 2020

sunfish accepted D74110: [lld][WebAssembly] Allow symbols with explict import names to be undefined at link time..

Looks good, with the clang-format lint fixed :-).

Feb 19 2020, 4:42 PM · Restricted Project
sunfish accepted D74109: [WebAssembly] Use llvm::Optional to store optional symbol attributes. NFC..

LGTM!

Feb 19 2020, 4:35 PM · Restricted Project

Jan 15 2020

sunfish added a comment to D70700: [WebAssembly] Mangle the argc/argv `main` as `__main_argc_argv`.

@sbc100 Friendly ping :-).

Jan 15 2020, 2:52 PM · Restricted Project, Restricted Project

Jan 13 2020

sunfish retitled D70700: [WebAssembly] Mangle the argc/argv `main` as `__main_argc_argv` from [WebAssembly] Mangle the argc/argv `main` as `__wasm_argc_argv` to [WebAssembly] Mangle the argc/argv `main` as `__main_argc_argv`.
Jan 13 2020, 9:57 AM · Restricted Project, Restricted Project

Dec 21 2019

sunfish updated the diff for D59520: [WebAssembly] Address review comments on r352930.

Address review feedback.

Dec 21 2019, 12:06 AM · Restricted Project
sunfish added a comment to D59520: [WebAssembly] Address review comments on r352930.

I apologize for the extraordinary delays here; at long last, I've now addressed your feedback.

Dec 21 2019, 12:06 AM · Restricted Project

Dec 20 2019

sunfish created D71793: [WebAssembly] Support wasm exports with zero-length names..
Dec 20 2019, 9:49 PM · Restricted Project
sunfish updated the diff for D70700: [WebAssembly] Mangle the argc/argv `main` as `__main_argc_argv`.

To support a transition to the new system, temporarily define a __main_void alias for no-argument main. This allows libc to detect whether it's calling old-style or new-style main and do the right thing.

Dec 20 2019, 12:11 PM · Restricted Project, Restricted Project

Dec 17 2019

sunfish updated the diff for D70700: [WebAssembly] Mangle the argc/argv `main` as `__main_argc_argv`.

This updates the main vs __main_argc_argv patch so that it doesn't apply to Emscripten targets, following the discussion in https://github.com/WebAssembly/tool-conventions/pull/134.

Dec 17 2019, 5:29 PM · Restricted Project, Restricted Project
sunfish added reviewers for D70685: [WebAssembly] Fix the order of destructors in the LowerGlobalDtors pass.: sbc100, dschuff, aheejin.
Dec 17 2019, 5:29 PM · Restricted Project

Dec 16 2019

sunfish added inline comments to D71493: [WebAssembly] Setting export_name implies no_dead_strip.
Dec 16 2019, 2:20 PM · Restricted Project, Restricted Project

Nov 27 2019

sunfish added a comment to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.

I'm not an expert in driver code and how it should behave, but being consistent with how other tools are found definitely looks much better than special-casing a single tool.
Unless there are reasons why wasm-opt should be special, why not use the mechanism used by all other tools?

Nov 27 2019, 6:18 AM · Restricted Project
sunfish created D70780: [WebAssembly] Find wasm-opt with GetProgramPath.
Nov 27 2019, 6:09 AM · Restricted Project

Nov 26 2019

sunfish abandoned D70687: [WebAssembly] Add an llvm-lto path for compiler-rt..

I've done some more experimenting with this, and it turns out not to work very well, because calls to these functions get generated after LTO runs, so I'll abandon this.

Nov 26 2019, 11:27 AM · Restricted Project

Nov 25 2019

sunfish created D70700: [WebAssembly] Mangle the argc/argv `main` as `__main_argc_argv`.
Nov 25 2019, 3:42 PM · Restricted Project, Restricted Project
sunfish created D70687: [WebAssembly] Add an llvm-lto path for compiler-rt..
Nov 25 2019, 11:04 AM · Restricted Project
sunfish created D70685: [WebAssembly] Fix the order of destructors in the LowerGlobalDtors pass..
Nov 25 2019, 11:04 AM · Restricted Project
sunfish created D70677: [WebAssembly] Change the llvm-lto dir to use the LLVM Version.
Nov 25 2019, 9:38 AM · Restricted Project
sunfish added a comment to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.

I've now posted https://reviews.llvm.org/D70677 which should fix the test failure when LLVM_APPEND_VC_REV=NO is set.

Nov 25 2019, 9:38 AM · Restricted Project
sunfish added a comment to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.

Please don't add code to the driver that runs programs off PATH. Nothing else does this.

Nov 25 2019, 9:19 AM · Restricted Project

Nov 21 2019

sunfish added a comment to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.

WRT the LTO directory name, there's theoretically the danger that someone (e.g. emscripten) could be doing a rolling release of the compiler and get invalidated within a major revision.

Nov 21 2019, 4:47 PM · Restricted Project

Nov 20 2019

sunfish added a comment to D70520: [WebAssembly] Add new `export_name` clang attribute for controlling wasm export names.

Do you think that setting this attribute should also prevent GC?

Nov 20 2019, 8:41 PM · Restricted Project, Restricted Project
sunfish added a comment to D70520: [WebAssembly] Add new `export_name` clang attribute for controlling wasm export names.

It appears this doesn't handle exporting an imported function yet, which is fine for now, but it would be good to issue a warning, because wasm itself is capable of representing this:

void aaa(void) __attribute__((import_module("imp"), import_name("foo"), export_name("bar")));
Nov 20 2019, 8:32 PM · Restricted Project, Restricted Project
sunfish updated the diff for D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.

Don't run wasm-opt with -O0.

Nov 20 2019, 6:43 PM · Restricted Project
sunfish added inline comments to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.
Nov 20 2019, 6:43 PM · Restricted Project
sunfish added inline comments to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.
Nov 20 2019, 4:43 PM · Restricted Project
sunfish updated the diff for D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.

Use PATH instead of WASM_OPT to find wasm-opt.

Nov 20 2019, 4:43 PM · Restricted Project
sunfish added a comment to D70515: [WebAssembly] Create a __stack_limit variable.

Does this need to be wasm global? Or can it just be regular data symbol like globalBase? i.e. do we want fast access to it without a load?

Nov 20 2019, 4:34 PM · Restricted Project
sunfish added inline comments to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.
Nov 20 2019, 3:20 PM · Restricted Project
sunfish created D70515: [WebAssembly] Create a __stack_limit variable.
Nov 20 2019, 3:11 PM · Restricted Project
sunfish added inline comments to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.
Nov 20 2019, 1:28 PM · Restricted Project
sunfish updated the diff for D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.

On I just remember why this is probably a bad idea. llvm bitcode is not designed to be stable, unlike object files, so its probably not a good idea to encourage the distributing of bitcode files in SDKs and such.

Nov 20 2019, 1:19 PM · Restricted Project
sunfish added inline comments to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.
Nov 20 2019, 12:42 PM · Restricted Project
sunfish added inline comments to D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.
Nov 20 2019, 11:16 AM · Restricted Project
sunfish created D70500: [WebAssembly] Enable use of wasm-opt and LTO-enabled system libraries.
Nov 20 2019, 10:39 AM · Restricted Project

Sep 21 2019

sunfish added a comment to D67783: [WebAssembly] Remove unused memory instructions and patterns.

This kind of thing ought to have helped code like

extern int A[];
Sep 21 2019, 5:27 AM · Restricted Project

Sep 18 2019

sunfish added a comment to D67739: [WebAssembly] Let users know that wasm64 does not exist.

Would it be better to do this check in LLVM, in the backend, with a report_fatal_error?

Sep 18 2019, 4:22 PM · Restricted Project

Aug 30 2019

sunfish added a comment to D66983: [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic.

DAG combine is supposed to check with TargetLowering::isShuffleMaskLegal.

Aug 30 2019, 4:51 PM · Restricted Project, Restricted Project

Aug 29 2019

sunfish committed rG8cfeeaf9de0b: [CodeGen] Fix lowering for returning the result of an extractvalue (authored by sunfish).
[CodeGen] Fix lowering for returning the result of an extractvalue
Aug 29 2019, 9:34 PM
sunfish added a comment to D66978: [CodeGen] Fix lowering for returning the result of an extractvalue.

Generally LGTM, although the tests might be more readable if you pass -wasm-disable-explicit-locals and -wasm-keep-registers as well. It's also concerning that no one noticed this issue before. Do you know why other targets may not have run into it?

Aug 29 2019, 9:27 PM · Restricted Project
sunfish updated the diff for D66978: [CodeGen] Fix lowering for returning the result of an extractvalue.
  • Use -wasm-disable-explicit-locals -wasm-keep-registers to make the test more readable
Aug 29 2019, 9:27 PM · Restricted Project
sunfish added a comment to D66983: [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic.

Oh, interesting I didn't notice that those are implementations of the target-specific intrinsics. I wonder if they do that so they can implement the intrinsics on hardware that doesn't support the corresponding instruction? In a situation other than that I think I'd be surprised if I used a builtin for a particular instruction and got something else.

Aug 29 2019, 6:15 PM · Restricted Project, Restricted Project
sunfish added a comment to D66983: [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic.

Can you say what leads wasm users to maintain such an expectation when, for example, ARM users and x86 users don't?

Aug 29 2019, 5:41 PM · Restricted Project, Restricted Project
sunfish committed rG7cb9c8a506f3: [WebAssembly] Implement NO_STRIP (authored by sunfish).
[WebAssembly] Implement NO_STRIP
Aug 29 2019, 3:42 PM
sunfish committed rGda84b688f916: [WebAssembly] Make __attribute__((used)) not imply export. (authored by sunfish).
[WebAssembly] Make __attribute__((used)) not imply export.
Aug 29 2019, 3:40 PM
sunfish created D66978: [CodeGen] Fix lowering for returning the result of an extractvalue.
Aug 29 2019, 3:32 PM · Restricted Project
sunfish added a comment to D66968: [WebAssembly] Implement NO_STRIP.

I'm curious why a user would want to use WASM_SYMBOL_NO_STRIP if it doesn't export the symbol? Maybe for post-linker to do stuff perhaps?

Aug 29 2019, 1:06 PM · Restricted Project
sunfish added inline comments to D66968: [WebAssembly] Implement NO_STRIP.
Aug 29 2019, 1:06 PM · Restricted Project
sunfish updated the diff for D66968: [WebAssembly] Implement NO_STRIP.

Include the basic test case.

Aug 29 2019, 1:00 PM · Restricted Project
sunfish abandoned D62443: [WebAssembly] Move Emscripten-specific behavior under a --emscripten flag.

Abandoning in favor of https://reviews.llvm.org/D66968.

Aug 29 2019, 11:48 AM · Restricted Project
sunfish added a comment to D62542: [WebAssembly] Make Emscripten-specific behavior specific to the Emscripten target.

https://reviews.llvm.org/D66968 is now a patch implementing the lld side of this.

Aug 29 2019, 11:48 AM · Restricted Project
sunfish created D66968: [WebAssembly] Implement NO_STRIP.
Aug 29 2019, 11:42 AM · Restricted Project
Herald added a project to D43675: [WebAssembly] Rename imported/exported memory symbol to __linear_memory: Restricted Project.

"memory" is now a de-facto standard. We may still be able to change it, but we'll now need a transition plan.

Aug 29 2019, 9:57 AM · Restricted Project

Aug 13 2019

sunfish accepted D64961: [libcxxabi] Define _LIBCXXABI_GUARD_ABI_ARM on WebAssembly.

I have a slight preference for landing this change too.

Aug 13 2019, 12:23 PM · Restricted Project, Restricted Project

Aug 12 2019

sunfish added a comment to D66035: [WebAssembly] WIP: Add support for reference types.

x86 uses address spaces starting at 256 and counting up for its architecture-specific address spaces. The docs say "Address spaces 1-255 are currently reserved for user-defined code." so we should consider using 256 here.

Aug 12 2019, 3:59 PM · Restricted Project, Restricted Project

Jul 19 2019

sunfish added a comment to D61452: [WebAssembly] Always include <sysroot>/lib in library path.

This allows for us to fall back from arch-specific to generic headers as needed. The same can be true of libraries. Not all libraries contains compiled code. .so files can also be linker scripts that reference other libraries in which case they can be arch-neutral.

Jul 19 2019, 8:37 AM · Restricted Project