Namespaces

Name

Description

llvm

Top‐level LLVM library namespace.

Macros

Name

Description

BEGIN_REGISTER_VP_SDNODE

PTRADD represents pointer arithmetic semantics, for targets that opt in using shouldPreservePtrArith(). ptr = PTRADD ptr, offset

CTXPROF_FUNCTION_DATA

The internal structure of FunctionData. This makes sure that changes to the fields of FunctionData either get automatically captured on the llvm side, or force a manual corresponding update.

DEBUG_WITH_TYPE

DEBUG_WITH_TYPE macro ‐ This macro should be used by passes to emit debug information. If the '‐debug' option is specified on the commandline, and if this is a debug build, then the code specified as the option to the macro will be executed. Otherwise it will not be. Example:

DECLARE_TRANSPARENT_OPERAND_ACCESSORS

Macro for generating in‐class operand accessor declarations. It should only be called in the public section of the interface.

DEFINE_TRANSPARENT_OPERAND_ACCESSORS

Macro for generating out‐of‐class operand accessor definitions

GET_RUNTIME_LIBCALL_ENUM

TableGen will produce 2 enums, RTLIB::Libcall and RTLIB::LibcallImpl. RTLIB::Libcall describes abstract functionality the compiler may choose to access, RTLIB::LibcallImpl describes a particular ABI implementation, which includes a name and type signature.

GET_RUNTIME_LIBCALL_FP_SELECTOR_DECLS

The floating‐point selectors get<OP>(EVT) return the <OP> libcall for the given type, or UNKNOWN_LIBCALL. Generated from the RuntimeLibcallFamily table in RuntimeLibcalls.td.

HANDLE_BINARY_INST

These methods just forward to Create, and are useful when you statically know what type of instruction you're going to create. These helpers just save some typing.

HANDLE_DIEVALUE_SMALL

@}

HANDLE_DW_SECT

Denotes a value read from an index section that does not correspond to any of the supported standards.

HANDLE_UNARY_INST

These methods just forward to Create, and are useful when you statically know what type of instruction you're going to create. These helpers just save some typing.

LAST_OTHER_INST

Vocabulary layout constants

LDBG

output. The default level is 1, and is in increasing level of verbosity.

LDBG_GET_DEBUG_TYPE_STR__

Helpers to get DEBUG_TYPE as a StringRef, even when DEBUG_TYPE is not defined (in which case it expands to "DEBUG_TYPE")

LDBG_GET_DEFAULT_TYPE_OR_LEVEL

Helper to provide the default level (=1) or type (=DEBUG_TYPE). This is used when a single argument is passed to LDBG() (or LDBG_OS()), if it is an integer we return DEBUG_TYPE and if it is a string we return 1. When DEBUG_TYPE is not defined, we return the current file name instead.

LDBG_LEVEL_OR_TYPE

When a single argument is provided. This can be either a level or the debug type. If a level is provided, we default the debug type to DEBUG_TYPE, if a string is provided, we default the level to 1.

LDBG_OS

LDBG_OS() is a macro that behaves like LDBG() but instead of directly using it to stream the output, it takes a callback function that will be called with a raw_ostream. This is useful when you need to pass a raw_ostream to a helper function to be able to print (when the << operator is not available).

LDBG_OS_IMPL

This macro is the core of the LDBG_OS() macros. It is used to print the debug output with the given stream, level, type, file, and line number.

LDBG_STREAM

This macro expands to the stream to use for output, we use a macro to allow unit‐testing to override.

LDBG_STREAM_LEVEL_TYPE_AND_FILE

These macros are helpers to implement LDBG() with an increasing amount of optional arguments made explicit.

LDBG_STREAM_LEVEL_TYPE_FILE_AND_LINE

This macro is the core of the LDBG() implementation. It is used to print the debug output with the given stream, level, type, file, and line number.

LDBG_TYPE_AND_LEVEL

This macro is a helper when LDBG() is called with 2 arguments. In this case we want to force the first argument to be the type for consistency in the codebase. We trick this by casting the first argument to a (const char *) which won't compile with an int.

LLVM_DECLARE_ENUM_AS_BITMASK

LLVM_DECLARE_ENUM_AS_BITMASK can be used to declare an enum type as a bit set, so that bitwise operation on such enum does not require static_cast.

LLVM_DECLARE_REGISTRY

Helper macro to declare registry class.

LLVM_DECLARE_REGISTRY_EX

Variants of the registration macros that take an explicit export annotation (EXPORT_ABI) in place of the hard‐coded LLVM_ABI_EXPORT. Use these when a registry is owned by a component that is NOT part of the LLVM dylib. For example, a clang library that is statically linked (CLANG_LINK_CLANG_DYLIB OFF). With LLVM_ABI_EXPORT the getRegistryLinkListInstance accessor is unconditionally `dllexport`ed; when such a static component is embedded in a DLL that should only export its own API surface (e.g. libclang.dll), the accessor leaks into that DLL's export table and then collides on the link line of any tool that also links the static component directly.

LLVM_DEFINE_REGISTRY

Helper macro to define registry class.

LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE

LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE() pulls the operator overloads used by LLVM_MARK_AS_BITMASK_ENUM into the current namespace.

LLVM_MARK_AS_BITMASK_ENUM

LLVM_MARK_AS_BITMASK_ENUM lets you opt in an individual enum type so you can perform bitwise operations on it without putting static_cast everywhere.

LLVM_PLUGIN_API_VERSION

macro LLVM_PLUGIN_API_VERSION Identifies the API version understood by this plugin.

LLVM_YAML_IS_DOCUMENT_LIST_VECTOR

Utility for declaring that a std::vector of a particular type should be considered a YAML document list.

LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR

Utility for declaring that a std::vector of a particular type should be considered a YAML flow sequence.

LLVM_YAML_IS_SEQUENCE_VECTOR

Utility for declaring that a std::vector of a particular type should be considered a YAML sequence.

LLVM_YAML_IS_STRING_MAP

Utility for declaring that std::map<std::string, _type> should be considered a YAML map.

LLVM_YAML_STRONG_TYPEDEF

YAML I/O does conversion based on types. But often native data types are just a typedef of built in intergral types (e.g. int). But the C++ type matching system sees through the typedef and all the typedefed types look like a built in type. This will cause the generic YAML I/O conversion to be used. To provide better control over the YAML conversion, you can use this macro instead of typedef. It will create a class with one field and automatic conversion operators to and from the base type. Based on BOOST_STRONG_TYPEDEF

MAKE_CAS_HANDLE_CONSTRUCTOR

Allow ObjectStore implementations to create internal handles.

OMP_TYPE

Declarations for LLVM‐IR types (simple, array, function and structure) are generated below. Their names are defined and used in OpenMPKinds.def. Here we provide the declarations, the initializeTypes function will provide the values.

R_TYPE_SHIFT

@}

SUPPORTED_TENSOR_TYPES

TensorSpec encapsulates the specification of a tensor: its dimensions, or "shape" (row‐major), its type (see TensorSpec::getDataType specializations for supported types), its name and port (see "TensorFlow: Large‐Scale Machine Learning on Heterogeneous Distributed Systems", section 4.2, para 2: https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45166.pdf)

Using Namespace Directives

Name

Description

endian

Helpers to read and write values with an explicit byte order.

llvm

Top‐level LLVM library namespace.

Created with MrDocs