@@ -59,7 +59,7 @@ std::set<irep_idt> get_reaching_functions(
59
59
std::set<irep_idt> get_functions_reachable_within_n_steps (
60
60
const call_grapht::directed_grapht &graph,
61
61
const std::set<irep_idt> &start_functions,
62
- std::size_t & n);
62
+ std::size_t n);
63
63
64
64
// / Get either callers or callees reachable from a given
65
65
// / list of functions within N steps
@@ -71,6 +71,27 @@ std::set<irep_idt> get_functions_reachable_within_n_steps(
71
71
std::set<irep_idt> get_functions_reachable_within_n_steps (
72
72
const call_grapht::directed_grapht &graph,
73
73
const irep_idt &start_function,
74
- std::size_t &n);
74
+ std::size_t n);
75
+
76
+ // / Get list of functions on the shortest path between two functions
77
+ // / \param graph: call graph
78
+ // / \param src: function to start from
79
+ // / \param dest: function to reach
80
+ // / \return list of functions on shortest path
81
+ std::list<irep_idt> get_shortest_function_path (
82
+ const call_grapht::directed_grapht &graph,
83
+ const irep_idt &src,
84
+ const irep_idt &dest);
85
+
86
+ // / Disconnects all functions in the call graph that are unreachable from
87
+ // / a given start function.
88
+ // / Removing nodes requires re-indexing, so instead we disconnect them, removing
89
+ // / all in and out edges from those nodes.
90
+ // / This speeds up backwards reachability.
91
+ // / \param graph: call graph
92
+ // / \param function: start function
93
+ void disconnect_unreachable_functions (
94
+ call_grapht::directed_grapht &graph,
95
+ const irep_idt &function);
75
96
76
97
#endif
0 commit comments