[Mesa-dev] [PATCH] nir/phi_builder: Don't recurse in value_get_block_def

Matt Turner mattst88 at gmail.com
Thu Aug 25 18:32:11 UTC 2016


On Wed, Aug 24, 2016 at 10:49 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> In some programs, we can have very deep dominance trees and the recursion
> can cause us to risk stack overflows.  Instead, we replace the recursion
> with a pair of loops, one at the start and one at the end.  This is
> functionally equivalent to what we had before and it's actually a bit
> easier to read in the new form without the recursion.
>
> Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97225

FWIW, I tested this without my patch, and it wasn't sufficient to
avoid the problem.

> Cc: mesa-stable at lists.freedesktop.org

Not sure if necessary.

Regardless, with the other comments addressed

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list