[PATCH] D152226: [FunctionAttrs] Propagate some func/arg/ret attributes from caller to callsite (WIP)

Noah Goldstein via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 11:46:51 PDT 2023


goldstein.w.n 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
----------------
goldstein.w.n wrote:
> nikic wrote:
> > 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.
> Re-running compile time checks, will post revised numbers tomorrow.
No real impact on compile time.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152226/new/

https://reviews.llvm.org/D152226



More information about the cfe-commits mailing list