Skip to content
Snippets Groups Projects
  • Erwan Jahier's avatar
    d783b03e
    Add a --optimize-ite/-oite option that transforms if/then/else into merge when possible. · d783b03e
    Erwan Jahier authored
    Indeed it is possible when each branch of the ite updates no memory.
    This is done in the new L2lOptimIte module.
    
    For the time being, it does detect when the node has no memory. It
    only looks at the declaration: nodes have memory, and not functions.
    
    I should infer that information and raise warnings or errors if what
    I infer is not compatible with waht is declared (will come later).
    
    Also split ActionsDep into ActionsDep and Action.
    
    Also fix a bug in L2lsplit where deeply nested (>2) merge were not
    splitted.
    d783b03e
    History
    Add a --optimize-ite/-oite option that transforms if/then/else into merge when possible.
    Erwan Jahier authored
    Indeed it is possible when each branch of the ite updates no memory.
    This is done in the new L2lOptimIte module.
    
    For the time being, it does detect when the node has no memory. It
    only looks at the declaration: nodes have memory, and not functions.
    
    I should infer that information and raise warnings or errors if what
    I infer is not compatible with waht is declared (will come later).
    
    Also split ActionsDep into ActionsDep and Action.
    
    Also fix a bug in L2lsplit where deeply nested (>2) merge were not
    splitted.
actionsDeps.mli 969 B
(** Time-stamp: <modified the 15/01/2015 (at 10:43) by Erwan Jahier> *)

(** Compute dependencies between actions  *)


type t

val empty : t

(** Linear in the size of the first parameter *)
val concat: t -> t -> t


(** Compute the action dependencies that comes from the I/O. 

    Construit des dépendances entre les actions en reliant les entrées et
    les sorties de ces actions. 

    Lic2soc.lic_to_soc_type is passed in argument to break a dep loop
*)
val build_data_deps_from_actions:  (Lic.type_ -> Data.t) -> t -> Action.t list -> t

(** Use the dependency constraints that come from the SOC (e.g., 'get' before 'set'
    in memory SOC).
*)
val generate_deps_from_step_policy: Soc.precedence list -> (string * Action.t) list -> t

(** Returns the list of actions that depends on the action in argument. *)
val find_deps: t -> Action.t -> Action.t list
val have_deps : t -> Action.t -> bool
val remove_dep :  t -> Action.t -> t

val to_string: t -> string