Skip to content

Function Pointer Removal uses a redundant set #1783

Closed
@nmanthey

Description

@nmanthey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions