diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-06-11 18:48:16 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-06-11 18:48:16 +0000 |
commit | 4cef3d818183aafc1b3adfad4140483d9ad1ad86 (patch) | |
tree | 40dc2c49a3775f4dab1ba6e09285567516db19f2 /lib/Target/Mips/MipsSEInstrInfo.cpp | |
parent | 0e33231d554b32e32e23400eb92c9aa44e0e251b (diff) | |
download | llvm-4cef3d818183aafc1b3adfad4140483d9ad1ad86.tar.gz llvm-4cef3d818183aafc1b3adfad4140483d9ad1ad86.tar.bz2 llvm-4cef3d818183aafc1b3adfad4140483d9ad1ad86.tar.xz |
[mips] Use function TargetInstrInfo::getRegClass.
No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsSEInstrInfo.cpp')
-rw-r--r-- | lib/Target/Mips/MipsSEInstrInfo.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/Mips/MipsSEInstrInfo.cpp b/lib/Target/Mips/MipsSEInstrInfo.cpp index dc453dec32..e2a33ddb69 100644 --- a/lib/Target/Mips/MipsSEInstrInfo.cpp +++ b/lib/Target/Mips/MipsSEInstrInfo.cpp @@ -389,12 +389,14 @@ void MipsSEInstrInfo::expandRetRA(MachineBasicBlock &MBB, BuildMI(MBB, I, I->getDebugLoc(), get(Opc)).addReg(Mips::RA); } -std::pair<bool, bool> MipsSEInstrInfo::compareOpndSize(unsigned Opc) const { +std::pair<bool, bool> +MipsSEInstrInfo::compareOpndSize(unsigned Opc, + const MachineFunction &MF) const { const MCInstrDesc &Desc = get(Opc); assert(Desc.NumOperands == 2 && "Unary instruction expected."); - const MipsRegisterInfo &RI = getRegisterInfo(); - unsigned DstRegSize = RI.getRegClass(Desc.OpInfo[0].RegClass)->getSize(); - unsigned SrcRegSize = RI.getRegClass(Desc.OpInfo[1].RegClass)->getSize(); + const MipsRegisterInfo *RI = &getRegisterInfo(); + unsigned DstRegSize = getRegClass(Desc, 0, RI, MF)->getSize(); + unsigned SrcRegSize = getRegClass(Desc, 1, RI, MF)->getSize(); return std::make_pair(DstRegSize > SrcRegSize, DstRegSize < SrcRegSize); } @@ -411,7 +413,7 @@ void MipsSEInstrInfo::expandCvtFPInt(MachineBasicBlock &MBB, unsigned SubIdx = (IsI64 ? Mips::sub_32 : Mips::sub_fpeven); bool DstIsLarger, SrcIsLarger; - tie(DstIsLarger, SrcIsLarger) = compareOpndSize(CvtOpc); + tie(DstIsLarger, SrcIsLarger) = compareOpndSize(CvtOpc, *MBB.getParent()); if (DstIsLarger) TmpReg = getRegisterInfo().getSubReg(DstReg, SubIdx); |