summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [MCJIT] Simplify immediate decoding code in the RuntimeDyldMachO hierarchy.Lang Hames2014-08-086-44/+49
| | | | | | | | | | | Cleanup only: no functional change. This patch makes RuntimeDyldMachO targets directly responsible for decoding immediates, rather than letting them implement catch a callback from generic code. Since this is a very target specific operation, it makes sense to let the target-specific code drive it. llvm-svn: 215255
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-0717-12/+2295
| | | | | | | | | | | be deleted. This will be reapplied as soon as possible and before the 3.6 branch date at any rate. Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reverts commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 215154
* [MCJIT] Replace a c-style cast with reinterpret_cast + static_cast.Lang Hames2014-08-071-4/+4
| | | | | | | | | | C-style casts (and reinterpret_casts) result in implementation defined values when a pointer is cast to a larger integer type. On some platforms this was leading to bogus address computations in RuntimeDyldMachOAArch64. This should fix http://llvm.org/PR20501. llvm-svn: 215143
* fix configure+make buildRafael Espindola2014-08-071-1/+1
| | | | llvm-svn: 215116
* Nuke the old JIT.Rafael Espindola2014-08-0716-2294/+11
| | | | | | | | | I am sure we will be finding bits and pieces of dead code for years to come, but this is a good start. Thanks to Lang Hames for making MCJIT a good replacement! llvm-svn: 215111
* Remove the TargetMachine forwards for TargetSubtargetInfo basedEric Christopher2014-08-042-9/+11
| | | | | | information and update all callers. No functional change. llvm-svn: 214781
* [MCJIT] Fix an overly-aggressive check in RuntimeDyldMachOARM.Lang Hames2014-08-021-5/+0
| | | | | | | This should fix the MachO_ARM_PIC_relocations.s test failures on some 32-bit testers. llvm-svn: 214613
* Include Archive.hRafael Espindola2014-08-011-0/+1
| | | | | | MSVC was complaining about Archive being an incomplete type. llvm-svn: 214542
* Move virtual method out of line.Rafael Espindola2014-08-011-0/+4
| | | | | | Should fix the MSVC build. llvm-svn: 214539
* Replace comment about ownership with std::unique_ptr.Rafael Espindola2014-08-012-9/+5
| | | | llvm-svn: 214533
* Use range loop.Rafael Espindola2014-08-011-7/+3
| | | | llvm-svn: 214530
* Remove some calls to std::move.Rafael Espindola2014-08-011-1/+1
| | | | | | | | | Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get a reference to it. Thanks to David Blaikie for the suggestion. llvm-svn: 214516
* Use std::unique_ptr to make the ownership explicit.Rafael Espindola2014-07-311-1/+1
| | | | llvm-svn: 214377
* Delete dead code.Rafael Espindola2014-07-313-10/+4
| | | | llvm-svn: 214370
* [MCJIT] Fix the ARM BR24 relocation in RuntimeDyldMachO.Lang Hames2014-07-306-12/+31
| | | | | | | | | | We now (1) correctly decode the branch immediate, (2) modify the immediate to corretly treat it as PC-rel, and (3) properly populate the stub entry. Previously we had been doing each of these wrong. <rdar://problem/17750739> llvm-svn: 214285
* [MCJIT] Add options to llvm-rtdyld to describe a phony target address space forLang Hames2014-07-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | use in -verify mode. This patch adds three hidden command line options to llvm-rtdyld: -target-addr-start <start-addr> : Specify the start of the virtual address space on the phony target. -target-addr-end <end-addr> : Specify the end of the virtual address space on the phony target. -target-section-sep <sep> : Specify the separation (in bytes) between the end of one section and the start of the next. These options automatically default to sane values for the target platform. In particular, they allow narrow (e.g. 32-bit, 16-bit) targets to be tested from wider (e.g. 64-bit, 32-bit) hosts without overflowing pointers. The section separation option defaults to zero, but can be set to a large number (e.g. 1 << 32) to force large separations between sections in order to stress-test large-code-model code. llvm-svn: 214255
* [MCJIT] Make sure we print the full 64-bit result of exprs in ↵Lang Hames2014-07-291-2/+2
| | | | | | RuntimeDyldChecker. llvm-svn: 214227
* [MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather thanLang Hames2014-07-292-2/+4
| | | | | | | | | | full paths for its first argument. This allows us to remove the annoying sed lines in the test cases, and write direct references to file names in stub_addr calls (rather than <filename> placeholders). llvm-svn: 214211
* [RuntimeDyld][AArch64] Make encode/decodeAddend also work on big-endian hosts.Juergen Ributzka2014-07-291-18/+31
| | | | llvm-svn: 214205
* [RuntimeDyld][AArch64] Make encode/decodeAddend more typesafe by using the ↵Juergen Ributzka2014-07-293-9/+12
| | | | | | relocation enum type. NFCI. llvm-svn: 214204
* Remove dead code.Rafael Espindola2014-07-242-66/+0
| | | | | | Every user has been switched to using EngineBuilder. llvm-svn: 213871
* ExecutionEngine: remove a stray semicolonSaleem Abdulrasool2014-07-231-1/+1
| | | | | | Detected via GCC 4.8 [-Wpedantic]. llvm-svn: 213776
* AArch64: remove arm64 triple enumerator.Tim Northover2014-07-234-11/+4
| | | | | | | | | | | | Having both Triple::arm64 and Triple::aarch64 is extremely confusing, and invites bugs where only one is checked. In reality, the only legitimate difference between the two (arm64 usually means iOS) is also present in the OS part of the triple and that's what should be checked. We still parse the "arm64" triple, just canonicalise it to Triple::aarch64, so there aren't any LLVM-side test changes. llvm-svn: 213743
* RuntimeDyldMachOAArch64.h: Fix a warning. [-Wunused-variable]NAKAMURA Takumi2014-07-231-0/+1
| | | | llvm-svn: 213710
* [MCJIT] Make stub_addr functionality in RuntimeDyldChecker work in release mode.Lang Hames2014-07-221-2/+0
| | | | | | | | | There's no reason to restrict this particular piece of RuntimeDyldChecker functionality to +Asserts builds. This should fix failures in MachO_x86-64_PIC_relocations.s on release bots. llvm-svn: 213708
* [MCJIT] Teach RuntimeDyldChecker to handle underscores at the start of symbols.Lang Hames2014-07-221-1/+1
| | | | | | | | RuntimeDyldChecker had been testing isalpha(Expr[0]) to recognise symbol tokens, and throwing unrecognized token errors when it hit symbols with leading underscores. This fixes that. llvm-svn: 213706
* [MCJIT] Improve stub_addr file-not-found diagnostic to help track down aLang Hames2014-07-221-2/+17
| | | | | | buildbot failure. llvm-svn: 213701
* [MCJIT] Refactor and add stub inspection to the RuntimeDyldChecker framework.Lang Hames2014-07-225-548/+777
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a 'stub_addr' builtin that can be used to find the address of the stub for a given (<file>, <section>, <symbol>) tuple. This address can be used both to verify the contents of stubs (by loading from the returned address) and to verify references to stubs (by comparing against the returned address). Example (1) - Verifying stub contents: Load 8 bytes (assuming a 64-bit target) from the stub for 'x' in the __text section of f.o, and compare that value against the addres of 'x'. # rtdyld-check: *{8}(stub_addr(f.o, __text, x) = x Example (2) - Verifying references to stubs: Decode the immediate of the instruction at label 'l', and verify that it's equal to the offset from the next instruction's PC to the stub for 'y' in the __text section of f.o (i.e. it's the correct PC-rel difference). # rtdyld-check: decode_operand(l, 4) = stub_addr(f.o, __text, y) - next_pc(l) l: movq y@GOTPCREL(%rip), %rax Since stub inspection requires cooperation with RuntimeDyldImpl this patch pimpl-ifies RuntimeDyldChecker. Its implementation is moved in to a new class, RuntimeDyldCheckerImpl, that has access to the definition of RuntimeDyldImpl. llvm-svn: 213698
OpenPOWER on IntegriCloud