Skip to content

Commit 41de038

Browse files
committed
Shared: Try caching.
1 parent 4a95454 commit 41de038

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
@@ -807,12 +807,14 @@ module Make<LocationSig Location, InputSig<Location> Input> {
807807
* Calculates the transitive closure of all the guard implication steps
808808
* starting from a given set of base cases.
809809
*/
810+
cached
810811
module ImpliesTC<baseGuardValueSig/2 baseGuardValue> {
811812
/**
812813
* Holds if `tgtGuard` evaluating to `tgtVal` implies that `guard`
813814
* evaluates to `v`.
814815
*/
815816
pragma[nomagic]
817+
cached
816818
predicate guardControls(Guard guard, GuardValue v, Guard tgtGuard, GuardValue tgtVal) {
817819
baseGuardValue(tgtGuard, tgtVal) and
818820
guard = tgtGuard and
@@ -844,6 +846,7 @@ module Make<LocationSig Location, InputSig<Location> Input> {
844846
* evaluates to `v`.
845847
*/
846848
pragma[nomagic]
849+
cached
847850
predicate ssaControls(SsaDefinition def, GuardValue v, Guard tgtGuard, GuardValue tgtVal) {
848851
exists(Guard g0 |
849852
guardControls(g0, v, tgtGuard, tgtVal) and

0 commit comments

Comments
 (0)