[llvm] [LiveRegUnits] Enhanced the register liveness check (PR #66061)

Pranav Taneja via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 22:44:03 PDT 2023


================
@@ -112,13 +112,13 @@ class LiveRegUnits {
   /// The regmask has the same format as the one in the RegMask machine operand.
   void addRegsInMask(const uint32_t *RegMask);
 
-  /// Returns true if no part of physical register \p Reg is live.
-  bool available(MCPhysReg Reg) const {
----------------
pranavTanejaAMD wrote:

The reason to keep this naming was to keep it analogous to the functions in LivePhysRegs (where "available" has the isReserved check and "contains" is also there) so that porting from LivePhysRegs to LiveRegUnits in other files can be smoother. 
Would you have suggestions on a better name for these two functions (available and contains) 

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


More information about the llvm-commits mailing list