LLVM  15.0.0git
Typedefs | Functions
Collaboration diagram for LLJIT:

Typedefs

typedef LLVMOrcObjectLayerRef(* LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction) (void *Ctx, LLVMOrcExecutionSessionRef ES, const char *Triple)
 A function for constructing an ObjectLinkingLayer instance to be used by an LLJIT instance. More...
 
typedef struct LLVMOrcOpaqueLLJITBuilder * LLVMOrcLLJITBuilderRef
 A reference to an orc::LLJITBuilder instance. More...
 
typedef struct LLVMOrcOpaqueLLJIT * LLVMOrcLLJITRef
 A reference to an orc::LLJIT instance. More...
 

Functions

LLVMOrcLLJITBuilderRef LLVMOrcCreateLLJITBuilder (void)
 Create an LLVMOrcLLJITBuilder. More...
 
void LLVMOrcDisposeLLJITBuilder (LLVMOrcLLJITBuilderRef Builder)
 Dispose of an LLVMOrcLLJITBuilderRef. More...
 
void LLVMOrcLLJITBuilderSetJITTargetMachineBuilder (LLVMOrcLLJITBuilderRef Builder, LLVMOrcJITTargetMachineBuilderRef JTMB)
 Set the JITTargetMachineBuilder to be used when constructing the LLJIT instance. More...
 
void LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator (LLVMOrcLLJITBuilderRef Builder, LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction F, void *Ctx)
 Set an ObjectLinkingLayer creator function for this LLJIT instance. More...
 
LLVMErrorRef LLVMOrcCreateLLJIT (LLVMOrcLLJITRef *Result, LLVMOrcLLJITBuilderRef Builder)
 Create an LLJIT instance from an LLJITBuilder. More...
 
LLVMErrorRef LLVMOrcDisposeLLJIT (LLVMOrcLLJITRef J)
 Dispose of an LLJIT instance. More...
 
LLVMOrcExecutionSessionRef LLVMOrcLLJITGetExecutionSession (LLVMOrcLLJITRef J)
 Get a reference to the ExecutionSession for this LLJIT instance. More...
 
LLVMOrcJITDylibRef LLVMOrcLLJITGetMainJITDylib (LLVMOrcLLJITRef J)
 Return a reference to the Main JITDylib. More...
 
const char * LLVMOrcLLJITGetTripleString (LLVMOrcLLJITRef J)
 Return the target triple for this LLJIT instance. More...
 
char LLVMOrcLLJITGetGlobalPrefix (LLVMOrcLLJITRef J)
 Returns the global prefix character according to the LLJIT's DataLayout. More...
 
LLVMOrcSymbolStringPoolEntryRef LLVMOrcLLJITMangleAndIntern (LLVMOrcLLJITRef J, const char *UnmangledName)
 Mangles the given string according to the LLJIT instance's DataLayout, then interns the result in the SymbolStringPool and returns a reference to the pool entry. More...
 
LLVMErrorRef LLVMOrcLLJITAddObjectFile (LLVMOrcLLJITRef J, LLVMOrcJITDylibRef JD, LLVMMemoryBufferRef ObjBuffer)
 Add a buffer representing an object file to the given JITDylib in the given LLJIT instance. More...
 
LLVMErrorRef LLVMOrcLLJITAddObjectFileWithRT (LLVMOrcLLJITRef J, LLVMOrcResourceTrackerRef RT, LLVMMemoryBufferRef ObjBuffer)
 Add a buffer representing an object file to the given ResourceTracker's JITDylib in the given LLJIT instance. More...
 
LLVMErrorRef LLVMOrcLLJITAddLLVMIRModule (LLVMOrcLLJITRef J, LLVMOrcJITDylibRef JD, LLVMOrcThreadSafeModuleRef TSM)
 Add an IR module to the given JITDylib in the given LLJIT instance. More...
 
LLVMErrorRef LLVMOrcLLJITAddLLVMIRModuleWithRT (LLVMOrcLLJITRef J, LLVMOrcResourceTrackerRef JD, LLVMOrcThreadSafeModuleRef TSM)
 Add an IR module to the given ResourceTracker's JITDylib in the given LLJIT instance. More...
 
LLVMErrorRef LLVMOrcLLJITLookup (LLVMOrcLLJITRef J, LLVMOrcExecutorAddress *Result, const char *Name)
 Look up the given symbol in the main JITDylib of the given LLJIT instance. More...
 
LLVMOrcObjectLayerRef LLVMOrcLLJITGetObjLinkingLayer (LLVMOrcLLJITRef J)
 Returns a non-owning reference to the LLJIT instance's object linking layer. More...
 
LLVMOrcObjectTransformLayerRef LLVMOrcLLJITGetObjTransformLayer (LLVMOrcLLJITRef J)
 Returns a non-owning reference to the LLJIT instance's object linking layer. More...
 
LLVMOrcIRTransformLayerRef LLVMOrcLLJITGetIRTransformLayer (LLVMOrcLLJITRef J)
 Returns a non-owning reference to the LLJIT instance's IR transform layer. More...
 
const char * LLVMOrcLLJITGetDataLayoutStr (LLVMOrcLLJITRef J)
 Get the LLJIT instance's default data layout string. More...
 

Detailed Description

Typedef Documentation

◆ LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction

typedef LLVMOrcObjectLayerRef( * LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction) (void *Ctx, LLVMOrcExecutionSessionRef ES, const char *Triple)

A function for constructing an ObjectLinkingLayer instance to be used by an LLJIT instance.

Clients can call LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator to set the creator function to use when constructing an LLJIT instance. This can be used to override the default linking layer implementation that would otherwise be chosen by LLJITBuilder.

Object linking layers returned by this function will become owned by the LLJIT instance. The client is not responsible for managing their lifetimes after the function returns.

Definition at line 55 of file LLJIT.h.

◆ LLVMOrcLLJITBuilderRef

typedef struct LLVMOrcOpaqueLLJITBuilder* LLVMOrcLLJITBuilderRef

A reference to an orc::LLJITBuilder instance.

Definition at line 61 of file LLJIT.h.

◆ LLVMOrcLLJITRef

typedef struct LLVMOrcOpaqueLLJIT* LLVMOrcLLJITRef

A reference to an orc::LLJIT instance.

Definition at line 66 of file LLJIT.h.

Function Documentation

◆ LLVMOrcCreateLLJIT()

LLVMErrorRef LLVMOrcCreateLLJIT ( LLVMOrcLLJITRef Result,
LLVMOrcLLJITBuilderRef  Builder 
)

Create an LLJIT instance from an LLJITBuilder.

This operation takes ownership of the Builder argument: clients should not dispose of the builder after calling this function (even if the function returns an error). If a null Builder argument is provided then a default-constructed LLJITBuilder will be used.

On success the resulting LLJIT instance is uniquely owned by the client and automatically manages the memory of all JIT'd code and all modules that are transferred to it (e.g. via LLVMOrcLLJITAddLLVMIRModule). Disposing of the LLJIT instance will free all memory managed by the JIT, including JIT'd code and not-yet compiled modules.

Definition at line 962 of file OrcV2CBindings.cpp.

References assert(), Builder, LLVMErrorSuccess, LLVMOrcCreateLLJITBuilder(), LLVMOrcDisposeLLJITBuilder(), llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcCreateLLJITBuilder()

LLVMOrcLLJITBuilderRef LLVMOrcCreateLLJITBuilder ( void  )

Create an LLVMOrcLLJITBuilder.

The client owns the resulting LLJITBuilder and should dispose of it using LLVMOrcDisposeLLJITBuilder once they are done with it.

Definition at line 937 of file OrcV2CBindings.cpp.

References llvm::wrap().

Referenced by LLVMOrcCreateLLJIT().

◆ LLVMOrcDisposeLLJIT()

LLVMErrorRef LLVMOrcDisposeLLJIT ( LLVMOrcLLJITRef  J)

Dispose of an LLJIT instance.

Definition at line 981 of file OrcV2CBindings.cpp.

References LLVMErrorSuccess, and llvm::unwrap().

◆ LLVMOrcDisposeLLJITBuilder()

void LLVMOrcDisposeLLJITBuilder ( LLVMOrcLLJITBuilderRef  Builder)

Dispose of an LLVMOrcLLJITBuilderRef.

This should only be called if ownership has not been passed to LLVMOrcCreateLLJIT (e.g. because some error prevented that function from being called).

Definition at line 941 of file OrcV2CBindings.cpp.

References Builder, and llvm::unwrap().

Referenced by LLVMOrcCreateLLJIT().

◆ LLVMOrcLLJITAddLLVMIRModule()

LLVMErrorRef LLVMOrcLLJITAddLLVMIRModule ( LLVMOrcLLJITRef  J,
LLVMOrcJITDylibRef  JD,
LLVMOrcThreadSafeModuleRef  TSM 
)

Add an IR module to the given JITDylib in the given LLJIT instance.

This operation transfers ownership of the TSM argument to the LLJIT instance. The TSM argument should not be disposed of or referenced once this function returns.

Resources associated with the given Module will be tracked by the given JITDylib's default resource tracker.

Definition at line 1022 of file OrcV2CBindings.cpp.

References move, llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITAddLLVMIRModuleWithRT()

LLVMErrorRef LLVMOrcLLJITAddLLVMIRModuleWithRT ( LLVMOrcLLJITRef  J,
LLVMOrcResourceTrackerRef  JD,
LLVMOrcThreadSafeModuleRef  TSM 
)

Add an IR module to the given ResourceTracker's JITDylib in the given LLJIT instance.

This operation transfers ownership of the TSM argument to the LLJIT instance. The TSM argument should not be disposed of or referenced once this function returns.

Resources associated with the given Module will be tracked by ResourceTracker RT.

Definition at line 1029 of file OrcV2CBindings.cpp.

References move, llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITAddObjectFile()

LLVMErrorRef LLVMOrcLLJITAddObjectFile ( LLVMOrcLLJITRef  J,
LLVMOrcJITDylibRef  JD,
LLVMMemoryBufferRef  ObjBuffer 
)

Add a buffer representing an object file to the given JITDylib in the given LLJIT instance.

This operation transfers ownership of the buffer to the LLJIT instance. The buffer should not be disposed of or referenced once this function returns.

Resources associated with the given object will be tracked by the given JITDylib's default resource tracker.

Definition at line 1008 of file OrcV2CBindings.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITAddObjectFileWithRT()

LLVMErrorRef LLVMOrcLLJITAddObjectFileWithRT ( LLVMOrcLLJITRef  J,
LLVMOrcResourceTrackerRef  RT,
LLVMMemoryBufferRef  ObjBuffer 
)

Add a buffer representing an object file to the given ResourceTracker's JITDylib in the given LLJIT instance.

This operation transfers ownership of the buffer to the LLJIT instance. The buffer should not be disposed of or referenced once this function returns.

Resources associated with the given object will be tracked by ResourceTracker RT.

Definition at line 1014 of file OrcV2CBindings.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITBuilderSetJITTargetMachineBuilder()

void LLVMOrcLLJITBuilderSetJITTargetMachineBuilder ( LLVMOrcLLJITBuilderRef  Builder,
LLVMOrcJITTargetMachineBuilderRef  JTMB 
)

Set the JITTargetMachineBuilder to be used when constructing the LLJIT instance.

Calling this function is optional: if it is not called then the LLJITBuilder will use JITTargeTMachineBuilder::detectHost to construct a JITTargetMachineBuilder.

This function takes ownership of the JTMB argument: clients should not dispose of the JITTargetMachineBuilder after calling this function.

Definition at line 945 of file OrcV2CBindings.cpp.

References Builder, LLVMOrcDisposeJITTargetMachineBuilder(), move, and llvm::unwrap().

◆ LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator()

void LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator ( LLVMOrcLLJITBuilderRef  Builder,
LLVMOrcLLJITBuilderObjectLinkingLayerCreatorFunction  F,
void *  Ctx 
)

