[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

Jon Chesterfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 11 10:13:06 PDT 2020


JonChesterfield added a comment.

In D75917#1916972 <https://reviews.llvm.org/D75917#1916972>, @sameerds wrote:

> Well, there is a problem: The LangRef says that scopes are target-defined. This change says that scopes are defined by the high-level language and further assumes that OpenCL scopes make sense in all languages. Besides conflicting with the LangRef, this not seem to work with C++, which has no scopes and nor with CUDA or HIP, whose scopes are not represented in any AtomicScopeModel.


I don't follow. IR has a fence instruction. This builtin maps directly to it, passing whatever interfer arguments were given to the intrinsic along unchanged. It's exactly as valid, or invalid, as said fence instruction.

Are you objecting to passing enums in the test cases instead of raw integers?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75917/new/

https://reviews.llvm.org/D75917





More information about the cfe-commits mailing list