]> granicus.if.org Git - llvm/commit
[AMDGPU] Add wave barrier builtin
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Tue, 15 Nov 2016 19:00:15 +0000 (19:00 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Tue, 15 Nov 2016 19:00:15 +0000 (19:00 +0000)
commit79f84ef39d1140a56edae808697ce551a785aaef
treef1c4c9bfd3711914e49816277480f9fd332553de
parent1b2455de46fc4a2404c5eac48fd1713745eb8610
[AMDGPU] Add wave barrier builtin

The wave barrier represents the discardable barrier. Its main purpose is to
carry convergent attribute, thus preventing illegal CFG optimizations. All lanes
in a wave come to convergence point simultaneously with SIMT, thus no special
instruction is needed in the ISA. The barrier is discarded during code generation.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287007 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IntrinsicsAMDGPU.td
lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
lib/Target/AMDGPU/SIInstrInfo.cpp
lib/Target/AMDGPU/SIInstructions.td
test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll [new file with mode: 0644]