Commit Graph

495 Commits

Author SHA1 Message Date
Lang Hames
88e224ab97 [examples] Add a dependency on ExecutionEngine to LLJITWithObjectCache example.
ExecutionEngine.cpp contains the anchor() for the ObjectCache base class, so we
need an explicit dependency on it.

Patch by Stephen Neuendorffer. Thanks Stephen!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375461 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-21 22:29:29 +00:00
Lang Hames
4e1c632114 [examples] Fix some comments in the LLJITWithJITLink example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375269 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-18 18:35:02 +00:00
Lang Hames
90696971b2 [examples] Add an example of how to use JITLink and small-code-model with LLJIT.
JITLink is LLVM's newer jit-linker. It is an alternative to (and hopefully
eventually a replacement for) LLVM's older jit-linker, RuntimeDyld. Unlike
RuntimeDyld which requries JIT'd code to be complied with the large code
model, JITlink can link code compiled with the small code model, which is
the native code model for a number of targets (including all supported MachO
targets).

This example shows how to:

-- Create a JITLink InProcessMemoryManager
-- Set the code model to small
-- Use a JITLink backed ObjectLinkingLayer as the linking layer for LLJIT
   (rather than the default RTDyldObjectLinkingLayer).

Note: This example will only work on platforms supported by JITLink. As of
this commit that's MachO/x86-64 and MachO/arm64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375266 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-18 18:25:15 +00:00
Benjamin Kramer
e8e4b1ed55 [Orc] Roll back ThreadPool to std::function
MSVC doesn't allow move-only types in std::packaged_task. Boo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371844 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 11:59:51 +00:00
Benjamin Kramer
3642ab247c [Orc] Address the remaining move-capture FIXMEs
This required spreading unique_function a bit more, which I think is a
good thing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371843 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 11:35:33 +00:00
Praveen Velliengiri
d2c4dd208d [ORCv2] - New Speculate Query Implementation
Summary:
This patch introduces, SequenceBBQuery - new heuristic to find likely next callable functions it tries to find the blocks with calls in order of execution sequence of Blocks.

It still uses BlockFrequencyAnalysis to find high frequency blocks. For a handful of hottest blocks (plan to customize), the algorithm traverse and discovered the caller blocks along the way to Entry Basic Block and Exit Basic Block. It uses Block Hint, to stop traversing the already visited blocks in both direction. It implicitly assumes that once the block is visited during discovering entry or exit nodes, revisiting them again does not add much. It also branch probability info (cached result) to traverse only hot edges (planned to customize) from hot blocks. Without BPI, the algorithm mostly return's all the blocks in the CFG with calls.

It also changes the heuristic queries, so they don't maintain states. Hence it is safe to call from multiple threads.

It also implements, new instrumentation to avoid jumping into JIT on every call to the function with the help _orc_speculate.decision.block and _orc_speculate.block.

"Speculator Registration Mechanism is also changed" - kudos to @lhames

Open to review, mostly looking to change implementation of SequeceBBQuery heuristics with good data structure choices.

Reviewers: lhames, dblaikie

Reviewed By: lhames

Subscribers: mgorny, hiraditya, mgrang, llvm-commits, lhames

Tags: #speculative_compilation_in_orc, #llvm

Differential Revision: https://reviews.llvm.org/D66399

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370092 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-27 18:23:36 +00:00
Lang Hames
bf352f52b5 [ORC] Make sure we linker-mangle symbol names in the SpeculationLayer.
If mangling is not performed then speculative lookups will fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369219 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-18 21:29:57 +00:00
Jonas Devlieghere
114087caa6 [llvm] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369013 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-15 15:54:37 +00:00
Lang Hames
97225a84aa [ORC] Fix SpeculativeJIT example code broken by r368707.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368764 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-13 22:44:54 +00:00
Lang Hames
06d793d233 [ORC] Fix BuildingAJIT tutorial code broken by r368707.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368740 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-13 19:38:52 +00:00
Fangrui Song
2ffd08308b Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC
F_{None,Text,Append} are kept for compatibility since r334221.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367800 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 05:43:48 +00:00
Praveen Velliengiri
25b5b890b3 Speculative Compilation
[ORC] Remove Speculator Variants for Different Program Representations

[ORC] Block Freq Analysis

Speculative Compilation with Naive Block Frequency

Add Applications to OrcSpeculation

ORC v2 with Block Freq Query & Example

Deleted BenchMark Programs

Signed-off-by: preejackie <praveenvelliengiri@gmail.com>

ORCv2 comments resolved

[ORCV2] NFC

ORCv2 NFC

[ORCv2] Speculative compilation - CFGWalkQuery

ORCv2 Adapting IRSpeculationLayer to new locking scheme

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367756 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-03 14:42:13 +00:00
Lang Hames
08cd906b86 [ORC] Change the locking scheme for ThreadSafeModule.
ThreadSafeModule/ThreadSafeContext are used to manage lifetimes and locking
for LLVMContexts in ORCv2. Prior to this patch contexts were locked as soon
as an associated Module was emitted (to be compiled and linked), and were not
unlocked until the emit call returned. This could lead to deadlocks if
interdependent modules that shared contexts were compiled on different threads:
when, during emission of the first module, the dependence was discovered the
second module (which would provide the required symbol) could not be emitted as
the thread emitting the first module still held the lock.

This patch eliminates this possibility by moving to a finer-grained locking
scheme. Each client holds the module lock only while they are actively operating
on it. To make this finer grained locking simpler/safer to implement this patch
removes the explicit lock method, 'getContextLock', from ThreadSafeModule and
replaces it with a new method, 'withModuleDo', that implicitly locks the context,
calls a user-supplied function object to operate on the Module, then implicitly
unlocks the context before returning the result.

ThreadSafeModule TSM = getModule(...);
size_t NumFunctions = TSM.withModuleDo(
    [](Module &M) { // <- context locked before entry to lambda.
      return M.size();
    });

Existing ORCv2 layers that operate on ThreadSafeModules are updated to use the
new method.

This method is used to introduce Module locking into each of the existing
layers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367686 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-02 15:21:37 +00:00
Lang Hames
19f0f50d66 [ORC] Add deprecation warnings to ORCv1 layers and utilities.
Summary:
ORCv1 is deprecated. The current aim is to remove it before the LLVM 10.0
release. This patch adds deprecation attributes to the ORCv1 layers and
utilities to warn clients of the change.

Reviewers: dblaikie, sgraenitz, AlexDenisov

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64609

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366344 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-17 16:40:52 +00:00
Lang Hames
1193b207a6 [ORC] Add custom IR compiler configuration to LLJITBuilder to enable obj caches.
LLJITBuilder now has a setCompileFunctionCreator method which can be used to
construct a CompileFunction for the LLJIT instance being created. The motivating
use-case for this is supporting ObjectCaches, which can now be set up at
compile-function construction time. To demonstrate this an example project,
LLJITWithObjectCache, is included.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365671 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-10 17:24:24 +00:00
Lang Hames
21dbb437f8 Add a HowToUseLLJIT example project.
A very minimal demo of how to use the LLJIT class, along the lines of the old
HowToUseJIT example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361435 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-22 21:38:41 +00:00
Lang Hames
6c66c715b1 [JITLink] Update BuildingAJIT tutorials to account for API changes in r358818.
DynamicLibrarySearchGenerator::GetForCurrentProcess now takes a char (the global
prefix) rather than a DataLayout reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358820 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-20 17:35:28 +00:00
Lang Hames
ede8818b21 [Kaleidoscope] Fix symbol resolver to search in reverse order.
This should allow more recent definitions of functions in the Kaleidoscope REPL
to override old ones, as the tutorial text promises.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354598 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-21 16:53:04 +00:00
James Y Knight
ff5877ff78 Fix compilation of examples after 13680223b9d8 / r352827
Who knew...they're not built by default or as part of the tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352830 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-01 03:23:42 +00:00
James Y Knight
9ec60d7d8f [opaque pointer types] Add a FunctionCallee wrapper type, and use it.
Recommit r352791 after tweaking DerivedTypes.h slightly, so that gcc
doesn't choke on it, hopefully.

Original Message:
The FunctionCallee type is effectively a {FunctionType*,Value*} pair,
and is a useful convenience to enable code to continue passing the
result of getOrInsertFunction() through to EmitCall, even once pointer
types lose their pointee-type.

Then:
- update the CallInst/InvokeInst instruction creation functions to
  take a Callee,
- modify getOrInsertFunction to return FunctionCallee, and
- update all callers appropriately.

One area of particular note is the change to the sanitizer
code. Previously, they had been casting the result of
`getOrInsertFunction` to a `Function*` via
`checkSanitizerInterfaceFunction`, and storing that. That would report
an error if someone had already inserted a function declaraction with
a mismatching signature.

However, in general, LLVM allows for such mismatches, as
`getOrInsertFunction` will automatically insert a bitcast if
needed. As part of this cleanup, cause the sanitizer code to do the
same. (It will call its functions using the expected signature,
however they may have been declared.)

Finally, in a small number of locations, callers of
`getOrInsertFunction` actually were expecting/requiring that a brand
new function was being created. In such cases, I've switched them to
Function::Create instead.

Differential Revision: https://reviews.llvm.org/D57315

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352827 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-01 02:28:03 +00:00
James Y Knight
5be828a949 Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it."
This reverts commit f47d6b38c7a61d50db4566b02719de05492dcef1 (r352791).

Seems to run into compilation failures with GCC (but not clang, where
I tested it). Reverting while I investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352800 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-31 21:51:58 +00:00
James Y Knight
8e4d96d7af [opaque pointer types] Add a FunctionCallee wrapper type, and use it.
The FunctionCallee type is effectively a {FunctionType*,Value*} pair,
and is a useful convenience to enable code to continue passing the
result of getOrInsertFunction() through to EmitCall, even once pointer
types lose their pointee-type.

Then:
- update the CallInst/InvokeInst instruction creation functions to
  take a Callee,
- modify getOrInsertFunction to return FunctionCallee, and
- update all callers appropriately.

One area of particular note is the change to the sanitizer
code. Previously, they had been casting the result of
`getOrInsertFunction` to a `Function*` via
`checkSanitizerInterfaceFunction`, and storing that. That would report
an error if someone had already inserted a function declaraction with
a mismatching signature.

However, in general, LLVM allows for such mismatches, as
`getOrInsertFunction` will automatically insert a bitcast if
needed. As part of this cleanup, cause the sanitizer code to do the
same. (It will call its functions using the expected signature,
however they may have been declared.)

Finally, in a small number of locations, callers of
`getOrInsertFunction` actually were expecting/requiring that a brand
new function was being created. In such cases, I've switched them to
Function::Create instead.

Differential Revision: https://reviews.llvm.org/D57315

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352791 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-31 20:35:56 +00:00
Alexandre Ganea
74d260d262 Fix some warnings on MSVC
Differential Revision: https://reviews.llvm.org/D56329

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352322 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-27 18:41:40 +00:00
Chandler Carruth
6b547686c5 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-19 08:50:56 +00:00
Serge Guelton
60ccceba74 Python compat - print statement
Make sure all print statements are compatible with Python 2 and Python3 using
the `from __future__ import print_function` statement.

Differential Revision: https://reviews.llvm.org/D56249

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350307 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-03 14:11:33 +00:00
Paul Robinson
44410edda1 Fix build break from r347239
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347246 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-19 18:51:11 +00:00
Simon Pilgrim
1ee147eb6c Add bracket that was lost in rL346727 and has been causing buildbot failures for some time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346752 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 11:28:46 +00:00
George Karpenkov
f2e7b94e10 [BuildingAJIT] Fixing the build by inserting a forgotten paren.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346730 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 02:59:27 +00:00
Lang Hames
30b44ffb4c [BuildingAJIT] Clang-format chapters 1 and 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346727 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 01:26:25 +00:00
Lang Hames
94419b4f02 [BuildingAJIT] Update chapter 2 to use the ORCv2 APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346726 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 01:25:34 +00:00
Lang Hames
009a7621a3 [BuildingAJIT] Update the Ch1 KaleidoscopeJIT class to expose errors to clients.
Returning the error to clients provides an opportunity to introduce readers to
the Expected and Error APIs and makes the tutorial more useful as a starting
point for a real JIT class, while only slightly complicating the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344720 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-18 00:51:38 +00:00
Lang Hames
73405ef163 [BuildingAJIT] Update chapter 1 to use the ORCv2 APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344667 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-17 03:34:09 +00:00
Lang Hames
582b119624 [ORC] Rename ORC layers to make the "new" ORC layers the default.
This commit adds a 'Legacy' prefix to old ORC layers and utilities, and removes
the '2' suffix from the new ORC layers. If you wish to continue using the old
ORC layers you will need to add a 'Legacy' prefix to your classes. If you were
already using the new ORC layers you will need to drop the '2' suffix.

The legacy layers will remain in-tree until the new layers reach feature
parity with them. This will involve adding support for removing code from the
new layers, and ensuring that performance is comperable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344572 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-15 22:56:10 +00:00
Lang Hames
cd626d1139 [ORC] Fix BuildingAJIT tutorial examples that were broken by r343059.
createLocalCompileCallbackManager now returns an Expected value. This commit
wraps the call with cantFail to unwrap it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343060 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-26 04:00:58 +00:00
Lang Hames
543cda4110 [ORC] Update JITCompileCallbackManager to support multi-threaded code.
Previously JITCompileCallbackManager only supported single threaded code. This
patch embeds a VSO (see include/llvm/ExecutionEngine/Orc/Core.h) in the callback
manager. The VSO ensures that the compile callback is only executed once and that
the resulting address cached for use by subsequent re-entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333490 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-30 01:57:45 +00:00
Luke Geeson
6b4e03b5c3 Test Commit Access - Removed Whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333406 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-29 10:12:27 +00:00
Peter Collingbourne
8cc89d08e5 Unbreak kaleidoscope example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332908 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-21 22:09:45 +00:00
Lang Hames
bb60b65608 [ORC] Rewrite the VSO symbol table yet again. Update related utilities.
VSOs now track dependencies for materializing symbols. Each symbol must have its
dependencies registered with the VSO prior to finalization. Usually this will
involve registering the dependencies returned in
AsynchronousSymbolQuery::ResolutionResults for queries made while linking the
symbols being materialized.

Queries against symbols are notified that a symbol is ready once it and all of
its transitive dependencies are finalized, allowing compilation work to be
broken up and moved between threads without queries returning until their
symbols fully safe to access / execute.

Related utilities (VSO, MaterializationUnit, MaterializationResponsibility) are
updated to support dependence tracking and more explicitly track responsibility
for symbols from the point of definition until they are finalized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332541 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-16 22:24:30 +00:00
Nico Weber
63033d33c8 s/LLVM_ON_WIN32/_WIN32/, llvm
LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in
HandleLLVMOptions.cmake, which is where _WIN32 defined too.  Just use the
default macro instead of a reinvented one.

See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.
No intended behavior change.

This moves over all uses of the macro, but doesn't remove the definition
of it in (llvm-)config.h yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331127 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-29 00:45:03 +00:00
David Blaikie
1f03921510 Fix build breaks in examples due to moving stuff from Scalar.h to InstCombine.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330670 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-24 00:58:57 +00:00
David Blaikie
b5b7fce64c InstCombine: Fix layering by not including Scalar.h in InstCombine
(notionally Scalar.h is part of libLLVMScalarOpts, so it shouldn't be
included by InstCombine which doesn't/shouldn't need to depend on
ScalarOpts)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330669 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-24 00:48:59 +00:00
Lang Hames
73bcd8b27c [ORC] Create a new SymbolStringPool by default in ExecutionSession constructor.
This makes the common case of constructing an ExecutionSession tidier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329013 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-02 20:57:56 +00:00
David Blaikie
49ca55e381 Transforms: Introduce Transforms/Utils.h rather than spreading the declarations amongst Scalar.h and IPO.h
Fixes layering - Transforms/Utils shouldn't depend on including a Scalar
or IPO header, because Scalar and IPO depend on Utils.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328717 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-28 17:44:36 +00:00
Lang Hames
6531c3164c [ORC] Re-apply r327566 with a fix for test-global-ctors.ll.
Also clang-formats the patch, which I should have done the first time around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327594 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-15 00:30:14 +00:00
Reid Kleckner
d1e7e3c8a8 Revert "[ORC] Switch from shared_ptr to unique_ptr for addModule methods."
This reverts commit r327566, it breaks
test/ExecutionEngine/OrcMCJIT/test-global-ctors.ll.

The test doesn't crash with a stack trace, unfortunately. It merely
returns 1 as the exit code.

ASan didn't produce a report, and I reproduced this on my Linux machine
and Windows box.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327576 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-14 21:32:34 +00:00
Lang Hames
96ae7f8910 [ORC] Switch from shared_ptr to unique_ptr for addModule methods.
Layer implementations typically mutate module state, and this is better
reflected by having layers own the Module they are operating on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327566 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-14 20:29:45 +00:00
Lang Hames
8115e01f12 [ORC] Consolidate RTDyldObjectLinkingLayer GetMemMgr and GetResolver into a
unified GetResources callback.

Having a single 'GetResources' callback will simplify adding new resources in
the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325180 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-14 22:13:02 +00:00
Rafael Espindola
4fe1287be8 Update examples for API change. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325157 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-14 19:23:27 +00:00
Lang Hames
8c824db15a [ORC] Remove Layer handles from the layer concept.
Handles were returned by addModule and used as keys for removeModule,
findSymbolIn, and emitAndFinalize. Their job is now subsumed by VModuleKeys,
which simplify resource management by providing a consistent handle across all
layers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324700 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-09 02:30:40 +00:00
Lang Hames
9319f6d8dd Add OrcJIT dependency for Kaleidoscope Chapter 9.
This should fix the error at
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/10421

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324413 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 22:22:10 +00:00