summaryrefslogtreecommitdiff
path: root/tools/lli
Commit message (Collapse)AuthorAge
* lli: Tweak CacheName not to contain DOS driveletter.NAKAMURA Takumi2014-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198929 91177308-0d34-0410-b5e6-96231b3b80d8
* lli: LLIObjectCache: Use llvm::sys::path to get dirname.NAKAMURA Takumi2014-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198928 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.NAKAMURA Takumi2014-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198927 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix accidental use of the exotic "std::string::back()" method. Turns out it'sLang Hames2014-01-09
| | | | | | | | new in C++11. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198853 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an "-object-cache-dir=<string>" option to LLI. This option specifies theLang Hames2014-01-09
| | | | | | | | | | | | | root path to which object files managed by the LLIObjectCache instance should be written. This option defaults to "", in which case objects are cached in the same directory as the bitcode they are derived from. The load-object-a.ll test has been rewritten to use this option to support testing in environments where the test directory is not writable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198852 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace fstream use with raw_fd_ostream.Lang Hames2014-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198821 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r196639: Add support for archives and object file caching under MCJIT.Lang Hames2014-01-08
| | | | | | | | | | I believe the bot failures on linux systems were due to overestimating the alignment of object-files within archives, which are only guaranteed to be two-byte aligned. I have reduced the alignment in RuntimeDyldELF::createObjectImageFromFile accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198737 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix gcc warnings.Matt Arsenault2013-12-10
| | | | | | Unused variable and unused typedef in release build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196947 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196908 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] lli/CMakeLists.txt: Move add_subdirectory(ChildTarget) to the front. ↵NAKAMURA Takumi2013-12-10
| | | | | | It depends on nothing described in LLVM_LINK_COMPONENTS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196902 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace cleanups.NAKAMURA Takumi2013-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196654 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r196639 while I investigate a bot failure.Lang Hames2013-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196641 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for archives and object file caching under MCJIT.Lang Hames2013-12-07
| | | | | | | | Patch by Andy Kaylor, with minor edits to resolve merge conflicts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196639 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix minor GCC warnings.Matt Arsenault2013-12-05
| | | | | | Unused typedefs and unused variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196526 91177308-0d34-0410-b5e6-96231b3b80d8
* Export symbols in tools that support loading plugins.Will Dietz2013-12-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196447 91177308-0d34-0410-b5e6-96231b3b80d8
* 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