Page MenuHomePhabricator

sunfish (Dan Gohman)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 12 2013, 11:44 AM (265 w, 15 h)

Recent Activity

Mon, Dec 10

sunfish added a comment to D55467: [WebAssembly] Optimize Irreducible Control Flow.

Do we know what part of the optimizer or codegen is introducing the irreducible control flow in malloc?

Mon, Dec 10, 2:13 PM

Tue, Nov 13

sunfish added inline comments to D54249: [WebAssembly] Initial support for shared objects (-shared).
Tue, Nov 13, 12:39 PM
sunfish added a comment to rL346773: [WebAssembly] Mark immediates.ll as XFAILed on MIPS hosts.

-mnan and --with-nan= are MIPS target options, however I'm asking about targeting WebAssembly with a MIPS host.

Tue, Nov 13, 11:38 AM
sunfish added a comment to rL346773: [WebAssembly] Mark immediates.ll as XFAILed on MIPS hosts.

If I write C code like this:

Tue, Nov 13, 11:04 AM

Nov 11 2018

sunfish added inline comments to D54287: [WebAssembly] Implement TargetLowering hooks for vectors.
Nov 11 2018, 6:45 PM

Oct 18 2018

sunfish added a comment to D53396: [WebAssembly] Fixup main signature by default.

Can we remove the optional altogether now, and just always do the fixup?

Oct 18 2018, 7:01 AM

Oct 3 2018

sunfish accepted D52580: Refactor WasmSignature and use it for MCSymbolWasm.

LGTM. In the future it's possible we could need to hold the signatures somewhere other than the AsmPrinter, however we can figure that out later, when it's more clear what the MC AsmParser layer will need.

Oct 3 2018, 2:36 PM

Sep 27 2018

sunfish added a comment to D52450: [Intrinsic] Add llvm.minnan and llvm.maxnan instrinsic functions.

That's true, except that if the semantics of the LLVM intrinsics were not as strict as the semantics of the WebAssembly instructions, then there would be no way for programmers to access WebAssembly's exact semantics at the source level, which is the whole point of implementing these intrinsics at all.

Sep 27 2018, 4:45 PM
sunfish added a comment to D52450: [Intrinsic] Add llvm.minnan and llvm.maxnan instrinsic functions.

WebAssembly's handling of +0/-0 *does* match IEEE 754-2018, so these intrinsics (whether target-independent or not) need to be changed to match those semantics as well. I will have to investigate whether the fminnan and fmaxnan ISel DAG nodes are already being used in ways that do not respect these semantics. If they are, we will need new ISel DAG nodes as well.

Sep 27 2018, 3:03 PM
sunfish added inline comments to D52580: Refactor WasmSignature and use it for MCSymbolWasm.
Sep 27 2018, 12:21 PM
sunfish added inline comments to D52450: [Intrinsic] Add llvm.minnan and llvm.maxnan instrinsic functions.
Sep 27 2018, 9:57 AM

Sep 24 2018

sunfish added a comment to D52372: [WebAssembly] SIMD conversions.
  1. Is it correct to translate those llvm instructions to saturating versions of wasm instructions? For example, for scalars, we had a patch that implemented the saturating behavior. Don't we need a similar thing for vectors too?
Sep 24 2018, 5:20 PM

Sep 21 2018

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

The prompt here is that the LLVM wasm backend will be leaving "experimental" status. That means in about 6 months, it'll be part of an LLVM release. Once that happens, it'll be harder to make changes like this.

Sep 21 2018, 9:26 AM

Sep 20 2018

sunfish added a comment to D43211: [WebAssembly] promote from experimental to normal target.

Woah! This a big step people! Congratulations.

Sep 20 2018, 8:34 PM
sunfish added a comment to D43675: [WebAssembly] Rename imported/exported memory symbol to __linear_memory.

@sbc100 @ncw Can you comment on the status of this issue? Is this still something we want to fix before we consider the basic ABI to be basically stable?

Sep 20 2018, 4:27 PM
sunfish updated subscribers of D43211: [WebAssembly] promote from experimental to normal target.

