| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
LLVM.Internal.Target
Contents
Synopsis
- newtype Target = Target (Ptr Target)
- newtype CPUFeature = CPUFeature ByteString
- lookupTarget :: Maybe ShortByteString -> ShortByteString -> IO (Target, ShortByteString)
- newtype TargetOptions = TargetOptions (Ptr TargetOptions)
- newtype MCTargetOptions = MCTargetOptions (Ptr MCTargetOptions)
- withTargetOptions :: (TargetOptions -> IO a) -> IO a
- pokeTargetOptions :: Options -> TargetOptions -> IO ()
- pokeMachineCodeOptions :: MachineCodeOptions -> MCTargetOptions -> IO ()
- peekTargetOptions :: TargetOptions -> IO Options
- peekMachineCodeOptions :: MCTargetOptions -> IO MachineCodeOptions
- newtype TargetMachine = TargetMachine (Ptr TargetMachine)
- withTargetMachine :: Target -> ShortByteString -> ByteString -> Map CPUFeature Bool -> TargetOptions -> Model -> Model -> Level -> (TargetMachine -> IO a) -> IO a
- targetMachineOptions :: TargetMachine -> IO TargetOptions
- machineCodeOptions :: TargetOptions -> IO MCTargetOptions
- newtype TargetLowering = TargetLowering (Ptr TargetLowering)
- getTargetLowering :: TargetMachine -> IO TargetLowering
- initializeNativeTarget :: IO ()
- getTargetMachineTriple :: TargetMachine -> IO ShortByteString
- getDefaultTargetTriple :: IO ShortByteString
- getProcessTargetTriple :: IO ShortByteString
- getHostCPUName :: IO ByteString
- getHostCPUFeatures :: IO (Map CPUFeature Bool)
- getTargetMachineDataLayout :: TargetMachine -> IO DataLayout
- initializeAllTargets :: IO ()
- withHostTargetMachine :: (TargetMachine -> IO a) -> IO a
- newtype TargetLibraryInfo = TargetLibraryInfo (Ptr TargetLibraryInfo)
- getLibraryFunction :: TargetLibraryInfo -> ShortByteString -> IO (Maybe LibraryFunction)
- getLibraryFunctionName :: TargetLibraryInfo -> LibraryFunction -> IO ShortByteString
- setLibraryFunctionAvailableWithName :: TargetLibraryInfo -> LibraryFunction -> ShortByteString -> IO ()
- withTargetLibraryInfo :: ShortByteString -> (TargetLibraryInfo -> IO a) -> IO a
Documentation
newtype CPUFeature Source #
e.g. an instruction set extension
Constructors
| CPUFeature ByteString |
Instances
Arguments
| :: Maybe ShortByteString | arch |
| -> ShortByteString | "triple" - e.g. x86_64-unknown-linux-gnu |
| -> IO (Target, ShortByteString) |
Find a Target given an architecture and/or a "triple".
| http://llvm.org/doxygen/structllvm_1_1TargetRegistry.html#a3105b45e546c9cc3cf78d0f2ec18ad89
| Be sure to run either initializeAllTargets or
initializeNativeTarget before expecting this to succeed,
depending on what target(s) you want to use. May throw
LookupTargetException if no target is found.
newtype TargetOptions Source #
Constructors
| TargetOptions (Ptr TargetOptions) |
newtype MCTargetOptions Source #
Constructors
| MCTargetOptions (Ptr MCTargetOptions) |
withTargetOptions :: (TargetOptions -> IO a) -> IO a Source #
bracket creation and destruction of a TargetOptions object
pokeTargetOptions :: Options -> TargetOptions -> IO () Source #
set all target options
pokeMachineCodeOptions :: MachineCodeOptions -> MCTargetOptions -> IO () Source #
peekTargetOptions :: TargetOptions -> IO Options Source #
get all target options
peekMachineCodeOptions :: MCTargetOptions -> IO MachineCodeOptions Source #
get all machine code options
newtype TargetMachine Source #
Constructors
| TargetMachine (Ptr TargetMachine) |
Arguments
| :: Target | |
| -> ShortByteString | triple |
| -> ByteString | cpu |
| -> Map CPUFeature Bool | features |
| -> TargetOptions | |
| -> Model | |
| -> Model | |
| -> Level | |
| -> (TargetMachine -> IO a) | |
| -> IO a |
bracket creation and destruction of a TargetMachine
newtype TargetLowering Source #
Constructors
| TargetLowering (Ptr TargetLowering) |
getTargetLowering :: TargetMachine -> IO TargetLowering Source #
get the TargetLowering of a TargetMachine
initializeNativeTarget :: IO () Source #
Initialize the native target. This function is called automatically in these Haskell bindings
when creating an ExecutionEngine which will require it, and so it should
not be necessary to call it separately.
getTargetMachineTriple :: TargetMachine -> IO ShortByteString Source #
the target triple corresponding to the target machine
getDefaultTargetTriple :: IO ShortByteString Source #
the default target triple that LLVM has been configured to produce code for
getProcessTargetTriple :: IO ShortByteString Source #
a target triple suitable for loading code into the current process
getHostCPUName :: IO ByteString Source #
the LLVM name for the host CPU
getHostCPUFeatures :: IO (Map CPUFeature Bool) Source #
a space-separated list of LLVM feature names supported by the host CPU
getTargetMachineDataLayout :: TargetMachine -> IO DataLayout Source #
DataLayout to use for the given TargetMachine
initializeAllTargets :: IO () Source #
Initialize all targets so they can be found by lookupTarget
withHostTargetMachine :: (TargetMachine -> IO a) -> IO a Source #
Bracket creation and destruction of a TargetMachine configured for the host
newtype TargetLibraryInfo Source #
Constructors
| TargetLibraryInfo (Ptr TargetLibraryInfo) |
getLibraryFunction :: TargetLibraryInfo -> ShortByteString -> IO (Maybe LibraryFunction) Source #
Look up a LibraryFunction by its standard name
getLibraryFunctionName :: TargetLibraryInfo -> LibraryFunction -> IO ShortByteString Source #
Get a the current name to be emitted for a LibraryFunction
setLibraryFunctionAvailableWithName Source #
Arguments
| :: TargetLibraryInfo | |
| -> LibraryFunction | |
| -> ShortByteString | The function name to be emitted |
| -> IO () |
Set the name of the function on the target platform that corresponds to funcName
withTargetLibraryInfo Source #
Arguments
| :: ShortByteString | triple |
| -> (TargetLibraryInfo -> IO a) | |
| -> IO a |
look up information about the library functions available on a given platform