|
LLVM
7.0.0
|
#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"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 AMDGPUAS & | AS |
| #define DEBUG_TYPE "amdgpu-annotate-kernel-features" |
Definition at line 40 of file AMDGPUAnnotateKernelFeatures.cpp.
|
static |
Definition at line 92 of file AMDGPUAnnotateKernelFeatures.cpp.
References AS, C, llvm::dyn_cast(), llvm::SmallVectorBase::empty(), llvm::ConstantExpr::getOpcode(), llvm::User::getOperand(), llvm::Type::getPointerAddressSpace(), llvm::AddrSpaceCastInst::getSrcAddressSpace(), llvm::Value::getType(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::User::operands(), llvm::SmallVectorImpl< T >::pop_back_val(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Referenced by copyFeaturesToFunction().
|
static |
Definition at line 198 of file AMDGPUAnnotateKernelFeatures.cpp.
References Callee, castRequiresQueuePtr(), llvm::dyn_cast(), llvm::StringRef::empty(), F(), llvm::AMDGPU::getAMDGPUAS(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::CallGraphSCC::getCallGraph(), llvm::Function::getCallingConv(), llvm::Function::getIntrinsicID(), llvm::CallGraph::getModule(), llvm::Module::getTargetTriple(), handleAttr(), llvm::GCNSubtarget::hasApertureRegs(), llvm::GCNSubtarget::hasFlatAddressSpace(), I, intrinsicToAttrName(), llvm::GlobalValue::isDeclaration(), llvm::AMDGPU::isEntryFunctionCC(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::isInlineAsm(), llvm::Intrinsic::not_intrinsic, llvm::report_fatal_error(), llvm::ARM_MB::ST, and llvm::SystemZISD::TM.
Definition at line 188 of file AMDGPUAnnotateKernelFeatures.cpp.
References llvm::Function::addFnAttr(), and llvm::Function::hasFnAttribute().
Referenced by copyFeaturesToFunction().
| INITIALIZE_PASS | ( | AMDGPUAnnotateKernelFeatures | , |
| DEBUG_TYPE | , | ||
| "Add AMDGPU function attributes" | , | ||
| false | , | ||
| false | |||
| ) |
|
static |
Definition at line 148 of file AMDGPUAnnotateKernelFeatures.cpp.
Referenced by copyFeaturesToFunction().
Definition at line 88 of file AMDGPUAnnotateKernelFeatures.cpp.
Referenced by llvm::AttributeSet::addAttributes(), llvm::addStringMetadataToLoop(), adjustToPointerSize(), llvm::SCEVAAResult::alias(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), llvm::AttrBuilder::AttrBuilder(), BuildConstantFromSCEV(), canFoldInAddressingMode(), llvm::canSinkOrHoistInst(), castRequiresQueuePtr(), llvm::castToCStr(), llvm::Function::classof(), combineInsertSubvector(), combineLoadToNewType(), combineStoreToNewValue(), computeAliasSummary(), ConstantAddressBlock(), llvm::ConstantFoldLoadThroughBitcast(), llvm::AliasSetTracker::copyValue(), llvm::createAMDGPUFunctionInliningPass(), CreateGCRelocates(), llvm::createLICMPass(), despeculateCountZeros(), llvm::emitMemCpyChk(), expandBounds(), llvm::SCEVExpander::expandCodeFor(), llvm::ModuleSummaryIndex::exportToDot(), llvm::DWARFDebugNames::NameIndex::extract(), FindAllMemoryUses(), findInitTrampoline(), findUser(), llvm::DataLayout::fitsInLegalInteger(), getAddrSpace(), llvm::rdf::PhysicalRegisterInfo::getAliasSet(), llvm::AliasSetTracker::getAliasSetForPointer(), llvm::AMDGPU::getAMDGPUAS(), llvm::GCNSubtarget::getAMDGPUAS(), llvm::R600Subtarget::getAMDGPUAS(), llvm::AMDGPUAAWrapperPass::getAnalysisUsage(), llvm::GlobalVariable::getAttributesAsList(), getAttrKindEncoding(), llvm::GlobalValueSummary::getBaseObject(), getChainID(), llvm::AVRTargetLowering::getCmpLibcallReturnType(), llvm::AMDGPUIntrinsicInfo::getDeclaration(), llvm::DWARFDebugNames::NameIndex::getEntry(), getFPTernOp(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), llvm::ConstantExpr::getGetElementPtr(), GetHeapSROAValue(), llvm::DataLayout::getIndexSize(), llvm::DataLayout::getIndexTypeSizeInBits(), llvm::HexagonTargetLowering::getInlineAsmMemConstraint(), llvm::PPCTargetLowering::getInlineAsmMemConstraint(), getItaniumTypeName(), llvm::SCEVExpander::getIVIncOperand(), getLoadExtOrTrunc(), llvm::GCNTTIImpl::getLoadStoreVecRegBitWidth(), llvm::R600TTIImpl::getLoadStoreVecRegBitWidth(), llvm::AArch64TargetLowering::getMaxSupportedInterleaveFactor(), llvm::VNCoercion::getMemInstValueForLoadHelper(), getMetadataTypeOrder(), llvm::DWARFDebugNames::NameIndex::getNameTableEntry(), llvm::DataLayout::getPointerABIAlignment(), llvm::DataLayout::getPointerPrefAlignment(), llvm::DataLayout::getPointerSize(), llvm::TargetLoweringBase::getPointerTy(), llvm::SystemZTargetLowering::getPreferredVectorAction(), llvm::XCoreTargetLowering::getScalarShiftAmountTy(), llvm::X86TargetLowering::getScalarShiftAmountTy(), llvm::Type::getScalarTy(), llvm::TargetLoweringBase::getScalingFactorCost(), llvm::MipsTargetLowering::getTypeForExtReturn(), getTypePartition(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::AttrBuilder::hasAttributes(), hasOnlySelectUsers(), INITIALIZE_PASS(), InstructionStoresToFI(), inversePermutation(), llvm::isAllocaPromotable(), isBroadcastShuffle(), isCallPromotable(), llvm::CoalescerPair::isCoalescable(), isNoWrap(), isPromotedInstructionLegal(), llvm::ARMTargetLowering::isSelectSupported(), llvm::NVPTXTTIImpl::isSourceOfDivergence(), isStackPtrRelative(), isStrideMul(), isValidVariableType(), LLVMGetAttributeCountAtIndex(), LLVMGetAttributesAtIndex(), LLVMGetCallSiteAttributeCount(), LLVMGetCallSiteAttributes(), LLVMInitializeNativeDisassembler(), llvm::log2(), LowerFPToInt(), llvm::SelectionDAGBuilder::LowerStatepoint(), LowerTruncateVectorStore(), llvm::HexagonTargetLowering::LowerUnalignedLoad(), llvm::HexagonBlockRanges::IndexRange::merge(), llvm::AliasSet::mergeSetIn(), llvm::AttributeSet::operator!=(), operator<<(), llvm::HexagonBlockRanges::IndexRange::overlaps(), parseNamePrefix(), parseTypeIdSummaryRecord(), PerformHeapAllocSRoA(), llvm::AMDGPUTargetLowering::performLoadCombine(), llvm::AMDGPUTargetLowering::performStoreCombine(), llvm::AMDGPUAAResult::pointsToConstantMemory(), llvm::MachineMemOperand::print(), processCallSite(), readsVCCZ(), llvm::R600TargetLowering::ReplaceNodeResults(), SimplifyGEPInst(), llvm::AMDGPUTargetLowering::stripBitcast(), llvm::thinLTOResolveWeakForLinkerInIndex(), tryUnmergingGEPsAcrossIndirectBr(), unifyBitWidth(), llvm::HexagonBlockRanges::RangeList::unionize(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitIntToPtr(), llvm::InstCombiner::visitPtrToInt(), and llvm::X86TTIImpl::X86TTIImpl().
1.8.13