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 (471 w, 2 d)

US-Pacific timezone.

Recent Activity

Yesterday

dschuff accepted D117610: [WebAssembly] Support Wasm EH + Wasm SjLj.
Tue, Jan 18, 5:45 PM · Restricted Project

Fri, Jan 14

dschuff accepted D117168: [SROA] Bail out on PHIs in catchswitch BBs.

Thanks for fixing this.

Fri, Jan 14, 2:48 PM · Restricted Project

Tue, Jan 4

dschuff accepted D116619: [WebAssembly] Nullify unnecessary setjmp calls.
Tue, Jan 4, 4:59 PM · Restricted Project
dschuff accepted D116620: [WebAssembly] Use llvm utility functions in EH/SjLj.
Tue, Jan 4, 4:49 PM · Restricted Project

Dec 16 2021

dschuff added inline comments to D115893: [WebAssembly] Support clang -fwasm-exceptions for bitcode.
Dec 16 2021, 5:11 PM · Restricted Project, Restricted Project
dschuff accepted D115893: [WebAssembly] Support clang -fwasm-exceptions for bitcode.
Dec 16 2021, 3:29 PM · Restricted Project, Restricted Project

Dec 2 2021

dschuff accepted D114921: [lld][WebAssembly] Fix for debug relocations against undefined function symbols.
Dec 2 2021, 8:32 AM · Restricted Project

Nov 8 2021

dschuff accepted D113438: [WebAssembly] fix __stack_pointer being added to .debug_aranges.
Nov 8 2021, 3:36 PM · Restricted Project

Nov 4 2021

