Skip to content

Smowton/fix/type equality improvements #4173

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

Merged

Conversation

smowton
Copy link
Contributor

@smowton smowton commented Feb 13, 2019

Note this targets the type-equality branch -- I think these changes should go in alongside it. The value-set fixup is functional; everything else is cosmetic.

{
std::cerr << symbol << '\n';
std::cerr << ns.lookup(id) << '\n';
}
INVARIANT(base_type_eq(symbol.type, ns.lookup(id).type, ns),
"type matches");
INVARIANT(symbol.type == ns.lookup(id).type, "type matches");
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd say you can just remove this code.

@@ -262,9 +262,6 @@ bool simplify_exprt::simplify_member(exprt &expr)

// Guess: turning this into a byte-extract operation is not really an
// optimisation.
// The type_eq check is because get_subexpression_at_offset uses
// base_type_eq, whereas in the context of a simplifier we should not
// change the type of the expression.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll note down a TODO on my end to remove that type equality check when enabling the simplifier type equality checks.

@smowton
Copy link
Contributor Author

smowton commented Feb 13, 2019

Assigning @kroening since it's his PR. CI failures expected for the time being.

@kroening kroening merged commit ce19734 into diffblue:type-equality Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants