[llvm] [MemProf] Change the STACK_ID record to fixed width values (PR #116448)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 14:57:26 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 94eebf721a2f8630412730f51d5071816a686ea0 cffb35170a710d6e3ac71dc39b645edddb43330b --extensions cpp,h -- llvm/include/llvm/IR/ModuleSummaryIndex.h llvm/lib/Bitcode/Reader/BitcodeReader.cpp llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 039e9e865b..24a4c2e830 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -4434,7 +4434,7 @@ void ModuleBitcodeWriterBase::writePerModuleGlobalValueSummary() {
     StackIdAbbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32));
     unsigned StackIdAbbvId = Stream.EmitAbbrev(std::move(StackIdAbbv));
     SmallVector<uint32_t> Vals;
-    Vals.reserve(Index->stackIds().size()*2);
+    Vals.reserve(Index->stackIds().size() * 2);
     for (auto Id : Index->stackIds()) {
       Vals.push_back(static_cast<uint32_t>(Id >> 32));
       Vals.push_back(static_cast<uint32_t>(Id));
@@ -4634,7 +4634,7 @@ void IndexBitcodeWriter::writeCombinedGlobalValueSummary() {
     StackIdAbbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32));
     unsigned StackIdAbbvId = Stream.EmitAbbrev(std::move(StackIdAbbv));
     SmallVector<uint32_t> Vals;
-    Vals.reserve(StackIds.size()*2);
+    Vals.reserve(StackIds.size() * 2);
     for (auto Id : StackIds) {
       Vals.push_back(static_cast<uint32_t>(Id >> 32));
       Vals.push_back(static_cast<uint32_t>(Id));

``````````

</details>


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


More information about the llvm-commits mailing list