Mesa (master): util: Use reg_belongs_to_class instead of BITSET_TEST

Jason Ekstrand jekstrand at kemper.freedesktop.org
Fri Oct 24 23:25:37 UTC 2014


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

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Fri Oct  3 18:08:12 2014 -0700

util: Use reg_belongs_to_class instead of BITSET_TEST

This shouldn't be a functional change since reg_belongs_to_class is just a
wrapper around BITSET_TEST.  It just makes the code a little easier to
read.

Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/util/register_allocate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c
index afab9dd..6cf7ce7 100644
--- a/src/util/register_allocate.c
+++ b/src/util/register_allocate.c
@@ -335,7 +335,7 @@ ra_set_finalize(struct ra_regs *regs, unsigned int **q_values)
 
 	    for (i = 0; i < regs->regs[rc].num_conflicts; i++) {
 	       unsigned int rb = regs->regs[rc].conflict_list[i];
-	       if (BITSET_TEST(regs->classes[b]->regs, rb))
+	       if (reg_belongs_to_class(rb, regs->classes[b]))
 		  conflicts++;
 	    }
 	    max_conflicts = MAX2(max_conflicts, conflicts);




More information about the mesa-commit mailing list