mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +00:00
Add the IncludeSelf parameter to the MCSubRegIterator and MCSuperRegIterator
constructors. No functional change. Part of rdar://12906217 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182490 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
284ffa3863
commit
0e1fae4cf2
@ -421,20 +421,28 @@ public:
|
|||||||
// aliasing registers. Use these iterator classes to traverse the lists.
|
// aliasing registers. Use these iterator classes to traverse the lists.
|
||||||
|
|
||||||
/// MCSubRegIterator enumerates all sub-registers of Reg.
|
/// MCSubRegIterator enumerates all sub-registers of Reg.
|
||||||
|
/// If IncludeSelf is set, Reg itself is included in the list.
|
||||||
class MCSubRegIterator : public MCRegisterInfo::DiffListIterator {
|
class MCSubRegIterator : public MCRegisterInfo::DiffListIterator {
|
||||||
public:
|
public:
|
||||||
MCSubRegIterator(unsigned Reg, const MCRegisterInfo *MCRI) {
|
MCSubRegIterator(unsigned Reg, const MCRegisterInfo *MCRI,
|
||||||
|
bool IncludeSelf = false) {
|
||||||
init(Reg, MCRI->DiffLists + MCRI->get(Reg).SubRegs);
|
init(Reg, MCRI->DiffLists + MCRI->get(Reg).SubRegs);
|
||||||
++*this;
|
// Initially, the iterator points to Reg itself.
|
||||||
|
if (!IncludeSelf)
|
||||||
|
++*this;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// MCSuperRegIterator enumerates all super-registers of Reg.
|
/// MCSuperRegIterator enumerates all super-registers of Reg.
|
||||||
|
/// If IncludeSelf is set, Reg itself is included in the list.
|
||||||
class MCSuperRegIterator : public MCRegisterInfo::DiffListIterator {
|
class MCSuperRegIterator : public MCRegisterInfo::DiffListIterator {
|
||||||
public:
|
public:
|
||||||
MCSuperRegIterator(unsigned Reg, const MCRegisterInfo *MCRI) {
|
MCSuperRegIterator(unsigned Reg, const MCRegisterInfo *MCRI,
|
||||||
|
bool IncludeSelf = false) {
|
||||||
init(Reg, MCRI->DiffLists + MCRI->get(Reg).SuperRegs);
|
init(Reg, MCRI->DiffLists + MCRI->get(Reg).SuperRegs);
|
||||||
++*this;
|
// Initially, the iterator points to Reg itself.
|
||||||
|
if (!IncludeSelf)
|
||||||
|
++*this;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -443,7 +451,7 @@ public:
|
|||||||
class MCRegAliasIterator : public MCRegisterInfo::DiffListIterator {
|
class MCRegAliasIterator : public MCRegisterInfo::DiffListIterator {
|
||||||
public:
|
public:
|
||||||
MCRegAliasIterator(unsigned Reg, const MCRegisterInfo *MCRI,
|
MCRegAliasIterator(unsigned Reg, const MCRegisterInfo *MCRI,
|
||||||
bool IncludeSelf) {
|
bool IncludeSelf = false) {
|
||||||
init(Reg, MCRI->DiffLists + MCRI->get(Reg).Overlaps);
|
init(Reg, MCRI->DiffLists + MCRI->get(Reg).Overlaps);
|
||||||
// Initially, the iterator points to Reg itself.
|
// Initially, the iterator points to Reg itself.
|
||||||
if (!IncludeSelf)
|
if (!IncludeSelf)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user