26#ifndef LLVM_SUPPORT_SUFFIXTREE_NODE_H
27#define LLVM_SUPPORT_SUFFIXTREE_NODE_H
48 unsigned ConcatLen = 0;
93 : Kind(Kind), StartIdx(StartIdx) {}
138 unsigned getEndIdx()
const override;
173 unsigned *EndIdx =
nullptr;
182 unsigned getEndIdx()
const override;
185 unsigned getSuffixIdx()
const;
188 void setSuffixIdx(
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(unsigned StartIdx, unsigned EndIdx, SuffixTreeInternalNode *Link)
virtual ~SuffixTreeLeafNode()=default
static bool classof(const SuffixTreeNode *N)
SuffixTreeLeafNode(unsigned StartIdx, unsigned *EndIdx)
LLVM_ABI void incrementStartIdx(unsigned Inc)
Advance this node's StartIdx by Inc.
LLVM_ABI void setConcatLen(unsigned Len)
Set the length of the string from the root to this node to Len.
LLVM_ABI unsigned getLeftLeafIdx() const
virtual ~SuffixTreeNode()=default
LLVM_ABI unsigned getRightLeafIdx() const
LLVM_ABI void setRightLeafIdx(unsigned Idx)
Set the index of the right most leaf node of this node to Idx.
SuffixTreeNode(NodeKind Kind, unsigned StartIdx)
LLVM_ABI unsigned getConcatLen() const
static const unsigned EmptyIdx
Represents an undefined index in the suffix tree.
LLVM_ABI unsigned getStartIdx() const
LLVM_ABI void setLeftLeafIdx(unsigned Idx)
Set the index of the left most leaf node of this node to Idx.
virtual unsigned getEndIdx() const =0