LLVM 19.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"
27#include "llvm/Support/Error.h"
28
29#include <mutex>
30
31namespace llvm {
32namespace orc {
33namespace rt_bootstrap {
34
35/// Simple page-based allocator.
37public:
39
40 Expected<tpctypes::DylibHandle> open(const std::string &Path, uint64_t Mode);
43
44 Error shutdown() override;
46
47private:
49
51 openWrapper(const char *ArgData, size_t ArgSize);
52
54 lookupWrapper(const char *ArgData, size_t ArgSize);
55
56 std::mutex M;
57 DylibSet 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
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:128
Represents an address in the executor process.
Expected< std::vector< ExecutorSymbolDef > > lookup(tpctypes::DylibHandle H, const RemoteSymbolLookupSet &L)
Expected< tpctypes::DylibHandle > open(const std::string &Path, uint64_t Mode)
void addBootstrapSymbols(StringMap< ExecutorAddr > &M) override
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18