finalyze first version of private arrays search
This commit is contained in:
@@ -279,7 +279,8 @@ static string unparseProjectIfNeed(SgFile* file, const int curr_regime, const bo
|
||||
for (SgStatement* st = file->firstStatement(); st; st = st->lexNext())
|
||||
if (isSPF_stat(st)) // except sapfor parallel regions and if attributes dont move
|
||||
if (st->variant() != SPF_PARALLEL_REG_DIR && st->variant() != SPF_END_PARALLEL_REG_DIR)
|
||||
toDel.push_back(st);
|
||||
if (insertedPrivates.find(st) == insertedPrivates.end())
|
||||
toDel.push_back(st);
|
||||
|
||||
for (auto& elem : toDel)
|
||||
elem->deleteStmt();
|
||||
@@ -1914,8 +1915,8 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
||||
}
|
||||
else if (curr_regime == TRANSFORM_ASSUMED_SIZE_PARAMETERS)
|
||||
transformAssumedSizeParameters(allFuncInfo);
|
||||
else if (curr_regime == FIND_PRIVATE_ARRAYS)
|
||||
auto result = FindPrivateArrays(loopGraph, fullIR);
|
||||
else if (curr_regime == FIND_PRIVATE_ARRAYS_ANALYSIS)
|
||||
FindPrivateArrays(loopGraph, fullIR, insertedPrivates);
|
||||
|
||||
const float elapsed = duration_cast<milliseconds>(high_resolution_clock::now() - timeForPass).count() / 1000.;
|
||||
const float elapsedGlobal = duration_cast<milliseconds>(high_resolution_clock::now() - globalTime).count() / 1000.;
|
||||
@@ -2373,6 +2374,7 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
||||
case SUBST_EXPR_RD_AND_UNPARSE:
|
||||
case SUBST_EXPR_AND_UNPARSE:
|
||||
case REMOVE_DEAD_CODE_AND_UNPARSE:
|
||||
case FIND_PRIVATE_ARRAYS:
|
||||
if (folderName)
|
||||
runAnalysis(*project, UNPARSE_FILE, true, "", folderName);
|
||||
else
|
||||
@@ -2634,7 +2636,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (curr_regime == INSERT_PARALLEL_DIRS_NODIST)
|
||||
if (curr_regime == INSERT_PARALLEL_DIRS_NODIST || curr_regime == FIND_PRIVATE_ARRAYS)
|
||||
{
|
||||
ignoreArrayDistributeState = true;
|
||||
sharedMemoryParallelization = 1;
|
||||
|
||||
Reference in New Issue
Block a user