add pass REMOVE_DIST_ARRAYS_FROM_IO, make copyArray fuction from resolve_par_regions public #53

Merged
Alexander_KS merged 4 commits from replace_dist_arrays_in_io into master 2024-11-14 06:19:28 +00:00
Showing only changes of commit 3a7a54e4be - Show all commits

View File

@@ -445,6 +445,24 @@ void replaceDistributedArraysInIO(std::vector<ParallelRegion*>& regions,
suffix = "_io_m";
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 });
}
}