Skip to content

Commit 9d321fd

Browse files
gottesmmandrurogerz
authored andcommitted
[region-isolation] Improve the logging so that we also dump a function's demangled name when processing it in RegionAnalysis.
Just trying to improve logging to speed up triaging further. This is useful so that I can quickly find specific closures we process by using the closure numbering (e.x.: closure swiftlang#1 in XXXX).
1 parent 08c530f commit 9d321fd

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

lib/SILOptimizer/Analysis/RegionAnalysis.cpp

+19-3
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,9 @@ void InferredCallerArgumentTypeInfo::init(const Operand *op) {
11231123

11241124
namespace {
11251125

1126-
constexpr const char *SEP_STR = "╾──────────────────────────────╼\n";
1126+
constexpr StringLiteral SEP_STR = "╾──────────────────────────────╼\n";
1127+
constexpr StringLiteral PER_FUNCTION_SEP_STR =
1128+
"╾++++++++++++++++++++++++++++++╼\n";
11271129

11281130
} // namespace
11291131

@@ -1434,9 +1436,11 @@ class PartitionOpTranslator {
14341436

14351437
void gatherFlowInsensitiveInformationBeforeDataflow() {
14361438
REGIONBASEDISOLATION_LOG(llvm::dbgs()
1437-
<< ">>> Performing pre-dataflow scan to gather "
1439+
<< SEP_STR
1440+
<< "Performing pre-dataflow scan to gather "
14381441
"flow insensitive information "
1439-
<< function->getName() << ":\n");
1442+
<< function->getName() << ":\n"
1443+
<< SEP_STR);
14401444

14411445
for (auto &block : *function) {
14421446
for (auto &inst : block) {
@@ -1488,6 +1492,18 @@ class PartitionOpTranslator {
14881492
: function(function), functionArgPartition(), builder(),
14891493
partialApplyReachabilityDataflow(function, pofi), valueMap(valueMap) {
14901494
builder.translator = this;
1495+
1496+
REGIONBASEDISOLATION_LOG(
1497+
llvm::dbgs()
1498+
<< PER_FUNCTION_SEP_STR
1499+
<< "Beginning processing: " << function->getName() << '\n'
1500+
<< "Demangled: "
1501+
<< Demangle::demangleSymbolAsString(
1502+
function->getName(),
1503+
Demangle::DemangleOptions::SimplifiedUIDemangleOptions())
1504+
<< '\n'
1505+
<< PER_FUNCTION_SEP_STR);
1506+
14911507
gatherFlowInsensitiveInformationBeforeDataflow();
14921508

14931509
REGIONBASEDISOLATION_LOG(llvm::dbgs() << "Initializing Function Args:\n");

0 commit comments

Comments
 (0)