Safe Haskell | None |
---|---|
Language | Haskell98 |
- data IRTransformLayer baseLayer = IRTransformLayer {
- compileLayer :: !(Ptr IRTransformLayer)
- dataLayout :: !(Ptr DataLayout)
- cleanupActions :: !(IORef [IO ()])
- newIRTransformLayer :: CompileLayer l => l -> TargetMachine -> (Ptr Module -> IO (Ptr Module)) -> IO (IRTransformLayer l)
- withIRTransformLayer :: CompileLayer l => l -> TargetMachine -> (Ptr Module -> IO (Ptr Module)) -> (IRTransformLayer l -> IO a) -> IO a
Documentation
data IRTransformLayer baseLayer Source #
IRTransformLayer
allows transforming modules before handing off
compilation to the underlying CompileLayer
.
IRTransformLayer | |
|
Eq (IRTransformLayer baseLayer) Source # | |
CompileLayer (IRTransformLayer l) Source # | |
:: CompileLayer l | |
=> l | |
-> TargetMachine | |
-> (Ptr Module -> IO (Ptr Module)) | module transformation |
-> IO (IRTransformLayer l) |
Create a new IRTransformLayer
.
When the layer is no longer needed, it should be disposed using disposeCompileLayer
.
:: CompileLayer l | |
=> l | |
-> TargetMachine | |
-> (Ptr Module -> IO (Ptr Module)) | module transformation |
-> (IRTransformLayer l -> IO a) | |
-> IO a |
bracket
-style wrapper around newIRTransformLayer
and disposeCompileLayer
.