diff options
author | Sebastian Graf <sgraf1337@gmail.com> | 2019-09-18 17:56:35 +0000 |
---|---|---|
committer | Sebastian Graf <sgraf1337@gmail.com> | 2019-09-24 14:00:29 +0000 |
commit | 1922416f69edd55545a155c1d5abdb4b371e1612 (patch) | |
tree | 35b0168e6f89f2418b614af26777ba095e36668b /compiler/cmm/CmmOpt.hs | |
parent | 68ddb43c44065d0d3a8a6893f7f8e87f15ee9c1e (diff) | |
download | haskell-wip/pmcheck-limit-deltas.tar.gz |
PmCheck: Only ever check constantly many models against a single patternwip/pmcheck-limit-deltas
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/cmm/CmmOpt.hs')
-rw-r--r-- | compiler/cmm/CmmOpt.hs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/compiler/cmm/CmmOpt.hs b/compiler/cmm/CmmOpt.hs index ed8b386238..5b542a390e 100644 --- a/compiler/cmm/CmmOpt.hs +++ b/compiler/cmm/CmmOpt.hs @@ -1,7 +1,3 @@ --- The default iteration limit is a bit too low for the definitions --- in this module. -{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-} - ----------------------------------------------------------------------------- -- -- Cmm optimisation |