aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SplitKit.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2021-02-18 08:50:00 -0800
committerPhilip Reames <listmail@philipreames.com>2021-02-18 08:50:00 -0800
commit1dfb06d0b40e875d524b2b43fc95ce81a41ce014 (patch)
treeb154dac67139b2b0bb87a8918d899b863e445353 /llvm/lib/CodeGen/SplitKit.cpp
parent86664638898e9c3756ad17d612de1873fead6813 (diff)
downloadllvm-1dfb06d0b40e875d524b2b43fc95ce81a41ce014.zip
llvm-1dfb06d0b40e875d524b2b43fc95ce81a41ce014.tar.gz
llvm-1dfb06d0b40e875d524b2b43fc95ce81a41ce014.tar.bz2
[regalloc] Add a couple of dump routines for ease of debugging [NFC]
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.cpp')
-rw-r--r--llvm/lib/CodeGen/SplitKit.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp
index 8ffba4a..ff993b4 100644
--- a/llvm/lib/CodeGen/SplitKit.cpp
+++ b/llvm/lib/CodeGen/SplitKit.cpp
@@ -1812,3 +1812,16 @@ void SplitEditor::splitRegOutBlock(const SplitAnalysis::BlockInfo &BI,
SlotIndex From = enterIntvBefore(std::min(Idx, BI.FirstInstr));
useIntv(From, Idx);
}
+
+void SplitAnalysis::BlockInfo::print(raw_ostream &OS) const {
+ OS << "{" << printMBBReference(*MBB) << ", "
+ << "uses " << FirstInstr << " to " << LastInstr << ", "
+ << "1st def " << FirstDef << ", "
+ << (LiveIn ? "live in" : "dead in") << ", "
+ << (LiveOut ? "live out" : "dead out") << "}";
+}
+
+void SplitAnalysis::BlockInfo::dump() const {
+ print(dbgs());
+ dbgs() << "\n";
+}