[llvm] r346274 - [MachineOutliner][NFC] Remove IsInTree from SuffixTreeNode

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


Author: paquette
Date: Tue Nov  6 14:21:11 2018
New Revision: 346274

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

After changing the way we find repeated substrings in r346269, this
field is no longer used by anything, so it can be removed.

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=346274&r1=346273&r2=346274&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineOutliner.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineOutliner.cpp Tue Nov  6 14:21:11 2018
@@ -128,9 +128,6 @@ struct SuffixTreeNode {
   /// mapping by tacking that character on the end of the current string.
   DenseMap<unsigned, SuffixTreeNode *> Children;
 
-  /// A flag set to false if the node has been pruned from the tree.
-  bool IsInTree = true;
-
   /// The start index of this node's substring in the main string.
   unsigned StartIdx = EmptyIdx;
 
@@ -533,7 +530,6 @@ public:
   /// \param Str The string to construct the suffix tree for.
   SuffixTree(const std::vector<unsigned> &Str) : Str(Str) {
     Root = insertInternalNode(nullptr, EmptyIdx, EmptyIdx, 0);
-    Root->IsInTree = true;
     Active.Node = Root;
 
     // Keep track of the number of suffixes we have to add of the current




More information about the llvm-commits mailing list