Skip to content

Commit d71121b

Browse files
committed
[FieldSensitivePL] NFC: Implemented print.
The members were declared but undefined.
1 parent 7a4f3a3 commit d71121b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

lib/SIL/Utils/FieldSensitivePrunedLiveness.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,38 @@ void FieldSensitivePrunedLiveBlocks::print(llvm::raw_ostream &OS) const {
563563

564564
void FieldSensitivePrunedLiveBlocks::dump() const { print(llvm::dbgs()); }
565565

566+
//===----------------------------------------------------------------------===//
567+
// FieldSensitivePrunedLivenessBoundary
568+
//===----------------------------------------------------------------------===//
569+
570+
void FieldSensitivePrunedLivenessBoundary::print(llvm::raw_ostream &OS) const {
571+
for (auto pair : lastUsers) {
572+
auto *user = pair.first;
573+
auto bits = pair.second;
574+
OS << "last user: " << *user
575+
<< "\tat " << bits << "\n";
576+
}
577+
for (auto pair : boundaryEdges) {
578+
auto *block = pair.first;
579+
auto bits = pair.second;
580+
OS << "boundary edge: ";
581+
block->printAsOperand(OS);
582+
OS << "\n" << "\tat " << bits << "\n";
583+
}
584+
if (!deadDefs.empty()) {
585+
for (auto pair : deadDefs) {
586+
auto *deadDef = pair.first;
587+
auto bits = pair.second;
588+
OS << "dead def: " << *deadDef
589+
<< "\tat " << bits << "\n";
590+
}
591+
}
592+
}
593+
594+
void FieldSensitivePrunedLivenessBoundary::dump() const {
595+
print(llvm::dbgs());
596+
}
597+
566598
//===----------------------------------------------------------------------===//
567599
// MARK: FieldSensitiveLiveness
568600
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)