[PATCH] D128118: [Alignment] Use Align for MaxKernArgAlign
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 18 04:36:31 PDT 2022
gchatelet created this revision.
Herald added subscribers: kosarev, jsilvanus, hsmhsm, foad, kerbowa, hiraditya, nhaehnle, jvesely, arsenm.
Herald added a project: All.
gchatelet requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128118
Files:
llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
Index: llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
===================================================================
--- llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
+++ llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
@@ -270,7 +270,7 @@
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 @@
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());
Index: llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
+++ llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
@@ -617,7 +617,7 @@
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;
Index: llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
+++ llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h
@@ -69,7 +69,7 @@
return ExplicitKernArgSize;
}
- unsigned getMaxKernArgAlign() const { return MaxKernArgAlign.value(); }
+ Align getMaxKernArgAlign() const { return MaxKernArgAlign; }
uint32_t getLDSSize() const {
return LDSSize;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128118.438111.patch
Type: text/x-patch
Size: 2132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220618/a5bf7266/attachment.bin>
More information about the llvm-commits
mailing list