efriedma added a comment.

> @efriedma I'm a bit confused. Could you propose some wording so I get a 
> feeling where you want to go?

Depending on which direction we go, either:

- "Attributes on a function or callsite describe the behavior of the callee 
excluding the implied copy.  For example, an optimization can infer readnone on 
a a byval argument if the callee does not access the copied memory."
- "Attributes on a function or callsite describe the behavior of a call 
including the implied copy.  For example, an optimization can never infer 
readnone on a call with a byval argument readnone because the implied copy 
reads memory.  byval implies nocapture: there isn't any way to retrieve the 
original address in the callee."

I don't really care which we choose, we can easily model it either way.  But I 
think we need to choose one or the other.  Making attributes describe different 
things on each side of the call is much worse than either of those 
alternatives; it confuses what it means for a function or callsite to have an 
attribute.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79636/new/

https://reviews.llvm.org/D79636



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to