isSubRegOf() is a dup of isSubRegister.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 23 Oct 2007 06:51:50 +0000 (06:51 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 23 Oct 2007 06:51:50 +0000 (06:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43249 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/MRegisterInfo.h
lib/CodeGen/LowerSubregs.cpp

index afcadc4a1736fd153e3e289d3c903b0fc546ab99..cfe304fcd4fe73dc47f4a5e3ac03aca13c1b99eb 100644 (file)
@@ -375,17 +375,6 @@ public:
     return get(RegNo).SuperRegs;
   }
 
-  /// isSubRegOf - Predicate which returns true if RegA is a sub-register of 
-  /// RegB. Returns false otherwise.
-  ///
-  bool isSubRegOf(unsigned RegA, unsigned RegB) const {
-    const TargetRegisterDesc &RD = (*this)[RegA];
-    for (const unsigned *reg = RD.SuperRegs; *reg != 0; ++reg)
-      if (*reg == RegB)
-        return true;
-    return false;
-  }
-
   /// getName - Return the symbolic target specific name for the specified
   /// physical register.
   const char *getName(unsigned RegNo) const {
index ba2a193ca40a18acc4d40ea3d959683b060d159f..1b7f70e05ab31fa564211ce6b16e580516eec679 100644 (file)
@@ -146,7 +146,7 @@ bool LowerSubregsInstructionPass::LowerInsert(MachineInstr *MI) {
   // of the destination, we copy the subreg into the source
   // However, this is only safe if the insert instruction is the kill
   // of the source register
-  bool revCopyOrder = MRI.isSubRegOf(InsReg, DstReg);    
+  bool revCopyOrder = MRI.isSubRegister(DstReg, InsReg);
   if (revCopyOrder && InsReg != DstSubReg) {
     if (MI->getOperand(1).isKill()) {
       DstSubReg = MRI.getSubReg(SrcReg, SubIdx);