[llvm] 930d477 - [lli] Don't create an ExecutorProcessControl in non-remote MCJIT config.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 18:25:33 PST 2023
Author: Lang Hames
Date: 2023-01-31T18:25:27-08:00
New Revision: 930d477d5d8f6c9f09daabb84ce6b76f38bf438d
URL: https://github.com/llvm/llvm-project/commit/930d477d5d8f6c9f09daabb84ce6b76f38bf438d
DIFF: https://github.com/llvm/llvm-project/commit/930d477d5d8f6c9f09daabb84ce6b76f38bf438d.diff
LOG: [lli] Don't create an ExecutorProcessControl in non-remote MCJIT config.
When lli is run with -jit-kind=mcjit and without remote JITing there is no need
to create an ExecutorProcessControl object.
This is nice cleanup, but as a bonus should silence the leak reports that we're
seeing in https://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan/9105/.
(Though as a side note I believe those reports are spurious. They are being
tracked by rdar://104825696).
Added:
Modified:
llvm/tools/lli/lli.cpp
Removed:
################################################################################
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index c9b77e23ba07a..97c10e3528cf5 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/tools/lli/lli.cpp
@@ -663,10 +663,6 @@ int main(int argc, char **argv, char * const *envp) {
#endif
}
- std::unique_ptr<orc::ExecutorProcessControl> EPC =
- RemoteMCJIT ? ExitOnErr(launchRemote())
- : ExitOnErr(orc::SelfExecutorProcessControl::Create());
-
if (!RemoteMCJIT) {
// If the program doesn't explicitly call exit, we will need the Exit
// function later on to make an explicit call, so get the function now.
@@ -712,6 +708,7 @@ int main(int argc, char **argv, char * const *envp) {
abort();
} else {
// else == "if (RemoteMCJIT)"
+ std::unique_ptr<orc::ExecutorProcessControl> EPC = ExitOnErr(launchRemote());
// Remote target MCJIT doesn't (yet) support static constructors. No reason
// it couldn't. This is a limitation of the LLI implementation, not the
More information about the llvm-commits
mailing list