-
Notifications
You must be signed in to change notification settings - Fork 35
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
Better varargs are actually worse #31
Comments
That issue name 😂 Yeah, the "better" in that commit referred to a correctness improvement rather than a performance improvement 😛 Thanks for finding/cataloging these regressions, it's extremely useful. |
With #40 + JuliaLang/julia#26826 + a hack to also ignore Sigh. [1] This is a separate hack from the spoofing we're using to ignore |
Okay, JuliaLang/julia#26826 now implements the recursion limiting spoofing in a way that fixes the problem we were hacking around, so with #40 and JuliaLang/julia#26826 this becomes: julia> code_warntype(Cassette.overdub(Ctx, unsafe_load), Tuple{Ptr{Float32}})
Variables:
o<optimized out>
x1::Ptr{Float32}
i<optimized out>
Body:
begin
Core.SSAValue(119) = (typeassert)(1, Int64)::Int64
Core.SSAValue(192) = (pointerref)(x1::Ptr{Float32}, Core.SSAValue(119), 1)::Any
return Core.SSAValue(192)
end::Any |
Yay, looking good. Any idea which limit/deficiency prevents |
The problem was that intrinsics don't each have their own type - they're all of type Leveraging this required refactoring Cassette's overdub implementation a bit (#41), because storing the function in an intermediate |
closed by #41 |
After ecbe4d9 the following example fails to inline calls to
overdub
:Before:
After:
For reference, the non-overdubbed IR:
cc @cfoket
The text was updated successfully, but these errors were encountered: