Skip to content

Commit 3bf424b

Browse files
committed
CFG: Prune ConditionalCompletionSplitting for unnecessary splits
1 parent a1b7096 commit 3bf424b

File tree

1 file changed

+4
-1
lines changed
  • shared/controlflow/codeql/controlflow

1 file changed

+4
-1
lines changed

shared/controlflow/codeql/controlflow/Cfg.qll

+4-1
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,10 @@ module MakeWithSplitting<
12601260
last(parent, succ, completion) and
12611261
condPropagateExpr(parent, completion, child, c) and
12621262
succ(pred, succ, c) and
1263-
last(child, pred, c)
1263+
last(child, pred, c) and
1264+
// no need to create split if `succ` can only complete with the
1265+
// recorded completion
1266+
not completion = unique(ConditionalCompletion c0 | last(parent, succ, c0))
12641267
)
12651268
}
12661269

0 commit comments

Comments
 (0)