aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-01-15 21:14:01 +0000
committerChris Lattner <sabre@nondot.org>2003-01-15 21:14:01 +0000
commit9d4ed15c9ec97573703247fb4e0d3d8816eb0ef0 (patch)
tree70fda7e07ef82c32a004106a7aad5124891f398b /lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
parent0a166155e71910515b79d482e69ac52deb47db06 (diff)
Adjust to new interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAlloc/LiveRangeInfo.cpp')
-rw-r--r--lib/CodeGen/RegAlloc/LiveRangeInfo.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp b/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
index d49b1d6639..f3c22e9898 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 @@ LiveRangeInfo::createNewLiveRange(const Value* Def, bool isCC /* = false*/)
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 @@ void LiveRangeInfo::coalesceLRs()
continue;
if (MRI.getRegType(LROfDef) == MRI.getRegType(LROfUse)) {
-
// If the two RegTypes are the same
if (!RCOfDef->getInterference(LROfDef, LROfUse) ) {