Changes between Initial Version and Version 1 of Ticket #683


Ignore:
Timestamp:
Feb 28, 2006 11:56:09 AM (9 years ago)
Author:
simonpj
Comment:

Fix formmatting only

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #683 – Description

    initial v1  
    44 
    55isn't being optimised properly, so I thought I'd look into it.  Sure enough, we don't get down to a simple loop like we should, although the F/B transformation is happening (see ~simonmar/scratch/mapm.hs).  The problem is that GHC.Enum.eftIntFB isn't being inlined, it's defined like this: 
    6  
     6{{{ 
    77{-# INLINE [0] eftIntFB #-} 
    88eftIntFB :: (Int -> r -> r) -> r -> Int# -> Int# -> r 
     
    1111                 where 
    1212                   go x = I# x `c` if x ==# y then n else go (x +# 1#) 
    13  
     13}}} 
    1414but, strangely, the inlining doesn't appear in the interface: 
    15  
     15{{{ 
    1616eftIntFB :: (GHC.Base.Int -> r -> r) -> r -> GHC.Prim.Int# -> GHC.Prim.Int# -> r 
    1717  {- Arity: 4 HasNoCafRefs Strictness: LLLL -} 
    18  
     18}}} 
    1919This is becuase the RULE make eftIntFB look recursive, so its inlining isnt' exposed.  Bad, bad.