From aa8dad5561f148d4706612549808d024f5bc43cb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 15 Dec 2002 18:40:01 +0000 Subject: [PATCH] * Rename const_regclass_begin/end to just regclass_begin/end * Regclass iterators need an extra level of pointerness to work right * Pull inverse mapping code out of target description files git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5046 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/MRegisterInfo.h | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h index 577d59c93aa..b7613c4d0da 100644 --- a/include/llvm/Target/MRegisterInfo.h +++ b/include/llvm/Target/MRegisterInfo.h @@ -10,7 +10,6 @@ #define LLVM_TARGET_MREGISTERINFO_H #include "llvm/CodeGen/MachineBasicBlock.h" -#include #include class Type; @@ -61,15 +60,6 @@ public: virtual unsigned getDataSize() const { return 0; } - void - buildReg2RegClassMap(std::map& - Reg2RegClassMap) const - { - for (unsigned i=0; i < getNumRegs(); ++i) { - Reg2RegClassMap[getRegister(i)] = this; - } - } - //const std::vector &getRegsInClass(void) { return Regs; } //void getAliases(void); }; @@ -156,23 +146,13 @@ public: virtual unsigned getStackPointer() const = 0; /// Register class iterators - typedef const TargetRegisterClass* const_iterator; + typedef const TargetRegisterClass** const_iterator; - virtual const_iterator const_regclass_begin() const = 0; - virtual const_iterator const_regclass_end() const = 0; + virtual const_iterator regclass_begin() const = 0; + virtual const_iterator regclass_end() const = 0; virtual unsigned getNumRegClasses() const = 0; virtual const TargetRegisterClass* getRegClassForType(const Type* Ty) const=0; - - virtual void - buildReg2RegClassMap(std::map& - Reg2RegClassMap) const { - for (MRegisterInfo::const_iterator I = const_regclass_begin(), - E = const_regclass_end(); I != E; ++I) { - I->buildReg2RegClassMap(Reg2RegClassMap); - } - } - }; #endif -- 2.34.1