improved
This commit is contained in:
@@ -207,6 +207,12 @@ static inline bool hasGoto(SgStatement *begin, SgStatement *end,
|
|||||||
has = true;
|
has = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (curr->variant() == RETURN_STAT)
|
||||||
|
{
|
||||||
|
linesOfIntGoTo.push_back(curr->lineNumber());
|
||||||
|
has = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (curr->variant() == CYCLE_STMT)
|
if (curr->variant() == CYCLE_STMT)
|
||||||
cycleStmts.push_back(curr->lineNumber());
|
cycleStmts.push_back(curr->lineNumber());
|
||||||
curr = curr->lexNext();
|
curr = curr->lexNext();
|
||||||
@@ -643,7 +649,7 @@ void loopGraphAnalyzer(SgFile *file, vector<LoopGraph*> &loopGraph, const vector
|
|||||||
newLoop->perfectLoop = countPerfectLoopNest(st);
|
newLoop->perfectLoop = countPerfectLoopNest(st);
|
||||||
newLoop->hasGoto = hasGoto(st, st->lastNodeOfStmt(), newLoop->linesOfInternalGoTo, newLoop->linesOfExternalGoTo, labelsRef, newLoop->linesOfCycle);
|
newLoop->hasGoto = hasGoto(st, st->lastNodeOfStmt(), newLoop->linesOfInternalGoTo, newLoop->linesOfExternalGoTo, labelsRef, newLoop->linesOfCycle);
|
||||||
newLoop->hasPrints = hasThisIds(st, newLoop->linesOfIO, { WRITE_STAT, READ_STAT, OPEN_STAT, CLOSE_STAT, PRINT_STAT } ); // FORMAT_STAT
|
newLoop->hasPrints = hasThisIds(st, newLoop->linesOfIO, { WRITE_STAT, READ_STAT, OPEN_STAT, CLOSE_STAT, PRINT_STAT } ); // FORMAT_STAT
|
||||||
newLoop->hasStops = hasThisIds(st, newLoop->linesOfStop, { STOP_STAT, PAUSE_NODE, RETURN_STAT });
|
newLoop->hasStops = hasThisIds(st, newLoop->linesOfStop, { STOP_STAT, PAUSE_NODE });
|
||||||
newLoop->hasDvmIntervals = hasThisIds(st, tmpLines, { DVM_INTERVAL_DIR, DVM_ENDINTERVAL_DIR, DVM_EXIT_INTERVAL_DIR });
|
newLoop->hasDvmIntervals = hasThisIds(st, tmpLines, { DVM_INTERVAL_DIR, DVM_ENDINTERVAL_DIR, DVM_EXIT_INTERVAL_DIR });
|
||||||
newLoop->isFor = isSgForStmt(st) ? true : false;
|
newLoop->isFor = isSgForStmt(st) ? true : false;
|
||||||
newLoop->inCanonicalFrom = isSgForStmt(st) ? true : false;
|
newLoop->inCanonicalFrom = isSgForStmt(st) ? true : false;
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION_SPF "2296"
|
#define VERSION_SPF "2298"
|
||||||
|
|||||||
Reference in New Issue
Block a user