glsl/hierarchical_visitor: Call leave_callback on leaf nodes
authorNeil Roberts <nroberts@igalia.com>
Wed, 2 Oct 2019 21:11:48 +0000 (17:11 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 24 Mar 2020 23:21:21 +0000 (23:21 +0000)
commitc525785edc33d36bbb906d3004be213d25b9467b
treea47d467d1d990aa87f7e045c84f9d59e95610ffd
parent0e1680a1e2aa67b3cb132bdd4f615694ff9454af
glsl/hierarchical_visitor: Call leave_callback on leaf nodes

Previously for leaf ir_instructions only the enter callback was
called. This makes it a bit difficult to make a pass that wants to
visit every instruction using a stack. Making it call the leave
callback as well makes it behave less surprisingly.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3885>
src/compiler/glsl/ir_hierarchical_visitor.cpp
src/compiler/glsl/ir_hierarchical_visitor.h