ILGPU  0.9.0
ILGPU.IR.Analyses.TraversalOrders.ReversePostOrder Struct Reference

Enumerates all basic blocks in reverse post order. More...

Inheritance diagram for ILGPU.IR.Analyses.TraversalOrders.ReversePostOrder:
ILGPU.IR.Analyses.TraversalOrders.ITraversalOrder ILGPU.IR.Analyses.TraversalOrders.ICompatibleTraversalOrder< PostOrder >

Public Member Functions

readonly TraversalEnumerationState Init< TCollection > (TCollection blocks)
 Initializes a new enumeration state. More...
 
readonly bool MoveNext< TCollection > (TCollection blocks, ref TraversalEnumerationState state)
 Tries to move the state to the next block. More...
 
readonly void Traverse< TVisitor, TSuccessorProvider, TDirection > (BasicBlock entryBlock, ref TVisitor visitor, TSuccessorProvider successorProvider)
 Computes a traversal using the current order. More...
 

Detailed Description

Enumerates all basic blocks in reverse post order.

Member Function Documentation

readonly TraversalEnumerationState ILGPU.IR.Analyses.TraversalOrders.ReversePostOrder.Init< TCollection > ( TCollection  blocks)

Initializes a new enumeration state.

Parameters
blocksThe list of blocks to enumerate.

Implements ILGPU.IR.Analyses.TraversalOrders.ITraversalOrder.

Type Constraints
TCollection :IReadOnlyList<BasicBlock> 
TCollection :TraversalOrder.BackwardsInit 
TCollection :blocks 
readonly bool ILGPU.IR.Analyses.TraversalOrders.ReversePostOrder.MoveNext< TCollection > ( TCollection  blocks,
ref TraversalEnumerationState  state 
)

Tries to move the state to the next block.

Parameters
blocksThe list of blocks to enumerate.
stateThe current enumeration state.
Returns
True, if there is a next block.

Implements ILGPU.IR.Analyses.TraversalOrders.ITraversalOrder.

Type Constraints
TCollection :IReadOnlyList<BasicBlock> 
TCollection :TraversalOrder.BackwardsMoveNext 
TCollection :ref 
TCollection :state 
readonly void ILGPU.IR.Analyses.TraversalOrders.ReversePostOrder.Traverse< TVisitor, TSuccessorProvider, TDirection > ( BasicBlock  entryBlock,
ref TVisitor  visitor,
TSuccessorProvider  successorProvider 
)

Computes a traversal using the current order.

Template Parameters
TVisitorThe visitor type.
TSuccessorProviderThe successor provider.
TDirectionThe control-flow direction.
Parameters
entryBlockThe entry block.
visitorThe visitor instance.
successorProviderThe successor provider.
Returns
The created traversal.

Implements ILGPU.IR.Analyses.TraversalOrders.ITraversalOrder.

Type Constraints
TVisitor :struct 
TVisitor :ITraversalVisitor 
TSuccessorProvider :ITraversalSuccessorsProvider<TDirection> 
TDirection :struct 
TDirection :IControlFlowDirection 

The documentation for this struct was generated from the following file: