diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-06-24 17:31:07 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-06-24 17:31:07 +0000 |
commit | a612d7c012a550babb4014438b0a84a3ade94e38 (patch) | |
tree | a5e0a9c0c52a915427ae531554b26dd0c921a604 /llvm/lib/CodeGen/SlotIndexes.cpp | |
parent | 8a84cd57ae9e797cf6fd88415a19ad543fdc0b39 (diff) | |
download | bcm5719-llvm-a612d7c012a550babb4014438b0a84a3ade94e38.tar.gz bcm5719-llvm-a612d7c012a550babb4014438b0a84a3ade94e38.zip |
Print the LSBs of a SlotIndex symbolically using letters referring to the
[L]oad, [u]se, [d]ef, or [S]tore slots.
This makes it easier to see if two indices refer to the same instruction,
avoiding mental mod 4 calculations.
llvm-svn: 106766
Diffstat (limited to 'llvm/lib/CodeGen/SlotIndexes.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SlotIndexes.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SlotIndexes.cpp b/llvm/lib/CodeGen/SlotIndexes.cpp index 6110ef5d2f0..7a227cf02d5 100644 --- a/llvm/lib/CodeGen/SlotIndexes.cpp +++ b/llvm/lib/CodeGen/SlotIndexes.cpp @@ -213,9 +213,11 @@ void SlotIndexes::dump() const { // Print a SlotIndex to a raw_ostream. void SlotIndex::print(raw_ostream &os) const { - os << getIndex(); + os << entry().getIndex(); if (isPHI()) os << "*"; + else + os << "LudS"[getSlot()]; } // Dump a SlotIndex to stderr. |