aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_search.h
Commit message (Collapse)AuthorAgeFilesLines
* nir/algebraic: add support for conditional helper functions to expressionsTimothy Arceri2017-01-121-0/+8
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Add asserts to the casting functionsJason Ekstrand2016-10-061-3/+6
| | | | | | | | | | | This makes calling nir_foo_as_bar a bit safer because we're no longer 100% trusting in the caller to ensure that it's safe. The caller still needs to do the right thing but this ensures that we catch invalid casts with an assert rather than by reading garbage data. The one downside is that we do use the casts a bit in nir_validate and it's not a validate_assert. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir/algebraic: support for power-of-two optimizationsRob Clark2016-06-031-0/+10
| | | | | | | | | | | | Some optimizations, like converting integer multiply/divide into left/ right shifts, have additional constraints on the search expression. Like requiring that a variable is a constant power of two. Support these cases by allowing a fxn name to be appended to the search var expression (ie. "a#32(is_power_of_two)"). Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/search: fix typoRob Clark2016-05-091-1/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* nir/algebraic: Add a mechanism for specifying the bit size of a valueJason Ekstrand2016-04-271-0/+2
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir/algebraic: Allow for flagging operations as being inexactJason Ekstrand2016-03-231-0/+6
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* nir: propagate bitsize information in nir_searchConnor Abbott2016-03-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | When we replace an expresion we have to compute bitsize information for the replacement. We do this in two passes to validate that bitsize information is consistent and correct: first we propagate bitsize from child nodes to parent, then we do it the other way around, starting from the original's instruction destination bitsize. v2 (Iago): - Always use nir_type_bool32 instead of nir_type_bool when generating algebraic optimizations. Before we used nir_type_bool32 with constants and nir_type_bool with variables. - Fix bool comparisons in nir_search.c to account for bitsized types. v3 (Sam): - Unpack the double constant value as unsigned long long (8 bytes) in nir_algrebraic.py. v4 (Sam): - Use helpers to get type size and base type from nir_alu_type. Signed-off-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir: move to compiler/Emil Velikov2016-01-261-0/+99
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>