From 3fb58c4bb7dd1ce342887008ce5133c51b420e38 Mon Sep 17 00:00:00 2001 From: Prem Chintalapudi Date: Mon, 19 Jun 2023 11:00:43 -0400 Subject: [PATCH] Set debug level to 1 in code_llvm --- src/aotcompile.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp index d89ee519ed6944..4573d68b0649ca 100644 --- a/src/aotcompile.cpp +++ b/src/aotcompile.cpp @@ -2088,8 +2088,10 @@ void jl_get_llvmf_defn_impl(jl_llvmf_dump_t* dump, jl_method_instance_t *mi, siz // differ very significantly from the actual non-imaging mode code. // // Force imaging mode for names of pointers // output.imaging = true; - // Force max debug info for introspection - output.debug_level = 2; + // Force at least medium debug info for introspection + // No debug info = no variable names, + // max debug info = llvm.dbg.declare/value intrinsics which clutter IR output + output.debug_level = std::max(1, jl_options.debug_level); auto decls = jl_emit_code(m, mi, src, jlrettype, output); JL_UNLOCK(&jl_codegen_lock); // Might GC