[PATCH] D50107: [FunctionAttrs] Infer the argmemonly function attribute

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 31 15:03:19 PDT 2018


jdoerfert created this revision.
jdoerfert added reviewers: hfinkel, homerdin, chandlerc.
Herald added subscribers: dexonsmith, steven_wu, bollu, eraman, mehdi_amini.

  This patch allows to infer the argmemonly attribute in addition to
  readnone, readonly, and writeonly which we detect already. Argmemonly
  is used if all memory locations accessed in an SCC are directly
  derived from pointer arguments.
  
  To faciliate this change we replaced the (almost only locally used)
  "MemoryAccessKind" type with the more general "FunctionModRefBehavior"
  type defined in the alias analysis interface.


Repository:
  rL LLVM

https://reviews.llvm.org/D50107

Files:
  include/llvm/Analysis/AliasAnalysis.h
  include/llvm/Transforms/IPO/FunctionAttrs.h
  lib/Transforms/IPO/FunctionAttrs.cpp
  lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
  lib/Transforms/IPO/WholeProgramDevirt.cpp
  test/Analysis/TypeBasedAliasAnalysis/argmemonly.ll
  test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll
  test/Transforms/FunctionAttrs/atomic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50107.158396.patch
Type: text/x-patch
Size: 21339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180731/839fffa0/attachment.bin>


More information about the llvm-commits mailing list