[llvm] r346275 - [MachineOutliner][NFC] Remove OccurrenceCount from SuffixTreeNode

Jessica Paquette via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 6 14:23:14 PST 2018


Author: paquette
Date: Tue Nov  6 14:23:13 2018
New Revision: 346275

URL: http://llvm.org/viewvc/llvm-project?rev=346275&view=rev
Log:
[MachineOutliner][NFC] Remove OccurrenceCount from SuffixTreeNode

After changing the way we find candidates in r346269, this is no longer used.

Modified:
    llvm/trunk/lib/CodeGen/MachineOutliner.cpp

Modified: llvm/trunk/lib/CodeGen/MachineOutliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineOutliner.cpp?rev=346275&r1=346274&r2=346275&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineOutliner.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineOutliner.cpp Tue Nov  6 14:23:13 2018
@@ -167,12 +167,6 @@ struct SuffixTreeNode {
   /// The parent of this node. Every node except for the root has a parent.
   SuffixTreeNode *Parent = nullptr;
 
-  /// The number of times this node's string appears in the tree.
-  ///
-  /// This is equal to the number of leaf children of the string. It represents
-  /// the number of suffixes that the node's string is a prefix of.
-  unsigned OccurrenceCount = 0;
-
   /// The length of the string formed by concatenating the edge labels from the
   /// root to this node.
   unsigned ConcatLen = 0;
@@ -352,7 +346,6 @@ private:
       // If yes, give it a suffix index and bump its parent's occurrence count.
       CurrNode.SuffixIdx = Str.size() - CurrIdx;
       assert(CurrNode.Parent && "CurrNode had no parent!");
-      CurrNode.Parent->OccurrenceCount++;
     }
   }
 




More information about the llvm-commits mailing list