-ddump-simpl will print out the complete, optimised
program. That'll tell you what's been inlined.

-funfolding-use-thresholdN changes the inlining threshold
Default for N is 8

-funfolding-keeness-factorM.N changes how heavily GHC weights
'context information' when deciding to inline.  Default is 2.0.
Bigger numbers mean that a favourable context has a bigger effect.

Simon

> I tried to find out, how the *inlining level* (eagerness) option 
> changes the compilation. Is there such a parameter?
> First, applying   ghc-4.02 -c -O 
> to
> ---------------------------------
> module T where
> 
> f1 :: Int -> Int
> f1    x   =  (f2 x) + 2
> 
> f2 x = (f3 x) + 2
> f3 x = (f4 x) + 2
> f4 x = (f5 x) + 2
> f5 x = (f6 x) + 2
> f6 x = (f7 x) + 2
> f7 x = (f8 x) + 2
> f8 x = (f9 x) + 2
> f9 x = if  x < 0  then -x  else x
> ---------------------------------
> 
> 
> i could not find out which of fi are inlined.  T.hi is too complex.
> How to see it easy, what really had inlined?
> 
> My idea was that, as i like generally to compose the simple function 
> applications, it, probably, worths to increase the threshold of
> inlining, and see ...
> 
> ------------------
> Sergey Mechveliani
> [EMAIL PROTECTED]
> 
> 

Reply via email to