llvm-project/llvm/examples/Kaleidoscope
Lang Hames 4b546c9145 [ORC] Start migrating ORC layers to use the new ORC Core.h APIs.
In particular this patch switches RTDyldObjectLinkingLayer to use
orc::SymbolResolver and threads the requried changse (ExecutionSession
references and VModuleKeys) through the existing layer APIs.

The purpose of the new resolver interface is to improve query performance and
better support parallelism, both in JIT'd code and within the compiler itself.

The most visibile change is switch of the <Layer>::addModule signatures from:

Expected<Handle> addModule(std::shared_ptr<ModuleType> Mod,
                           std::shared_ptr<JITSymbolResolver> Resolver)

to:

Expected<Handle> addModule(VModuleKey K, std::shared_ptr<ModuleType> Mod);

Typical usage of addModule will now look like:

auto K = ES.allocateVModuleKey();
Resolvers[K] = createSymbolResolver(...);
Layer.addModule(K, std::move(Mod));

See the BuildingAJIT tutorial code for example usage.

llvm-svn: 324405
2018-02-06 21:25:11 +00:00
..
BuildingAJIT [ORC] Start migrating ORC layers to use the new ORC Core.h APIs. 2018-02-06 21:25:11 +00:00
Chapter2 Update Kaleidoscope tutorial and improve Windows support 2017-02-11 21:26:52 +00:00
Chapter3 Use print() instead of dump() in code 2017-01-28 02:47:46 +00:00
Chapter4 [ORC] Start migrating ORC layers to use the new ORC Core.h APIs. 2018-02-06 21:25:11 +00:00
Chapter5 [ORC] Start migrating ORC layers to use the new ORC Core.h APIs. 2018-02-06 21:25:11 +00:00
Chapter6 [ORC] Start migrating ORC layers to use the new ORC Core.h APIs. 2018-02-06 21:25:11 +00:00
Chapter7 [ORC] Start migrating ORC layers to use the new ORC Core.h APIs. 2018-02-06 21:25:11 +00:00
Chapter8 [Kaleidoscope] toy.cpp use after move fix 2017-05-07 11:00:01 +00:00
Chapter9 PR35705: Fix Chapter 9 example code for API changes to DIBuilder 2017-12-20 19:36:54 +00:00
MCJIT Use print() instead of dump() in code 2017-01-28 02:47:46 +00:00
include [ORC] Start migrating ORC layers to use the new ORC Core.h APIs. 2018-02-06 21:25:11 +00:00
CMakeLists.txt PR35705: Fix Chapter 9 example code for API changes to DIBuilder 2017-12-20 19:36:54 +00:00