object code blow up by optimization

Christian Maeder maeder at tzi.de
Wed Jan 4 11:06:21 EST 2006


Simon Marlow wrote:
> Christian Maeder wrote:
> 
>> I've a few files that produce ten times bigger .o files when compiled 
>> with optimization (-O). This blow-up prevents linking on a mac.

I had some success by adding

{-# OPTIONS -fno-strictness #-}

to the source of the big .o file so that it's now only five times bigger 
than without optimization.

> Compile with -ddump-simpl and investigate the Core code, both with and 
> without optimisation.

This takes ages and produces 100 MB output.

Cheers Christian

P.S.
-fmax-simplifier-iterations
is rejected so 
http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html
may need correction


More information about the Glasgow-haskell-users mailing list