From ffba1748105c1f5fa782b8347f12abe60c255e35 Mon Sep 17 00:00:00 2001 From: xnpster Date: Sun, 18 Jan 2026 14:08:40 +0300 Subject: [PATCH] REMOVE_DIST_ARRAYS_FROM_IO: fix type, add TODO --- .../ReplaceArraysInIO/replace_dist_arrays_in_io.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Transformations/ReplaceArraysInIO/replace_dist_arrays_in_io.cpp b/src/Transformations/ReplaceArraysInIO/replace_dist_arrays_in_io.cpp index c40bdba..5ac5afe 100644 --- a/src/Transformations/ReplaceArraysInIO/replace_dist_arrays_in_io.cpp +++ b/src/Transformations/ReplaceArraysInIO/replace_dist_arrays_in_io.cpp @@ -504,7 +504,7 @@ static void replaceArrayInFragment(SgSymbol* replace_symb, } } -static bool ioReginBorder(SgStatement* stat, SgStatement* last_io_bound) +static bool ioRegionBorder(SgStatement* stat, SgStatement* last_io_bound) { auto var = stat->variant(); @@ -535,8 +535,6 @@ static bool ioReginBorder(SgStatement* stat, SgStatement* last_io_bound) if (last_io_bound && last_io_bound->lastNodeOfStmt() && last_io_bound->lastNodeOfStmt() == stat) return true; - int parent_var; - if (var == CONTROL_END && border_stats.find(stat->controlParent()->variant()) != border_stats.end()) return true; @@ -602,6 +600,7 @@ void replaceDistributedArraysInIO(vector& regions, auto var = curr_stmt->variant(); + // TODO: does not work with user regions if (var == PROC_HEDR || var == PROG_HEDR || var == FUNC_HEDR) { current_func_info = NULL; @@ -628,7 +627,7 @@ void replaceDistributedArraysInIO(vector& regions, break; } - if (ioReginBorder(curr_stmt, last_io_bound)) + if (ioRegionBorder(curr_stmt, last_io_bound)) { for (const auto& by_array_to_copy : need_replace) {