[PATCH] D79636: [LangRef] Clarify the semantics of the `byval` attribute

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 9 14:22:04 PDT 2020


aqjune added a comment.

I have a minor question:

> a call of a readnone function with a byval argument is not classified as readnone (which it is today: https://godbolt.org/z/dDfQ5r)

%0 at caller has readnone attribute - is it related with the propagation of readnone attribute from %0 of empty function to the caller?
Some comments above seems to be related with this question, but I rather wonder about the validity of the propagation of readnone in this example.

Actually I wonder whether things will become clearer if an alloca-and-copy (or something that is equivalent with this) is explicitly used to show the behavior of pass-as-value rather than byval implicitly encoding the behavior; my impression is that byval is different from other attributes like readnone or nonnull, because it isn't the result of value analysis. This will be a lot of work though...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79636





More information about the llvm-commits mailing list