[llvm] [DebugInfo][RemoveDIs] Handle DPValues in SelectOptimize (PR #79005)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 08:43:19 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 535b197b8e96b816998ad4b4ee45e011fa05fba9 43ba26149f264c9e305729451487fe81fd53a5a4 -- llvm/lib/CodeGen/SelectOptimize.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/SelectOptimize.cpp b/llvm/lib/CodeGen/SelectOptimize.cpp
index 84a36d6800..d14283c521 100644
--- a/llvm/lib/CodeGen/SelectOptimize.cpp
+++ b/llvm/lib/CodeGen/SelectOptimize.cpp
@@ -496,14 +496,16 @@ void SelectOptimizeImpl::convertProfitableSIGroups(SelectGroups &ProfSIGroups) {
     auto TransferDPValues = [&](Instruction &I) {
       for (auto &DPValue : llvm::make_early_inc_range(I.getDbgValueRange())) {
         DPValue.removeFromParent();
-        EndBlock->insertDPValueBefore(&DPValue, EndBlock->getFirstInsertionPt());
+        EndBlock->insertDPValueBefore(&DPValue,
+                                      EndBlock->getFirstInsertionPt());
       }
     };
 
     // Iterate over all instructions in between SI and LastSI, not including
     // SI itself. These are all the variable assignments that happen "in the
     // middle" of the select group.
-    auto R = make_range(std::next(SI->getIterator()), std::next(LastSI->getIterator()));
+    auto R = make_range(std::next(SI->getIterator()),
+                        std::next(LastSI->getIterator()));
     llvm::for_each(R, TransferDPValues);
 
     // These are the new basic blocks for the conditional branch.

``````````

</details>


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


More information about the llvm-commits mailing list