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

Enumerations

enum  DataFormat : int64_t {
  DFMT_INVALID = 0 , DFMT_8 , DFMT_16 , DFMT_8_8 ,
  DFMT_32 , DFMT_16_16 , DFMT_10_11_11 , DFMT_11_11_10 ,
  DFMT_10_10_10_2 , DFMT_2_10_10_10 , DFMT_8_8_8_8 , DFMT_32_32 ,
  DFMT_16_16_16_16 , DFMT_32_32_32 , DFMT_32_32_32_32 , DFMT_RESERVED_15 ,
  DFMT_MIN = DFMT_INVALID , DFMT_MAX = DFMT_RESERVED_15 , DFMT_UNDEF = -1 , DFMT_DEFAULT = DFMT_8 ,
  DFMT_SHIFT = 0 , DFMT_MASK = 0xF
}
 
enum  NumFormat : int64_t {
  NFMT_UNORM = 0 , NFMT_SNORM , NFMT_USCALED , NFMT_SSCALED ,
  NFMT_UINT , NFMT_SINT , NFMT_RESERVED_6 , NFMT_SNORM_OGL = NFMT_RESERVED_6 ,
  NFMT_FLOAT , NFMT_MIN = NFMT_UNORM , NFMT_MAX = NFMT_FLOAT , NFMT_UNDEF = -1 ,
  NFMT_DEFAULT = NFMT_UNORM , NFMT_SHIFT = 4 , NFMT_MASK = 7
}
 
enum  MergedFormat : int64_t { DFMT_NFMT_UNDEF = -1 , DFMT_NFMT_DEFAULT , DFMT_NFMT_MASK = (DFMT_MASK << DFMT_SHIFT) | (NFMT_MASK << NFMT_SHIFT) , DFMT_NFMT_MAX = DFMT_NFMT_MASK }
 
enum  UnifiedFormatCommon : int64_t { UFMT_MAX = 127 , UFMT_UNDEF = -1 , UFMT_DEFAULT = 1 }
 

Functions

int64_t getDfmt (const StringRef Name)
 
StringRef getDfmtName (unsigned Id)
 
static StringLiteral constgetNfmtLookupTable (const MCSubtargetInfo &STI)
 
int64_t getNfmt (const StringRef Name, const MCSubtargetInfo &STI)
 
StringRef getNfmtName (unsigned Id, const MCSubtargetInfo &STI)
 
bool isValidDfmtNfmt (unsigned Id, const MCSubtargetInfo &STI)
 
bool isValidNfmt (unsigned Id, const MCSubtargetInfo &STI)
 
int64_t encodeDfmtNfmt (unsigned Dfmt, unsigned Nfmt)
 
void decodeDfmtNfmt (unsigned Format, unsigned &Dfmt, unsigned &Nfmt)
 
int64_t getUnifiedFormat (const StringRef Name, const MCSubtargetInfo &STI)
 
StringRef getUnifiedFormatName (unsigned Id, const MCSubtargetInfo &STI)
 
bool isValidUnifiedFormat (unsigned Id, const MCSubtargetInfo &STI)
 
int64_t convertDfmtNfmt2Ufmt (unsigned Dfmt, unsigned Nfmt, const MCSubtargetInfo &STI)
 
bool isValidFormatEncoding (unsigned Val, const MCSubtargetInfo &STI)
 
unsigned getDefaultFormatEncoding (const MCSubtargetInfo &STI)
 

Variables

StringLiteral const DfmtSymbolic []
 
StringLiteral const NfmtSymbolicGFX10 []
 
StringLiteral const NfmtSymbolicSICI []
 
StringLiteral const NfmtSymbolicVI []
 
StringLiteral const UfmtSymbolicGFX10 []
 
unsigned const DfmtNfmt2UFmtGFX10 []
 
StringLiteral const UfmtSymbolicGFX11 []
 
unsigned const DfmtNfmt2UFmtGFX11 []
 

Enumeration Type Documentation

◆ DataFormat

Enumerator
DFMT_INVALID 
DFMT_8 
DFMT_16 
DFMT_8_8 
DFMT_32 
DFMT_16_16 
DFMT_10_11_11 
DFMT_11_11_10 
DFMT_10_10_10_2 
DFMT_2_10_10_10 
DFMT_8_8_8_8 
DFMT_32_32 
DFMT_16_16_16_16 
DFMT_32_32_32 
DFMT_32_32_32_32 
DFMT_RESERVED_15 
DFMT_MIN 
DFMT_MAX 
DFMT_UNDEF 
DFMT_DEFAULT 
DFMT_SHIFT 
DFMT_MASK 

Definition at line 582 of file SIDefines.h.

◆ MergedFormat

Enumerator
DFMT_NFMT_UNDEF 
DFMT_NFMT_DEFAULT 
DFMT_NFMT_MASK 
DFMT_NFMT_MAX 

Definition at line 631 of file SIDefines.h.

◆ NumFormat

Enumerator
NFMT_UNORM 
NFMT_SNORM 
NFMT_USCALED 
NFMT_SSCALED 
NFMT_UINT 
NFMT_SINT 
NFMT_RESERVED_6 
NFMT_SNORM_OGL 
NFMT_FLOAT 
NFMT_MIN 
NFMT_MAX 
NFMT_UNDEF 
NFMT_DEFAULT 
NFMT_SHIFT 
NFMT_MASK 

Definition at line 610 of file SIDefines.h.

◆ UnifiedFormatCommon

Enumerator
UFMT_MAX 
UFMT_UNDEF 
UFMT_DEFAULT 

Definition at line 642 of file SIDefines.h.

Function Documentation

◆ convertDfmtNfmt2Ufmt()

int64_t llvm::AMDGPU::MTBUFFormat::convertDfmtNfmt2Ufmt ( unsigned  Dfmt,
unsigned  Nfmt,
const MCSubtargetInfo STI 
)

◆ decodeDfmtNfmt()

void llvm::AMDGPU::MTBUFFormat::decodeDfmtNfmt ( unsigned  Format,
unsigned Dfmt,
unsigned Nfmt 
)

Definition at line 1829 of file AMDGPUBaseInfo.cpp.

References DFMT_MASK, DFMT_SHIFT, llvm::Format, NFMT_MASK, and NFMT_SHIFT.

Referenced by isValidDfmtNfmt().

◆ encodeDfmtNfmt()

LLVM_READNONE int64_t llvm::AMDGPU::MTBUFFormat::encodeDfmtNfmt ( unsigned  Dfmt,
unsigned  Nfmt 
)

Definition at line 1825 of file AMDGPUBaseInfo.cpp.

References DFMT_SHIFT, and NFMT_SHIFT.

Referenced by convertDfmtNfmt2Ufmt().

◆ getDefaultFormatEncoding()

unsigned llvm::AMDGPU::MTBUFFormat::getDefaultFormatEncoding ( const MCSubtargetInfo STI)

Definition at line 1880 of file AMDGPUBaseInfo.cpp.

References DFMT_NFMT_DEFAULT, llvm::AMDGPU::isGFX10Plus(), and UFMT_DEFAULT.

◆ getDfmt()

int64_t llvm::AMDGPU::MTBUFFormat::getDfmt ( const StringRef  Name)

Definition at line 1779 of file AMDGPUBaseInfo.cpp.

References DFMT_MAX, DFMT_MIN, DFMT_UNDEF, DfmtSymbolic, and Name.

◆ getDfmtName()

StringRef llvm::AMDGPU::MTBUFFormat::getDfmtName ( unsigned  Id)

Definition at line 1787 of file AMDGPUBaseInfo.cpp.

References assert(), DFMT_MAX, and DfmtSymbolic.

◆ getNfmt()

int64_t llvm::AMDGPU::MTBUFFormat::getNfmt ( const StringRef  Name,
const MCSubtargetInfo STI 
)

Definition at line 1800 of file AMDGPUBaseInfo.cpp.

References getNfmtLookupTable(), Name, NFMT_MAX, NFMT_MIN, and NFMT_UNDEF.

◆ getNfmtLookupTable()

static StringLiteral const * llvm::AMDGPU::MTBUFFormat::getNfmtLookupTable ( const MCSubtargetInfo STI)
static

◆ getNfmtName()

StringRef llvm::AMDGPU::MTBUFFormat::getNfmtName ( unsigned  Id,
const MCSubtargetInfo STI 
)

Definition at line 1809 of file AMDGPUBaseInfo.cpp.

References assert(), getNfmtLookupTable(), and NFMT_MAX.

Referenced by isValidNfmt().

◆ getUnifiedFormat()

int64_t llvm::AMDGPU::MTBUFFormat::getUnifiedFormat ( const StringRef  Name,
const MCSubtargetInfo STI 
)

◆ getUnifiedFormatName()

StringRef llvm::AMDGPU::MTBUFFormat::getUnifiedFormatName ( unsigned  Id,
const MCSubtargetInfo STI 
)

◆ isValidDfmtNfmt()

bool llvm::AMDGPU::MTBUFFormat::isValidDfmtNfmt ( unsigned  Id,
const MCSubtargetInfo STI 
)

Definition at line 1814 of file AMDGPUBaseInfo.cpp.

References decodeDfmtNfmt(), and isValidNfmt().

◆ isValidFormatEncoding()

bool llvm::AMDGPU::MTBUFFormat::isValidFormatEncoding ( unsigned  Val,
const MCSubtargetInfo STI 
)

Definition at line 1876 of file AMDGPUBaseInfo.cpp.

References DFMT_NFMT_MAX, llvm::AMDGPU::isGFX10Plus(), and UFMT_MAX.

◆ isValidNfmt()

bool llvm::AMDGPU::MTBUFFormat::isValidNfmt ( unsigned  Id,
const MCSubtargetInfo STI 
)

Definition at line 1821 of file AMDGPUBaseInfo.cpp.

References llvm::StringRef::empty(), and getNfmtName().

Referenced by isValidDfmtNfmt().

◆ isValidUnifiedFormat()

bool llvm::AMDGPU::MTBUFFormat::isValidUnifiedFormat ( unsigned  Id,
const MCSubtargetInfo STI 
)

Variable Documentation

◆ DfmtNfmt2UFmtGFX10

unsigned const llvm::AMDGPU::MTBUFFormat::DfmtNfmt2UFmtGFX10

Definition at line 391 of file AMDGPUAsmUtils.cpp.

Referenced by convertDfmtNfmt2Ufmt().

◆ DfmtNfmt2UFmtGFX11

unsigned const llvm::AMDGPU::MTBUFFormat::DfmtNfmt2UFmtGFX11

Definition at line 565 of file AMDGPUAsmUtils.cpp.

Referenced by convertDfmtNfmt2Ufmt().

◆ DfmtSymbolic

StringLiteral const llvm::AMDGPU::MTBUFFormat::DfmtSymbolic
Initial value:
= {
"BUF_DATA_FORMAT_INVALID",
"BUF_DATA_FORMAT_8",
"BUF_DATA_FORMAT_16",
"BUF_DATA_FORMAT_8_8",
"BUF_DATA_FORMAT_32",
"BUF_DATA_FORMAT_16_16",
"BUF_DATA_FORMAT_10_11_11",
"BUF_DATA_FORMAT_11_11_10",
"BUF_DATA_FORMAT_10_10_10_2",
"BUF_DATA_FORMAT_2_10_10_10",
"BUF_DATA_FORMAT_8_8_8_8",
"BUF_DATA_FORMAT_32_32",
"BUF_DATA_FORMAT_16_16_16_16",
"BUF_DATA_FORMAT_32_32_32",
"BUF_DATA_FORMAT_32_32_32_32",
"BUF_DATA_FORMAT_RESERVED_15"
}

Definition at line 245 of file AMDGPUAsmUtils.cpp.

Referenced by getDfmt(), and getDfmtName().

◆ NfmtSymbolicGFX10

StringLiteral const llvm::AMDGPU::MTBUFFormat::NfmtSymbolicGFX10
Initial value:
= {
"BUF_NUM_FORMAT_UNORM",
"BUF_NUM_FORMAT_SNORM",
"BUF_NUM_FORMAT_USCALED",
"BUF_NUM_FORMAT_SSCALED",
"BUF_NUM_FORMAT_UINT",
"BUF_NUM_FORMAT_SINT",
"",
"BUF_NUM_FORMAT_FLOAT"
}

Definition at line 264 of file AMDGPUAsmUtils.cpp.

Referenced by getNfmtLookupTable().

◆ NfmtSymbolicSICI

StringLiteral const llvm::AMDGPU::MTBUFFormat::NfmtSymbolicSICI
Initial value:
= {
"BUF_NUM_FORMAT_UNORM",
"BUF_NUM_FORMAT_SNORM",
"BUF_NUM_FORMAT_USCALED",
"BUF_NUM_FORMAT_SSCALED",
"BUF_NUM_FORMAT_UINT",
"BUF_NUM_FORMAT_SINT",
"BUF_NUM_FORMAT_SNORM_OGL",
"BUF_NUM_FORMAT_FLOAT"
}

Definition at line 275 of file AMDGPUAsmUtils.cpp.

Referenced by getNfmtLookupTable().

◆ NfmtSymbolicVI

StringLiteral const llvm::AMDGPU::MTBUFFormat::NfmtSymbolicVI
Initial value:
= {
"BUF_NUM_FORMAT_UNORM",
"BUF_NUM_FORMAT_SNORM",
"BUF_NUM_FORMAT_USCALED",
"BUF_NUM_FORMAT_SSCALED",
"BUF_NUM_FORMAT_UINT",
"BUF_NUM_FORMAT_SINT",
"BUF_NUM_FORMAT_RESERVED_6",
"BUF_NUM_FORMAT_FLOAT"
}

Definition at line 286 of file AMDGPUAsmUtils.cpp.

Referenced by getNfmtLookupTable().

◆ UfmtSymbolicGFX10

StringLiteral const llvm::AMDGPU::MTBUFFormat::UfmtSymbolicGFX10

Definition at line 297 of file AMDGPUAsmUtils.cpp.

Referenced by getUnifiedFormat(), and getUnifiedFormatName().

◆ UfmtSymbolicGFX11

StringLiteral const llvm::AMDGPU::MTBUFFormat::UfmtSymbolicGFX11

Definition at line 485 of file AMDGPUAsmUtils.cpp.

Referenced by getUnifiedFormat(), and getUnifiedFormatName().