nir/cf: add new control modification API's
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 22 Jul 2015 02:54:34 +0000 (19:54 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Aug 2015 20:31:42 +0000 (13:31 -0700)
commitfc7f2d2364a98d4ec8fb8627b03c6f84b353998c
tree39fca960bc5381465418f290f0d46b864b1eb092
parent476eb5e4a16efdbc54c4418e44b1f38989026add
nir/cf: add new control modification API's

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 {
    ...
}

Signed-off-by: Connor Abbott <connor.w.abbott@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/nir/nir_control_flow.c
src/glsl/nir/nir_control_flow.h