fixed findArrayRef in loop_graph

This commit is contained in:
ALEXks
2025-06-14 12:20:34 +03:00
parent a0704038db
commit 10636427ed
3 changed files with 4 additions and 2 deletions

View File

@@ -520,7 +520,7 @@ static void findArrayRef(SgExpression *exp, bool isWirte, set<DIST::Array*>& use
{ {
if (exp) if (exp)
{ {
if (exp->variant() == ARRAY_REF) if (isArrayRef(exp))
{ {
DIST::Array *arrayRef = NULL; DIST::Array *arrayRef = NULL;
SgSymbol *symbS = OriginalSymbol(exp->symbol()); SgSymbol *symbS = OriginalSymbol(exp->symbol());

View File

@@ -3219,12 +3219,14 @@ bool isArrayRef(SgExpression* ex)
{ {
SgArrayRefExp* arrayRef = isSgArrayRefExp(ex); SgArrayRefExp* arrayRef = isSgArrayRefExp(ex);
if (arrayRef) if (arrayRef)
{
if (isArrayType(ex->symbol()->type())) if (isArrayType(ex->symbol()->type()))
{ {
auto type = isSgArrayType(ex->symbol()->type()); auto type = isSgArrayType(ex->symbol()->type());
if (type && type->dimension()) if (type && type->dimension())
return true; return true;
} }
}
} }
return false; return false;
} }

View File

@@ -1,3 +1,3 @@
#pragma once #pragma once
#define VERSION_SPF "2425" #define VERSION_SPF "2426"