Commit Graph

13 Commits

Author SHA1 Message Date
Lang Hames
1aeb111842 [Orc] Reapply r236465 with fixes for the MSVC bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236506 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-05 17:37:18 +00:00
Lang Hames
b63d8107f0 [Orc] Revert r236465 - It broke the Windows bots.
Looks like the usual missing explicit move-constructor issue with MSVC. I should
have a fix shortly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236472 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-04 23:30:01 +00:00
Lang Hames
ee160106a1 [Orc] Refactor the compile-on-demand layer to make module partitioning lazy,
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236465 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-04 22:03:10 +00:00
Lang Hames
a35d818b9a [Orc] Reapply r234815, outputting via stdout instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234908 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 16:58:05 +00:00
Lang Hames
7b161773fd [Orc] Revert 234815. Still haven't quite got this test figured out apparently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234822 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 00:27:47 +00:00
Lang Hames
f265d42389 [Orc] Make the OrcLazy hello.ll regression test output via stderr.
This keeps the program and JIT output in sync, enabling FileCheck to test the
order of target program and JIT events.

In particular we can now test that main is not compiled until after the global
constructor has run.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234815 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-13 23:28:46 +00:00
Lang Hames
534f9f3ee5 [Orc] Back out r234805 for hello.ll until I can figure out how to sync up the
output.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234810 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-13 22:58:39 +00:00
Lang Hames
597d2b7309 [Orc] Add an Orc layer for applying arbitrary transforms to IR, use it to add
debugging output to the LLI orc-lazy JIT, and update the orc-lazy "hello.ll"
test to actually test for lazy compilation.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234805 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-13 22:12:54 +00:00
Lang Hames
2ae6c65416 [Orc] During module partitioning, rename anonymous and asm-private globals.
If they're not (re)named, these globals will fail to resolve when the
partitioned modules are linked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234707 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-12 20:05:51 +00:00
Lang Hames
2eb21d0245 [Orc] Fix local-linkage handling in the CompileOnDemand layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233895 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-02 05:28:10 +00:00
Lang Hames
14ef491582 [Orc] Add support classes for inspecting and running C++ static ctor/dtors, and
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. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233885 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-02 04:34:45 +00:00
Daniel Jasper
a427f12c6d Make exit-code test use same mechanism as existing one.
The other version doesn't properly work with our internal test runner,
which sets pipefail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233188 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-25 14:35:40 +00:00
Lang Hames
47fd5639bc [Orc][lli] Add a very simple Orc-based lazy JIT to lli.
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233182 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-25 12:11:48 +00:00