16
16
// / get all functions whose address is taken
17
17
void compute_address_taken_functions (
18
18
const exprt &src,
19
- std::set <irep_idt> &address_taken)
19
+ std::unordered_set <irep_idt> &address_taken)
20
20
{
21
21
forall_operands (it, src)
22
22
compute_address_taken_functions (*it, address_taken);
@@ -35,7 +35,7 @@ void compute_address_taken_functions(
35
35
// / get all functions in the expression
36
36
void compute_functions (
37
37
const exprt &src,
38
- std::set <irep_idt> &address_taken)
38
+ std::unordered_set <irep_idt> &address_taken)
39
39
{
40
40
forall_operands (it, src)
41
41
compute_functions (*it, address_taken);
@@ -48,7 +48,7 @@ void compute_functions(
48
48
// / get all functions whose address is taken
49
49
void compute_address_taken_functions (
50
50
const goto_programt &goto_program,
51
- std::set <irep_idt> &address_taken)
51
+ std::unordered_set <irep_idt> &address_taken)
52
52
{
53
53
forall_goto_program_instructions (it, goto_program)
54
54
{
@@ -60,27 +60,27 @@ void compute_address_taken_functions(
60
60
// / get all functions whose address is taken
61
61
void compute_address_taken_functions (
62
62
const goto_functionst &goto_functions,
63
- std::set <irep_idt> &address_taken)
63
+ std::unordered_set <irep_idt> &address_taken)
64
64
{
65
65
forall_goto_functions (it, goto_functions)
66
66
compute_address_taken_functions (it->second .body , address_taken);
67
67
}
68
68
69
69
// / get all functions whose address is taken
70
- std::set <irep_idt> compute_address_taken_functions (
70
+ std::unordered_set <irep_idt> compute_address_taken_functions (
71
71
const goto_functionst &goto_functions)
72
72
{
73
- std::set <irep_idt> address_taken;
73
+ std::unordered_set <irep_idt> address_taken;
74
74
compute_address_taken_functions (goto_functions, address_taken);
75
75
return address_taken;
76
76
}
77
77
78
78
// / computes the functions that are (potentially) called
79
- std::set <irep_idt> compute_called_functions (
79
+ std::unordered_set <irep_idt> compute_called_functions (
80
80
const goto_functionst &goto_functions)
81
81
{
82
- std::set <irep_idt> working_queue;
83
- std::set <irep_idt> functions;
82
+ std::unordered_set <irep_idt> working_queue;
83
+ std::unordered_set <irep_idt> functions;
84
84
85
85
// start from entry point
86
86
working_queue.insert (goto_functions.entry_point ());
@@ -121,7 +121,7 @@ std::set<irep_idt> compute_called_functions(
121
121
}
122
122
123
123
// / computes the functions that are (potentially) called
124
- std::set <irep_idt> compute_called_functions (
124
+ std::unordered_set <irep_idt> compute_called_functions (
125
125
const goto_modelt &goto_model)
126
126
{
127
127
return compute_called_functions (goto_model.goto_functions );
0 commit comments