diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2018-03-19 16:34:16 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-03-21 09:35:57 -0700 |
commit | 470056d37b88070b630c1e95c8590c282dff82fd (patch) | |
tree | a3b2ab7b9584f79fccdd8a809f38b88dc271696f | |
parent | e1f8c23e18e1e34ab04d5f3c084c9cce44d38553 (diff) |
nir/dead_cf: rephrase definition of a dead loop node
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/compiler/nir/nir_opt_dead_cf.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/compiler/nir/nir_opt_dead_cf.c b/src/compiler/nir/nir_opt_dead_cf.c index 53c92ecc286..b15dfdd0c91 100644 --- a/src/compiler/nir/nir_opt_dead_cf.c +++ b/src/compiler/nir/nir_opt_dead_cf.c @@ -171,20 +171,19 @@ def_not_live_out(nir_ssa_def *def, void *state) } /* - * Test if a loop is dead. A loop is dead if: + * Test if a loop is dead. A loop node is dead if: * * 1) It has no side effects (i.e. intrinsics which could possibly affect the * state of the program aside from producing an SSA value, indicated by a lack * of NIR_INTRINSIC_CAN_ELIMINATE). * - * 2) It has no phi nodes after it, since those indicate values inside the - * loop being used after the loop. + * 2) It has no phi instructions after it, since those indicate values inside + * the node being used after the node. * - * 3) If there are no phi nodes after the loop, then the only way a value - * defined inside the loop can be used outside the loop is if its definition - * dominates the block after the loop. If none of the definitions that - * dominate the loop exit are used outside the loop, then the loop is dead - * and it can be deleted. + * 3) None of the values defined inside the node is used outside the node, + * i.e. none of the definitions that dominate the node exit are used outside. + * + * If those conditions hold, then the node is dead and can be deleted. */ static bool |