#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 guest):

 I already considered xor swapping (that's why I restricted my claim to MOV
 instructions). http://en.wikipedia.org/wiki/XOR_swap_algorithm advises
 against using the XOR swap trick on modern CPUs and claims it'd be more
 inefficient than a scratch location.

 Also using pure swapping doesn't sound very appealing to me. Consider a
 more complicated cycle involving more than just 2 nodes. The return value
 of the SCC doesn't give you the cycle, but a set of nodes that contains a
 cycle. It might contain leaves not involved in the cycle (as far as I
 understood it). How would you swap (!InReg 1) with (!InReg 2 and !InMem
 3)?

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

Reply via email to