diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-11-08 04:46:08 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-11-08 04:46:08 +0000 |
commit | 07900bde2dba8f7727866de63d70971da4807ee2 (patch) | |
tree | 6934913c3ca770d4bcae6ff8bf1a0be17f1259a2 | |
parent | b375b89e00f40bdacec6ca138b4d9a2bab621988 (diff) | |
download | bcm5719-llvm-07900bde2dba8f7727866de63d70971da4807ee2.tar.gz bcm5719-llvm-07900bde2dba8f7727866de63d70971da4807ee2.zip |
Old file which was moved to include/llvm/Target some time back.
llvm-svn: 1184
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineRegInfo.h | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineRegInfo.h b/llvm/include/llvm/CodeGen/MachineRegInfo.h deleted file mode 100644 index 64fd29eee51..00000000000 --- a/llvm/include/llvm/CodeGen/MachineRegInfo.h +++ /dev/null @@ -1,121 +0,0 @@ -/* Title: MachineRegInfo.h - Author: Ruchira Sasanka - Date: Aug 20, 01 - Purpose: Contains the description of machine register classes. - - Notes: - - A machine will have several register classes. For each register class, the - machine has to provide a class which is derived class of the virtual class - MachineRegClass. This virtual class itself is machine independent but - the derived classes are all machine dependent. -*/ - - -#ifndef MACHINE_REG_INFO_H -#define MACHINE_REG_INFO_H - -#include "llvm/CodeGen/MachineInstr.h" - - - -// This is the virtual class which must be subclassed by all machine specific -// register classes. - - unsigned RegClassID; // integer ID of a reg class - unsigned NumOfAvailRegs; // # of avail for coloring (without SP, g0 etc) - unsigned NumOfAllRegs; // # of all registers (including SP, g0 etc - - -class MachineRegClass -{ - - private: - const unsigned RegClassID; - - public: - - virtual unsigned getRegClassID() const = 0; - - // Number of registes available for coloring (e.g., without SP, g0 etc) - virtual unsigned getNumOfAvailRegs() const = 0; - - // Number of all registers (e.g., including SP, g0 etc) - virtual unsigned getNumOfAllRegs() const = 0; - - // This method should find a color which is not used by neighbors - // (i.e., a false position in IsColorUsedArr) and - virtual void colorIGNode(IGNode * Node, bool IsColorUsedArr[] ) const = 0; - - - MachineRegClass(const unsigned ID) : RegClassID(ID) { } - - -}; - - -// include .h files that describes machine reg classes here - -#include "RegAlloc/Sparc/SparcIntRegClass.h" - -typedef vector<const MachineRegClass *> MachineRegClassArrayType; - - - -class MachineRegInfo -{ - private: - - // A vector of all machine register classes - MachineRegClassArrayType MachineRegClassArr; - - - public: - - MachineRegInfo() : MachineRegClassArr() { - - MachineRegClassArr.push_back( new SparcIntRegClass(0) ); - // RegClassArr.pushback( new SparcFloatRegClass(1) ); - // RegClassArr.pushback( new SparcFloatCCRegClass(2) ); - - if(DEBUG_RA) - cout << "Created machine register classes." << endl; - - } - - - inline unsigned int getNumOfRegClasses() const { - return MachineRegClassArr.size(); - } - - unsigned getRegClassIDOfValue (const Value *const Val) const ; - - const MachineRegClass *const getMachineRegClass(unsigned i) const { - return MachineRegClassArr[i]; - } - - inline bool isCallInst(const MachineInstr *const MI) const { - MachineOpCode Op = MI->getOpCode(); - return false; // ######################################## - // return (Op == CALL || Op == JMPL); - } - -}; - - -// This function should detrmine the register class of a value. This can be -// done on type information in the value class. The register class returned -// must be same as the array index of RegClassArr. - -unsigned MachineRegInfo::getRegClassIDOfValue (const Value *const Val) const -{ - - return 0; - -} - - - - -#endif - |