llvm-project/clang/include/clang-c
Michael Kruse 6c05005238 [OpenMP] Implement '#pragma omp tile', by Michael Kruse (@Meinersbur).
The tile directive is in OpenMP's Technical Report 8 and foreseeably will be part of the upcoming OpenMP 5.1 standard.

This implementation is based on an AST transformation providing a de-sugared loop nest. This makes it simple to forward the de-sugared transformation to loop associated directives taking the tiled loops. In contrast to other loop associated directives, the OMPTileDirective does not use CapturedStmts. Letting loop associated directives consume loops from different capture context would be difficult.

A significant amount of code generation logic is taking place in the Sema class. Eventually, I would prefer if these would move into the CodeGen component such that we could make use of the OpenMPIRBuilder, together with flang. Only expressions converting between the language's iteration variable and the logical iteration space need to take place in the semantic analyzer: Getting the of iterations (e.g. the overload resolution of `std::distance`) and converting the logical iteration number to the iteration variable (e.g. overload resolution of `iteration + .omp.iv`). In clang, only CXXForRangeStmt is also represented by its de-sugared components. However, OpenMP loop are not defined as syntatic sugar. Starting with an AST-based approach allows us to gradually move generated AST statements into CodeGen, instead all at once.

I would also like to refactor `checkOpenMPLoop` into its functionalities in a follow-up. In this patch it is used twice. Once for checking proper nesting and emitting diagnostics, and additionally for deriving the logical iteration space per-loop (instead of for the loop nest).

Differential Revision: https://reviews.llvm.org/D76342
2021-02-16 09:45:07 -08:00
..
BuildSystem.h fix some comment typos to cycle bots 2020-02-14 15:18:50 -05:00
CXCompilationDatabase.h Wrap C APIs with pragmas enforcing -Werror=strict-prototypes 2019-11-19 13:18:43 -08:00
CXErrorCode.h Wrap C APIs with pragmas enforcing -Werror=strict-prototypes 2019-11-19 13:18:43 -08:00
CXString.h Wrap C APIs with pragmas enforcing -Werror=strict-prototypes 2019-11-19 13:18:43 -08:00
Documentation.h [Wdocumentation] Implement \anchor 2019-12-21 14:52:21 +01:00
ExternC.h Wrap C APIs with pragmas enforcing -Werror=strict-prototypes 2019-11-19 13:18:43 -08:00
FatalErrorHandler.h Wrap C APIs with pragmas enforcing -Werror=strict-prototypes 2019-11-19 13:18:43 -08:00
Index.h [OpenMP] Implement '#pragma omp tile', by Michael Kruse (@Meinersbur). 2021-02-16 09:45:07 -08:00
Platform.h libclang: Add static build support for Windows 2020-04-25 20:19:17 +03:00
Rewrite.h [libclang] Add CXRewriter to libclang API 2020-09-04 14:17:03 -07:00
module.modulemap