[llvm-commits] CVS: llvm/include/llvm/CodeGen/SSARegMap.h
Alkis Evlogimenos
alkis at cs.uiuc.edu
Fri Feb 13 12:08:02 PST 2004
Changes in directory llvm/include/llvm/CodeGen:
SSARegMap.h updated: 1.8 -> 1.9
---
Log message:
Add getNumVirtualRegs().
Whitespace cleanups.
---
Diffs of the changes: (+9 -5)
Index: llvm/include/llvm/CodeGen/SSARegMap.h
diff -u llvm/include/llvm/CodeGen/SSARegMap.h:1.8 llvm/include/llvm/CodeGen/SSARegMap.h:1.9
--- llvm/include/llvm/CodeGen/SSARegMap.h:1.8 Tue Nov 11 16:41:31 2003
+++ llvm/include/llvm/CodeGen/SSARegMap.h Fri Feb 13 12:07:06 2004
@@ -1,17 +1,17 @@
//===-- llvm/CodeGen/SSARegMap.h --------------------------------*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
-//
+//
// Map register numbers to register classes that are correctly sized (typed) to
// hold the information. Assists register allocation. Contained by
// MachineFunction, should be deleted by register allocator when it is no
// longer needed.
-//
+//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_SSAREGMAP_H
@@ -26,7 +26,7 @@
class SSARegMap {
std::vector<const TargetRegisterClass*> RegClassMap;
- unsigned rescale(unsigned Reg) {
+ unsigned rescale(unsigned Reg) {
return Reg - MRegisterInfo::FirstVirtualRegister;
}
@@ -43,6 +43,10 @@
unsigned createVirtualRegister(const TargetRegisterClass *RegClass) {
RegClassMap.push_back(RegClass);
return RegClassMap.size()+MRegisterInfo::FirstVirtualRegister-1;
+ }
+
+ unsigned getNumVirtualRegs() const {
+ return RegClassMap.size();
}
};
More information about the llvm-commits
mailing list