Skip to content

Commit 27b81e6

Browse files
committed
Improve forking limit
1 parent 7895bd3 commit 27b81e6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎lib/forwardanalyzer.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,10 @@ namespace {
591591
branch.condTok = condTok;
592592
// The branch limit counts the branches on the way past the block, as it does for this path
593593
ft.branchCount = branchCount;
594+
// A fork that does not split uses up the fork limit as well. Otherwise the whole limit is
595+
// left for the forks that walk to the end of the range, which are the expensive ones.
596+
if (!split && branch.reachesEnd && canFork())
597+
++(*forkBudget);
594598
// A path that stopped in the block is covered if this path goes on for it
595599
Outcome stops = std::move(ft.parted);
596600
ft.parted = Outcome{};

0 commit comments

Comments
 (0)