From patchwork Fri Feb 21 19:29:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 322999 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 056182C0320 for ; Sat, 22 Feb 2014 06:29:47 +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:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=Mh8I9oT4QtkawczT CuAeLYf266mxLJbMRoEj5crEjl77D7nVhRor8WSXPbppOwF29NYce546kT/V+au8 m8s4ubJ2/pSVFr3S1rdDhNf9bhhcuXehRZC/f3mNcwsLnhylXRC4jtNimvbijK/z y1b7Z8a/MlUEvMjDTokz8+OF9Vc= 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:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=7tA5hs579tsZXPthUdjitg 1wHS8=; b=Zi6dLC7//lFqmFMI/z0kCkHAo2LRr4f+EOB5TxltlrCBeBfGkp+CKw QxaZ9yb7+/Nf883n4rsAhyC7KypaQqA9ZR5itbKhzWxAP2R3w3TZxJZGuH47cUfG Aj90QxNsAw4xsKSaHG3+9h5l5cNB+Ten0dlPzAmu+xXwIuBMDfMOg= Received: (qmail 11412 invoked by alias); 21 Feb 2014 19:29:41 -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 11401 invoked by uid 89); 21 Feb 2014 19:29:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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; Fri, 21 Feb 2014 19:29:38 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WGvmw-0003N4-3X from Thomas_Schwinge@mentor.com ; Fri, 21 Feb 2014 11:29:34 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 21 Feb 2014 11:29:34 -0800 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; Fri, 21 Feb 2014 19:29:31 +0000 From: Thomas Schwinge To: Ilmir Usmanov CC: Evgeny Gavrin , GarbuzovViacheslav , Dmitri Botcharnikov , , Subject: [GOMP4] gimple_code_is_oacc -> is_gimple_omp_oacc_specifically (was: [PATCH 4/6] [GOMP4] OpenACC 1.0+ support in fortran front-end) In-Reply-To: <8761olk2yk.fsf@schwinge.name> References: <52E158EF.9050009@samsung.com> <877g9pqmt2.fsf@schwinge.name> <52E65B24.9070403@samsung.com> <87iot5pgqb.fsf@schwinge.name> <52EB8437.3060602@samsung.com> <52EB84C3.4010407@samsung.com> <52EB8537.4090708@samsung.com> <52EB8596.2010808@samsung.com> <52EB85F7.5020807@samsung.com> <8761olk2yk.fsf@schwinge.name> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Fri, 21 Feb 2014 20:29:25 +0100 Message-ID: <87eh2ws1re.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Tue, 11 Feb 2014 17:51:15 +0100, I wrote: > On Fri, 31 Jan 2014 15:16:07 +0400, Ilmir Usmanov wrote: > > --- a/gcc/omp-low.c > > +++ b/gcc/omp-low.c > > @@ -1491,6 +1491,18 @@ fixup_child_record_type (omp_context *ctx) > > TREE_TYPE (ctx->receiver_decl) = build_pointer_type (type); > > } > > > > +static bool > > +gimple_code_is_oacc (const_gimple g) > > +{ > > + switch (gimple_code (g)) > > + { > > + case GIMPLE_OACC_PARALLEL: > > + return true; > > + default: > > + return false; > > + } > > +} > > + > > Eventually, this will probably end up next to CASE_GIMPLE_OMP/is_gimple_omp > in gimple.h (or the latter be reworked to be able to ask for is_omp vs. > is_oacc vs. is_omp_or_oacc), but it's fine to do that once we actually > need it in files other than just omp-low.c, and once we support more > GIMPLE_OACC_* codes. Ah, well, I'm now in the situation that I need to do such a check in another file, so I have applied the following to gomp-4_0-branch in r208013. I have also renamed the function to is_gimple_omp_oacc_specifically, building on the existing is_gimple_omp name. (Don't worry about the unwieldy name, as all this is to disappear as the development progresses.) commit 25aab0dd39a57661e9d7f3a5f405f4647977b9de Author: tschwinge Date: Fri Feb 21 19:26:01 2014 +0000 gimple_code_is_oacc -> is_gimple_omp_oacc_specifically. gcc/ * omp-low.c (gimple_code_is_oacc): Move to... * gimple.h (is_gimple_omp_oacc_specifically): ... here. Update users, and also use it in more places where currently we've only been checking for GIMPLE_OACC_PARALLEL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@208013 138bc75d-0d04-0410-961f-82ee72b054a4 Grüße, Thomas diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp index 14d8805..1ce952d 100644 --- gcc/ChangeLog.gomp +++ gcc/ChangeLog.gomp @@ -1,3 +1,10 @@ +2014-02-21 Thomas Schwinge + + * omp-low.c (gimple_code_is_oacc): Move to... + * gimple.h (is_gimple_omp_oacc_specifically): ... here. Update + users, and also use it in more places where currently we've only + been checking for GIMPLE_OACC_PARALLEL. + 2014-02-18 Thomas Schwinge * omp-low.c (diagnose_sb_0, diagnose_sb_1, diagnose_sb_2): Handle diff --git gcc/gimple.h gcc/gimple.h index 5b5a0ee..0d250ef 100644 --- gcc/gimple.h +++ gcc/gimple.h @@ -5670,6 +5670,25 @@ is_gimple_omp (const_gimple stmt) } } +/* Return true if STMT is any of the OpenACC types specifically. + + TODO: This function should go away eventually, once all its callers have + either been fixed, changed into more specific checks, or verified to not + need any special handling for OpenACC. */ + +static inline bool +is_gimple_omp_oacc_specifically (const_gimple stmt) +{ + gcc_assert (is_gimple_omp (stmt)); + switch (gimple_code (stmt)) + { + case GIMPLE_OACC_PARALLEL: + return true; + default: + return false; + } +} + /* Returns TRUE if statement G is a GIMPLE_NOP. */ diff --git gcc/omp-low.c gcc/omp-low.c index 110ea63..b975dad 100644 --- gcc/omp-low.c +++ gcc/omp-low.c @@ -863,7 +863,7 @@ use_pointer_for_field (tree decl, omp_context *shared_ctx) when we know the value is not accessible from an outer scope. */ if (shared_ctx) { - gcc_assert (gimple_code (shared_ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (shared_ctx->stmt)); /* ??? Trivially accessible from anywhere. But why would we even be passing an address in this case? Should we simply assert @@ -1006,7 +1006,7 @@ build_receiver_ref (tree var, bool by_ref, omp_context *ctx) static tree build_outer_var_ref (tree var, omp_context *ctx) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); tree x; @@ -1072,7 +1072,7 @@ install_var_field (tree var, bool by_ref, int mask, omp_context *ctx) gcc_assert ((mask & 2) == 0 || !ctx->sfield_map || !splay_tree_lookup (ctx->sfield_map, (splay_tree_key) var)); gcc_assert ((mask & 3) == 3 - || gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + || !is_gimple_omp_oacc_specifically (ctx->stmt)); type = TREE_TYPE (var); if (mask & 4) @@ -1491,18 +1491,6 @@ fixup_child_record_type (omp_context *ctx) TREE_TYPE (ctx->receiver_decl) = build_pointer_type (type); } -static bool -gimple_code_is_oacc (const_gimple g) -{ - switch (gimple_code (g)) - { - case GIMPLE_OACC_PARALLEL: - return true; - default: - return false; - } -} - /* Instantiate decls as necessary in CTX to satisfy the data sharing specified by CLAUSES. */ @@ -1519,7 +1507,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) switch (OMP_CLAUSE_CODE (c)) { case OMP_CLAUSE_PRIVATE: - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); decl = OMP_CLAUSE_DECL (c); if (OMP_CLAUSE_PRIVATE_OUTER_REF (c)) goto do_private; @@ -1528,7 +1516,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) break; case OMP_CLAUSE_SHARED: - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); /* Ignore shared directives in teams construct. */ if (gimple_code (ctx->stmt) == GIMPLE_OMP_TEAMS) break; @@ -1555,7 +1543,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) goto do_private; case OMP_CLAUSE_LASTPRIVATE: - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); /* Let the corresponding firstprivate clause create the variable. */ if (OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE (c)) @@ -1564,13 +1552,13 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) case OMP_CLAUSE_FIRSTPRIVATE: case OMP_CLAUSE_REDUCTION: - if (gimple_code (ctx->stmt) == GIMPLE_OACC_PARALLEL) + if (is_gimple_omp_oacc_specifically (ctx->stmt)) { sorry ("clause not supported yet"); break; } case OMP_CLAUSE_LINEAR: - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); decl = OMP_CLAUSE_DECL (c); do_private: if (is_variable_sized (decl)) @@ -1599,7 +1587,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) break; case OMP_CLAUSE__LOOPTEMP_: - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); gcc_assert (is_parallel_ctx (ctx)); decl = OMP_CLAUSE_DECL (c); install_var_field (decl, false, 3, ctx); @@ -1608,19 +1596,19 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) case OMP_CLAUSE_COPYPRIVATE: case OMP_CLAUSE_COPYIN: - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); decl = OMP_CLAUSE_DECL (c); by_ref = use_pointer_for_field (decl, NULL); install_var_field (decl, by_ref, 3, ctx); break; case OMP_CLAUSE_DEFAULT: - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); ctx->default_kind = OMP_CLAUSE_DEFAULT_KIND (c); break; case OMP_CLAUSE_IF: - if (gimple_code (ctx->stmt) == GIMPLE_OACC_PARALLEL) + if (is_gimple_omp_oacc_specifically (ctx->stmt)) { sorry ("clause not supported yet"); break; @@ -1633,14 +1621,14 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) case OMP_CLAUSE_SCHEDULE: case OMP_CLAUSE_DIST_SCHEDULE: case OMP_CLAUSE_DEPEND: - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); if (ctx->outer) scan_omp_op (&OMP_CLAUSE_OPERAND (c, 0), ctx->outer); break; case OMP_CLAUSE_TO: case OMP_CLAUSE_FROM: - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); case OMP_CLAUSE_MAP: if (ctx->outer) scan_omp_op (&OMP_CLAUSE_SIZE (c), ctx->outer); @@ -1654,7 +1642,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) && lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl))) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); break; } if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_MAP @@ -1732,11 +1720,11 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) case OMP_CLAUSE_MERGEABLE: case OMP_CLAUSE_PROC_BIND: case OMP_CLAUSE_SAFELEN: - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); break; case OMP_CLAUSE_ALIGNED: - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); decl = OMP_CLAUSE_DECL (c); if (is_global_var (decl) && TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE) @@ -1770,7 +1758,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) switch (OMP_CLAUSE_CODE (c)) { case OMP_CLAUSE_LASTPRIVATE: - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); /* Let the corresponding firstprivate clause create the variable. */ if (OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ (c)) @@ -1782,13 +1770,13 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) case OMP_CLAUSE_PRIVATE: case OMP_CLAUSE_FIRSTPRIVATE: case OMP_CLAUSE_REDUCTION: - if (gimple_code (ctx->stmt) == GIMPLE_OACC_PARALLEL) + if (is_gimple_omp_oacc_specifically (ctx->stmt)) { sorry ("clause not supported yet"); break; } case OMP_CLAUSE_LINEAR: - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); decl = OMP_CLAUSE_DECL (c); if (is_variable_sized (decl)) install_var_local (decl, ctx); @@ -1801,7 +1789,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) break; case OMP_CLAUSE_SHARED: - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); /* Ignore shared directives in teams construct. */ if (gimple_code (ctx->stmt) == GIMPLE_OMP_TEAMS) break; @@ -1820,7 +1808,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) && lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl))) { - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); break; } if (DECL_P (decl)) @@ -1849,7 +1837,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) break; case OMP_CLAUSE_IF: - if (gimple_code (ctx->stmt) == GIMPLE_OACC_PARALLEL) + if (is_gimple_omp_oacc_specifically (ctx->stmt)) { sorry ("clause not supported yet"); break; @@ -1876,7 +1864,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) case OMP_CLAUSE__LOOPTEMP_: case OMP_CLAUSE_TO: case OMP_CLAUSE_FROM: - gcc_assert (!gimple_code_is_oacc (ctx->stmt)); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); break; case OMP_CLAUSE_HOST: @@ -1903,7 +1891,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) if (scan_array_reductions) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); for (c = clauses; c; c = OMP_CLAUSE_CHAIN (c)) if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_REDUCTION && OMP_CLAUSE_REDUCTION_PLACEHOLDER (c)) @@ -1944,7 +1932,7 @@ create_omp_child_function (omp_context *ctx, bool task_copy) decl = build_decl (gimple_location (ctx->stmt), FUNCTION_DECL, name, type); - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt) || !task_copy); if (!task_copy) ctx->cb.dst_fn = decl; @@ -1977,7 +1965,7 @@ create_omp_child_function (omp_context *ctx, bool task_copy) break; } } - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt) || !target_p); if (target_p) DECL_ATTRIBUTES (decl) @@ -2396,19 +2384,17 @@ check_omp_nesting_restrictions (gimple stmt, omp_context *ctx) /* No nesting of STMT (which is an OpenACC or OpenMP one, or a GOMP builtin) inside any OpenACC CTX. */ for (ctx_ = ctx; ctx_ != NULL; ctx_ = ctx_->outer) - switch (gimple_code (ctx_->stmt)) + if (is_gimple_omp (ctx_->stmt) + && is_gimple_omp_oacc_specifically (ctx_->stmt)) { - case GIMPLE_OACC_PARALLEL: error_at (gimple_location (stmt), "may not be nested"); return false; - default: - break; } /* No nesting of OpenACC STMT inside any OpenACC or OpenMP CTX. */ - switch (gimple_code (stmt)) + if (is_gimple_omp (stmt) + && is_gimple_omp_oacc_specifically (stmt)) { - case GIMPLE_OACC_PARALLEL: for (ctx_ = ctx; ctx_ != NULL; ctx_ = ctx_->outer) if (is_gimple_omp (ctx_->stmt)) { @@ -2416,9 +2402,6 @@ check_omp_nesting_restrictions (gimple stmt, omp_context *ctx) "may not be nested"); return false; } - break; - default: - break; } if (ctx != NULL) @@ -3138,7 +3121,7 @@ static bool lower_rec_simd_input_clauses (tree new_var, omp_context *ctx, int &max_vf, tree &idx, tree &lane, tree &ivar, tree &lvar) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); if (max_vf == 0) { @@ -3189,7 +3172,7 @@ static void lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist, omp_context *ctx, struct omp_for_data *fd) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); tree c, dtor, copyin_seq, x, ptr; bool copyin_by_ref = false; @@ -3892,7 +3875,7 @@ static void lower_lastprivate_clauses (tree clauses, tree predicate, gimple_seq *stmt_list, omp_context *ctx) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); tree x, c, label = NULL, orig_clauses = clauses; bool par_clauses = false; @@ -4029,7 +4012,7 @@ lower_lastprivate_clauses (tree clauses, tree predicate, gimple_seq *stmt_list, static void lower_reduction_clauses (tree clauses, gimple_seq *stmt_seqp, omp_context *ctx) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); gimple_seq sub_seq = NULL; gimple stmt; @@ -4132,7 +4115,7 @@ static void lower_copyprivate_clauses (tree clauses, gimple_seq *slist, gimple_seq *rlist, omp_context *ctx) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); tree c; @@ -4184,7 +4167,7 @@ static void lower_send_clauses (tree clauses, gimple_seq *ilist, gimple_seq *olist, omp_context *ctx) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); tree c; @@ -4277,7 +4260,7 @@ lower_send_clauses (tree clauses, gimple_seq *ilist, gimple_seq *olist, static void lower_send_shared_vars (gimple_seq *ilist, gimple_seq *olist, omp_context *ctx) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); tree var, ovar, nvar, f, x, record_type; @@ -9091,7 +9074,7 @@ lower_oacc_parallel (gimple_stmt_iterator *gsi_p, omp_context *ctx) static void maybe_add_implicit_barrier_cancel (omp_context *ctx, gimple_seq *body) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); gimple omp_return = gimple_seq_last_stmt (*body); gcc_assert (gimple_code (omp_return) == GIMPLE_OMP_RETURN); @@ -9858,7 +9841,7 @@ task_copyfn_remap_type (struct omp_taskcopy_context *tcctx, tree orig_type) static void create_task_copyfn (gimple task_stmt, omp_context *ctx) { - gcc_assert (gimple_code (ctx->stmt) != GIMPLE_OACC_PARALLEL); + gcc_assert (!is_gimple_omp_oacc_specifically (ctx->stmt)); struct function *child_cfun; tree child_fn, t, c, src, dst, f, sf, arg, sarg, decl;