[PATCH] D124896: [BOLT][NFC] Make ICP::verifyProfile static
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 19:05:06 PDT 2022
Amir created this revision.
Herald added a reviewer: rafauler.
Herald added a subscriber: ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
Follow LLVM style guide suggestion to avoid function definitions in anonymous
namespaces: https://llvm.org/docs/CodingStandards.html#anonymous-namespaces
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124896
Files:
bolt/lib/Passes/IndirectCallPromotion.cpp
Index: bolt/lib/Passes/IndirectCallPromotion.cpp
===================================================================
--- bolt/lib/Passes/IndirectCallPromotion.cpp
+++ bolt/lib/Passes/IndirectCallPromotion.cpp
@@ -120,14 +120,10 @@
"for jump tables, optimize indirect jmp targets instead of indices"),
cl::init(false), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
-} // namespace opts
-
-namespace llvm {
-namespace bolt {
-namespace {
+} // namespace opts
-bool verifyProfile(std::map<uint64_t, BinaryFunction> &BFs) {
+static bool verifyProfile(std::map<uint64_t, BinaryFunction> &BFs) {
bool IsValid = true;
for (auto &BFI : BFs) {
BinaryFunction &BF = BFI.second;
@@ -152,7 +148,8 @@
return IsValid;
}
-} // namespace
+namespace llvm {
+namespace bolt {
IndirectCallPromotion::Callsite::Callsite(BinaryFunction &BF,
const IndirectCallProfile &ICP)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124896.426891.patch
Type: text/x-patch
Size: 944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220504/7a8cdf07/attachment.bin>
More information about the llvm-commits
mailing list