Commit d2e05c6b authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺 Committed by Ben Gamari

Reduce default for -fmax-pmcheck-iterations from 1e7 to 2e6

The commit 28f951ed introduced the
`-fmax-pmcheck-iterations` flag and set the default limit to 1e7
iterations.

However, this value is still high enough that it can result GHC to
exhibit memory spikes beyond 1 GiB of RAM usage (heap profile showed
several `(:)`s, as well as `THUNK_2_0`, and `PmCon` during the memory
spikes)

A value of 2e6 seems to be a safer upper bound which still manages to
let the checker not run into the limit in most cases.

Test Plan: Validate, try building a few Hackage packages

Reviewers: austin, gkaracha, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2095
parent 2f82da76
{-# LANGUAGE CPP #-}
-- The default iteration limit is a bit too low for the definitions
-- in this module.
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}
#endif
-----------------------------------------------------------------------------
--
-- Cmm optimisation
......
......@@ -1445,7 +1445,7 @@ defaultDynFlags mySettings =
debugLevel = 0,
simplPhases = 2,
maxSimplIterations = 4,
maxPmCheckIterations = 10000000,
maxPmCheckIterations = 2000000,
ruleCheck = Nothing,
maxRelevantBinds = Just 6,
simplTickFactor = 100,
......
{-# LANGUAGE CPP, GADTs, NondecreasingIndentation #-}
-- The default iteration limit is a bit too low for the definitions
-- in this module.
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}
#endif
-----------------------------------------------------------------------------
--
-- Generating machine code (instruction selection)
......
......@@ -6,6 +6,11 @@
{-# LANGUAGE CPP #-}
-- The default is a bit too low for the quite large primOpInfo definition
#if __GLASGOW_HASKELL__ >= 801
{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}
#endif
module PrimOp (
PrimOp(..), PrimOpVecCat(..), allThePrimOps,
primOpType, primOpSig,
......
-- (c) The University of Glasgow 2006
{-# LANGUAGE CPP #-}
-- This module used to take 10GB of memory to compile with the new
-- (Nov '15) pattern-match checker.
-- The default iteration limit is a bit too low for the definitions
-- in this module.
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}
#endif
module OptCoercion ( optCoercion, checkAxInstCo ) where
......
{-# OPTIONS_GHC -Woverlapping-patterns -Wincomplete-patterns #-}
{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}
module T11195 where
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment