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

Fix memory leak of Rules, use bool phony_ member to identify phony edges #2523

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jhasse
Copy link
Collaborator

@jhasse jhasse commented Nov 7, 2024

Not sure if this is worth it and what the performance impact is.

}

bool Rule::IsPhony() const {
return phony_;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Can we just store the address of this Rule in State::phony_rule_ and implement State::IsPhony(const Rule* rule) { return rule == phony_rule_; } instead? This would avoid adding 8 bytes to each Rule instance due to padding.

@digit-google
Copy link
Contributor

Apart from my nit, this LGTM.

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.

2 participants