summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/X86
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2016-04-10 19:13:16 +0200
committerBen Gamari <ben@smart-cactus.org>2016-04-10 22:58:27 +0200
commitd2e05c6bd0834421b0c48b3c4287fbe6ee889966 (patch)
tree7aafdfa45ac21ce4772ad7a7e20d87bbb7fc152e /compiler/nativeGen/X86
parent2f82da761defba2cfdc55ca08d774ca7e1240463 (diff)
downloadhaskell-d2e05c6bd0834421b0c48b3c4287fbe6ee889966.tar.gz
Reduce default for -fmax-pmcheck-iterations from 1e7 to 2e6
The commit 28f951edfe50ea5182065144340061ec326781f5 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
Diffstat (limited to 'compiler/nativeGen/X86')
-rw-r--r--compiler/nativeGen/X86/CodeGen.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index 2d22734378..cd45d92418 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -1,5 +1,11 @@
{-# 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)