[PATCH] D81311: [RFC] LangRef: Define inmem parameter attribute
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 5 17:54:47 PDT 2020
rjmccall added a comment.
Most of the generalized optimization properties of this attribute seem to be redundant with existing attributes. What are the properties you're trying to convey exactly? The argument is a pointer to memory of a certain size and alignment, and that memory is known to be exclusive to this call and also constant?
I don't think in practice those other attributes would ever not be preserved through IR passes, especially for kernels. I guess they could be introduced by other analyses, and you wouldn't want this property to be confused with that? Still, maybe it would be less redundant to just have this attribute require the existence of those other attributes (particularly `dereferenceable` and `align`) rather than providing its own structure.
Do you actually need any of the structure of the type beyond a size and alignment?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81311/new/
https://reviews.llvm.org/D81311
More information about the cfe-commits
mailing list