Returns true if N is a predecessor of any node in Worklist. This helper keeps Visited and Worklist sets externally to allow unions searches to be performed in parallel, caching of results across queries and incremental addition to Worklist. Stops early if N is found but will resume. Remember to clear Visited and Worklists if DAG changes. MaxSteps gives a maximum number of nodes to visit before giving up. The TopologicalPrune flag signals that positive NodeIds are topologically ordered (Operands have strictly smaller node id) and search can be pruned leveraging this.
Declared in <llvm/CodeGen/SelectionDAGNodes.h>
static
bool
hasPredecessorHelper(
SDNode const* N,
SmallPtrSetImpl<SDNode const*>& Visited,
SmallVectorImpl<SDNode const*>& Worklist,
unsigned int MaxSteps = 0,
bool TopologicalPrune = false);
| Name | Description |
|---|---|
| N | Represents one node in the SelectionDAG. |
| Visited | A templated base class for SmallPtrSet which provides the typesafe interface that is common across all small sizes. |
| Worklist | This class consists of common code factored out of the SmallVector class to reduce code duplication based on the SmallVector 'N' template parameter. |