private_removing: small fix
This commit is contained in:
@@ -354,8 +354,9 @@ static FuncInfo* getCurrentFunc(SgStatement* stmt, const map<string, vector<Func
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// fillIterationVariables fill vars set with iteration variables of all loops
|
||||
// from stmt to outerLoopStmt
|
||||
// fillIterationVariables fills SgSymbol* set with iteration variables of all loops
|
||||
// from stmt to outerLoopStmt. If outerLoopStmt is nullptr, it fill with iteration variables
|
||||
// from all outer loops
|
||||
static void fillIterationVars(SgStatement* stmt, SgStatement* outerLoopStmt, vector<SgSymbol*>& vars)
|
||||
{
|
||||
if (stmt == nullptr)
|
||||
@@ -364,7 +365,7 @@ static void fillIterationVars(SgStatement* stmt, SgStatement* outerLoopStmt, vec
|
||||
if (stmt->variant() == FOR_NODE)
|
||||
vars.push_back(((SgForStmt*)stmt)->doName());
|
||||
|
||||
if (stmt->id() != outerLoopStmt->id())
|
||||
if (stmt != outerLoopStmt)
|
||||
fillIterationVars(stmt->controlParent(), outerLoopStmt, vars);
|
||||
}
|
||||
|
||||
@@ -2100,7 +2101,7 @@ static bool checkDefUsePair(Context* ctx, const DefUseStmtsPair& defUse, const C
|
||||
}
|
||||
|
||||
vector<SgSymbol*> iterationVars{};
|
||||
fillIterationVars(defUse.second, ctx->loopStmt, iterationVars);
|
||||
fillIterationVars(defUse.second, nullptr, iterationVars);
|
||||
|
||||
auto defInsAndBlock = getInstructionAndBlockByStatement(CFGraph, defUse.first);
|
||||
const auto& defRD_In = defInsAndBlock.second->getRD_In();
|
||||
|
||||
Reference in New Issue
Block a user