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

[Polly] Optimize isl's arbitrary precision library usage for small numbers #22156

Closed
tobiasgrosser opened this issue Dec 8, 2014 · 5 comments
Labels
bugzilla Issues migrated from bugzilla polly

Comments

@tobiasgrosser
Copy link
Contributor

Bugzilla Link 21782
Resolution FIXED
Resolved on Jan 18, 2016 17:02
Version unspecified
OS Linux
@tobiasgrosser
Copy link
Contributor Author

isl uses an arbitrary precision integer library to be able to reason about integers and constraints that exceed 64 bit.

HOWEVER, almost all computations in isl are performed on numbers that require significantly less than 32 bits to be computed. When profiling isl a significant amount of time (30-50% is spent in libgmp), with most of this time used for
basic functionality such as isl_int_init, isl_int_set, isl_int_add and isl_int_clear. Reducing the unnecessary function call and malloc traffic may significantly speed up isl.

For Polly, it would be great if a proof of concept patch for isl is written that transforms isl_int to type 'long long' and replaces isl_init_init, isl_int_set, isl_int_add with normal operations on 'long long'. All other computations can be implemented by converting the 'long long' to gmp, performing the original operation and converting back to 'long long. For this proof of concept it is OK
to not even cosider the case where a value may exceed 64 bit.

This patch should enable us to get an idea of the performance benefits that could gained by optimizing isl for small numbers.

@tobiasgrosser
Copy link
Contributor Author

Test case
The following is a test case on which isl spends several 100 mseconds, but which should not require integers larger than 64 bit. It might be good to evaluate a possible patch.

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 16, 2014

I would like to work on this bug.

@tobiasgrosser
Copy link
Contributor Author

Fixed in 240689.

@tlattner
Copy link
Contributor

Move to Polly Product.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla polly
Projects
None yet
Development

No branches or pull requests

3 participants