26#ifndef LLVM_SUPPORT_SUFFIXTREE_NODE_H
27#define LLVM_SUPPORT_SUFFIXTREE_NODE_H
47 unsigned ConcatLen = 0;
92 : Kind(Kind), StartIdx(StartIdx) {}
172 unsigned *EndIdx =
nullptr;
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
This file defines the DenseMap class.
This is an optimization pass for GlobalISel generic memory operations.
Determine the kind of a node from its type.
DenseMap< unsigned, SuffixTreeNode * > Children
The children of this node.
virtual ~SuffixTreeInternalNode()=default
static bool classof(const SuffixTreeNode *N)
SuffixTreeInternalNode * getLink() const
unsigned getEndIdx() const override
void setLink(SuffixTreeInternalNode *L)
Sets Link to L. Assumes L is not null.
SuffixTreeInternalNode(unsigned StartIdx, unsigned EndIdx, SuffixTreeInternalNode *Link)
virtual ~SuffixTreeLeafNode()=default
void setSuffixIdx(unsigned Idx)
Sets the start index of the suffix represented by this leaf to Idx.
unsigned getEndIdx() const override
static bool classof(const SuffixTreeNode *N)
unsigned getSuffixIdx() const
SuffixTreeLeafNode(unsigned StartIdx, unsigned *EndIdx)
A node in a suffix tree which represents a substring or suffix.
void incrementStartIdx(unsigned Inc)
Advance this node's StartIdx by Inc.
void setConcatLen(unsigned Len)
Set the length of the string from the root to this node to Len.
unsigned getLeftLeafIdx() const
virtual ~SuffixTreeNode()=default
unsigned getRightLeafIdx() const
void setRightLeafIdx(unsigned Idx)
Set the index of the right most leaf node of this node to Idx.
SuffixTreeNode(NodeKind Kind, unsigned StartIdx)
unsigned getConcatLen() const
static const unsigned EmptyIdx
Represents an undefined index in the suffix tree.
unsigned getStartIdx() const
void setLeftLeafIdx(unsigned Idx)
Set the index of the left most leaf node of this node to Idx.
virtual unsigned getEndIdx() const =0