summaryrefslogtreecommitdiffstats
path: root/src/compiler/Makefile.sources
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2018-01-23 09:48:43 +0800
committerIan Romanick <[email protected]>2019-08-05 20:14:13 -0700
commit405de7ccb6cb0b2e38a861e9ddbb535598718734 (patch)
tree1d86d82cec62d7ccd50089a08c82b662cdb46ca9 /src/compiler/Makefile.sources
parentd24edb4b8cd6d787f7b7881e038a1e5bf9a0eab8 (diff)
nir/range-analysis: Rudimentary value range analysis pass
Most integer operations are omitted because dealing with integer overflow is hard. There are a few things that could be smarter if there was a small amount more tracking of ranges of integer types (i.e., operands are Boolean, operand values fit in 16 bits, etc.). The changes to nir_search_helpers.h are included in this patch to simplify reordering the changes to nir_opt_algebraic.py. v2: Memoize range analysis results. Without this, some shaders appear to get stuck in infinite loops. v3: Rebase on many months of Mesa changes, including 1-bit Boolean changes. v4: Rebase on "nir: Drop imov/fmov in favor of one mov instruction". v5: Use nir_alu_srcs_equal for detecting (a*a). Previously just the SSA value was compared, and this incorrectly matched (a.x*a.y). v6: Many code improvements including (but not limited to) better names, more comments, and better use of helper functions. All suggested by Caio. Rework the handling of several opcodes to use a table for mapping source ranges to a result range. This change fixed a bug that caused fmax(gt_zero, ge_zero) to be incorrectly recognized as ge_zero. Slightly tighten the range of fmul by recognizing that x*x is gt_zero if x is gt_zero. Add similar handling for -x*x. v7: Use _______ in the tables as an alias for unknown. Suggested by Caio. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler/Makefile.sources')
-rw-r--r--src/compiler/Makefile.sources2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources
index b3a9a3cc031..b59ce9b737f 100644
--- a/src/compiler/Makefile.sources
+++ b/src/compiler/Makefile.sources
@@ -319,6 +319,8 @@ NIR_FILES = \
nir/nir_phi_builder.h \
nir/nir_print.c \
nir/nir_propagate_invariant.c \
+ nir/nir_range_analysis.c \
+ nir/nir_range_analysis.h \
nir/nir_remove_dead_variables.c \
nir/nir_repair_ssa.c \
nir/nir_search.c \