LLVM API Documentation

Public Member Functions | Static Public Member Functions | Friends
llvm::MDNode Class Reference

A tuple of other values. More...

#include <Metadata.h>

Inheritance diagram for llvm::MDNode:
Inheritance graph
Collaboration diagram for llvm::MDNode:
Collaboration graph

List of all members.

Public Member Functions

void replaceOperandWith (unsigned i, Value *NewVal)
 Replace a specific operand.
ValuegetOperand (unsigned i) const LLVM_READONLY
 Return specified operand.
unsigned getNumOperands () const
 Return number of MDNode operands.
bool isFunctionLocal () const
 Return whether MDNode is local to a function.
const FunctiongetFunction () const
 Return the first function-local operand's function.
void Profile (FoldingSetNodeID &ID) const
 Calculate a unique identifier for this MDNode.
bool isTBAAVtableAccess () const
 Check whether MDNode is a vtable access.

Static Public Member Functions

static MDNodeget (LLVMContext &Context, ArrayRef< Value * > Vals)
static MDNodegetWhenValsUnresolved (LLVMContext &Context, ArrayRef< Value * > Vals, bool isFunctionLocal)
 Construct MDNode with an explicit function-localness.
static MDNodegetIfExists (LLVMContext &Context, ArrayRef< Value * > Vals)
static MDNodegetTemporary (LLVMContext &Context, ArrayRef< Value * > Vals)
 Return a temporary MDNode.
static void deleteTemporary (MDNode *N)
 Deallocate a node created by getTemporary.
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:
static MDNodeconcatenate (MDNode *A, MDNode *B)
 Methods for metadata merging.
static MDNodeintersect (MDNode *A, MDNode *B)
static MDNodegetMostGenericTBAA (MDNode *A, MDNode *B)
static AAMDNodes getMostGenericAA (const AAMDNodes &A, const AAMDNodes &B)
static MDNodegetMostGenericFPMath (MDNode *A, MDNode *B)
static MDNodegetMostGenericRange (MDNode *A, MDNode *B)


class MDNodeOperand
class LLVMContextImpl
struct FoldingSetTrait< MDNode >

Detailed Description

A tuple of other values.

Definition at line 119 of file Metadata.h.

Member Function Documentation

static bool llvm::MDNode::classof ( const Value V) [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 209 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 406 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]
MDNode * MDNode::get ( LLVMContext Context,
ArrayRef< Value * >  Vals 
) [static]

Definition at line 266 of file Metadata.cpp.

Referenced by AddAliasScopeMetadata(), llvm::Module::addModuleFlag(), AddOperand(), llvm::DebugRecVH::allUsesReplacedWith(), llvm::cleanseInlinedVariable(), CloneAliasScopeMetadata(), CloneLoopBlocks(), concatenate(), llvm::DILocation::copyWithNewScope(), llvm::MDBuilder::createAliasScope(), llvm::MDBuilder::createAliasScopeDomain(), llvm::MDBuilder::createAnonymousAARoot(), llvm::DIBuilder::createArrayType(), llvm::DIBuilder::createBasicType(), llvm::MDBuilder::createBranchWeights(), llvm::DIBuilder::createClassType(), llvm::DIBuilder::createCompileUnit(), llvm::DIBuilder::createEnumerationType(), llvm::DIBuilder::createEnumerator(), llvm::DIBuilder::createExpression(), 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::createPointerType(), llvm::DIBuilder::createQualifiedType(), llvm::MDBuilder::createRange(), llvm::DIBuilder::createReferenceType(), llvm::DIBuilder::createStaticMemberType(), 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(), createTypeWithFlags(), llvm::DIBuilder::createUnionType(), llvm::DIBuilder::createUnspecifiedType(), llvm::DIBuilder::createVectorType(), llvm::DebugRecVH::deleted(), 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().

Return the first function-local operand's function.

If this metadata is function-local and recursively has a function-local operand, return the first such operand's parent function. Otherwise, return null. getFunction() should not be used for performance- critical code because it recursively visits all the MDNode's operands.

Definition at line 190 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 276 of file Metadata.cpp.

Referenced by llvm::FindAllocaDbgDeclare().

MDNode * MDNode::getMostGenericFPMath ( MDNode A,
MDNode B 
) [static]

Definition at line 441 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]
MDNode * MDNode::getMostGenericTBAA ( MDNode A,
MDNode B 
) [static]
MDNode * MDNode::getTemporary ( LLVMContext Context,
ArrayRef< Value * >  Vals 
) [static]
MDNode * MDNode::getWhenValsUnresolved ( LLVMContext Context,
ArrayRef< Value * >  Vals,
bool  isFunctionLocal 
) [static]

Construct MDNode with an explicit function-localness.

Don't analyze Vals; trust isFunctionLocal.

Definition at line 270 of file Metadata.cpp.

MDNode * MDNode::intersect ( MDNode A,
MDNode B 
) [static]
bool llvm::MDNode::isFunctionLocal ( ) const [inline]

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

Calculate a unique identifier for this MDNode.

Definition at line 310 of file Metadata.cpp.

References llvm::FoldingSetNodeID::AddPointer(), getNumOperands(), and getOperand().

Referenced by llvm::FoldingSetTrait< MDNode >::Equals().

void MDNode::replaceOperandWith ( unsigned  i,
Value NewVal 

Friends And Related Function Documentation

friend struct FoldingSetTrait< MDNode > [friend]

Definition at line 124 of file Metadata.h.

friend class LLVMContextImpl [friend]

Definition at line 123 of file Metadata.h.

friend class MDNodeOperand [friend]

Definition at line 122 of file Metadata.h.

Referenced by getTemporary().

The documentation for this class was generated from the following files: