diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2015-02-21 01:49:22 -0500 |
---|---|---|
committer | Connor Abbott <cwabbott0@gmail.com> | 2015-02-21 01:49:22 -0500 |
commit | a62f429cdce4100ed7044ceead43f10bdaed11e7 (patch) | |
tree | 8c93f7df9f05017d01e53737629f65d6799a79d3 | |
parent | 2d250d3a3d5cc8f6b628bbc88c6f2119fee61dc9 (diff) |
nir/dce: use nir_foreach_ssa_src()
-rw-r--r-- | src/glsl/nir/nir_opt_dce.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/nir/nir_opt_dce.c b/src/glsl/nir/nir_opt_dce.c index e0ebdc61c2..db3461bd17 100644 --- a/src/glsl/nir/nir_opt_dce.c +++ b/src/glsl/nir/nir_opt_dce.c @@ -52,12 +52,12 @@ worklist_pop(struct exec_list *worklist) } static bool -mark_live_cb(nir_src *src, void *_state) +mark_live_cb(nir_ssa_def **src, void *_state) { struct exec_list *worklist = (struct exec_list *) _state; - if (src->is_ssa && !src->ssa->parent_instr->pass_flags) { - worklist_push(worklist, src->ssa->parent_instr); + if (!(*src)->parent_instr->pass_flags) { + worklist_push(worklist, (*src)->parent_instr); } return true; @@ -155,7 +155,7 @@ nir_opt_dce_impl(nir_function_impl *impl) while (!exec_list_is_empty(worklist)) { nir_instr *instr = worklist_pop(worklist); - nir_foreach_src(instr, mark_live_cb, worklist); + nir_foreach_ssa_src(instr, mark_live_cb, worklist); } ralloc_free(worklist); |