diff options
-rw-r--r-- | compiler/simplCore/CallArity.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/simplCore/CallArity.hs b/compiler/simplCore/CallArity.hs index 4e4555ca13..c2a5ad0cae 100644 --- a/compiler/simplCore/CallArity.hs +++ b/compiler/simplCore/CallArity.hs @@ -630,6 +630,9 @@ callArityRecEnv any_boring ae_rhss ae_body cross_calls -- See Note [Taking boring variables into account] | 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 cross_call (v, ae_rhs) = completeBipartiteGraph called_by_v called_with_v where |