https://reviews.llvm.org/D50568 is now fixed!

Sep 20 2018, 4:22 PM

Sep 4 2018

sunfish added a comment to D51447: [WebAssembly] clang-format (NFC).

On one hand, clang-format -style=LLVM really isn't the one exclusive formatting style of LLVM. CodingStandards.rst repeatedly emphasizes this. When we're working in LLVM outside of wasm-specific code, we need to respect the existing code formatting which isn't always clang-formatted, or locally reformat it as needed when making changes, so it's not a bad idea for us to get used to working that way anyway. And we accept patches that aren't clang-formatted.

Sep 4 2018, 2:53 PM

Aug 29 2018

sunfish added a comment to D51447: [WebAssembly] clang-format (NFC).

I guess I don't have a strong opinion here. The code is already pretty close to clang-format's interpretation of LLVM style, so looking at the actual diffs you're right that it doesn't seem to be a big change. Changes like those in WebAssemblyLowerBrUnless.cpp are a little unfortunate, but tolerable.

Aug 29 2018, 1:23 PM
sunfish added a comment to D51447: [WebAssembly] clang-format (NFC).

The LLVM coding standards say "we explicitly do not want patches that do large-scale reformatting of existing code". They suggest that reformatting should be done to address specific readability issues or to prepare an area for subsequent changes.

Aug 29 2018, 11:50 AM

Aug 22 2018

sunfish added a comment to D50277: [WebAssembly] Support for atomic fences.

We discussed how to implement fences here, and I think the general consensus was even though it may not be strictly necessary to emit atomicrmw for some cases, it can be user friendly and also might help support legacy builtins like __sync_synchronize(). And IMHO it is a single instruction anyway and fences are generally expected to be expensive, so no significant harm will be done. Does anyone have more concerns on this? If not, can we land this?

Aug 22 2018, 4:15 PM

Aug 16 2018

sunfish accepted D48273: [WebAssembly] CFG stackify support for exception handling.

This looks ok to land now.

Aug 16 2018, 3:58 PM

Aug 8 2018

sunfish added a comment to D40526: [WebAssembly] Change size_t to `unsigned long`.

Is this related to the issue reported in the thread here?

Aug 8 2018, 10:32 AM

Jul 24 2018

sunfish accepted D44030: [WebAssembly] Tidy up handling of global symbol relocations.

First, I apologize, I'm not sure how I lost track of this patch and didn't see the pings.

Jul 24 2018, 9:42 PM
sunfish added a comment to D43211: [WebAssembly] promote from experimental to normal target.

https://reviews.llvm.org/D40526 has now landed. Is there anything else we should do before leaving "experimental" status?

Jul 24 2018, 9:34 PM

Jul 23 2018

sunfish added a comment to D49517: [WebAssembly] Ensure all bitcasts that would be invalid in wasm are removed by FixFunctionBitcasts pass.

Interesting, so you are proposing delaying the error until link time but still producing a valid wasm binary?

Jul 23 2018, 5:56 PM
sunfish added a comment to D49194: [WebAssembly] Add tests for weaker memory consistency orderings.
In D49194#1172051, @jfb wrote:

I have a talk for you! https://youtu.be/IB57wIf9W1k?t=52m20s
I talk about volatile in a few places, but 52m20s is the main one. Basically I'm advocating for something similar to the weird MSVC x86 volatile behavior because some users write code like a loop which updates a volatile variable which another thread reads, and expect it to stay in the loop (not hoisted out). Lowering to regular load / store breaks the guarantee that volatiles effects touch the variable's bytes once per source event. Such user code should really use atomic, but we don't need to be pedants about it.

Jul 23 2018, 3:09 PM
sunfish added a comment to D49194: [WebAssembly] Add tests for weaker memory consistency orderings.
In D49194#1170428, @jfb wrote:

For the record, I'm opposed to having the WebAssembly backend translate asm volatile(""::: "memory") differently from other targets in LLVM or GCC, which to my knowledge always translate it to a no-op, even on platforms with hardware fence instructions.

I think it should lower and not error out, and thought should be put into what it should lower to. No-op seems fine to me, but I'd like to hear a rationale.

