LLVM 20.0.0git
|
#include "GCNHazardRecognizer.h"
#include "GCNSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "SIMachineFunctionInfo.h"
#include "llvm/ADT/PostOrderIterator.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 > | MaxExhaustiveHazardSearch ("amdgpu-max-exhaustive-hazard-search", cl::init(128), cl::Hidden, cl::desc("Maximum function size for exhausive hazard search")) |
using GetNumWaitStatesFn = function_ref<unsigned int(const MachineInstr &)> |
Definition at line 461 of file GCNHazardRecognizer.cpp.
using HazardFnResult = enum { HazardFound, HazardExpired, NoHazardFound } |
Definition at line 458 of file GCNHazardRecognizer.cpp.
using IsExpiredFn = function_ref<bool(const MachineInstr &, int WaitStates)> |
Definition at line 460 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 608 of file GCNHazardRecognizer.cpp.
References addRegUnits(), and TRI.
|
static |
Definition at line 602 of file GCNHazardRecognizer.cpp.
References llvm::BitVector::set(), and TRI.
Referenced by addRegsToSet().
|
static |
Definition at line 621 of file GCNHazardRecognizer.cpp.
References llvm::SIInstrInfo::isSMRD(), and MI.
|
static |
Definition at line 625 of file GCNHazardRecognizer.cpp.
References llvm::SIInstrInfo::isFLAT(), 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 948 of file GCNHazardRecognizer.cpp.
References TRI.
|
static |
Definition at line 3374 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 902 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 183 of file GCNHazardRecognizer.cpp.
References llvm::AMDGPU::EncodingFields< Fields >::decode(), llvm::MachineOperand::getImm(), and TII.
|
static |
Definition at line 508 of file GCNHazardRecognizer.cpp.
References getWaitStatesSince(), I, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), llvm::MachineBasicBlock::instr_rend(), MBB, and llvm::MachineBasicBlock::predecessors().
Referenced by getWaitStatesSince().
|
static |
Definition at line 544 of file GCNHazardRecognizer.cpp.
References getWaitStatesSince(), and MI.
|
static |
Definition at line 2280 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2289 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2619 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2595 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2269 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2297 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2258 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2611 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 2603 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 466 of file GCNHazardRecognizer.cpp.
References hasHazard(), I, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), llvm::MachineBasicBlock::instr_rend(), MBB, and llvm::MachineBasicBlock::predecessors().
Referenced by hasHazard().
|
static |
Definition at line 268 of file GCNHazardRecognizer.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), MI, and TII.
Definition at line 120 of file GCNHazardRecognizer.cpp.
References llvm::AMDGPU::getMAIIsDGEMM().
Referenced by isXDL().
Definition at line 81 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
|
static |
Definition at line 178 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 165 of file GCNHazardRecognizer.cpp.
References MI.
Referenced by llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 104 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 100 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
|
static |
Definition at line 139 of file GCNHazardRecognizer.cpp.
References llvm::AMDGPU::getNamedOperandIdx(), MI, and TII.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 85 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 108 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
Definition at line 89 of file GCNHazardRecognizer.cpp.
Referenced by llvm::GCNHazardRecognizer::getHazardType(), and llvm::GCNHazardRecognizer::PreEmitNoopsCommon().
|
static |
Definition at line 1460 of file GCNHazardRecognizer.cpp.
References I.
|
static |
Definition at line 1221 of file GCNHazardRecognizer.cpp.
|
static |
Definition at line 124 of file GCNHazardRecognizer.cpp.
References llvm::AMDGPU::getMAIIsGFX940XDL(), isDGEMM(), llvm::SIInstrInfo::isMAI(), and MI.
|
static |
Definition at line 3108 of file GCNHazardRecognizer.cpp.
References TRI.
|
static |
Definition at line 1439 of file GCNHazardRecognizer.cpp.
References llvm::SIInstrInfo::isDS(), llvm::SIInstrInfo::isSegmentSpecificFLAT(), llvm::SIInstrInfo::isVMEM(), MBB, and MI.
Referenced by llvm::GCNHazardRecognizer::GCNHazardRecognizer().
|
static |
Definition at line 2949 of file GCNHazardRecognizer.cpp.
References assert(), llvm::MachineBasicBlock::end(), End, llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getParent(), I, and llvm::MachineInstr::isBundled().
|
static |
|
static |