clang 24.0.0git
clang::OrcIncrementalExecutorBuilder Class Reference

Configuration for in-process and out-of-process ORC execution. More...

#include "clang/Interpreter/OrcIncrementalExecutorBuilder.h"

Inheritance diagram for clang::OrcIncrementalExecutorBuilder:
[legend]

Public Member Functions

 OrcIncrementalExecutorBuilder ()
 ~OrcIncrementalExecutorBuilder () override
llvm::Error configure (IncrementalCompilerBuilder &CB, const Options &Opts) override
 Apply execution options and configure the compiler for this backend.
bool supportsJIT () const override
 Probe whether this backend can JIT code for the host.
llvm::Expected< llvm::Triple > getHostJITTriple () const override
 Return the host triple used by this backend.
Public Member Functions inherited from clang::IncrementalExecutorBuilder
virtual ~IncrementalExecutorBuilder ()
llvm::Expected< std::unique_ptr< IncrementalExecutor > > create (llvm::orc::ThreadSafeContext &TSC, const clang::TargetInfo &TI)
 Return the supplied executor, or create one using the selected backend.

Public Attributes

bool IsOutOfProcess = false
 Indicates whether out-of-process JIT execution is enabled.
std::string OOPExecutor = ""
 Path to the out-of-process JIT executor.
std::string OOPExecutorConnect = ""
bool UseSharedMemory = false
 Indicates whether to use shared memory for communication.
unsigned SlabAllocateSize = 0
 Representing the slab allocation size for memory management in kb.
std::string OrcRuntimePath = ""
 Path to the ORC runtime library.
uint32_t ExecutorPID = 0
 PID of the out-of-process JIT executor.
std::function< void()> CustomizeFork = nullptr
 Custom lambda to be executed inside child process/executor.
std::optional< llvm::CodeModel::Model > CM = std::nullopt
 An optional code model to provide to the JITTargetMachineBuilder.
std::unique_ptr< llvm::orc::LLJITBuilder > JITBuilder
 An optional external ORC JIT builder.
std::function< llvm::Error(const driver::Compilation &)> UpdateOrcRuntimePathCB
 A default callback that can be used in the IncrementalCompilerBuilder to retrieve the path to the orc runtime.
Public Attributes inherited from clang::IncrementalExecutorBuilder
std::unique_ptr< IncrementalExecutor > IE
 An optional external IncrementalExecutor.
std::vector< std::string > LLVMArgs
 Frontend -mllvm arguments for backends that need to restore LLVM options.

Additional Inherited Members

Static Public Member Functions inherited from clang::IncrementalExecutorBuilder
static std::unique_ptr< IncrementalExecutorBuilder > createDefault ()
 Create the default builder for the platform clangInterpreter is built for.

Detailed Description

Configuration for in-process and out-of-process ORC execution.

Definition at line 33 of file OrcIncrementalExecutorBuilder.h.

Constructor & Destructor Documentation

◆ OrcIncrementalExecutorBuilder()

clang::OrcIncrementalExecutorBuilder::OrcIncrementalExecutorBuilder ( )
default

◆ ~OrcIncrementalExecutorBuilder()

clang::OrcIncrementalExecutorBuilder::~OrcIncrementalExecutorBuilder ( )
overridedefault

References clang::C.

Member Function Documentation

◆ configure()

◆ getHostJITTriple()

llvm::Expected< llvm::Triple > clang::OrcIncrementalExecutorBuilder::getHostJITTriple ( ) const
overridevirtual

Return the host triple used by this backend.

Implements clang::IncrementalExecutorBuilder.

Definition at line 116 of file OrcIncrementalExecutorBuilder.cpp.

Referenced by supportsJIT().

◆ supportsJIT()

bool clang::OrcIncrementalExecutorBuilder::supportsJIT ( ) const
overridevirtual

Probe whether this backend can JIT code for the host.

Implements clang::IncrementalExecutorBuilder.

Definition at line 106 of file OrcIncrementalExecutorBuilder.cpp.

References getHostJITTriple().

Member Data Documentation

◆ CM

std::optional<llvm::CodeModel::Model> clang::OrcIncrementalExecutorBuilder::CM = std::nullopt

An optional code model to provide to the JITTargetMachineBuilder.

Definition at line 51 of file OrcIncrementalExecutorBuilder.h.

◆ CustomizeFork

std::function<void()> clang::OrcIncrementalExecutorBuilder::CustomizeFork = nullptr

Custom lambda to be executed inside child process/executor.

Definition at line 49 of file OrcIncrementalExecutorBuilder.h.

Referenced by clang::outOfProcessJITBuilder().

◆ ExecutorPID

uint32_t clang::OrcIncrementalExecutorBuilder::ExecutorPID = 0

PID of the out-of-process JIT executor.

Definition at line 47 of file OrcIncrementalExecutorBuilder.h.

◆ IsOutOfProcess

bool clang::OrcIncrementalExecutorBuilder::IsOutOfProcess = false

Indicates whether out-of-process JIT execution is enabled.

Definition at line 36 of file OrcIncrementalExecutorBuilder.h.

Referenced by configure().

◆ JITBuilder

std::unique_ptr<llvm::orc::LLJITBuilder> clang::OrcIncrementalExecutorBuilder::JITBuilder

An optional external ORC JIT builder.

Definition at line 53 of file OrcIncrementalExecutorBuilder.h.

◆ OOPExecutor

std::string clang::OrcIncrementalExecutorBuilder::OOPExecutor = ""

Path to the out-of-process JIT executor.

Definition at line 38 of file OrcIncrementalExecutorBuilder.h.

Referenced by configure(), and clang::outOfProcessJITBuilder().

◆ OOPExecutorConnect

std::string clang::OrcIncrementalExecutorBuilder::OOPExecutorConnect = ""

Definition at line 39 of file OrcIncrementalExecutorBuilder.h.

Referenced by clang::outOfProcessJITBuilder().

◆ OrcRuntimePath

std::string clang::OrcIncrementalExecutorBuilder::OrcRuntimePath = ""

Path to the ORC runtime library.

Definition at line 45 of file OrcIncrementalExecutorBuilder.h.

Referenced by configure(), and clang::outOfProcessJITBuilder().

◆ SlabAllocateSize

unsigned clang::OrcIncrementalExecutorBuilder::SlabAllocateSize = 0

Representing the slab allocation size for memory management in kb.

Definition at line 43 of file OrcIncrementalExecutorBuilder.h.

Referenced by configure(), and clang::outOfProcessJITBuilder().

◆ UpdateOrcRuntimePathCB

std::function<llvm::Error(const driver::Compilation &)> clang::OrcIncrementalExecutorBuilder::UpdateOrcRuntimePathCB
Initial value:
= [this](const driver::Compilation &C) {
return UpdateOrcRuntimePath(C);
}
Compilation - A set of tasks to perform for a single driver invocation.
Definition Compilation.h:46

A default callback that can be used in the IncrementalCompilerBuilder to retrieve the path to the orc runtime.

Definition at line 57 of file OrcIncrementalExecutorBuilder.h.

Referenced by configure().

◆ UseSharedMemory

bool clang::OrcIncrementalExecutorBuilder::UseSharedMemory = false

Indicates whether to use shared memory for communication.

Definition at line 41 of file OrcIncrementalExecutorBuilder.h.

Referenced by configure(), and clang::outOfProcessJITBuilder().


The documentation for this class was generated from the following files: