LLVM  15.0.0git
EPCIndirectionUtils.cpp
Go to the documentation of this file.
1 //===------- EPCIndirectionUtils.cpp -- EPC based indirection APIs --------===//
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 
10 
13 
14 #include <future>
15 
16 using namespace llvm;
17 using namespace llvm::orc;
18 
19 namespace llvm {
20 namespace orc {
21 
23 public:
24  using IndirectStubInfo = EPCIndirectionUtils::IndirectStubInfo;
25  using IndirectStubInfoVector = EPCIndirectionUtils::IndirectStubInfoVector;
26 
28  getIndirectStubs(EPCIndirectionUtils &EPCIU, unsigned NumStubs) {
29  return EPCIU.getIndirectStubs(NumStubs);
30  };
31 };
32 
33 } // end namespace orc
34 } // end namespace llvm
35 
36 namespace {
37 
38 class EPCTrampolinePool : public TrampolinePool {
39 public:
40  EPCTrampolinePool(EPCIndirectionUtils &EPCIU);
41  Error deallocatePool();
42 
43 protected:
44  Error grow() override;
45 
46  using FinalizedAlloc = jitlink::JITLinkMemoryManager::FinalizedAlloc;
47 
48  EPCIndirectionUtils &EPCIU;
49  unsigned TrampolineSize = 0;
50  unsigned TrampolinesPerPage = 0;
51  std::vector<FinalizedAlloc> TrampolineBlocks;
52 };
53 
54 class EPCIndirectStubsManager : public IndirectStubsManager,
56 public:
57  EPCIndirectStubsManager(EPCIndirectionUtils &EPCIU) : EPCIU(EPCIU) {}
58 
59  Error deallocateStubs();
60 
61  Error createStub(StringRef StubName, JITTargetAddress StubAddr,
62  JITSymbolFlags StubFlags) override;
63 
64  Error createStubs(const StubInitsMap &StubInits) override;
65 
66  JITEvaluatedSymbol findStub(StringRef Name, bool ExportedStubsOnly) override;
67 
68  JITEvaluatedSymbol findPointer(StringRef Name) override;
69 
70  Error updatePointer(StringRef Name, JITTargetAddress NewAddr) override;
71 
72 private:
73  using StubInfo = std::pair<IndirectStubInfo, JITSymbolFlags>;
74 
75  std::mutex ISMMutex;
76  EPCIndirectionUtils &EPCIU;
77  StringMap<StubInfo> StubInfos;
78 };
79 
80 EPCTrampolinePool::EPCTrampolinePool(EPCIndirectionUtils &EPCIU)
81  : EPCIU(EPCIU) {
82  auto &EPC = EPCIU.getExecutorProcessControl();
83  auto &ABI = EPCIU.getABISupport();
84 
85  TrampolineSize = ABI.getTrampolineSize();
86  TrampolinesPerPage =
87  (EPC.getPageSize() - ABI.getPointerSize()) / TrampolineSize;
88 }
89 
90 Error EPCTrampolinePool::deallocatePool() {
91  Error Err = Error::success();
92  std::promise<MSVCPError> DeallocResultP;
93  auto DeallocResultF = DeallocResultP.get_future();
94 
96  std::move(TrampolineBlocks),
97  [&](Error Err) { DeallocResultP.set_value(std::move(Err)); });
98 
99  return DeallocResultF.get();
100 }
101 
102 Error EPCTrampolinePool::grow() {
103  using namespace jitlink;
104 
105  assert(AvailableTrampolines.empty() &&
106  "Grow called with trampolines still available");
107 
108  auto ResolverAddress = EPCIU.getResolverBlockAddress();
109  assert(ResolverAddress && "Resolver address can not be null");
110 
111  auto &EPC = EPCIU.getExecutorProcessControl();
112  auto PageSize = EPC.getPageSize();
113  auto Alloc = SimpleSegmentAlloc::Create(
114  EPC.getMemMgr(), nullptr,
115  {{MemProt::Read | MemProt::Exec, {PageSize, Align(PageSize)}}});
116  if (!Alloc)
117  return Alloc.takeError();
118 
119  unsigned NumTrampolines = TrampolinesPerPage;
120 
121  auto SegInfo = Alloc->getSegInfo(MemProt::Read | MemProt::Exec);
122  EPCIU.getABISupport().writeTrampolines(SegInfo.WorkingMem.data(),
123  SegInfo.Addr.getValue(),
124  ResolverAddress, NumTrampolines);
125  for (unsigned I = 0; I < NumTrampolines; ++I)
126  AvailableTrampolines.push_back(SegInfo.Addr.getValue() +
127  (I * TrampolineSize));
128 
129  auto FA = Alloc->finalize();
130  if (!FA)
131  return FA.takeError();
132 
133  TrampolineBlocks.push_back(std::move(*FA));
134 
135  return Error::success();
136 }
137 
138 Error EPCIndirectStubsManager::createStub(StringRef StubName,
139  JITTargetAddress StubAddr,
140  JITSymbolFlags StubFlags) {
141  StubInitsMap SIM;
142  SIM[StubName] = std::make_pair(StubAddr, StubFlags);
143  return createStubs(SIM);
144 }
145 
146 Error EPCIndirectStubsManager::createStubs(const StubInitsMap &StubInits) {
147  auto AvailableStubInfos = getIndirectStubs(EPCIU, StubInits.size());
148  if (!AvailableStubInfos)
149  return AvailableStubInfos.takeError();
150 
151  {
152  std::lock_guard<std::mutex> Lock(ISMMutex);
153  unsigned ASIdx = 0;
154  for (auto &SI : StubInits) {
155  auto &A = (*AvailableStubInfos)[ASIdx++];
156  StubInfos[SI.first()] = std::make_pair(A, SI.second.second);
157  }
158  }
159 
160  auto &MemAccess = EPCIU.getExecutorProcessControl().getMemoryAccess();
161  switch (EPCIU.getABISupport().getPointerSize()) {
162  case 4: {
163  unsigned ASIdx = 0;
164  std::vector<tpctypes::UInt32Write> PtrUpdates;
165  for (auto &SI : StubInits)
166  PtrUpdates.push_back(
167  {ExecutorAddr((*AvailableStubInfos)[ASIdx++].PointerAddress),
168  static_cast<uint32_t>(SI.second.first)});
169  return MemAccess.writeUInt32s(PtrUpdates);
170  }
171  case 8: {
172  unsigned ASIdx = 0;
173  std::vector<tpctypes::UInt64Write> PtrUpdates;
174  for (auto &SI : StubInits)
175  PtrUpdates.push_back(
176  {ExecutorAddr((*AvailableStubInfos)[ASIdx++].PointerAddress),
177  static_cast<uint64_t>(SI.second.first)});
178  return MemAccess.writeUInt64s(PtrUpdates);
179  }
180  default:
181  return make_error<StringError>("Unsupported pointer size",
183  }
184 }
185 
186 JITEvaluatedSymbol EPCIndirectStubsManager::findStub(StringRef Name,
187  bool ExportedStubsOnly) {
188  std::lock_guard<std::mutex> Lock(ISMMutex);
189  auto I = StubInfos.find(Name);
190  if (I == StubInfos.end())
191  return nullptr;
192  return {I->second.first.StubAddress, I->second.second};
193 }
194 
195 JITEvaluatedSymbol EPCIndirectStubsManager::findPointer(StringRef Name) {
196  std::lock_guard<std::mutex> Lock(ISMMutex);
197  auto I = StubInfos.find(Name);
198  if (I == StubInfos.end())
199  return nullptr;
200  return {I->second.first.PointerAddress, I->second.second};
201 }
202 
203 Error EPCIndirectStubsManager::updatePointer(StringRef Name,
204  JITTargetAddress NewAddr) {
205 
206  JITTargetAddress PtrAddr = 0;
207  {
208  std::lock_guard<std::mutex> Lock(ISMMutex);
209  auto I = StubInfos.find(Name);
210  if (I == StubInfos.end())
211  return make_error<StringError>("Unknown stub name",
213  PtrAddr = I->second.first.PointerAddress;
214  }
215 
216  auto &MemAccess = EPCIU.getExecutorProcessControl().getMemoryAccess();
217  switch (EPCIU.getABISupport().getPointerSize()) {
218  case 4: {
219  tpctypes::UInt32Write PUpdate(ExecutorAddr(PtrAddr), NewAddr);
220  return MemAccess.writeUInt32s(PUpdate);
221  }
222  case 8: {
223  tpctypes::UInt64Write PUpdate(ExecutorAddr(PtrAddr), NewAddr);
224  return MemAccess.writeUInt64s(PUpdate);
225  }
226  default:
227  return make_error<StringError>("Unsupported pointer size",
229  }
230 }
231 
232 } // end anonymous namespace.
233 
234 namespace llvm {
235 namespace orc {
236 
238 
241  const auto &TT = EPC.getTargetTriple();
242  switch (TT.getArch()) {
243  default:
244  return make_error<StringError>(
245  std::string("No EPCIndirectionUtils available for ") + TT.str(),
247  case Triple::aarch64:
248  case Triple::aarch64_32:
249  return CreateWithABI<OrcAArch64>(EPC);
250 
251  case Triple::x86:
252  return CreateWithABI<OrcI386>(EPC);
253 
254  case Triple::mips:
255  return CreateWithABI<OrcMips32Be>(EPC);
256 
257  case Triple::mipsel:
258  return CreateWithABI<OrcMips32Le>(EPC);
259 
260  case Triple::mips64:
261  case Triple::mips64el:
262  return CreateWithABI<OrcMips64>(EPC);
263 
264  case Triple::riscv64:
265  return CreateWithABI<OrcRiscv64>(EPC);
266 
267  case Triple::x86_64:
268  if (TT.getOS() == Triple::OSType::Win32)
269  return CreateWithABI<OrcX86_64_Win32>(EPC);
270  else
271  return CreateWithABI<OrcX86_64_SysV>(EPC);
272  }
273 }
274 
276 
277  auto &MemMgr = EPC.getMemMgr();
278  auto Err = MemMgr.deallocate(std::move(IndirectStubAllocs));
279 
280  if (TP)
281  Err = joinErrors(std::move(Err),
282  static_cast<EPCTrampolinePool &>(*TP).deallocatePool());
283 
284  if (ResolverBlock)
285  Err =
286  joinErrors(std::move(Err), MemMgr.deallocate(std::move(ResolverBlock)));
287 
288  return Err;
289 }
290 
293  JITTargetAddress ReentryCtxAddr) {
294  using namespace jitlink;
295 
296  assert(ABI && "ABI can not be null");
297  auto ResolverSize = ABI->getResolverCodeSize();
298 
299  auto Alloc =
300  SimpleSegmentAlloc::Create(EPC.getMemMgr(), nullptr,
301  {{MemProt::Read | MemProt::Exec,
302  {ResolverSize, Align(EPC.getPageSize())}}});
303 
304  if (!Alloc)
305  return Alloc.takeError();
306 
307  auto SegInfo = Alloc->getSegInfo(MemProt::Read | MemProt::Exec);
308  ResolverBlockAddr = SegInfo.Addr.getValue();
309  ABI->writeResolverCode(SegInfo.WorkingMem.data(), ResolverBlockAddr,
310  ReentryFnAddr, ReentryCtxAddr);
311 
312  auto FA = Alloc->finalize();
313  if (!FA)
314  return FA.takeError();
315 
316  ResolverBlock = std::move(*FA);
317  return ResolverBlockAddr;
318 }
319 
320 std::unique_ptr<IndirectStubsManager>
322  return std::make_unique<EPCIndirectStubsManager>(*this);
323 }
324 
326  if (!TP)
327  TP = std::make_unique<EPCTrampolinePool>(*this);
328  return *TP;
329 }
330 
332  ExecutionSession &ES, JITTargetAddress ErrorHandlerAddr) {
333  assert(!LCTM &&
334  "createLazyCallThroughManager can not have been called before");
335  LCTM = std::make_unique<LazyCallThroughManager>(ES, ErrorHandlerAddr,
336  &getTrampolinePool());
337  return *LCTM;
338 }
339 
340 EPCIndirectionUtils::EPCIndirectionUtils(ExecutorProcessControl &EPC,
341  std::unique_ptr<ABISupport> ABI)
342  : EPC(EPC), ABI(std::move(ABI)) {
343  assert(this->ABI && "ABI can not be null");
344 
345  assert(EPC.getPageSize() > getABISupport().getStubSize() &&
346  "Stubs larger than one page are not supported");
347 }
348 
350 EPCIndirectionUtils::getIndirectStubs(unsigned NumStubs) {
351  using namespace jitlink;
352 
353  std::lock_guard<std::mutex> Lock(EPCUIMutex);
354 
355  // If there aren't enough stubs available then allocate some more.
356  if (NumStubs > AvailableIndirectStubs.size()) {
357  auto NumStubsToAllocate = NumStubs;
358  auto PageSize = EPC.getPageSize();
359  auto StubBytes = alignTo(NumStubsToAllocate * ABI->getStubSize(), PageSize);
360  NumStubsToAllocate = StubBytes / ABI->getStubSize();
361  auto PtrBytes =
362  alignTo(NumStubsToAllocate * ABI->getPointerSize(), PageSize);
363 
364  auto StubProt = MemProt::Read | MemProt::Exec;
365  auto PtrProt = MemProt::Read | MemProt::Write;
366 
367  auto Alloc = SimpleSegmentAlloc::Create(
368  EPC.getMemMgr(), nullptr,
369  {{StubProt, {static_cast<size_t>(StubBytes), Align(PageSize)}},
370  {PtrProt, {static_cast<size_t>(PtrBytes), Align(PageSize)}}});
371 
372  if (!Alloc)
373  return Alloc.takeError();
374 
375  auto StubSeg = Alloc->getSegInfo(StubProt);
376  auto PtrSeg = Alloc->getSegInfo(PtrProt);
377 
378  ABI->writeIndirectStubsBlock(StubSeg.WorkingMem.data(),
379  StubSeg.Addr.getValue(),
380  PtrSeg.Addr.getValue(), NumStubsToAllocate);
381 
382  auto FA = Alloc->finalize();
383  if (!FA)
384  return FA.takeError();
385 
386  IndirectStubAllocs.push_back(std::move(*FA));
387 
388  auto StubExecutorAddr = StubSeg.Addr;
389  auto PtrExecutorAddr = PtrSeg.Addr;
390  for (unsigned I = 0; I != NumStubsToAllocate; ++I) {
391  AvailableIndirectStubs.push_back(IndirectStubInfo(
392  StubExecutorAddr.getValue(), PtrExecutorAddr.getValue()));
393  StubExecutorAddr += ABI->getStubSize();
394  PtrExecutorAddr += ABI->getPointerSize();
395  }
396  }
397 
398  assert(NumStubs <= AvailableIndirectStubs.size() &&
399  "Sufficient stubs should have been allocated above");
400 
401  IndirectStubInfoVector Result;
402  while (NumStubs--) {
403  Result.push_back(AvailableIndirectStubs.back());
404  AvailableIndirectStubs.pop_back();
405  }
406 
407  return std::move(Result);
408 }
409 
411  JITTargetAddress TrampolineAddr) {
412  auto &LCTM = *jitTargetAddressToPointer<LazyCallThroughManager *>(LCTMAddr);
413  std::promise<JITTargetAddress> LandingAddrP;
414  auto LandingAddrF = LandingAddrP.get_future();
415  LCTM.resolveTrampolineLandingAddress(
416  TrampolineAddr,
417  [&](JITTargetAddress Addr) { LandingAddrP.set_value(Addr); });
418  return LandingAddrF.get();
419 }
420 
422  auto &LCTM = EPCIU.getLazyCallThroughManager();
423  return EPCIU
426  .takeError();
427 }
428 
429 } // end namespace orc
430 } // end namespace llvm
llvm::orc::ExecutorAddr
Represents an address in the executor process.
Definition: ExecutorAddress.h:30
llvm::alignTo
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
Definition: Alignment.h:148
llvm::Triple::riscv64
@ riscv64
Definition: Triple.h:76
llvm::orc::EPCIndirectionUtils::cleanup
Error cleanup()
Release memory for resources held by this instance.
Definition: EPCIndirectionUtils.cpp:275
ABI
Generic address nodes are lowered to some combination of target independent and machine specific ABI
Definition: Relocation.txt:34
MathExtras.h
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::orc::ExecutorProcessControl::getMemoryAccess
MemoryAccess & getMemoryAccess() const
Return a MemoryAccess object for the target process.
Definition: ExecutorProcessControl.h:210
llvm::Triple::x86
@ x86
Definition: Triple.h:85
llvm::orc::EPCIndirectionUtils::createIndirectStubsManager
std::unique_ptr< IndirectStubsManager > createIndirectStubsManager()
Create an IndirectStubsManager for the executor process.
Definition: EPCIndirectionUtils.cpp:321
llvm::orc::setUpInProcessLCTMReentryViaEPCIU
Error setUpInProcessLCTMReentryViaEPCIU(EPCIndirectionUtils &EPCIU)
This will call writeResolver on the given EPCIndirectionUtils instance to set up re-entry via a funct...
Definition: EPCIndirectionUtils.cpp:421
llvm::orc::IndirectStubsManager
Base class for managing collections of named indirect stubs.
Definition: IndirectionUtils.h:282
llvm::Error::success
static ErrorSuccess success()
Create a success value.
Definition: Error.h:329
llvm::orc::LazyCallThroughManager
Manages a set of 'lazy call-through' trampolines.
Definition: LazyReexports.h:38
llvm::Triple::x86_64
@ x86_64
Definition: Triple.h:86
llvm::orc::ExecutorProcessControl
ExecutorProcessControl supports interaction with a JIT target process.
Definition: ExecutorProcessControl.h:38
llvm::orc::EPCIndirectionUtilsAccess::IndirectStubInfoVector
EPCIndirectionUtils::IndirectStubInfoVector IndirectStubInfoVector
Definition: EPCIndirectionUtils.cpp:25
llvm::orc::EPCIndirectionUtils::getLazyCallThroughManager
LazyCallThroughManager & getLazyCallThroughManager()
Create a LazyCallThroughManager for the executor process.
Definition: EPCIndirectionUtils.h:123
llvm::orc::EPCIndirectionUtilsAccess
Definition: EPCIndirectionUtils.cpp:22
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
llvm::Triple::aarch64_32
@ aarch64_32
Definition: Triple.h:53
llvm::Triple::mips64
@ mips64
Definition: Triple.h:66
llvm::JITSymbolFlags
Flags for symbols in the JIT.
Definition: JITSymbol.h:74
llvm::JITEvaluatedSymbol
Represents a symbol that has been evaluated to an address already.
Definition: JITSymbol.h:229
llvm::orc::EPCIndirectionUtils::getExecutorProcessControl
ExecutorProcessControl & getExecutorProcessControl() const
Return a reference to the ExecutorProcessControl object.
Definition: EPCIndirectionUtils.h:90
llvm::Lock
static sys::Mutex Lock
Definition: NVPTXUtilities.cpp:39
llvm::orc::EPCIndirectionUtils::ABISupport::~ABISupport
virtual ~ABISupport()
PageSize
static cl::opt< int > PageSize("imp-null-check-page-size", cl::desc("The page size of the target in bytes"), cl::init(4096), cl::Hidden)
llvm::orc::ExecutorProcessControl::getMemMgr
jitlink::JITLinkMemoryManager & getMemMgr() const
Return a JITLinkMemoryManager for the target process.
Definition: ExecutorProcessControl.h:216
llvm::orc::reentry
static JITTargetAddress reentry(JITTargetAddress LCTMAddr, JITTargetAddress TrampolineAddr)
Definition: EPCIndirectionUtils.cpp:410
llvm::ARM_PROC::A
@ A
Definition: ARMBaseInfo.h:34
llvm::Triple::mips64el
@ mips64el
Definition: Triple.h:67
llvm::orc
Definition: CompileOnDemandLayer.h:54
llvm::ms_demangle::QualifierMangleMode::Result
@ Result
llvm::orc::TrampolinePool
Base class for pools of compiler re-entry trampolines.
Definition: IndirectionUtils.h:63
llvm::orc::EPCIndirectionUtils::ABISupport::writeTrampolines
virtual void writeTrampolines(char *TrampolineBlockWorkingMem, JITTargetAddress TrampolineBlockTragetAddr, JITTargetAddress ResolverAddr, unsigned NumTrampolines) const =0
llvm::StringMap
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:110
uint64_t
Addr
uint64_t Addr
Definition: ELFObjHandler.cpp:78
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
I
#define I(x, y, z)
Definition: MD5.cpp:58
llvm::orc::EPCIndirectionUtilsAccess::IndirectStubInfo
EPCIndirectionUtils::IndirectStubInfo IndirectStubInfo
Definition: EPCIndirectionUtils.cpp:24
llvm::joinErrors
Error joinErrors(Error E1, Error E2)
Concatenate errors.
Definition: Error.h:426
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::LoongArchABI::ABI
ABI
Definition: LoongArchBaseInfo.h:26
llvm::move
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1663
SI
StandardInstrumentations SI(Debug, VerifyEach)
llvm::orc::EPCIndirectionUtils::getTrampolinePool
TrampolinePool & getTrampolinePool()
Create a TrampolinePool for the executor process.
Definition: EPCIndirectionUtils.cpp:325
llvm::orc::EPCIndirectionUtils::getABISupport
ABISupport & getABISupport() const
Return a reference to the ABISupport object for this instance.
Definition: EPCIndirectionUtils.h:93
llvm::orc::ExecutorProcessControl::MemoryAccess::writeUInt32s
Error writeUInt32s(ArrayRef< tpctypes::UInt32Write > Ws)
Definition: ExecutorProcessControl.h:139
EPCIndirectionUtils.h
llvm::orc::tpctypes::UIntWrite
Definition: TargetProcessControlTypes.h:85
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::orc::EPCIndirectionUtils::writeResolverBlock
Expected< JITTargetAddress > writeResolverBlock(JITTargetAddress ReentryFnAddr, JITTargetAddress ReentryCtxAddr)
Write resolver code to the executor process and return its address.
Definition: EPCIndirectionUtils.cpp:292
uint32_t
llvm::orc::EPCIndirectionUtils::getResolverBlockAddress
JITTargetAddress getResolverBlockAddress() const
Returns the address of the Resolver block.
Definition: EPCIndirectionUtils.h:108
llvm::pointerToJITTargetAddress
JITTargetAddress pointerToJITTargetAddress(T *Ptr)
Convert a pointer to a JITTargetAddress.
Definition: JITSymbol.h:69
llvm::orc::EPCIndirectionUtils::Create
static Expected< std::unique_ptr< EPCIndirectionUtils > > Create(ExecutorProcessControl &EPC)
Create based on the ExecutorProcessControl triple.
Definition: EPCIndirectionUtils.cpp:240
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:50
std
Definition: BitVector.h:851
llvm::inconvertibleErrorCode
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
Definition: Error.cpp:77
llvm::orc::ExecutorProcessControl::getTargetTriple
const Triple & getTargetTriple() const
Return the Triple for the target process.
Definition: ExecutorProcessControl.h:201
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:155
llvm::orc::ExecutionSession
An ExecutionSession represents a running JIT program.
Definition: Core.h:1359
llvm::Triple::mipsel
@ mipsel
Definition: Triple.h:65
llvm::orc::ExecutorProcessControl::getPageSize
unsigned getPageSize() const
Get the page size for the target process.
Definition: ExecutorProcessControl.h:204
llvm::orc::EPCIndirectionUtilsAccess::getIndirectStubs
static Expected< IndirectStubInfoVector > getIndirectStubs(EPCIndirectionUtils &EPCIU, unsigned NumStubs)
Definition: EPCIndirectionUtils.cpp:28
llvm::JITTargetAddress
uint64_t JITTargetAddress
Represents an address in the target process's address space.
Definition: JITSymbol.h:42
llvm::orc::EPCIndirectionUtils::createLazyCallThroughManager
LazyCallThroughManager & createLazyCallThroughManager(ExecutionSession &ES, JITTargetAddress ErrorHandlerAddr)
Create a LazyCallThroughManager.
Definition: EPCIndirectionUtils.cpp:331
ExecutorProcessControl.h
llvm::orc::EPCIndirectionUtils
Provides ExecutorProcessControl based indirect stubs, trampoline pool and lazy call through manager.
Definition: EPCIndirectionUtils.h:30
llvm::orc::EPCIndirectionUtils::ABISupport::getPointerSize
unsigned getPointerSize() const
Definition: EPCIndirectionUtils.h:48
llvm::Triple::mips
@ mips
Definition: Triple.h:64
llvm::Triple::aarch64
@ aarch64
Definition: Triple.h:51