diff options
author | Jason Ekstrand <[email protected]> | 2016-03-17 11:04:49 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-03-23 16:27:55 -0700 |
commit | 3a7cb6534c3f82482c05f6a6813308cf2cad131f (patch) | |
tree | b7a677d183d4674e76ad753e874913a472952dc1 /src/compiler/nir/nir_opt_algebraic.py | |
parent | a6f25fa7d77cbbce113b92690dc43ed2ed9a0211 (diff) |
nir/algebraic: Allow for flagging operations as being inexact
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_algebraic.py')
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 0f2bd18dd69..d788b7b1a0c 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -34,10 +34,17 @@ d = 'd' # Written in the form (<search>, <replace>) where <search> is an expression # and <replace> is either an expression or a value. An expression is -# defined as a tuple of the form (<op>, <src0>, <src1>, <src2>, <src3>) +# defined as a tuple of the form ([~]<op>, <src0>, <src1>, <src2>, <src3>) # where each source is either an expression or a value. A value can be # either a numeric constant or a string representing a variable name. # +# If the opcode in a search expression is prefixed by a '~' character, this +# indicates that the operation is inexact. Such operations will only get +# applied to SSA values that do not have the exact bit set. This should be +# used by by any optimizations that are not bit-for-bit exact. It should not, +# however, be used for backend-requested lowering operations as those need to +# happen regardless of precision. +# # Variable names are specified as "[#]name[@type]" where "#" inicates that # the given variable will only match constants and the type indicates that # the given variable will only match values from ALU instructions with the |