diff options
Diffstat (limited to 'compiler/GHC')
-rw-r--r-- | compiler/GHC/Core/Unfold.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Unfold.hs b/compiler/GHC/Core/Unfold.hs index 414d5184f4..2e1b1f6d61 100644 --- a/compiler/GHC/Core/Unfold.hs +++ b/compiler/GHC/Core/Unfold.hs @@ -16,6 +16,7 @@ find, unsurprisingly, a Core expression. -} {-# LANGUAGE CPP #-} +{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -Wno-incomplete-record-updates #-} @@ -394,7 +395,9 @@ sizeExpr :: UnfoldingOpts -- Note [Computing the size of an expression] -sizeExpr opts bOMB_OUT_SIZE top_args expr +-- Forcing bOMB_OUT_SIZE early prevents repeated +-- unboxing of the Int argument. +sizeExpr opts !bOMB_OUT_SIZE top_args expr = size_up expr where size_up (Cast e _) = size_up e |