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

feat(EVM-emulator): add support for propagating LLVM options #858

Conversation

vladimirradosavljevic
Copy link

What ❔

This PR adds support for propagating LLVM options for EVM emulator. In order to propagate LLVM options, file with the same name as contract should be created with .llvm.options extension (e.g. EvmEmulator.yul.llvm.options) and this file should contain LLVM options where first and last character must be a single quote (e.g. '-eravm-jump-table-density-threshold=10').

Why ❔

To fine tune EVM emulator.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

@vladimirradosavljevic
Copy link
Author

vladimirradosavljevic commented Oct 10, 2024

@0xVolosnikov PTAL. Please note that this currently is not working, since current version of the zksolc (1.5.0 with prerelease versionprerelease-a167aa3-code4rena) doesn't have support for --llvm-options option, so we should wait for the newest release to fully test it.

@hedgar2017
Copy link

@0xVolosnikov PTAL. Please note that this currently is not working, since current version of the zksolc (1.5.0 with prerelease versionprerelease-a167aa3-code4rena) doesn't have support for --llvm-options option, so we should wait for the newest release to fully test it.

Just curious, why not possible to test with v1.5.4?

@vladimirradosavljevic
Copy link
Author

vladimirradosavljevic commented Oct 11, 2024

@0xVolosnikov PTAL. Please note that this currently is not working, since current version of the zksolc (1.5.0 with prerelease versionprerelease-a167aa3-code4rena) doesn't have support for --llvm-options option, so we should wait for the newest release to fully test it.

Just curious, why not possible to test with v1.5.4?

To test with v1.5.4, we need #830 + -eravm-enable-split-loop-phi-live-ranges -tail-merge-only-bbs-without-succ are not present in v1.5.4 but will be included in v1.5.5.
I tested this support with v1.5.0 and -eravm-jump-table-density-threshold=10 -tail-dup-size=4 options work like a charm.

@0xVolosnikov 0xVolosnikov merged commit 418b4a9 into matter-labs:stable/evm-emulator Oct 18, 2024
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants