LLVM  16.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_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_MASK_PreGFX11_ 
ID_MASK_GFX11Plus_ 

Definition at line 318 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 348 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 371 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 1645 of file AMDGPUBaseInfo.cpp.

References OP_SHIFT_, and STREAM_ID_SHIFT_.

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

◆ getMsgId()

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

Definition at line 1548 of file AMDGPUBaseInfo.cpp.

References Msg, and MSG_SIZE.

◆ getMsgIdMask()

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

Definition at line 1544 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 1557 of file AMDGPUBaseInfo.cpp.

References Msg, and MSG_SIZE.

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,
const MCSubtargetInfo STI 
)

◆ isValidMsgId()

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

Definition at line 1553 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 
)

◆ 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, isGFX9Plus},
{{"MSG_HALT_WAVES"}, ID_HALT_WAVES, isGFX9Plus},
{{"MSG_ORDERED_PS_DONE"}, ID_ORDERED_PS_DONE, isGFX9Plus},
{{"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},
}

Definition at line 39 of file AMDGPUAsmUtils.cpp.

Referenced by annotateAllFunctions(), llvm::Annotations::Annotations(), llvm::ELFYAML::appendUniqueSuffix(), llvm::cantFail(), llvm::MCAsmParserExtension::check(), llvm::MCAsmParser::check(), computeImportForFunction(), llvm::sampleprof::SampleProfileReader::create(), createMemberHeaderParseError(), llvm::orc::shared::WrapperFunctionResult::createOutOfBandError(), llvm::object::defaultWarningHandler(), llvm::DiagnosticInfoIROptimization::DiagnosticInfoIROptimization(), llvm::MIRProfileLoader::doInitialization(), dumpBytes(), llvm::SystemZHazardRecognizer::dumpCurrGroup(), llvm::PMDataManager::dumpPassInfo(), llvm::MachineInstr::emitError(), EmitInlineAsmStr(), llvm::LLLexer::Error(), llvm::MCAsmParserExtension::Error(), llvm::TGParser::Error(), llvm::MCAsmParser::Error(), errorUnsupported(), fail(), llvm::PMDataManager::freePass(), llvm::DWARFFormValue::getAsCString(), llvm::ExecutionEngine::getConstantValue(), llvm::WebAssemblyAsmPrinter::getMCSymbolForFunction(), llvm::SourceMgr::GetMessage(), getMsgId(), getMsgName(), llvm::object::Archive::Child::getNext(), getStatString(), initAndLookupTarget(), llvm::ExecutionEngine::LoadValueFromMemory(), makeStringError(), malformedError(), llvm::ErrorInfoBase::message(), llvm::FileError::messageWithoutFileInfo(), NewSDValueDbgMsg(), llvm::MCAsmParserExtension::Note(), llvm::MCAsmParser::parseEOL(), parseFailed(), llvm::MCAsmParser::parseIntToken(), llvm::MIRFormatter::parseIRValue(), llvm::MCAsmParserExtension::parseToken(), llvm::MCAsmParser::parseToken(), llvm::PrintError(), llvm::yaml::Stream::printError(), llvm::PrintFatalError(), llvm::PrintFatalNote(), llvm::PrintMessage(), llvm::SourceMgr::PrintMessage(), PrintModRefResults(), llvm::PrintNote(), llvm::AsmPrinter::PrintSpecial(), llvm::PrintWarning(), llvm::SymbolRemappingReader::read(), llvm::PMDataManager::removeDeadPasses(), llvm::json::Path::report(), ReportErrnumFatal(), reportError(), llvm::HexagonMCChecker::reportError(), llvm::HexagonShuffler::reportError(), llvm::sampleprof::SampleProfileReader::reportError(), llvm::MCContext::reportError(), llvm::reportGISelFailure(), reportIllegalCopy(), llvm::reportInvalidSizeRequest(), llvm::ReportLastErrorFatal(), llvm::HexagonMCChecker::reportNote(), reportOpenError(), llvm::reportVectorizationInfo(), llvm::HexagonMCChecker::reportWarning(), llvm::MCContext::reportWarning(), require(), llvm::setBugReportMsg(), llvm::yaml::Node::setError(), llvm::MCAsmParserExtension::TokError(), llvm::TGParser::TokError(), llvm::MCAsmParser::TokError(), llvm::yaml::MappingTraits< std::unique_ptr< ELFYAML::Chunk > >::validate(), verifyFuncBFI(), llvm::MCAsmParserExtension::Warning(), and llvm::LLLexer::Warning().

◆ MSG_SIZE

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

Definition at line 65 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 77 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 69 of file AMDGPUAsmUtils.cpp.

Referenced by getMsgOpId(), and getMsgOpName().

llvm::AMDGPU::SendMsg::ID_RTN_GET_DDID
@ ID_RTN_GET_DDID
Definition: SIDefines.h:338
llvm::AMDGPU::SendMsg::ID_RTN_GET_DOORBELL
@ ID_RTN_GET_DOORBELL
Definition: SIDefines.h:337
llvm::AMDGPU::isGFX11Plus
bool isGFX11Plus(const MCSubtargetInfo &STI)
Definition: AMDGPUBaseInfo.cpp:1794
llvm::AMDGPU::SendMsg::ID_STALL_WAVE_GEN
@ ID_STALL_WAVE_GEN
Definition: SIDefines.h:328
llvm::AMDGPU::SendMsg::ID_HS_TESSFACTOR_GFX11Plus
@ ID_HS_TESSFACTOR_GFX11Plus
Definition: SIDefines.h:324
llvm::AMDGPU::isGFX10
bool isGFX10(const MCSubtargetInfo &STI)
Definition: AMDGPUBaseInfo.cpp:1782
llvm::AMDGPU::SendMsg::ID_EARLY_PRIM_DEALLOC
@ ID_EARLY_PRIM_DEALLOC
Definition: SIDefines.h:331
llvm::AMDGPU::SendMsg::ID_SAVEWAVE
@ ID_SAVEWAVE
Definition: SIDefines.h:327
llvm::AMDGPU::SendMsg::ID_DEALLOC_VGPRS_GFX11Plus
@ ID_DEALLOC_VGPRS_GFX11Plus
Definition: SIDefines.h:325
llvm::AMDGPU::SendMsg::ID_GET_DOORBELL
@ ID_GET_DOORBELL
Definition: SIDefines.h:333
llvm::AMDGPU::SendMsg::ID_RTN_SAVE_WAVE
@ ID_RTN_SAVE_WAVE
Definition: SIDefines.h:341
llvm::AMDGPU::SendMsg::ID_GS_ALLOC_REQ
@ ID_GS_ALLOC_REQ
Definition: SIDefines.h:332
llvm::AMDGPU::SendMsg::ID_SYSMSG
@ ID_SYSMSG
Definition: SIDefines.h:335
llvm::AMDGPU::SendMsg::ID_RTN_GET_REALTIME
@ ID_RTN_GET_REALTIME
Definition: SIDefines.h:340
llvm::AMDGPU::SendMsg::ID_ORDERED_PS_DONE
@ ID_ORDERED_PS_DONE
Definition: SIDefines.h:330
llvm::AMDGPU::SendMsg::ID_RTN_GET_TBA
@ ID_RTN_GET_TBA
Definition: SIDefines.h:342
llvm::AMDGPU::SendMsg::ID_INTERRUPT
@ ID_INTERRUPT
Definition: SIDefines.h:319
llvm::AMDGPU::isGFX9_GFX10
bool isGFX9_GFX10(const MCSubtargetInfo &STI)
Definition: AMDGPUBaseInfo.cpp:1766
llvm::AMDGPU::isGFX8_GFX9_GFX10
bool isGFX8_GFX9_GFX10(const MCSubtargetInfo &STI)
Definition: AMDGPUBaseInfo.cpp:1770
llvm::AMDGPU::isGFX9Plus
bool isGFX9Plus(const MCSubtargetInfo &STI)
Definition: AMDGPUBaseInfo.cpp:1778
llvm::AMDGPU::SendMsg::Msg
const CustomOperand< const MCSubtargetInfo & > Msg[]
Definition: AMDGPUAsmUtils.cpp:39
llvm::AMDGPU::SendMsg::ID_GET_DDID
@ ID_GET_DDID
Definition: SIDefines.h:334
llvm::AMDGPU::isNotGFX11Plus
bool isNotGFX11Plus(const MCSubtargetInfo &STI)
Definition: AMDGPUBaseInfo.cpp:1798
llvm::AMDGPU::SendMsg::ID_GS_DONE_PreGFX11
@ ID_GS_DONE_PreGFX11
Definition: SIDefines.h:322
llvm::AMDGPU::SendMsg::ID_RTN_GET_TMA
@ ID_RTN_GET_TMA
Definition: SIDefines.h:339
llvm::AMDGPU::SendMsg::ID_GS_PreGFX11
@ ID_GS_PreGFX11
Definition: SIDefines.h:321
llvm::AMDGPU::SendMsg::ID_HALT_WAVES
@ ID_HALT_WAVES
Definition: SIDefines.h:329