From a1cbf5e07679f2a24914d56dd7c64e4aa4a0529a Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Mon, 18 Mar 2002 03:18:28 +0000 Subject: [PATCH] Add function getRegClassIDOfType. getRegClassIDOfValue is now just a wrapper around this. llvm-svn: 1897 --- llvm/include/llvm/Target/TargetRegInfo.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/Target/TargetRegInfo.h b/llvm/include/llvm/Target/TargetRegInfo.h index 5f88ae9e8395..9b787bb5536a 100644 --- a/llvm/include/llvm/Target/TargetRegInfo.h +++ b/llvm/include/llvm/Target/TargetRegInfo.h @@ -14,6 +14,7 @@ class TargetMachine; class IGNode; +class Type; class Value; class LiveRangeInfo; class Method; @@ -84,9 +85,11 @@ public: // condition code register. If isCCReg is true below, the ID of the condition // code regiter class will be returned. Otherwise, the normal register // class (eg. int, float) must be returned. + virtual unsigned getRegClassIDOfType (const Type *type, + bool isCCReg = false) const =0; virtual unsigned getRegClassIDOfValue (const Value *Val, bool isCCReg = false) const =0; - + inline unsigned int getNumOfRegClasses() const { return MachineRegClassArr.size();