add pass REMOVE_DIST_ARRAYS_FROM_IO, make copyArray fuction from resolve_par_regions public #53
@@ -445,6 +445,24 @@ void replaceDistributedArraysInIO(std::vector<ParallelRegion*>& regions,
|
|||||||
suffix = "_io_m";
|
suffix = "_io_m";
|
||||||
|
|
||||||
auto origCopy = copyArray(place, array_to_copy, linesByFile.second, suffix + to_string(region->GetId()), fileName, newDeclsToInclude, copied);
|
auto origCopy = copyArray(place, array_to_copy, linesByFile.second, suffix + to_string(region->GetId()), fileName, newDeclsToInclude, copied);
|
||||||
|
SgStatement* decl = SgStatement::getStatementByFileAndLine(place.first, place.second);
|
||||||
|
|
||||||
|
if(decl)
|
||||||
|
decl = decl->lexNext();
|
||||||
|
|
||||||
|
if(decl)
|
||||||
|
{
|
||||||
|
string dir_str;
|
||||||
|
if (decl->comments())
|
||||||
|
{
|
||||||
|
string str_comment = string(decl->comments());
|
||||||
|
if(str_comment.size() && str_comment.back() != '\n')
|
||||||
|
dir_str += "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
dir_str += "!$SPF ANALYSIS(PROCESS_PRIVATE(" + string(origCopy.second->identifier()) + "))\n";
|
||||||
|
decl->addComment(dir_str.c_str());
|
||||||
|
}
|
||||||
created_copies.insert({ array_to_copy, origCopy.second });
|
created_copies.insert({ array_to_copy, origCopy.second });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user