[flang-commits] [flang] [flang][OpenMP] Fix copyprivate semantic checks (PR #95799)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Thu Jun 20 08:01:12 PDT 2024
================
@@ -2540,6 +2541,32 @@ void ResolveOmpTopLevelParts(
});
}
+static bool IsSymbolInCommonBlock(const Symbol &symbol) {
+ // If there are many symbols in common blocks, going through them all can be
+ // slow. A possible optimization is to add an OmpInCommonBlock flag to
+ // Symbol, to make it possible to quickly test if a given symbol is in a
+ // common block.
+ for (const auto &cb : symbol.owner().commonBlocks()) {
+ if (IsCommonBlockContaining(cb.second.get(), symbol)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+static bool IsSymbolPredeterminedAsPrivate(const Symbol &symbol) {
----------------
tblah wrote:
What about loop indices?
https://github.com/llvm/llvm-project/pull/95799
More information about the flang-commits
mailing list