aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/tests/vars_tests.cpp
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2018-07-27 13:56:35 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2018-10-15 17:29:46 -0700
commitcb126cf67a7baa86f7a048e415e30f7e6a1e5bf4 (patch)
tree11c5e70344a0b7136dfb86b908b741dae000fc9b /src/compiler/nir/tests/vars_tests.cpp
parenta02fd7000d4f1d6912d9916eea3d72b01aa4990f (diff)
nir: Separate dead write removal into its own pass
Instead of doing this as part of the existing copy_prop_vars pass. Separation makes easier to expand the scope of both passes to be more than per-block. For copy propagation, the information about valid copies comes from previous instructions; while the dead write removal depends on information from later instructions ("have any instruction used this deref before overwrite it?"). Also change the tests to use this pass (instead of copy prop vars). Note that the disabled tests continue to fail, since the standalone pass is still per-block. v2: Remove entries from dynarray instead of marking items as deleted. Use foreach_reverse. (Caio) (all from Jason) Do not cache nir_deref_path. Not worthy for this patch. Clear unused writes when hitting a call instruction. Clean up enumeration of modes for barriers. Move metadata calls to the inner function. v3: For copies, use the vector length to calculate the mask. (all from Jason) Use nir_component_mask_t when applicable. Rename functions for clarity. Consider local vars used by a call to be conservative (SPIR-V has such cases). Comment and assert the assumption that stores and copies are always to a deref that ends with a vector or scalar. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/tests/vars_tests.cpp')
-rw-r--r--src/compiler/nir/tests/vars_tests.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/compiler/nir/tests/vars_tests.cpp b/src/compiler/nir/tests/vars_tests.cpp
index 0a2ff3f3d32..eee3ad9ca52 100644
--- a/src/compiler/nir/tests/vars_tests.cpp
+++ b/src/compiler/nir/tests/vars_tests.cpp
@@ -26,9 +26,6 @@
#include "nir.h"
#include "nir_builder.h"
-/* This optimization is done together with copy propagation. */
-#define nir_opt_dead_write_vars nir_opt_copy_prop_vars
-
namespace {
class nir_vars_test : public ::testing::Test {