summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveRangeEdit.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-08-09 16:46:27 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-08-09 16:46:27 +0000
commit6d1fd0b979cb88809ebb77a24f4da69e1d67606b (patch)
treeca8e4a42c2abc216b48849a0adff87ea35349d6c /lib/CodeGen/LiveRangeEdit.cpp
parent719927a68f5b8ca34bacbeb7c970f281e27cbf63 (diff)
downloadllvm-6d1fd0b979cb88809ebb77a24f4da69e1d67606b.tar.gz
llvm-6d1fd0b979cb88809ebb77a24f4da69e1d67606b.tar.bz2
llvm-6d1fd0b979cb88809ebb77a24f4da69e1d67606b.tar.xz
Move CalculateRegClass to MRI::recomputeRegClass.
This function doesn't have anything to do with spill weights, and MRI already has functions for manipulating the register class of a virtual register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r--lib/CodeGen/LiveRangeEdit.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.cpp b/lib/CodeGen/LiveRangeEdit.cpp
index b385fb36bb..b23f851653 100644
--- a/lib/CodeGen/LiveRangeEdit.cpp
+++ b/lib/CodeGen/LiveRangeEdit.cpp
@@ -319,9 +319,12 @@ void LiveRangeEdit::calculateRegClassAndHint(MachineFunction &MF,
LiveIntervals &LIS,
const MachineLoopInfo &Loops) {
VirtRegAuxInfo VRAI(MF, LIS, Loops);
+ MachineRegisterInfo &MRI = MF.getRegInfo();
for (iterator I = begin(), E = end(); I != E; ++I) {
LiveInterval &LI = **I;
- VRAI.CalculateRegClass(LI.reg);
+ if (MRI.recomputeRegClass(LI.reg, MF.getTarget()))
+ DEBUG(dbgs() << "Inflated " << PrintReg(LI.reg) << " to "
+ << MRI.getRegClass(LI.reg)->getName() << '\n');
VRAI.CalculateWeightAndHint(LI);
}
}