{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Futhark.Pass.ExplicitAllocations.Seq
       ( explicitAllocations
       , simplifiable
       )
where

import Futhark.Pass
import Futhark.IR.SeqMem
import Futhark.IR.Seq
import Futhark.Pass.ExplicitAllocations

explicitAllocations :: Pass Seq SeqMem
explicitAllocations :: Pass Seq SeqMem
explicitAllocations = (Op Seq -> AllocM Seq SeqMem (Op SeqMem))
-> (Exp SeqMem -> AllocM Seq SeqMem [ExpHint]) -> Pass Seq SeqMem
forall fromlore tolore.
(Allocable fromlore tolore,
 Allocator tolore (AllocM fromlore tolore)) =>
(Op fromlore -> AllocM fromlore tolore (Op tolore))
-> (Exp tolore -> AllocM fromlore tolore [ExpHint])
-> Pass fromlore tolore
explicitAllocationsGeneric (MemOp () -> AllocM Seq SeqMem (MemOp ())
forall (f :: * -> *) a. Applicative f => a -> f a
pure (MemOp () -> AllocM Seq SeqMem (MemOp ()))
-> (() -> MemOp ()) -> () -> AllocM Seq SeqMem (MemOp ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. () -> MemOp ()
forall inner. inner -> MemOp inner
Inner) Exp SeqMem -> AllocM Seq SeqMem [ExpHint]
forall (m :: * -> *) lore.
(Monad m, ASTLore lore) =>
Exp lore -> m [ExpHint]
defaultExpHints