Class ControlFlowSimplification
- Namespace
- ICSharpCode.Decompiler.IL.ControlFlow
- Assembly
- ICSharpCode.Decompiler.dll
This transform 'optimizes' the control flow logic in the IL code: it replaces constructs that are generated by the C# compiler in debug mode with shorter constructs that are more straightforward to analyze.
public class ControlFlowSimplification : IILTransform
- Inheritance
-
ControlFlowSimplification
- Implements
- Inherited Members
Remarks
The transformations performed are:
- 'nop' instructions are removed
- branches that lead to other branches are replaced with branches that directly jump to the destination
- branches that lead to a 'return block' are replaced with a return instruction
- basic blocks are combined where possible
Constructors
ControlFlowSimplification()
public ControlFlowSimplification()
Methods
Run(ILFunction, ILTransformContext)
public void Run(ILFunction function, ILTransformContext context)
Parameters
function
ILFunctioncontext
ILTransformContext