diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/RegAlloc/PhyRegAlloc.h | 15 | ||||
-rw-r--r-- | lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h | 15 |
2 files changed, 26 insertions, 4 deletions
diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.h b/lib/CodeGen/RegAlloc/PhyRegAlloc.h index f3aef1cdc2..ce92298587 100644 --- a/lib/CodeGen/RegAlloc/PhyRegAlloc.h +++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.h @@ -92,6 +92,17 @@ public: // main method called for allocating registers // void allocateRegisters(); + + + // access to register classes by class ID + // + const RegClass* getRegClassByID(unsigned int id) const { + return RegClassList[id]; + } + RegClass* getRegClassByID(unsigned int id) { + return RegClassList[id]; } + + private: @@ -133,8 +144,8 @@ private: int getUsableUniRegAtMI(RegClass *RC, int RegType, const MachineInstr *MInst, - const ValueSet *LVSetBef, MachineInstr *MIBef, - MachineInstr *MIAft ); + const ValueSet *LVSetBef, MachineInstr *&MIBef, + MachineInstr *&MIAft ); int getUnusedUniRegAtMI(RegClass *RC, const MachineInstr *MInst, const ValueSet *LVSetBef); diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h index f3aef1cdc2..ce92298587 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h @@ -92,6 +92,17 @@ public: // main method called for allocating registers // void allocateRegisters(); + + + // access to register classes by class ID + // + const RegClass* getRegClassByID(unsigned int id) const { + return RegClassList[id]; + } + RegClass* getRegClassByID(unsigned int id) { + return RegClassList[id]; } + + private: @@ -133,8 +144,8 @@ private: int getUsableUniRegAtMI(RegClass *RC, int RegType, const MachineInstr *MInst, - const ValueSet *LVSetBef, MachineInstr *MIBef, - MachineInstr *MIAft ); + const ValueSet *LVSetBef, MachineInstr *&MIBef, + MachineInstr *&MIAft ); int getUnusedUniRegAtMI(RegClass *RC, const MachineInstr *MInst, const ValueSet *LVSetBef); |