1 |
From 9ccb447e727955b924b9581f4d0301b5bac7e9f8 Mon Sep 17 00:00:00 2001 |
2 |
From: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> |
3 |
Date: Wed, 19 Dec 2018 15:23:28 -0800 |
4 |
Subject: [PATCH 53/78] nir: remove dead code from copy_prop_vars |
5 |
|
6 |
When copy_prop_vars also took care of dead write handling, intrin was |
7 |
used as part of store_to_entry. Now it isn't, so this assignment |
8 |
isn't used really used. Add a comment clarifying what happens to |
9 |
intrin. |
10 |
|
11 |
Fixes: 4dfa7adc100 "nir: Remove handling of dead writes from copy_prop_vars" |
12 |
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> |
13 |
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> |
14 |
(cherry picked from commit bbf9ee9b18b5917632e6bb74e5859398e6cea224) |
15 |
--- |
16 |
src/compiler/nir/nir_opt_copy_prop_vars.c | 2 +- |
17 |
1 file changed, 1 insertion(+), 1 deletion(-) |
18 |
|
19 |
diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c b/src/compiler/nir/nir_opt_copy_prop_vars.c |
20 |
index 29b2caba89..594c4ddd0c 100644 |
21 |
--- a/src/compiler/nir/nir_opt_copy_prop_vars.c |
22 |
+++ b/src/compiler/nir/nir_opt_copy_prop_vars.c |
23 |
@@ -721,9 +721,9 @@ copy_prop_vars_block(struct copy_prop_var_state *state, |
24 |
lookup_entry_for_deref(copies, src, nir_derefs_a_contains_b_bit); |
25 |
struct value value; |
26 |
if (try_load_from_entry(state, src_entry, b, intrin, src, &value)) { |
27 |
+ /* If load works, intrin (the copy_deref) is removed. */ |
28 |
if (value.is_ssa) { |
29 |
nir_store_deref(b, dst, value.ssa[0], 0xf); |
30 |
- intrin = nir_instr_as_intrinsic(nir_builder_last_instr(b)); |
31 |
} else { |
32 |
/* If this would be a no-op self-copy, don't bother. */ |
33 |
if (nir_compare_derefs(value.deref, dst) & nir_derefs_equal_bit) |
34 |
-- |
35 |
2.20.1 |
36 |
|