OSDN Git Service

[WebAssembly] Support for atomic fences
authorHeejin Ahn <aheejin@gmail.com>
Tue, 28 May 2019 22:09:12 +0000 (22:09 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Tue, 28 May 2019 22:09:12 +0000 (22:09 +0000)
commit4b49e7df3dd7e6bee40a291c6d086d4f9a51956a
treee29a673727a2e62751b11bf76859b79f451ca19d
parent8f580be75c44e6843d11c3f893579a56132dffd6
[WebAssembly] Support for atomic fences

Summary:
This adds support for translation of LLVM IR fence instruction. We
convert a singlethread fence to a pseudo compiler barrier which becomes
0 instructions in final binary, and a thread fence to an idempotent
atomicrmw instruction to a memory address.

Reviewers: dschuff, jfb, sunfish, tlively

Subscribers: sbc100, jgravelle-google, llvm-commits

Differential Revision: https://reviews.llvm.org/D50277

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361884 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
test/CodeGen/WebAssembly/atomic-fence.ll [new file with mode: 0644]