Apply suggestions from code review

Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
yoff
2020-09-10 15:06:06 +02:00
committed by GitHub
parent 2eb8ea85fb
commit 3a19b1e7fd
2 changed files with 4 additions and 3 deletions

View File

@@ -156,8 +156,7 @@ predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo) {
}
/**
* If a node `n` has a post-update node `pun(n)`, we want forward flow to go from
* `pun(n)` as well as from `n`.
* Holds if `result` is either `node`, or the post-update node for `node`.
*/
private Node update(Node node) {
exists(PostUpdateNode pun |

View File

@@ -391,7 +391,9 @@ private module SsaComputeImpl {
* between `b1` and `b2`.
*/
private predicate varBlockReaches(SsaSourceVariable v, BasicBlock b1, BasicBlock b2) {
varOccursInBlock(v, b1) and b2 = b1.getASuccessor()
varOccursInBlock(v, b1) and
b2 = b1.getASuccessor() and
blockPrecedesVar(v, b2)
or
exists(BasicBlock mid |
varBlockReaches(v, b1, mid) and