Do conservative coalescing in register allocator
authorBen.Lippmeier@anu.edu.au <unknown>
Mon, 3 Sep 2007 16:34:04 +0000 (16:34 +0000)
committerBen.Lippmeier@anu.edu.au <unknown>
Mon, 3 Sep 2007 16:34:04 +0000 (16:34 +0000)
commita7f409e855291efece19970927156fae4e527b6e
treef6efc38fe101caad6604a3d94600a21045935c3c
parent6f69004ae9aa595ad439771fa41b0feeb118810b
Do conservative coalescing in register allocator

Avoid coalescing nodes in the register conflict graph if the
new node will not be trivially colorable. Also remove the
front end aggressive coalescing pass.

For typical Haskell code the graph coloring allocator now does
about as well as the linear allocator.

For code with a large amount of register pressure it does much
better, but takes longer.

For SHA1.lhs from darcs on x86

          spills    reloads    reg-reg-moves
          inserted   inserted  left in code   compile-time
  linear    1068      1311        229            7.69(s)
  graph      387       902        340           16.12(s)
compiler/main/DynFlags.hs
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/GraphColor.hs
compiler/nativeGen/GraphOps.hs