golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
121.42k stars 17.4k forks source link

cmd/compile: investigate wasm sync inlining #30605

Open bradfitz opened 5 years ago

bradfitz commented 5 years ago

https://go-review.googlesource.com/c/go/+/148958/ made sync.Mutex.Unlock inlinable.

It worked for Wasm, but then CL 164461 and CL 153797 landed and the resulting merge no longer passed the inlining tests.

As a quick fix, https://go-review.googlesource.com/c/go/+/165339 ignored wasm in the inlining tests.

Investigate & re-enable.

/cc @ALTree @neelance @aclements @CAFxX

gopherbot commented 5 years ago

Change https://golang.org/cl/165339 mentions this issue: test: skip mutex Unlock inlining tests on a few builders

neelance commented 5 years ago

The test now explains:

// FIXME: This test is disabled on architectures where atomic operations
// are function calls rather than intrinsics, since this prevents inlining
// of the sync fast paths. This test should be re-enabled once the problem
// is solved.

This applies to wasm since it has no atomic operations yet. The test needs to be reenabled after the threads proposal landed.