From 9f342d90382fce7473087f61491db21c81bede0a Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 15 Oct 2018 22:36:22 +0000 Subject: [PATCH] [ORC] Rename MultiThreadedSimpleCompiler to ConcurrentIRCompiler. The new name is a better fit: This class does not actually spawn any new threads for compilation, it is just safe to call from multiple threads concurrently. The "Simple" part of the name did not convey much either, so it was dropped. llvm-svn: 344567 --- llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h | 8 ++++---- llvm/lib/ExecutionEngine/Orc/LLJIT.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h index 3d02f9d0..f34f883 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h @@ -38,7 +38,7 @@ namespace orc { /// Simple compile functor: Takes a single IR module and returns an ObjectFile. /// This compiler supports a single compilation thread and LLVMContext only. -/// For multithreaded compilation, use MultiThreadedSimpleCompiler below. +/// For multithreaded compilation, use ConcurrentIRCompiler below. class SimpleCompiler { public: using CompileResult = std::unique_ptr; @@ -105,10 +105,10 @@ private: /// /// This class creates a new TargetMachine and SimpleCompiler instance for each /// compile. -class MultiThreadedSimpleCompiler { +class ConcurrentIRCompiler { public: - MultiThreadedSimpleCompiler(JITTargetMachineBuilder JTMB, - ObjectCache *ObjCache = nullptr) + ConcurrentIRCompiler(JITTargetMachineBuilder JTMB, + ObjectCache *ObjCache = nullptr) : JTMB(std::move(JTMB)), ObjCache(ObjCache) {} void setObjectCache(ObjectCache *ObjCache) { this->ObjCache = ObjCache; } diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp index 39bb4c4..478ac2e 100644 --- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp +++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp @@ -96,7 +96,7 @@ LLJIT::LLJIT(std::unique_ptr ES, JITTargetMachineBuilder JTMB, ObjLinkingLayer(*this->ES, [this](VModuleKey K) { return getMemoryManager(K); }), CompileLayer(*this->ES, ObjLinkingLayer, - MultiThreadedSimpleCompiler(std::move(JTMB))), + ConcurrentIRCompiler(std::move(JTMB))), CtorRunner(Main), DtorRunner(Main) { assert(NumCompileThreads != 0 && "Multithreaded LLJIT instance can not be created with 0 threads"); -- 2.7.4