improved MERGE_ARRAYS

This commit is contained in:
ALEXks
2026-05-03 21:00:07 +03:00
parent 51f97e2be9
commit 5a3c936b5c
8 changed files with 77 additions and 75 deletions

View File

@@ -521,7 +521,7 @@ static void processLoopBound(SgStatement* st,
getBorderVars(exp, st->fileName(), borderVars);
if (containsArrayRefRecursive(exp), borderVars, st->fileName())
if (containsArrayRefRecursive(exp))
{
copyStatement(st);
@@ -575,7 +575,6 @@ void arrayConstantPropagation(SgProject& project)
processLoopBound(st, st->expr(0), upperBoundUnparsed, true, arrayToVariable, borderVars);
processLoopBound(st, st->expr(0), lowerBoundUnparsed, false, arrayToVariable, borderVars);
}
}
}
@@ -601,9 +600,7 @@ void arrayConstantPropagation(SgProject& project)
{
SgFile::switchToFile(fileName);
for (SgStatement* st : statements)
{
insertCommonAndDeclsForFunction(st, variablesToAdd);
}
}
map<string, map<SgStatement*, vector<pair<string, string>>>> result;