Skip to content

Commit 9c31b81

Browse files
committed
Use Cil.lenOfArray for AutoTune0.is_large_array
1 parent af5bcfa commit 9c31b81

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/autoTune0.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,9 @@ let collectFactors visitAction visitedObject =
9393

9494
let is_large_array t =
9595
match Cil.unrollType t with
96-
| TArray (_,Some (Const (CInt (i,_,_))),_) -> i > Z.of_int @@ 10 * get_int "ana.base.arrays.unrolling-factor" (* TODO: Cil.lenOfArray but with Z.t? *)
96+
| TArray (_, e, _) ->
97+
begin match Cil.lenOfArray e with (* TODO: Cil.lenOfArray but with Z.t? *)
98+
| i -> i > 10 * get_int "ana.base.arrays.unrolling-factor"
99+
| exception Cil.LenOfArray -> false
100+
end
97101
| _ -> false

0 commit comments

Comments
 (0)