[llvm] [LiveVariables] Mark use as implicit-def if def is a subregister (PR #119446)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 12:01:51 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 62a25a4c7c3b291f0805894926419f1a64cd83f8 59393473a837dc822efc369cf775adfe5561f091 --extensions cpp -- llvm/lib/CodeGen/LiveVariables.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index e6753563a2..7de89e9d51 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -282,7 +282,8 @@ void LiveVariables::HandlePhysRegUse(Register Reg, MachineInstr &MI) {
bool IsDefinedHere = false;
for (int i = 0; i < LastPartialDef->getNumOperands(); ++i) {
auto MO = LastPartialDef->getOperand(i);
- if (!MO.isDef()) continue;
+ if (!MO.isDef())
+ continue;
if (TRI->isSubRegister(SubReg, MO.getReg())) {
IsDefinedHere = true;
break;
@@ -290,9 +291,8 @@ void LiveVariables::HandlePhysRegUse(Register Reg, MachineInstr &MI) {
}
// This part of Reg was defined before the last partial def. It's killed
// here.
- LastPartialDef->addOperand(MachineOperand::CreateReg(SubReg,
- IsDefinedHere/*IsDef*/,
- true/*IsImp*/));
+ LastPartialDef->addOperand(MachineOperand::CreateReg(
+ SubReg, IsDefinedHere /*IsDef*/, true /*IsImp*/));
PhysRegDef[SubReg] = LastPartialDef;
for (MCPhysReg SS : TRI->subregs(SubReg))
Processed.insert(SS);
``````````
</details>
https://github.com/llvm/llvm-project/pull/119446
More information about the llvm-commits
mailing list