ncw (Nicholas Wilson)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 24 2017, 7:16 AM (43 w, 1 d)

Recent Activity

Yesterday

ncw added a comment to D43675: [WebAssembly] Rename imported/exported memory symbol to __linear_memory.

Renaming them all will take a bit more work (for everyone) - I'm not sure it's especially urgent. Personally I'm happy as long as they all have underscores, and aren't wildly inconsistent.

Fri, Sep 21, 8:09 AM

Aug 22 2018

ncw abandoned D42176: [WebAssembly] Optimise relocation iteration to remove n^2 loop. NFC..

Abandoned in favour of https://reviews.llvm.org/D51063

Aug 22 2018, 1:47 AM
ncw accepted D51063: [WebAssembly] Optimise relocation iteration to remove n^2 loop. NFC..

Thanks for rebasing, looks fine to me. I'm glad it's of use to someone.

Aug 22 2018, 1:46 AM
ncw accepted D51065: [WebAssembly] Ensure relocation entries are ordered by offset.

Looks good to me. I think something similar to this was included in one of my previous patches, and just got lost somewhere.

Aug 22 2018, 1:43 AM

Aug 3 2018

ncw abandoned D42752: [WebAssembly] Add LLVM stub support for defined globals.

Abandoning; COMDAT for globals would be nice (for completeness) but isn't important now - no need to fight for it currently.

Aug 3 2018, 8:16 AM
ncw abandoned D42753: [WebAssembly] Add LLD support for defined globals.

Abandoning; COMDAT for globals would be nice (for completeness) but isn't important now - no need to fight for it currently.

Aug 3 2018, 8:15 AM
ncw committed rL338894: [WebAssembly] Cleanup of the way globals and global flags are handled.
[WebAssembly] Cleanup of the way globals and global flags are handled
Aug 3 2018, 7:34 AM
ncw closed D44030: [WebAssembly] Tidy up handling of global symbol relocations.
Aug 3 2018, 7:34 AM
ncw updated the diff for D44030: [WebAssembly] Tidy up handling of global symbol relocations.

Updated with Dan and Sam's review comments.

Aug 3 2018, 6:47 AM

Jun 21 2018

ncw added a comment to D48299: [WebAssembly] Only mark non-hidden symbols as live if they are also defined.

I've been quiet for a while as well ... I keep meaning to get back to my patch queue and try and get them reviewed and submitted. I have a couple of features completed or mostly-completed, I just need a few days away from my main job to get them back on track! Maybe it's time to get LLD ready for native-exception "sections" as well - that's a feature I'm really hoping will arrive soon in WebAssembly.

Jun 21 2018, 2:24 AM
ncw accepted D48299: [WebAssembly] Only mark non-hidden symbols as live if they are also defined.

Looks good. I'm deducing that when you removed the "hidden" from "used_undef_fn" and "unused_undef_fn", the test then failed - and then the code change makes it pass again. Makes sense.

Jun 21 2018, 2:22 AM

May 8 2018

ncw accepted D46416: [WebAssembly] Optionally compress relocation sites in the code section.

This looks like a nice size optimisation, great.

May 8 2018, 6:54 AM

May 3 2018

ncw accepted D46141: [WebAssembly] Add --stack-first option which places the shadow stack at start of linear memory.

Nice, looks safe and potentially useful.

May 3 2018, 3:24 AM

May 1 2018

ncw accepted D46296: [WebAssembly] llvm-readobj: display symbols names in relocations.
May 1 2018, 9:31 AM

Apr 26 2018

ncw accepted D46070: [WebAssembly] Add version of linking section (to match llvm-side change).

Seems sensible.

Apr 26 2018, 8:08 AM
ncw accepted D46069: [WebAssembly] Add version to object file metadata.

Seems sensible.

Apr 26 2018, 8:08 AM

Apr 24 2018

ncw accepted D45795: Match llvm-side change to reloc section header.
Apr 24 2018, 10:37 AM
ncw accepted D45980: [WebAssembly] Use section index in relocation section header.

Looks good :)

