diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-05-25 23:35:31 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-05-25 23:35:31 +0200 |
commit | c36849cb6247f957b4e6b093e16d04421c8cea3d (patch) | |
tree | fdcdcec5c598c95c493ede2782a96563a32b4b5f /src/Simplify.hs | |
parent | b0b562e5000dbcac8b944801e7ab96556855a4ff (diff) |
ERecompute
Diffstat (limited to 'src/Simplify.hs')
-rw-r--r-- | src/Simplify.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Simplify.hs b/src/Simplify.hs index 6f97e6d..d963b7e 100644 --- a/src/Simplify.hs +++ b/src/Simplify.hs @@ -291,6 +291,7 @@ simplify'Rec = \case e1' <- within (\e1' -> ECustom ext s t p a' b' c' e1' e2) (simplify' e1) e2' <- within (\e2' -> ECustom ext s t p a' b' c' e1' e2') (simplify' e2) pure (ECustom ext s t p a' b' c' e1' e2') + ERecompute _ e -> [simprec| ERecompute ext *e |] EWith _ t e1 e2 -> do e1' <- within (\e1' -> EWith ext t e1' e2) (simplify' e1) e2' <- within (\e2' -> EWith ext t e1' e2') (let ?accumInScope = True in simplify' e2) @@ -345,6 +346,7 @@ hasAdds = \case EShape _ e -> hasAdds e EOp _ _ e -> hasAdds e EWith _ _ a b -> hasAdds a || hasAdds b + ERecompute _ e -> hasAdds e EAccum _ _ _ _ _ _ -> True EZero _ _ e -> hasAdds e EPlus _ _ a b -> hasAdds a || hasAdds b |