[llvm] [ORC] Mangle SimpleNativeMemoryMap CI names as C (PR #225074)
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 05:47:13 PDT 2026
https://github.com/lhames created https://github.com/llvm/llvm-project/pull/225074
Flip the SimpleNativeMemoryMap memory-manager descriptors (instance + reserve/initialize/deinitialize/release) from Verbatim to C, so their names carry the target's C mangling. The controller and in-tree executor mangle the same specs, and no other provider defines these names, so they stay in sync; nothing else defines these names.
Also update the CreateFromExecutionSession test to use the process triple so that its name mangling matches the target mangling above.
>From b25d3f147cc8cf0b3f73e128a877ef975a70e369 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Mon, 21 Sep 2026 22:28:24 +1000
Subject: [PATCH] [ORC] Mangle SimpleNativeMemoryMap CI names as C
Flip the SimpleNativeMemoryMap memory-manager descriptors (instance +
reserve/initialize/deinitialize/release) from Verbatim to C, so their
names carry the target's C mangling. The controller and in-tree executor
mangle the same specs, and no other provider defines these names, so
they stay in sync; nothing else defines these names.
Also update the CreateFromExecutionSession test to use the process
triple so that its name mangling matches the target mangling above.
---
.../Orc/Shared/SPSCI/SimpleNativeMemoryMapSPSCI.h | 14 +++++++-------
.../Orc/EPCGenericJITLinkMemoryManagerTest.cpp | 3 ++-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/SPSCI/SimpleNativeMemoryMapSPSCI.h b/llvm/include/llvm/ExecutionEngine/Orc/Shared/SPSCI/SimpleNativeMemoryMapSPSCI.h
index 6b1abd8fede94..24053e390d49a 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Shared/SPSCI/SimpleNativeMemoryMapSPSCI.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Shared/SPSCI/SimpleNativeMemoryMapSPSCI.h
@@ -34,20 +34,20 @@ namespace llvm::orc::rt::sps_ci {
/// allocator object) -- passed as the first argument to each call below -- not
/// a wrapper to call.
inline constexpr SymbolNameSpec SimpleNativeMemoryMapInstanceName =
- SymbolNameSpec::verbatim("orc_rt_ci_SimpleNativeMemoryMap_Instance");
+ SymbolNameSpec::c("orc_rt_ci_SimpleNativeMemoryMap_Instance");
/// Reserve an address range of the given size; returns its base.
struct MemMgrReserve {
static constexpr SymbolNameSpec Name =
- SymbolNameSpec::verbatim("orc_rt_ci_sps_SimpleNativeMemoryMap_reserve");
+ SymbolNameSpec::c("orc_rt_ci_sps_SimpleNativeMemoryMap_reserve");
using SPSSig = shared::SPSExpected<shared::SPSExecutorAddr>(
shared::SPSExecutorAddr, uint64_t);
};
/// Apply a finalize request; returns a key for the initialized allocation.
struct MemMgrInitialize {
- static constexpr SymbolNameSpec Name = SymbolNameSpec::verbatim(
- "orc_rt_ci_sps_SimpleNativeMemoryMap_initialize");
+ static constexpr SymbolNameSpec Name =
+ SymbolNameSpec::c("orc_rt_ci_sps_SimpleNativeMemoryMap_initialize");
using SPSSig = shared::SPSExpected<shared::SPSExecutorAddr>(
shared::SPSExecutorAddr, shared::SPSFinalizeRequest);
};
@@ -55,7 +55,7 @@ struct MemMgrInitialize {
/// Deinitialize the allocations with the given base addresses (running their
/// deallocation actions) without releasing their memory.
struct MemMgrDeinitialize {
- static constexpr SymbolNameSpec Name = SymbolNameSpec::verbatim(
+ static constexpr SymbolNameSpec Name = SymbolNameSpec::c(
"orc_rt_ci_sps_SimpleNativeMemoryMap_deinitializeMultiple");
using SPSSig = shared::SPSError(shared::SPSExecutorAddr,
shared::SPSSequence<shared::SPSExecutorAddr>);
@@ -63,8 +63,8 @@ struct MemMgrDeinitialize {
/// Release the allocations with the given base addresses.
struct MemMgrRelease {
- static constexpr SymbolNameSpec Name = SymbolNameSpec::verbatim(
- "orc_rt_ci_sps_SimpleNativeMemoryMap_releaseMultiple");
+ static constexpr SymbolNameSpec Name =
+ SymbolNameSpec::c("orc_rt_ci_sps_SimpleNativeMemoryMap_releaseMultiple");
using SPSSig = shared::SPSError(shared::SPSExecutorAddr,
shared::SPSSequence<shared::SPSExecutorAddr>);
};
diff --git a/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp
index 54c4a745b1d9f..91cd3a97ac286 100644
--- a/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp
@@ -221,7 +221,8 @@ TEST(EPCGenericJITLinkMemoryManagerTest, CreateFromExecutionSession) {
public:
EPCWithBootstrapSymbols(std::shared_ptr<SymbolStringPool> SSP,
StringMap<ExecutorAddr> BS)
- : UnsupportedExecutorProcessControl(std::move(SSP)) {
+ : UnsupportedExecutorProcessControl(std::move(SSP), nullptr,
+ sys::getProcessTriple()) {
this->BootstrapSymbols = std::move(BS);
}
};
More information about the llvm-commits
mailing list