LLVM  16.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 
24 namespace llvm {
25 namespace orc {
26 
27 class SymbolLookupSet;
28 
30 public:
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 
59 private:
61  SymbolAddrs SAs;
62 };
63 
64 } // end namespace orc
65 } // end namespace llvm
66 
67 #endif // LLVM_EXECUTIONENGINE_ORC_EPCGENERICDYLIBMANAGER_H
llvm::orc::ExecutorAddr
Represents an address in the executor process.
Definition: ExecutorAddress.h:30
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::orc::RemoteSymbolLookupSet
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
Definition: SimpleRemoteEPCUtils.h:146
llvm::orc::EPCGenericDylibManager::SymbolAddrs
Function addresses for memory access.
Definition: EPCGenericDylibManager.h:32
llvm::orc::EPCGenericDylibManager::CreateWithDefaultBootstrapSymbols
static Expected< EPCGenericDylibManager > CreateWithDefaultBootstrapSymbols(ExecutorProcessControl &EPC)
Create an EPCGenericMemoryAccess instance from a given set of function addrs.
Definition: EPCGenericDylibManager.cpp:63
SimpleRemoteEPCUtils.h
llvm::orc::SymbolLookupSet
A set of symbols to look up, each associated with a SymbolLookupFlags value.
Definition: Core.h:175
llvm::orc::ExecutorProcessControl
ExecutorProcessControl supports interaction with a JIT target process.
Definition: ExecutorProcessControl.h:38
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
llvm::orc::EPCGenericDylibManager::SymbolAddrs::Instance
ExecutorAddr Instance
Definition: EPCGenericDylibManager.h:33
llvm::orc::tpctypes::DylibHandle
JITTargetAddress DylibHandle
A handle used to represent a loaded dylib in the target process.
Definition: TargetProcessControlTypes.h:128
llvm::orc::EPCGenericDylibManager
Definition: EPCGenericDylibManager.h:29
llvm::orc::EPCGenericDylibManager::open
Expected< tpctypes::DylibHandle > open(StringRef Path, uint64_t Mode)
Loads the dylib with the given name.
Definition: EPCGenericDylibManager.cpp:74
uint64_t
Mode
SI Whole Quad Mode
Definition: SIWholeQuadMode.cpp:262
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
llvm::orc::EPCGenericDylibManager::SymbolAddrs::Lookup
ExecutorAddr Lookup
Definition: EPCGenericDylibManager.h:35
llvm::orc::EPCGenericDylibManager::lookup
Expected< std::vector< ExecutorAddr > > lookup(tpctypes::DylibHandle H, const SymbolLookupSet &Lookup)
Looks up symbols within the given dylib.
Definition: EPCGenericDylibManager.cpp:85
llvm::orc::EPCGenericDylibManager::SymbolAddrs::Open
ExecutorAddr Open
Definition: EPCGenericDylibManager.h:34
H
#define H(x, y, z)
Definition: MD5.cpp:57
llvm::orc::EPCGenericDylibManager::EPCGenericDylibManager
EPCGenericDylibManager(ExecutorProcessControl &EPC, SymbolAddrs SAs)
Create an EPCGenericMemoryAccess instance from a given set of function addrs.
Definition: EPCGenericDylibManager.h:45
Lookup
static int Lookup(ArrayRef< TableEntry > Table, unsigned Opcode)
Definition: X86FloatingPoint.cpp:597
ExecutorProcessControl.h