LLVM  15.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 const StringLiteralgetNfmtLookupTable (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

const StringLiteral DfmtSymbolic []
 
const StringLiteral NfmtSymbolicGFX10 []
 
const StringLiteral NfmtSymbolicSICI []
 
const StringLiteral NfmtSymbolicVI []
 
const StringLiteral UfmtSymbolicGFX10 []
 
const unsigned DfmtNfmt2UFmtGFX10 []
 
const StringLiteral UfmtSymbolicGFX11 []
 
const unsigned 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 469 of file SIDefines.h.

◆ MergedFormat

Enumerator
DFMT_NFMT_UNDEF 
DFMT_NFMT_DEFAULT 
DFMT_NFMT_MASK 
DFMT_NFMT_MAX 

Definition at line 518 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 497 of file SIDefines.h.

◆ UnifiedFormatCommon

Enumerator
UFMT_MAX 
UFMT_UNDEF 
UFMT_DEFAULT 

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

References DFMT_MASK, DFMT_SHIFT, NFMT_MASK, and NFMT_SHIFT.

Referenced by isValidDfmtNfmt().

◆ encodeDfmtNfmt()

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

Definition at line 1467 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 1522 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 1421 of file AMDGPUBaseInfo.cpp.

References DFMT_MAX, DFMT_MIN, DFMT_UNDEF, and DfmtSymbolic.

◆ getDfmtName()

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

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

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

◆ getNfmtLookupTable()

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

◆ getNfmtName()

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

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

References decodeDfmtNfmt(), and isValidNfmt().

◆ isValidFormatEncoding()

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

Definition at line 1518 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 1463 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

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

Definition at line 287 of file AMDGPUAsmUtils.cpp.

Referenced by convertDfmtNfmt2Ufmt().

◆ DfmtNfmt2UFmtGFX11

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

Definition at line 461 of file AMDGPUAsmUtils.cpp.

Referenced by convertDfmtNfmt2Ufmt().

◆ DfmtSymbolic

const StringLiteral 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 141 of file AMDGPUAsmUtils.cpp.

Referenced by getDfmt(), and getDfmtName().

◆ NfmtSymbolicGFX10

const StringLiteral 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 160 of file AMDGPUAsmUtils.cpp.

Referenced by getNfmtLookupTable().

◆ NfmtSymbolicSICI

const StringLiteral 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 171 of file AMDGPUAsmUtils.cpp.

Referenced by getNfmtLookupTable().

◆ NfmtSymbolicVI

const StringLiteral 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 182 of file AMDGPUAsmUtils.cpp.

Referenced by getNfmtLookupTable().

◆ UfmtSymbolicGFX10

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

Definition at line 193 of file AMDGPUAsmUtils.cpp.

Referenced by getUnifiedFormat(), and getUnifiedFormatName().

◆ UfmtSymbolicGFX11

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

Definition at line 381 of file AMDGPUAsmUtils.cpp.

Referenced by getUnifiedFormat(), and getUnifiedFormatName().