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

Generalize and clean up abs invariant in base analysis #1274

Merged
merged 6 commits into from
Nov 29, 2023

Conversation

sim642
Copy link
Member

@sim642 sim642 commented Nov 27, 2023

This generalizes the abs handling from #1253 and #1254 to happen at any level of the expression, just like other tmpSpecials. This change is in the first commit.

The rest are some refactoring of the surrounding code because the indentation is already 14 tabs deep. I wanted to clean it up more, but the implementation of __builtin_isgreater, etc is implemented hackily to convert Not{0} to 1 to 1.0 to represent it as the expected value for float domains.

@sim642 sim642 added the cleanup Refactoring, clean-up label Nov 27, 2023
@sim642 sim642 added this to the v2.4.0 milestone Nov 27, 2023
@michael-schwarz
Copy link
Member

If it really is a generalization, it would be nice to have a new regression test that passes now.

Copy link
Member

@michael-schwarz michael-schwarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once my comment above is addressed, I'd be happy to merge this.

@sim642 sim642 merged commit db49fe9 into master Nov 29, 2023
16 checks passed
@sim642 sim642 deleted the base-invariant-abs-cleanup branch November 29, 2023 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Refactoring, clean-up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants