On 5/9/23 07:43, Jiufu Guo wrote:

Thanks for point out this!  Yes, BLKmode rtx may not always be a MEM.
MEM_SIZE is only ok for MEM after the it's known size is computed.
Here MEM_SIZE is fine just because it is an stack rtx corresponding
to the type of parameter and returns which has been computed.

I updated the patch to resolve the conflicts with the trunk, and
retest bootstrap&testsuite, and then updated the patch a new version.

And this version pass bootstrap and regtest on ppc64{,le}, x86_64.

The major change is 'move_sub_blocks' only handles the case when
the block size can be move by same submode, or say (size % sub_size)
is 0.  If no objection, I would committed the new version.

BR,
Jeff (Jiufu)

gcc/ChangeLog:

        * cfgexpand.cc (expand_used_vars): Update to mark DECL_USEDBY_RETURN_P
        for returns.
        * expr.cc (move_sub_blocks): New function.
        (expand_assignment): Update assignment code about returns/parameters.
        * function.cc (assign_parm_setup_block): Update to mark
        DECL_REGS_TO_STACK_P for parameter.
        * tree-core.h (struct tree_decl_common): Add comment.
        * tree.h (DECL_USEDBY_RETURN_P): New define.
        (DECL_REGS_TO_STACK_P): New define.

gcc/testsuite/ChangeLog:

        * gcc.target/powerpc/pr65421-1.c: New test.
        * gcc.target/powerpc/pr65421-2.c: New test.
I don't think this was ever explicitly ACK'd.  OK for the trunk.

jeff

Reply via email to