[PATCH] D118263: getAllocAlignment: respect allocalign attribute if present
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 12 00:57:36 PST 2022
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/MemoryBuiltins.cpp:340
+ return V->getOperand(FnData->AlignParam);
+ ;
+ }
----------------
Stray semicolon
================
Comment at: llvm/lib/Analysis/MemoryBuiltins.cpp:343
+ for (unsigned i = 0; i < V->arg_size(); ++i) {
+ if (V->paramHasAttr(i, Attribute::AllocAlign)) {
+ return V->getOperand(i);
----------------
You should use `hasAttrSomewhere` here (it's more efficient if the attribute is not present anywhere).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118263/new/
https://reviews.llvm.org/D118263
More information about the llvm-commits
mailing list