From: Tobias Burnus <tobias@codesourcery.com>
To: Sandra Loosemore <sandra@codesourcery.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Jakub Jelinek <jakub@redhat.com>
Subject: Re: [RFC] internal documentation for OMP_FOR
Date: Mon, 20 Mar 2023 11:52:24 +0100 [thread overview]
Message-ID: <9c245348-dd63-744e-7bc4-c1e482deada5@codesourcery.com> (raw)
In-Reply-To: <02537de1-8b02-add7-0817-436fcffe330c@codesourcery.com>
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. For those, the
'N1' in OMP_FOR_INIT's @code{VAR = N1} and the
'N2' in OMP_FOR_COND's @code{VAR @{<,>,<=,>=@} 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 == tcc_declaration),
a multiplication factor,
and an offset.
Example: For the loop initialization 'i = j - 5', the result to be put into the
OMP_FOR_INIT vector is: 'MODIFY_EXPR (i, TREE_VEC<j, 1, -5>)'
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 mentioned 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_LOOP,
and OACC_LOOP (cf. tree.def or the actual code using it).
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
prev parent reply other threads:[~2023-03-20 10:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-19 5:21 Sandra Loosemore
2023-03-06 20:56 ` PING " Sandra Loosemore
2023-03-20 10:52 ` Tobias Burnus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c245348-dd63-744e-7bc4-c1e482deada5@codesourcery.com \
--to=tobias@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=sandra@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).