C++: Remove redundant transitive closure#21314
Merged
MathiasVP merged 1 commit intogithub:mainfrom Feb 12, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Reduces the risk of catastrophic compiler behavior on very large C++ codebases by simplifying the flowsToBackEdge predicate in the internal IR dataflow utilities, aiming to avoid constructing an overly large transitive closure.
Changes:
- Removes a transitive-closure-based condition from
flowsToBackEdge. - Replaces the previous successor/dominance combination with a single
strictlyDominatesdominance check.
aschackmull
approved these changes
Feb 12, 2026
Contributor
aschackmull
left a comment
There was a problem hiding this comment.
I agree, this certainly looks redundant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
doublyBoundedFastTCproduced by the compiler for this transitive closure was too large and failed withcaught com.semmle.util.exception.CatastrophicError: Failed to expand RoaringCharList of size 2147483638 to make space for 3 more elements while evaluatingon a very large Microsoft repository.This makes sense as the end-points for this transitive closure aren't really very restricted. However, luckily this whole transitive closure should be redundant since we have SSA flow from an element in
bb1to another element inbb2, and sobb2should be a control-flow successor ofbb2by the correctness of SSA.