From 54a6b5d1a90b7304817175a33fc37444e559b11e Mon Sep 17 00:00:00 2001 From: Son Ho Date: Wed, 14 Dec 2022 16:48:35 +0100 Subject: Compute the SCCs of the functions to extract in Translate.ml --- compiler/SCC.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'compiler/SCC.ml') 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 -- cgit v1.2.3