aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-01-28 19:05:43 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-01-28 19:05:43 +0000
commit97374d40d0724b9f5620b6493db7215790f96be6 (patch)
treeece720ea13466b9ef08c87b8734e6964818accdf
parent62482e5649f055c04b85eb93dde27b889619f6d7 (diff)
Add a new (static inline) std::ostream& << AllocInfo& method. Use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11002 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/SparcV9/RegAlloc/AllocInfo.h7
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp8
2 files changed, 9 insertions, 6 deletions
diff --git a/lib/Target/SparcV9/RegAlloc/AllocInfo.h b/lib/Target/SparcV9/RegAlloc/AllocInfo.h
index 67f58a7ed0..b4407523c4 100644
--- a/lib/Target/SparcV9/RegAlloc/AllocInfo.h
+++ b/lib/Target/SparcV9/RegAlloc/AllocInfo.h
@@ -79,6 +79,13 @@ struct AllocInfo {
}
};
+static inline std::ostream &operator << (std::ostream &OS, AllocInfo &S) {
+ OS << "(Instruction " << S.Instruction << " Operand " << S.Operand
+ << " AllocState " << S.allocStateToString () << " Placement "
+ << S.Placement << ")";
+ return OS;
+}
+
} // End llvm namespace
#endif // ALLOCINFO_H
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
index a9a5f3d7fe..0f1f6d289b 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
@@ -1201,12 +1201,8 @@ void PhyRegAlloc::verifySavedState () {
std::cerr << "FnAllocState:\n";
for (unsigned i = 0; i < state.size (); ++i) {
AllocInfo &S = state[i];
- if (Insn == S.Instruction) {
- std::cerr << " (Instruction " << S.Instruction
- << ", Operand " << S.Operand
- << ", AllocState " << S.allocStateToString ()
- << ", Placement " << S.Placement << ")\n";
- }
+ if (Insn == S.Instruction)
+ std::cerr << " " << S << "\n";
}
std::cerr << "----------\n";
++Insn;