[PATCH] D103288: [SanCov] Properly set ABI parameter attributes
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 30 01:18:39 PDT 2021
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:845
+ {IRB.CreateIntCast(A1, Ty, true)});
+ if (CallbackIdx == 0) {
+ CB->addParamAttr(0, Attribute::ZExt);
----------------
rnk wrote:
> Can we do something like `CB->setAttributes(CB->getDirectCallee()->getAttributes()` that avoids duplicating the knowledge of the ABI attributes to the call site? We know at this point that the constructed call will be direct, nothing stops this code from looking at the callee.
Is there anything preventing us from doing this directly in IRBuilder? Is there some situation where we //don't// want to inherit attributes from the declaration?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103288/new/
https://reviews.llvm.org/D103288
More information about the llvm-commits
mailing list