From 85a8d3c7b3788e4639b6934bb2fa5b3ba58e7d60 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Fri, 2 Jul 2021 12:37:22 +1000 Subject: [PATCH] [ORC] Rename SPSTargetAddress to SPSExecutorAddress. Also removes SPSTagTargetAddress, which was accidentally introduced at some point (and never used). --- .../ExecutionEngine/Orc/EPCDebugObjectRegistrar.h | 2 +- .../Orc/Shared/SimplePackedSerialization.h | 15 +++------------ lib/ExecutionEngine/Orc/EPCEHFrameRegistrar.cpp | 4 ++-- .../Orc/TargetProcess/JITLoaderGDB.cpp | 2 +- .../Orc/TargetProcess/RegisterEHFrames.cpp | 4 ++-- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h b/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h index dc42c74a612..db5c18b4b49 100644 --- a/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h +++ b/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h @@ -43,7 +43,7 @@ public: : EPC(EPC), RegisterFn(RegisterFn) {} Error registerDebugObject(sys::MemoryBlock TargetMem) override { - return WrapperFunction::call( + return WrapperFunction::call( EPCCaller(EPC, RegisterFn), pointerToJITTargetAddress(TargetMem.base()), static_cast(TargetMem.allocatedSize())); } diff --git a/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h b/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h index e834675b4b4..a2ad84647d2 100644 --- a/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h +++ b/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h @@ -173,15 +173,6 @@ public: // Any empty placeholder suitable as a substitute for void when deserializing class SPSEmpty {}; -/// SPS tag type for target addresses. -/// -/// SPSTagTargetAddresses should be serialized as a uint64_t value. -class SPSTagTargetAddress; - -template <> -class SPSSerializationTraits - : public SPSSerializationTraits {}; - /// SPS tag type for tuples. /// /// A blob tuple should be serialized by serializing each of the elements in @@ -201,11 +192,11 @@ template class SPSSequence; /// SPS tag type for strings, which are equivalent to sequences of chars. using SPSString = SPSSequence; -/// SPS tag type for target addresseses. -class SPSTargetAddress {}; +/// SPS tag type for executor addresseses. +class SPSExecutorAddress {}; template <> -class SPSSerializationTraits +class SPSSerializationTraits : public SPSSerializationTraits {}; /// SPS tag type for maps. diff --git a/lib/ExecutionEngine/Orc/EPCEHFrameRegistrar.cpp b/lib/ExecutionEngine/Orc/EPCEHFrameRegistrar.cpp index c51a68c1bfe..4bfcf132c8f 100644 --- a/lib/ExecutionEngine/Orc/EPCEHFrameRegistrar.cpp +++ b/lib/ExecutionEngine/Orc/EPCEHFrameRegistrar.cpp @@ -55,14 +55,14 @@ EPCEHFrameRegistrar::Create(ExecutorProcessControl &EPC) { Error EPCEHFrameRegistrar::registerEHFrames(JITTargetAddress EHFrameSectionAddr, size_t EHFrameSectionSize) { - return WrapperFunction::call( + return WrapperFunction::call( EPCCaller(EPC, RegisterEHFrameWrapperFnAddr), EHFrameSectionAddr, static_cast(EHFrameSectionSize)); } Error EPCEHFrameRegistrar::deregisterEHFrames( JITTargetAddress EHFrameSectionAddr, size_t EHFrameSectionSize) { - return WrapperFunction::call( + return WrapperFunction::call( EPCCaller(EPC, DeregisterEHFrameWrapperFnAddr), EHFrameSectionAddr, static_cast(EHFrameSectionSize)); } diff --git a/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp b/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp index 55b1220a035..43c2a44835f 100644 --- a/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp +++ b/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp @@ -95,7 +95,7 @@ static void registerJITLoaderGDBImpl(JITTargetAddress Addr, uint64_t Size) { extern "C" orc::shared::detail::CWrapperFunctionResult llvm_orc_registerJITLoaderGDBWrapper(const char *Data, uint64_t Size) { using namespace orc::shared; - return WrapperFunction::handle( + return WrapperFunction::handle( Data, Size, registerJITLoaderGDBImpl) .release(); } diff --git a/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp b/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp index 9463a36668c..4a408d61ee3 100644 --- a/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp +++ b/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp @@ -167,14 +167,14 @@ static Error deregisterEHFrameWrapper(JITTargetAddress Addr, uint64_t Size) { extern "C" orc::shared::detail::CWrapperFunctionResult llvm_orc_registerEHFrameSectionWrapper(const char *Data, uint64_t Size) { - return WrapperFunction::handle( + return WrapperFunction::handle( Data, Size, registerEHFrameWrapper) .release(); } extern "C" orc::shared::detail::CWrapperFunctionResult llvm_orc_deregisterEHFrameSectionWrapper(const char *Data, uint64_t Size) { - return WrapperFunction::handle( + return WrapperFunction::handle( Data, Size, deregisterEHFrameWrapper) .release(); }