Skip to content

Commit

Permalink
Remove Futhark.Ir.Mem.IxFun. (#2085)
Browse files Browse the repository at this point in the history
Now we use LMADs directly and explicitly.
  • Loading branch information
athas committed Jan 14, 2024
1 parent 7a2fa92 commit 95bf7ea
Show file tree
Hide file tree
Showing 21 changed files with 313 additions and 531 deletions.
1 change: 0 additions & 1 deletion futhark.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ library
Futhark.IR.MCMem
Futhark.IR.Mem
Futhark.IR.Mem.Interval
Futhark.IR.Mem.IxFun
Futhark.IR.Mem.LMAD
Futhark.IR.Mem.Simplify
Futhark.IR.Parse
Expand Down
5 changes: 2 additions & 3 deletions src/Futhark/CodeGen/ImpGen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ import Futhark.CodeGen.ImpCode
import Futhark.CodeGen.ImpCode qualified as Imp
import Futhark.Construct hiding (ToExp (..))
import Futhark.IR.Mem
import Futhark.IR.Mem.IxFun qualified as IxFun
import Futhark.IR.Mem.LMAD qualified as LMAD
import Futhark.IR.SOACS (SOACS)
import Futhark.Util
Expand Down Expand Up @@ -508,7 +507,7 @@ compileInParam fparam = case paramDec fparam of
MemMem space ->
pure $ Left $ Imp.MemParam name space
MemArray bt shape _ (ArrayIn mem lmad) ->
pure $ Right $ ArrayDecl name bt $ MemLoc mem (shapeDims shape) $ IxFun.ixfunLMAD lmad
pure $ Right $ ArrayDecl name bt $ MemLoc mem (shapeDims shape) lmad
MemAcc {} ->
error "Functions may not have accumulator parameters."
where
Expand Down Expand Up @@ -1103,7 +1102,7 @@ memBoundToVarEntry e (MemMem space) =
memBoundToVarEntry e (MemAcc acc ispace ts _) =
AccVar e (acc, ispace, ts)
memBoundToVarEntry e (MemArray bt shape _ (ArrayIn mem lmad)) =
let location = MemLoc mem (shapeDims shape) $ IxFun.ixfunLMAD lmad
let location = MemLoc mem (shapeDims shape) lmad
in ArrayVar
e
ArrayEntry
Expand Down

0 comments on commit 95bf7ea

Please sign in to comment.