LLVM
15.0.0git
|
#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/Analysis/CaptureTracking.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/IntrinsicsR600.h"
#include "llvm/Pass.h"
#include "llvm/Target/TargetMachine.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "amdgpu-promote-alloca" |
Functions | |
INITIALIZE_PASS_BEGIN (AMDGPUPromoteAlloca, DEBUG_TYPE, "AMDGPU promote alloca to vector or LDS", false, false) INITIALIZE_PASS_END(AMDGPUPromoteAlloca | |
static FixedVectorType * | arrayTypeToVecType (ArrayType *ArrayTy) |
static Value * | calculateVectorIndex (Value *Ptr, const std::map< GetElementPtrInst *, Value * > &GEPIdx) |
static Value * | GEPToVectorIndex (GetElementPtrInst *GEP, AllocaInst *Alloca, Type *VecElemTy, const DataLayout &DL) |
static bool | tryPromoteAllocaToVector (AllocaInst *Alloca, const DataLayout &DL, unsigned MaxVGPRs) |
static bool | isCallPromotable (CallInst *CI) |
bool | handlePromoteAllocaToVector (AllocaInst &I, unsigned MaxVGPRs) |
bool | promoteAllocasToVector (Function &F, TargetMachine &TM) |
Variables | |
DEBUG_TYPE | |
AMDGPU promote alloca to vector or | LDS |
AMDGPU promote alloca to vector or | false |
#define DEBUG_TYPE "amdgpu-promote-alloca" |
Definition at line 27 of file AMDGPUPromoteAlloca.cpp.
|
static |
Definition at line 332 of file AMDGPUPromoteAlloca.cpp.
References llvm::FixedVectorType::get(), llvm::ArrayType::getElementType(), and llvm::ArrayType::getNumElements().
Referenced by tryPromoteAllocaToVector().
|
static |
Definition at line 338 of file AMDGPUPromoteAlloca.cpp.
References assert(), GEP, llvm::Value::getContext(), llvm::Type::getInt32Ty(), llvm::Constant::getNullValue(), I, and llvm::Value::stripPointerCasts().
Referenced by tryPromoteAllocaToVector().
|
static |
Definition at line 349 of file AMDGPUPromoteAlloca.cpp.
References DL, llvm::MapVector< KeyT, ValueT, MapType, VectorType >::front(), GEP, llvm::ConstantInt::get(), llvm::MapVector< KeyT, ValueT, MapType, VectorType >::size(), and llvm::APInt::udivrem().
Referenced by tryPromoteAllocaToVector().
bool handlePromoteAllocaToVector | ( | AllocaInst & | I, |
unsigned | MaxVGPRs | ||
) |
Definition at line 1070 of file AMDGPUPromoteAlloca.cpp.
References llvm::dbgs(), llvm::Module::getDataLayout(), I, LLVM_DEBUG, Mod, and tryPromoteAllocaToVector().
Referenced by promoteAllocasToVector().
INITIALIZE_PASS_BEGIN | ( | AMDGPUPromoteAlloca | , |
DEBUG_TYPE | , | ||
"AMDGPU promote alloca to vector or LDS" | , | ||
false | , | ||
false | |||
) |
|
static |
Definition at line 534 of file AMDGPUPromoteAlloca.cpp.
References llvm::IntrinsicInst::getIntrinsicID(), and memcpy().
bool promoteAllocasToVector | ( | Function & | F, |
TargetMachine & | TM | ||
) |
Definition at line 1082 of file AMDGPUPromoteAlloca.cpp.
References llvm::Triple::amdgcn, F, llvm::AMDGPUSubtarget::get(), handlePromoteAllocaToVector(), I, llvm::AMDGPU::isEntryFunctionCC(), llvm::min(), llvm::ARM_MB::ST, and TM.
Referenced by llvm::AMDGPUPromoteAllocaToVectorPass::run().
|
static |
Definition at line 382 of file AMDGPUPromoteAlloca.cpp.
References llvm::all_of(), arrayTypeToVecType(), Builder, calculateVectorIndex(), llvm::dbgs(), DL, GEP, GEPToVectorIndex(), llvm::AllocaInst::getAddressSpace(), llvm::AllocaInst::getAllocatedType(), llvm::getLoadStorePointerOperand(), llvm::getLoadStoreType(), llvm::StoreInst::getPointerOperandIndex(), llvm::Type::getPointerTo(), llvm::Value::getType(), llvm::isAssumeLikeIntrinsic(), llvm::CastInst::isBitOrNoopPointerCastable(), llvm::VectorType::isValidElementType(), LLVM_DEBUG, llvm_unreachable, llvm::SPII::Load, SI, llvm::SPII::Store, llvm::Value::users(), llvm::Value::uses(), and Uses.
Referenced by handlePromoteAllocaToVector().
DEBUG_TYPE |
Definition at line 136 of file AMDGPUPromoteAlloca.cpp.
Definition at line 137 of file AMDGPUPromoteAlloca.cpp.
Definition at line 137 of file AMDGPUPromoteAlloca.cpp.