Skip to content

Commit 0162b84

Browse files
committed
SSA: Fix a poor join-order and avoid SSA recomputation.
1 parent 36532bc commit 0162b84

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shared/ssa/codeql/ssa/Ssa.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,9 +1571,9 @@ module Make<LocationSig Location, InputSig<Location> Input> {
15711571
SsaPhiExt phi, SsaPhiExt phi2, BasicBlock input, boolean relevant
15721572
) {
15731573
exists(BasicBlock bb1, int i, SourceVariable v, BasicBlock bb2 |
1574-
phi.definesAt(v, bb1, i, _) and
1574+
phi.definesAt(pragma[only_bind_into](v), bb1, i, _) and
15751575
AdjacentSsaRefs::adjacentRefPhi(bb1, i, input, bb2, v) and
1576-
phi2.definesAt(v, bb2, _, _) and
1576+
phi2.definesAt(pragma[only_bind_into](v), bb2, _, _) and
15771577
if relevantPhiInputNode(phi2, input) then relevant = true else relevant = false
15781578
)
15791579
}
@@ -1614,6 +1614,7 @@ module Make<LocationSig Location, InputSig<Location> Input> {
16141614
)
16151615
}
16161616

1617+
cached
16171618
private newtype TNode =
16181619
TParamNode(DfInput::Parameter p) {
16191620
exists(WriteDefinition def | DfInput::ssaDefInitializesParam(def, p))

0 commit comments

Comments
 (0)