LLVM  14.0.0git
Classes | Namespaces | Macros | Enumerations | Functions | Variables
Metadata.h File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/ilist_node.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/CBindingWrapping.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
#include "llvm/IR/Metadata.def"
Include dependency graph for Metadata.h:

Go to the source code of this file.

Classes

class  llvm::Metadata
 Root of the metadata hierarchy. More...
 
class  llvm::MetadataAsValue
 Metadata wrapper in the Value hierarchy. More...
 
class  llvm::MetadataTracking
 API for tracking metadata references through RAUW and deletion. More...
 
class  llvm::ReplaceableMetadataImpl
 Shared implementation of use-lists for replaceable metadata. More...
 
class  llvm::ValueAsMetadata
 Value wrapper in the Metadata hierarchy. More...
 
class  llvm::ConstantAsMetadata
 
class  llvm::LocalAsMetadata
 
struct  llvm::mdconst::detail::HasDereference< T, Result >
 
struct  llvm::mdconst::detail::HasDereference< T, Result >::SFINAE< N >
 
struct  llvm::mdconst::detail::IsValidPointer< V, M >
 
struct  llvm::mdconst::detail::IsValidReference< V, M >
 
class  llvm::MDString
 A single uniqued string. More...
 
struct  llvm::AAMDNodes
 A collection of metadata nodes that might be associated with a memory access used by the alias-analysis infrastructure. More...
 
struct  llvm::DenseMapInfo< AAMDNodes >
 
class  llvm::MDOperand
 Tracking metadata reference owned by Metadata. More...
 
struct  llvm::simplify_type< MDOperand >
 
struct  llvm::simplify_type< const MDOperand >
 
class  llvm::ContextAndReplaceableUses
 Pointer to the context, with optional RAUW support. More...
 
struct  llvm::TempMDNodeDeleter
 
class  llvm::MDNode
 Metadata node. More...
 
class  llvm::MDTuple
 Tuple of metadata. More...
 
class  llvm::AliasScopeNode
 This is a simple wrapper around an MDNode which provides a higher-level interface by hiding the details of how alias analysis information is encoded in its operands. More...
 
class  llvm::TypedMDOperandIterator< T >
 Typed iterator through MDNode operands. More...
 
class  llvm::MDTupleTypedArrayWrapper< T >
 Typed, array-like tuple of metadata. More...
 
class  llvm::DistinctMDOperandPlaceholder
 Placeholder metadata for operands of distinct MDNodes. More...
 
class  llvm::NamedMDNode
 A tuple of MDNodes. More...
 

Namespaces

 llvm
 This file implements support for optimizing divisions by a constant.
 
 llvm::mdconst
 Transitional API for extracting constants from Metadata.
 
 llvm::mdconst::detail
 

Macros

#define HANDLE_METADATA_LEAF(CLASS)   CLASS##Kind,
 
#define HANDLE_METADATA(CLASS)   class CLASS;
 
#define HANDLE_METADATA_LEAF(CLASS)
 
#define HANDLE_MDNODE_LEAF(CLASS)   using Temp##CLASS = std::unique_ptr<CLASS, TempMDNodeDeleter>;
 
#define HANDLE_MDNODE_BRANCH(CLASS)   HANDLE_MDNODE_LEAF(CLASS)
 
#define HANDLE_MDNODE_LEAF(CLASS)
 
#define HANDLE_METADATA(CLASS)   using CLASS##Array = MDTupleTypedArrayWrapper<CLASS>;
 

Enumerations

enum  llvm::LLVMConstants : uint32_t { llvm::DEBUG_METADATA_VERSION = 3 }
 

Functions

Metadata ** llvm::unwrap (LLVMMetadataRef *MDs)
 
raw_ostream & llvm::operator<< (raw_ostream &OS, const Metadata &MD)
 
template<class T >
Tllvm::mdconst::detail::make ()
 
template<class X , class Y >
std::enable_if_t< detail::IsValidPointer< X, Y >::value, bool > llvm::mdconst::hasa (Y &&MD)
 Check whether Metadata has a Value. More...
 
template<class X , class Y >
std::enable_if_t< detail::IsValidReference< X, Y & >::value, bool > llvm::mdconst::hasa (Y &MD)
 
template<class X , class Y >
std::enable_if_t< detail::IsValidPointer< X, Y >::value, X * > llvm::mdconst::extract (Y &&MD)
 Extract a Value from Metadata. More...
 
template<class X , class Y >
std::enable_if_t< detail::IsValidReference< X, Y & >::value, X * > llvm::mdconst::extract (Y &MD)
 
template<class X , class Y >
std::enable_if_t< detail::IsValidPointer< X, Y >::value, X * > llvm::mdconst::extract_or_null (Y &&MD)
 Extract a Value from Metadata, allowing null. More...
 
template<class X , class Y >
std::enable_if_t< detail::IsValidPointer< X, Y >::value, X * > llvm::mdconst::dyn_extract (Y &&MD)
 Extract a Value from Metadata, if any. More...
 
template<class X , class Y >
std::enable_if_t< detail::IsValidPointer< X, Y >::value, X * > llvm::mdconst::dyn_extract_or_null (Y &&MD)
 Extract a Value from Metadata, if any, allowing null. More...
 

Variables

const uint64_t llvm::NOMORE_ICP_MAGICNUM = -1
 Magic number in the value profile metadata showing a target has been promoted for the instruction and shouldn't be promoted again. More...
 

Detailed Description

This file contains the declarations for metadata subclasses. They represent the different flavors of metadata that live in LLVM.

Definition in file Metadata.h.

Macro Definition Documentation

◆ HANDLE_MDNODE_BRANCH

#define HANDLE_MDNODE_BRANCH (   CLASS)    HANDLE_MDNODE_LEAF(CLASS)

Definition at line 887 of file Metadata.h.

◆ HANDLE_MDNODE_LEAF [1/2]

#define HANDLE_MDNODE_LEAF (   CLASS)    using Temp##CLASS = std::unique_ptr<CLASS, TempMDNodeDeleter>;

Definition at line 885 of file Metadata.h.

◆ HANDLE_MDNODE_LEAF [2/2]

#define HANDLE_MDNODE_LEAF (   CLASS)
Value:
case CLASS##Kind: \
return true;

Definition at line 885 of file Metadata.h.

◆ HANDLE_METADATA [1/2]

#define HANDLE_METADATA (   CLASS)    class CLASS;

Definition at line 1357 of file Metadata.h.

◆ HANDLE_METADATA [2/2]

#define HANDLE_METADATA (   CLASS)    using CLASS##Array = MDTupleTypedArrayWrapper<CLASS>;

Definition at line 1357 of file Metadata.h.

◆ HANDLE_METADATA_LEAF [1/2]

#define HANDLE_METADATA_LEAF (   CLASS)    CLASS##Kind,

Definition at line 156 of file Metadata.h.

◆ HANDLE_METADATA_LEAF [2/2]

#define HANDLE_METADATA_LEAF (   CLASS)
Value:
template <> struct isa_impl<CLASS, Metadata> { \
static inline bool doit(const Metadata &MD) { \
return MD.getMetadataID() == Metadata::CLASS##Kind; \
} \
};

Definition at line 156 of file Metadata.h.

llvm::lltok::Kind
Kind
Definition: LLToken.h:18
LineType::Metadata
@ Metadata