summaryrefslogtreecommitdiff
path: root/compiler/SCC.ml
diff options
context:
space:
mode:
authorSon Ho2022-12-14 16:48:35 +0100
committerSon HO2023-02-03 11:21:46 +0100
commit54a6b5d1a90b7304817175a33fc37444e559b11e (patch)
tree77a5836aeb6a72b93a9f285771b64e45377d805f /compiler/SCC.ml
parentcdd5fa0e6d911174413a726029f91713963e9871 (diff)
Compute the SCCs of the functions to extract in Translate.ml
Diffstat (limited to 'compiler/SCC.ml')
-rw-r--r--compiler/SCC.ml12
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/SCC.ml b/compiler/SCC.ml
index 8b4cdb1f..889a972b 100644
--- a/compiler/SCC.ml
+++ b/compiler/SCC.ml
@@ -3,6 +3,9 @@
open Collections
module SccId = Identifiers.IdGen ()
+(** The local logger *)
+let log = Logging.scc_log
+
(** A functor which provides functions to work on strongly connected components *)
module Make (Id : OrderedType) = struct
module IdMap = MakeMap (Id)
@@ -91,6 +94,15 @@ module Make (Id : OrderedType) = struct
*)
let reorder_sccs (id_deps : Id.t list IdMap.t) (ids : Id.t list)
(sccs : Id.t list list) : sccs =
+ log#ldebug
+ (lazy
+ ("reorder_sccs:" ^ "\n- id_deps: "
+ ^ IdMap.show (Print.list_to_string Id.show_t) id_deps
+ ^ "\n- ids: "
+ ^ Print.list_to_string Id.show_t ids
+ ^ "\n- sccs: "
+ ^ Print.list_to_string (Print.list_to_string Id.show_t) sccs));
+
(* Map the identifiers to the SCC indices *)
let id_to_scc =
IdMap.of_list