|
LLVM
5.0.0
|
#include "AMDGPU.h"#include "AMDGPUSubtarget.h"#include "Utils/AMDGPUBaseInfo.h"#include "llvm/ADT/APInt.h"#include "llvm/ADT/None.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/StringRef.h"#include "llvm/ADT/Triple.h"#include "llvm/ADT/Twine.h"#include "llvm/Analysis/CaptureTracking.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/CodeGen/TargetPassConfig.h"#include "llvm/IR/Attributes.h"#include "llvm/IR/BasicBlock.h"#include "llvm/IR/Constant.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DataLayout.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/Function.h"#include "llvm/IR/GlobalValue.h"#include "llvm/IR/GlobalVariable.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Instruction.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Intrinsics.h"#include "llvm/IR/LLVMContext.h"#include "llvm/IR/Metadata.h"#include "llvm/IR/Module.h"#include "llvm/IR/Type.h"#include "llvm/IR/User.h"#include "llvm/IR/Value.h"#include "llvm/Pass.h"#include "llvm/Support/Casting.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Target/TargetMachine.h"#include <algorithm>#include <cassert>#include <cstdint>#include <map>#include <tuple>#include <utility>#include <vector>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "amdgpu-promote-alloca" |
Functions | |
| static VectorType * | arrayTypeToVecType (Type *ArrayTy) |
| static Value * | calculateVectorIndex (Value *Ptr, const std::map< GetElementPtrInst *, Value * > &GEPIdx) |
| static Value * | GEPToVectorIndex (GetElementPtrInst *GEP) |
| static bool | canVectorizeInst (Instruction *Inst, User *User) |
| static bool | tryPromoteAllocaToVector (AllocaInst *Alloca, AMDGPUAS AS) |
| static bool | isCallPromotable (CallInst *CI) |
| #define DEBUG_TYPE "amdgpu-promote-alloca" |
Definition at line 62 of file AMDGPUPromoteAlloca.cpp.
|
static |
Definition at line 288 of file AMDGPUPromoteAlloca.cpp.
References llvm::VectorType::get(), llvm::Type::getArrayElementType(), and llvm::Type::getArrayNumElements().
Referenced by tryPromoteAllocaToVector().
|
static |
Definition at line 294 of file AMDGPUPromoteAlloca.cpp.
Referenced by tryPromoteAllocaToVector().
|
static |
Definition at line 318 of file AMDGPUPromoteAlloca.cpp.
References llvm::Instruction::getOpcode(), llvm::LoadInst::getPointerOperand(), llvm::StoreInst::getPointerOperand(), llvm::LoadInst::isVolatile(), llvm::StoreInst::isVolatile(), llvm::SPII::Load, SI, and llvm::SPII::Store.
Referenced by tryPromoteAllocaToVector().
|
static |
Definition at line 302 of file AMDGPUPromoteAlloca.cpp.
References llvm::dyn_cast(), llvm::User::getNumOperands(), llvm::User::getOperand(), and llvm::ConstantInt::isZero().
Referenced by tryPromoteAllocaToVector().
Definition at line 434 of file AMDGPUPromoteAlloca.cpp.
References llvm::dyn_cast(), and llvm::IntrinsicInst::getIntrinsicID().
|
static |
Definition at line 339 of file AMDGPUPromoteAlloca.cpp.
References arrayTypeToVecType(), calculateVectorIndex(), canVectorizeInst(), llvm::dbgs(), DEBUG, llvm::dyn_cast(), llvm::Instruction::eraseFromParent(), GEP, GEPToVectorIndex(), llvm::AllocaInst::getAllocatedType(), llvm::SequentialType::getElementType(), llvm::SequentialType::getNumElements(), llvm::Instruction::getOpcode(), getPointerOperand(), llvm::StoreInst::getPointerOperand(), llvm::Type::getPointerTo(), llvm::StoreInst::getValueOperand(), llvm::Type::isArrayTy(), llvm::Type::isVectorTy(), llvm_unreachable(), llvm::SPII::Load, AMDGPUAS::PRIVATE_ADDRESS, Ptr, llvm::Value::replaceAllUsesWith(), SI, llvm::SPII::Store, and llvm::Value::users().
1.8.6