diff options
author | Timothy Arceri <[email protected]> | 2017-01-08 23:52:59 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-12 09:47:29 +1100 |
commit | de8b03f5fbd32f12a0b8257a2ae8e4e26b5ca05b (patch) | |
tree | aacd90ecec83d300f8279e716746f58d6c154438 /src/compiler/nir/nir_search_helpers.h | |
parent | 7acc8652268205a266068ea4d059eccce43e1f78 (diff) |
nir: don't turn ieq/ine into inot if used by an if
Otherwise we will end up with an extra instruction to compare the
result of the inot.
On BDW:
total instructions in shared programs: 13060620 -> 13060481 (-0.00%)
instructions in affected programs: 103379 -> 103240 (-0.13%)
helped: 127
HURT: 0
total cycles in shared programs: 256590950 -> 256587408 (-0.00%)
cycles in affected programs: 11324730 -> 11321188 (-0.03%)
helped: 114
HURT: 21
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_search_helpers.h')
-rw-r--r-- | src/compiler/nir/nir_search_helpers.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_search_helpers.h b/src/compiler/nir/nir_search_helpers.h index ebb77ae67aa..e925a2ba024 100644 --- a/src/compiler/nir/nir_search_helpers.h +++ b/src/compiler/nir/nir_search_helpers.h @@ -130,4 +130,10 @@ is_used_more_than_once(nir_alu_instr *instr) return true; } +static inline bool +is_not_used_by_if(nir_alu_instr *instr) +{ + return list_empty(&instr->dest.dest.ssa.if_uses); +} + #endif /* _NIR_SEARCH_ */ |