diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-08-09 16:46:27 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-08-09 16:46:27 +0000 |
| commit | da96006975eaf438ecec4c245a0b521c08ea594d (patch) | |
| tree | f2896717f76d2b9295a6416d500435d97cc8d075 /llvm/lib/CodeGen/LiveRangeEdit.cpp | |
| parent | 7874310ba116a6d100316afa5093a2698aca7de5 (diff) | |
| download | bcm5719-llvm-da96006975eaf438ecec4c245a0b521c08ea594d.tar.gz bcm5719-llvm-da96006975eaf438ecec4c245a0b521c08ea594d.zip | |
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.
llvm-svn: 137123
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/LiveRangeEdit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp index b385fb36bbf..b23f8516536 100644 --- a/llvm/lib/CodeGen/LiveRangeEdit.cpp +++ b/llvm/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); } } |

