diff --git a/src/DvmhRegions/DvmhRegionInserter.cpp b/src/DvmhRegions/DvmhRegionInserter.cpp index 53c668c..4c8cd67 100644 --- a/src/DvmhRegions/DvmhRegionInserter.cpp +++ b/src/DvmhRegions/DvmhRegionInserter.cpp @@ -1428,21 +1428,12 @@ static set for (auto& realArray : realRef) { - if (added.count(realArray) != 0 || !realArray->IsNotDistribute()) + if (added.count(realArray) != 0 || realArray->IsNotDistribute()) continue; SgStatement* declStat = NULL; - if (realArray->GetLocation().first != DIST::l_COMMON) - { - if (std::count(usedAll.begin(), usedAll.end(), realArray) == 0) - { - auto declInfo = *realArray->GetDeclInfo().begin(); - declStat = SgStatement::getStatementByFileAndLine(declInfo.first, declInfo.second); - checkNull(declStat, convertFileName(__FILE__).c_str(), __LINE__); - } - } - else + if (realArray->GetLocation().first == DIST::l_COMMON) { commonArrays.insert(realArray); auto decls = realArray->GetDeclInfo(); @@ -1471,6 +1462,19 @@ static set } } } + else if (realArray->GetLocation().first == DIST::l_MODULE) + { + //TODO + } + else + { + if (std::count(usedAll.begin(), usedAll.end(), realArray) == 0) + { + auto declInfo = *realArray->GetDeclInfo().begin(); + declStat = SgStatement::getStatementByFileAndLine(declInfo.first, declInfo.second); + checkNull(declStat, convertFileName(__FILE__).c_str(), __LINE__); + } + } if (declStat) {