[PATCH] D134527: [FunctionAttrs] Infer precise FMRB

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 05:51:56 PDT 2022


nikic created this revision.
nikic added reviewers: fhahn, reames, asbirlea.
Herald added subscribers: ormris, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This updates checkFunctionMemoryAccess() to infer a precise FunctionModRefBehavior, rather than an approximation split into read/write and argmemonly.

Afterwards, we still map this back to imprecise function attributes. This still allows us to infer some cases that we previously did not handle, namely inaccessiblememonly and inaccessiblemem_or_argmemonly. In practice, this means we get better memory attributes in the presence of intrinsics like `@llvm.assume`.


https://reviews.llvm.org/D134527

Files:
  llvm/lib/Transforms/IPO/FunctionAttrs.cpp
  llvm/test/Transforms/FunctionAttrs/argmemonly.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134527.462459.patch
Type: text/x-patch
Size: 12778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220923/bf1eb93b/attachment-0001.bin>


More information about the llvm-commits mailing list