
Hi, 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. How could I find out what is causing this blow up? Thanks, Christian

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.
How could I find out what is causing this blow up?
Compile with -ddump-simpl and investigate the Core code, both with and without optimisation. Cheers, Simon

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

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
participants (2)
-
Christian Maeder
-
Simon Marlow