Jul 23 2018, 10:15 AM

Jul 20 2018

sunfish added a comment to D49194: [WebAssembly] Add tests for weaker memory consistency orderings.

For the record, I'm opposed to having the WebAssembly backend translate asm volatile(""::: "memory") differently from other targets in LLVM or GCC, which to my knowledge always translate it to a no-op, even on platforms with hardware fence instructions.

Jul 20 2018, 1:40 PM
sunfish added a comment to D49517: [WebAssembly] Ensure all bitcasts that would be invalid in wasm are removed by FixFunctionBitcasts pass.

Ah, that's useful context, thanks. That'd be good to mention in the commit message and/or comments somewhere. Also, please add a testcase which approximates that use case.

Jul 20 2018, 1:34 PM

Jul 19 2018

sunfish requested changes to D49517: [WebAssembly] Ensure all bitcasts that would be invalid in wasm are removed by FixFunctionBitcasts pass.

Not all types are valid to cast to all other types. But beyond that, normal native platforms don't insert non-trivial casts in such situations, so even in many cases where it's valid to cast, it doesn't seem like programmers could reasonably expect a non-trivial cast to happen. What kinds of use cases are motivating this?

Jul 19 2018, 1:06 PM

Jul 17 2018

sunfish added a comment to D48985: [WebAssembly] Converted to stack based instructions in MC..

I'm not deeply familiar with MC's Asm parsing support, but this looks like a good direction to go.

Jul 17 2018, 3:43 PM

Jul 11 2018

sunfish accepted D46500: [WebAssembly] CFG sort support for exception handling.
Jul 11 2018, 10:06 AM

Jul 10 2018

sunfish added a comment to D40526: [WebAssembly] Change size_t to `unsigned long`.

I've now refreshed the emscripten patches and am hoping they can land soon.

Jul 10 2018, 4:28 PM
sunfish added a comment to D43211: [WebAssembly] promote from experimental to normal target.

Indeed; after discussing this with a few other folks, I think this is getting close.

Jul 10 2018, 3:56 PM

Jun 25 2018

sunfish accepted D48471: [WebAssembly] Add pass to infer prototypes for prototype-less functions.

My biggest concern here is that this pass shouldn't affect prototype-possessing functions, and that appears to be satisfied :-).

Jun 25 2018, 8:36 AM

Jun 22 2018

sunfish accepted D48443: [WebAssembly] Add no-prototype attribute to prototype-less C functions.

I haven't thought through all the possibilities related to !FD->doesThisDeclarationHaveABody(), but overall this looks good.

Jun 22 2018, 2:18 PM

May 30 2018

sunfish added a comment to D46805: If some platforms do not support an attribute, we should exclude the platform.

@rsmith -- do the object file formats listed look correct to you?

They look at least plausible. We should be able to test whether LLVM can actually emit aliases on each of these targets easily enough...

However, I get this error for any WAsm compilation I try:

fatal error: error in backend: section size does not fit in a uint32_t

... so I have no idea if aliases are/will be supported there. Perhaps @sunfish can tell us :)

May 30 2018, 5:46 PM

May 18 2018

sunfish added a comment to D47006: [NFC] fix getOperandNo in PredIterator..

This looks right to me, but just to make sure I understand, has this been broken since r228400?

May 18 2018, 1:31 PM

Apr 9 2018

sunfish accepted D44873: [WebAssembly] Change std::sort to llvm::sort in response to r327219.

LGTM.

Apr 9 2018, 11:25 AM

Apr 4 2018

sunfish accepted D45297: [WebAssembly] Allow for the creation of user-defined custom sections.

Looks good to me. Thanks!

Apr 4 2018, 4:17 PM

Mar 8 2018

sunfish added a comment to D43097: [WebAssembly] Allow for the creation of user-defined custom sections.

This user-defined custom sections patch should be ready to go now.

Mar 8 2018, 12:26 PM
sunfish added reviewers for D43097: [WebAssembly] Allow for the creation of user-defined custom sections: sbc100, ncw.
Mar 8 2018, 12:25 PM

