Conversation
move by movi when possible
|
Comparing 'e2e-gas-usages':
| should_pass/stdlib/u128_log_test (test.toml) | 11100 | 11109 | -0.08% | Comparing 'e2e-bytecode-sizes':
| should_pass/stdlib/u128_log_test (test.toml) | 4512 | 4520 | -0.18% | Comparing 'in-language-gas-usages':
| u128_inline_tests::parity_u128_log_with_ruint | 1756499 | 1757515 | -0.06% | Comparing 'bytecode-sizes' for project 'o2':
Comparing 'gas-usages' for project 'o2':
|
move by movi when possiblemove by movi when possible
48770b2 to
5929427
Compare
|
e2e gas usage
e2e bytecode
in lang gas usage
Comparing 'gas-usages' for project 'o2':
Comparing 'bytecode-sizes' for project 'o2':
|
move by movi when possibleasm const propagation
PR SummaryMedium Risk Overview To support these transforms, the ASM layer adds small ergonomics and representation tweaks (e.g., Generated output changes ripple into updated integration/snapshot expectations: Written by Cursor Bugbot for commit f81f077. This will update automatically on new commits. Configure here. |
126f1ce to
91861d1
Compare
|
e2e gas usage
e2e bytecode
inlang gas usage
Comparing 'bytecode-sizes' for project 'o2':
Comparing 'gas-usages' for project 'o2':
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Description
This PR optimises
ASMconst propagation. That means that it tries to use as few registers as possible, hoping that their initialisation can be removed later with DCE and others...This is particularly useful on function calls, and indexing:
1 - On function calls we normally have something like
We now replace this with:
and let DCE kill the
movi $r0 i0because is no longer neeed;2 - Constant indexing like
something[0]normally generatesaddiandmul, now these will be coalesced into a simplemoviGain on testing is huge because we tend to have tons of constants on tests... on real code like
O2, we see more humble gains.Checklist
Breaking*orNew Featurelabels where relevant.