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