diff options
author | Ian Romanick <[email protected]> | 2017-09-19 15:59:00 -0500 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2017-10-02 14:46:10 -0700 |
commit | d5361d9f01a3e3f1480e7804252fd23a3cc1dd7f (patch) | |
tree | 6c55d8ff0757872c10ac2f8d27dd5c7cad1e50ba /m4 | |
parent | 3e5cd2aba9317ba4e3eb812b8b88523a9371f86a (diff) |
glsl/ast: Generate a more compact expression to disable execution of default case
Instead of generating a sequence like:
run_default = true;
if (i == 3) // some label that appears after default
run_default = false;
if (i == 4) // some label that appears after default
run_default = false;
...
if (run_default) {
...
}
generate something like:
run_default = !((i == 3) || (i == 4) || ...);
if (run_default) {
...
}
This eliminates one use of conditional assignment, and it enables the
elimination of another.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'm4')
0 files changed, 0 insertions, 0 deletions