[PATCH] D68944: [Alignment][NFC] Remove dependency on GlobalObject::setAlignment(unsigned)
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 01:59:01 PDT 2019
courbet accepted this revision.
courbet added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:4764
- AllocaInst *AI = new AllocaInst(Ty, AS, Size, Align);
+ AllocaInst *AI = new AllocaInst(Ty, AS, Size, Align ? Align->value() : 0);
AI->setUsedWithInAlloca(InAlloca);
----------------
`getValueOr()` ? (here and below)
================
Comment at: llvm/lib/CodeGen/GlobalMerge.cpp:465
// Make sure we use the same alignment AsmPrinter would use.
- unsigned Align = DL.getPreferredAlignment(Globals[j]);
- unsigned Padding = alignTo(MergedSize, Align) - MergedSize;
+ Align Alignment = Align(DL.getPreferredAlignment(Globals[j]));
+ unsigned Padding = alignTo(MergedSize, Alignment) - MergedSize;
----------------
Please avoid repeating `Align` (here and below).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68944/new/
https://reviews.llvm.org/D68944
More information about the llvm-commits
mailing list