LLVM  17.0.0git
Classes | Namespaces | Typedefs | Enumerations | Functions
JITLink.h File Reference
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"
#include "llvm/ExecutionEngine/JITSymbol.h"
#include "llvm/ExecutionEngine/Orc/Shared/MemoryFlags.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/BinaryStreamReader.h"
#include "llvm/Support/BinaryStreamWriter.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include <optional>
#include <map>
#include <string>
#include <system_error>
Include dependency graph for JITLink.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  llvm::jitlink::JITLinkError
 Base class for errors originating in JIT linker, e.g. More...
class  llvm::jitlink::Edge
 Represents fixups and constraints in the LinkGraph. More...
class  llvm::jitlink::Addressable
 Base class for Addressable entities (externals, absolutes, blocks). More...
class  llvm::jitlink::Block
 An Addressable with content and edges. More...
class  llvm::jitlink::Symbol
 Symbol representation. More...
class  llvm::jitlink::Section
 Represents an object file section. More...
class  llvm::jitlink::SectionRange
 Represents a section address range via a pair of Block pointers to the first and last Blocks in the section. More...
class  llvm::jitlink::LinkGraph
class  llvm::jitlink::LinkGraph::nested_collection_iterator< OuterItrT, InnerItrT, T, getInnerRange >
class  llvm::jitlink::BlockAddressMap
 Enables easy lookup of blocks by addresses. More...
class  llvm::jitlink::SymbolAddressMap
 A map of addresses to Symbols. More...
struct  llvm::jitlink::PassConfiguration
 An LinkGraph pass configuration, consisting of a list of pre-prune, post-prune, and post-fixup passes. More...
class  llvm::jitlink::JITLinkAsyncLookupContinuation
 A function object to call with a resolved symbol map (See AsyncLookupResult) or an error if resolution failed. More...
class  llvm::jitlink::JITLinkContext
 Holds context for a single jitLink invocation. More...


 This is an optimization pass for GlobalISel generic memory operations.


using llvm::jitlink::SectionOrdinal = unsigned
using llvm::jitlink::LinkGraphPassFunction = std::function< Error(LinkGraph &)>
 A function for mutating LinkGraphs. More...
using llvm::jitlink::LinkGraphPassList = std::vector< LinkGraphPassFunction >
 A list of LinkGraph passes. More...
using llvm::jitlink::AsyncLookupResult = DenseMap< StringRef, JITEvaluatedSymbol >
 A map of symbol names to resolved addresses. More...


enum  llvm::jitlink::Linkage : uint8_t { llvm::jitlink::Linkage::Strong, llvm::jitlink::Linkage::Weak }
 Describes symbol linkage. More...
enum  llvm::jitlink::Scope : uint8_t { llvm::jitlink::Scope::Default, llvm::jitlink::Scope::Hidden, llvm::jitlink::Scope::Local }
 Defines the scope in which this symbol should be visible: Default – Visible in the public interface of the linkage unit. More...
enum  llvm::jitlink::SymbolLookupFlags { llvm::jitlink::SymbolLookupFlags::RequiredSymbol, llvm::jitlink::SymbolLookupFlags::WeaklyReferencedSymbol }
 Flags for symbol lookup. More...


const char * llvm::jitlink::getGenericEdgeKindName (Edge::Kind K)
 Returns the string name of the given generic edge kind, or "unknown" otherwise. More...
uint64_t llvm::jitlink::alignToBlock (uint64_t Addr, Block &B)
orc::ExecutorAddr llvm::jitlink::alignToBlock (orc::ExecutorAddr Addr, Block &B)
const char * llvm::jitlink::getLinkageName (Linkage L)
 For errors and debugging output. More...
const char * llvm::jitlink::getScopeName (Scope S)
 For debugging output. More...
raw_ostreamllvm::jitlink::operator<< (raw_ostream &OS, const Block &B)
raw_ostreamllvm::jitlink::operator<< (raw_ostream &OS, const Symbol &A)
void llvm::jitlink::printEdge (raw_ostream &OS, const Block &B, const Edge &E, StringRef EdgeKindName)
raw_ostreamllvm::jitlink::operator<< (raw_ostream &OS, const SymbolLookupFlags &LF)
template<typename Continuation >
std::unique_ptr< JITLinkAsyncLookupContinuation > llvm::jitlink::createLookupContinuation (Continuation Cont)
 Create a lookup continuation from a function object. More...
Error llvm::jitlink::markAllSymbolsLive (LinkGraph &G)
 Marks all symbols in a graph live. More...
Error llvm::jitlink::makeTargetOutOfRangeError (const LinkGraph &G, const Block &B, const Edge &E)
 Create an out of range error for the given edge in the given block. More...
Error llvm::jitlink::makeAlignmentError (llvm::orc::ExecutorAddr Loc, uint64_t Value, int N, const Edge &E)
void llvm::jitlink::visitEdge (LinkGraph &G, Block *B, Edge &E)
 Base case for edge-visitors where the visitor-list is empty. More...
template<typename VisitorT , typename... VisitorTs>
void llvm::jitlink::visitEdge (LinkGraph &G, Block *B, Edge &E, VisitorT &&V, VisitorTs &&...Vs)
 Applies the first visitor in the list to the given edge. More...
template<typename... VisitorTs>
void llvm::jitlink::visitExistingEdges (LinkGraph &G, VisitorTs &&...Vs)
 For each edge in the given graph, apply a list of visitors to the edge, stopping when the first visitor's visitEdge method returns true. More...
Expected< std::unique_ptr< LinkGraph > > llvm::jitlink::createLinkGraphFromObject (MemoryBufferRef ObjectBuffer)
 Create a LinkGraph from the given object buffer. More...
void llvm::jitlink::link (std::unique_ptr< LinkGraph > G, std::unique_ptr< JITLinkContext > Ctx)
 Link the given graph. More...