/// 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<MemoryBuffer>;
///
/// 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; }
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");