-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Introduce temporary if necessary to inline _apply
#21069
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
Conversation
@nanosoldier |
base/inference.jl
Outdated
tmpv = aarg | ||
else | ||
# apply(f,t::(x,y)) => tmp=t; f(tmp[1],tmp[2]) | ||
tmpv = add_slot!(sv.src, t, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should use newvar!
and make an SSAValue instead. (That function is badly named; should be e.g. new_ssavalue
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated accordingly.
I wasn't sure whether the Also, what's a good way to test this PR? Inspect |
Added a test, but it does look a bit messy... |
Looks fine to me. There is a test kind of similar to this in test/inline.jl, but we usually just test performance and behavior. Keeping the |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels |
would have been better to squash merge this |
[release-0.5] Backport of #21069
With
master:
this PR:
Fixes #21065 and makes #21067 (almost?) obsolete. (The "almost" being a matter of inlining
promote
,promote_type
, andconvert
, where #21067 might still be advantageous.)