added IPA to complete the formation of names of parallelization regions

This commit is contained in:
ALEXks
2026-04-18 20:33:30 +03:00
parent b87b18615d
commit 54e83e194d
4 changed files with 71 additions and 22 deletions

View File

@@ -1264,6 +1264,8 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
moveAllocatesInterproc(arrayLinksByFuncCalls);
propagateRegionInfo(declaredArrays, arrayLinksByFuncCalls, subs_parallelRegions);
removeDistrStateFromDeadFunctions(allFuncInfo, declaredArrays);
propagateArrayFlags(arrayLinksByFuncCalls, declaredArrays, SPF_messages);
}
@@ -1681,30 +1683,11 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
findDeadFunctionsAndFillCalls(allFuncInfo_IR, SPF_messages, true);
else if (curr_regime == GET_ALL_ARRAY_DECL)
{
bool hasNonDefaultReg = false;
for (auto &elem : subs_parallelRegions)
if (elem->GetName() != "DEFAULT")
hasNonDefaultReg = true;
if (hasNonDefaultReg)
if (ignoreArrayDistributeState)
{
for (auto array : declaredArrays)
{
if (array.second.first->GetRegionsName().size() == 0)
array.second.first->SetDistributeFlag(DIST::NO_DISTR);
else if (array.second.first->GetRegionsName().size() == 1)
{
string regName = *array.second.first->GetRegionsName().begin();
convertToLower(regName);
if (regName == "default")
array.second.first->SetDistributeFlag(DIST::NO_DISTR);
}
}
}
if (ignoreArrayDistributeState)
for (auto array : declaredArrays)
array.second.first->SetDistributeFlag(DIST::NO_DISTR);
}
}
else if (curr_regime == GCOV_PARSER)
{