summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/lli.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Standardizing lli's extra module command line optionAndrew Kaylor2013-10-281-2/+1
| | | | llvm-svn: 193544
* Fixing problems in lli's RemoteMemoryManager.Andrew Kaylor2013-10-111-6/+6
| | | | | | | | 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. llvm-svn: 192514
* Removing unintended code block from lliAndrew Kaylor2013-10-081-9/+0
| | | | llvm-svn: 192205
* Adding support and tests for multiple module handling in lliAndrew Kaylor2013-10-041-82/+33
| | | | llvm-svn: 191938
* Pass the resolved lli-child-target executable name to execv, rather thanRichard Smith2013-10-021-1/+1
| | | | | | searching $PATH for it then blindly executing it from $PWD anyway. llvm-svn: 191856
* Clean up lli execution codeAndrew Kaylor2013-10-021-39/+41
| | | | llvm-svn: 191845
* Adding out-of-process execution support to lli.Andrew Kaylor2013-10-021-8/+41
| | | | | | | | 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. llvm-svn: 191843
* Adding multiple module support for MCJIT.Andrew Kaylor2013-10-011-16/+14
| | | | | | | | 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. llvm-svn: 191722
* Add flag to lli to enable debugging of IR when used with MCJIT.Daniel Malea2013-06-281-0/+16
| | | | | | | | | | | | | | | | | | - 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> llvm-svn: 185197
* Print uint64_t -debug text correctly on 32-bit hostsTim Northover2013-05-191-5/+5
| | | | | | | | 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. llvm-svn: 182209
* SectionMemoryManager shouldn't be a JITMemoryManager. Previously, the Filip Pizlo2013-05-141-7/+7
| | | | | | | | | | | | | | | | | 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. llvm-svn: 181820
* Remove exception handling support from the old JIT.Rafael Espindola2013-05-071-6/+0
| | | | llvm-svn: 181354
* Split out the IRReader header and the utility functions it provides intoChandler Carruth2013-03-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 177971
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-3/+3
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 171366
* Sort the #include lines for tools/...Chandler Carruth2012-12-041-9/+9
| | | | | | | | 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. llvm-svn: 169252
* Modifying lli to use the SectionMemoryManager.Andrew Kaylor2012-11-271-222/+10
| | | | | | 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. llvm-svn: 168722
* Interface changes to allow RuntimeDyld memory managers to set memory ↵Andrew Kaylor2012-11-151-2/+5
| | | | | | permissions after an object has been loaded. llvm-svn: 168114
* Add a method to indicate section address re-assignment is finished.Andrew Kaylor2012-11-051-0/+4
| | | | | | 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. llvm-svn: 167400
* lli: Initialize the native asm parser for inline assembly.Jim Grosbach2012-11-051-0/+1
| | | | | | | MCJIT supports inline assembly, but requires the asm parser to do so. Make sure to link it in and initialize it. llvm-svn: 167392
* Streamlined memory manager hierarchy for MCJIT and RuntimeDyld.Andrew Kaylor2012-11-011-1/+1
| | | | | | Patch by Ashok Thirumurthi llvm-svn: 167192
* Fixed format strings to avoid pointer truncation during 64-bit debugging.Andrew Kaylor2012-11-011-4/+4
| | | | llvm-svn: 167185
* Align the data section correctly when loading an ELF file.Tim Northover2012-10-291-3/+11
| | | | | | Patch by Amara Emerson. llvm-svn: 166920
* Add float-abi and softfloat options to lliTim Northover2012-10-121-2/+26
| | | | | | Patch by Amara Emerson. llvm-svn: 165791
* lli: [MCJIT] Suppress "__main" for cygming in ↵NAKAMURA Takumi2012-10-051-0/+12
| | | | | | | | LLIMCJITMemoryManager::getPointerToNamedFunction(), like legacy JITMemoryManager's. CRT's __main (aka premain) invokes global ctors on cygming. See also PR3897. llvm-svn: 165312
* Make sure lli compiles all code before invalidating instruction caches.Tim Northover2012-09-201-0/+3
| | | | | | Patch from Amara Emerson. llvm-svn: 164296
* MCJIT: Add faux remote target execution to lli for the MCJIT.Jim Grosbach2012-09-051-29/+171
| | | | | | | | | | | | Simulate a remote target address space by allocating a seperate chunk of memory for the target and re-mapping section addresses to that prior to execution. Later we'll want to have a truly remote process, but for now this gets us closer to being able to test the remote target functionality outside LLDB. rdar://12157052 llvm-svn: 163216
* LLI: move instruction cache tweaks.Jim Grosbach2012-08-281-4/+4
| | | | | | | | Invalidate the instruction cache right before we start actually executing code, otherwise we can miss some that came later. This is still not quite right for a truly lazilly compiled environment, but it's closer. llvm-svn: 162803
* Plug a leak when using MCJIT.Benjamin Kramer2012-05-201-2/+3
| | | | | | Found by valgrind. llvm-svn: 157160
* Remove extra semicolons.Benjamin Kramer2012-05-191-15/+15
| | | | llvm-svn: 157118
* Added LLIMCJITMemoryManager to the lli. This manager will be used for MCJIT ↵Danil Malyshev2012-05-161-0/+204
| | | | | | | | instead of DefaultJIMMemoryManager. It's more flexible for MCJIT tasks, in addition it's provides a invalidation instruction cache for code sections which will be used before JIT code will be executed. llvm-svn: 156933
* Remove redundant line (the memory manager is set above to the same objectEli Bendersky2012-04-291-1/+0
| | | | | | if !ForceInterpreteri). It has no effect (apart from a memory leak...) llvm-svn: 155792
* Move the JIT flags from llc to lli. These flags showed up as part of movingNick Lewycky2012-04-181-0/+28
| | | | | | backend flags in TargetOptions.h into their own class in r145714. llvm-svn: 154993
* Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted ↵Eli Bendersky2012-03-131-1/+6
| | | | | | | | | | | code in LLVM. Also refactor the existing OProfile profiling code to reuse the same interfaces with the VTune profiling code. In addition, unit tests for the profiling interfaces were added. This patch was prepared by Andrew Kaylor and Daniel Malea, and reviewed in the llvm-commits list by Jim Grosbach llvm-svn: 152620
* Adding a basic ELF dynamic loader and MC-JIT for ELF. Functionality is ↵Eli Bendersky2012-01-161-12/+14
| | | | | | | | currently basic and will be enhanced with future patches. Patch developed by Andy Kaylor and Daniel Malea. Reviewed on llvm-commits. llvm-svn: 148231
* 80 columns.Jim Grosbach2012-01-111-1/+2
| | | | llvm-svn: 147970
* lli should only create memmgr when JITing.Jim Grosbach2012-01-111-3/+1
| | | | llvm-svn: 147969
* lli should create a JIT memory manager.Jim Grosbach2012-01-111-0/+4
| | | | | | | Previously let the JITEmitter do it. That's rather odd, and doesn't play nice with the MCJIT, so move the (trivial) logic up. llvm-svn: 147967
* Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner2011-10-161-1/+1
| | | | | | | | | | | | | | | does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. llvm-svn: 142106
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-241-1/+1
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng2011-07-201-0/+18
| | | | | | | | - Introduce JITDefault code model. This tells targets to set different default code model for JIT. This eliminates the ugly hack in TargetMachine where code model is changed after construction. llvm-svn: 135580
* Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng2011-07-191-0/+16
| | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. llvm-svn: 135468
* Beginnings of MC-JIT code generation.Jim Grosbach2011-03-181-0/+1
| | | | | | | | | | | Proof-of-concept code that code-gens a module to an in-memory MachO object. This will be hooked up to a run-time dynamic linker library (see: llvm-rtdyld for similarly conceptual work for that part) which will take the compiled object and link it together with the rest of the system, providing back to the JIT a table of available symbols which will be used to respond to the getPointerTo*() queries. llvm-svn: 127916
* Merge System into Support.Michael J. Spencer2010-11-291-2/+2
| | | | llvm-svn: 120298
* MCJIT: Stub out MCJIT implementation, still doesn't do anything useful.Daniel Dunbar2010-11-171-0/+1
| | | | llvm-svn: 119509
* lli: Add stub -use-mcjit option, which doesn't currently do anything.Daniel Dunbar2010-11-171-0/+8
| | | | llvm-svn: 119508
* lli: Switch to using ParseIRFile, for consistency with other LLVM tools.Daniel Dunbar2010-11-131-10/+6
| | | | | | - Also, switch tests to not using llvm-as. They run 20% faster now, not that it matters. llvm-svn: 118952
* lli: On Cygwin-1.5, lli crashes at invoking destructors in atexit handler.NAKAMURA Takumi2010-10-221-0/+11
| | | | llvm-svn: 117095
* Straighten out any triple strings passed on the command line beforeDuncan Sands2010-08-281-1/+2
| | | | | | they hit the rest of the system. llvm-svn: 112344
* Simplify ".bc" detection.Benjamin Kramer2010-04-151-2/+1
| | | | llvm-svn: 101365
* fix a crash on "lli ex" or any other file whose name is exactly twoChris Lattner2010-04-151-1/+2
| | | | | | characters long. llvm-svn: 101336
OpenPOWER on IntegriCloud