Skip to content

Commit

Permalink
always show total inlining cost when inline_cost=true (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored Oct 11, 2024
1 parent 21044f4 commit 5a32d8a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/codeview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end
Base.CodegenParams())
highlight(io, dump, "llvm", config)
end

function cthulhu_native(io::IO, mi, ::Bool, debuginfo, world::UInt,
config::CthulhuConfig, dump_module::Bool=false, raw::Bool=false)
if dump_module
Expand Down Expand Up @@ -59,7 +59,7 @@ else
Base.CodegenParams())
highlight(io, dump, "llvm", config)
end

function cthulhu_native(io::IO, mi, src::CodeInfo, ::Bool, debuginfo, world::UInt,
config::CthulhuConfig, dump_module::Bool=false, raw::Bool=false)
if dump_module
Expand Down Expand Up @@ -223,7 +223,7 @@ function cthulhu_typed(io::IO, debuginfo::Symbol,
end

# preprinter configuration
preprinter = if src isa IRCode && inline_cost
preprinter = if inline_cost
isa(mi, MethodInstance) || throw("`mi::MethodInstance` is required")
if isa(src, IRCode)
@static if VERSION < v"1.11.0-DEV.258"
Expand Down Expand Up @@ -310,7 +310,7 @@ function cthulhu_typed(io::IO, debuginfo::Symbol,

irshow_config = IRShowConfig(preprinter, postprinter; should_print_stmt, bb_color)

if iswarn
if !inline_cost && iswarn
print(lambda_io, "Body")
InteractiveUtils.warntype_type_printer(lambda_io; type=rettype, used=true)
if get(lambda_io, :with_effects, false)::Bool
Expand Down Expand Up @@ -518,7 +518,7 @@ InteractiveUtils.code_native(b::Bookmark; kw...) =
dump_module,
raw,
)

InteractiveUtils.code_native(
io::IO,
b::Bookmark;
Expand Down Expand Up @@ -560,7 +560,7 @@ else
raw,
)
end

function InteractiveUtils.code_native(
io::IO,
b::Bookmark;
Expand Down

0 comments on commit 5a32d8a

Please sign in to comment.