LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::MDNode Class Reference

MDNode - a tuple of other values. More...

#include <Metadata.h>

Inheritance diagram for llvm::MDNode:
Inheritance graph
[legend]
Collaboration diagram for llvm::MDNode:
Collaboration graph
[legend]

Public Member Functions

void replaceOperandWith (unsigned i, Value *NewVal)
 replaceOperandWith - Replace a specific operand. More...
 
ValuegetOperand (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 FunctiongetFunction () const
 
void Profile (FoldingSetNodeID &ID) const
 
bool isTBAAVtableAccess () const
 Check whether MDNode is a vtable access. More...
 
- Public Member Functions inherited from llvm::Value
virtual ~Value ()
 
void dump () const
 dump - Support for debugging, callable in GDB: V->dump() More...
 
void print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const
 
TypegetType () const
 
LLVMContextgetContext () const
 All values hold a context through their type. More...
 
bool hasName () const
 
ValueNamegetValueName () 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
 
Useruse_back ()
 
const Useruse_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
 
ValuestripPointerCasts ()
 Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More...
 
const ValuestripPointerCasts () const
 
ValuestripPointerCastsNoFollowAliases ()
 Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More...
 
const ValuestripPointerCastsNoFollowAliases () const
 
ValuestripInBoundsConstantOffsets ()
 Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More...
 
const ValuestripInBoundsConstantOffsets () const
 
ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset)
 Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More...
 
const ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const
 
ValuestripInBoundsOffsets ()
 Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More...
 
const ValuestripInBoundsOffsets () const
 
bool isDereferenceablePointer () const
 
ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB)
 
const ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const
 
void mutateType (Type *Ty)
 
- Public Member Functions inherited from llvm::FoldingSetImpl::Node
 Node ()
 
void * getNextInBucket () const
 
void SetNextInBucket (void *N)
 

Static Public Member Functions

static MDNodeget (LLVMContext &Context, ArrayRef< Value * > Vals)
 
static MDNodegetWhenValsUnresolved (LLVMContext &Context, ArrayRef< Value * > Vals, bool isFunctionLocal)
 
static MDNodegetIfExists (LLVMContext &Context, ArrayRef< Value * > Vals)
 
static MDNodegetTemporary (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 MDNodegetMostGenericTBAA (MDNode *A, MDNode *B)
 Methods for metadata merging. More...
 
static MDNodegetMostGenericFPMath (MDNode *A, MDNode *B)
 
static MDNodegetMostGenericRange (MDNode *A, MDNode *B)
 

Friends

class MDNodeOperand
 
class LLVMContextImpl
 
struct FoldingSetTrait< MDNode >
 

Additional Inherited Members

- Public Types inherited from llvm::Value
enum  ValueTy {
  ArgumentVal, BasicBlockVal, FunctionVal, GlobalAliasVal,
  GlobalVariableVal, UndefValueVal, BlockAddressVal, ConstantExprVal,
  ConstantAggregateZeroVal, ConstantDataArrayVal, ConstantDataVectorVal, ConstantIntVal,
  ConstantFPVal, ConstantArrayVal, ConstantStructVal, ConstantVectorVal,
  ConstantPointerNullVal, MDNodeVal, MDStringVal, InlineAsmVal,
  PseudoSourceValueVal, FixedStackPseudoSourceValueVal, InstructionVal, ConstantFirstVal = FunctionVal,
  ConstantLastVal = ConstantPointerNullVal
}
 
typedef value_use_iterator< Useruse_iterator
 
typedef value_use_iterator
< const User
const_use_iterator
 
- Static Public Attributes inherited from llvm::Value
static const unsigned MaximumAlignment = 1u << 29
 
- Protected Member Functions inherited from llvm::Value
virtual void printCustom (raw_ostream &O) const
 
 Value (Type *Ty, unsigned scid)
 
unsigned short getSubclassDataFromValue () const
 
void setValueSubclassData (unsigned short D)
 
- Protected Attributes inherited from llvm::Value
unsigned char SubclassOptionalData: 7
 

Detailed Description

MDNode - a tuple of other values.

Definition at line 69 of file Metadata.h.

Member Function Documentation

static bool llvm::MDNode::classof ( const Value V)
inlinestatic

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.

void MDNode::deleteTemporary ( MDNode N)
static
MDNode * MDNode::get ( LLVMContext Context,
ArrayRef< Value * >  Vals 
)
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
MDNode * MDNode::getIfExists ( LLVMContext Context,
ArrayRef< Value * >  Vals 
)
static

Definition at line 278 of file Metadata.cpp.

Referenced by llvm::FindAllocaDbgDeclare().

MDNode * MDNode::getMostGenericFPMath ( MDNode A,
MDNode B 
)
static
MDNode * MDNode::getMostGenericRange ( MDNode A,
MDNode B 
)
static
MDNode * MDNode::getMostGenericTBAA ( MDNode A,
MDNode B 
)
static
unsigned llvm::MDNode::getNumOperands ( ) const
inline
Value * MDNode::getOperand ( unsigned  i) const
MDNode * MDNode::getTemporary ( LLVMContext Context,
ArrayRef< Value * >  Vals 
)
static
MDNode * MDNode::getWhenValsUnresolved ( LLVMContext Context,
ArrayRef< Value * >  Vals,
bool  isFunctionLocal 
)
static

Definition at line 272 of file Metadata.cpp.

bool llvm::MDNode::isFunctionLocal ( ) const
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().

void MDNode::replaceOperandWith ( unsigned  i,
Value NewVal 
)

Friends And Related Function Documentation

friend struct FoldingSetTrait< MDNode >
friend

Definition at line 74 of file Metadata.h.

friend class LLVMContextImpl
friend

Definition at line 73 of file Metadata.h.

friend class MDNodeOperand
friend

Definition at line 72 of file Metadata.h.

Referenced by getTemporary().


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