LLVM API Documentation
MDNode - a tuple of other values. More...
#include <Metadata.h>
Public Member Functions | |
void | replaceOperandWith (unsigned i, Value *NewVal) |
replaceOperandWith - Replace a specific operand. More... | |
Value * | getOperand (unsigned i) const LLVM_READONLY |
getOperand - Return specified operand. More... | |
unsigned | getNumOperands () const |
getNumOperands - Return number of MDNode operands. More... | |
bool | isFunctionLocal () const |
isFunctionLocal - Return whether MDNode is local to a function. More... | |
const Function * | getFunction () const |
void | Profile (FoldingSetNodeID &ID) const |
bool | isTBAAVtableAccess () const |
Check whether MDNode is a vtable access. More... | |
![]() | |
virtual | ~Value () |
void | dump () const |
dump - Support for debugging, callable in GDB: V->dump() More... | |
void | print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const |
Type * | getType () const |
LLVMContext & | getContext () const |
All values hold a context through their type. More... | |
bool | hasName () const |
ValueName * | getValueName () const |
void | setValueName (ValueName *VN) |
StringRef | getName () const |
void | setName (const Twine &Name) |
void | takeName (Value *V) |
void | replaceAllUsesWith (Value *V) |
bool | use_empty () const |
use_iterator | use_begin () |
const_use_iterator | use_begin () const |
use_iterator | use_end () |
const_use_iterator | use_end () const |
User * | use_back () |
const User * | use_back () const |
bool | hasOneUse () const |
bool | hasNUses (unsigned N) const |
bool | hasNUsesOrMore (unsigned N) const |
bool | isUsedInBasicBlock (const BasicBlock *BB) const |
unsigned | getNumUses () const |
void | addUse (Use &U) |
unsigned | getValueID () const |
unsigned | getRawSubclassOptionalData () const |
void | clearSubclassOptionalData () |
bool | hasSameSubclassOptionalData (const Value *V) const |
void | intersectOptionalDataWith (const Value *V) |
bool | hasValueHandle () const |
Value * | stripPointerCasts () |
Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCasts () const |
Value * | stripPointerCastsNoFollowAliases () |
Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCastsNoFollowAliases () const |
Value * | stripInBoundsConstantOffsets () |
Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsConstantOffsets () const |
Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More... | |
const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
Value * | stripInBoundsOffsets () |
Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsOffsets () const |
bool | isDereferenceablePointer () const |
Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
void | mutateType (Type *Ty) |
![]() | |
Node () | |
void * | getNextInBucket () const |
void | SetNextInBucket (void *N) |
Static Public Member Functions | |
static MDNode * | get (LLVMContext &Context, ArrayRef< Value * > Vals) |
static MDNode * | getWhenValsUnresolved (LLVMContext &Context, ArrayRef< Value * > Vals, bool isFunctionLocal) |
static MDNode * | getIfExists (LLVMContext &Context, ArrayRef< Value * > Vals) |
static MDNode * | getTemporary (LLVMContext &Context, ArrayRef< Value * > Vals) |
static void | deleteTemporary (MDNode *N) |
static bool | classof (const Value *V) |
Methods for support type inquiry through isa, cast, and dyn_cast: More... | |
static MDNode * | getMostGenericTBAA (MDNode *A, MDNode *B) |
Methods for metadata merging. More... | |
static MDNode * | getMostGenericFPMath (MDNode *A, MDNode *B) |
static MDNode * | getMostGenericRange (MDNode *A, MDNode *B) |
Friends | |
class | MDNodeOperand |
class | LLVMContextImpl |
struct | FoldingSetTrait< MDNode > |
MDNode - a tuple of other values.
Definition at line 69 of file Metadata.h.
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 160 of file Metadata.h.
References llvm::Value::getValueID(), and llvm::Value::MDNodeVal.
|
static |
deleteTemporary - Deallocate a node created by getTemporary. The node must not have any users.
Definition at line 292 of file Metadata.cpp.
References llvm::Value::getContext(), llvm::Value::getSubclassDataFromValue(), llvm::LLVMContextImpl::MDNodeSet, llvm::LLVMContextImpl::NonUniquedMDNodes, llvm::LLVMContext::pImpl, llvm::LeakDetector::removeGarbageObject(), and llvm::Value::use_empty().
Referenced by llvm::BitcodeReaderMDValueList::AssignValue(), llvm::MDBuilder::createAnonymousTBAARoot(), llvm::MapValue(), and llvm::DIType::replaceAllUsesWith().
|
static |
Definition at line 268 of file Metadata.cpp.
Referenced by llvm::DICompositeType::addMember(), llvm::Module::addModuleFlag(), llvm::DebugRecVH::allUsesReplacedWith(), AppendMDNodeToInstForPtr(), AppendMDNodeToSourcePtr(), llvm::cleanseInlinedVariable(), llvm::MDBuilder::createAnonymousTBAARoot(), llvm::DIBuilder::createArrayType(), llvm::DIBuilder::createArtificialType(), llvm::DIBuilder::createBasicType(), llvm::MDBuilder::createBranchWeights(), llvm::DIBuilder::createClassType(), llvm::DIBuilder::createCompileUnit(), llvm::DIBuilder::createComplexVariable(), llvm::DIBuilder::createEnumerationType(), llvm::DIBuilder::createEnumerator(), llvm::DIBuilder::createFile(), createFilePathPair(), llvm::MDBuilder::createFPMath(), llvm::DIBuilder::createFriend(), llvm::DIBuilder::createFunction(), llvm::DIBuilder::createGlobalVariable(), llvm::DIBuilder::createImportedDeclaration(), createImportedModule(), llvm::DIBuilder::createInheritance(), llvm::createInlinedVariable(), llvm::DIBuilder::createLexicalBlock(), llvm::DIBuilder::createLexicalBlockFile(), llvm::DIBuilder::createLocalVariable(), llvm::DIBuilder::createMemberPointerType(), llvm::DIBuilder::createMemberType(), llvm::DIBuilder::createMethod(), llvm::DIBuilder::createNameSpace(), llvm::DIBuilder::createObjCIVar(), llvm::DIBuilder::createObjCProperty(), llvm::DIBuilder::createObjectPointerType(), llvm::DIBuilder::createPointerType(), llvm::DIBuilder::createQualifiedType(), llvm::MDBuilder::createRange(), llvm::DIBuilder::createReferenceType(), llvm::DIBuilder::createStaticMemberType(), llvm::DIBuilder::createStaticVariable(), llvm::DIBuilder::createStructType(), llvm::DIBuilder::createSubroutineType(), llvm::MDBuilder::createTBAANode(), llvm::MDBuilder::createTBAARoot(), llvm::MDBuilder::createTBAAScalarTypeNode(), llvm::MDBuilder::createTBAAStructNode(), llvm::MDBuilder::createTBAAStructTagNode(), llvm::MDBuilder::createTBAAStructTypeNode(), llvm::DIBuilder::createTemplateTypeParameter(), llvm::DIBuilder::createTypedef(), llvm::DIBuilder::createUnionType(), llvm::DIBuilder::createUnspecifiedParameter(), llvm::DIBuilder::createUnspecifiedType(), llvm::DIBuilder::createVectorType(), llvm::DebugRecVH::deleted(), llvm::DebugLoc::getAsMDNode(), getMostGenericRange(), getMostGenericTBAA(), llvm::DIBuilder::getOrCreateArray(), llvm::DIBuilder::getOrCreateSubrange(), llvm::DIBuilder::insertDbgValueIntrinsic(), llvm::DIBuilder::insertDeclare(), LLVMMDNodeInContext(), llvm::MapValue(), llvm::BranchInst::swapSuccessors(), llvm::UpgradeInstWithTBAATag(), and llvm::UpgradeIntrinsicCall().
const Function * MDNode::getFunction | ( | ) | const |
Definition at line 190 of file Metadata.cpp.
References assertLocalFunction(), F(), getFunctionForValue(), getNumOperands(), getOperand(), and isFunctionLocal().
Referenced by llvm::ValueEnumerator::incorporateFunction(), and llvm::Value::print().
|
static |
Definition at line 278 of file Metadata.cpp.
Referenced by llvm::FindAllocaDbgDeclare().
Definition at line 408 of file Metadata.cpp.
References llvm::APFloat::cmpLessThan, llvm::APFloat::compare(), and getOperand().
Referenced by patchReplacementInstruction().
Definition at line 454 of file Metadata.cpp.
References llvm::ARM_PROC::A, addRange(), get(), llvm::Value::getContext(), getNumOperands(), getOperand(), llvm::ConstantInt::getValue(), llvm::ConstantRange::isFullSet(), llvm::SmallVectorImpl< T >::resize(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::APInt::slt(), and tryMergeRange().
Referenced by patchReplacementInstruction().
Methods for metadata merging.
Definition at line 556 of file TypeBasedAliasAnalysis.cpp.
References llvm::ARM_PROC::A, llvm::IntegerType::get(), llvm::ConstantInt::get(), get(), llvm::Value::getContext(), getNumOperands(), getOperand(), isStructPathTBAA(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::AArch64ISD::Ret, and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by patchReplacementInstruction().
|
inline |
getNumOperands - Return number of MDNode operands.
Definition at line 142 of file Metadata.h.
Referenced by llvm::Module::addModuleFlag(), AppendMDNodeToSourcePtr(), assertLocalFunction(), cacheAnnotationFromMD(), llvm::cleanseInlinedVariable(), llvm::computeMaskedBitsLoad(), llvm::ConstantFoldTerminator(), llvm::DIBuilder::createArtificialType(), llvm::createInlinedVariable(), llvm::DIBuilder::createObjectPointerType(), llvm::MachineInstr::emitError(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), GetBranchWeights(), getField(), getFunction(), llvm::Loop::getLoopID(), getMostGenericRange(), getMostGenericTBAA(), getOperand(), llvm::Loop::isAnnotatedParallel(), isStructPathTBAA(), isTBAAVtableAccess(), LLVMGetMDNodeOperands(), Profile(), llvm::Loop::setLoopID(), llvm::UpgradeInstWithTBAATag(), VerifySubsetOf(), llvm::WriteConstantInternal(), WriteMDNode(), and llvm::WriteMDNodeComment().
getOperand - Return specified operand.
Definition at line 307 of file Metadata.cpp.
References getNumOperands(), and getOperandPtr().
Referenced by llvm::Module::addModuleFlag(), AppendMDNodeToSourcePtr(), assertLocalFunction(), cacheAnnotationFromMD(), llvm::cleanseInlinedVariable(), llvm::computeMaskedBitsLoad(), llvm::ConstantFoldTerminator(), llvm::DIBuilder::createArtificialType(), llvm::createInlinedVariable(), llvm::DIBuilder::createObjectPointerType(), llvm::MachineInstr::emitError(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), llvm::FindAvailableLoadedValue(), GetBranchWeights(), getField(), llvm::FPMathOperator::getFPAccuracy(), getFunction(), llvm::Loop::getLoopID(), llvm::Module::getModuleFlagsMetadata(), getMostGenericFPMath(), getMostGenericRange(), getMostGenericTBAA(), HasBranchWeights(), llvm::Loop::isAnnotatedParallel(), isStructPathTBAA(), isTBAAVtableAccess(), LLVMGetMDNodeOperands(), llvm::MachineInstr::print(), Profile(), llvm::Loop::setLoopID(), llvm::DICompositeType::setTypeArray(), llvm::UpgradeInstWithTBAATag(), VerifySubsetOf(), WriteMDNode(), and llvm::WriteMDNodeComment().
|
static |
getTemporary - Return a temporary MDNode, for use in constructing cyclic MDNode structures. A temporary MDNode is not uniqued, may be RAUW'd, and must be manually deleted with deleteTemporary.
Definition at line 282 of file Metadata.cpp.
References llvm::LeakDetector::addGarbageObject(), llvm::Value::getSubclassDataFromValue(), llvm::LibFunc::malloc, MDNodeOperand, N, and llvm::ArrayRef< T >::size().
Referenced by llvm::MDBuilder::createAnonymousTBAARoot(), llvm::DIBuilder::createCompileUnit(), llvm::DIBuilder::createForwardDecl(), llvm::DIBuilder::createFunction(), llvm::DIBuilder::createMethod(), llvm::BitcodeReaderMDValueList::getValueFwdRef(), and llvm::MapValue().
|
static |
Definition at line 272 of file Metadata.cpp.
|
inline |
isFunctionLocal - Return whether MDNode is local to a function.
Definition at line 145 of file Metadata.h.
References llvm::Value::getSubclassDataFromValue().
Referenced by llvm::NamedMDNode::addOperand(), assertLocalFunction(), getFunction(), llvm::ValueEnumerator::incorporateFunction(), and WriteMDNode().
bool MDNode::isTBAAVtableAccess | ( | ) | const |
Check whether MDNode is a vtable access.
Definition at line 537 of file TypeBasedAliasAnalysis.cpp.
References getNumOperands(), getOperand(), and isStructPathTBAA().
void MDNode::Profile | ( | FoldingSetNodeID & | ID | ) | const |
Profile - calculate a unique identifier for this MDNode to collapse duplicates
Definition at line 312 of file Metadata.cpp.
References llvm::FoldingSetNodeID::AddPointer(), getNumOperands(), and getOperand().
Referenced by llvm::FoldingSetTrait< MDNode >::Equals().
replaceOperandWith - Replace a specific operand.
Definition at line 108 of file Metadata.cpp.
References getOperandPtr().
Referenced by llvm::MDBuilder::createAnonymousTBAARoot(), llvm::DIDescriptor::replaceFunctionField(), llvm::DICompositeType::setContainingType(), and llvm::DICompositeType::setTypeArray().
|
friend |
Definition at line 74 of file Metadata.h.
|
friend |
Definition at line 73 of file Metadata.h.
|
friend |
Definition at line 72 of file Metadata.h.
Referenced by getTemporary().