We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
is_type_unstable
As discussed in #193, the current implementation of is_type_unstable may not work well for unoptimized code.
Especially, it doesn't handle lhs = rhs statements where rhs is type unstable:
lhs = rhs
rhs
julia> const globalvar = Ref(42) Base.RefValue{Int64}(42) julia> descend(; optimize=false) do a = sin(globalvar[]) b = sin(undefvar) return (a, b) end │ ─ %-1 = invoke #3()::Tuple{Float64, Any} @ REPL[4]:2 within `#3` 1 ─ %1 = Base.getindex(Main.globalvar)::Int64 │ (a = Main.sin(%1))::Float64 │ @ REPL[4]:3 within `#3` │ (b = Main.sin(Main.undefvar))::Any │ @ REPL[4]:4 within `#3` │ %4 = Core.tuple(a, b)::Tuple{Float64, Any} └── return %4 Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark. Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [i]nlining costs, [s]yntax highlight for Source/LLVM/Native. Show: [S]ource code, [A]ST, [L]LVM IR, [N]ative code Actions: [E]dit source code, [R]evise and redisplay Advanced: dump [P]arams cache. • %1 = getindex(::Base.RefValue{Int64})::Int64 %2 = sin(::Int64)::Float64 ↩ # toggle `h` option │ ─ %-1 = invoke #3()::Tuple{Float64, Any} │ @ REPL[4]:4 within `#3` │ %4 = Core.tuple(a, b)::Tuple{Float64, Any} Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark. Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [i]nlining costs, [s]yntax highlight for Source/LLVM/Native. Show: [S]ource code, [A]ST, [L]LVM IR, [N]ative code Actions: [E]dit source code, [R]evise and redisplay Advanced: dump [P]arams cache. • %1 = getindex(::Base.RefValue{Int64})::Int64 %2 = sin(::Int64)::Float64 ↩
, where we still want (b = Main.sin(Main.undefvar))::Any to be shown even on h mode.
(b = Main.sin(Main.undefvar))::Any
As additional information, I found it idx in used returns false for that case:
idx in used
false
Cthulhu.jl/src/codeview.jl
Line 76 in 93743cb
The text was updated successfully, but these errors were encountered:
fix #195: don't hide type-unstable slots
43ac4e2
3e27645
simeonschaub
No branches or pull requests
As discussed in #193, the current implementation of
is_type_unstable
may not work well for unoptimized code.Especially, it doesn't handle
lhs = rhs
statements whererhs
is type unstable:, where we still want
(b = Main.sin(Main.undefvar))::Any
to be shown even on h mode.As additional information, I found it
idx in used
returnsfalse
for that case:Cthulhu.jl/src/codeview.jl
Line 76 in 93743cb
The text was updated successfully, but these errors were encountered: