[Mesa-dev] [PATCH 00/16] i965/fs: Bunch of new optimizations

Matt Turner mattst88 at gmail.com
Thu Dec 19 13:39:53 PST 2013


Series adds some new optimization passes and adds new capabilities to
the existing register_coalesce pass.

Short description of patches:

i965: Print reg_offset for vgrf of size > 1 in dump_instruction().

  Useful for spotting vgrfs of size > 1 in instruction dumps.

i965/fs: Fix the example about overwriting uniforms in SIMD16.

  Silly.

mesa: Add STRINGIFY macro.
i965/fs: Add and use MAX_SAMPLER_MESSAGE_SIZE definition.

  Gives meaning to a magic number.

i965/fs: Add a comment explaining how register coalescing works.
i965/fs: Assert that var < num_vars.
i965/fs: Support coalescing registers of size > 1.

  Allows coalescing big registers. Prevents an instruction count regression
  after the value numbering pass.

i965/fs: Don't search in vain for uses of dead channels.

  Small improvement to the previous patch.

i965/fs: Calculate interference better in register_coalesce.

  Another improvement to register coalescing that avoids an instruction count
  regression after value numbering.

i965/fs: Call opt_peephole_sel later in the optimization loop.

  Avoids an instruction count regression after value numbering. Unexpectedly
  a benefit by itself.

i965/fs: Add local value numbering optimization pass.

  The meat of the series: a new value numbering pass. A step toward future
  planned improvements.

i965: Add can_do_saturate() method to backend_instruction.
i965/fs: Add a saturation propagation optimization pass.

  A new pass that gives some extra opportunities to register coalescing.

i965: Compute the number of live registers at each IP.
i965: Dump the register pressure!
i965/fs: Print the maximum register pressure.

  A couple of patches from Ken to dump the sizes of virtual registers
at each instruction
  in dump_instructions() output. Hopefully useful for identifying regressions.

The composite shader-db results for the whole series are

total instructions in shared programs: 1540824 -> 1489531 (-3.33%)
instructions in affected programs:     1138683 -> 1087390 (-4.50%)
GAINED:                                45
LOST:                                  31

If benchmark changes are interesting (given the new 16-wide programs)
I plan to follow up with those results. Until then feel free to start
shooting holes in the series.


More information about the mesa-dev mailing list