dschuff accepted D113208: [WebAssembly] Fix debug locations for ExplicitLocals pass (#2).

LGTM. Let's get this in to fix https://bugs.chromium.org/p/chromium/issues/detail?id=1251909 and then we can investigate the Binaryen bug (and consider whether this or another approach is actually the best for these stackified local.gets) separately.

Nov 4 2021, 11:32 AM · Restricted Project

Nov 1 2021

dschuff accepted D112953: [WebAssembly] support "return" and unreachable code in asm type checker.

Are there any type checker tests that are expected to fail?

Nov 1 2021, 3:33 PM · Restricted Project

Oct 29 2021

dschuff accepted D112833: [lld][WebAssembly] Generate TLS relocation code also when linking statically.
Oct 29 2021, 12:11 PM · Restricted Project
dschuff accepted D112831: [lld][WebAssembly] Handle TLS variables in Symbol::getVA. NFC.
Oct 29 2021, 10:35 AM · Restricted Project

Oct 28 2021

dschuff accepted D112487: [WebAssembly] Fix debug locations for ExplicitLocals pass.
Oct 28 2021, 11:46 AM · Restricted Project
dschuff accepted D112723: [lld][WebAssembly] Handle duplicate archive member names in ThinLTO.

it would be really cool if we could get ThinLTO working. It has most of the benefits of LTO at a small fraction of the cost.

Oct 28 2021, 11:26 AM · Restricted Project

Oct 27 2021

dschuff accepted D112590: [lld][WebAssebmly] Convert tests to use disassembly. NFC.

I didn't verify that the disassembly actually matches the body that we had before, but this looks good.

Oct 27 2021, 10:27 AM · Restricted Project

Oct 15 2021

dschuff accepted D111345: [WebAssembly] Add import info to `dylink` section of shared libraries.
Oct 15 2021, 10:48 AM · Restricted Project

Oct 7 2021

dschuff added inline comments to D111345: [WebAssembly] Add import info to `dylink` section of shared libraries.
Oct 7 2021, 2:30 PM · Restricted Project

Oct 4 2021

dschuff added a comment to D107613: [Clang][DiagnosticSemaKinds] combine diagnostic texts.

It looks like this error is intended to catch mismatches for attributes that can affect codegen such as noreturn (in which case it makes sense to have it as an error) but it also now fires for cases such as __attribute__(warning()) which often do not duplicate the attribute on the definition. Is that intended?

Oct 4 2021, 10:31 AM · Restricted Project

Sep 29 2021

dschuff accepted D110717: [WebAssemlby][Object] Fix dead code in WasmObjectFile.cpp.
Sep 29 2021, 8:08 AM · Restricted Project

Sep 13 2021

dschuff accepted D109722: [lld][WebAssembly] Relax limitations on multithreaded instantiation.

I think this makes sense as a simple tweak to our current protocol. I could imagine us wanting to rethink it more generally in the future, but I don't think that needs to block the worklet fix.
Maybe also reference the bug number in the commit message?

Sep 13 2021, 2:44 PM · Restricted Project
dschuff accepted D109669: [WebAssembly] Handle _setjmp and _longjmp in SjLj.

otherwise LGTM

Sep 13 2021, 2:14 PM · Restricted Project
dschuff accepted D109670: [WebAssembly] Rethrow longjmp in EH handling if EmSjLj is enabled.
Sep 13 2021, 2:06 PM · Restricted Project

Sep 10 2021

dschuff added inline comments to D109595: [WebAssembly] Convert to new "dylink.0" section format.
Sep 10 2021, 9:08 AM · Restricted Project
dschuff accepted D109583: [lld][WebAssembly] Cleanup output of --verbose.
Sep 10 2021, 8:15 AM · Restricted Project

Sep 9 2021

dschuff added a comment to D108877: [WebAssembly] Allow import and export of TLS symbols between DSOs.

I think the code is looking good.
I do think it will be cleaner in the long run to make the dylink section properly subsectioned, rather than the backwards-compatible version you have here. We've never declared any kind of backwords compat yet for dylibs, have we?

Sep 9 2021, 12:17 PM · Restricted Project
dschuff accepted D109518: [lld][WebAssembly] Fix crash on used `__tls_base` symbol.
Sep 9 2021, 9:39 AM · Restricted Project

Sep 8 2021

dschuff added a comment to D109202: [WebAssembly] Change WebAssemblyMCLowerPrePass to ModulePass.

LGTM, for the record.

Sep 8 2021, 11:32 AM · Restricted Project

Sep 7 2021

dschuff accepted D109375: [WebAssembly] Error out on indirect uses of setjmp.
Sep 7 2021, 2:05 PM · Restricted Project

Sep 3 2021

dschuff added inline comments to D108877: [WebAssembly] Allow import and export of TLS symbols between DSOs.
Sep 3 2021, 10:25 AM · Restricted Project

Sep 2 2021

dschuff updated subscribers of D109202: [WebAssembly] Change WebAssemblyMCLowerPrePass to ModulePass.

@aeubanks is probably the pass manager expert, and my knowledge is very likely out of date.

Sep 2 2021, 5:05 PM · Restricted Project
dschuff added a comment to D109202: [WebAssembly] Change WebAssemblyMCLowerPrePass to ModulePass.

Does this actually work? I thought there was no such thing as a MachineModulePass and that backend passes couldn't be module passes. I wonder if that has changed.

Sep 2 2021, 4:21 PM · Restricted Project
dschuff accepted D109179: [WebAssembly] Rename WrapperPIC -> WrapperREL. NFC.
Sep 2 2021, 1:53 PM · Restricted Project

Sep 1 2021

dschuff accepted D108984: [WebAssembly][libObject] Avoid re-use of Section object during parsing.

AFAIK we don't have gtest tests for wasm's lib/Object code so I don't want to block this little fix on creating a whole new set of tests. This change to the existing tests looks ok to me.
But I am interested in gtest unit tests more, because I like that style of testing generally. e.g. gor the file-based tests we have YAML as a convenient way to create test input, but it seems like for gtest tests you'd have to duplicate or write some custom test-harness code to generate inputs. Do you know if there are existing unit tests for lib/Object code, or know of any best practices for testing that library?

Sep 1 2021, 8:53 AM · Restricted Project

Aug 31 2021

dschuff added inline comments to D108960: [WebAssembly] Add Wasm SjLj support.
Aug 31 2021, 4:23 PM · Restricted Project
dschuff added a comment to D108984: [WebAssembly][libObject] Avoid re-use of Section object during parsing.

I guess another option on the test would be to just keep the same sections that are in this test now, but still add foo at the front. The existing tests can stay the same and we could add one that covers this case (or we could switch one of the existing tests to use foo instead of producers if that would cover both cases, so we don't need to increase the total number of tests).

Aug 31 2021, 11:48 AM · Restricted Project
dschuff accepted D108960: [WebAssembly] Add Wasm SjLj support.
Aug 31 2021, 11:41 AM · Restricted Project

Aug 30 2021

dschuff accepted D108955: [WebAssembly] Free setjmpTable before exiting calls in EmSjLj.
Aug 30 2021, 4:57 PM · Restricted Project
dschuff accepted D108945: [WebAssembly] Share rethrowing BBs in LowerEmscriptenEHSjLj.

code LGTM

Aug 30 2021, 4:49 PM · Restricted Project
dschuff added a comment to D108945: [WebAssembly] Share rethrowing BBs in LowerEmscriptenEHSjLj.

Haven't looked at the code yet, but I'm a bit confused about cases 3/4.
If we expect a possible exception, but get a longjmp instead, why do we want to resume an exception rather than resuming the longjmp that we just caught? Likewise the other way around.

Aug 30 2021, 3:51 PM · Restricted Project

Aug 25 2021

dschuff accepted D108735: [clang][Emscripten] Define __unix family of macros.
Aug 25 2021, 4:05 PM · Restricted Project

Aug 24 2021

dschuff accepted D108669: [WebAssembly] Fix up out-of-range BUILD_VECTOR lane constants.
Aug 24 2021, 5:19 PM · Restricted Project
dschuff added inline comments to D108669: [WebAssembly] Fix up out-of-range BUILD_VECTOR lane constants.
Aug 24 2021, 4:14 PM · Restricted Project
dschuff accepted D107685: [WebAssembly] Tidy up EH/SjLj options.
Aug 24 2021, 12:49 PM · Restricted Project, Restricted Project
dschuff accepted D108582: [WebAssembly] Add Wasm SjLj option support for clang.
Aug 24 2021, 12:47 PM · Restricted Project

Aug 23 2021

dschuff accepted D107685: [WebAssembly] Tidy up EH/SjLj options.
Aug 23 2021, 3:54 PM · Restricted Project, Restricted Project
dschuff accepted D108583: [WebAssembly] Use SSAUpdaterBulk in LowerEmscriptenSjLj.

looks like a nice simplification.
It might be worth ccing the author of SSAUpdaterBulk as an FYI

Aug 23 2021, 3:18 PM · Restricted Project

Aug 19 2021

dschuff accepted D108413: [lld][WebAssembly] Handle weakly defined symbols in shared libraries..
Aug 19 2021, 4:22 PM · Restricted Project
dschuff accepted D108341: [WebAssembly] More convert_low and promote_low codegen.
Aug 19 2021, 2:18 PM · Restricted Project
dschuff accepted D108266: [WebAssembly] Pattern match SIMD convert_low and promote_low during ISel.
Aug 19 2021, 2:16 PM · Restricted Project

Aug 18 2021

dschuff added inline comments to D107502: [WebAssembly] Legalize vector types by widening.
Aug 18 2021, 5:51 PM · Restricted Project
dschuff accepted D108346: [WebAssembly][lld] Convert signature-mismatch.ll test to asm. NFC.
Aug 18 2021, 5:45 PM · Restricted Project
dschuff accepted D108345: [WebAssembly] Avoid unused function imports in PIC mode.
Aug 18 2021, 5:44 PM · Restricted Project
dschuff added inline comments to D107502: [WebAssembly] Legalize vector types by widening.
Aug 18 2021, 2:40 PM · Restricted Project

Aug 13 2021

dschuff added a comment to D108060: WIP: [WebAssembly] Always use call_indirect when calling interposable functions.

when is Func->isInterposable() true? Is it just for weakly-defined functions (unlike e.g. in ELF where it's true anytime it's not DSO-local?)

Aug 13 2021, 5:12 PM · Restricted Project
dschuff added a comment to D107685: [WebAssembly] Tidy up EH/SjLj options.

OK, yeah that sounds good to me.

Aug 13 2021, 3:26 PM · Restricted Project, Restricted Project
dschuff abandoned D67525: [WIP] Add WASM_TABLE_INDEX_{SLEB,I32} reloc types with addends.

Abandoning in favor of D107940

Aug 13 2021, 1:44 PM · Restricted Project
dschuff added a comment to D107685: [WebAssembly] Tidy up EH/SjLj options.

In D107685#2942894, @aheejin wrote:

Hmm, I've been thinking about this and I don't quite like the current candidates I proposed either. For example, what if someone wants to disable exceptions, i.e., lower all invokes to calls, but want to handle SjLj using Wasm EH instructions? The current options don't allow that, because -wasm-enable-sjlj requires -exception-model=wasm, and -exception-model=wasm means we enable Wasm EH.

Aug 13 2021, 12:05 PM · Restricted Project, Restricted Project

Aug 12 2021

dschuff added a comment to D107685: [WebAssembly] Tidy up EH/SjLj options.

I get that enabling the new SjLj will require enabling the wasm EH feature, but it's not obvious why it should require --exception-model=wasm Is it possible to enable the new SJLJ with exception-model=none and have it force on -mattr=+exception-handling (or failing that, require only -mattr=+exception-handling and not both)? I would think e.g. this should eventually be the default for plain C code.

Aug 12 2021, 12:58 PM · Restricted Project, Restricted Project
dschuff added a comment to D107687: [WebAssembly] Error out when Emscripten SjLj setjmp is used with Wasm EH.

Actually wait, doesn't report_fatal_error act like a crash, complete with a stacktrace now?

Aug 12 2021, 12:46 PM · Restricted Project
dschuff accepted D107852: [WebAssembly] Fix leak in Emscripten SjLj.
Aug 12 2021, 12:40 PM · Restricted Project
dschuff added a comment to D107687: [WebAssembly] Error out when Emscripten SjLj setjmp is used with Wasm EH.

Actually wait, doesn't report_fatal_error act like a crash, complete with a stacktrace now?

Aug 12 2021, 12:29 PM · Restricted Project
dschuff accepted D107687: [WebAssembly] Error out when Emscripten SjLj setjmp is used with Wasm EH.
Aug 12 2021, 12:28 PM · Restricted Project
dschuff accepted D107940: [WebAssembly] Disable offset folding for function addresses.
Aug 12 2021, 11:48 AM · Restricted Project

Aug 5 2021

dschuff accepted D107530: [WebAssembly] Don't do SjLj transformation when there's only setjmp.
Aug 5 2021, 11:21 AM · Restricted Project

Aug 4 2021

dschuff accepted D107423: [WebAssembly] Make result of 'catch' inst variadic.

LGTM too FTR

Aug 4 2021, 1:50 PM · Restricted Project
dschuff added inline comments to D107423: [WebAssembly] Make result of 'catch' inst variadic.
Aug 4 2021, 11:26 AM · Restricted Project

Jul 27 2021

dschuff added a comment to D106897: [lld][WebAssembly] Prefer objdump -d over obj2yaml for tests. NFC.

I'd say from the llvm-objdump perspective (which only thinks of sections and not anything more finegrained other than instructions), anything other than the section header would be payload, including subsections etc. Unless we want llvm-objdump to be even smarter, a la wasm-objdump. I'm not sure if there's precedent for that in other formats or not.

Jul 27 2021, 4:36 PM · Restricted Project
dschuff accepted D106897: [lld][WebAssembly] Prefer objdump -d over obj2yaml for tests. NFC.

but anyway this change is fine.
I guess one advantage of using objdump over obj2yaml when they are equivalent might be if we can get the whole test in one tool invocation instead of 2.

Jul 27 2021, 3:29 PM · Restricted Project
dschuff added a comment to D106897: [lld][WebAssembly] Prefer objdump -d over obj2yaml for tests. NFC.

! In D106897#2908207, @sbc100 wrote:
Contents of section DATA:

0000 01004180 080b1003 00000004 0000002a  ..A............*
0010 0000002b 000000
The problem here is that the section header is also displayed not just the actual data, so its less clear I think.
Jul 27 2021, 3:16 PM · Restricted Project
dschuff added a comment to D106897: [lld][WebAssembly] Prefer objdump -d over obj2yaml for tests. NFC.

I guess depending on what the test is looking for, objdump might also be able to replace obj2yaml for non-code-section stuff too. At least data section maybe?

Jul 27 2021, 11:24 AM · Restricted Project

Jul 26 2021

dschuff committed rGcf54424a46ff: [lld][WebAssembly] Do not remove name section with --strip-debug (authored by dschuff).
[lld][WebAssembly] Do not remove name section with --strip-debug
Jul 26 2021, 11:07 AM
dschuff closed D106728: [lld][WebAssembly] Do not remove name section with --strip-debug.
Jul 26 2021, 11:07 AM · Restricted Project

Jul 23 2021

dschuff requested review of D106728: [lld][WebAssembly] Do not remove name section with --strip-debug.
Jul 23 2021, 5:02 PM · Restricted Project
dschuff accepted D106525: [WebAssembly] Make Emscripten EH work with Emscripten SjLj.
Jul 23 2021, 3:27 PM · Restricted Project
dschuff accepted D106524: [WebAssembly] Improve pseudocode in LowerEmscriptenEHSjLj.
Jul 23 2021, 3:12 PM · Restricted Project

Jul 21 2021

dschuff accepted D106500: [WebAssembly] Remove clang builtins for extract_lane and replace_lane.
Jul 21 2021, 3:40 PM · Restricted Project

Jul 19 2021

dschuff added inline comments to D106300: [LangRef] Clarify comdat.
Jul 19 2021, 2:52 PM · Restricted Project
dschuff added inline comments to D106300: [LangRef] Clarify comdat.
Jul 19 2021, 2:35 PM · Restricted Project
dschuff committed rGad1f5457d2d8: [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections (authored by dschuff).
[WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections
Jul 19 2021, 2:06 PM
dschuff closed D103557: [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections.
Jul 19 2021, 2:06 PM · Restricted Project

Jul 16 2021

dschuff added inline comments to D103557: [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections.
Jul 16 2021, 5:09 PM · Restricted Project
dschuff updated the diff for D103557: [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections.
  • review comments
Jul 16 2021, 5:09 PM · Restricted Project
dschuff added inline comments to D103557: [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections.
Jul 16 2021, 1:51 PM · Restricted Project
dschuff retitled D103557: [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections from [WebAssembly] Generate R_FUNCTION_OFFSET relocs in debuginfo sections to [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections.
Jul 16 2021, 1:25 PM · Restricted Project

Jul 15 2021

dschuff added a comment to D103557: [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections.

This is now almost ready, just a couple of issues. Primarily, as the comment on line 510 of WasmObjectWriter.cpp suggests, I don't fully understand how the existing codepath (which uses the section symbol) works. I'm not sure if I should try to understand that more or not. And secondly I figured out a way to test the new behavior (but not the existing one) with a .s file, so I'm not sure whether we should keep the .ll test or not (it would catch any changes in how the dwarf code generates this MC, but I'm not sure we care about that, if the MC code is correct).

Jul 15 2021, 6:10 PM · Restricted Project
dschuff published D103557: [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections for review.
Jul 15 2021, 6:08 PM · Restricted Project
dschuff accepted D106096: [WebAssembly] Support R_WASM_MEMORY_ADDR_TLS_SLEB64 for wasm64.

nice, first win for the type checker :)

Jul 15 2021, 2:03 PM · Restricted Project
dschuff accepted D106026: [lld][WebAssembly] Cleanup duplicate fields in Symbols.h. NFC.
Jul 15 2021, 10:53 AM · Restricted Project

Jul 14 2021

dschuff added a comment to D73820: [llvm-strip][WebAssembly] Support strip flags.

Thanks!

Jul 14 2021, 2:18 PM · Restricted Project
dschuff committed rG7cb25f53875e: [llvm-strip][WebAssembly] Support strip flags (authored by dschuff).
[llvm-strip][WebAssembly] Support strip flags
Jul 14 2021, 2:17 PM
dschuff closed D73820: [llvm-strip][WebAssembly] Support strip flags.
Jul 14 2021, 2:17 PM · Restricted Project

Jul 13 2021

dschuff added inline comments to D105749: WebAssembly: Update datalayout to match fp128 ABI change.
Jul 13 2021, 2:32 PM · Restricted Project, Restricted Project
dschuff committed rGd4e2693a6799: [WebAssembly] Run varargs codegen test with non-emscripten triple (authored by dschuff).
[WebAssembly] Run varargs codegen test with non-emscripten triple
Jul 13 2021, 2:32 PM
dschuff added inline comments to D73820: [llvm-strip][WebAssembly] Support strip flags.
Jul 13 2021, 1:35 PM · Restricted Project
dschuff updated the diff for D73820: [llvm-strip][WebAssembly] Support strip flags.
  • address more comments
Jul 13 2021, 1:34 PM · Restricted Project
dschuff accepted D105862: [WebAssembly] Generate checks for simd-load-store-alignment.ll.
Jul 13 2021, 10:06 AM · Restricted Project

Jul 12 2021

dschuff added a comment to D73820: [llvm-strip][WebAssembly] Support strip flags.

I went over all the tests and I think I've addressed all the issues.

Jul 12 2021, 5:16 PM · Restricted Project
dschuff updated the diff for D73820: [llvm-strip][WebAssembly] Support strip flags.
  • review round 3
Jul 12 2021, 5:13 PM · Restricted Project
dschuff updated the diff for D73820: [llvm-strip][WebAssembly] Support strip flags.

fix diff

Jul 12 2021, 3:39 PM · Restricted Project
dschuff updated the diff for D73820: [llvm-strip][WebAssembly] Support strip flags.

rebase

Jul 12 2021, 3:37 PM · Restricted Project