[PATCH] D50277: [WebAssembly] Support for atomic fences

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 3 16:40:50 PDT 2018


aheejin added a comment.

> What do you expect for relaxed, as well as for signal fences?

Here I actually translated both a signal fence and a thread fence to the same thing. I think this will be conservatively correct, but maybe we should treat them differently. What if we translate a signal fence to a nothing but prevent reordering of instructions across it, and we might do the same thing for `asm volatile("" ::: "memory")` too. That can be something like making a pseudo instruction that eventually becomes nothing and prevents reordering across the pseudo instruction in the backend passes. What do you think?

Oh and for weaker fences, I added tests for them. They all translate to the same sequentially consistent atomicrmw or instruction.

> Could you also check in with Conrad, since he's been working on the WebAssembly memory model?

I don't think Conrad is in the LLVM Phabricator here. Should we move the discussion to a github issue?


Repository:
  rL LLVM

https://reviews.llvm.org/D50277





More information about the llvm-commits mailing list