From patchwork Tue Jan 14 15:10:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 310762 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 2B8B52C008F for ; Wed, 15 Jan 2014 02:11:31 +1100 (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:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=OfbgU3W4/m0J3ske UNmO3bXaTHQNJo0jOm/P6j6hAeqPY1wcDPmLRXNW0w5KTBhv9t5AEQqODyGaBUqh j8/BSfXfVEApHKSY8Un/ySTX8BC9MkcIKpnb5P+osZwGzlhT2kWhv1Ot8J1AeCe5 MeN13zxwytropGwa44U/am8fWcA= 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:in-reply-to:references :mime-version:content-type; s=default; bh=0UeMC1VoxkWoRWWdZTF0Y/ qzBKo=; b=ZjozyAIjvWfTJ3/PRK9WC8amFNZFCuhDaNAD776WOZKERBujlERcJh Y9R5+QRFE9pg1VOh3+No+0BX8r94FdTh3YcqBG5yK5VYIqsybryKlSR12DC2tDVO gw95wwvEmKEHYi4o9N0BYIRZ3FYdi2W6lJNKRakz4qnA4f4cWmpqc= Received: (qmail 12639 invoked by alias); 14 Jan 2014 15:10: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 12565 invoked by uid 89); 14 Jan 2014 15:10:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 14 Jan 2014 15:10:37 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W35dJ-0006Qz-KJ for gcc-patches@gcc.gnu.org; Tue, 14 Jan 2014 10:10:35 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:62400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W35dJ-0006ND-E3 for gcc-patches@gcc.gnu.org; Tue, 14 Jan 2014 10:10:25 -0500 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1W35dB-0002Fa-Go from Thomas_Schwinge@mentor.com ; Tue, 14 Jan 2014 07:10:17 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 14 Jan 2014 07:10:17 -0800 Received: from build5-lucid-cs (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Tue, 14 Jan 2014 07:10:16 -0800 Received: by build5-lucid-cs (Postfix, from userid 49978) id B7A3B321B20; Tue, 14 Jan 2014 07:10:16 -0800 (PST) From: To: , CC: Thomas Schwinge Subject: [gomp4 1/6] During gimplification, allow additional flags next to ORT_TARGET. Date: Tue, 14 Jan 2014 16:10:03 +0100 Message-ID: <1389712208-416-1-git-send-email-thomas@codesourcery.com> In-Reply-To: <87ppnuvbv6.fsf@schwinge.name> References: <87ppnuvbv6.fsf@schwinge.name> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 From: Thomas Schwinge gcc/ * gimplify.c (gimplify_call_expr, gimplify_modify_expr) (omp_firstprivatize_variable, omp_notice_threadprivate_variable) (omp_notice_variable, gimplify_adjust_omp_clauses) (gimplify_omp_workshare): Treat ORT_TARGET as a flag, not as a value. --- gcc/gimplify.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git gcc/gimplify.c gcc/gimplify.c index e45bed2..90507c2 100644 --- gcc/gimplify.c +++ gcc/gimplify.c @@ -2363,7 +2363,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value) during omplower pass instead. */ struct gimplify_omp_ctx *ctx; for (ctx = gimplify_omp_ctxp; ctx; ctx = ctx->outer_context) - if (ctx->region_type == ORT_TARGET) + if (ctx->region_type & ORT_TARGET) break; if (ctx == NULL) fold_stmt (&gsi); @@ -4534,7 +4534,7 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, during omplower pass instead. */ struct gimplify_omp_ctx *ctx; for (ctx = gimplify_omp_ctxp; ctx; ctx = ctx->outer_context) - if (ctx->region_type == ORT_TARGET) + if (ctx->region_type & ORT_TARGET) break; if (ctx == NULL) fold_stmt (&gsi); @@ -5317,7 +5317,7 @@ omp_firstprivatize_variable (struct gimplify_omp_ctx *ctx, tree decl) else return; } - else if (ctx->region_type == ORT_TARGET) + else if (ctx->region_type & ORT_TARGET) omp_add_variable (ctx, decl, GOVD_MAP | GOVD_MAP_TO_ONLY); else if (ctx->region_type != ORT_WORKSHARE && ctx->region_type != ORT_SIMD @@ -5499,7 +5499,7 @@ omp_notice_threadprivate_variable (struct gimplify_omp_ctx *ctx, tree decl, struct gimplify_omp_ctx *octx; for (octx = ctx; octx; octx = octx->outer_context) - if (octx->region_type == ORT_TARGET) + if (octx->region_type & ORT_TARGET) { n = splay_tree_lookup (octx->variables, (splay_tree_key)decl); if (n == NULL) @@ -5560,7 +5560,7 @@ omp_notice_variable (struct gimplify_omp_ctx *ctx, tree decl, bool in_code) } n = splay_tree_lookup (ctx->variables, (splay_tree_key)decl); - if (ctx->region_type == ORT_TARGET) + if (ctx->region_type & ORT_TARGET) { if (n == NULL) { @@ -6285,7 +6285,7 @@ gimplify_adjust_omp_clauses (tree *list_p) if (!DECL_P (decl)) break; n = splay_tree_lookup (ctx->variables, (splay_tree_key) decl); - if (ctx->region_type == ORT_TARGET && !(n->value & GOVD_SEEN)) + if ((ctx->region_type & ORT_TARGET) && !(n->value & GOVD_SEEN)) remove = true; else if (DECL_SIZE (decl) && TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST @@ -6857,7 +6857,7 @@ gimplify_omp_workshare (tree *expr_p, gimple_seq *pre_p) gcc_unreachable (); } gimplify_scan_omp_clauses (&OMP_CLAUSES (expr), pre_p, ort); - if (ort == ORT_TARGET || ort == ORT_TARGET_DATA) + if ((ort & ORT_TARGET) || ort == ORT_TARGET_DATA) { push_gimplify_context (); gimple g = gimplify_and_return_first (OMP_BODY (expr), &body);