added a method to get reg num after register allocation

llvm-svn: 596
This commit is contained in:
Ruchira Sasanka 2001-09-15 21:11:48 +00:00
parent 8efbd10c86
commit 3a3bb0d68c
1 changed files with 8 additions and 0 deletions

View 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;
}
};