[llvm] MCExpr-ify amd_kernel_code_t (PR #91587)
Janek van Oirschot via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 05:05:39 PDT 2024
================
@@ -1218,39 +1219,67 @@ unsigned getAllocatedNumVGPRBlocks(const MCSubtargetInfo *STI,
}
} // end namespace IsaInfo
-void initDefaultAMDKernelCodeT(amd_kernel_code_t &Header,
+void initDefaultAMDKernelCodeT(AMDGPUMCKernelCodeT &KernelCode,
const MCSubtargetInfo *STI) {
IsaVersion Version = getIsaVersion(STI->getCPU());
- memset(&Header, 0, sizeof(Header));
-
- Header.amd_kernel_code_version_major = 1;
- Header.amd_kernel_code_version_minor = 2;
- Header.amd_machine_kind = 1; // AMD_MACHINE_KIND_AMDGPU
- Header.amd_machine_version_major = Version.Major;
- Header.amd_machine_version_minor = Version.Minor;
- Header.amd_machine_version_stepping = Version.Stepping;
- Header.kernel_code_entry_byte_offset = sizeof(Header);
- Header.wavefront_size = 6;
+ KernelCode.amd_kernel_code_version_major = 0;
----------------
JanekvO wrote:
Moved the set 0s to constructor
https://github.com/llvm/llvm-project/pull/91587
More information about the llvm-commits
mailing list