Mar 2 2018

sunfish added a comment to D40526: [WebAssembly] Change size_t to `unsigned long`.

We want to coordinate landing this with corresponding changes in Emscripten. Since this is an ABI change, Emscripten needs to figure out how to manage it. See here for ongoing discussion.

Mar 2 2018, 11:11 AM
sunfish added a comment to D43211: [WebAssembly] promote from experimental to normal target.

Indeed; I don't anticipate LLVM will be using mem.grow or mem.size itself. But, clang has __builtin_wasm_mem_grow and __builtin_wasm_mem_size, to allow standard libraries to use them. It's desirable that the names of these builtins, and the corresponding LLVM IR intrinsics, match the names in the official WebAssembly documentation.

Mar 2 2018, 10:57 AM

Feb 27 2018

sunfish added a comment to D43211: [WebAssembly] promote from experimental to normal target.

We should probably also wait for the WebAssembly committee to settle on final instruction names.

Feb 27 2018, 6:22 AM

Feb 23 2018

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

I'm not very familiar with the Emscripten parts of this, but some grepping in the emscripten tree found these lines:

src/preamble.js:    env['memory'] = Module['wasmMemory'];
src/preamble.js:    env['memory'] = providedBuffer;
src/preamble.js:    assert(env['memory'] instanceof ArrayBuffer);
Feb 23 2018, 9:09 AM

Feb 20 2018

sunfish created D43540: [WebAssembly] Enable -Werror=strict-prototypes by default.
Feb 20 2018, 5:21 PM

Feb 15 2018

sunfish added a comment to D43212: [WebAssembly] Update ADT/TripleTest.cpp now that default file format has changed.

The new tests look good, but it'd be good to keep testing "wasm32-unknown-unknown-wasm" and "wasm64-unknown-unknown-wasm" here too.

Feb 15 2018, 10:09 AM

Feb 12 2018

sunfish added a comment to rL324966: [WebAssembly] Update ADT/TripleTest.cpp now that default file format has changed.

Please restore the "-wasm" forms of these tests too.

Feb 12 2018, 3:55 PM
sunfish accepted D43212: [WebAssembly] Update ADT/TripleTest.cpp now that default file format has changed.

The new tests look good, but it'd be good to keep testing "wasm32-unknown-unknown-wasm" and "wasm64-unknown-unknown-wasm" here too.

Feb 12 2018, 3:51 PM
sunfish added a reviewer for D43211: [WebAssembly] promote from experimental to normal target: sunfish.

I think it's getting closer. IMO we should at least land https://reviews.llvm.org/D43147 and https://reviews.llvm.org/D40526 first, and address any follow-up issues.

Feb 12 2018, 3:14 PM

Feb 9 2018

sunfish added a comment to D43097: [WebAssembly] Allow for the creation of user-defined custom sections.

I think it's because writeBytes is defined to be passed data from an MCFragment's getContents(), which is a SmallVectorImpl<char>. That's the case here too, though the code that does the getContents() is a little separated from the writeBytes. Following @ncw's suggestion, I created a struct type, which not only avoids repeating the type name, but also makes the use of it cleaner than std::pair.

Feb 9 2018, 2:58 PM
sunfish updated the diff for D43097: [WebAssembly] Allow for the creation of user-defined custom sections.

Created a struct to replace the noisy std::pair code.

Feb 9 2018, 2:53 PM
sunfish added a reviewer for D42520: Implement __attribute__((import_module("foo"))): sbc100.

@sbc100 I've updated the patch to leave the "env" namespace in place. Do you think this is ready to land now?

Feb 9 2018, 12:40 PM
sunfish added a comment to D42576: [test-suite] Add prototypes to functions in Olden and MiBench.

There is also an upside to not supporting unprototyped functions. Not only did people writing C in the distant past before prototypes not know what we know today about what it takes to have reasonably robust C code, but leaving C code unmaintained for decades is the opposite of what it takes to have reasonably robust C code, so such code is in double trouble. Obliging people who have unmaintained C codebases to either maintain them or forego using them on new platforms is a positive outcome. It's within reason to assign a variety of relative weights to that outcome, relative to the other outcomes.

