[Alignment] Use Align for MaxKernArgAlign

Differential Revision: https://reviews.llvm.org/D128118
This commit is contained in:
Guillaume Chatelet 2022-06-18 11:36:02 +00:00
parent a9fd8b9113
commit cef65864af
3 changed files with 4 additions and 4 deletions

View File

@ -69,7 +69,7 @@ public:
return ExplicitKernArgSize;
}
unsigned getMaxKernArgAlign() const { return MaxKernArgAlign.value(); }
Align getMaxKernArgAlign() const { return MaxKernArgAlign; }
uint32_t getLDSSize() const {
return LDSSize;

View File

@ -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;

View File

@ -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());