Mesa (master): i965/fs: Use overwrites_reg() instead of dst.equals().

Matt Turner mattst88 at kemper.freedesktop.org
Fri Aug 28 18:27:04 UTC 2015


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

Author: Matt Turner <mattst88 at gmail.com>
Date:   Tue Aug 18 17:10:44 2015 -0700

i965/fs: Use overwrites_reg() instead of dst.equals().

equals() returns false for registers with different types, using it
isn't appropriate to determine whether an is overwriting a register.

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
index 72e8738..218cc61 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
@@ -128,8 +128,8 @@ can_coalesce_vars(brw::fs_live_variables *live_intervals,
       if (scan_ip > live_intervals->end[var_to])
          return true;
 
-      if (scan_inst->dst.equals(inst->dst) ||
-          scan_inst->dst.equals(inst->src[0]))
+      if (scan_inst->overwrites_reg(inst->dst) ||
+          scan_inst->overwrites_reg(inst->src[0]))
          return false;
    }
 




More information about the mesa-commit mailing list