|
LLVM
8.0.1
|
#include "llvm/IR/Attributes.h"
Public Types | |
| enum | AttrIndex : unsigned { ReturnIndex = 0U, FunctionIndex = ~0U, FirstArgIndex = 1 } |
| using | iterator = const AttributeSet * |
Public Member Functions | |
| AttributeList ()=default | |
| LLVM_NODISCARD AttributeList | addAttribute (LLVMContext &C, unsigned Index, Attribute::AttrKind Kind) const |
| Add an attribute to the attribute set at the given index. More... | |
| LLVM_NODISCARD AttributeList | addAttribute (LLVMContext &C, unsigned Index, StringRef Kind, StringRef Value=StringRef()) const |
| Add an attribute to the attribute set at the given index. More... | |
| LLVM_NODISCARD AttributeList | addAttribute (LLVMContext &C, unsigned Index, Attribute A) const |
| Add an attribute to the attribute set at the given index. More... | |
| LLVM_NODISCARD AttributeList | addAttributes (LLVMContext &C, unsigned Index, const AttrBuilder &B) const |
| Add attributes to the attribute set at the given index. More... | |
| LLVM_NODISCARD AttributeList | addParamAttribute (LLVMContext &C, unsigned ArgNo, Attribute::AttrKind Kind) const |
| Add an argument attribute to the list. More... | |
| LLVM_NODISCARD AttributeList | addParamAttribute (LLVMContext &C, unsigned ArgNo, StringRef Kind, StringRef Value=StringRef()) const |
| Add an argument attribute to the list. More... | |
| LLVM_NODISCARD AttributeList | addParamAttribute (LLVMContext &C, ArrayRef< unsigned > ArgNos, Attribute A) const |
| Add an attribute to the attribute list at the given arg indices. More... | |
| LLVM_NODISCARD AttributeList | addParamAttributes (LLVMContext &C, unsigned ArgNo, const AttrBuilder &B) const |
| Add an argument attribute to the list. More... | |
| LLVM_NODISCARD AttributeList | removeAttribute (LLVMContext &C, unsigned Index, Attribute::AttrKind Kind) const |
| Remove the specified attribute at the specified index from this attribute list. More... | |
| LLVM_NODISCARD AttributeList | removeAttribute (LLVMContext &C, unsigned Index, StringRef Kind) const |
| Remove the specified attribute at the specified index from this attribute list. More... | |
| LLVM_NODISCARD AttributeList | removeAttributes (LLVMContext &C, unsigned Index, const AttrBuilder &AttrsToRemove) const |
| Remove the specified attributes at the specified index from this attribute list. More... | |
| LLVM_NODISCARD AttributeList | removeAttributes (LLVMContext &C, unsigned Index) const |
| Remove all attributes at the specified index from this attribute list. More... | |
| LLVM_NODISCARD AttributeList | removeParamAttribute (LLVMContext &C, unsigned ArgNo, Attribute::AttrKind Kind) const |
| Remove the specified attribute at the specified arg index from this attribute list. More... | |
| LLVM_NODISCARD AttributeList | removeParamAttribute (LLVMContext &C, unsigned ArgNo, StringRef Kind) const |
| Remove the specified attribute at the specified arg index from this attribute list. More... | |
| LLVM_NODISCARD AttributeList | removeParamAttributes (LLVMContext &C, unsigned ArgNo, const AttrBuilder &AttrsToRemove) const |
| Remove the specified attribute at the specified arg index from this attribute list. More... | |
| LLVM_NODISCARD AttributeList | removeParamAttributes (LLVMContext &C, unsigned ArgNo) const |
| Remove all attributes at the specified arg index from this attribute list. More... | |
| LLVM_NODISCARD AttributeList | addDereferenceableAttr (LLVMContext &C, unsigned Index, uint64_t Bytes) const |
| Add the dereferenceable attribute to the attribute set at the given index. More... | |
| LLVM_NODISCARD AttributeList | addDereferenceableParamAttr (LLVMContext &C, unsigned ArgNo, uint64_t Bytes) const |
| Add the dereferenceable attribute to the attribute set at the given arg index. More... | |
| LLVM_NODISCARD AttributeList | addDereferenceableOrNullAttr (LLVMContext &C, unsigned Index, uint64_t Bytes) const |
| Add the dereferenceable_or_null attribute to the attribute set at the given index. More... | |
| LLVM_NODISCARD AttributeList | addDereferenceableOrNullParamAttr (LLVMContext &C, unsigned ArgNo, uint64_t Bytes) const |
| Add the dereferenceable_or_null attribute to the attribute set at the given arg index. More... | |
| LLVM_NODISCARD AttributeList | addAllocSizeAttr (LLVMContext &C, unsigned Index, unsigned ElemSizeArg, const Optional< unsigned > &NumElemsArg) |
| Add the allocsize attribute to the attribute set at the given index. More... | |
| LLVM_NODISCARD AttributeList | addAllocSizeParamAttr (LLVMContext &C, unsigned ArgNo, unsigned ElemSizeArg, const Optional< unsigned > &NumElemsArg) |
| Add the allocsize attribute to the attribute set at the given arg index. More... | |
| LLVMContext & | getContext () const |
| Retrieve the LLVM context. More... | |
| AttributeSet | getAttributes (unsigned Index) const |
| The attributes for the specified index are returned. More... | |
| AttributeSet | getParamAttributes (unsigned ArgNo) const |
| The attributes for the argument or parameter at the given index are returned. More... | |
| AttributeSet | getRetAttributes () const |
| The attributes for the ret value are returned. More... | |
| AttributeSet | getFnAttributes () const |
| The function attributes are returned. More... | |
| bool | hasAttribute (unsigned Index, Attribute::AttrKind Kind) const |
| Return true if the attribute exists at the given index. More... | |
| bool | hasAttribute (unsigned Index, StringRef Kind) const |
| Return true if the attribute exists at the given index. More... | |
| bool | hasAttributes (unsigned Index) const |
| Return true if attribute exists at the given index. More... | |
| bool | hasParamAttr (unsigned ArgNo, Attribute::AttrKind Kind) const |
| Return true if the attribute exists for the given argument. More... | |
| bool | hasParamAttr (unsigned ArgNo, StringRef Kind) const |
| Return true if the attribute exists for the given argument. More... | |
| bool | hasParamAttrs (unsigned ArgNo) const |
| Return true if attributes exists for the given argument. More... | |
| bool | hasFnAttribute (Attribute::AttrKind Kind) const |
| Equivalent to hasAttribute(AttributeList::FunctionIndex, Kind) but may be faster. More... | |
| bool | hasFnAttribute (StringRef Kind) const |
| Equivalent to hasAttribute(AttributeList::FunctionIndex, Kind) but may be faster. More... | |
| bool | hasParamAttribute (unsigned ArgNo, Attribute::AttrKind Kind) const |
| Equivalent to hasAttribute(ArgNo + FirstArgIndex, Kind). More... | |
| bool | hasAttrSomewhere (Attribute::AttrKind Kind, unsigned *Index=nullptr) const |
| Return true if the specified attribute is set for at least one parameter or for the return value. More... | |
| Attribute | getAttribute (unsigned Index, Attribute::AttrKind Kind) const |
| Return the attribute object that exists at the given index. More... | |
| Attribute | getAttribute (unsigned Index, StringRef Kind) const |
| Return the attribute object that exists at the given index. More... | |
| Attribute | getParamAttr (unsigned ArgNo, Attribute::AttrKind Kind) const |
| Return the attribute object that exists at the arg index. More... | |
| Attribute | getParamAttr (unsigned ArgNo, StringRef Kind) const |
| Return the attribute object that exists at the given index. More... | |
| unsigned | getRetAlignment () const |
| Return the alignment of the return value. More... | |
| unsigned | getParamAlignment (unsigned ArgNo) const |
| Return the alignment for the specified function parameter. More... | |
| unsigned | getStackAlignment (unsigned Index) const |
| Get the stack alignment. More... | |
| uint64_t | getDereferenceableBytes (unsigned Index) const |
| Get the number of dereferenceable bytes (or zero if unknown). More... | |
| uint64_t | getParamDereferenceableBytes (unsigned ArgNo) const |
| Get the number of dereferenceable bytes (or zero if unknown) of an arg. More... | |
| uint64_t | getDereferenceableOrNullBytes (unsigned Index) const |
| Get the number of dereferenceable_or_null bytes (or zero if unknown). More... | |
| uint64_t | getParamDereferenceableOrNullBytes (unsigned ArgNo) const |
| Get the number of dereferenceable_or_null bytes (or zero if unknown) of an arg. More... | |
| std::pair< unsigned, Optional< unsigned > > | getAllocSizeArgs (unsigned Index) const |
| Get the allocsize argument numbers (or pair(0, 0) if unknown). More... | |
| std::string | getAsString (unsigned Index, bool InAttrGrp=false) const |
| Return the attributes at the index as a string. More... | |
| iterator | begin () const |
| iterator | end () const |
| unsigned | getNumAttrSets () const |
| unsigned | index_begin () const |
| Use these to iterate over the valid attribute indices. More... | |
| unsigned | index_end () const |
| bool | operator== (const AttributeList &RHS) const |
| operator==/!= - Provide equality predicates. More... | |
| bool | operator!= (const AttributeList &RHS) const |
| void * | getRawPointer () const |
| Return a raw pointer that uniquely identifies this attribute list. More... | |
| bool | isEmpty () const |
| Return true if there are no attributes. More... | |
| void | dump () const |
Static Public Member Functions | |
| static AttributeList | get (LLVMContext &C, ArrayRef< std::pair< unsigned, Attribute >> Attrs) |
| Create an AttributeList with the specified parameters in it. More... | |
| static AttributeList | get (LLVMContext &C, ArrayRef< std::pair< unsigned, AttributeSet >> Attrs) |
| static AttributeList | get (LLVMContext &C, AttributeSet FnAttrs, AttributeSet RetAttrs, ArrayRef< AttributeSet > ArgAttrs) |
| Create an AttributeList from attribute sets for a function, its return value, and all of its arguments. More... | |
| static AttributeList | get (LLVMContext &C, ArrayRef< AttributeList > Attrs) |
| Return an AttributeList with the specified parameters in it. More... | |
| static AttributeList | get (LLVMContext &C, unsigned Index, ArrayRef< Attribute::AttrKind > Kinds) |
| static AttributeList | get (LLVMContext &C, unsigned Index, ArrayRef< StringRef > Kind) |
| static AttributeList | get (LLVMContext &C, unsigned Index, const AttrBuilder &B) |
Friends | |
| class | AttrBuilder |
| class | AttributeListImpl |
| class | AttributeSet |
| class | AttributeSetNode |
| template<typename Ty > | |
| struct | DenseMapInfo |
Definition at line 327 of file Attributes.h.
| using llvm::AttributeList::iterator = const AttributeSet * |
Definition at line 635 of file Attributes.h.
| Enumerator | |
|---|---|
| ReturnIndex | |
| FunctionIndex | |
| FirstArgIndex | |
Definition at line 329 of file Attributes.h.
|
default |
| AttributeList AttributeList::addAllocSizeAttr | ( | LLVMContext & | C, |
| unsigned | Index, | ||
| unsigned | ElemSizeArg, | ||
| const Optional< unsigned > & | NumElemsArg | ||
| ) |
Add the allocsize attribute to the attribute set at the given index.
Returns a new list because attribute lists are immutable.
Definition at line 1176 of file Attributes.cpp.
References llvm::AttrBuilder::addAllocSizeAttr(), and B.
|
inline |
Add the allocsize attribute to the attribute set at the given arg index.
Returns a new list because attribute lists are immutable.
Definition at line 514 of file Attributes.h.
References llvm::Intrinsic::getAttributes(), and llvm::Attribute::hasAttribute().
| AttributeList AttributeList::addAttribute | ( | LLVMContext & | C, |
| unsigned | Index, | ||
| Attribute::AttrKind | Kind | ||
| ) | const |
Add an attribute to the attribute set at the given index.
Returns a new list because attribute lists are immutable.
Definition at line 1033 of file Attributes.cpp.
References llvm::AttrBuilder::addAttribute(), and B.
Referenced by llvm::Function::addAttribute(), llvm::CallBase::addAttribute(), fixupFPReturnAndCall(), llvm::AMDGPULibFunc::getOrInsertFunction(), and GetRMWLibcall().
| AttributeList AttributeList::addAttribute | ( | LLVMContext & | C, |
| unsigned | Index, | ||
| StringRef | Kind, | ||
| StringRef | Value = StringRef() |
||
| ) | const |
Add an attribute to the attribute set at the given index.
Returns a new list because attribute lists are immutable.
Definition at line 1041 of file Attributes.cpp.
References llvm::AttrBuilder::addAttribute(), and B.
| AttributeList AttributeList::addAttribute | ( | LLVMContext & | C, |
| unsigned | Index, | ||
| Attribute | A | ||
| ) | const |
Add an attribute to the attribute set at the given index.
Returns a new list because attribute lists are immutable.
Definition at line 1049 of file Attributes.cpp.
References llvm::AttrBuilder::addAttribute(), and B.
| AttributeList AttributeList::addAttributes | ( | LLVMContext & | C, |
| unsigned | Index, | ||
| const AttrBuilder & | B | ||
| ) | const |
Add attributes to the attribute set at the given index.
Returns a new list because attribute lists are immutable.
Definition at line 1056 of file Attributes.cpp.
References assert(), attrIdxToArrayIdx(), llvm::AttributeListImpl::begin(), llvm::AttributeListImpl::end(), llvm::AttributeSet::get(), get(), llvm::AttrBuilder::getAlignment(), llvm::Intrinsic::getAttributes(), getImpl(), llvm::AttrBuilder::hasAttributes(), llvm::AttrBuilder::merge(), llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorBase::size().
Referenced by llvm::Function::addAttributes().
| AttributeList AttributeList::addDereferenceableAttr | ( | LLVMContext & | C, |
| unsigned | Index, | ||
| uint64_t | Bytes | ||
| ) | const |
Add the dereferenceable attribute to the attribute set at the given index.
Returns a new list because attribute lists are immutable.
Definition at line 1159 of file Attributes.cpp.
References llvm::AttrBuilder::addDereferenceableAttr(), and B.
Referenced by llvm::Function::addDereferenceableAttr(), and llvm::CallBase::addDereferenceableAttr().
| AttributeList AttributeList::addDereferenceableOrNullAttr | ( | LLVMContext & | C, |
| unsigned | Index, | ||
| uint64_t | Bytes | ||
| ) | const |
Add the dereferenceable_or_null attribute to the attribute set at the given index.
Returns a new list because attribute lists are immutable.
Definition at line 1168 of file Attributes.cpp.
References llvm::AttrBuilder::addDereferenceableOrNullAttr(), and B.
Referenced by llvm::Function::addDereferenceableOrNullAttr(), and llvm::CallBase::addDereferenceableOrNullAttr().
|
inline |
Add the dereferenceable_or_null attribute to the attribute set at the given arg index.
Returns a new list because attribute lists are immutable.
Definition at line 500 of file Attributes.h.
References LLVM_NODISCARD.
Referenced by llvm::Function::addDereferenceableOrNullParamAttr().
|
inline |
Add the dereferenceable attribute to the attribute set at the given arg index.
Returns a new list because attribute lists are immutable.
Definition at line 487 of file Attributes.h.
References LLVM_NODISCARD.
Referenced by llvm::Function::addDereferenceableParamAttr().
|
inline |
Add an argument attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line 403 of file Attributes.h.
References LLVM_NODISCARD.
Referenced by llvm::Function::addParamAttr(), llvm::CallBase::addParamAttr(), findInitTrampoline(), and processCallSite().
|
inline |
Add an argument attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line 411 of file Attributes.h.
References A, and LLVM_NODISCARD.
| AttributeList AttributeList::addParamAttribute | ( | LLVMContext & | C, |
| ArrayRef< unsigned > | ArgNos, | ||
| Attribute | A | ||
| ) | const |
Add an attribute to the attribute list at the given arg indices.
Returns a new list because attribute lists are immutable.
Definition at line 1085 of file Attributes.cpp.
References llvm::AttrBuilder::addAttribute(), assert(), attrIdxToArrayIdx(), B, llvm::ArrayRef< T >::back(), llvm::ArrayRef< T >::begin(), llvm::AttributeListImpl::begin(), llvm::ArrayRef< T >::end(), llvm::AttributeListImpl::end(), llvm::AttributeSet::get(), getImpl(), llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorBase::size().
|
inline |
Add an argument attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line 424 of file Attributes.h.
References LLVM_NODISCARD.
Referenced by llvm::Argument::addAttrs(), and llvm::Function::addParamAttrs().
| AttributeList::iterator AttributeList::begin | ( | ) | const |
Definition at line 1288 of file Attributes.cpp.
References llvm::AttributeSet::begin().
| LLVM_DUMP_METHOD void AttributeList::dump | ( | ) | const |
Definition at line 1305 of file Attributes.cpp.
References llvm::dbgs(), and llvm::Intrinsic::getAttributes().
| AttributeList::iterator AttributeList::end | ( | ) | const |
Definition at line 1292 of file Attributes.cpp.
References llvm::AttributeSet::end().
|
static |
Create an AttributeList with the specified parameters in it.
Definition at line 873 of file Attributes.cpp.
References assert(), llvm::ArrayRef< T >::begin(), C, E, llvm::SmallVectorImpl< T >::emplace_back(), llvm::ArrayRef< T >::empty(), llvm::ArrayRef< T >::end(), llvm::AttributeSet::get(), I, llvm::Attribute::None, llvm::none_of(), and llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by addAttributes(), llvm::CloneFunctionInto(), llvm::createDeadArgHackingPass(), llvm::createMergeFunctionsPass(), decodeLLVMAttributesForBitcode(), doPromotion(), llvm::emitMemCpyChk(), findInitTrampoline(), FunctionNumber(), llvm::GlobalVariable::getAttributesAsList(), GetGlobalTypeString(), getRetComponentType(), getReturnAttrs(), getSignature(), llvm::InlineFunction(), legalizeCallAttributes(), makeStatepointExplicitImpl(), llvm::promoteCall(), and llvm::WholeProgramDevirtPass::run().
|
static |
Definition at line 909 of file Attributes.cpp.
References assert(), attrIdxToArrayIdx(), llvm::ArrayRef< T >::back(), llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::empty(), llvm::ArrayRef< T >::end(), getImpl(), llvm::none_of(), and llvm::ArrayRef< T >::size().
|
static |
Create an AttributeList from attribute sets for a function, its return value, and all of its arguments.
Definition at line 940 of file Attributes.cpp.
References llvm::ArrayRef< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::ArrayRef< T >::end(), getImpl(), llvm::AttributeSet::hasAttributes(), I, llvm::SmallVectorImpl< T >::insert(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorImpl< T >::reserve(), llvm::ArrayRef< T >::size(), and llvm::ArrayRef< T >::take_front().
|
static |
Return an AttributeList with the specified parameters in it.
Definition at line 1007 of file Attributes.cpp.
References llvm::ArrayRef< T >::empty(), llvm::AttributeSet::get(), getImpl(), I, List, llvm::max(), llvm::AttrBuilder::merge(), and llvm::ArrayRef< T >::size().
|
static |
Definition at line 991 of file Attributes.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, C, llvm::SmallVectorImpl< T >::emplace_back(), and llvm::Attribute::get().
|
static |
Definition at line 999 of file Attributes.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, C, llvm::SmallVectorImpl< T >::emplace_back(), and llvm::Attribute::get().
|
static |
Definition at line 981 of file Attributes.cpp.
References attrIdxToArrayIdx(), llvm::AttributeSet::get(), getImpl(), and llvm::AttrBuilder::hasAttributes().
Get the allocsize argument numbers (or pair(0, 0) if unknown).
Definition at line 1273 of file Attributes.cpp.
References getAllocSizeArgs(), and llvm::Intrinsic::getAttributes().
Referenced by getAllocSizeArgs(), and isFuncOrArgAttr().
Return the attributes at the index as a string.
Definition at line 1277 of file Attributes.cpp.
References getAsString(), and llvm::Intrinsic::getAttributes().
Referenced by getAsString(), maybePrintCallAddrSpace(), and maybePrintComdat().
| Attribute AttributeList::getAttribute | ( | unsigned | Index, |
| Attribute::AttrKind | Kind | ||
| ) | const |
Return the attribute object that exists at the given index.
Definition at line 1243 of file Attributes.cpp.
References getAttribute(), and llvm::Intrinsic::getAttributes().
Referenced by llvm::Function::getAttribute(), getAttribute(), llvm::CallBase::getAttribute(), getDeoptLowering(), llvm::HexagonTargetMachine::getSubtargetImpl(), getUnderlyingArgReg(), and llvm::parseStatepointDirectivesFromAttrs().
Return the attribute object that exists at the given index.
Definition at line 1248 of file Attributes.cpp.
References getAttribute(), and llvm::Intrinsic::getAttributes().
| AttributeSet AttributeList::getAttributes | ( | unsigned | Index | ) | const |
The attributes for the specified index are returned.
Definition at line 1281 of file Attributes.cpp.
References attrIdxToArrayIdx().
Referenced by llvm::AttrBuilder::AttrBuilder(), llvm::FunctionComparator::cmpMem(), doPromotion(), getAttrKindEncoding(), getMetadataTypeOrder(), getParameterABIAttributes(), getRetComponentType(), getSignature(), getSuccPad(), llvm::AttrBuilder::hasAttributes(), haveSameSpecialState(), LLVMGetAttributeCountAtIndex(), LLVMGetAttributesAtIndex(), llvm::NVPTXTargetLowering::LowerFormalArguments(), maybePrintCallAddrSpace(), and llvm::AttrBuilder::removeAttributes().
| LLVMContext & AttributeList::getContext | ( | ) | const |
Retrieve the LLVM context.
Definition at line 1188 of file Attributes.cpp.
Referenced by legalizeCallAttributes().
| uint64_t AttributeList::getDereferenceableBytes | ( | unsigned | Index | ) | const |
Get the number of dereferenceable bytes (or zero if unknown).
Definition at line 1264 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes(), and getDereferenceableBytes().
Referenced by llvm::Function::getDereferenceableBytes(), getDereferenceableBytes(), and llvm::CallBase::getDereferenceableBytes().
| uint64_t AttributeList::getDereferenceableOrNullBytes | ( | unsigned | Index | ) | const |
Get the number of dereferenceable_or_null bytes (or zero if unknown).
Definition at line 1268 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes(), and getDereferenceableOrNullBytes().
Referenced by llvm::Function::getDereferenceableOrNullBytes(), getDereferenceableOrNullBytes(), and llvm::CallBase::getDereferenceableOrNullBytes().
| AttributeSet AttributeList::getFnAttributes | ( | ) | const |
The function attributes are returned.
Definition at line 1198 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes().
Referenced by llvm::createDeadArgHackingPass(), doPromotion(), findInitTrampoline(), llvm::CodeExtractor::findInputsOutputs(), GetGlobalTypeString(), getRetComponentType(), getSignature(), llvm::InlineFunction(), isFuncOrArgAttr(), legalizeCallAttributes(), maybePrintCallAddrSpace(), maybePrintComdat(), llvm::promoteCall(), and llvm::WholeProgramDevirtPass::run().
| unsigned AttributeList::getNumAttrSets | ( | ) | const |
Definition at line 1300 of file Attributes.cpp.
Referenced by llvm::FunctionComparator::cmpMem(), GetGlobalTypeString(), isFuncOrArgAttr(), and llvm::WholeProgramDevirtPass::run().
Return the alignment for the specified function parameter.
Definition at line 1256 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes().
Referenced by getOpenCLAlignment(), llvm::Function::getParamAlignment(), llvm::CallBase::getParamAlignment(), and getParameterABIAttributes().
|
inline |
Return the attribute object that exists at the arg index.
Definition at line 587 of file Attributes.h.
Referenced by llvm::CallBase::getParamAttr().
Return the attribute object that exists at the given index.
Definition at line 592 of file Attributes.h.
| AttributeSet AttributeList::getParamAttributes | ( | unsigned | ArgNo | ) | const |
The attributes for the argument or parameter at the given index are returned.
Definition at line 1190 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes().
Referenced by llvm::createDeadArgHackingPass(), doPromotion(), findInitTrampoline(), GetGlobalTypeString(), getRetComponentType(), getSignature(), getSuccPad(), llvm::InlineFunction(), isFuncOrArgAttr(), maybePrintCallAddrSpace(), maybePrintComdat(), llvm::promoteCall(), and llvm::WholeProgramDevirtPass::run().
|
inline |
Get the number of dereferenceable bytes (or zero if unknown) of an arg.
Definition at line 610 of file Attributes.h.
References llvm::Attribute::getDereferenceableBytes(), and llvm::Attribute::getDereferenceableOrNullBytes().
Referenced by llvm::Function::getParamDereferenceableBytes().
|
inline |
Get the number of dereferenceable_or_null bytes (or zero if unknown) of an arg.
Definition at line 620 of file Attributes.h.
References llvm::Attribute::getAllocSizeArgs(), llvm::Attribute::getAsString(), and llvm::Attribute::getDereferenceableOrNullBytes().
Referenced by llvm::Function::getParamDereferenceableOrNullBytes().
|
inline |
Return a raw pointer that uniquely identifies this attribute list.
Definition at line 651 of file Attributes.h.
| unsigned AttributeList::getRetAlignment | ( | ) | const |
Return the alignment of the return value.
Definition at line 1252 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes().
Referenced by llvm::CallBase::getRetAlignment().
| AttributeSet AttributeList::getRetAttributes | ( | ) | const |
The attributes for the ret value are returned.
Definition at line 1194 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes().
Referenced by llvm::createDeadArgHackingPass(), doPromotion(), GetGlobalTypeString(), getRetComponentType(), getSignature(), llvm::InlineFunction(), isFuncOrArgAttr(), llvm::PPCInstrInfo::isSignOrZeroExtended(), makeStatepointExplicitImpl(), and llvm::WholeProgramDevirtPass::run().
Get the stack alignment.
Definition at line 1260 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes(), and getStackAlignment().
Referenced by llvm::Function::getFnStackAlignment(), and getStackAlignment().
| bool AttributeList::hasAttribute | ( | unsigned | Index, |
| Attribute::AttrKind | Kind | ||
| ) | const |
Return true if the attribute exists at the given index.
Definition at line 1202 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes(), and hasAttribute().
Referenced by llvm::analyzeArguments(), llvm::CallBase::CountBundleInputs(), FunctionNumber(), getDeoptLowering(), llvm::GetReturnInfo(), getSuccPad(), llvm::Function::hasAttribute(), hasAttribute(), INITIALIZE_PASS(), llvm::AArch64TargetLowering::isIntDivCheap(), llvm::X86TargetLowering::isIntDivCheap(), LowerADJUST_TRAMPOLINE(), llvm::StatepointBase< Function, Instruction, Value, CallSite >::paramHasAttr(), llvm::Function::returnDoesNotAlias(), llvm::CallBase::returnDoesNotAlias(), and llvm::CallLowering::setArgFlags().
Return true if the attribute exists at the given index.
Definition at line 1207 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes(), and hasAttribute().
Return true if attribute exists at the given index.
Definition at line 1211 of file Attributes.cpp.
References llvm::Intrinsic::getAttributes(), and hasAttributes().
Referenced by hasAttributes(), isFuncOrArgAttr(), maybePrintCallAddrSpace(), and maybePrintComdat().
| bool AttributeList::hasAttrSomewhere | ( | Attribute::AttrKind | Kind, |
| unsigned * | Index = nullptr |
||
| ) | const |
Return true if the specified attribute is set for at least one parameter or for the return value.
If Index is not nullptr, the index of a parameter with the specified attribute is provided.
Definition at line 1228 of file Attributes.cpp.
Referenced by llvm::XCoreFrameLowering::emitPrologue(), findInitTrampoline(), findUnwindDestinations(), llvm::AArch64RegisterInfo::getCalleeSavedRegs(), llvm::SystemZRegisterInfo::getCalleeSavedRegs(), llvm::ARMBaseRegisterInfo::getCalleeSavedRegs(), llvm::AArch64RegisterInfo::getCallPreservedMask(), llvm::SystemZRegisterInfo::getCallPreservedMask(), llvm::X86RegisterInfo::getCallPreservedMask(), llvm::ARMBaseRegisterInfo::getCallPreservedMask(), getRetComponentType(), llvm::CallBase::hasByValArgument(), hasChangeableCC(), OptimizeFunctions(), and StripNest().
| bool AttributeList::hasFnAttribute | ( | Attribute::AttrKind | Kind | ) | const |
Equivalent to hasAttribute(AttributeList::FunctionIndex, Kind) but may be faster.
Definition at line 1215 of file Attributes.cpp.
Referenced by llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::Function::hasFnAttribute(), isFuncOrArgAttr(), and useFuncSeen().
Equivalent to hasAttribute(AttributeList::FunctionIndex, Kind) but may be faster.
Definition at line 1219 of file Attributes.cpp.
References FunctionIndex.
|
inline |
Return true if the attribute exists for the given argument.
Definition at line 549 of file Attributes.h.
References llvm::Attribute::hasAttribute().
Return true if the attribute exists for the given argument.
Definition at line 554 of file Attributes.h.
References llvm::Attribute::hasAttribute().
| bool AttributeList::hasParamAttribute | ( | unsigned | ArgNo, |
| Attribute::AttrKind | Kind | ||
| ) | const |
Equivalent to hasAttribute(ArgNo + FirstArgIndex, Kind).
Definition at line 1223 of file Attributes.cpp.
Referenced by findInitTrampoline(), getOpenCLAlignment(), getParameterABIAttributes(), getRetComponentType(), getSuccPad(), llvm::Argument::hasByValOrInAllocaAttr(), llvm::Function::hasParamAttribute(), llvm::Function::hasStructRetAttr(), isArgPassedInSGPR(), llvm::AMDGPU::isArgPassedInSGPR(), llvm::NVPTXTargetLowering::LowerFormalArguments(), and llvm::Argument::onlyReadsMemory().
Return true if attributes exists for the given argument.
Definition at line 559 of file Attributes.h.
|
inline |
Use these to iterate over the valid attribute indices.
Definition at line 643 of file Attributes.h.
References FunctionIndex.
Referenced by llvm::FunctionComparator::cmpMem(), getAttrKindEncoding(), and getMetadataTypeOrder().
|
inline |
Definition at line 644 of file Attributes.h.
Referenced by llvm::FunctionComparator::cmpMem(), getAttrKindEncoding(), and getMetadataTypeOrder().
|
inline |
Return true if there are no attributes.
Definition at line 656 of file Attributes.h.
References llvm::dump().
Referenced by llvm::createDeadArgHackingPass(), findInitTrampoline(), llvm::ValueEnumerator::getAttributeListID(), getMetadataTypeOrder(), llvm::InlineFunction(), isFuncOrArgAttr(), legalizeCallAttributes(), and LowerADJUST_TRAMPOLINE().
|
inline |
Definition at line 648 of file Attributes.h.
|
inline |
operator==/!= - Provide equality predicates.
Definition at line 647 of file Attributes.h.
| AttributeList AttributeList::removeAttribute | ( | LLVMContext & | C, |
| unsigned | Index, | ||
| Attribute::AttrKind | Kind | ||
| ) | const |
Remove the specified attribute at the specified index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line 1105 of file Attributes.cpp.
References assert(), attrIdxToArrayIdx(), llvm::AttributeListImpl::begin(), llvm::AttributeListImpl::end(), getImpl(), and llvm::SmallVectorBase::size().
Referenced by emitUnaryFloatFnCallHelper(), llvm::Function::removeAttribute(), llvm::CallBase::removeAttribute(), and StripNest().
| AttributeList AttributeList::removeAttribute | ( | LLVMContext & | C, |
| unsigned | Index, | ||
| StringRef | Kind | ||
| ) | const |
Remove the specified attribute at the specified index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line 1118 of file Attributes.cpp.
References assert(), attrIdxToArrayIdx(), llvm::AttributeListImpl::begin(), llvm::AttributeListImpl::end(), getImpl(), and llvm::SmallVectorBase::size().
| AttributeList AttributeList::removeAttributes | ( | LLVMContext & | C, |
| unsigned | Index, | ||
| const AttrBuilder & | AttrsToRemove | ||
| ) | const |
Remove the specified attributes at the specified index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line 1132 of file Attributes.cpp.
References attrIdxToArrayIdx(), llvm::AttributeListImpl::begin(), llvm::AttributeListImpl::end(), getImpl(), llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorBase::size().
Referenced by INITIALIZE_PASS(), and llvm::Function::removeAttributes().
| AttributeList AttributeList::removeAttributes | ( | LLVMContext & | C, |
| unsigned | Index | ||
| ) | const |
Remove all attributes at the specified index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line 1147 of file Attributes.cpp.
References attrIdxToArrayIdx(), llvm::AttributeListImpl::begin(), llvm::AttributeListImpl::end(), and getImpl().
|
inline |
Remove the specified attribute at the specified arg index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line 452 of file Attributes.h.
Referenced by llvm::Function::removeParamAttr(), and llvm::CallBase::removeParamAttr().
|
inline |
Remove the specified attribute at the specified arg index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line 459 of file Attributes.h.
|
inline |
Remove the specified attribute at the specified arg index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line 467 of file Attributes.h.
Referenced by llvm::Function::removeParamAttrs().
|
inline |
Remove all attributes at the specified arg index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line 474 of file Attributes.h.
References LLVM_NODISCARD.
|
friend |
Definition at line 336 of file Attributes.h.
|
friend |
Definition at line 337 of file Attributes.h.
|
friend |
Definition at line 338 of file Attributes.h.
|
friend |
Definition at line 339 of file Attributes.h.
|
friend |
Definition at line 340 of file Attributes.h.
1.8.13