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(
2901
2901
});
2902
2902
}
2903
2903
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
-
2918
2904
static bool IsSymbolThreadprivate (const Symbol &symbol) {
2919
2905
if (const auto *details{symbol.detailsIf <HostAssocDetails>()}) {
2920
2906
return details->symbol ().test (Symbol::Flag::OmpThreadprivate);
@@ -2943,7 +2929,7 @@ static bool IsSymbolPrivate(const Symbol &symbol) {
2943
2929
case Scope::Kind::BlockConstruct:
2944
2930
return !symbol.attrs ().test (Attr::SAVE) &&
2945
2931
!symbol.attrs ().test (Attr::PARAMETER) && !IsAssumedShape (symbol) &&
2946
- !IsSymbolInCommonBlock ( symbol);
2932
+ !symbol. flags (). test (Symbol::Flag::InCommonBlock );
2947
2933
default :
2948
2934
return false ;
2949
2935
}
You can’t perform that action at this time.
0 commit comments