diff options
Diffstat (limited to 'llvm/lib')
10 files changed, 44 insertions, 44 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp b/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp index ae1c7e84259..f27a814f33f 100644 --- a/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp @@ -68,13 +68,13 @@ namespace orc { class PartitioningIRMaterializationUnit : public IRMaterializationUnit { public: PartitioningIRMaterializationUnit(ExecutionSession &ES, ThreadSafeModule TSM, - CompileOnDemandLayer2 &Parent) + CompileOnDemandLayer &Parent) : IRMaterializationUnit(ES, std::move(TSM)), Parent(Parent) {} PartitioningIRMaterializationUnit( ThreadSafeModule TSM, SymbolFlagsMap SymbolFlags, SymbolNameToDefinitionMap SymbolToDefinition, - CompileOnDemandLayer2 &Parent) + CompileOnDemandLayer &Parent) : IRMaterializationUnit(std::move(TSM), std::move(SymbolFlags), std::move(SymbolToDefinition)), Parent(Parent) {} @@ -93,30 +93,30 @@ private: } mutable std::mutex SourceModuleMutex; - CompileOnDemandLayer2 &Parent; + CompileOnDemandLayer &Parent; }; -Optional<CompileOnDemandLayer2::GlobalValueSet> -CompileOnDemandLayer2::compileRequested(GlobalValueSet Requested) { +Optional<CompileOnDemandLayer::GlobalValueSet> +CompileOnDemandLayer::compileRequested(GlobalValueSet Requested) { return std::move(Requested); } -Optional<CompileOnDemandLayer2::GlobalValueSet> -CompileOnDemandLayer2::compileWholeModule(GlobalValueSet Requested) { +Optional<CompileOnDemandLayer::GlobalValueSet> +CompileOnDemandLayer::compileWholeModule(GlobalValueSet Requested) { return None; } -CompileOnDemandLayer2::CompileOnDemandLayer2( +CompileOnDemandLayer::CompileOnDemandLayer( ExecutionSession &ES, IRLayer &BaseLayer, LazyCallThroughManager &LCTMgr, IndirectStubsManagerBuilder BuildIndirectStubsManager) : IRLayer(ES), BaseLayer(BaseLayer), LCTMgr(LCTMgr), BuildIndirectStubsManager(std::move(BuildIndirectStubsManager)) {} -void CompileOnDemandLayer2::setPartitionFunction(PartitionFunction Partition) { +void CompileOnDemandLayer::setPartitionFunction(PartitionFunction Partition) { this->Partition = std::move(Partition); } -void CompileOnDemandLayer2::emit(MaterializationResponsibility R, VModuleKey K, +void CompileOnDemandLayer::emit(MaterializationResponsibility R, VModuleKey K, ThreadSafeModule TSM) { assert(TSM.getModule() && "Null module"); @@ -160,8 +160,8 @@ void CompileOnDemandLayer2::emit(MaterializationResponsibility R, VModuleKey K, std::move(Callables))); } -CompileOnDemandLayer2::PerDylibResources & -CompileOnDemandLayer2::getPerDylibResources(JITDylib &TargetD) { +CompileOnDemandLayer::PerDylibResources & +CompileOnDemandLayer::getPerDylibResources(JITDylib &TargetD) { auto I = DylibResources.find(&TargetD); if (I == DylibResources.end()) { auto &ImplD = @@ -176,7 +176,7 @@ CompileOnDemandLayer2::getPerDylibResources(JITDylib &TargetD) { return I->second; } -void CompileOnDemandLayer2::cleanUpModule(Module &M) { +void CompileOnDemandLayer::cleanUpModule(Module &M) { for (auto &F : M.functions()) { if (F.isDeclaration()) continue; @@ -189,7 +189,7 @@ void CompileOnDemandLayer2::cleanUpModule(Module &M) { } } -void CompileOnDemandLayer2::expandPartition(GlobalValueSet &Partition) { +void CompileOnDemandLayer::expandPartition(GlobalValueSet &Partition) { // Expands the partition to ensure the following rules hold: // (1) If any alias is in the partition, its aliasee is also in the partition. // (2) If any aliasee is in the partition, its aliases are also in the @@ -221,7 +221,7 @@ void CompileOnDemandLayer2::expandPartition(GlobalValueSet &Partition) { Partition.insert(GV); } -void CompileOnDemandLayer2::emitPartition( +void CompileOnDemandLayer::emitPartition( MaterializationResponsibility R, ThreadSafeModule TSM, IRMaterializationUnit::SymbolNameToDefinitionMap Defs) { diff --git a/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp index 4c8f725df54..21a604f71ca 100644 --- a/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp @@ -87,7 +87,7 @@ iterator_range<CtorDtorIterator> getDestructors(const Module &M) { CtorDtorIterator(DtorsList, true)); } -void CtorDtorRunner2::add(iterator_range<CtorDtorIterator> CtorDtors) { +void CtorDtorRunner::add(iterator_range<CtorDtorIterator> CtorDtors) { if (CtorDtors.begin() == CtorDtors.end()) return; @@ -115,7 +115,7 @@ void CtorDtorRunner2::add(iterator_range<CtorDtorIterator> CtorDtors) { } } -Error CtorDtorRunner2::run() { +Error CtorDtorRunner::run() { using CtorDtorTy = void (*)(); SymbolNameSet Names; @@ -165,7 +165,7 @@ int LocalCXXRuntimeOverridesBase::CXAAtExitOverride(DestructorPtr Destructor, return 0; } -Error LocalCXXRuntimeOverrides2::enable(JITDylib &JD, +Error LocalCXXRuntimeOverrides::enable(JITDylib &JD, MangleAndInterner &Mangle) { SymbolMap RuntimeInterposes; RuntimeInterposes[Mangle("__dso_handle")] = diff --git a/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp b/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp index 5dee1c80e0b..6d029e16ba9 100644 --- a/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp @@ -12,16 +12,16 @@ namespace llvm { namespace orc { -IRCompileLayer2::IRCompileLayer2(ExecutionSession &ES, ObjectLayer &BaseLayer, +IRCompileLayer::IRCompileLayer(ExecutionSession &ES, ObjectLayer &BaseLayer, CompileFunction Compile) : IRLayer(ES), BaseLayer(BaseLayer), Compile(std::move(Compile)) {} -void IRCompileLayer2::setNotifyCompiled(NotifyCompiledFunction NotifyCompiled) { +void IRCompileLayer::setNotifyCompiled(NotifyCompiledFunction NotifyCompiled) { std::lock_guard<std::mutex> Lock(IRLayerMutex); this->NotifyCompiled = std::move(NotifyCompiled); } -void IRCompileLayer2::emit(MaterializationResponsibility R, VModuleKey K, +void IRCompileLayer::emit(MaterializationResponsibility R, VModuleKey K, ThreadSafeModule TSM) { assert(TSM.getModule() && "Module must not be null"); diff --git a/llvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp b/llvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp index 7a79a382d8d..acba7916d40 100644 --- a/llvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp @@ -13,12 +13,12 @@ namespace llvm { namespace orc { -IRTransformLayer2::IRTransformLayer2(ExecutionSession &ES, +IRTransformLayer::IRTransformLayer(ExecutionSession &ES, IRLayer &BaseLayer, TransformFunction Transform) : IRLayer(ES), BaseLayer(BaseLayer), Transform(std::move(Transform)) {} -void IRTransformLayer2::emit(MaterializationResponsibility R, VModuleKey K, +void IRTransformLayer::emit(MaterializationResponsibility R, VModuleKey K, ThreadSafeModule TSM) { assert(TSM.getModule() && "Module must not be null"); diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp index 478ac2e2148..e464da267ae 100644 --- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp +++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp @@ -21,7 +21,7 @@ namespace { : llvm::orc::SimpleCompiler(*TM), TM(std::move(TM)) {} private: // FIXME: shared because std::functions (and thus - // IRCompileLayer2::CompileFunction) are not moveable. + // IRCompileLayer::CompileFunction) are not moveable. std::shared_ptr<llvm::TargetMachine> TM; }; diff --git a/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp b/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp index 6980c8140fd..0be23f2e1a4 100644 --- a/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp @@ -13,13 +13,13 @@ namespace llvm { namespace orc { -ObjectTransformLayer2::ObjectTransformLayer2(ExecutionSession &ES, - ObjectLayer &BaseLayer, - TransformFunction Transform) +ObjectTransformLayer::ObjectTransformLayer(ExecutionSession &ES, + ObjectLayer &BaseLayer, + TransformFunction Transform) : ObjectLayer(ES), BaseLayer(BaseLayer), Transform(std::move(Transform)) {} -void ObjectTransformLayer2::emit(MaterializationResponsibility R, VModuleKey K, - std::unique_ptr<MemoryBuffer> O) { +void ObjectTransformLayer::emit(MaterializationResponsibility R, VModuleKey K, + std::unique_ptr<MemoryBuffer> O) { assert(O && "Module must not be null"); if (auto TransformedObj = Transform(std::move(O))) diff --git a/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h b/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h index 3fedba1caa6..deddfcb10e1 100644 --- a/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h +++ b/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h @@ -77,9 +77,9 @@ public: }; template <> - class GenericLayerImpl<orc::RTDyldObjectLinkingLayer> : public GenericLayer { + class GenericLayerImpl<orc::LegacyRTDyldObjectLinkingLayer> : public GenericLayer { private: - using LayerT = orc::RTDyldObjectLinkingLayer; + using LayerT = orc::LegacyRTDyldObjectLinkingLayer; public: GenericLayerImpl(LayerT &Layer) : Layer(Layer) {} @@ -107,10 +107,10 @@ class OrcCBindingsStack { public: using CompileCallbackMgr = orc::JITCompileCallbackManager; - using ObjLayerT = orc::RTDyldObjectLinkingLayer; - using CompileLayerT = orc::IRCompileLayer<ObjLayerT, orc::SimpleCompiler>; + using ObjLayerT = orc::LegacyRTDyldObjectLinkingLayer; + using CompileLayerT = orc::LegacyIRCompileLayer<ObjLayerT, orc::SimpleCompiler>; using CODLayerT = - orc::CompileOnDemandLayer<CompileLayerT, CompileCallbackMgr>; + orc::LegacyCompileOnDemandLayer<CompileLayerT, CompileCallbackMgr>; using CallbackManagerBuilder = std::function<std::unique_ptr<CompileCallbackMgr>()>; @@ -312,7 +312,7 @@ public: // Run the static constructors, and save the static destructor runner for // execution when the JIT is torn down. - orc::CtorDtorRunner<OrcCBindingsStack> CtorRunner(std::move(CtorNames), K); + orc::LegacyCtorDtorRunner<OrcCBindingsStack> CtorRunner(std::move(CtorNames), K); if (auto Err = CtorRunner.runViaLayer(*this)) return std::move(Err); @@ -517,8 +517,8 @@ private: std::map<orc::VModuleKey, std::unique_ptr<detail::GenericLayer>> KeyLayers; - orc::LocalCXXRuntimeOverrides CXXRuntimeOverrides; - std::vector<orc::CtorDtorRunner<OrcCBindingsStack>> IRStaticDestructorRunners; + orc::LegacyLocalCXXRuntimeOverrides CXXRuntimeOverrides; + std::vector<orc::LegacyCtorDtorRunner<OrcCBindingsStack>> IRStaticDestructorRunners; std::string ErrMsg; ResolverMap Resolvers; diff --git a/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp b/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp index 4def579e709..617bc2fc64b 100644 --- a/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp +++ b/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp @@ -128,7 +128,7 @@ void OrcMCJITReplacement::runStaticConstructorsDestructors(bool isDtors) { auto &CtorDtorsMap = isDtors ? UnexecutedDestructors : UnexecutedConstructors; for (auto &KV : CtorDtorsMap) - cantFail(CtorDtorRunner<LazyEmitLayerT>(std::move(KV.second), KV.first) + cantFail(LegacyCtorDtorRunner<LazyEmitLayerT>(std::move(KV.second), KV.first) .runViaLayer(LazyEmitLayer)); CtorDtorsMap.clear(); diff --git a/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h b/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h index 1195d39561d..36e7e83a8ba 100644 --- a/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h +++ b/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h @@ -461,8 +461,8 @@ private: return MangledName; } - using ObjectLayerT = RTDyldObjectLinkingLayer; - using CompileLayerT = IRCompileLayer<ObjectLayerT, orc::SimpleCompiler>; + using ObjectLayerT = LegacyRTDyldObjectLinkingLayer; + using CompileLayerT = LegacyIRCompileLayer<ObjectLayerT, orc::SimpleCompiler>; using LazyEmitLayerT = LazyEmittingLayer<CompileLayerT>; ExecutionSession ES; diff --git a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp index e84295ca215..fa574140d48 100644 --- a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp @@ -76,14 +76,14 @@ private: namespace llvm { namespace orc { -RTDyldObjectLinkingLayer2::RTDyldObjectLinkingLayer2( +RTDyldObjectLinkingLayer::RTDyldObjectLinkingLayer( ExecutionSession &ES, GetMemoryManagerFunction GetMemoryManager, NotifyLoadedFunction NotifyLoaded, NotifyEmittedFunction NotifyEmitted) : ObjectLayer(ES), GetMemoryManager(GetMemoryManager), NotifyLoaded(std::move(NotifyLoaded)), NotifyEmitted(std::move(NotifyEmitted)) {} -void RTDyldObjectLinkingLayer2::emit(MaterializationResponsibility R, +void RTDyldObjectLinkingLayer::emit(MaterializationResponsibility R, VModuleKey K, std::unique_ptr<MemoryBuffer> O) { assert(O && "Object must not be null"); @@ -153,7 +153,7 @@ void RTDyldObjectLinkingLayer2::emit(MaterializationResponsibility R, }); } -Error RTDyldObjectLinkingLayer2::onObjLoad( +Error RTDyldObjectLinkingLayer::onObjLoad( VModuleKey K, MaterializationResponsibility &R, object::ObjectFile &Obj, std::unique_ptr<RuntimeDyld::LoadedObjectInfo> LoadedObjInfo, std::map<StringRef, JITEvaluatedSymbol> Resolved, @@ -196,7 +196,7 @@ Error RTDyldObjectLinkingLayer2::onObjLoad( return Error::success(); } -void RTDyldObjectLinkingLayer2::onObjEmit(VModuleKey K, +void RTDyldObjectLinkingLayer::onObjEmit(VModuleKey K, MaterializationResponsibility &R, Error Err) { if (Err) { |