[llvm-branch-commits] [llvm] [AMDGPU] Serialize WWM_REG vreg flag (PR #110229)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Oct 8 23:48:29 PDT 2024


================
@@ -3851,3 +3851,14 @@ SIRegisterInfo::getSubRegAlignmentNumBits(const TargetRegisterClass *RC,
   }
   return 0;
 }
+
+SmallVector<StringLiteral>
+SIRegisterInfo::getVRegFlagsOfReg(Register Reg,
+                                  const MachineFunction &MF) const {
+  SmallVector<StringLiteral> RegFlags;
+  const SIMachineFunctionInfo *FuncInfo = MF.getInfo<SIMachineFunctionInfo>();
+  if (FuncInfo->checkFlag(Reg, AMDGPU::VirtRegFlag::WWM_REG)) {
+    RegFlags.push_back("WWM_REG");
+  }
----------------
arsenm wrote:

```suggestion
  if (FuncInfo->checkFlag(Reg, AMDGPU::VirtRegFlag::WWM_REG))
    RegFlags.push_back("WWM_REG");
```

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


More information about the llvm-branch-commits mailing list