Skip to content

Conversation

tlively
Copy link
Member

@tlively tlively commented Sep 8, 2025

CFP takes advantage of exact type information, but it currently does so
only for immutable fields. It is also unnecessarily conservative about
how it propagates type information so that sets to a type inhibit
optimizations of its sibling types, even though those sets cannot
possibly affect the siblings.

Add tests for these cases to demonstrate the benefit of follow-on PRs
that will fix these issues.

CFP takes advantage of exact type information, but it currently does so
only for immutable fields. It is also unnecessarily conservative about
how it propagates type information so that sets to a type inhibit
optimizations of its sibling types, even though those sets cannot
possibly affect the siblings.

Add tests for these cases to demonstrate the benefit of follow-on PRs
that will fix these issues.
@tlively tlively requested a review from kripken September 8, 2025 21:31
@tlively tlively enabled auto-merge (squash) September 8, 2025 22:21
(struct.get $A 0
(local.get $A-exact)
)
)
Copy link
Member

Choose a reason for hiding this comment

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

To be sure I follow, we can (in principle) optimize $A because there is no inexact set of it anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. The only value that has ever been written to an (exact $A) is the value it was allocated with.

@tlively tlively merged commit 882eafe into main Sep 8, 2025
16 checks passed
@tlively tlively deleted the cfp-missing-opts-tests branch September 8, 2025 23:37
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.

2 participants