[Mesa-dev] [PATCH v2 00/14] NIR dead control-flow removal
Matt Turner
mattst88 at gmail.com
Thu May 21 10:18:50 PDT 2015
On Thu, May 21, 2015 at 9:40 AM, Connor Abbott <cwabbott0 at gmail.com> wrote:
> This is the second version of my dead control-flow series. In addition
> to fixing up a few things pointed out by Jason and cleaning up a few
> other odds and ends, I've fixed a number of bugs caught by disabling
> opt_if_simplification in GLSL IR as in the last patch. In particular,
> patch 5 deals with rewriting phi nodes when deleting control flow,
> something I forgot when doing the original series.
>
> I've run the series, including the last patch which is just for testing,
> through piglit and there are no regressions except for
> shaders/glsl-const-folding-01, which is due to the last patch disabling
> the GLSL IR optimization that the test is relying on, and
> glslparsertest/shaders/correctfull.frag, which now crashes in the i965
> fs backend -- it seems to be an issue with i965, and not NIR, that was
> uncovered after NIR was made more aggressive. I've also verified that
> the public shader-db doesn't crash with this series (including the last
> patch), and manually tested some of the tricker cases, although it would
> be a good idea to run the entire thing through the private shader-db
> too.
I ran this through our shader-db. Through patch 13 gets us (on BDW):
instructions in affected programs: 3054 -> 2884 (-5.57%)
helped: 29
and disabling the GLSL IR optimization:
instructions in affected programs: 27515 -> 27913 (1.45%)
helped: 4
HURT: 150
I suspect there's still some room for improvement. Notably, the shader
that I pointed out to Jason in reply to his series enabling NIR on
Gen8+ VS isn't helped, and still contains a dead looking loop. I'll
send you the shader.
More information about the mesa-dev
mailing list