LLVM
8.0.1
|
SI Implementation of TargetInstrInfo. More...
#include "SIInstrInfo.h"
#include "AMDGPU.h"
#include "AMDGPUIntrinsicInfo.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 } |
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 73 of file SIInstrInfo.cpp.
#define GET_ImageDimIntrinsicTable_IMPL |
Definition at line 74 of file SIInstrInfo.cpp.
#define GET_INSTRINFO_CTOR_DTOR |
Definition at line 68 of file SIInstrInfo.cpp.
#define GET_RsrcIntrinsics_IMPL |
Definition at line 75 of file SIInstrInfo.cpp.
enum SIEncodingFamily |
Enumerator | |
---|---|
SI | |
VI | |
SDWA | |
SDWA9 | |
GFX80 | |
GFX9 |
Definition at line 5508 of file SIInstrInfo.cpp.
|
static |
Definition at line 2367 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
Referenced by llvm::SIInstrInfo::isSchedulingBoundary().
|
static |
Definition at line 2531 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 2651 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 3702 of file SIInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineBasicBlock::end(), llvm::MachineOperand::getReg(), llvm::getUndefRegState(), I, llvm::MachineOperand::isUndef(), llvm::RegState::Kill, llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setReg(), and llvm::MachineRegisterInfo::setSimpleHint().
Referenced by loadSRsrcFromVGPR().
|
static |
Definition at line 3840 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().
Definition at line 103 of file SIInstrInfo.cpp.
References assert(), getNumOperandsNoGlue(), llvm::SDNode::getOperand(), llvm::SDValue::getValueType(), and llvm::MVT::Other.
Referenced by llvm::SIInstrInfo::areLoadsFromSameBasePtr().
|
static |
Definition at line 2736 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 5581 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().
|
static |
Definition at line 2261 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(), and findChainOperand().
|
static |
Definition at line 5562 of file SIInstrInfo.cpp.
References assert(), llvm::getRegSubRegPair(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isUndef().
Referenced by followSubRegDef(), and llvm::getRegSequenceSubReg().
Definition at line 936 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by llvm::SIInstrInfo::loadRegFromStackSlot().
Definition at line 834 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by llvm::SIInstrInfo::storeRegToStackSlot().
Definition at line 953 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by llvm::SIInstrInfo::loadRegFromStackSlot().
Definition at line 851 of file SIInstrInfo.cpp.
References llvm_unreachable.
Referenced by llvm::SIInstrInfo::storeRegToStackSlot().
Definition at line 256 of file SIInstrInfo.cpp.
Referenced by llvm::SIInstrInfo::getMemOperandWithOffset().
|
static |
Definition at line 2779 of file SIInstrInfo.cpp.
References llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), and llvm::TargetRegisterInfo::isPhysicalRegister().
Referenced by llvm::SIInstrInfo::verifyInstruction().
|
static |
Definition at line 3773 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(), llvm::MachineDominatorTree::dominates(), emitLoadSRsrcFromVGPRLoop(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::getDebugLoc(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineFunction::getRegInfo(), I, llvm::MachineFunction::insert(), MRI, llvm::MachineBasicBlock::splice(), llvm::MachineBasicBlock::successors(), llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs(), and llvm::MachineInstr::uses().
Referenced by llvm::SIInstrInfo::legalizeOperands().
|
static |
Definition at line 381 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 111 of file SIInstrInfo.cpp.
References llvm::SDNode::getMachineOpcode(), llvm::AMDGPU::getNamedOperandIdx(), and llvm::SDNode::getOperand().
Referenced by llvm::SIInstrInfo::areLoadsFromSameBasePtr().
|
static |
Definition at line 2167 of file SIInstrInfo.cpp.
References llvm::SIInstrInfo::getMemOperandWithOffset(), llvm::MachineInstr::hasOneMemOperand(), llvm::MachineOperand::isIdenticalTo(), and llvm::MachineInstr::memoperands_begin().
|
static |
Definition at line 1735 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 1981 of file SIInstrInfo.cpp.
References llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), and llvm::MachineInstr::RemoveOperand().
Referenced by llvm::SIInstrInfo::FoldImmediate().
|
static |
Definition at line 491 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 2756 of file SIInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), llvm::SIInstrInfo::isSALU(), llvm::SIInstrInfo::isSMRD(), and llvm::SIInstrInfo::isVALU().
Referenced by llvm::SIInstrInfo::verifyInstruction().
|
static |
Definition at line 5517 of file SIInstrInfo.cpp.
References llvm::GCNSubtarget::getGeneration(), 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 1343 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().