Add graph coloring register allocator.
authorBen.Lippmeier@anu.edu.au <unknown>
Tue, 14 Aug 2007 10:36:23 +0000 (10:36 +0000)
committerBen.Lippmeier@anu.edu.au <unknown>
Tue, 14 Aug 2007 10:36:23 +0000 (10:36 +0000)
commit0f7d268d00795a58a06ae3c92ebbd14571295b84
tree3e3f1bec735d5c373f240d6478f6992c81fe2a76
parent27802c599d26c3358cb9870b6861cd32209bbe58
Add graph coloring register allocator.

Refactored linear allocator into separate liveness annotation and allocation stages.
Added graph coloring allocator, use -fregs-graph to enable.
  New dump flags are
    -ddump-asm-native          -- output of cmm -> native transform.
    -ddump-asm-liveness        -- code annotated with register liveness info
    -ddump-asm-coalesce        -- output of register move coalescing
                                    (this is a separate pass when using the coloring allocator)
                                    (this could change in the future)
    -ddump-asm-regalloc        -- code after register allocation
    -ddump-asm-regalloc-stages -- blocks after each build/spill stage of coloring allocator
    -ddump-asm-conflicts       -- a global register liveness graph in graphviz format

The new register allocator will allocate some registers, but it's not
quite ready for prime-time yet. The spill code generator needs some work...
18 files changed:
compiler/cmm/PprCmm.hs
compiler/main/DynFlags.hs
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/GraphBase.hs [new file with mode: 0644]
compiler/nativeGen/GraphColor.hs [new file with mode: 0644]
compiler/nativeGen/GraphOps.hs [new file with mode: 0644]
compiler/nativeGen/GraphPpr.hs [new file with mode: 0644]
compiler/nativeGen/MachRegs.lhs
compiler/nativeGen/PprMach.hs
compiler/nativeGen/RegAllocColor.hs [new file with mode: 0644]
compiler/nativeGen/RegAllocInfo.hs
compiler/nativeGen/RegAllocLinear.hs [moved from compiler/nativeGen/RegisterAlloc.hs with 81% similarity]
compiler/nativeGen/RegArchBase.hs [new file with mode: 0644]
compiler/nativeGen/RegArchX86.hs [new file with mode: 0644]
compiler/nativeGen/RegCoalesce.hs [new file with mode: 0644]
compiler/nativeGen/RegLiveness.hs [new file with mode: 0644]
compiler/nativeGen/RegSpill.hs [new file with mode: 0644]
compiler/utils/State.hs [new file with mode: 0644]