MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
domfrontier.cpp
Go to the documentation of this file.
2
4
5namespace mim {
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 mim
Definition cfg.h:11