Skip to content
Snippets Groups Projects
  • Yaxun Liu's avatar
    84162ace
    Add OpenCL 2.0 atomic builtin functions as Clang builtin · 84162ace
    Yaxun Liu authored
    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
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310082 91177308-0d34-0410-b5e6-96231b3b80d8
    84162ace
    History
    Add OpenCL 2.0 atomic builtin functions as Clang builtin
    Yaxun Liu authored
    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
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310082 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.