Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions llvm/lib/CheerpWriter/PartialExecuter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1699,8 +1699,10 @@ void PartialInterpreter::visitOuter(FunctionData& data, llvm::Instruction& I)
{
BasicBlock* next = findNextBasicBlock(I);

if (next)
if (next && data.getVisitCounter(next) < MAX_NUMBER_OF_VISITS_PER_BB)
{
data.incrementVisitCounter(next);

// We know where execution should proceed
incomingBB = I.getParent();
getTopCallFrame().CurBB = next;
Expand All @@ -1709,10 +1711,7 @@ void PartialInterpreter::visitOuter(FunctionData& data, llvm::Instruction& I)
// Also here we have set the proper state for the execution so we can return
return;
}
else
{
skip = true;
}
skip = true;
}

if (addToCounter(I.getFunction()))
Expand Down