[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:
Michael Liao 2016-01-07 19:21:29 +00:00
parent c24eeddda2
commit 45029d1677
1 changed files with 2 additions and 10 deletions

View File

@ -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);
}
}