Skip to content

Commit c994232

Browse files
committed
Shared: Try caching.
1 parent eeb9bb4 commit c994232

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

shared/controlflow/codeql/controlflow/Guards.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,12 +806,14 @@ module Make<LocationSig Location, InputSig<Location> Input> {
806806
* Calculates the transitive closure of all the guard implication steps
807807
* starting from a given set of base cases.
808808
*/
809+
cached
809810
module ImpliesTC<baseGuardValueSig/2 baseGuardValue> {
810811
/**
811812
* Holds if `tgtGuard` evaluating to `tgtVal` implies that `guard`
812813
* evaluates to `v`.
813814
*/
814815
pragma[nomagic]
816+
cached
815817
predicate guardControls(Guard guard, GuardValue v, Guard tgtGuard, GuardValue tgtVal) {
816818
baseGuardValue(tgtGuard, tgtVal) and
817819
guard = tgtGuard and
@@ -843,6 +845,7 @@ module Make<LocationSig Location, InputSig<Location> Input> {
843845
* evaluates to `v`.
844846
*/
845847
pragma[nomagic]
848+
cached
846849
predicate ssaControls(SsaDefinition def, GuardValue v, Guard tgtGuard, GuardValue tgtVal) {
847850
exists(Guard g0 |
848851
guardControls(g0, v, tgtGuard, tgtVal) and

0 commit comments

Comments
 (0)