From f58ab2a81802e73aa599b6e21db52ef78a8fd4f7 Mon Sep 17 00:00:00 2001 From: dongAxis Date: Mon, 7 Sep 2020 11:43:16 +0800 Subject: [PATCH] When dumping results of StackLifetime, it will print the following log: BB [7, 8): begin {}, end {}, livein {}, liveout {} BB [1, 2): begin {}, end {}, livein {}, liveout {} ... But it is not convenient to know what the basic block is. So I add the basic block name to it. Reviewed By: vitalybuka TestPlan: check-llvm Differential Revision: https://reviews.llvm.org/D87152 --- lib/Analysis/StackLifetime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Analysis/StackLifetime.cpp b/lib/Analysis/StackLifetime.cpp index f95a8918afb..ab5f2db7d1c 100644 --- a/lib/Analysis/StackLifetime.cpp +++ b/lib/Analysis/StackLifetime.cpp @@ -292,7 +292,7 @@ LLVM_DUMP_METHOD void StackLifetime::dumpBlockLiveness() const { const BasicBlock *BB = IT.getFirst(); const BlockLifetimeInfo &BlockInfo = BlockLiveness.find(BB)->getSecond(); auto BlockRange = BlockInstRange.find(BB)->getSecond(); - dbgs() << " BB [" << BlockRange.first << ", " << BlockRange.second + dbgs() << " BB (" << BB->getName() << ") [" << BlockRange.first << ", " << BlockRange.second << "): begin " << BlockInfo.Begin << ", end " << BlockInfo.End << ", livein " << BlockInfo.LiveIn << ", liveout " << BlockInfo.LiveOut << "\n";