free_strict: pass the correct expression to free hooks.
[smatch.git] / flowgraph.h
blob5a9c26073554ff2b7fe35a677cb0cdc213daa203
1 #ifndef FLOWGRAPH_H
2 #define FLOWGRAPH_H
4 ///
5 // Utilities for flowgraphs
6 // ------------------------
8 #include <stdbool.h>
10 struct entrypoint;
11 struct basic_block;
13 ///
14 // Set the BB's reverse postorder links
15 // Each BB will also have its 'order number' set.
16 int cfg_postorder(struct entrypoint *ep);
18 ///
19 // Build the dominance tree.
20 // Each BB will then have:
21 // - a link to its immediate dominator (::idom)
22 // - the list of BB it immediately dominates (::doms)
23 // - its level in the dominance tree (::dom_level)
24 void domtree_build(struct entrypoint *ep);
26 ///
27 // Test the dominance between two basic blocks.
28 // @a: the basic block expected to dominate
29 // @b: the basic block expected to be dominated
30 // @return: ``true`` if @a dominates @b, ``false`` otherwise.
31 bool domtree_dominates(struct basic_block *a, struct basic_block *b);
33 #endif