Skip to content

Start moving optimizations to the package build #2881

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

Merged
merged 2 commits into from
May 30, 2022
Merged

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented May 30, 2022

This is for #2870.

I'd like to move optimization passes to the package build whenever possible, so that #2870 becomes easier. It should also improve compile time a little bit when the package is already cached although this is probably negligible with the current PR.

This is just a first step to get things going. More changes can be done in separate PRs.

aykevl added 2 commits May 30, 2022 15:44
The transform package is the more appropriate location for package-level
optimizations, to match `transform.Optimize` for whole-program
optimizations.
This is just a refactor, to make later changes easier to read.
This shrinks transform.Optimize() a little bit, working towards the goal
of #2870. I ran the smoke
tests and there is no practical downside: one test got smaller (??) and
one had a different .hex hash, but other than that there was no
difference.

This should also make TinyGo a liiitle bit faster but it's probably not
even measurable.
Copy link
Member

@deadprogram deadprogram left a comment

Choose a reason for hiding this comment

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

Looking good, thanks @aykevl

@deadprogram deadprogram merged commit 97842b3 into dev May 30, 2022
@deadprogram deadprogram deleted the optimize-package branch May 30, 2022 18:39
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