On Sun, Jun 29, 2025, 7:36 AM Antoni Boucher via Gcc <gcc@gcc.gnu.org> wrote:
> Hi. > Is there a way in GENERIC to specify that a parameter will be passed in > "sret", or is this solely controlled by the hook struct_value_rtx? > It is only controlled by the hook. What exactly are trying to do? You could set the return slot optimization bit on the call expression if you want the lhs of a call not to be copied and just passed as the address via sret. That is if you have: StructVar = func(...); You set the return slot optimization bit on the call expr in generic and which will copy that bit to the gimple GIMPLE_CALL and then during expand will again copy it back to the generic call_expr and expand will use the target for the address. Is that what you are looking for? Thanks, Andrew Thanks. >