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 0E0EA3858C74 for ; Mon, 20 Mar 2023 10:52:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0E0EA3858C74 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.98,274,1673942400"; d="scan'208";a="100674037" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 20 Mar 2023 02:52:30 -0800 IronPort-SDR: x4WLQjRxKHtTFUXZZnMqWN5GNYOXyx3PFrZQaLd4dtHqM0q8kr00wg191YzoPKQzswxBDRPJiM Mozi+G6/3nXJE3B7zz1d9Rtr7t4y2UXLtS+LzJkQ2soxOnQYUIthR2LTsQJn3AxM22f67nKLFM TSzipzEcMXw3OOoyzwX4Y/UqXwz8PMJHsKS7rSYRkcCLgFLcKzgLt8OImjsx0UQMzZ6fdx1Bso T+/xaGdxwZt+x3vYj20/EvitECObnxLhMtdiclWrb8wFk8yIuR9zF3FRPqUqqzBrn/zbPMdkeu hgQ= Message-ID: <9c245348-dd63-744e-7bc4-c1e482deada5@codesourcery.com> Date: Mon, 20 Mar 2023 11:52:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [RFC] internal documentation for OMP_FOR Content-Language: en-US To: Sandra Loosemore , "gcc-patches@gcc.gnu.org" , Jakub Jelinek References: <02537de1-8b02-add7-0817-436fcffe330c@codesourcery.com> From: Tobias Burnus In-Reply-To: <02537de1-8b02-add7-0817-436fcffe330c@codesourcery.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP 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, https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612298.html On 19.02.23 06:21, Sandra Loosemore wrote: > Here is a patch I put together for the internals manual; can other > people familiar with this functionality review it for technical > correctness? Glancing at it, it seems to be okay. (I have not cross checked by looking = at the code.) However, you may want to add something related to non-rectangular loops. Fo= r those, the 'N1' in OMP_FOR_INIT's @code{VAR =3D N1} and the 'N2' in OMP_FOR_COND's @code{VAR @{<,>,<=3D,>=3D@} N2} have a special form; namely, the N1 and/or N2 are not normal expressions but are TREE_VEC with three elements: The outer loop variable (TREE_CODE_CLASS =3D=3D tcc_declaration), a multiplication factor, and an offset. Example: For the loop initialization 'i =3D j - 5', the result to be put in= to the OMP_FOR_INIT vector is: 'MODIFY_EXPR (i, TREE_VEC)' You could then also mention that OMP_FOR_NON_RECTANGULAR is/must be set on the OMP_FOR statement in that case. (This flag is currently not mentione= d in the .texi.) Additionally, the doc/generic.texi could also mention that not only OMP_FOR takes those operands but also OMP_SIMD, OMP_DISTRIBUTE, OMP_TASKLOOP, OMP_L= OOP, and OACC_LOOP (cf. tree.def or the actual code using it). Tobias ----------------- 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