LLVM 19.0.0git
Enumerations | Functions | Variables
llvm::AMDGPU::SendMsg Namespace Reference

Enumerations

enum  Id {
  ID_INTERRUPT = 1 , ID_GS_PreGFX11 = 2 , ID_GS_DONE_PreGFX11 = 3 , ID_HS_TESSFACTOR_GFX11Plus = 2 ,
  ID_DEALLOC_VGPRS_GFX11Plus = 3 , ID_SAVEWAVE = 4 , ID_STALL_WAVE_GEN = 5 , ID_HALT_WAVES = 6 ,
  ID_ORDERED_PS_DONE = 7 , ID_EARLY_PRIM_DEALLOC = 8 , ID_GS_ALLOC_REQ = 9 , ID_GET_DOORBELL = 10 ,
  ID_GET_DDID = 11 , ID_SYSMSG = 15 , ID_RTN_GET_DOORBELL = 128 , ID_RTN_GET_DDID = 129 ,
  ID_RTN_GET_TMA = 130 , ID_RTN_GET_REALTIME = 131 , ID_RTN_SAVE_WAVE = 132 , ID_RTN_GET_TBA = 133 ,
  ID_RTN_GET_TBA_TO_PC = 134 , ID_RTN_GET_SE_AID_ID = 135 , ID_MASK_PreGFX11_ = 0xF , ID_MASK_GFX11Plus_ = 0xFF
}
 
enum  Op {
  OP_UNKNOWN_ = -1 , OP_SHIFT_ = 4 , OP_NONE_ = 0 , OP_WIDTH_ = 3 ,
  OP_MASK_ = (((1 << OP_WIDTH_) - 1) << OP_SHIFT_) , OP_GS_NOP = 0 , OP_GS_CUT = 1 , OP_GS_EMIT = 2 ,
  OP_GS_EMIT_CUT = 3 , OP_GS_LAST_ , OP_GS_FIRST_ = OP_GS_NOP , OP_SYS_ECC_ERR_INTERRUPT = 1 ,
  OP_SYS_REG_RD = 2 , OP_SYS_HOST_TRAP_ACK = 3 , OP_SYS_TTRACE_PC = 4 , OP_SYS_LAST_ ,
  OP_SYS_FIRST_ = OP_SYS_ECC_ERR_INTERRUPT
}
 
enum  StreamId : unsigned {
  STREAM_ID_NONE_ = 0 , STREAM_ID_DEFAULT_ = 0 , STREAM_ID_LAST_ = 4 , STREAM_ID_FIRST_ = STREAM_ID_DEFAULT_ ,
  STREAM_ID_SHIFT_ = 8 , STREAM_ID_WIDTH_ = 2 , STREAM_ID_MASK_ = (((1 << STREAM_ID_WIDTH_) - 1) << STREAM_ID_SHIFT_)
}
 

Functions

static uint64_t getMsgIdMask (const MCSubtargetInfo &STI)
 
int64_t getMsgId (const StringRef Name, const MCSubtargetInfo &STI)
 
bool isValidMsgId (int64_t MsgId, const MCSubtargetInfo &STI)
 
StringRef getMsgName (int64_t MsgId, const MCSubtargetInfo &STI)
 
int64_t getMsgOpId (int64_t MsgId, const StringRef Name)
 
bool isValidMsgOp (int64_t MsgId, int64_t OpId, const MCSubtargetInfo &STI, bool Strict)
 
StringRef getMsgOpName (int64_t MsgId, int64_t OpId, const MCSubtargetInfo &STI)
 
bool isValidMsgStream (int64_t MsgId, int64_t OpId, int64_t StreamId, const MCSubtargetInfo &STI, bool Strict)
 
bool msgRequiresOp (int64_t MsgId, const MCSubtargetInfo &STI)
 
bool msgSupportsStream (int64_t MsgId, int64_t OpId, const MCSubtargetInfo &STI)
 
void decodeMsg (unsigned Val, uint16_t &MsgId, uint16_t &OpId, uint16_t &StreamId, const MCSubtargetInfo &STI)
 
uint64_t encodeMsg (uint64_t MsgId, uint64_t OpId, uint64_t StreamId)
 

Variables

const CustomOperand< const MCSubtargetInfo & > Msg []
 
const int MSG_SIZE
 
const char *const OpSysSymbolic [OP_SYS_LAST_]
 
const char *const OpGsSymbolic [OP_GS_LAST_]
 

Enumeration Type Documentation

◆ Id

Enumerator
ID_INTERRUPT 
ID_GS_PreGFX11 
ID_GS_DONE_PreGFX11 
ID_HS_TESSFACTOR_GFX11Plus 
ID_DEALLOC_VGPRS_GFX11Plus 
ID_SAVEWAVE 
ID_STALL_WAVE_GEN 
ID_HALT_WAVES 
ID_ORDERED_PS_DONE 
ID_EARLY_PRIM_DEALLOC 
ID_GS_ALLOC_REQ 
ID_GET_DOORBELL 
ID_GET_DDID 
ID_SYSMSG 
ID_RTN_GET_DOORBELL 
ID_RTN_GET_DDID 
ID_RTN_GET_TMA 
ID_RTN_GET_REALTIME 
ID_RTN_SAVE_WAVE 
ID_RTN_GET_TBA 
ID_RTN_GET_TBA_TO_PC 
ID_RTN_GET_SE_AID_ID 
ID_MASK_PreGFX11_ 
ID_MASK_GFX11Plus_ 

Definition at line 438 of file SIDefines.h.

◆ Op

Enumerator
OP_UNKNOWN_ 
OP_SHIFT_ 
OP_NONE_ 
OP_WIDTH_ 
OP_MASK_ 
OP_GS_NOP 
OP_GS_CUT 
OP_GS_EMIT 
OP_GS_EMIT_CUT 
OP_GS_LAST_ 
OP_GS_FIRST_ 
OP_SYS_ECC_ERR_INTERRUPT 
OP_SYS_REG_RD 
OP_SYS_HOST_TRAP_ACK 
OP_SYS_TTRACE_PC 
OP_SYS_LAST_ 
OP_SYS_FIRST_ 

Definition at line 470 of file SIDefines.h.

◆ StreamId

Enumerator
STREAM_ID_NONE_ 
STREAM_ID_DEFAULT_ 
STREAM_ID_LAST_ 
STREAM_ID_FIRST_ 
STREAM_ID_SHIFT_ 
STREAM_ID_WIDTH_ 
STREAM_ID_MASK_ 

Definition at line 493 of file SIDefines.h.

Function Documentation

◆ decodeMsg()

void llvm::AMDGPU::SendMsg::decodeMsg ( unsigned  Val,
uint16_t MsgId,
uint16_t OpId,
uint16_t StreamId,
const MCSubtargetInfo STI 
)

◆ encodeMsg()

LLVM_READNONE uint64_t llvm::AMDGPU::SendMsg::encodeMsg ( uint64_t  MsgId,
uint64_t  OpId,
uint64_t  StreamId 
)

Definition at line 2054 of file AMDGPUBaseInfo.cpp.

References OP_SHIFT_, and STREAM_ID_SHIFT_.

◆ getMsgId()

LLVM_READONLY int64_t llvm::AMDGPU::SendMsg::getMsgId ( const StringRef  Name,
const MCSubtargetInfo STI 
)

Definition at line 1957 of file AMDGPUBaseInfo.cpp.

References Idx, Msg, MSG_SIZE, and Name.

◆ getMsgIdMask()

static uint64_t llvm::AMDGPU::SendMsg::getMsgIdMask ( const MCSubtargetInfo STI)
static

Definition at line 1953 of file AMDGPUBaseInfo.cpp.

References ID_MASK_GFX11Plus_, ID_MASK_PreGFX11_, and llvm::AMDGPU::isGFX11Plus().

Referenced by decodeMsg(), and isValidMsgId().

◆ getMsgName()

LLVM_READNONE StringRef llvm::AMDGPU::SendMsg::getMsgName ( int64_t  MsgId,
const MCSubtargetInfo STI 
)

Definition at line 1966 of file AMDGPUBaseInfo.cpp.

References Idx, Msg, and MSG_SIZE.

◆ getMsgOpId()

LLVM_READONLY int64_t llvm::AMDGPU::SendMsg::getMsgOpId ( int64_t  MsgId,
const StringRef  Name 
)

◆ getMsgOpName()

LLVM_READNONE StringRef llvm::AMDGPU::SendMsg::getMsgOpName ( int64_t  MsgId,
int64_t  OpId,
const MCSubtargetInfo STI 
)

Definition at line 2003 of file AMDGPUBaseInfo.cpp.

References assert(), ID_SYSMSG, msgRequiresOp(), OpGsSymbolic, and OpSysSymbolic.

◆ isValidMsgId()

LLVM_READNONE bool llvm::AMDGPU::SendMsg::isValidMsgId ( int64_t  MsgId,
const MCSubtargetInfo STI 
)

Definition at line 1962 of file AMDGPUBaseInfo.cpp.

References getMsgIdMask().

Referenced by isValidMsgOp().

◆ isValidMsgOp()

LLVM_READNONE bool llvm::AMDGPU::SendMsg::isValidMsgOp ( int64_t  MsgId,
int64_t  OpId,
const MCSubtargetInfo STI,
bool  Strict 
)

◆ isValidMsgStream()

LLVM_READNONE bool llvm::AMDGPU::SendMsg::isValidMsgStream ( int64_t  MsgId,
int64_t  OpId,
int64_t  StreamId,
const MCSubtargetInfo STI,
bool  Strict 
)

◆ msgRequiresOp()

LLVM_READNONE bool llvm::AMDGPU::SendMsg::msgRequiresOp ( int64_t  MsgId,
const MCSubtargetInfo STI 
)

Definition at line 2029 of file AMDGPUBaseInfo.cpp.

References ID_GS_DONE_PreGFX11, ID_GS_PreGFX11, ID_SYSMSG, and llvm::AMDGPU::isGFX11Plus().

