[llvm] e31a1c8 - [CodeGen] Remove getSubReg from TargetRegisterInfo. NFC (#127680)

via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 18 11:30:57 PST 2025


Author: Craig Topper
Date: 2025-02-18T11:30:48-08:00
New Revision: e31a1c828d365ef94414be965a2a330a3b69250d

URL: https://github.com/llvm/llvm-project/commit/e31a1c828d365ef94414be965a2a330a3b69250d
DIFF: https://github.com/llvm/llvm-project/commit/e31a1c828d365ef94414be965a2a330a3b69250d.diff

LOG: [CodeGen] Remove getSubReg from TargetRegisterInfo. NFC (#127680)

Users can use the version inherited from MCRegisterInfo.

This version was added by e7694f34ab6a1 to return a Register. It was
later changed to return MCRegister by bab72dd5d5122 making it identical
MCRegisterInfo.

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/TargetRegisterInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/TargetRegisterInfo.h b/llvm/include/llvm/CodeGen/TargetRegisterInfo.h
index 66fd3fb9b0526..79f014edb58c8 100644
--- a/llvm/include/llvm/CodeGen/TargetRegisterInfo.h
+++ b/llvm/include/llvm/CodeGen/TargetRegisterInfo.h
@@ -1232,13 +1232,6 @@ class TargetRegisterInfo : public MCRegisterInfo {
     return nullptr;
   }
 
-  /// Returns the physical register number of sub-register "Index"
-  /// for physical register RegNo. Return zero if the sub-register does not
-  /// exist.
-  inline MCRegister getSubReg(MCRegister Reg, unsigned Idx) const {
-    return static_cast<const MCRegisterInfo *>(this)->getSubReg(Reg, Idx);
-  }
-
   /// Some targets have non-allocatable registers that aren't technically part
   /// of the explicit callee saved register list, but should be handled as such
   /// in certain cases.


        


More information about the llvm-commits mailing list