LLVM API Documentation
#include <MDBuilder.h>
Classes | |
| struct | TBAAStructField |
Public Member Functions | |
| MDBuilder (LLVMContext &context) | |
| MDString * | createString (StringRef Str) |
| Return the given string as metadata. | |
| MDNode * | createFPMath (float Accuracy) |
| Return metadata with the given settings. The special value 0.0 for the Accuracy parameter indicates the default (maximal precision) setting. | |
| MDNode * | createBranchWeights (uint32_t TrueWeight, uint32_t FalseWeight) |
| Return metadata containing two branch weights. | |
| MDNode * | createBranchWeights (ArrayRef< uint32_t > Weights) |
| Return metadata containing a number of branch weights. | |
| MDNode * | createRange (const APInt &Lo, const APInt &Hi) |
| Return metadata describing the range [Lo, Hi). | |
| MDNode * | createAnonymousTBAARoot () |
| Return metadata appropriate for a TBAA root node. Each returned node is distinct from all other metadata and will never be identified (uniqued) with anything else. | |
| MDNode * | createTBAARoot (StringRef Name) |
| Return metadata appropriate for a TBAA root node with the given name. This may be identified (uniqued) with other roots with the same name. | |
| MDNode * | createTBAANode (StringRef Name, MDNode *Parent, bool isConstant=false) |
| Return metadata for a non-root TBAA node with the given name, parent in the TBAA tree, and value for 'pointsToConstantMemory'. | |
| MDNode * | createTBAAStructNode (ArrayRef< TBAAStructField > Fields) |
| Return metadata for a tbaa.struct node with the given struct field descriptions. | |
| MDNode * | createTBAAStructTypeNode (StringRef Name, ArrayRef< std::pair< MDNode *, uint64_t > > Fields) |
| Return metadata for a TBAA struct node in the type DAG with the given name, a list of pairs (offset, field type in the type DAG). | |
| MDNode * | createTBAAScalarTypeNode (StringRef Name, MDNode *Parent, uint64_t Offset=0) |
| Return metadata for a TBAA scalar type node with the given name, an offset and a parent in the TBAA type DAG. | |
| MDNode * | createTBAAStructTagNode (MDNode *BaseType, MDNode *AccessType, uint64_t Offset) |
| Return metadata for a TBAA tag node with the given base type, access type and offset relative to the base type. | |
Definition at line 27 of file MDBuilder.h.
| llvm::MDBuilder::MDBuilder | ( | LLVMContext & | context | ) | [inline] |
Definition at line 31 of file MDBuilder.h.
| MDNode* llvm::MDBuilder::createAnonymousTBAARoot | ( | ) | [inline] |
Return metadata appropriate for a TBAA root node. Each returned node is distinct from all other metadata and will never be identified (uniqued) with anything else.
Definition at line 102 of file MDBuilder.h.
References llvm::MDNode::deleteTemporary(), Dummy, llvm::MDNode::get(), llvm::MDNode::getTemporary(), and llvm::MDNode::replaceOperandWith().
| MDNode* llvm::MDBuilder::createBranchWeights | ( | uint32_t | TrueWeight, |
| uint32_t | FalseWeight | ||
| ) | [inline] |
Return metadata containing two branch weights.
Definition at line 58 of file MDBuilder.h.
Return metadata containing a number of branch weights.
Definition at line 64 of file MDBuilder.h.
References createString(), llvm::ConstantInt::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), and llvm::ArrayRef< T >::size().
| MDNode* llvm::MDBuilder::createFPMath | ( | float | Accuracy | ) | [inline] |
Return metadata with the given settings. The special value 0.0 for the Accuracy parameter indicates the default (maximal precision) setting.
Definition at line 45 of file MDBuilder.h.
References llvm::MDNode::get(), llvm::ConstantFP::get(), and llvm::Type::getFloatTy().
Return metadata describing the range [Lo, Hi).
Definition at line 82 of file MDBuilder.h.
References llvm::IntegerType::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), and llvm::APInt::getBitWidth().
Return the given string as metadata.
Definition at line 34 of file MDBuilder.h.
References llvm::MDString::get().
Referenced by createBranchWeights(), createTBAANode(), createTBAARoot(), createTBAAScalarTypeNode(), and createTBAAStructTypeNode().
| MDNode* llvm::MDBuilder::createTBAANode | ( | StringRef | Name, |
| MDNode * | Parent, | ||
| bool | isConstant = false |
||
| ) | [inline] |
Return metadata for a non-root TBAA node with the given name, parent in the TBAA tree, and value for 'pointsToConstantMemory'.
Definition at line 126 of file MDBuilder.h.
References createString(), llvm::ConstantInt::get(), llvm::MDNode::get(), and llvm::Type::getInt64Ty().
Return metadata appropriate for a TBAA root node with the given name. This may be identified (uniqued) with other roots with the same name.
Definition at line 120 of file MDBuilder.h.
References createString(), and llvm::MDNode::get().
| MDNode* llvm::MDBuilder::createTBAAScalarTypeNode | ( | StringRef | Name, |
| MDNode * | Parent, | ||
| uint64_t | Offset = 0 |
||
| ) | [inline] |
Return metadata for a TBAA scalar type node with the given name, an offset and a parent in the TBAA type DAG.
Definition at line 175 of file MDBuilder.h.
References createString(), llvm::IntegerType::get(), llvm::ConstantInt::get(), and llvm::MDNode::get().
| MDNode* llvm::MDBuilder::createTBAAStructNode | ( | ArrayRef< TBAAStructField > | Fields | ) | [inline] |
Return metadata for a tbaa.struct node with the given struct field descriptions.
Definition at line 148 of file MDBuilder.h.
References llvm::IntegerType::get(), llvm::ConstantInt::get(), llvm::MDNode::get(), and llvm::ArrayRef< T >::size().
| MDNode* llvm::MDBuilder::createTBAAStructTagNode | ( | MDNode * | BaseType, |
| MDNode * | AccessType, | ||
| uint64_t | Offset | ||
| ) | [inline] |
Return metadata for a TBAA tag node with the given base type, access type and offset relative to the base type.
Definition at line 187 of file MDBuilder.h.
References llvm::IntegerType::get(), llvm::ConstantInt::get(), and llvm::MDNode::get().
| MDNode* llvm::MDBuilder::createTBAAStructTypeNode | ( | StringRef | Name, |
| ArrayRef< std::pair< MDNode *, uint64_t > > | Fields | ||
| ) | [inline] |
Return metadata for a TBAA struct node in the type DAG with the given name, a list of pairs (offset, field type in the type DAG).
Definition at line 161 of file MDBuilder.h.
References createString(), llvm::IntegerType::get(), llvm::ConstantInt::get(), and llvm::MDNode::get().