[PATCH] D142397: [BOLT] Emit a warning about invalid entries in function-order list
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 19:41:27 PST 2023
Amir updated this revision to Diff 491590.
Amir added a comment.
Update warning messages, remove unrelated changes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142397/new/
https://reviews.llvm.org/D142397
Files:
bolt/lib/Passes/ReorderFunctions.cpp
Index: bolt/lib/Passes/ReorderFunctions.cpp
===================================================================
--- bolt/lib/Passes/ReorderFunctions.cpp
+++ bolt/lib/Passes/ReorderFunctions.cpp
@@ -333,6 +333,7 @@
case RT_USER:
{
uint32_t Index = 0;
+ uint32_t InvalidEntries = 0;
for (const std::string &Function : readFunctionOrderFile()) {
std::vector<uint64_t> FuncAddrs;
@@ -355,8 +356,10 @@
}
if (FuncAddrs.empty()) {
- errs() << "BOLT-WARNING: Reorder functions: can't find function for "
- << Function << ".\n";
+ if (opts::Verbosity >= 1)
+ errs() << "BOLT-WARNING: Reorder functions: can't find function "
+ << "for " << Function << "\n";
+ ++InvalidEntries;
continue;
}
@@ -366,17 +369,22 @@
BinaryFunction *BF = BC.getFunctionForSymbol(FuncBD->getSymbol());
if (!BF) {
- errs() << "BOLT-WARNING: Reorder functions: can't find function for "
- << Function << ".\n";
+ if (opts::Verbosity >= 1)
+ errs() << "BOLT-WARNING: Reorder functions: can't find function "
+ << "for " << Function << "\n";
+ ++InvalidEntries;
break;
}
if (!BF->hasValidIndex())
BF->setIndex(Index++);
else if (opts::Verbosity > 0)
errs() << "BOLT-WARNING: Duplicate reorder entry for " << Function
- << ".\n";
+ << "\n";
}
}
+ if (InvalidEntries)
+ errs() << "BOLT-WARNING: Reorder functions: can't find functions for "
+ << InvalidEntries << " entries in -function-order list\n";
}
break;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142397.491590.patch
Type: text/x-patch
Size: 1798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230124/9b6c557a/attachment.bin>
More information about the llvm-commits
mailing list