Set an ObjectLinkingLayer creator function for this LLJIT instance.

Definition at line 951 of file OrcV2CBindings.cpp.

References Builder, F, llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITGetDataLayoutStr()

const char* LLVMOrcLLJITGetDataLayoutStr ( LLVMOrcLLJITRef  J)

Get the LLJIT instance's default data layout string.

This string is owned by the LLJIT instance and does not need to be freed by the caller.

Definition at line 1082 of file OrcV2CBindings.cpp.

References llvm::unwrap().

◆ LLVMOrcLLJITGetExecutionSession()

LLVMOrcExecutionSessionRef LLVMOrcLLJITGetExecutionSession ( LLVMOrcLLJITRef  J)

Get a reference to the ExecutionSession for this LLJIT instance.

The ExecutionSession is owned by the LLJIT instance. The client is not responsible for managing its memory.

Definition at line 986 of file OrcV2CBindings.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITGetGlobalPrefix()

char LLVMOrcLLJITGetGlobalPrefix ( LLVMOrcLLJITRef  J)

Returns the global prefix character according to the LLJIT's DataLayout.

Definition at line 998 of file OrcV2CBindings.cpp.

References llvm::unwrap().

◆ LLVMOrcLLJITGetIRTransformLayer()

LLVMOrcIRTransformLayerRef LLVMOrcLLJITGetIRTransformLayer ( LLVMOrcLLJITRef  J)

Returns a non-owning reference to the LLJIT instance's IR transform layer.

Definition at line 1078 of file OrcV2CBindings.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITGetMainJITDylib()

LLVMOrcJITDylibRef LLVMOrcLLJITGetMainJITDylib ( LLVMOrcLLJITRef  J)

Return a reference to the Main JITDylib.

The JITDylib is owned by the LLJIT instance. The client is not responsible for managing its memory.

Definition at line 990 of file OrcV2CBindings.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITGetObjLinkingLayer()

LLVMOrcObjectLayerRef LLVMOrcLLJITGetObjLinkingLayer ( LLVMOrcLLJITRef  J)

Returns a non-owning reference to the LLJIT instance's object linking layer.

Definition at line 1052 of file OrcV2CBindings.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITGetObjTransformLayer()

LLVMOrcObjectTransformLayerRef LLVMOrcLLJITGetObjTransformLayer ( LLVMOrcLLJITRef  J)

Returns a non-owning reference to the LLJIT instance's object linking layer.

Definition at line 1057 of file OrcV2CBindings.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITGetTripleString()

const char* LLVMOrcLLJITGetTripleString ( LLVMOrcLLJITRef  J)

Return the target triple for this LLJIT instance.

This string is owned by the LLJIT instance and should not be freed by the client.

Definition at line 994 of file OrcV2CBindings.cpp.

References llvm::unwrap().

◆ LLVMOrcLLJITLookup()

LLVMErrorRef LLVMOrcLLJITLookup ( LLVMOrcLLJITRef  J,
LLVMOrcExecutorAddress Result,
const char *  Name 
)

Look up the given symbol in the main JITDylib of the given LLJIT instance.

This operation does not take ownership of the Name argument.

Definition at line 1037 of file OrcV2CBindings.cpp.

References assert(), LLVMErrorSuccess, llvm::unwrap(), and llvm::wrap().

◆ LLVMOrcLLJITMangleAndIntern()

LLVMOrcSymbolStringPoolEntryRef LLVMOrcLLJITMangleAndIntern ( LLVMOrcLLJITRef  J,
const char *  UnmangledName 
)

Mangles the given string according to the LLJIT instance's DataLayout, then interns the result in the SymbolStringPool and returns a reference to the pool entry.

Clients should call LLVMOrcReleaseSymbolStringPoolEntry to decrement the ref-count on the pool entry once they are finished with this value.

Definition at line 1003 of file OrcV2CBindings.cpp.

References llvm::orc::OrcV2CAPIHelper::moveFromSymbolStringPtr(), llvm::unwrap(), and llvm::wrap().