ArrayAnalysis: consider case of IO_PRIV array from module

This commit is contained in:
2025-09-10 22:13:31 +03:00
parent 2cd02c295f
commit 9887d77cbf

View File

@@ -270,6 +270,12 @@ static void findArrayRefs (SgExpression* ex, SgStatement* st, string fName, int
fillPrivatesFromComment(new Statement(prev), privatesS);
if (privatesS.find(symb->identifier()) != privatesS.end())
itNew->second.first->SetDistributeFlag(DIST::SPF_PRIV);
if (!(itNew->second.first->IsNotDistribute()) &&
deprecatedByIO.find(symb->identifier()) != deprecatedByIO.end())
{
itNew->second.first->SetDistributeFlag(DIST::IO_PRIV);
}
}
else
itNew->second.first->SetDistributeFlag(DIST::SPF_PRIV);
@@ -648,6 +654,9 @@ int getAllDeclaredArrays(SgFile* file, map<tuple<int, string, string>, pair<DIST
}
}
for (const auto& n : deprecatedByIO)
__spf_print(1, "depr io: %s\n", n.c_str());
while (st != lastNode)
{
if (st->variant() == CONTAINS_STMT)