Skip to content
  • benl's avatar
    Improve GraphColor.colorScan · 1dd44153
    benl authored
    Testing whether a node in the conflict graph is trivially 
    colorable (triv) is still a somewhat expensive operation.
    
    When we find a triv node during scanning, even though we remove
    it and its edges from the graph, this is unlikely to to make the
    nodes we've just scanned become triv - so there's not much point
    re-scanning them right away.
    
    Scanning now takes place in passes. We scan the whole graph for
    triv nodes and remove all the ones found in a batch before rescanning
    old nodes.
    
    Register allocation for SHA1.lhs now takes (just) 40% of total
    compile time with -O2 -fregs-graph on x86
    1dd44153