forked from OSchip/llvm-project
[DominatorTree] Remove unnecessary map population. NFC.
- The reason of population these maps seems not valid any more. llvm-svn: 257086
This commit is contained in:
parent
c24eeddda2
commit
45029d1677
|
@ -724,25 +724,17 @@ public:
|
|||
if (!this->IsPostDominators) {
|
||||
// Initialize root
|
||||
NodeT *entry = TraitsTy::getEntryNode(&F);
|
||||
this->Roots.push_back(entry);
|
||||
this->IDoms[entry] = nullptr;
|
||||
this->DomTreeNodes[entry] = nullptr;
|
||||
addRoot(entry);
|
||||
|
||||
Calculate<FT, NodeT *>(*this, F);
|
||||
} else {
|
||||
// Initialize the roots list
|
||||
for (typename TraitsTy::nodes_iterator I = TraitsTy::nodes_begin(&F),
|
||||
E = TraitsTy::nodes_end(&F);
|
||||
I != E; ++I) {
|
||||
I != E; ++I)
|
||||
if (TraitsTy::child_begin(&*I) == TraitsTy::child_end(&*I))
|
||||
addRoot(&*I);
|
||||
|
||||
// Prepopulate maps so that we don't get iterator invalidation issues
|
||||
// later.
|
||||
this->IDoms[&*I] = nullptr;
|
||||
this->DomTreeNodes[&*I] = nullptr;
|
||||
}
|
||||
|
||||
Calculate<FT, Inverse<NodeT *>>(*this, F);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue