Merge pull request #4319 from hvitved/python-java-block-precedes-var

Java/Python: Reduce size of `blockPrecedesVar`
This commit is contained in:
Anders Schack-Mulligen
2020-09-24 16:07:49 +02:00
committed by GitHub
4 changed files with 12 additions and 6 deletions

View File

@@ -770,7 +770,9 @@ private module SsaImpl {
/** Holds if `v` occurs in `b` or one of `b`'s transitive successors. */
private predicate blockPrecedesVar(TrackedVar v, BasicBlock b) {
varOccursInBlock(v, b.getABBSuccessor*())
varOccursInBlock(v, b)
or
ssaDefReachesEndOfBlock(v, _, b)
}
/**

View File

@@ -321,7 +321,9 @@ private module SsaImpl {
/** Holds if `v` occurs in `b` or one of `b`'s transitive successors. */
private predicate blockPrecedesVar(BaseSsaSourceVariable v, BasicBlock b) {
varOccursInBlock(v, b.getABBSuccessor*())
varOccursInBlock(v, b)
or
ssaDefReachesEndOfBlock(v, _, b)
}
/**