llvm-0.4.2.0: Bindings to the LLVM compiler toolkitSource codeContentsIndex
LLVM.ExecutionEngine
Contents
Execution engine
Translation
Unsafe type conversion
Simplified interface.
Description
An ExecutionEngine is JIT compiler that is used to generate code for an LLVM module.
Synopsis
data ExecutionEngine
createExecutionEngine :: ModuleProvider -> IO ExecutionEngine
runStaticConstructors :: ExecutionEngine -> IO ()
runStaticDestructors :: ExecutionEngine -> IO ()
class Translatable f
class Generic a
generateFunction :: Translatable f => ExecutionEngine -> Value (Ptr f) -> f
class Unsafe a b | a -> b where
unsafePurify :: a -> b
simpleFunction :: Translatable f => CodeGenModule (Function f) -> IO f
unsafeGenerateFunction :: (Unsafe t a, Translatable t) => CodeGenModule (Function t) -> a
Execution engine
data ExecutionEngine Source
The type of the JITer.
createExecutionEngine :: ModuleProvider -> IO ExecutionEngineSource
Create an execution engine for a module provider.
runStaticConstructors :: ExecutionEngine -> IO ()Source
runStaticDestructors :: ExecutionEngine -> IO ()Source
Translation
class Translatable f Source
Class of LLVM function types that can be translated to the corresponding Haskell type.
show/hide Instances
class Generic a Source
show/hide Instances
generateFunction :: Translatable f => ExecutionEngine -> Value (Ptr f) -> fSource
Generate a Haskell function from an LLVM function.
Unsafe type conversion
class Unsafe a b | a -> b whereSource
Methods
unsafePurifySource
:: a
-> bRemove the IO from a function return type. This is unsafe in general.
show/hide Instances
Unsafe (IO a) a
Unsafe b b' => Unsafe (a -> b) (a -> b')
Simplified interface.
simpleFunction :: Translatable f => CodeGenModule (Function f) -> IO fSource
Translate a function to Haskell code. This is a simplified interface to the execution engine and module mechanism.
unsafeGenerateFunction :: (Unsafe t a, Translatable t) => CodeGenModule (Function t) -> aSource
Combine simpleFunction and unsafePurify.
Produced by Haddock version 2.4.2