Roman reports a missing 'make' dependency.  See below.

Simon

-----Original Message-----
From: Roman Leshchinskiy [mailto:[email protected]] 
Sent: 31 October 2010 09:20
To: Simon Peyton-Jones
Cc: Manuel Chakravarty; Ben Lippmeier
Subject: Re: Inlining fromInteger

Also, if I add INLINE pragmas to fromInteger and toEnum for Word8 and run 
'make' in the ghc subdirectory, I get:

Undefined symbols:
  "_base_GHCziWord_zdfBitsWord8zuzdcfromInteger_closure", referenced from:
      _base_SystemziPosixziTypes_zdfNumCCc_closure in 
libHSbase-4.3.0.0.a(Types.o)
      _base_ForeignziCziTypes_zdfNumCUChar_closure in 
libHSbase-4.3.0.0.a(Types.o)

I think make doesn't rebuild these libraries.

Roman

On 30/10/2010, at 17:24, Roman Leshchinskiy wrote:

> Simon,
> 
> On 27/10/2010, at 20:52, Simon Peyton-Jones wrote:
> 
>> * Inlining fromInteger e to
>>    case e of
>>      S# n -> ...
>>      J# .. -> ...
>> is probably a mistake; it creates lots of join point for little benefit.
> 
> That's a good point!
> 
>> * Better to add a rule  fromInteger (S# n) = I# n
>> So I did that.  Actually it's toInt# that gets the rule, not fromInteger
> 
> Alas... I now see this in Quickhull:
> 
> a = $fBitsWord8_$cfromInteger (S# 0)
> b = $fEnumWord8_$ctoEnum (I# 0)
> 
> I'm sure there are more. The reason is, of course, that 
> $fBitsWord8_$cfromInteger is now a worker which doesn't get inlined until 
> phase 0.
> 
> This utterly breaks fusion because it then basically has things like
> 
> f (if a == b then g x else g y)
> 
> and an f/g rule has no chance of firing. I checked with a compiler from right 
> before the typechecker pass and this didn't happen there. I really think that 
> workers should be inlined before phase 0, otherwise things get too fragile.
> 
> Roman
> 
> 


_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to