-
Notifications
You must be signed in to change notification settings - Fork 273
Implement gcc integer overflow builtins. #4701
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
Comments
@tautschnig may have solved this already; if so, feel free to close the ticket |
Note: the current overflow primitives lead to a significant performance cost when used in the naïve way, since they require the user to do a multiplication, keep the overflow bit but throw away the result, and do it again to get the result. Fixing this would help performance. |
Maybe. In some cases the back-end will cache the two things back together. More importantly though, there are way better encodings of multiply overflow check than doing the full multiply. |
@martin-cs What are the way better encodings for multiply overflow check? |
@hannes-steffenhagen-diffblue Somewhere there is a Z3 paper from ... '09 or so with a more compact encoding but, as it's Friday, let's see what we can do in a comment. First do the unsigned case as it's easier. Assume bit-vectors are length n. Consider the easy cases first: @danielsn / @hannes-steffenhagen-diffblue If either of you have interest and a set of real-world performance critical benchmarks that depend on this I can try to turn this into code and / or talk one of you through doing it. |
@danielsn The primitives have been implemented in PRs #5233, #5235, #5236, #5249 which have all been merged. What could still be done is implement some of the ideas for speeding up the checks. I would suggest we close this ticket here, and if the performance improvements are still required we can create a separate issue/ticket. |
Sounds good. Let’s open an issue for the checks, which are indeed the
bottlenecks for some proofs.
…On Wed, Jul 1, 2020 at 10:05 AM Daniel Poetzl ***@***.***> wrote:
@danielsn <https://github.com/danielsn> The primitives have been
implemented in PRs #5233 <#5233>,
#5235 <#5235>, #5236
<#5236>, #5249
<#5249> which have all been merged.
What could still be done is implement some of the ideas for speeding up the
checks. I would suggest we close this ticket here, and if the performance
improvements are still required we can create a separate issue/ticket.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4701 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBPVDXZL3CEQWGFXE7U4UDRZM7B3ANCNFSM4HPKCMNA>
.
|
Issue for the performance improvements: #5405 |
Now that we have the overflow primitives, it would make sense to implement all the gcc builtins https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html
The text was updated successfully, but these errors were encountered: