Patchwork reorg.c janitor patch: use return hard_reg_set_intersect_p

login
register
mail settings
Submitter Steven Bosscher
Date Nov. 25, 2012, 11:50 a.m.
Message ID <CABu31nMxh-nC64QZLvCfeAPRwediTiyk_pHwu8xveHG44zuSeQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/201527/
State New
Headers show

Comments

Steven Bosscher - Nov. 25, 2012, 11:50 a.m.
One to be committed as obvious.

        * reorg.c (resource_conflicts_p): Use hard_reg_set_intersect_p.

Patch

Index: reorg.c
===================================================================
--- reorg.c     (revision 193787)
+++ reorg.c     (working copy)
@@ -292,18 +292,7 @@  resource_conflicts_p (struct resources *res1, stru
       || res1->volatil || res2->volatil)
     return 1;

-#ifdef HARD_REG_SET
-  return (res1->regs & res2->regs) != HARD_CONST (0);
-#else
-  {
-    int i;
-
-    for (i = 0; i < HARD_REG_SET_LONGS; i++)
-      if ((res1->regs[i] & res2->regs[i]) != 0)
-       return 1;
-    return 0;
-  }
-#endif
+  return hard_reg_set_intersect_p (res1->regs, res2->regs);
 }

 /* Return TRUE if any resource marked in RES, a `struct resources', is