summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/lli.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.Jeffrey Yasskin2010-02-051-0/+19
| | | | | | | | | llc.cpp also defined these flags, meaning that when I linked all of LLVM's libraries into a single shared library, llc crashed on startup with duplicate flag definitions. This patch passes them through the EngineBuilder into JIT::selectTarget(). llvm-svn: 95390
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-13/+12
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* Revert the API changes from r85295 to make it easier for people to buildJeffrey Yasskin2009-10-271-1/+1
| | | | | | against both 2.6 and HEAD. The default is still changed to eager jitting. llvm-svn: 85330
* Change the JIT to compile eagerly by default as agreed inJeffrey Yasskin2009-10-271-2/+1
| | | | | | | http://llvm.org/PR5184, and beef up the comments to describe what both options do and the risks of lazy compilation in the presence of threads. llvm-svn: 85295
* Delete the MacOSJITEventListener per echristo's request. It was disabled byJeffrey Yasskin2009-10-211-1/+0
| | | | | | default and didn't work anyway. llvm-svn: 84720
* Add a CodeGenOpt::Less level to match -O1. It'll be used by clients which do ↵Evan Cheng2009-10-161-1/+1
| | | | | | not want post-regalloc scheduling. llvm-svn: 84272
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-231-0/+1
| | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. llvm-svn: 79869
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-2/+3
| | | | llvm-svn: 78948
* lli doesn't need <iostream> anymore.Dan Gohman2009-08-051-1/+0
| | | | llvm-svn: 78133
* Re-committing r76828 with the JIT memory manager changes now that the buildReid Kleckner2009-07-231-3/+0
| | | | | | bots like the BumpPtrAllocator changes. llvm-svn: 76902
* Reverting r76825 and r76828, since they caused clang runtime errors and some ↵Reid Kleckner2009-07-231-0/+3
| | | | | | build failure involving memset. llvm-svn: 76838
* Make the JIT code emitter properly retry and ask for more memory when it runsReid Kleckner2009-07-231-3/+0
| | | | | | | | | | | | | out of memory, and also make the default memory manager allocate more memory when it runs out. Also, switch function stubs and global data over to using the BumpPtrAllocator. This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB of memory, and instead allocates in 512K slabs. I suspect this size could go lower, especially on embedded platforms, now that more slabs can be allocated. llvm-svn: 76828
* Switch lli back to using allocate-gvs-with-code behavior.Daniel Dunbar2009-07-181-2/+5
| | | | | | | | | - Otherwise we get two regressions in llvm-test for applications which run out of space. - Once the JIT memory manager is improved, this can be switched back. llvm-svn: 76291
* Add EngineBuilder to ExecutionEngine in favor of the five optional argument ↵Reid Kleckner2009-07-181-2/+9
| | | | | | | | EE::create(). Also a test commit. llvm-svn: 76276
* Make sure targets are initialized before we do anything, even command lineDaniel Dunbar2009-07-161-4/+5
| | | | | | processing. llvm-svn: 75888
* To simplify the upcoming context-on-type change, switch all command line ↵Owen Anderson2009-07-151-1/+1
| | | | | | | | tools to using the default global context for now. This will let us to hardwire stuff to the global context in the short term while the API is sorted out. llvm-svn: 75846
* Use errs() instead of std::cerr.Dan Gohman2009-07-151-10/+10
| | | | llvm-svn: 75791
* Add a --with-oprofile flag to configure, which uses OProfile's agentJeffrey Yasskin2009-07-101-0/+1
| | | | | | | | | | | | | | | | | | library to tell it the addresses of JITted functions. For a particular program, this changes the opreport -l output from: samples % image name symbol name 48182 98.9729 anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000) anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000) 11 0.0226 libstdc++.so.6.0.9 /usr/lib/libstdc++.so.6.0.9 to: samples % image name symbol name 24565 60.7308 19814.jo fib_left 15365 37.9861 19814.jo fib_right 22 0.0544 ld-2.7.so do_lookup_x llvm-svn: 75279
* Fix lli to print an error and exit when EE returns null but no string. PatchChris Lattner2009-07-071-2/+5
| | | | | | by Eric Rannaud! llvm-svn: 74930
* Fix typo: intepreter->interpreter.Torok Edwin2009-07-031-1/+1
| | | | llvm-svn: 74770
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-011-1/+1
| | | | llvm-svn: 74640
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-2/+4
| | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
* Add a JITEventListener interface that gets called back when a new function isJeffrey Yasskin2009-06-251-2/+5
| | | | | | | | | emitted or the machine code for a function is freed. Chris mentioned that we may also want a notification when a stub is emitted, but that'll be a future change. I intend to use this to tell oprofile where functions are emitted and what lines correspond to what addresses. llvm-svn: 74157
* switch to using llvm/Target/TargetSelect.hChris Lattner2009-06-171-20/+4
| | | | llvm-svn: 73611
* Use Doug's new LLVM_NATIVE_ARCH macro in config.h to link in the nativeChris Lattner2009-06-171-0/+21
| | | | | | target so that the JIT works in LLI, not just the interpreter. llvm-svn: 73595
* Default llc / lli optimization to "Default", which corresponds to -O1 / -O2.Evan Cheng2009-05-041-7/+21
| | | | llvm-svn: 70934
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-291-1/+3
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
* Change various llvm utilities to use PrettyStackTraceProgram inChris Lattner2009-03-061-1/+4
| | | | | | | their main routines. This makes the tools print their argc/argv commands if they crash. llvm-svn: 66248
* Add command line option -entry-funcion to override entry function (default ↵Evan Cheng2008-11-051-5/+12
| | | | | | is main). llvm-svn: 58779
* Add -fast command line option to lli. It enables fast codegen path.Evan Cheng2008-08-081-1/+7
| | | | llvm-svn: 54524
* Rename -no-lazy to -disable-lazy-compilation.Evan Cheng2008-05-211-1/+1
| | | | llvm-svn: 51386
* Added command line option -no-lazy to disable JIT lazy compilation.Evan Cheng2008-04-221-8/+30
| | | | llvm-svn: 50095
* remove attributions from tools.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45421
* Move the space in overview output for commands out of each of theDan Gohman2007-10-081-1/+1
| | | | | | commands and into the common code. llvm-svn: 42752
* Here is the bulk of the sanitizing.Gabor Greif2007-07-051-2/+2
| | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
* use the new MemoryBuffer interfaces to simplify error reporting in clients.Chris Lattner2007-05-061-5/+1
| | | | llvm-svn: 36900
* switch tools to bitcode from bytecodeChris Lattner2007-05-061-17/+7
| | | | llvm-svn: 36872
* add bitcode reading support, remove eh stuffChris Lattner2007-05-061-89/+99
| | | | llvm-svn: 36840
* reset errno to zero on entry to the application's main function. This fixesChris Lattner2007-04-271-1/+5
| | | | | | | | MultiSource/Applications/minisat in the JIT. Note that the libsystem stuff should ideally never modify errno. :( llvm-svn: 36508
* Obtain the exit function before execution just in case the moduleReid Spencer2007-03-061-5/+7
| | | | | | disappears before we get to calling the exit function. llvm-svn: 34953
* 1. Handle errors around the ModuleProvider. This is necessary since it isReid Spencer2007-03-031-11/+23
| | | | | | | | | | | reading bytecode. 2. The interpreter can delete the ModuleProvider and replace it with another so don't depend on it being around after the EE is created. 3. Don't just run llvm_shutdown on exit but actually delete the EE as well. This cleans up a vast amount of memory (but not all) that EE retained through exit. llvm-svn: 34888
* push bytecode decompressor out through APIs. Now the bytecode readerChris Lattner2007-02-071-1/+4
| | | | | | | | | | | | | | | | | | | | api's look like this: ModuleProvider *getBytecodeModuleProvider( const std::string &Filename, ///< Name of file to be read BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer, std::string* ErrMsg = 0, ///< Optional error message holder BytecodeHandler* H = 0 ///< Optional handler for reader events ); This is ugly, but allows a client to say: getBytecodeModuleProvider("foo", 0); If they do this, there is no dependency on the compression libraries, saving codesize. llvm-svn: 34012
* For PR411:Reid Spencer2007-02-051-1/+1
| | | | | | | | Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) llvm-svn: 33922
* fix atexit. This is an overcomplex way of calling exit, but it is required,Chris Lattner2007-01-081-3/+16
| | | | | | | as the jit intercepts exit calls to implement atexit handlers. This fixes SingleSource/UnitTests/2003-05-14-AtExit llvm-svn: 33008
* this is an overcomplex way to call exit :)Chris Lattner2007-01-071-12/+1
| | | | llvm-svn: 32978
* For PR950:Reid Spencer2006-12-311-2/+2
| | | | | | Convert signed integer types to signless. llvm-svn: 32790
* make statistics and timing info print even if the JIT'd program calls exitChris Lattner2006-12-101-1/+1
| | | | | | instead of returning from main. llvm-svn: 32414
* make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.Chris Lattner2006-12-061-0/+2
| | | | | | With this change, I can now move -stats to print when llvm_shutdown is called. llvm-svn: 32250
* add a new (hidden) -disable-core-files optionChris Lattner2006-09-141-0/+9
| | | | llvm-svn: 30318
* For PR797:Reid Spencer2006-08-251-4/+3
| | | | | | | Remove exception throwing/handling from lib/Bytecode, and adjust its users to compensate for changes in the interface. llvm-svn: 29875
OpenPOWER on IntegriCloud