[llvm] 47a40ed - [ORC] Remove a redundant call to getTargetMemory.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 26 17:36:14 PDT 2020


Author: Lang Hames
Date: 2020-07-26T17:34:31-07:00
New Revision: 47a40eda178ef808090314e0664dbd3850db83eb

URL: https://github.com/llvm/llvm-project/commit/47a40eda178ef808090314e0664dbd3850db83eb
DIFF: https://github.com/llvm/llvm-project/commit/47a40eda178ef808090314e0664dbd3850db83eb.diff

LOG: [ORC] Remove a redundant call to getTargetMemory.

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp
index b4c21c32310c..85dc4bec9a12 100644
--- a/llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp
@@ -297,15 +297,14 @@ TPCIndirectionUtils::writeResolverBlock(JITTargetAddress ReentryFnAddr,
     return Alloc.takeError();
 
   auto WorkingMemory = (*Alloc)->getWorkingMemory(ResolverBlockPermissions);
-  auto TargetAddress = (*Alloc)->getTargetMemory(ResolverBlockPermissions);
-  ABI->writeResolverCode(WorkingMemory.data(), TargetAddress, ReentryFnAddr,
+  ResolverBlockAddr = (*Alloc)->getTargetMemory(ResolverBlockPermissions);
+  ABI->writeResolverCode(WorkingMemory.data(), ResolverBlockAddr, ReentryFnAddr,
                          ReentryCtxAddr);
 
   if (auto Err = (*Alloc)->finalize())
     return std::move(Err);
 
   ResolverBlock = std::move(*Alloc);
-  ResolverBlockAddr = ResolverBlock->getTargetMemory(ResolverBlockPermissions);
   return ResolverBlockAddr;
 }
 


        


More information about the llvm-commits mailing list