Feb 9 2018, 12:03 PM
sunfish added a comment to D43097: [WebAssembly] Allow for the creation of user-defined custom sections.

Sorry maybe I'm jumping the gun here because haven't assigned a reviewer yet..

Feb 9 2018, 9:00 AM
sunfish updated the diff for D43097: [WebAssembly] Allow for the creation of user-defined custom sections.

Add an MC test.

Feb 9 2018, 8:54 AM

Feb 8 2018

sunfish created D43097: [WebAssembly] Allow for the creation of user-defined custom sections.
Feb 8 2018, 4:05 PM
sunfish accepted rL324305: [WebAssembly] Fix test expectations after r324274.

@sunfish This is really just a change-detector test for the cond code expansion behavior that changed in https://reviews.llvm.org/D42788. Should we consider loosening it so that it just tests that we used the expansion? OTOH it's a bit concerning that that change didn't affect any other tests (!)

Feb 8 2018, 11:44 AM

Feb 7 2018

sunfish added a comment to D43034: Use `wasm` rather than `wasm32` as the as the default WebAssembly arch name.

As an example, you can have code like this:

#ifdef __wasm__
  // do stuff with __builtin_wasm_mem_grow and __builtin_wasm_mem_size
#endif

which works for both wasm32 and wasm64.

Feb 7 2018, 4:20 PM
sunfish added a comment to D43034: Use `wasm` rather than `wasm32` as the as the default WebAssembly arch name.

In my experience it's not uncommon to see a reference to "x86" where it's not clear whether it applies to both 32-bit and 64-bit x86, or really just 32-bit x86. Also, I think many of the old architectures have names that predate the existence of their 64-bit variants. For example MIPS was originally 32-bit only. In contrast, RISC-V is an example of a new architecture with a 64-bit variant present from the start, and they call their 32-bit variant riscv32. Consequently, I've been trying to only say "wasm" for things that apply to both wasm32 and wasm64.

Feb 7 2018, 11:56 AM

Feb 5 2018

sunfish updated the diff for D42520: Implement __attribute__((import_module("foo"))).
  • Go back to using "env" for now, so that this is independent of the symbol-table changes and avoids bike-shedding discussions for now.
  • Split the clang changes out into a separate patch, which I'll post separately.
Feb 5 2018, 4:41 PM

Feb 2 2018

sunfish added a comment to D42867: [WebAssembly] Add __data_end linker-synthetic symbol.

I mostly agree. _end/__wasm_end seem reasonable for now. My preference would be to wait on _edata and __bss_start until we know how those might be used.

Feb 2 2018, 4:46 PM
sunfish added a comment to D42867: [WebAssembly] Add __data_end linker-synthetic symbol.

I'm nervous about adding all these symbols. I like ELF features when they make sense, but for some of these symbols here, it's difficult to think of even hypothetical valid use cases.

Feb 2 2018, 3:49 PM
sunfish added a comment to D42867: [WebAssembly] Add __data_end linker-synthetic symbol.

Is there a use for _edata? I'm curious how applications would use it differently from _end.

Feb 2 2018, 2:35 PM

Jan 31 2018

sunfish accepted D37831: [WebAssembly] Don't pass -ffunction-section/-fdata-sections .

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.

Jan 31 2018, 8:47 AM

Jan 26 2018

sunfish added a comment to D42564: [WebAssembly] ignore non-SymbolRef MCExpr..

Is this fixing a bug? It would help me to see what kind of code triggers this bug.

Jan 26 2018, 8:53 AM

Jan 25 2018

sunfish added a comment to D42520: Implement __attribute__((import_module("foo"))).
In D42520#988036, @ncw wrote:

I don't suppose that there's any crossover with C++ modules is there?

Jan 25 2018, 8:50 AM
sunfish added a comment to D42520: Implement __attribute__((import_module("foo"))).
In D42520#987422, @ncw wrote:

