Skip to content

Conversation

@aviatesk
Copy link
Member

@aviatesk aviatesk commented Aug 1, 2025

According to Jameson's comment, we should propagate LimitedAccuracy information not only when we actually use the type information of variables that are LimitedAccuracy, but also when we perform computations involving variables that are LimitedAccuracy. This commit implements that propagation in relation to #59182.

According to Jameson's comment, we should propagate `LimitedAccuracy`
information not only when we actually use the type information of
variables that are `LimitedAccuracy`, but also when we perform
computations involving variables that are `LimitedAccuracy`. This commit
implements that propagation in relation to #59182.
@aviatesk aviatesk requested a review from vtjnash August 1, 2025 19:48
@aviatesk aviatesk changed the title inference: propagate more LimitedAccuracy information more inference: propagate more LimitedAccuracy information Aug 1, 2025
function may_form_limited_typ(@nospecialize(aty), @nospecialize(bty), @nospecialize(xty))
if aty isa LimitedAccuracy
if bty isa LimitedAccuracy
return LimitedAccuracy(xty, union!(copy(aty.causes), bty.causes))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. As a followup improvement, note that this actually should be intersect for more accuracy, which we could implement by changing causes to a number (the frame/cycle id) and use min/max on that

@aviatesk aviatesk merged commit 94cc996 into master Aug 2, 2025
9 checks passed
@aviatesk aviatesk deleted the avi/follow-up-59182 branch August 2, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants