Skip to content

Inline fixed point combinators by default #6841

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Feb 13, 2025
Merged

Inline fixed point combinators by default #6841

merged 2 commits into from
Feb 13, 2025

Conversation

zliu41
Copy link
Member

@zliu41 zliu41 commented Feb 12, 2025

I made an earlier attempt (ab4f285) to allow configuring the aggressiveness of the UPLC inliner, but that didn't work too well, because the size increase is too unpredictable and erratic.

So instead this PR enables inlining just the fixed point combinators. This seems preferable in most cases, and when it does increase script size, the increase is quite mild. So it is on by default. Can be turned off via no-inline-fix or conservative-optimisation.

@zliu41 zliu41 requested review from effectfully and a team February 12, 2025 21:34
@Unisay
Copy link
Contributor

Unisay commented Feb 13, 2025

I wonder if we should make this mechanism more general, e.g.
UPLC inliner decisions are driven by annotations on individual functions, rather than flags/options. The reason being is that next time we want to instruct UPLC inliner on how to treat another function we won't have to add another flag.

@zliu41 zliu41 merged commit d05da89 into master Feb 13, 2025
4 of 7 checks passed
@zliu41 zliu41 deleted the zliu41/inline--fix branch February 13, 2025 16:36
@zliu41
Copy link
Member Author

zliu41 commented Feb 13, 2025

I wonder if we should make this mechanism more general, e.g.
UPLC inliner decisions are driven by annotations on individual functions, rather than flags/options.

Yes in general, but the fixed point operators are generated by the compiler, not written by the user.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants