These will help us do a number of things, including:
- Early return elimination.
- Dead control flow elimination.- Various optimizations, such as replacing:
if (foo) {
} if (!foo) {
}
with:
if (foo) {
} else {
}
fc7f2d2 nir/cf: add new control modification API's
src/glsl/nir/nir_control_flow.c | 62 ++++++++++++++++++++++++++++++++
src/glsl/nir/nir_control_flow.h | 75 +++++++++++++++++++++++++++++++++++++++
2 files changed, 137 insertions(+)
Upstream: cgit.freedesktop.org