Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always show total inlining cost when inline_cost=true #607

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading