diff options
author | Eric Anholt <[email protected]> | 2015-03-30 10:38:21 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-03-30 12:57:45 -0700 |
commit | 8c5dcdbccb68b73d2856d9c1faafadc536e682e3 (patch) | |
tree | e8865f27d14237fdd3892b5e134f8f4d8f5404a3 /src/gallium/drivers/vc4/vc4_qir.c | |
parent | dbe67d76e0487b04a7b6081d9d46666db3c3ee3e (diff) |
vc4: Add a constant folding pass.
This cleans up some pointless operations generated by the in-driver mul24
lowering (commonly generated by making a vec4 index for a matrix in a
uniform array).
I could fill in other operations, but pretty much anything else ought to
be getting handled at the NIR level, I think.
total uniforms in shared programs: 13423 -> 13421 (-0.01%)
uniforms in affected programs: 346 -> 344 (-0.58%)
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qir.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c index e453d848096..93be98a5b6a 100644 --- a/src/gallium/drivers/vc4/vc4_qir.c +++ b/src/gallium/drivers/vc4/vc4_qir.c @@ -512,6 +512,7 @@ qir_optimize(struct vc4_compile *c) OPTPASS(qir_opt_algebraic); OPTPASS(qir_opt_cse); + OPTPASS(qir_opt_constant_folding); OPTPASS(qir_opt_copy_propagation); OPTPASS(qir_opt_dead_code); OPTPASS(qir_opt_small_immediates); |