New codegen failing test-cases

Ian Lynagh igloo at earth.li
Thu Dec 9 16:33:02 CET 2010


On Wed, Dec 08, 2010 at 11:31:19PM -0500, Edward Z. Yang wrote:
> Ian, I'd love a little guidance with this patch:
> 
> Thu Oct 21 13:08:53 BST 2010  Ian Lynagh <igloo at earth.li>
>   * Use takeUniqFromSupply in emitProcWithConvention
>   We were using the supply's unique, and then passing the same supply to
>   initUs_, which sounds like a bug waiting to happen.
>     {
>     hunk ./compiler/codeGen/StgCmmMonad.hs 607
>     -        ; let (offset, entry) = mkEntry (mkBlockId $ uniqFromSupply us) conv args
>     -              blks = initUs_ us $ lgraphOfAGraph $ entry <*> blocks
>     +        ; let (uniq, us') = takeUniqFromSupply us
>     +              (offset, entry) = mkEntry (mkBlockId uniq) conv args
>     +              blks = initUs_ us' $ lgraphOfAGraph $ entry <*> blocks
>     }
> 
> The new codegen has this hunk instead:
> 
>         ; let (offset, entry) = mkCallEntry conv args
>               blks = initUs_ us $ lgraphOfAGraph $ entry <*> blocks
> 
> and it's not clear to me if this circumvents the previous bug
> or mkCallEntry needs to be modified to expose the new supply.

The problem was that "us" was being used twice. If it's now only used
once then no problem.


Thanks
Ian




More information about the Glasgow-haskell-users mailing list