@@ -114,7 +114,7 @@ struct
114114 | _ -> ()));
115115 fprintf ppf "@,@]";
116116 is_global
117-
117+
118118 let compile_main ~traced_store ppf llc : unit =
119119 let open Stdlib.Format in
120120 let visited = Hash_set.create (module Tn) in
@@ -129,7 +129,7 @@ struct
129129 | For_loop { index = i; from_; to_; body; trace_it = _ } ->
130130 fprintf ppf "@[<2>for (int@ %a = %d;@ %a <= %d;@ ++%a) {@ " pp_index i from_ pp_index i
131131 to_ pp_index i;
132- if Utils.settings. debug_log_from_routines then
132+ if Utils.debug_log_from_routines () then
133133 if B.logs_to_stdout then
134134 fprintf ppf {|printf(@[<h>"%s%%d: index %a = %%d\n",@] log_id, %a);@ |}
135135 !Utils.captured_log_prefix pp_index i pp_index i
@@ -149,7 +149,7 @@ struct
149149 let loop_debug_f = debug_float tn.prec in
150150 let num_closing_braces = pp_top_locals ppf llv in
151151 let num_typ = Ops.cuda_typ_of_prec tn.prec in
152- if Utils.settings. debug_log_from_routines then (
152+ if Utils.debug_log_from_routines () then (
153153 fprintf ppf "@[<2>{@ @[<2>%s new_set_v =@ %a;@]@ " num_typ loop_f llv;
154154 let v_code, v_idcs = loop_debug_f llv in
155155 let pp_args =
@@ -186,7 +186,7 @@ struct
186186 fprintf ppf "@]@ }@,"
187187 done
188188 | Comment message ->
189- if Utils.settings. debug_log_from_routines then
189+ if Utils.debug_log_from_routines () then
190190 if B.logs_to_stdout then
191191 fprintf ppf {|printf(@[<h>"%s%%d: COMMENT: %s\n",@] log_id);@ |}
192192 !Utils.captured_log_prefix
@@ -321,7 +321,7 @@ struct
321321 (" int " ^ Indexing.symbol_ident s.Indexing.static_symbol, Static_idx s))
322322 in
323323 let log_file =
324- if Utils.settings. debug_log_from_routines then
324+ if Utils.debug_log_from_routines () then
325325 [
326326 ((if B.logs_to_stdout then " int log_id" else " const char * log_file_name" ), Log_file_name);
327327 ]
@@ -346,7 +346,7 @@ struct
346346 (* FIXME: we should also close the file. *)
347347 if (not (List.is_empty log_file)) && not B.logs_to_stdout then
348348 fprintf ppf {|FILE* log_file = fopen(log_file_name, "w");@ |};
349- if Utils.settings. debug_log_from_routines && Utils.settings.log_level > 1 then (
349+ if Utils.debug_log_from_routines () then (
350350 fprintf ppf "/* Debug initial parameter state. */@ ";
351351 List.iter
352352 ~f:(function
0 commit comments