[llvm] r257086 - [DominatorTree] Remove unnecessary map population. NFC.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 7 11:27:41 PST 2016


Can you explain a little bit more?

IE what the issue was before you think no longer exists anymore?


On Thu, Jan 7, 2016 at 11:21 AM, Michael Liao via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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);
>      }
>    }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160107/b4f02d1b/attachment.html>


More information about the llvm-commits mailing list