This is an archive of the discontinued LLVM Phabricator instance.

[FunctionAttrs] Infer the argmemonly function attribute
AbandonedPublic

Authored by jdoerfert on Jul 31 2018, 3:03 PM.

Details

Summary
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.

Diff Detail