Referenced by getMsgOpName().

◆ msgSupportsStream()

LLVM_READNONE bool llvm::AMDGPU::SendMsg::msgSupportsStream ( int64_t  MsgId,
int64_t  OpId,
const MCSubtargetInfo STI 
)

Variable Documentation

◆ Msg

const CustomOperand< const MCSubtargetInfo & > llvm::AMDGPU::SendMsg::Msg
Initial value:
= {
{{""}},
{{"MSG_INTERRUPT"}, ID_INTERRUPT},
{{"MSG_GS_DONE"}, ID_GS_DONE_PreGFX11, isNotGFX11Plus},
{{"MSG_SAVEWAVE"}, ID_SAVEWAVE, isGFX8_GFX9_GFX10},
{{"MSG_STALL_WAVE_GEN"}, ID_STALL_WAVE_GEN, isGFX9_GFX10_GFX11},
{{"MSG_HALT_WAVES"}, ID_HALT_WAVES, isGFX9_GFX10_GFX11},
{{"MSG_ORDERED_PS_DONE"}, ID_ORDERED_PS_DONE, isGFX9_GFX10},
{{"MSG_EARLY_PRIM_DEALLOC"}, ID_EARLY_PRIM_DEALLOC, isGFX9_GFX10},
{{"MSG_GS_ALLOC_REQ"}, ID_GS_ALLOC_REQ, isGFX9Plus},
{{"MSG_GET_DOORBELL"}, ID_GET_DOORBELL, isGFX9_GFX10},
{{"MSG_GET_DDID"}, ID_GET_DDID, isGFX10},
{{"MSG_HS_TESSFACTOR"}, ID_HS_TESSFACTOR_GFX11Plus, isGFX11Plus},
{{"MSG_DEALLOC_VGPRS"}, ID_DEALLOC_VGPRS_GFX11Plus, isGFX11Plus},
{{""}},
{{"MSG_SYSMSG"}, ID_SYSMSG},
{{"MSG_RTN_GET_DOORBELL"}, ID_RTN_GET_DOORBELL, isGFX11Plus},
{{"MSG_RTN_GET_DDID"}, ID_RTN_GET_DDID, isGFX11Plus},
{{"MSG_RTN_GET_TMA"}, ID_RTN_GET_TMA, isGFX11Plus},
{{"MSG_RTN_GET_REALTIME"}, ID_RTN_GET_REALTIME, isGFX11Plus},
{{"MSG_RTN_SAVE_WAVE"}, ID_RTN_SAVE_WAVE, isGFX11Plus},
{{"MSG_RTN_GET_TBA"}, ID_RTN_GET_TBA, isGFX11Plus},
{{"MSG_RTN_GET_TBA_TO_PC"}, ID_RTN_GET_TBA_TO_PC, isGFX11Plus},
{{"MSG_RTN_GET_SE_AID_ID"}, ID_RTN_GET_SE_AID_ID, isGFX12Plus},
}
bool isGFX10(const MCSubtargetInfo &STI)
bool isGFX12Plus(const MCSubtargetInfo &STI)
bool isGFX8_GFX9_GFX10(const MCSubtargetInfo &STI)
bool isNotGFX11Plus(const MCSubtargetInfo &STI)
bool isGFX11Plus(const MCSubtargetInfo &STI)
bool isGFX9Plus(const MCSubtargetInfo &STI)
bool isGFX9_GFX10_GFX11(const MCSubtargetInfo &STI)
bool isGFX9_GFX10(const MCSubtargetInfo &STI)

Definition at line 40 of file AMDGPUAsmUtils.cpp.

Referenced by getMsgId(), and getMsgName().

◆ MSG_SIZE

const int llvm::AMDGPU::SendMsg::MSG_SIZE
Initial value:
= static_cast<int>(
sizeof(Msg) / sizeof(CustomOperand<const MCSubtargetInfo &>))
const CustomOperand< const MCSubtargetInfo & > Msg[]

Definition at line 69 of file AMDGPUAsmUtils.cpp.

Referenced by getMsgId(), and getMsgName().

◆ OpGsSymbolic

const char *const llvm::AMDGPU::SendMsg::OpGsSymbolic
Initial value:
= {
"GS_OP_NOP",
"GS_OP_CUT",
"GS_OP_EMIT",
"GS_OP_EMIT_CUT"
}

Definition at line 81 of file AMDGPUAsmUtils.cpp.

Referenced by getMsgOpId(), and getMsgOpName().

◆ OpSysSymbolic

const char *const llvm::AMDGPU::SendMsg::OpSysSymbolic
Initial value:
= {
nullptr,
"SYSMSG_OP_ECC_ERR_INTERRUPT",
"SYSMSG_OP_REG_RD",
"SYSMSG_OP_HOST_TRAP_ACK",
"SYSMSG_OP_TTRACE_PC"
}

Definition at line 73 of file AMDGPUAsmUtils.cpp.

Referenced by getMsgOpId(), and getMsgOpName().