diff options
author | Timothy Arceri <[email protected]> | 2018-06-01 15:37:28 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-06-07 11:33:04 +1000 |
commit | 2a74296f24ba15b14602286a680ca5f344a71059 (patch) | |
tree | a4c7e47f0692eeab574dca96d797debe1e5d4ff9 /src/compiler/nir/nir_opt_gcm.c | |
parent | 1098bc5e854a1253e050fa30d16eda6ca676d4b3 (diff) |
nir: add opt_if_loop_terminator()
This pass detects potential loop terminators and moves intructions
from the non breaking branch after the if-statement.
This enables both the new opt_if_simplification() pass and loop
unrolling to potentially progress further.
Unexpectedly this change speed up shader-db run times by ~3%
Ivy Bridge shader-db results (all changes in dolphin/ubershaders):
total instructions in shared programs: 9995662 -> 9995338 (-0.00%)
instructions in affected programs: 87845 -> 87521 (-0.37%)
helped: 27
HURT: 0
total cycles in shared programs: 230931495 -> 230925015 (-0.00%)
cycles in affected programs: 56391385 -> 56384905 (-0.01%)
helped: 27
HURT: 0
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_gcm.c')
0 files changed, 0 insertions, 0 deletions