1 Commits

Author SHA1 Message Date
998fbc3036 fix getUniqName 2026-01-31 20:53:36 +03:00
2 changed files with 5 additions and 4 deletions

View File

@@ -504,7 +504,7 @@ static void replaceArrayInFragment(SgSymbol* replace_symb,
} }
} }
static bool ioRegionBorder(SgStatement* stat, SgStatement* last_io_bound) static bool ioReginBorder(SgStatement* stat, SgStatement* last_io_bound)
{ {
auto var = stat->variant(); auto var = stat->variant();
@@ -535,6 +535,8 @@ static bool ioRegionBorder(SgStatement* stat, SgStatement* last_io_bound)
if (last_io_bound && last_io_bound->lastNodeOfStmt() && last_io_bound->lastNodeOfStmt() == stat) if (last_io_bound && last_io_bound->lastNodeOfStmt() && last_io_bound->lastNodeOfStmt() == stat)
return true; return true;
int parent_var;
if (var == CONTROL_END && border_stats.find(stat->controlParent()->variant()) != border_stats.end()) if (var == CONTROL_END && border_stats.find(stat->controlParent()->variant()) != border_stats.end())
return true; return true;
@@ -600,7 +602,6 @@ void replaceDistributedArraysInIO(vector<ParallelRegion*>& regions,
auto var = curr_stmt->variant(); auto var = curr_stmt->variant();
// TODO: does not work with user regions
if (var == PROC_HEDR || var == PROG_HEDR || var == FUNC_HEDR) if (var == PROC_HEDR || var == PROG_HEDR || var == FUNC_HEDR)
{ {
current_func_info = NULL; current_func_info = NULL;
@@ -627,7 +628,7 @@ void replaceDistributedArraysInIO(vector<ParallelRegion*>& regions,
break; break;
} }
if (ioRegionBorder(curr_stmt, last_io_bound)) if (ioReginBorder(curr_stmt, last_io_bound))
{ {
for (const auto& by_array_to_copy : need_replace) for (const auto& by_array_to_copy : need_replace)
{ {

View File

@@ -1314,7 +1314,7 @@ tuple<int, string, string> getUniqName(const map<string, vector<SgExpression*>>
tuple<int, string, string> retVal; tuple<int, string, string> retVal;
if (inCommon) if (inCommon)
retVal = make_tuple(commonPos, string("common_") + getCommonName(foundCommon), string(symb->identifier())); retVal = make_tuple(commonPos, string("common_") + getCommonName(foundCommon), "");
else else
retVal = make_tuple(decl->lineNumber(), string(decl->fileName()), string(symb->identifier())); retVal = make_tuple(decl->lineNumber(), string(decl->fileName()), string(symb->identifier()));