LLVM 20.0.0git
|
#include "Target/AMDGPU/Utils/AMDKernelCodeTUtils.h"
Public Types | |
using | PrintHelper = function_ref< void(const MCExpr *, raw_ostream &, const MCAsmInfo *)> |
Public Member Functions | |
AMDGPUMCKernelCodeT ()=default | |
void | initDefault (const MCSubtargetInfo *STI, MCContext &Ctx, bool InitMCExpr=true) |
void | validate (const MCSubtargetInfo *STI, MCContext &Ctx) |
const MCExpr *& | getMCExprForIndex (int Index) |
bool | ParseKernelCodeT (StringRef ID, MCAsmParser &MCParser, raw_ostream &Err) |
void | EmitKernelCodeT (raw_ostream &OS, MCContext &Ctx, PrintHelper Helper) |
void | EmitKernelCodeT (MCStreamer &OS, MCContext &Ctx) |
Definition at line 33 of file AMDKernelCodeTUtils.h.
using llvm::AMDGPU::AMDGPUMCKernelCodeT::PrintHelper = function_ref<void(const MCExpr *, raw_ostream &, const MCAsmInfo *)> |
Definition at line 83 of file AMDKernelCodeTUtils.h.
|
default |
Referenced by initDefault().
void AMDGPUMCKernelCodeT::EmitKernelCodeT | ( | MCStreamer & | OS, |
MCContext & | Ctx | ||
) |
Definition at line 474 of file AMDKernelCodeTUtils.cpp.
References AMD_CODE_PROPERTY_IS_DYNAMIC_CALLSTACK_SHIFT, AMD_CODE_PROPERTY_IS_DYNAMIC_CALLSTACK_WIDTH, amd_kernel_code_version_major, amd_kernel_code_version_minor, amd_machine_kind, amd_machine_version_major, amd_machine_version_minor, amd_machine_version_stepping, call_convention, code_properties, compute_pgm_resource1_registers, compute_pgm_resource2_registers, compute_pgm_resource_registers, control_directives, llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createOr(), debug_private_segment_buffer_sgpr, debug_wavefront_private_segment_offset_sgpr, gds_segment_byte_size, group_segment_alignment, llvm::Hi_32(), is_dynamic_callstack, kernarg_segment_alignment, kernarg_segment_byte_size, kernel_code_entry_byte_offset, kernel_code_prefetch_byte_offset, kernel_code_prefetch_byte_size, llvm::Lo_32(), llvm::AMDGPU::maskShiftSet(), OS, private_segment_alignment, reserved0, reserved3, reserved_sgpr_count, reserved_sgpr_first, reserved_vgpr_count, reserved_vgpr_first, runtime_loader_kernel_symbol, wavefront_sgpr_count, wavefront_size, workgroup_fbarrier_count, workgroup_group_segment_byte_size, workitem_private_segment_byte_size, and workitem_vgpr_count.
void AMDGPUMCKernelCodeT::EmitKernelCodeT | ( | raw_ostream & | OS, |
MCContext & | Ctx, | ||
PrintHelper | Helper | ||
) |
Definition at line 458 of file AMDKernelCodeTUtils.cpp.
References get_amd_kernel_code_t_FldNames(), llvm::MCContext::getAsmInfo(), getMCExprForIndex(), hasMCExprVersionTable(), OS, printAmdKernelCodeField(), and Size.
Definition at line 434 of file AMDKernelCodeTUtils.cpp.
References getMCExprIndexTable().
Referenced by EmitKernelCodeT(), and ParseKernelCodeT().
void AMDGPUMCKernelCodeT::initDefault | ( | const MCSubtargetInfo * | STI, |
MCContext & | Ctx, | ||
bool | InitMCExpr = true |
||
) |
Definition at line 384 of file AMDKernelCodeTUtils.cpp.
References AMDGPUMCKernelCodeT(), compute_pgm_resource1_registers, compute_pgm_resource2_registers, compute_pgm_resource_registers, llvm::MCConstantExpr::create(), llvm::Hi_32(), llvm::AMDGPU::initDefaultAMDKernelCodeT(), is_dynamic_callstack, llvm::Lo_32(), wavefront_sgpr_count, workitem_private_segment_byte_size, and workitem_vgpr_count.
bool AMDGPUMCKernelCodeT::ParseKernelCodeT | ( | StringRef | ID, |
MCAsmParser & | MCParser, | ||
raw_ostream & | Err | ||
) |
Definition at line 439 of file AMDKernelCodeTUtils.cpp.
References get_amd_kernel_code_t_FieldIndex(), getMCExprForIndex(), getParserTable(), hasMCExprVersionTable(), Idx, and parseExpr().
void AMDGPUMCKernelCodeT::validate | ( | const MCSubtargetInfo * | STI, |
MCContext & | Ctx | ||
) |
Definition at line 403 of file AMDKernelCodeTUtils.cpp.
References compute_pgm_resource1_registers, G_00B848_DX10_CLAMP, G_00B848_FWD_PROGRESS, G_00B848_IEEE_MODE, G_00B848_MEM_ORDERED, G_00B848_WGP_MODE, llvm::AMDGPU::isGFX10Plus(), llvm::AMDGPU::isGFX12Plus(), and llvm::MCContext::reportError().
Referenced by llvm::AMDGPUAsmPrinter::emitFunctionBodyStart().
uint32_t llvm::AMDGPU::AMDGPUMCKernelCodeT::amd_kernel_code_version_major = 0 |
Definition at line 38 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
uint32_t llvm::AMDGPU::AMDGPUMCKernelCodeT::amd_kernel_code_version_minor = 0 |
Definition at line 39 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
uint16_t llvm::AMDGPU::AMDGPUMCKernelCodeT::amd_machine_kind = 0 |
Definition at line 40 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
uint16_t llvm::AMDGPU::AMDGPUMCKernelCodeT::amd_machine_version_major = 0 |
Definition at line 41 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
uint16_t llvm::AMDGPU::AMDGPUMCKernelCodeT::amd_machine_version_minor = 0 |
Definition at line 42 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
uint16_t llvm::AMDGPU::AMDGPUMCKernelCodeT::amd_machine_version_stepping = 0 |
Definition at line 43 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
int32_t llvm::AMDGPU::AMDGPUMCKernelCodeT::call_convention = 0 |
Definition at line 64 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
uint32_t llvm::AMDGPU::AMDGPUMCKernelCodeT::code_properties = 0 |
Definition at line 49 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
Definition at line 69 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), initDefault(), and validate().
Definition at line 70 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and initDefault().
uint64_t llvm::AMDGPU::AMDGPUMCKernelCodeT::compute_pgm_resource_registers = 0 |
Definition at line 48 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), initDefault(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
uint64_t llvm::AMDGPU::AMDGPUMCKernelCodeT::control_directives[16] = {0} |
Definition at line 67 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint16_t llvm::AMDGPU::AMDGPUMCKernelCodeT::debug_private_segment_buffer_sgpr = 0 |
Definition at line 59 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint16_t llvm::AMDGPU::AMDGPUMCKernelCodeT::debug_wavefront_private_segment_offset_sgpr = 0 |
Definition at line 58 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint32_t llvm::AMDGPU::AMDGPUMCKernelCodeT::gds_segment_byte_size = 0 |
Definition at line 51 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint8_t llvm::AMDGPU::AMDGPUMCKernelCodeT::group_segment_alignment = 0 |
Definition at line 61 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
Definition at line 72 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and initDefault().
uint8_t llvm::AMDGPU::AMDGPUMCKernelCodeT::kernarg_segment_alignment = 0 |
Definition at line 60 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
uint64_t llvm::AMDGPU::AMDGPUMCKernelCodeT::kernarg_segment_byte_size = 0 |
Definition at line 52 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
int64_t llvm::AMDGPU::AMDGPUMCKernelCodeT::kernel_code_entry_byte_offset = 0 |
Definition at line 44 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
int64_t llvm::AMDGPU::AMDGPUMCKernelCodeT::kernel_code_prefetch_byte_offset = 0 |
Definition at line 45 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint64_t llvm::AMDGPU::AMDGPUMCKernelCodeT::kernel_code_prefetch_byte_size = 0 |
Definition at line 46 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint8_t llvm::AMDGPU::AMDGPUMCKernelCodeT::private_segment_alignment = 0 |
Definition at line 62 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
uint64_t llvm::AMDGPU::AMDGPUMCKernelCodeT::reserved0 = 0 |
Definition at line 47 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint8_t llvm::AMDGPU::AMDGPUMCKernelCodeT::reserved3[12] = {0} |
Definition at line 65 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint16_t llvm::AMDGPU::AMDGPUMCKernelCodeT::reserved_sgpr_count = 0 |
Definition at line 57 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint16_t llvm::AMDGPU::AMDGPUMCKernelCodeT::reserved_sgpr_first = 0 |
Definition at line 56 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint16_t llvm::AMDGPU::AMDGPUMCKernelCodeT::reserved_vgpr_count = 0 |
Definition at line 55 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint16_t llvm::AMDGPU::AMDGPUMCKernelCodeT::reserved_vgpr_first = 0 |
Definition at line 54 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint64_t llvm::AMDGPU::AMDGPUMCKernelCodeT::runtime_loader_kernel_symbol = 0 |
Definition at line 66 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
Definition at line 73 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and initDefault().
uint8_t llvm::AMDGPU::AMDGPUMCKernelCodeT::wavefront_size = 0 |
Definition at line 63 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and llvm::AMDGPU::initDefaultAMDKernelCodeT().
uint32_t llvm::AMDGPU::AMDGPUMCKernelCodeT::workgroup_fbarrier_count = 0 |
Definition at line 53 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
uint32_t llvm::AMDGPU::AMDGPUMCKernelCodeT::workgroup_group_segment_byte_size = 0 |
Definition at line 50 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT().
Definition at line 75 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and initDefault().
Definition at line 74 of file AMDKernelCodeTUtils.h.
Referenced by EmitKernelCodeT(), and initDefault().