diff options
| author | Lang Hames <lhames@gmail.com> | 2018-05-16 22:24:30 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2018-05-16 22:24:30 +0000 |
| commit | d261e1258c2d72911f278aa85298b4d6b5393731 (patch) | |
| tree | 80fa599b4f87270a9369f8f6b8ae18fa2b63d2c2 /llvm/examples | |
| parent | 2dc00a64a29a951961f88f00c2f222972b72ada6 (diff) | |
| download | bcm5719-llvm-d261e1258c2d72911f278aa85298b4d6b5393731.tar.gz bcm5719-llvm-d261e1258c2d72911f278aa85298b4d6b5393731.zip | |
[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.
llvm-svn: 332541
Diffstat (limited to 'llvm/examples')
6 files changed, 6 insertions, 0 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h index 902f5f0403a..0b8bb381d08 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h @@ -48,6 +48,7 @@ private: public: KaleidoscopeJIT() : Resolver(createLegacyLookupResolver( + ES, [this](const std::string &Name) -> JITSymbol { if (auto Sym = CompileLayer.findSymbol(Name, false)) return Sym; diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h index 4b7fd7f1c22..9ea84d1a858 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h @@ -58,6 +58,7 @@ private: public: KaleidoscopeJIT() : Resolver(createLegacyLookupResolver( + ES, [this](const std::string &Name) -> JITSymbol { if (auto Sym = OptimizeLayer.findSymbol(Name, false)) return Sym; diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h index 0dc1faef185..212dc1c42ff 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h @@ -98,6 +98,7 @@ public: // Build a resolver and associate it with the new key. Resolvers[K] = createLegacyLookupResolver( + ES, [this](const std::string &Name) -> JITSymbol { if (auto Sym = CompileLayer.findSymbol(Name, false)) return Sym; diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h index f0f016c8be1..dc8e936afd2 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h @@ -91,6 +91,7 @@ private: public: KaleidoscopeJIT() : Resolver(createLegacyLookupResolver( + ES, [this](const std::string &Name) -> JITSymbol { if (auto Sym = IndirectStubsMgr->findStub(Name, false)) return Sym; diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h index 1b503e40fa6..e86f3c3c633 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h @@ -97,6 +97,7 @@ private: public: KaleidoscopeJIT(MyRemote &Remote) : Resolver(createLegacyLookupResolver( + ES, [this](const std::string &Name) -> JITSymbol { if (auto Sym = IndirectStubsMgr->findStub(Name, false)) return Sym; diff --git a/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h index d2154887852..7239aea7ba1 100644 --- a/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h +++ b/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h @@ -45,6 +45,7 @@ public: KaleidoscopeJIT() : Resolver(createLegacyLookupResolver( + ES, [this](const std::string &Name) { return ObjectLayer.findSymbol(Name, true); }, |

