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
Allow external lattice elements to properly union split #49030
Conversation
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.
@nanosoldier runbenchmarks("inference", vs=":master")
@@ -231,8 +231,7 @@ function unionsplitcost(argtypes::Union{SimpleVector,Vector{Any}}) | |||
nu = 1 | |||
max = 2 | |||
for ti in argtypes | |||
# TODO remove this to implement callsite refinement of MustAlias | |||
if isa(ti, MustAlias) && isa(widenconst(ti), Union) | |||
if !isvarargtype(ti) | |||
ti = widenconst(ti) |
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.
This widenconst
would be wasteful in the native compilation pipeline since we don't enable MustAlias
by default. Maybe we want to add a hook has_extended_unionsplit(𝕃::AbstractLattice)
to configure this widening?
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.
sure, seems reasonable
Currently `MustAlias` is the only lattice element that is allowed to widen to union types. However, there are others in external packages. Expand the support we have for this in order to allow union splitting of lattice elements.
f26ebe2
to
8f6e945
Compare
Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
@nanosoldier |
Your benchmark job has completed - successfully executed benchmarks. A full report can be found here. |
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
) Currently `MustAlias` is the only lattice element that is allowed to widen to union types. However, there are others in external packages. Expand the support we have for this in order to allow union splitting of lattice elements. Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
) Currently `MustAlias` is the only lattice element that is allowed to widen to union types. However, there are others in external packages. Expand the support we have for this in order to allow union splitting of lattice elements. Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
Currently
MustAlias
is the only lattice element that is allowed to widen to union types. However, there are others in external packages. Expand the support we have for this in order to allow union splitting of lattice elements.