Skip to content

mkTick: Push ticks through unsafeCoerce#.

Andreas Klebinger requested to merge wip/andreask/mkTickUnsafeCoerce into master
mkTick: Push ticks through unsafeCoerce#.

unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast
for the purpose of mkTick.

This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we
now push the scope part of the cost centre up to `trivial_expr` at which
point we can discard it completely if the expression is trivial enough.

This fixes #25212.

Merge request reports

Loading