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
IRShow: Print arg0 type when necessary to disambiguate invoke (JuliaLang#58893)
When invoking any "functor-like", such as a closure:
```julia
bar(x) = @noinline ((y)->x+y)(x)
```
our IR printing was not showing the arg0 invoked, even when it is
required to determine which MethodInstance this is invoking.
Before:
```julia
julia> @code_typed optimize=true bar(1)
CodeInfo(
1 ─ %1 = %new(var"#bar#mmtk#2#bar#mmtk#3"{Int64}, x)::var"#bar#mmtk#2#bar#mmtk#3"{Int64}
│ %2 = invoke %1(x::Int64)::Int64
└── return %2
) => Int64
```
After:
```julia
julia> @code_typed optimize=true bar(1)
CodeInfo(
1 ─ %1 = %new(var"#bar#mmtk#2#bar#mmtk#3"{Int64}, x)::var"#bar#mmtk#2#bar#mmtk#3"{Int64}
│ %2 = invoke (%1::var"#bar#mmtk#2#bar#mmtk#3"{Int64})(x::Int64)::Int64
└── return %2
) => Int64
```
0 commit comments