From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id CF546385843A for ; Wed, 14 Sep 2022 21:45:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CF546385843A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,315,1654588800"; d="scan'208";a="82883819" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 14 Sep 2022 13:45:15 -0800 IronPort-SDR: +q7EIP/ewAllAteJd0Hh4BhGfAS98zrJBnqhTCK9ATcIKtz1XSEGY3Isu/7xJU7vjU4EAzKJq4 dB5zT9O+KwXuTb6MUsTTEx58g5JYdt+Eij5qeBPVB6x/sGHcCoa5aH+xpFrymBKyp11V3lViiM O89rmKTIiSy6BfC2c649eGNZwnCJNvPoYYSsZ3k8arsHHbzodhzPGAgJoRXcx0ivZs8gC05coH TGy7M+VwH0V0J2/qXFGOjnoaHXTx9hwT2enEqEknXgNff477ZYVY0At3EAgzXWSDTCJCto2cxr 6V4= From: Thomas Schwinge To: Sandra Loosemore CC: Subject: Re: OpenMP: Generate SIMD clones for functions with "declare target" In-Reply-To: <0b64e323-63f9-e4b7-eb7f-83f3b5e3125b@codesourcery.com> References: <0b64e323-63f9-e4b7-eb7f-83f3b5e3125b@codesourcery.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Wed, 14 Sep 2022 23:45:07 +0200 Message-ID: <874jx9mxzw.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Sandra! Commenting on just one single item: On 2022-09-14T11:32:11-0600, Sandra Loosemore wro= te: > --- a/gcc/omp-simd-clone.cc > +++ b/gcc/omp-simd-clone.cc > void > expand_simd_clones (struct cgraph_node *node) > { > - tree attr =3D lookup_attribute ("omp declare simd", > - DECL_ATTRIBUTES (node->decl)); > - if (attr =3D=3D NULL_TREE > - || node->inlined_to > + tree attr; > + bool error_p =3D true; > + > + if (node->inlined_to > || lookup_attribute ("noclone", DECL_ATTRIBUTES (node->decl))) > return; > > + attr =3D lookup_attribute ("omp declare simd", > + DECL_ATTRIBUTES (node->decl)); > + > + /* See if we can add an "omp declare simd" directive implicitly > + before giving up. */ > + /* FIXME: OpenACC "#pragma acc routine" translates into > + "omp declare target", but appears also to have some other effects > + that conflict with generating SIMD clones, causing ICEs. So don't > + do this if we've got OpenACC instead of OpenMP. */ Uh, ICEs... (But I suppose this processing is not relevant for OpenACC 'routine's.) However, OpenACC and OpenMP support may be active at the same time... > + if (attr =3D=3D NULL_TREE > + && flag_openmp_target_simd_clone && !flag_openacc) ..., so '!flag_openacc' is not the right check here. Instead you'd do '!oacc_get_fn_attrib (DECL_ATTRIBUTES (node->decl))' (untested) or similar. > + { > + attr =3D mark_auto_simd_clone (node); > + error_p =3D false; > + } > + if (attr =3D=3D NULL_TREE) > + return; Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955