summaryrefslogtreecommitdiff
path: root/tools/lli
Commit message (Collapse)AuthorAge
* Cleaning up comments in lliAndrew Kaylor2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193571 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding a workaround for __main linking with remote lli and Cygwin/MinGWAndrew Kaylor2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193570 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the lli --extra-module value_descAlp Toker2013-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193552 91177308-0d34-0410-b5e6-96231b3b80d8
* Standardizing lli's extra module command line optionAndrew Kaylor2013-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193544 91177308-0d34-0410-b5e6-96231b3b80d8
* MCJIT-remote: __main should be resolved in child context.NAKAMURA Takumi2013-10-27
| | | | | | | | | | | | | | | | - Mark tests as XFAIL:cygming in test/ExecutionEngine/MCJIT/remote. Rather to suppress them, I'd like to leave them running as XFAIL. - Revert r193472. RecordMemoryManager no longer resolves __main on cygming. There are a couple of issues. - X86 Codegen emits "call __main" in @main for targeting cygming. It is useless in JIT. FYI, tests are passing when emitting __main is disabled. - Current remote JIT does not resolve any symbols in child context. FIXME: __main should be disabled, or remote JIT should resolve __main. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193498 91177308-0d34-0410-b5e6-96231b3b80d8
* lli/RemoteMemoryManager.cpp: Resurrect __main stuff removed in r192504 to ↵NAKAMURA Takumi2013-10-26
| | | | | | unbreak mingw32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193472 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding support for deregistering EH frames with MCJIT.Andrew Kaylor2013-10-16
| | | | | | | | Patch by Yaron Keren git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192753 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing problems in lli's RemoteMemoryManager.Andrew Kaylor2013-10-11
| | | | | | | | | | This fixes a problem from a previous check-in where a return value was omitted. Previously the remote/stubs-remote.ll and remote/stubs-sm-pic.ll tests were reporting passes, but they should have been failing. Those tests attempt to link against an external symbol and remote symbol resolution is not supported. The old RemoteMemoryManager implementation resulted in local symbols being used for resolution and the child process crashed but the test didn't notice. With this check-in remote symbol resolution fails, and so the test (correctly) fails. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192514 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding multiple object support to MCJIT EH frame handlingAndrew Kaylor2013-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192504 91177308-0d34-0410-b5e6-96231b3b80d8
* Removing unintended code block from lliAndrew Kaylor2013-10-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192205 91177308-0d34-0410-b5e6-96231b3b80d8
* lli: Plug leaks in the remote target external implementation.Benjamin Kramer2013-10-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192031 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempting to fix lli build errorAndrew Kaylor2013-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191979 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing container/pointer bug in remote-lli found by ASanAndrew Kaylor2013-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191976 91177308-0d34-0410-b5e6-96231b3b80d8
* lli: Check pipe creation for errors.Benjamin Kramer2013-10-04
| | | | | | | This is unlikely to ever fail, but ubuntu GCC warns when the return value is unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191973 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding support and tests for multiple module handling in lliAndrew Kaylor2013-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191938 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing lli-child-target buildAndrew Kaylor2013-10-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191861 91177308-0d34-0410-b5e6-96231b3b80d8
* Add newline at eof.Benjamin Kramer2013-10-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191857 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass the resolved lli-child-target executable name to execv, rather thanRichard Smith2013-10-02
| | | | | | | searching $PATH for it then blindly executing it from $PWD anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191856 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build problems with remote lli implementationAndrew Kaylor2013-10-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191848 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up lli execution codeAndrew Kaylor2013-10-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191845 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing compile warningsAndrew Kaylor2013-10-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191844 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding out-of-process execution support to lli.Andrew Kaylor2013-10-02
| | | | | | | | | | | At this time only Unix-based systems are supported. Windows has stubs and should re-route to the simulated mode. Thanks to Sriram Murali for contributions to this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191843 91177308-0d34-0410-b5e6-96231b3b80d8
* This threads SectionName through the allocateCodeSection/allocateDataSection ↵Filip Pizlo2013-10-02
| | | | | | | | | | | | | | | | | | | | APIs, both in C++ and C land. It's useful for the memory managers that are allocating a section to know what the name of the section is. At a minimum, this is useful for low-level debugging - it's customary for JITs to be able to tell you what memory they allocated, and as part of any such dump, they should be able to tell you some meta-data about what each allocation is for. This allows clients that supply their own memory managers to do this. Additionally, we also envision the SectionName being useful for passing meta-data from within LLVM to an LLVM client. This changes both the C and C++ APIs, and all of the clients of those APIs within LLVM. I'm assuming that it's safe to change the C++ API because that API is allowed to change. I'm assuming that it's safe to change the C API because we haven't shipped the API in a release yet (LLVM 3.3 doesn't include the MCJIT memory management C API). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191804 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding multiple module support for MCJIT.Andrew Kaylor2013-10-01
| | | | | | | | | | Tests to follow. PIC with small code model and EH frame handling will not work with multiple modules. There are also some rough edges to be smoothed out for remote target support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191722 91177308-0d34-0410-b5e6-96231b3b80d8
* lli/RecordingMemoryManager.cpp: Make it complain if _GLOBAL_OFFSET_TABLE_ ↵NAKAMURA Takumi2013-08-21
| | | | | | | | were not provided. FIXME: Would it be responsible to provide GOT? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188855 91177308-0d34-0410-b5e6-96231b3b80d8
* Add flag to lli to enable debugging of IR when used with MCJIT.Daniel Malea2013-06-28
| | | | | | | | | | | | | | | | | | | | - warn users when -debug-ir is used with old JIT engine (only partial debug info is available) For example, to debug an IR file with GDB (that supports JIT registration), do: $ gdb --args lli -use-mcjit -debug-ir testcase.ll (gdb) break main (gdb) run <Process continues to lli main> (gdb) continue <Process continues to testcase.ll main() (gdb) step <Now stepping through the LLVM IR in testcase.ll> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185197 91177308-0d34-0410-b5e6-96231b3b80d8
* Print uint64_t -debug text correctly on 32-bit hostsTim Northover2013-05-19
| | | | | | | | On 32-bit hosts %p can print garbage when given a uint64_t, we should use %llx instead. This only affects the output of the debugging text produced by lli. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182209 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor changes to the MCJITTest unittests to use the correct API for finalizingDavid Tweed2013-05-17
| | | | | | | | the JIT object (including XFAIL an ARM test that now needs fixing). Also renames internal function for consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182085 91177308-0d34-0410-b5e6-96231b3b80d8
* SectionMemoryManager shouldn't be a JITMemoryManager. Previously, the Filip Pizlo2013-05-14
| | | | | | | | | | | | | | | | | | | EngineBuilder interface required a JITMemoryManager even if it was being used to construct an MCJIT. But the MCJIT actually wants a RTDyldMemoryManager. Consequently, the SectionMemoryManager, which is meant for MCJIT, derived from the JITMemoryManager and then stubbed out a bunch of JITMemoryManager methods that weren't relevant to the MCJIT. This patch fixes the situation: it teaches the EngineBuilder that RTDyldMemoryManager is a supertype of JITMemoryManager, and that it's appropriate to pass a RTDyldMemoryManager instead of a JITMemoryManager if we're using the MCJIT. This allows us to remove the stub methods from SectionMemoryManager, and make SectionMemoryManager a direct subtype of RTDyldMemoryManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181820 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove exception handling support from the old JIT.Rafael Espindola2013-05-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181354 91177308-0d34-0410-b5e6-96231b3b80d8
* Manually update the dependencies in the Makefiles. It turns out that allChandler Carruth2013-03-26
| | | | | | | | | | | that work on the LLVMBuild based dependency specification didn't actually work, we just now maintain dependencies in *3* places instead of 2. Yay. There may still be some missing dependencies, I'm still sifting through the bots and my builds, but this is a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177988 91177308-0d34-0410-b5e6-96231b3b80d8
* Split out the IRReader header and the utility functions it provides intoChandler Carruth2013-03-26
| | | | | | | | | | | | | | | | | | | | | | | | its own library. These functions are bridging between the bitcode reader and the ll parser which are in different libraries. Previously we didn't have any good library to do this, and instead played fast and loose with a "header only" set of interfaces in the Support library. This really doesn't work well as evidenced by the recent attempt to add timing logic to the these routines. As part of this, make them normal functions rather than weird inline functions, and sink the implementation into the library. Also clean up the header to be nice and minimal. This requires updating lots of build system dependencies to specify that the IRReader library is needed, and several source files to not implicitly rely upon the header file to transitively include all manner of other headers. If you are using IRReader.h, this commit will break you (the header moved) and you'll need to also update your library usage to include 'irreader'. I will commit the corresponding change to Clang momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177971 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide workaround for PR 15130.Andrew Kaylor2013-02-25
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176057 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for source and line information to IntelJITEventListener for ↵Andrew Kaylor2013-01-28
| | | | | | object emitted by MCJIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173712 91177308-0d34-0410-b5e6-96231b3b80d8
* lli/RecordingMemoryManager: Free allocated sections in the destructor to ↵NAKAMURA Takumi2013-01-24
| | | | | | | | satisfy --vg-leak! FIXME: It could be generalized in MemoryManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173349 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for tools/...Chandler Carruth2012-12-04
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169252 91177308-0d34-0410-b5e6-96231b3b80d8
* Modifying lli to use the SectionMemoryManager.Andrew Kaylor2012-11-27
| | | | | | The functionality of SectionMemoryManager is equivalent to the LLIMCJITMemoryManager being replaced except that it allocates memory as RW and later changes it to RX or R as needed. The page permissions are set in the call to MCJIT::finalizeObject. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168722 91177308-0d34-0410-b5e6-96231b3b80d8
* MCJIT: [cygming] Give noop to __main also in RecordingMemoryManger. It is ↵NAKAMURA Takumi2012-11-18
| | | | | | | | emitted in @main(). XFAIL(s) can be removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168282 91177308-0d34-0410-b5e6-96231b3b80d8
* Interface changes to allow RuntimeDyld memory managers to set memory ↵Andrew Kaylor2012-11-15
| | | | | | permissions after an object has been loaded. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168114 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a method to indicate section address re-assignment is finished.Andrew Kaylor2012-11-05
| | | | | | Prior to this patch RuntimeDyld attempted to re-apply relocations every time reassignSectionAddress was called (via MCJIT::mapSectionAddress). In addition to being inefficient and redundant, this led to a problem when a section was temporarily moved too far away from another section with a relative relocation referencing the section being moved. To fix this, I'm adding a new method (finalizeObject) which the client can call to indicate that it is finished rearranging section addresses so the relocations can safely be applied. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167400 91177308-0d34-0410-b5e6-96231b3b80d8
* lli: Initialize the native asm parser for inline assembly.Jim Grosbach2012-11-05
| | | | | | | MCJIT supports inline assembly, but requires the asm parser to do so. Make sure to link it in and initialize it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167392 91177308-0d34-0410-b5e6-96231b3b80d8
* Streamlined memory manager hierarchy for MCJIT and RuntimeDyld.Andrew Kaylor2012-11-01
| | | | | | Patch by Ashok Thirumurthi git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167192 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed format strings to avoid pointer truncation during 64-bit debugging.Andrew Kaylor2012-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167185 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark code, not data, as executable in lli RemoteTarget simulator.Andrew Kaylor2012-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167164 91177308-0d34-0410-b5e6-96231b3b80d8
* Align the data section correctly when loading an ELF file.Tim Northover2012-10-29
| | | | | | Patch by Amara Emerson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166920 91177308-0d34-0410-b5e6-96231b3b80d8
* Add float-abi and softfloat options to lliTim Northover2012-10-12
| | | | | | Patch by Amara Emerson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165791 91177308-0d34-0410-b5e6-96231b3b80d8
* lli: [MCJIT] Suppress "__main" for cygming in ↵NAKAMURA Takumi2012-10-05
| | | | | | | | LLIMCJITMemoryManager::getPointerToNamedFunction(), like legacy JITMemoryManager's. CRT's __main (aka premain) invokes global ctors on cygming. See also PR3897. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165312 91177308-0d34-0410-b5e6-96231b3b80d8
* Removing dependency on third party library for Intel JIT event support.Andrew Kaylor2012-09-28
| | | | | | Patch committed on behalf of Kirill Uhanov git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164831 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure lli compiles all code before invalidating instruction caches.Tim Northover2012-09-20
| | | | | | Patch from Amara Emerson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164296 91177308-0d34-0410-b5e6-96231b3b80d8