added a method to get reg num after register allocation
authorRuchira Sasanka <sasanka@students.uiuc.edu>
Sat, 15 Sep 2001 21:11:48 +0000 (21:11 +0000)
committerRuchira Sasanka <sasanka@students.uiuc.edu>
Sat, 15 Sep 2001 21:11:48 +0000 (21:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@596 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineInstr.h

index cb807292292787e33b02f9c63d0168dbb5177302..339371227d2ff36938a7545167f792b51da7a10d 100644 (file)
@@ -147,6 +147,14 @@ public:
     regNum = reg;
   }
 
+  // used to get the reg number if when one is allocted (must be
+  // called only after reg alloc)
+  inline unsigned int  getAllocatedRegNum() const {
+    assert(opType == MO_VirtualRegister || opType == MO_CCRegister || 
+          opType == MO_MachineRegister);
+    return regNum;
+  }
+
  
 };