[libc-commits] [PATCH] D152226: [FunctionAttrs] Propagate some func/arg/ret attributes from caller to callsite (WIP)
Nikita Popov via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Jun 13 01:03:30 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/InferCallsiteAttrs.cpp:597
+ // callsite violating the constraint.
+ if (checkCallerDoesNotAccessMemory() && !CB->doesNotAccessMemory()) {
+ // Wait until we know we actually need it to do potentially expensive
----------------
For these you generally want to query `getMemoryEffects()` on the caller/callee once and then work on that representation, instead of doing separate queries for everything. This may allow more precise handling and likely reduces the compile-time impact, as doing these attribute lookups is quite expensive.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152226/new/
https://reviews.llvm.org/D152226
More information about the libc-commits
mailing list