aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-19 01:10:55 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-19 01:10:55 +0000
commit04319bb2bda50d2ae7cc284cb1c4e742b44a466b (patch)
treef0fa3e561f9e6c05c18cee7ecd11d04bcb3926e5
parentf66d9069cff9ee8b3658b92d3a13d04d198ada91 (diff)
This is needed by assignment verification in linear-scan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11618 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/MRegisterInfo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h
index 7df0c9ff30..ce39f09ac7 100644
--- a/include/llvm/Target/MRegisterInfo.h
+++ b/include/llvm/Target/MRegisterInfo.h
@@ -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;