mirror of
https://github.com/github/codeql.git
synced 2026-04-19 05:54:00 +02:00
C#: Fix bad join-orders following stats update
This commit is contained in:
@@ -165,14 +165,16 @@ module DefUse {
|
||||
(
|
||||
exists(int last | last = max(refRank(bb, _, v, _)) | defReachesRank(bb, vu, last, v))
|
||||
or
|
||||
exists(BasicBlock pred |
|
||||
pred = bb.getAPredecessor() and
|
||||
defReachesEndOfBlock(pred, vu, v) and
|
||||
not exists(refRank(bb, _, v, Write()))
|
||||
)
|
||||
defReachesStartOfBlock(bb, vu, v) and
|
||||
not exists(refRank(bb, _, v, Write()))
|
||||
)
|
||||
}
|
||||
|
||||
pragma[noinline]
|
||||
private predicate defReachesStartOfBlock(BasicBlock bb, VariableUpdate vu, StackVariable v) {
|
||||
defReachesEndOfBlock(bb.getAPredecessor(), vu, v)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if the variable update `vu` of stack variable `v` reaches `read` in the
|
||||
* same basic block without crossing another update of `v`.
|
||||
|
||||
@@ -1130,7 +1130,7 @@ module Ssa {
|
||||
exists(Expr mid | reachesDelegateCall(mid) | delegateFlowStep(e, mid))
|
||||
}
|
||||
|
||||
pragma[noinline]
|
||||
pragma[nomagic]
|
||||
private predicate delegateFlowStepReaches(Expr pred, Expr succ) {
|
||||
delegateFlowStep(pred, succ) and
|
||||
reachesDelegateCall(succ)
|
||||
|
||||
Reference in New Issue
Block a user