From patchwork Wed Aug 2 16:15:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 796691 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-459632-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="voUUiZMC"; 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 3xMywz2wfPz9sPt for ; Thu, 3 Aug 2017 02:16:17 +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 :subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=LtAFFjK4DCKRyeXm5 P13UwJPZLH5YazI59q6vNv6hltJx8Mdq+/a05CsJ1HarDqMOj5swdkQair89gIaC tvxmfNEetkfDBDW7sHKkpor45dz+iPUrRlv8hdl62bKeW6+h3IvizksEfnkvyNTk JQt/GP+fjFDMXNa3PLTxlLYlBo= 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 :subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=BQv2GsiaPXyPFwAf8hzTSPM 7iBk=; b=voUUiZMCo22rE/QQb8ogHzZycAYdTLjN3tWcsZ8Odia5TJbcUOPpn6b 6x6hl9SKVzk3xmRFL+XG4uFh4Zb48lAkbde1Qk5b/Y2RF+GypKskIkNhrMOYrd4C AzyNzcVk4Is5XHMyP4ev/KXMTRh+8VEilKv32J0KiBOq3FxhgkIc= Received: (qmail 65815 invoked by alias); 2 Aug 2017 16:16:04 -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 65505 invoked by uid 89); 2 Aug 2017 16:15:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= 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, 02 Aug 2017 16:15:42 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1dcwJA-00005x-9d from Tom_deVries@mentor.com ; Wed, 02 Aug 2017 09:15:40 -0700 Received: from [127.0.0.1] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Wed, 2 Aug 2017 17:15:36 +0100 Subject: [PATCH] Add missing edge probability in simd_clone_adjust From: Tom de Vries To: Jakub Jelinek CC: GCC Patches References: <61e0af9b-205c-644a-b1ee-42e035d61cc1@mentor.com> Message-ID: <4639e236-9c4a-ef5c-ade5-b955011e772b@mentor.com> Date: Wed, 2 Aug 2017 18:15:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <61e0af9b-205c-644a-b1ee-42e035d61cc1@mentor.com> X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) [ Re: [PATCH] Verify edge probability consistency in verify_flow_info ] On 08/02/2017 06:07 PM, Tom de Vries wrote: > I've written this patch to check for the missing probability more > consistently. I'm not certain if we can require that the probability > should always be set, so I'm just requiring that if it is set on one > outgoing edge, it needs to be set on all outgoing edges. > > Sofar I've build a c-only x86_64 non-bootstrap compiler and ran dg.exp. > The only problem I ran into was in attr-simd{,-2,-4}.c. I've written a > tentative patch for that, and will submit it as follow-up. Jakub, this patch adds a missing edge probability in simd_clone_adjust. OK for trunk if bootstrap and reg-test on x86_64 succeeds? Thanks, - Tom Add missing edge probability in simd_clone_adjust Currently we generate an if with probability set on only one of the two edges: [0.00%] [count: INV]: _5 = mask.3[iter.6_3]; if (_5 == 0) goto ; [INV] [count: INV] else goto ; [100.00%] [count: INV] Add the missing edge probability: goto ; [0.00%] [count: INV] 2017-08-02 Tom de Vries * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability. --- gcc/omp-simd-clone.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/omp-simd-clone.c b/gcc/omp-simd-clone.c index a1a563e..5b5d199 100644 --- a/gcc/omp-simd-clone.c +++ b/gcc/omp-simd-clone.c @@ -1240,7 +1240,8 @@ simd_clone_adjust (struct cgraph_node *node) g = gimple_build_cond (EQ_EXPR, mask, build_zero_cst (TREE_TYPE (mask)), NULL, NULL); gsi_insert_after (&gsi, g, GSI_CONTINUE_LINKING); - make_edge (loop->header, incr_bb, EDGE_TRUE_VALUE); + edge e = make_edge (loop->header, incr_bb, EDGE_TRUE_VALUE); + e->probability = profile_probability::guessed_never (); FALLTHRU_EDGE (loop->header)->flags = EDGE_FALSE_VALUE; }