[GHC] #1512: NCG to handle cyclic fixups for rematching register assignment for jump blocks

GHC trac at galois.com
Mon Jul 9 06:54:41 EDT 2007


#1512: NCG to handle cyclic fixups for rematching register assignment for jump
blocks
-------------------------+--------------------------------------------------
    Reporter:  guest     |        Owner:                  
        Type:  bug       |       Status:  new             
    Priority:  normal    |    Milestone:                  
   Component:  Compiler  |      Version:                  
    Severity:  normal    |   Resolution:                  
    Keywords:            |   Difficulty:  Moderate (1 day)
          Os:  Unknown   |     Testcase:                  
Architecture:  Unknown   |  
-------------------------+--------------------------------------------------
Comment (by duncan):

 {{{
 Basically, we have to move A to B, and B to A. There is no move sequence
 that allows this without using a scratch register.
 }}}

 As Ian pointed out, actually there is!

 {{{
 x := x `xor` y;
 y := x `xor` y;
 x := x `xor` y
 }}}

 This might give you a cheaper way out than spilling and using a scratch
 register.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1512>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


More information about the Glasgow-haskell-bugs mailing list