diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-02-25 23:00:19 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-02-25 23:00:19 +0000 |
commit | cf99fd57090e5630b22da6528ebb518ad381f47d (patch) | |
tree | 0b93474dd10cb3c89073c74a169108bfa83e8f0e /llvm/tools/lli/RecordingMemoryManager.h | |
parent | 11d0a9f27865e6bf46993aa42e9aec76416f41c7 (diff) | |
download | bcm5719-llvm-cf99fd57090e5630b22da6528ebb518ad381f47d.tar.gz bcm5719-llvm-cf99fd57090e5630b22da6528ebb518ad381f47d.zip |
Provide workaround for PR 15130.
This changes the RecordingMemoryManager in lli to use mapped memory rather than malloc to allocate memory for sections and uses a 'near' MemoryBlock to keep the allocations together. This works around a problem in MCJIT where relocations are applied to a generated image immediately oupon generation, which isn't appropriate for the remote case.
llvm-svn: 176057
Diffstat (limited to 'llvm/tools/lli/RecordingMemoryManager.h')
-rw-r--r-- | llvm/tools/lli/RecordingMemoryManager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/lli/RecordingMemoryManager.h b/llvm/tools/lli/RecordingMemoryManager.h index 85bf4e14436..991f535fd4c 100644 --- a/llvm/tools/lli/RecordingMemoryManager.h +++ b/llvm/tools/lli/RecordingMemoryManager.h @@ -31,6 +31,12 @@ private: SmallVector<Allocation, 16> AllocatedDataMem; SmallVector<Allocation, 16> AllocatedCodeMem; + // FIXME: This is part of a work around to keep sections near one another + // when MCJIT performs relocations after code emission but before + // the generated code is moved to the remote target. + sys::MemoryBlock Near; + sys::MemoryBlock allocateSection(uintptr_t Size); + public: RecordingMemoryManager() {} virtual ~RecordingMemoryManager(); |