LLVM 19.0.0git
Public Member Functions | Protected Member Functions | List of all members
llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State > Class Template Reference

#include "llvm/ExecutionEngine/Orc/LLJIT.h"

Inheritance diagram for llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >:
Inheritance graph
[legend]

Public Member Functions

SetterImpl & setExecutorProcessControl (std::unique_ptr< ExecutorProcessControl > EPC)
 Set a ExecutorProcessControl for this instance.
 
SetterImpl & setExecutionSession (std::unique_ptr< ExecutionSession > ES)
 Set an ExecutionSession for this instance.
 
SetterImpl & setJITTargetMachineBuilder (JITTargetMachineBuilder JTMB)
 Set the JITTargetMachineBuilder for this instance.
 
std::optional< JITTargetMachineBuilder > & getJITTargetMachineBuilder ()
 Return a reference to the JITTargetMachineBuilder.
 
SetterImpl & setDataLayout (std::optional< DataLayout > DL)
 Set a DataLayout for this instance.
 
SetterImpl & setLinkProcessSymbolsByDefault (bool LinkProcessSymbolsByDefault)
 The LinkProcessSymbolsDyDefault flag determines whether the "Process" JITDylib will be added to the default link order at LLJIT construction time.
 
SetterImpl & setProcessSymbolsJITDylibSetup (LLJITBuilderState::ProcessSymbolsJITDylibSetupFunction SetupProcessSymbolsJITDylib)
 Set a setup function for the process symbols dylib.
 
SetterImpl & setObjectLinkingLayerCreator (LLJITBuilderState::ObjectLinkingLayerCreator CreateObjectLinkingLayer)
 Set an ObjectLinkingLayer creation function.
 
SetterImpl & setCompileFunctionCreator (LLJITBuilderState::CompileFunctionCreator CreateCompileFunction)
 Set a CompileFunctionCreator.
 
SetterImpl & setPrePlatformSetup (unique_function< Error(LLJIT &)> PrePlatformSetup)
 Set a setup function to be run just before the PlatformSetupFunction is run.
 
SetterImpl & setPlatformSetUp (LLJITBuilderState::PlatformSetupFunction SetUpPlatform)
 Set up an PlatformSetupFunction.
 
SetterImpl & setNotifyCreatedCallback (LLJITBuilderState::NotifyCreatedFunction Callback)
 Set up a callback after successful construction of the JIT.
 
SetterImpl & setNumCompileThreads (unsigned NumCompileThreads)
 Set the number of compile threads to use.
 
SetterImpl & setExecutorProcessControl (ExecutorProcessControl &EPC)
 Set an ExecutorProcessControl object.
 
Expected< std::unique_ptr< JITType > > create ()
 Create an instance of the JIT.
 

Protected Member Functions

SetterImpl & impl ()
 

Detailed Description

template<typename JITType, typename SetterImpl, typename State>
class llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >

Definition at line 334 of file LLJIT.h.

Member Function Documentation

◆ create()

template<typename JITType , typename SetterImpl , typename State >
Expected< std::unique_ptr< JITType > > llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::create ( )
inline

Create an instance of the JIT.

Definition at line 482 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl(), and llvm::Error::success().

◆ getJITTargetMachineBuilder()

template<typename JITType , typename SetterImpl , typename State >
std::optional< JITTargetMachineBuilder > & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::getJITTargetMachineBuilder ( )
inline

Return a reference to the JITTargetMachineBuilder.

Definition at line 369 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ impl()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl ( )
inlineprotected

Definition at line 499 of file LLJIT.h.

