{-# LANGUAGE TypeFamilies #-}
module Futhark.Pass.FirstOrderTransform (firstOrderTransform) where
import Futhark.IR.SOACS (SOACS, scopeOf)
import Futhark.Pass
import Futhark.Transform.FirstOrderTransform (FirstOrderRep, transformConsts, transformFunDef)
firstOrderTransform :: FirstOrderRep rep => Pass SOACS rep
firstOrderTransform :: forall rep. FirstOrderRep rep => Pass SOACS rep
firstOrderTransform =
forall fromrep torep.
String
-> String
-> (Prog fromrep -> PassM (Prog torep))
-> Pass fromrep torep
Pass
String
"first order transform"
String
"Transform all SOACs to for-loops."
forall a b. (a -> b) -> a -> b
$ forall fromrep torep.
(Stms fromrep -> PassM (Stms torep))
-> (Stms torep -> FunDef fromrep -> PassM (FunDef torep))
-> Prog fromrep
-> PassM (Prog torep)
intraproceduralTransformationWithConsts
forall (m :: * -> *) torep.
(MonadFreshNames m, FirstOrderRep torep) =>
Stms SOACS -> m (Stms torep)
transformConsts
(forall (m :: * -> *) torep.
(MonadFreshNames m, FirstOrderRep torep) =>
Scope torep -> FunDef SOACS -> m (FunDef torep)
transformFunDef forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall rep a. Scoped rep a => a -> Scope rep
scopeOf)