Page MenuHomePhabricator

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 (533 w, 5 d)

US-Pacific timezone.

Recent Activity

Thu, Mar 30

dschuff accepted D147190: [lld][WebAssembly] Process stub libraries before and after LTO.

I guess the new test covers the stub->bitcode lib dependence case. Is there a test that covers the codgen->libcall->stub case?

Thu, Mar 30, 11:05 AM · Restricted Project, Restricted Project
dschuff added a comment to D147190: [lld][WebAssembly] Process stub libraries before and after LTO.

i.e. it seems like it would be simpler to just support processing the stubs once. or maybe more specifically, to handle them the same as other archive libraries (i.e. participate in the iterate-to-convergence phase of symbol resolution but not get special treatment for LTO?)

Thu, Mar 30, 10:58 AM · Restricted Project, Restricted Project
dschuff added a comment to D147190: [lld][WebAssembly] Process stub libraries before and after LTO.

Do we really need to support stub libcalls (i.e. the kind that can be generated at codegen time)? These should just be compiler-rt and maybe a few core libc functions, right? Do we expect those to be implemented in JS and/or the environment?

Thu, Mar 30, 10:57 AM · Restricted Project, Restricted Project

Mon, Mar 27

dschuff accepted D146860: [WebAssembly] Do nothing when sinking to same place.
Mon, Mar 27, 7:59 AM · Restricted Project, Restricted Project

Fri, Mar 24

dschuff accepted D146841: [WebAssembly] Use ArrayRef/SmallVectorImpl in parameters (NFC).

cool, LGTM!

Fri, Mar 24, 1:06 PM · Restricted Project, Restricted Project
dschuff added inline comments to D146744: [WebAssembly] Redesign DebugValueManager.
Fri, Mar 24, 10:18 AM · Restricted Project, Restricted Project

Thu, Mar 23

dschuff accepted D146744: [WebAssembly] Redesign DebugValueManager.
Thu, Mar 23, 5:32 PM · Restricted Project, Restricted Project
dschuff accepted D146743: [WebAssembly] Tidy up DebugValueManager (NFC).
Thu, Mar 23, 2:31 PM · Restricted Project, Restricted Project
dschuff accepted D145308: [lld][WebAssembly] Initial support for stub libraries.

I think we can go ahead. We can always adjust emscripten's behavior as needed to synchronize with wasi-sdk

Thu, Mar 23, 1:55 PM · Restricted Project, Restricted Project

Tue, Mar 21

dschuff added a comment to D146568: [NFC][WebAssembly] Autogenerate test expectations for tailcall.ll.

I'm on the fence too. Are we going to (eventually) change all tests expectations? I think there are tests that can really benefit from the brevity (especially tests added with bugfixes, with which we only want to check a specific few lines of the output). But this test may not be one of them.

Tue, Mar 21, 3:20 PM · Restricted Project, Restricted Project
dschuff accepted D146569: [WebAssembly] Fix epilogue insertion for indirect tail calls.
Tue, Mar 21, 3:00 PM · Restricted Project, Restricted Project
dschuff accepted D146568: [NFC][WebAssembly] Autogenerate test expectations for tailcall.ll.

