[PATCH] D157719: [AMDGPU] [SIFrameLowering] Replace LivePhysRegs with LiveRegUnits

Christudasan Devadasan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 13 22:17:55 PDT 2023

cdevadas added inline comments.

Comment at: llvm/include/llvm/CodeGen/LiveRegUnits.h:115-120
+  /// Returns true if no part of non-reserved physical register \p Reg is live
+  /// (overloaded)
+  bool available(const MachineRegisterInfo &MRI, MCPhysReg Reg) const;
+  /// Returns true if no part of physical register \p Reg is live. (overloaded)
+  bool available(MCPhysReg Reg) const;
arsenm wrote:
> This is potentially confusing, I think either they need to have separate names indicating one considers reserved registers or not. Or there should just be the one that does consider reserved registers. Can't think of a case off the top of my head where you would ever want to ignore reservations
I'm more inclined towards including the reserved reg check in the existing `available` function itself. @MatzeB can you confirm if it is really needed to keep a definition without the reserved reg check in it?

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list