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. | |
Value * | getOperand (unsigned i) const LLVM_READONLY |
getOperand - Return specified operand. | |
unsigned | getNumOperands () const |
getNumOperands - Return number of MDNode operands. | |
bool | isFunctionLocal () const |
isFunctionLocal - Return whether MDNode is local to a function. | |
const Function * | getFunction () const |
void | Profile (FoldingSetNodeID &ID) const |
bool | isTBAAVtableAccess () const |
Check whether MDNode is a vtable access. | |
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: | |
static MDNode * | concatenate (MDNode *A, MDNode *B) |
Methods for metadata merging. | |
static MDNode * | intersect (MDNode *A, MDNode *B) |
static MDNode * | getMostGenericTBAA (MDNode *A, MDNode *B) |
static AAMDNodes | getMostGenericAA (const AAMDNodes &A, const AAMDNodes &B) |
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 126 of file Metadata.h.
static bool llvm::MDNode::classof | ( | const Value * | V | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 217 of file Metadata.h.
References llvm::Value::getValueID(), and llvm::Value::MDNodeVal.
MDNode * MDNode::concatenate | ( | MDNode * | A, |
MDNode * | B | ||
) | [static] |
Methods for metadata merging.
Definition at line 409 of file Metadata.cpp.
References llvm::ARM_PROC::A, get(), llvm::Value::getContext(), getNumOperands(), and getOperand().
Referenced by AddAliasScopeMetadata(), and CloneAliasScopeMetadata().
void MDNode::deleteTemporary | ( | MDNode * | N | ) | [static] |
deleteTemporary - Deallocate a node created by getTemporary. The node must not have any users.
Definition at line 293 of file Metadata.cpp.
References llvm::SmallPtrSetImpl< PtrType >::erase(), llvm::Value::getContext(), llvm::Value::getSubclassDataFromValue(), llvm::LLVMContextImpl::MDNodeSet, llvm::LLVMContextImpl::NonUniquedMDNodes, llvm::LLVMContext::pImpl, llvm::LeakDetector::removeGarbageObject(), llvm::FoldingSetImpl::RemoveNode(), and llvm::Value::use_empty().
Referenced by llvm::BitcodeReaderMDValueList::AssignValue(), CloneAliasScopeMetadata(), llvm::MDBuilder::createAnonymousAARoot(), llvm::MapValue(), and llvm::DIDescriptor::replaceAllUsesWith().
MDNode * MDNode::get | ( | LLVMContext & | Context, |
ArrayRef< Value * > | Vals | ||
) | [static] |
Definition at line 269 of file Metadata.cpp.
Referenced by AddAliasScopeMetadata(), llvm::Module::addModuleFlag(), AddOperand(), llvm::DebugRecVH::allUsesReplacedWith(), llvm::cleanseInlinedVariable(), CloneAliasScopeMetadata(), concatenate(), llvm::DILocation::copyWithNewScope(), llvm::MDBuilder::createAliasScope(), llvm::MDBuilder::createAliasScopeDomain(), llvm::MDBuilder::createAnonymousAARoot(), 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::DIBuilder::createForwardDecl(), llvm::MDBuilder::createFPMath(), llvm::DIBuilder::createFriend(), llvm::DIBuilder::createFunction(), llvm::DIBuilder::createGlobalVariable(), 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::createUnspecifiedType(), llvm::DIBuilder::createVariablePiece(), llvm::DIBuilder::createVectorType(), llvm::DebugRecVH::deleted(), llvm::getEntireVariable(), getMostGenericRange(), getMostGenericTBAA(), llvm::DIBuilder::getOrCreateArray(), llvm::DIBuilder::getOrCreateSubrange(), llvm::DIBuilder::getOrCreateTypeArray(), llvm::DIBuilder::insertDbgValueIntrinsic(), llvm::DIBuilder::insertDeclare(), intersect(), LLVMMDNodeInContext(), llvm::MapValue(), llvm::DIDescriptor::replaceAllUsesWith(), SetLoopAlreadyUnrolled(), llvm::BranchInst::swapSuccessors(), llvm::UpgradeInstWithTBAATag(), and llvm::UpgradeIntrinsicCall().
const Function * MDNode::getFunction | ( | ) | const |
Definition at line 192 of file Metadata.cpp.
References assertLocalFunction(), F(), getFunctionForValue(), getNumOperands(), getOperand(), and isFunctionLocal().
Referenced by llvm::LexicalScopes::findInlinedScope(), llvm::LexicalScopes::findLexicalScope(), llvm::ValueEnumerator::incorporateFunction(), and llvm::Value::print().
MDNode * MDNode::getIfExists | ( | LLVMContext & | Context, |
ArrayRef< Value * > | Vals | ||
) | [static] |
Definition at line 279 of file Metadata.cpp.
Referenced by llvm::FindAllocaDbgDeclare().
static AAMDNodes llvm::MDNode::getMostGenericAA | ( | const AAMDNodes & | A, |
const AAMDNodes & | B | ||
) | [static] |
MDNode * MDNode::getMostGenericFPMath | ( | MDNode * | A, |
MDNode * | B | ||
) | [static] |
Definition at line 444 of file Metadata.cpp.
References llvm::APFloat::cmpLessThan, llvm::APFloat::compare(), and getOperand().
Referenced by llvm::combineMetadata().
MDNode * MDNode::getMostGenericRange | ( | MDNode * | A, |
MDNode * | B | ||
) | [static] |
Definition at line 490 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, typename >::size(), llvm::APInt::slt(), and tryMergeRange().
Referenced by llvm::combineMetadata().
MDNode * MDNode::getMostGenericTBAA | ( | MDNode * | A, |
MDNode * | B | ||
) | [static] |
Definition at line 560 of file TypeBasedAliasAnalysis.cpp.
References llvm::ARM_PROC::A, get(), llvm::Value::getContext(), getNumOperands(), getOperand(), isStructPathTBAA(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MipsISD::Ret, and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by llvm::combineMetadata(), and llvm::Instruction::getAAMetadata().
unsigned llvm::MDNode::getNumOperands | ( | ) | const [inline] |
getNumOperands - Return number of MDNode operands.
Definition at line 199 of file Metadata.h.
Referenced by llvm::Module::addModuleFlag(), AddOperand(), assertLocalFunction(), cacheAnnotationFromMD(), llvm::cleanseInlinedVariable(), CloneAliasScopeMetadata(), llvm::computeKnownBitsFromRangeMetadata(), concatenate(), 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(), llvm::DIVariable::getNumAddrElements(), llvm::DITypedArray< T >::getNumElements(), getOperand(), GetUnrollMetadata(), intersect(), llvm::Loop::isAnnotatedParallel(), isStructPathTBAA(), isTBAAVtableAccess(), LLVMGetMDNodeOperands(), Profile(), llvm::DICompositeType::setArrays(), SetLoopAlreadyUnrolled(), llvm::Loop::setLoopID(), UnrollCountPragmaValue(), llvm::UpgradeInstWithTBAATag(), VerifySubsetOf(), llvm::WriteConstantInternal(), WriteMDNode(), and llvm::WriteMDNodeComment().
Value * MDNode::getOperand | ( | unsigned | i | ) | const |
getOperand - Return specified operand.
Definition at line 308 of file Metadata.cpp.
References getNumOperands(), and getOperandPtr().
Referenced by llvm::Module::addModuleFlag(), AddOperand(), assertLocalFunction(), cacheAnnotationFromMD(), llvm::cleanseInlinedVariable(), CloneAliasScopeMetadata(), llvm::computeKnownBitsFromRangeMetadata(), concatenate(), llvm::ConstantFoldTerminator(), llvm::DIBuilder::createArtificialType(), llvm::createInlinedVariable(), llvm::DIBuilder::createObjectPointerType(), llvm::MachineInstr::emitError(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::TargetLoweringObjectFileCOFF::emitModuleFlags(), llvm::DIVariable::getAddrElement(), GetBranchWeights(), getField(), llvm::FPMathOperator::getFPAccuracy(), getFunction(), llvm::Loop::getLoopID(), getMostGenericFPMath(), getMostGenericRange(), getMostGenericTBAA(), GetUnrollMetadata(), HasBranchWeights(), intersect(), llvm::Loop::isAnnotatedParallel(), isStructPathTBAA(), isTBAAVtableAccess(), LLVMGetMDNodeOperands(), llvm::MachineInstr::print(), Profile(), SetLoopAlreadyUnrolled(), llvm::Loop::setLoopID(), UnrollCountPragmaValue(), llvm::UpgradeInstWithTBAATag(), VerifySubsetOf(), WriteMDNode(), and llvm::WriteMDNodeComment().
MDNode * MDNode::getTemporary | ( | LLVMContext & | Context, |
ArrayRef< Value * > | Vals | ||
) | [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 283 of file Metadata.cpp.
References llvm::LeakDetector::addGarbageObject(), llvm::Value::getSubclassDataFromValue(), llvm::LibFunc::malloc, MDNodeOperand, and llvm::ArrayRef< T >::size().
Referenced by CloneAliasScopeMetadata(), llvm::MDBuilder::createAnonymousAARoot(), llvm::DIBuilder::createCompileUnit(), createFunctionHelper(), llvm::DIBuilder::createReplaceableForwardDecl(), llvm::DIBuilder::createTempFunctionFwdDecl(), llvm::DIBuilder::createTempStaticVariableFwdDecl(), llvm::BitcodeReaderMDValueList::getValueFwdRef(), and llvm::MapValue().
MDNode * MDNode::getWhenValsUnresolved | ( | LLVMContext & | Context, |
ArrayRef< Value * > | Vals, | ||
bool | isFunctionLocal | ||
) | [static] |
Definition at line 273 of file Metadata.cpp.
MDNode * MDNode::intersect | ( | MDNode * | A, |
MDNode * | B | ||
) | [static] |
Definition at line 427 of file Metadata.cpp.
References get(), llvm::Value::getContext(), getNumOperands(), getOperand(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
Referenced by llvm::combineMetadata(), and llvm::Instruction::getAAMetadata().
bool llvm::MDNode::isFunctionLocal | ( | ) | const [inline] |
isFunctionLocal - Return whether MDNode is local to a function.
Definition at line 202 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 541 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 313 of file Metadata.cpp.
References llvm::FoldingSetNodeID::AddPointer(), getNumOperands(), and getOperand().
Referenced by llvm::FoldingSetTrait< MDNode >::Equals().
void MDNode::replaceOperandWith | ( | unsigned | i, |
Value * | NewVal | ||
) |
replaceOperandWith - Replace a specific operand.
Definition at line 109 of file Metadata.cpp.
References getOperandPtr().
Referenced by llvm::MDBuilder::createAnonymousAARoot(), llvm::DIDescriptor::replaceFunctionField(), llvm::DICompositeType::setContainingType(), and SetLoopAlreadyUnrolled().
friend struct FoldingSetTrait< MDNode > [friend] |
Definition at line 131 of file Metadata.h.
friend class LLVMContextImpl [friend] |
Definition at line 130 of file Metadata.h.
friend class MDNodeOperand [friend] |
Definition at line 129 of file Metadata.h.
Referenced by getTemporary().