Commit 6dd55e8a authored by Simon Marlow's avatar Simon Marlow
Browse files

Fix a bug in foldExpDeep

This caused the CAF analysis to occasionally miss a CAF sometimes,
resulting in a very hard to diagnose crash.
parent 4f656e89
......@@ -395,14 +395,7 @@ foldExp f (CmmCall {cml_target=tgt}) z = f tgt z
foldExp f (CmmForeignCall {tgt=tgt, args=args}) z = foldr f (foldExpForeignTarget f tgt z) args
foldExpDeep :: (CmmExpr -> z -> z) -> CmmNode e x -> z -> z
foldExpDeep f = foldExp go
where -- go :: CmmExpr -> z -> z
go e@(CmmMachOp _ es) z = gos es $! f e z
go e@(CmmLoad addr _) z = go addr $! f e z
go e z = f e z
gos [] z = z
gos (e:es) z = gos es $! f e z
foldExpDeep f = foldExp (wrapRecExpf f)
-- -----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment