llvm-project/clang/lib
Johannes Doerfert f9c3c5da19 [OpenMP][IR-Builder] Introduce the finalization stack
As a permanent and generic solution to the problem of variable
finalization (destructors, lastprivate, ...), this patch introduces the
finalization stack. The objects on the stack describe (1) the
(structured) regions the OpenMP-IR-Builder is currently constructing,
(2) if these are cancellable, and (3) the callback that will perform the
finalization (=cleanup) when necessary.

As the finalization can be necessary multiple times, at different source
locations, the callback takes the position at which code is currently
generated. This position will also encode the destination of the "region
exit" block *iff* the finalization call was issues for a region
generated by the OpenMPIRBuilder. For regions generated through the old
Clang OpenMP code geneneration, the "region exit" is determined by Clang
inside the finalization call instead (see getOMPCancelDestination).

As a first user, the parallel + cancel barrier interaction is changed.
In contrast to the temporary solution before, the barrier generation in
Clang does not need to be aware of the "CancelDestination" block.
Instead, the finalization callback is and, as described above, later
even that one does not need to be.

D70109 will be updated to use this scheme.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D70258
2019-12-25 16:57:08 -06:00
..
ARCMigrate Removed some questionable default arguments from setters 2019-09-12 12:16:43 +00:00
AST [OPENMP50]Basic support for conditional lastprivate. 2019-12-24 12:22:05 -05:00
ASTMatchers Customize simplified dumping and matching of LambdaExpr 2019-12-21 11:02:11 +00:00
Analysis [CFG] Fix an assertion failure with static initializers 2019-12-23 16:35:37 -08:00
Basic [OPENMP50]Basic support for conditional lastprivate. 2019-12-24 12:22:05 -05:00
CodeGen [OpenMP][IR-Builder] Introduce the finalization stack 2019-12-25 16:57:08 -06:00
CrossTU [CrossTU] Fix problem with CrossTU AST load limit and progress messages. 2019-08-12 07:15:29 +00:00
DirectoryWatcher [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Driver [NFC] Move OptionUtils from Basic to Driver 2019-12-23 08:11:23 -05:00
Edit [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 2019-07-02 18:28:13 +00:00
Format [clang-format] C# formatting a class with inheritance followed by an attribute specifier assume its a braces initializer 2019-12-20 17:07:00 +00:00
Frontend [Concepts] Constrained partial specializations and function overloads. 2019-12-23 08:37:35 +02:00
FrontendTool [analyzer] Don't run the analyzer for -analyzer-list-enabled-checkers 2019-09-12 18:53:48 +00:00
Headers [X86] Mark various pointer arguments in builtins as const 2019-12-19 11:42:11 -08:00
Index [Wdocumentation] Implement \anchor 2019-12-21 14:52:21 +01:00
Lex [clang-scan-deps] do not skip empty #if/#elif in the minimizer to avoid missing `__has_include` dependencies 2019-12-02 18:47:22 -08:00
Parse [OPENMP]Add extra checks and initialization for clause modifier. 2019-12-24 16:12:28 -05:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema [OPENMP]Add extra checks and initialization for clause modifier. 2019-12-24 16:12:28 -05:00
Serialization [OPENMP50]Basic support for conditional lastprivate. 2019-12-24 12:22:05 -05:00
StaticAnalyzer [Analyzer] Fixes -Wrange-loop-analysis warnings 2019-12-22 19:13:34 +01:00
Tooling Parenthesized a logical expression. 2019-12-20 14:36:21 +01:00
CMakeLists.txt Reland [clang] DirectoryWatcher 2019-07-12 20:34:10 +00:00