packages feed

llvm-ffi 3.7.0 → 3.8.0

raw patch · 6 files changed

+52/−53 lines, 6 files

Files

example/JIT.hs view
@@ -139,7 +139,7 @@       execEngine <- peek execEngineRef       flip finally (EE.disposeExecutionEngine execEngine) $ do          let vector = take vectorSize $ iterate (1+) (-1.3 :: CFloat)-         funcPtr <- EE.getPointerToGlobal execEngine func+         funcPtr <- EE.getPointerToFunction execEngine func          let size = sum $ map sizeOf vector          Alloc.allocaBytesAligned size size $ \ptr -> do             Array.pokeArray ptr vector
llvm-ffi.cabal view
@@ -1,5 +1,5 @@ Name:          llvm-ffi-Version:       3.7.0+Version:       3.8.0 License:       BSD3 License-File:  LICENSE Synopsis:      FFI bindings to the LLVM compiler toolkit.@@ -15,9 +15,16 @@   using the @llvm-pkg-config@ package.   .   We try to stay up to date with LLVM releases.-  The current version of this package is compatible with LLVM 3.4-3.7.+  The current version of this package is compatible with LLVM 3.4-3.8.   Please understand that the package may or may not work   against older LLVM releases.+  .+  Warning for inplace builds:+  Re-configuring the package using, say -fllvm307,+  and re-buildung it might result in corrupt code.+  You must make sure that the stuff in @cbits@ is re-compiled.+  Cabal or GHC may forget about that.+  You are safe if you run @cabal clean@. Author:        Henning Thielemann, Bryan O'Sullivan, Lennart Augustsson Maintainer:    Henning Thielemann <llvm@henning-thielemann.de> Homepage:      http://haskell.org/haskellwiki/LLVM@@ -58,12 +65,16 @@   Description: use LLVM-3.6 instead of latest supported LLVM   Default: False +Flag llvm307+  Description: use LLVM-3.7 instead of latest supported LLVM+  Default: False+ Source-Repository head   Type:     darcs   Location: http://hub.darcs.net/thielema/llvm-ffi/  Source-Repository this-  Tag:      3.7.0+  Tag:      3.8.0   Type:     darcs   Location: http://hub.darcs.net/thielema/llvm-ffi/ @@ -128,12 +139,20 @@         CC-Options: -DHS_LLVM_VERSION=306         CPP-Options: -DHS_LLVM_VERSION=306       Else-        If flag(specificPkgConfig)-          PkgConfig-Depends: llvm-3.7+        If flag(llvm307)+          If flag(specificPkgConfig)+            PkgConfig-Depends: llvm-3.7+          Else+            PkgConfig-Depends: llvm == 3.7+          CC-Options: -DHS_LLVM_VERSION=307+          CPP-Options: -DHS_LLVM_VERSION=307         Else-          PkgConfig-Depends: llvm == 3.7-        CC-Options: -DHS_LLVM_VERSION=307-        CPP-Options: -DHS_LLVM_VERSION=307+          If flag(specificPkgConfig)+            PkgConfig-Depends: llvm-3.8+          Else+            PkgConfig-Depends: llvm == 3.8+          CC-Options: -DHS_LLVM_VERSION=308+          CPP-Options: -DHS_LLVM_VERSION=308    CC-Options: -DHAVE_LLVM_SUPPORT_DYNAMICLIBRARY_H=1   CPP-Options: -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
src/LLVM/FFI/BitReader.hs view
@@ -5,18 +5,14 @@ module LLVM.FFI.BitReader where  import qualified LLVM.FFI.Core as LLVM-import LLVM.FFI.Core (MemoryBufferRef, ModuleRef, ContextRef, ModuleProviderRef)+import LLVM.FFI.Core (MemoryBufferRef, ModuleRef, ContextRef)  import Foreign.C.String(CString) import Foreign.Ptr(Ptr)  -foreign import ccall unsafe "LLVMGetBitcodeModuleProvider" getBitcodeModuleProvider-    :: MemoryBufferRef -> (Ptr ModuleProviderRef) -> (Ptr CString) -> IO LLVM.Bool foreign import ccall unsafe "LLVMParseBitcode" parseBitcode     :: MemoryBufferRef -> (Ptr ModuleRef) -> (Ptr CString) -> IO LLVM.Bool-foreign import ccall unsafe "LLVMGetBitcodeModuleProviderInContext" getBitcodeModuleProviderInContext-    :: ContextRef -> MemoryBufferRef -> (Ptr ModuleProviderRef) -> (Ptr CString) -> IO LLVM.Bool foreign import ccall unsafe "LLVMParseBitcodeInContext" parseBitcodeInContext     :: ContextRef -> MemoryBufferRef -> (Ptr ModuleRef) -> (Ptr CString) -> IO LLVM.Bool foreign import ccall unsafe "LLVMGetBitcodeModule" getBitcodeModule
src/LLVM/FFI/Core.hsc view
@@ -60,12 +60,6 @@     , setModuleInlineAsm     , getModuleContext -    -- * Module providers-    , ModuleProvider-    , ModuleProviderRef-    , createModuleProviderForExistingModule-    , ptrDisposeModuleProvider-     -- * Types     , Type     , TypeRef@@ -567,7 +561,6 @@      , createPassManager     , createFunctionPassManagerForModule-    , createFunctionPassManager     , runPassManager     , initializeFunctionPassManager     , runFunctionPassManager@@ -632,10 +625,6 @@     deriving (Typeable) type ModuleRef = Ptr Module -data ModuleProvider-    deriving (Typeable)-type ModuleProviderRef = Ptr ModuleProvider- data Type     deriving (Typeable) type TypeRef = Ptr Type@@ -1813,14 +1802,6 @@     :: BuilderRef -> ValueRef -> ValueRef -> CString -> IO ValueRef  --- ** Module Providers-foreign import ccall unsafe "LLVMCreateModuleProviderForExistingModule"-    createModuleProviderForExistingModule-    :: ModuleRef -> IO ModuleProviderRef-foreign import ccall unsafe "&LLVMDisposeModuleProvider" ptrDisposeModuleProvider-    :: FunPtr (ModuleProviderRef -> IO ())-- -- ** Memory Buffers foreign import ccall unsafe "LLVMCreateMemoryBufferWithContentsOfFile" createMemoryBufferWithContentsOfFile     :: CString -> Ptr MemoryBufferRef -> Ptr CString -> IO Bool@@ -1838,8 +1819,6 @@     :: IO PassManagerRef foreign import ccall unsafe "LLVMCreateFunctionPassManagerForModule" createFunctionPassManagerForModule     :: ModuleRef -> IO PassManagerRef-foreign import ccall unsafe "LLVMCreateFunctionPassManager" createFunctionPassManager-    :: ModuleProviderRef -> IO PassManagerRef foreign import ccall unsafe "LLVMRunPassManager" runPassManager     :: PassManagerRef -> ModuleRef -> IO Bool foreign import ccall unsafe "LLVMInitializeFunctionPassManager" initializeFunctionPassManager
src/LLVM/FFI/ExecutionEngine.hs view
@@ -37,9 +37,6 @@     , createJITCompilerForModule     , createMCJITCompilerForModule     , initializeMCJITCompilerOptions-    , createExecutionEngine-    , createInterpreter-    , createJITCompiler     , ptrDisposeExecutionEngine     , disposeExecutionEngine     , runStaticConstructors@@ -47,9 +44,7 @@     , runFunctionAsMain     , freeMachineCodeForFunction     , addModule-    , addModuleProvider     , removeModule-    , removeModuleProvider     , findFunction     , recompileAndRelinkFunction     , runFunction@@ -57,11 +52,12 @@     , addGlobalMapping     , addFunctionMapping     , getPointerToGlobal+    , getPointerToFunction      ) where  import qualified LLVM.FFI.Core as LLVM-import LLVM.FFI.Core (ModuleRef, ModuleProviderRef, TypeRef, ValueRef)+import LLVM.FFI.Core (ModuleRef, TypeRef, ValueRef) import LLVM.FFI.Target(TargetDataRef)  import qualified Foreign.C.Types as C@@ -153,13 +149,6 @@     :: MCJITCompilerOptionsRef -> CSize -> IO () foreign import ccall unsafe "LLVMCreateMCJITCompilerForModule" createMCJITCompilerForModule     :: Ptr ExecutionEngineRef -> ModuleRef -> MCJITCompilerOptionsRef -> CSize -> Ptr CString -> IO LLVM.Bool-foreign import ccall unsafe "LLVMCreateExecutionEngine" createExecutionEngine-    :: Ptr ExecutionEngineRef -> ModuleProviderRef -> Ptr CString-    -> IO LLVM.Bool-foreign import ccall unsafe "LLVMCreateInterpreter" createInterpreter-    :: Ptr ExecutionEngineRef -> ModuleProviderRef -> Ptr CString -> IO LLVM.Bool-foreign import ccall unsafe "LLVMCreateJITCompiler" createJITCompiler-    :: Ptr ExecutionEngineRef -> ModuleProviderRef -> CUInt -> Ptr CString -> IO LLVM.Bool foreign import ccall unsafe "LLVMDisposeExecutionEngine" disposeExecutionEngine     :: ExecutionEngineRef -> IO () foreign import ccall unsafe "&LLVMDisposeExecutionEngine" ptrDisposeExecutionEngine@@ -191,13 +180,8 @@     freeMachineCodeForFunction :: ExecutionEngineRef -> ValueRef -> IO () foreign import ccall unsafe "LLVMAddModule" addModule     :: ExecutionEngineRef -> ModuleRef -> IO ()-foreign import ccall unsafe "LLVMAddModuleProvider" addModuleProvider-    :: ExecutionEngineRef -> ModuleProviderRef -> IO () foreign import ccall unsafe "LLVMRemoveModule" removeModule     :: ExecutionEngineRef -> ModuleRef -> (Ptr ModuleRef) -> (Ptr CString) -> IO LLVM.Bool-foreign import ccall unsafe "LLVMRemoveModuleProvider" removeModuleProvider-    :: ExecutionEngineRef -> ModuleProviderRef -> Ptr ModuleRef -> Ptr CString-    -> IO LLVM.Bool foreign import ccall unsafe "LLVMFindFunction" findFunction     :: ExecutionEngineRef -> CString -> Ptr ValueRef -> IO LLVM.Bool foreign import ccall unsafe "LLVMRecompileAndRelinkFunction" recompileAndRelinkFunction@@ -213,4 +197,6 @@ foreign import ccall unsafe "LLVMAddGlobalMapping" addFunctionMapping     :: ExecutionEngineRef -> ValueRef -> FunPtr a -> IO () foreign import ccall unsafe "LLVMGetPointerToGlobal" getPointerToGlobal+    :: ExecutionEngineRef -> ValueRef -> IO (Ptr a)+foreign import ccall unsafe "LLVMGetPointerToGlobal" getPointerToFunction     :: ExecutionEngineRef -> ValueRef -> IO (FunPtr a)
tool/ltrace.config view
@@ -626,3 +626,22 @@ uint LLVMRunFunctionPassManager(LLVMPassManagerRef, LLVMValueRef);    ; result LLVMBool uint LLVMFinalizeFunctionPassManager(LLVMPassManagerRef);    ; result LLVMBool void LLVMDisposePassManager(LLVMPassManagerRef);+++; PassManagerBuilder.h++typedef LLVMPassManagerBuilderRef = addr++addr LLVMPassManagerBuilderCreate();   ; result LLVMPassManagerBuilderRef+void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef);++void LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef, uint);+void LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef, uint);+void LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef, LLVMBool);+void LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef, LLVMBool);+void LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef, LLVMBool);+void LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef, uint);+void LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef, LLVMPassManagerRef);++void LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef, LLVMPassManagerRef);+void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef, LLVMPassManagerRef, LLVMBool, LLVMBool);