summaryrefslogtreecommitdiff
path: root/compiler/nativeGen
diff options
context:
space:
mode:
authorSebastian Graf <sgraf1337@gmail.com>2019-09-18 17:56:35 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-25 13:54:22 -0400
commitebc65025435b1c441cfd9fa3dd460201cea4576d (patch)
tree875b84358069da8d4fcbbbda82a4d8dae9fe4e20 /compiler/nativeGen
parent4540bbe2811e860f35de6e67ab2f0040592fd3a5 (diff)
downloadhaskell-ebc65025435b1c441cfd9fa3dd460201cea4576d.tar.gz
PmCheck: Only ever check constantly many models against a single pattern
Introduces a new flag `-fmax-pmcheck-deltas` to achieve that. Deprecates the old `-fmax-pmcheck-iter` mechanism in favor of this new flag. From the user's guide: Pattern match checking can be exponential in some cases. This limit makes sure we scale polynomially in the number of patterns, by forgetting refined information gained from a partially successful match. For example, when matching `x` against `Just 4`, we split each incoming matching model into two sub-models: One where `x` is not `Nothing` and one where `x` is `Just y` but `y` is not `4`. When the number of incoming models exceeds the limit, we continue checking the next clause with the original, unrefined model. This also retires the incredibly hard to understand "maximum number of refinements" mechanism, because the current mechanism is more general and should catch the same exponential cases like PrelRules at the same time. ------------------------- Metric Decrease: T11822 -------------------------
Diffstat (limited to 'compiler/nativeGen')
-rw-r--r--compiler/nativeGen/X86/CodeGen.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index 9f0af9429d..864013efb4 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -1,8 +1,11 @@
{-# LANGUAGE CPP, GADTs, NondecreasingIndentation #-}
+#if __GLASGOW_HASKELL__ <= 808
+-- GHC 8.10 deprecates this flag, but GHC 8.8 needs it
-- The default iteration limit is a bit too low for the definitions
-- in this module.
{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}
+#endif
-----------------------------------------------------------------------------
--