Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
domfrontier.cpp
Go to the documentation of this file.
2
4
5namespace thorin {
6
7template<bool forward> void DomFrontierBase<forward>::create() {
8 const auto& domtree = cfg().domtree();
9 for (auto n : cfg().reverse_post_order().subspan(1)) {
10 const auto& preds = cfg().preds(n);
11 if (preds.size() > 1) {
12 auto idom = domtree.idom(n);
13 for (auto pred : preds)
14 for (auto i = pred; i != idom; i = domtree.idom(i)) link(i, n);
15 }
16 }
17}
18
19template class DomFrontierBase<true>;
20template class DomFrontierBase<false>;
21
22} // namespace thorin
Definition cfg.h:11