-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C#: Speedup Assertions::strictlyDominates()
and ControlFlowElement::controlsBlock()
#638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C#: Speedup Assertions::strictlyDominates()
and ControlFlowElement::controlsBlock()
#638
Conversation
…::controlsBlock()` Only calculate dominance by explicit recursion for split nodes; all other nodes can use regular CFG dominance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moroever -> Moreover
) | ||
else | ||
this.strictlyDominates(bb.getAPredecessor()) | ||
this.getAControlFlowNode().getBasicBlock().strictlyDominates(bb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Add missing tests for DatabaseSql function models
Only calculate dominance by explicit recursion for split nodes; all other nodes can use regular CFG dominance.