Merge pull request #19185 from hvitved/rust/ssa-capture-psudeo-read-dominate

Rust: Fix `capturedCallRead`
This commit is contained in:
Tom Hvitved
2025-04-02 19:16:55 +02:00
committed by GitHub
5 changed files with 95 additions and 100 deletions

View File

@@ -1412,13 +1412,12 @@ module Make<LocationSig Location, InputSig<Location> Input> {
}
/** Holds if `phi` has less than 2 immediately prior references. */
query predicate phiWithoutTwoPriorRefs(PhiNode phi, int inputRefs) {
exists(BasicBlock bbPhi, SourceVariable v |
phi.definesAt(v, bbPhi, _) and
inputRefs =
count(BasicBlock bb, int i | AdjacentSsaRefs::adjacentRefPhi(bb, i, _, bbPhi, v)) and
inputRefs < 2
)
query predicate phiWithoutTwoPriorRefs(
PhiNode phi, BasicBlock bbPhi, SourceVariable v, int inputRefs
) {
phi.definesAt(v, bbPhi, _) and
inputRefs = count(BasicBlock bb, int i | AdjacentSsaRefs::adjacentRefPhi(bb, i, _, bbPhi, v)) and
inputRefs < 2
}
/**