[PATCH] D100226: Explicitly annotate nofree functions inferred from readonly/readnone

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 12 15:35:04 PDT 2021


reames planned changes to this revision.
reames added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionAttrs.cpp:1276
+  if (CB->onlyReadsMemory())
+    return false;
+
----------------
nikic wrote:
> 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.
I agree with this suggestion, and will reformulate the patch to that effect.


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