From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104252 invoked by alias); 8 Apr 2016 06:32:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 104227 invoked by uid 89); 8 Apr 2016 06:31:59 -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,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=spc, Avoiding, 3136, 2016-04-08 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 08 Apr 2016 06:31:48 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33180) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1aoPxK-0000ld-Gi for gcc-patches@gnu.org; Fri, 08 Apr 2016 02:31:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoPxG-0007hS-U7 for gcc-patches@gnu.org; Fri, 08 Apr 2016 02:31:46 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:47744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoPxG-0007hM-K7 for gcc-patches@gnu.org; Fri, 08 Apr 2016 02:31:42 -0400 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1aoPxE-0004BC-6C from Thomas_Schwinge@mentor.com ; Thu, 07 Apr 2016 23:31:40 -0700 Received: from tftp-cs (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.224.2; Thu, 7 Apr 2016 23:31:39 -0700 Received: by tftp-cs (Postfix, from userid 49978) id 455FBC21BE; Thu, 7 Apr 2016 23:31:39 -0700 (PDT) From: Thomas Schwinge To: CC: Bernd Schmidt , Jakub Jelinek , Nathan Sidwell Subject: Re: [gomp4] Avoiding predication for certain blocks In-Reply-To: <55689279.2020809@codesourcery.com> References: <55689279.2020809@codesourcery.com> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Fri, 08 Apr 2016 06:32:00 -0000 Message-ID: <87k2k87gsd.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 X-SW-Source: 2016-04/txt/msg00372.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 6908 Hi! I cleaned up this remnant from an earlier OpenACC execution model implementation: On Fri, 29 May 2015 18:23:21 +0200, Bernd Schmidt = wrote: > When predicating the code for OpenACC, we should avoid the entry block=20 > in an offloaded region, which contains setup code that should be run in=20 > every thread. The following patch adds a new marker statement that is=20 > used to identify this block. Currently, predication doesn't happen=20 > anyway due to an oversight in the algorithm, but I'll be fixing that in=20 > a followup patch. >=20 > Committed on gomp-4_0-branch. > --- gcc/gimple.def (revision 223867) > +++ gcc/gimple.def (working copy) > +/* GIMPLE_OMP_ENTRY_END marks the end of the unpredicated entry block > + into an offloaded region. */ > +DEFGSCODE(GIMPLE_OMP_ENTRY_END, "gimple_omp_entry_end", GSS_BASE) Committed to gomp-4_0-branch in r234822: commit af76e7c5279c0eb87b6b91b42d2568679ad6bbb9 Author: tschwinge Date: Fri Apr 8 06:30:08 2016 +0000 Remove GIMPLE_OMP_ENTRY_END =20=20=20=20 gcc/ * gimple.def: Remove GIMPLE_OMP_ENTRY_END. Remove all uses. =20=20=20=20 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@2348= 22 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog.gomp | 4 ++++ gcc/gimple-low.c | 1 - gcc/gimple-pretty-print.c | 4 ---- gcc/gimple.c | 9 --------- gcc/gimple.def | 4 ---- gcc/gimple.h | 2 -- gcc/omp-low.c | 15 +-------------- 7 files changed, 5 insertions(+), 34 deletions(-) diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp index 3c9eed6..bffc261 100644 --- gcc/ChangeLog.gomp +++ gcc/ChangeLog.gomp @@ -1,3 +1,7 @@ +2016-04-08 Thomas Schwinge + + * gimple.def: Remove GIMPLE_OMP_ENTRY_END. Remove all uses. + 2016-03-11 Cesar Philippidis =20 * config/nvptx/nvptx.c (nvptx_gen_shuffle): Add support for QImode diff --git gcc/gimple-low.c gcc/gimple-low.c index 13c0165..eb90d48 100644 --- gcc/gimple-low.c +++ gcc/gimple-low.c @@ -313,7 +313,6 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_dat= a *data) case GIMPLE_OMP_ATOMIC_LOAD: case GIMPLE_OMP_ATOMIC_STORE: case GIMPLE_OMP_CONTINUE: - case GIMPLE_OMP_ENTRY_END: break; =20 case GIMPLE_CALL: diff --git gcc/gimple-pretty-print.c gcc/gimple-pretty-print.c index 50d61fa..e27214f 100644 --- gcc/gimple-pretty-print.c +++ gcc/gimple-pretty-print.c @@ -2304,10 +2304,6 @@ pp_gimple_stmt_1 (pretty_printer *buffer, gimple *gs= , int spc, int flags) pp_string (buffer, "GIMPLE_SECTIONS_SWITCH"); break; =20 - case GIMPLE_OMP_ENTRY_END: - pp_string (buffer, "GIMPLE_OMP_ENTRY_END"); - break; - case GIMPLE_OMP_MASTER: case GIMPLE_OMP_TASKGROUP: case GIMPLE_OMP_SECTION: diff --git gcc/gimple.c gcc/gimple.c index ee11112..b0e19d5 100644 --- gcc/gimple.c +++ gcc/gimple.c @@ -828,15 +828,6 @@ gimple_build_debug_source_bind_stat (tree var, tree va= lue, } =20 =20 -/* Build a GIMPLE_OMP_ENTRY_END statement. */ - -gimple * -gimple_build_omp_entry_end (void) -{ - return gimple_alloc (GIMPLE_OMP_ENTRY_END, 0); -} - - /* Build a GIMPLE_OMP_CRITICAL statement. =20 BODY is the sequence of statements for which only one thread can execut= e. diff --git gcc/gimple.def gcc/gimple.def index faf0166..2ff22b8 100644 --- gcc/gimple.def +++ gcc/gimple.def @@ -227,10 +227,6 @@ DEFGSCODE(GIMPLE_OMP_ATOMIC_STORE, "gimple_omp_atomic_= store", iteration in partially lowered OpenMP code. */ DEFGSCODE(GIMPLE_OMP_CONTINUE, "gimple_omp_continue", GSS_OMP_CONTINUE) =20 -/* GIMPLE_OMP_ENTRY_END marks the end of the unpredicated entry block - into an offloaded region. */ -DEFGSCODE(GIMPLE_OMP_ENTRY_END, "gimple_omp_entry_end", GSS_BASE) - /* GIMPLE_OMP_CRITICAL represents =20 #pragma omp critical [name] diff --git gcc/gimple.h gcc/gimple.h index 22d2a07..6d15dab 100644 --- gcc/gimple.h +++ gcc/gimple.h @@ -1451,7 +1451,6 @@ gdebug *gimple_build_debug_bind_stat (tree, tree, gim= ple * MEM_STAT_DECL); gdebug *gimple_build_debug_source_bind_stat (tree, tree, gimple * MEM_STAT= _DECL); #define gimple_build_debug_source_bind(var,val,stmt) \ gimple_build_debug_source_bind_stat ((var), (val), (stmt) MEM_STAT_INFO) -gimple *gimple_build_omp_entry_end (void); gomp_critical *gimple_build_omp_critical (gimple_seq, tree, tree); gomp_for *gimple_build_omp_for (gimple_seq, int, tree, size_t, gimple_seq); gomp_parallel *gimple_build_omp_parallel (gimple_seq, tree, tree, tree); @@ -6061,7 +6060,6 @@ gimple_return_set_retbnd (gimple *gs, tree retval) case GIMPLE_OMP_ORDERED: \ case GIMPLE_OMP_CRITICAL: \ case GIMPLE_OMP_RETURN: \ - case GIMPLE_OMP_ENTRY_END: \ case GIMPLE_OMP_ATOMIC_LOAD: \ case GIMPLE_OMP_ATOMIC_STORE: \ case GIMPLE_OMP_CONTINUE: \ diff --git gcc/omp-low.c gcc/omp-low.c index 299447e..9cb6425 100644 --- gcc/omp-low.c +++ gcc/omp-low.c @@ -13159,14 +13159,6 @@ expand_omp_target (struct omp_region *region) if (gimple_omp_target_kind (entry_stmt) =3D=3D GF_OMP_TARGET_KIND_OACC_K= ERNELS) mark_loops_in_oacc_kernels_region (region->entry, region->exit); =20 - basic_block entry_succ_bb =3D single_succ (entry_bb); - if (offloaded) - { - gsi =3D gsi_last_bb (entry_succ_bb); - if (gimple_code (gsi_stmt (gsi)) =3D=3D GIMPLE_OMP_ENTRY_END) - gsi_remove (&gsi, true); - } - if (offloaded) { unsigned srcidx, dstidx, num; @@ -13187,6 +13179,7 @@ expand_omp_target (struct omp_region *region) tree data_arg =3D gimple_omp_target_data_arg (entry_stmt); if (data_arg) { + basic_block entry_succ_bb =3D single_succ (entry_bb); gimple_stmt_iterator gsi; tree arg; gimple *tgtcopy_stmt =3D NULL; @@ -14063,8 +14056,6 @@ build_omp_regions_1 (basic_block bb, struct omp_reg= ion *parent, gcc_assert (parent); parent->cont =3D bb; } - else if (code =3D=3D GIMPLE_OMP_ENTRY_END) - gcc_assert (parent); else if (code =3D=3D GIMPLE_OMP_SECTIONS_SWITCH) { /* GIMPLE_OMP_SECTIONS_SWITCH is part of @@ -16978,9 +16969,6 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_= context *ctx) false, NULL, NULL, &fork_seq, &join_seq, ctx); } =20 - if (offloaded) - gimple_seq_add_stmt (&new_body, gimple_build_omp_entry_end ()); - gimple_seq_add_seq (&new_body, fork_seq); gimple_seq_add_seq (&new_body, tgt_body); gimple_seq_add_seq (&new_body, join_seq); @@ -18501,7 +18489,6 @@ make_gimple_omp_edges (basic_block bb, struct omp_r= egion **region, fallthru =3D false; break; =20 - case GIMPLE_OMP_ENTRY_END: case GIMPLE_OMP_ATOMIC_LOAD: case GIMPLE_OMP_ATOMIC_STORE: fallthru =3D true; Gr=C3=BC=C3=9Fe Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXB1BCAAoJEK3/DN1sMFFt6zcH/3iCErUTFhmh1zoQD5vWDuWn T3SwBd6X2cvBTC/CxCOiGDN0HksCRRUNvdBg1z8aTuJab3gPbF6DAunEW9WT6xm5 W/nrxxICHr8oMuWiSCA55oXpqxiKESumhVn1I0/1fj17Eg6J9q6Iw4CBBDsN+dfs yxzFB0UEU+YPInGZNIUDtSpR8MSDquf45pvBLRvNEL0BQrLxUr+ert/yxfGhDCOR Slxf+u+e3AXemHpOBLxszsBLm4NlwWOWuBo8QW4yG4C+G6m7KReBVm3qhJgDt1g6 OKVRqJ0x8bNW5Pok1tyVVenzFp9w5Lu0rE/oMzPXyVSh0pMehNVT4BcPVYSLFxQ= =qguJ -----END PGP SIGNATURE----- --=-=-=--