This is needed by assignment verification in linear-scan.
authorAlkis Evlogimenos <alkis@evlogimenos.com>
Thu, 19 Feb 2004 01:10:55 +0000 (01:10 +0000)
committerAlkis Evlogimenos <alkis@evlogimenos.com>
Thu, 19 Feb 2004 01:10:55 +0000 (01:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11618 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/MRegisterInfo.h

index 7df0c9ff307e61633159f33a28d2e4428c02fc6e..ce39f09ac78e81cd50a0a7408b76c4e9c53057c0 100644 (file)
@@ -189,6 +189,14 @@ public:
     return NumRegs;
   }
 
+  /// areAliases - Returns true if the two registers alias each other,
+  /// false otherwise
+  bool areAliases(unsigned regA, unsigned regB) const {
+    for (const unsigned *Alias = getAliasSet(regA); *Alias; ++Alias)
+      if (*Alias == regA) return true;
+    return false;
+  }
+
   virtual const unsigned* getCalleeSaveRegs() const = 0;