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 4a06430139 - Show all commits

View File

@@ -9,6 +9,7 @@
using std::map;
using std::set;
using std::string;
using std::vector;
using std::to_string;
using std::make_pair;
@@ -104,6 +105,8 @@ static void populateDistributedIoArrays(map<DIST::Array*, set<SgStatement*>>& ar
break;
}
default:
break;
}
}
@@ -119,7 +122,7 @@ static void populateDistributedIoArrays(map<DIST::Array*, set<SgStatement*>>& ar
{
string array_name = string(by_symb->identifier());
DIST::Array* array_p = getArrayFromDeclarated(declaratedInStmt(by_symb), array_name);
if (arrays[array_p].insert(stat).second)
if (array_p && array_p->GetDistributeFlagVal() == Distribution::distFlag::DISTR && arrays[array_p].insert(stat).second)
__spf_print(DEBUG_TRACE, "[%d]: add array %s\n", stat->lineNumber(), array_p->GetName().c_str());
}
@@ -325,10 +328,10 @@ static bool ioReginBound(SgStatement* stat, SgStatement* last_io_bound)
return false;
}
xnpster marked this conversation as resolved Outdated

std:: можно стереть, ниже без std:: уже есть описания.

std:: можно стереть, ниже без std:: уже есть описания.
void replaceDistributedArraysInIO(std::vector<ParallelRegion*>& regions,
const std::map<std::string, std::vector<FuncInfo*>>& allFuncInfo,
std::map<std::string, std::vector<Messages>>& SPF_messages,
map<string, map<int, set<string>>>& newDeclsToInclude)
void replaceDistributedArraysInIO(vector<ParallelRegion*>& regions,
const map<string, vector<FuncInfo*>>& allFuncInfo,
map<string, vector<Messages>>& SPF_messages,
map<string, map<int, set<string>>>& newDeclsToInclude)
{
map<DIST::Array*, SgSymbol*> created_copies;
map<string, map<int, set<string>>> copied;