Compare commits
1 Commits
analyze_lo
...
a9ee233e34
| Author | SHA1 | Date | |
|---|---|---|---|
| a9ee233e34 |
@@ -1347,18 +1347,6 @@ static SgForStmt* getScopeLoopStmt(SgStatement* stmt)
|
|||||||
return (SgForStmt*)stmt;
|
return (SgForStmt*)stmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int getDimension(SgSymbol* arraySym)
|
|
||||||
{
|
|
||||||
SgExpression* declExpr = arraySym->makeDeclExpr();
|
|
||||||
if (declExpr == nullptr)
|
|
||||||
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
|
||||||
|
|
||||||
int dimensionNum = ((SgExprListExp*)declExpr->lhs())->length();
|
|
||||||
delete declExpr;
|
|
||||||
|
|
||||||
return dimensionNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
// findChildLoop returns LoopGraph for provided loop statement
|
// findChildLoop returns LoopGraph for provided loop statement
|
||||||
static LoopGraph* findLoop(LoopGraph* outerLoop, SgForStmt* loopStmt)
|
static LoopGraph* findLoop(LoopGraph* outerLoop, SgForStmt* loopStmt)
|
||||||
{
|
{
|
||||||
@@ -1706,7 +1694,7 @@ void removePrivatesAnalysis(vector<LoopGraph*>& loopGraphs,
|
|||||||
Context context = Context{allFuncInfo, commonBlocks, messages};
|
Context context = Context{allFuncInfo, commonBlocks, messages};
|
||||||
context.loop = loop;
|
context.loop = loop;
|
||||||
context.loopStmt = loopStmt;
|
context.loopStmt = loopStmt;
|
||||||
context.dimensionsNum = getDimension(arrayToRemove);
|
context.dimensionsNum = ((SgArrayType*)arrayToRemove->type())->dimension();
|
||||||
context.arraySymbol = arrayToRemove;
|
context.arraySymbol = arrayToRemove;
|
||||||
|
|
||||||
auto filterMasks = checkImplicitAndIndirectUsage(&context);
|
auto filterMasks = checkImplicitAndIndirectUsage(&context);
|
||||||
|
|||||||
Reference in New Issue
Block a user