summaryrefslogtreecommitdiff
path: root/compiler/simplStg
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-02-27 14:45:05 +0000
committerIan Lynagh <igloo@earth.li>2008-02-27 14:45:05 +0000
commit0dfab83f21817343d334314ddd25026f3f0224ab (patch)
tree351b5d82b661f8c2c63ac3bad41aeb4dd1477919 /compiler/simplStg
parentb4696d8ac6c34ccb4e3ed833831ba8166dcce578 (diff)
downloadhaskell-0dfab83f21817343d334314ddd25026f3f0224ab.tar.gz
Add and use seqBitmap when constructing SRTs
This roughly halves memory usage when compiling module Foo where foo :: Double -> Int foo x | x == 1 = 1 ... foo x | x == 500 = 500 without optimisation.
Diffstat (limited to 'compiler/simplStg')
-rw-r--r--compiler/simplStg/SRT.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/simplStg/SRT.lhs b/compiler/simplStg/SRT.lhs
index 57c638d5db..5618cb19f7 100644
--- a/compiler/simplStg/SRT.lhs
+++ b/compiler/simplStg/SRT.lhs
@@ -25,7 +25,7 @@ import Id ( Id )
import VarSet
import VarEnv
import Maybes ( orElse, expectJust )
-import Bitmap ( intsToBitmap )
+import Bitmap
#ifdef DEBUG
import Outputable
@@ -157,7 +157,7 @@ srtAlt table (con,args,used,rhs)
constructSRT :: IdEnv Int -> SRT -> SRT
constructSRT table (SRTEntries entries)
| isEmptyVarSet entries = NoSRT
- | otherwise = SRT offset len bitmap
+ | otherwise = seqBitmap bitmap $ SRT offset len bitmap
where
ints = map (expectJust "constructSRT" . lookupVarEnv table)
(varSetElems entries)