LLVM 17.0.0git
|
This pass optimizes atomic operations by using a single lane of a wavefront to perform the atomic operation, thus reducing contention on that memory location. More...
#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/UniformityAnalysis.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/InitializePasses.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "amdgpu-atomic-optimizer" |
Functions | |
static Value * | buildNonAtomicBinOp (IRBuilder<> &B, AtomicRMWInst::BinOp Op, Value *LHS, Value *RHS) |
static APInt | getIdentityValueForAtomicOp (AtomicRMWInst::BinOp Op, unsigned BitWidth) |
static Value * | buildMul (IRBuilder<> &B, Value *LHS, Value *RHS) |
INITIALIZE_PASS_BEGIN (AMDGPUAtomicOptimizer, DEBUG_TYPE, "AMDGPU atomic optimizations", false, false) INITIALIZE_PASS_END(AMDGPUAtomicOptimizer | |
Variables | |
DEBUG_TYPE | |
AMDGPU atomic | optimizations |
AMDGPU atomic | false |
This pass optimizes atomic operations by using a single lane of a wavefront to perform the atomic operation, thus reducing contention on that memory location.
Definition in file AMDGPUAtomicOptimizer.cpp.
#define DEBUG_TYPE "amdgpu-atomic-optimizer" |
Definition at line 28 of file AMDGPUAtomicOptimizer.cpp.
Definition at line 497 of file AMDGPUAtomicOptimizer.cpp.
References B, llvm::ConstantInt::isOne(), LHS, and RHS.
|
static |
Definition at line 290 of file AMDGPUAtomicOptimizer.cpp.
References llvm::AtomicRMWInst::Add, llvm::AtomicRMWInst::And, B, Cond, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULT, LHS, llvm_unreachable, llvm::AtomicRMWInst::Max, llvm::AtomicRMWInst::Min, llvm::AtomicRMWInst::Or, RHS, llvm::AtomicRMWInst::Sub, llvm::AtomicRMWInst::UMax, llvm::AtomicRMWInst::UMin, and llvm::AtomicRMWInst::Xor.
|
static |
Definition at line 476 of file AMDGPUAtomicOptimizer.cpp.
References llvm::AtomicRMWInst::Add, llvm::AtomicRMWInst::And, llvm::BitWidth, llvm::APInt::getMaxValue(), llvm::APInt::getMinValue(), llvm::APInt::getSignedMaxValue(), llvm::APInt::getSignedMinValue(), llvm_unreachable, llvm::AtomicRMWInst::Max, llvm::AtomicRMWInst::Min, llvm::AtomicRMWInst::Or, llvm::AtomicRMWInst::Sub, llvm::AtomicRMWInst::UMax, llvm::AtomicRMWInst::UMin, and llvm::AtomicRMWInst::Xor.
INITIALIZE_PASS_BEGIN | ( | AMDGPUAtomicOptimizer | , |
DEBUG_TYPE | , | ||
"AMDGPU atomic optimizations" | , | ||
false | , | ||
false | |||
) |
DEBUG_TYPE |
Definition at line 753 of file AMDGPUAtomicOptimizer.cpp.
AMDGPU atomic false |
Definition at line 754 of file AMDGPUAtomicOptimizer.cpp.
AMDGPU atomic optimizations |
Definition at line 754 of file AMDGPUAtomicOptimizer.cpp.