aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-03-18 03:26:48 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-03-18 03:26:48 +0000
commit705f95e0b7cb36b9f3786d4e8397f5226e4acd05 (patch)
tree901e4548e33f4bfb2cbd879afd03d26074a3b074 /lib/CodeGen
parentce0845aeba7f0b0f5bf33523755c25e2bb09eac1 (diff)
Big bug fix: getUsableUniRegAtMI needed to return values in arguments
but did not pass the arguments by reference! Also added a function to get a register class by ID. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1901 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/RegAlloc/PhyRegAlloc.h15
1 files changed, 13 insertions, 2 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);