object code blow up by optimization

Simon Marlow simonmar at microsoft.com
Thu Jan 5 05:33:15 EST 2006


Christian Maeder wrote:
> 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.

Perhaps you can cut down the example so it isn't so big, but still blows 
up by the same proportion?


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

You tried -fmax-simplifier-iterations10?

Cheers,
	Simon



More information about the Glasgow-haskell-users mailing list