diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-11-04 09:30:48 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-11-04 09:30:48 +0000 |
commit | b0b53491ef32b85bd90c8590faeb8a3fb4b17a95 (patch) | |
tree | 7a39d3291145c5b0cbe3a9cb996fff3d711d9403 /lib/Target/ARM/ARMJITInfo.h | |
parent | c40b75b55a1b63a46d45b3de2e27641c265a7ed8 (diff) | |
download | llvm-b0b53491ef32b85bd90c8590faeb8a3fb4b17a95.tar.gz llvm-b0b53491ef32b85bd90c8590faeb8a3fb4b17a95.tar.bz2 llvm-b0b53491ef32b85bd90c8590faeb8a3fb4b17a95.tar.xz |
For some targets, it's not possible to place GVs in the same memory buffer as the MachineCodeEmitter allocated memory. Code and data has different read / write / execution privilege requirements.
This is a short term workaround. The current solution is for the JIT memory manager to manage code and data memory separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMJITInfo.h')
-rw-r--r-- | lib/Target/ARM/ARMJITInfo.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMJITInfo.h b/lib/Target/ARM/ARMJITInfo.h index ba8768aec4..2a3a7f8f37 100644 --- a/lib/Target/ARM/ARMJITInfo.h +++ b/lib/Target/ARM/ARMJITInfo.h @@ -65,6 +65,17 @@ namespace llvm { /// pool address resolution is handled by the target. virtual bool hasCustomConstantPool() const { return true; } + /// allocateSeparateGVMemory - If true, globals should be placed in + /// separately allocated heap memory rather than in the same + /// code memory allocated by MachineCodeEmitter. + virtual bool allocateSeparateGVMemory() const { +#ifdef __APPLE__ + return true; +#else + return false; +#endif + } + /// Initialize - Initialize internal stage. Get the list of constant pool /// Resize constant pool ids to CONSTPOOL_ENTRY addresses map. void Initialize(const std::vector<MachineConstantPoolEntry> *mcpes) { |