From patchwork Wed Jun 4 17:16:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 356045 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 827C1140094 for ; Thu, 5 Jun 2014 03:16:46 +1000 (EST) 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:subject:in-reply-to:references:date:message-id:mime-version :content-type; q=dns; s=default; b=KVlbtteYq/rXbDmDYW63eVXeL6B39 K/RmWHjnWLUADAMWDE/agv/WlWEaXYr5+Um7Oom4ttADuDCGIXYzblB0T4keBW4A 2uxsW0/i2HoqbBMpklHnR7+f5AWadsJSX2ww93erh1so1M3MStPyQpfLYK4sofyY aTS/VhBU6sobAI= 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:subject:in-reply-to:references:date:message-id:mime-version :content-type; s=default; bh=HabrTJVAOceUddE8auPOBCrHTw0=; b=g45 DhC9y9q26jpEbaDkYn3Tia5Oiw3bxGIuefz3iTTKemk2pIRSw7IXNtOiY7d1Cw6q GSqU0jxhrVGxxHYgAHLg2GAAm/ZNyf//fHZxcgCEEMAqUCNuvpCBBx/+lCKI9+HF BnaJnfh05VfFW3LFqnSuYXYgzW8XS9dhaqcQgMMM= Received: (qmail 11653 invoked by alias); 4 Jun 2014 17:16:31 -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 11506 invoked by uid 89); 4 Jun 2014 17:16:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 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; Wed, 04 Jun 2014 17:16:27 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WsEnW-0007Ge-6h from Thomas_Schwinge@mentor.com for gcc-patches@gcc.gnu.org; Wed, 04 Jun 2014 10:16:22 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 4 Jun 2014 10:16:22 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Wed, 4 Jun 2014 18:16:19 +0100 From: Thomas Schwinge To: Subject: [gomp4] Missing -fopenacc handling (was: Dumping gimple for offload.) In-Reply-To: <20131119095829.GA19301@msticlxl7.ims.intel.com> References: <20130923132951.GA80051@msticlxl7.ims.intel.com> <20130925132924.GA122388@msticlxl7.ims.intel.com> <20130926172127.GA41768@msticlxl7.ims.intel.com> <20131003160507.GA116670@msticlxl7.ims.intel.com> <20131114095226.GA128413@msticlxl7.ims.intel.com> <20131119095829.GA19301@msticlxl7.ims.intel.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Wed, 4 Jun 2014 19:16:14 +0200 Message-ID: <878upclhnl.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Tue, 19 Nov 2013 13:58:29 +0400, Ilya Tocar wrote: > * cgraph.h (symtab_node): Add need_dump. > * cgraphunit.c (ipa_passes): Run ipa_write_summaries for omp. > (compile): Intialize streamer for omp. > * ipa-inline-analysis.c (inline_generate_summary): Add flag_openmp. > * lto-cgraph.c (lto_set_symtab_encoder_in_partition): Respect > need_dump flag. > (select_what_to_dump): New. > * lto-streamer.c (section_name_prefix): New. > (lto_get_section_name): Use section_name_prefix. > (lto_streamer_init): Add flag_openmp. > * lto-streamer.h (OMP_SECTION_NAME_PREFIX): New. > (section_name_prefix): Ditto. > (select_what_to_dump): Ditto. > * lto/lto-partition.c (add_symbol_to_partition_1): Set need_dump. > (lto_promote_cross_file_statics): Dump everyhtinh. > * passes.c (ipa_write_summaries): Add parameter, > call select_what_to_dump. > * tree-pass.h (void ipa_write_summaries): Add parameter. In several places, this needs to consider flag_openacc, too; r211236: commit 02da7b3beb9f8e9d3dbb8214c0a6ebaccf407deb Author: tschwinge AuthorDate: Wed Jun 4 17:11:30 2014 +0000 Commit: tschwinge CommitDate: Wed Jun 4 17:11:30 2014 +0000 Missing -fopenacc handling. gcc/ * cgraphunit.c (ipa_passes, compile): Handle flag_openacc next to flag_openmp. * ipa-inline-analysis.c (inline_generate_summary): Likewise. * lto-streamer.c (lto_streamer_init, gate_lto_out): Likewise. * passes.c (ipa_write_summaries): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@211236 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog.gomp | 8 ++++++++ gcc/cgraphunit.c | 4 ++-- gcc/ipa-inline-analysis.c | 2 +- gcc/lto-streamer.c | 2 +- gcc/passes.c | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) Grüße, Thomas diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp index b543bbc..011fe77 100644 --- gcc/ChangeLog.gomp +++ gcc/ChangeLog.gomp @@ -1,3 +1,11 @@ +2014-06-04 Thomas Schwinge + + * cgraphunit.c (ipa_passes, compile): Handle flag_openacc next to + flag_openmp. + * ipa-inline-analysis.c (inline_generate_summary): Likewise. + * lto-streamer.c (lto_streamer_init, gate_lto_out): Likewise. + * passes.c (ipa_write_summaries): Likewise. + 2014-05-12 Bernd Schmidt * lto-wrapper.c (ompbegin): New static variable. diff --git gcc/cgraphunit.c gcc/cgraphunit.c index c524120..fb34c2d 100644 --- gcc/cgraphunit.c +++ gcc/cgraphunit.c @@ -2086,7 +2086,7 @@ ipa_passes (void) if (!in_lto_p) { - if (flag_openmp) + if (flag_openacc || flag_openmp) { section_name_prefix = OMP_SECTION_NAME_PREFIX; ipa_write_summaries (true); @@ -2187,7 +2187,7 @@ compile (void) cgraph_state = CGRAPH_STATE_IPA; /* If LTO is enabled, initialize the streamer hooks needed by GIMPLE. */ - if (flag_lto || flag_openmp) + if (flag_lto || flag_openacc || flag_openmp) lto_streamer_hooks_init (); /* Don't run the IPA passes if there was any error or sorry messages. */ diff --git gcc/ipa-inline-analysis.c gcc/ipa-inline-analysis.c index 176954a..340f26a 100644 --- gcc/ipa-inline-analysis.c +++ gcc/ipa-inline-analysis.c @@ -4010,7 +4010,7 @@ inline_generate_summary (void) /* When not optimizing, do not bother to analyze. Inlining is still done because edge redirection needs to happen there. */ - if (!optimize && !flag_lto && !flag_wpa && !flag_openmp) + if (!optimize && !flag_lto && !flag_wpa && !flag_openacc && !flag_openmp) return; function_insertion_hook_holder = diff --git gcc/lto-streamer.c gcc/lto-streamer.c index 6153b0a..e9fc6e1 100644 --- gcc/lto-streamer.c +++ gcc/lto-streamer.c @@ -316,7 +316,7 @@ lto_streamer_init (void) bool gate_lto_out (void) { - return ((flag_generate_lto || in_lto_p || flag_openmp) + return ((flag_generate_lto || in_lto_p || flag_openacc || flag_openmp) /* Don't bother doing anything if the program has errors. */ && !seen_error ()); } diff --git gcc/passes.c gcc/passes.c index 620376e..e4c2336 100644 --- gcc/passes.c +++ gcc/passes.c @@ -2335,7 +2335,7 @@ ipa_write_summaries (bool is_omp) struct cgraph_node *node; struct cgraph_node **order; - if (!(flag_generate_lto || flag_openmp) || seen_error () ) + if (!(flag_generate_lto || flag_openacc || flag_openmp) || seen_error () ) return; select_what_to_dump (is_omp);