private_removing: bug fixes
This commit is contained in:
@@ -433,9 +433,8 @@ static void fillReadShortFixedSumscripts(SgExpression* exp, const PrivateToRemov
|
|||||||
{
|
{
|
||||||
auto subscripts = getShortFixedSubscriptsVector((SgArrayRefExp*)exp, var.fixedDimensions);
|
auto subscripts = getShortFixedSubscriptsVector((SgArrayRefExp*)exp, var.fixedDimensions);
|
||||||
fixedSubscripts.insert(subscripts);
|
fixedSubscripts.insert(subscripts);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fillReadShortFixedSumscripts(exp->lhs(), var, fixedSubscripts);
|
fillReadShortFixedSumscripts(exp->lhs(), var, fixedSubscripts);
|
||||||
@@ -1350,16 +1349,14 @@ static SgForStmt* getScopeLoopStmt(SgStatement* stmt)
|
|||||||
|
|
||||||
static int getDimension(SgSymbol* arraySym)
|
static int getDimension(SgSymbol* arraySym)
|
||||||
{
|
{
|
||||||
SgStatement* declarationStmt = arraySym->declaredInStmt();
|
SgExpression* declExpr = arraySym->makeDeclExpr();
|
||||||
if (declarationStmt == nullptr)
|
if (declExpr == nullptr)
|
||||||
return 0;
|
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
||||||
|
|
||||||
SgExprListExp* expList = (SgExprListExp*)declarationStmt->expr(0);
|
int dimensionNum = ((SgExprListExp*)declExpr->lhs())->length();
|
||||||
for (int i = 0; i < expList->length(); ++i)
|
delete declExpr;
|
||||||
if (expList->elem(i)->symbol()->identifier() == arraySym->identifier())
|
|
||||||
return ((SgExprListExp*)expList->elem(i)->lhs())->length();
|
|
||||||
|
|
||||||
return 0;
|
return dimensionNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
// findChildLoop returns LoopGraph for provided loop statement
|
// findChildLoop returns LoopGraph for provided loop statement
|
||||||
|
|||||||
Reference in New Issue
Block a user