From patchwork Thu Apr 25 14:46:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 1090879 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-499665-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ms0ccxvt"; dkim-atps=neutral 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 44qg4901Ymz9sBp for ; Fri, 26 Apr 2019 00:46:32 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=lpKkJMWNMzy3/YTkWaDMRA4v71YCIcK15GPVj+fHWJ8861GzD8 8eMlTeImNbuykS6L6FiNTrm5ow+ktMSNb8AcNCspJtptTnoCJOKLxij8XTiDzeZR kRxY6zCuQXg53EisBFzMNYPvVnVsL4yyYu5yehGGiY9v0puSYjexEiYek= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=KS03cdFScec4uJFY7xb2VCIsd+o=; b=ms0ccxvtUTez4tAKfIQq zPP4NJa7nzLP0LA/yakpKNfdURQh6dj0NSBRE66gFjqlTF6qYZYsgJ/IjNMcIOGI gvrZgg0/Abi83e6p19PCdsL6/EM4yMQUY/uZKnYHeq3TuRq5rV8HM4azGEwTwsC2 +9aLGGxVv/CIa4FrHhZ5+ek= Received: (qmail 44811 invoked by alias); 25 Apr 2019 14:46:26 -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 44533 invoked by uid 89); 25 Apr 2019 14:46:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Apr 2019 14:46:24 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7CC5A8B960 for ; Thu, 25 Apr 2019 14:46:23 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-18.rdu2.redhat.com [10.10.112.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE2A91A267 for ; Thu, 25 Apr 2019 14:46:22 +0000 (UTC) To: gcc-patches From: Jeff Law Subject: [RFA] Fix minor pass ordering problem Openpgp: preference=signencrypt Message-ID: <42d10d89-8fe3-b098-829f-2a30a4adbec6@redhat.com> Date: Thu, 25 Apr 2019 08:46:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 X-IsSubscribed: yes In the discussion for pr90037 Richi noticed that we had a cprop pass after the restrict warning pass. Those should be swapped. This patch swaps them. Bootstrapped and regression tested on x86_64. I wouldn't lose sleep if we decided to defer this to gcc-10. But given Richi and I both think it's the right thing to do I figured it was worth consideration for gcc-9. OK for the trunk, or defer to gcc-10? Jeff * passes.def: Move -Wrestrict pass after copy propagation. diff --git a/gcc/passes.def b/gcc/passes.def index bc147c4444d..99640d50091 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -315,10 +315,10 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_strlen); NEXT_PASS (pass_thread_jumps); NEXT_PASS (pass_vrp, false /* warn_array_bounds_p */); - NEXT_PASS (pass_warn_restrict); /* Threading can leave many const/copy propagations in the IL. Clean them up. */ NEXT_PASS (pass_copy_prop); + NEXT_PASS (pass_warn_restrict); NEXT_PASS (pass_dse); NEXT_PASS (pass_cd_dce); NEXT_PASS (pass_forwprop);