From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 8D1DA3858D32; Sun, 4 Jun 2023 16:59:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D1DA3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-64d24136685so2841628b3a.1; Sun, 04 Jun 2023 09:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685897952; x=1688489952; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=aVZNwWNNEyZYhyxq/c79szqBb2fuBX0ji7bBcR3DLJY=; b=DnxMDZ5UbPS/GwVa0T0x+//7CBjnVk1oXR+wh/p94Cv44zkxmZBSZgeaUjmH69Dmhb h4R93Uf3FWykJX2uG08cMKl1PJN/4lvC4HNnt9R76HmdZ3nO+bhwU7FwSt0nexV2d767 +EMbIaq4aT27uwlvUJPb2TJKA0736psSLe67r70CGhOjSxUJLq09qshFzxd/kl10MJOC qwbQXwBbDfow76oIM26uETmYIzdlHN2dQAzP6Mk3XJEcUVJvz9CWfesoEmydM317OJXH lgT0SkomLqyLY5bhPocdqa38XkEPaPpL5bU4J9F2slNS0iagPHNiKN4oaVXancLVm7ke srdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685897952; x=1688489952; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aVZNwWNNEyZYhyxq/c79szqBb2fuBX0ji7bBcR3DLJY=; b=LT7Etxmdpz/dDv0FPrzjv7+xyCr4OlL6DG8rgH8LcTRq0HBYicmYGIGfCGzmjoPnrU ixZaA09SSV/1jm2t1XvJSCDCjjzYszcevulkmSGu/iJgCrct79TRkgVoqmm3M5nNpBmI LqjFk7aXmO0dMVD/5mxOOLGg4cjvrDspK1MRM9l1bPjPUsJIquvtw1D0WJrikJ9m6J9d Hp0ZF13H/ZNTS8o1GTo/+qhBCpXY+4M00kkiWWT+4I3s7SeU3vhMvJuffSpmavw97nfT Ld2ehEzYmTppCIzL3nsMXAvHMGaitpQemcNcNgvfBghPH0LN/QmyJJVwB1s0Z6X1bKl3 pPgg== X-Gm-Message-State: AC+VfDzvRa7aT4P/ue0yjoxaAETleZkjrDZ+XDRhQsalq0yV2H7y5rRJ nPB9C6zNrt0XQz76l9SCiQw= X-Google-Smtp-Source: ACHHUZ40TCPor3jmG9k8l5CkhyU6PaV1nabR8NlieChvFNzZX+Hv6g+LSaSjVcr9Qd52jyX40zRO/w== X-Received: by 2002:a05:6a20:9146:b0:ff:ca91:68ee with SMTP id x6-20020a056a20914600b000ffca9168eemr4629154pzc.9.1685897952473; Sun, 04 Jun 2023 09:59:12 -0700 (PDT) Received: from ?IPV6:2607:fb90:469:b40a:c15c:6a92:5516:c5a5? ([2607:fb90:469:b40a:c15c:6a92:5516:c5a5]) by smtp.gmail.com with ESMTPSA id h26-20020aa786da000000b006589cf6d88bsm1049853pfo.145.2023.06.04.09.59.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 04 Jun 2023 09:59:11 -0700 (PDT) Message-ID: Date: Sun, 4 Jun 2023 10:59:09 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH V5] Use reg mode to move sub blocks for parameters and returns Content-Language: en-US To: Jiufu Guo Cc: gcc-patches@gcc.gnu.org, rguenther@suse.de, segher@kernel.crashing.org, dje.gcc@gmail.com, linkw@gcc.gnu.org, meissner@linux.ibm.com References: <20230317033952.1549050-1-guojiufu@linux.ibm.com> <0221bead-5d08-cb56-e620-642825c1abc3@gmail.com> <0473d90c-7ee0-2989-16b9-234f422e0e3c@gmail.com> <7n3545d3hq.fsf@ltcden2-lp1.aus.stglabs.ibm.com> From: Jeff Law In-Reply-To: <7n3545d3hq.fsf@ltcden2-lp1.aus.stglabs.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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