Fix large return blocks with --comp-limit-blocks (#4028).

This commit is contained in:
Wilson Snyder
2023-03-16 21:40:01 -04:00
parent 4240c29f4b
commit ed1e377bb1
4 changed files with 275 additions and 0 deletions
+1
View File
@@ -93,6 +93,7 @@ private:
}
}
void visit(AstStmtExpr* nodep) override {} // Stop recursion after introducing new function
void visit(AstJumpBlock*) override {} // Stop recursion as can't break up across a jump
void visit(AstNodeStmt* nodep) override {
m_depth++;
if (m_depth > v3Global.opt.compLimitBlocks()) { // Already done