You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using functional() on a function that consist of a loop and a break statement throws a KeyError. I have included a minimal example below. I am using Julia version 1.10.5. This bug further causes issues in using Julia library functions like reduce as they use functions within Julia that have a loop with a break statement.
julia> using IRTools: @code_ir, functional
julia> function f()
while true break end
end
f (generic function with 1 method)
julia> functional(@code_ir f())
ERROR: KeyError: key 2 not found
Stacktrace:
[1] getindex(h::Dict{Any, Any}, key::Int64)
@ Base ./dict.jl:498
[2] functionalbranches!(bl::Any, pr::Any, labels::Any)
@ IRTools.Inner ~/Desktop/IRTools.jl/src/passes/cps.jl:31
[3] _functional(ir::Any, tree::Any, vars::Any, cs::Any)
@ IRTools.Inner ~/Desktop/IRTools.jl/src/passes/cps.jl:66
[4] _functional
@ ~/Desktop/IRTools.jl/src/passes/cps.jl:50 [inlined]
[5] _functional(ir::Any, tree::Any, vars::Any, cs::Any)
@ IRTools.Inner ~/Desktop/IRTools.jl/src/passes/cps.jl:62
[6] _functional
@ ~/Desktop/IRTools.jl/src/passes/cps.jl:50 [inlined]
[7] functional(ir::Any)
@ IRTools.Inner ~/Desktop/IRTools.jl/src/passes/cps.jl:70
[8] top-level scope
@ REPL[3]:1
The text was updated successfully, but these errors were encountered:
Using
functional()
on a function that consist of a loop and abreak
statement throws aKeyError
. I have included a minimal example below. I am using Julia version 1.10.5. This bug further causes issues in using Julia library functions likereduce
as they use functions within Julia that have a loop with abreak
statement.The text was updated successfully, but these errors were encountered: