Python: add missing * (and a rename)

This commit is contained in:
Rasmus Lerchedahl Petersen
2020-09-14 16:56:46 +02:00
parent ecc5a4a1f6
commit 4c02852358
2 changed files with 4 additions and 6 deletions

View File

@@ -178,9 +178,9 @@ class BarrierGuard extends GuardNode {
/** Gets a node guarded by this guard. */
final ExprNode getAGuardedNode() {
exists(EssaDefinition def, ControlFlowNode node, boolean branch |
AdjacentUses::aUse(def, node) and
AdjacentUses::useOfDef(def, node) and
this.checks(node, branch) and
AdjacentUses::aUse(def, result.asCfgNode()) and
AdjacentUses::useOfDef(def, result.asCfgNode()) and
this.controlsBlock(result.asCfgNode().getBasicBlock(), branch)
)
}

View File

@@ -506,12 +506,10 @@ private module SsaComputeImpl {
* Holds if the value defined at `def` can reach `use`, possibly through phi nodes.
*/
cached
predicate aUse(EssaDefinition def, ControlFlowNode use) {
firstUse(def, use)
or
predicate useOfDef(EssaDefinition def, ControlFlowNode use) {
exists(ControlFlowNode firstUse |
firstUse(def, firstUse) and
adjacentUseUse(firstUse, use)
adjacentUseUse*(firstUse, use)
)
}
}