[llvm] 331a54d - [llvm-jitlink] Don't return immediately in -noexec mode, just skip execution.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 09:14:08 PDT 2023
Author: Lang Hames
Date: 2023-07-24T09:14:01-07:00
New Revision: 331a54d670722f5ee6b64a25d1547df3679d6c51
URL: https://github.com/llvm/llvm-project/commit/331a54d670722f5ee6b64a25d1547df3679d6c51
DIFF: https://github.com/llvm/llvm-project/commit/331a54d670722f5ee6b64a25d1547df3679d6c51.diff
LOG: [llvm-jitlink] Don't return immediately in -noexec mode, just skip execution.
Skipping execution rather than bailing out early means that:
1. Explicit teardown of JIT'd code will happen at the same point (via the call
to ExecutionSession::endSession) regardless of whether -noexec is used.
2. The -show-times option will work with -noexec.
Added:
Modified:
llvm/tools/llvm-jitlink/llvm-jitlink.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
index 3b8def4c38b34a..00dd5206d75a75 100644
--- a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+++ b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
@@ -2038,11 +2038,8 @@ int main(int argc, char *argv[]) {
ExitOnErr(runChecks(*S));
- if (NoExec)
- return 0;
-
int Result = 0;
- {
+ if (!NoExec) {
LLVM_DEBUG(dbgs() << "Running \"" << EntryPointName << "\"...\n");
TimeRegion TR(Timers ? &Timers->RunTimer : nullptr);
if (!OrcRuntime.empty())
More information about the llvm-commits
mailing list