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 342 of file Attributes.h.
using llvm::AttributeSet::iterator = const Attribute * |
Definition at line 445 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 905 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 913 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 920 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 1189 of file Attributes.cpp.
References llvm::AttributeSetNode::begin().
Referenced by intersectWith().
LLVM_DUMP_METHOD void AttributeSet::dump | ( | ) | const |
Definition at line 1198 of file Attributes.cpp.
References llvm::dbgs(), and getAsString().
AttributeSet::iterator AttributeSet::end | ( | ) | const |
Definition at line 1193 of file Attributes.cpp.
References llvm::AttributeSetNode::end().
Referenced by intersectWith().
|
static |
Definition at line 901 of file Attributes.cpp.
References AttributeSet(), llvm::CallingConv::C, and llvm::AttributeSetNode::get().
|
static |
Definition at line 897 of file Attributes.cpp.
References AttributeSet(), B, llvm::CallingConv::C, and llvm::AttributeSetNode::get().
Referenced by addAttribute(), llvm::AttributeList::addAttributeAtIndex(), addAttributes(), llvm::AttributeList::addAttributesAtIndex(), AddParamAndFnBasicAttributes(), llvm::AttributeList::addParamAttribute(), llvm::AttributeList::get(), intersectWith(), llvm::promoteCall(), removeAttribute(), and removeAttributes().
MaybeAlign AttributeSet::getAlignment | ( | ) | const |
Definition at line 1106 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 1165 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 1147 of file Attributes.cpp.
References llvm::AttributeSetNode::getAllocSizeArgs().
Referenced by doPromotion().
std::string AttributeSet::getAsString | ( | bool | InAttrGrp = false | ) | const |
Definition at line 1177 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 1098 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttribute().
Referenced by addIfNotExistent(), llvm::AttributeList::getAttributeAtIndex(), llvm::AttributeList::getParamRange(), intersectWith(), and llvm::AttributeFuncs::typeIncompatible().
Return the target-dependent attribute object.
Definition at line 1102 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttribute().
Type * AttributeSet::getByRefType | ( | ) | const |
Definition at line 1122 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by llvm::AttributeList::getParamByRefType().
Type * AttributeSet::getByValType | ( | ) | const |
Definition at line 1126 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by llvm::AttributeList::getParamByValType().
uint64_t AttributeSet::getDereferenceableBytes | ( | ) | const |
Definition at line 1114 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 1118 of file Attributes.cpp.
References llvm::AttributeSetNode::getDereferenceableOrNullBytes().
Referenced by llvm::AttributeList::getParamDereferenceableOrNullBytes(), and llvm::AttributeList::getRetDereferenceableOrNullBytes().
Type * AttributeSet::getElementType | ( | ) | const |
Definition at line 1142 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by llvm::AttributeList::getParamElementType().
Type * AttributeSet::getInAllocaType | ( | ) | const |
Definition at line 1138 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by llvm::AttributeList::getParamInAllocaType().
MemoryEffects AttributeSet::getMemoryEffects | ( | ) | const |
Definition at line 1169 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 1173 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 1086 of file Attributes.cpp.
References llvm::AttributeSetNode::getNumAttributes().
Type * AttributeSet::getPreallocatedType | ( | ) | const |
Definition at line 1134 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by llvm::AttributeList::getParamPreallocatedType().
MaybeAlign AttributeSet::getStackAlignment | ( | ) | const |
Definition at line 1110 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 1130 of file Attributes.cpp.
References llvm::AttributeSetNode::getAttributeType().
Referenced by llvm::AttributeList::getParamStructRetType().
UWTableKind AttributeSet::getUWTableKind | ( | ) | const |
Definition at line 1161 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 1157 of file Attributes.cpp.
References llvm::AttributeSetNode::getVScaleRangeMax().
unsigned AttributeSet::getVScaleRangeMin | ( | ) | const |
Definition at line 1153 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 1090 of file Attributes.cpp.
References llvm::AttributeSetNode::hasAttribute().
Referenced by addAttribute(), addIfNotExistent(), llvm::AttributeList::hasAttributeAtIndex(), llvm::GlobalVariable::hasImplicitSection(), printFunctionArgExts(), and removeAttribute().
Return true if the attribute exists in this set.
Definition at line 1094 of file Attributes.cpp.
References llvm::AttributeSetNode::hasAttribute().
|
inline |
Return true if attributes exists in this set.
Definition at line 408 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 1181 of file Attributes.cpp.
References assert(), llvm::CallingConv::C, hasAttributes(), and llvm::AttributeSetNode::Profile().
std::optional< AttributeSet > AttributeSet::intersectWith | ( | LLVMContext & | C, |
AttributeSet | Other | ||
) | const |
Try to intersect this AttributeSet with Other.
Returns std::nullopt if the two lists are inherently incompatible (imply different behavior, not just analysis).
Definition at line 961 of file Attributes.cpp.
References llvm::AttrBuilder::addAlignmentAttr(), llvm::AttrBuilder::addAttribute(), llvm::AttrBuilder::addMemoryAttr(), llvm::AttrBuilder::addNoFPClassAttr(), llvm::AttrBuilder::addRangeAttr(), llvm::AttrBuilder::addRawIntAttr(), assert(), begin(), llvm::CallingConv::C, end(), get(), llvm::Attribute::getAlignment(), getAttribute(), llvm::Attribute::getKindAsEnum(), llvm::Attribute::getMemoryEffects(), llvm::Attribute::getNoFPClass(), llvm::Attribute::getRange(), llvm::Attribute::getValueAsInt(), llvm::Attribute::hasKindAsEnum(), llvm::Attribute::intersectMustPreserve(), llvm::Attribute::intersectWithAnd(), llvm::Attribute::intersectWithCustom(), llvm::Attribute::intersectWithMin(), llvm::Attribute::isEnumAttrKind(), llvm::ConstantRange::isFullSet(), llvm::Attribute::isIntAttrKind(), llvm::Attribute::isValid(), llvm_unreachable, llvm::Other, llvm::ConstantRange::unionWith(), and llvm::MaybeAlign::valueOrOne().
Referenced by llvm::AttributeList::intersectWith().
|
inline |
Definition at line 366 of file Attributes.h.
|
inline |
Definition at line 365 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 933 of file Attributes.cpp.
References B, llvm::CallingConv::C, get(), and hasAttribute().
Referenced by AddParamAndFnBasicAttributes().
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 941 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 949 of file Attributes.cpp.
References B, llvm::CallingConv::C, and get().
Referenced by moveFunctionAdaptingType().
|
friend |
Definition at line 344 of file Attributes.h.