LLVM 18.0.0git
EPCGenericDylibManager.h
Go to the documentation of this file.
1//===- EPCGenericDylibManager.h -- Generic EPC Dylib management -*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Implements dylib loading and searching by making calls to
10// ExecutorProcessControl::callWrapper.
11//
12// This simplifies the implementaton of new ExecutorProcessControl instances,
13// as this implementation will always work (at the cost of some performance
14// overhead for the calls).
15//
16//===----------------------------------------------------------------------===//
17
18#ifndef LLVM_EXECUTIONENGINE_ORC_EPCGENERICDYLIBMANAGER_H
19#define LLVM_EXECUTIONENGINE_ORC_EPCGENERICDYLIBMANAGER_H
20
23
24namespace llvm {
25namespace orc {
26
27class SymbolLookupSet;
28
30public:
31 /// Function addresses for memory access.
32 struct SymbolAddrs {
36 };
37
38 /// Create an EPCGenericMemoryAccess instance from a given set of
39 /// function addrs.
42
43 /// Create an EPCGenericMemoryAccess instance from a given set of
44 /// function addrs.
46 : EPC(EPC), SAs(SAs) {}
47
48 /// Loads the dylib with the given name.
50
51 /// Looks up symbols within the given dylib.
53 const SymbolLookupSet &Lookup);
54
55 /// Looks up symbols within the given dylib.
58
59private:
61 SymbolAddrs SAs;
62};
63
64} // end namespace orc
65} // end namespace llvm
66
67#endif // LLVM_EXECUTIONENGINE_ORC_EPCGENERICDYLIBMANAGER_H
#define H(x, y, z)
Definition: MD5.cpp:57
static cl::opt< RegAllocEvictionAdvisorAnalysis::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysis::AdvisorMode::Development, "development", "for training")))
static int Lookup(ArrayRef< TableEntry > Table, unsigned Opcode)
Tagged union holding either a T or a Error.
Definition: Error.h:474
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
static Expected< EPCGenericDylibManager > CreateWithDefaultBootstrapSymbols(ExecutorProcessControl &EPC)
Create an EPCGenericMemoryAccess instance from a given set of function addrs.
Expected< std::vector< ExecutorAddr > > lookup(tpctypes::DylibHandle H, const SymbolLookupSet &Lookup)
Looks up symbols within the given dylib.
Expected< tpctypes::DylibHandle > open(StringRef Path, uint64_t Mode)
Loads the dylib with the given name.
EPCGenericDylibManager(ExecutorProcessControl &EPC, SymbolAddrs SAs)
Create an EPCGenericMemoryAccess instance from a given set of function addrs.
Represents an address in the executor process.
ExecutorProcessControl supports interaction with a JIT target process.
A set of symbols to look up, each associated with a SymbolLookupFlags value.
Definition: Core.h:183
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Function addresses for memory access.