However, D42495 currently in progress involves changing the way symbols are read from a Wasm object file. There's now going to be an explicit symbol table, so the linker won't resolve all imports, but only imports which correspond to symbols. I guess we could have WasmObjectWriter skip any imports that aren't in the __linker_resolve module, and not create symbols for them; and the linker could merge together imports from the object files that come from other modules...

Jan 25 2018, 8:29 AM

Jan 24 2018

sunfish created D42520: Implement __attribute__((import_module("foo"))).
Jan 24 2018, 9:04 PM

Jan 23 2018

sunfish added a comment to D40526: [WebAssembly] Change size_t to `unsigned long`.

The LLVM patch, the emscripten-fastcomp-clang patch, and the emscripten patch are now all updated and in sync.

Jan 23 2018, 2:52 PM
sunfish updated the diff for D40526: [WebAssembly] Change size_t to `unsigned long`.

Rebase for upstream changes.

Jan 23 2018, 1:41 PM
sunfish added a comment to D42433: [WebAssembly] Update wasm target triple now that its the default.

Maybe once we drop the ELF output comletely we can remove this part?

Jan 23 2018, 12:06 PM
sunfish added a comment to D42433: [WebAssembly] Update wasm target triple now that its the default.

The codegen tests in LLVM all still use all 4 parts, and I tend to prefer that, because it avoids problems where tests pass on some hosts and fail on others due to LLVM completing the triple by auto-detecting things from the host it's running on. This may not affect wasm today, but it's a habit I'm in from other LLVM work. However, if there are reasons to omit some of the parts in the lld tests, I'm not opposed either.

Jan 23 2018, 11:47 AM
sunfish added a comment to rL323220: [WebAssembly] Switch to *-wasm as the default target triple..

This is a relatively significant change. One that I welcome. But I would have liked to see this go through go review so we could know it was coming and prepare for it. Would you consider lowering your bar a little for the type of changes that got through code review?

Jan 23 2018, 11:39 AM
sunfish added a comment to D42433: [WebAssembly] Update wasm target triple now that its the default.

To make sure I didn't miss anything, this is just removing the "-wasm" parts now that that's the default, right?

Jan 23 2018, 11:10 AM
sunfish accepted D42425: [WebAssembly] Symbol changes #4e: remove object file name section.

Makes sense. With the direction all the symbol-table things are headed, using the name section as a kind of secondary symbol name is indeed confusing.

Jan 23 2018, 9:58 AM

Jan 17 2018

sunfish accepted D35592: [WebAssembly] Remove duplicated RTLIB names.

Looks good to me. Thanks for cleaning this up!

Jan 17 2018, 3:40 PM

Jan 5 2018

sunfish added a comment to D41689: [SCEVAA] Don't crash on pointers with no dominance relationship..

Ah, I overlooked that the loop doesn't dominate the exit block.

Jan 5 2018, 3:12 PM

Jan 4 2018

sunfish added a comment to D41689: [SCEVAA] Don't crash on pointers with no dominance relationship..

I haven't thought about this in depth, but it seems like SCEV theoretically should be able to cope under such circumstances.

Jan 4 2018, 5:14 PM

Dec 20 2017

sunfish added a comment to D40844: [WebAssembly] COMDAT: core LLVM support.

I'm behind on some of the discussions on this topic at the moment, but overall, this looks like it's headed in a good direction, so I'm in favor of this patch.

Dec 20 2017, 8:17 AM

Dec 19 2017

sunfish added inline comments to D40802: [MemDep] Don't use cached results from a previous larger query.
Dec 19 2017, 5:38 PM

Dec 14 2017

sunfish added inline comments to D41211: [WebAssembly] Implement @llvm.global_ctors and @llvm.global_dtors.
Dec 14 2017, 7:40 AM
sunfish added a comment to D41208: [WebAssembly] Add support for init functions linking metadata.
In D41208#955130, @ncw wrote:

Looks good.

At the back of my mind, I'm just wondering about how Comdat interacts with this. In the .init_array it's fairly simple, since the data section containing the function pointer is handled just like any other data section and is included/excluded as necessary. Is it ever possible for a global ctor to be registered in a COMDAT, maybe for static class members in template classes? In that case we'll need to remember to check that duplicate INIT_FUNCS are discarded (if indeed they can participate in Comdat discarding).

