replace_dist_arrays_in_io: choose arrays for copying more carefully
This commit is contained in:
@@ -19,7 +19,7 @@ static void findArrays(SgExpression* exp, set<SgSymbol*>& arrays)
|
|||||||
{
|
{
|
||||||
if (exp)
|
if (exp)
|
||||||
{
|
{
|
||||||
if (isSgArrayRefExp(exp))
|
if (isArrayRef(exp))
|
||||||
arrays.insert(exp->symbol());
|
arrays.insert(exp->symbol());
|
||||||
|
|
||||||
findArrays(exp->lhs(), arrays);
|
findArrays(exp->lhs(), arrays);
|
||||||
@@ -53,7 +53,7 @@ static void populateDistributedIoArrays(map<DIST::Array*, set<SgStatement*>>& ar
|
|||||||
if (!arg)
|
if (!arg)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (arg->variant() != ARRAY_REF)
|
if (!isArrayRef(arg))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (arg->lhs())
|
if (arg->lhs())
|
||||||
@@ -122,7 +122,7 @@ static void populateDistributedIoArrays(map<DIST::Array*, set<SgStatement*>>& ar
|
|||||||
{
|
{
|
||||||
string array_name = string(by_symb->identifier());
|
string array_name = string(by_symb->identifier());
|
||||||
DIST::Array* array_p = getArrayFromDeclarated(declaratedInStmt(by_symb), array_name);
|
DIST::Array* array_p = getArrayFromDeclarated(declaratedInStmt(by_symb), array_name);
|
||||||
if (array_p && array_p->GetDistributeFlagVal() == Distribution::distFlag::DISTR && arrays[array_p].insert(stat).second)
|
if (array_p && array_p->GetDistributeFlagVal() == Distribution::distFlag::IO_PRIV && arrays[array_p].insert(stat).second)
|
||||||
__spf_print(DEBUG_TRACE, "[%d]: add array %s\n", stat->lineNumber(), array_p->GetName().c_str());
|
__spf_print(DEBUG_TRACE, "[%d]: add array %s\n", stat->lineNumber(), array_p->GetName().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user