LLVM 20.0.0git |
#include "llvm/IR/Attributes.h"
Classes | |
struct | index_iterator |
Public Types | |
enum | AttrIndex : unsigned {ReturnIndex = 0U,FunctionIndex = ~0U,FirstArgIndex = 1 } |
using | iterator =constAttributeSet * |
Public Member Functions | |
AttributeList ()=default | |
AttributeList | addAttributeAtIndex (LLVMContext &C,unsignedIndex,Attribute::AttrKind Kind)const |
Add an attribute to the attribute set at the given index. | |
AttributeList | addAttributeAtIndex (LLVMContext &C,unsignedIndex,StringRef Kind,StringRefValue=StringRef())const |
Add an attribute to the attribute set at the given index. | |
AttributeList | addAttributeAtIndex (LLVMContext &C,unsignedIndex,AttributeA)const |
Add an attribute to the attribute set at the given index. | |
AttributeList | addAttributesAtIndex (LLVMContext &C,unsignedIndex,constAttrBuilder &B)const |
Add attributes to the attribute set at the given index. | |
AttributeList | addFnAttribute (LLVMContext &C,Attribute::AttrKind Kind)const |
Add a function attribute to the list. | |
AttributeList | addFnAttribute (LLVMContext &C,Attribute Attr)const |
Add a function attribute to the list. | |
AttributeList | addFnAttribute (LLVMContext &C,StringRef Kind,StringRefValue=StringRef())const |
Add a function attribute to the list. | |
AttributeList | addFnAttributes (LLVMContext &C,constAttrBuilder &B)const |
Add function attribute to the list. | |
AttributeList | addRetAttribute (LLVMContext &C,Attribute::AttrKind Kind)const |
Add a return value attribute to the list. | |
AttributeList | addRetAttribute (LLVMContext &C,Attribute Attr)const |
Add a return value attribute to the list. | |
AttributeList | addRetAttributes (LLVMContext &C,constAttrBuilder &B)const |
Add a return value attribute to the list. | |
AttributeList | addParamAttribute (LLVMContext &C,unsigned ArgNo,Attribute::AttrKind Kind)const |
Add an argument attribute to the list. | |
AttributeList | addParamAttribute (LLVMContext &C,unsigned ArgNo,StringRef Kind,StringRefValue=StringRef())const |
Add an argument attribute to the list. | |
AttributeList | addParamAttribute (LLVMContext &C,ArrayRef<unsigned > ArgNos,AttributeA)const |
Add an attribute to the attribute list at the given arg indices. | |
AttributeList | addParamAttributes (LLVMContext &C,unsigned ArgNo,constAttrBuilder &B)const |
Add an argument attribute to the list. | |
AttributeList | removeAttributeAtIndex (LLVMContext &C,unsignedIndex,Attribute::AttrKind Kind)const |
Remove the specified attribute at the specified index from this attribute list. | |
AttributeList | removeAttributeAtIndex (LLVMContext &C,unsignedIndex,StringRef Kind)const |
Remove the specified attribute at the specified index from this attribute list. | |
AttributeList | removeAttribute (LLVMContext &C,unsignedIndex,StringRef Kind)const |
AttributeList | removeAttributesAtIndex (LLVMContext &C,unsignedIndex,constAttributeMask &AttrsToRemove)const |
Remove the specified attributes at the specified index from this attribute list. | |
AttributeList | removeAttributesAtIndex (LLVMContext &C,unsignedIndex)const |
Remove all attributes at the specified index from this attribute list. | |
AttributeList | removeFnAttribute (LLVMContext &C,Attribute::AttrKind Kind)const |
Remove the specified attribute at the function index from this attribute list. | |
AttributeList | removeFnAttribute (LLVMContext &C,StringRef Kind)const |
Remove the specified attribute at the function index from this attribute list. | |
AttributeList | removeFnAttributes (LLVMContext &C,constAttributeMask &AttrsToRemove)const |
Remove the specified attribute at the function index from this attribute list. | |
AttributeList | removeFnAttributes (LLVMContext &C)const |
Remove the attributes at the function index from this attribute list. | |
AttributeList | removeRetAttribute (LLVMContext &C,Attribute::AttrKind Kind)const |
Remove the specified attribute at the return value index from this attribute list. | |
AttributeList | removeRetAttribute (LLVMContext &C,StringRef Kind)const |
Remove the specified attribute at the return value index from this attribute list. | |
AttributeList | removeRetAttributes (LLVMContext &C,constAttributeMask &AttrsToRemove)const |
Remove the specified attribute at the return value index from this attribute list. | |
AttributeList | removeParamAttribute (LLVMContext &C,unsigned ArgNo,Attribute::AttrKind Kind)const |
Remove the specified attribute at the specified arg index from this attribute list. | |
AttributeList | removeParamAttribute (LLVMContext &C,unsigned ArgNo,StringRef Kind)const |
Remove the specified attribute at the specified arg index from this attribute list. | |
AttributeList | removeParamAttributes (LLVMContext &C,unsigned ArgNo,constAttributeMask &AttrsToRemove)const |
Remove the specified attribute at the specified arg index from this attribute list. | |
AttributeList | removeParamAttributes (LLVMContext &C,unsigned ArgNo)const |
Remove all attributes at the specified arg index from this attribute list. | |
AttributeList | replaceAttributeTypeAtIndex (LLVMContext &C,unsigned ArgNo,Attribute::AttrKind Kind,Type *ReplacementTy)const |
Replace the type contained by attributeAttrKind at indexArgNo wihReplacementTy , preserving all other attributes. | |
AttributeList | addDereferenceableRetAttr (LLVMContext &C,uint64_t Bytes)const |
Add the dereferenceable attribute to the attribute set at the given index. | |
AttributeList | addDereferenceableParamAttr (LLVMContext &C,unsigned ArgNo,uint64_t Bytes)const |
Add the dereferenceable attribute to the attribute set at the given arg index. | |
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. | |
AttributeList | addRangeRetAttr (LLVMContext &C,constConstantRange &CR)const |
Add the range attribute to the attribute set at the return value index. | |
AttributeList | addAllocSizeParamAttr (LLVMContext &C,unsigned ArgNo,unsigned ElemSizeArg,const std::optional<unsigned > &NumElemsArg)const |
Add the allocsize attribute to the attribute set at the given arg index. | |
std::optional<AttributeList > | intersectWith (LLVMContext &C,AttributeListOther)const |
Try to intersect thisAttributeList with Other. | |
AttributeSet | getAttributes (unsignedIndex)const |
The attributes for the specified index are returned. | |
AttributeSet | getParamAttrs (unsigned ArgNo)const |
The attributes for the argument or parameter at the given index are returned. | |
AttributeSet | getRetAttrs ()const |
The attributes for the ret value are returned. | |
AttributeSet | getFnAttrs ()const |
The function attributes are returned. | |
bool | hasAttributeAtIndex (unsignedIndex,Attribute::AttrKind Kind)const |
Return true if the attribute exists at the given index. | |
bool | hasAttributeAtIndex (unsignedIndex,StringRef Kind)const |
Return true if the attribute exists at the given index. | |
bool | hasAttributesAtIndex (unsignedIndex)const |
Return true if attribute exists at the given index. | |
bool | hasParamAttr (unsigned ArgNo,Attribute::AttrKind Kind)const |
Return true if the attribute exists for the given argument. | |
bool | hasParamAttr (unsigned ArgNo,StringRef Kind)const |
Return true if the attribute exists for the given argument. | |
bool | hasParamAttrs (unsigned ArgNo)const |
Return true if attributes exists for the given argument. | |
bool | hasRetAttr (Attribute::AttrKind Kind)const |
Return true if the attribute exists for the return value. | |
bool | hasRetAttr (StringRef Kind)const |
Return true if the attribute exists for the return value. | |
bool | hasRetAttrs ()const |
Return true if attributes exist for the return value. | |
bool | hasFnAttr (Attribute::AttrKind Kind)const |
Return true if the attribute exists for the function. | |
bool | hasFnAttr (StringRef Kind)const |
Return true if the attribute exists for the function. | |
bool | hasFnAttrs ()const |
Return true the attributes exist for the function. | |
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. | |
Attribute | getAttributeAtIndex (unsignedIndex,Attribute::AttrKind Kind)const |
Return the attribute object that exists at the given index. | |
Attribute | getAttributeAtIndex (unsignedIndex,StringRef Kind)const |
Return the attribute object that exists at the given index. | |
Attribute | getParamAttr (unsigned ArgNo,Attribute::AttrKind Kind)const |
Return the attribute object that exists at the arg index. | |
Attribute | getParamAttr (unsigned ArgNo,StringRef Kind)const |
Return the attribute object that exists at the given index. | |
Attribute | getFnAttr (Attribute::AttrKind Kind)const |
Return the attribute object that exists for the function. | |
Attribute | getFnAttr (StringRef Kind)const |
Return the attribute object that exists for the function. | |
Attribute | getRetAttr (Attribute::AttrKind Kind)const |
Return the attribute for the given attribute kind for the return value. | |
MaybeAlign | getRetAlignment ()const |
Return the alignment of the return value. | |
MaybeAlign | getParamAlignment (unsigned ArgNo)const |
Return the alignment for the specified function parameter. | |
MaybeAlign | getParamStackAlignment (unsigned ArgNo)const |
Return the stack alignment for the specified function parameter. | |
Type * | getParamByValType (unsigned ArgNo)const |
Return the byval type for the specified function parameter. | |
Type * | getParamStructRetType (unsigned ArgNo)const |
Return the sret type for the specified function parameter. | |
Type * | getParamByRefType (unsigned ArgNo)const |
Return the byref type for the specified function parameter. | |
Type * | getParamPreallocatedType (unsigned ArgNo)const |
Return the preallocated type for the specified function parameter. | |
Type * | getParamInAllocaType (unsigned ArgNo)const |
Return the inalloca type for the specified function parameter. | |
Type * | getParamElementType (unsigned ArgNo)const |
Return the elementtype type for the specified function parameter. | |
MaybeAlign | getFnStackAlignment ()const |
Get the stack alignment of the function. | |
MaybeAlign | getRetStackAlignment ()const |
Get the stack alignment of the return value. | |
uint64_t | getRetDereferenceableBytes ()const |
Get the number of dereferenceable bytes (or zero if unknown) of the return value. | |
uint64_t | getParamDereferenceableBytes (unsignedIndex)const |
Get the number of dereferenceable bytes (or zero if unknown) of an arg. | |
uint64_t | getRetDereferenceableOrNullBytes ()const |
Get the number of dereferenceable_or_null bytes (or zero if unknown) of the return value. | |
uint64_t | getParamDereferenceableOrNullBytes (unsigned ArgNo)const |
Get the number of dereferenceable_or_null bytes (or zero if unknown) of an arg. | |
std::optional<ConstantRange > | getParamRange (unsigned ArgNo)const |
Get range (or std::nullopt if unknown) of an arg. | |
FPClassTest | getRetNoFPClass ()const |
Get the disallowed floating-point classes of the return value. | |
FPClassTest | getParamNoFPClass (unsigned ArgNo)const |
Get the disallowed floating-point classes of the argument value. | |
UWTableKind | getUWTableKind ()const |
Get the unwind table kind requested for the function. | |
AllocFnKind | getAllocKind ()const |
MemoryEffects | getMemoryEffects ()const |
Returns memory effects of the function. | |
std::string | getAsString (unsignedIndex,bool InAttrGrp=false)const |
Return the attributes at the index as a string. | |
bool | hasParentContext (LLVMContext &C)const |
Return true if this attribute list belongs to theLLVMContext. | |
iterator | begin ()const |
iterator | end ()const |
unsigned | getNumAttrSets ()const |
index_iterator | indexes ()const |
Use this to iterate over the valid attribute indexes. | |
bool | operator== (constAttributeList &RHS)const |
operator==/!= - Provide equality predicates. | |
bool | operator!= (constAttributeList &RHS)const |
void * | getRawPointer ()const |
Return a raw pointer that uniquely identifies this attribute list. | |
bool | isEmpty ()const |
Return true if there are no attributes. | |
void | print (raw_ostream &O)const |
void | dump ()const |
Friends | |
class | AttrBuilder |
class | AttributeListImpl |
class | AttributeSet |
class | AttributeSetNode |
template<typename Ty , typenameEnable > | |
struct | DenseMapInfo |
Definition at line490 of fileAttributes.h.
Definition at line981 of fileAttributes.h.
Enumerator | |
---|---|
ReturnIndex | |
FunctionIndex | |
FirstArgIndex |
Definition at line492 of fileAttributes.h.
| default |
AttributeList AttributeList::addAllocSizeParamAttr | ( | LLVMContext & | C, |
unsigned | ArgNo, | ||
unsigned | ElemSizeArg, | ||
const std::optional<unsigned > & | NumElemsArg | ||
) | const |
Add the allocsize attribute to the attribute set at the given arg index.
Returns a new list because attribute lists are immutable.
Definition at line1816 of fileAttributes.cpp.
ReferencesaddParamAttributes(),B, andllvm::CallingConv::C.
AttributeList AttributeList::addAttributeAtIndex | ( | 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 line1688 of fileAttributes.cpp.
ReferencesA,addAttributesAtIndex(),B, andllvm::CallingConv::C.
AttributeList AttributeList::addAttributeAtIndex | ( | 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 line1669 of fileAttributes.cpp.
Referencesllvm::CallingConv::C,llvm::AttributeSet::get(),llvm::Attribute::get(),getAttributes(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced byllvm::CallBase::addAttributeAtIndex(),addFnAttribute(),addParamAttribute(), andaddRetAttribute().
AttributeList AttributeList::addAttributeAtIndex | ( | 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 line1680 of fileAttributes.cpp.
ReferencesaddAttributesAtIndex(),B, andllvm::CallingConv::C.
AttributeList AttributeList::addAttributesAtIndex | ( | LLVMContext & | C, |
unsigned | Index, | ||
constAttrBuilder & | B | ||
) | const |
Add attributes to the attribute set at the given index.
Returns a new list because attribute lists are immutable.
Definition at line1712 of fileAttributes.cpp.
ReferencesB,llvm::CallingConv::C,get(),llvm::AttributeSet::get(), andgetAttributes().
Referenced byaddAttributeAtIndex(),addFnAttributes(),addParamAttributes(), andaddRetAttributes().
AttributeList 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.
Returns a new list because attribute lists are immutable.
Definition at line1802 of fileAttributes.cpp.
ReferencesaddParamAttributes(),B, andllvm::CallingConv::C.
AttributeList AttributeList::addDereferenceableParamAttr | ( | LLVMContext & | C, |
unsigned | ArgNo, | ||
uint64_t | Bytes | ||
) | const |
Add the dereferenceable attribute to the attribute set at the given arg index.
Returns a new list because attribute lists are immutable.
Definition at line1793 of fileAttributes.cpp.
ReferencesaddParamAttributes(),B, andllvm::CallingConv::C.
Referenced byllvm::CallBase::addDereferenceableParamAttr().
AttributeList AttributeList::addDereferenceableRetAttr | ( | LLVMContext & | C, |
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 line1786 of fileAttributes.cpp.
ReferencesaddRetAttributes(),B, andllvm::CallingConv::C.
Referenced byllvm::CallBase::addDereferenceableRetAttr().
| inline |
Add a function attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line584 of fileAttributes.h.
ReferencesaddAttributeAtIndex(),llvm::CallingConv::C, andFunctionIndex.
| inline |
Add a function attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line577 of fileAttributes.h.
ReferencesaddAttributeAtIndex(),llvm::CallingConv::C, andFunctionIndex.
Referenced byllvm::CallBase::addFnAttr(),emitTPIDR2Save(), andllvm::AMDGPULibFunc::getOrInsertFunction().
| inline |
Add a function attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line592 of fileAttributes.h.
ReferencesaddAttributeAtIndex(),llvm::CallingConv::C, andFunctionIndex.
| inline |
Add function attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line599 of fileAttributes.h.
ReferencesaddAttributesAtIndex(),B,llvm::CallingConv::C, andFunctionIndex.
Referenced byllvm::OpenMPIRBuilder::createReductionsGPU(), andlegalizeCallAttributes().
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 line1726 of fileAttributes.cpp.
ReferencesA,assert(),attrIdxToArrayIdx(),B,llvm::ArrayRef< T >::back(),begin(),llvm::CallingConv::C,end(),FirstArgIndex,llvm::AttributeSet::get(),llvm::is_sorted(),llvm::SmallVectorImpl< T >::resize(), andllvm::SmallVectorBase< Size_T >::size().
| inline |
Add an argument attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line628 of fileAttributes.h.
ReferencesaddAttributeAtIndex(),llvm::CallingConv::C, andFirstArgIndex.
Referenced byllvm::CallBase::addParamAttr(), andprocessCallSite().
| inline |
Add an argument attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line636 of fileAttributes.h.
ReferencesaddAttributeAtIndex(),llvm::CallingConv::C, andFirstArgIndex.
| inline |
Add an argument attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line649 of fileAttributes.h.
ReferencesaddAttributesAtIndex(),B,llvm::CallingConv::C, andFirstArgIndex.
Referenced byaddAllocSizeParamAttr(),addDereferenceableOrNullParamAttr(),addDereferenceableParamAttr(), andlegalizeCallAttributes().
AttributeList AttributeList::addRangeRetAttr | ( | LLVMContext & | C, |
constConstantRange & | CR | ||
) | const |
Add the range attribute to the attribute set at the return value index.
Returns a new list because attribute lists are immutable.
Definition at line1809 of fileAttributes.cpp.
ReferencesaddRetAttributes(),B, andllvm::CallingConv::C.
Referenced byllvm::CallBase::addRangeRetAttr().
| inline |
Add a return value attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line613 of fileAttributes.h.
ReferencesaddAttributeAtIndex(),llvm::CallingConv::C, andReturnIndex.
| inline |
Add a return value attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line606 of fileAttributes.h.
ReferencesaddAttributeAtIndex(),llvm::CallingConv::C, andReturnIndex.
Referenced byllvm::CallBase::addRetAttr().
| inline |
Add a return value attribute to the list.
Returns a new list because attribute lists are immutable.
Definition at line620 of fileAttributes.h.
ReferencesaddAttributesAtIndex(),B,llvm::CallingConv::C, andReturnIndex.
Referenced byaddDereferenceableRetAttr(),addRangeRetAttr(), andAddReturnAttributes().
AttributeList::iterator AttributeList::begin | ( | ) | const |
Definition at line2008 of fileAttributes.cpp.
Referenced byaddParamAttribute().
LLVM_DUMP_METHOD void AttributeList::dump | ( | ) | const |
Definition at line2048 of fileAttributes.cpp.
Referencesllvm::dbgs(), andprint().
AttributeList::iterator AttributeList::end | ( | ) | const |
Definition at line2012 of fileAttributes.cpp.
Referenced byaddParamAttribute().
| static |
Return anAttributeList with the specified parameters in it.
Definition at line1642 of fileAttributes.cpp.
ReferencesAttrBuilder,llvm::CallingConv::C,llvm::AttributeSet::get(),I,llvm::List, andllvm::AttrBuilder::merge().
| static |
Create anAttributeList with the specified parameters in it.
Definition at line1499 of fileAttributes.cpp.
Referencesllvm::all_of(),assert(),llvm::CallingConv::C,llvm::SmallVectorImpl< T >::emplace_back(),get(),llvm::AttributeSet::get(),I,llvm::is_sorted(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced byaddAttributesAtIndex(),callBufferedPrintfStart(),llvm::CloneFunctionAttributesInto(),doPromotion(),llvm::AtomicInfo::EmitAtomicLibcall(),llvm::emitMemCpyChk(),get(),llvm::GlobalVariable::getAttributesAsList(),getReturnAttrs(),llvm::InlineFunction(),InsertCall(),intersectWith(),makeStatepointExplicitImpl(),mergeAttributesAndFlags(),moveFunctionAdaptingType(),llvm::promoteCall(), andllvm::UpgradeIntrinsicCall().
| static |
Definition at line1532 of fileAttributes.cpp.
Referencesassert(),attrIdxToArrayIdx(),llvm::CallingConv::C,FunctionIndex,llvm::is_sorted(), andllvm::none_of().
| static |
Create anAttributeList from attribute sets for a function, its return value, and all of its arguments.
Definition at line1559 of fileAttributes.cpp.
Referencesllvm::append_range(),llvm::CallingConv::C,llvm::AttributeSet::hasAttributes(),I,llvm::SmallVectorTemplateBase< T, bool >::push_back(),llvm::SmallVectorImpl< T >::reserve(),llvm::ArrayRef< T >::size(), andllvm::ArrayRef< T >::take_front().
| static |
Definition at line1615 of fileAttributes.cpp.
Referencesllvm::CallingConv::C,get(), andllvm::Attribute::get().
| static |
Definition at line1623 of fileAttributes.cpp.
Referencesassert(),llvm::ArrayRef< T >::begin(),llvm::CallingConv::C,get(),llvm::Attribute::get(), andllvm::ArrayRef< T >::size().
| static |
Definition at line1634 of fileAttributes.cpp.
Referencesllvm::CallingConv::C,get(), andllvm::Attribute::get().
| static |
Definition at line1600 of fileAttributes.cpp.
ReferencesattrIdxToArrayIdx(), andllvm::CallingConv::C.
| static |
Definition at line1610 of fileAttributes.cpp.
ReferencesB,llvm::CallingConv::C,get(), andllvm::AttributeSet::get().
AllocFnKind AttributeList::getAllocKind | ( | ) | const |
Definition at line1981 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getAllocKind(), andgetFnAttrs().
Return the attributes at the index as a string.
Definition at line1989 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getAsString(), andgetAttributes().
Referenced byprint().
Attribute AttributeList::getAttributeAtIndex | ( | unsigned | Index, |
Attribute::AttrKind | Kind | ||
) | const |
Return the attribute object that exists at the given index.
Definition at line1890 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getAttribute(), andgetAttributes().
Referenced byllvm::CallBase::getAttributeAtIndex(),getFnAttr(),getParamAttr(),getRetAttr(), andreplaceAttributeTypeAtIndex().
Return the attribute object that exists at the given index.
Definition at line1895 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getAttribute(), andgetAttributes().
AttributeSet AttributeList::getAttributes | ( | unsigned | Index | ) | const |
The attributes for the specified index are returned.
Definition at line1993 of fileAttributes.cpp.
ReferencesattrIdxToArrayIdx(), andgetNumAttrSets().
Referenced byaddAttributeAtIndex(),addAttributesAtIndex(),getAsString(),getAttributeAtIndex(),llvm::IRPosition::getAttrList(),getFnAttrs(),getParamAlignment(),getParamAttrs(),getParamByRefType(),getParamByValType(),getParamElementType(),getParamInAllocaType(),getParamPreallocatedType(),getParamStackAlignment(),getParamStructRetType(),getRetAlignment(),getRetAttrs(),hasAttributeAtIndex(),hasAttributesAtIndex(),intersectWith(),llvm::CombinerHelper::matchSDivByConst(),llvm::CombinerHelper::matchUDivByConst(),print(),removeAttributeAtIndex(), andremoveAttributesAtIndex().
| inline |
Return the attribute object that exists for the function.
Definition at line892 of fileAttributes.h.
ReferencesFunctionIndex, andgetAttributeAtIndex().
Referenced bygetDeoptLowering(),llvm::CallBase::getFnAttr(),llvm::HexagonTargetMachine::getSubtargetImpl(), andllvm::parseStatepointDirectivesFromAttrs().
Return the attribute object that exists for the function.
Definition at line897 of fileAttributes.h.
ReferencesFunctionIndex, andgetAttributeAtIndex().
AttributeSet AttributeList::getFnAttrs | ( | ) | const |
The function attributes are returned.
Definition at line1860 of fileAttributes.cpp.
ReferencesFunctionIndex, andgetAttributes().
Referenced byllvm::CloneFunctionAttributesInto(),llvm::OpenMPIRBuilder::createReductionsGPU(),doPromotion(),fillOverallFunction(),getAllocKind(),getFnStackAlignment(),getMemoryEffects(),getUWTableKind(),legalizeCallAttributes(),moveFunctionAdaptingType(),llvm::promoteCall(), andllvm::UpgradeIntrinsicCall().
MaybeAlign AttributeList::getFnStackAlignment | ( | ) | const |
Get the stack alignment of the function.
Definition at line1936 of fileAttributes.cpp.
ReferencesgetFnAttrs(), andllvm::AttributeSet::getStackAlignment().
Referenced byllvm::Function::getFnStackAlign().
MemoryEffects AttributeList::getMemoryEffects | ( | ) | const |
Returns memory effects of the function.
Definition at line1985 of fileAttributes.cpp.
ReferencesgetFnAttrs(), andllvm::AttributeSet::getMemoryEffects().
Referenced byllvm::CallBase::getMemoryEffects(), andllvm::SITargetLowering::getTgtMemIntrinsic().
unsigned AttributeList::getNumAttrSets | ( | ) | const |
Definition at line2020 of fileAttributes.cpp.
Referenced bygetAttributes(),indexes(),intersectWith(), andremoveAttributesAtIndex().
MaybeAlign AttributeList::getParamAlignment | ( | unsigned | ArgNo | ) | const |
Return the alignment for the specified function parameter.
Definition at line1904 of fileAttributes.cpp.
ReferencesFirstArgIndex,llvm::AttributeSet::getAlignment(), andgetAttributes().
Referenced byllvm::Function::getParamAlign(), andllvm::CallBase::getParamAlign().
| inline |
Return the attribute object that exists at the arg index.
Definition at line882 of fileAttributes.h.
ReferencesFirstArgIndex, andgetAttributeAtIndex().
Referenced byllvm::CallBase::getParamAttr().
Return the attribute object that exists at the given index.
Definition at line887 of fileAttributes.h.
ReferencesFirstArgIndex, andgetAttributeAtIndex().
AttributeSet AttributeList::getParamAttrs | ( | unsigned | ArgNo | ) | const |
The attributes for the argument or parameter at the given index are returned.
Definition at line1852 of fileAttributes.cpp.
ReferencesFirstArgIndex, andgetAttributes().
Referenced byllvm::CloneFunctionAttributesInto(),doPromotion(),llvm::CallBase::getParamAttributes(),getParamDereferenceableBytes(),getParamDereferenceableOrNullBytes(),getParamNoFPClass(),getParamRange(),llvm::Attributor::identifyDefaultAbstractAttributes(),llvm::InlineFunction(),legalizeCallAttributes(),moveFunctionAdaptingType(),optimizeCallInst(), andllvm::promoteCall().
Return the byref type for the specified function parameter.
Definition at line1920 of fileAttributes.cpp.
ReferencesFirstArgIndex,getAttributes(), andllvm::AttributeSet::getByRefType().
Referenced byllvm::Function::getParamByRefType(), andllvm::CallBase::getParamByRefType().
Return the byval type for the specified function parameter.
Definition at line1912 of fileAttributes.cpp.
ReferencesFirstArgIndex,getAttributes(), andllvm::AttributeSet::getByValType().
Referenced byllvm::Function::getParamByValType(), andllvm::CallBase::getParamByValType().
Get the number of dereferenceable bytes (or zero if unknown) of an arg.
Definition at line1948 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getDereferenceableBytes(), andgetParamAttrs().
Referenced byllvm::Function::getParamDereferenceableBytes(), andllvm::CallBase::getParamDereferenceableBytes().
Get the number of dereferenceable_or_null bytes (or zero if unknown) of an arg.
Definition at line1957 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getDereferenceableOrNullBytes(), andgetParamAttrs().
Referenced byllvm::Function::getParamDereferenceableOrNullBytes(), andllvm::CallBase::getParamDereferenceableOrNullBytes().
Return the elementtype type for the specified function parameter.
Definition at line1932 of fileAttributes.cpp.
ReferencesFirstArgIndex,getAttributes(), andllvm::AttributeSet::getElementType().
Referenced byllvm::CallBase::getParamElementType().
Return the inalloca type for the specified function parameter.
Definition at line1928 of fileAttributes.cpp.
ReferencesFirstArgIndex,getAttributes(), andllvm::AttributeSet::getInAllocaType().
Referenced byllvm::Function::getParamInAllocaType(), andllvm::CallBase::getParamInAllocaType().
FPClassTest AttributeList::getParamNoFPClass | ( | unsigned | ArgNo | ) | const |
Get the disallowed floating-point classes of the argument value.
Definition at line1973 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getNoFPClass(), andgetParamAttrs().
Referenced byllvm::Function::getParamNoFPClass(), andllvm::CallBase::getParamNoFPClass().
Return the preallocated type for the specified function parameter.
Definition at line1924 of fileAttributes.cpp.
ReferencesFirstArgIndex,getAttributes(), andllvm::AttributeSet::getPreallocatedType().
Referenced byllvm::Function::getParamPreallocatedType(), andllvm::CallBase::getParamPreallocatedType().
std::optional<ConstantRange > AttributeList::getParamRange | ( | unsigned | ArgNo | ) | const |
Get range (or std::nullopt if unknown) of an arg.
Definition at line1962 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getAttribute(),getParamAttrs(), andllvm::Attribute::getRange().
MaybeAlign AttributeList::getParamStackAlignment | ( | unsigned | ArgNo | ) | const |
Return the stack alignment for the specified function parameter.
Definition at line1908 of fileAttributes.cpp.
ReferencesFirstArgIndex,getAttributes(), andllvm::AttributeSet::getStackAlignment().
Referenced byllvm::Function::getParamStackAlign(), andllvm::CallBase::getParamStackAlign().
Return the sret type for the specified function parameter.
Definition at line1916 of fileAttributes.cpp.
ReferencesFirstArgIndex,getAttributes(), andllvm::AttributeSet::getStructRetType().
Referenced byllvm::Function::getParamStructRetType(), andllvm::CallBase::getParamStructRetType().
| inline |
Return a raw pointer that uniquely identifies this attribute list.
Definition at line1020 of fileAttributes.h.
MaybeAlign AttributeList::getRetAlignment | ( | ) | const |
Return the alignment of the return value.
Definition at line1900 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getAlignment(),getAttributes(), andReturnIndex.
Referenced byllvm::CallBase::getRetAlign().
| inline |
Return the attribute for the given attribute kind for the return value.
Definition at line902 of fileAttributes.h.
ReferencesgetAttributeAtIndex(), andReturnIndex.
Referenced byllvm::CallBase::getRetAttr().
AttributeSet AttributeList::getRetAttrs | ( | ) | const |
The attributes for the ret value are returned.
Definition at line1856 of fileAttributes.cpp.
ReferencesgetAttributes(), andReturnIndex.
Referenced byllvm::CloneFunctionAttributesInto(),doPromotion(),llvm::CallBase::getRetAttributes(),getRetDereferenceableBytes(),getRetDereferenceableOrNullBytes(),getRetNoFPClass(),getRetStackAlignment(),isLibCallInTailPosition(),llvm::PPCInstrInfo::isSignOrZeroExtended(),moveFunctionAdaptingType(),llvm::promoteCall(), andllvm::UpgradeIntrinsicCall().
uint64_t AttributeList::getRetDereferenceableBytes | ( | ) | const |
Get the number of dereferenceable bytes (or zero if unknown) of the return value.
Definition at line1944 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getDereferenceableBytes(), andgetRetAttrs().
Referenced byllvm::CallBase::getRetDereferenceableBytes().
uint64_t AttributeList::getRetDereferenceableOrNullBytes | ( | ) | const |
Get the number of dereferenceable_or_null bytes (or zero if unknown) of the return value.
Definition at line1952 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getDereferenceableOrNullBytes(), andgetRetAttrs().
Referenced byllvm::CallBase::getRetDereferenceableOrNullBytes().
FPClassTest AttributeList::getRetNoFPClass | ( | ) | const |
Get the disallowed floating-point classes of the return value.
Definition at line1969 of fileAttributes.cpp.
Referencesllvm::AttributeSet::getNoFPClass(), andgetRetAttrs().
Referenced byllvm::CallBase::getRetNoFPClass().
MaybeAlign AttributeList::getRetStackAlignment | ( | ) | const |
Get the stack alignment of the return value.
Definition at line1940 of fileAttributes.cpp.
ReferencesgetRetAttrs(), andllvm::AttributeSet::getStackAlignment().
UWTableKind AttributeList::getUWTableKind | ( | ) | const |
Get the unwind table kind requested for the function.
Definition at line1977 of fileAttributes.cpp.
ReferencesgetFnAttrs(), andllvm::AttributeSet::getUWTableKind().
Referenced byllvm::Function::getUWTableKind().
bool AttributeList::hasAttributeAtIndex | ( | unsigned | Index, |
Attribute::AttrKind | Kind | ||
) | const |
Return true if the attribute exists at the given index.
Definition at line1864 of fileAttributes.cpp.
ReferencesgetAttributes(), andllvm::AttributeSet::hasAttribute().
Referenced byhasFnAttr(),hasParamAttr(), andhasRetAttr().
Return true if the attribute exists at the given index.
Definition at line1869 of fileAttributes.cpp.
ReferencesgetAttributes(), andllvm::AttributeSet::hasAttribute().
Return true if attribute exists at the given index.
Definition at line1873 of fileAttributes.cpp.
ReferencesgetAttributes(), andllvm::AttributeSet::hasAttributes().
Referenced byhasFnAttrs(),hasParamAttrs(), andhasRetAttrs().
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 line1885 of fileAttributes.cpp.
Referenced byllvm::XCoreFrameLowering::emitPrologue(),llvm::CallBase::getArgOperandWithAttribute(),llvm::SystemZELFRegisters::getCalleeSavedRegs(),llvm::AArch64RegisterInfo::getCalleeSavedRegs(),llvm::SystemZELFRegisters::getCallPreservedMask(),llvm::AArch64RegisterInfo::getCallPreservedMask(),llvm::ARMBaseRegisterInfo::getCallPreservedMask(),llvm::AArch64RegisterInfo::getDarwinCalleeSavedRegs(),llvm::AArch64RegisterInfo::getDarwinCallPreservedMask(),getFixedObjectSize(),llvm::CallBase::hasByValArgument(), andllvm::Attributor::isValidFunctionSignatureRewrite().
bool AttributeList::hasFnAttr | ( | Attribute::AttrKind | Kind | ) | const |
Return true if the attribute exists for the function.
Definition at line1877 of fileAttributes.cpp.
Referenced bygetCopyFromParts(),getDeoptLowering(),llvm::AArch64TargetLowering::getOptimalMemOpLLT(),llvm::AArch64TargetLowering::getOptimalMemOpType(),llvm::ARMTargetLowering::getOptimalMemOpType(),llvm::RISCVTargetLowering::getOptimalMemOpType(),llvm::X86TargetLowering::getOptimalMemOpType(),llvm::AArch64TargetLowering::isIntDivCheap(),llvm::RISCVTargetLowering::isIntDivCheap(),llvm::X86TargetLowering::isIntDivCheap(),maySpeculateLanes(), andllvm::TargetLowering::SimplifySetCC().
Return true if the attribute exists for the function.
Definition at line1881 of fileAttributes.cpp.
ReferencesFunctionIndex, andhasAttributeAtIndex().
| inline |
Return true the attributes exist for the function.
Definition at line867 of fileAttributes.h.
ReferencesFunctionIndex, andhasAttributesAtIndex().
| inline |
Return true if the attribute exists for the given argument.
Definition at line833 of fileAttributes.h.
ReferencesFirstArgIndex, andhasAttributeAtIndex().
Referenced byllvm::Function::hasStructRetAttr(),llvm::Attributor::identifyDefaultAbstractAttributes(),llvm::isLegalToPromote(),llvm::NVPTXTargetLowering::LowerFormalArguments(), andllvm::CallBase::paramHasAttr().
Return true if the attribute exists for the given argument.
Definition at line838 of fileAttributes.h.
ReferencesFirstArgIndex, andhasAttributeAtIndex().
Return true if attributes exists for the given argument.
Definition at line843 of fileAttributes.h.
ReferencesFirstArgIndex, andhasAttributesAtIndex().
bool AttributeList::hasParentContext | ( | LLVMContext & | C | ) | const |
Return true if this attribute list belongs to theLLVMContext.
Definition at line2000 of fileAttributes.cpp.
Referencesassert(),llvm::CallingConv::C, andisEmpty().
| inline |
Return true if the attribute exists for the return value.
Definition at line848 of fileAttributes.h.
ReferenceshasAttributeAtIndex(), andReturnIndex.
Referenced byllvm::GetReturnInfo(),isLibCallInTailPosition(),llvm::Function::returnDoesNotAlias(), andllvm::CallBase::returnDoesNotAlias().
Return true if the attribute exists for the return value.
Definition at line853 of fileAttributes.h.
ReferenceshasAttributeAtIndex(), andReturnIndex.
| inline |
Return true if attributes exist for the return value.
Definition at line858 of fileAttributes.h.
ReferenceshasAttributesAtIndex(), andReturnIndex.
| inline |
Use this to iterate over the valid attribute indexes.
Definition at line1013 of fileAttributes.h.
ReferencesgetNumAttrSets().
Referenced byprint().
std::optional<AttributeList > AttributeList::intersectWith | ( | LLVMContext & | C, |
AttributeList | Other | ||
) | const |
Try to intersect thisAttributeList with Other.
Returns std::nullopt if the two lists are inherently incompatible (imply different behavior, not just analysis).
Definition at line1825 of fileAttributes.cpp.
Referencesllvm::CallingConv::C,get(),getAttributes(),getNumAttrSets(),Idx,llvm::AttributeSet::intersectWith(),llvm::Other,llvm::SmallVectorTemplateBase< T, bool >::push_back(), andllvm::sort().
Referenced byllvm::GVNExpression::CallExpression::equals(), andllvm::GVNPass::Expression::operator==().
| inline |
Return true if there are no attributes.
Definition at line1025 of fileAttributes.h.
Referenced byllvm::ValueEnumerator::getAttributeListID(),llvm::dxil::ValueEnumerator::getAttributeListID(),hasParentContext(),legalizeCallAttributes(), andllvm::GVNPass::Expression::operator==().
| inline |
Definition at line1017 of fileAttributes.h.
ReferencesRHS.
| inline |
operator==/!= - Provide equality predicates.
Definition at line1016 of fileAttributes.h.
ReferencesRHS.
void AttributeList::print | ( | raw_ostream & | O | ) | const |
Definition at line2024 of fileAttributes.cpp.
ReferencesFirstArgIndex,FunctionIndex,getAsString(),getAttributes(),indexes(), andReturnIndex.
Referenced bydump().
| inline |
Definition at line664 of fileAttributes.h.
Referencesllvm::CallingConv::C,Index, andremoveAttributeAtIndex().
AttributeList AttributeList::removeAttributeAtIndex | ( | 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 line1747 of fileAttributes.cpp.
Referencesllvm::CallingConv::C, andgetAttributes().
Referenced byremoveAttribute(),llvm::CallBase::removeAttributeAtIndex(),removeFnAttribute(),removeParamAttribute(),removeRetAttribute(), andreplaceAttributeTypeAtIndex().
AttributeList AttributeList::removeAttributeAtIndex | ( | 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 line1756 of fileAttributes.cpp.
Referencesllvm::CallingConv::C, andgetAttributes().
AttributeList AttributeList::removeAttributesAtIndex | ( | 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 line1777 of fileAttributes.cpp.
ReferencesAttributeSet,attrIdxToArrayIdx(),llvm::CallingConv::C, andgetNumAttrSets().
AttributeList AttributeList::removeAttributesAtIndex | ( | LLVMContext & | C, |
unsigned | Index, | ||
constAttributeMask & | 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 line1766 of fileAttributes.cpp.
Referencesllvm::CallingConv::C, andgetAttributes().
Referenced byremoveFnAttributes(),removeParamAttributes(), andremoveRetAttributes().
| inline |
Remove the specified attribute at the function index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line683 of fileAttributes.h.
Referencesllvm::CallingConv::C,FunctionIndex, andremoveAttributeAtIndex().
Referenced byllvm::CallBase::removeFnAttr().
| inline |
Remove the specified attribute at the function index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line689 of fileAttributes.h.
Referencesllvm::CallingConv::C,FunctionIndex, andremoveAttributeAtIndex().
| inline |
Remove the attributes at the function index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line703 of fileAttributes.h.
Referencesllvm::CallingConv::C,FunctionIndex, andremoveAttributesAtIndex().
| inline |
Remove the specified attribute at the function index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line697 of fileAttributes.h.
Referencesllvm::CallingConv::C,FunctionIndex, andremoveAttributesAtIndex().
Referenced byllvm::CallBase::removeFnAttrs().
| 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 line732 of fileAttributes.h.
Referencesllvm::CallingConv::C,FirstArgIndex, andremoveAttributeAtIndex().
Referenced byllvm::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 line740 of fileAttributes.h.
Referencesllvm::CallingConv::C,FirstArgIndex, andremoveAttributeAtIndex().
| inline |
Remove all attributes at the specified arg index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line754 of fileAttributes.h.
Referencesllvm::CallingConv::C,FirstArgIndex, andremoveAttributesAtIndex().
| 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 line747 of fileAttributes.h.
Referencesllvm::CallingConv::C,FirstArgIndex, andremoveAttributesAtIndex().
Referenced bylowerAwaitSuspend(), andllvm::CallBase::removeParamAttrs().
| inline |
Remove the specified attribute at the return value index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line710 of fileAttributes.h.
Referencesllvm::CallingConv::C,removeAttributeAtIndex(), andReturnIndex.
Referenced byllvm::CallBase::removeRetAttr().
| inline |
Remove the specified attribute at the return value index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line716 of fileAttributes.h.
Referencesllvm::CallingConv::C,removeAttributeAtIndex(), andReturnIndex.
| inline |
Remove the specified attribute at the return value index from this attribute list.
Returns a new list because attribute lists are immutable.
Definition at line724 of fileAttributes.h.
Referencesllvm::CallingConv::C,removeAttributesAtIndex(), andReturnIndex.
Referenced byllvm::CallBase::removeRetAttrs().
| inline |
Replace the type contained by attributeAttrKind
at indexArgNo
wihReplacementTy
, preserving all other attributes.
Definition at line762 of fileAttributes.h.
Referencesllvm::CallingConv::C,getAttributeAtIndex(),llvm::Attribute::getWithNewType(), andremoveAttributeAtIndex().
| friend |
Definition at line499 of fileAttributes.h.
Referenced byget().
| friend |
Definition at line500 of fileAttributes.h.
| friend |
Definition at line501 of fileAttributes.h.
Referenced byremoveAttributesAtIndex().
| friend |
Definition at line502 of fileAttributes.h.
| friend |
Definition at line503 of fileAttributes.h.