aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2025-10-15 16:45:20 +1100
committerGitHub <noreply@github.com>2025-10-15 16:45:20 +1100
commitde9013fa18a12f982a223ea30819b523e86667d4 (patch)
tree5540a659c8216c96f320ca3e63fc2da95aefe309 /llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp
parentd83fe1201e9d91da192d9292fea1a65579086e04 (diff)
downloadllvm-de9013fa18a12f982a223ea30819b523e86667d4.zip
llvm-de9013fa18a12f982a223ea30819b523e86667d4.tar.gz
llvm-de9013fa18a12f982a223ea30819b523e86667d4.tar.bz2
[ORC] Use MapperJITLinkMemoryManager for ReOptimizeLayerTest. (#163495)
This is an attempted fix for https://github.com/llvm/llvm-project/issues/158270. The issue described sounds like it may be caused by non-contiguous regions returned for separate allocations by the default memory manager. Using MapperJITLinkMemoryMnaager with a 10Mb slab size should fix the issue.
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp
index cd10ffe..f35a378 100644
--- a/llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp
@@ -9,6 +9,7 @@
#include "llvm/ExecutionEngine/Orc/IRTransformLayer.h"
#include "llvm/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.h"
#include "llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h"
+#include "llvm/ExecutionEngine/Orc/MapperJITLinkMemoryManager.h"
#include "llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h"
#include "llvm/ExecutionEngine/Orc/ObjectTransformLayer.h"
#include "llvm/ExecutionEngine/Orc/SelfExecutorProcessControl.h"
@@ -84,8 +85,11 @@ protected:
ES = std::make_unique<ExecutionSession>(std::move(*EPC));
JD = &ES->createBareJITDylib("main");
+
ObjLinkingLayer = std::make_unique<ObjectLinkingLayer>(
- *ES, std::make_unique<InProcessMemoryManager>(*PageSize));
+ *ES, std::make_unique<MapperJITLinkMemoryManager>(
+ 10 * 1024 * 1024,
+ std::make_unique<InProcessMemoryMapper>(*PageSize)));
DL = std::make_unique<DataLayout>(std::move(*DLOrErr));
auto TM = JTMB->createTargetMachine();