Simplify interface to creating a register

llvm-svn: 5211
This commit is contained in:
Chris Lattner 2003-01-13 00:19:18 +00:00
parent 6cd144e676
commit 5d72e6cb69
1 changed files with 5 additions and 3 deletions

View File

@ -28,10 +28,12 @@ class SSARegMap {
return RegClassMap[actualReg];
}
void addRegMap(unsigned Reg, const TargetRegisterClass* RegClass) {
assert(rescale(Reg) == RegClassMap.size() &&
"Register mapping not added in sequential order!");
/// createVirtualRegister - Create and return a new virtual register in the
/// function with the specified register class.
///
unsigned createVirtualRegister(const TargetRegisterClass *RegClass) {
RegClassMap.push_back(RegClass);
return RegClassMap.size()+MRegisterInfo::FirstVirtualRegister-1;
}
};