[PATCH] D68792: [Alignment] Migrate Attribute::getWith(Stack)Alignment
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 05:06:15 PDT 2019
courbet accepted this revision.
courbet added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/IR/Core.cpp:2792
+ Attribute AlignAttr =
+ Attribute::getWithAlignment(Call->getContext(), llvm::Align(align));
Call->addAttribute(index, AlignAttr);
----------------
`Align`
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp:4216
unsigned ExplicitArgOffset = ST.getExplicitKernelArgOffset(MF.getFunction());
- unsigned Alignment = ST.getAlignmentForImplicitArgPtr();
+ Align Alignment = ST.getAlignmentForImplicitArgPtr();
uint64_t ArgOffset = alignTo(MFI->getExplicitKernArgSize(), Alignment) +
----------------
const
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp:78
- unsigned MaxAlign;
+ llvm::Align MaxAlign;
// FIXME: Alignment is broken broken with explicit arg offset.;
----------------
`Align`
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp:131
int64_t OffsetDiff = EltOffset - AlignDownOffset;
- unsigned AdjustedAlign = MinAlign(DoShiftOpt ? AlignDownOffset : EltOffset,
- KernArgBaseAlign);
+ llvm::Align AdjustedAlign = commonAlignment(
+ KernArgBaseAlign, DoShiftOpt ? AlignDownOffset : EltOffset);
----------------
ditto
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp:506
- unsigned Align = DL.getABITypeAlignment(ArgTy);
+ Align Alignment = Align(DL.getABITypeAlignment(ArgTy));
uint64_t AllocSize = DL.getTypeAllocSize(ArgTy);
----------------
const
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp:524
if (ImplicitBytes != 0) {
- unsigned Alignment = getAlignmentForImplicitArgPtr();
+ Align Alignment = getAlignmentForImplicitArgPtr();
TotalSize = alignTo(ExplicitArgBytes, Alignment) + ImplicitBytes;
----------------
const
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68792/new/
https://reviews.llvm.org/D68792
More information about the llvm-commits
mailing list