summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/OrcLazyJIT.h
Commit message (Collapse)AuthorAgeFilesLines
...
* [Orc] Refactor the compile-on-demand layer to make module partitioning lazy,Lang Hames2015-05-041-7/+2
| | | | | | | | | | | | | | | and avoid cloning unused decls into every partition. Module partitioning showed up as a source of significant overhead when I profiled some trivial test cases. Avoiding the overhead of partitionging for uncalled functions helps to mitigate this. This change also means that it is no longer necessary to have a LazyEmittingLayer underneath the CompileOnDemand layer, since the CompileOnDemandLayer will not extract or emit function bodies until they are called. llvm-svn: 236465
* [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] Add an Orc layer for applying arbitrary transforms to IR, use it to addLang Hames2015-04-131-4/+12
| | | | | | | 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
* [Orc] Add support classes for inspecting and running C++ static ctor/dtors, andLang Hames2015-04-021-5/+55
| | | | | | | | | 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-011-1/+8
| | | | | | | 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-301-9/+12
| | | | | | | | OrcLazyJIT in lli. Separating these concerns enables more natural error handling. llvm-svn: 233579
* [MCJIT][Orc] Refactor RTDyldMemoryManager, weave RuntimeDyld::SymbolInfo throughLang Hames2015-03-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-0/+97
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
OpenPOWER on IntegriCloud