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

make sure that int.clamp and double.clamp are optimised in AOT #46879

Open
mraleph opened this issue Aug 11, 2021 · 2 comments
Open

make sure that int.clamp and double.clamp are optimised in AOT #46879

mraleph opened this issue Aug 11, 2021 · 2 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-performance Issue relates to performance or code size

Comments

@mraleph
Copy link
Member

mraleph commented Aug 11, 2021

These operations are quite common when dealing with UI / graphics and right now we don't provide good lowering for them.

I have even noticed that we don't always properly propagate return type even when inputs are known to be integers.

On ARM for example we could use saturating instructions when clamping to ranges with power-of-2 based bounaries.

@mraleph mraleph added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-performance Issue relates to performance or code size labels Aug 11, 2021
@mraleph
Copy link
Member Author

mraleph commented Aug 11, 2021

/cc @alexmarkov

@gaaclarke
Copy link
Contributor

FYI I moved Flutter to its own implement of clamp: flutter/flutter#103559

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-performance Issue relates to performance or code size
Projects
None yet
Development

No branches or pull requests

2 participants