|
LLVM 24.0.0git
|
Storage class for function-local metadata objects. More...
#include "llvm/IR/FunctionLocalMetadata.h"
Static Public Attributes | |
| static constexpr uint16_t | MaxAllowedAtomGroup |
| Static Public Attributes inherited from llvm::Metadata | |
| static constexpr const unsigned | PoisonGeneratingIDs [] |
| Metadata IDs that may generate poison. | |
Friends | |
| class | LLVMContextImpl |
| class | MDNode |
Additional Inherited Members | |
| Public Types inherited from llvm::MDNode | |
| using | op_iterator = const MDOperand * |
| using | op_range = iterator_range<op_iterator> |
| Public Types inherited from llvm::Metadata | |
| enum | MetadataKind |
| Protected Types inherited from llvm::MDNode | |
| using | mutable_op_range = iterator_range<MDOperand *> |
| Protected Types inherited from llvm::Metadata | |
| enum | StorageType { Uniqued , Distinct , Temporary } |
| Active type of storage. More... | |
| Protected Member Functions inherited from llvm::MDNode | |
| LLVM_ABI | MDNode (LLVMContext &Context, unsigned ID, StorageType Storage, ArrayRef< Metadata * > Ops1, ArrayRef< Metadata * > Ops2={}) |
| ~MDNode ()=default | |
| LLVM_ABI void * | operator new (size_t Size, size_t NumOps, StorageType Storage) |
| LLVM_ABI void | operator delete (void *Mem) |
| void | operator delete (void *, unsigned) |
| Required by std, but never called. | |
| void | operator delete (void *, unsigned, bool) |
| Required by std, but never called. | |
| LLVM_ABI void | dropAllReferences () |
| MDOperand * | mutable_begin () |
| MDOperand * | mutable_end () |
| mutable_op_range | mutable_operands () |
| LLVM_ABI void | setOperand (unsigned I, Metadata *New) |
| Set an operand. | |
| unsigned | getNumUnresolved () const |
| void | setNumUnresolved (unsigned N) |
| LLVM_ABI void | storeDistinctInContext () |
| void | resize (size_t NumOps) |
| Resize the node to hold NumOps operands. | |
| Protected Member Functions inherited from llvm::Metadata | |
| Metadata (unsigned ID, StorageType Storage) | |
| ~Metadata ()=default | |
| void | handleChangedOperand (void *, Metadata *) |
| Default handling of a changed operand, which asserts. | |
| Static Protected Member Functions inherited from llvm::MDNode | |
| template<class T, class StoreT> | |
| static T * | storeImpl (T *N, StorageType Storage, StoreT &Store) |
| template<class T> | |
| static T * | storeImpl (T *N, StorageType Storage) |
| Protected Attributes inherited from llvm::Metadata | |
| unsigned char | Storage: 7 |
| Storage flag for non-uniqued, otherwise unowned, metadata. | |
| unsigned char | SubclassData1: 1 |
| unsigned short | SubclassData16 = 0 |
| unsigned | SubclassData32 = 0 |
Storage class for function-local metadata objects.
This is a special MDNode variation: the class benefits from being able to appear as an operand in other MDNodes, to be treated as a metadata attachment to functions, and from the generic MDNode enumeration logic. However, it holds MDNode references that are not part of the MDNode operands() array and are not tracking references (meaning it contains forward references that must be resolved separately from the generic MDNode tracking/resolution facilities), does not meaningfully support cloning, and can only ever be created as distinct, not unique or temporary. To access all MDNodes referenced from this context, use the getUsedMDNodes() function.
Definition at line 220 of file FunctionLocalMetadata.h.
Definition at line 248 of file FunctionLocalMetadata.h.
References llvm::Metadata::getMetadataID().
|
inline |
Definition at line 257 of file FunctionLocalMetadata.h.
References cloneImpl().
|
inline |
Definition at line 258 of file FunctionLocalMetadata.h.
References llvm_unreachable.
Referenced by clone().
|
inline |
Definition at line 337 of file FunctionLocalMetadata.h.
References llvm::FLIndex< IndexedType >::get(), and getMaxAtomGroup().
|
static |
Definition at line 20 of file FunctionLocalMetadata.cpp.
References llvm::Metadata::Distinct, and llvm::MDNode::storeDistinctInContext().
|
inline |
Definition at line 306 of file FunctionLocalMetadata.h.
References assert().
Referenced by llvm::FLIndex< IndexedType >::DenseMapInfo< FLIndex< IndexedType > >.
|
inline |
Definition at line 282 of file FunctionLocalMetadata.h.
Referenced by getUsedMDNodes().
|
inline |
Definition at line 311 of file FunctionLocalMetadata.h.
References llvm::Metadata::SubclassData16.
Referenced by getAtomGroupWaterline(), getNewAtomGroup(), and updateAtomGroupWaterline().
|
inline |
Definition at line 317 of file FunctionLocalMetadata.h.
References assert(), llvm::FLIndex< IndexedType >::get(), getMaxAtomGroup(), MaxAllowedAtomGroup, and setMaxAtomGroup().
Returns the existing index of Scope, or else inserts it and returns its new index.
NB: Uses linear search, which is very inefficient, but required if we may be inserting a duplicate Scope; if performing this operation repeatedly, FLMDBuilder is significantly more efficient.
Definition at line 353 of file FunctionLocalMetadata.h.
References insertScope().
Returns the existing index of SrcLoc, or else inserts it and returns its new index.
NB: Uses linear search, which is very inefficient, but required if we may be inserting a duplicate SrcLoc; if performing this operation repeatedly, FLMDBuilder is significantly more efficient. An exception to this is if inserting a SrcLoc with DISubprogram scope, column=0, and line equal to either 0, SP->getLine(), or SP->getScopeLine(); these are inserted near the front of SrcLocs by FLMDBuilder, so can generally be retrieved quickly.
Definition at line 374 of file FunctionLocalMetadata.h.
References insertSrcLoc().
Definition at line 284 of file FunctionLocalMetadata.h.
References assert().
|
inline |
Definition at line 288 of file FunctionLocalMetadata.h.
References assert(), and llvm::FLIndex< IndexedType >::get().
Definition at line 280 of file FunctionLocalMetadata.h.
Referenced by getUsedMDNodes().
Definition at line 295 of file FunctionLocalMetadata.h.
References assert().
|
inline |
Definition at line 299 of file FunctionLocalMetadata.h.
References assert(), and llvm::FLIndex< IndexedType >::get().
Definition at line 281 of file FunctionLocalMetadata.h.
| void MDFunctionLocalContext::getUsedMDNodes | ( | SmallVectorImpl< const MDNode * > & | Nodes | ) | const |
Definition at line 27 of file FunctionLocalMetadata.cpp.
References getInlinedCalls(), getScopes(), llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
inline |
Returns the existing index of a uniquable InlinedCall, or else inserts it and returns its new index.
NB: Uses linear search for uniquing, which is very inefficient; pass UniquableMayExist as false if passing an InlinedCall which is uniquable but is known to not already exist.
Definition at line 386 of file FunctionLocalMetadata.h.
References llvm::FLInlinedCall::isEquivalent(), llvm::FLInlinedCall::MaxAtomGroup, and llvm::FLInlinedCall::Uniquable.
Inserts a new FLScope Scope and returns its index.
Definition at line 344 of file FunctionLocalMetadata.h.
Referenced by getOrInsertScope().
Inserts a new FLSrcLoc SrcLoc and returns its index.
Definition at line 361 of file FunctionLocalMetadata.h.
Referenced by getOrInsertSrcLoc().
|
inline |
Definition at line 278 of file FunctionLocalMetadata.h.
References llvm::Metadata::SubclassData1.
|
inline |
Generally this shouldn't be called directly; prefer updateAtomGroupWaterline, including any relevant InlinedAt.
TODO: Should this be private?
Definition at line 315 of file FunctionLocalMetadata.h.
References llvm::Metadata::SubclassData16.
Referenced by getNewAtomGroup(), and updateAtomGroupWaterline().
|
inline |
Definition at line 327 of file FunctionLocalMetadata.h.
References assert(), llvm::FLIndex< IndexedType >::get(), getMaxAtomGroup(), MaxAllowedAtomGroup, and setMaxAtomGroup().
|
friend |
Definition at line 243 of file FunctionLocalMetadata.h.
References LLVMContextImpl.
Referenced by LLVMContextImpl.
|
friend |
|
staticconstexpr |
Definition at line 245 of file FunctionLocalMetadata.h.
Referenced by getNewAtomGroup(), and updateAtomGroupWaterline().