Skip to content
  • Jakob Stoklund Olesen's avatar
    Defer SplitKit value mapping until all defs are available. · dca2917e
    Jakob Stoklund Olesen authored
    The greedy register allocator revealed some problems with the value mapping in
    SplitKit. We would sometimes start mapping values before all defs were known,
    and that could change a value from a simple 1-1 mapping to a multi-def mapping
    that requires ssa update.
    
    The new approach collects all defs and register assignments first without
    filling in any live intervals. Only when finish() is called, do we compute
    liveness and mapped values. At this time we know with certainty which values map
    to multiple values in a split range.
    
    This also has the advantage that we can compute live ranges based on the
    remaining uses after rematerializing at split points.
    
    The current implementation has many opportunities for compile time optimization.
    
    llvm-svn: 124765
    dca2917e
Loading