projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c658b6c
)
nir: Transform expressions of b2f(a) and b2f(b) to a == b
author
Ian Romanick
<ian.d.romanick@intel.com>
Thu, 2 Aug 2018 02:34:02 +0000
(19:34 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Sat, 4 Aug 2018 08:12:03 +0000
(
01:12
-0700)
All Gen7+ platforms had similar results. (Skylake shown)
total instructions in shared programs:
14276886
->
14276838
(<.01%)
instructions in affected programs: 312 -> 264 (-15.38%)
helped: 2
HURT: 0
total cycles in shared programs:
532578395
->
532570985
(<.01%)
cycles in affected programs: 682562 -> 675152 (-1.09%)
helped: 374
HURT: 4
helped stats (abs) min: 2 max: 200 x̄: 20.39 x̃: 18
helped stats (rel) min: 0.07% max: 11.64% x̄: 1.25% x̃: 1.28%
HURT stats (abs) min: 2 max: 114 x̄: 53.50 x̃: 49
HURT stats (rel) min: 0.06% max: 11.70% x̄: 5.02% x̃: 4.15%
95% mean confidence interval for cycles value: -21.30 -17.91
95% mean confidence interval for cycles %-change: -1.30% -1.06%
Cycles are helped.
Sandy Bridge
total instructions in shared programs:
10488123
->
10488075
(<.01%)
instructions in affected programs: 336 -> 288 (-14.29%)
helped: 2
HURT: 0
total cycles in shared programs:
150260379
->
150260439
(<.01%)
cycles in affected programs: 4726 -> 4786 (1.27%)
helped: 0
HURT: 2
No changes on Iron Lake or GM45.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
src/compiler/nir/nir_opt_algebraic.py
patch
|
blob
|
history
diff --git
a/src/compiler/nir/nir_opt_algebraic.py
b/src/compiler/nir/nir_opt_algebraic.py
index c1ab9dd3c8379c050c81cc22bc1e13aeb8f15050..ac53d77383d1ae10cc1fa30d385b6bd8f7444acb 100644
(file)
--- a/
src/compiler/nir/nir_opt_algebraic.py
+++ b/
src/compiler/nir/nir_opt_algebraic.py
@@
-183,6
+183,9
@@
optimizations = [
(('feq', ('fmul', ('b2f', a), ('b2f', b)), 0.0), ('inot', ('iand', a, b))),
(('feq', ('fmin', ('b2f', a), ('b2f', b)), 0.0), ('inot', ('iand', a, b))),
(('feq', ('bcsel', a, ('b2f', b), 0.0) , 0.0), ('inot', ('iand', a, b))),
+ (('feq', ('fadd', ('b2f', a), ('fneg', ('b2f', b))), 0.0), ('ieq', a, b)),
+ (('feq', ('b2f', a) , ('b2f', b) ), ('ieq', a, b)),
+ (('feq', ('fneg', ('b2f', a)), ('fneg', ('b2f', b))), ('ieq', a, b)),
# -(b2f(a) + b2f(b)) < 0
# 0 < b2f(a) + b2f(b)