LLVM  14.0.0git
SimpleExecutorDylibManager.h
Go to the documentation of this file.
1 //===--------------- SimpleExecutorDylibManager.h ---------------*- 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 // A simple dynamic library management class. Allows dynamic libraries to be
10 // loaded and searched.
11 //
12 // FIXME: The functionality in this file should be moved to the ORC runtime.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_SIMPLEEXECUTORDYLIBMANAGER_H
17 #define LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_SIMPLEEXECUTORDYLIBMANAGER_H
18 
19 #include "llvm/ADT/DenseMap.h"
26 #include "llvm/Support/Error.h"
27 
28 #include <mutex>
29 
30 namespace llvm {
31 namespace orc {
32 namespace rt_bootstrap {
33 
34 /// Simple page-based allocator.
36 public:
38 
39  Expected<tpctypes::DylibHandle> open(const std::string &Path, uint64_t Mode);
41  const RemoteSymbolLookupSet &L);
42 
43  Error shutdown() override;
45 
46 private:
48 
50  openWrapper(const char *ArgData, size_t ArgSize);
51 
53  lookupWrapper(const char *ArgData, size_t ArgSize);
54 
55  std::mutex M;
56  uint64_t NextId = 0;
57  DylibsMap Dylibs;
58 };
59 
60 } // end namespace rt_bootstrap
61 } // end namespace orc
62 } // end namespace llvm
63 
64 #endif // LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_SIMPLEEXECUTORDYLIBMANAGER_H
TargetProcessControlTypes.h
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::orc::RemoteSymbolLookupSet
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
Definition: SimpleRemoteEPCUtils.h:146
llvm::orc::shared::CWrapperFunctionResult
Definition: WrapperFunctionUtils.h:33
SimpleRemoteEPCUtils.h
Error.h
WrapperFunctionUtils.h
DynamicLibrary.h
DenseMap.h
llvm::orc::ExecutorBootstrapService
Definition: ExecutorBootstrapService.h:24
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
ExecutorBootstrapService.h
llvm::StringMap
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:108
uint64_t
llvm::DenseMap< uint64_t, sys::DynamicLibrary >
llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::open
Expected< tpctypes::DylibHandle > open(const std::string &Path, uint64_t Mode)
Definition: SimpleExecutorDylibManager.cpp:25
Mode
SI Whole Quad Mode
Definition: SIWholeQuadMode.cpp:262
llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::shutdown
Error shutdown() override
Definition: SimpleExecutorDylibManager.cpp:86
llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::lookup
Expected< std::vector< ExecutorAddr > > lookup(tpctypes::DylibHandle H, const RemoteSymbolLookupSet &L)
Definition: SimpleExecutorDylibManager.cpp:43
H
#define H(x, y, z)
Definition: MD5.cpp:58
ExecutorAddress.h
llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::~SimpleExecutorDylibManager
virtual ~SimpleExecutorDylibManager()
Definition: SimpleExecutorDylibManager.cpp:20
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::addBootstrapSymbols
void addBootstrapSymbols(StringMap< ExecutorAddr > &M) override
Definition: SimpleExecutorDylibManager.cpp:98
llvm::orc::rt_bootstrap::SimpleExecutorDylibManager
Simple page-based allocator.
Definition: SimpleExecutorDylibManager.h:35