[PATCH] D144674: [BOLT][NFC] Log reversing splitting decision

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 15:28:12 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc30ab9dcff3f: [BOLT][NFC] Log reversing splitting decision (authored by Amir).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144674/new/

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.500941.patch
Type: text/x-patch
Size: 1388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230227/ba2d829a/attachment.bin>


More information about the llvm-commits mailing list