Safe Haskell | None |
---|---|
Language | Haskell98 |
Tools for JIT execution
- class ExecutionEngine e f | e -> f where
- withModuleInEngine :: e -> Module -> (ExecutableModule e -> IO a) -> IO a
- getFunction :: ExecutableModule e -> Name -> IO (Maybe f)
- data ExecutableModule e
- data JIT
- withJIT :: Context -> Word -> (JIT -> IO a) -> IO a
- data MCJIT
- withMCJIT :: Context -> Maybe Word -> Maybe Model -> Maybe Bool -> Maybe Bool -> (MCJIT -> IO a) -> IO a
Documentation
class ExecutionEngine e f | e -> f where Source
withModuleInEngine :: e -> Module -> (ExecutableModule e -> IO a) -> IO a Source
getFunction :: ExecutableModule e -> Name -> IO (Maybe f) Source
ExecutionEngine MCJIT (FunPtr ()) | |
ExecutionEngine JIT (FunPtr ()) |
data ExecutableModule e Source
a ExecutableModule
e represents a Module
which is currently "in" an
ExecutionEngine
, and so the functions of which may be executed.
bracket the creation and destruction of a JIT
http://llvm.org/doxygen/classllvm_1_1MCJIT.html http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html N.B. - the LLVM MCJIT does not current support adding multiple modules to any one instance of the MCJIT.
ExecutionEngine MCJIT (FunPtr ()) |
:: Context | |
-> Maybe Word | optimization level |
-> Maybe Model | |
-> Maybe Bool | True to disable frame pointer elimination |
-> Maybe Bool | True to enable fast instruction selection -> Maybe MemoryManager -- llvm-general doesn't support this yet |
-> (MCJIT -> IO a) | |
-> IO a |
bracket the creation and destruction of an MCJIT