Go to file
Lang Hames 98c2ac13d3 [Orc] Add support for emitting indirect stubs directly into the JIT target's
memory, rather than representing the stubs in IR. Update the CompileOnDemand
layer to use this functionality.

Directly emitting stubs is much cheaper than building them in IR and codegen'ing
them (see below). It also plays well with remote JITing - stubs can be emitted
directly in the target process, rather than having to send them over the wire.

The downsides are:

(1) Care must be taken when resolving symbols, as stub symbols are held in a
    separate symbol table. This is only a problem for layer writers and other
    people using this API directly. The CompileOnDemand layer hides this detail.

(2) Aliases of function stubs can't be symbolic any more (since there's no
    symbol definition in IR), but must be converted into a constant pointer
    expression. This means that modules containing aliases of stubs cannot be
    cached. In practice this is unlikely to be a problem: There's no benefit to
    caching such a module anyway.

On balance I think the extra performance is more than worth the trade-offs: In a
simple stress test with 10000 dummy functions requiring stubs and a single
executed "hello world" main function, directly emitting stubs reduced user time
for JITing / executing by over 90% (1.5s for IR stubs vs 0.1s for direct
emission).

llvm-svn: 250712
2015-10-19 17:43:51 +00:00
clang clang-format: Use pipes instead of temporary files for most lit tests. 2015-10-19 16:21:29 +00:00
clang-tools-extra Make a bunch of static arrays const. 2015-10-18 05:14:41 +00:00
compiler-rt [PGO] Eliminate prof data register calls on FreeBSD platform 2015-10-19 04:17:19 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc integer: remove explicit casts from _MIN definitions 2015-10-06 19:12:12 +00:00
libcxx Fix an unfortunate yet old typo that never got attention before r250507. 2015-10-16 11:26:26 +00:00
libcxxabi Fix LIBCXXABI_HAS_NO_THREADS configuration. 2015-10-14 19:21:38 +00:00
libunwind Add FreeBSD _Unwind_Ptr typedef 2015-10-16 19:40:09 +00:00
lld [ELF2] - Linker script EXTERN command implemented. 2015-10-19 17:35:12 +00:00
lldb Py3'ify some of the examples that get run at startup. 2015-10-19 17:35:02 +00:00
llgo [llgo] irgen: always use TargetMachine's data layout 2015-09-25 06:28:14 +00:00
llvm [Orc] Add support for emitting indirect stubs directly into the JIT target's 2015-10-19 17:43:51 +00:00
openmp On FreeBSD, PTHREADS_THREADS_MAX does not fit into an int, leading to 2015-10-19 17:32:04 +00:00
polly Correct typo in CHECK line 2015-10-19 10:51:20 +00:00