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

Enable the YUL IR pipeline when building with optimisations #3279

Merged
merged 2 commits into from
Jun 13, 2022

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Mar 22, 2022

Since 0.8.13, the YUL IR pipeline is no longer experimental.

This greatly impacts the compilation time when optimization is enabled (from ~20 to ~80sec on my machine), so most tests should continue to run on the non-optimized version.

@Amxx Amxx added the tooling label Jun 7, 2022
@frangio
Copy link
Contributor

frangio commented Jun 10, 2022

Is viaIR: true the recommended setting now?

@Amxx
Copy link
Collaborator Author

Amxx commented Jun 10, 2022

From the 0.8.13 release note:

Furthermore, compiling via the new Yul IR pipeline is now considered production ready.

That doesn't really answer te question, but that is all I could find

@frangio
Copy link
Contributor

frangio commented Jun 10, 2022

Found this in the release announcement for 0.8.13:

The performance of the new pipeline is not yet always superior to the old one, but it can do much higher-level optimization across functions, so please try it out and give us feedback!

I don't think turning this on changes anything for us. If this is about the compiled artifacts we ship in the package, I wouldn't turn it on yet. If anything, when benchmarking we should be comparing both options and reporting odd results to the compiler team.

@Amxx
Copy link
Collaborator Author

Amxx commented Jun 10, 2022

I've also noticed that turning the IR pipeline cause some contract to not compile (some unspecified error showed up)

I don't think we should enable by default, but we should check our contract do compile with it ... and then do some gas comparaison

@frangio frangio merged commit 5a0bff4 into OpenZeppelin:master Jun 13, 2022
@Amxx Amxx deleted the build/viaIR branch June 13, 2022 15:39
ronhuafeng added a commit to ronhuafeng/openzeppelin-contracts that referenced this pull request Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants