[PATCH] D100226: Explicitly annotate nofree functions inferred from readonly/readnone
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 11 08:06:43 PDT 2021
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/FunctionAttrs.cpp:1276
+ if (CB->onlyReadsMemory())
+ return false;
+
----------------
Do I understand right that this is here for declarations that have been annotated as `__attribute___((readonly))`? Rather than handling it here, maybe this should be done in InferFunctionAttrsPass? It currently only handles libcalls, but I think it fits there conceptually.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100226/new/
https://reviews.llvm.org/D100226
More information about the llvm-commits
mailing list