[llvm] [PGO] Skip optimizing probes that don't fit. (PR #70875)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 16:46:54 PDT 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 98a6edd38f960679e65124d52e3c61f4abd1419f 296e79df36c71d984447ea2a4296a53f29016958 -- llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp b/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
index 6092c4dd8922..6a5f04eea746 100644
--- a/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
@@ -331,11 +331,10 @@ void SampleProfileProber::instrumentOneFunc(Function &F, TargetMachine *TM) {
     // The current implementation uses the lower 16 bits of the discriminator
     // so anything larger than 0xFFFF will ignored.
     if (Index > 0xFFFF) {
-      std::string Msg = "Pseudo instrumentation incomplete for "
-                        + std::string(F.getName())
-                        + " because it's too large";
-      Ctx.diagnose(DiagnosticInfoSampleProfile(M->getName().data(), Msg,
-                                               DS_Warning));
+      std::string Msg = "Pseudo instrumentation incomplete for " +
+                        std::string(F.getName()) + " because it's too large";
+      Ctx.diagnose(
+          DiagnosticInfoSampleProfile(M->getName().data(), Msg, DS_Warning));
       continue;
     }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/70875


More information about the llvm-commits mailing list