mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-18 12:29:27 +00:00
Simplify interface to creating a register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d4f9b9902
commit
e836bae30c
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user