From patchwork Sun Aug 6 10:02:04 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: 798355 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-459892-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="tQUozHxR"; 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 3xQGRs0bQYz9t2K for ; Sun, 6 Aug 2017 20:02:31 +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:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=EBQlQCR5RlxcIOfOfSYroCCeIDMH0jd98qCLvbfAhACMsmYnXu JcEz+bhDFvRhFqPxvwfqUDzVPLuWEmLepc1Zd37JfZ3QjwiQGEXzN1tTi9sGPEFC LPanNdB3XMvq8Z3qM4409ZqqKHPnrJBPZin9X2GsUMY+k2GzZDh33T+9o= 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:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=l4A/i6GeY4jNHngSe+x1r2jTXH0=; b=tQUozHxR0utSWmyc6mxD DJSYMMD9h5HPnHWSYSSoBm/DUyZdX1W3MsqFfdiM1jn/81fD/EvWUA3/OPy6ANa4 1Cnwh1o9B3nEUV9f7Ls3rnvvNrZPbBF5Bws0zAMMTN9fVkotIgtznO0zJ42vPegw KTlHgJXH5bQt2zeUY/5XYLA= Received: (qmail 62556 invoked by alias); 6 Aug 2017 10:02:21 -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 59774 invoked by uid 89); 6 Aug 2017 10:02:15 -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=prev 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; Sun, 06 Aug 2017 10:02:14 +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 1deINv-00070X-U5 from Tom_deVries@mentor.com for gcc-patches@gcc.gnu.org; Sun, 06 Aug 2017 03:02:11 -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; Sun, 6 Aug 2017 11:02:08 +0100 To: GCC Patches CC: Thomas Schwinge From: Tom de Vries Subject: [openacc, committed] Add missing edge probability in expand_oacc_for Message-ID: <033307a1-2994-001f-46bf-dd08ec49dc52@mentor.com> Date: Sun, 6 Aug 2017 12:02:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) Hi, this patch adds missing edge probability in expand_oacc_for for the chunk loop. Committed. Thanks, - Tom Add missing edge probability in expand_oacc_for ;; basic block 10, loop depth 1, freq 0, maybe hot ;; prev block 9, next block 19, flags: (NEW, REACHABLE) ;; pred: 18 (FALSE_VALUE) ;; 9 (FALSE_VALUE) GIMPLE_NOP .chunk_no.7D.1948 = .chunk_no.7D.1948 + 1; if (.chunk_no.7D.1948 < .chunk_max.6D.1949) - goto ; [INV] [count: INV] + goto ; [80.01%] [count: INV] else - goto ; [100.00%] [count: INV] + goto ; [19.99%] [count: INV] 2017-08-06 Tom de Vries * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk loop. --- gcc/omp-expand.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index 970e04f..5772bd9 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -5718,7 +5718,9 @@ expand_oacc_for (struct omp_region *region, struct omp_for_data *fd) /* Fixup edges from bottom_bb. */ split->flags ^= EDGE_FALLTHRU | EDGE_FALSE_VALUE; - make_edge (bottom_bb, head_bb, EDGE_TRUE_VALUE); + split->probability = profile_probability::unlikely ().guessed (); + edge latch_edge = make_edge (bottom_bb, head_bb, EDGE_TRUE_VALUE); + latch_edge->probability = profile_probability::likely ().guessed (); } }