llvm-project
216ba6bc - [flang][OpenMP] Privatize vars referenced in statement functions (#103390)

Commit
1 year ago
[flang][OpenMP] Privatize vars referenced in statement functions (#103390) Variables referenced in the body of statement functions need to be handled as if they are explicitly referenced. Otherwise, they are skipped during implicit privatization, because statement functions are represented as procedures in the parse tree. To avoid missing symbols referenced only in statement functions during implicit privatization, new symbols, associated with them, are created and inserted into the context of the directive that privatizes them. They are later collected and processed in lowering. To avoid confusing these new symbols with regular ones, they are tagged with the new OmpFromStmtFunction flag. Fixes https://github.com/llvm/llvm-project/issues/74273
Author
Parents
Loading