Merge pull request #20558 from aschackmull/csharp/guards3

C#: Instantiate shared Guards and shared ControlFlowReachability and replace nullness
This commit is contained in:
Anders Schack-Mulligen
2025-10-23 08:43:14 +02:00
committed by GitHub
70 changed files with 7008 additions and 14285 deletions

View File

@@ -336,6 +336,9 @@ class SsaPhiNode extends SsaVariable instanceof PhiNode {
/** Gets an input to the phi node defining the SSA variable. */
SsaVariable getAPhiInput() { this.hasInputFromBlock(result, _) }
/** Gets an input to the phi node defining the SSA variable. */
SsaVariable getAnInput() { this.hasInputFromBlock(result, _) }
/** Holds if `inp` is an input to the phi node along the edge originating in `bb`. */
predicate hasInputFromBlock(SsaVariable inp, BasicBlock bb) {
phiHasInputFromBlock(this, inp, bb)

View File

@@ -366,6 +366,9 @@ class BaseSsaPhiNode extends BaseSsaVariable instanceof Impl::PhiNode {
/** Gets an input to the phi node defining the SSA variable. */
BaseSsaVariable getAPhiInput() { this.hasInputFromBlock(result, _) }
/** Gets an input to the phi node defining the SSA variable. */
BaseSsaVariable getAnInput() { this.hasInputFromBlock(result, _) }
/** Holds if `inp` is an input to the phi node along the edge originating in `bb`. */
predicate hasInputFromBlock(BaseSsaVariable inp, BasicBlock bb) {
phiHasInputFromBlock(this, inp, bb)