32#ifndef LLVM_SUPPORT_SUFFIXTREE_H
33#define LLVM_SUPPORT_SUFFIXTREE_H
108 unsigned StartIdx,
unsigned EndIdx,
118 void setSuffixIndices();
134 unsigned extend(
unsigned EndIdx,
unsigned SuffixesToAdd);
140 std::vector<SuffixTreeLeafNode *> LeafNodes;
174 const unsigned MinLength = 2;
177 const std::vector<SuffixTreeLeafNode *> &LeafNodes;
180 bool OutlinerLeafDescendants = !LeafNodes.empty();
204 return !(*
this ==
Other);
209 const std::vector<SuffixTreeLeafNode *> &LeafNodes = {})
210 :
N(N), LeafNodes(LeafNodes) {
This file defines the BumpPtrAllocator interface.
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A BumpPtrAllocator that allows only elements of a specific type to be allocated.
ArrayRef< unsigned > Str
Each element is an integer representing an instruction in the module.
RepeatedSubstringIterator iterator
bool OutlinerLeafDescendants
Whether to consider leaf descendants or only leaf children.
This is an optimization pass for GlobalISel generic memory operations.
A node in a suffix tree which represents a substring or suffix.
static const unsigned EmptyIdx
Represents an undefined index in the suffix tree.
Iterator for finding all repeated substrings in the suffix tree.
RepeatedSubstringIterator operator++(int I)
RepeatedSubstringIterator(SuffixTreeInternalNode *N, const std::vector< SuffixTreeLeafNode * > &LeafNodes={})
bool operator!=(const RepeatedSubstringIterator &Other) const
RepeatedSubstring & operator*()
Return the current repeated substring.
bool operator==(const RepeatedSubstringIterator &Other) const
RepeatedSubstringIterator & operator++()
A repeated substring in the tree.
SmallVector< unsigned > StartIndices
The start indices of each occurrence.
unsigned Length
The length of the string.