This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Restore defaults for stores per memop
ClosedPublic

Authored by tlively on Sep 16 2019, 4:13 PM.

Details

Summary

Large slowdowns were observed in Rust due to many small, constant
sized copies in conjunction with poorly-optimized memory.copy
implementations. Since memory.copy cannot be expected to be inlined
efficiently by engines at this time, stop using it for the smallest
copies. We continue to lower all memcpy intrinsics to memory.copy,
though.

Event Timeline

tlively created this revision.Sep 16 2019, 4:13 PM
aheejin accepted this revision.Sep 16 2019, 5:22 PM

What are the default values for those if we unset them?

This revision is now accepted and ready to land.Sep 16 2019, 5:22 PM
alexcrichton accepted this revision.Sep 16 2019, 7:10 PM

I've tested this patch compiling the motivating test case for the original performance issue for Firefox and performance is back to what it was in LLVM 8, so I can at least say from my perspective that this does the trick!

What are the default values for those if we unset them?

8 stores normally or 4 stores when optimizing for size. If SIMD is enabled that will be 128 and 64 bytes, respectively, or else it will be 64 and 32 bytes.

This revision was automatically updated to reflect the committed changes.