aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SlotIndexes.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-03 20:29:41 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-03 20:29:41 +0000
commitdb4cf7e4a41c176d98bcbe3b271f81f45748a802 (patch)
tree1d0352e60cdd072735889ee99de29b47db4dec4a /llvm/lib/CodeGen/SlotIndexes.cpp
parentd8f62e2a6236a51df0ea6b8e879c491dff60fd51 (diff)
downloadllvm-db4cf7e4a41c176d98bcbe3b271f81f45748a802.zip
llvm-db4cf7e4a41c176d98bcbe3b271f81f45748a802.tar.gz
llvm-db4cf7e4a41c176d98bcbe3b271f81f45748a802.tar.bz2
Tweak debug output from SlotIndexes.
llvm-svn: 124814
Diffstat (limited to 'llvm/lib/CodeGen/SlotIndexes.cpp')
-rw-r--r--llvm/lib/CodeGen/SlotIndexes.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SlotIndexes.cpp b/llvm/lib/CodeGen/SlotIndexes.cpp
index 277cce3..6e3fa90 100644
--- a/llvm/lib/CodeGen/SlotIndexes.cpp
+++ b/llvm/lib/CodeGen/SlotIndexes.cpp
@@ -158,6 +158,7 @@ void SlotIndexes::renumberIndexes() {
// resulting numbering will match what would have been generated by the
// pass during the initial numbering of the function if the new instructions
// had been present.
+ DEBUG(dbgs() << "\n*** Renumbering SlotIndexes ***\n");
functionSize = 0;
unsigned index = 0;
@@ -203,7 +204,10 @@ void SlotIndexes::dump() const {
// Print a SlotIndex to a raw_ostream.
void SlotIndex::print(raw_ostream &os) const {
- os << entry().getIndex() << "LudS"[getSlot()];
+ if (isValid())
+ os << entry().getIndex() << "LudS"[getSlot()];
+ else
+ os << "invalid";
}
// Dump a SlotIndex to stderr.