|
LLVM 24.0.0git
|
#include "AMDGPUTargetTransformInfo.h"#include "AMDGPUSubtarget.h"#include "AMDGPUTargetMachine.h"#include "MCTargetDesc/AMDGPUMCTargetDesc.h"#include "SIModeRegisterDefaults.h"#include "llvm/ADT/SmallBitVector.h"#include "llvm/Analysis/InlineCost.h"#include "llvm/Analysis/LoopInfo.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/CodeGen/Analysis.h"#include "llvm/IR/Function.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/IntrinsicsAMDGPU.h"#include "llvm/IR/PatternMatch.h"#include "llvm/Support/KnownBits.h"#include <optional>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "AMDGPUtti" |
Variables | |
| static constexpr unsigned | MaskPackCostPerElt = 4 |
| static constexpr unsigned | MaskUnpackCostPerElt = 3 |
| #define DEBUG_TYPE "AMDGPUtti" |
Definition at line 36 of file AMDGPUTargetTransformInfo.cpp.
|
static |
Definition at line 1933 of file AMDGPUTargetTransformInfo.cpp.
References A(), llvm::CallBase::args(), llvm::ComputeValueVTs(), DL, llvm::CallBase::getArgOperandNo(), llvm::CallBase::getCallingConv(), llvm::Value::getContext(), llvm::TargetTransformInfoImplBase::getDataLayout(), llvm::InlineConstants::getInstrCost(), llvm::Type::getInt32Ty(), llvm::InstructionCost::getValue(), llvm::AMDGPU::isArgPassedInSGPR(), llvm::AMDGPUAS::PRIVATE_ADDRESS, llvm::TargetTransformInfo::TCK_SizeAndLatency, and TLI.
Referenced by llvm::GCNTTIImpl::adjustInliningThreshold().
|
static |
FMul and its single fadd/fsub user FAddSub are expected to fuse during instruction selection. Ty is the type the fused operation runs on. Definition at line 480 of file AMDGPUTargetTransformInfo.cpp.
References assert(), F, llvm::FMul, llvm::Instruction::getFunction(), llvm::Instruction::getOpcode(), llvm::Instruction::hasAllowContract(), and TLI.
Referenced by getFusedFMul(), and isFusedFMul().
Definition at line 38 of file AMDGPUTargetTransformInfo.cpp.
References Cond, dependsOnLocalPhi(), llvm::Depth, llvm::dyn_cast(), I, llvm::none_of(), PHI, and V.
Referenced by dependsOnLocalPhi(), and llvm::AMDGPUTTIImpl::getUnrollingPreferences().
|
static |
Definition at line 1982 of file AMDGPUTargetTransformInfo.cpp.
References llvm::CallBase::args(), DL, llvm::dyn_cast(), llvm::AMDGPUAS::FLAT_ADDRESS, llvm::AllocaInst::getAllocationSize(), llvm::TypeSize::getFixed(), llvm::getUnderlyingObject(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::AllocaInst::isStaticAlloca(), llvm::AMDGPUAS::PRIVATE_ADDRESS, and llvm::Size.
Referenced by llvm::GCNTTIImpl::adjustInliningThreshold(), and llvm::GCNTTIImpl::getCallerAllocaCost().
|
static |
An fma holds one multiply, so only one fmul operand fuses with FAddSub.
Definition at line 500 of file AMDGPUTargetTransformInfo.cpp.
References canFuseFMulWithFAddSub(), llvm::dyn_cast(), llvm::FMul, llvm::User::operands(), and TLI.
Referenced by isFusedFMul(), and llvm::GCNTTIImpl::isProfitableToSinkOperands().
|
static |
Definition at line 2177 of file AMDGPUTargetTransformInfo.cpp.
References llvm::AMDGPUAS::BUFFER_FAT_POINTER, llvm::AMDGPUAS::BUFFER_RESOURCE, DL, llvm::dyn_cast(), GEP, llvm::APInt::getAllOnes(), llvm::getLoadStorePointerOperand(), llvm::Type::getPointerAddressSpace(), llvm::Value::getType(), I, llvm::APInt::isAllOnes(), llvm::APInt::isNonPositive(), llvm::Offset, llvm::APInt::sge(), llvm::APInt::zext(), and llvm::APInt::zextOrTrunc().
Referenced by llvm::GCNTTIImpl::getMemoryOpCost().
Definition at line 996 of file AMDGPUTargetTransformInfo.cpp.
References llvm::dyn_cast().
Referenced by llvm::GCNTTIImpl::getArithmeticReductionCost(), and llvm::GCNTTIImpl::getCastInstrCost().
Definition at line 2154 of file AMDGPUTargetTransformInfo.cpp.
References llvm::popcount().
Referenced by llvm::GCNTTIImpl::getMemoryOpCost().
|
static |
Definition at line 2165 of file AMDGPUTargetTransformInfo.cpp.
References DL, llvm::dyn_cast_or_null(), llvm::Value::getType(), I, llvm::AMDGPU::isTriviallyUniform(), llvm::Offset, and llvm::Value::stripAndAccumulateConstantOffsets().
Referenced by llvm::GCNTTIImpl::getMemoryOpCost().
|
static |
Definition at line 687 of file AMDGPUTargetTransformInfo.cpp.
Referenced by llvm::GCNTTIImpl::getIntrinsicInstrCost().
|
static |
Definition at line 511 of file AMDGPUTargetTransformInfo.cpp.
References canFuseFMulWithFAddSub(), llvm::dyn_cast(), llvm::FMul, getFusedFMul(), llvm::Instruction::getOpcode(), llvm::Value::hasOneUse(), TLI, and llvm::Instruction::user_begin().
Referenced by llvm::GCNTTIImpl::getArithmeticInstrCost().
|
staticconstexpr |
Definition at line 993 of file AMDGPUTargetTransformInfo.cpp.
Referenced by llvm::GCNTTIImpl::getArithmeticReductionCost(), and llvm::GCNTTIImpl::getCastInstrCost().
|
staticconstexpr |
Definition at line 994 of file AMDGPUTargetTransformInfo.cpp.
Referenced by llvm::GCNTTIImpl::getCastInstrCost().