[llvm] [BasicBlockSections] Introduce the path cloning profile format to Bas… (PR #67214)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 22 18:19:33 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 e7497570d8b761c3d517d2872ec1b4823b0b639d 0debd899243015540b44167d4eff83de0987e2c4 -- llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h llvm/lib/CodeGen/BasicBlockSections.cpp llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp b/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
index a30b503c728e..eb5cbda696a7 100644
--- a/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
+++ b/llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
@@ -84,13 +84,13 @@ BasicBlockSectionsProfileReader::getRawProfileForFunction(
 // This profile can also specify cloning paths which instruct the compiler to
 // clone basic blocks along a path. The cloned blocks are then specified in the
 // cluster information.
-// The following profile lists two cloning paths (starting with 'p') for function
-// bar and places the total 11 blocks within two clusters. Each cloned block is
-// identified by its original block id, along with its clone id. A block cloned
-// multiple times (2 in this example) appears with distinct clone ids (2.1
-// and 2.2).
+// The following profile lists two cloning paths (starting with 'p') for
+// function bar and places the total 11 blocks within two clusters. Each cloned
+// block is identified by its original block id, along with its clone id. A
+// block cloned multiple times (2 in this example) appears with distinct clone
+// ids (2.1 and 2.2).
 // ---------------------------
-// 
+//
 // f main
 // f bar
 // p 1 2 3
@@ -255,7 +255,9 @@ Error BasicBlockSectionsProfileReader::ReadV0Profile() {
               "entry BB (0) does not begin a cluster");
 
         FI->second.RawBBProfiles.emplace_back(
-            BBProfile<ProfileBBID>({{static_cast<unsigned>(BBID), 0}, CurrentCluster, CurrentPosition++}));
+            BBProfile<ProfileBBID>({{static_cast<unsigned>(BBID), 0},
+                                    CurrentCluster,
+                                    CurrentPosition++}));
       }
       CurrentCluster++;
     } else {

``````````

</details>


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


More information about the llvm-commits mailing list