-
Notifications
You must be signed in to change notification settings - Fork 49
Bump LLVM #1381
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
Draft
FrancoGiachetta
wants to merge
19
commits into
main
Choose a base branch
from
bump-llvm-20
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Bump LLVM #1381
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Code is now correctly formatted. |
Benchmarking resultsBenchmark for program
|
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
10.336 ± 0.058 | 10.265 | 10.450 | 4.27 ± 0.05 |
cairo-native (embedded AOT) |
2.418 ± 0.027 | 2.386 | 2.458 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.481 ± 0.015 | 2.467 | 2.508 | 1.03 ± 0.01 |
Benchmark for program dict_snapshot
Open benchmarks
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
512.5 ± 6.5 | 505.1 | 525.6 | 1.00 |
cairo-native (embedded AOT) |
2109.5 ± 17.0 | 2093.9 | 2145.6 | 4.12 ± 0.06 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2208.5 ± 20.7 | 2197.6 | 2266.1 | 4.31 ± 0.07 |
Benchmark for program factorial_2M
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.615 ± 0.033 | 4.580 | 4.681 | 1.82 ± 0.02 |
cairo-native (embedded AOT) |
2.530 ± 0.024 | 2.497 | 2.575 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.560 ± 0.010 | 2.542 | 2.575 | 1.01 ± 0.01 |
Benchmark for program fib_2M
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.527 ± 0.086 | 4.465 | 4.753 | 2.19 ± 0.04 |
cairo-native (embedded AOT) |
2.069 ± 0.015 | 2.058 | 2.108 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.113 ± 0.011 | 2.090 | 2.127 | 1.02 ± 0.01 |
Benchmark for program linear_search
Open benchmarks
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
558.0 ± 7.9 | 550.5 | 575.3 | 1.00 |
cairo-native (embedded AOT) |
2154.9 ± 40.7 | 2111.9 | 2243.2 | 3.86 ± 0.09 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2270.4 ± 25.8 | 2247.3 | 2337.5 | 4.07 ± 0.07 |
Benchmark for program logistic_map
Open benchmarks
Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
369.9 ± 6.3 | 363.8 | 382.7 | 1.00 |
cairo-native (embedded AOT) |
2218.2 ± 7.9 | 2205.9 | 2230.1 | 6.00 ± 0.10 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2402.1 ± 24.3 | 2371.0 | 2446.9 | 6.49 ± 0.13 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bump LLVM
Closes #1378
This PR bumps LLVM to LLVM 20. To do this, the following crates updated:
Many of this changes are due to some refactors in melior. It seems to have split some block and region operation into the traits:
BlockLike
,RegionLike
,AttributLike
andOperationLike
.LLVM 20 introduces a breaking change. Operations which take more than one group of variadic operands then the user to specify the amount of operands (for each group) it is receiving through the attribute
operandSegmentSizes
. Due to this, ourllvm.call
operations started to fail. You may want to check its TableGen definition here.To avoid having to specify in each of these operations this new attribute by hand, I created a new function
llvm_call
insideutils/operation_ext.rs
. It wraps theOperationBuilder
and calculates the operandSegmentSizes based on the arguments length.Lastly, the firm of the function
mlirLLVMDISubprogramAttrGet
changed a little:There were added 6 new parameters:
The first two are for specifying that the
DISubprogramAttr
supports recursive reference to itself. The last four are to specify metadata for the subprogram.PR for sequencer: lambdaclass/sequencer#76
PR for starknet-replay: lambdaclass/starknet-replay#189
PD: the benches comparison workflow will fail since main still uses llvm 19.
Introduces Breaking Changes?
Yes
starknet-blocks.yml
workflow to use these PRs.These PRs should be merged after this one right away, in that order.
Checklist