LLVM  6.0.0svn
Macros | Functions | Variables
AMDGPUAnnotateKernelFeatures.cpp File Reference
#include "AMDGPU.h"
#include "AMDGPUSubtarget.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Use.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetMachine.h"
Include dependency graph for AMDGPUAnnotateKernelFeatures.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "amdgpu-annotate-kernel-features"
 

Functions

 INITIALIZE_PASS (AMDGPUAnnotateKernelFeatures, DEBUG_TYPE, "Add AMDGPU function attributes", false, false) static bool castRequiresQueuePtr(unsigned SrcAS
 
static bool castRequiresQueuePtr (const AddrSpaceCastInst *ASC, const AMDGPUAS &AS)
 
static StringRef intrinsicToAttrName (Intrinsic::ID ID, bool &NonKernelOnly, bool &IsQueuePtr)
 
static bool handleAttr (Function &Parent, const Function &Callee, StringRef Name)
 
static void copyFeaturesToFunction (Function &Parent, const Function &Callee, bool &NeedQueuePtr)
 

Variables

const AMDGPUASAS
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "amdgpu-annotate-kernel-features"

Definition at line 40 of file AMDGPUAnnotateKernelFeatures.cpp.

Function Documentation

◆ castRequiresQueuePtr()

static bool castRequiresQueuePtr ( const AddrSpaceCastInst ASC,
const AMDGPUAS AS 
)
static

◆ copyFeaturesToFunction()

static void copyFeaturesToFunction ( Function Parent,
const Function Callee,
bool NeedQueuePtr 
)
static

◆ handleAttr()

static bool handleAttr ( Function Parent,
const Function Callee,
StringRef  Name 
)
static

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( AMDGPUAnnotateKernelFeatures  ,
DEBUG_TYPE  ,
"Add AMDGPU function attributes ,
false  ,
false   
)

◆ intrinsicToAttrName()

static StringRef intrinsicToAttrName ( Intrinsic::ID  ID,
bool NonKernelOnly,
bool IsQueuePtr 
)
static

Definition at line 148 of file AMDGPUAnnotateKernelFeatures.cpp.

Referenced by copyFeaturesToFunction().

Variable Documentation

◆ AS

Initial value:
{
return SrcAS == AS.LOCAL_ADDRESS || SrcAS == AS.PRIVATE_ADDRESS
const AMDGPUAS & AS
Address space for local memory.
Definition: AMDGPU.h:226
unsigned PRIVATE_ADDRESS
Address space for private memory.
Definition: AMDGPU.h:216

Definition at line 88 of file AMDGPUAnnotateKernelFeatures.cpp.

Referenced by llvm::AttributeSet::addAttributes(), llvm::addStringMetadataToLoop(), adjustToPointerSize(), llvm::SCEVAAResult::alias(), llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), llvm::AttrBuilder::AttrBuilder(), BuildConstantFromSCEV(), canFoldInAddressingMode(), llvm::canSinkOrHoistInst(), castRequiresQueuePtr(), llvm::castToCStr(), combineInsertSubvector(), combineLoadToNewType(), combineStoreToNewValue(), computeAliasSummary(), ConstantAddressBlock(), llvm::AliasSetTracker::copyValue(), llvm::createAMDGPUFunctionInliningPass(), CreateGCRelocates(), llvm::createLICMPass(), despeculateCountZeros(), llvm::emitMemCpyChk(), emitRemovedIntrinsicError(), expandBounds(), llvm::SCEVExpander::expandCodeFor(), FindAllMemoryUses(), findInitTrampoline(), findUser(), llvm::DataLayout::fitsInLegalInteger(), FunctionNumber(), llvm::rdf::PhysicalRegisterInfo::getAliasSet(), llvm::AliasSetTracker::getAliasSetForPointer(), llvm::AMDGPU::getAMDGPUAS(), llvm::AMDGPUAAWrapperPass::getAnalysisUsage(), llvm::GlobalVariable::getAttributesAsList(), getAttrKindEncoding(), llvm::GlobalValueSummary::getBaseObject(), llvm::AVRTargetLowering::getCmpLibcallReturnType(), llvm::AMDGPUIntrinsicInfo::getDeclaration(), getFPTernOp(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), llvm::ConstantExpr::getGetElementPtr(), GetHeapSROAValue(), llvm::HexagonTargetLowering::getInlineAsmMemConstraint(), llvm::PPCTargetLowering::getInlineAsmMemConstraint(), getItaniumTypeName(), llvm::SCEVExpander::getIVIncOperand(), llvm::AMDGPUTTIImpl::getLoadStoreVecRegBitWidth(), llvm::AArch64TargetLowering::getMaxSupportedInterleaveFactor(), llvm::VNCoercion::getMemInstValueForLoadHelper(), getMetadataTypeOrder(), llvm::DataLayout::getPointerABIAlignment(), llvm::Type::getPointerElementType(), llvm::DataLayout::getPointerPrefAlignment(), llvm::DataLayout::getPointerSize(), llvm::TargetLoweringBase::getPointerTy(), llvm::DataLayout::getPointerTypeSizeInBits(), llvm::SystemZTargetLowering::getPreferredVectorAction(), llvm::XCoreTargetLowering::getScalarShiftAmountTy(), llvm::X86TargetLowering::getScalarShiftAmountTy(), llvm::TargetLoweringBase::getScalingFactorCost(), getTypePartition(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::AttrBuilder::hasAttributes(), hasOnlySelectUsers(), inBytes(), INITIALIZE_PASS(), InstructionStoresToFI(), llvm::isAllocaPromotable(), isBroadcastShuffle(), isCallPromotable(), llvm::CoalescerPair::isCoalescable(), llvm::IsConstantOffsetFromGlobal(), isImplicitOperandIn(), isNoWrap(), isPromotedInstructionLegal(), llvm::ARMTargetLowering::isSelectSupported(), llvm::NVPTXTTIImpl::isSourceOfDivergence(), isStackPtrRelative(), isStrideMul(), LLVMGetAttributeCountAtIndex(), LLVMGetAttributesAtIndex(), LLVMGetCallSiteAttributeCount(), LLVMGetCallSiteAttributes(), LLVMInitializeNativeDisassembler(), llvm::log2(), LowerFPToInt(), llvm::SelectionDAGBuilder::LowerStatepoint(), llvm::AMDGPUTargetLowering::mayIgnoreSignedZero(), llvm::HexagonBlockRanges::IndexRange::merge(), llvm::AliasSet::mergeSetIn(), llvm::AttributeSet::operator!=(), operator<<(), llvm::HexagonBlockRanges::IndexRange::overlaps(), parseNamePrefix(), parsePhysicalReg(), llvm::LLParser::parseTypeAtBeginning(), PerformHeapAllocSRoA(), llvm::AMDGPUTargetLowering::performLoadCombine(), llvm::AMDGPUTargetLowering::performStoreCombine(), llvm::AMDGPUAAResult::pointsToConstantMemory(), processCallSite(), propagateMetadata(), readsVCCZ(), readWideAPInt(), llvm::R600TargetLowering::ReplaceNodeResults(), shouldReorderOperands(), SimplifyGEPInst(), llvm::thinLTOResolveWeakForLinkerInIndex(), tryUnmergingGEPsAcrossIndirectBr(), unifyBitWidth(), llvm::HexagonBlockRanges::RangeList::unionize(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitIntToPtr(), llvm::InstCombiner::visitPtrToInt(), and llvm::X86TTIImpl::X86TTIImpl().