summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/lli.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Simplify a few uses of remove_filename by using parent_path instead.Rafael Espindola2015-07-151-2/+1
| | | | llvm-svn: 242334
* [lli] Make the OptLevel (-O=<char>) option accessible to the lazy JIT.Lang Hames2015-06-091-12/+14
| | | | | | No test case - this only affects generated code performance. llvm-svn: 239383
* Migrate existing backends that care about software floating pointEric Christopher2015-05-121-3/+0
| | | | | | | | | | | | | | | | | | | | to use the information in the module rather than TargetOptions. We've had and clang has used the use-soft-float attribute for some time now so have the backends set a subtarget feature based on a particular function now that subtargets are created based on functions and function attributes. For the one middle end soft float check go ahead and create an overloadable TargetLowering::useSoftFloat function that just checks the TargetSubtargetInfo in all cases. Also remove the command line option that hard codes whether or not soft-float is set by using the attribute for all of the target specific test cases - for the generic just go ahead and add the attribute in the one case that showed up. llvm-svn: 237079
* Remove the JITEmitDebugInfo TargetOptions as they're only set andEric Christopher2015-04-191-23/+0
| | | | | | not used anywhere in llvm. llvm-svn: 235265
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-1/+1
| | | | | | | | | | | | | | 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][lli] Add a very simple Orc-based lazy JIT to lli.Lang Hames2015-03-251-7/+21
| | | | | | | | | | | | | | | | | 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-231-0/+1
| | | | | | NFC. llvm-svn: 232976
* Replace a few instances of NULL with nullptr.David Majnemer2015-02-261-1/+1
| | | | llvm-svn: 230599
* [Orc] New JIT APIs.Lang Hames2015-01-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [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] 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-231-7/+4
| | | | | | | | | | 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-021-34/+8
| | | | | | | | 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
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-071-8/+34
| | | | | | | | | | | 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
* Nuke the old JIT.Rafael Espindola2014-08-071-34/+8
| | | | | | | | | 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
* Update the MemoryBuffer API to use ErrorOr.Rafael Espindola2014-07-061-9/+9
| | | | llvm-svn: 212405
* Pass a unique_ptr<MemoryBuffer> to the constructors in the Binary hierarchy.Rafael Espindola2014-06-241-1/+1
| | | | | | | Once the objects are constructed, they own the buffer. Passing a unique_ptr makes that clear. llvm-svn: 211595
* Remove 'using std::error_code' from tools.Rafael Espindola2014-06-131-3/+2
| | | | llvm-svn: 210876
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-0/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* PR19553: Memory leak in RuntimeDyldELF::createObjectImageFromFileDavid Blaikie2014-04-291-1/+1
| | | | | | | | | | | | | | | | This starts in MCJIT::getSymbolAddress where the unique_ptr<object::Binary> is release()d and (after a cast) passed to a single caller, MCJIT::addObjectFile. addObjectFile calls RuntimeDyld::loadObject. RuntimeDld::loadObject calls RuntimeDyldELF::createObjectFromFile And the pointer is never owned at this point. I say this point, because the alternative codepath, RuntimeDyldMachO::createObjectFile certainly does take ownership, so this seemed like a good hint that this was a/the right place to take ownership. llvm-svn: 207580
* [C++] Use 'nullptr'. Tools edition.Craig Topper2014-04-251-6/+6
| | | | llvm-svn: 207176
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-221-1/+2
| | | | | | definition below all of the header #include lines, tools edition. llvm-svn: 206848
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-081-2/+2
| | | | | | class. llvm-svn: 203345
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-3/+3
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-051-1/+1
| | | | llvm-svn: 202957
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-241-1/+1
| | | | | | | | | After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) llvm-svn: 202052
* Replace the interim lli build fix with something cleanerAlp Toker2014-01-231-12/+15
| | | | | | | | | | Eliminates the LLI_BUILDING_CHILD build hack from r199885. Also add a FIXME to remove code that tricks the tests into passing when the feature fails to work. Please don't do stuff like this, the tests exist for a reason! llvm-svn: 199929
* Tweak r199835 to use can_execute() instead of exists()Alp Toker2014-01-221-2/+3
| | | | | | | The execution code path crashes if it can't execute the binary so we might as well take precautions here. llvm-svn: 199844
* Eliminate inappropriate use of FindProgramByName() from lliAlp Toker2014-01-221-11/+9
| | | | llvm-svn: 199835
* Change createObjectFile to return an ErrorOr.Rafael Espindola2014-01-221-3/+3
| | | | llvm-svn: 199776
* Return an error_code from materializeAllPermanently.Rafael Espindola2014-01-141-3/+3
| | | | llvm-svn: 199275
* Sanitize MCJIT remote executionRenato Golin2014-01-141-2/+5
| | | | | | | | | | | | MCJIT remote execution (ChildTarget+RemoteTargetExternal) protocol was in dire need of refactoring. It was fail-prone, had no error reporting and implemented the same message logic on every single function. This patch rectifies it, and makes it work on ARM, where it was randomly failing. Other architectures shall profit from this change as well, making their buildbots and releases more reliable. llvm-svn: 199261
* lli: Tweak CacheName not to contain DOS driveletter.NAKAMURA Takumi2014-01-101-1/+9
| | | | llvm-svn: 198929
* lli: LLIObjectCache: Use llvm::sys::path to get dirname.NAKAMURA Takumi2014-01-101-2/+5
| | | | llvm-svn: 198928
* Whitespace.NAKAMURA Takumi2014-01-101-2/+2
| | | | llvm-svn: 198927
* Fix accidental use of the exotic "std::string::back()" method. Turns out it'sLang Hames2014-01-091-1/+2
| | | | | | new in C++11. llvm-svn: 198853
* Add an "-object-cache-dir=<string>" option to LLI. This option specifies theLang Hames2014-01-091-7/+23
| | | | | | | | | | | 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. llvm-svn: 198852
OpenPOWER on IntegriCloud