summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix -Wpessimizing-move warnings by removing std::move calls.Richard Trieu2015-04-301-4/+4
| | | | llvm-svn: 236278
* Remove the JITEmitDebugInfo TargetOptions as they're only set andEric Christopher2015-04-191-23/+0
| | | | | | not used anywhere in llvm. llvm-svn: 235265
* lli/OrcLazyJIT.cpp: Use <cstdio> for printf(3) introduced in r234908.NAKAMURA Takumi2015-04-171-0/+1
| | | | llvm-svn: 235175
* [Orc] Refactor the CompileOnDemandLayer to make its addModuleSet methodLang Hames2015-04-151-11/+14
| | | | | | | | | signature match the other layers. This makes it possible to compose other layers (e.g. IRTransformLayer) on top of CompileOnDemandLayer. llvm-svn: 235029
* [Orc] Reapply r234815, outputting via stdout instead.Lang Hames2015-04-141-11/+12
| | | | llvm-svn: 234908
* Silencing a -Wreturn-type warning, as the switch is fully-covered; NFC.Aaron Ballman2015-04-141-0/+1
| | | | llvm-svn: 234884
* [Orc] Disambiguate call to make_unique. This should fix the builders broken byLang Hames2015-04-131-1/+2
| | | | | | r234805. llvm-svn: 234806
* [Orc] Add an Orc layer for applying arbitrary transforms to IR, use it to addLang Hames2015-04-132-7/+90
| | | | | | | debugging output to the LLI orc-lazy JIT, and update the orc-lazy "hello.ll" test to actually test for lazy compilation. llvm-svn: 234805
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-113-3/+3
| | | | | | | | | | | | | | The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' \ -j=32 -fix -format http://reviews.llvm.org/D8925 llvm-svn: 234679
* [Orc] Add support classes for inspecting and running C++ static ctor/dtors, andLang Hames2015-04-022-8/+56
| | | | | | | | | use these to add support for C++ static ctors/dtors to the Orc-lazy JIT in LLI. Replace the trivial_retval_1 regression test - the new 'hello' test is covering strictly more code. llvm-svn: 233885
* [Orc] Reflect process symbols into the LLI Orc-lazy JIT.Lang Hames2015-04-012-1/+21
| | | | | | | This makes symbol resolution essentially identical between MCJIT and the LLI Orc-lazy JIT. llvm-svn: 233786
* [Orc] Separate callback manager selection from callback manager construction forLang Hames2015-03-302-21/+29
| | | | | | | | OrcLazyJIT in lli. Separating these concerns enables more natural error handling. llvm-svn: 233579
* [MCJIT][Orc] Refactor RTDyldMemoryManager, weave RuntimeDyld::SymbolInfo throughLang Hames2015-03-302-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MCJIT. This patch decouples the two responsibilities of the RTDyldMemoryManager class, memory management and symbol resolution, into two new classes: RuntimeDyld::MemoryManager and RuntimeDyld::SymbolResolver. The symbol resolution interface is modified slightly, from: uint64_t getSymbolAddress(const std::string &Name); to: RuntimeDyld::SymbolInfo findSymbol(const std::string &Name); The latter passes symbol flags along with symbol addresses, allowing RuntimeDyld and others to reason about non-strong/non-exported symbols. The memory management interface removes the following method: void notifyObjectLoaded(ExecutionEngine *EE, const object::ObjectFile &) {} as it is not related to memory management. (Note: Backwards compatibility *is* maintained for this method in MCJIT and OrcMCJITReplacement, see below). The RTDyldMemoryManager class remains in-tree for backwards compatibility. It inherits directly from RuntimeDyld::SymbolResolver, and indirectly from RuntimeDyld::MemoryManager via the new MCJITMemoryManager class, which just subclasses RuntimeDyld::MemoryManager and reintroduces the notifyObjectLoaded method for backwards compatibility). The EngineBuilder class retains the existing method: EngineBuilder& setMCJITMemoryManager(std::unique_ptr<RTDyldMemoryManager> mcjmm); and includes two new methods: EngineBuilder& setMemoryManager(std::unique_ptr<MCJITMemoryManager> MM); EngineBuilder& setSymbolResolver(std::unique_ptr<RuntimeDyld::SymbolResolver> SR); Clients should use EITHER: A single call to setMCJITMemoryManager with an RTDyldMemoryManager. OR (exclusive) One call each to each of setMemoryManager and setSymbolResolver. This patch should be fully compatible with existing uses of RTDyldMemoryManager. If it is not it should be considered a bug, and the patch either fixed or reverted. If clients find the new API to be an improvement the goal will be to deprecate and eventually remove the RTDyldMemoryManager class in favor of the new classes. llvm-svn: 233509
* [Orc] Remove another unnecessary typedef.Lang Hames2015-03-251-1/+1
| | | | llvm-svn: 233184
* [Orc][lli] Add a very simple Orc-based lazy JIT to lli.Lang Hames2015-03-254-7/+172
| | | | | | | | | | | | | | | | | This ensures that we're building and testing the CompileOnDemand layer, at least in a basic way. Currently x86-64 only, and with limited to no library calls enabled (depending on host platform). Patches welcome. ;) To enable access to the lazy JIT, this patch replaces the '-use-orcmcjit' lli option with a new option: '-jit-kind={ mcjit | orc-mcjit | orc-lazy }'. All regression tests are updated to use the new option, and one trivial test of the new lazy JIT is added. llvm-svn: 233182
* Purge unused includes throughout libSupport.Benjamin Kramer2015-03-232-0/+2
| | | | | | NFC. llvm-svn: 232976
* Fix cmake build.Rafael Espindola2015-03-181-1/+1
| | | | llvm-svn: 232663
* CMake: Disable ENABLE_EXPORTS for executables with MSVCReid Kleckner2015-03-181-1/+1
| | | | | | | | | | | | | | The MSVC linker won't produce a .lib file for an executable that doesn't export anything, and LLVM doesn't maintain dllexport annotations or .def files listing all C++ symbols. It also doesn't support exporting all symbols, like binutils ld. CMake 3.2 changed the Ninja generator to list both the .exe and .lib files as outputs of executable build targets. Ninja would always re-link executables with ENABLE_EXPORTS because the .lib output file was not present, and therefore the target was out of date. llvm-svn: 232662
* Replace a few instances of NULL with nullptr.David Majnemer2015-02-261-1/+1
| | | | llvm-svn: 230599
* [CMake] Add RuntimeDyld to libdeps corresponding to r229343.NAKAMURA Takumi2015-02-161-0/+1
| | | | llvm-svn: 229351
* Fix lli after the DebugInfo move.Zachary Turner2015-01-301-1/+1
| | | | llvm-svn: 227594
* Move DebugInfo to DebugInfo/DWARF.Zachary Turner2015-01-301-1/+1
| | | | | | | | | | | | | In preparation for adding PDB support to LLVM, this moves the DWARF parsing code to its own subdirectory under DebugInfo, and renames LLVMDebugInfo to LLVMDebugInfoDWARF. This is purely a mechanical / build system change. Differential Revision: http://reviews.llvm.org/D7269 Reviewed by: Eric Christopher llvm-svn: 227586
* [Orc] Add orcjit to the dependencies list in the Makefile for lli.Lang Hames2015-01-241-1/+1
| | | | | | This should fix a few more broken bots. llvm-svn: 226973
* [Orc] New JIT APIs.Lang Hames2015-01-232-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new set of JIT APIs to LLVM. The aim of these new APIs is to cleanly support a wider range of JIT use cases in LLVM, and encourage the development and contribution of re-usable infrastructure for LLVM JIT use-cases. These APIs are intended to live alongside the MCJIT APIs, and should not affect existing clients. Included in this patch: 1) New headers in include/llvm/ExecutionEngine/Orc that provide a set of components for building JIT infrastructure. Implementation code for these headers lives in lib/ExecutionEngine/Orc. 2) A prototype re-implementation of MCJIT (OrcMCJITReplacement) built out of the new components. 3) Minor changes to RTDyldMemoryManager needed to support the new components. These changes should not impact existing clients. 4) A new flag for lli, -use-orcmcjit, which will cause lli to use the OrcMCJITReplacement class as its underlying execution engine, rather than MCJIT itself. Tests to follow shortly. Special thanks to Michael Ilseman, Pete Cooper, David Blaikie, Eric Christopher, Justin Bogner, and Jim Grosbach for extensive feedback and discussion. llvm-svn: 226940
* Assigning and copying command line option objects shouldn't be allowed.Chris Bieneman2015-01-221-1/+1
| | | | | | | | | | | | | | | Summary: The default copy and assignment operators for these objects probably don't actually do what the clients intend, so they should be deleted. Places using the assignment operator to set the value of an option should cast to the option's data type first to call into the override for operator=. Places using the copy constructor just need to be changed to not copy (i.e. passing by const reference instead of value). Reviewers: dexonsmith, chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7114 llvm-svn: 226762
* Silence gcc 4.9.1 warning 'xyz' is used uninitialized in this function.Yaron Keren2014-12-121-7/+7
| | | | | | | | In release builds this is actually possible as without asserts there is no testing of the actual read bytes and the variables could be partially uninitialized. llvm-svn: 224114
* [MCJIT] Unique-ptrify the RTDyldMemoryManager member of MCJIT. NFC.Lang Hames2014-12-031-1/+5
| | | | llvm-svn: 223183
* DebugIR: Delete -debug-irDuncan P. N. Exon Smith2014-11-291-9/+0
| | | | llvm-svn: 222945
* [MCJIT] Reapply r222828 and r222810-r222812 with fix for MSVC move-op issues.Lang Hames2014-11-262-3/+3
| | | | llvm-svn: 222840
* Reverting r222828 and r222810-r222812 as they broke the build on Windows.Aaron Ballman2014-11-262-3/+3
| | | | | | http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/11753 llvm-svn: 222833
* [MCJIT] Clean up RuntimeDyld's quirky object-ownership/modification scheme.Lang Hames2014-11-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when loading an object file, RuntimeDyld (1) took ownership of the ObjectFile instance (and associated MemoryBuffer), (2) potentially modified the object in-place, and (3) returned an ObjectImage that managed ownership of the now-modified object and provided some convenience methods. This scheme accreted over several years as features were tacked on to RuntimeDyld, and was both unintuitive and unsafe (See e.g. http://llvm.org/PR20722). This patch fixes the issue by removing all ownership and in-place modification of object files from RuntimeDyld. Existing behavior, including debugger registration, is preserved. Noteworthy changes include: (1) ObjectFile instances are now passed to RuntimeDyld by const-ref. (2) The ObjectImage and ObjectBuffer classes have been removed entirely, they existed to model ownership within RuntimeDyld, and so are no longer needed. (3) RuntimeDyld::loadObject now returns an instance of a new class, RuntimeDyld::LoadedObjectInfo, which can be used to construct a modified object suitable for registration with the debugger, following the existing debugger registration scheme. (4) The JITRegistrar class has been removed, and the GDBRegistrar class has been re-written as a JITEventListener. This should fix http://llvm.org/PR20722 . llvm-svn: 222810
* [MCJIT] Remove a few more references to JITMemoryManager that survived r218316.Lang Hames2014-09-231-1/+0
| | | | llvm-svn: 218318
* [MCJIT] Delete the JTIMemoryManager and associated APIs.Lang Hames2014-09-233-58/+6
| | | | | | | | | | This patch removes the old JIT memory manager (which does not provide any useful functionality now that the old JIT is gone), and migrates the few remaining clients over to SectionMemoryManager. http://llvm.org/PR20848 llvm-svn: 218316
* Reinstate "Nuke the old JIT."Eric Christopher2014-09-024-37/+10
| | | | | | | | Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reinstates commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 216982
* Return a std::unique_ptr when creating a new MemoryBuffer.Rafael Espindola2014-08-271-2/+1
| | | | llvm-svn: 216583
* Give ExecutionEngine of top level buffers.Rafael Espindola2014-08-261-3/+1
| | | | | | | 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
* Return a std::unique_ptr from the IRReader.h functions. NFC.Rafael Espindola2014-08-261-2/+2
| | | | llvm-svn: 216466
* Modernize raw_fd_ostream's constructor a bit.Rafael Espindola2014-08-251-2/+2
| | | | | | | | | | Take a StringRef instead of a "const char *". Take a "std::error_code &" instead of a "std::string &" for error. A create static method would be even better, but this patch is already a bit too big. llvm-svn: 216393
* Quick fix for an use after free.Rafael Espindola2014-08-201-1/+4
| | | | llvm-svn: 216071
* Don't own the buffer in object::Binary.Rafael Espindola2014-08-191-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | 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-191-8/+9
| | | | llvm-svn: 215967
* Simplify ownership with std::unique_ptr. NFC.Rafael Espindola2014-08-131-2/+3
| | | | llvm-svn: 215566
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-135-12/+12
| | | | | | | | | | 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
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-074-10/+37
| | | | | | | | | | | 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
* fix configure+make buildRafael Espindola2014-08-071-1/+1
| | | | llvm-svn: 215116
* Nuke the old JIT.Rafael Espindola2014-08-073-36/+9
| | | | | | | | | 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
* Use object::Archive::create instead of new object::Archive.Rafael Espindola2014-08-011-7/+6
| | | | | | | | Also fix the error handling. No testcaes, issue found by inspection. Thanks to David Blaikie for the suggestion. llvm-svn: 214535
* Replace comment about ownership with std::unique_ptr.Rafael Espindola2014-08-011-3/+5
| | | | llvm-svn: 214533
* Use std::unique_ptr to make the ownership explicit.Rafael Espindola2014-07-311-2/+2
| | | | llvm-svn: 214377
* [CMake] Update libdeps.NAKAMURA Takumi2014-07-141-0/+2
| | | | llvm-svn: 212920
OpenPOWER on IntegriCloud