[llvm] [BOLT] Remove mutable from BB:LayoutIndex (PR #93224)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 14:50:30 PDT 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 7630775e3ad34c426cde91732e8e7816c2a1ef5a c269abc0dc72bbe45b86a7ad79f8a68eb1ecef8d -- bolt/include/bolt/Core/BinaryBasicBlock.h bolt/lib/Core/BinaryFunction.cpp bolt/lib/Passes/IdenticalCodeFolding.cpp bolt/lib/Profile/YAMLProfileWriter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/bolt/lib/Passes/IdenticalCodeFolding.cpp b/bolt/lib/Passes/IdenticalCodeFolding.cpp
index e43c7e1a32..1c2f247082 100644
--- a/bolt/lib/Passes/IdenticalCodeFolding.cpp
+++ b/bolt/lib/Passes/IdenticalCodeFolding.cpp
@@ -180,11 +180,11 @@ static bool isIdenticalWith(const BinaryFunction &A, const BinaryFunction &B,
const BinaryContext &BC = A.getBinaryContext();
- std::unordered_map<const BinaryBasicBlock*, unsigned> LayoutIndiciesA;
+ std::unordered_map<const BinaryBasicBlock *, unsigned> LayoutIndiciesA;
for (unsigned I = 0; I < OrderA.size(); I++)
LayoutIndiciesA[OrderA[I]] = I;
- std::unordered_map<const BinaryBasicBlock*, unsigned> LayoutIndiciesB;
+ std::unordered_map<const BinaryBasicBlock *, unsigned> LayoutIndiciesB;
for (unsigned I = 0; I < OrderB.size(); I++)
LayoutIndiciesB[OrderB[I]] = I;
diff --git a/bolt/lib/Profile/YAMLProfileWriter.cpp b/bolt/lib/Profile/YAMLProfileWriter.cpp
index f0721a2a5d..9aa2addec6 100644
--- a/bolt/lib/Profile/YAMLProfileWriter.cpp
+++ b/bolt/lib/Profile/YAMLProfileWriter.cpp
@@ -69,7 +69,7 @@ YAMLProfileWriter::convert(const BinaryFunction &BF, bool UseDFS,
llvm::copy(UseDFS ? BF.dfs() : BF.getLayout().blocks(),
std::back_inserter(Order));
- std::unordered_map<const BinaryBasicBlock*, unsigned> LayoutIndicies;
+ std::unordered_map<const BinaryBasicBlock *, unsigned> LayoutIndicies;
for (unsigned I = 0; I < Order.size(); I++)
LayoutIndicies[Order[I]] = I;
``````````
</details>
https://github.com/llvm/llvm-project/pull/93224
More information about the llvm-commits
mailing list