From patchwork Wed Apr 29 08:52:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 465944 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D42BA140320 for ; Wed, 29 Apr 2015 18:53:02 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Mu3Ntvvo; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=vLGikvcA1G+KngE7NPL7tqTFa4D3fddZemlQm1MMhpbMXn 6F25hsdJzqEeU05PW7SXeeVWe2kIE9sLSI8roL84Kwvhj3FMQ+eI2CZZACAa/fxC MV/6VAlVuha8n9LFn/Pg0DPOo60bGbeTUOHZwcXmGGd3Yo7YtwfeuLhjhzCHI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=iJei8pd8lTtn2hwLmgnfOM8N8Fs=; b=Mu3Ntvvor4TYNqPoj1eY 3ceHr69sElbMRvWjdF020sx97BJGnlLsQjcd0PO65W0j/7AbyoVqcNB4v3dg+W5m 37xAY4MVR+CVAmnePQfcMKfl5USq20SAtUMXUahOxp0eaEx2m6g9NJAbNyg8K1AJ 5X1aEWOO+u4+oozmi7upMT4= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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 10:52:45 +0200 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 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 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