C#: Speedup Assertions::strictlyDominates() and ControlFlowElement::controlsBlock()#638
Merged
calumgrant merged 2 commits intogithub:masterfrom Dec 18, 2018
Merged
Conversation
…::controlsBlock()` Only calculate dominance by explicit recursion for split nodes; all other nodes can use regular CFG dominance.
calumgrant
suggested changes
Dec 17, 2018
Contributor
calumgrant
left a comment
There was a problem hiding this comment.
One typo, and one suggestion/question.
| * This predicate is different from | ||
| * `this.getAControlFlowNode().getBasicBlock().(ConditionBlock).immediatelyControls(succ, s)` | ||
| * in that it takes control flow splitting into account. | ||
| * Moroever, this control flow element corresponds to multiple control flow nodes, |
| ) | ||
| else | ||
| this.strictlyDominates(bb.getAPredecessor()) | ||
| this.getAControlFlowNode().getBasicBlock().strictlyDominates(bb) |
Contributor
There was a problem hiding this comment.
This does make sense - my only question is whether strictlyDominates belongs in this class - as it seems to be a very general predicate that isn't necessarily tied to class Assertion. Perhaps it should be reversed to bb.isDominatedBy(this) and implemented there?
Contributor
Author
There was a problem hiding this comment.
The problem with that approach is that there is then no restriction on the control flow elements to calculate dominance for, and the result will simply be too big. By adding it here, we restrict the calculation to assertions, which is a much smaller subset.
calumgrant
approved these changes
Dec 18, 2018
cklin
pushed a commit
that referenced
this pull request
May 23, 2022
Add missing tests for DatabaseSql function models
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.
Only calculate dominance by explicit recursion for split nodes; all other nodes can use regular CFG dominance.