LLVM 20.0.0git
|
#include "llvm/IR/Attributes.h"
Public Types | |
using | iterator = const Attribute * |
Static Public Member Functions | |
static AttributeSet | get (LLVMContext &C, const AttrBuilder &B) |
static AttributeSet | get (LLVMContext &C, ArrayRef< Attribute > Attrs) |
Friends | |
template<typename Ty , typename Enable > | |
struct | DenseMapInfo |
Definition at line 330 of file Attributes.h.
using llvm::AttributeSet::iterator = const Attribute * |
Definition at line 427 of file Attributes.h.
|
default |
AttributeSet is a trivially copyable value type.
Referenced by get().
|
default |
|
default |
AttributeSet AttributeSet::addAttribute | ( | LLVMContext & | C, |
Attribute::AttrKind | Kind | ||
) | const |
Add an argument attribute.
Returns a new set because attribute sets are immutable.
Definition at line 851 of file Attributes.cpp.
References addAttributes(), B, llvm::CallingConv::C, get(), and hasAttribute().
Referenced by llvm::OpenMPIRBuilder::addAttributes().
AttributeSet AttributeSet::addAttribute | ( | LLVMContext & | C, |
StringRef | Kind, | ||
StringRef | Value = StringRef() |
||
) | const |
Add a target-dependent attribute.
Returns a new set because attribute sets are immutable.
Definition at line 859 of file Attributes.cpp.
References addAttributes(), B, llvm::CallingConv::C, and get().
AttributeSet AttributeSet::addAttributes | ( | LLVMContext & | C, |
AttributeSet | AS | ||
) | const |
Add attributes to the attribute set.
Returns a new set because attribute sets are immutable.
Definition at line 866 of file Attributes.cpp.
References B, llvm::CallingConv::C, get(), and hasAttributes().
Referenced by addAttribute(), and llvm::OpenMPIRBuilder::addAttributes().
AttributeSet::iterator AttributeSet::begin | ( | ) | const |
Definition at line 1009 of file Attributes.cpp.
References llvm::AttributeSetNode::begin().
LLVM_DUMP_METHOD void AttributeSet::dump | ( | ) | const |
Definition at line 1018 of file Attributes.cpp.
References llvm::dbgs(), and getAsString().
AttributeSet::iterator AttributeSet::end | ( | ) | const |
Definition at line 1013 of file Attributes.cpp.
References llvm::AttributeSetNode::end().
|
static |
Definition at line 847 of file Attributes.cpp.
References AttributeSet(), llvm::CallingConv::C, and llvm::AttributeSetNode::get().
|
static |
Definition at line 843 of file Attributes.cpp.
References AttributeSet(), B, llvm::CallingConv::C, and llvm::AttributeSetNode::get().
Referenced by addAttribute(), llvm::AttributeList::addAttributeAtIndex(), addAttributes(), llvm::AttributeList::addAttributesAtIndex(), llvm::AttributeList::addParamAttribute(), llvm::AttributeList::get(), llvm::promoteCall(), removeAttribute(), and removeAttributes().
MaybeAlign AttributeSet::getAlignment | ( | ) | const |
Definition at line 926 of file Attributes.cpp.
References llvm::AttributeSetNode::getAlignment().
Referenced by llvm::AttributeList::getParamAlignment(), llvm::AttributeList::getRetAlignment(), and optimizeCallInst().
AllocFnKind AttributeSet::getAllocKind | ( | ) | const |
Definition at line 985 of file Attributes.cpp.
References llvm::AttributeSetNode::getAllocKind(), and llvm::Unknown.
Referenced by llvm::AttributeList::getAllocKind().
std::optional< std::pair< unsigned, std::optional< unsigned > > > AttributeSet::getAllocSizeArgs | ( | ) | const |
Definition at line 967 of file Attributes.cpp.
References llvm::AttributeSetNode::getAllocSizeArgs().
Referenced by doPromotion().
std::string AttributeSet::getAsString | ( | bool | InAttrGrp = false | ) | const |
Definition at line 997 of file Attributes.cpp.
References llvm::AttributeSetNode::getAsString().
Referenced by dump(), and llvm::AttributeList::getAsString().
Attribute AttributeSet::getAttribute | ( | Attribute::AttrKind | Kind | ) | const |
Return the attribute object.
Definition at line 918 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttribute().
Referenced by addIfNotExistent(), and llvm::AttributeList::getAttributeAtIndex().
Return the target-dependent attribute object.
Definition at line 922 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttribute().
Type * AttributeSet::getByRefType | ( | ) | const |
Definition at line 942 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by getMemoryParamAllocType(), and llvm::AttributeList::getParamByRefType().
Type * AttributeSet::getByValType | ( | ) | const |
Definition at line 946 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by getMemoryParamAllocType(), and llvm::AttributeList::getParamByValType().
uint64_t AttributeSet::getDereferenceableBytes | ( | ) | const |
Definition at line 934 of file Attributes.cpp.
References llvm::AttributeSetNode::getDereferenceableBytes().
Referenced by llvm::AttributeList::getParamDereferenceableBytes(), and llvm::AttributeList::getRetDereferenceableBytes().
uint64_t AttributeSet::getDereferenceableOrNullBytes | ( | ) | const |
Definition at line 938 of file Attributes.cpp.
References llvm::AttributeSetNode::getDereferenceableOrNullBytes().
Referenced by llvm::AttributeList::getParamDereferenceableOrNullBytes(), and llvm::AttributeList::getRetDereferenceableOrNullBytes().
Type * AttributeSet::getElementType | ( | ) | const |
Definition at line 962 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by llvm::AttributeList::getParamElementType().
Type * AttributeSet::getInAllocaType | ( | ) | const |
Definition at line 958 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by getMemoryParamAllocType(), and llvm::AttributeList::getParamInAllocaType().
MemoryEffects AttributeSet::getMemoryEffects | ( | ) | const |
Definition at line 989 of file Attributes.cpp.
References llvm::AttributeSetNode::getMemoryEffects(), and llvm::MemoryEffectsBase< LocationEnum >::unknown().
Referenced by addIfNotExistent(), and llvm::AttributeList::getMemoryEffects().
FPClassTest AttributeSet::getNoFPClass | ( | ) | const |
Definition at line 993 of file Attributes.cpp.
References llvm::fcNone, and llvm::AttributeSetNode::getNoFPClass().
Referenced by llvm::AttributeList::getParamNoFPClass(), and llvm::AttributeList::getRetNoFPClass().
unsigned AttributeSet::getNumAttributes | ( | ) | const |
Return the number of attributes in this set.
Definition at line 906 of file Attributes.cpp.
References llvm::AttributeSetNode::getNumAttributes().
Type * AttributeSet::getPreallocatedType | ( | ) | const |
Definition at line 954 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by getMemoryParamAllocType(), and llvm::AttributeList::getParamPreallocatedType().
MaybeAlign AttributeSet::getStackAlignment | ( | ) | const |
Definition at line 930 of file Attributes.cpp.
References llvm::AttributeSetNode::getStackAlignment().
Referenced by llvm::AttributeList::getFnStackAlignment(), llvm::AttributeList::getParamStackAlignment(), and llvm::AttributeList::getRetStackAlignment().
Type * AttributeSet::getStructRetType | ( | ) | const |
Definition at line 950 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by getMemoryParamAllocType(), and llvm::AttributeList::getParamStructRetType().
UWTableKind AttributeSet::getUWTableKind | ( | ) | const |
Definition at line 981 of file Attributes.cpp.
References llvm::AttributeSetNode::getUWTableKind(), and llvm::None.
Referenced by llvm::AttributeList::getUWTableKind().
std::optional< unsigned > AttributeSet::getVScaleRangeMax | ( | ) | const |
Definition at line 977 of file Attributes.cpp.
References llvm::AttributeSetNode::getVScaleRangeMax().
unsigned AttributeSet::getVScaleRangeMin | ( | ) | const |
Definition at line 973 of file Attributes.cpp.
References llvm::AttributeSetNode::getVScaleRangeMin().
bool AttributeSet::hasAttribute | ( | Attribute::AttrKind | Kind | ) | const |
Return true if the attribute exists in this set.
Definition at line 910 of file Attributes.cpp.
References llvm::AttributeSetNode::hasAttribute().
Referenced by addAttribute(), addIfNotExistent(), llvm::AttributeList::hasAttributeAtIndex(), llvm::GlobalVariable::hasImplicitSection(), llvm::Instruction::hasPoisonGeneratingReturnAttributes(), and removeAttribute().
Return true if the attribute exists in this set.
Definition at line 914 of file Attributes.cpp.
References llvm::AttributeSetNode::hasAttribute().
|
inline |
Return true if attributes exists in this set.
Definition at line 390 of file Attributes.h.
Referenced by addAttributes(), llvm::AttributeList::get(), llvm::AttributeList::hasAttributesAtIndex(), and hasParentContext().
bool AttributeSet::hasParentContext | ( | LLVMContext & | C | ) | const |
Return true if this attribute set belongs to the LLVMContext.
Definition at line 1001 of file Attributes.cpp.
References assert(), llvm::CallingConv::C, hasAttributes(), and llvm::AttributeSetNode::Profile().
|
inline |
Definition at line 354 of file Attributes.h.
|
inline |
Definition at line 353 of file Attributes.h.
AttributeSet AttributeSet::removeAttribute | ( | LLVMContext & | C, |
Attribute::AttrKind | Kind | ||
) | const |
Remove the specified attribute from this set.
Returns a new set because attribute sets are immutable.
Definition at line 879 of file Attributes.cpp.
References B, llvm::CallingConv::C, get(), and hasAttribute().
AttributeSet AttributeSet::removeAttribute | ( | LLVMContext & | C, |
StringRef | Kind | ||
) | const |
Remove the specified attribute from this set.
Returns a new set because attribute sets are immutable.
Definition at line 887 of file Attributes.cpp.
References B, llvm::CallingConv::C, get(), and hasAttribute().
AttributeSet AttributeSet::removeAttributes | ( | LLVMContext & | C, |
const AttributeMask & | AttrsToRemove | ||
) | const |
Remove the specified attributes from this set.
Returns a new set because attribute sets are immutable.
Definition at line 895 of file Attributes.cpp.
References B, llvm::CallingConv::C, and get().
Referenced by moveFunctionAdaptingType().
|
friend |
Definition at line 332 of file Attributes.h.