[PATCH] D58694: LLVM: Optimization Pass: Function Attribute: nocapture should be added if the argument is WriteOnly

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 14:22:51 PST 2019


rnk added a comment.

In D58694#1411211 <https://reviews.llvm.org/D58694#1411211>, @anhtuyen wrote:

> Removing an attribute explicitly added by the user (writeonly) and replacing it with the attribute we deduced (readnone) ? That might not be the improvement we want.
>  A side note, but the snippet was reduced from an actual code, where the writeonly is required.


readnone on the entire function implies the input parameter isn't read, so the inferred attribute implies what was written by the user. Users write many things, but the purpose of optimization is often to replace them with better things, and I don't see how this is much different.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58694





More information about the llvm-commits mailing list