util: Use reg_belongs_to_class instead of BITSET_TEST
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 4 Oct 2014 01:08:12 +0000 (18:08 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 24 Oct 2014 23:23:08 +0000 (16:23 -0700)
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@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/util/register_allocate.c

index afab9ddd31d8b04c9f7ed3c711770c2dd1502baa..6cf7ce721edc4934bdee1d4b3d550b10f75e0b40 100644 (file)
@@ -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);