diff options
Diffstat (limited to 'compiler/simplCore/CallArity.hs')
-rw-r--r-- | compiler/simplCore/CallArity.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/simplCore/CallArity.hs b/compiler/simplCore/CallArity.hs index e23314b569..0cf0c2f44f 100644 --- a/compiler/simplCore/CallArity.hs +++ b/compiler/simplCore/CallArity.hs @@ -18,6 +18,7 @@ import CoreArity ( typeArity ) import CoreUtils ( exprIsCheap, exprIsTrivial ) import UnVarGraph import Demand +import Util import Control.Arrow ( first, second ) @@ -671,11 +672,11 @@ callArityRecEnv any_boring ae_rhss ae_body cross_calls -- See Note [Taking boring variables into account] - | any_boring = completeGraph (domRes ae_combined) + | any_boring = completeGraph (domRes ae_combined) -- Also, calculating cross_calls is expensive. Simply be conservative -- if the mutually recursive group becomes too large. - | length ae_rhss > 25 = completeGraph (domRes ae_combined) - | otherwise = unionUnVarGraphs $ map cross_call ae_rhss + | lengthExceeds ae_rhss 25 = completeGraph (domRes ae_combined) + | otherwise = unionUnVarGraphs $ map cross_call ae_rhss cross_call (v, ae_rhs) = completeBipartiteGraph called_by_v called_with_v where is_thunk = idCallArity v == 0 |