LLVM 24.0.0git
llvm::AMDGPU::CoExecInfo Struct Reference

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< unsignedfindNextAllowedStage (CoExecMaskT InstMask, unsigned FromStage) const
 Find next stage where the instruction class is allowed.
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 TotalWindow, const char *Pattern)
 Build a CoExecInfo from a pattern string.

Public Attributes

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").

Detailed Description

Co-execution characteristics for a multi-cycle instruction.

Definition at line 236 of file AMDGPUCoExecInfo.h.

Constructor & Destructor Documentation

◆ CoExecInfo()

llvm::AMDGPU::CoExecInfo::CoExecInfo ( )
inline

Default constructor - initialize to safe defaults.

Definition at line 246 of file AMDGPUCoExecInfo.h.

References llvm::AMDGPU::All, llvm::AMDGPU::I, llvm::AMDGPU::MaxCoExecStages, and Slots.

Referenced by build().

Member Function Documentation

◆ build()

CoExecInfo llvm::AMDGPU::CoExecInfo::build ( unsigned TotalWindow,
const char * Pattern )
inlinestatic

Build a CoExecInfo from a pattern string.

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 312 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, and TotalWindow.

Referenced by llvm::AMDGPU::getCoExecInfo(), and llvm::AMDGPU::getMFMACoExecInfo().

◆ canCoExec()

bool llvm::AMDGPU::CoExecInfo::canCoExec ( CoExecMaskT InstMask,
unsigned Stage ) const
inline

Check if an instruction class mask can co-execute at a given stage.

Definition at line 257 of file AMDGPUCoExecInfo.h.

References Slots, and TotalWindow.

◆ findNextAllowedStage()

std::optional< unsigned > llvm::AMDGPU::CoExecInfo::findNextAllowedStage ( CoExecMaskT InstMask,
unsigned FromStage ) const
inline

Find next stage where the instruction class is allowed.

Definition at line 264 of file AMDGPUCoExecInfo.h.

References llvm::AMDGPU::I, Slots, and TotalWindow.

◆ getMask()

CoExecMaskT llvm::AMDGPU::CoExecInfo::getMask ( unsigned Stage) const
inline

Get capability mask for a stage.

Definition at line 252 of file AMDGPUCoExecInfo.h.

References llvm::AMDGPU::All, Slots, and TotalWindow.

Referenced by getType().

◆ getStageType()

◆ getType()

CoExecStageType llvm::AMDGPU::CoExecInfo::getType ( unsigned Stage) const
inline

Get stage type for a specific stage.

Definition at line 296 of file AMDGPUCoExecInfo.h.

References getMask(), and getStageType().

Member Data Documentation

◆ Pattern

StringRef llvm::AMDGPU::CoExecInfo::Pattern

Pattern string for display (e.g., "0EIIEEIIV").

Definition at line 243 of file AMDGPUCoExecInfo.h.

Referenced by build(), and llvm::AMDGPU::getMFMACoExecInfo().

◆ Slots

CoExecSlotInfo llvm::AMDGPU::CoExecInfo::Slots[MaxCoExecStages]

Per-stage slot info (capability mask).

Definition at line 241 of file AMDGPUCoExecInfo.h.

Referenced by canCoExec(), CoExecInfo(), findNextAllowedStage(), getMask(), and llvm::AMDGPU::getMFMACoExecInfo().

◆ TotalWindow

unsigned llvm::AMDGPU::CoExecInfo::TotalWindow = 0

Number of cycles in the co-execution window, counting any trailing vacant stages.

Definition at line 239 of file AMDGPUCoExecInfo.h.

Referenced by build(), canCoExec(), findNextAllowedStage(), getMask(), and llvm::AMDGPU::getMFMACoExecInfo().


The documentation for this struct was generated from the following file: