improved MERGE_ARRAYS
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user