Apr 24 2018, 10:37 AM

Apr 20 2018

ncw committed rLLD330456: [WebAssembly] Implement -print-gc-sections, to better test GC of globals.
[WebAssembly] Implement -print-gc-sections, to better test GC of globals
Apr 20 2018, 10:31 AM
ncw committed rL330456: [WebAssembly] Implement -print-gc-sections, to better test GC of globals.
[WebAssembly] Implement -print-gc-sections, to better test GC of globals
Apr 20 2018, 10:31 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Apr 20 2018, 10:31 AM
ncw updated the diff for D44311: [WebAssembly] Implement -print-gc-sections to test global GC.

Now there's nothing contentious, I think this one is safe to land too? It's been a loong time (weeks) since there was any movement on these LLD bugs. If you want me to come back and make further changes however, I'm happy to do that.

Apr 20 2018, 10:29 AM
ncw committed rL330454: [WebAssembly] Implement GC for imports.
[WebAssembly] Implement GC for imports
Apr 20 2018, 10:23 AM
ncw committed rLLD330454: [WebAssembly] Implement GC for imports.
[WebAssembly] Implement GC for imports
Apr 20 2018, 10:23 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Apr 20 2018, 10:23 AM
ncw added inline comments to D45021: [WebAssembly] Distinguish debug/symbol names in the Wasm structs. NFC.
Apr 20 2018, 10:23 AM
ncw committed rLLD330449: [WebAssembly] Implement --print-gc-sections for synthetic functions.
[WebAssembly] Implement --print-gc-sections for synthetic functions
Apr 20 2018, 10:12 AM
ncw committed rL330449: [WebAssembly] Implement --print-gc-sections for synthetic functions.
[WebAssembly] Implement --print-gc-sections for synthetic functions
Apr 20 2018, 10:12 AM
ncw closed D44440: [WebAssembly] Distinguish symbol/debug names for functions and test.
Apr 20 2018, 10:12 AM
ncw committed rL330448: [WebAssembly] Distinguish debug/symbol names in the Wasm structs. NFC.
[WebAssembly] Distinguish debug/symbol names in the Wasm structs. NFC
Apr 20 2018, 10:11 AM
ncw closed D45021: [WebAssembly] Distinguish debug/symbol names in the Wasm structs. NFC.
Apr 20 2018, 10:11 AM

Apr 13 2018

ncw added a comment to D44313: [WebAssembly] Implement GC for imports.

Thanks for the feedback! I'll merge in a week if I haven't heard anything more.

Apr 13 2018, 7:08 AM

Apr 11 2018

ncw added a comment to D44313: [WebAssembly] Implement GC for imports.

It's been another fortnight on this issue - is it now ready to go?

Apr 11 2018, 6:32 AM
ncw added a comment to D45021: [WebAssembly] Distinguish debug/symbol names in the Wasm structs. NFC.

There are no outstanding review comments, and this is blocking the already-approved D44440. Is it good to land?

Apr 11 2018, 6:27 AM
ncw added a comment to D44030: [WebAssembly] Tidy up handling of global symbol relocations.

@sunfish, @dschuff, it's been another fortnight on this PR. If you don't want to look at it, or want to suggest another reviewer - that's fine, but it would be helpful to know, to get some feedback on whether I should by trying to get this in, or abandon it.

Apr 11 2018, 6:26 AM

Apr 3 2018

ncw updated the diff for D45021: [WebAssembly] Distinguish debug/symbol names in the Wasm structs. NFC.

Updated: removed redundant comment

Apr 3 2018, 6:26 AM

Mar 29 2018

ncw created D45021: [WebAssembly] Distinguish debug/symbol names in the Wasm structs. NFC.
Mar 29 2018, 5:57 AM
ncw updated the diff for D44440: [WebAssembly] Distinguish symbol/debug names for functions and test.

Updated, with clear differentiation between (symbol) name and debug name.

Mar 29 2018, 5:55 AM

Mar 28 2018

ncw accepted D45001: [WebAssembly] Error if both --export-table and --import-table are specified..

Looks good!

Mar 28 2018, 11:40 PM
ncw added inline comments to D44427: [WebAssembly] Add export/import for function pointer table.
Mar 28 2018, 5:57 AM
ncw committed rL328700: [WebAssembly] Name Config members after commandline argument. NFC.
[WebAssembly] Name Config members after commandline argument. NFC
Mar 28 2018, 5:56 AM
ncw committed rLLD328700: [WebAssembly] Name Config members after commandline argument. NFC.
[WebAssembly] Name Config members after commandline argument. NFC
Mar 28 2018, 5:56 AM

Mar 27 2018

ncw added a comment to D43675: [WebAssembly] Rename imported/exported memory symbol to __linear_memory.

How about we do the multi-stage thing:

Mar 27 2018, 11:08 AM
ncw planned changes to D44311: [WebAssembly] Implement -print-gc-sections to test global GC.
Mar 27 2018, 11:05 AM
ncw updated the diff for D44313: [WebAssembly] Implement GC for imports.

Updated - sorry for the long wait!

Mar 27 2018, 11:05 AM
ncw committed rL328643: [WebAssembly] Add export/import for function pointer table.
[WebAssembly] Add export/import for function pointer table
Mar 27 2018, 10:42 AM
ncw committed rLLD328643: [WebAssembly] Add export/import for function pointer table.
[WebAssembly] Add export/import for function pointer table
Mar 27 2018, 10:42 AM
ncw closed D44427: [WebAssembly] Add export/import for function pointer table.
Mar 27 2018, 10:41 AM
ncw added a comment to D44030: [WebAssembly] Tidy up handling of global symbol relocations.

Ping again...

Mar 27 2018, 9:50 AM

Mar 16 2018

ncw added inline comments to D44311: [WebAssembly] Implement -print-gc-sections to test global GC.
Mar 16 2018, 9:00 AM
ncw added a comment to D44313: [WebAssembly] Implement GC for imports.

Thanks for that! OK, I'll update these reviews and nudge them forwards next week. I've just been very busy at work this week with a customer project, and nut been able to spend and time on wasm in the evenings at home.

Mar 16 2018, 8:47 AM

Mar 14 2018

ncw added a comment to D44150: [WebAssembly] Use DenseMapInfo traits from LLVM repo. NFC.
  • ICF support (fold identical constant data sections together)

For ICF, I'd recommend you make an improvement to the compiler and the wasm object file format first. The current implementation of lld's ICF is in some sense too aggressive -- it merges functions when they are identical. But that's actually a violation of the C/C++ spec because if you take addresses of two different functions, they must be distinct. If your program depends on pointer uniqueness, lld's ICF break your program.

On the other hand, lld is conservative on merging data. Comparing two pointers for data is more common in programs, so we don't merge two read-only data by ICF even if their contents are identical. So there's a missed opportunity here.

What we really should do is to make an improvement to the compiler so that it emits the information as to whether an address is significant or not for each chunk, and use that information in the linker. In this way, we can optimize linker output for size the most.

Mar 14 2018, 2:52 PM
ncw committed rLLD327579: [WebAssembly] Fix -Werror=extra failure due to enum in ternary.
[WebAssembly] Fix -Werror=extra failure due to enum in ternary
Mar 14 2018, 2:46 PM
ncw committed rL327579: [WebAssembly] Fix -Werror=extra failure due to enum in ternary.
[WebAssembly] Fix -Werror=extra failure due to enum in ternary
Mar 14 2018, 2:46 PM
ncw added inline comments to D44313: [WebAssembly] Implement GC for imports.
Mar 14 2018, 11:59 AM
ncw added inline comments to D44311: [WebAssembly] Implement -print-gc-sections to test global GC.
Mar 14 2018, 11:57 AM
ncw added inline comments to D44393: [WebAssembly] Add missing implementation for --initial/max-memory args.
Mar 14 2018, 11:51 AM
ncw added a comment to D44316: [WebAssembly] Demangle symbol names for use by the browser debugger.

I opened a can of worms! I think it can be cleaned up though...

Mar 14 2018, 11:47 AM
ncw added inline comments to D44440: [WebAssembly] Distinguish symbol/debug names for functions and test.
Mar 14 2018, 9:49 AM
ncw added inline comments to D44316: [WebAssembly] Demangle symbol names for use by the browser debugger.
Mar 14 2018, 9:30 AM
ncw updated the diff for D44427: [WebAssembly] Add export/import for function pointer table.

Updated to not export by default, and creates export/import based on last-specified of --export-table and --import-table

Mar 14 2018, 9:19 AM
ncw committed rL327527: [WebAssembly] Use DenseMapInfo traits from LLVM repo. NFC.
[WebAssembly] Use DenseMapInfo traits from LLVM repo. NFC
Mar 14 2018, 9:00 AM
ncw committed rLLD327527: [WebAssembly] Use DenseMapInfo traits from LLVM repo. NFC.
[WebAssembly] Use DenseMapInfo traits from LLVM repo. NFC
Mar 14 2018, 9:00 AM
ncw closed D44150: [WebAssembly] Use DenseMapInfo traits from LLVM repo. NFC.
Mar 14 2018, 9:00 AM
ncw committed rL327526: [WebAssembly] Add DenseMap traits and operator== for Wasm type structs.
[WebAssembly] Add DenseMap traits and operator== for Wasm type structs
Mar 14 2018, 9:00 AM
ncw closed D44303: [WebAssembly] Add DenseMap traits and operator== for Wasm type structs. NFC.
Mar 14 2018, 9:00 AM
ncw added a comment to D44344: [WebAssembly] Avoid COMDAT hashmap lookup for each symbol. NFC.

Thanks!

Mar 14 2018, 8:48 AM
ncw committed rLLD327523: [WebAssembly] Avoid COMDAT hashmap lookup for each symbol. NFC.
[WebAssembly] Avoid COMDAT hashmap lookup for each symbol. NFC
Mar 14 2018, 8:47 AM
ncw committed rL327523: [WebAssembly] Avoid COMDAT hashmap lookup for each symbol. NFC.
[WebAssembly] Avoid COMDAT hashmap lookup for each symbol. NFC
Mar 14 2018, 8:47 AM
ncw closed D44344: [WebAssembly] Avoid COMDAT hashmap lookup for each symbol. NFC.
Mar 14 2018, 8:47 AM
ncw committed rL327522: [WebAssembly] Identify COMDATs by index rather than string. NFC.
[WebAssembly] Identify COMDATs by index rather than string. NFC
Mar 14 2018, 8:47 AM
ncw closed D44343: [WebAssembly] Identify COMDATs by index rather than string. NFC.
Mar 14 2018, 8:47 AM
ncw committed rLLD327508: [WebAssembly] Add missing implementation for --initial/max-memory args.
[WebAssembly] Add missing implementation for --initial/max-memory args
Mar 14 2018, 6:56 AM
ncw committed rL327508: [WebAssembly] Add missing implementation for --initial/max-memory args.
[WebAssembly] Add missing implementation for --initial/max-memory args
Mar 14 2018, 6:56 AM
ncw closed D44393: [WebAssembly] Add missing implementation for --initial/max-memory args.
Mar 14 2018, 6:56 AM
ncw committed rLLD327507: [WebAssembly] Replace varargs debugPrint with standard log call.
[WebAssembly] Replace varargs debugPrint with standard log call
Mar 14 2018, 6:53 AM
ncw committed rL327507: [WebAssembly] Replace varargs debugPrint with standard log call.
[WebAssembly] Replace varargs debugPrint with standard log call
Mar 14 2018, 6:52 AM
ncw closed D44441: [WebAssembly] Replace varargs debugPrint with standard log call.
Mar 14 2018, 6:52 AM
ncw added a comment to D44451: [WebAssembly] Fix expected contents of relocations with addends.

Looks good, well caught

Mar 14 2018, 6:38 AM

Mar 13 2018

ncw created D44441: [WebAssembly] Replace varargs debugPrint with standard log call.
Mar 13 2018, 10:44 AM
ncw added inline comments to D44311: [WebAssembly] Implement -print-gc-sections to test global GC.
Mar 13 2018, 10:18 AM
ncw added a comment to D44427: [WebAssembly] Add export/import for function pointer table.

Since callback APIs are so common (eg high usage of dynCall in Emscripten applications) it would be nice if engines could optimise table-based access so that it's usable. Why standardise an API for doing an indirect call from JS, then tell users, "write a Wasm trampoline instead since that's faster than the browser-provided method".

Mar 13 2018, 10:17 AM
ncw created D44440: [WebAssembly] Distinguish symbol/debug names for functions and test.
Mar 13 2018, 10:13 AM
ncw added inline comments to D44313: [WebAssembly] Implement GC for imports.
Mar 13 2018, 10:07 AM
ncw updated the diff for D44313: [WebAssembly] Implement GC for imports.

Updated:

  • rebased and fixed conflicts
  • Move Live flag from Symbol to UndefinedFunction::ImportLive to clarify what it is that we're marking live
  • small nits based on feedback
Mar 13 2018, 10:07 AM
ncw updated the diff for D44311: [WebAssembly] Implement -print-gc-sections to test global GC.

Updated: removed chunk from MarkLive, fixed conflicts on rebase.

Mar 13 2018, 9:29 AM
ncw updated the summary of D44427: [WebAssembly] Add export/import for function pointer table.
Mar 13 2018, 8:53 AM
ncw created D44427: [WebAssembly] Add export/import for function pointer table.
Mar 13 2018, 7:11 AM
ncw added a comment to D44393: [WebAssembly] Add missing implementation for --initial/max-memory args.

Code looks good. I have concerns about adding flags that don't have current users. Can you point to at least one before we add this?

Mar 13 2018, 6:38 AM
ncw added a comment to D44303: [WebAssembly] Add DenseMap traits and operator== for Wasm type structs. NFC.

D44150 is blocked on this. There's not a huge benefit to moving the header into the LLVM repo, but it could enable code-sharing with WasmObjectWriter which would be nice.

Mar 13 2018, 6:34 AM
ncw committed rLLD327392: [WebAssembly] Demangle symbol names for use by the browser debugger.
[WebAssembly] Demangle symbol names for use by the browser debugger
Mar 13 2018, 6:33 AM
ncw committed rL327392: [WebAssembly] Demangle symbol names for use by the browser debugger.
[WebAssembly] Demangle symbol names for use by the browser debugger
Mar 13 2018, 6:33 AM
ncw closed D44316: [WebAssembly] Demangle symbol names for use by the browser debugger.
Mar 13 2018, 6:33 AM
ncw closed D44316: [WebAssembly] Demangle symbol names for use by the browser debugger.
Mar 13 2018, 6:33 AM
ncw added a comment to D44316: [WebAssembly] Demangle symbol names for use by the browser debugger.

Landing with just the name section changes (in Writer.cpp and Driver.cpp).

Mar 13 2018, 6:33 AM
ncw committed rLLD327391: [WebAssembly] Use helper macro from ELF/Options.td to tidy. NFC.
[WebAssembly] Use helper macro from ELF/Options.td to tidy. NFC
Mar 13 2018, 6:19 AM
ncw committed rL327391: [WebAssembly] Use helper macro from ELF/Options.td to tidy. NFC.
[WebAssembly] Use helper macro from ELF/Options.td to tidy. NFC
Mar 13 2018, 6:19 AM
ncw closed D44394: [WebAssembly] Use helper macro from ELF/Options.td to tidy. NFC.
Mar 13 2018, 6:19 AM
ncw committed rL327390: [WebAssembly] Add missing --demangle arg.
[WebAssembly] Add missing --demangle arg
Mar 13 2018, 6:16 AM
ncw committed rLLD327390: [WebAssembly] Add missing --demangle arg.
[WebAssembly] Add missing --demangle arg
Mar 13 2018, 6:16 AM