[PATCH] D98148: GlobalISel: Fix marking byval arguments as immutable

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 7 14:17:30 PST 2021


aemerson added a comment.

Am I misunderstanding the meaning of byval? From the langref:

> The attribute implies that a hidden copy of the pointee is made between the caller and the callee, so the callee is unable to modify the value in the caller. This attribute is only valid on LLVM pointer arguments. It is generally used to pass structs and arrays by value, but is also valid on pointers to scalars. The copy is considered to belong to the caller not the callee (for example, readonly functions should not write to byval parameters).

>From that, I'd expect byval stack slots to be *immutable*.


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

https://reviews.llvm.org/D98148



More information about the llvm-commits mailing list