[Mesa-dev] Reducing GLSL compiler optimization time

Eric Anholt eric at anholt.net
Sat Mar 12 14:41:28 PST 2011


On Sat, 12 Mar 2011 11:30:10 -0800, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On Friday, March 11, 2011 04:06:44 PM Eric Anholt wrote:
> > With the conversion of texenvprogram to producing GLSL IR, all those
> > nice little optimization passes end up slowing down our
> > combinatorial-explosion ff tests pretty significantly.  This patch
> > series reduces glean texCombine runtime overall by 20% on my gen6
> > system.  The lowest-hanging fruit at this point looks like the
> > register allocator setup, which I think a 1-entry cache would cut down
> > pretty easily.
> 
> For patches 1-7:
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> 
> On patch 2, you can do better: ir_return and ir_call (to a void function) also 
> unnecessarily descend into expression-land.
> 
> For patch 8, I don't see why you're using a hash table -and- a linked list.  
> The hash table should be sufficient.  variable_entry also wouldn't need to 
> inherit from exec_node at that point, though it -would- need an operator 
> new...I've been meaning to add macros for that boilerplate in ralloc.

opt_dead_code iterates the list, and the hash table doesn't have
anything for iterating it.

> I don't really understand patch 9.

That wasn't supposed to be in the sequence, nor was 8.  I'd been testing
the change to runtime performance, and it slipped in.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110312/d7130b74/attachment.pgp>


More information about the mesa-dev mailing list