diff options
author | Amir Ayupov <aaupov@fb.com> | 2023-02-27 15:26:14 -0800 |
---|---|---|
committer | Amir Ayupov <aaupov@fb.com> | 2023-02-27 15:28:06 -0800 |
commit | c30ab9dcff3f692001dfe5c0d1776692c47796cb (patch) | |
tree | fb4f8632ed0b4ca6344d13e4318687c94e91f8da /bolt/lib | |
parent | 1c286acfb81813951b7cb0651db648226d327d9a (diff) | |
download | llvm-c30ab9dcff3f692001dfe5c0d1776692c47796cb.tar.gz |
[BOLT][NFC] Log reversing splitting decision
Expose log for testing purposes.
Reviewed By: #bolt, maksfb
Differential Revision: https://reviews.llvm.org/D144674
Diffstat (limited to 'bolt/lib')
-rw-r--r-- | bolt/lib/Passes/SplitFunctions.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bolt/lib/Passes/SplitFunctions.cpp b/bolt/lib/Passes/SplitFunctions.cpp index fa66d675636c..34973cecdf49 100644 --- a/bolt/lib/Passes/SplitFunctions.cpp +++ b/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 @@ void SplitFunctions::splitFunction(BinaryFunction &BF, SplitStrategy &S) { << ", 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 |