[PATCH] D50277: [WebAssembly] Support for atomic fences
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 3 15:48:10 PDT 2018
aheejin created this revision.
aheejin added reviewers: dschuff, jfb.
Herald added subscribers: llvm-commits, sunfish, jgravelle-google, sbc100.
This adds support for translation of LLVM IR fence instruction.
Wasm does not have a fence instruction, but because all atomic
instructions in wasm are sequentially consistent, we translate a fence
to an idempotent atomic RMW instruction to a linear memory address.
While any address can work, here we use a value stored in
__stack_pointer wasm global because there's high chance that area is in
cache.
Repository:
rL LLVM
https://reviews.llvm.org/D50277
Files:
lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
test/CodeGen/WebAssembly/atomic-fence.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50277.159114.patch
Type: text/x-patch
Size: 4538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180803/293b464b/attachment.bin>
More information about the llvm-commits
mailing list