LLVM
10.0.0svn
|
Value wrapper in the Metadata hierarchy. More...
#include "llvm/IR/Metadata.h"
Public Member Functions | |
Value * | getValue () const |
Type * | getType () const |
LLVMContext & | getContext () const |
![]() | |
unsigned | getMetadataID () const |
void | dump () const |
User-friendly dump. More... | |
void | dump (const Module *M) const |
void | print (raw_ostream &OS, const Module *M=nullptr, bool IsForDebug=false) const |
Print. More... | |
void | print (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr, bool IsForDebug=false) const |
void | printAsOperand (raw_ostream &OS, const Module *M=nullptr) const |
Print as operand. More... | |
void | printAsOperand (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr) const |
Static Public Member Functions | |
static ValueAsMetadata * | get (Value *V) |
static ConstantAsMetadata * | getConstant (Value *C) |
static LocalAsMetadata * | getLocal (Value *Local) |
static ValueAsMetadata * | getIfExists (Value *V) |
static ConstantAsMetadata * | getConstantIfExists (Value *C) |
static LocalAsMetadata * | getLocalIfExists (Value *Local) |
static void | handleDeletion (Value *V) |
static 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(). More... | |
![]() | |
Metadata (unsigned ID, StorageType Storage) | |
~Metadata ()=default | |
void | handleChangedOperand (void *, Metadata *) |
Default handling of a changed operand, which asserts. More... | |
Friends | |
class | ReplaceableMetadataImpl |
class | LLVMContextImpl |
Additional Inherited Members | |
![]() | |
enum | MetadataKind |
![]() | |
enum | StorageType { Uniqued, Distinct, Temporary } |
Active type of storage. More... | |
![]() | |
unsigned char | Storage: 7 |
Storage flag for non-uniqued, otherwise unowned, metadata. More... | |
unsigned char | ImplicitCode: 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 338 of file Metadata.h.
Definition at line 350 of file Metadata.h.
References assert().
|
protecteddefault |
Definition at line 396 of file Metadata.h.
References llvm::Metadata::getMetadataID().
|
static |
Definition at line 348 of file Metadata.cpp.
References assert(), C, llvm::Value::getContext(), llvm::Value::IsUsedByMD, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValuesAsMetadata.
Referenced by llvm::formLCSSAForInstructions(), FunctionNumber(), getDbgIntrinsicValueImpl(), llvm::insertDebugValuesForPHIs(), instrumentMaskedLoadOrStore(), IsInterestingCmp(), LLVMValueAsMetadata(), operator<<(), llvm::remapInstruction(), llvm::replaceDbgUsesWithUndef(), RetagMask(), RewriteUsesOfClonedInstructions(), llvm::CGProfilePass::run(), TryToSinkInstruction(), and wrapValueInMetadata().
|
inlinestatic |
Definition at line 360 of file Metadata.h.
References C.
Referenced by llvm::ConstantAsMetadata::get(), and wrapConstantAsMetadata().
|
inlinestatic |
Definition at line 370 of file Metadata.h.
Referenced by llvm::ConstantAsMetadata::getIfExists().
|
inline |
Definition at line 380 of file Metadata.h.
References From, and llvm::Value::getContext().
|
static |
Definition at line 367 of file Metadata.cpp.
References assert(), llvm::Value::getContext(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValuesAsMetadata.
|
inlinestatic |
Definition at line 364 of file Metadata.h.
Referenced by llvm::LocalAsMetadata::get().
|
inlinestatic |
Definition at line 374 of file Metadata.h.
Referenced by llvm::LocalAsMetadata::getIfExists().
|
inline |
Definition at line 379 of file Metadata.h.
References llvm::Value::getType().
|
inline |
Definition at line 378 of file Metadata.h.
Referenced by forEachUser(), getOptimizationFlags(), llvm::ConstantAsMetadata::getValue(), handleDeletion(), handleRAUW(), and llvm::ValueEnumerator::print().
|
static |
Definition at line 372 of file Metadata.cpp.
References assert(), llvm::Type::getContext(), llvm::Value::getType(), getValue(), I, llvm::LLVMContext::pImpl, replaceAllUsesWith(), llvm::SPII::Store, and llvm::LLVMContextImpl::ValuesAsMetadata.
Referenced by llvm::Value::~Value().
Definition at line 391 of file Metadata.cpp.
References assert(), C, llvm::ConstantAsMetadata::get(), llvm::Type::getContext(), getLocalFunctionMetadata(), llvm::Value::getType(), getValue(), I, llvm::Value::IsUsedByMD, replaceAllUsesWith(), and llvm::SPII::Store.
Referenced by contains(), and getStartOrEndSlot().
|
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 391 of file Metadata.h.
References llvm::ReplaceableMetadataImpl::replaceAllUsesWith().
Referenced by handleDeletion(), and handleRAUW().
|
friend |
Definition at line 340 of file Metadata.h.
|
friend |
Definition at line 339 of file Metadata.h.