[PATCH] D121460: [FunctionAttrs] Turn MemoryAccessKind into class (NFC).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 06:07:49 PST 2022


fhahn created this revision.
fhahn added reviewers: nikic, jdoerfert, reames, lebedev.ri.
Herald added subscribers: ormris, steven_wu, hiraditya.
Herald added a project: All.
fhahn requested review of this revision.
Herald added a project: LLVM.

This patch changes MemoryAccessKind to a class wrapping the existing
enum. This allows adding additional information that's independent of
the existing values, like argmemonly.

ArgMemOnly support will be added in D121415 <https://reviews.llvm.org/D121415>.

This might be a bit heavy-handed, as an alternative checkFunctionMemoryAccess
could return a pair or a struct with fields for MemoryAccessKind and
ArgMemOnly. I don't have any strong preferences.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121460

Files:
  llvm/include/llvm/Transforms/IPO/FunctionAttrs.h
  llvm/lib/Transforms/IPO/FunctionAttrs.cpp
  llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
  llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121460.414645.patch
Type: text/x-patch
Size: 6764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220311/f9fa8d6b/attachment.bin>


More information about the llvm-commits mailing list