[llvm] 34e539d - [ORC] Set ResolverBlockAddr in EPCIndirectionUtils::writeResolverBlock.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 16:46:59 PST 2022
Author: Lang Hames
Date: 2022-03-01T16:44:55-08:00
New Revision: 34e539dcd78ab828210ecf7f7d2e9d2c986511b3
URL: https://github.com/llvm/llvm-project/commit/34e539dcd78ab828210ecf7f7d2e9d2c986511b3
DIFF: https://github.com/llvm/llvm-project/commit/34e539dcd78ab828210ecf7f7d2e9d2c986511b3.diff
LOG: [ORC] Set ResolverBlockAddr in EPCIndirectionUtils::writeResolverBlock.
Without this, EPCIndirectionUtils::getResolverBlockAddr (and lazy compilation
via EPC) won't work.
No test case: lli is still using LocalLazyCallThroughManager. I'll revisit this
soon when I look at adding lazy compilation support to the ORC runtime.
Added:
Modified:
llvm/include/llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h
llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h
index 92de5882bafe4..354984b540a9f 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h
@@ -148,7 +148,7 @@ class EPCIndirectionUtils {
std::mutex EPCUIMutex;
ExecutorProcessControl &EPC;
std::unique_ptr<ABISupport> ABI;
- JITTargetAddress ResolverBlockAddr;
+ JITTargetAddress ResolverBlockAddr = 0;
FinalizedAlloc ResolverBlock;
std::unique_ptr<TrampolinePool> TP;
std::unique_ptr<LazyCallThroughManager> LCTM;
diff --git a/llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp
index 37c9b1046e221..63de9cdfa02ea 100644
--- a/llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp
@@ -302,7 +302,8 @@ EPCIndirectionUtils::writeResolverBlock(JITTargetAddress ReentryFnAddr,
return Alloc.takeError();
auto SegInfo = Alloc->getSegInfo(MemProt::Read | MemProt::Exec);
- ABI->writeResolverCode(SegInfo.WorkingMem.data(), SegInfo.Addr.getValue(),
+ ResolverBlockAddr = SegInfo.Addr.getValue();
+ ABI->writeResolverCode(SegInfo.WorkingMem.data(), ResolverBlockAddr,
ReentryFnAddr, ReentryCtxAddr);
auto FA = Alloc->finalize();
@@ -310,7 +311,7 @@ EPCIndirectionUtils::writeResolverBlock(JITTargetAddress ReentryFnAddr,
return FA.takeError();
ResolverBlock = std::move(*FA);
- return SegInfo.Addr.getValue();
+ return ResolverBlockAddr;
}
std::unique_ptr<IndirectStubsManager>
More information about the llvm-commits
mailing list