Adjust to new interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5314 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
index 724dbc7..007d075 100644
--- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
@@ -6,8 +6,8 @@
#include "llvm/CodeGen/RegisterAllocation.h"
#include "RegAllocCommon.h"
+#include "RegClass.h"
#include "llvm/CodeGen/IGNode.h"
-#include "llvm/CodeGen/RegClass.h"
#include "llvm/CodeGen/PhyRegAlloc.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineInstrAnnot.h"
@@ -654,7 +654,7 @@
MachineOperand& Op = MInst->getOperand(OpNum);
bool isDef = MInst->operandIsDefined(OpNum);
bool isDefAndUse = MInst->operandIsDefinedAndUsed(OpNum);
- unsigned RegType = MRI.getRegType( LR );
+ unsigned RegType = MRI.getRegType(LR);
int SpillOff = LR->getSpillOffFromFP();
RegClass *RC = LR->getRegClass();
const ValueSet &LVSetBef = LVI->getLiveVarSetBeforeMInst(MInst, BB);
@@ -888,7 +888,7 @@
if (MInst->getOperandType(OpNum) == MachineOperand::MO_VirtualRegister ||
MInst->getOperandType(OpNum) == MachineOperand::MO_CCRegister)
if (const Value* Val = Op.getVRegValue())
- if (MRI.getRegClassIDOfValue(Val) == RC->getID())
+ if (MRI.getRegClassIDOfType(Val->getType()) == RC->getID())
if (Op.getAllocatedRegNum() == -1)
if (LiveRange *LROfVal = LRI.getLiveRangeForValue(Val))
if (LROfVal->hasColor() )