[PATCH] D31818: [MemorySSA] Remove dominator umbering

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 11:06:03 PDT 2017


davide created this revision.
Herald added a subscriber: Prazek.

Apparently this was originally used in the `phi` placement algorithm, but now it's pretty much dead.
I wasn't sure if you planned to use for something else in the future, hence this review.


https://reviews.llvm.org/D31818

Files:
  include/llvm/Transforms/Utils/MemorySSA.h
  lib/Transforms/Utils/MemorySSA.cpp


Index: lib/Transforms/Utils/MemorySSA.cpp
===================================================================
--- lib/Transforms/Utils/MemorySSA.cpp
+++ lib/Transforms/Utils/MemorySSA.cpp
@@ -973,13 +973,6 @@
   }
 }

-/// \brief Compute dominator levels, used by the phi insertion algorithm above.
-void MemorySSA::computeDomLevels(DenseMap<DomTreeNode *, unsigned> &DomLevels) {
-  for (auto DFI = df_begin(DT->getRootNode()), DFE = df_end(DT->getRootNode());
-       DFI != DFE; ++DFI)
-    DomLevels[*DFI] = DFI.getPathLength() - 1;
-}
-
 /// \brief This handles unreachable block accesses by deleting phi nodes in
 /// unreachable blocks, and marking all other unreachable MemoryAccess's as
 /// being uses of the live on entry definition.
Index: include/llvm/Transforms/Utils/MemorySSA.h
===================================================================
--- include/llvm/Transforms/Utils/MemorySSA.h
+++ include/llvm/Transforms/Utils/MemorySSA.h
@@ -701,7 +701,6 @@

   void
   determineInsertionPoint(const SmallPtrSetImpl<BasicBlock *> &DefiningBlocks);
-  void computeDomLevels(DenseMap<DomTreeNode *, unsigned> &DomLevels);
   void markUnreachableAsLiveOnEntry(BasicBlock *BB);
   bool dominatesUse(const MemoryAccess *, const MemoryAccess *) const;
   MemoryPhi *createMemoryPhi(BasicBlock *BB);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31818.94543.patch
Type: text/x-patch
Size: 1309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170410/f516e668/attachment.bin>


More information about the llvm-commits mailing list