|
LLVM
10.0.0
|
SI Implementation of TargetInstrInfo. More...
#include "SIInstrInfo.h"#include "AMDGPU.h"#include "AMDGPUSubtarget.h"#include "GCNHazardRecognizer.h"#include "SIDefines.h"#include "SIMachineFunctionInfo.h"#include "SIRegisterInfo.h"#include "MCTargetDesc/AMDGPUMCTargetDesc.h"#include "Utils/AMDGPUBaseInfo.h"#include "llvm/ADT/APInt.h"#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/StringRef.h"#include "llvm/ADT/iterator_range.h"#include "llvm/Analysis/AliasAnalysis.h"#include "llvm/Analysis/MemoryLocation.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineDominators.h"#include "llvm/CodeGen/MachineFrameInfo.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineInstrBundle.h"#include "llvm/CodeGen/MachineMemOperand.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/RegisterScavenging.h"#include "llvm/CodeGen/ScheduleDAG.h"#include "llvm/CodeGen/SelectionDAGNodes.h"#include "llvm/CodeGen/TargetOpcodes.h"#include "llvm/CodeGen/TargetRegisterInfo.h"#include "llvm/IR/DebugLoc.h"#include "llvm/IR/DiagnosticInfo.h"#include "llvm/IR/Function.h"#include "llvm/IR/InlineAsm.h"#include "llvm/IR/LLVMContext.h"#include "llvm/MC/MCInstrDesc.h"#include "llvm/Support/Casting.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/MachineValueType.h"#include "llvm/Support/MathExtras.h"#include "llvm/Target/TargetMachine.h"#include <cassert>#include <cstdint>#include <iterator>#include <utility>#include "AMDGPUGenInstrInfo.inc"#include "AMDGPUGenSearchableTables.inc"Go to the source code of this file.
Namespaces | |
| llvm | |
| This class represents lattice values for constants. | |
| llvm::AMDGPU | |
Macros | |
| #define | GET_INSTRINFO_CTOR_DTOR |
| #define | GET_D16ImageDimIntrinsics_IMPL |
| #define | GET_ImageDimIntrinsicTable_IMPL |
| #define | GET_RsrcIntrinsics_IMPL |
Enumerations | |
| enum | SIEncodingFamily { SI = 0, VI = 1, SDWA = 2, SDWA9 = 3, GFX80 = 4, GFX9 = 5, GFX10 = 6, SDWA10 = 7 } |
Variables | |
| static cl::opt< unsigned > | BranchOffsetBits ("amdgpu-s-branch-bits", cl::ReallyHidden, cl::init(16), cl::desc("Restrict range of branch instructions (DEBUG)")) |
SI Implementation of TargetInstrInfo.
Definition in file SIInstrInfo.cpp.
| #define GET_D16ImageDimIntrinsics_IMPL |
Definition at line 71 of file SIInstrInfo.cpp.
| #define GET_ImageDimIntrinsicTable_IMPL |
Definition at line 72 of file SIInstrInfo.cpp.
| #define GET_INSTRINFO_CTOR_DTOR |
Definition at line 66 of file SIInstrInfo.cpp.
| #define GET_RsrcIntrinsics_IMPL |
Definition at line 73 of file SIInstrInfo.cpp.
| enum SIEncodingFamily |
| Enumerator | |
|---|---|
| SI | |
| VI | |
| SDWA | |
| SDWA9 | |
| GFX80 | |
| GFX9 | |
| GFX10 | |
| SDWA10 | |
Definition at line 6316 of file SIInstrInfo.cpp.
|
static |
Definition at line 2721 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
Referenced by llvm::SIInstrInfo::isSchedulingBoundary().
|
static |
Definition at line 2918 of file SIInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getType(), llvm_unreachable, llvm::MachineOperand::MO_Immediate, and llvm::MachineOperand::MO_Register.
Referenced by llvm::SIInstrInfo::verifyInstruction().
|
static |
Definition at line 3055 of file SIInstrInfo.cpp.
References llvm::MachineInstr::implicit_operands(), llvm::MachineOperand::isKill(), and llvm::MachineOperand::isUndef().
Referenced by llvm::SIInstrInfo::buildShrunkInst().
|
static |
Definition at line 4328 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::GCNSubtarget::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::getUndefRegState(), I, llvm::MachineOperand::isUndef(), llvm::GCNSubtarget::isWave32(), llvm::RegState::Kill, llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setReg(), llvm::MachineRegisterInfo::setSimpleHint(), and TRI.
Referenced by loadSRsrcFromVGPR().
|
static |
Definition at line 4481 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::SIInstrInfo::buildExtractSubReg(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineInstr::getDebugLoc(), llvm::SIInstrInfo::getDefaultRsrcDataFormat(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineFunction::getRegInfo(), and MRI.
Referenced by llvm::SIInstrInfo::legalizeOperands().
|
static |
Definition at line 3141 of file SIInstrInfo.cpp.
References llvm::MachineInstr::implicit_operands().
Referenced by llvm::SIInstrInfo::legalizeOperandsVOP2(), llvm::SIInstrInfo::moveToVALU(), and llvm::SIInstrInfo::verifyInstruction().
|
static |
Definition at line 6427 of file SIInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), getRegOrUndef(), llvm::getRegSequenceSubReg(), llvm::TargetInstrInfo::RegSubRegPair::Reg, and llvm::TargetInstrInfo::RegSubRegPair::SubReg.
Referenced by llvm::getVRegSubRegDef().
Definition at line 1163 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by llvm::SIInstrInfo::loadRegFromStackSlot().
Definition at line 1033 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by llvm::SIInstrInfo::storeRegToStackSlot().
|
static |
Definition at line 2602 of file SIInstrInfo.cpp.
References llvm::tgtok::Def, llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineRegisterInfo::getUniqueVRegDef(), llvm::MachineOperand::isReg(), and MRI.
Referenced by llvm::SIInstrInfo::convertToThreeAddress().
Definition at line 96 of file SIInstrInfo.cpp.
Referenced by llvm::SIInstrInfo::areLoadsFromSameBasePtr().
|
static |
Definition at line 6408 of file SIInstrInfo.cpp.
References assert(), llvm::getRegSubRegPair(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isUndef().
Referenced by followSubRegDef(), and llvm::getRegSequenceSubReg().
Definition at line 1117 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by llvm::SIInstrInfo::loadRegFromStackSlot().
Definition at line 987 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by llvm::SIInstrInfo::storeRegToStackSlot().
Definition at line 1140 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by llvm::SIInstrInfo::loadRegFromStackSlot().
Definition at line 1010 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by llvm::SIInstrInfo::storeRegToStackSlot().
Definition at line 249 of file SIInstrInfo.cpp.
Referenced by llvm::SIInstrInfo::getMemOperandWithOffset().
|
static |
Definition at line 3189 of file SIInstrInfo.cpp.
References llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), and llvm::Register::isPhysicalRegister().
Referenced by llvm::SIInstrInfo::verifyInstruction().
|
static |
Definition at line 4411 of file SIInstrInfo.cpp.
References llvm::MachineDominatorTree::addNewBlock(), llvm::MachineBasicBlock::addSuccessor(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineDominatorTree::changeImmediateDominator(), llvm::MachineRegisterInfo::clearKillFlags(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineRegisterInfo::createVirtualRegister(), emitLoadSRsrcFromVGPRLoop(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::getDebugLoc(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineFunction::getRegInfo(), llvm::GCNSubtarget::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::MachineFunction::insert(), llvm::GCNSubtarget::isWave32(), MRI, llvm::MachineDominatorTree::properlyDominates(), llvm::MachineBasicBlock::splice(), llvm::MachineBasicBlock::successors(), llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs(), TRI, and llvm::MachineInstr::uses().
Referenced by llvm::SIInstrInfo::legalizeOperands().
|
static |
Definition at line 401 of file SIInstrInfo.cpp.
References llvm::Module::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::GlobalValue::getParent(), llvm::GetUnderlyingObject(), llvm::MachineInstr::hasOneMemOperand(), llvm::MachineOperand::isIdenticalTo(), llvm::MachineOperand::isReg(), and llvm::MachineInstr::memoperands_begin().
Referenced by llvm::SIInstrInfo::shouldClusterMemOps().
Returns true if both nodes have the same value for the given operand Op, or if both nodes do not have this operand.
Definition at line 105 of file SIInstrInfo.cpp.
References llvm::SDNode::getMachineOpcode(), llvm::AMDGPU::getNamedOperandIdx(), and llvm::SDNode::getOperand().
Referenced by llvm::SIInstrInfo::areLoadsFromSameBasePtr().
|
static |
Definition at line 2520 of file SIInstrInfo.cpp.
References llvm::SIInstrInfo::getMemOperandWithOffset(), llvm::MachineInstr::hasOneMemOperand(), llvm::MachineOperand::isIdenticalTo(), and llvm::MachineInstr::memoperands_begin().
|
static |
Definition at line 2048 of file SIInstrInfo.cpp.
References llvm::MachineOperand::isKill(), llvm::MachineOperand::isUndef(), llvm::MachineOperand::setIsKill(), and llvm::MachineOperand::setIsUndef().
Referenced by llvm::SIInstrInfo::insertBranch(), and llvm::SIInstrInfo::insertSelect().
|
static |
Definition at line 2301 of file SIInstrInfo.cpp.
References llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), and llvm::MachineInstr::RemoveOperand().
Referenced by llvm::SIInstrInfo::FoldImmediate().
|
static |
Definition at line 516 of file SIInstrInfo.cpp.
References llvm::BuildMI(), C, llvm::LLVMContext::diagnose(), llvm::DS_Error, llvm::Function::getContext(), llvm::MachineFunction::getFunction(), llvm::getKillRegState(), and llvm::MachineBasicBlock::getParent().
Referenced by llvm::SIInstrInfo::copyPhysReg().
|
static |
Definition at line 3163 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::isPreISelOpcode(), llvm::SIInstrInfo::isSALU(), llvm::SIInstrInfo::isSMRD(), and llvm::SIInstrInfo::isVALU().
Referenced by llvm::SIInstrInfo::verifyInstruction().
|
static |
Definition at line 6327 of file SIInstrInfo.cpp.
References llvm::GCNSubtarget::getGeneration(), llvm::AMDGPUSubtarget::GFX10, GFX10, llvm::AMDGPUSubtarget::GFX9, llvm_unreachable, llvm::AMDGPUSubtarget::SEA_ISLANDS, SI, llvm::AMDGPUSubtarget::SOUTHERN_ISLANDS, VI, and llvm::AMDGPUSubtarget::VOLCANIC_ISLANDS.
Referenced by llvm::SIInstrInfo::pseudoToMCOpcode().
|
static |
Definition at line 1651 of file SIInstrInfo.cpp.
References llvm::MachineOperand::ChangeToFrameIndex(), llvm::MachineOperand::ChangeToImmediate(), llvm::MachineOperand::ChangeToRegister(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), IsDead, llvm::MachineOperand::isDead(), llvm::MachineOperand::isDebug(), llvm::MachineOperand::isFI(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isKill(), llvm::MachineOperand::isUndef(), MI, Reg, llvm::MachineOperand::setSubReg(), and SubReg.
Referenced by llvm::SIInstrInfo::commuteInstructionImpl().
|
static |
Referenced by llvm::SIInstrInfo::isBranchOffsetInRange().
1.8.13