[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)
commitea91cca593bb543edce86c15c2948ef71b022932
treeaea58698cfc016852db61f0eedd5f8ffa1a4353a
parentcd433d28118b345ba367420cbed1acd8fb1e4ea3
[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

llvm-svn: 287007
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wave.barrier.ll [new file with mode: 0644]