add .mli to Scheduler

Summary: We like .mli files.

Reviewed By: ngorogiannis

Differential Revision: D21257473

fbshipit-source-id: 13c3faa77
master
Jules Villard 5 years ago committed by Facebook GitHub Bot
parent 3ebca8fd46
commit c1d603f6b2

@ -13,21 +13,12 @@ module type S = sig
type t type t
val schedule_succs : t -> CFG.Node.t -> t val schedule_succs : t -> CFG.Node.t -> t
(** schedule the successors of [node] *)
val pop : t -> (CFG.Node.t * CFG.Node.id list * t) option val pop : t -> (CFG.Node.t * CFG.Node.id list * t) option
(** remove and return the node with the highest priority, the ids of its visited predecessors, and
the new schedule *)
val empty : CFG.t -> t val empty : CFG.t -> t
end end
module type Make = functor (CFG : ProcCfg.S) -> sig
include S with module CFG = CFG
end
(** simple scheduler that visits CFG nodes in reverse postorder. fast/precise for straightline code
and conditionals; not as good for loops (may visit nodes after a loop multiple times). *)
module ReversePostorder (CFG : ProcCfg.S) = struct module ReversePostorder (CFG : ProcCfg.S) = struct
module CFG = CFG module CFG = CFG
module M = CFG.Node.IdMap module M = CFG.Node.IdMap

@ -0,0 +1,27 @@
(*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
open! IStd
module type S = sig
module CFG : ProcCfg.S
type t
val schedule_succs : t -> CFG.Node.t -> t
(** schedule the successors of [node] *)
val pop : t -> (CFG.Node.t * CFG.Node.id list * t) option
(** remove and return the node with the highest priority, the ids of its visited predecessors, and
the new schedule *)
val empty : CFG.t -> t
end
(** simple scheduler that visits CFG nodes in reverse postorder. fast/precise for straightline code
and conditionals; not as good for loops (may visit nodes after a loop multiple times). *)
module ReversePostorder (CFG : ProcCfg.S) : S with module CFG = CFG
Loading…
Cancel
Save