[llvm-commits] CVS: llvm/include/llvm/CodeGen/SSARegMap.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Jan 12 18:20:05 PST 2003
Changes in directory llvm/include/llvm/CodeGen:
SSARegMap.h updated: 1.2 -> 1.3
---
Log message:
Simplify interface to creating a register
---
Diffs of the changes:
Index: llvm/include/llvm/CodeGen/SSARegMap.h
diff -u llvm/include/llvm/CodeGen/SSARegMap.h:1.2 llvm/include/llvm/CodeGen/SSARegMap.h:1.3
--- llvm/include/llvm/CodeGen/SSARegMap.h:1.2 Tue Dec 24 23:01:05 2002
+++ llvm/include/llvm/CodeGen/SSARegMap.h Sun Jan 12 18:19:18 2003
@@ -28,10 +28,12 @@
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;
}
};
More information about the llvm-commits
mailing list