Referenced by llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::create(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::getJITTargetMachineBuilder(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setCompileFunctionCreator(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setDataLayout(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setExecutionSession(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setExecutorProcessControl(), llvm::orc::LLLazyJITBuilderSetters< JITType, SetterImpl, State >::setIndirectStubsManagerBuilder(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setJITTargetMachineBuilder(), llvm::orc::LLLazyJITBuilderSetters< JITType, SetterImpl, State >::setLazyCallthroughManager(), llvm::orc::LLLazyJITBuilderSetters< JITType, SetterImpl, State >::setLazyCompileFailureAddr(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setLinkProcessSymbolsByDefault(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setNotifyCreatedCallback(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setNumCompileThreads(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setObjectLinkingLayerCreator(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setPlatformSetUp(), llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setPrePlatformSetup(), and llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setProcessSymbolsJITDylibSetup().

◆ setCompileFunctionCreator()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setCompileFunctionCreator ( LLJITBuilderState::CompileFunctionCreator  CreateCompileFunction)
inline

Set a CompileFunctionCreator.

If this method is not called, a default creation function wil be used that will construct a basic IR compile function that is compatible with the selected number of threads (SimpleCompiler for '0' compile threads, ConcurrentIRCompiler otherwise).

Definition at line 418 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setDataLayout()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setDataLayout ( std::optional< DataLayout DL)
inline

Set a DataLayout for this instance.

If no data layout is specified then the target's default data layout will be used.

Definition at line 375 of file LLJIT.h.

References DL, and llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setExecutionSession()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setExecutionSession ( std::unique_ptr< ExecutionSession ES)
inline

Set an ExecutionSession for this instance.

Definition at line 349 of file LLJIT.h.

References assert(), and llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setExecutorProcessControl() [1/2]

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setExecutorProcessControl ( ExecutorProcessControl EPC)
inline

Set an ExecutorProcessControl object.

If the platform uses ObjectLinkingLayer by default and no ObjectLinkingLayerCreator has been set then the ExecutorProcessControl object will be used to supply the memory manager for the ObjectLinkingLayer.

Definition at line 476 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setExecutorProcessControl() [2/2]

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setExecutorProcessControl ( std::unique_ptr< ExecutorProcessControl EPC)
inline

Set a ExecutorProcessControl for this instance.

This should not be called if ExecutionSession has already been set.

Definition at line 339 of file LLJIT.h.

References assert(), and llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setJITTargetMachineBuilder()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setJITTargetMachineBuilder ( JITTargetMachineBuilder  JTMB)
inline

Set the JITTargetMachineBuilder for this instance.

If this method is not called, JITTargetMachineBuilder::detectHost will be used to construct a default target machine builder for the host platform.

Definition at line 362 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setLinkProcessSymbolsByDefault()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setLinkProcessSymbolsByDefault ( bool  LinkProcessSymbolsByDefault)
inline

The LinkProcessSymbolsDyDefault flag determines whether the "Process" JITDylib will be added to the default link order at LLJIT construction time.

If true, the Process JITDylib will be added as the last item in the default link order. If false (or if the Process JITDylib is disabled via setProcessSymbolsJITDylibSetup) then the Process JITDylib will not appear in the default link order.

Definition at line 386 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setNotifyCreatedCallback()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setNotifyCreatedCallback ( LLJITBuilderState::NotifyCreatedFunction  Callback)
inline

Set up a callback after successful construction of the JIT.

This is useful to attach generators to JITDylibs or inject initial symbol definitions.

Definition at line 452 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setNumCompileThreads()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setNumCompileThreads ( unsigned  NumCompileThreads)
inline

Set the number of compile threads to use.

If set to zero, compilation will be performed on the execution thread when JITing in-process. If set to any other number N, a thread pool of N threads will be created for compilation.

If this method is not called, behavior will be as if it were called with a zero argument.

Definition at line 465 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setObjectLinkingLayerCreator()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setObjectLinkingLayerCreator ( LLJITBuilderState::ObjectLinkingLayerCreator  CreateObjectLinkingLayer)
inline

Set an ObjectLinkingLayer creation function.

If this method is not called, a default creation function will be used that will construct an RTDyldObjectLinkingLayer.

Definition at line 406 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setPlatformSetUp()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setPlatformSetUp ( LLJITBuilderState::PlatformSetupFunction  SetUpPlatform)
inline

Set up an PlatformSetupFunction.

If this method is not called then setUpGenericLLVMIRPlatform will be used to configure the JIT's platform support.

Definition at line 442 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setPrePlatformSetup()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setPrePlatformSetup ( unique_function< Error(LLJIT &)>  PrePlatformSetup)
inline

Set a setup function to be run just before the PlatformSetupFunction is run.

This can be used to customize the LLJIT instance before the platform is set up. E.g. By installing a debugger support plugin before the platform is set up (when the ORC runtime is loaded) we enable debugging of the runtime itself.

Definition at line 432 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().

◆ setProcessSymbolsJITDylibSetup()

template<typename JITType , typename SetterImpl , typename State >
SetterImpl & llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::setProcessSymbolsJITDylibSetup ( LLJITBuilderState::ProcessSymbolsJITDylibSetupFunction  SetupProcessSymbolsJITDylib)
inline

Set a setup function for the process symbols dylib.

If not provided, but LinkProcessSymbolsJITDylibByDefault is true, then the process-symbols JITDylib will be configured with a DynamicLibrarySearchGenerator with a default symbol filter.

Definition at line 395 of file LLJIT.h.

References llvm::orc::LLJITBuilderSetters< JITType, SetterImpl, State >::impl().


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