I think the right way to model that would be in the Comdat data. (This is all assuming we do Comdat groups...) Currently Comdat group data is a vector of typed function/data-segment indices. Now that INIT_FUNCS aren't in the .init_array data segment, we'll need to make the Comdat group to be a vector of type function/data-segment/INIT_FUNCS indices.

Dec 14 2017, 6:14 AM

Dec 13 2017

sunfish added a comment to D41073: Wasm: add support in libcxx.

Either way. I won't be able to get to it until next week, so feel free to land it earlier.

Dec 13 2017, 12:42 PM
sunfish added a comment to D40759: [WebAssembly] Implement @llvm.global_ctors and @llvm.global_dtors.

Omitting the start section part for now is ok with me. It should be sufficient to just remove the Priority == UINT16_MAX special cases.

Dec 13 2017, 12:41 PM

Dec 11 2017

sunfish accepted D41073: Wasm: add support in libcxx.

Yes, wasm has its own object format, so this change makes sense.

Dec 11 2017, 11:31 AM

Dec 7 2017

sunfish updated the diff for D40526: [WebAssembly] Change size_t to `unsigned long`.

This updates the patch to make size_t be unsigned long unconditionally, corresponding with the proposed patch to Emscripten here which changes it for asm.js as well.

Dec 7 2017, 2:18 PM
sunfish added a comment to D40802: [MemDep] Don't use cached results from a previous larger query.

The issue reported in PR35519 is now fixed, there's a testcase now, and I responded to @sanjoy's comment above.

Dec 7 2017, 5:58 AM
sunfish updated the summary of D40759: [WebAssembly] Implement @llvm.global_ctors and @llvm.global_dtors.
Dec 7 2017, 5:17 AM
sunfish updated the diff for D40759: [WebAssembly] Implement @llvm.global_ctors and @llvm.global_dtors.

This update adds @llvm.global_ctors support to the wasm object writer, as layed out here, including init function priorities as sketched here.

Dec 7 2017, 5:16 AM
sunfish retitled D40759: [WebAssembly] Implement @llvm.global_ctors and @llvm.global_dtors from [WebAssembly] Lower @llvm.global_dtors to [WebAssembly] Implement @llvm.global_ctors and @llvm.global_dtors.
Dec 7 2017, 5:12 AM

Dec 6 2017

sunfish added a comment to D40760: [WebAssembly] Add support for __init_array_start and friends.

For the record, I believe that it would be better to work towards implementing the proposal here:

Dec 6 2017, 3:41 PM
sunfish added a comment to D40875: [WebAssembly] Import the memory and table for .o files.

Can you update the description.

Dec 6 2017, 3:03 PM
sunfish updated the summary of D40875: [WebAssembly] Import the memory and table for .o files.
Dec 6 2017, 2:45 PM
sunfish updated the diff for D40875: [WebAssembly] Import the memory and table for .o files.
  • Remove the WASM_DEFAULT_LINEAR_MEMORY and WASM_DEFAULT_FUNCTION_TABLE metadata.
  • Update test/MC tests.
Dec 6 2017, 1:54 PM
sunfish added inline comments to D40906: Wasm: section kind can be code.
Dec 6 2017, 1:31 PM
sunfish added a comment to D40559: Wasm entrypoint changes #2 (export entrypoint in "start" section) APPLY AFTER D40724.

I'd like to probe the solution of importing the linear memory a little more. There's nothing in wasm that prevents syscalls from working in the wasm start function. The problem seems to just be pre-ES6-module JS. Non-Web, future-ES6-modules-Web, and future programs that are all wasm with no JS won't have this problem.

Dec 6 2017, 1:25 PM
sunfish added inline comments to D40802: [MemDep] Don't use cached results from a previous larger query.
Dec 6 2017, 12:30 PM
sunfish updated the diff for D40802: [MemDep] Don't use cached results from a previous larger query.
  • Fixes debug info updating.
  • Adds a proper testcase for the memset merging caching bug.
Dec 6 2017, 12:21 PM