diff options
author | Lang Hames <lhames@gmail.com> | 2015-10-29 22:04:22 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2015-10-29 22:04:22 +0000 |
commit | 3f88a9ea2c7fec9697166002832c6a108b749611 (patch) | |
tree | 8060d02740b626350c0872c63672ada502ff58a6 /llvm/lib/ExecutionEngine/Orc | |
parent | 72b5f9bb975e2e647abbb798fa07f00f6c8d884e (diff) | |
download | bcm5719-llvm-3f88a9ea2c7fec9697166002832c6a108b749611.tar.gz bcm5719-llvm-3f88a9ea2c7fec9697166002832c6a108b749611.zip |
[Orc] Teach IndirectStubsManager to manage an expandable pool of stubs, rather
than a pre-allocated slab of stubs. Also add a convenience method for creating a
single stub, rather than a whole block a time.
llvm-svn: 251658
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp b/llvm/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp index a7d54a2734a..1e2d58cd562 100644 --- a/llvm/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp +++ b/llvm/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp @@ -144,6 +144,22 @@ OrcX86_64::insertCompileCallbackTrampolines(Module &M, return GetLabelName; } +OrcX86_64::IndirectStubsInfo::IndirectStubsInfo(IndirectStubsInfo &&Other) { + StubsBlock = std::move(Other.StubsBlock); + PtrsBlock = std::move(Other.PtrsBlock); + Other.StubsBlock = sys::MemoryBlock(); + Other.PtrsBlock = sys::MemoryBlock(); +} + +OrcX86_64::IndirectStubsInfo& +OrcX86_64::IndirectStubsInfo::operator=(IndirectStubsInfo &&Other) { + StubsBlock = std::move(Other.StubsBlock); + PtrsBlock = std::move(Other.PtrsBlock); + Other.StubsBlock = sys::MemoryBlock(); + Other.PtrsBlock = sys::MemoryBlock(); + return *this; +} + OrcX86_64::IndirectStubsInfo::~IndirectStubsInfo() { sys::Memory::releaseMappedMemory(StubsBlock); sys::Memory::releaseMappedMemory(PtrsBlock); |