summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* [MCJIT] Add support for ARM HALF_DIFF relocations to MCJIT.Lang Hames2014-09-114-58/+183
| | | | | | Fixes <rdar://problem/18297804>. llvm-svn: 217620
* [MCJIT] Take the relocation addend into account when applying ARM MachO VANILLALang Hames2014-09-111-1/+2
| | | | | | | | and BR24 relocations. <rdar://problem/18296496> llvm-svn: 217605
* Add doInitialization/doFinalization to DataLayoutPass.Rafael Espindola2014-09-101-1/+1
| | | | | | | | | | | | | With this a DataLayoutPass can be reused for multiple modules. Once we have doInitialization/doFinalization, it doesn't seem necessary to pass a Module to the constructor. Overall this change seems in line with the idea of making DataLayout a required part of Module. With it the only way of having a DataLayout used is to add it to the Module. llvm-svn: 217548
* [MCJIT] Remove redundant architecture check from RuntimeDyldMachOI386.Lang Hames2014-09-101-1/+1
| | | | llvm-svn: 217470
* [MCJIT] Revert partial RuntimeDyldELF cleanup that was prematurely committed inLang Hames2014-09-071-3/+3
| | | | | | r217328. llvm-svn: 217329
* [MCJIT] Rewrite RuntimeDyldMachO and its derived classes to use the 'Offset'Lang Hames2014-09-077-18/+18
| | | | | | | | | | field of RelocationValueRef, rather than the 'Addend' field. This is consistent with RuntimeDyldELF's use of RelocationValueRef, and more consistent with the semantics of the data being stored (the offset from the start of a section or symbol). llvm-svn: 217328
* [MCJIT] Fix a bug RuntimeDyldImpl's read/writeBytesUnaligned methods.Lang Hames2014-09-071-19/+17
| | | | | | | | | The previous implementation was writing to the high-bytes of integers on BE targets (when run on LE hosts). http://llvm.org/PR20640 llvm-svn: 217325
* [MCJIT] Fix an iterator invalidation bug in MCJIT::finalizeObject.Lang Hames2014-09-052-5/+10
| | | | | | | | | | | The finalizeObject method calls generateCodeForModule on each of the currently 'added' objects, but generateCodeForModule moves objects out of the 'added' set as it's called. To avoid iterator invalidation issues, the added set is copied out before any calls to generateCodeForModule. This should fix http://llvm.org/PR20851 . llvm-svn: 217291
* [MCJIT] Const-ify the symbol lookup operations on RuntimeDyld.Lang Hames2014-09-052-6/+6
| | | | llvm-svn: 217263
* Fix use-after-move introduced in r217065 and caught in post-commit review by ↵David Blaikie2014-09-041-2/+2
| | | | | | Alexey. llvm-svn: 217181
* unique_ptrify RuntimeDyld::DyldDavid Blaikie2014-09-041-7/+7
| | | | llvm-svn: 217180
* build/cmake: Fix CMP0023 warning with libffiJan Vesely2014-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes: CMake Warning (dev) at lib/ExecutionEngine/Interpreter/CMakeLists.txt:16 (target_link_libraries): Policy CMP0023 is not set: Plain and keyword target_link_libraries signatures cannot be mixed. Run "cmake --help-policy CMP0023" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The keyword signature for target_link_libraries has already been used with the target "LLVMInterpreter". All uses of target_link_libraries with a target should be either all-keyword or all-plain. The uses of the keyword signature are here: * cmake/modules/AddLLVM.cmake:345 (target_link_libraries) Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 217154
* [MCJIT] Make sure eh-frame fixups use the target's pointer type, not the host's.Lang Hames2014-09-046-39/+63
| | | | | | | If the wrong pointer type is used it can cause corruption of the frame description entries. llvm-svn: 217124
* [MCJIT] Add command-line argument to llvm-rtdyld to specify target addresses forLang Hames2014-09-043-0/+19
| | | | | | | | | sections. This allows fine-grained control of the memory layout of hypothetical target processes for testing purposes. llvm-svn: 217122
* unique_ptrify RuntimeDyldImpl::loadObjectDavid Blaikie2014-09-032-8/+7
| | | | | | | | | | I'm not sure this is a particularly helpful API (to pass ownership and then return it unconditionally) rather than just pass the underlying object by non-const reference, but this was the original API so I'll just make it more safe/stable and anyone else is free to adjust that at their whim, of course. llvm-svn: 217081
* [JIT] Add an out-of-line definition for the virtual destructor inChandler Carruth2014-09-032-0/+16
| | | | | | | JITEventListener. This used to be in the old JIT (last line of the file) and everyone just "happened" to pick it up from there. =/ Doh. llvm-svn: 217073
* unique_ptrify MCJIT::emitObjectDavid Blaikie2014-09-032-5/+5
| | | | llvm-svn: 217067
* unique_ptrify a bunch of stuff through RuntimeDyld::loadObjectDavid Blaikie2014-09-037-58/+59
| | | | llvm-svn: 217065
* Add override to overriden virtual methods, remove virtual keywords.Benjamin Kramer2014-09-035-5/+6
| | | | | | No functionality change. Changes made by clang-tidy + some manual cleanup. llvm-svn: 217028
* [MCJIT] Make llvm-rtdyld process eh_frame sections in -verify mode (accidentallyLang Hames2014-09-031-1/+0
| | | | | | | | left out of r217010). Also remove a crufty debugging output statement that was accidentally left in. llvm-svn: 217011
* [MCJIT] Add a 'section_addr' builtin function to RuntimeDyldChecker.Lang Hames2014-09-033-25/+141
| | | | | | | | | | The syntax of the new builtin is 'section_addr(<filename>, <section-name>)' (similar to the stub_addr builtin, but without a symbol name). It returns the base address of the given section in the given object file. This builtin makes it possible to refer to the contents of sections that cannot contain symbols, e.g. sections added by the linker itself, like __eh_frame. llvm-svn: 217010
* unique_ptrify passing the TargetMachine to ExecutionEngine::MCJITCtorDavid Blaikie2014-09-023-16/+12
| | | | llvm-svn: 216988
* Reinstate "Nuke the old JIT."Eric Christopher2014-09-0217-2293/+12
| | | | | | | | Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reinstates commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 216982
* [MCJIT] Move endian-aware read/writes from RuntimeDyldMachO intoLang Hames2014-08-298-57/+46
| | | | | | | | | RuntimeDyldImpl. These are platform independent, and moving them to the base class allows RuntimeDyldChecker to use them too. llvm-svn: 216801
* Fix typos in comments, NFCRobin Morisset2014-08-291-1/+1
| | | | | | | | | | | | | | Summary: Just fixing comments, no functional change. Test Plan: N/A Reviewers: jfb Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D5130 llvm-svn: 216784
* [MCJIT] Fix format specifiers for debug output in RuntimeDyld.Lang Hames2014-08-282-3/+3
| | | | | | More work on http://llvm.org/PR20640 llvm-svn: 216648
* Fix unaligned reads/writes in X86JIT and RuntimeDyldELF.Alexey Samsonov2014-08-271-26/+22
| | | | | | | | | | | | | | | | Summary: Introduce support::ulittleX_t::ref type to Support/Endian.h and use it in x86 JIT to enforce correct endianness and fix unaligned accesses. Test Plan: regression test suite Reviewers: lhames Subscribers: ributzka, llvm-commits Differential Revision: http://reviews.llvm.org/D5011 llvm-svn: 216631
* [MCJIT] Replace a C-style cast in RuntimeDyldImpl.h.Lang Hames2014-08-271-1/+1
| | | | llvm-svn: 216568
* [MCJIT] More endianness fixes for RuntimeDyldMachO.Lang Hames2014-08-272-12/+28
| | | | | | http://llvm.org/PR20640 llvm-svn: 216567
* Give ExecutionEngine of top level buffers.Rafael Espindola2014-08-263-3/+12
| | | | | | | Long term the idea if for the engine to not own the buffers, but for now this is consistent with the rest of the API. llvm-svn: 216484
* Silence unused function warning in Release builds.Benjamin Kramer2014-08-261-0/+2
| | | | llvm-svn: 216458
* ExecutionEngine: address review commentsDylan Noblesmith2014-08-261-7/+6
| | | | llvm-svn: 216427
* [MCJIT][SystemZ] Use a simpler expression for indirect relocation offsets.Lang Hames2014-08-251-1/+1
| | | | | | | | The expressions 'Reloc.Addend - Addend' and 'Reloc.Offset' should always be equal in this context. The latter is prefered - we want to remove the RelocationValueRef::Addend field in the future. llvm-svn: 216418
* [MCJIT] Dump section memory both before and after relocations are applied.Lang Hames2014-08-251-5/+8
| | | | | | Also switch section memory dump format from 8 to 16 columns. llvm-svn: 216413
* [MCJIT] Make RuntimeDyld dump section contents in -debug mode.Lang Hames2014-08-252-4/+34
| | | | llvm-svn: 216400
* ExecutionEngine: unique_ptr-ifyDylan Noblesmith2014-08-251-20/+12
| | | | | | NFC. llvm-svn: 216362
* EE/JIT: unique_ptr-ifyDylan Noblesmith2014-08-251-7/+3
| | | | llvm-svn: 216361
* Use range based for loops to avoid needing to re-mention SmallPtrSet size.Craig Topper2014-08-242-9/+6
| | | | llvm-svn: 216351
* Support: add llvm::unique_lockDylan Noblesmith2014-08-231-3/+4
| | | | | | | | | | | | | | | Based on the STL class of the same name, it guards a mutex while also allowing it to be unlocked conditionally before destruction. This eliminates the last naked usages of mutexes in LLVM and clang. It also uncovered and fixed a bug in callExternalFunction() when compiled without USE_LIBFFI, where the mutex would never be unlocked if the end of the function was reached. llvm-svn: 216338
* Support: make LLVM Mutexes STL-compatibleDylan Noblesmith2014-08-231-3/+3
| | | | | | Use lock/unlock() convention instead of acquire/release(). llvm-svn: 216336
* Remove dead code. NFC.Rafael Espindola2014-08-211-8/+0
| | | | llvm-svn: 216201
* IntelJITEventListener updates to fix breaks by recent changes to ↵Elena Demikhovsky2014-08-211-1/+1
| | | | | | | | EngineBuilder and DIContext. By Arch Robison. llvm-svn: 216159
* [MCJIT] Allow '$' characters in symbol names in RuntimeDyldChecker.Lang Hames2014-08-191-1/+1
| | | | llvm-svn: 216017
* Don't own the buffer in object::Binary.Rafael Espindola2014-08-195-29/+27
| | | | | | | | | | | | | | | | | | | | | | | | | Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries (like Archive) and we had to create dummy buffers just to handle that. It is also a bad fit for IRObjectFile where the Module wants to own the buffer too. Keeping this ownership would make supporting IR inside native objects particularly painful. This patch focuses in lib/Object. If something elsewhere used to own an Binary, now it also owns a MemoryBuffer. This patch introduces a few new types. * MemoryBufferRef. This is just a pair of StringRefs for the data and name. This is to MemoryBuffer as StringRef is to std::string. * OwningBinary. A combination of Binary and a MemoryBuffer. This is needed for convenience functions that take a filename and return both the buffer and the Binary using that buffer. The C api now uses OwningBinary to avoid any change in semantics. I will start a new thread to see if we want to change it and how. llvm-svn: 216002
* Make it explicit that ExecutionEngine takes ownership of the modules.Rafael Espindola2014-08-198-75/+80
| | | | llvm-svn: 215967
* Use a range loop. NFC.Rafael Espindola2014-08-181-2/+2
| | | | llvm-svn: 215948
* [MCJIT] Respect target endianness in RuntimeDyldMachO and RuntimeDyldChecker.Lang Hames2014-08-183-6/+22
| | | | | | This patch may address some of the issues described in http://llvm.org/PR20640. llvm-svn: 215938
* Use copy initialization to initialize std::unique_ptr.Rafael Espindola2014-08-173-3/+3
| | | | | | Thanks to David Blaikie for the suggestion. llvm-svn: 215867
* [MCJIT] Support DisableSymbolSearching and InstallLazyFunctionCreator in MCJIT.Lang Hames2014-08-141-5/+13
| | | | | | Patch by Anthony Pesch. Thanks Anthony! llvm-svn: 215613
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-1313-33/+33
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
OpenPOWER on IntegriCloud