From patchwork Thu Mar 19 11:05:47 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: 451950 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 19F72140083 for ; Thu, 19 Mar 2015 22:06:03 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=FhdsWHqs; 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:references :in-reply-to:content-type; q=dns; s=default; b=fDzsL5cS1zlZayZEY CLcITDIUDKJZXZzz63j4DsDscDblI4oCv1e4Y1HCHe9VKjP91tCCQsr8QirvK33F AdORXBdG2Fvs0BnaCzJibqc1HYlcQMtV47KPy7yCuwAk0Me3osL8lQJAy5KMmud2 +liGFgqSPXlkKPrCcJQ46DHOkY= 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:references :in-reply-to:content-type; s=default; bh=ggQLDgtkV+xQKWuaMdF5VA+ xsM4=; b=FhdsWHqsswoZCkybCpfVgYGqFIimb+cKWUWYjQFk4Eax7IslfB+/mZP spwDkV3wA/7YUhpLy0+TV+5CytHOVfYWrvGM/6jELBiFPjl7m/haBksxIFVL0UE6 W17BZG+ZbwT0SX966zZHOLQ8TZgr80RVqRfrDR3ysvFGNXvU+oIM= Received: (qmail 81542 invoked by alias); 19 Mar 2015 11:05:57 -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 81500 invoked by uid 89); 19 Mar 2015 11:05:56 -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; Thu, 19 Mar 2015 11:05:55 +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 1YYYGu-0004UZ-CH from Tom_deVries@mentor.com ; Thu, 19 Mar 2015 04:05:52 -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; Thu, 19 Mar 2015 11:05:50 +0000 Message-ID: <550AAD8B.9080900@mentor.com> Date: Thu, 19 Mar 2015 12:05:47 +0100 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: GCC Patches , Richard Biener Subject: Re: [PATCH][3/3][PR65460] Mark offloaded functions as parallelized References: <5509B43E.802@mentor.com> In-Reply-To: <5509B43E.802@mentor.com> On 18-03-15 18:22, Tom de Vries wrote: > Hi, > > this patch fixes PR65460. > > The patch marks offloaded functions as parallelized, which means the parloops > pass no longer attempts to modify that function. Updated patch to postpone mark_parallelized_function until the corresponding cgraph_node is available, to ensure it works with the updated mark_parallelized_function from patch 2/3. Bootstrapped and reg-tested on x86_64. OK for stage4 trunk? Thanks, - Tom Mark offloaded functions as parallelized 2015-03-18 Tom de Vries PR tree-optimization/65460 * omp-low.c (expand_omp_target): Call mark_parallelized_function for child_fn. --- gcc/omp-low.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/omp-low.c b/gcc/omp-low.c index a49a6eb..7195aa3 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -8938,6 +8938,7 @@ expand_omp_target (struct omp_region *region) /* Inform the callgraph about the new function. */ DECL_STRUCT_FUNCTION (child_fn)->curr_properties = cfun->curr_properties; cgraph_node::add_new_function (child_fn, true); + mark_parallelized_function (child_fn); #ifdef ENABLE_OFFLOADING /* Add the new function to the offload table. */ -- 1.9.1