Skip to content

Commit

Permalink
Fix warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Nov 19, 2024
1 parent f4afac4 commit 5b43e2b
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/Futhark/Internalise/Monomorphise.hs
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,8 @@ calculateDims :: Exp -> ExpReplacements -> MonoM Exp
calculateDims body repl =
foldCalc top_repl $ expReplace top_repl body
where
-- list of strict sub-expressions of e
subExps e
| Just e' <- stripExp e = subExps e'
| otherwise = astMap mapper e `execState` mempty
where
mapOnExp e'
| Just e'' <- stripExp e' = mapOnExp e''
| otherwise = do
modify (ReplacedExp e' :)
astMap mapper e'
mapper = identityMapper {mapOnExp}
depends (a, _) (b, _) = b `elem` subExps (unReplaced a)
top_repl =
topologicalSort depends repl
depends (a, _) (b, _) = unReplaced b `elem` subExps (unReplaced a)
top_repl = topologicalSort depends repl

---- Calculus insertion
foldCalc [] body' = pure body'
Expand Down

0 comments on commit 5b43e2b

Please sign in to comment.