[llvm] r257086 - [DominatorTree] Remove unnecessary map population. NFC.
Michael Liao via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 7 11:21:29 PST 2016
Author: hliao
Date: Thu Jan 7 13:21:29 2016
New Revision: 257086
URL: http://llvm.org/viewvc/llvm-project?rev=257086&view=rev
Log:
[DominatorTree] Remove unnecessary map population. NFC.
- The reason of population these maps seems not valid any more.
Modified:
llvm/trunk/include/llvm/Support/GenericDomTree.h
Modified: llvm/trunk/include/llvm/Support/GenericDomTree.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GenericDomTree.h?rev=257086&r1=257085&r2=257086&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/GenericDomTree.h (original)
+++ llvm/trunk/include/llvm/Support/GenericDomTree.h Thu Jan 7 13:21:29 2016
@@ -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);
}
}
More information about the llvm-commits
mailing list