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/LiveRangeInfo.cpp b/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
index d49b1d6..f3c22e9 100644
--- a/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
+++ b/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
@@ -6,7 +6,7 @@
#include "llvm/CodeGen/LiveRangeInfo.h"
#include "RegAllocCommon.h"
-#include "llvm/CodeGen/RegClass.h"
+#include "RegClass.h"
#include "llvm/CodeGen/IGNode.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineFunction.h"
@@ -16,6 +16,8 @@
#include "Support/SetOperations.h"
using std::cerr;
+unsigned LiveRange::getRegClassID() const { return getRegClass()->getID(); }
+
LiveRangeInfo::LiveRangeInfo(const Function *F, const TargetMachine &tm,
std::vector<RegClass *> &RCL)
: Meth(F), TM(tm), RegClassList(RCL), MRI(tm.getRegInfo()) { }
@@ -93,7 +95,8 @@
LiveRangeMap[Def] = DefRange; // and update the map.
// set the register class of the new live range
- DefRange->setRegClass(RegClassList[MRI.getRegClassIDOfValue(Def, isCC)]);
+ DefRange->setRegClass(RegClassList[MRI.getRegClassIDOfType(Def->getType(),
+ isCC)]);
if (DEBUG_RA >= RA_DEBUG_LiveRanges) {
cerr << " Creating a LR for def ";
@@ -280,7 +283,6 @@
continue;
if (MRI.getRegType(LROfDef) == MRI.getRegType(LROfUse)) {
-
// If the two RegTypes are the same
if (!RCOfDef->getInterference(LROfDef, LROfUse) ) {