Mesa (master): nir/from_ssa: Use instr_rewrite_dest

Jason Ekstrand jekstrand at kemper.freedesktop.org
Fri Sep 11 16:22:59 UTC 2015


Module: Mesa
Branch: master
Commit: ca11c3c0a4726d4f51436d714ef81ef9a01348ea
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca11c3c0a4726d4f51436d714ef81ef9a01348ea

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Wed Sep  9 16:03:10 2015 -0700

nir/from_ssa: Use instr_rewrite_dest

Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>

---

 src/glsl/nir/nir_from_ssa.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/glsl/nir/nir_from_ssa.c b/src/glsl/nir/nir_from_ssa.c
index 084f43d..eaf883d 100644
--- a/src/glsl/nir/nir_from_ssa.c
+++ b/src/glsl/nir/nir_from_ssa.c
@@ -512,9 +512,7 @@ rewrite_ssa_def(nir_ssa_def *def, void *void_state)
     */
    nir_dest *dest = exec_node_data(nir_dest, def, ssa);
 
-   *dest = nir_dest_for_reg(reg);
-   dest->reg.parent_instr = state->instr;
-   list_addtail(&dest->reg.def_link, &reg->defs);
+   nir_instr_rewrite_dest(state->instr, dest, nir_dest_for_reg(reg));
 
    return true;
 }




More information about the mesa-commit mailing list