Re: darcs patch: Immediately tag initialization code to prevent untagge...

2011-03-25 Thread Edward Z. Yang
It looks like this bug is caused by the inliner refusing to inline across comments (so the actual reproduce code is): Y = Hp + 4 Z = Y + 1 // comment R1 = Z becomes Z = Hp + 5 // comment R1 = Z Maybe from a pretty-printing perspective this might be the right thing to

Re: darcs patch: Immediately tag initialization code to prevent untagge...

2011-03-25 Thread Simon Marlow
On 23/03/2011 13:48, Edward Z. Yang wrote: I made a different change, which, with constant folding, should be just as good: allocate a new register, so everything is kept in SSA. I've sent the updated patch. One infelicity is that the inliner doesn't seem to manage to inline: Y = Hp + 4

Re: darcs patch: Immediately tag initialization code to prevent untagge...

2011-03-23 Thread Edward Z. Yang
I made a different change, which, with constant folding, should be just as good: allocate a new register, so everything is kept in SSA. I've sent the updated patch. One infelicity is that the inliner doesn't seem to manage to inline: Y = Hp + 4 Z = Y + 1 R1 = Z into R1 = Hp + 5

Re: darcs patch: Immediately tag initialization code to prevent untagge...

2011-03-22 Thread Edward Z. Yang
It occurs to me that this patch kind of generates stupid code when no tag bit is necessary: it does: abc = Hp + 4 abc = abc So one minor adjustment would be to check if the tag bit is zero and omit the assignment. Another possibility is to pattern match on the first expression and fold t