diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-01-27 22:17:16 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-06-04 11:59:19 +0000 | 
| commit | 390adc38fc112be360bd15499e5241bf4e675b6f (patch) | |
| tree | 712d68d3aa03f7aa4902ba03dcac2a56f49ae0e5 /contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp | |
| parent | 8a84287b0edc66fc6dede3db770d10ff41da5464 (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp | 16 | 
1 files changed, 3 insertions, 13 deletions
diff --git a/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp b/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp index 9b712cb8f7ca..75cc30753f41 100644 --- a/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp +++ b/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp @@ -56,17 +56,7 @@ public:      }      // Transfer allocation actions. -    // FIXME: Merge JITLink and ORC SupportFunctionCall and Action list types, -    //        turn this into a std::swap. -    FR.Actions.reserve(G.allocActions().size()); -    for (auto &ActPair : G.allocActions()) -      FR.Actions.push_back({{ExecutorAddr(ActPair.Finalize.FnAddr), -                             {ExecutorAddr(ActPair.Finalize.CtxAddr), -                              ExecutorAddrDiff(ActPair.Finalize.CtxSize)}}, -                            {ExecutorAddr(ActPair.Dealloc.FnAddr), -                             {ExecutorAddr(ActPair.Dealloc.CtxAddr), -                              ExecutorAddrDiff(ActPair.Dealloc.CtxSize)}}}); -    G.allocActions().clear(); +    std::swap(FR.Actions, G.allocActions());      Parent.EPC.callSPSWrapperAsync<          rt::SPSSimpleExecutorMemoryManagerFinalizeSignature>( @@ -80,7 +70,7 @@ public:            } else if (FinalizeErr)              OnFinalize(std::move(FinalizeErr));            else -            OnFinalize(FinalizedAlloc(AllocAddr.getValue())); +            OnFinalize(FinalizedAlloc(AllocAddr));          },          Parent.SAs.Allocator, std::move(FR));    } @@ -161,7 +151,7 @@ void EPCGenericJITLinkMemoryManager::completeAllocation(      const auto &AG = KV.first;      auto &Seg = KV.second; -    Seg.Addr = NextSegAddr.getValue(); +    Seg.Addr = NextSegAddr;      KV.second.WorkingMem = BL.getGraph().allocateBuffer(Seg.ContentSize).data();      NextSegAddr += ExecutorAddrDiff(          alignTo(Seg.ContentSize + Seg.ZeroFillSize, EPC.getPageSize()));  | 
