Interface IStaticSuccessorResolver<TInstruction>
- Namespace
- Echo.ControlFlow.Construction
- Assembly
- Echo.ControlFlow.dll
Provides members for resolving the static successors of a single instruction. That is, resolve any successor that is encoded within an instruction either explicitly or implicitly.
public interface IStaticSuccessorResolver<TInstruction> where TInstruction : notnull
Type Parameters
TInstructionThe type of instruction to resolve the successors from.
Remarks
This interface is meant for components within the Echo project that require information about the successors of an individual instruction. These are typically control flow graph builders, such as the StaticFlowGraphBuilder<TInstruction> class.
Successors are either directly encoded within the instruction (e.g. as an operand), or implied by the default flow control of the provided instruction:
- For a typical instruction, the method simply returns a collection with only a reference to the fall through instruction that appears right after it in the sequence.
- For branching instructions, however, this method returns a collection of all branch targets, as well as any potential fall through successors if the branching instruction is conditional.
This interface provides members for extracting these successors from the provided instruction.
Methods
GetSuccessors(in TInstruction, IList<SuccessorInfo>)
Gets a collection of references that represent the successors of the provided instruction.
void GetSuccessors(in TInstruction instruction, IList<SuccessorInfo> successorsBuffer)
Parameters
instructionTInstructionThe instruction to resolve the successors from.
successorsBufferIList<SuccessorInfo>The buffer to add the successors into.