[llvm] [PseudoProbe] Extend to skip instrumenting probe into the dests of invoke (PR #79919)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 16:32:05 PST 2024


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 eac8d713a6682417d06f5ee7f90a8ce54a281df8 08940ff02cefe2c9a9cceb7c4273250fe4665efe -- llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h 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 9263909d4e..3a5dd55ff0 100644
--- a/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
+++ b/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
@@ -240,9 +240,9 @@ void SampleProfileProber::computeProbeIdForBlocks(
   // Insert pseudo probe to non-cold blocks only. This will reduce IR size as
   // well as the binary size while retaining the profile quality.
   for (auto &BB : *F) {
-      if (InvokeNormalDests.contains(&BB) || KnownColdBlocks.contains(&BB))
-        continue;
-      BlockProbeIds[&BB] = ++LastProbeId;
+    if (InvokeNormalDests.contains(&BB) || KnownColdBlocks.contains(&BB))
+      continue;
+    BlockProbeIds[&BB] = ++LastProbeId;
   }
 }
 

``````````

</details>


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


More information about the llvm-commits mailing list