[llvm-commits] [llvm] r40514 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h include/llvm/CodeGen/MachineInstrBuilder.h lib/CodeGen/MachineInstr.cpp

Christopher Lamb christopher.lamb at gmail.com
Thu Jul 26 00:00:46 PDT 2007


Author: clamb
Date: Thu Jul 26 02:00:46 2007
New Revision: 40514

URL: http://llvm.org/viewvc/llvm-project?rev=40514&view=rev
Log:
Remove subreg index from MachineInstr's and also keep vregs as unsigned when adding operands.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineInstr.h
    llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h
    llvm/trunk/lib/CodeGen/MachineInstr.cpp

Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=40514&r1=40513&r2=40514&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Thu Jul 26 02:00:46 2007
@@ -76,10 +76,6 @@
     /// offset - Offset to address of global or external, only valid for
     /// MO_GlobalAddress, MO_ExternalSym and MO_ConstantPoolIndex
     int offset;
-
-    /// subReg - SubRegister number, only valid for MO_Register.  A value of 0
-    /// indicates the MO_Register has no subReg.
-    unsigned subReg;
   } auxInfo;
   
   MachineOperand() {}
@@ -178,10 +174,6 @@
         "Wrong MachineOperand accessor");
     return auxInfo.offset;
   }
-  unsigned getSubReg() const {
-    assert(isRegister() && "Wrong MachineOperand accessor");
-    return auxInfo.subReg;
-  }
   const char *getSymbolName() const {
     assert(isExternalSymbol() && "Wrong MachineOperand accessor");
     return contents.SymbolName;
@@ -267,10 +259,6 @@
         "Wrong MachineOperand accessor");
     auxInfo.offset = Offset;
   }
-  void setSubReg(unsigned subReg) {
-    assert(isRegister() && "Wrong MachineOperand accessor");
-    auxInfo.subReg = subReg;
-  }
   void setConstantPoolIndex(unsigned Idx) {
     assert(isConstantPoolIndex() && "Wrong MachineOperand accessor");
     contents.immedVal = Idx;
@@ -459,7 +447,6 @@
     Op.IsKill = IsKill;
     Op.IsDead = IsDead;
     Op.contents.RegNo = Reg;
-    Op.auxInfo.subReg = 0;
   }
 
   /// addImmOperand - Add a zero extended constant argument to the

Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=40514&r1=40513&r2=40514&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Thu Jul 26 02:00:46 2007
@@ -37,7 +37,7 @@
   /// addReg - Add a new virtual register operand...
   ///
   const
-  MachineInstrBuilder &addReg(int RegNo, bool isDef = false, bool isImp = false,
+  MachineInstrBuilder &addReg(unsigned RegNo, bool isDef = false, bool isImp = false,
                               bool isKill = false, bool isDead = false) const {
     MI->addRegOperand(RegNo, isDef, isImp, isKill, isDead);
     return *this;

Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=40514&r1=40513&r2=40514&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Thu Jul 26 02:00:46 2007
@@ -39,7 +39,6 @@
       Op.IsKill = false;
       Op.IsDead = false;
       Op.contents.RegNo = *ImpDefs;
-      Op.auxInfo.subReg = 0;
       Operands.push_back(Op);
     }
   if (TID->ImplicitUses)
@@ -51,7 +50,6 @@
       Op.IsKill = false;
       Op.IsDead = false;
       Op.contents.RegNo = *ImpUses;
-      Op.auxInfo.subReg = 0;
       Operands.push_back(Op);
     }
 }





More information about the llvm-commits mailing list