[PATCH] D144276: [ORC] Introduce SetUpExecutorNativePlatform utility.
Lang Hames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 09:38:45 PST 2023
lhames created this revision.
lhames added reviewers: sgraenitz, sunho, v.g.vassilev, drmeister, Hahnfeld.
Herald added a subscriber: hiraditya.
Herald added a project: All.
lhames requested review of this revision.
Herald added a project: LLVM.
Simplifies the process of building an LLJIT instance that supports the native
platform features (initializers, TLV, etc.).
SetUpExecutorNativePlatform can be passed to LLJITBuilder::setPlatformSetUp
method. It takes a reference to the ORC runtime (as a path or an in-memory
archive) and automatically sets the platform for LLJIT's ExecutionSession based
on the executor process's triple.
This is a rough draft -- we'll need more polish and some tests before this
lands. In particular we need to re-work ORCPlatformSupport to handle
COFF/Windows. We could take this opportunity to do away with the whole
LLJITPlatformSupport concept. It really only exists to implement `initialize`
and `deinitialize`, so I think that we could instead define standard functions
"__orc_rt_lljit_initialize" and "__orc_rt_lljit_deinitialize" and alias them
to platform-specific implementations (a wrapper for dlopen on *nix, a wrapper
for LoadLibrary for Windows, etc.).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144276
Files:
llvm/include/llvm/ExecutionEngine/Orc/COFFPlatform.h
llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
llvm/tools/lli/lli.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144276.498415.patch
Type: text/x-patch
Size: 22263 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230217/95baa6b3/attachment.bin>
More information about the llvm-commits
mailing list