LGTM I guess. TBH I'm still a little on the fence about whether it's better to have fully auto-generated test expectations which are easy to update but check all the output, or more precisely targeted expectations which are more self-documenting (since they don't include output not relevant to the test at hand) and are less likely to require updating for unrelated changes...

Tue, Mar 21, 2:59 PM · Restricted Project, Restricted Project

Mon, Mar 13

dschuff accepted D145998: [WebAssembly] Use MachineInstr::setDebugValueUndef.

When making DBG_VALUE/DBG_VALUE_INST instructions undefined

Mon, Mar 13, 3:57 PM · Restricted Project, Restricted Project
dschuff added a comment to D145308: [lld][WebAssembly] Initial support for stub libraries.

Otherwise this LGTM, but I'd still like to hear Dan's opinion if he's got one.

Mon, Mar 13, 3:55 PM · Restricted Project, Restricted Project
dschuff accepted D145966: [WebAssembly] Replace Bugzilla links with Github issues.
Mon, Mar 13, 11:36 AM · Restricted Project, Restricted Project
dschuff accepted D145626: [WebAssembly] Support debug info for TLS + global in PIC mode.

I guess you mean not stack_pointer but tls_base and __memory_base, right?

Mon, Mar 13, 10:21 AM · Restricted Project, Restricted Project

Fri, Mar 10

dschuff added a comment to D145626: [WebAssembly] Support debug info for TLS + global in PIC mode.

One other question about the test. Did you generate it from a C file? When I've made tests like this in the past I've usually included the C source as a comment at the top to make it easier to regenerate if needed.
Maybe we can land this as-is and see how it works in the debugger, and work on the test more if we improve the code.

Fri, Mar 10, 10:42 AM · Restricted Project, Restricted Project
dschuff added a comment to D145626: [WebAssembly] Support debug info for TLS + global in PIC mode.

Ah right. With regular codegen tests we don't have this kind of problem because the assembly output is symbolic; also some tests that test disassembly use objdump -dr which prints relocation info next to instructions that need relocations. But I don't think dwarfdump will do that.
I agree that moving this test to lld doesn't seem great either.

Fri, Mar 10, 10:29 AM · Restricted Project, Restricted Project

Thu, Mar 9

dschuff accepted D145399: [lld][WebAssembly] Use C++17 nested namespace syntax in most places. NFC.
Thu, Mar 9, 5:19 PM · Restricted Project, Restricted Project
dschuff updated subscribers of D145626: [WebAssembly] Support debug info for TLS + global in PIC mode.
Thu, Mar 9, 10:13 AM · Restricted Project, Restricted Project
dschuff added a comment to D145626: [WebAssembly] Support debug info for TLS + global in PIC mode.

Only debug info won't work. So the devtools DWARF extension (https://chrome.google.com/webstore/detail/cc%20%20-devtools-support-dwa/pdcpmagijalfljmkmjngeonclgbbannb) will display undefined or some garbage value for TLS variables in dynamic linking. But that's the status quo for them anyway.

Thu, Mar 9, 9:55 AM · Restricted Project, Restricted Project
dschuff added a comment to D145308: [lld][WebAssembly] Initial support for stub libraries.

I think this feature could also be useful in non-emscripten environments, e.g. you could have a stub library for each WASI API provided by the embedder. Does wasi-sdk just use --allow-undefined for this now? Stub libraries seem nicer than that.
@sunfish WDYT, does this look useful?

Thu, Mar 9, 9:03 AM · Restricted Project, Restricted Project

Tue, Mar 7

dschuff added inline comments to D145308: [lld][WebAssembly] Initial support for stub libraries.
Tue, Mar 7, 12:11 PM · Restricted Project, Restricted Project

Mon, Mar 6

dschuff accepted D145431: [lld][WebAssembly] Implement --why-extract flag from the ELF backend.

I love these kinds of debugging options...

Mon, Mar 6, 5:15 PM · Restricted Project, Restricted Project
dschuff added inline comments to D145308: [lld][WebAssembly] Initial support for stub libraries.
Mon, Mar 6, 5:01 PM · Restricted Project, Restricted Project

Fri, Mar 3

dschuff committed rGc7af9ae577bb: Reapply: [WebAssembly] Implement build-id feature (authored by dschuff).
Reapply: [WebAssembly] Implement build-id feature
Fri, Mar 3, 5:19 PM · Restricted Project

Mar 2 2023

dschuff updated the diff for D145204: Reapply: [WebAssembly] Implement build-id feature.
  • clang-format
  • more cast?
Mar 2 2023, 5:11 PM · Restricted Project, Restricted Project
dschuff requested review of D145204: Reapply: [WebAssembly] Implement build-id feature.
Mar 2 2023, 4:19 PM · Restricted Project, Restricted Project
dschuff added a comment to D107662: [WebAssembly] Implement build-id feature.

Sorry about that, will fix.
And I guess I'll have to get into the habit of the pre-merge checks being useful!

Mar 2 2023, 3:45 PM · Restricted Project, Restricted Project
dschuff added a reverting change for rG41e31466af6a: [WebAssembly] Implement build-id feature: rGc8e5354f0063: Revert "[WebAssembly] Implement build-id feature".
Mar 2 2023, 3:29 PM · Restricted Project
dschuff committed rGc8e5354f0063: Revert "[WebAssembly] Implement build-id feature" (authored by dschuff).
Revert "[WebAssembly] Implement build-id feature"
Mar 2 2023, 3:29 PM · Restricted Project
dschuff added a reverting change for D107662: [WebAssembly] Implement build-id feature: rGc8e5354f0063: Revert "[WebAssembly] Implement build-id feature".
Mar 2 2023, 3:29 PM · Restricted Project, Restricted Project
dschuff committed rG41e31466af6a: [WebAssembly] Implement build-id feature (authored by dschuff).
[WebAssembly] Implement build-id feature
Mar 2 2023, 2:30 PM · Restricted Project
dschuff closed D107662: [WebAssembly] Implement build-id feature.
Mar 2 2023, 2:30 PM · Restricted Project, Restricted Project

Mar 1 2023

dschuff updated the diff for D107662: [WebAssembly] Implement build-id feature.
  • add comment and rename hashBuf
Mar 1 2023, 5:47 PM · Restricted Project, Restricted Project
dschuff added inline comments to D107662: [WebAssembly] Implement build-id feature.
Mar 1 2023, 4:37 PM · Restricted Project, Restricted Project
dschuff updated the diff for D107662: [WebAssembly] Implement build-id feature.
  • clean up baked-in buffer size
Mar 1 2023, 4:36 PM · Restricted Project, Restricted Project
dschuff added a comment to D107662: [WebAssembly] Implement build-id feature.

I think this is ready for another review, PTAL.

Mar 1 2023, 12:28 PM · Restricted Project, Restricted Project

Feb 27 2023

dschuff accepted D144747: [lld][WebAssembly] Fix handling of mixed strong and weak references.
Feb 27 2023, 10:03 AM · Restricted Project, Restricted Project

Feb 21 2023

dschuff added a reviewer for D107662: [WebAssembly] Implement build-id feature: aheejin.
Feb 21 2023, 4:49 PM · Restricted Project, Restricted Project
dschuff updated the summary of D107662: [WebAssembly] Implement build-id feature.
Feb 21 2023, 4:48 PM · Restricted Project, Restricted Project
dschuff updated the diff for D107662: [WebAssembly] Implement build-id feature.

Correctly rebase against main

Feb 21 2023, 4:42 PM · Restricted Project, Restricted Project
dschuff updated the diff for D107662: [WebAssembly] Implement build-id feature.

Rebase, create valid UUID for fast hash build ID, remove md5

Feb 21 2023, 4:41 PM · Restricted Project, Restricted Project
dschuff added a comment to D144354: [WebAssembly] Split WebAssemblyUtils to fix library layering for MC tools..

The general idea of this makes sense to me.
@pmatos and @asb have been thinking more about the type system recently, they might have an opinion.

Feb 21 2023, 12:57 PM · Restricted Project, Restricted Project

Feb 10 2023

dschuff added a comment to D141926: [WebAssembly] Add passes for GEP lowering.

Do those figures include using wasm-opt after linking?

Feb 10 2023, 4:01 PM · Restricted Project, Restricted Project
dschuff accepted D143783: [lld][WebAssembly] Limit size of shared 64-bit memories of 2^^34.

LGTM with a test.

Feb 10 2023, 3:36 PM · Restricted Project, Restricted Project

Feb 3 2023

dschuff accepted D143252: [CodeGen] Make more use of MachineOperand::getOperandNo. NFC..

WebAssembly LGTM

Feb 3 2023, 4:56 PM · Restricted Project, Restricted Project

Jan 31 2023

dschuff added inline comments to D143020: [lld][WebAssembly] Apply relocations to TLS data.
Jan 31 2023, 3:50 PM · Restricted Project, Restricted Project
dschuff accepted D143020: [lld][WebAssembly] Apply relocations to TLS data.
Jan 31 2023, 3:48 PM · Restricted Project, Restricted Project
dschuff accepted D143009: [lld][WebAssembly] Renamed a few tests to conform to naming convention. NFC.
Jan 31 2023, 12:53 PM · Restricted Project, Restricted Project

Jan 26 2023

dschuff updated subscribers of rG79649eacbc11: [WebAssembly] Trying to fix expensive buildbot.

@tlively does this test need the shuffle indices to test what it's intended to?

Jan 26 2023, 9:28 AM · Restricted Project, Restricted Project

Jan 19 2023

dschuff added a comment to D78441: Delete NaCl support.

Sorry, no :)

