From e9166d8c9926c3c50f758847b8c12fac091c53b5 Mon Sep 17 00:00:00 2001 From: ALEXks Date: Tue, 16 Sep 2025 08:22:53 +0300 Subject: [PATCH] trivial, version updated --- .../replace_dist_arrays_in_io.cpp | 27 +++++++------------ src/Utils/version.h | 2 +- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/Transformations/ReplaceArraysInIO/replace_dist_arrays_in_io.cpp b/src/Transformations/ReplaceArraysInIO/replace_dist_arrays_in_io.cpp index aeda7d3..02c7035 100644 --- a/src/Transformations/ReplaceArraysInIO/replace_dist_arrays_in_io.cpp +++ b/src/Transformations/ReplaceArraysInIO/replace_dist_arrays_in_io.cpp @@ -36,10 +36,10 @@ static SgExpression* findExprWithVariant(SgExpression* exp, int variant) return NULL; } -bool switchToDeclarationFile(DIST::Array* array_p, - pair& decl_place, - const string ¤t_file_name, - FuncInfo *current_func) +static bool switchToDeclarationFile(DIST::Array* array_p, + pair& decl_place, + const string ¤t_file_name, + FuncInfo *current_func) { if (!array_p) return false; @@ -122,9 +122,7 @@ static bool checkAssumedSize(const string &array_name, DIST::Array* array_p, con return true; auto *st = SgStatement::getStatementByFileAndLine(decl_place.first, decl_place.second); - - if (!st) - printInternalError(convertFileName(__FILE__).c_str(), __LINE__); + checkNull(st, convertFileName(__FILE__).c_str(), __LINE__); SgExpression* list = st->expr(0); while (list) @@ -255,6 +253,7 @@ static void populateDistributedIoArrays(map>& array spec = spec->rhs(); } } + break; } default: break; @@ -275,8 +274,7 @@ static void populateDistributedIoArrays(map>& array DIST::Array* array_p = getArrayFromDeclarated(declaratedInStmt(by_symb), array_name); if (array_p && array_p->GetDistributeFlagVal() == Distribution::distFlag::IO_PRIV && - !checkAssumedSize(array_name, array_p, current_file_name, current_func) - ) + !checkAssumedSize(array_name, array_p, current_file_name, current_func)) { auto inserted = arrays[by_symb].insert(stat).second; @@ -379,6 +377,7 @@ static void copyArrayBetweenStatements(SgSymbol* replace_symb, auto* parent = start_is_scope ? start : start->controlParent(); if (parent && parent->lastNodeOfStmt() == start) parent = parent->controlParent(); + checkNull(parent, convertFileName(__FILE__).c_str(), __LINE__); start->insertStmtAfter(*assign, *parent); } @@ -540,13 +539,10 @@ void replaceDistributedArraysInIO(vector& regions, auto func_info_it = allFuncInfo.find(current_file_name); if (func_info_it == allFuncInfo.end()) - { printInternalError(convertFileName(__FILE__).c_str(), __LINE__); - return; - } - auto *lbound_symb = new SgSymbol(PROCEDURE_NAME, "lbound"); - auto *ubound_symb = new SgSymbol(PROCEDURE_NAME, "ubound"); + auto *lbound_symb = new SgSymbol(FUNCTION_NAME, "lbound"); + auto *ubound_symb = new SgSymbol(FUNCTION_NAME, "ubound"); for (auto& lines : lines_by_file.second) { @@ -594,10 +590,7 @@ void replaceDistributedArraysInIO(vector& regions, } if (!current_func_info) - { printInternalError(convertFileName(__FILE__).c_str(), __LINE__); - return; - } curr_stmt = curr_stmt->lexNext(); while (curr_stmt && !isSgExecutableStatement(curr_stmt)) diff --git a/src/Utils/version.h b/src/Utils/version.h index 97027fe..e2700aa 100644 --- a/src/Utils/version.h +++ b/src/Utils/version.h @@ -1,3 +1,3 @@ #pragma once -#define VERSION_SPF "2443" +#define VERSION_SPF "2444"