|
LLVM 24.0.0git
|
Co-execution characteristics for a multi-cycle instruction. More...
#include "Target/AMDGPU/AMDGPUCoExecInfo.h"
Public Member Functions | |
| CoExecInfo () | |
| Default constructor - initialize to safe defaults. | |
| CoExecMaskT | getMask (unsigned Stage) const |
| Get capability mask for a stage. | |
| bool | canCoExec (CoExecMaskT InstMask, unsigned Stage) const |
| Check if an instruction class mask can co-execute at a given stage. | |
| std::optional< unsigned > | findNextAllowedStage (CoExecMaskT InstMask, unsigned FromStage) const |
| Find next stage where the instruction class is allowed. | |
| unsigned | getStallCycles (CoExecMaskT InstMask, unsigned Stage) const |
Return the number of cycles an instruction matching InstMask must wait at Stage. | |
| CoExecStageType | getType (unsigned Stage) const |
| Get stage type for a specific stage. | |
Static Public Member Functions | |
| static CoExecStageType | getStageType (CoExecMaskT Mask) |
| Get stage type from mask for display. | |
| static CoExecInfo | build (unsigned UnitOccupancy, unsigned TotalWindow, const char *Pattern) |
| Build a CoExecInfo from an occupancy and stage pattern. | |
Public Attributes | |
| unsigned | UnitOccupancy = 0 |
| Number of cycles for which the producing instruction occupies its execution unit. | |
| unsigned | TotalWindow = 0 |
| Number of cycles in the co-execution window, counting any trailing vacant stages. | |
| CoExecSlotInfo | Slots [MaxCoExecStages] |
| Per-stage slot info (capability mask). | |
| StringRef | Pattern |
| Pattern string for display (e.g., "0EIIEEIIV"). | |
Co-execution characteristics for a multi-cycle instruction.
Definition at line 237 of file AMDGPUCoExecInfo.h.
|
inline |
Default constructor - initialize to safe defaults.
Definition at line 250 of file AMDGPUCoExecInfo.h.
References llvm::AMDGPU::All, llvm::AMDGPU::I, llvm::AMDGPU::MaxCoExecStages, and Slots.
Referenced by build().
|
inlinestatic |
Build a CoExecInfo from an occupancy and stage pattern.
Build CoExecInfo from a pattern string.
Pattern chars: '0'=E0, 'E'=External, 'I'=Internal, 'V'=Vacant, 'S'=Internal+ScaleWMMAAbsorb (I plus next scaled WMMA), 'T'=TRANS co-exec (all except TRANS), 'A'=Any
Definition at line 332 of file AMDGPUCoExecInfo.h.
References llvm::AMDGPU::All, assert(), CoExecInfo(), llvm::AMDGPU::I, llvm::AMDGPU::MaxCoExecStages, Pattern, llvm::AMDGPU::StageE, llvm::AMDGPU::StageE0, llvm::AMDGPU::StageI, llvm::AMDGPU::StageIS, llvm::AMDGPU::StageTR, llvm::AMDGPU::StageV, TotalWindow, and UnitOccupancy.
Referenced by llvm::AMDGPU::getCoExecInfo(), and llvm::AMDGPU::getMFMACoExecInfo().
|
inline |
Check if an instruction class mask can co-execute at a given stage.
Definition at line 261 of file AMDGPUCoExecInfo.h.
References Slots, and TotalWindow.
Referenced by getStallCycles().
|
inline |
Find next stage where the instruction class is allowed.
Definition at line 268 of file AMDGPUCoExecInfo.h.
References llvm::AMDGPU::I, Slots, and TotalWindow.
Referenced by getStallCycles().
|
inline |
Get capability mask for a stage.
Definition at line 256 of file AMDGPUCoExecInfo.h.
References llvm::AMDGPU::All, Slots, and TotalWindow.
Referenced by getType().
|
inlinestatic |
Get stage type from mask for display.
Definition at line 293 of file AMDGPUCoExecInfo.h.
References llvm::AMDGPU::E, llvm::AMDGPU::E0, llvm::AMDGPU::I, llvm::AMDGPU::IS, llvm::AMDGPU::StageE, llvm::AMDGPU::StageE0, llvm::AMDGPU::StageI, llvm::AMDGPU::StageIS, llvm::AMDGPU::StageTR, llvm::AMDGPU::StageV, llvm::AMDGPU::TR, llvm::AMDGPU::V, llvm::AMDGPU::VALU, and llvm::AMDGPU::WMMA.
Referenced by getType().
|
inline |
Return the number of cycles an instruction matching InstMask must wait at Stage.
Returns zero when no stall is required.
Definition at line 279 of file AMDGPUCoExecInfo.h.
References canCoExec(), findNextAllowedStage(), llvm::Next, and TotalWindow.
|
inline |
Get stage type for a specific stage.
Definition at line 315 of file AMDGPUCoExecInfo.h.
References getMask(), and getStageType().
| StringRef llvm::AMDGPU::CoExecInfo::Pattern |
Pattern string for display (e.g., "0EIIEEIIV").
Definition at line 247 of file AMDGPUCoExecInfo.h.
Referenced by build(), and llvm::AMDGPU::getMFMACoExecInfo().
| CoExecSlotInfo llvm::AMDGPU::CoExecInfo::Slots[MaxCoExecStages] |
Per-stage slot info (capability mask).
Definition at line 245 of file AMDGPUCoExecInfo.h.
Referenced by canCoExec(), CoExecInfo(), findNextAllowedStage(), getMask(), and llvm::AMDGPU::getMFMACoExecInfo().
| unsigned llvm::AMDGPU::CoExecInfo::TotalWindow = 0 |
Number of cycles in the co-execution window, counting any trailing vacant stages.
Definition at line 243 of file AMDGPUCoExecInfo.h.
Referenced by build(), canCoExec(), findNextAllowedStage(), getMask(), llvm::AMDGPU::getMFMACoExecInfo(), and getStallCycles().
| unsigned llvm::AMDGPU::CoExecInfo::UnitOccupancy = 0 |
Number of cycles for which the producing instruction occupies its execution unit.
Definition at line 240 of file AMDGPUCoExecInfo.h.
Referenced by build().