[llvm] [BranchFolding] Kill common hoisted debug instructions (PR #140091)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 15 09:10:30 PDT 2025
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 HEAD~1 HEAD --extensions cpp -- llvm/lib/CodeGen/BranchFolding.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index 329c46de5..65d696c8e 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -2084,9 +2084,8 @@ bool BranchFolder::HoistCommonCodeInSuccs(MachineBasicBlock *MBB) {
assert(DI->isDebugInstr() && "Expected a debug instruction");
if (DI->isDebugRef()) {
MIRBuilder.setDebugLoc(DI->getDebugLoc());
- MIRBuilder.buildDirectDbgValue(
- 0, DI->getDebugVariable(),
- DI->getDebugExpression());
+ MIRBuilder.buildDirectDbgValue(0, DI->getDebugVariable(),
+ DI->getDebugExpression());
return;
}
@@ -2107,7 +2106,7 @@ bool BranchFolder::HoistCommonCodeInSuccs(MachineBasicBlock *MBB) {
// instruction handling code).
while (FI->isDebugOrPseudoInstr()) {
assert(FI != FE && "Unexpected end of FBB range");
- MachineBasicBlock::iterator FINext = std::next(FI) ;
+ MachineBasicBlock::iterator FINext = std::next(FI);
HoistAndKillDbgInstr(FI, Loc);
FI = FINext;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/140091
More information about the llvm-commits
mailing list