aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
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
commit97af98678cc943050cf23951a66c89e922cf21c4 (patch)
tree25066a7d8ec5635778a78c718e2bbfa1482ba2b5 /lib/CodeGen
parentc50f077b065a328a7ce21d97cfc0a21e5059f735 (diff)
downloadexternal_llvm-97af98678cc943050cf23951a66c89e922cf21c4.zip
external_llvm-97af98678cc943050cf23951a66c89e922cf21c4.tar.gz
external_llvm-97af98678cc943050cf23951a66c89e922cf21c4.tar.bz2
Tweak debug output from SlotIndexes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SlotIndexes.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/SlotIndexes.cpp b/lib/CodeGen/SlotIndexes.cpp
index 277cce3..6e3fa90 100644
--- a/lib/CodeGen/SlotIndexes.cpp
+++ b/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.