From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31192 invoked by alias); 29 Apr 2015 08:52:55 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 31174 invoked by uid 89); 29 Apr 2015 08:52:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Apr 2015 08:52:53 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1YnNjd-0004Df-3Q from Tom_deVries@mentor.com for gcc-patches@gcc.gnu.org; Wed, 29 Apr 2015 01:52:49 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Wed, 29 Apr 2015 09:52:47 +0100 Message-ID: <55409BDD.8070305@mentor.com> Date: Wed, 29 Apr 2015 08:57:00 -0000 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH][PR65893] Move pass_stdarg to after pass_dce in pass_all_optimizations Content-Type: multipart/mixed; boundary="------------020107020103010709020109" X-SW-Source: 2015-04/txt/msg01837.txt.bz2 --------------020107020103010709020109 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1022 Hi, After moving the expansion of va_arg from gimplification to pass_stdarg, we execute less optimization passes on the expanded va_arg. For example, in PR65893 the optimized-dump code for a va_arg expansion for aarch64 is less optimal than it was before, because pass_tree_ifcombine is no longer executed for the expanded va_arg. This patch fixes the problem by moving pass_stdarg a bit earlier, to after pass_dce: ... NEXT_PASS (pass_vrp); NEXT_PASS (pass_chkp_opt); NEXT_PASS (pass_dce); + NEXT_PASS (pass_stdarg); NEXT_PASS (pass_call_cdce); NEXT_PASS (pass_cselim); NEXT_PASS (pass_copy_prop); NEXT_PASS (pass_tree_ifcombine); NEXT_PASS (pass_phiopt); NEXT_PASS (pass_tail_recursion); NEXT_PASS (pass_ch); - NEXT_PASS (pass_stdarg); NEXT_PASS (pass_lower_complex); NEXT_PASS (pass_sra); NEXT_PASS (pass_rename_ssa_copies); ... Bootstrapped and reg-tested on x86_64. OK for trunk? Thanks, - Tom --------------020107020103010709020109 Content-Type: text/x-patch; name="0001-Move-pass_stdarg-to-after-pass_dce-in-pass_all_optim.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Move-pass_stdarg-to-after-pass_dce-in-pass_all_optim.pa"; filename*1="tch" Content-length: 1031 Move pass_stdarg to after pass_dce in pass_all_optimizations 2015-04-29 Tom de Vries PR tree-optimization/65893 * passes.def (pass_all_optimizations): Move pass_stdarg to after pass_dce. --- gcc/passes.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/passes.def b/gcc/passes.def index 6dce141..32213e8 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -172,6 +172,7 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_vrp); NEXT_PASS (pass_chkp_opt); NEXT_PASS (pass_dce); + NEXT_PASS (pass_stdarg); NEXT_PASS (pass_call_cdce); NEXT_PASS (pass_cselim); NEXT_PASS (pass_copy_prop); @@ -179,7 +180,6 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_phiopt); NEXT_PASS (pass_tail_recursion); NEXT_PASS (pass_ch); - NEXT_PASS (pass_stdarg); NEXT_PASS (pass_lower_complex); NEXT_PASS (pass_sra); NEXT_PASS (pass_rename_ssa_copies); -- 1.9.1 --------------020107020103010709020109--