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

Enumerations

enum  Id {
  ID_UNKNOWN_ = -1, ID_INTERRUPT = 1, ID_GS = 2, ID_GS_DONE = 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_GAPS_LAST_, ID_GAPS_FIRST_ = ID_INTERRUPT, ID_SHIFT_ = 0,
  ID_WIDTH_ = 4, ID_MASK_ = (((1 << ID_WIDTH_) - 1) << ID_SHIFT_)
}
 
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

int64_t getMsgId (const StringRef Name)
 
bool isValidMsgId (int64_t MsgId, const MCSubtargetInfo &STI, bool Strict)
 
StringRef getMsgName (int64_t MsgId)
 
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)
 
bool isValidMsgStream (int64_t MsgId, int64_t OpId, int64_t StreamId, const MCSubtargetInfo &STI, bool Strict)
 
bool msgRequiresOp (int64_t MsgId)
 
bool msgSupportsStream (int64_t MsgId, int64_t OpId)
 
void decodeMsg (unsigned Val, uint16_t &MsgId, uint16_t &OpId, uint16_t &StreamId)
 
uint64_t encodeMsg (uint64_t MsgId, uint64_t OpId, uint64_t StreamId)
 

Variables

const char *const IdSymbolic [ID_GAPS_LAST_]
 
const char *const OpSysSymbolic [OP_SYS_LAST_]
 
const char *const OpGsSymbolic [OP_GS_LAST_]
 

Enumeration Type Documentation

◆ Id

Enumerator
ID_UNKNOWN_ 
ID_INTERRUPT 
ID_GS 
ID_GS_DONE 
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_GAPS_LAST_ 
ID_GAPS_FIRST_ 
ID_SHIFT_ 
ID_WIDTH_ 
ID_MASK_ 

Definition at line 303 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 324 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 347 of file SIDefines.h.

Function Documentation

◆ decodeMsg()

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

◆ encodeMsg()

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

Definition at line 1331 of file AMDGPUBaseInfo.cpp.

References ID_SHIFT_, OP_SHIFT_, and STREAM_ID_SHIFT_.

Referenced by llvm::AMDGPUInstPrinter::printSendMsg().

◆ getMsgId()

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

Definition at line 1221 of file AMDGPUBaseInfo.cpp.

References i, ID_GAPS_FIRST_, ID_GAPS_LAST_, ID_UNKNOWN_, and IdSymbolic.

◆ getMsgName()

LLVM_READNONE StringRef llvm::AMDGPU::SendMsg::getMsgName ( int64_t  MsgId)

Definition at line 1252 of file AMDGPUBaseInfo.cpp.

References assert(), ID_GAPS_LAST_, and IdSymbolic.

Referenced by llvm::AMDGPUInstPrinter::printSendMsg().

◆ 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 
)

◆ isValidMsgId()

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

◆ 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)

Definition at line 1314 of file AMDGPUBaseInfo.cpp.

References ID_GS, ID_GS_DONE, and ID_SYSMSG.

Referenced by getMsgOpName(), and llvm::AMDGPUInstPrinter::printSendMsg().

◆ msgSupportsStream()

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

Definition at line 1318 of file AMDGPUBaseInfo.cpp.

References ID_GS, ID_GS_DONE, and OP_GS_NOP.

Referenced by llvm::AMDGPUInstPrinter::printSendMsg().

Variable Documentation

◆ IdSymbolic

const char *const llvm::AMDGPU::SendMsg::IdSymbolic
Initial value:
= {
nullptr,
"MSG_INTERRUPT",
"MSG_GS",
"MSG_GS_DONE",
"MSG_SAVEWAVE",
"MSG_STALL_WAVE_GEN",
"MSG_HALT_WAVES",
"MSG_ORDERED_PS_DONE",
"MSG_EARLY_PRIM_DEALLOC",
"MSG_GS_ALLOC_REQ",
"MSG_GET_DOORBELL",
"MSG_GET_DDID",
nullptr,
nullptr,
nullptr,
"MSG_SYSMSG"
}

Definition at line 18 of file AMDGPUAsmUtils.cpp.

Referenced by getMsgId(), getMsgName(), and isValidMsgId().

◆ 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 46 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 38 of file AMDGPUAsmUtils.cpp.

Referenced by getMsgOpId(), and getMsgOpName().