summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-10-12 11:50:55 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-10-12 11:50:55 +0100
commit2a9f42095cb2d9aace991b11bf052d12ca654ef8 (patch)
tree2e09a856d6bea61361cad9fef5013e6d98d46e39
parent36297a8efdfb7e79b9b3b395186f3ca8514fc678 (diff)
downloadhaskell-2a9f42095cb2d9aace991b11bf052d12ca654ef8.tar.gz
Increase max simplifier tick count magic number (Trac #5539)
-rw-r--r--compiler/simplCore/SimplMonad.lhs15
1 files changed, 9 insertions, 6 deletions
diff --git a/compiler/simplCore/SimplMonad.lhs b/compiler/simplCore/SimplMonad.lhs
index c48673c4b9..a7615d20f2 100644
--- a/compiler/simplCore/SimplMonad.lhs
+++ b/compiler/simplCore/SimplMonad.lhs
@@ -67,13 +67,16 @@ initSmpl dflags rules fam_envs us size m
(result, _, count) -> (result, count)
where
-- Compute the max simplifier ticks as
- -- pgm-size * k * tick-factor/100
- -- where k is a constant that gives reasonable results
- max_ticks = fromInteger ((toInteger size * toInteger (simplTickFactor dflags * k))
+ -- pgm-size * magic-multiplier * tick-factor/100
+ -- where magic-multiplier is a constant that gives reasonable results
+ max_ticks = fromInteger ((toInteger size * toInteger (simplTickFactor dflags
+ * magic_multiplier))
`div` 100)
- k = 20 -- MAGIC NUMBER, multiplies the simplTickFactor
- -- We can afford to be generous; this is really
- -- just checking for loops, and shouldn't usually fire
+ magic_multiplier = 40
+ -- MAGIC NUMBER, multiplies the simplTickFactor
+ -- We can afford to be generous; this is really
+ -- just checking for loops, and shouldn't usually fire
+ -- A figure of 20 was too small: see Trac #553
env = STE { st_flags = dflags, st_rules = rules
, st_max_ticks = max_ticks