[CodeGen] Tweak whitespace in LiveInterval printing

When printing a LiveInterval, tweak the use of single and double spaces
to try to make it clearer that the valnos are associated with the
preceding range or subrange, not the following subrange.

Compare the output before and then after this patch:
%1 [32r,144r:0)  0@32r L000000000000000C [32r,144r:0)  0@32r L00000000000000F3 [32r,32d:0)  0@32r weight:0.000000e+00
%1 [32r,144r:0) 0@32r  L000000000000000C [32r,144r:0) 0@32r  L00000000000000F3 [32r,32d:0) 0@32r  weight:0.000000e+00

Differential Revision: https://reviews.llvm.org/D113671
This commit is contained in:
Jay Foad 2021-11-11 13:31:52 +00:00
parent 9ba73b6099
commit 417add4d4e
1 changed files with 4 additions and 4 deletions

View File

@ -1020,7 +1020,7 @@ void LiveRange::print(raw_ostream &OS) const {
// Print value number info.
if (getNumValNums()) {
OS << " ";
OS << ' ';
unsigned vnum = 0;
for (const_vni_iterator i = vni_begin(), e = vni_end(); i != e;
++i, ++vnum) {
@ -1039,8 +1039,8 @@ void LiveRange::print(raw_ostream &OS) const {
}
void LiveInterval::SubRange::print(raw_ostream &OS) const {
OS << " L" << PrintLaneMask(LaneMask) << ' '
<< static_cast<const LiveRange&>(*this);
OS << " L" << PrintLaneMask(LaneMask) << ' '
<< static_cast<const LiveRange &>(*this);
}
void LiveInterval::print(raw_ostream &OS) const {
@ -1049,7 +1049,7 @@ void LiveInterval::print(raw_ostream &OS) const {
// Print subranges
for (const SubRange &SR : subranges())
OS << SR;
OS << " weight:" << Weight;
OS << " weight:" << Weight;
}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)