@@ -483,15 +483,6 @@ end) : CONFIG = struct
483483 | _ -> no_change
484484 end
485485 | "vector_access" , [AV_cval (vec, _); AV_cval (n, _)] -> AE_val (AV_cval (V_call (Bvaccess , [vec; n]), typ))
486- | "vector_access" , [v; AV_cval (n, _)] -> (
487- match destruct_vector ctx.tc_env (aval_typ v) with
488- | Some _ -> (
489- match cval_ctyp n with
490- | CT_fint 64 -> AE_app (Pure_extern (mk_id " fast_vector_access" ), args, typ)
491- | _ -> no_change
492- )
493- | None -> no_change
494- )
495486 | "add_int" , [AV_cval (op1, _); AV_cval (op2, _)] -> begin
496487 match destruct_range ctx.local_env typ with
497488 | None -> no_change
@@ -1452,11 +1443,6 @@ module Codegen (Config : CODEGEN_CONFIG) = struct
14521443 | cval :: _ -> sprintf " vector_access_%s" (sgen_ctyp_name (cval_ctyp cval))
14531444 | _ -> c_error " vector access function with bad arity."
14541445 end
1455- | "fast_vector_access" , _ -> begin
1456- match args with
1457- | cval :: _ -> sprintf " fast_vector_access_%s" (sgen_ctyp_name (cval_ctyp cval))
1458- | _ -> c_error " vector access function with bad arity."
1459- end
14601446 | "vector_init" , _ -> sprintf " vector_init_%s" (sgen_ctyp_name ctyp)
14611447 | "vector_update_subrange" , _ -> sprintf " vector_update_subrange_%s" (sgen_ctyp_name ctyp)
14621448 | "vector_update_subrange_inc" , _ -> sprintf " vector_update_subrange_inc_%s" (sgen_ctyp_name ctyp)
@@ -2061,19 +2047,6 @@ module Codegen (Config : CODEGEN_CONFIG) = struct
20612047 (ksprintf string " vector_access_%s(%s *rop, %s op, sail_int n)" (sgen_id id) (sgen_ctyp ctyp) (sgen_id id))
20622048 [c_stmt " int m = sail_int_get_ui(n)" ; sail_copy ~suffix: " ;" (sgen_ctyp_name ctyp) " rop, op.data[m]" ]
20632049 in
2064- let fast_vector_access =
2065- if is_stack_ctyp ctx ctyp then
2066- c_function
2067- ~return: (" static " ^ sgen_ctyp ctyp)
2068- (ksprintf string " fast_vector_access_%s(%s op, int64_t n)" (sgen_id id) (sgen_id id))
2069- [c_stmt " return op.data[n]" ]
2070- else
2071- c_function ~return: " static void"
2072- (ksprintf string " fast_vector_access_%s(%s *rop, %s op, int64_t n)" (sgen_id id) (sgen_ctyp ctyp)
2073- (sgen_id id)
2074- )
2075- [sail_copy ~suffix: " ;" (sgen_ctyp_name ctyp) " rop, op.data[n]" ]
2076- in
20772050 let internal_vector_init =
20782051 c_function ~return: " static void"
20792052 (ksprintf string " internal_vector_init_%s(%s *rop, const int64_t len)" (sgen_id id) (sgen_id id))
@@ -2132,7 +2105,6 @@ module Codegen (Config : CODEGEN_CONFIG) = struct
21322105 Impl vector_reinit;
21332106 Impl vector_undefined;
21342107 Impl vector_access;
2135- Impl fast_vector_access;
21362108 Impl vector_set;
21372109 Impl vector_update;
21382110 Impl vector_equal;
0 commit comments