[PATCH] D155956: [FunctionAttrs] Consider recursive argmem effects (PR63936)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 07:54:29 PDT 2023


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

When inspecting the function body, we can't simply ignore effects of functions in the SCC entirely, because an argmem access of a recursive call might result in an access to another location in the callee.

Fix this by separately tracking memory effects that would occur if the SCC accesses argmem, and then later add those.

Fixes https://github.com/llvm/llvm-project/issues/63936.


https://reviews.llvm.org/D155956

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155956.542914.patch
Type: text/x-patch
Size: 9481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230721/07ae01e0/attachment.bin>


More information about the llvm-commits mailing list