Skip to content

Commit e2ed087

Browse files
committed
Cache Go IR write-target construction
Avoid repeatedly evaluating the CFG-to-AST write-target mapping. Cold ReflectedXss profiles on CockroachDB and AWS reduce MkLhs domain evaluation from seven runs to one, with lower aggregate IR predicate time. End-to-end timings remain noisy. Validated with 220 Go control-flow/data-flow tests including consistency queries, and identical full BQRS results on both databases.
1 parent e5403b2 commit e2ed087

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • go/ql/lib/semmle/go/controlflow

go/ql/lib/semmle/go/controlflow/IR.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,7 @@ module IR {
10721072
}
10731073

10741074
/** A representation of the target of a write instruction. */
1075+
cached
10751076
newtype TWriteTarget =
10761077
/** A left-hand side of an assignment. */
10771078
MkLhs(ControlFlow::Node write, Expr lhs) {

0 commit comments

Comments
 (0)