LLVM 22.0.0git
|
#include "GCNHazardRecognizer.h"
#include "GCNSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "SIMachineFunctionInfo.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/ScheduleDAG.h"
#include "llvm/TargetParser/TargetParser.h"
Go to the source code of this file.
Typedefs | |
using | HazardFnResult = enum { HazardFound, HazardExpired, NoHazardFound } |
using | IsExpiredFn = function_ref<bool(const MachineInstr &, int WaitStates)> |
using | GetNumWaitStatesFn = function_ref<unsigned int(const MachineInstr &)> |
Variables | |
static cl::opt< unsigned, false, MFMAPaddingRatioParser > | MFMAPaddingRatio ("amdgpu-mfma-padding-ratio", cl::init(0), cl::Hidden, cl::desc("Fill a percentage of the latency between " "neighboring MFMA with s_nops.")) |
static cl::opt< unsigned > | NopPadding ("amdgpu-snop-padding", cl::init(0), cl::Hidden, cl::desc("Insert a s_nop x before every instruction")) |
using GetNumWaitStatesFn = function_ref<unsigned int(const MachineInstr &)> |
Definition at line 441 of file GCNHazardRecognizer.cpp.
using HazardFnResult = enum { HazardFound, HazardExpired, NoHazardFound } |
Definition at line 438 of file GCNHazardRecognizer.cpp.
using IsExpiredFn = function_ref<bool(const MachineInstr &, int WaitStates)> |
Definition at line 440 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 588 of file GCNHazardRecognizer.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, addRegUnits(), and TRI.
|
static |
Definition at line 582 of file GCNHazardRecognizer.cpp.
References Reg, llvm::BitVector::set(), and TRI.
Referenced by addRegsToSet().
|
static |
Definition at line 601 of file GCNHazardRecognizer.cpp.
References llvm::SIInstrInfo::isSMRD(), and MI.
|
static |
Definition at line 605 of file GCNHazardRecognizer.cpp.
References llvm::SIInstrInfo::isVMEM(), and MI.
|
static |
Checks whether the provided MI
"consumes" the operand with a Dest sel fowarding issue Dst
.
We may "consume" the Dst via a standard explicit RAW, or through irregular ways (e.g implicit RAW, certain types of WAW)
Definition at line 931 of file GCNHazardRecognizer.cpp.
References TRI.
|
static |
Definition at line 3321 of file GCNHazardRecognizer.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::MachineFunction::front(), and TII.
|
static |
Dest sel forwarding issue occurs if additional logic is needed to swizzle / pack the computed value into correct bit position of the dest register.
This occurs if we have SDWA with dst_sel != DWORD or if we have op_sel with dst_sel that is not aligned to the register. This function analayzes the MI
and
Definition at line 885 of file GCNHazardRecognizer.cpp.
References llvm::SISrcMods::DST_OP_SEL, llvm::AMDGPU::SDWA::DWORD, llvm::AMDGPU::FP4, llvm::AMDGPU::FP8, llvm::AMDGPU::getFPDstSelType(), llvm::AMDGPU::hasNamedOperand(), llvm::SIInstrInfo::isSDWA(), llvm::SIInstrInfo::isVALU(), MI, llvm::SISrcMods::OP_SEL_0, and TII.
|
static |
Definition at line 168 of file GCNHazardRecognizer.cpp.
References llvm::AMDGPU::EncodingFields< HwregId, HwregOffset, HwregSize >::decode(), llvm::MachineOperand::getImm(), and TII.
|
static |
Definition at line 488 of file GCNHazardRecognizer.cpp.
References E(), llvm::SIInstrInfo::getNumWaitStates(), getWaitStatesSince(), I, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), and MBB.
Referenced by getWaitStatesSince(), and getWaitStatesSince().
|
static |
Definition at line 524 of file GCNHazardRecognizer.cpp.
References llvm::SIInstrInfo::getNumWaitStates(), getWaitStatesSince(), and MI.
|
static |
Definition at line 2483 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2492 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2830 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2802 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2472 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2500 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2461 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2820 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2810 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 446 of file GCNHazardRecognizer.cpp.
References E(), hasHazard(), I, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), and MBB.
Referenced by hasHazard().
|
static |
Definition at line 249 of file GCNHazardRecognizer.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), MI, and TII.
|
static |
Definition at line 1929 of file GCNHazardRecognizer.cpp.
References llvm::SIInstrInfo::isSWMMAC(), llvm::SIInstrInfo::isTRANS(), llvm::SIInstrInfo::isVALU(), llvm::SIInstrInfo::isWMMA(), and MI.
Definition at line 80 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
|
static |
Definition at line 163 of file GCNHazardRecognizer.cpp.
References llvm::SIInstrInfo::isFLAT(), llvm::SIInstrInfo::isMUBUF(), llvm::SIInstrInfo::isVALU(), and MI.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
|
static |
Definition at line 145 of file GCNHazardRecognizer.cpp.
References MI.
Referenced by llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 103 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 99 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
|
static |
Definition at line 119 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 84 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 107 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 88 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
|
static |
Definition at line 1454 of file GCNHazardRecognizer.cpp.
References I.
|
static |
Definition at line 1213 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 1934 of file GCNHazardRecognizer.cpp.
References assert(), llvm::SIInstrInfo::isSWMMAC(), llvm::SIInstrInfo::isWMMA(), llvm::Latency, MI, and TII.
|
static |
Definition at line 1433 of file GCNHazardRecognizer.cpp.
References llvm::SIInstrInfo::isDS(), llvm::SIInstrInfo::isFLAT(), llvm::SIInstrInfo::isSegmentSpecificFLAT(), llvm::SIInstrInfo::isVMEM(), MBB, and MI.
Referenced by llvm::GCNHazardRecognizer::GCNHazardRecognizer().
|
static |
Definition at line 3160 of file GCNHazardRecognizer.cpp.
References assert(), llvm::MachineBasicBlock::end(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getParent(), I, and llvm::MachineInstr::isBundled().
|
static |
|
static |
Referenced by llvm::GCNHazardRecognizer::PreEmitNoops().