[llvm] cef6586 - [Alignment] Use Align for MaxKernArgAlign
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 06:40:46 PDT 2022
Author: Guillaume Chatelet
Date: 2022-06-22T13:40:37Z
New Revision: cef65864af6988d26837e72e9bb9e1bebbff1fa4
URL: https://github.com/llvm/llvm-project/commit/cef65864af6988d26837e72e9bb9e1bebbff1fa4
DIFF: https://github.com/llvm/llvm-project/commit/cef65864af6988d26837e72e9bb9e1bebbff1fa4.diff
LOG: [Alignment] Use Align for MaxKernArgAlign
Differential Revision: https://reviews.llvm.org/D128118
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
index 10cbdaca477f..df62c2314617 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
@@ -69,7 +69,7 @@ class AMDGPUMachineFunction : public MachineFunctionInfo {
return ExplicitKernArgSize;
}
- unsigned getMaxKernArgAlign() const { return MaxKernArgAlign.value(); }
+ Align getMaxKernArgAlign() const { return MaxKernArgAlign; }
uint32_t getLDSSize() const {
return LDSSize;
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
index 0b7af8007215..0504c59ebd9e 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
@@ -617,7 +617,7 @@ bool SIMachineFunctionInfo::initializeBaseYamlFields(
const yaml::SIMachineFunctionInfo &YamlMFI, const MachineFunction &MF,
PerFunctionMIParsingState &PFS, SMDiagnostic &Error, SMRange &SourceRange) {
ExplicitKernArgSize = YamlMFI.ExplicitKernArgSize;
- MaxKernArgAlign = assumeAligned(YamlMFI.MaxKernArgAlign);
+ MaxKernArgAlign = YamlMFI.MaxKernArgAlign;
LDSSize = YamlMFI.LDSSize;
GDSSize = YamlMFI.GDSSize;
DynLDSAlign = YamlMFI.DynLDSAlign;
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
index d0f68d3fbdb1..8a63002b69b3 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
@@ -270,7 +270,7 @@ template <> struct MappingTraits<SIMode> {
struct SIMachineFunctionInfo final : public yaml::MachineFunctionInfo {
uint64_t ExplicitKernArgSize = 0;
- unsigned MaxKernArgAlign = 0;
+ Align MaxKernArgAlign;
uint32_t LDSSize = 0;
uint32_t GDSSize = 0;
Align DynLDSAlign;
@@ -312,7 +312,7 @@ template <> struct MappingTraits<SIMachineFunctionInfo> {
static void mapping(IO &YamlIO, SIMachineFunctionInfo &MFI) {
YamlIO.mapOptional("explicitKernArgSize", MFI.ExplicitKernArgSize,
UINT64_C(0));
- YamlIO.mapOptional("maxKernArgAlign", MFI.MaxKernArgAlign, 0u);
+ YamlIO.mapOptional("maxKernArgAlign", MFI.MaxKernArgAlign);
YamlIO.mapOptional("ldsSize", MFI.LDSSize, 0u);
YamlIO.mapOptional("gdsSize", MFI.GDSSize, 0u);
YamlIO.mapOptional("dynLDSAlign", MFI.DynLDSAlign, Align());
More information about the llvm-commits
mailing list