Return true if N is a predecessor of any node in Worklist.
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);
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.
True if N is a predecessor of any node in Worklist.
| Name | Description |
|---|---|
| N | Node sought as a predecessor. |
| Visited | Set of already-visited nodes (updated). |
| Worklist | Nodes whose predecessors are searched (updated). |
| MaxSteps | Max nodes to visit, or 0 for unlimited. |
| TopologicalPrune | Enable pruning via positive NodeIds. |