diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-06-27 21:26:13 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-06-27 21:26:13 +0000 |
commit | 15993f83a419950f06d2879d6701530ae6449317 (patch) | |
tree | 749e4564ae6f9d1f7c3539ccec1dfd88e1642bc9 /lib/CodeGen/CalcSpillWeights.cpp | |
parent | bea6f615eefae279e53bbb63a31d2c3c67274c45 (diff) | |
download | external_llvm-15993f83a419950f06d2879d6701530ae6449317.zip external_llvm-15993f83a419950f06d2879d6701530ae6449317.tar.gz external_llvm-15993f83a419950f06d2879d6701530ae6449317.tar.bz2 |
More refactoring. Move getRegClass from TargetOperandInfo to TargetInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CalcSpillWeights.cpp')
-rw-r--r-- | lib/CodeGen/CalcSpillWeights.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CalcSpillWeights.cpp b/lib/CodeGen/CalcSpillWeights.cpp index 5d722ee..74c43cc 100644 --- a/lib/CodeGen/CalcSpillWeights.cpp +++ b/lib/CodeGen/CalcSpillWeights.cpp @@ -188,6 +188,7 @@ void VirtRegAuxInfo::CalculateWeightAndHint(LiveInterval &li) { void VirtRegAuxInfo::CalculateRegClass(unsigned reg) { MachineRegisterInfo &MRI = MF.getRegInfo(); + const TargetInstrInfo *TII = MF.getTarget().getInstrInfo(); const TargetRegisterInfo *TRI = MF.getTarget().getRegisterInfo(); const TargetRegisterClass *OldRC = MRI.getRegClass(reg); const TargetRegisterClass *NewRC = TRI->getLargestLegalSuperClass(OldRC); @@ -203,7 +204,7 @@ void VirtRegAuxInfo::CalculateRegClass(unsigned reg) { if (I.getOperand().getSubReg()) return; const TargetRegisterClass *OpRC = - I->getDesc().getRegClass(I.getOperandNo(), TRI); + TII->getRegClass(I->getDesc(), I.getOperandNo(), TRI); if (OpRC) NewRC = getCommonSubClass(NewRC, OpRC); if (!NewRC || NewRC == OldRC) |