mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Add "dump" method to IVUsersOneStride.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95022 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5e280a306a
commit
f7d848349e
@ -165,6 +165,11 @@ public:
|
||||
void removeUser(IVStrideUse *User) {
|
||||
Users.erase(User);
|
||||
}
|
||||
|
||||
void print(raw_ostream &OS) const;
|
||||
|
||||
/// dump - This method is used for debugging.
|
||||
void dump() const;
|
||||
};
|
||||
|
||||
class IVUsers : public LoopPass {
|
||||
|
@ -386,3 +386,26 @@ void IVStrideUse::deleted() {
|
||||
Parent->Users.erase(this);
|
||||
// this now dangles!
|
||||
}
|
||||
|
||||
void IVUsersOfOneStride::print(raw_ostream &OS) const {
|
||||
OS << "IV Users of one stride:\n";
|
||||
|
||||
if (Stride)
|
||||
OS << " Stride: " << *Stride << '\n';
|
||||
|
||||
OS << " Users:\n";
|
||||
|
||||
unsigned Count = 1;
|
||||
|
||||
for (ilist<IVStrideUse>::const_iterator
|
||||
I = Users.begin(), E = Users.end(); I != E; ++I) {
|
||||
const IVStrideUse &SU = *I;
|
||||
OS << " " << Count++ << '\n';
|
||||
OS << " Offset: " << *SU.getOffset() << '\n';
|
||||
OS << " Instr: " << *SU << '\n';
|
||||
}
|
||||
}
|
||||
|
||||
void IVUsersOfOneStride::dump() const {
|
||||
print(dbgs());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user