This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Prototype prefetch instructions
ClosedPublic

Authored by tlively on Dec 28 2020, 7:40 PM.

Details

Summary

As proposed in https://github.com/WebAssembly/simd/pull/352 and using the
opcodes used in the V8 prototype:
https://chromium-review.googlesource.com/c/v8/v8/+/2543167. These instructions
are only usable via intrinsics and clang builtins to make them opt-in while they
are being benchmarked.

Diff Detail

Event Timeline

tlively created this revision.Dec 28 2020, 7:40 PM
tlively requested review of this revision.Dec 28 2020, 7:40 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 28 2020, 7:40 PM
aheejin accepted this revision.Dec 29 2020, 2:51 AM
aheejin added inline comments.
llvm/include/llvm/IR/IntrinsicsWebAssembly.td
318

It looks IntrWillReturn is applied by default?

llvm/test/CodeGen/WebAssembly/simd-prefetch-offset.ll
15
127
This revision is now accepted and ready to land.Dec 29 2020, 2:51 AM
aheejin added inline comments.Dec 29 2020, 2:53 AM
llvm/test/CodeGen/WebAssembly/simd-prefetch-offset.ll
127

Sorry the previous suggestion had an extra ; and there seems no way to delete it

tlively updated this revision to Diff 314647.Jan 5 2021, 9:58 AM
tlively marked 3 inline comments as done.
  • Fix section headers in test file
llvm/include/llvm/IR/IntrinsicsWebAssembly.td
318

It looks like this is only true for Intrinsics that inherit DefaultAttrsIntrinsic. Otherwise the default-enabled attributes are confusingly disabled by default https://github.com/llvm/llvm-project/blob/5abfeccf10bcbc0d673ece21ddd8d4ac4a0e7594/llvm/include/llvm/IR/Intrinsics.td#L346. As a separate change it would be a good idea to change most of our target intrinsics to use DefaultAttrsIntrinsics.

This revision was landed with ongoing or failed builds.Jan 5 2021, 11:32 AM
This revision was automatically updated to reflect the committed changes.