Page MenuHomePhabricator

[FunctionAttrs] Infer the argmemonly function attribute
Needs ReviewPublic

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


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