HomePhabricator

Add OpenCL 2.0 atomic builtin functions as Clang builtin

Description

Add OpenCL 2.0 atomic builtin functions as Clang builtin

OpenCL 2.0 atomic builtin functions have a scope argument which is ideally
represented as synchronization scope argument in LLVM atomic instructions.

Clang supports translating Clang atomic builtin functions to LLVM atomic
instructions. However it currently does not support synchronization scope
of LLVM atomic instructions. Without this, users have to use LLVM assembly
code to implement OpenCL atomic builtin functions.

This patch adds OpenCL 2.0 atomic builtin functions as Clang builtin
functions, which supports generating LLVM atomic instructions with
synchronization scope operand.

Currently only constant memory scope argument is supported. Support of
non-constant memory scope argument will be added later.

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

Details

Committed
yaxunlAug 4 2017, 11:16 AM
Differential Revision
D28691: Add OpenCL 2.0 atomic builtin functions as Clang builtin
Parents
rL310081: [libFuzzer] simplify the fuzzer bot following r310075
Branches
Unknown
Tags
Unknown