Skip to content

Function Pointer Removal uses a redundant set #1783

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

Closed
nmanthey opened this issue Jan 31, 2018 · 1 comment
Closed

Function Pointer Removal uses a redundant set #1783

nmanthey opened this issue Jan 31, 2018 · 1 comment

Comments

@nmanthey
Copy link
Contributor

Dear CBMC team,

I just looked into the function pointer removal code to implement a related functionality. While reading, I spotted a redundancy in the code. The marked line shows that a set "functions" and a set "done" is created, which are both filled at the same time. For checking whether the function is "done", the done set is used, while the functions set is finally returned.

I think one of the two sets can be removed, reducing run time as well as memory consumption.

std::set<irep_idt> done;

Best,
Norbert

@martin-cs
Copy link
Collaborator

Thanks for this; I'll see what can be done.

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

No branches or pull requests

2 participants