for (ScopStmt &Stmt : Stmts)
Stmt.init(LI);
+ // Check early for a feasible runtime context.
+ if (!hasFeasibleRuntimeContext())
+ return;
+
// Check early for profitability. Afterwards it cannot change anymore,
// only the runtime context could become infeasible.
if (!isProfitable()) {
// Check late for a feasible runtime context because profitability did not
// change.
- if (!hasFeasibleRuntimeContext()) {
- invalidate(PROFITABLE, DebugLoc());
+ if (!hasFeasibleRuntimeContext())
return;
- }
}
Scop::~Scop() {
if (PollyProcessUnprofitable)
return true;
- if (!hasFeasibleRuntimeContext())
- return false;
-
if (isEmpty())
return false;