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

Instruction Combining #2755

Closed
sezna opened this issue Sep 8, 2022 · 3 comments
Closed

Instruction Combining #2755

sezna opened this issue Sep 8, 2022 · 3 comments
Labels
compiler: ir IRgen and sway-ir including optimization passes compiler: optimization IR Optimization Passes P: low

Comments

@sezna
Copy link
Contributor

sezna commented Sep 8, 2022

While we can't fully implement this without gas profiling and knowledge of instruction costs, we can do some basic combinations like folding successive adds to the same register into one add, etc.

@sezna sezna added compiler: ir IRgen and sway-ir including optimization passes P: low labels Sep 8, 2022
@sezna
Copy link
Contributor Author

sezna commented Sep 8, 2022

relevant to optimize things within what are currently asm blocks: #855

We can't optimize inside asm blocks, so we would need to introduce intrinsics for a lot of basic opcodes.

@vaivaswatha
Copy link
Contributor

folding successive adds to the same register into one add,

I'm not sure I understand this. Can you post a small example? Also any other patterns that need to be optimized, which you have in mind. That'll help me plan this better.

@vaivaswatha vaivaswatha removed their assignment Oct 16, 2023
@vaivaswatha
Copy link
Contributor

Closing this due to lack of information.

Related #5270.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: ir IRgen and sway-ir including optimization passes compiler: optimization IR Optimization Passes P: low
Projects
None yet
Development

No branches or pull requests

3 participants