dschuff (Derek Schuff)
Yet Another Compiler Compiler

Projects

User does not belong to any projects.

User Details

User Since
Jan 7 2013, 9:35 AM (245 w, 6 d)

Recent Activity

Wed, Sep 20

dschuff added a comment to D38111: [WebAssembly] Weak symbols should be defined in SF_Global.

retro-LGTM

Wed, Sep 20, 4:55 PM
dschuff accepted D38096: [WebAssembly] Add support for local symbol bindings.
Wed, Sep 20, 1:37 PM

Tue, Sep 19

dschuff accepted D37886: [WebAssembly] Add support for naming wasm data segments.
Tue, Sep 19, 1:10 PM

Fri, Sep 15

dschuff added a comment to D37942: [WebAssembly] Restore __builtin_wasm_rethrow builtin.

(btw if there's a link in the commit message to the review, it should close automatically after commit)

Fri, Sep 15, 10:26 PM
dschuff added a comment to D37931: Remove __builtin_wasm_rethrow builtin.

Right, I was actually referring to the VM's internal tracking of exception stacks. I'm assuming it will use its usual mechanism for JS exceptions, which does keep a stack trace that you can access from JS code. Rethrowing rather than a new throw might keep that one intact. It doesn't help with the C++ state, but it's still better than nothing.

Fri, Sep 15, 4:56 PM
dschuff added a comment to D37942: [WebAssembly] Restore __builtin_wasm_rethrow builtin.

Or you could just call it a revert of the previous patch, if you wanted.

Fri, Sep 15, 4:54 PM
dschuff accepted D37942: [WebAssembly] Restore __builtin_wasm_rethrow builtin.
Fri, Sep 15, 4:53 PM
dschuff added a comment to D37886: [WebAssembly] Add support for naming wasm data segments.

So are we going to say that the mere existence of segment names tells the linker it should merge them as though they were separate data sections? (or, is there any other possible use?) Is there other potential per-MCSection metadata we'd want that would make this metadata end up more generic?

Fri, Sep 15, 3:24 PM
dschuff added a comment to D37931: Remove __builtin_wasm_rethrow builtin.

So, it just occurred to me; we don't have 2-phase unwinding, which is useful to get good stack traces for debugging (because if you have unhandled exceptions you can abort before the second phase, rather than after the stack has been unwound). If the VM has an exception object from the original throw, it should have a stack trace attached to it. If we rethrow rather than throwing anew each time, then it will be preserved. So could we try to use rethrow instead of throw where possible? If we think it even might be feasible, it might be worth leaving rethrow in for now.

Fri, Sep 15, 3:06 PM
dschuff accepted D37876: [WebAssembly] MC: Create wasm data segments based on MCSections.
Fri, Sep 15, 12:49 PM
dschuff added a comment to D37876: [WebAssembly] MC: Create wasm data segments based on MCSections.

Should the patch title be "create data *segments* based on MCSections"?

Fri, Sep 15, 10:11 AM
dschuff accepted D37875: [WebAssembly] MC: Pass ArrayRefs rather than SmallVectors.
Fri, Sep 15, 8:57 AM

Thu, Sep 14

dschuff added a comment to D37834: [WebAssembly] Use a separate wasm data segment for each global symbol.

Oh also a nit: It's spelled 'separate' :D

Thu, Sep 14, 3:35 PM
dschuff accepted D37834: [WebAssembly] Use a separate wasm data segment for each global symbol.
Thu, Sep 14, 3:34 PM
dschuff added a comment to D37869: [WebAssembly] Remove default -fdata-sections.

Do wer have any tests with global vars that have an explicit section? We should have one, that tests that they get merged into a segment in the object file.

Thu, Sep 14, 2:59 PM
dschuff added a comment to D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections by default.

I think the reasoning was really just that code size reduction is even more important on wasm than other platforms, and because it's a new ABI there's no one depending on the default behavior that would break.

Thu, Sep 14, 2:44 PM
dschuff added a comment to D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections by default.

Shouldn't the LLVM-side tests be using the LLVM utils and not clang? Or did you mean lld tests, or waterfall tests or what?

Thu, Sep 14, 11:10 AM
dschuff added inline comments to D37834: [WebAssembly] Use a separate wasm data segment for each global symbol.
Thu, Sep 14, 11:05 AM

Wed, Sep 13

dschuff added a comment to D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections by default.

I guess the reason for removing this is that we don't really have an analogue of different text sections in the wasm object format, but that dead function stripping can be done by any linker smart enough to link wasm at all. But this isn't necessarily true of data sections though, is it?

Wed, Sep 13, 4:03 PM

Tue, Sep 12

dschuff committed rL313101: [WebAssembly] Add sign extend instructions from atomics proposal.
[WebAssembly] Add sign extend instructions from atomics proposal
Tue, Sep 12, 5:30 PM
dschuff closed D37603: [WebAssembly] Add sign extend instructions from atomics proposal by committing rL313101: [WebAssembly] Add sign extend instructions from atomics proposal.
Tue, Sep 12, 5:30 PM
dschuff added a comment to D37603: [WebAssembly] Add sign extend instructions from atomics proposal.

Ping!

Tue, Sep 12, 9:44 AM
dschuff accepted D37633: [WebAssembly] Remove flags from MCSectionWasm.
Tue, Sep 12, 8:52 AM

Thu, Sep 7

dschuff updated the diff for D37603: [WebAssembly] Add sign extend instructions from atomics proposal.
  • remove spurious change
Thu, Sep 7, 4:22 PM
dschuff created D37603: [WebAssembly] Add sign extend instructions from atomics proposal.
Thu, Sep 7, 4:19 PM

Wed, Sep 6

dschuff accepted D37497: [WebAssembly] Only treat imports/exports as symbols when reading relocatable object files.

otherwise LGTM

Wed, Sep 6, 1:38 PM

Tue, Sep 5

dschuff added inline comments to D37497: [WebAssembly] Only treat imports/exports as symbols when reading relocatable object files.
Tue, Sep 5, 9:03 PM
dschuff added inline comments to D37497: [WebAssembly] Only treat imports/exports as symbols when reading relocatable object files.
Tue, Sep 5, 5:03 PM

Fri, Sep 1

dschuff accepted D37385: [WebAssembly] Update reloction names to match spec.
Fri, Sep 1, 10:28 AM
dschuff accepted D37384: [WebAssembly] Fix getSymbolValue for exported globals.
Fri, Sep 1, 10:21 AM

Thu, Aug 31

dschuff added a comment to D37359: [WebAssembly] Fix getSymbolValue() for data symbols.

but "Fixes PRNNN" is fine to indicate that a bug is fixed, although now that I think of it, a real link (in either form) is probably even better. Either way there's no auto-linking. Not everyone even uses LLVM's bug tracker anyway.

Thu, Aug 31, 2:56 PM
dschuff committed rL312287: [WebAssembly] Refactor load ISel tablegen patterns into classes.
[WebAssembly] Refactor load ISel tablegen patterns into classes
Thu, Aug 31, 2:55 PM
dschuff closed D37345: [WebAssembly] Refactor load ISel tablegen patterns into classes by committing rL312287: [WebAssembly] Refactor load ISel tablegen patterns into classes.
Thu, Aug 31, 2:55 PM
dschuff added a comment to D37359: [WebAssembly] Fix getSymbolValue() for data symbols.

It's just a bug number. PR I guess is a "Problem Report"? Also https://llvm.org/PR34392 is a shortcut to https://bugs.llvm.org/show_bug.cgi?id=34392

Thu, Aug 31, 2:55 PM
dschuff added a comment to D37359: [WebAssembly] Fix getSymbolValue() for data symbols.

ah we raced. LGTM :)

