[PATCH] D71213: [Alignment][NFC] CreateMemSet use MaybeAlign
Clement Courbet via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 10 01:56:16 PST 2019
courbet added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1092
const DataLayout &DL = F.getParent()->getDataLayout();
- unsigned IntptrAlignment = DL.getABITypeAlignment(MS.IntptrTy);
+ Align IntptrAlignment = Align(DL.getABITypeAlignment(MS.IntptrTy));
unsigned IntptrSize = DL.getTypeStoreSize(MS.IntptrTy);
----------------
const ?
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:2910
+ const Align Alignment =
+ assumeAligned(cast<ConstantInt>(I.getArgOperand(2))->getZExtValue());
Value *Mask = I.getArgOperand(3);
----------------
how did you infer this ? I'm not sure I can prove that this is nonzero.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:2940
+ const Align Alignment =
+ assumeAligned(cast<ConstantInt>(I.getArgOperand(1))->getZExtValue());
Value *Mask = I.getArgOperand(2);
----------------
ditto
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3319
if (ArgOffset + Size > kParamTLSSize) break;
- unsigned ParamAlignment = CS.getParamAlignment(i);
- unsigned Alignment = std::min(ParamAlignment, kShadowTLSAlignment);
+ const Align ParamAlignment = assumeAligned(CS.getParamAlignment(i));
+ const Align Alignment = std::min(ParamAlignment, kShadowTLSAlignment);
----------------
ditto
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71213/new/
https://reviews.llvm.org/D71213
More information about the cfe-commits
mailing list