diff options
author | Ian Lynagh <igloo@earth.li> | 2008-02-27 14:45:05 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-02-27 14:45:05 +0000 |
commit | 0dfab83f21817343d334314ddd25026f3f0224ab (patch) | |
tree | 351b5d82b661f8c2c63ac3bad41aeb4dd1477919 /compiler/codeGen/Bitmap.hs | |
parent | b4696d8ac6c34ccb4e3ed833831ba8166dcce578 (diff) | |
download | haskell-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/codeGen/Bitmap.hs')
-rw-r--r-- | compiler/codeGen/Bitmap.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/codeGen/Bitmap.hs b/compiler/codeGen/Bitmap.hs index 7ee78a973f..3b363fd24e 100644 --- a/compiler/codeGen/Bitmap.hs +++ b/compiler/codeGen/Bitmap.hs @@ -16,7 +16,8 @@ module Bitmap ( Bitmap, mkBitmap, intsToBitmap, intsToReverseBitmap, - mAX_SMALL_BITMAP_SIZE + mAX_SMALL_BITMAP_SIZE, + seqBitmap, ) where #include "HsVersions.h" @@ -24,6 +25,7 @@ module Bitmap ( import SMRep import Constants +import Util import Data.Bits @@ -85,3 +87,6 @@ mAX_SMALL_BITMAP_SIZE :: Int mAX_SMALL_BITMAP_SIZE | wORD_SIZE == 4 = 27 | otherwise = 58 +seqBitmap :: Bitmap -> a -> a +seqBitmap = seqList + |