From patchwork Fri Feb 1 10:15:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 1034690 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-495071-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="DYpsTDZF"; 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 43rY0644Btz9sDX for ; Fri, 1 Feb 2019 21:15:47 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=sdTJyCbs2/mOIMYbceghEaXkFiihRu5ZZz3Q/4bR4g0kgALV43 8iQTmjNzoQUg8xykw0/fTZ8Wa3/zBC3wPRXTBET5vDqdwveUaF6Cd0d7mJJjHWBe HaFtezAHMoeUpGn9TrXQDck3MLITRPVcvt+nFnI4cp5zyAv2o7Vze6/f4= 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:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=q+lFT73kAmsRbjO3VqgiEyWckLk=; b=DYpsTDZFmhL5CUa/lqZU IwogGxxPfxQFVr0c+HKXb+JuXukVlnryNDgOvWGyWikaaV119q0YbtJAL4YVPszG EbdSslDuFetdOYTn71AAe1SagDYiKqi1NSINg321GNtNaSjb2N2c8mMUoi5KAlfy IxRzHfgP9FMOX9DZbQe0sDQ= Received: (qmail 103216 invoked by alias); 1 Feb 2019 10:15:40 -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 103188 invoked by uid 89); 1 Feb 2019 10:15:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=HSA, sole X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Feb 2019 10:15:38 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6849FAD27 for ; Fri, 1 Feb 2019 10:15:36 +0000 (UTC) From: Martin Jambor To: GCC Patches Cc: Subject: [HSA] Add two missing dump_enabled_p calls User-Agent: Notmuch/0.26 (https://notmuchmail.org) Emacs/26.1 (x86_64-suse-linux-gnu) Date: Fri, 01 Feb 2019 11:15:36 +0100 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi, a few HSA gridification testcase have been failing (as it turns out for quite many weeks, shame on me for taking so long to fix) because two dump_printf_loc producing optimization hints were not properly guarded by dump_enabled_p. The fix is straightforward, I have tested it on an HSA-enabled APU and bootstrapped and tested with enabled HSA offloading. Since this part of omp processing is specific to HSA, I'll go forward and commit it today as the HSA maintainer. Martin 2019-01-30 Martin Jambor * omp-grid.c (grid_target_follows_gridifiable_pattern): Guard two missed optimization dump with dump_enabled_p. --- gcc/omp-grid.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gcc/omp-grid.c b/gcc/omp-grid.c index 12029b72445..79e9405ce3f 100644 --- a/gcc/omp-grid.c +++ b/gcc/omp-grid.c @@ -745,9 +745,10 @@ grid_target_follows_gridifiable_pattern (gomp_target *target, grid_prop *grid) tree group_size = NULL; if (!teams) { - dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc, - GRID_MISSED_MSG_PREFIX "it does not have a sole teams " - "construct in it.\n"); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc, + GRID_MISSED_MSG_PREFIX "it does not have a sole " + "teams construct in it.\n"); return false; } @@ -788,9 +789,10 @@ grid_target_follows_gridifiable_pattern (gomp_target *target, grid_prop *grid) gomp_for *dist = dyn_cast (stmt); if (!dist) { - dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc, - GRID_MISSED_MSG_PREFIX "the teams construct does not " - "have a single distribute construct in it.\n"); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc, + GRID_MISSED_MSG_PREFIX "the teams construct does not " + "have a single distribute construct in it.\n"); return false; }