Compare commits
2 Commits
0c29d54f83
...
43e5a9e8ba
| Author | SHA1 | Date | |
|---|---|---|---|
| 43e5a9e8ba | |||
| 5b34551310 |
@@ -433,10 +433,9 @@ static void fillReadShortFixedSumscripts(SgExpression* exp, const PrivateToRemov
|
||||
{
|
||||
auto subscripts = getShortFixedSubscriptsVector((SgArrayRefExp*)exp, var.fixedDimensions);
|
||||
fixedSubscripts.insert(subscripts);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fillReadShortFixedSumscripts(exp->lhs(), var, fixedSubscripts);
|
||||
fillReadShortFixedSumscripts(exp->rhs(), var, fixedSubscripts);
|
||||
@@ -1350,16 +1349,14 @@ static SgForStmt* getScopeLoopStmt(SgStatement* stmt)
|
||||
|
||||
static int getDimension(SgSymbol* arraySym)
|
||||
{
|
||||
SgStatement* declarationStmt = arraySym->declaredInStmt();
|
||||
if (declarationStmt == nullptr)
|
||||
return 0;
|
||||
SgExpression* declExpr = arraySym->makeDeclExpr();
|
||||
if (declExpr == nullptr)
|
||||
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
||||
|
||||
SgExprListExp* expList = (SgExprListExp*)declarationStmt->expr(0);
|
||||
for (int i = 0; i < expList->length(); ++i)
|
||||
if (expList->elem(i)->symbol()->identifier() == arraySym->identifier())
|
||||
return ((SgExprListExp*)expList->elem(i)->lhs())->length();
|
||||
int dimensionNum = ((SgExprListExp*)declExpr->lhs())->length();
|
||||
delete declExpr;
|
||||
|
||||
return 0;
|
||||
return dimensionNum;
|
||||
}
|
||||
|
||||
// findChildLoop returns LoopGraph for provided loop statement
|
||||
|
||||
Reference in New Issue
Block a user