summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/meson.build
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/nir/meson.build
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/nir/meson.build')
-rw-r--r--src/compiler/nir/meson.build2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build
index dce8eabaab5..e6b11cb8762 100644
--- a/src/compiler/nir/meson.build
+++ b/src/compiler/nir/meson.build
@@ -198,6 +198,8 @@ files_libnir = files(
'nir_phi_builder.h',
'nir_print.c',
'nir_propagate_invariant.c',
+ 'nir_range_analysis.c',
+ 'nir_range_analysis.h',
'nir_remove_dead_variables.c',
'nir_repair_ssa.c',
'nir_search.c',