- Timestamp:
- Feb 27, 2013, 5:42:59 PM (8 years ago)
- Location:
- extracted
- Files:
-
- 2 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extracted/untrusted/build.ml
r2740 r2742 4 4 open Untrusted_interference 5 5 6 let build globals int_fun liveafter =6 let build globals int_fun uses liveafter = 7 7 8 8 (* Create an interference graph whose vertices are the procedure's 9 9 pseudo-registers. This graph initially has no edges. *) 10 10 11 (*CSC: we are not precise here, we take all the pseudoregisters in the12 universe; we could compute the set by iteration over the code *)13 11 let f_locals = 14 let first_fresh = int_fun.Joint.joint_if_luniverse in 15 let rec aux n = 16 if Positive.eqb0 n first_fresh = Bool.True then 17 Pset.empty 18 else 19 Pset.add n (aux (Positive.succ n)) 20 in 21 aux Positive.One in 12 Identifiers.foldi0 PreIdentifiers.RegisterTag 13 (fun id _ map -> Pset.add id map 14 ) uses Pset.empty in 22 15 23 16 let graph = create f_locals in -
extracted/untrusted/build.mli
r2740 r2742 9 9 AST.ident List.list -> 10 10 Joint.joint_internal_function -> 11 Fixpoints.valuation -> 12 Untrusted_interference.graph 11 Positive.pos Identifiers.identifier_map -> 12 Fixpoints.valuation -> 13 Untrusted_interference.graph -
extracted/untrusted/compute_colouring.ml
r2740 r2742 5 5 it. Define a function that allows consulting the coloring. *) 6 6 7 let uses = Uses.examine_internal globals int_fun in 8 7 9 let module G = struct 8 let graph = Build.build globals int_fun liveafter 9 let uses = Uses.examine_internal int_fun 10 let graph = Build.build globals int_fun uses liveafter 11 let uses = 12 (fun r -> 13 Glue.int_of_matitapos 14 (Identifiers.lookup_safe PreIdentifiers.RegisterTag uses r)) 10 15 let verbose = false 11 16 (* -
extracted/untrusted/glue.ml
r2740 r2742 11 11 aux 1 (Vector.reverse0 Nat.O v) 12 12 13 let rec int_of_matitapos = 14 function 15 Positive.One -> 1 16 | Positive.P0 v -> int_of_matitapos v * 2 17 | Positive.P1 v -> int_of_matitapos v * 2 + 1 18 13 19 let option_of_matitaoption = 14 20 function -
extracted/untrusted/glue.mli
r2740 r2742 1 1 val int_of_bitvector : BitVector.bitVector -> int 2 3 val int_of_matitapos : Positive.pos -> int 2 4 3 5 val option_of_matitaoption: 'a Types.option -> 'a option
Note: See TracChangeset
for help on using the changeset viewer.