[PATCH] D144674: [BOLT][NFC] Log reversing splitting decision
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 23 14:35:53 PST 2023
Amir created this revision.
Amir added a reviewer: bolt.
Herald added a reviewer: rafauler.
Herald added subscribers: treapster, 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.
Expose log for testing purposes.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144674
Files:
bolt/lib/Passes/SplitFunctions.cpp
Index: bolt/lib/Passes/SplitFunctions.cpp
===================================================================
--- bolt/lib/Passes/SplitFunctions.cpp
+++ bolt/lib/Passes/SplitFunctions.cpp
@@ -15,6 +15,7 @@
#include "bolt/Core/BinaryFunction.h"
#include "bolt/Core/FunctionLayout.h"
#include "bolt/Core/ParallelUtilities.h"
+#include "bolt/Utils/CommandLineOpts.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Sequence.h"
#include "llvm/ADT/SmallVector.h"
@@ -410,10 +411,11 @@
<< ", 0x" << Twine::utohexstr(ColdSize) << ">\n");
if (alignTo(OriginalHotSize, opts::SplitAlignThreshold) <=
alignTo(HotSize, opts::SplitAlignThreshold) + opts::SplitThreshold) {
- LLVM_DEBUG(dbgs() << "Reversing splitting of function " << BF << ":\n 0x"
- << Twine::utohexstr(HotSize) << ", 0x"
- << Twine::utohexstr(ColdSize) << " -> 0x"
- << Twine::utohexstr(OriginalHotSize) << '\n');
+ if (opts::Verbosity >= 2) {
+ outs() << "BOLT-INFO: Reversing splitting of function "
+ << formatv("{0}:\n {1:x}, {2:x} -> {3:x}\n", BF, HotSize,
+ ColdSize, OriginalHotSize);
+ }
// Reverse the action of createEHTrampolines(). The trampolines will be
// placed immediately before the matching destination resulting in no
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144674.499981.patch
Type: text/x-patch
Size: 1388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230223/c845028c/attachment.bin>
More information about the llvm-commits
mailing list