diff options
author | Jason Ekstrand <[email protected]> | 2015-02-06 12:49:08 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-02-19 17:06:17 -0800 |
commit | 0167c38cacc00eef77d7f83d3929cdbc99378d11 (patch) | |
tree | fd2777cf170e7690ad324de1a1fb32533008d649 /src | |
parent | f481a9425cb8d70bc61c6303268a465f5a05896b (diff) |
nir/from_ssa: Use the nir_block_dominance function instead of our own
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/nir/nir_from_ssa.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/glsl/nir/nir_from_ssa.c b/src/glsl/nir/nir_from_ssa.c index 2e7add38d31..3625237dd3d 100644 --- a/src/glsl/nir/nir_from_ssa.c +++ b/src/glsl/nir/nir_from_ssa.c @@ -54,13 +54,8 @@ ssa_def_dominates(nir_ssa_def *a, nir_ssa_def *b) } else if (a->parent_instr->block == b->parent_instr->block) { return a->live_index <= b->live_index; } else { - nir_block *block = b->parent_instr->block; - while (block->imm_dom != NULL) { - if (block->imm_dom == a->parent_instr->block) - return true; - block = block->imm_dom; - } - return false; + return nir_block_dominates(a->parent_instr->block, + b->parent_instr->block); } } |