[llvm] r266616 - Silence some "initialized but unused" warnings from MSVC -- the function being called is a static function, so there's no need for an instance variable. NFC.
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 18 07:47:19 PDT 2016
Author: aaronballman
Date: Mon Apr 18 09:47:19 2016
New Revision: 266616
URL: http://llvm.org/viewvc/llvm-project?rev=266616&view=rev
Log:
Silence some "initialized but unused" warnings from MSVC -- the function being called is a static function, so there's no need for an instance variable. NFC.
Modified:
llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp?rev=266616&r1=266615&r2=266616&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.cpp Mon Apr 18 09:47:19 2016
@@ -235,13 +235,7 @@ bool SIRegisterInfo::requiresVirtualBase
int64_t SIRegisterInfo::getFrameIndexInstrOffset(const MachineInstr *MI,
int Idx) const {
-
- const MachineFunction *MF = MI->getParent()->getParent();
- const AMDGPUSubtarget &Subtarget = MF->getSubtarget<AMDGPUSubtarget>();
- const SIInstrInfo *TII
- = static_cast<const SIInstrInfo *>(Subtarget.getInstrInfo());
-
- if (!TII->isMUBUF(*MI))
+ if (!SIInstrInfo::isMUBUF(*MI))
return 0;
assert(Idx == AMDGPU::getNamedOperandIdx(MI->getOpcode(),
@@ -349,12 +343,7 @@ void SIRegisterInfo::resolveFrameIndex(M
bool SIRegisterInfo::isFrameOffsetLegal(const MachineInstr *MI,
unsigned BaseReg,
int64_t Offset) const {
- const MachineFunction *MF = MI->getParent()->getParent();
- const AMDGPUSubtarget &Subtarget = MF->getSubtarget<AMDGPUSubtarget>();
- const SIInstrInfo *TII
- = static_cast<const SIInstrInfo *>(Subtarget.getInstrInfo());
-
- return TII->isMUBUF(*MI) && isUInt<12>(Offset);
+ return SIInstrInfo::isMUBUF(*MI) && isUInt<12>(Offset);
}
const TargetRegisterClass *SIRegisterInfo::getPointerRegClass(
More information about the llvm-commits
mailing list