[llvm] [RegisterPressure] Remove dead defs correctly (PR #156576)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 10 07:21:50 PST 2026
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 origin/main HEAD --extensions cpp -- llvm/lib/CodeGen/RegisterPressure.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/RegisterPressure.cpp b/llvm/lib/CodeGen/RegisterPressure.cpp
index 6129b4f74..1e5825535 100644
--- a/llvm/lib/CodeGen/RegisterPressure.cpp
+++ b/llvm/lib/CodeGen/RegisterPressure.cpp
@@ -501,7 +501,7 @@ class RegisterOperandsCollector {
mergeDeadDefs(ImplicitDefs);
}
- void mergeDeadDefs(RegisterOperands &ImplicitDefs) const{
+ void mergeDeadDefs(RegisterOperands &ImplicitDefs) const {
for (const VRegMaskOrUnit &P : RegOpers.DeadDefs)
removeRegLanes(RegOpers.Defs, P);
for (const VRegMaskOrUnit &P : ImplicitDefs.Defs)
@@ -513,7 +513,8 @@ class RegisterOperandsCollector {
}
/// Push this operand's register onto the correct vectors.
- void collectOperand(const MachineOperand &MO,RegisterOperands &RegOpers) const {
+ void collectOperand(const MachineOperand &MO,
+ RegisterOperands &RegOpers) const {
if (!MO.isReg() || !MO.getReg())
return;
Register Reg = MO.getReg();
@@ -545,7 +546,8 @@ class RegisterOperandsCollector {
}
}
- void collectOperandLanes(const MachineOperand &MO,RegisterOperands &RegOpers) const {
+ void collectOperandLanes(const MachineOperand &MO,
+ RegisterOperands &RegOpers) const {
if (!MO.isReg() || !MO.getReg())
return;
Register Reg = MO.getReg();
``````````
</details>
https://github.com/llvm/llvm-project/pull/156576
More information about the llvm-commits
mailing list