Skip to content

Commit

Permalink
Fix CFGWalker issue in single-threaded mode (#6573)
Browse files Browse the repository at this point in the history
In that mode a walk on an entire module will reuse the same CFGWalker
instance, so we must manually clear some fields, and we forgot some
before.
  • Loading branch information
XMadrid committed May 9, 2024
1 parent a288a73 commit 712ad9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cfg/cfg-traversal.h
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ struct CFGWalker : public PostWalker<SubType, VisitorType> {
void doWalkFunction(Function* func) {
basicBlocks.clear();
debugIds.clear();
exit = nullptr;
hasSyntheticExit = false;

startBasicBlock();
entry = currBasicBlock;
Expand Down

0 comments on commit 712ad9d

Please sign in to comment.