intPrimTy, wordPrimTy, int64PrimTy, word64PrimTy
)
import PrimRep ( PrimRep(..) )
-import TcType ( Type, tcCmpType )
-import Type ( typePrimRep )
-import PprType ( pprParendType )
+import Type ( Type )
import CStrings ( pprFSInCStyle )
import Outputable
import FastTypes
import FastString
import Binary
-import Util ( thenCmp )
import Ratio ( numerator )
import FastString ( uniqueOfFS, lengthFS )
litSize :: Literal -> Int
-- Used by CoreUnfold.sizeExpr
-litSize (MachStr str) = 1 + (lengthFS str `div` 4)
+litSize (MachStr str) = 1 + ((lengthFS str + 3) `div` 4)
-- Every literal has size at least 1, otherwise
-- f "x"
-- might be too small
+ -- [Sept03: make literal strings a bit bigger to avoid fruitless
+ -- duplication of little strings]
litSize _other = 1
\end{code}
cmpLit (MachDouble a) (MachDouble b) = a `compare` b
cmpLit (MachLabel a _) (MachLabel b _) = a `compare` b
cmpLit lit1 lit2 | litTag lit1 <# litTag lit2 = LT
- | otherwise = GT
+ | otherwise = GT
litTag (MachChar _) = _ILIT(1)
litTag (MachStr _) = _ILIT(2)