File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -2901,20 +2901,6 @@ void ResolveOmpTopLevelParts(
29012901 });
29022902}
29032903
2904- static bool IsSymbolInCommonBlock (const Symbol &symbol) {
2905- // TODO Improve the performance of this predicate function.
2906- // Going through all symbols sequentially, in all common blocks, can be
2907- // slow when there are many symbols. A possible optimization is to add
2908- // an OmpInCommonBlock flag to Symbol, to make it possible to quickly
2909- // test if a given symbol is in a common block.
2910- for (const auto &cb : symbol.owner ().commonBlocks ()) {
2911- if (IsCommonBlockContaining (cb.second .get (), symbol)) {
2912- return true ;
2913- }
2914- }
2915- return false ;
2916- }
2917-
29182904static bool IsSymbolThreadprivate (const Symbol &symbol) {
29192905 if (const auto *details{symbol.detailsIf <HostAssocDetails>()}) {
29202906 return details->symbol ().test (Symbol::Flag::OmpThreadprivate);
@@ -2943,7 +2929,7 @@ static bool IsSymbolPrivate(const Symbol &symbol) {
29432929 case Scope::Kind::BlockConstruct:
29442930 return !symbol.attrs ().test (Attr::SAVE) &&
29452931 !symbol.attrs ().test (Attr::PARAMETER) && !IsAssumedShape (symbol) &&
2946- !IsSymbolInCommonBlock ( symbol);
2932+ !symbol. flags (). test (Symbol::Flag::InCommonBlock );
29472933 default :
29482934 return false ;
29492935 }
You can’t perform that action at this time.
0 commit comments