Jan 19 2023, 5:26 PM · Restricted Project, Restricted Project, Restricted Project

Jan 9 2023

dschuff accepted D140373: [WebAssembly][LiveDebugValues] Handle target index defs.

It looks like all the feedback has been address for now, so LGTM.
We can always update the comments if we have more discussion.

Jan 9 2023, 4:33 PM · Restricted Project, Restricted Project
dschuff accepted D141005: [lld][WebAssembly] Fix memory.fill argument in 64-bit mode.
Jan 9 2023, 3:59 PM · Restricted Project, Restricted Project
dschuff added a comment to D141130: [UpdateTestChecks] Add wasm64 target.

I think the format should be the same for wasm64

Jan 9 2023, 11:44 AM · Restricted Project, Restricted Project
dschuff accepted D141130: [UpdateTestChecks] Add wasm64 target.
Jan 9 2023, 11:43 AM · Restricted Project, Restricted Project

Dec 22 2022

dschuff added a comment to D139645: [WebAssembly] Fold adds with global addresses into load offset.

Yeah, we had some of this discussion with @sunfish back in 2016 as well. I just ended up disabling some of our tests and accepting reduced optimizations in D24053 and we never came up with a way to get them back at the time.
I haven't had a chance to think about this more since my earlier comment but thanks for writing this down, I'll come back to this in a couple of weeks (feel free to ping me if I don't).

Dec 22 2022, 4:57 PM · Restricted Project, Restricted Project
dschuff requested changes to D139645: [WebAssembly] Fold adds with global addresses into load offset.

Sorry, I missed your comment 2 days ago. See my comment below.

Dec 22 2022, 11:08 AM · Restricted Project, Restricted Project
dschuff accepted D139645: [WebAssembly] Fold adds with global addresses into load offset.
Dec 22 2022, 10:44 AM · Restricted Project, Restricted Project

Dec 21 2022

dschuff added inline comments to D140373: [WebAssembly][LiveDebugValues] Handle target index defs.
Dec 21 2022, 3:36 PM · Restricted Project, Restricted Project

Dec 20 2022

dschuff added inline comments to D140373: [WebAssembly][LiveDebugValues] Handle target index defs.
Dec 20 2022, 4:11 PM · Restricted Project, Restricted Project
dschuff added a comment to D140373: [WebAssembly][LiveDebugValues] Handle target index defs.

And another thing, I didn't add anything to copy handling because Wasm doesn't have copy instructions. (This COPY instruction is a pseudo instruction and should have been lowered into other instructions at this phase.)

Dec 20 2022, 3:45 PM · Restricted Project, Restricted Project

Dec 19 2022

dschuff accepted D140258: [LiveDebugValues] Remove LexicalScope param from VarLoc (NFC).
Dec 19 2022, 3:47 PM · Restricted Project, Restricted Project

Dec 16 2022

dschuff accepted D138943: [WebAssembly] Use LiveDebugValues analysis.

This looks good to me overall with the plan for followup. Maybe we can wait to land for a bit to see if @jmorse has any followup comments.

Dec 16 2022, 1:40 PM · Restricted Project, Restricted Project
dschuff added inline comments to D138943: [WebAssembly] Use LiveDebugValues analysis.
Dec 16 2022, 9:10 AM · Restricted Project, Restricted Project

Dec 14 2022

dschuff added inline comments to D139415: [RFC][WebAssembly] Optimize GEPs.
Dec 14 2022, 10:14 AM · Restricted Project, Restricted Project

Dec 13 2022

dschuff added inline comments to D139645: [WebAssembly] Fold adds with global addresses into load offset.
Dec 13 2022, 1:51 PM · Restricted Project, Restricted Project
dschuff added inline comments to D139645: [WebAssembly] Fold adds with global addresses into load offset.
Dec 13 2022, 1:34 PM · Restricted Project, Restricted Project

Dec 8 2022

dschuff added inline comments to D139645: [WebAssembly] Fold adds with global addresses into load offset.
Dec 8 2022, 5:29 PM · Restricted Project, Restricted Project
dschuff accepted D139675: [WebAssembly] Nullify dangling register DBG_VALUEs.
Dec 8 2022, 3:53 PM · Restricted Project, Restricted Project

Dec 7 2022

dschuff accepted D139579: [WebAssembly] Print DEBUG_VALUE once for target indices.

LGTM. TBH i'm fine with this not having a test, since it only affects our LLVM development experience and not the output. but it's good as-is too.

Dec 7 2022, 4:12 PM · Restricted Project, Restricted Project

Dec 5 2022

dschuff committed rG91d0618368c0: [llvm-objcopy] Reland "Fix --add-section when section contain empty bytes" (authored by Guilhem <guilhem@trail.gg>).
[llvm-objcopy] Reland "Fix --add-section when section contain empty bytes"
Dec 5 2022, 6:14 PM · Restricted Project, Restricted Project
dschuff closed D139210: [llvm-objcopy] Fix --add-section when section contain empty bytes.
Dec 5 2022, 6:13 PM · Restricted Project, Restricted Project
dschuff added a comment to D139210: [llvm-objcopy] Fix --add-section when section contain empty bytes.

Thanks for fixing this! I tested it on windows and it seems to work (with the caveat that it's not my primary platform either). I'll reland it. I'll add "reland" to the commit message but it also still has the link to this review issue, so that should be good enough for context.

Dec 5 2022, 6:08 PM · Restricted Project, Restricted Project

Dec 2 2022

dschuff committed rG0041382198f2: [llvm-objcopy] Fix --section-add when section contain empty bytes (authored by Guilhem <guilhem@trail.gg>).
[llvm-objcopy] Fix --section-add when section contain empty bytes
Dec 2 2022, 5:00 PM · Restricted Project, Restricted Project
dschuff closed D139210: [llvm-objcopy] Fix --add-section when section contain empty bytes.
Dec 2 2022, 5:00 PM · Restricted Project, Restricted Project
dschuff added a comment to D139210: [llvm-objcopy] Fix --add-section when section contain empty bytes.

Thanks! do you need me to commit this?

Dec 2 2022, 4:37 PM · Restricted Project, Restricted Project
dschuff accepted D139210: [llvm-objcopy] Fix --add-section when section contain empty bytes.
Dec 2 2022, 4:04 PM · Restricted Project, Restricted Project
dschuff added a comment to D139210: [llvm-objcopy] Fix --add-section when section contain empty bytes.

The code looks good to me. Could you add a test case to llvm/test/tools/llvm-objcopy/wasm/add-section.test?
I guess it could be like the 2nd test case (that creates a file using echo and adds it, then checks the YAML payload).

Dec 2 2022, 11:05 AM · Restricted Project, Restricted Project

Nov 29 2022

dschuff added inline comments to D138943: [WebAssembly] Use LiveDebugValues analysis.
Nov 29 2022, 4:50 PM · Restricted Project, Restricted Project
dschuff added inline comments to D138943: [WebAssembly] Use LiveDebugValues analysis.
Nov 29 2022, 4:09 PM · Restricted Project, Restricted Project
dschuff added inline comments to D138943: [WebAssembly] Use LiveDebugValues analysis.
Nov 29 2022, 2:43 PM · Restricted Project, Restricted Project
dschuff accepted D138871: [WebAssembly] Move debug tests into DebugInfo.
Nov 29 2022, 9:24 AM · Restricted Project, Restricted Project

Nov 21 2022

dschuff accepted D138455: [WebAssembly] Disable register coalescing at -O1.

LGTM! nice investigation too.

Nov 21 2022, 1:04 PM · Restricted Project, Restricted Project

Nov 3 2022

dschuff accepted D137377: [lld][WebAssembly] Add support for LLD_REPRODUCE.
Nov 3 2022, 4:19 PM · Restricted Project, Restricted Project

Oct 4 2022

dschuff accepted D135195: [WebAssembly][MC] Fix missing `else` after `return` due to type checker bug.
Oct 4 2022, 4:38 PM · Restricted Project, Restricted Project

Oct 3 2022

dschuff accepted D135087: [lld][WebAssemlby] Improve support for -L / -l and add testing.
Oct 3 2022, 4:49 PM · Restricted Project, Restricted Project
dschuff added inline comments to D135087: [lld][WebAssemlby] Improve support for -L / -l and add testing.
Oct 3 2022, 11:58 AM · Restricted Project, Restricted Project

Sep 14 2022

dschuff accepted D133098: [MC] Fix typo in getSectionAddressSize comment. NFC.
Sep 14 2022, 1:14 PM · Restricted Project, Restricted Project

Sep 1 2022

dschuff added a comment to D133057: [WebAssembly][MC] Improve error handling on empty function declarations.
Sep 1 2022, 2:23 PM · Restricted Project, Restricted Project
dschuff added a comment to D133057: [WebAssembly][MC] Improve error handling on empty function declarations.

I was actually thinking about something like the following:

Sep 1 2022, 2:21 PM · Restricted Project, Restricted Project

Aug 31 2022

dschuff accepted D133016: [MC][WebAssembly] Allow accurate errors in doBeforeLabelEmit.
Aug 31 2022, 3:06 PM · Restricted Project, Restricted Project
dschuff added a comment to D133057: [WebAssembly][MC] Improve error handling on empty function declarations.

IIUC in other asm formats, you can just e.g. switch to the data section (in the middle of generating code for a function), emit a data constant, and then switch back and finish the function. In theory we could do that for wasm too, as long as we do actually switch back and finish the function. but I get that would make this error checking a lot more complicated, and I don't know of any cases where we would actually want to do that. do you?

Aug 31 2022, 2:59 PM · Restricted Project, Restricted Project
dschuff accepted D132929: [WebAssembly][MC] Avoid the need for .size directives for functions.
Aug 31 2022, 11:22 AM · Restricted Project, Restricted Project
dschuff added a comment to D133016: [MC][WebAssembly] Allow accurate errors in doBeforeLabelEmit.

Don't forget to make a build of LLVM with all the targets to make sure you get everything.

Aug 31 2022, 10:54 AM · Restricted Project, Restricted Project

Aug 30 2022

dschuff added inline comments to D132929: [WebAssembly][MC] Avoid the need for .size directives for functions.
Aug 30 2022, 2:36 PM · Restricted Project, Restricted Project

Aug 22 2022

dschuff added a comment to D116203: [clang] adds unary type transformations as compiler built-ins.

This broke us in emscripten as well (building with trunk clang against a recent-but-not-trunk version of libcxx). I can test the fix if you want.

Aug 22 2022, 3:12 PM · Restricted Project, Restricted Project
dschuff accepted D131217: [clang][WebAssembly] Pass `-Wl,-no-type-check` through to the MC layer.

This looks good to me from the wasm perspective

Aug 22 2022, 12:59 PM · Restricted Project, Restricted Project

Aug 5 2022

dschuff accepted D131284: [lld][WebAssembly] Rename SymbolTable::getSymbols to match ELF backend. NFC.
Aug 5 2022, 1:52 PM · Restricted Project, Restricted Project

Jul 29 2022

dschuff accepted D130736: [lld][WebAssemby] Demote LazySymbols back to undefined symbols if they are not loaded.
Jul 29 2022, 1:02 PM · Restricted Project, Restricted Project