package jasmin
Compiler for High-Assurance and High-Speed Cryptography
Install
dune-project
Dependency
Authors
Maintainers
Sources
jasmin-compiler-v2025.06.1.tar.bz2
sha256=e92b42fa69da7c730b0c26dacf842a72b4febcaf4f2157a1dc18b3cce1f859fa
doc/src/jasmin.jasmin/removeUnusedResults.ml.html
Source file removeUnusedResults.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
open Utils open Prog let used_results (live: Sv.t) : lvals -> Sint.t = List.fold_lefti (fun s i -> function | Lnone _ -> s | Lvar x -> if Sv.mem (L.unloc x) live then Sint.add i s else s | (Lmem _ | Laset _ | Lasub _) -> Sint.add i s ) Sint.empty let analyse funcs = let liveness_table : (Sv.t * Sv.t, 'asm) func Hf.t = Hf.create 17 in List.iter (fun (_,f) -> Hf.add liveness_table f.f_name (Liveness.live_fd false f)) funcs; let live_results = let live : Sint.t Hf.t = Hf.create 17 in let cbf _loc fn xs (_, s) = let r = used_results s xs in Hf.modify_def Sint.empty fn (Sint.union r) live in let cbs _loc _fn _xs _ = () in Hf.iter (fun _fn -> Liveness.iter_call_sites cbf cbs) liveness_table; fun fn -> Hf.find_default live fn Sint.empty in let live = Hf.create 17 in let add (_,fd) = let info = if FInfo.is_export fd.f_cc then None else let keep = live_results fd.f_name in let keep = List.mapi (fun i _ -> Sint.mem i keep) fd.f_ret in if List.for_all (fun x -> x) keep then None else Some keep in Hf.add live fd.f_name info in List.iter add funcs; fun fn -> Hf.find_default live fn None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>