diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-19 01:10:55 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-19 01:10:55 +0000 |
commit | 04319bb2bda50d2ae7cc284cb1c4e742b44a466b (patch) | |
tree | f0fa3e561f9e6c05c18cee7ecd11d04bcb3926e5 | |
parent | f66d9069cff9ee8b3658b92d3a13d04d198ada91 (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.h | 8 |
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; |