Commit 32feee45 authored by Simon Marlow's avatar Simon Marlow

drop SCC on a variable when it has a non-function type

parent 76bce1b7
......@@ -211,6 +211,15 @@ mkCoerce co expr
-- annotation if possible.
mkTick :: Tickish Id -> CoreExpr -> CoreExpr
mkTick t (Var x)
| isFunTy (idType x) = Tick t (Var x)
| otherwise
= if tickishCounts t
then if tickishScoped t && tickishCanSplit t
then Tick (mkNoScope t) (Var x)
else Tick t (Var x)
else Var x
mkTick t (Cast e co)
= Cast (mkTick t e) co -- Move tick inside cast
......
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