|
LLVM
10.0.0
|
#include "Target/AMDGPU/SIInstrInfo.h"
Public Types | |
| enum | TargetOperandFlags { MO_MASK = 0xf, MO_NONE = 0, MO_GOTPCREL = 1, MO_GOTPCREL32 = 2, MO_GOTPCREL32_LO = 2, MO_GOTPCREL32_HI = 3, MO_REL32 = 4, MO_REL32_LO = 4, MO_REL32_HI = 5, MO_LONG_BRANCH_FORWARD = 6, MO_LONG_BRANCH_BACKWARD = 7, MO_ABS32_LO = 8, MO_ABS32_HI = 9 } |
Protected Member Functions | |
| bool | swapSourceModifiers (MachineInstr &MI, MachineOperand &Src0, unsigned Src0OpName, MachineOperand &Src1, unsigned Src1OpName) const |
| MachineInstr * | commuteInstructionImpl (MachineInstr &MI, bool NewMI, unsigned OpIdx0, unsigned OpIdx1) const override |
Definition at line 46 of file SIInstrInfo.h.
| Enumerator | |
|---|---|
| MO_MASK | |
| MO_NONE | |
| MO_GOTPCREL | |
| MO_GOTPCREL32 | |
| MO_GOTPCREL32_LO | |
| MO_GOTPCREL32_HI | |
| MO_REL32 | |
| MO_REL32_LO | |
| MO_REL32_HI | |
| MO_LONG_BRANCH_FORWARD | |
| MO_LONG_BRANCH_BACKWARD | |
| MO_ABS32_LO | |
| MO_ABS32_HI | |
Definition at line 147 of file SIInstrInfo.h.
|
explicit |
Definition at line 86 of file SIInstrInfo.cpp.
References llvm::TargetSchedModel::init().
|
override |
Definition at line 1953 of file SIInstrInfo.cpp.
References analyzeBranchImpl(), E, llvm::SmallVectorBase::empty(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getFirstTerminator(), I, and llvm_unreachable.
Referenced by commuteOpcode(), and isFunctionEntryBlock().
| bool SIInstrInfo::analyzeBranchImpl | ( | MachineBasicBlock & | MBB, |
| MachineBasicBlock::iterator | I, | ||
| MachineBasicBlock *& | TBB, | ||
| MachineBasicBlock *& | FBB, | ||
| SmallVectorImpl< MachineOperand > & | Cond, | ||
| bool | AllowModify | ||
| ) | const |
Definition at line 1910 of file SIInstrInfo.cpp.
References llvm::MachineOperand::CreateImm(), llvm::MachineBasicBlock::end(), I, and llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by analyzeBranch(), and commuteOpcode().
|
override |
Definition at line 146 of file SIInstrInfo.cpp.
References assert(), llvm::dyn_cast(), llvm::SDNode::getMachineOpcode(), llvm::AMDGPU::getNamedOperandIdx(), getNumOperandsNoGlue(), llvm::SDNode::getOperand(), llvm::ConstantSDNode::getZExtValue(), isDS(), llvm::SDNode::isMachineOpcode(), isMTBUF(), isMUBUF(), isSMRD(), and nodesHaveSameOperandValue().
Referenced by getRegisterInfo().
|
override |
Definition at line 2552 of file SIInstrInfo.cpp.
References assert(), llvm::MachineInstr::hasOrderedMemoryRef(), llvm::MachineInstr::hasUnmodeledSideEffects(), isDS(), isFLAT(), isMTBUF(), isMUBUF(), isSegmentSpecificFLAT(), isSMRD(), and llvm::MachineInstr::mayLoadOrStore().
Referenced by commuteOpcode().
| unsigned SIInstrInfo::buildExtractSubReg | ( | MachineBasicBlock::iterator | MI, |
| MachineRegisterInfo & | MRI, | ||
| MachineOperand & | SuperReg, | ||
| const TargetRegisterClass * | SuperRC, | ||
| unsigned | SubIdx, | ||
| const TargetRegisterClass * | SubRC | ||
| ) | const |
Definition at line 3861 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), and SubReg.
Referenced by buildExtractSubRegOrImm(), and extractRsrcPtr().
| MachineOperand SIInstrInfo::buildExtractSubRegOrImm | ( | MachineBasicBlock::iterator | MI, |
| MachineRegisterInfo & | MRI, | ||
| MachineOperand & | SuperReg, | ||
| const TargetRegisterClass * | SuperRC, | ||
| unsigned | SubIdx, | ||
| const TargetRegisterClass * | SubRC | ||
| ) | const |
Definition at line 3893 of file SIInstrInfo.cpp.
References llvm::MachineInstr::addOperand(), assert(), buildExtractSubReg(), llvm::MachineOperand::CreateImm(), llvm::MachineOperand::CreateReg(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumExplicitOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::isImm(), llvm_unreachable, llvm::MachineInstr::RemoveOperand(), and SubReg.
Referenced by llvm::SITargetLowering::EmitInstrWithCustomInserter(), and moveToVALU().
| MachineInstr * SIInstrInfo::buildShrunkInst | ( | MachineInstr & | MI, |
| unsigned | NewOpcode | ||
| ) | const |
Definition at line 3067 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), assert(), llvm::BuildMI(), copyFlagsToImplicitVCC(), llvm::MachineInstr::getDebugLoc(), getNamedOperand(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), and llvm::MachineOperand::getReg().
Referenced by isLiteralConstant(), and updateOperand().
| unsigned SIInstrInfo::calculateLDSSpillAddress | ( | MachineBasicBlock & | MBB, |
| MachineInstr & | MI, | ||
| RegScavenger * | RS, | ||
| unsigned | TmpReg, | ||
| unsigned | FrameOffset, | ||
| unsigned | Size | ||
| ) | const |
Definition at line 1237 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::RegScavenger::enterBasicBlock(), llvm::MachineBasicBlock::findDebugLoc(), llvm::SIRegisterInfo::findUnusedRegister(), llvm::MachineBasicBlock::front(), llvm::MachineFunction::front(), getAddNoCarry(), llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::AMDGPUMachineFunction::getLDSSize(), llvm::SIMachineFunctionInfo::getMaxFlatWorkGroupSize(), llvm::MachineBasicBlock::getParent(), llvm::SIMachineFunctionInfo::getPreloadedReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::SIMachineFunctionInfo::getTIDReg(), llvm::SIMachineFunctionInfo::hasCalculatedTID(), llvm::MachineBasicBlock::isLiveIn(), llvm::AMDGPU::isShader(), llvm::AMDGPUFunctionArgInfo::KERNARG_SEGMENT_PTR, llvm::SI::KernelInputOffsets::NGROUPS_Y, llvm::SI::KernelInputOffsets::NGROUPS_Z, Reg, llvm::RegScavenger::scavengeRegister(), llvm::SIMachineFunctionInfo::setTIDReg(), llvm::AMDGPU::HSAMD::Kernel::CodeProps::Key::WavefrontSize, llvm::AMDGPUFunctionArgInfo::WORKGROUP_ID_X, llvm::AMDGPUFunctionArgInfo::WORKGROUP_ID_Y, and llvm::AMDGPUFunctionArgInfo::WORKGROUP_ID_Z.
Referenced by getRegisterInfo().
|
override |
Definition at line 2126 of file SIInstrInfo.cpp.
References assert(), llvm::TargetRegisterClass::getID(), llvm::MachineBasicBlock::getParent(), llvm::AMDGPU::getRegBitWidth(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::SIRegisterInfo::hasVGPRs(), llvm::SIRegisterInfo::isSGPRClass(), and MRI.
Referenced by commuteOpcode().
| bool SIInstrInfo::canShrink | ( | const MachineInstr & | MI, |
| const MachineRegisterInfo & | MRI | ||
| ) | const |
Definition at line 2996 of file SIInstrInfo.cpp.
References getNamedOperand(), llvm::MachineInstr::getOpcode(), llvm::MachineOperand::getReg(), hasModifiersSet(), hasVALU32BitEncoding(), llvm::MachineOperand::isReg(), and llvm::SIRegisterInfo::isVGPR().
Referenced by isLiteralConstant(), and operator<<().
|
overrideprotected |
Definition at line 1674 of file SIInstrInfo.cpp.
References assert(), llvm::TargetInstrInfo::commuteInstructionImpl(), commuteOpcode(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), isOperandLegal(), llvm::MachineOperand::isReg(), llvm::MachineInstr::setDesc(), swapRegAndNonRegOperand(), and swapSourceModifiers().
| int SIInstrInfo::commuteOpcode | ( | unsigned | Opc | ) | const |
Definition at line 740 of file SIInstrInfo.cpp.
References llvm::AMDGPU::getCommuteOrig(), llvm::AMDGPU::getCommuteRev(), and pseudoToMCOpcode().
Referenced by commuteInstructionImpl(), commuteOpcode(), getRegisterInfo(), and legalizeOperandsVOP2().
|
inline |
Definition at line 251 of file SIInstrInfo.h.
References analyzeBranch(), analyzeBranchImpl(), areMemAccessesTriviallyDisjoint(), canInsertSelect(), commuteOpcode(), DefMI, findCommutedOpIndices(), FoldImmediate(), getAddressSpaceForPseudoSourceKind(), getBranchDestBlock(), llvm::MachineInstr::getOpcode(), insertBranch(), insertIndirectBranch(), insertSelect(), insertVectorSelect(), isBranchOffsetInRange(), isFoldableCopy(), removeBranch(), reverseBranchCondition(), and UseMI.
| void SIInstrInfo::convertNonUniformIfRegion | ( | MachineBasicBlock * | IfEntry, |
| MachineBasicBlock * | IfEnd | ||
| ) | const |
Definition at line 6074 of file SIInstrInfo.cpp.
References add(), llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::MCID::Branch, llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::erase(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), and llvm::MachineBasicBlock::insert().
Referenced by containsNewBackedge(), and getMCOpcodeFromPseudo().
| void SIInstrInfo::convertNonUniformLoopRegion | ( | MachineBasicBlock * | LoopEntry, |
| MachineBasicBlock * | LoopEnd | ||
| ) | const |
Definition at line 6099 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::MachineBasicBlock::begin(), llvm::MCID::Branch, llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), E, llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::erase(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineBasicBlock::insert(), materializeImmediate(), llvm::MachineBasicBlock::pred_begin(), and llvm::MachineBasicBlock::pred_end().
Referenced by containsNewBackedge(), and getMCOpcodeFromPseudo().
|
override |
Definition at line 2614 of file SIInstrInfo.cpp.
References add(), llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), llvm::GCNSubtarget::getConstantBusLimit(), llvm::MachineInstr::getDebugLoc(), getFoldableImm(), llvm::MachineOperand::getImm(), getNamedOperand(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), isInlineConstant(), isOperandLegal(), llvm::MachineOperand::isReg(), llvm::SIRegisterInfo::isSGPRReg(), LLVM_FALLTHROUGH, and pseudoToMCOpcode().
Referenced by getMachineCSELookAheadLimit().
|
override |
Definition at line 531 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), contains(), llvm::tgtok::Def, llvm::RegState::Define, E, llvm::RegScavenger::enterBasicBlock(), llvm::RegScavenger::FindUnusedReg(), llvm::RegScavenger::forward(), llvm::SIRegisterInfo::getHWRegIndex(), llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), llvm::SIRegisterInfo::getPhysRegClass(), llvm::MachineOperand::getReg(), llvm::SIRegisterInfo::getRegPressureLimit(), llvm::SIRegisterInfo::getRegSplitParts(), llvm::SIRegisterInfo::hasAGPRs(), llvm::SIRegisterInfo::hasVGPRs(), I, llvm::RegState::Implicit, llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm::SIRegisterInfo::isSGPRClass(), llvm::RegState::Kill, llvm::report_fatal_error(), reportIllegalCopy(), llvm::RegScavenger::scavengeRegister(), llvm::MachineOperand::setIsKill(), llvm::RegScavenger::setRegUsed(), and llvm::ArrayRef< T >::size().
Referenced by getRegisterInfo().
|
override |
Definition at line 6561 of file SIInstrInfo.cpp.
References llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::TargetInstrInfo::createPHIDestinationCopy(), and llvm::MachineBasicBlock::end().
Referenced by getMCOpcodeFromPseudo().
|
override |
Definition at line 6576 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::TargetInstrInfo::createPHISourceCopy(), llvm::MachineBasicBlock::end(), and llvm::RegState::Implicit.
Referenced by getMCOpcodeFromPseudo().
|
override |
This is used by the post-RA scheduler (SchedulePostRAList.cpp).
The post-RA version of misched uses CreateTargetMIHazardRecognizer.
Definition at line 6160 of file SIInstrInfo.cpp.
References llvm::ScheduleDAG::MF.
Referenced by getMCOpcodeFromPseudo().
|
override |
This is the hazard recognizer used at -O0 by the PostRAHazardRecognizer pass.
Definition at line 6168 of file SIInstrInfo.cpp.
|
override |
Definition at line 6173 of file SIInstrInfo.cpp.
References MO_MASK.
Referenced by getMCOpcodeFromPseudo().
| std::pair< MachineInstr *, MachineInstr * > SIInstrInfo::expandMovDPP64 | ( | MachineInstr & | MI | ) | const |
Definition at line 1573 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::APInt::ashrInPlace(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineInstr::eraseFromParent(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumExplicitOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), getReg(), llvm::MachineFunction::getRegInfo(), I, llvm::MachineOperand::isFPImm(), llvm::MachineOperand::isImm(), llvm::Register::isPhysical(), llvm::MachineOperand::isReg(), llvm::MachineRegisterInfo::isSSA(), llvm::MachineOperand::isUndef(), llvm::Register::isVirtual(), MRI, and llvm::RegState::Undef.
Referenced by expandPostRAPseudo(), getRegisterInfo(), and isIdentityValue().
|
override |
Definition at line 1380 of file SIInstrInfo.cpp.
References add(), llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MIBundleBuilder::append(), assert(), llvm::MIBundleBuilder::begin(), llvm::BuildMI(), llvm::RegState::Define, llvm::MachineInstr::eraseFromParent(), expandMovDPP64(), llvm::TargetInstrInfo::expandPostRAPseudo(), llvm::finalizeBundle(), llvm::MachineBasicBlock::findDebugLoc(), llvm::MachineOperand::getImm(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MCInstrDesc::getNumImplicitUses(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineInstr::hasUnmodeledSideEffects(), I, llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, llvm::MachineOperand::isFPImm(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isUndef(), llvm::GCNSubtarget::isWave32(), llvm::MachineInstr::mayLoad(), Reg, llvm::MachineInstr::setDesc(), SubReg, and llvm::RegState::Undef.
Referenced by getRegisterInfo().
|
override |
Definition at line 1726 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getDesc().
Referenced by commuteOpcode(), gwsIntrinToOpcode(), and tryAddToFoldList().
| bool SIInstrInfo::findCommutedOpIndices | ( | MCInstrDesc | Desc, |
| unsigned & | SrcOpIdx0, | ||
| unsigned & | SrcOpIdx1 | ||
| ) | const |
Definition at line 1732 of file SIInstrInfo.cpp.
References llvm::AMDGPU::getNamedOperandIdx(), llvm::MCInstrDesc::getOpcode(), and llvm::MCInstrDesc::isCommutable().
| void SIInstrInfo::fixImplicitOperands | ( | MachineInstr & | MI | ) | const |
Definition at line 6255 of file SIInstrInfo.cpp.
References llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getSubtarget(), llvm::MachineInstr::implicit_operands(), llvm::MachineOperand::isReg(), llvm::GCNSubtarget::isWave32(), and llvm::MachineOperand::setReg().
Referenced by llvm::SITargetLowering::finalizeLowering(), getRegClass(), insertSelect(), legalizeOperandsVOP2(), and moveToVALU().
|
final |
Definition at line 2315 of file SIInstrInfo.cpp.
References llvm::MachineInstr::addImplicitDefUseOperands(), assert(), llvm::MachineOperand::ChangeToImmediate(), llvm::tgtok::Def, llvm::MachineInstr::eraseFromParent(), llvm::GCNSubtarget::getConstantBusLimit(), llvm::MachineOperand::getImm(), getNamedOperand(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::SIRegisterInfo::getPhysRegClass(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineOperand::getSubReg(), llvm::MachineRegisterInfo::getUniqueVRegDef(), hasAnyModifiersSet(), llvm::MachineRegisterInfo::hasOneNonDBGUse(), llvm::MachineRegisterInfo::hasOneUse(), llvm::SIRegisterInfo::isAGPR(), llvm::MachineOperand::isImm(), isInlineConstant(), llvm::MachineOperand::isKill(), llvm::MachineInstr::isMoveImmediate(), llvm::Register::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::SIRegisterInfo::isSGPRClass(), llvm::SIRegisterInfo::isVGPR(), isVGPRCopy(), llvm::Register::isVirtualRegister(), legalizeOperands(), llvm::AMDGPU::OPERAND_REG_INLINE_AC_INT32, pseudoToMCOpcode(), Reg, removeModOperands(), llvm::MachineInstr::RemoveOperand(), llvm::MachineInstr::setDesc(), llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setReg(), llvm::MachineOperand::setSubReg(), and llvm::MachineInstr::untieRegOperand().
Referenced by commuteOpcode(), and legalizeGenericOperand().
|
override |
Definition at line 6598 of file SIInstrInfo.cpp.
References llvm::MachineRegisterInfo::constrainRegClass(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineInstr::isFullCopy(), and llvm::Register::isVirtual().
Referenced by getRegClass().
| MachineInstrBuilder SIInstrInfo::getAddNoCarry | ( | MachineBasicBlock & | MBB, |
| MachineBasicBlock::iterator | I, | ||
| const DebugLoc & | DL, | ||
| unsigned | DestReg | ||
| ) | const |
Return a partially built integer add instruction without carry.
Caller must add source operands. For pre-GFX9 it will generate unused carry destination operand. TODO: After GFX9 it should return a no-carry operation.
Definition at line 6198 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::RegState::Dead, llvm::RegState::Define, llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), and llvm::MachineRegisterInfo::setRegAllocationHint().
Referenced by calculateLDSSpillAddress(), llvm::SIRegisterInfo::eliminateFrameIndex(), getBufferFormatWithCompCount(), getBufferStoreFormatOpcode(), getMCOpcodeFromPseudo(), and llvm::SIRegisterInfo::materializeFrameBaseRegister().
| MachineInstrBuilder SIInstrInfo::getAddNoCarry | ( | MachineBasicBlock & | MBB, |
| MachineBasicBlock::iterator | I, | ||
| const DebugLoc & | DL, | ||
| Register | DestReg, | ||
| RegScavenger & | RS | ||
| ) | const |
Definition at line 6213 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::RegState::Dead, llvm::RegState::Define, I, llvm::RegScavenger::isRegUsed(), llvm::Register::isValid(), Register, and llvm::RegScavenger::scavengeRegister().
Definition at line 2284 of file SIInstrInfo.cpp.
References AMDGPUAS::CONSTANT_ADDRESS, llvm::PseudoSourceValue::ConstantPool, llvm::PseudoSourceValue::ExternalSymbolCallEntry, llvm::PseudoSourceValue::FixedStack, AMDGPUAS::FLAT_ADDRESS, llvm::PseudoSourceValue::GlobalValueCallEntry, llvm::PseudoSourceValue::GOT, llvm::PseudoSourceValue::JumpTable, AMDGPUAS::PRIVATE_ADDRESS, llvm::PseudoSourceValue::Stack, and llvm::PseudoSourceValue::TargetCustom.
Referenced by commuteOpcode().
|
override |
Definition at line 1765 of file SIInstrInfo.cpp.
References llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOpcode(), and llvm::MachineInstr::getOperand().
Referenced by commuteOpcode().
|
inline |
Definition at line 648 of file SIInstrInfo.h.
References llvm::SIInstrFlags::ClampHi, llvm::SIInstrFlags::ClampLo, llvm::SIInstrFlags::FPClamp, llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::IntClamp, and llvm::MCInstrDesc::TSFlags.
| uint64_t SIInstrInfo::getDefaultRsrcDataFormat | ( | ) | const |
Definition at line 5870 of file SIInstrInfo.cpp.
References llvm::AMDGPUSubtarget::GFX10, llvm::AMDGPU::RSRC_DATA_FORMAT, and llvm::AMDGPUSubtarget::VOLCANIC_ISLANDS.
Referenced by extractRsrcPtr(), getNamedImmOperand(), getScratchRsrcWords23(), isStackPtrRelative(), and llvm::SITargetLowering::wrapAddr64Rsrc().
| unsigned SIInstrInfo::getInstBundleSize | ( | const MachineInstr & | MI | ) | const |
Definition at line 5977 of file SIInstrInfo.cpp.
References assert(), E, getInstSizeInBytes(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getParent(), I, llvm::MachineBasicBlock::instr_end(), and Size.
Referenced by getInstSizeInBytes(), and getMCOpcodeFromPseudo().
|
override |
Definition at line 6631 of file SIInstrInfo.cpp.
References E, llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getParent(), I, llvm::MachineBasicBlock::instr_end(), llvm::MachineInstr::isBundle(), and llvm::max().
Referenced by getRegClass().
|
override |
Definition at line 5989 of file SIInstrInfo.cpp.
References llvm::ISD::EH_LABEL, getInstBundleSize(), llvm::TargetMachine::getMCAsmInfo(), getMCOpcodeFromPseudo(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MCInstrDesc::getSize(), llvm::MachineFunction::getSubtarget(), llvm::MachineOperand::getSymbolName(), llvm::MachineFunction::getTarget(), llvm::ISD::INLINEASM, llvm::ISD::INLINEASM_BR, isFixedSize(), isLiteralConstantLike(), isMIMG(), isSALU(), isVALU(), isVOP3(), llvm::AMDGPUISD::KILL, and llvm::MCInstrDesc::OpInfo.
Referenced by addRegsToSet(), getInstBundleSize(), getMCOpcodeFromPseudo(), llvm::SITargetLowering::getPrefLoopAlignment(), removeBranch(), and llvm::AMDGPUAsmPrinter::runOnMachineFunction().
| const MCInstrDesc & SIInstrInfo::getKillTerminatorFromPseudo | ( | unsigned | Opcode | ) | const |
Definition at line 6244 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by getMCOpcodeFromPseudo(), and llvm::SITargetLowering::splitKillBlock().
|
inlineoverride |
Definition at line 323 of file SIInstrInfo.h.
References convertToThreeAddress(), and isSchedulingBoundary().
|
inline |
Return the descriptor of the target-specific machine instruction that corresponds to the specified pseudo or native opcode.
Definition at line 935 of file SIInstrInfo.h.
References convertNonUniformIfRegion(), convertNonUniformLoopRegion(), createPHIDestinationCopy(), createPHISourceCopy(), CreateTargetPostRAHazardRecognizer(), decomposeMachineOperandsTargetFlags(), getAddNoCarry(), getInstBundleSize(), getInstSizeInBytes(), getKillTerminatorFromPseudo(), getSerializableDirectMachineOperandTargetFlags(), getSerializableTargetIndices(), isBasicBlockPrologue(), isKillTerminator(), isLoadFromStackSlot(), isNonUniformBranchInstr(), isSGPRStackAccess(), isStackAccess(), isStoreToStackSlot(), isWave32(), mayAccessFlatAddressSpace(), and pseudoToMCOpcode().
Referenced by getInstSizeInBytes(), llvm::SIRegisterInfo::restoreSGPR(), and llvm::SIRegisterInfo::spillSGPR().
|
final |
Definition at line 261 of file SIInstrInfo.cpp.
References assert(), llvm::MachineOperand::getImm(), llvm::MachineFunction::getInfo(), getNamedOperand(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), getOpRegClass(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::TargetRegisterInfo::getRegSizeInBits(), llvm::SIMachineFunctionInfo::getScratchRSrcReg(), isDS(), llvm::MachineOperand::isFI(), isFLAT(), isMTBUF(), isMUBUF(), llvm::MachineOperand::isReg(), isSMRD(), isStride64(), llvm::MachineInstr::mayLoad(), llvm::MachineInstr::mayLoadOrStore(), and llvm::MachineInstr::mayStore().
Referenced by getRegisterInfo(), offsetsDoNotOverlap(), and llvm::SIScheduleDAGMI::schedule().
| unsigned SIInstrInfo::getMovOpcode | ( | const TargetRegisterClass * | DstRC | ) | const |
Definition at line 973 of file SIInstrInfo.cpp.
References llvm::SIRegisterInfo::hasAGPRs(), and llvm::SIRegisterInfo::isSGPRClass().
Referenced by getRegisterInfo().
|
inline |
Get required immediate operand.
Definition at line 922 of file SIInstrInfo.h.
References getDefaultRsrcDataFormat(), llvm::MachineOperand::getImm(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), getScratchRsrcWords23(), isHighLatencyInstruction(), and isLowLatencyInstruction().
Referenced by findSingleRegDef(), and legalizeOperands().
| MachineOperand * SIInstrInfo::getNamedOperand | ( | MachineInstr & | MI, |
| unsigned | OperandName | ||
| ) | const |
Returns the operand named Op.
If MI does not have an operand named Op, this function returns nullptr.
Definition at line 5861 of file SIInstrInfo.cpp.
References llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), and llvm::MachineInstr::getOperand().
Referenced by addRegsToSet(), buildMUBUFOffsetLoadStore(), buildShrunkInst(), canShrink(), combineKnownAdjacentMMOs(), convertToThreeAddress(), llvm::createGCNDPPCombinePass(), llvm::createSIModeRegisterPass(), llvm::SIRegisterInfo::eliminateFrameIndex(), llvm::SITargetLowering::emitGWSMemViolTestLoop(), emitIndirectDst(), emitIndirectSrc(), findSingleRegDef(), fixupGlobalSaddr(), FoldImmediate(), getBufferFormatWithCompCount(), getHWReg(), getMemOperandWithOffset(), getNamedOperand(), getOpSize(), getOrNonExecReg(), hasAnyNonFlatUseOfReg(), hasModifiersSet(), isIdentityValue(), isSafeToFoldImmIntoCopy(), isSGPRStackAccess(), isStackAccess(), legalizeOperands(), legalizeOperandsSMRD(), loadM0FromVGPR(), operator<<(), optimizeVcndVcmpPair(), llvm::SIRegisterInfo::resolveFrameIndex(), setM0ToIndexFromSGPR(), shouldClusterMemOps(), swapSourceModifiers(), tryConstantFoldOp(), tryFoldInst(), and verifyInstruction().
|
inline |
Definition at line 916 of file SIInstrInfo.h.
References getNamedOperand().
Definition at line 6282 of file SIInstrInfo.cpp.
References AMDGPUAS::FLAT_ADDRESS, and llvm::AMDGPUSubtarget::GFX10.
Referenced by findMemSDNode(), and isLegalMUBUFImmOffset().
|
static |
Return the number of wait states that result from executing this instruction.
Definition at line 1371 of file SIInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), and llvm::MachineInstr::getOperand().
Referenced by llvm::GCNHazardRecognizer::AdvanceCycle(), getOpSize(), and getWaitStatesSince().
| const TargetRegisterClass * SIInstrInfo::getOpRegClass | ( | const MachineInstr & | MI, |
| unsigned | OpNo | ||
| ) | const |
Return the correct register class for OpNo.
For target-specific instructions, this will return the register class that has been defined in tablegen. For generic instructions, like REG_SEQUENCE it will return the register class of its machine operand. to infer the correct register class base on the other operands.
Definition at line 3816 of file SIInstrInfo.cpp.
References llvm::MCInstrDesc::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::MachineInstr::isVariadic(), llvm::Register::isVirtualRegister(), MRI, llvm::MCInstrDesc::OpInfo, Reg, and llvm::MCOperandInfo::RegClass.
Referenced by getMemOperandWithOffset(), getOpSize(), isLiteralConstant(), legalizeOperands(), moveToVALU(), and verifyInstruction().
Return the size in bytes of the operand OpNo on the given.
Definition at line 809 of file SIInstrInfo.h.
References assert(), llvm::SIRegisterInfo::getRegClass(), llvm::MCOI::OPERAND_IMMEDIATE, llvm::MCOperandInfo::OperandType, and llvm::MCOperandInfo::RegClass.
Referenced by isInlineConstant(), and matchSwap().
|
inline |
This form should usually be preferred since it handles operands with unknown register classes.
Definition at line 823 of file SIInstrInfo.h.
References assert(), getNamedOperand(), getNumWaitStates(), llvm::MachineInstr::getOperand(), getOpRegClass(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::getSubReg(), insertNoop(), insertReturn(), insertWaitStates(), isLegalRegOperand(), isLegalVSrcOperand(), isOperandLegal(), llvm::MachineOperand::isReg(), legalizeGenericOperand(), legalizeOperands(), legalizeOperandsSMRD(), legalizeOperandsVOP2(), legalizeOperandsVOP3(), legalizeOpWithMove(), LLVM_READONLY, moveToVALU(), readlaneVGPRToSGPR(), and SubReg.
| const TargetRegisterClass * SIInstrInfo::getPreferredSelectRegClass | ( | unsigned | Size | ) | const |
Definition at line 815 of file SIInstrInfo.cpp.
Referenced by createBBSelectReg(), and getRegisterInfo().
|
inlineoverride |
Definition at line 1030 of file SIInstrInfo.h.
References fixImplicitOperands(), foldMemoryOperandImpl(), getInstrLatency(), llvm::MCInstrDesc::getNumOperands(), llvm::SIRegisterInfo::getRegClass(), llvm::MCInstrDesc::OpInfo, and llvm::MCOperandInfo::RegClass.
Referenced by getOpSize().
|
inline |
Definition at line 173 of file SIInstrInfo.h.
References areLoadsFromSameBasePtr(), calculateLDSSpillAddress(), commuteOpcode(), copyPhysReg(), expandMovDPP64(), expandPostRAPseudo(), llvm::ISD::FrameIndex, getMemOperandWithOffset(), getMovOpcode(), getPreferredSelectRegClass(), I, insertEQ(), insertNE(), isReallyTriviallyReMaterializable(), LLVM_READONLY, loadRegFromStackSlot(), materializeImmediate(), shouldClusterMemOps(), shouldScheduleLoadsNear(), Size, storeRegToStackSlot(), and TRI.
Referenced by buildEpilogReload(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), emitIndirectDst(), emitIndirectSrc(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), getBufferFormatWithCompCount(), llvm::GCNSubtarget::getRegisterInfo(), hasAnyNonFlatUseOfReg(), llvm::SITargetLowering::isSDNodeSourceOfDivergence(), isVRegCompatibleReg(), matchSwap(), setM0ToIndexFromSGPR(), tryAddToFoldList(), and tryConstantFoldOp().
| uint64_t SIInstrInfo::getScratchRsrcWords23 | ( | ) | const |
Definition at line 5892 of file SIInstrInfo.cpp.
References getDefaultRsrcDataFormat(), llvm::AMDGPUSubtarget::GFX9, llvm::Log2_32(), llvm::AMDGPU::RSRC_DATA_FORMAT, llvm::AMDGPU::RSRC_ELEMENT_SIZE_SHIFT, llvm::AMDGPU::RSRC_INDEX_STRIDE_SHIFT, llvm::AMDGPU::RSRC_TID_ENABLE, and llvm::AMDGPUSubtarget::VOLCANIC_ISLANDS.
Referenced by llvm::SIFrameLowering::emitEntryFunctionPrologue(), and getNamedImmOperand().
|
override |
Definition at line 6178 of file SIInstrInfo.cpp.
References llvm::makeArrayRef(), MO_ABS32_HI, MO_ABS32_LO, MO_GOTPCREL, MO_GOTPCREL32_HI, MO_GOTPCREL32_LO, MO_REL32_HI, and MO_REL32_LO.
Referenced by getMCOpcodeFromPseudo().
|
override |
Definition at line 6147 of file SIInstrInfo.cpp.
References llvm::makeArrayRef(), llvm::AMDGPU::TI_CONSTDATA_START, llvm::AMDGPU::TI_SCRATCH_RSRC_DWORD0, llvm::AMDGPU::TI_SCRATCH_RSRC_DWORD1, llvm::AMDGPU::TI_SCRATCH_RSRC_DWORD2, and llvm::AMDGPU::TI_SCRATCH_RSRC_DWORD3.
Referenced by getMCOpcodeFromPseudo().
| unsigned SIInstrInfo::getVALUOp | ( | const MachineInstr & | MI | ) | const |
Definition at line 3736 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::isReg(), llvm_unreachable, MRI, and llvm::SIInstrFlags::WQM.
Referenced by isLiteralConstant(), and moveToVALU().
| bool SIInstrInfo::hasAnyModifiersSet | ( | const MachineInstr & | MI | ) | const |
Definition at line 2988 of file SIInstrInfo.cpp.
References hasModifiersSet().
Referenced by FoldImmediate(), and isLiteralConstant().
|
inlinestatic |
Definition at line 636 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FPClamp, llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Definition at line 640 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FPClamp.
|
inlinestatic |
Definition at line 644 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::IntClamp, and llvm::MCInstrDesc::TSFlags.
Return true if this instruction has any modifiers.
e.g. src[012]_mod, omod, clamp.
Definition at line 2974 of file SIInstrInfo.cpp.
References llvm::AMDGPU::getNamedOperandIdx().
Referenced by isLiteralConstant().
| bool SIInstrInfo::hasModifiersSet | ( | const MachineInstr & | MI, |
| unsigned | OpName | ||
| ) | const |
Definition at line 2982 of file SIInstrInfo.cpp.
References llvm::MachineOperand::getImm(), and getNamedOperand().
Referenced by canShrink(), hasAnyModifiersSet(), isLiteralConstant(), operator<<(), and optimizeVcndVcmpPair().
| bool SIInstrInfo::hasUnwantedEffectsWhenEXECEmpty | ( | const MachineInstr & | MI | ) | const |
Whether we must prevent this instruction from executing with EXEC = 0.
Definition at line 2758 of file SIInstrInfo.cpp.
References llvm::AMDGPUISD::DS_ORDERED_COUNT, llvm::SIInstrFlags::EXP, llvm::MachineInstr::getOpcode(), llvm::MachineInstr::isCall(), llvm::MachineInstr::isInlineAsm(), llvm::MachineInstr::isReturn(), isSMRD(), and llvm::MachineInstr::mayStore().
Referenced by hasVGPRUses().
Return true if this 64-bit VALU instruction has a 32-bit encoding.
This function will return false if you pass it a 32-bit instruction.
Definition at line 2966 of file SIInstrInfo.cpp.
References llvm::AMDGPU::getVOPe32(), and pseudoToMCOpcode().
Referenced by canShrink(), isIdentityValue(), and isLiteralConstant().
|
inline |
Definition at line 680 of file SIInstrInfo.h.
References llvm::any_of(), llvm::MachineInstr::explicit_uses(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineFunction::getRegInfo(), hasUnwantedEffectsWhenEXECEmpty(), isInlineConstant(), llvm::SIRegisterInfo::isVGPR(), mayReadEXEC(), and MRI.
|
override |
Definition at line 2054 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addMBB(), assert(), llvm::BuildMI(), llvm::ArrayRef< T >::empty(), llvm::MachineInstr::getOperand(), isUndef(), preserveCondRegFlags(), llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setIsUndef(), and llvm::ArrayRef< T >::size().
Referenced by commuteOpcode().
| unsigned SIInstrInfo::insertEQ | ( | MachineBasicBlock * | MBB, |
| MachineBasicBlock::iterator | I, | ||
| const DebugLoc & | DL, | ||
| unsigned | SrcReg, | ||
| int | Value | ||
| ) | const |
Definition at line 947 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::SIRegisterInfo::getBoolRC(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), MRI, and Reg.
Referenced by getRegisterInfo(), and removeExternalCFGEdges().
|
override |
Definition at line 1776 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::clearVirtRegs(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::RegState::Define, llvm::MachineBasicBlock::empty(), llvm::MachineBasicBlock::end(), llvm::RegScavenger::enterBasicBlockEnd(), llvm::MachineBasicBlock::getParent(), I, MO_LONG_BRANCH_BACKWARD, MO_LONG_BRANCH_FORWARD, MRI, llvm::MachineBasicBlock::pred_size(), llvm::MachineRegisterInfo::replaceRegWith(), llvm::RegScavenger::scavengeRegisterBackwards(), and llvm::RegScavenger::setRegUsed().
Referenced by commuteOpcode().
| unsigned SIInstrInfo::insertNE | ( | MachineBasicBlock * | MBB, |
| MachineBasicBlock::iterator | I, | ||
| const DebugLoc & | DL, | ||
| unsigned | SrcReg, | ||
| int | Value | ||
| ) | const |
Definition at line 960 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::SIRegisterInfo::getBoolRC(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), MRI, and Reg.
Referenced by getRegisterInfo(), and isFunctionEntryBlock().
|
override |
Definition at line 1348 of file SIInstrInfo.cpp.
References insertWaitStates().
Referenced by getOpSize().
| void SIInstrInfo::insertReturn | ( | MachineBasicBlock & | MBB | ) | const |
Definition at line 1353 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), assert(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineBasicBlock::getParent(), Info, llvm::AMDGPUMachineFunction::isEntryFunction(), llvm::SIMachineFunctionInfo::returnsVoid(), and llvm::MachineBasicBlock::succ_empty().
Referenced by containsNewBackedge(), and getOpSize().
|
override |
Definition at line 2166 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), fixImplicitOperands(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), MRI, preserveCondRegFlags(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MCID::Select, and std::swap().
Referenced by commuteOpcode().
| void SIInstrInfo::insertVectorSelect | ( | MachineBasicBlock & | MBB, |
| MachineBasicBlock::iterator | I, | ||
| const DebugLoc & | DL, | ||
| unsigned | DstReg, | ||
| ArrayRef< MachineOperand > | Cond, | ||
| unsigned | TrueReg, | ||
| unsigned | FalseReg | ||
| ) | const |
Definition at line 819 of file SIInstrInfo.cpp.
Referenced by commuteOpcode().
| void SIInstrInfo::insertWaitStates | ( | MachineBasicBlock & | MBB, |
| MachineBasicBlock::iterator | MI, | ||
| int | Count | ||
| ) | const |
Definition at line 1332 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), Arg, llvm::BuildMI(), and llvm::MachineBasicBlock::findDebugLoc().
Referenced by getOpSize(), and insertNoop().
Definition at line 2748 of file SIInstrInfo.cpp.
References llvm::AMDGPUISD::DS_ORDERED_COUNT.
Referenced by isDS(), and isSendMsgTraceDataOrGDS().
| bool SIInstrInfo::isAsmOnlyOpcode | ( | int | MCOp | ) | const |
Check if this instruction should only be used by assembler.
Return true if this opcode should not be used by codegen.
Definition at line 6343 of file SIInstrInfo.cpp.
Referenced by isLegalMUBUFImmOffset(), and pseudoToMCOpcode().
|
override |
Definition at line 6192 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::isTerminator(), and llvm::MachineInstr::modifiesRegister().
Referenced by getMCOpcodeFromPseudo().
Definition at line 1749 of file SIInstrInfo.cpp.
References assert(), BranchOffsetBits, and llvm::isIntN().
Referenced by commuteOpcode().
| bool SIInstrInfo::isBufferSMRD | ( | const MachineInstr & | MI | ) | const |
Definition at line 6269 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), isSMRD(), llvm::MCInstrDesc::OpInfo, and llvm::MCOperandInfo::RegClass.
Referenced by addRegsToSet(), and isSMRD().
|
inlinestatic |
Definition at line 534 of file SIInstrInfo.h.
References llvm::SIInstrFlags::DisableWQM, llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Definition at line 538 of file SIInstrInfo.h.
References llvm::SIInstrFlags::DisableWQM.
|
inlinestatic |
Definition at line 590 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::IsDOT, and llvm::MCInstrDesc::TSFlags.
Definition at line 594 of file SIInstrInfo.h.
References llvm::SIInstrFlags::IsDOT.
|
inlinestatic |
Definition at line 558 of file SIInstrInfo.h.
References llvm::SIInstrFlags::DPP, llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 562 of file SIInstrInfo.h.
References llvm::SIInstrFlags::DPP.
|
inlinestatic |
Definition at line 471 of file SIInstrInfo.h.
References llvm::SIInstrFlags::DS, llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet(), llvm::GCNSubtarget::adjustSchedDependency(), areLoadsFromSameBasePtr(), areMemAccessesTriviallyDisjoint(), getMemOperandWithOffset(), isSendMsgTraceDataOrGDS(), and shouldClusterMemOps().
Definition at line 475 of file SIInstrInfo.h.
References llvm::SIInstrFlags::DS, and isAlwaysGDS().
|
inlinestatic |
Definition at line 518 of file SIInstrInfo.h.
References llvm::SIInstrFlags::EXP, llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by hasDataDependencyPred().
Definition at line 522 of file SIInstrInfo.h.
References llvm::SIInstrFlags::EXP.
|
inlinestatic |
Definition at line 628 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FIXED_SIZE, llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by getInstSizeInBytes().
Definition at line 632 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FIXED_SIZE.
|
inlinestatic |
Definition at line 497 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FLAT, llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet(), llvm::GCNSubtarget::adjustSchedDependency(), areMemAccessesTriviallyDisjoint(), llvm::GCNHazardRecognizer::getHazardType(), getMemOperandWithOffset(), hasAnyNonFlatUseOfReg(), isVMEMClauseInst(), mayAccessFlatAddressSpace(), llvm::GCNHazardRecognizer::PreEmitNoopsCommon(), shouldClusterMemOps(), and verifyInstruction().
Definition at line 514 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FLAT.
|
inlinestatic |
Definition at line 509 of file SIInstrInfo.h.
References isSegmentSpecificFLAT().
Referenced by frameIndexMayFold().
| bool SIInstrInfo::isFoldableCopy | ( | const MachineInstr & | MI | ) | const |
Definition at line 2261 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::getNumImplicitUses(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineInstr::getNumOperands(), and llvm::MachineInstr::getOpcode().
Referenced by commuteOpcode(), findSingleRegDef(), and getRegSeqInit().
|
inlinestatic |
Definition at line 664 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FPAtomic, llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet().
Definition at line 668 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FPAtomic.
|
inlinestatic |
Definition at line 489 of file SIInstrInfo.h.
References llvm::SIInstrFlags::Gather4, llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by llvm::SITargetLowering::PostISelFolding(), and verifyInstruction().
Definition at line 493 of file SIInstrInfo.h.
References llvm::SIInstrFlags::Gather4.
| bool SIInstrInfo::isHighLatencyInstruction | ( | const MachineInstr & | MI | ) | const |
Definition at line 5922 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), isMIMG(), isMTBUF(), and isMUBUF().
Referenced by getNamedImmOperand(), and llvm::SIScheduleDAGMI::schedule().
| bool SIInstrInfo::isImmOperandLegal | ( | const MachineInstr & | MI, |
| unsigned | OpNo, | ||
| const MachineOperand & | MO | ||
| ) | const |
Definition at line 2933 of file SIInstrInfo.cpp.
References assert(), llvm::MachineInstr::getDesc(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineFunction::getSubtarget(), llvm::GCNSubtarget::hasMFMAInlineLiteralBug(), llvm::GCNSubtarget::hasVOP3Literal(), llvm::MachineOperand::isFI(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isImm(), isInlineConstant(), isMAI(), llvm::AMDGPU::isSISrcOperand(), llvm::MachineOperand::isTargetIndex(), isVOP3(), llvm::SIRegisterInfo::opCanUseInlineConstant(), llvm::SIRegisterInfo::opCanUseLiteralConstant(), llvm::MCOI::OPERAND_IMMEDIATE, llvm::MCOperandInfo::OperandType, llvm::MCInstrDesc::OpInfo, and llvm::MCOperandInfo::RegClass.
Referenced by llvm::SIRegisterInfo::eliminateFrameIndex(), isLiteralConstant(), and isOperandLegal().
Definition at line 2819 of file SIInstrInfo.cpp.
References llvm::APInt::getBitWidth(), llvm::APInt::getSExtValue(), llvm::AMDGPUSubtarget::has16BitInsts(), llvm::AMDGPUSubtarget::hasInv2PiInlineImm(), llvm::AMDGPU::isInlinableLiteral16(), llvm::AMDGPU::isInlinableLiteral32(), llvm::AMDGPU::isInlinableLiteral64(), and llvm_unreachable.
Referenced by bitOpWithConstantIsReducible(), convertToThreeAddress(), llvm::createR600ISelDag(), FoldImmediate(), getBufferFormatWithCompCount(), getRegSeqInit(), getSplatConstantFP(), hasVGPRUses(), isImmOperandLegal(), isInlineConstant(), isInlineConstantIfFolded(), isKImmOperand(), isKImmOrKUImmOperand(), isKUImmOperand(), isLiteralConstant(), isLiteralConstantLike(), isReverseInlineImm(), isStackPtrRelative(), shouldUseAndMask(), tryAddToFoldList(), tryToFoldACImm(), usesConstantBus(), and verifyInstruction().
Definition at line 697 of file SIInstrInfo.h.
References llvm::APFloat::bitcastToAPInt(), and isInlineConstant().
| bool SIInstrInfo::isInlineConstant | ( | const MachineOperand & | MO, |
| uint8_t | OperandType | ||
| ) | const |
Definition at line 2839 of file SIInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::AMDGPUSubtarget::has16BitInsts(), llvm::AMDGPUSubtarget::hasInv2PiInlineImm(), llvm::MachineOperand::isImm(), llvm::AMDGPU::isInlinableLiteral16(), llvm::AMDGPU::isInlinableLiteral32(), llvm::AMDGPU::isInlinableLiteral64(), llvm::AMDGPU::isInlinableLiteralV216(), llvm::isInt< 16 >(), llvm::isUInt< 16 >(), llvm_unreachable, llvm::AMDGPU::OPERAND_REG_IMM_FP16, llvm::AMDGPU::OPERAND_REG_IMM_FP32, llvm::AMDGPU::OPERAND_REG_IMM_FP64, llvm::AMDGPU::OPERAND_REG_IMM_INT16, llvm::AMDGPU::OPERAND_REG_IMM_INT32, llvm::AMDGPU::OPERAND_REG_IMM_INT64, llvm::AMDGPU::OPERAND_REG_IMM_V2FP16, llvm::AMDGPU::OPERAND_REG_IMM_V2INT16, llvm::AMDGPU::OPERAND_REG_INLINE_AC_FP16, llvm::AMDGPU::OPERAND_REG_INLINE_AC_FP32, llvm::AMDGPU::OPERAND_REG_INLINE_AC_INT16, llvm::AMDGPU::OPERAND_REG_INLINE_AC_INT32, llvm::AMDGPU::OPERAND_REG_INLINE_AC_V2FP16, llvm::AMDGPU::OPERAND_REG_INLINE_AC_V2INT16, llvm::AMDGPU::OPERAND_REG_INLINE_C_FP16, llvm::AMDGPU::OPERAND_REG_INLINE_C_FP32, llvm::AMDGPU::OPERAND_REG_INLINE_C_FP64, llvm::AMDGPU::OPERAND_REG_INLINE_C_INT16, llvm::AMDGPU::OPERAND_REG_INLINE_C_INT32, llvm::AMDGPU::OPERAND_REG_INLINE_C_INT64, llvm::AMDGPU::OPERAND_REG_INLINE_C_V2FP16, llvm::AMDGPU::OPERAND_REG_INLINE_C_V2INT16, llvm::AMDGPU::OPERAND_SRC_FIRST, and llvm::AMDGPU::OPERAND_SRC_LAST.
|
inline |
Definition at line 703 of file SIInstrInfo.h.
References isInlineConstant(), and llvm::MCOperandInfo::OperandType.
|
inline |
returns true if UseMO is substituted with DefMO in MI it would be an inline immediate.
Definition at line 710 of file SIInstrInfo.h.
References assert(), llvm::MachineInstr::getDesc(), llvm::MachineInstr::getOperandNo(), llvm::MachineOperand::getParent(), isInlineConstant(), MI, llvm::MCInstrDesc::NumOperands, and llvm::MCInstrDesc::OpInfo.
|
inline |
returns true if the operand OpIdx in MI is a valid inline immediate.
Definition at line 724 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MachineInstr::getOperand(), isInlineConstant(), llvm::MCOperandInfo::OperandType, and llvm::MCInstrDesc::OpInfo.
|
inline |
Definition at line 729 of file SIInstrInfo.h.
References assert(), llvm::MachineInstr::getDesc(), getOpSize(), llvm::MachineInstr::isCopy(), isInlineConstant(), llvm::MCInstrDesc::NumOperands, llvm::AMDGPU::OPERAND_REG_IMM_INT32, llvm::AMDGPU::OPERAND_REG_IMM_INT64, llvm::MCOperandInfo::OperandType, and llvm::MCInstrDesc::OpInfo.
|
inline |
Definition at line 746 of file SIInstrInfo.h.
References llvm::MachineInstr::getOperandNo(), llvm::MachineOperand::getParent(), and isInlineConstant().
Definition at line 6234 of file SIInstrInfo.cpp.
Referenced by getMCOpcodeFromPseudo(), and isSimpleIf().
Returns if Offset is legal for the subtarget as the offset to a FLAT encoded instruction.
If Signed, this is for an instruction that interprets the offset as signed.
Definition at line 6296 of file SIInstrInfo.cpp.
References AMDGPUAS::FLAT_ADDRESS, and llvm::AMDGPUSubtarget::GFX10.
Referenced by findMemSDNode(), llvm::SITargetLowering::getAddrModeArguments(), llvm::SITargetLowering::isLegalGlobalAddressingMode(), isLegalMUBUFImmOffset(), and llvm::AMDGPUInstructionSelector::select().
Definition at line 1009 of file SIInstrInfo.h.
References getNumFlatOffsetBits(), isAsmOnlyOpcode(), isLegalFLATOffset(), pseudoToMCOpcode(), and Signed.
Referenced by isStackPtrRelative(), and selectSGPRVectorRegClassID().
| bool SIInstrInfo::isLegalRegOperand | ( | const MachineRegisterInfo & | MRI, |
| const MCOperandInfo & | OpInfo, | ||
| const MachineOperand & | MO | ||
| ) | const |
Check if MO (a register operand) is a legal register for the given operand description.
Definition at line 3922 of file SIInstrInfo.cpp.
References llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineOperand::getSubReg(), llvm::TargetRegisterClass::hasSuperClassEq(), llvm::MachineOperand::isReg(), llvm::Register::isVirtualRegister(), Reg, and llvm::MCOperandInfo::RegClass.
Referenced by getOpSize(), isLegalVSrcOperand(), isOperandLegal(), and legalizeOperandsVOP2().
| bool SIInstrInfo::isLegalVSrcOperand | ( | const MachineRegisterInfo & | MRI, |
| const MCOperandInfo & | OpInfo, | ||
| const MachineOperand & | MO | ||
| ) | const |
Check if MO would be a valid operand for the given operand definition OpInfo.
Note this does not attempt to validate constant bus restrictions (e.g. literal constant usage).
Definition at line 3947 of file SIInstrInfo.cpp.
References assert(), llvm::MachineOperand::isFI(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isImm(), isLegalRegOperand(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isTargetIndex().
Referenced by getOpSize().
|
inline |
Definition at line 751 of file SIInstrInfo.h.
References llvm::MachineOperand::isImm(), isInlineConstant(), and llvm::MCOperandInfo::OperandType.
|
inline |
Definition at line 756 of file SIInstrInfo.h.
References buildShrunkInst(), canShrink(), llvm::MachineInstr::getOperand(), getOpRegClass(), getVALUOp(), hasAnyModifiersSet(), hasModifiers(), hasModifiersSet(), hasVALU32BitEncoding(), llvm::MachineOperand::isImm(), isImmOperandLegal(), isInlineConstant(), isLiteralConstantLike(), usesConstantBus(), and verifyInstruction().
| bool SIInstrInfo::isLiteralConstantLike | ( | const MachineOperand & | MO, |
| const MCOperandInfo & | OpInfo | ||
| ) | const |
Definition at line 2900 of file SIInstrInfo.cpp.
References llvm::MachineOperand::getType(), isInlineConstant(), llvm_unreachable, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_FrameIndex, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_MachineBasicBlock, llvm::MachineOperand::MO_MCSymbol, and llvm::MachineOperand::MO_Register.
Referenced by getInstSizeInBytes(), isLiteralConstant(), isOperandLegal(), legalizeOperandsVOP2(), legalizeOperandsVOP3(), and tryAddToFoldList().
|
override |
Definition at line 5949 of file SIInstrInfo.cpp.
References isMUBUF(), isSGPRSpill(), isSGPRStackAccess(), isStackAccess(), isVGPRSpill(), and llvm::MachineInstr::mayLoad().
Referenced by getMCOpcodeFromPseudo().
| bool SIInstrInfo::isLowLatencyInstruction | ( | const MachineInstr & | MI | ) | const |
Definition at line 5916 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), and isSMRD().
Referenced by getNamedImmOperand(), llvm::SIScheduleDAGMI::schedule(), and llvm::SIScheduleDAGMI::SIScheduleDAGMI().
|
inlinestatic |
Definition at line 582 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::IsMAI, and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet(), llvm::GCNSubtarget::adjustSchedDependency(), llvm::GCNHazardRecognizer::getHazardType(), isImmOperandLegal(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 586 of file SIInstrInfo.h.
References llvm::SIInstrFlags::IsMAI.
|
inlinestatic |
Definition at line 481 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::MIMG, and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), getInstSizeInBytes(), isHighLatencyInstruction(), isVMEM(), legalizeOperands(), llvm::SITargetLowering::PostISelFolding(), and verifyInstruction().
Definition at line 485 of file SIInstrInfo.h.
References llvm::SIInstrFlags::MIMG.
|
inlinestatic |
Definition at line 453 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::MTBUF, and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet(), areLoadsFromSameBasePtr(), areMemAccessesTriviallyDisjoint(), getMemOperandWithOffset(), isHighLatencyInstruction(), isVMEM(), legalizeOperands(), and shouldClusterMemOps().
Definition at line 457 of file SIInstrInfo.h.
References llvm::SIInstrFlags::MTBUF.
|
inlinestatic |
Definition at line 445 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::MUBUF, and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet(), areLoadsFromSameBasePtr(), areMemAccessesTriviallyDisjoint(), llvm::SIRegisterInfo::eliminateFrameIndex(), frameIndexMayFold(), llvm::SIRegisterInfo::getFrameIndexInstrOffset(), getMemOperandWithOffset(), llvm::SIRegisterInfo::getMUBUFInstrOffset(), llvm::SIRegisterInfo::isFrameOffsetLegal(), isHighLatencyInstruction(), isLoadFromStackSlot(), isStoreToStackSlot(), isVMEM(), legalizeOperands(), llvm::SIRegisterInfo::resolveFrameIndex(), and shouldClusterMemOps().
Definition at line 449 of file SIInstrInfo.h.
References llvm::SIInstrFlags::MUBUF.
| bool SIInstrInfo::isNonUniformBranchInstr | ( | MachineInstr & | Instr | ) | const |
Definition at line 6070 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
Referenced by getMCOpcodeFromPseudo().
| bool SIInstrInfo::isOperandLegal | ( | const MachineInstr & | MI, |
| unsigned | OpIdx, | ||
| const MachineOperand * | MO = nullptr |
||
| ) | const |
Check if MO is a legal operand if it was the OpIdx Operand for MI.
Definition at line 3958 of file SIInstrInfo.cpp.
References assert(), llvm::detail::DenseSetImpl< ValueT, SmallDenseMap< ValueT, detail::DenseSetEmpty, InlineBuckets, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::count(), llvm::numbers::e, llvm::GCNSubtarget::getConstantBusLimit(), llvm::MachineInstr::getDesc(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::getSubReg(), llvm::MachineFunction::getSubtarget(), llvm::GCNSubtarget::hasVOP3Literal(), llvm::detail::DenseSetImpl< ValueT, SmallDenseMap< ValueT, detail::DenseSetEmpty, InlineBuckets, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert(), llvm::MachineOperand::isFI(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isImm(), isImmOperandLegal(), isLegalRegOperand(), isLiteralConstantLike(), llvm::MachineOperand::isReg(), llvm::AMDGPU::isSISrcOperand(), llvm::MachineOperand::isTargetIndex(), isVALU(), isVOP3(), MRI, llvm::AMDGPU::OPERAND_KIMM32, llvm::MCOperandInfo::OperandType, llvm::MCInstrDesc::OpInfo, llvm::MCOperandInfo::RegClass, and usesConstantBus().
Referenced by commuteInstructionImpl(), convertToThreeAddress(), llvm::createGCNDPPCombinePass(), getOpSize(), legalizeOperandsVOP3(), tryAddToFoldList(), tryChangeVGPRtoSGPRinCopy(), and tryToFoldACImm().
|
inlinestatic |
Definition at line 397 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::IsPacked, and llvm::MCInstrDesc::TSFlags.
Definition at line 401 of file SIInstrInfo.h.
References llvm::SIInstrFlags::IsPacked.
|
override |
Definition at line 130 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineInstr::getNumOperands(), and llvm::MachineInstr::getOpcode().
Referenced by getRegisterInfo().
|
inlinestatic |
Definition at line 333 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SALU, and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet(), llvm::GCNSubtarget::adjustSchedDependency(), getInstSizeInBytes(), mayReadEXEC(), shouldReadExec(), and tryAddToFoldList().
Definition at line 337 of file SIInstrInfo.h.
References llvm::SIInstrFlags::SALU.
|
inlinestatic |
Definition at line 620 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SCALAR_STORE, and llvm::MCInstrDesc::TSFlags.
Definition at line 624 of file SIInstrInfo.h.
References llvm::SIInstrFlags::SCALAR_STORE.
|
inlinestatic |
Definition at line 598 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SALU, llvm::SIInstrFlags::SMRD, and llvm::MCInstrDesc::TSFlags.
|
override |
Definition at line 2732 of file SIInstrInfo.cpp.
References changesVGPRIndexingMode(), llvm::MachineInstr::getOpcode(), llvm::TargetInstrInfo::isSchedulingBoundary(), and llvm::MachineInstr::modifiesRegister().
Referenced by getMachineCSELookAheadLimit().
|
inlinestatic |
Definition at line 429 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SDWA, and llvm::MCInstrDesc::TSFlags.
Referenced by findSingleRegDef(), isUseSafeToFold(), operator<<(), and verifyInstruction().
Definition at line 433 of file SIInstrInfo.h.
References llvm::SIInstrFlags::SDWA.
|
inlinestatic |
Definition at line 503 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FLAT, llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::LGKM_CNT, and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet(), areMemAccessesTriviallyDisjoint(), and isFLATScratch().
|
inlinestatic |
Definition at line 550 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SGPRSpill, and llvm::MCInstrDesc::TSFlags.
Referenced by isLoadFromStackSlot(), and isStoreToStackSlot().
Definition at line 554 of file SIInstrInfo.h.
References llvm::SIInstrFlags::SGPRSpill.
| unsigned SIInstrInfo::isSGPRStackAccess | ( | const MachineInstr & | MI, |
| int & | FrameIndex | ||
| ) | const |
Definition at line 5941 of file SIInstrInfo.cpp.
References assert(), llvm::MachineOperand::getIndex(), getNamedOperand(), llvm::MachineOperand::getReg(), and llvm::MachineOperand::isFI().
Referenced by getMCOpcodeFromPseudo(), isLoadFromStackSlot(), and isStoreToStackSlot().
|
inlinestatic |
Definition at line 461 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SMRD, and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet(), llvm::GCNSubtarget::adjustSchedDependency(), areLoadsFromSameBasePtr(), areMemAccessesTriviallyDisjoint(), llvm::GCNHazardRecognizer::getHazardType(), getMemOperandWithOffset(), hasUnwantedEffectsWhenEXECEmpty(), isBufferSMRD(), isLowLatencyInstruction(), isSMEMClauseInst(), legalizeOperands(), llvm::GCNHazardRecognizer::PreEmitNoopsCommon(), shouldClusterMemOps(), shouldReadExec(), and verifyInstruction().
Definition at line 465 of file SIInstrInfo.h.
References isBufferSMRD(), and llvm::SIInstrFlags::SMRD.
|
inlinestatic |
Definition at line 357 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SOP1, and llvm::MCInstrDesc::TSFlags.
Definition at line 361 of file SIInstrInfo.h.
References llvm::SIInstrFlags::SOP1.
|
inlinestatic |
Definition at line 365 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SOP2, and llvm::MCInstrDesc::TSFlags.
Referenced by verifyInstruction().
Definition at line 369 of file SIInstrInfo.h.
References llvm::SIInstrFlags::SOP2.
|
inlinestatic |
Definition at line 373 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SOPC, and llvm::MCInstrDesc::TSFlags.
Referenced by verifyInstruction().
Definition at line 377 of file SIInstrInfo.h.
References llvm::SIInstrFlags::SOPC.
|
inlinestatic |
Definition at line 381 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SOPK, and llvm::MCInstrDesc::TSFlags.
Referenced by verifyInstruction().
Definition at line 385 of file SIInstrInfo.h.
References llvm::SIInstrFlags::SOPK.
|
inlinestatic |
Definition at line 389 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SOPP, and llvm::MCInstrDesc::TSFlags.
Referenced by addRegsToSet().
Definition at line 393 of file SIInstrInfo.h.
References llvm::SIInstrFlags::SOPP.
| unsigned SIInstrInfo::isStackAccess | ( | const MachineInstr & | MI, |
| int & | FrameIndex | ||
| ) | const |
Definition at line 5928 of file SIInstrInfo.cpp.
References assert(), getAddrSpace(), llvm::MachineOperand::getIndex(), getNamedOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), llvm::MachineInstr::memoperands_begin(), llvm::MachineInstr::memoperands_empty(), and AMDGPUAS::PRIVATE_ADDRESS.
Referenced by getMCOpcodeFromPseudo(), isLoadFromStackSlot(), and isStoreToStackSlot().
|
override |
Definition at line 5963 of file SIInstrInfo.cpp.
References isMUBUF(), isSGPRSpill(), isSGPRStackAccess(), isStackAccess(), isVGPRSpill(), and llvm::MachineInstr::mayStore().
Referenced by getMCOpcodeFromPseudo().
|
inlinestatic |
Definition at line 341 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, and llvm::SIInstrFlags::VALU.
Referenced by addRegsToSet(), llvm::GCNSubtarget::adjustSchedDependency(), llvm::GCNHazardRecognizer::getHazardType(), getInstSizeInBytes(), isOperandLegal(), llvm::GCNHazardRecognizer::PreEmitNoopsCommon(), and shouldReadExec().
Definition at line 345 of file SIInstrInfo.h.
References llvm::SIInstrFlags::VALU.
|
inline |
Definition at line 672 of file SIInstrInfo.h.
References assert(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineInstr::isCopy(), and llvm::SIRegisterInfo::isSGPRReg().
Referenced by FoldImmediate().
|
inlinestatic |
Definition at line 542 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, and llvm::SIInstrFlags::VGPRSpill.
Referenced by isLoadFromStackSlot(), and isStoreToStackSlot().
Definition at line 546 of file SIInstrInfo.h.
References llvm::SIInstrFlags::VGPRSpill.
|
inlinestatic |
Definition at line 574 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, and llvm::SIInstrFlags::VINTRP.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 578 of file SIInstrInfo.h.
References llvm::SIInstrFlags::VINTRP.
|
inlinestatic |
Definition at line 349 of file SIInstrInfo.h.
References isMIMG(), isMTBUF(), and isMUBUF().
Referenced by addRegsToSet(), llvm::GCNSubtarget::adjustSchedDependency(), callWaitsOnFunctionReturn(), llvm::GCNHazardRecognizer::getHazardType(), isVMEMClauseInst(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 353 of file SIInstrInfo.h.
|
inlinestatic |
Definition at line 405 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, and llvm::SIInstrFlags::VOP1.
Referenced by foldImmediates(), isIdentityValue(), and verifyInstruction().
Definition at line 409 of file SIInstrInfo.h.
References llvm::SIInstrFlags::VOP1.
|
inlinestatic |
Definition at line 413 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, and llvm::SIInstrFlags::VOP2.
Referenced by foldImmediates(), isIdentityValue(), legalizeOperands(), and verifyInstruction().
Definition at line 417 of file SIInstrInfo.h.
References llvm::SIInstrFlags::VOP2.
|
inlinestatic |
Definition at line 421 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, and llvm::SIInstrFlags::VOP3.
Referenced by llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), getInstSizeInBytes(), isIdentityValue(), isImmOperandLegal(), isOperandLegal(), legalizeOperands(), and verifyInstruction().
Definition at line 425 of file SIInstrInfo.h.
References llvm::SIInstrFlags::VOP3.
|
inlinestatic |
Definition at line 566 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, and llvm::SIInstrFlags::VOP3P.
Definition at line 570 of file SIInstrInfo.h.
References llvm::SIInstrFlags::VOP3P.
|
inlinestatic |
Definition at line 437 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, and llvm::SIInstrFlags::VOPC.
Referenced by addRegsToSet(), foldImmediates(), legalizeOperands(), operator<<(), and verifyInstruction().
Definition at line 441 of file SIInstrInfo.h.
References llvm::SIInstrFlags::VOPC.
| bool llvm::SIInstrInfo::isWave32 | ( | ) | const |
Definition at line 6596 of file SIInstrInfo.cpp.
Referenced by getMCOpcodeFromPseudo().
|
inlinestatic |
Definition at line 526 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, and llvm::SIInstrFlags::WQM.
Definition at line 530 of file SIInstrInfo.h.
References llvm::SIInstrFlags::WQM.
| void SIInstrInfo::legalizeGenericOperand | ( | MachineBasicBlock & | InsertMBB, |
| MachineBasicBlock::iterator | I, | ||
| const TargetRegisterClass * | DstRC, | ||
| MachineOperand & | Op, | ||
| MachineRegisterInfo & | MRI, | ||
| const DebugLoc & | DL | ||
| ) | const |
Definition at line 4281 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstr::addOperand(), llvm::BuildMI(), llvm::MachineOperand::CreateReg(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::tgtok::Def, FoldImmediate(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineRegisterInfo::getUniqueVRegDef(), llvm::MachineRegisterInfo::getVRegDef(), llvm::MachineInstr::isCopy(), llvm::MachineInstr::isImplicitDef(), llvm::MachineInstr::isMoveImmediate(), llvm::Register::isPhysical(), llvm::MachineInstr::readsRegister(), llvm::MachineOperand::setReg(), and llvm::MachineOperand::setSubReg().
Referenced by getOpSize(), legalizeOperands(), and moveToVALU().
| void SIInstrInfo::legalizeOperands | ( | MachineInstr & | MI, |
| MachineDominatorTree * | MDT = nullptr |
||
| ) | const |
Legalize all operands in this instruction.
This function may create new instructions and control-flow around MI. If present, MDT is updated.
Definition at line 4522 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineInstrBuilder::cloneMemRefs(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::RegState::Dead, llvm::numbers::e, E, extractRsrcPtr(), llvm::AMDGPU::getAddr64Inst(), llvm::Function::getCallingConv(), llvm::MachineInstr::getDebugLoc(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineFunction::getFunction(), llvm::AMDGPU::getIfAddr64Inst(), llvm::MachineOperand::getMBB(), getNamedImmOperand(), getNamedOperand(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), getOpRegClass(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, isMIMG(), isMTBUF(), isMUBUF(), llvm::MachineOperand::isReg(), llvm::AMDGPU::isShader(), isSMRD(), llvm::Register::isVirtualRegister(), isVOP2(), isVOP3(), isVOPC(), llvm::RegState::Kill, legalizeGenericOperand(), legalizeOperandsSMRD(), legalizeOperandsVOP2(), legalizeOperandsVOP3(), loadSRsrcFromVGPR(), MI, MRI, readlaneVGPRToSGPR(), llvm::MachineInstr::removeFromParent(), llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setReg(), and llvm::AMDGPUSubtarget::VOLCANIC_ISLANDS.
Referenced by llvm::SITargetLowering::EmitInstrWithCustomInserter(), FoldImmediate(), getOpSize(), and moveToVALU().
| void SIInstrInfo::legalizeOperandsSMRD | ( | MachineRegisterInfo & | MRI, |
| MachineInstr & | MI | ||
| ) | const |
Definition at line 4262 of file SIInstrInfo.cpp.
References getNamedOperand(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), MI, MRI, readlaneVGPRToSGPR(), and llvm::MachineOperand::setReg().
Referenced by getOpSize(), and legalizeOperands().
| void SIInstrInfo::legalizeOperandsVOP2 | ( | MachineRegisterInfo & | MRI, |
| MachineInstr & | MI | ||
| ) | const |
Legalize operands in MI by either commuting it or inserting a copy of src1.
Definition at line 4021 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::BuildMI(), llvm::MachineOperand::ChangeToImmediate(), llvm::MachineOperand::ChangeToRegister(), commuteOpcode(), llvm::MachineRegisterInfo::createVirtualRegister(), findImplicitSGPRRead(), fixImplicitOperands(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineInstr::isCommutable(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isKill(), isLegalRegOperand(), isLiteralConstantLike(), llvm::MachineOperand::isReg(), legalizeOpWithMove(), llvm_unreachable, MI, llvm::MCInstrDesc::OpInfo, Reg, llvm::MachineInstr::setDesc(), and llvm::MachineOperand::setSubReg().
Referenced by getOpSize(), and legalizeOperands().
| void SIInstrInfo::legalizeOperandsVOP3 | ( | MachineRegisterInfo & | MRI, |
| MachineInstr & | MI | ||
| ) | const |
Fix operands in MI to satisfy constant bus requirements.
Definition at line 4133 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::BuildMI(), llvm::MachineOperand::ChangeToRegister(), llvm::detail::DenseSetImpl< ValueT, SmallDenseMap< ValueT, detail::DenseSetEmpty, InlineBuckets, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::count(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineInstr::getDebugLoc(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::detail::DenseSetImpl< ValueT, SmallDenseMap< ValueT, detail::DenseSetEmpty, InlineBuckets, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert(), isLiteralConstantLike(), isOperandLegal(), llvm::MachineOperand::isReg(), legalizeOpWithMove(), MI, and Reg.
Referenced by llvm::SITargetLowering::AdjustInstrPostInstrSelection(), getOpSize(), and legalizeOperands().
| void SIInstrInfo::legalizeOpWithMove | ( | MachineInstr & | MI, |
| unsigned | OpIdx | ||
| ) | const |
Legalize the OpIndex operand of this instruction by inserting a MOV.
For example: ADD_I32_e32 VGPR0, 15 to MOV VGPR1, 15 ADD_I32_e32 VGPR0, VGPR1
If the operand being legalized is a register, then a COPY will be used instead of MOV.
Definition at line 3833 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::BuildMI(), llvm::MachineOperand::ChangeToRegister(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineBasicBlock::findDebugLoc(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineRegisterInfo::getTargetRegisterInfo(), I, llvm::MachineOperand::isReg(), MI, MRI, Reg, Size, and TRI.
Referenced by getOpSize(), legalizeOperandsVOP2(), and legalizeOperandsVOP3().
|
override |
Definition at line 1180 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::RegState::Define, llvm::MachineBasicBlock::findDebugLoc(), getAGPRSpillRestoreOpcode(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::SIMachineFunctionInfo::getScratchRSrcReg(), getSGPRSpillRestoreOpcode(), llvm::TargetRegisterInfo::getSpillSize(), llvm::SIMachineFunctionInfo::getStackPtrOffsetReg(), getVGPRSpillRestoreOpcode(), llvm::SIRegisterInfo::hasAGPRs(), llvm::RegState::Implicit, llvm::SIRegisterInfo::isSGPRClass(), llvm::Register::isVirtualRegister(), llvm::MachineMemOperand::MOLoad, MRI, llvm::SIMachineFunctionInfo::setHasSpilledSGPRs(), llvm::TargetStackID::SGPRSpill, Size, and llvm::SIRegisterInfo::spillSGPRToVGPR().
Referenced by getRegisterInfo().
| void SIInstrInfo::materializeImmediate | ( | MachineBasicBlock & | MBB, |
| MachineBasicBlock::iterator | MI, | ||
| const DebugLoc & | DL, | ||
| unsigned | DestReg, | ||
| int64_t | Value | ||
| ) | const |
Definition at line 758 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), llvm::MachineBasicBlock::getParent(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::SIRegisterInfo::getRegSplitParts(), llvm::SIRegisterInfo::isSGPRClass(), MRI, and llvm::ArrayRef< T >::size().
Referenced by containsNewBackedge(), convertNonUniformLoopRegion(), getRegisterInfo(), and removeExternalCFGEdges().
| bool SIInstrInfo::mayAccessFlatAddressSpace | ( | const MachineInstr & | MI | ) | const |
Definition at line 6056 of file SIInstrInfo.cpp.
References AMDGPUAS::FLAT_ADDRESS, isFLAT(), llvm::MachineInstr::memoperands(), and llvm::MachineInstr::memoperands_empty().
Referenced by getMCOpcodeFromPseudo().
| bool SIInstrInfo::mayReadEXEC | ( | const MachineRegisterInfo & | MRI, |
| const MachineInstr & | MI | ||
| ) | const |
Returns true if the instruction could potentially depend on the value of exec.
If false, exec dependencies may safely be ignored.
Definition at line 2794 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineInstr::isCall(), llvm::MachineInstr::isCopyLike(), llvm::MachineInstr::isMetaInstruction(), isSALU(), llvm::SIRegisterInfo::isSGPRReg(), llvm::isTargetSpecificOpcode(), and llvm::MachineInstr::readsRegister().
Referenced by hasVGPRUses().
| void SIInstrInfo::moveToVALU | ( | MachineInstr & | MI, |
| MachineDominatorTree * | MDT = nullptr |
||
| ) | const |
Replace this instruction's opcode with the equivalent VALU opcode.
This function will also move the users of MI to the VALU if necessary. If present, MDT is updated.
Definition at line 4825 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstr::addImplicitDefUseOperands(), llvm::MachineInstr::addOperand(), llvm::MachineInstrBuilder::addReg(), assert(), buildExtractSubRegOrImm(), llvm::BuildMI(), llvm::MachineRegisterInfo::clearKillFlags(), llvm::MachineOperand::CreateImm(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::RegState::Dead, llvm::RegState::Define, E, llvm::SetVector< T, Vector, Set >::empty(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::eraseFromParent(), findImplicitSGPRRead(), fixImplicitOperands(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getDesc(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), getOpRegClass(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), getVALUOp(), I, llvm::SetVector< T, Vector, Set >::insert(), llvm::MachineInstr::isCopy(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isImm(), llvm::Register::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::Register::isVirtualRegister(), llvm::RegState::Kill, legalizeGenericOperand(), legalizeOperands(), llvm_unreachable, llvm::make_range(), MI, MRI, llvm::MCInstrDesc::OpInfo, llvm::SetVector< T, Vector, Set >::pop_back_val(), Reg, llvm::MCOperandInfo::RegClass, llvm::MachineInstr::RemoveOperand(), llvm::MachineRegisterInfo::replaceRegWith(), llvm::MachineInstr::setDesc(), llvm::MachineOperand::setReg(), Size, llvm::MachineRegisterInfo::use_begin(), llvm::MachineRegisterInfo::use_end(), UseMI, and llvm::SIInstrFlags::WQM.
Referenced by getOpSize().
| int SIInstrInfo::pseudoToMCOpcode | ( | int | Opcode | ) | const |
Return a target-specific opcode if Opcode is a pseudo instruction.
Return -1 if the target-specific opcode for the pseudo instruction does not exist. If Opcode is not a pseudo instruction, this is identity.
Definition at line 6363 of file SIInstrInfo.cpp.
References llvm::SIInstrFlags::D16Buf, llvm::AMDGPU::getMCOpcode(), llvm::AMDGPUSubtarget::GFX10, GFX80, llvm::AMDGPUSubtarget::GFX9, GFX9, isAsmOnlyOpcode(), llvm::SIInstrFlags::renamedInGFX9, llvm::SIInstrFlags::SDWA, SDWA, SDWA10, SDWA9, and subtargetEncodingFamily().
Referenced by commuteOpcode(), convertToThreeAddress(), llvm::createGCNDPPCombinePass(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), FoldImmediate(), getMCOpcodeFromPseudo(), getPermuteMask(), hasVALU32BitEncoding(), isLegalMUBUFImmOffset(), and operator<<().
| unsigned SIInstrInfo::readlaneVGPRToSGPR | ( | unsigned | SrcReg, |
| MachineInstr & | UseMI, | ||
| MachineRegisterInfo & | MRI | ||
| ) | const |
Copy a value from a VGPR (SrcReg) to SGPR.
This function can only be used when it is know that the value in SrcReg is same across all threads in the wave.
SrcReg was copied to. Definition at line 4220 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getParent(), llvm::MachineRegisterInfo::getRegClass(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and UseMI.
Referenced by getOpSize(), legalizeOperands(), and legalizeOperandsSMRD().
|
override |
Definition at line 2022 of file SIInstrInfo.cpp.
References llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getFirstTerminator(), getInstSizeInBytes(), and I.
Referenced by commuteOpcode(), and isFunctionEntryBlock().
|
override |
Definition at line 2112 of file SIInstrInfo.cpp.
References llvm::SmallVectorBase::size().
Referenced by commuteOpcode().
|
override |
Definition at line 436 of file SIInstrInfo.cpp.
References getNamedOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getParent(), llvm::MachineInstr::getParent(), llvm::SIRegisterInfo::getPhysRegClass(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), isDS(), isFLAT(), isMTBUF(), isMUBUF(), isSMRD(), llvm::Register::isVirtualRegister(), memOpsHaveSameBasePtr(), MRI, and Reg.
Referenced by getRegisterInfo().
|
override |
Definition at line 504 of file SIInstrInfo.cpp.
References assert().
Referenced by getRegisterInfo().
|
inlinestatic |
Definition at line 610 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::SOPK_ZEXT, and llvm::MCInstrDesc::TSFlags.
Referenced by shrinkScalarCompare(), and verifyInstruction().
Definition at line 614 of file SIInstrInfo.h.
References llvm::SIInstrFlags::SOPK_ZEXT.
|
override |
Definition at line 1050 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::RegState::Define, llvm::MachineBasicBlock::findDebugLoc(), getAGPRSpillSaveOpcode(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::getKillRegState(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::SIMachineFunctionInfo::getScratchRSrcReg(), getSGPRSpillSaveOpcode(), llvm::TargetRegisterInfo::getSpillSize(), llvm::SIMachineFunctionInfo::getStackPtrOffsetReg(), getVGPRSpillSaveOpcode(), llvm::SIRegisterInfo::hasAGPRs(), llvm::RegState::Implicit, llvm::SIRegisterInfo::isSGPRClass(), llvm::Register::isVirtualRegister(), llvm::MachineMemOperand::MOStore, MRI, llvm::SIMachineFunctionInfo::setHasSpilledSGPRs(), llvm::SIMachineFunctionInfo::setHasSpilledVGPRs(), llvm::TargetStackID::SGPRSpill, Size, and llvm::SIRegisterInfo::spillSGPRToVGPR().
Referenced by getRegisterInfo().
|
protected |
Definition at line 1630 of file SIInstrInfo.cpp.
References assert(), llvm::MachineOperand::getImm(), getNamedOperand(), and llvm::MachineOperand::setImm().
Referenced by commuteInstructionImpl().
| bool SIInstrInfo::usesConstantBus | ( | const MachineRegisterInfo & | MRI, |
| const MachineOperand & | MO, | ||
| const MCOperandInfo & | OpInfo | ||
| ) | const |
Returns true if this operand uses the constant bus.
Definition at line 3108 of file SIInstrInfo.cpp.
References contains(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isImplicit(), isInlineConstant(), llvm::MachineOperand::isReg(), llvm::SIRegisterInfo::isSGPRClass(), llvm::MachineOperand::isUse(), and llvm::Register::isVirtualRegister().
Referenced by isLiteralConstant(), isOperandLegal(), and verifyInstruction().
|
inlinestatic |
Definition at line 656 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FPDPRounding, llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by llvm::createSIModeRegisterPass().
Definition at line 660 of file SIInstrInfo.h.
References llvm::SIInstrFlags::FPDPRounding.
|
inlinestatic |
Definition at line 606 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::SIInstrFlags::LGKM_CNT, and llvm::MCInstrDesc::TSFlags.
|
inlinestatic |
Definition at line 602 of file SIInstrInfo.h.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, and llvm::SIInstrFlags::VM_CNT.
|
override |
Definition at line 3199 of file SIInstrInfo.cpp.
References llvm::all_of(), llvm::AMDGPU::MIMGInfo::BaseOpcode, llvm::AMDGPU::DPP::BCAST15, llvm::AMDGPU::DPP::BCAST31, compareMachineOp(), llvm::TargetRegisterClass::contains(), llvm::AMDGPU::MIMGBaseOpcodeInfo::Coordinates, llvm::countPopulation(), DC, llvm::SIInstrFlags::DPP, llvm::AMDGPU::DPP::DPP_LAST, llvm::AMDGPU::DPP::DPP_UNUSED1, llvm::AMDGPU::DPP::DPP_UNUSED2, llvm::AMDGPU::DPP::DPP_UNUSED3, llvm::AMDGPU::DPP::DPP_UNUSED4_FIRST, llvm::AMDGPU::DPP::DPP_UNUSED4_LAST, llvm::AMDGPU::DPP::DPP_UNUSED5_FIRST, llvm::AMDGPU::DPP::DPP_UNUSED5_LAST, llvm::AMDGPU::DPP::DPP_UNUSED6_FIRST, llvm::AMDGPU::DPP::DPP_UNUSED6_LAST, llvm::AMDGPU::DPP::DPP_UNUSED7_FIRST, llvm::AMDGPU::DPP::DPP_UNUSED7_LAST, llvm::AMDGPU::DPP::DPP_UNUSED8_FIRST, llvm::AMDGPU::DPP::DPP_UNUSED8_LAST, llvm::numbers::e, E, findImplicitSGPRRead(), llvm::MachineInstr::findTiedOperandIdx(), llvm::AMDGPU::getBasicFromSDWAOp(), llvm::GCNSubtarget::getConstantBusLimit(), llvm::MachineInstr::getDesc(), llvm::MachineOperand::getImm(), llvm::AMDGPU::getMIMGBaseOpcodeInfo(), llvm::AMDGPU::getMIMGDimInfoByEncoding(), llvm::AMDGPU::getMIMGInfo(), getNamedOperand(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getNumExplicitOperands(), llvm::MCInstrDesc::getNumImplicitUses(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineInstr::getNumOperands(), llvm::MCInstrDesc::getOpcode(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), getOpRegClass(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::SIRegisterInfo::getRegClass(), llvm::MachineInstr::getRegClassConstraint(), llvm::SIRegisterInfo::getRegClassForReg(), llvm::MachineFunction::getRegInfo(), llvm::TargetRegisterInfo::getRegSizeInBits(), llvm::MachineFunction::getSubtarget(), llvm::MachineRegisterInfo::getTargetRegisterInfo(), llvm::AMDGPUSubtarget::GFX10, llvm::AMDGPU::MIMGBaseOpcodeInfo::Gradients, llvm::MachineInstr::hasRegisterImplicitUseOperand(), llvm::AMDGPUSubtarget::hasSDWA(), llvm::GCNSubtarget::hasSDWAOmod(), llvm::GCNSubtarget::hasSDWAOutModsVOPC(), llvm::GCNSubtarget::hasSDWAScalar(), llvm::GCNSubtarget::hasSDWASdst(), llvm::GCNSubtarget::hasUnpackedD16VMem(), llvm::SIRegisterInfo::hasVGPRs(), llvm::GCNSubtarget::hasVOP3Literal(), I, Info, llvm::MCInstrDesc::isBranch(), llvm::MachineOperand::isFI(), isFLAT(), llvm::MachineOperand::isFPImm(), isGather4(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isImplicit(), llvm::MachineInstr::isInlineAsm(), isInlineConstant(), llvm::isInt< 16 >(), isMIMG(), llvm::Register::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MachineInstr::isRegTiedToUseOperand(), isSDWA(), isSMRD(), isSOP2(), isSOPC(), isSOPK(), isSubRegOf(), llvm::MachineOperand::isTied(), llvm::isUInt< 16 >(), llvm::MachineOperand::isUse(), llvm::MCInstrDesc::isVariadic(), llvm::Register::isVirtualRegister(), isVOP1(), isVOP2(), isVOP3(), isVOPC(), LLVM_FALLTHROUGH, llvm::AMDGPU::MIMGBaseOpcodeInfo::LodOrClampOrMip, llvm::MachineInstr::mayStore(), llvm::InlineAsm::MIOp_FirstOperand, MRI, llvm::AMDGPU::MIMGDimInfo::NumCoords, llvm::AMDGPU::MIMGBaseOpcodeInfo::NumExtraArgs, llvm::AMDGPU::MIMGDimInfo::NumGradients, llvm::MCOI::OPERAND_IMMEDIATE, llvm::AMDGPU::OPERAND_KIMM32, llvm::AMDGPU::OPERAND_REG_IMM_FP32, llvm::AMDGPU::OPERAND_REG_IMM_INT32, llvm::AMDGPU::OPERAND_REG_INLINE_AC_FP16, llvm::AMDGPU::OPERAND_REG_INLINE_AC_FP32, llvm::AMDGPU::OPERAND_REG_INLINE_AC_INT16, llvm::AMDGPU::OPERAND_REG_INLINE_AC_INT32, llvm::AMDGPU::OPERAND_REG_INLINE_C_FP16, llvm::AMDGPU::OPERAND_REG_INLINE_C_FP32, llvm::AMDGPU::OPERAND_REG_INLINE_C_FP64, llvm::AMDGPU::OPERAND_REG_INLINE_C_INT16, llvm::AMDGPU::OPERAND_REG_INLINE_C_INT32, llvm::AMDGPU::OPERAND_REG_INLINE_C_INT64, llvm::MCOI::OPERAND_REGISTER, llvm::MCOperandInfo::OperandType, llvm::MCInstrDesc::OpInfo, llvm::SmallVectorTemplateBase< T, bool >::push_back(), Reg, llvm::MCOperandInfo::RegClass, llvm::AMDGPU::DPP::ROW_SHARE_FIRST, llvm::AMDGPU::DPP::ROW_XMASK_LAST, shouldReadExec(), sopkIsZext(), llvm::AMDGPU::SDWA::UNUSED_PRESERVE, usesConstantBus(), llvm::AMDGPU::DPP::WAVE_ROR1, and llvm::AMDGPU::DPP::WAVE_SHL1.
Referenced by isLiteralConstant().
1.8.13