Skip to content
  • Faith Ekstrand's avatar
    i965/fs: Rewrite assign_constant_locations · 3b34ed79
    Faith Ekstrand authored
    
    
    This rewires the logic for assigning uniform locations to work in terms
    of "complex alignments".  The basic idea is that, as we walk the list of
    instructions, we keep track of the alignment and continuity requirements
    of each slot and assert that the alignments all match up.  We then use
    those alignments in the compaction stage to ensure that everything gets
    placed at a properly aligned register.  The old mechanism handled
    alignments by special-casing each of the bit sizes and placing 64-bit
    values first followed by 32-bit values.
    
    The old scheme had the advantage of never leaving a hole since all the
    64-bit values could be tightly packed and so could the 32-bit values.
    However, the new scheme has no type size special cases so it handles not
    only 32 and 64-bit types but should gracefully extend to 16 and 8-bit
    types as the need arises.
    
    Tested-by: default avatarJose Maria Casanova Crespo <jmcasanova@igalia.com>
    Reviewed-by: default avatarTopi Pohjolainen <topi.pohjolainen@intel.com>
    3b34ed79