|
LLVM 24.0.0git
|
Value wrapper in the Metadata hierarchy. More...
#include "llvm/IR/Metadata.h"
Public Member Functions | |
| Value * | getValue () const |
| Type * | getType () const |
| LLVMContext & | getContext () const |
| SmallVector< Metadata * > | getAllArgListUsers () |
| SmallVector< DbgVariableRecord * > | getAllDbgVariableRecordUsers () |
| Public Member Functions inherited from llvm::Metadata | |
| unsigned | getMetadataID () const |
| LLVM_ABI void | dump () const |
| User-friendly dump. | |
| LLVM_ABI void | dump (const Module *M) const |
| LLVM_ABI void | print (raw_ostream &OS, const Module *M=nullptr, bool IsForDebug=false) const |
| Print. | |
| LLVM_ABI void | print (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr, bool IsForDebug=false) const |
| LLVM_ABI void | printAsOperand (raw_ostream &OS, const Module *M=nullptr) const |
| Print as operand. | |
| LLVM_ABI void | printAsOperand (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr) const |
Static Public Member Functions | |
| static LLVM_ABI ValueAsMetadata * | get (Value *V) |
| static ConstantAsMetadata * | getConstant (Value *C) |
| static LocalAsMetadata * | getLocal (Value *Local) |
| static LLVM_ABI ValueAsMetadata * | getIfExists (Value *V) |
| static ConstantAsMetadata * | getConstantIfExists (Value *C) |
| static LocalAsMetadata * | getLocalIfExists (Value *Local) |
| static LLVM_ABI void | handleDeletion (Value *V) |
| static LLVM_ABI void | handleRAUW (Value *From, Value *To) |
| static bool | classof (const Metadata *MD) |
Protected Member Functions | |
| ValueAsMetadata (unsigned ID, Value *V) | |
| ~ValueAsMetadata ()=default | |
| void | replaceAllUsesWith (Metadata *MD) |
| Handle collisions after Value::replaceAllUsesWith(). | |
| 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. | |
Friends | |
| class | ReplaceableUses |
| class | LLVMContextImpl |
Additional Inherited Members | |
| Public Types inherited from llvm::Metadata | |
| enum | MetadataKind |
| Static Public Attributes inherited from llvm::Metadata | |
| static constexpr const unsigned | PoisonGeneratingIDs [] |
| Metadata IDs that may generate poison. | |
| Protected Types inherited from llvm::Metadata | |
| enum | StorageType { Uniqued , Distinct , Temporary } |
| Active type of storage. More... | |
| 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 |
Value wrapper in the Metadata hierarchy.
This is a custom value handle that allows other metadata to refer to classes in the Value hierarchy.
Because of full uniquing support, each value is only wrapped by a single ValueAsMetadata object, so the lookup maps are far more efficient than those using ValueHandleBase.
Definition at line 469 of file Metadata.h.
Definition at line 481 of file Metadata.h.
References assert(), llvm::Metadata::Metadata(), and llvm::Metadata::Uniqued.
Referenced by get(), getIfExists(), handleDeletion(), handleRAUW(), and ~ValueAsMetadata().
|
protecteddefault |
References LLVM_ABI, and ValueAsMetadata().
Definition at line 533 of file Metadata.h.
References llvm::Metadata::getMetadataID(), and llvm::Metadata::Metadata().
|
static |
Definition at line 505 of file Metadata.cpp.
References assert(), C(), llvm::dyn_cast(), llvm::isa(), and ValueAsMetadata().
Referenced by addFunctionTypeMutation(), addModuleFlags(), llvm::memprof::buildCallstackMetadata(), buildFrameDebugInfo(), llvm::dxil::collectDXILDebugInfo(), constructEntryMetadata(), llvm::ConvertDebugDeclareToDebugValue(), llvm::ConvertDebugDeclareToDebugValue(), llvm::DbgVariableRecord::createDbgVariableRecord(), llvm::DbgVariableRecord::createDVRAssign(), llvm::DbgVariableRecord::createDVRDeclare(), llvm::DbgVariableRecord::createDVRDeclareValue(), createMIBNode(), getAsMetadata(), getAsMetadata(), llvm::dxil::ResourceInfo::getAsMetadata(), getConstant(), getLocal(), llvm::DIArgList::handleChangedOperand(), llvm::DebugValueUser::handleChangedValue(), handleRAUW(), llvm::InlineFunctionImpl(), insertDbgValueOrDbgVariableRecord(), insertSpills(), LLVMValueAsMetadata(), llvm::DbgVariableIntrinsic::replaceVariableLocationOp(), llvm::DbgVariableIntrinsic::replaceVariableLocationOp(), llvm::DbgVariableRecord::replaceVariableLocationOp(), llvm::DbgVariableRecord::replaceVariableLocationOp(), restorePreTransformState(), llvm::ReplaceableUses::SalvageDebugInfo(), llvm::DbgAssignIntrinsic::setAddress(), llvm::DbgVariableRecord::setAddress(), llvm::DbgVariableRecord::setKillAddress(), llvm::DbgAssignIntrinsic::setValue(), updateDVIWithLocation(), and updateDVIWithLocations().
|
inline |
Definition at line 512 of file Metadata.h.
References llvm::ReplaceableUses::getAllArgListUsers().
|
inline |
Definition at line 515 of file Metadata.h.
References llvm::ReplaceableUses::getAllDbgVariableRecordUsers().
|
inlinestatic |
Definition at line 490 of file Metadata.h.
References C(), llvm::cast(), and get().
Referenced by llvm::applyDebugifyMetadataToMachineFunction(), llvm::SPIRVGlobalRegistry::buildAssignType(), llvm::buildMD(), llvm::ConstantAsMetadata::get(), and wrapConstantAsMetadata().
|
inlinestatic |
Definition at line 500 of file Metadata.h.
References C(), llvm::cast_or_null(), and getIfExists().
Referenced by llvm::ConstantAsMetadata::getIfExists().
|
inline |
Definition at line 510 of file Metadata.h.
|
static |
Definition at line 524 of file Metadata.cpp.
References assert(), and ValueAsMetadata().
Referenced by llvm::findDVRDeclares(), llvm::findDVRDeclareValues(), llvm::findDVRValues(), getConstantIfExists(), and getLocalIfExists().
|
inlinestatic |
Definition at line 494 of file Metadata.h.
References llvm::cast(), get(), and Local.
Referenced by llvm::LocalAsMetadata::get().
|
inlinestatic |
Definition at line 504 of file Metadata.h.
References llvm::cast_or_null(), getIfExists(), and Local.
Referenced by llvm::LocalAsMetadata::getIfExists().
|
inline |
Definition at line 509 of file Metadata.h.
|
inline |
Definition at line 508 of file Metadata.h.
Referenced by analyzeModule(), getHiPELiteral(), getOCLKernelArgAttribute(), llvm::ConstantAsMetadata::getValue(), handleDeletion(), handleRAUW(), llvm::DbgVariableRecord::location_op_iterator::operator*(), llvm::DbgVariableRecord::location_op_iterator::operator*(), llvm::location_op_iterator::operator*(), and llvm::location_op_iterator::operator*().
|
static |
Definition at line 529 of file Metadata.cpp.
References assert(), getValue(), I, replaceAllUsesWith(), llvm::Store, and ValueAsMetadata().
Referenced by llvm::CallGraphUpdater::finalize().
Definition at line 548 of file Metadata.cpp.
References assert(), get(), llvm::Value::getContext(), getLocalFunctionMetadata(), getValue(), I, llvm::isa(), llvm::Value::IsUsedByMD, llvm::Metadata::Metadata(), llvm::LLVMContext::pImpl, replaceAllUsesWith(), llvm::Store, ValueAsMetadata(), and llvm::LLVMContextImpl::ValuesAsMetadata.
|
inlineprotected |
Handle collisions after Value::replaceAllUsesWith().
RAUW isn't supported directly for ValueAsMetadata, but if the wrapped Value gets RAUW'ed and the target already exists, this is used to merge the two metadata nodes.
Definition at line 528 of file Metadata.h.
References llvm::Metadata::Metadata(), and llvm::ReplaceableUses::replaceAllUsesWith().
Referenced by handleDeletion(), and handleRAUW().
|
friend |
Definition at line 471 of file Metadata.h.
References LLVMContextImpl.
Referenced by LLVMContextImpl.
|
friend |
Definition at line 470 of file Metadata.h.
References ReplaceableUses.
Referenced by ReplaceableUses.