aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp b/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp
index 9b712cb8f7ca..75cc30753f41 100644
--- a/llvm/lib/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.cpp
+++ b/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()));