LLVM 18.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/DenseSet.h"
26#include "llvm/Support/Error.h"
27
28#include <mutex>
29
30namespace llvm {
31namespace orc {
32namespace rt_bootstrap {
33
34/// Simple page-based allocator.
36public:
38
39 Expected<tpctypes::DylibHandle> open(const std::string &Path, uint64_t Mode);
41 const RemoteSymbolLookupSet &L);
42
43 Error shutdown() override;
45
46private:
48
50 openWrapper(const char *ArgData, size_t ArgSize);
51
53 lookupWrapper(const char *ArgData, size_t ArgSize);
54
55 std::mutex M;
56 DylibSet Dylibs;
57};
58
59} // end namespace rt_bootstrap
60} // end namespace orc
61} // end namespace llvm
62
63#endif // LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_SIMPLEEXECUTORDYLIBMANAGER_H
This file defines the DenseSet and SmallDenseSet classes.
#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")))
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
Tagged union holding either a T or a Error.
Definition: Error.h:474
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:112
Represents an address in the executor process.
Expected< tpctypes::DylibHandle > open(const std::string &Path, uint64_t Mode)
Expected< std::vector< ExecutorAddr > > lookup(tpctypes::DylibHandle H, const RemoteSymbolLookupSet &L)
void addBootstrapSymbols(StringMap< ExecutorAddr > &M) override
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18