Skip to content
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

If-merge optimizations #1618

Merged
merged 2 commits into from
Jun 20, 2024
Merged

Conversation

housel
Copy link
Member

@housel housel commented Jun 19, 2024

These changes improve the compiler's type estimation of certain types of if expressions.

These changes fix missed cases where type-constrained values in if
tests and instance? tests were substituted in the left (consequent)
side of the if body computations, but not in the left side of the if
merge.

* sources/dfmc/optimization/assignment.dylan
  (maybe-rename-temporaries-in-conditional): Substitute the
   type-constrained value when the <if> test value appears in the left
   side of the <if-merge>.

* sources/dfmc/optimization/calls.dylan
  (do-optimize-instance?-user): Substitute the type-constrained value
   when the <if> instance? test value appears in the left side of the
   <if-merge>.
@cgay
Copy link
Member

cgay commented Jun 19, 2024

Is it possible to make a small enough example of what the improvement does to fit in the release notes?

* documentation/source/release-notes/2024.2.rst: Add entry to Compiler
  section.
@housel housel merged commit aa565dc into dylan-lang:master Jun 20, 2024
2 of 3 checks passed
@housel housel deleted the if-merge-optimizations branch June 20, 2024 14:18
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