Thu, Aug 31, 2:45 PM
dschuff accepted D37359: [WebAssembly] Fix getSymbolValue() for data symbols.

Cool, I guess this fixes PR34392, you should put that in the commit description too.

Thu, Aug 31, 2:45 PM
dschuff accepted D37358: [WebAssembly] Validate exports when parsing object files.
Thu, Aug 31, 2:41 PM
dschuff updated the diff for D37345: [WebAssembly] Refactor load ISel tablegen patterns into classes.
  • address comments: remove atomic rules with constant offsets
Thu, Aug 31, 2:30 PM
dschuff added inline comments to D37345: [WebAssembly] Refactor load ISel tablegen patterns into classes.
Thu, Aug 31, 2:24 PM
dschuff created D37345: [WebAssembly] Refactor load ISel tablegen patterns into classes.
Thu, Aug 31, 11:12 AM

Wed, Aug 30

dschuff committed rL312163: [WebAssembly] Update debug info test after r312144.
[WebAssembly] Update debug info test after r312144
Wed, Aug 30, 12:58 PM
dschuff committed rL312145: [WebAssembly] Add target feature for atomics.
[WebAssembly] Add target feature for atomics
Wed, Aug 30, 11:09 AM
dschuff closed D37300: [WebAssembly] Add target feature for atomics by committing rL312145: [WebAssembly] Add target feature for atomics.
Wed, Aug 30, 11:09 AM
dschuff updated the diff for D37300: [WebAssembly] Add target feature for atomics.
  • address review comments
Wed, Aug 30, 9:56 AM
dschuff added inline comments to D37300: [WebAssembly] Add target feature for atomics.
Wed, Aug 30, 9:56 AM
dschuff updated the diff for D37300: [WebAssembly] Add target feature for atomics.
  • revert extra change
Wed, Aug 30, 9:09 AM
dschuff updated the summary of D37300: [WebAssembly] Add target feature for atomics.
Wed, Aug 30, 9:07 AM
dschuff created D37300: [WebAssembly] Add target feature for atomics.
Wed, Aug 30, 9:06 AM

Aug 24 2017

dschuff accepted D37073: [WebAssembly] FastISel : Bail to SelectionDAG for constexpr calls.
Aug 24 2017, 12:26 PM
dschuff added a comment to D37073: [WebAssembly] FastISel : Bail to SelectionDAG for constexpr calls.

Also looking back and my previous comment,

Aug 24 2017, 11:03 AM
dschuff accepted D37100: [WebAssembly] Update GCC test suite failure expectations.
Aug 24 2017, 8:46 AM

Aug 23 2017

dschuff added a comment to D37073: [WebAssembly] FastISel : Bail to SelectionDAG for constexpr calls.

OK nevermind, GlobalVariable doesn't make sense because you have to load it, and similarly for GEP. We could probably do inttoptr though, and maybe select, to get a function pointer and call that.

Aug 23 2017, 10:33 AM
dschuff added a comment to D37073: [WebAssembly] FastISel : Bail to SelectionDAG for constexpr calls.

Are there any other constants/constexprs besides bitcast that we might encounter, that we should test? Looking at the constexprs, I don't see too much that looks likely. Maybe GEP? I guess you can indirectly call a GlobalVariable, which ought to look the same as a local function pointer, maybe we should have a test for that too (presumably dag isel handles that too).
Also that this patch really does is just bail from fast-isel when the callee is a constant (which is fine), and that has the effect of causing calls of bitcasts to be lowered as direct calls.

Aug 23 2017, 10:03 AM
dschuff accepted D37070: [WebAssembly] Fix overflow for input without version.

Thanks!

Aug 23 2017, 9:19 AM

Aug 15 2017

dschuff committed rL310981: [WebAssembly] Remove infinite loop from reg-stackify test.
[WebAssembly] Remove infinite loop from reg-stackify test
Aug 15 2017, 5:51 PM

Aug 14 2017

dschuff accepted D36595: [WebAssembly] Remove invalid lld arguments.
Aug 14 2017, 2:26 PM

Jul 21 2017

dschuff added a comment to D35522: Move Runtime libcall definitions to a .def file.

Actually, maybe an even better idea:
getLibcallName() returns a StringRef and asserts rather than returning a failure code. getLIbcallNameIfAvailable() returns an Expected<StringRef> and can fail.
The former matches 90% of the existing uses. This would let us move away from char* for the external symbol APIs (assuming that's a good thing) but most of the existing uses wouldn't need to actually change, and those that check failure would still be simple.

Jul 21 2017, 10:10 AM
dschuff added a comment to D35522: Move Runtime libcall definitions to a .def file.

So it looks like switching the API away from char*-based would be, maybe not super-trivial, but probably not too bad. It's interlinked essentially with other APIs relating to external symbols:
mostly SelectionDAG::getExternalSymbol(), and also MachineInstrBuilder::addExternalSymbol() but those could be converted too, and I don't think I'd mind doing it as general cleanup. I wonder if Expected<StringRef> is a little heavyweight though. It seems to have a really strong convention that the result should be checked first, and most use cases just don't care (arguably they could assert, but requiring that would add a lot of boilerplate asserts for probably not a lot of benefit). StringRef by itself (with empty string taking the place of the current use of nullptr) wouldn't be too bad, although having the empty string as a sort of sentinel value only used by a small fraction of the uses doesn't seem ideal either. I might still be inclined to prefer that over Expected though. Any thoughts?

Jul 21 2017, 9:54 AM

Jul 19 2017

dschuff committed rL308547: Update module map for RuntimeLibcalls.
Update module map for RuntimeLibcalls
Jul 19 2017, 4:16 PM
dschuff added inline comments to D35522: Move Runtime libcall definitions to a .def file.
Jul 19 2017, 2:57 PM
dschuff committed rL308531: Move Runtime libcall definitions to a .def file.
Move Runtime libcall definitions to a .def file
Jul 19 2017, 2:56 PM
dschuff closed D35522: Move Runtime libcall definitions to a .def file by committing rL308531: Move Runtime libcall definitions to a .def file.
Jul 19 2017, 2:56 PM
dschuff added inline comments to D35592: [WebAssembly] Remove duplicated RTLIB names.
Jul 19 2017, 10:34 AM
dschuff updated the diff for D35592: [WebAssembly] Remove duplicated RTLIB names.
  • remove redundant unsupported elements and simplify initialization
Jul 19 2017, 10:34 AM
dschuff updated the diff for D35522: Move Runtime libcall definitions to a .def file.
  • clarify comments
Jul 19 2017, 10:23 AM
dschuff added inline comments to D35522: Move Runtime libcall definitions to a .def file.
Jul 19 2017, 10:23 AM

Jul 18 2017

dschuff added inline comments to D35592: [WebAssembly] Remove duplicated RTLIB names.
Jul 18 2017, 5:05 PM
dschuff added inline comments to D35522: Move Runtime libcall definitions to a .def file.
Jul 18 2017, 5:01 PM
dschuff added a dependent revision for D35522: Move Runtime libcall definitions to a .def file: D35592: [WebAssembly] Remove duplicated RTLIB names.
Jul 18 2017, 4:57 PM
dschuff added a dependency for D35592: [WebAssembly] Remove duplicated RTLIB names: D35522: Move Runtime libcall definitions to a .def file.
Jul 18 2017, 4:57 PM
dschuff created D35592: [WebAssembly] Remove duplicated RTLIB names.
Jul 18 2017, 4:54 PM
dschuff added inline comments to D35522: Move Runtime libcall definitions to a .def file.
Jul 18 2017, 2:17 PM
dschuff added a comment to D35522: Move Runtime libcall definitions to a .def file.

Yes; the wasm backend currently has a partial duplication of the libcall names that can go away (in fact, maybe i'll even roll that into this patch), and it also has signature information for each function. The signatures could go into the .def file as well, and the other users of the def file could just define a HANDLE_LIBCALL that ignores them.

Jul 18 2017, 11:31 AM

Jul 17 2017

dschuff created D35522: Move Runtime libcall definitions to a .def file.
Jul 17 2017, 5:47 PM

Jul 12 2017

dschuff accepted D35322: [WebAssembly] Mark element atomic memcpy/memmove intrinsics as unsupported.

LGTM.
Looking forward to reversing all of this soon :)

Jul 12 2017, 1:48 PM

Jul 11 2017

dschuff accepted D34916: Remove unneeded use of #undef DEBUG_TYPE. NFC.
Jul 11 2017, 5:48 PM
dschuff accepted D35234: [WebAssembly] Expose the offset of each data segment.

OK, I got it; this is for the linker's use of the lib/object abstraction, that's what I was missing.

Jul 11 2017, 5:20 PM
dschuff added a comment to D35234: [WebAssembly] Expose the offset of each data segment.

So just to be sure I understand, we need this because we only have segments for initialized data (and there is implicitly BSS in between), so the offset can't just be calculated from the sizes of the segments?

Jul 11 2017, 12:56 PM

Jul 10 2017

dschuff accepted D35208: [WebAssembly] Add more details to llvm-readobj for wasm files.

Cool, LGTM

Jul 10 2017, 1:46 PM
dschuff accepted D35213: [WebAssembly] Be consistent in generating trivial test input files.
Jul 10 2017, 1:20 PM
dschuff added a comment to D35208: [WebAssembly] Add more details to llvm-readobj for wasm files.

So trivial.obj.wasm already has the updated linking section or this patch just depends on updating it?

Jul 10 2017, 12:48 PM
dschuff added a comment to D35208: [WebAssembly] Add more details to llvm-readobj for wasm files.

Code looks good. Maybe also add a test to test/MC/WebAssembly/reloc-data.ll or one of those others too?

Jul 10 2017, 9:45 AM

Jul 5 2017

dschuff accepted D35029: [WebAssembly] Support weak defined symbols.

One nit, otherwise LGTM. Don't forget to update Linking.md

Jul 5 2017, 2:05 PM
dschuff accepted D34966: [WebAssembly] Fix types for address taken functions.

LGTM with a nit. In the summary, did you mean that we were *not* setting their params and return types?

Jul 5 2017, 11:41 AM
dschuff accepted D34734: [WebAssembly] MC: Don't generate extra types for weak alias.
Jul 5 2017, 11:36 AM

Jun 29 2017

dschuff accepted D34783: [WebAssembly] Add throw/rethrow builtins for exception handling.
Jun 29 2017, 1:35 PM
dschuff accepted D34826: [WebAssembly] Add support for exception handling instructions.
Jun 29 2017, 1:35 PM
dschuff added a comment to D34783: [WebAssembly] Add throw/rethrow builtins for exception handling.

This looks good. I guess we need to land the intrinsics on the LLVM side first though.

Jun 29 2017, 10:51 AM

Jun 28 2017

dschuff added inline comments to D34734: [WebAssembly] MC: Don't generate extra types for weak alias.
Jun 28 2017, 9:04 AM

Jun 27 2017

dschuff accepted D34657: [WebAssembly] Add data size and alignment to linking section.
Jun 27 2017, 12:57 PM
dschuff added inline comments to D34657: [WebAssembly] Add data size and alignment to linking section.
Jun 27 2017, 10:19 AM
dschuff added inline comments to D34658: [WebAssembly] Add support for printing relocations with llvm-objdump.
Jun 27 2017, 10:12 AM
dschuff accepted D34658: [WebAssembly] Add support for printing relocations with llvm-objdump.

otherwise LGTM

Jun 27 2017, 10:11 AM

Jun 26 2017

dschuff accepted D34635: [WebAssembly] Add more support for weak symbols.
Jun 26 2017, 12:39 PM

Jun 23 2017

dschuff committed rL306190: [WebAssembly] Fix build after r306177.
[WebAssembly] Fix build after r306177
Jun 23 2017, 6:01 PM

Jun 21 2017

dschuff accepted D34486: MC: Fix dumping of MCFragment values.
Jun 21 2017, 5:09 PM
dschuff accepted D34483: Fix build of SystemZ target after r305963.
Jun 21 2017, 4:04 PM
dschuff accepted D33565: [WebAssembly] Add default -allow-undefined-file to linker args.
Jun 21 2017, 4:01 PM
dschuff accepted D34481: Mark dump() methods as const. NFC.
Jun 21 2017, 3:18 PM
dschuff updated subscribers of D34481: Mark dump() methods as const. NFC.
Jun 21 2017, 3:13 PM