aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
authorNeil Henning <neil.henning@amd.com>2018-10-08 15:49:19 +0000
committerNeil Henning <neil.henning@amd.com>2018-10-08 15:49:19 +0000
commit6641657453170b57d05de8aea095b0f41f7ba4fe (patch)
tree09c2793d56ab944aa37f2821995f7c6b06719ec0 /llvm/utils/TableGen/CodeGenDAGPatterns.cpp
parent307c7901d08430c5db58f7a53ab02f08db7ea128 (diff)
downloadllvm-6641657453170b57d05de8aea095b0f41f7ba4fe.zip
llvm-6641657453170b57d05de8aea095b0f41f7ba4fe.tar.gz
llvm-6641657453170b57d05de8aea095b0f41f7ba4fe.tar.bz2
[AMDGPU] Add an AMDGPU specific atomic optimizer.
This commit adds a new IR level pass to the AMDGPU backend to perform atomic optimizations. It works by: - Running through a function and finding atomicrmw add/sub or uses of the atomic buffer intrinsics for add/sub. - If all arguments except the value to be added/subtracted are uniform, record the value to be optimized. - Run through the atomic operations we can optimize and, depending on whether the value is uniform/divergent use wavefront wide operations (DPP in the divergent case) to calculate the total amount to be atomically added/subtracted. - Then let only a single lane of each wavefront perform the atomic operation, reducing the total number of atomic operations in flight. - Lastly we recombine the result from the single lane to each lane of the wavefront, and calculate our individual lanes offset into the final result. Differential Revision: https://reviews.llvm.org/D51969 llvm-svn: 343973
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
0 files changed, 0 insertions, 0 deletions